Copyright: Copyright © 2001 Borland Software Corporation.                      All rights reserved.                                                 This Help file was compiled on   Friday, May 18, 2001 18:46:31.


Welcome to Delphi
Delphi

Using the Help system

To get Help with any Delphi feature, select any Help menu item or Help button, or select any item in the IDE or any word in the editor, and press F1. When Help opens, you can find additional information about any feature or language element by scanning the Help index or using the full text search feature.

Note:

If you opened Help using a Help button or by pressing F1 and this default topic appears instead of the topic you requested, it may be that the topic you’re looking for is either not available in your edition of Delphi, or the topic is not correctly linked within the Help system. If the topic is not correctly linked, you may still be able to locate the information you need by using the Help index or full text search feature.

Copyright © 2001 Borland Software Corporation


About VCL Help

See also

The VCL Help contains reference material on objects, components, global routines, types, and variables that make up the Visual Component Library (VCL). The individual entries for objects, components, routines, types, and variables include the unit in which each is declared. These units are located in the sub-directories of the Source directory in all but the standard version of Delphi.

Objects

An object consists of methods, and in many cases, properties, and events. Properties represent the data contained in the object. Methods are the actions the object can perform. Events are conditions the object can react to. All objects descend from the ancestor object TObject.

Components

Components are visual objects that you can manipulate at design time. All components descend from TComponent.

Routines

Global routines are the procedures and functions from the runtime library and from the VCL. These routines are not part of a class, but can be called either directly or from within class methods.

Types

The types described in the Help are used as return types and parameter types for object methods, properties and events, and for global routines. In many cases, types are documented in the entry for the method, property, event or global routine in which they are used.

Constants and Variables

The constants and variables defined in the Help are declared in the runtime library and in the VCL. Some of these are instantiations of objects. Examples are the Application and Screen variables. Others represent routines that provide the underlying implementation of other methods or global routines. Examples include the AnsiResemblesProc and RegisterComponentsProc variables. Still other variables and constants represent information that can vary with the system or platform, such as the DateSeparator variable and PathDelim constant.

The Help on all of these topics can be accessed either by using the F1 key from the IDE or by using the Contents, Index, or Find from Help.


TBasePageItemsProducer
 VCL Reference

TBasePageItemsProducer

Hierarchy	Properties	Methods	Events	See also

TBasePageItemsProducer produces a string of HTML commands based on an input template.

Unit

PagItems

Description

Use TBasePageItemsProducer to convert an HTML template that includes content generated by other components into a string of HTML commands that can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the components page producer in an OnHTMLTag event handler.

TBasePageItemsProducer differs from other page producer components in that it replaces special HTML-transparent tags of the format

<#COMPONENT Name=WebContentComponent>

with the HTML produced by the components named WebContentComponent. In addition, TBasePageItemsProducer stores a default value for WebContentComponent as the value of its WebPageItems property.


 VCL Reference

TBasePageItemsProducer properties

TBasePageItemsProducer	Alphabetically	Legend

In TBasePageItemsProducer

WebPageItems

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBasePageItemsProducer properties

TBasePageItemsProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext

WebPageItems


TBasePageItemsProducer.WebPageItems
 VCL Reference

TBasePageItemsProducer.WebPageItems

TBasePageItemsProducer	See also

Maintains a list of components that generate HTML content for the producer.

property WebPageItems: TWebComponentList;

Description

WebPageItems lists the components that generate content for the page items producer. Each of these components supports the IWebContent interface, and can contain its own list of Web items that help it generate its content.

The type of items that can be added to the WebPageItems list are restricted by a protected method that is abstract in TBasePageItemsProducer. Descendant classes implement this protected method to indicate what types of items can be added to the list. For example, TInetXPageProducer limits the list to components that generate HTML forms (TWebForm descendants such as TQueryForm and TDataForm).

At design time, use the Web page editor to add components to the WebPageItems property.

Note:	Typically, WebPageItems lists all the components that generate content for the page items producer, in the order that the generated content appears in the final HTML document. However, the page items producer can transform COMPONENT tags in its template using components that are not in this list, as long as they have the same owner as the page items producer..


 VCL Reference

TBasePageItemsProducer events

TBasePageItemsProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TBasePageItemsProducer events

TBasePageItemsProducer	By object	Legend

OnHTMLTag


 VCL Reference

TBasePageItemsProducer methods

TBasePageItemsProducer	Alphabetically	Legend

In TBasePageItemsProducer

Create

Destroy

Derived from TBasePageProducer

Content

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBasePageItemsProducer methods

TBasePageItemsProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TBasePageItemsProducer.Create
 VCL Reference

TBasePageItemsProducer.Create

TBasePageItemsProducer	See also

Creates an instance of a TBasePageItemsProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TBasePageItemsProducer component at runtime if it was not created at design time.

AOwner is the component, typically the Web module, that becomes the value of this page producer’s Owner property. The Owner is responsible for freeing the TBasePageItemsProducer instance.


TBasePageItemsProducer.Destroy
 VCL Reference

TBasePageItemsProducer.Destroy

TBasePageItemsProducer	See also

Destroys the instance of the TBasePageItemsProducer.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead call Free, which checks that the TBasePageItemsProducer reference is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer


ECacheError
 VCL Reference

ECacheError

Hierarchy	Properties	Methods	See also

ECacheError is the exception class for failures that occur when building the cache of a decision cube.

Unit

mxstore

Description

ECacheError is raised when

•	The dataset for a decision cube includes too many fields.

•	The dataset for a decision cube does not include the necessary summaries for computing a derived value such as an average.

•	A dimension item in the dimension map specifies a date range for dimension that does not represent a date or date-time field.


 VCL Reference

ECacheError properties

ECacheError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ECacheError properties

ECacheError	By object	Legend

HelpContext

Message


 VCL Reference

ECacheError methods

ECacheError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ECacheError methods

ECacheError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception


 VCL Reference


TCaptionAttributes
 VCL Reference

TCaptionAttributes

Hierarchy	Properties	Methods	See also

TCaptionAttributes customizes the appearance of the label that identifies a display control in an InternetExpress application.

Unit

MidItems

Description

TCaptionAttributes is the type of the CaptionAttributes property of Web items that generate display controls. It defines several properties that customize the appearance of the label generated by the Web item.


 VCL Reference

TCaptionAttributes properties

TCaptionAttributes	Alphabetically	Legend

In TCaptionAttributes

Align

Custom

Parent

Style

StyleRule

VAlign


 VCL Reference

TCaptionAttributes properties

TCaptionAttributes	By object	Legend

Align

Custom

Parent

Style

StyleRule

VAlign


TCaptionAttributes.Align
 VCL Reference

TCaptionAttributes.Align

TCaptionAttributes	See also

Represents the Align option of an HTML tag.

property Align: THTMLAlign;

Description

Use Align to add an Align option to the tag that surrounds the caption. When used by TWebDataInput, this is a SPAN tag. The Align option influences the horizontal alignment of the caption text.

The Web item that generates the caption inserts the specified Align option into the HTML tag when it generates its content.


TCaptionAttributes.Custom
 VCL Reference

TCaptionAttributes.Custom

TCaptionAttributes	See also

Represents a tag option and its value.

property Custom: string;

Description

Use Custom to add one or more options to the tag that surrounds the caption. When used by TWebDataInput, this is a SPAN tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces.

The Web item that generates the caption inserts the Custom string into the HTML tag when it generates its content.


TCaptionAttributes.Parent
 VCL Reference

TCaptionAttributes.Parent

TCaptionAttributes	See also

Indicates the Web item that uses TCaptionAttributes to customize the appearance of its generated caption.

property Parent: TComponent;

Description

Use Parent to access the Web item that uses the TCaptionAttributes object.


TCaptionAttributes.Style
 VCL Reference

TCaptionAttributes.Style

TCaptionAttributes	See also

Adds style attributes to the generated caption.

property Style: string;

Description

Use Style to specify display characteristics that affect the generated caption. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the HTML tag that generates the caption as the value of a STYLE option.


TCaptionAttributes.StyleRule
 VCL Reference

TCaptionAttributes.StyleRule

TCaptionAttributes	See also

Applies a style in the page producer’s style sheet to the generated caption.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated caption. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

To apply a style definition that is not included in the style sheet, use the Style property instead.


TCaptionAttributes.VAlign
 VCL Reference

TCaptionAttributes.VAlign

TCaptionAttributes	See also

Represents the VAlign option of an HTML tag.

property VAlign: THTMLVAlign;

Description

Use VAlign to add an VAlign option to the tag that surrounds the caption. When used by TWebDataInput, this is a SPAN tag. The VAlign option influences the vertical alignment of the caption text.

The Web item that generates the caption inserts the specified VAlign option into the HTML tag when it generates its content.


 VCL Reference

TCaptionAttributes methods

TCaptionAttributes	Alphabetically	Legend

In TCaptionAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCaptionAttributes methods

TCaptionAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCaptionAttributes.Create
 VCL Reference

TCaptionAttributes.Create

TCaptionAttributes	See also

Creates an instance of TCaptionAttributes.

constructor Create(AParent: TComponent);

Description

Do not create instances of TCaptionAttributes. This object is instantiated by the Web item that uses it to implement its CaptionAttributes property.

The AParent parameter specifies the Web item that creates a TCaptionAttributes instance for its CaptionAttributes property. This becomes the value of the Parent property.


Hierarchy

TObject

TPersistent

TCaptionAttributes


TCustomDecisionGraph
 VCL Reference

TCustomDecisionGraph

Hierarchy	Properties	Methods	Events	See also

TCustomDecisionGraph is the base class for controls that graph crosstabulated data.

Unit

MXGRAPH

Description

Use TCustomDecisionGraph as a base class when defining objects that graph the data from a decision source. Decision graphs chart a single summary that is calculated over a number of dimensions. The dimensions appear as axes of the graph.

The field that is summarized and the fields (dimensions) over which it is summarized can be changed dynamically at runtime to view any configuration of summary and dimensions chosen from the dimension map of a decision cube. Changes to the dimensions and summary can be initiated using a TDecisionPivot object.

Do not create instances of TCustomDecisionGraph. To put a decision graph on a form, use TDecisionGraph.


 VCL Reference

TCustomDecisionGraph properties

TCustomDecisionGraph	Alphabetically	Legend

In TCustomDecisionGraph

DecisionSource

Derived from TChart

AllowPanning

AllowZoom

Foot

Gradient

LeftWall

PrintResolution

Title

Zoomed

Derived from TCustomChart

AnimatedZoom

AnimatedZoomSteps

AxisVisible

BackColor

BackImage

BackImageInside

BackImageMode

BottomAxis

BottomWall

BufferedDisplay

Canvas

Chart3DPercent

ClipPoints

Frame

LeftAxis

Legend

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Page

RightAxis

ScaleLastPage

Series

SeriesList

TopAxis

View3d

View3dWalls

Derived from TCustomPanel

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

Locked

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomDecisionGraph properties

TCustomDecisionGraph	By object	Legend

Action

Align

AlignDisabled

AllowPanning

AllowZoom

Anchors

AnimatedZoom

AnimatedZoomSteps

AxisVisible

BackColor

BackImage

BackImageInside

BackImageMode

BevelInner

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BottomAxis

BottomWall

BoundsRect

Brush

BufferedDisplay

Canvas

Chart3DPercent

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ClipPoints

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DecisionSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Foot

Frame

Gradient

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LeftAxis

LeftWall

Legend

Locked

LRDockWidth

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Name

Owner

Page

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

PrintResolution

RightAxis

ScaleLastPage

Series

SeriesList

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Title

Top

TopAxis

UndockHeight

UndockWidth

VCLComObject

View3d

View3dWalls

Visible

VisibleDockClientCount

Width

WindowProc

Zoomed


TCustomDecisionGraph.DecisionSource
 VCL Reference

 TCustomDecisionGraph.DecisionSource

TCustomDecisionGraph 	See also

Specifies the decision source object that supplies data values for the decision graph.

property DecisionSource: TDecisionSource;

Description

Set DecisionSource to link the decision graph to the crosstabulated data from a decision cube. The DecisionSource object maintains information about the current pivot state of the data. Thus, any two decision controls that share the same decision source will display the data from the decision cube using the same configuration of dimensions, including any closed dimensions or drilled down values.


 VCL Reference

TCustomDecisionGraph events

TCustomDecisionGraph	Alphabetically	Legend

Derived from TChart

OnAllowScroll

OnClickAxis

OnClickBackground

OnClickLegend

OnClickSeries

OnGetLegendPos

OnGetLegendRect

OnScroll

OnUndoZoom

OnZoom

Derived from TCustomChart

OnAfterDraw

OnGetAxisLabel

OnGetLegendText

OnGetNextAxisLabel

OnPageChange

OnResize

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TCustomDecisionGraph events

TCustomDecisionGraph	By object	Legend

OnAfterDraw

OnAllowScroll

OnCanResize

OnClick

OnClickAxis

OnClickBackground

OnClickLegend

OnClickSeries

OnConstrainedResize

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetAxisLabel

OnGetLegendPos

OnGetLegendRect

OnGetLegendText

OnGetNextAxisLabel

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPageChange

OnResize

OnScroll

OnStartDock

OnStartDrag

OnUnDock

OnUndoZoom

OnZoom


 VCL Reference

TCustomDecisionGraph methods

TCustomDecisionGraph	Alphabetically	Legend

In TCustomDecisionGraph

Create

Destroy

Updated

Derived from TChart

CalcClickedPart

ChartPrintRect

CopyToClipboardBitmap

CopyToClipboardMetafile

ExchangeSeries

GetEditorClass

IsScreenHighColor

NextPage

PreviousPage

Print

PrintLandscape

PrintOrientation

PrintPartial

PrintPartialCanvas

PrintPortrait

PrintRect

SaveToBitmapFile

SaveToMetafile

SaveToMetafileEnh

SeriesDown

SeriesUp

TeeCreateMetafile

UndoZoom

ZoomPercent

ZoomRect

Derived from TCustomChart

ActiveSeriesLegend

AddSeries

BackWallRect

CalcSize3d

CalcSize3dWalls

ChartRegionRect

ClipRectangle

Draw

FormattedLegend

FormattedValueLegend

GetASeries

GetAxisSeries

GetFreeSeriesColor

GetLabelsSeries

IsFreeSeriesColor

IsValidDataSource

MarkText

MaxMarkWidth

MaxTextWidth

MaxXValue

MaxYValue

MinXValue

MinYValue

NumPages

RemoveAllSeries

RemoveSeries

SeriesCount

SeriesTitleLegend

UnClipRectangle

XLabelText

Derived from TCustomTeePanel

CanvasChanged

FontCanvas

GetCursorPos

GetRectangle

GetWidthHeight

ReCalcWidthHeight

RotateLabel

SetBrushCanvas

SetInternalCanvas

TeeCharHeight

TeeTextHeight

TeeTextOut

TeeTextWidth

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDecisionGraph methods

TCustomDecisionGraph	By object	Legend

ActiveSeriesLegend

AddSeries

AfterConstruction

Assign

BackWallRect

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CalcClickedPart

CalcSize3d

CalcSize3dWalls

CanFocus

CanvasChanged

ChartPrintRect

ChartRegionRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ClipRectangle

ContainsControl

ControlAtPos

CopyToClipboardBitmap

CopyToClipboardMetafile

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

Draw

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExchangeSeries

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontCanvas

FormattedLegend

FormattedValueLegend

Free

FreeInstance

FreeNotification

FreeOnRelease

GetASeries

GetAxisSeries

GetControlsAlignment

GetCursorPos

GetEditorClass

GetFreeSeriesColor

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLabelsSeries

GetNamePath

GetParentComponent

GetRectangle

GetTabOrderList

GetTextBuf

GetTextLen

GetWidthHeight

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsFreeSeriesColor

IsImplementorOf

IsRightToLeft

IsScreenHighColor

IsValidDataSource

ManualDock

ManualFloat

MarkText

MaxMarkWidth

MaxTextWidth

MaxXValue

MaxYValue

MethodAddress

MethodName

MinXValue

MinYValue

MouseWheelHandler

NewInstance

NextPage

NumPages

PaintTo

ParentToClient

Perform

PreviousPage

Print

PrintLandscape

PrintOrientation

PrintPartial

PrintPartialCanvas

PrintPortrait

PrintRect

Realign

ReCalcWidthHeight

ReferenceInterface

Refresh

RemoveAllSeries

RemoveComponent

RemoveControl

RemoveSeries

RemoveFreeNotification

Repaint

ReplaceDockedControl

RotateLabel

SafeCallException

SaveToBitmapFile

SaveToMetafile

SaveToMetafileEnh

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SeriesCount

SeriesDown

SeriesTitleLegend

SeriesUp

SetBounds

SetBrushCanvas

SetFocus

SetInternalCanvas

SetSubComponent

SetTextBuf

Show

TeeCharHeight

TeeCreateMetafile

TeeTextHeight

TeeTextOut

TeeTextWidth

UnClipRectangle

UndoZoom

Update

UpdateAction

UpdateControlState

Updated

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

XLabelText

ZoomPercent

ZoomRect


TCustomDecisionGraph.Create
 VCL Reference

 TCustomDecisionGraph.Create

TCustomDecisionGraph	See also

Creates and initializes an instance of TCustomDecisionGraph.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a decision graph at runtime. Do not create instances of TCustomDecisionGraph. Instead, create a descendant of TCustomDecisionGraph such as TDecisionGraph. Decision graphs placed in forms at design time are created automatically.

Pass a single Component as a parameter to provide the decision graph with an Owner that is responsible for freeing it.


TCustomDecisionGraph.Destroy
 VCL Reference

 TCustomDecisionGraph.Destroy

TCustomDecisionGraph	See also

Destroys an instance of TCustomDecisionGraph.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the decision grid is not nil and only then calls Destroy.


TCustomDecisionGraph.Updated
 VCL Reference

 TCustomDecisionGraph.Updated

TCustomDecisionGraph 	See also

Responds when the properties of the decision graph change.

procedure Updated; override;

Description

Do not call the Updated method. It is called automatically when the properties of the decision graph change. TCustomDecisionGraph uses this method to refresh the layout of the graph to reflect any changes that may have been made to the series.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel

TCustomTeePanel

TCustomChart

TChart

TCustomDecisionGraph


TComponentsPageProducer
 VCL Reference

TComponentsPageProducer

Hierarchy	Properties	Methods	Events	See also

TComponentsPageProducer produces a string of HTML commands based on an input template.

Unit

CompProd

Description

Use TComponentsPageProducer to convert an HTML template that includes content generated by other components into a string of HTML commands that can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the components page producer in an OnHTMLTag event handler.

Components page producers differ from other page producer components in that they replace special HTML-transparent tags of the format

<#COMPONENT Name=WebContentComponent>

with the HTML produced by the component named WebContentComponent. WebContentComponent must have the same Owner as the components page producer and support the IWebContent interface, which the components page producer uses to obtain the replacement HTML for the COMPONENT tag.


 VCL Reference

TComponentsPageProducer properties

TComponentsPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

StripParamQuotes

ScriptEngine

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TComponentsPageProducer properties

TComponentsPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext


 VCL Reference

TComponentsPageProducer events

TComponentsPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TComponentsPageProducer events

TComponentsPageProducer	By object	Legend

OnHTMLTag


 VCL Reference

TComponentsPageProducer methods

TComponentsPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

Content

ContentFromStream

ContentFromString

Create

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TComponentsPageProducer methods

TComponentsPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer


TCorbaConnection
 VCL Reference

 TCorbaConnection

Hierarchy	Properties	Methods	Events	Using TCorbaConnection	See also

TCorbaConnection connects CORBA client applications to an application server.

Unit

CorbaCon

Description

TCorbaConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server. The CORBA connection component can

Establish an initial connection to a remote application server.

Obtain an IAppServer for the application server.

Obtain a list of providers on the application server.

Drop the connection to the remote application server.

TCorbaConnection establishes the initial connection between the client application and a remote application server using CORBA. Once the connection is established, client datasets on the client application use the IAppServer interface from the CORBA connection component to communicate with providers on the application server, or to otherwise call the application server’s CORBA data module interface.

To connect client applications to remote application servers using DCOM, use TDCOMConnection instead. To connect using TCP/IP sockets, use TSocketConnection. To use SOAP, use TSoapConnection.


 VCL Reference

TCorbaConnection properties

TCorbaConnection	Alphabetically	Legend

In TCorbaConnection

Cancelable

Connected

HostName

ObjectName

RepositoryId

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCorbaConnection properties

TCorbaConnection	By object	Legend

AppServer

Cancelable

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

HostName

LoginPrompt

Name

ObjectName

Owner

RepositoryId

Tag

VCLComObject


TCorbaConnection.Cancelable
 VCL Reference

TCorbaConnection.Cancelable

TCorbaConnection	See also

Allows connections that are not established quickly to be canceled.

property Cancelable: Boolean;

Description

Set Cancelable to True to prevent the CORBA connection component from blocking the application during lengthy connection attempts.

When Cancelable is True, the CORBA connection component generates a separate thread when trying to establish a connection. If the connection takes more than one second to establish, the CORBA connection component generates an OnCancel event, which allows the application to determine whether the continue waiting for the connection or to abort the attempt and retry after making changes (such as fixing a mistyped repository ID). If there is no OnCancel event handler, the CORBA connection component displays a modal connecting dialog that allows the user to cancel the connection attempt.

When Cancelable is False, the CORBA connection component attempts to connect to the server using the thread that contains it. This blocks that thread until a connection is established. If the server specified by the CORBA connection component is unavailable (either because it is down or because of an error such as a mistyped repository ID), this can take a long time because the CORBA smart agent must search the entire network for an available server.

Note:	The time for establishing a connection can be shortened by changing the port number that the smart agent uses.


TCorbaConnection.Connected
 VCL Reference

TCorbaConnection.Connected

TCorbaConnection	See also

Indicates whether the TCorbaConnection object is connected to an application server.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to the application server. Set Connected to False to terminate the connection.

When changing the value of Connected, TCorbaConnection generates a BeforeConnect and an AfterConnect event, or a BeforeDisconnect and an AfterDisconnect event.


TCorbaConnection.HostName
 VCL Reference

TCorbaConnection.HostName

TCorbaConnection	See also

Specifies the host name or IP address of the desired application server.

property HostName: string;

Description

Use HostName to optionally specify the machine on which the application server is running. If HostName is an empty string, the CORBA connection component will open a connection to the first server located that supports the interface specified by the RepositoryID property.


TCorbaConnection.ObjectName
 VCL Reference

TCorbaConnection.ObjectName

TCorbaConnection	See also

Specifies the instance name of an object instance on the CORBA server.

property ObjectName: string;

Description

Use ObjectName to specify that the interface indicated by RepositoryID must be implemented by an object with an instance name of ObjectName. The object instance on the server is given an instance name when it is created. This instance name can come from the client on whose behalf the instance is created.

If there is only one object that implements the desired interface, ObjectName may be left as an empty string.


TCorbaConnection.RepositoryId
 VCL Reference

TCorbaConnection.RepositoryId

TCorbaConnection	See also

Specifies the Repository ID of the CORBA data module’s interface.

type TRepositoryId = type string;

property RepositoryId: TRepositoryId;

Description

Use RepositoryId to identify the CORBA data module type to which a connection should be formed. RepositoryID can be specified in one of two ways:

The Repository ID of the data module’s interface (an IAppServer descendant). This is a string of the form ‘IDL:MyProject/MyCorbaDataModule:1.0’;

The base name of the CORBA data module. The base name that corresponds to the previous Repository ID is ‘MyProject/MyCorbaDataModule’.

RepositoryId must have a value before the CORBA data module can connect to a server. The server can be further identified (optionally) by using the HostName and ObjectName properties.


 VCL Reference

TCorbaConnection events

TCorbaConnection	Alphabetically	Legend

In TCorbaConnection

OnCancel

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TCorbaConnection events

TCorbaConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnCancel

OnLogin


TCorbaConnection.OnCancel
 VCL Reference

TCorbaConnection.OnCancel

TCorbaConnection	See also

Occurs when a cancelable connection has not been established within one second.

type TCancelEvent = procedure(Sender: TObject; var Cancel: Boolean; var DialogMessage: string) ofobject;

property OnCancel: TCancelEvent;

Description

OnCancel occurs if the Cancelable property is True and a connection has not been established with the server within one second. The default value of DialogMessage is “Connecting to a CORBA server...” and the default value of Cancel is False.

If Cancel is False and DialogMessage is a nonempty string, the string is displayed in a modal dialog box along with a Cancel button. The user can abort the operation (raising an EAbort exception) by pressing the button.

If Cancel is False and DialogMessage is an empty string, the dialog is not displayed and OnCancel occurs again after another second has elapsed.

If Cancel is True, the operation is canceled immediately (raising an EAbort exception). You can also cancel by raising any exception.


 VCL Reference

TCorbaConnection methods

TCorbaConnection	Alphabetically	Legend

In TCorbaConnection

Create

GetServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCorbaConnection methods

TCorbaConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCorbaConnection.Create
 VCL Reference

TCorbaConnection.Create

TCorbaConnection	See also

Creates an instance of a CORBA connection component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a CORBA connection component at runtime. Connection components placed in forms or data modules at design time are created automatically.


TCorbaConnection.GetServer
 VCL Reference

TCorbaConnection.GetServer

TCorbaConnection	See also

Returns the IAppServer interface of the application server.

function GetServer: IAppServer; override;

Description

GetServer returns the interface of the application server after establishing a connection.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TCorbaConnection


TCustomQueryForm
 VCL Reference

TCustomQueryForm

Hierarchy	Properties	Methods	See also

TCustomQueryForm is the base class for Web items that generate HTML forms for letting users enter application-defined values.

Unit

MidItems

Description

Use TCustomQueryForm as a base class for components that generate an HTML form that displays application-defined values and submits them to an InternetExpress application. TCustomQueryForm introduces properties for specifying the method and target URL of messages submitted by the form.

When building an HTML form, TCustomQueryForm makes use of content generated by the components listed in its WebComponents property. These components can include Web items that display application-defined values (TQueryFieldGroup) or that generate buttons to operate on those values (TQueryButtons). They can also include components that manage the layout of other HTML controls (TLayoutGroup).

In order to let an InternetExpress page producer use the generated HTML query form, TCustomQueryForm inherits support for the IWebContent interface from TWebForm.

Do not create instances of TCustomQueryForm. Instead, create descendants of TCustomQueryForm, such as TQueryForm.


 VCL Reference

TCustomQueryForm properties

TCustomQueryForm	Alphabetically	Legend

In TCustomQueryForm

Action

Method

Derived from TWebForm

Custom

Style

StyleRule

WebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomQueryForm properties

TCustomQueryForm	By object	Legend

Action

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Method

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebComponents


TCustomQueryForm.Action
 VCL Reference

TCustomQueryForm.Action

TCustomQueryForm	See also

Specifies the path info portion of the URL to which the query submits request messages.

property Action: string;

Description

Use Action to specify the target URL for messages that the query form submits. Action supplies the PathInfo property of Web request messages from the query form. This value is matched to the PathInfo property of a Web action item when determining what object responds to those messages.


TCustomQueryForm.Method
 VCL Reference

TCustomQueryForm.Method

TCustomQueryForm	See also

Specifies the METHOD header of messages that the query form submits.

type TFormMethod = (fmPost, fmGet);

property Method: TFormMethod;

Description

Set Method to specify the METHOD header for messages that the query form submits. This value gives rise to the MethodType property of the HTTP request message. By matching this to the MethodType property of Web action items, a Web dispatcher determines what objects handle these messages.

The following table describes the possible values:

Value	Corresponding MethodType	Meaning

fmPost	mtPost	The query submits messages that post displayed values to the Web application. Named value pairs are passed as content fields of the HTTP message. (See ContentFields)
The Web application determines the meaning and use of these values. A typical use is supplying parameter values that the Web application passes on to an application server.

fmGet	mtGet	The query submits messages that request values it can display. Named value pairs are supplied as query fields in the URL. (See QueryFields)
This method has the advantage of providing a URL that can be bookmarked.


 VCL Reference

TCustomQueryForm methods

TCustomQueryForm	Alphabetically	Legend

In TCustomQueryForm

AssignStrings

Create

Derived from TWebForm

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomQueryForm methods

TCustomQueryForm	By object	Legend

AfterConstruction

Assign

AssignStrings

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomQueryForm.AssignStrings
 VCL Reference

TCustomQueryForm.AssignStrings

TCustomQueryForm	See also

Assigns values to display controls from a list of name/value pairs.

procedure AssignStrings(Value: TStrings);

Description

Use AssignStrings to initialize the values displayed by the controls in the query form. For each display control named in the specified list of strings, AssignStrings initializes its Text property with the associated value.

Value is a list of strings with the form Name=Value. The Name portion identifies the Web item for a display control that is listed in the WebComponents property list or is a child of one of those Web items. Name must match the string returned by the component’s GetHTMLControlName method. The Value portion of the string specifies the value that is assigned to the Web item’s Text property.

Note:	AssignStrings is a convenient way to initialize the values in a query form before the HTML document is sent to a Web browser. When the browser returns values that are entered by the end user, the Web server application must extract them from the request message’s ContentFields property.


TCustomQueryForm.Create
 VCL Reference

TCustomQueryForm.Create

TCustomQueryForm	See also

Creates and initializes an instance of TCustomQueryForm.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a query form at runtime. Query forms added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebForm

TCustomQueryForm


TDataForm
 VCL Reference

TDataForm

Hierarchy	Properties	Methods	See also

TDataForm generates an HTML form that displays database information and lets users apply updates.

Unit

MidItems

Description

Add TDataForm to the Web items of an Internet Express page producer (TInetXPageProducer) to add an HTML form that displays database information that users can view and edit.

Data forms generate an HTML form that contains controls which display information from an XML data packet. Buttons on the form manipulate that data, and submit updates back to the XML broker that supplies the XML data packet.

TDataForm generates the HTML FORM tag and assembles the HTML generated by its Web items. It restricts the Web items that generate the contents of the form to components that generate data displays (TDataGrid or TFieldGroup), components that contain buttons which operate on those displays (TDataNavigator), and components that manage the layout of HTML controls (TLayoutGroup). At design time, you can add these Web items to the form using the Web page editor.


 VCL Reference

TDataForm properties

TDataForm	Alphabetically	Legend

Derived from TWebForm

Custom

Style

StyleRule

WebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataForm properties

TDataForm	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebComponents


 VCL Reference

TDataForm methods

TDataForm	Alphabetically	Legend

Derived from TWebForm

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataForm methods

TDataForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebForm

TCustomDataForm

TDataForm


TDataGrid
 VCL Reference

TDataGrid

Hierarchy	Properties	Methods	See also

TDataGrid generates an HTML table to display a dataset in an XML data packet.

Unit

MidItems

Description

Add TDataGrid to the Web items of a TDataForm component (or a layout group that is a child of a TDataForm component.) TDataGrid generates an HTML table that displays multiple records from a dataset as a set of rows and columns.

Each TDataGrid object maintains a list of Web items that generate the individual fields (columns) of the table. These Web items can be from the following classes: TTextColumn, TSelectOptionColumn, TTextAreaColumn, and TStatusColumn. You can bind the data grid to an XML data packet or dataset field within an XML data packet. The column Web items can then use that binding to determine the source of the data they display.

You can also use the properties of TDataGrid to affect the appearance of the generated table.


 VCL Reference

TDataGrid properties

TDataGrid	Alphabetically	Legend

Derived from TCustomDataGrid

DisplayRows

HeadingAttributes

RowAttributes

TableAttributes

Derived from TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataGrid properties

TDataGrid	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisplayRows

HeadingAttributes

Name

Owner

RowAttributes

TableAttributes

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


 VCL Reference

TDataGrid methods

TDataGrid	Alphabetically	Legend

Derived from TCustomDataGrid

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataGrid methods

TDataGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup

TCustomDataGrid

TDataGrid


TDimensionItem
 VCL Reference

TDimensionItem

Hierarchy	Properties	Methods	See also

TDimensionItem is the base class for objects that represent dimensions and summaries in a crosstabulated data store.

Unit

mxcommon

Description

Use TDimensionItem as a base class when defining classes that represent the fields used by a crosstabulated data store. TDimensionItem describes a field from the data set used by a crosstabulated data store and the role that field plays in the data store. Crosstabulated data stores automatically create dimension items to represent the fields that make up their multidimensional arrays of summary values.

TDimensionItem has a single descendant, TCubeDim, that enhances the dimension item with the ability to represent date ranges.


 VCL Reference

TDimensionItem properties

TDimensionItem	Alphabetically	Legend

In TDimensionItem

ActiveFlag

BaseName

DerivedFrom

DimensionType

FieldName

FieldType

Format

Name

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TDimensionItem properties

TDimensionItem	By object	Legend

ActiveFlag

BaseName

Collection

DerivedFrom

DimensionType

DisplayName

FieldName

FieldType

Format

ID

Index

Name


TDimensionItem.ActiveFlag
 VCL Reference

TDimensionItem.ActiveFlag

TDimensionItem	See also

Indicates whether the dimension item is stored in the cache of a crosstabulated data store.

type TActiveFlags = (diActive, diAsNeeded, diInactive);

property ActiveFlag: TActiveFlags;

Description

Set ActiveFlag to diActive when it is critical that the dimension item is available at all times. Set ActiveFlag to diAsNeeded instead if the dimension item is used less frequently. The decision cube swaps dimension items with Active set to diAsNeeded in and out of the cache depending on when they are actually used, in order to conserve memory. Set ActiveFlag to diInactive to collapse the multidimensional array maintained by the data store so that it does not include the dimension item. When ActiveFlag is diInactive, the data store can not provide information about the dimension item to a decision source object.

The memory needs of a crosstabulated data store increase geometrically with each active dimension that is included. Memory needs increase linearly with each active summary that is included. Applications must find the best balance between the performance benefit of caching many dimensions and summaries so that they are immediately available to decision controls, and the need to keep the size of the cached multidimensional data array small enough so that it does not consume inordinate amounts of memory.


TDimensionItem.BaseName
 VCL Reference

TDimensionItem.BaseName

TDimensionItem	See also

Specifies the field name of the database field that is represented by or summarized in the dimension item.

property BaseName: String;

Description

Use BaseName to identify the field whose values underlie the dimension item. If the dimension item represents a dimension then BaseName is the name of the field that corresponds to the dimension. Otherwise, BaseName is the field name of the field whose values are summarized by the dimension item.

Note:	Basename is a fully qualified SQL selector. Table and field names must be correctly punctuated, including quotations.


TDimensionItem.DerivedFrom
 VCL Reference

TDimensionItem.DerivedFrom

TDimensionItem	See also

Specifies the index of a dimension item from which a derived value is calculated.

property DerivedFrom: Integer;

Description

Read DerivedFrom to determine whether the dimension item represents a field from the dataset of its decision cube. Dimension items that represent averages do not come directly from the dataset, but are derived from count and summary fields that appear in the dataset. When a derived average dimension item is created, DerivedFrom is set to the index of the count or summary dimension item. The corresponding summary or count dimension item is located by matching the BaseName property when the derived values are calculated.


TDimensionItem.DimensionType
 VCL Reference

TDimensionItem.DimensionType

TDimensionItem	See also

Indicates the use of the dimension item.

type TDimFlags = (dimDimension, dimSum, dimCount, dimAverage, dimMin, dimMax, dimGenericAgg, dimUnknown);

property DimensionType: TDimFlags;

Description

Read DimensionType to determine whether the dimension item represents a dimension of the multidimensional array maintained by the crosstabulated data store or whether the dimension item represents a summary field that supplies the values to the cells of the multidimensional array. If the dimension item represents a summary, DimensionType also indicates the type of summary.

Do not set DimensionType if the dimension item represents a field from a query. The value of DimensionType is set automatically to reflect the semantics of the query if the crosstabulated data store that uses the dimension item is bound to a query. If the data store is bound to another type of data set, set DimensionType to a value that indicates the use of the dimension item in the multidimensional array.

DimensionType can have any of the following values:

Value	Meaning

dimDimension	The dimension item represents a dimension of the multidimensional array.

dimSum	The dimension item is a summary that represents the sum of a field value.

dimCount	The dimension item is a summary that represents the count of nonblank field values.

dimAverage	The dimension item is a summary that represents the average field value.

dimMin	The dimension item is a summary that represents the minimum field value. (not currently implemented)

dimMax	The dimension item is a summary that represents the maximum field value. (not currently implemented)

dimGenericAgg	The dimension item is some other type of summary.

dimUnknown	The use of the dimension item is not known. This occurs when the DataSet property of the data store is not based on a query. The value must be changed before the dimension item can be used.


TDimensionItem.FieldName
 VCL Reference

TDimensionItem.FieldName

TDimensionItem	See also

Specifies the name of the field that the dimension item represents.

property FieldName: String;

Description

Read FieldName to determine the name of the field on which the dimension item is based. FieldName is the same as the FieldName property of the TField object the dimension represents.

Do not set the FieldName property. Its value is set automatically to indicate the field from the dataset that supplies the values for the dimension item. To change the name used by decision controls that display the dimension, use the Name property instead.


TDimensionItem.FieldType
 VCL Reference

TDimensionItem.FieldType

TDimensionItem	See also

Indicates the data type of the field that the dimension item represents.

property FieldType: TFieldType;

Description

Read FieldType to determine the type of data that makes up the values of the dimension item. FieldType is the same as the DataType property of the corresponding TField object from the dataset of the crosstabulated data store.

Do not set the FieldType property. The value of FieldType is set automatically to reflect the type of data provided by the dimension item.


TDimensionItem.Format
 VCL Reference

TDimensionItem.Format

TDimensionItem	See also

Indicates how field values are formatted on dimensions that represent numeric or temporal data.

property Format: String;

Description

Set Format on dimension items that represent numeric or temporal fields. The format specifiers that make up the Format string depend on the field type.

See the FormatFloat runtime library function for a description of the format specifiers for a numeric field. See the FormatDateTime runtime library function for a description of the format specifiers for a temporal field.

Decision controls that display value names read the value of Format, but can override it when formatting field values.


TDimensionItem.Name
 VCL Reference

TDimensionItem.Name

TDimensionItem	See also

Denotes the name of a dimension or summary.

property Name: String;

Description

Set Name to change the name provided by the GetDimensionName or GetSummaryName method of the crosstabulated data store. Decision controls that display dimension names read the value of Name, but can override it.


 VCL Reference

TDimensionItem methods

TDimensionItem	Alphabetically	Legend

In TDimensionItem

IsDimension

IsSummary

Derived from TCollectionItem

Create

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDimensionItem methods

TDimensionItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

IsDimension

IsSummary

MethodAddress

MethodName

NewInstance

SafeCallException


TDimensionItem.IsDimension
 VCL Reference

TDimensionItem.IsDimension

TDimensionItem	See also

Indicates whether the dimension item represents a dimension.

function IsDimension: Boolean;

Description

Call IsDimension to determine the use of the dimension item. IsDimension returns True if the dimension item represents one of the dimensions of the multidimensional array maintained by a crosstabulated data store. IsDimension returns False if the dimension item represents a field that provides the summary values that fill the cells of the multidimensional array.


TDimensionItem.IsSummary
 VCL Reference

TDimensionItem.IsSummary

TDimensionItem	See also

Indicates whether the dimension item represents a summary.

function IsSummary: Boolean;

Description

Call IsSummary to determine the use of the dimension item. IsSummary returns True if the dimension item represents a field that provides the summary values that fill the cells of the multidimensional array maintained by a crosstabulated data store. IsSummary returns False if the dimension item represents a one of the dimensions of the multidimensional array.


Hierarchy

TObject

TPersistent

TCollectionItem

TDimensionItem


TDimensionItems
 VCL Reference

TDimensionItems

Hierarchy	Properties	Methods	See also

TDimensionItems is the base class for objects that represent dimension maps.

Unit

mxcommon

Description

Use TDimensionItems as a base class when defining classes that represent the dimension map of a crosstabulated data store. TDimensionItems represents a collection of TDimensionItem objects, where each TDimensionItem corresponds to a field from the data set of the crosstabulated data store.

TDimensionItems has a single descendant, TCubeDims, that adds additional functionality to handle dimension maps that include date ranges.


 VCL Reference

TDimensionItems properties

TDimensionItems	Alphabetically	Legend

In TDimensionItems

ActiveDimensionCount

ActiveSummaryCount

DimensionCount

Items

SummaryCount

Derived from TCollection

Count

ItemClass


 VCL Reference

TDimensionItems properties

TDimensionItems	By object	Legend

ActiveDimensionCount

ActiveSummaryCount

Count

DimensionCount

ItemClass

Items

SummaryCount


TDimensionItems.ActiveDimensionCount
 VCL Reference

TDimensionItems.ActiveDimensionCount

TDimensionItems	See also

Indicates the number of dimension items that represent active dimensions in the crosstabulated data store.

property ActiveDimensionCount: Integer;

Description

Read ActiveDimensionCount to determine the number of dimensions in the multidimensional data array cached by the data store. The memory requirements of the cached array go up exponentially with each active dimension, so ActiveDimensionCount provides a rough sense of the size of the cached array.

ActiveDimensionCount is the number of dimension items in the Items array that have their DimensionType property set to dimDimension and their Active property set to True. Change ActiveDimensionCount indirectly by changing the Active property on dimension items with DimensionType values of dimDimension.

The DimensionCount property indicates the total number of dimension items with DimensionType set to dimDimension. It provides an upper limit to the ActiveDimensionCount property.


TDimensionItems.ActiveSummaryCount
 VCL Reference

TDimensionItems.ActiveSummaryCount

TDimensionItems	See also

Indicates the number of dimension items that represent active summaries in the crosstabulated data store.

property ActiveSummaryCount: Integer;

Description

Read ActiveSummaryCount to determine the number of summaries in the cells of the multidimensional data array cached by the data store. The memory requirements of the cached array go up linearly with each active summary. ActiveSummaryCount is the number of different summaries that can be made available to decision controls.

ActiveSummaryCount is the number of dimension items in the Items array that don’t have their DimensionType property set to dimDimension and do have their Active property set to True. Change ActiveSummaryCount indirectly by changing the Active property on dimension items with DimensionType values other than dimDimension.

The SummaryCount property indicates the total number of dimension items that do not have DimensionType set to dimDimension. It provides an upper limit to the ActiveSummaryCount property.


TDimensionItems.DimensionCount
 VCL Reference

TDimensionItems.DimensionCount

TDimensionItems	See also

Indicates the number of dimension items in the Items array with DimensionType set to dimDimension.

property DimensionCount: Integer;

Description

Read DimensionCount to determine the number of potential dimensions for the multidimensional data array cached by the data store. DimensionCount reflects the number of unsummarized fields in the data set of the crosstabulated data store. While the data store can make any of these dimensions available, usually only a subset are active at any time, in order to limit memory consumption. The ActiveDimensionCount property gives the number of dimensions that are currently active.


TDimensionItems.Items
 VCL Reference

TDimensionItems.Items

TDimensionItems	See also

Lists all dimension items maintained by the TDimensionItems object.

property Items[Index: Integer]:TDimensionItem; default;

Description

Use Items to access individual dimension items maintained by the TDimensionItems object. The first dimension item has an Index of 0, the second dimension item has an Index of 1, and so on.

Each dimension item in the Items array represents a field from the data set of a crosstabulated data store. Each dimension item represents either a dimension (a field over which data is summarized), or a summary (a value summarized over the dimensions).

Items is the default property of TDimensionItems. This means that the name of the Items property can be eliminated from code that uses the Items property. Thus, the line

DecisionCube1.DimensionMap.Items[0].ActiveFlag := diAsNeeded;

could be written

DecisionCube1.DimensionMap[0].ActiveFlag := diAsNeeded;

Note:	Do not change the Items property. The set of items in the Items array is set automatically to represent the fields from the data set. The properties of individual dimension items within the Items array may be changed to specify whether the dimension items should be cached by the data store, to change the name used when displaying the dimension items, and so on.


TDimensionItems.SummaryCount
 VCL Reference

TDimensionItems.SummaryCount

TDimensionItems	See also

Indicates the number of dimension items in the Items array with DimensionType set to a value other than dimDimension.

property SummaryCount: Integer;

Description

Read SummaryCount to determine the number of potential summaries that could be stored in the cells of the multidimensional data array cached by the data store. SummaryCount reflects the number of summarized fields in the data set of the crosstabulated data store. If memory is a serious concern, the data store can make any of these summaries inactive. The ActiveSummaryCount property gives the number of summaries that are currently active.


 VCL Reference

TDimensionItems methods

TDimensionItems	Alphabetically	Legend

In TDimensionItems

Add

AddDerivedField

AlreadyExists

Assign

AverageFieldCheck

Create

Derived from TCollection

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDimensionItems methods

TDimensionItems	By object	Legend

Add

AddDerivedField

AfterConstruction

AlreadyExists

Assign

AverageFieldCheck

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TDimensionItems.Add
 VCL Reference

TDimensionItems.Add

TDimensionItems	See also

Adds a dimension item to the end of the Items array.

function Add: TDimensionItem; reintroduce;

Description

Do not call the Add method to add dimension items to a TDimensionItems object. The dimension items are added automatically to reflect the fields in the data set of the associated crosstabulated data store.

Add adds a new dimension item to the collection and returns the new dimension item.


TDimensionItems.AddDerivedField
 VCL Reference

TDimensionItems.AddDerivedField

TDimensionItems	See also

Adds a derived average summary to the end of the Items array.

type TDimFlags = (dimDimension, dimSum, dimCount, dimAverage, dimMin, dimMax, dimGenericAgg, dimUnknown);

function AddDerivedField(Index: Integer; DimType: TDimFlags): Boolean;

Description

Summaries that represent average values are not taken directly from the source dataset of a decision cube, but are derived from count summaries and summation summaries. AddDerivedField creates a dimension item for an average summary. The Index parameter specifies the index of an existing dimension item whose BaseName property specifies the field over which averages should be computed. AddDerivedField checks for the summary dimension items needed to derive the average. If both an average and a summation are available for the base field, AddDerivedField creates the average summary dimension item. AddDerivedField returns True if the dimension item is successfully created, False otherwise.

Note:	The DimType parameter is currently ignored. Descendants of AddDerivedField can override this method to derive other types of dimension items. In this case, DimType should specify the type of derived dimension item that should be created. When overriding AddDerivedField, call the inherited method if DimType is dimAverage.


TDimensionItems.AlreadyExists
 VCL Reference

TDimensionItems.AlreadyExists

TDimensionItems	See also

Indicates whether a dimension item with specified properties already exists in the Items property array.

type TDimFlags = ( dimDimension, dimSum, dimCount, dimAverage, dimMin, dimMax, dimGenericAgg, dimUnknown);

function AlreadyExists(BaseName: String; SType: TDimFlags): Boolean;

Description

Call AlreadyExists to determine whether there is a dimension item in the Items property array with the BaseName property equal to the BaseName parameter and the DimensionType property equal to the SType parameter.


TDimensionItems.Assign
 VCL Reference

TDimensionItems.Assign

TDimensionItems	See also

Copies the list of dimension items from another TDimensionItems object.

procedure Assign(Source: TPersistent); override;

Description

Assign calls the inherited method to copy the properties of the Source parameter. The inherited method will copy properties from any object that implements an AssignTo method that can copy to a TDimensionItems object.


TDimensionItems.AverageFieldCheck
 VCL Reference

TDimensionItems.AverageFieldCheck

TDimensionItems	See also

Determines whether the necessary summary dimension items over a base dimension exist so that a dimension item of type dimAverage can be computed.

function AverageFieldCheck(Index: Integer; var SumIndex, CountIndex: Integer): Boolean;

Description

Call AverageFieldCheck to ensure that the necessary summary dimension items exist for creating an average summary. The Index parameter specifies an existing dimension item whose BaseName property specifies the field over which the average should be computed. The SumIndex and CountIndex parameters return the summation and count dimension items that can be used to compute average values.


TDimensionItems.Create
 VCL Reference

TDimensionItems.Create

TDimensionItems	See also

Creates an instance of TDimensionItems.

type TDimensionItemClass = class ofTDimensionItem;

constructor Create(Owner: TPersistent; ItemClass: TDimensionItemClass);

Description

Applications should not need to call the constructor of TDimensionItems. TCustomDataStore objects create TDimensionItems objects to implement their DimensionMap property.


Hierarchy

TObject

TPersistent

TCollection

TDimensionItems


ERemotableException
 VCL Reference

ERemotableException

Hierarchy	Properties	Methods	Using ERemotableException	See also

ERemotableException is the base class for exceptions that can be communicated from a Web Service application to a client application.

Unit

InvokeRegistry

Description

Create an ERemotableException descendant for problems encountered when executing the methods of an invokable interface in a Web Service application. When a Web Service application raises a descendant of ERemotableException in the course of executing a request from a client application, it creates a fault packet to describe the exception to client applications. This fault packet contains the value of the Message property, plus the values of any published properties on the ERemotableException descendant. Note that these properties must be remotable types: that is, the value must be a scalar type, or it must be a registered descendant of TRemotable.

Before the properties of an ERemotableException descendant can be transmitted in a fault packet, it must be registered with the remotable type registry (RemTypeRegistry). Call the RegisterXSClass method of the remotable type registry, on both the client and the server application, to enable your exception class to be transmitted.


 VCL Reference

ERemotableException properties

ERemotableException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ERemotableException properties

ERemotableException	By object	Legend

HelpContext

Message


 VCL Reference

ERemotableException methods

ERemotableException	Alphabetically	Legend

In ERemotableException

CreateRem

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ERemotableException methods

ERemotableException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRem

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


ERemotableException.CreateRem
 VCL Reference

ERemotableException.CreateRem

ERemotableException	See also

Creates and initializes an instance of ERemotableException.

constructor CreateRem; virtual;

Description

CreateRem generates an ERemotableException object. This constructor is used by the remotable type registry (RemTypeRegistry) when it needs to generate an instance of an ERemotableException descendant.


Hierarchy

TObject

Exception

ERemotableException


TFieldGroup
 VCL Reference

TFieldGroup

Hierarchy	Properties	Methods	See also

TFieldGroup arranges database information on an HTML form as a set of labeled fields.

Unit

MidItems

Description

Add TFieldGroup to a data form component (TDataForm) or a layout group (TLayoutGroup) that is a child for a data form. TFieldGroup generates the HTML to display information from an XML data packet in labeled fields.

TFieldGroup maintains a list of Web items that generate the individual display fields. These Web items are restricted to the following classes: TFieldText, TFieldTextArea, TFieldSelectOptions, TFieldRadioGroup, and TFieldStatus. You can bind the field group to an XML data packet or dataset field within an XML data packet. The Web items can then use that binding to determine the source of the data they display.

You can also use the properties of TFieldGroup to affect the overall appearance of the set of fields.


 VCL Reference

TFieldGroup properties

TFieldGroup	Alphabetically	Legend

Derived from TCustomFieldGroup

Custom

Style

StyleRule

Derived from TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldGroup properties

TFieldGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


 VCL Reference

TFieldGroup methods

TFieldGroup	Alphabetically	Legend

Derived from TCustomFieldGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldGroup methods

TFieldGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup

TCustomFieldGroup

TFieldGroup


THTTPSoapDispatchNode
 VCL Reference

THTTPSoapDispatchNode

Hierarchy	Properties	Methods	Using THTTPSoapDispatchNode	See also

THTTPSoapDispatchNode forwards SOAP messages to an invoker for interpretation.

Unit

SoapHTTPDisp

Description

Use THTTPSoapDispatchNode as a base class for objects that use an invoker component to interpret and execute SOAP message calls. THTTPSoapDispatchNode maintains a reference to the interface of a component that can interpret and execute SOAP method calls. These calls are requests to execute a method on an invokable interface that is registered in the application. You can register an invokable interface by calling the RegisterInterface method of the TInvokableClassRegistry object that the global InvRegistry function returns.


 VCL Reference

THTTPSoapDispatchNode properties

THTTPSoapDispatchNode	Alphabetically	Legend

In THTTPSoapDispatchNode

Dispatcher

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPSoapDispatchNode properties

THTTPSoapDispatchNode	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

Name

Owner

Tag

VCLComObject


THTTPSoapDispatchNode.Dispatcher
 VCL Reference

THTTPSoapDispatchNode.Dispatcher

THTTPSoapDispatchNode	See also

Specifies the interface of the component that interprets SOAP messages.

property Dispatcher: IHTTPSoapDispatch;

Description

Set Dispatcher to the interface of a component that interprets SOAP messages and passes them on to the target invokable interface. Dispatcher is the interface of an invoker component, such as THTTPSoapPascalInvoker. Invoker components interpret incoming SOAP calls, identify the invokable interface to which they are directed, execute the call, and assemble a response message.


 VCL Reference

THTTPSoapDispatchNode methods

THTTPSoapDispatchNode	Alphabetically	Legend

In THTTPSoapDispatchNode

DispatchSOAP

Notification

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THTTPSoapDispatchNode methods

THTTPSoapDispatchNode	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchSOAP

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


THTTPSoapDispatchNode.DispatchSOAP
 VCL Reference

THTTPSoapDispatchNode.DispatchSOAP

THTTPSoapDispatchNode	See also

Forwards the SOAP message on to the invoker for interpretation and execution.

procedure DispatchSOAP(const Path, SoapAction: WideString; const Request: TStream; Response: TStream);

Description

DispatchSOAP calls the DispatchSOAP method of the interface specified by the Dispatcher property. The invoker that implements that interface interprets the message, executes it, and returns the results as a SOAP string.

Path is the path portion of the URL to which the incoming request message was addressed.

SoapAction is the content of the SOAP Action header of the incoming HTTP request message.

Request is a stream from which DispatchSOAP can read the content of the incoming request message. It contains the SOAP encoding of an interface call.

Response is a stream to which DispatchSOAP writes the content for the outgoing response message. DispatchSoap fills it out with the SOAP encoding of any return values.


THTTPSoapDispatchNode.Notification
 VCL Reference

THTTPSoapDispatchNode.Notification

THTTPSoapDispatchNode	See also

Responds when objects are added or removed from the Web module.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called automatically when the component specified by AComponent is about to be inserted or removed, as specified by Operation. When Operation is opRemove, Notification checks whether AComponent is the implementer of the Dispatcher property. If so, it sets Dispatcher to nil.


Hierarchy

TObject

TPersistent

TComponent

THTTPSoapDispatchNode


TInetXPageProducer
 VCL Reference

 TInetXPageProducer

Hierarchy	Properties	Methods	Events	Using TInetXPageProducer	See also

TInetXPageProducer assembles an HTML document that represents live database information from an application server.

Unit

MidProd

Description

Use TInetXPageProducer to create Web pages for an InternetExpress application. These pages display database information from an application server and include data packets encoded in XML and javascript that lets Web browsers navigate that data, post changes, and apply updates back to the application server.

The InetX page producer is assigned as the Producer property of a Web action item or called from an OnAction event handler.

The InetX page producer creates its HTML document from a template. Unlike other page producers, the InetX page producer has a default template that coordinates several top-level declarations for the HTML document with content produced by other components. The other components that generate HTML content for the InetX page producer can be added at design time using the Web Page editor.


 VCL Reference

TInetXPageProducer properties

TInetXPageProducer	Alphabetically	Legend

Derived from TCustomInetXPageProducer

HTMLDoc

HTMLFile

Derived from TBaseInetXPageProducer

EnableXMLIslands

IncludePathURL

Styles

StylesFile

Derived from TBasePageItemsProducer

WebPageItems

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TInetXPageProducer properties

TInetXPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

EnableXMLIslands

HTMLDoc

HTMLFile

IncludePathURL

Name

Owner

ScriptEngine

StripParamQuotes

Styles

StylesFile

Tag

VCLComObject

WebModuleContext

WebPageItems


 VCL Reference

TInetXPageProducer events

TInetXPageProducer	Alphabetically	Legend

Derived from TBaseInetXPageProducer

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TInetXPageProducer events

TInetXPageProducer	By object	Legend

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

OnHTMLTag


 VCL Reference

TInetXPageProducer methods

TInetXPageProducer	Alphabetically	Legend

In TCustomInetXPageProducer

Content

Create

Destroy

In TBaseInetXPageProducer

ContentFromStream

FindXMLBroker

FindXMLBrokerName

GetRequiredTags

GetXMLData

SetIncludePathURL

SetStyles

SetStylesFile

Derived from TBasePageProducer

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TInetXPageProducer methods

TInetXPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindXMLBroker

FindXMLBrokerName

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetRequiredTags

GetXMLData

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetIncludePathURL

SetStyles

SetStylesFile

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer

TBaseInetXPageProducer

TCustomInetXPageProducer

TInetXPageProducer


TInvContext
 VCL Reference

TInvContext

Hierarchy	Methods	See also

TInvContext stores information about a method call on an invokable interface.

Unit

InvokeRegistry

Description

TInvContext is a helper object created and used by TRio and TSoapPascalInvoker for generating calls to the methods on an invokable interface. It stores temporary data needed when making the method call. TInvContext introduces methods for retrieving and setting information about the method being called, including its type signature, parameter values, and so on.

Component writers implementing their own classes to implement the IOPConvert interface must translate between the information stored in a TInvContext object and their class-specific encoding of a method call.


 VCL Reference

TInvContext methods

TInvContext	Alphabetically	Legend

In TInvContext

AllocServerData

GetParamPointer

GetResultPointer

SetMethodInfo

SetParamPointer

SetResultPointer

Derived from TDataContext

AddDynArrayToClear

AddObjectToDestroy

AddStrToClear

AddVariantToClear

AllocData

Create

Destroy

GetDataPointer

RemoveObjectToDestroy

SetDataPointer

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TInvContext methods

TInvContext	By object	Legend

AddDynArrayToClear

AddObjectToDestroy

AddStrToClear

AddVariantToClear

AfterConstruction

AllocData

AllocServerData

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDataPointer

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetParamPointer

GetResultPointer

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RemoveObjectToDestroy

SafeCallException

SetDataPointer

SetMethodInfo

SetParamPointer

SetResultPointer


TInvContext.AllocServerData
 VCL Reference

TInvContext.AllocServerData

TInvContext	See also

Allocates memory for the parameters and result values of a specified method and sets up the parameter and result pointers.

procedure AllocServerData(MD: TIntfMethEntry);

Description

AllocServerData suballocates the memory that the SetMethodInfo method allocates so that it can represent the parameters and return value of a method. It looks up the types of each parameter and of the return type for the method, allocates memory for their values using the AllocData method, and stores the pointers to that memory by calling the SetParamPointer and SetResultPointer methods.

MD is a description of the method, including its type, calling convention, and parameter signature.

Note:	AllocServerData must come after a call to SetMethodInfo so that the pool of memory is available. After calling AllocServerData, an application can call GetParamPointer and GetResultPointer to obtain pointers to the memory allocated for each parameter and for the return value of the method.


TInvContext.GetParamPointer
 VCL Reference

TInvContext.GetParamPointer

TInvContext	See also

Returns a pointer to the value of a parameter on the called method.

function GetParamPointer(Param: Integer): Pointer;

Description

GetParamPointer returns a pointer to the value of a specified parameter.

Param is the index of the desired parameter, where 0 is the first parameter, 1 is the second parameter, and so on.

This value is assigned by a call to the SetParamPointer method.


TInvContext.GetResultPointer
 VCL Reference

TInvContext.GetResultPointer

TInvContext	See also

Returns a pointer to the return value of the method call.

function GetResultPointer: Pointer;

Description

GetResultPointer returns a pointer to the return value of the method call. This value is assigned by a call to the SetResultPointer method.


TInvContext.SetMethodInfo
 VCL Reference

TInvContext.SetMethodInfo

TInvContext	See also

Initializes the TInvContext for a particular method on the invokable interface.

procedure SetMethodInfo(MD: TIntfMethEntry);

Description

SetMethodInfo initializes the invocation context so that it represents a particular method. Objects that implement the IOPConvert interface call this method to initialize an invocation context when implementing their MsgToInvContext method.

MD is a description of the method, including its type, calling convention, and parameter signature.

Note:	SetMethodInfo allocates the memory used internally to store pointers and raw data. An application must call this method before any calls to the AllocData, SetDataPointer, or SetParamPointer methods.


TInvContext.SetParamPointer
 VCL Reference

TInvContext.SetParamPointer

TInvContext	See also

Sets the value of a specified parameter.

procedure SetParamPointer(Param: Integer; P: Pointer);

Description

SetParamPointer associates a pointer with a specified parameter.

Param identifies the parameter whose value is to be set, where 0 specifies the first parameter, 1 specifies the second parameter, and so on.

P is a pointer to the value of the parameter. Memory to contain the value of P can be allocated using the AllocData method.


TInvContext.SetResultPointer
 VCL Reference

TInvContext.SetResultPointer

TInvContext	See also

Sets the value of the function’s return value.

procedure SetResultPointer(P: Pointer);

Description

SetResultPointer associates a pointer with the return value of the function.

P is a pointer to the return value. Memory to contain the value to which P points can be allocated using the AllocData method.


Hierarchy

TObject

TDataContext

TInvContext


TInvokableClassRegistry
 VCL Reference

TInvokableClassRegistry

Hierarchy	Properties	Methods	See also

TInvokableClassRegistry is the type of the invocation registry.

Unit

InvokeRegistry

Description

TInvokableClassRegistry manages information about invokable interfaces and the classes that implement them. Invokable interfaces are used in applications that work with Web Services.

Server applications that implement Web Services need to register both the invokable interfaces and the implementation classes. The invoker component (such as THTTPSoapPascalInvoker) can then use the invocation registry to locate invokable interfaces and execute calls made to them.

Client applications that call on Web Services register the invokable interfaces that they call. The remote interfaced object component (THTTPRio) can then use the invocation registry to generate a dynamic vtable for calling the invokable interfaces.

Do not create instances of TInvokableClassRegistry. Instead, use the global InvRegistry function to access the invocation registry. Most applications need only call the RegisterInterface and (if a server) the RegisterInvokableClass methods. The other TInvokableClassRegistry methods are used by invoker components and remote interfaced object components to look up information about invokable interfaces and their implementation classes, access invokable interfaces, and so on.


 VCL Reference

TInvokableClassRegistry properties

TInvokableClassRegistry	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TInvokableClassRegistry properties

TInvokableClassRegistry	By object 	Legend

RefCount


 VCL Reference

TInvokableClassRegistry methods

TInvokableClassRegistry	Alphabetically	Legend

In TInvokableClassRegistry

Create

Destroy

GetClassFromIntfInfo

GetInfoForURI

GetInvokableObjectFromClass

GetInterface

GetInterfaceCount

GetInterfaceExternalName

GetInterfaceInfoFromName

GetInterfaceTypeInfo

GetMethExternalName

GetMethInternalName

GetNamespaceByGUID

GetParamExternalName

GetParamInternalName

GetWSDLEncoding

Lock

RegisterExternalMethName

RegisterExternalParamName

RegisterInterface

RegisterInvokableClass

UnLock

UnRegisterInterface

UnRegisterInvokableClass

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterfaceEntry

GetInterfaceExternalName

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TInvokableClassRegistry methods

TInvokableClassRegistry	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetClassFromIntfInfo

GetInfoForURI

GetInterface

GetInterfaceCount

GetInterfaceEntry

GetInterfaceInfoFromName

GetInterfaceTable

GetInterfaceTypeInfo

GetInvokableObjectFromClass

GetMethExternalName

GetMethInternalName

GetNamespaceByGUID

GetParamExternalName

GetParamInternalName

GetWSDLEncoding

InheritsFrom

InitInstance

InstanceSize

Lock

MethodAddress

MethodName

NewInstance

RegisterExternalMethName

RegisterExternalParamName

RegisterInterface

RegisterInvokableClass

SafeCallException

UnLock

UnRegisterInterface

UnRegisterInvokableClass


TInvokableClassRegistry.Create
 VCL Reference

TInvokableClassRegistry.Create

TInvokableClassRegistry	See also

Creates and initializes a TInvokableClassRegistry object.

constructor Create;

Description

Do not create your own instances of TInvokableClassRegistry. Instead, use the global InvRegistry function, which provides access to a single global instance of TInvokableClassRegistry.


TInvokableClassRegistry.Destroy
 VCL Reference

TInvokableClassRegistry.Destroy

TInvokableClassRegistry	See also

Frees the memory associated with the TInvokableClassRegistry object.

destructor Destroy; override;

Description

Do not destroy the global TInvokableClassRegistry instance that is available through the InvRegistry function. This object is freed automatically when the application unloads the InvokeRegistry unit.


TInvokableClassRegistry.GetClassFromIntfInfo
 VCL Reference

TInvokableClassRegistry.GetClassFromIntfInfo

TInvokableClassRegistry	See also

Retrieves the implementation class that corresponds to the type info of an invokable interface.

procedure GetClassFromIntfInfo(Info: PTypeInfo; var AClass: TClass);

Description

Typically, applications do not need to call GetClassFromIntfInfo. This method is called by the invoker component (THTTPSoapPascalInvoker) to look up the implementation class for an interace it is invoking.

Info is the runtime type information (RTTI) from a registered invokable interface. The interface must have been previously registered by a call to the RegisterInterface method.

AClass returns a class reference for the class that implements the invokable interface identified by Info. It can be passed to the GetInvokableObjectFromClass method to obtain an instance of the implementation class.


TInvokableClassRegistry.GetInfoForURI
 VCL Reference

TInvokableClassRegistry.GetInfoForURI

TInvokableClassRegistry	See also

Retrieves information about a registered invokable interface that is identified by a SOAP action header or the path of an HTTP message.

function GetInfoForURI(PathURI, ActionURI: string; var ACLass : TClass;  var IntfInfo: PTypeInfo; var AMeth: string): Boolean;

Description

Typically, applications do not need to call GetInfoForURI. This method is called by the invoker component (THTTPSoapPascalInvoker) to look up the target of a SOAP message that it is invoking.

PathURI is the path portion of the target URI on the SOAP message. When using a path to identify an invokable interface, the path portion must end in the name of the unit followed by the name of the interface. It is only used if ActionURI is an empty string.

ActionURI is the SOAP action header of the SOAP message. It identifies an interface based on the namespace in the SOAP action header. This namespace must match the namespace supplied to the RegisterInterface method (or generated by that method if the caller did not supply a namespace). If ActionURI is an empty string, GetInfoForURI uses PathURI instead to identify the target interface.

AClass returns a class reference for the class that implements the invokable interface identified by PathURI or ActionURI.

IntfInfo returns the runtime type information (RTTI) of the invokable interface identified by PathURI or ActionURI.

AMeth is not currently used.


TInvokableClassRegistry.GetInvokableObjectFromClass
 VCL Reference

TInvokableClassRegistry.GetInvokableObjectFromClass

TInvokableClassRegistry	See also

Returns an instance of the implementation class for a registered invokable interface.

function GetInvokableObjectFromClass(AClass: TClass): TObject;

Description

Typically, applications do not need to call GetInvokableObjectFromClass. This method is called by the invoker component (THTTPSoapPascalInvoker) to obtain an instance of the class that implements a registered invokable interface. When the invoker is finished with the object, it calls GetWSDLEncoding to free the instance.

AClass identifies the class whose instance is desired. It must be registered by a call to RegisterInvokableClass. The invoker obtains this class reference by calling the GetInfoForURI method.


TInvokableClassRegistry.GetInterface
 VCL Reference

TInvokableClassRegistry.GetInterface

TInvokableClassRegistry	See also

Returns the record that TInvokableClassRegistry maintains for one of its registered interfaces.

type

  InvRegIntfEntry = record

    Name: string;

    ExtName: WideString;

    UnitName: string;

    GUID: TGUID;

    Info: PTypeInfo;

    DefImpl: TClass;

    Namespace: WideString;

    WSDLEncoding: WideString;

    Documentation: string;

    MethNameMap: array of ExtNameMapItem;

    MethParamNameMap: array of MethParamNameMapItem;

  end;

function GetInterface(Index: Integer): InvRegIntfEntry;

Description

TInvokableClassRegistry maintains an InvRegIntfEntry record for every registered invokable interface. GetInterface provides indexed access to these records.

Index is the index of a registered interface. It is a value from 0 to one less than the count returned by GetInterfaceCount.

For each record:

Name is the name of the registered invokable interface.

ExtName is the name of the corresponding port type that appears in the WSDL document describing this Web Service. ExtName can be an empty string if the interface and port type have the same name.

UnitName is the name of the unit in which the interface is defined.

GUID is the globally unique identifier for the interface.

Info points to the runtime type information (RTTI) compiled with the interface.

DefImpl is the default implementation class for the interface.

Namespace is the namespace that is uniquely associated with the interface.

WSDLEncoding is the encoding attribute, if any, of the xml header on a WSDL document that defines the port type to which the invokable interface corresponds.

Documentation is a brief description that documents the interface.

MethNameMap is an array of entries that describe the relationship between methods on the invokable interface and the operation names to which they correspond (if different).

MethParamNameMap is an array of entries that describe the relationship between parameters on a method of the invokable interface and the part names to which they correspond (if different).


TInvokableClassRegistry.GetInterfaceCount
 VCL Reference

TInvokableClassRegistry.GetInterfaceCount

TInvokableClassRegistry	See also

Returns the number of registered invokable interfaces.

function GetInterfaceCount: Integer;

Description

GetInterfaceCount returns the number of invokable interfaces that have been registered. Each invokable interface is registered by a call to the RegisterInterface method.


TInvokableClassRegistry.GetInterfaceExternalName
 VCL Reference

TInvokableClassRegistry.GetInterfaceExternalName

TInvokableClassRegistry	See also

Returns the name of the port type that corresponds to an invokable interface.

function GetInterfaceExternalName(Info: PTypeInfo; Namespace: string  = ''; InternalIntfName: string = '' ): InvString;

Description

GetInterfaceExternalName returns the name of the port type that corresponds to a specified invokable interface. This is the name given to the corresponding port type in a WSDL document. The association between the external name and the interface name is established by the RegisterInterface method.

Info is the type information pointer for the invokable interface.

Namespace is the namespace assigned to the invokable interface when it was registered by a call to the RegisterInterface method. If the interface was registered using the automatically-generated namespace, this parameter can be an empty string.

InternalIntfName is the name of the invokable interface.


TInvokableClassRegistry.GetInterfaceInfoFromName
 VCL Reference

TInvokableClassRegistry.GetInterfaceInfoFromName

TInvokableClassRegistry	See also

Returns information about a registered invokable interface given its name.

procedure GetInterfaceInfoFromName(UnitName, IntfName: string; var Info: PTypeInfo; var IID: TGUID);

Description

GetInterfaceInfoFromName looks up a registered interface given its name and the name of the unit in which it is declared.

UnitName is the name of the unit that contains the interface definition.

IntfName is the name of the interface.

Info returns the type information that is compiled with the specified interface.

IID returns the globally unique identifier for the specified interface.


TInvokableClassRegistry.GetInterfaceTypeInfo
 VCL Reference

TInvokableClassRegistry.GetInterfaceTypeInfo

TInvokableClassRegistry	See also

Returns the runtime type information (RTTI) of an invokable interface.

function GetInterfaceTypeInfo(AGUID: TGUID): Pointer;

Description

GetInterfaceTypeInfo returns a pointer to the RTTI that is compiled with an invokable interface.

AGUID is the globally unique identifier that specifies the desired interface.


TInvokableClassRegistry.GetMethExternalName
 VCL Reference

TInvokableClassRegistry.GetMethExternalName

TInvokableClassRegistry	See also

Returns the name of the operation that corresponds to a method on an invokable interface.

function GetMethExternalName(Info: PTypeInfo;  MethodIntName: string): InvString;

Description

GetMethExternalName returns the name of the operation that corresponds to a specified method. This is the name used to define the operation for that method in a WSDL document. The association between the external name and the method name is established by the RegisterExternalMethName method.

Info is the type information pointer for the invokable interface that includes the method.

MethodIntName is the name of the method on that invokable interface.


TInvokableClassRegistry.GetMethInternalName
 VCL Reference

TInvokableClassRegistry.GetMethInternalName

TInvokableClassRegistry	See also

Returns the name of the method that corresponds to an operation in a WSDL document.

function GetMethInternalName(Info: PTypeInfo;  MethodExtName: InvString): string;

Description

GetMethInternalName returns the name of a method on a registered invokable interface that corresponds to a specified operation. The operation name comes from a WSDL document that describes the invokable interface and its methods. The association between the operation name and the method name is established by the RegisterExternalMethName method.

Info is the type information pointer for the invokable interface that includes the method.

MethodExtName is the name of the operation for which you want the corresponding method name.


TInvokableClassRegistry.GetNamespaceByGUID
 VCL Reference

TInvokableClassRegistry.GetNamespaceByGUID

TInvokableClassRegistry	See also

Returns a namespace that is uniquely associated with a registered interface.

function GetNamespaceByGUID(const AGUID: TGUID): string;

Description

GetNamespaceByGUID returns the namespace URI that identifies the specified interface. The namespace is originally associated with the interface when it is registered by a call to the RegisterInterface method. This namespace can be supplied when the interface is registered, or automatically generated by the RegisterInterface method.

AGUID is the globally unique identifier that identifies the interface whose namespace is desired..


TInvokableClassRegistry.GetParamExternalName
 VCL Reference

TInvokableClassRegistry.GetParamExternalName

TInvokableClassRegistry	See also

Returns the name of the part that corresponds to a parameter on a method of an invokable interface.

function GetParamExternalName(Info: PTypeInfo;  MethodName, InternalParamName: string): InvString;

Description

GetParamExternalName returns the name of the part that corresponds to a specified method parameter. This is the name used to define the part for that parameter in a WSDL document. The association between the external name and the parameter name is established by the RegisterExternalParamName method.

Info is the type information pointer for the invokable interface that includes the method.

MethodName is the name of the method on that invokable interface.

InternalParamName is the name of the parameter on the method of the invokable interface.


TInvokableClassRegistry.GetParamInternalName
 VCL Reference

TInvokableClassRegistry.GetParamInternalName

TInvokableClassRegistry	See also

Returns the name of the parameter that corresponds to a part on a message of an operation in a WSDL document.

function GetParamInternalName(Info: PTypeInfo;  MethodName: string; ExternalParamName InvString): string;

Description

GetParamInternalName returns the name of the method parameter that corresponds to a specified part. This is the parameter of a method on an invokable interface that is registered to correspond to a part that is defined in a WSDL document. The association between the parameter name and the part name is established by the RegisterExternalParamName method.

Info is the type information pointer for the invokable interface that includes the method.

MethodName is the name of the method on that invokable interface.

ExternalParamName is the name of a part on one of the messages in the operation that corresponds to MethodName. GetParamInternalName returns the corresponding parameter name.


TInvokableClassRegistry.GetWSDLEncoding
 VCL Reference

TInvokableClassRegistry.GetWSDLEncoding

TInvokableClassRegistry	See also

Returns the encoding attribute of the xml header of a document that defines the port type to which the interface corresponds.

function GetWSDLEncoding(Info: PTypeInfo; Namespace: string  = ''; InternalIntfName: string = '' ): InvString;

Description

GetWSDLEncoding returns the encoding attribute, if any, that is registered with the interface by a call to the RegisterInterface method. The encoding attribute is an attribute of the xml header of a WSDL document, and describes the character set that should be used with all the elements that the document defines.

Info points to the type information of the registered interface.

Namespace specifies the namespace that was registered for the interface by the RegisterInterface method. It can be an empty string.

InternalIntfName is the name of the interface (which may differ from the port type to which it corresponds).


TInvokableClassRegistry.Lock
 VCL Reference

TInvokableClassRegistry.Lock

TInvokableClassRegistry	See also

Prevents other threads from accessing the invocation registry.

procedure Lock; virtual;

Description

Lock uses a critical section to prevent simultaneous use of the invocation registry by multiple threads in the same application. Once one thread has called Lock to obtain access to the invocation registry, no other thread can return from the Lock method until the first thread has called the UnLock method to release its lock.

Typically, applications do not need to call the Lock method, because it is called automatically by the methods of TInvokableClassRegistry.


TInvokableClassRegistry.RegisterExternalMethName
 VCL Reference

TInvokableClassRegistry.RegisterExternalMethName

TInvokableClassRegistry	See also

Registers the correspondence between a method name on an invokable interface and the corresponding operation name in a WSDL document.

procedure RegisterExternalMethName(Info: PTypeInfo; InternalName: string; const ExternalName: InvString);

Description

Use RegisterExternalMethName to create an association between the name of an operation in a WSDL document and the corresponding method of the invokable interface that corresponds to that operation’s port type. This allows the invokable interface to represent a port type that includes operations with names that are not legal in Object Pascal (for example, keywords).

Info points to the type information of the invokable interface.

InternalName is the name used for the method of the invokable interface that corresponds to the operation.

ExternalName is the name of the operation that is defined in the WSDL document.


TInvokableClassRegistry.RegisterExternalParamName
 VCL Reference

TInvokableClassRegistry.RegisterExternalParamName

TInvokableClassRegistry	See also

Registers the correspondence between a parameter name on an invokable interface and the corresponding part name in a WSDL document.

procedure RegisterExternalParamName(Info: PTypeInfo; MethodName, InternalName: string; const ExternalName: InvString);

Description

Use RegisterExternalParamName to create an association between the name of a part in a WSDL document and the corresponding parameter on a method of an invokable interface. This allows the invokable interface to handle definitions that have names that are not legal in Object Pascal (for example, keywords).

Info points to the type information of the invokable interface.

MethodName is the name of the method on the invokable interface.

InternalName is the name used for the parameter of the specified method that corresponds to the part with the name specified by ExternalName.

ExternalName is the name of the part that is defined in the WSDL document.


TInvokableClassRegistry.RegisterInterface
 VCL Reference

TInvokableClassRegistry.RegisterInterface

TInvokableClassRegistry	See also

Registers an invokable interface.

procedure RegisterInterface(Info: PTypeInfo; Namespace: string = ''; WSDLEncoding: InvString = ''; Doc: string = ''; ExtName: InvString = '');

Description

Call RegisterInterface from the initialization section of a unit that defines an invokable interface to register it with the invocation registry. Once an invokable interface is registered, client applications can statically bind to it using THTTPRio. On the server side, you must also register the implementation class (using the RegisterInvokableClass method) before the server can respond to incoming SOAP requests.

PInfo is a pointer to the type information for the interface. You can obtain the type information from an invokable interface by calling the TypeInfo function.

Namespace specifies a namespace URI that uniquely identifies the interface. This namespace is used in SOAP action headers to indicate the interface that is the target of a SOAP message call. If Namespace is set to an empty string, RegisterInterface automatically generates a unique string for the interface.

WSDLEncoding specifies a encoding attribute that appears on the xml header of any WSDL document that includes the definition of this interface (or rather, the port type to which it corresponds). The encoding attribute describes the character set to use in the WSDL document.

Doc is a descriptive string that describes the purpose or use of the interface. It is used if the application publishes a WSDL document that defines this interface.

ExtName is the name of the port type that corresponds to this interface in a WSDL document. This can be an empty string if the port type and interface have the same name. It is useful when a port type in a WSDL document has a name that is not a valid Object Pascal identifier (for example, a keyword).


TInvokableClassRegistry.RegisterInvokableClass
 VCL Reference

TInvokableClassRegistry.RegisterInvokableClass

TInvokableClassRegistry	See also

Registers the implementation class for an invokable interface.

type TCreateInstanceProc = procedure(out obj: TObject);

procedure RegisterInvokableClass(AClass: TClass; CreateProc: TCreateInstanceProc = nil);

Description

RegisterInvokableClass registers the class that implements an already-registered invokable interface. It is only needed on server applications that implement Web Services. The interface itself is registered by the RegisterInterface method.

The invocation registry must be able to instantiate the implementation class. If the class has a virtual constructor that takes no arguments, you do not need to supply a method to create the class instance. If the constructor takes any arguments, of if it is not virtual, you must supply a method to instantiate the class as the value of the CreateProc argument.

AClass is a class reference to the class being registered.

CreateProc is a procedure that returns an instance of AClass. If CreateProc is nil, then AClass must be a descendant of TInvokableClass.


TInvokableClassRegistry.UnLock
 VCL Reference

TInvokableClassRegistry.UnLock

TInvokableClassRegistry	See also

Allows other threads to access the invocation registry after it was locked.

procedure UnLock; virtual;

Description

UnLock exits the critical section that the Lock method entered. It reenables other threads access to the invocation registry after a call to the Lock method.

Every call to the Lock method must be paired by a call to UnLock when the locking thread is finished with the invocation registry. The methods of TInvokableClassRegistry that call the Lock method also call the UnLock method when they are finished.


TInvokableClassRegistry.UnRegisterInterface
 VCL Reference

TInvokableClassRegistry.UnRegisterInterface

TInvokableClassRegistry	See also

Unregisters an invokable interface.

procedure UnRegisterInterface(Info: PTypeInfo);

Description

Call UnRegisterInterface from the finalization section of a unit that defines an invokable interface to unregister it from the invocation registry. Once an invokable interface is unregistered, client applications can no longer call it and server applications can’t respond to calls directed at the interface methods.

Info is a pointer to the runtime type information for the interface. You can obtain the type information from an invokable interface by calling the TypeInfo function.


TInvokableClassRegistry.UnRegisterInvokableClass
 VCL Reference

TInvokableClassRegistry.UnRegisterInvokableClass

TInvokableClassRegistry	See also

Unregisters the implementation class for an invokable interface.

procedure UnRegisterInvokableClass(AClass: TClass);

Description

UnRegisterInvokableClass unregisters an implementation class that was previously registered by a call to RegisterInvokableClass. Once a class is unregistered, the invocation registry can no longer create and use instances of the specified class to handle incoming method calls to its corresponding invokable interface.

AClass is a class reference to the class being unregistered.


Hierarchy

TObject

TInterfacedObject

TInvokableClassRegistry


IOPConvert
 VCL Reference

IOPConvert

Hierarchy	Methods	See also

IOPConvert is the interface for marshaling and unmarshaling method calls on an invokable interface.

Unit

OPConvert

Description

IOPConvert is implemented by classes that marshal and unmarshal method calls in Web Service applications. It defines methods for marshaling and unmarshaling method calls, as well as any exceptions that occur when attempting to execute those method calls.

The IOPConvert interface is used by remote interfaced objects on the client (TRio descendants) and invoker components on the server (TSoapPascalInvoker descendants). Both the remote interfaced object and the invoker classes use the same IOPConvert implementation class, which represents a single encoding system (such as SOAP).

Classes that implement IOPConvert use the runtime type information (RTTI) on an invokable interface to interpret or encode method calls. They do not execute these calls, but rather, convert between transportable strings that are the encoding of interface method calls and an invocation context (TInvContext object).


 VCL Reference

IOPConvert methods

IOPConvert	Alphabetically	Legend

In IOPConvert

InvContextToMsg

MakeFault

MakeResponse

MsgToInvContext

ProcessResponse

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IOPConvert methods

IOPConvert	By object	Legend

_AddRef

_Release

InvContextToMsg

MakeFault

MakeResponse

MsgToInvContext

ProcessResponse

QueryInterface


IOPConvert.InvContextToMsg
 VCL Reference

IOPConvert.InvContextToMsg

IOPConvert	See also

Marshals a method call from an invocation context to a transportable string.

function InvContextToMsg(const IntfMD: TIntfMetaData; MethNum: Integer; Con: TInvContext): InvString;

Description

InvContextToMsg looks up a specified method call, including the types and values of any arguments, from an invocation context, and returns an encoded version of that method call that can be transported to the application that executes it.

IntfMD represents the runtime type information (RTTI) from the interface whose method is called.

MethNum identifies the called method by its position in the interface’s method table.

Con is the invocation context that contains details of the method call, including the parameter values passed in, the calling conventions, and any other temporary data used when making the call.

InvContextToMsg returns the encoded version of the method call that can be passed to an IWebNode interface for execution.


IOPConvert.MakeFault
 VCL Reference

IOPConvert.MakeFault

IOPConvert	See also

Encodes an exception that was raised when trying to execute a method on an invokable interface.

function MakeFault(const Ex: Exception): InvString;

Description

MakeFault encodes an exception that a Web Service application catches when trying to execute a method on an invokable interface. It generates an encoded exception packet, which the client can decode and use to raise the exception on the client application.

Ex is the exception object that represents the exception that occurred.

MakeFault returns the encoded exception packet.


IOPConvert.MakeResponse
 VCL Reference

IOPConvert.MakeResponse

IOPConvert	See also

Encodes the results of successfully executing a method on an invokable interface.

procedure MakeResponse(const IntfMD: TIntfMetaData; const MethNum: Integer; Context: TInvContext; Response: TStream);

Description

MakeResponse retrieves the results of executing a method on an invokable interface from an invocation context and packages them into a transportable string, which it writes to a stream. This string is passed back to the client, which can unpack it using the ProcessResponse method.

IntfMD represents the runtime type information (RTTI) from the interface whose method was executed.

MethNum identifies the called method by its position in the interface’s method table.

Context is the invocation context that contains details of the method call.

Response is a stream to which MakeResponse writes the encoded version of the method result and any output parameters.


IOPConvert.MsgToInvContext
 VCL Reference

IOPConvert.MsgToInvContext

IOPConvert	See also

Unpacks an encoded method call into an invocation context so that it can be executed.

procedure MsgToInvContext(const Request: InvString; const IntfMD: TIntfMetaData; var MethNum: Integer; Context: TInvContext); overload;

procedure MsgToInvContext(const Request: TSteam; const IntfMD: TIntfMetaData; var MethNum: Integer; Context: TInvContext); overload;

Description

MsgToInvContext takes an encoded message that a server application receives and uses it to fill out an invocation context, which can then be used to execute the method call.

Request is the encoded method call, or a stream from which to read that method call. It is generated on the client by a call to InvContextToMsg.

IntfMD represents the runtime type information (RTTI) from the interface whose method is called.

MethNum returns the position of the called method in the interface’s method table.

Context is the invocation context to which this method adds the information encoded in Request.


IOPConvert.ProcessResponse
 VCL Reference

IOPConvert.ProcessResponse

IOPConvert	See also

Unpacks the response packet from a method call into an invocation context.

procedure ProcessResponse(const Response: InvString; const MD: TIntfMetaData; Context: TInvContext); overload;

procedure ProcessResponse(const Response: TStream; const MD: TIntfMetaData; Context: TInvContext); overload;

Description

ProcessResponse takes the encoded results of executing a method on an invokable interface from an invocation context and unpacks them into an invocation context.

Response is the encoded results of executing a method on the invokable interface, or a stream from which those results can be read. It is generated on the server by the MakeResponse method if the call was successful, or the MakeFault method if the call was unsuccessful.

MD describes the runtime type information (RTTI) of the interface whose method was called.

Context is the invocation context that ProcessResponse fills out based on the contents of Response.


Hierarchy

IInterface

IOPConvert


IXMLDocument
 VCL Reference

IXMLDocument

Hierarchy	Properties	Methods	See also

IXMLDocument represents an XML document.

Unit

XMLIntf

Description

Use IXMLDocument to work with an XML document. Applications can obtain an IXMLDocument interface through a TXMLDocument component, using the global LoadXMLDocument function, or through the OwnerDocument property of any node in the document.

Like the related DOM interface IDOMDocument, you can use IXMLDocument to access the contents of an XML document and to create new nodes. In addition, IXMLDocument lets you load an XML document that is stored on disk or assign a string of raw (unparsed) XML as the contents of the document.

TXMLDocument implements the IXMLDocument interface. Typically, the TXMLDocument component is the starting point for working with an XML document.


 VCL Reference

IXMLDocument properties

IXMLDocument	Alphabetically	Legend

In IXMLDocument

Active

AsyncLoadState

ChildNodes

DocumentElement

DOMDocument

Encoding

FileName

Modified

Node

NodeIndentStr

Options

ParseOptions

SchemaRef

StandAlone

Version

XML


 VCL Reference

IXMLDocument properties

IXMLDocument	By object	Legend

Active

AsyncLoadState

ChildNodes

DocumentElement

DOMDocument

FileName

Encoding

Modified

Node

NodeIndentStr

Options

ParseOptions

SchemaRef

StandAlone

Version

XML


IXMLDocument.Active
 VCL Reference

IXMLDocument.Active

IXMLDocument	See also

Specifies whether the XML document has been parsed so that the DOM interfaces are available to examine or change its contents.

property Active: Boolean;

Description

Before you can use IXMLDocument to examine or change the contents of an XML document, it must be active. Setting Active to True results in the parsing of the XML document specified by the FileName property or by the XML property. If both FileName and XML are empty strings, Setting Active to True causes IXMLDocument to represent an empty document.

Active must be True before you can access the DOMDocument or DocumentElement properties.


IXMLDocument.AsyncLoadState
 VCL Reference

IXMLDocument.AsyncLoadState

IXMLDocument	See also

Indicates the state of the DOM parser when it parses the XML document asynchronously.

property AsyncLoadState: Integer;

Description

Use AsyncLoadState to determine that status of the DOM parser when it is parsing an XML document asynchronously. The value of AsyncLoadState is vendor-specific. That is, each DOM parser that loads and parses an XML document asynchronously supplies its own flags to indicate state information.

When the DOM vendor is MSXML, AsyncLoadState can have any of the following values:

Value	Meaning

0	Uninitialized: The AsyncLoadState is not assigned. (Usually indicates that the parser has not tried to parse a document or it is not parsing the document asynchronously.)

1	Loading: The parser is currently parsing the structure of the XML document.

2	Loaded: The parser has finished reading and parsing the structure of the XML document, but the corresponding DOM interfaces are not yet available.

3	Interactive: The parser has parsed the structure of the XML document, the corresponding DOM interfaces are available, but the parser has not finished reading all the node values.

4	Complete: The parser has fully read and parsed the XML document.


IXMLDocument.ChildNodes
 VCL Reference

IXMLDocument.ChildNodes

IXMLDocument	See also

Lists all of the child nodes of the document.

property ChildNodes: IXMLNodeList;

Description

Use ChildNodes to access all of the nodes that are children of the document object. In addition to DocumentElement, which is the root of the data hierarchy, ChildNodes can include nodes for comments, processing instructions, and so on.


IXMLDocument.DocumentElement
 VCL Reference

IXMLDocument.DocumentElement

IXMLDocument	See also

Provides access to the root node of the XML document.

property DocumentElement: IXMLNode;

Description

Use DocumentElement to access the root node of the XML document. Because XML documents are hierarchical in structure, DocumentElement is the entry point to all data in the XML document. Setting DocumentElement replaces the entire data hierarchy with a new hierarchy of nodes.

The IXMLNode interface includes properties and methods for examining and changing the text and attributes of a node, for adding and deleting child nodes, and for traversing the hierarchy of nodes rooted at that node.


IXMLDocument.DOMDocument
 VCL Reference

IXMLDocument.DOMDocument

IXMLDocument	See also

Provides access to the DOM interface for the parsed XML document.

property DOMDocument: IDOMDocument;

Description

Use DOMDocument to directly access the IDOMDocument interface for the parsed XML document. This is the interface supported by the DOM parser for the document.

Most applications do not need to use the DOMDocument property directly. Instead, it supplies the underlying support for parsing and manipulating the nodes accessed through DocumentElement. If you do want to make use of DOMDocument’s low-level support, you must be familiar with the W3C Document Object Model (DOM) Specification.


IXMLDocument.FileName
 VCL Reference

IXMLDocument.FileName

IXMLDocument	See also

Indicates the XML document file, if any, that this interface represents.

property FileName: DOMString;

Description

Use FileName to get or set the name of the XML file that this document represents. FileName is set automatically when an application calls the LoadFromFile method or when this interface is obtained from the global LoadXMLDocument function.

When you set the value of FileName, the XML property automatically changes (at runtime) to represent the contents of that file.

Note:	The content of this XML document, which is available as the value of the XML property, may not be the same as the content of the specified file. If an application uses IXMLDocument to edit the document, those changes are not saved back to the XML document file until you call the SaveToFile method.

Tip:	If the underlying DOM implementation supports it, you can use FileName to specify an URL rather than a file on disk.


IXMLDocument.Encoding
 VCL Reference

IXMLDocument.Encoding

IXMLDocument	See also

Indicates the character set that the XML document uses to encode characters.

property Encoding: DOMString;

Description

Encoding is the encoding name that appears in the document type declaration of the XML document. It is a string such as ‘UTF-8’, ‘UTF-16’, or ‘ISO-10646-UCS-2’ that indicates the character set used in the document.


IXMLDocument.Modified
 VCL Reference

IXMLDocument.Modified

IXMLDocument	See also

Indicates whether the XML document has been modified.

property Modified: Boolean;

Description

Read Modified to determine whether the application has made any changes to the nodes in the XML document. When Modified is True, the value of the XML property may differ from the contents of the file specified by FileName. You can call the SaveToFile method to update the XML document file to reflect the changes.


IXMLDocument.Node
 VCL Reference

IXMLDocument.Node

IXMLDocument	See also

Provides access to the document node for the XML document.

property Node: IXMLNode;

Description

Read Node to access the document node for the XML document. The document node represents information about the entire document. It may have several child nodes, which represent comments, processing instructions, and which include the DocumentElement node that acts as the root of the data hierarchy.


IXMLDocument.NodeIndentStr
 VCL Reference

IXMLDocument.NodeIndentStr

IXMLDocument	See also

Indicates the string that is inserted before nested nodes in the formatted XML text.

property NodeIndentStr: DOMString;

Description

Use NodeIndentStr to customize how the document formats nodes that are added. When the Options property includes doNodeAutoIndent, this string is inserted in the generated XML before any newly added node, once for each nesting level.

If you do not assign a value to NodeIndentStr, IXMLDocument inserts two spaces to represent each nesting level.


IXMLDocument.Options
 VCL Reference

IXMLDocument.Options

IXMLDocument	See also

Influences various aspects of the document’s behavior.

property Options: TXMLDocOptions;

Description

Set Options to configure how you want the document to respond when the application tries to read nodes or attributes that do not exist, when it creates a new namespace when adding a node, when it generates XML text from the nodes in the document, or whether it saves its value automatically when you close the document. Options can include any of the following values:

Value	Meaning

doNodeAutoCreate	If the application tries to read a node by name, using the Nodes property of an IXMLNodeList interface, and that node does not exist, then the application creates a new node using the specified name.

doNodeAutoIndent	When formatting the XML text from the parsed set of nodes, child nodes are automatically indented from their parent nodes.

doAttrNull	When reading the value of an attribute that does not exist, the value is given as a Null Variant (as opposed to a value of an empty string).

doAutoPrefix	When generating the name of a new node, the value is automatically given a namespace prefix if a namespace URI is supplied.

doNamespaceDecl	When the AddChild method must create a new namespace for the node, it also adds a namespace attribute to declare that new namespace. If doNamespaceDecl is not included, AddChild creates the new namespace but does not add an attribute to declare it.

doAutoSave	When you close the document (set Active to False), any changes are automatically saved back to the file specified by FileName or to the XML property.


IXMLDocument.ParseOptions
 VCL Reference

IXMLDocument.ParseOptions

IXMLDocument	See also

Specifies implementation-specific options that are followed when parsing the XML document.

property ParseOptions: TParseOptions;

Description

Set ParseOptions to influence the way the DOM implementation parses the XML document. Different DOM implementations support different options. If you attempt to use an option that is not supported by your DOM implementation, IXMLDocument raises an EXMLDocError exception.


IXMLDocument.SchemaRef
 VCL Reference

IXMLDocument.SchemaRef

IXMLDocument	See also

Returns the name of the schema associated with this XML document.

property SchemaRef: DOMString;

Description

Read SchemaRef to determine the schema associated with this XML document. If the document does not have an attribute that identifies an associated schema, the value of SchemaRef is an empty string.


IXMLDocument.StandAlone
 VCL Reference

IXMLDocument.StandAlone

IXMLDocument	See also

Indicates whether the XML document includes any external markup declarations.

property StandAlone: DOMString;

Description

StandAlone is the value of the standalone attribute on the document type declaration of the XML document. StandAlone has a value of ‘yes’ or ‘no’.

When StandAlone is ‘yes’, the document contains no external markup declarations. It may, however, still contain references to external entities, as long as they are not declarations.

When StandAlone is ‘no’, the document may or may not contain external markup declarations.


IXMLDocument.Version
 VCL Reference

IXMLDocument.Version

IXMLDocument	See also

Indicates the XML version that the document uses.

property Version: DOMString;

Description

Version indicates the XML version number that the document uses. An XML version number is a string of the form ‘n.m’, where n is the major version number and m is the minor version number.


IXMLDocument.XML
 VCL Reference

IXMLDocument.XML

IXMLDocument	See also

Specifies the content of the XML document associated with this IXMLDocument interface.

property XML: TStrings;

Description

Read XML to obtain the contents of the associated XML document. Set XML to specify the raw (unparsed) XML you want to examine or manipulate.

XML is a TStrings object. This means you can manipulate the XML line by line. To read or write the XML in the document as a single string, use the LoadFromXML or SaveToXML method.

Note:	If you call the LoadFromFile, LoadFromStream, or LoadFromXML method, XML is automatically updated to reflect the contents of that file.


 VCL Reference

IXMLDocument methods

IXMLDocument	Alphabetically	Legend

In IXMLDocument

AddChild

CreateElement

CreateNode

GeneratePrefix

GetActive

GetAsyncLoadState

GetChildNodes

GetDocBinding

GetDocumentElement

GetDocumentNode

GetDOMDocument

GetEncoding

GetFileName

GetModified

GetNodeIndentStr

GetOptions

GetParseOptions

GetSchemaRef

GetStandAlone

GetVersion

GetXML

IsEmptyDoc

LoadFromFile

LoadFromStream

LoadFromXML

Refresh

RegisterDocBinding

Resync

SaveToFile

SaveToStream

SaveToXML

SetActive

SetDocumentElement

SetDOMDocument

SetEncoding

SetFileName

SetNodeIndentStr

SetOnAsyncLoad

SetOptions

SetParseOptions

SetStandAlone

SetVersion

SetXML

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IXMLDocument methods

IXMLDocument	By object	Legend

_AddRef

_Release

AddChild

CreateElement

CreateNode

GeneratePrefix

GetActive

GetAsyncLoadState

GetChildNodes

GetDocBinding

GetDocumentElement

GetDocumentNode

GetDOMDocument

GetEncoding

GetFileName

GetModified

GetNodeIndentStr

GetOptions

GetParseOptions

GetSchemaRef

GetStandAlone

GetVersion

GetXML

IsEmptyDoc

LoadFromFile

LoadFromStream

LoadFromXML

QueryInterface

Refresh

RegisterDocBinding

Resync

SaveToFile

SaveToStream

SaveToXML

SetActive

SetDocumentElement

SetDOMDocument

SetEncoding

SetFileName

SetNodeIndentStr

SetOnAsyncLoad

SetOptions

SetParseOptions

SetStandAlone

SetVersion

SetXML


IXMLDocument.AddChild
 VCL Reference

IXMLDocument.AddChild

IXMLDocument	See also

Creates and adds a node to the child nodes of this document.

function AddChild(const TagName, NamespaceURI: DOMString): IXMLNode; overload;

function AddChild(const TagName): IXMLNode; overload;

Description

Call AddChild to add a new child element node to the document itself. The new node is added to the end of the list maintained by the ChildNodes property.

TagName is the tag name for the new element node.

NamespaceURI identifies the namespace, if any, that includes the new node’s definition.

AddChild returns the interface for the newly created node.

Note:	Do not call AddChild to add a child to the document element of this document. When adding data to the XML document, use the AddChild method of the document element or of the node in the hierarchy that should be the parent of the new node.


IXMLDocument.CreateElement
 VCL Reference

IXMLDocument.CreateElement

IXMLDocument	See also

Creates a new element node that is associated with this document.

function CreateElement(const TagOrData, NamespaceURI: DOMString): IXMLNode;

Description

Call CreateElement to create a new generic element node. The resulting node does not have a parent, but can be added to the ChildNodes list of any node in the document (including this document’s ChildNodes property). It can also be assigned to the DocumentElement property to replace the entire data hierarchy of this document.

TagOrData provides the tag name of the newly created node.

NamespaceURI identifies the namespace that includes the new node’s definition.

CreateElement returns the interface for the new node.

Note:	To add a node as the child of another node in this document, it is simpler to call that node’s AddChild method.


IXMLDocument.CreateNode
 VCL Reference

IXMLDocument.CreateNode

IXMLDocument	See also

Creates a new node that is associated with this document.

function CreateNode(const NameOrData: DOMString; NodeType: TNodeType = ntElement; const AddlData: DOMString = ''): IXMLNode;

Description

Call CreateNode to create a new generic XML node. The resulting node does not have a parent, but can be added to the ChildNodes or AttributeNodes list of any node in the document (including this document’s ChildNodes property).

NameOrData provides the tag name or value of the newly created node. Its interpretation depends on the type of node created, as indicated in the following table:

NodeType	NameOrData

ntElement	The tag name.

ntAttribute	The attribute name.

ntText	The value of the node.

ntCData	The value of the CDATA section.

ntEntityRef	The name of the referenced entity.

ntProcessingInstr	The target of the processing instruction.

ntComment	The value (text) of the comment.

ntDocFragment	Not used.

NodeType indicates the type of node to create. It can only be one of the types listed in the previous table.

The meaning of AddlData depends on the node type, as indicated in the following table:

NodeType	AddlData

ntElement	The namespace URI that qualifies the tag name.

ntAttribute	The namespace URI that qualifies the attribute name.

ntProcessingInstr	The content of the processing instruction, except for the target.

CreateNode returns the interface for the new node.

Note:	To add a node as the child of another node in this document, it is simpler to call that node’s AddChild method.


IXMLDocument.GeneratePrefix
 VCL Reference

IXMLDocument.GeneratePrefix

IXMLDocument	See also

Generates a unique namespace prefix that can be used for a node in the document.

function GeneratePrefix(const Node: IXMLNode): DomString;

Description

The AddChild method for each node allows the caller to specify that the new node should use an automatically-generated namespace prefix. When this option is specified, the node calls GeneratePrefix to generate a unique string to act as a namespace prefix.

Node is the interface for the node which will use the newly-generated namespace prefix.

GeneratePrefix returns a unique string that is not already used in the document to represent a namespace URI. The generated namespace prefixes are only unique within a single document.


IXMLDocument.GetActive
 VCL Reference

IXMLDocument.GetActive

IXMLDocument	See also

Returns the value of the Active property.

function GetActive: Boolean;

Description

GetActive is the read implementation of the Active property.


IXMLDocument.GetAsyncLoadState
 VCL Reference

IXMLDocument.GetAsyncLoadState

IXMLDocument	See also

Returns the value of the AsyncLoadState property.

function GetAsyncLoadState: Integer;

Description

GetAsyncLoadState is the read implementation of the AsyncLoadState property.


IXMLDocument.GetChildNodes
 VCL Reference

IXMLDocument.GetChildNodes

IXMLDocument	See also

Returns the value of the ChildNodes property.

function GetChildNodes: IXMLNodeList;

Description

GetChildNodes is the read implementation of the ChildNodes property.


IXMLDocument.GetDocBinding
 VCL Reference

IXMLDocument.GetDocBinding

IXMLDocument	See also

Replaces a specified child node with an instance of a specified implementation class.

function GetDocBinding(const TagName: DOMString; DocNodeClass: TClass; NamespaceURI: DOMString = ''): IXMLNode;

Description

Call GetDocBinding to specify the implementation class for one of the child nodes of the document node. After replacing the specified node with an instance of the specified class, GetDocBinding returns the interface of the document element.

TagName is the tag name of the child node to be replaced. Typically, this identifies the document element.

DocNodeClass is the implementation class to use for all child nodes with the specified tag name.

NamespaceURI is the URI of the namespace in which TagName is defined.


IXMLDocument.GetDocumentElement
 VCL Reference

IXMLDocument.GetDocumentElement

IXMLDocument	See also

Returns the value of the DocumentElement property.

function GetDocumentElement: IXMLNode;

Description

GetDocumentElement is the read implementation of the DocumentElement property.


IXMLDocument.GetDocumentNode
 VCL Reference

IXMLDocument.GetDocumentNode

IXMLDocument	See also

Returns the value of the Node property.

function GetDocumentNode: IXMLNode;

Description

GetDocumentNode is the read implementation of the Node property.


IXMLDocument.GetDOMDocument
 VCL Reference

IXMLDocument.GetDOMDocument

IXMLDocument	See also

Returns the value of the DOMDocument property.

function GetDOMDocument: IDOMDocument;

Description

GetDOMDocument is the read implementation of the DOMDocument property.


IXMLDocument.GetEncoding
 VCL Reference

IXMLDocument.GetEncoding

IXMLDocument	See also

Returns the value of the Encoding property.

function GetEncoding: DOMString;

Description

GetEncoding is the read implementation of the Encoding property.


IXMLDocument.GetFileName
 VCL Reference

IXMLDocument.GetFileName

IXMLDocument	See also

Returns the value of the FileName property.

function GetFileName: DOMString;

Description

GetFileName is the read implementation of the FileName property.


IXMLDocument.GetModified
 VCL Reference

IXMLDocument.GetModified

IXMLDocument	See also

Returns the value of the Modified property.

function GetModified: Boolean;

Description

GetModified is the read implementation of the Modified property.


IXMLDocument.GetNodeIndentStr
 VCL Reference

IXMLDocument.GetNodeIndentStr

IXMLDocument	See also

Returns the value of the NodeIndentStr property.

function GetNodeIndentStr: DOMString;

Description

GetNodeIndentStr is the read implementation of the NodeIndentStr property.


IXMLDocument.GetOptions
 VCL Reference

IXMLDocument.GetOptions

IXMLDocument	See also

Returns the value of the Options property.

function GetOptions: TXMLDocOptions;

Description

GetOptions is the read implementation of the Options property.


IXMLDocument.GetParseOptions
 VCL Reference

IXMLDocument.GetParseOptions

IXMLDocument	See also

Returns the value of the ParseOptions property.

function GetParseOptions: TParseOptions;

Description

GetParseOptions is the read implementation of the ParseOptions property.


IXMLDocument.GetSchemaRef
 VCL Reference

IXMLDocument.GetSchemaRef

IXMLDocument	See also

Returns the value of the SchemaRef property.

function GetSchemaRef: DOMString;

Description

GetSchemaRef is the read implementation of the SchemaRef property.


IXMLDocument.GetStandAlone
 VCL Reference

IXMLDocument.GetStandAlone

IXMLDocument	See also

Returns the value of the StandAlone property.

function GetStandAlone: DOMString;

Description

GetStandAlone is the read implementation of the StandAlone property.


IXMLDocument.GetVersion
 VCL Reference

IXMLDocument.GetVersion

IXMLDocument	See also

Returns the value of the Version property.

function GetVersion: DOMString;

Description

GetVersion is the read implementation of the Version property.


IXMLDocument.GetXML
 VCL Reference

IXMLDocument.GetXML

IXMLDocument	See also

Returns the value of the XML property.

function GetXML: TStrings;

Description

GetXML is the read implementation of the XML property.


IXMLDocument.IsEmptyDoc
 VCL Reference

IXMLDocument.IsEmptyDoc

IXMLDocument	See also

Indicates whether the IXMLDocument instance represents an empty document.

function IsEmptyDoc: Boolean;

Description

Call IsEmptyDoc to determine whether the IXMLDocument instance represents an empty document. IsEmptyDoc returns True if the DOMDocument property is not set (for example, if there is no DOM implementation) or if this interface represents a document with no child nodes.


IXMLDocument.LoadFromFile
 VCL Reference

IXMLDocument.LoadFromFile

IXMLDocument	See also

Loads an XML document from disk.

procedure LoadFromFile(AFileName: DOMString);

Description

Call LoadFromFile to load the XML document specified by AFileName so that you can examine or modify it.

AFileName is the name of the file to load.

Once you have loaded an XML document, any changes you make to the document are not saved back to disk until you call the SaveToFile method.


IXMLDocument.LoadFromStream
 VCL Reference

IXMLDocument.LoadFromStream

IXMLDocument	See also

Loads an XML document from a stream and activates it.

procedure LoadFromStream(const Stream: TStream; EncodingType: TXMLEncodingType = xetUnknown);

Description

Call LoadFromStream to load the XML document from a stream.

Stream is a stream object that can be used to read the string of XML that makes up the document.

EncodingType indicates the character set that is used for Stream. If EncodingType is xetUnknown (the default), LoadFromStream attempts to infer the encoding type from the XML encoding declaration at the beginning of the document.

After loading the document from Stream, LoadFromStream sets the Active property to True.


IXMLDocument.LoadFromXML
 VCL Reference

IXMLDocument.LoadFromXML

IXMLDocument	See also

Loads a string representation of an XML document and activates it.

procedure LoadFromXML(const XML: string); overload;

procedure LoadFromXML(const XML: DOMString); overload;

Description

Call LoadFromXML to assign a string as the value of the XML document. Unlike the XML property, which lets you assign XML on a line-by-line basis, LoadFromXML treats the text of the XML document as a whole.

After assigning the XML property as the contents of the document, LoadFromXML sets the Active property to True.


IXMLDocument.Refresh
 VCL Reference

IXMLDocument.Refresh

IXMLDocument	See also

Updates the parsed XML document to reflect external changes.

procedure Refresh;

Description

Call Refresh when the XML document specified by FileName has changed due to an external cause. Refresh updates the parsed version of the XML document (which can be traversed starting with DocumentElement) to reflect the current contents of the file specified by FileName.

The Active property must be True when you call Refresh.

Note:	Do not call Refresh after making changes directly to the XML property, because assigning a value to XML automatically closes the XML document. To refresh the XML document after assigning a new value to XML, set the Active property to True.


IXMLDocument.RegisterDocBinding
 VCL Reference

IXMLDocument.RegisterDocBinding

IXMLDocument	See also

Registers an implementation class for child nodes with a specified tag name.

procedure RegisterDocBinding(const TagName: DOMString; DocNodeClass: TClass; NamespaceURI: DOMString = '');

Description

Call RegisterDocBinding to specify the implementation class for one of the child nodes of the document node. RegisterDocBinding replaces the specified node with an instance of the specified class.

TagName is the tag name of the child node to be replaced. Typically, this identifies the document element.

DocNodeClass is the implementation class to use for all child nodes with the specified tag name.

NamespaceURI is the URI of the namespace in which TagName is defined.


IXMLDocument.Resync
 VCL Reference

IXMLDocument.Resync

IXMLDocument	See also

Forces all child nodes and attribute nodes to be reread from the underlying DOM implementation.

procedure Resync;

Description

Resync forces the document to reread the values of its child nodes and attribute nodes, discarding any changes that have not been propagated to the underlying DOM implementation.


IXMLDocument.SaveToFile
 VCL Reference

IXMLDocument.SaveToFile

IXMLDocument	See also

Saves the XML document to disk.

procedure SaveToFile(AFileName: DOMString); virtual;

Description

Call SaveToFile to save any modifications you have made to the parsed XML document.

AFileName is the name of the file to save.

Tip:	To save the modifications back to the file from which the document was originally read, use the value of the FileName property for the AFileName parameter.


IXMLDocument.SaveToStream
 VCL Reference

IXMLDocument.SaveToStream

IXMLDocument	See also

Saves the XML document to a stream.

procedure SaveToStream(const Stream: TStream);

Description

Call SaveToStream to save the contents of the XML document to the stream specified by Stream. Regardless of the encoding system of the original XML document, SaveToStream always saves the stream in UTF-16.


IXMLDocument.SaveToXML
 VCL Reference

IXMLDocument.SaveToXML

IXMLDocument	See also

Saves the XML document to a string-type variable.

procedure SaveToXML(var XML: string); overload;

procedure SaveToXML(var XML: DomString); overload;

Description

Call SaveToXML to save the contents of the XML document to the string-type variable specified by XML. SaveToXML writes the contents of XML document using UTF-8 or UTF-16 as an encoding system, depending on the type of the XML parameter.

Unlike the XML property, which lets you write individual lines from the XML document, SaveToXML writes the entire text of the XML document.


IXMLDocument.SetActive
 VCL Reference

IXMLDocument.SetActive

IXMLDocument	See also

Sets the value of the Active property.

procedure SetActive(const Value: Boolean);

Description

SetActive is the write implementation of the Active property.

Value is the new value to set.


IXMLDocument.SetDocumentElement
 VCL Reference

IXMLDocument.SetDocumentElement

IXMLDocument	See also

Sets the value of the DocumentElement property.

procedure SetDocumentElement(const Value: IXMLNode);

Description

SetDocumentElement is the write implementation of the DocumentElement property.

Value is the interface for the node tree that replaces the current document element.


IXMLDocument.SetDOMDocument
 VCL Reference

IXMLDocument.SetDOMDocument

IXMLDocument	See also

Sets the value of the DOMDocument property.

procedure SetDOMDocument(const Value: IDOMDocument);

Description

SetDOMDocument is the write implementation of the DOMDocument property.

Value is the DOM interface for the document to assign.


IXMLDocument.SetEncoding
 VCL Reference

IXMLDocument.SetEncoding

IXMLDocument	See also

Sets the value of the Encoding property.

procedure SetEncoding(const Value: DOMString);

Description

SetEncoding is the write implementation of the Encoding property.

Value is the value of the encoding attribute of the document type node.


IXMLDocument.SetFileName
 VCL Reference

IXMLDocument.SetFileName

IXMLDocument	See also

Sets the value of the FileName property.

procedure SetFileName(const Value: DOMString);

Description

SetFileName is the write implementation of the FileName property.

Value is the name of an XML document or, if the vendor supports it, an URL for the XML document.


IXMLDocument.SetNodeIndentStr
 VCL Reference

IXMLDocument.SetNodeIndentStr

IXMLDocument	See also

Sets the value of the NodeIndentStr property.

procedure SetNodeIndentStr(const Value: DOMString);

Description

SetNodeIndentStr is the write implementation of the NodeIndentStr property.

Value is the string that is inserted before nested nodes to indicate a level of nesting.


IXMLDocument.SetOnAsyncLoad
 VCL Reference

IXMLDocument.SetOnAsyncLoad

IXMLDocument	See also

Supplies an event handler that responds when the AsyncLoadState property changes.

procedure SetOnAsyncLoad(const Value: TAsyncEventHandler);

Description

Use SetOnAsyncLoad to supply a callback that responds when the asynchronous parsing of an XML document progresses to a certain point.

Value is a method that is called when the AsyncLoadState property changes to reflect a new stage in the parsing process.


IXMLDocument.SetOptions
 VCL Reference

IXMLDocument.SetOptions

IXMLDocument	See also

Sets the value of the Options property.

procedure SetOptions(const Value: TXMLDocOptions);

Description

GetOptions is the write implementation of the Options property.

Value is the set of options to assign.


IXMLDocument.SetParseOptions
 VCL Reference

IXMLDocument.SetParseOptions

IXMLDocument	See also

Sets the value of the ParseOptions property.

procedure SetParseOptions(const Value: TParseOptions);

Description

GetParseOptions is the write implementation of the ParseOptions property.

Value is the set of parser options to assign.


IXMLDocument.SetStandAlone
 VCL Reference

IXMLDocument.SetStandAlone

IXMLDocument	See also

Sets the value of the StandAlone property.

procedure SetStandAlone(const Value: DOMString);

Description

SetStandAlone is the write implementation of the StandAlone property.

Value is the value of the standalone attribute of the document type node.


IXMLDocument.SetVersion
 VCL Reference

IXMLDocument.SetVersion

IXMLDocument	See also

Sets the value of the Version property.

procedure SetVersion(const Value: DOMString);

Description

SetVersion is the write implementation of the Version property.

Value is the value of the version attribute of the document type node.


IXMLDocument.SetXML
 VCL Reference

IXMLDocument.SetXML

IXMLDocument	See also

Sets the value of the XML property.

procedure SetXML(const Value: TStrings);

Description

SetXML is the write implementation of the XML property.

Value contains the raw (unparsed) XML to assign.


Hierarchy

IInterface

IXMLDocument


IXMLNodeCollection
 VCL Reference

IXMLNodeCollection

Hierarchy	Properties	Methods	See also

IXMLNodeCollection is the interface for a set of child nodes that are all the same type.

Unit

XMLIntf

Description

Use IXMLNodeCollection to work with repeating elements in an XML document. The XML Data Binding wizard generates descendants of IXMLNodeCollection interface to represent sets of child nodes that are all of a particular type.

IXMLNodeCollection is a descendant of IXMLNode. As such, it provides generic support for working with a node in an XML document. In addition, IXMLNodeCollection introduces properties and methods that manage a set of child nodes that are all the same type of node (that all have the same tag names or that are defined as the same type in an XML schema).


 VCL Reference

IXMLNodeCollection properties

IXMLNodeCollection	Alphabetically 	Legend

In IXMLNodeCollection

Count

Nodes

Derived from IXMLNode

AttributeNodes

Attributes

ChildNodes

ChildValues

DOMNode

HasChildNodes

IsTextElement

LocalName

NamespaceURI

NodeName

NodeType

NodeValue

OwnerDocument

ParentNode

Prefix

Text


 VCL Reference

IXMLNodeCollection properties

IXMLNodeCollection	By object 	Legend

AttributeNodes

Attributes

ChildNodes

ChildValues

Count

DOMNode

HasChildNodes

IsTextElement

LocalName

NamespaceURI

NodeName

Nodes

NodeType

NodeValue

OwnerDocument

ParentNode

Prefix

Text


IXMLNodeCollection.Count
 VCL Reference

IXMLNodeCollection.Count

IXMLNodeCollection 	See also

Indicates the number of repeating child nodes.

property Count: Integer;

Description

Read Count to obtain the number of repeating children of this node. Use Count to obtain an upper limit when addressing child nodes by index (for example, when iterating over all nodes in the Nodes property list).

Count is changed when you add child nodes using the AddChild method or delete them using the Delete or Remove method. You can access the individual repeating child nodes using the Nodes property.


IXMLNodeCollection.Nodes
 VCL Reference

IXMLNodeCollection.Nodes

IXMLNodeCollection	See also

Lists the interfaces of the repeating child nodes.

property Nodes[Index: Integer]: IXMLNode; default;

Description

Use Nodes to access nodes from the set of repeating child nodes. The value of Nodes is the IXMLNode interface that represents a specified child node.

Index identifies which repetition of the child node is desired, where 0 is the first repetition, 1 is the second repetition, and so on.

Note:	The XML Data Binding wizard generates a nearly identical property in IXMLNodeCollection descendants called Items. Items differs from Nodes in that the value is an IXMLNode descendant specific to the type of the repeating element, rather than the generic IXMLNode interface.

ChildNodes is the default property for IXMLNodeCollection. That means that you can omit the property name when using this property. In IXMLNodeCollection descendants that are generated by the XML Data Binding wizard, the Items property is the default property instead.

Note:	As a descendant of IXMLNode, IXMLNodeCollection also inherits the ChildNodes property, which lists all the child nodes for this node. Nodes differs from ChildNodes in that it contains only those child nodes that are in the repeating collection.


 VCL Reference

IXMLNodeCollection methods

IXMLNodeCollection	Alphabetically	Legend

In IXMLNodeCollection

Clear

Delete

GetCount

GetNode

Remove

Derived from IXMLNode

AddChild

CloneNode

GetAttribute

GetAttributeNodes

GetChildNodes

GetChildValue

GetDOMNode

GetHasChildNodes

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNodeName

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetText

HasAttribute

NextSibling

PreviousSibling

Resync

SetAttribute

SetChildValue

SetNodeValue

SetText

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IXMLNodeCollection methods

IXMLNodeCollection	By object	Legend

_AddRef

_Release

AddChild

Clear

CloneNode

Delete

GetAttribute

GetAttributeNodes

GetChildNodes

GetChildValue

GetCount

GetDOMNode

GetHasChildNodes

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNode

GetNodeName

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetText

HasAttribute

NextSibling

PreviousSibling

QueryInterface

Remove

Resync

SetAttribute

SetChildValue

SetNodeValue

SetText


IXMLNodeCollection.Clear
 VCL Reference

IXMLNodeCollection.Clear

IXMLNodeCollection	See also

Removes all child nodes in the Nodes property from the ChildList and Nodes properties.

procedure Clear;

Description

Clear deletes every child node from the collection (all the nodes in the Nodes property), along with the corresponding nodes in the ChildNodes property.


IXMLNodeCollection.Delete
 VCL Reference

IXMLNodeCollection.Delete

IXMLNodeCollection	See also

Removes one of the repeating child nodes from this node.

procedure Delete(Index: Integer);

Description

Delete removes a specified child node from this node.

Index identifies the child to remove. It is the index of the child in the Nodes property list of repeating child nodes. The index 0 represents the first repetition, 1 represents the second repetition, and so on.


IXMLNodeCollection.GetCount
 VCL Reference

IXMLNodeCollection.GetCount

IXMLNodeCollection	See also

Returns the value of the Count property.

function GetCount: Integer;

Description

GetCount is the read implementation of the Count property.


IXMLNodeCollection.GetNode
 VCL Reference

IXMLNodeCollection.GetNode

IXMLNodeCollection	See also

Returns the interface for one of the repeating child nodes.

function GetNode(Index: Integer): IXMLNode;

Description

GetNode is the read implementation of the Nodes property.

Index identifies which repetition of the child node is desired, where 0 is the first repetition, 1 is the second repetition, and so on.


IXMLNodeCollection.Remove
 VCL Reference

IXMLNodeCollection.Remove

IXMLNodeCollection	See also

Removes one of the repeating child nodes from this node.

function Remove(const Node: IXMLNode): Integer;

Description

Remove removes a specified child node from the collection of repeating child nodes. It removes the node from both the collection, and from the ChildNodes property, which lists all children of this node.

Node is the interface of the child to remove. It must represent on of the repeating child nodes.

To remove a child that is not one of the repeating child nodes, use the ChildNodes property instead.


Hierarchy

IInterface

IXMLNode

IXMLNodeCollection


IXMLNodeList
 VCL Reference

IXMLNodeList

Hierarchy	Properties	Methods	See also

IXMLNodeList represents a set of nodes in an XML document.

Unit

XMLIntf

Description

Use IXMLNodeList to work with a set of related nodes in an XML document. IXMLNodeList can be used to add or delete nodes from the set, or to access specific nodes.


 VCL Reference

IXMLNodeList properties

IXMLNodeList	Alphabetically 	Legend

In IXMLNodeList

Count

Nodes

UpdateCount


 VCL Reference

IXMLNodeList properties

IXMLNodeList	By object 	Legend

Count

Nodes

UpdateCount


IXMLNodeList.Count
 VCL Reference

IXMLNodeList.Count

IXMLNodeList 	See also

Indicates the number of nodes in the list.

property Count: Integer;

Description

Read Count to determine the number of nodes in the list. Count provides an upper limit to the indexes that can be used with the Nodes property.

To change the value of Count, add nodes using the Add or Insert method, or remove them using the Delete or Remove method.


IXMLNodeList.Nodes
 VCL Reference

IXMLNodeList.Nodes

IXMLNodeList 	See also

Provides access to the nodes in the list.

property Nodes[const IndexOrName: OleVariant]: IXMLNode; default;

Description

Read Nodes to access a specified node in the list.

IndexOrName identifies the desired node. It can be

The index of the node, where 0 is the index of the first node, 1 is the index of the second node, and so on. The Count property provides an upper bound on the indexes you can specify.

The LocalName property of a node in the list.

If IndexOrName does not identify a node in the list, and if the document that contains this node list’s parent includes doNodeAutoCreate in its Options property, then the node list tries to create a new node with the name specified by IndexOrName. If the node list can’t create the new node, it raises an exception.


IXMLNodeList.UpdateCount
 VCL Reference

IXMLNodeList.UpdateCount

IXMLNodeList 	See also

Indicates the number of times an application has called BeginUpdate without a matching call to EndUpdate.

property UpdateCount: Integer;

Description

UpdateCount keeps track of whether all update operations have been completed. When an application starts making changes to the list, it calls BeginUpdate, which increments UpdateCount. When those changes are complete, it calls EndUpdate, which decrements UpdateCount. Thus, UpdateCount allows calls to BeginUpdate and EndUpdate to be nested.

Applications can avoid responding to updates in a piecemeal fashion by checking UpdateCount and only responding when it is 0.


 VCL Reference

IXMLNodeList methods

IXMLNodeList	Alphabetically	Legend

In IXMLNodeList

Add

BeginUpdate

Clear

Delete

EndUpdate

FindNode

FindSibling

First

GetCount

GetNode

GetUpdateCount

IndexOf

Insert

Last

Remove

ReplaceNode

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IXMLNodeList methods

IXMLNodeList	By object	Legend

_AddRef

_Release

Add

BeginUpdate

Clear

Delete

EndUpdate

FindNode

FindSibling

First

GetCount

GetNode

GetUpdateCount

IndexOf

Insert

Last

QueryInterface

Remove

ReplaceNode


IXMLNodeList.Add
 VCL Reference

IXMLNodeList.Add

IXMLNodeList	See also

Adds a new node to the end of the list.

function Add(const Node: IXMLNode): Integer;

Description

Call Add to add a node to the end of the list. Add returns the index of the node once it is added, where 0 is the index of the first node in the list, 1 is the index of the second node, and so on.

Node is the node to add to the list.


IXMLNodeList.BeginUpdate
 VCL Reference

IXMLNodeList.BeginUpdate

IXMLNodeList	See also

Increments the value of UpdateCount.

procedure BeginUpdate;

Description

Call BeginUpdate before making several changes to the nodes in the list (such as adding or removing several nodes). BeginUpdate increments the UpdateCount property, to keep track of the fact that the list is in the middle of an update. When the update is complete, call EndUpdate to decrement the UpdateCount property.

Every call to BeginUpdate should be matched by a call to EndUpdate, so that the UpdateCount property accurately reflects whether an update operation is underway.


IXMLNodeList.Clear
 VCL Reference

IXMLNodeList.Clear

IXMLNodeList	See also

Removes all nodes from the list.

procedure Clear;

Description

Call Clear to empty the list.

Note:	Clear does not call the BeginUpdate and EndUpdate methods, even though it may result in the deletion of more than one node.


IXMLNodeList.Delete
 VCL Reference

IXMLNodeList.Delete

IXMLNodeList	See also

Removes a specified node from the list.

function Delete(const Name: DOMString): Integer; overload;

function Delete(const Name, NamespaceURI: DOMString): Integer; overload;

function Delete(const Index: Integer): Integer; overload;

Description

Delete removes the node specified by the Index or Name parameter.

Name identifies the node to remove from the list. This is the local name of the node to remove.

NamespaceURI identifies the namespace to use when interpreting Name (if necessary).

Index identifies the node to remove by index rather than name. Index ranges from 0 to one less than the value of the Count property.

Delete returns the index of the node that was removed. If there was no node that matched the value of Index or Name, Delete returns –1.


IXMLNodeList.EndUpdate
 VCL Reference

IXMLNodeList.EndUpdate

IXMLNodeList	See also

Decrements the value of UpdateCount.

procedure BeginUpdate;

Description

Call EndUpdate after making several changes to the nodes in the list (such as adding or removing several nodes). EndUpdate decrements the UpdateCount property, which was incremented by a previous call to BeginUpdate.

Every call to BeginUpdate should be matched by a call to EndUpdate, so that the UpdateCount property accurately reflects whether an update operation is underway.


IXMLNodeList.FindNode
 VCL Reference

IXMLNodeList.FindNode

IXMLNodeList	See also

Returns a specified node from the list.

function FindNode(NodeName: DOMString): IXMLNode; overload;

function FindNode(NodeName, NamespaceURI: DOMString): IXMLNode; overload;

function FindNode(ChildNodeType TGuid): IXMLNode; overload;

Description

Call FindNode to access a particular node in the list.

NodeName is the node to access. It specifies the LocalName property of the desired node.

NamespaceURI identifies the namespace that qualifies NodeName. It is the same as the NamespaceURI property of the desired node.

ChildNodeType identifies the node to access by its interface type (GUID), rather than by name.

FindNode returns the interface for the node if it is in the list. If NodeName or ChildNodeType does not specify a node in the list, FindNode returns nil.


IXMLNodeList.FindSibling
 VCL Reference

IXMLNodeList.FindSibling

IXMLNodeList	See also

Returns a node that appears a specified amount before or after another node.

function FindSibling(const Node: IXMLNode; Delta: Integer): IXMLNode;

Description

Call FindSibling to access the node whose position has a specified relationship to another node.

Node is a node in the list to use as a reference point.

Delta indicates where the desired node appears, relative to Node. If Delta is positive, FindSibling returns the node that appears Delta positions after Node. If Delta is negative, FindSibling returns a node that appears before Node.

FindSibling returns the node that appears at the position offset by Delta, relative to the position of Node. If Delta specifies a position before the first node or after the last node in the list, FindSibling returns nil.


IXMLNodeList.First
 VCL Reference

IXMLNodeList.First

IXMLNodeList	See also

Returns the first node in the list.

function First: IXMLNode;

Description

Call First to access the first node in the list. If the list is empty, First raises an exception.


IXMLNodeList.Get
 VCL Reference

IXMLNodeList.Get

IXMLNodeList	See also

Returns a specified node in the list.

function Get(Index: Integer): IXMLNode;

Description

Call Get to retrieve a node from the list, given its index.

Index specifies the node to fetch, where 0 identifies the first node, 1 identifies the second node, and so on. Index should be less than the value of the Count property.


IXMLNodeList.GetCount
 VCL Reference

IXMLNodeList.GetCount

IXMLNodeList	See also

Returns the number of nodes in the list.

function GetCount: Integer;

Description

GetCount is the read implementation of the Count property.


IXMLNodeList.GetNode
 VCL Reference

IXMLNodeList.GetNode

IXMLNodeList	See also

Returns a specified node from the list.

function GetNode(const IndexOrName: OleVariant): IXMLNode;

Description

GetNode is the read implementation of the Nodes property.

IndexOrName identifies the desired node. It can be

The index of the node, where 0 is the index of the first node, 1 is the index of the second node, and so on.

The LocalName property of a node in the list.

If IndexOrName does not identify a node in the list, GetNode tries to create a new node with the name specified by IndexOrName. If it can’t create the new node, GetNode raises an exception.


IXMLNodeList.GetUpdateCount
 VCL Reference

IXMLNodeList.GetUpdateCount

IXMLNodeList	See also

Returns the value of the UpdateCount property.

function GetUpdateCount: Integer;

Description

GetUpdateCount is the read implementation of the UpdateCount property.


IXMLNodeList.IndexOf
 VCL Reference

IXMLNodeList.IndexOf

IXMLNodeList	See also

Returns the index of a specified node.

function IndexOf(const Name: DomString): Integer; overload;

function IndexOf(const Name, NamespaceURI: DomString): Integer; overload;

function IndexOf(const Node: IXMLNode): Integer; overload;

Description

Call IndexOf to locate a node in the list. You can specify which node to locate using its name or its interface.

Name is the LocalName property of the node to locate.

NamespaceURI identifies the namespace to use when interpreting LocalName (if necessary).

Node is the interface of the node to locate.

IndexOf returns the index of the specified node, where 0 is the index of the first node, 1 is the index of the second node, and so on. If the specified node is not in the list, IndexOf returns -1.


IXMLNodeList.Insert
 VCL Reference

IXMLNodeList.Insert

IXMLNodeList	See also

Inserts a new node into a specified position in the list.

procedure Insert(Index: Integer; const Node: IXMLNode);

Description

Call Insert to add a node at the position specified by Index.

Index specifies where to insert the node, where 0 is the first position, 1 is second position, and so on. If Index does not specify a valid index, Insert raises an exception.

Node is the node to add to the list.


IXMLNodeList.Last
 VCL Reference

IXMLNodeList.Last

IXMLNodeList	See also

Returns the last node in the list.

function Last: IXMLNode;

Description

Call Last to access the last node in the list. If the list is empty, Last raises an exception.


IXMLNodeList.Remove
 VCL Reference

IXMLNodeList.Remove

IXMLNodeList	See also

Removes a specified node from the list.

function Remove(const Node: IXMLNode): Integer;

Description

Remove removes the specified node from the list.

Node is the node to remove from the list.

Remove returns the index of Node before it was removed. If node is not a node in the list, Remove returns -1.


IXMLNodeList.ReplaceNode
 VCL Reference

IXMLNodeList.ReplaceNode

IXMLNodeList	See also

Replaces a specified node in the list with another node.

function ReplaceNode(const OldNode, NewNode: IXMLNode): IXMLNode;

Description

Call ReplaceNode to replace the node specified by OldNode with the node specified by NewNode.

OldNode is the node to replace. If OldNode does not appear in the list, then ReplaceNode adds the new node to the end of the list.

NewNode is the node to add to the list in place of OldNode.

ReplaceNode returns OldNode (even if OldNode did not appear in the list).


Hierarchy

IInterface

IXMLNodeList


TLastButton
 VCL Reference

TLastButton

Hierarchy	Properties	Methods	See also

TLastButton generates an HTML control that moves to the last record in an XML data packet.

Unit

MidItems

Description

Add TLastButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to move quickly to the last record in a dataset. The resulting HTML button’s action changes the associated display control so that it shows the last record as current.

Use the properties of TLastButton to customize the appearance of the button and associate it with a Web item. The associated Web item displays the records that the last button navigates.


 VCL Reference

TLastButton properties

TLastButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TLastButton properties

TLastButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TLastButton methods

TLastButton	Alphabetically	Legend

In TLastButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLastButton methods

TLastButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TLastButton.Create
 VCL Reference

TLastButton.Create

TLastButton	See also

Creates and initializes an instance of TLastButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TLastButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TLastButton


TLayoutAttributes
 VCL Reference

TLayoutAttributes

Hierarchy	Methods	See also

TLayoutAttributes describes how an HTML control should be laid out.

Unit

WebComp

Description

TLayoutAttributes embodies a set of flags that describe how an HTML control should be laid out. These flags form the value of several public fields of the object, including

LabelAttributes: a string that describes style attributes that apply to the control’s label (if any).

LabelPosition: an enumerated value describing the the position of the label (if any) relative to the control. Possible values are lposLeft (to the left of the control), lposRight (to the right of the control), lposAbove (above the control) and lposBelow (below the control).

ControlAttributes: a string that describes style attributes that apply to the control.


 VCL Reference

TLayoutAttributes methods

TLayoutAttributes	Alphabetically	Legend

In TLayoutAttributes

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TLayoutAttributes methods

TLayoutAttributes	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TLayoutAttributes.Create
 VCL Reference

TLayoutAttributes.Create

TLayoutAttributes

Creates a new TLayoutAttributes object.

constructor Create;

Description

Typically, applications do not instantiate TLayoutAttributes. Instead, each Web item that generates HTML for an InternetExpress application instantiates an internal TLayoutAttributes object and uses it to encode property values that affect the layout of its generated HTML.


Hierarchy

TObject

TLayoutAttributes


TLayoutGroup
 VCL Reference

TLayoutGroup

Hierarchy	Properties	Methods	See also

TLayoutGroup generates the HTML to arrange content produced by other Web items.

Unit

MidItems

Description

Use TLayoutGroup to adjust the layout of items in an HTML document. There are few restrictions on what Web items can use a layout group because it has no special content that it displays. It merely imposes a layout on content generated by other Web items.

TLayoutGroup maintains a list of Web items that display information in the final HTML document, but imposes no restrictions of its own on the possible types of Web items. Instead, it restricts those Web items to the classes that its parent allows. In order to let the parent component use the HTML that TLayoutGroup generates, TLayoutGroup inherits the IWebContent interface from TWebControlGroup.


 VCL Reference

TLayoutGroup properties

TLayoutGroup	Alphabetically	Legend

Derived from TCustomLayoutGroup

Custom

DisplayColumns

Style

StyleRule

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TLayoutGroup properties

TLayoutGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayColumns

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls


 VCL Reference

TLayoutGroup methods

TLayoutGroup	Alphabetically	Legend

Derived from TCustomLayoutGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLayoutGroup methods

TLayoutGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TCustomLayoutGroup

TLayoutGroup


ELowCapacityError
 VCL Reference

ELowCapacityError

Hierarchy	Properties	Methods	See also

ELowCapacityError is the exception class for when an attempt is made to allocate more memory than is available for the decision cube.

Unit

mxarrays

Description

ELowCapacityError is raised when the cache of a decision cube is too big. The memory available to the decision cube can be increased by changing the Capacity property of the decision cube or the memory demands of the decision cube can be reduced by deactivating some of the cube dimensions.


 VCL Reference

ELowCapacityError properties

ELowCapacityError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ELowCapacityError properties

ELowCapacityError	By object	Legend

HelpContext

Message


 VCL Reference

ELowCapacityError methods

ELowCapacityError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ELowCapacityError methods

ELowCapacityError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ELowCapacityError


TMidasPageProducer
 VCL Reference

TMidasPageProducer

Hierarchy	Properties	Methods	Events	Using TMidasPageProducer	See also

TMidasPageProducer assembles an HTML document that represents live database information from an application server.

Unit

MidProd

Description

Do not use TMidasPageProducer. It is included only for backward compatibility. To add a page producer that assembles Web pages in an InternetExpress application, use TInetXPageProducer instead.


 VCL Reference

TMidasPageProducer properties

TMidasPageProducer	Alphabetically	Legend

Derived from TCustomInetXPageProducer

HTMLDoc

HTMLFile

Derived from TBaseInetXPageProducer

EnableXMLIslands

IncludePathURL

Styles

StylesFile

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMidasPageProducer properties

TMidasPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

EnableXMLIslands

HTMLDoc

HTMLFile

IncludePathURL

Name

Owner

ScriptEngine

StripParamQuotes

Styles

StylesFile

Tag

VCLComObject

WebModuleContext


 VCL Reference

TMidasPageProducer events

TMidasPageProducer	Alphabetically	Legend

Derived from TBaseInetXPageProducer

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TMidasPageProducer events

TMidasPageProducer	By object	Legend

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

OnHTMLTag


 VCL Reference

TMidasPageProducer methods

TMidasPageProducer	Alphabetically	Legend

In TCustomInetXPageProducer

Content

Create

Destroy

In TBaseInetXPageProducer

ContentFromStream

FindXMLBroker

FindXMLBrokerName

GetRequiredTags

GetXMLData

SetIncludePathURL

SetStyles

SetStylesFile

Derived from TBasePageProducer

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMidasPageProducer methods

TMidasPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindXMLBroker

FindXMLBrokerName

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetRequiredTags

GetXMLData

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetIncludePathURL

SetStyles

SetStylesFile

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer

TBaseInetXPageProducer

TCustomInetXPageProducer

TInetXPageProducer

TMidasPageProducer


TMtsAutoObject
 VCL Reference

TMtsAutoObject

Hierarchy	Properties	Methods	Using TMtsAutoObject	See also

TMtsAutoObject encapsulates the objects and interfaces of the MTS application server.

Unit

Mtsobj

Description

Use a TMtsAutoObject object as the central repository for all objects in an MTS-enabled application server.

MTS Automation objects are dual-interface Automation servers that implement the IObjectControl interface. MTS Automation objects are like any Automation server with additional features that encapsulate MTS services such as transaction support and security.

To create a TMtsAutomation object at design time, choose File|New, ActiveX tab, and select the MTS Automation wizard. The MTS Automation wizard then creates a new descendant that descends from TMtsAutoObject.


 VCL Reference

TMtsAutoObject properties

TMtsAutoObject	Alphabetically	Legend

In TMtsAutoObject

Pooled

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TMtsAutoObject properties

TMtsAutoObject	By object	Legend

Controller

Factory

Pooled

RefCount

ServerExceptionHandler


TMtsAutoObject.Pooled
 VCL Reference

TMtsAutoObject.Pooled

TMtsAutoObject	See also

Indicates whether the object can be pooled when installed under COM+.

property Pooled: Boolean;

Description

Set Pooled to indicate whether instances of the MTS Automation object can be pooled when installed under COM+. The MTS Automation object uses the Pooled property when implementing the IObjectControl method CanBePooled. This instructs COM+ that the object can be moved to an object pool when deactivated, so that the single instance is shared by all clients.

Warning:	Do not set Pooled to True unless the MTS Automation object is stateless.


 VCL Reference

TMtsAutoObject methods

TMtsAutoObject	Alphabetically	Legend

In TMtsAutoObject

DisableCommit

EnableCommit

IsCallerInRole

IsInTransaction

IsSecurityEnabled

SetAbort

SetComplete

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

Initialize

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMtsAutoObject methods

TMtsAutoObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

DisableCommit

Dispatch

EnableCommit

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

IsCallerInRole

IsInTransaction

IsSecurityEnabled

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

SetAbort

SetComplete


TMtsAutoObject.DisableCommit
 VCL Reference

TMtsAutoObject.DisableCommit

TMtsAutoObject	See also

Prevents clients from completing transactions.

procedure DisableCommit;

Description

Call DisableCommit to indicate that the MTS Automation object cannot complete its current transaction or release state information until it receives further method invocations from the client. After calling DisableCommit, the current transaction (if any) cannot be completed until the MTS Automation object calls EnableCommit or SetComplete.

With transactions that are started automatically when the MTS Automation object’s interface is called, DisableCommit is not necessary. These transactions are not committed until the MTS Automation object calls SetComplete. However, when the MTS Automation object is enlisted in a transaction that was started previously, the client controls the transaction and can attempt to commit it before the MTS Automation object has completed its part. Calling DisableCommit prevents the client from prematurely committing a transaction. If a client tries to commit a transaction after the MTS Automation object has called DisableCommit, the transaction aborts.

Tip: 	Call DisableCommit at the beginning of a method to protect your MTS Automation object from committing prematurely in the event of an unexpected return. If the method call finishes normally, calling EnableCommit or SetComplete reverses this affect and allows the transaction to complete.


TMtsAutoObject.EnableCommit
 VCL Reference

TMtsAutoObject.EnableCommit

TMtsAutoObject	See also

Allows clients to complete transactions without releasing state information.

procedure EnableCommit;

Description

Call EnableCommit to indicate that the MTS Automation object can complete its current transaction without releasing state information. Unlike the SetComplete method (which also signals that the current transaction can be committed), EnableCommit does not allow MTS to deactivate the MTS Automation object. This lets the MTS Automation object preserve state information over multiple interface calls, while still allowing clients that have enlisted the object in a transaction to commit.

By default, transactions can be completed when an interface call ends, unless the DisableCommit method is called. There is no need to call EnableCommit unless the MTS Automation object has previously called DisableCommit.

Note:	Although EnableCommit permits the current transaction to be completed, it does not automatically commit the transaction. The client that enlisted the MTS Automation object must still explicitly commit that transaction. If MTS started the transaction automatically (because the MTS Automation object requires a transaction for its interface calls), the transaction is not committed until the data module calls SetComplete.


TMtsAutoObject.IsCallerInRole
 VCL Reference

TMtsAutoObject.IsCallerInRole

TMtsAutoObject

Indicates whether the current client matches a particular security role.

function IsCallerInRole(const Role: WideString): Bool;

Description

MTS provides role-based security. Each level of access to your application server can be assigned a role. Using the MTS Explorer, administrators can prevent clients from using an interface based on their role. (This is called declarative security.) In addition, however, programs can provide more fine-grained security programmatically. To do this, use IsCallerInRole to provide access to blocks of code based on the caller’s security role.

IsCallerInRole checks whether the current client is part of the role named by the Role parameter. It returns True if the client matches the named role, and False otherwise. Use IsCallerInRole to prevent clients from invoking certain blocks of code if they do not have the appropriate security role.

Note:	MTS security is not available on servers running Windows95. If the MTS application is running on Windows95, IsCallerInRole always returns True . In addition, IsCallerInRole always returns True if the application is part of an MTS Library package (which runs in the client’s process space).


TMtsAutoObject.IsInTransaction
 VCL Reference

TMtsAutoObject.IsInTransaction

TMtsAutoObject	See also

Indicates whether the MTS Automation object is running in a transaction.

function IsInTransaction: Bool;

Description

Call IsInTransaction to determine whether the MTS Automation object is currently running in a transaction. For example, if the MTS Automation object requires a transaction, use IsInTransaction to check that this requirement has not been turned off by an administrator using the MTS Explorer, and to raise an exception if it has.

Note:	If IsInTransaction returns False, the EnableCommit and DisableCommit methods have no effect.


TMtsAutoObject.IsSecurityEnabled
 VCL Reference

TMtsAutoObject.IsSecurityEnabled

TMtsAutoObject

Indicates whether security is enabled for the current MTS Automation object instance.

function IsSecurityEnabled: Bool;

Description

Call IsSecurityEnabled to determine whether the MTS Automation object is currently protected by MTS security services. MTS security is enabled unless the object is running in the client’s process. This can happen if the MTS Automation object is configured to run in the client’s process space by an administrator using the MTS Explorer, or if the client application is in the same MTS package as the MTS Automation object.

Note:	MTS security is not available for servers running on Windows95.


TMtsAutoObject.SetAbort
 VCL Reference

TMtsAutoObject.SetAbort

TMtsAutoObject

Allows the MTS Automation object to be deactivated and aborts any current transactions.

procedure SetAbort;

Description

Call SetAbort to indicate that any current transaction that includes the MTS Automation object to abort. If MTS started a transaction automatically, the transaction aborts when the current method call exits. If the MTS Automation object was enlisted in a pre-existing transaction, the client transaction will eventually fail. Usually, SetAbort is called in the except block of a try...except statement.

In addition to aborting any current transaction, SetAbort indicates that the MTS Automation object can be deactivated when the current interface call exits. This means that state information is not preserved for the next time and the client calls the Automation object’s interface. To prevent transactions from committing successfully without losing state information, use the DisableCommit method instead.

Tip: 	Call SetAbort at the beginning of a method to protect your MTS data module from committing prematurely in the event of an unexpected return. If the method call finishes normally, calling SetComplete reverses this affect and allows the transaction to complete.


TMtsAutoObject.SetComplete
 VCL Reference

TMtsAutoObject.SetComplete

TMtsAutoObject	See also

Indicates that the MTS Automation object has successfully completed its current task.

procedure SetComplete;

Description

Call SetComplete to indicate that the MTS Automation object no longer needs to maintain state information. After calling SetComplete, the MTS Automation object is deactivated when the current method call exits.

If the MTS Automation object is part of a transaction, SetComplete indicates that this part of the transaction can commit. If MTS started the transaction automatically when the client called the MTS Automation object’s methods, MTS tries to commit the transaction when the current method exits.

Note:	This transaction may still fail if the current transaction included another MTS object that called SetAbort or DisableCommit.


Hierarchy

TObject

TComObject

TTypedComObject

TAutoObject

TMtsAutoObject


TMtsDataModule
 VCL Reference

TMtsDataModule

Hierarchy	Properties	Methods	Events	Using TMTSDataModule	See also

TMtsDataModule encapsulates the objects and interfaces of an MTS application server.

Unit

MtsRdm

Description

Use a TMtsDataModule object as the central repository for all objects in an MTS-enabled application server. MTS data modules can contain any nonvisual components. . Typically these are data access components, such as datasets and the provider components that handle communication between these datasets and client applications. MTS data modules can also contain other nonvisual components, such as TTimer, or TImageList.

MTS data modules are dual-interface Automation servers that implement the IAppServer interface. Connection components on client applications are designed to look for this interface. The methods in this interface, however, do not call the SetComplete method, so the MTS data module is not transactional. You may want to expand the MTS data module’s interface to provide alternate versions of these methods that use the MTS data module’s transaction.

The default interaction between a client dataset and an MTS data module does not rely on state information, so it is safe to use the MTS data module with just-in-time activation. However, you may need to provide a mechanism for communicating persistent state information to take advantage of some features such as incremental fetches.

To create an MTS data module at design time, choose File|New, and select MTS Data Module from the multitier page of the new items dialog. The MTS Data Module Wizard then creates a new descendant of TMtsDataModule that supports an interface that descends from IAppServer.


 VCL Reference

TMtsDataModule properties

TMtsDataModule	Alphabetically	Legend

In TMtsDataModule

AutoComplete

Derived from TRemoteDataModule

ProviderCount

Providers

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMtsDataModule properties

TMtsDataModule	By object	Legend

AutoComplete

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

ProviderCount

Providers

Tag

VCLComObject


TMtsDataModule.AutoComplete
 VCL Reference

TMtsDataModule.AutoComplete

TMtsDataModule	See also

Specifies whether the IAppServer methods are transactional.

property AutoComplete: Boolean;

Description

AutoComplete controls whether calls made using the IAppServer interface end in a call to SetComplete or SetAbort. By calling SetComplete or SetAbort, the MTS data module indicates that no state information needs to be preserved when the call exits. This allows any MTS transactions to complete (or roll back) and allows the MTS proxy to deactivate the MTS data module.

When AutoComplete is True, all IAppServer methods call SetComplete when they are done with two exceptions:

AS_ApplyUpdates calls SetAbort if an exception is raised or if the error count exceeds the specified maximum.

AS_DataRequest doesn’t call either SetComplete or SetAbort. You must add the appropriate call to the OnDataRequest event handler.

Set AutoComplete to False if the MTS data module needs to preserve state information (such as the current record in a dataset) after an IAppServer call exits. When AutoComplete is False, you must add your own interface methods that call SetComplete or SetAbort when the MTS data module can be safely deactivated.


TMtsDataModule.Pooled
 VCL Reference

TMtsDataModule.Pooled

TMtsDataModule	See also

Indicates whether the data module can be pooled when installed under COM+.

property Pooled: Boolean;

Description

Set Pooled to indicate whether instances of the MTS data module can be pooled when installed under COM+. The MTS remote data module uses the Pooled property when implementing the IObjectControl method CanBePooled. This instructs COM+ that the object can be moved to an object pool when deactivated, so that the single instance is shared by all clients.

Warning:	Do not set Pooled to True unless the MTS data module is stateless.


 VCL Reference

TMtsDataModule events

TMtsDataModule	Alphabetically	Legend

In TMtsDataModule

OnActivate

OnDeactivate

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TMtsDataModule events

TMtsDataModule	By object	Legend

OnActivate

OnCreate

OnDeactivate

OnDestroy


TMtsDataModule.OnActivate
 VCL Reference

TMtsDataModule.OnActivate

TMtsDataModule	See also 	Example

Occurs when the MTS proxy activates an instance of TMtsDataModule.

property OnActivate: TNotifyEvent;

Description

Write an OnActivate event handler to take specific action when the MTS proxy activates the MTS data module. This is the point when any database connections should be established. Database connections must not opened before the MTS data module is activated.

Note:	In traditional MTS programming, objects acquire their context object when they are activated. However, TMtsDataModule handles this task automatically.


TMtsDataModule.OnDeactivate
 VCL Reference

TMtsDataModule.OnDeactivate

TMtsDataModule	See also 	Example

Occurs when the MTS proxy deactivates an instance of TMtsDataModule.

property OnDeactivate: TNotifyEvent;

Description

Write an OnDeactivate event handler to take specific action when the MTS proxy releases an instance of the MTS data module. Use this method to close any database connections that were opened when the MTS data module was activated. Database connections must not be left open after the MTS data module is deactivated.

Note:	In traditional MTS programming, objects release their context object when they are deactivated. However, TMtsDataModule handles this task automatically.


 VCL Reference

TMtsDataModule methods

TMtsDataModule	Alphabetically	Legend

In TMtsDataModule

Create

DisableCommit

EnableCommit

IsCallerInRole

IsInTransaction

IsSecurityEnabled

SetAbort

SetComplete

Derived from TRemoteDataModule

Destroy

Lock

RegisterProvider

Unlock

UnRegisterProvider

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMtsDataModule methods

TMtsDataModule	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableCommit

Dispatch

EnableCommit

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsCallerInRole

IsImplementorOf

IsInTransaction

IsSecurityEnabled

Lock

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterProvider

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAbort

SetComplete

SetSubComponent

Unlock

UnRegisterProvider

UpdateAction


TMtsDataModule.Create
 VCL Reference

TMtsDataModule.Create

TMtsDataModule	See also

Creates an MTS data module instance.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the constructor for TMtsDataModule.  Instead, add a remote data module to a server application using the MTS data module wizard on the multi-tier page of the new items dialog.

AOwner specifies the component that is responsible for freeing the remote data module (typically the application).


TMtsDataModule.DisableCommit
 VCL Reference

TMtsDataModule.DisableCommit

TBaseProvider	See also

Prevents clients from completing transactions.

procedure DisableCommit;

Description

Call DisableCommit to indicate that the MTS data module can't complete its current  transaction or release state information (properties) until it receives further method invocations from the client. After calling DisableCommit, the current transaction (if any) can’t be completed until the MTS data module calls EnableCommit or SetComplete.

With transactions that are started automatically when the MTS data module’s interface is called, DisableCommit is not necessary. These automatically generated transactions are not committed until the MTS data module calls SetComplete. However, when the MTS data module is enlisted in a transaction that was started previously, the client controls the transaction and can attempt to commit it before the MTS data module has completed its part. Calling DisableCommit prevents the client from prematurely committing a transaction. If a client tries to commit a transaction after the MTS data module has called DisableCommit, the transaction aborts.

Tip:	Call DisableCommit at the beginning of a method to protect your MTS data module from committing prematurely in the event of an unexpected return. If the method call finishes normally, calling EnableCommit or SetComplete reverses this affect and allows the transaction to complete.


TMtsDataModule.EnableCommit
 VCL Reference

TMtsDataModule.EnableCommit

TBaseProvider	See also

Allows clients to complete transactions without releasing state information.

procedure EnableCommit;

Description

Call EnableCommit to indicate that the MTS data module can complete its current transaction without releasing state information (properties). Unlike the SetComplete method (which also signals that the current transaction can be committed), EnableCommit does not allow MTS to deactivate the data module. This lets the MTS data module preserve state information over multiple interface calls, while still allowing clients that have enlisted the data module in a transaction to commit.

By default, transactions can be completed when interface calls finish, unless the DisableCommit method is called. There is no need to call EnableCommit unless the MTS data module has previously called DisableCommit.

Note:	Although EnableCommit permits the current transaction to be completed, it does not automatically commit the transaction. The client that enlisted the MTS data module in a transaction must still explicitly commit that transaction. If MTS started the transaction automatically (because the MTS data module requires a transaction for its interface calls), the transaction is not committed until the data module calls SetComplete.


TMtsDataModule.IsCallerInRole
 VCL Reference

TMtsDataModule.IsCallerInRole

TBaseProvider	See also

Indicates whether the current client fits into a particular security role.

function IsCallerInRole(const Role: WideString): Bool;

Description

MTS provides role-based security. Each level of access to the application server can be assigned a name, called a role. Using the MTS Explorer, administrators can prevent clients from using an interface based on their role. (This is called declarative security.) In addition, however, programs can provide more fine-grained security programmatically. To do this, use IsCallerInRole to provide access to blocks of code based on the caller’s security role.

IsCallerInRole checks whether the current client is part of the role named by the Role parameter. It returns True if the client fits the named role, and False otherwise. Use IsCallerInRole to prevent clients that do not have the appropriate security roles from invoking certain blocks of code.

Note:	MTS security is not available on servers running Windows95. If the application server is running on Windows95, IsCallerInRole always returns True. In addition, IsCallerInRole always returns True if the application server is part of an MTS Library package (which runs in the client’s process space).


TMtsDataModule.IsInTransaction
 VCL Reference

TMtsDataModule.IsInTransaction

TBaseProvider	See also

Indicates whether the MTS data module is running in a transaction.

function IsInTransaction: Bool;

Description

Call IsInTransaction to determine whether the MTS data module is currently running in a transaction. For example, if the MTS data module requires a transaction, use IsInTransaction to check that this requirement has not been turned off using the MTS Explorer, and to raise an exception if it has.

Note:	If IsInTransaction returns False, the EnableCommit and DisableCommit methods have no effect.


TMtsDataModule.IsSecurityEnabled
 VCL Reference

TMtsDataModule.IsSecurityEnabled

TBaseProvider	See also

Indicates whether security is enabled for the current MTS data module instance.

function IsSecurityEnabled: Bool;

Description

Call IsSecurityEnabled to determine whether the MTS data module is currently protected by MTS security services. MTS security is enabled unless the object is running in the client's process. This can happen if an administrator using the MTS Explorer configures the MTS data module to run in the client’s process space (an MTS Library package), or if the client application is in the same MTS package as the MTS data module.

Note:	MTS security is not available for servers running on Windows95.


TMtsDataModule.SetAbort
 VCL Reference

TMtsDataModule.SetAbort

TBaseProvider	See also 	Example

Allows the MTS data module to be deactivated and aborts any current transactions.

procedure SetAbort;

Description

Call SetAbort to indicate that any current transaction that includes the MTS data module should abort. If MTS started a transaction automatically (because the data module requires one), that transaction aborts when the current method call exits. If the MTS data module was enlisted in a pre-existing transaction, the client transaction will eventually fail. Usually, SetAbort is called in the except block of a try..except statement.

In addition to aborting any current transaction, SetAbort indicates that the MTS data module can be deactivated when the current interface call exits. This means that state information is not preserved for the next time the client calls the data module’s interface. To prevent transactions from committing successfully without losing state information, use the DisableCommit method instead.

Tip:	Call SetAbort at the beginning of a method to protect your MTS data module from committing prematurely in the event of an unexpected return. If the method call finishes normally, calling SetComplete reverses this affect and allows the transaction to complete.


TMtsDataModule.SetComplete
 VCL Reference

TMtsDataModule.SetComplete

TBaseProvider	See also 	Example

Indicates that the MTS data module has successfully completed its current task.

procedure SetComplete;

Description

Call SetComplete to indicate that the MTS data module no longer needs to maintain state information. After calling SetComplete, the MTS data module is deactivated when the current method call exits.

If the MTS data module is part of a transaction, SetComplete indicates that this part of the transaction can commit. If MTS started the transaction automatically when the client called the MTS data module’s method (because the MTS data module requires a transaction), MTS tries to commit the transaction when the current method exits.

Note:	This transaction may still fail if the current transaction included another MTS object that called SetAbort or DisableCommit.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TRemoteDataModule

TMtsDataModule


TMidasConnection
 VCL Reference

TMidasConnection

Hierarchy	Properties	Methods	Events	See also

TMidasConnection handles a server connection for the client of a multi-tiered application.

Unit

MidasCon

Description

TMidasConnection is provided for backward compatibility. When writing client applications that connect to application servers using DCOM, use TDCOMConnection instead. When writing client applications that connect to application servers using sockets, use TSocketConnection instead. When writing client applications that connect to application servers using HTTP, use TWebConnection instead.


 VCL Reference

TMidasConnection properties

TMidasConnection	Alphabetically	Legend

In TMidasConnection

ConnectType

ServerPort

UseBroker

Derived from TDCOMConnection

ComputerName

Derived from TCOMConnection

Connected

Derived from TDispatchConnection

Connected

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMidasConnection properties

TMidasConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ComputerName

Connected

ConnectType

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

ObjectBroker

Owner

ServerGUID

ServerName

ServerPort

Tag

UseBroker

VCLComObject


TMidasConnection.ConnectType
 VCL Reference

TMidasConnection.ConnectType

TMidasConnection	See also

Specifies the protocol to use to establish the connection to the application server.

type TConnectType = (ctDCOM, ctSockets, ctOLEnterprise);

property ConnectType: TConnectType;

Description

Use ConnectType to specify the desired protocol for connecting with the application server. ConnectType can be one of the following values:

Value	Meaning

ctDCOM	TMidasConnection uses DCOM to connect server. The ServerName property specifies the GUID of the application server and the ComputerName property specifies the name of the server machine. Note that DCOM can result in a lot of extra network traffic and that not all Windows95 machines support DCOM.

ctSockets	TMidasConnection uses windows sockets to connect to the application server. The ServerName property specifies the GUID of the remote data module on the application server, the ComputerName property specifies the host name or IP address of the server application, and the ServerPort property specifies the port used by Scktsrvr.exe or ScktSrvc.exe on the server. Note that applications using sockets must run Scktsrvr.exe or ScktSrvc.exe on the server machine to provide a listening socket.

ctOLEnterprise	TMidasConnection uses OLEnterprise to connect to the application server. The ServerName property specifies the GUID of the remote data module on the application server, and the ComputerName property specifies either the name of the server machine or the name of the OLEnterprise Business Object Broker (depending on the value of the UseBroker property). Note that OLEnterprise runtime must be installed on the client machine when using ctOLEnterprise.


TMidasConnection.ServerPort
 VCL Reference

TMidasConnection.ServerPort

TMidasConnection	See also

Specifies the port used by the listening socket on the server machine.

property ServerPort: Integer;

Description

When establishing connections to the application server using TCP/IP sockets, the application server must have a socket dispatcher listening on a predefined port for requests from client applications.  If the value of ConnectType is ctSockets, set ServerPort to the port number used by Scktsrvr.exe or ScktSrvc.exe on the server system. TMidasConnection attempts to connect to the application server by sending a message to the system specified by the ComputerName property at the port specified by ServerPort.

Note:	ServerPort has no effect if ConnectType is not ctSockets.


TMidasConnection.UseBroker
 VCL Reference

TMidasConnection.UseBroker

TMidasConnection	See also

Indicates whether an OLEnterprise connection should use the OLEnterprise Business Object Broker.

property UseBroker: Boolean;

Description

When establishing connections to the application server using OLEnterprise, UseBroker specifies whether the connection should use the Business Object Broker.  If UseBroker is True, TMidasConnection uses the Business Object Broker, and the ComputerName property specifies the name of the Business Object Broker.  If UseBroker is False, TMidasConnection uses OLEnterprise, but does not go through the Business Object Broker.  When UseBroker is False, ComputerName specifies the name of the OLEnterprise server.

For more information about using OLEnterprise, see the OLEnterprise documentation.

Note:	The value of UseBroker has no effect unless ConnectType is ctOLEnterprise.


 VCL Reference

TMidasConnection events

TMidasConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TMidasConnection events

TMidasConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TMidasConnection methods

TMidasConnection	Alphabetically	Legend

In TMidasConnection

Create

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMidasConnection methods

TMidasConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TMidasConnection.Create
 VCL Reference

TMidasConnection.Create

TMidasConnection	See also

Creates and initializes an instance of TMidasConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TMidasConnection component at runtime.  TMidasConnection components placed in forms or data modules at design time are created automatically.

Create initializes the value of the ServerPort property to 211.  This is also the default port number for ScktSrvr.exe and ScktSrvc.exe.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TCOMConnection

TDCOMConnection

TMidasConnection


UpdateRegistry Example
 VCL Reference

UpdateRegistry, DisableSocketTransport, EnableSocketTransport, DisableWebTransport, EnableWebTransport, RegisterPooled, UnregisterPooled Example

The following UpdateRegistry method adjusts a remote data module so that it can be pooled when accessed from a TWebConnection component. This allows the resources of the data module to be freed when it is not in use, while optimizing the use of existing remote data modules by letting clients share them.

The UpdateRegistry method also comments out the calls to DisableSocketTransport and EnableSocket transport that are added by the Remote Data Module Wizard. This prevents socket-based connections, which do not provide for a secure connection, from using the remote data module.

class procedure TMyRDM.UpdateRegistry(Register: Boolean; const ClassID, ProgID: string);

begin

  if Register then

  begin

    inherited UpdateRegistry(Register, ClassID, ProgID);

    { EnableSocketTransport(ClassID); }

    EnableWebTransport(ClassID);

    RegisterPooled(ClassID, 16, 30);

  end else

  begin

    { DisableSocketTransport(ClassID); }

    DisableWebTransport(ClassID);

    UnregisterPooled(ClassID);

    inherited UpdateRegistry(Register, ClassID, ProgID);

  end;

end;


SetComplete, SetAbort Example
 VCL Reference

SetComplete, SetAbort Example

This example shows how to use the MTS data module’s SetComplete and SetAbort methods in an interface member that returns a single specified database record. CustNo is a Variant that specifies the value of the CustNo field (the key value to identify the record). This method returns a data packet containing a single record.

function TMyRemoteDataModule.GetCustomerRecord (CustNo: OleVariant): OleVariant;

var

  RecsOut: Integer;

begin

  Result := NULL;

  try

  if Customer1.Locate('CustNo', KeyValues, []) then

    Result := CustomerProvider.GetRecords(1, RecsOut);

  SetComplete;

  except

    SetAbort;

  end;

end;


OnActivate, OnDeactivate Example
 VCL Reference

OnActivate, OnDeactivate Example

This example shows how a transactional data module uses the OnActivate and OnDeactivate events to open and close database connections. Database connections must not be left open when the transactional data module is deactivated or opened before the transactional data module is activated.

procedure TMyRemoteDataModule.MyRemoteDataModuleActivate(Sender: TObject);

begin

  Database1.Open; { connect to the database server }

  Table1.Open; { open the datasets...}

  Query1.Open;

end;

procedure TMyRemoteDataModule.MyRemoteDataModuleDeactivate(Sender: TObject);

begin

  Database1.Close; { close all datasets and disconnect from server }

end;


ServerData, Servers, ComputerName, HasFailed, Enabled Example
 VCL Reference

ServerData, Servers, ComputerName, HasFailed, Enabled Example

This example demonstrates how to update the active servers maintained by TSimpleObjectBroker. It then writes the current state to the registry so that it may be reinstated at a different time.

procedure TForm1.Button1Click(Sender: TObject);

var

  i: Integer;

  S1: String;

  Ole1: OleVariant;

begin

  with SimpleObjectBroker1 do

  begin

    for i:=0 to Servers.Count - 1 do

    begin

      if not Servers[i].HasFailed then {don’t enable down servers }

      begin

        S1 := 'Do you want ' + Servers[i].ComputerName + ' enabled?';

        if MessageBox(Handle, PChar(S1), PChar(Caption), MB_YESNO) = IDYES then

          Servers[i].Enabled := True

        else

          Servers[i].Enabled := False;

        end;

      end;

    end;

    { save the ServerData to the registry for later use. }

    Ole1 := ServerData;

  end;

  with TRegistry.Create do

  try

    OpenKey('\Software\Borland\Delphi\Servers\', True);

    WriteInteger('ServerInfoSize', SizeOf(Ole1));

    WriteBinaryData('ServerInfo', Ole1, SizeOf(Ole1));

  finally

    Free;

  end;

end;

The following code restores the Simple object broker to the state saved in the previous code.

procedure TForm1.Button2Click(Sender: TObject);

var

  P: Pointer;

  i: Integer;

begin

  with TRegistry.Create do

  try

    if OpenKey('\Software\Borland\Delphi\Servers\', False) then

    begin

      i := ReadInteger('ServerInfoSize');

      GetMem(P, i); { create a buffer }

      try { read the state and restore SimpleObjectBroker1 }

        ReadBinaryData('ServerInfo', P^, i);

        SimpleObjectBroker1.ServerData := OleVariant(P^);

      finally

        FreeMem(P);

      end;

  finally

    Free;

  end;

end;


BeforeDisconnect, ChangeCount, ApplyUpdates Example
 VCL Reference

BeforeDisconnect, ChangeCount, ApplyUpdates Example

This BeforeDisconnect event handler makes sure that the client dataset has applied all its pending updates before terminating the connection to the server.

procedure TDataModule1.ConnectionBeforeDisconnect(Sender: TObject);

begin

  if (ClientDataSet1.ChangeCount > 0) then

    ClientDataSet1.ApplyUpdates(-1);

  end;

end;


CreateTransactionContextEx Example
 VCL Reference

CreateTransactionContextEx Example

A client base application can control transaction context through the ITransactionContextEx interface. The following code example shows how a client application uses CreateTransactionContextEx to create the transaction context. This method returns an interface to this object.

This example wraps the call to the transaction context in a call to OleCheck which is necessary because the CreateInstance method is not declared as safecall.

procedure TForm1.MoveMoneyClick(Sender: TObject);

begin

  Transfer(CLASS_AccountA, CLASS_AccountB, 100);

end;

procedure TForm1.Transfer(DebitAccountId, CreditAccountId: TGuid; Amount: Currency);

var

  TransactionContextEx: ITransactionContextEx;

  CreditAccountIntf, DebitAccountIntf: IAccount;

begin

  TransactionContextEx := CreateTransactionContextEx;

  try

    OleCheck(TransactionContextEx.CreateInstance(DebitAccountId,

      IAccount, DebitAccountIntf));

    OleCheck(TransactionContextEx.CreateInstance(CreditAccountId,

      IAccount, CreditAccountIntf));

    DebitAccountIntf.Debit(Amount);

    CreditAccountIntf.Credit(Amount);

  except

    TransactionContextEx.Abort;

    raise;

  end;

  TransactionContextEx.Commit;

end;


OnLogin Example
 VCL Reference

OnLogin

This example shows how to use an OnLogin event handler to pass authentication information to the server. This example assumes that the connection component’s LoginPrompt property isTrue and an AS_Login method has been added to the application server’s interface (using the type library). AS_Login returns True if the user name and password are accepted, False otherwise.

procedure Form1.MyDCOMConnectionLogin(Sender: TObject; UserName, Password: string);

var

  EncryptedValues: OleVariant;

begin

  { Create an encrypted version of the user name and password

    before sending them over an insecure connection. AS_Login

    decrypts them on the server side. }

  EncryptedValues := EncryptThem(UserName, Password);

  if not AppServer.AS_Login(EncryptedValues) then

    raise ELoginFailed.Create('Login rejected');

end;

Note that if the login fails, OnLogin raises an exception. The client application must catch this exception and provide feedback to the user:

KeepTrying := True;

while KeepTrying do

begin

  try

    MyDCOMConnection.Connected := True;

  except

    on ELoginFailed do

      if MessageDlg('Incorrect password– retry?', mtError, [mbYes, mbNo], 0) <> mrYes then

        KeepTrying := False;

  end;

end;


OnTranslate Example
 VCL Reference

OnTranslate example

This OnTranslate event handler converts a user-defined node in the  source XML document that has the following form

<FullName>

   <Title> </Title>

   <FirstName> </FirstName>

   <LastName> </LastName>

</FullName>

into a single field value:

procedure TForm1.XMLTransform1Translate(Sender: TObject; Id: String; SrcNode: IDOMNode; var Value: String; DestNode: IDOMNode);

var

  CurNode: IDOMNode;

begin

  if Id = 'FullName' then

  begin

    Value = '';

    if SrcNode.hasChildNodes then

    begin

      CurNode := SrcNode.firstChild;

      Value := Value + CurNode.nodeValue;

      while CurNode <> SrcNode.lastChild do

      begin

        CurNode := CurNode.nextSibling;

        Value := Value + ' ';

        Value := Value + CurNode.nodeValue;

      end;

    end;

  end;

end;


TNextButton
 VCL Reference

TNextButton

Hierarchy	Properties	Methods	See also

TNextButton generates an HTML control that moves to the next record in an XML data packet.

Unit

MidItems

Description

Add TNextButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable an associated control to move to the next record in a dataset. The resulting HTML button’s action changes the current record displayed by the associated control.

Use the properties of TNextButton to customize the appearance of the button and associate it with a Web item. The associated Web item displays the records that the next button navigates.


 VCL Reference

TNextButton properties

TNextButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TNextButton properties

TNextButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TNextButton methods

TNextButton	Alphabetically	Legend

In TNextButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNextButton methods

TNextButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TNextButton.Create
 VCL Reference

TNextButton.Create

TNextButton	See also

Creates and initializes an instance of TNextButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TNextButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TNextButton


TNextPageButton
 VCL Reference

TNextPageButton

Hierarchy	Properties	Methods	See also

TNextPageButton generates an HTML control that moves to the next set of records in an XML data packet.

Unit

MidItems

Description

Add TNextPageButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to display the next group of records in a dataset. If the button is associated with a grid (TDataGrid), the grid scrolls by the number of rows in the grid. If the button is associated with a collection of fields (TFieldGroup), the current record changes to the next record in the data packet.

Use the properties of TNextPageButton to customize the appearance of the button and associate it with a display component.


 VCL Reference

TNextPageButton properties

TNextPageButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TNextPageButton properties

TNextPageButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TNextPageButton methods

TNextPageButton	Alphabetically	Legend

In TNextPageButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNextPageButton methods

TNextPageButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TNextPageButton.Create
 VCL Reference

TNextPageButton.Create

TNextPageButton	See also

Creates and initializes an instance of TNextPageButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TNextPageButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TNextPageButton


TOLEnterpriseConnection
 VCL Reference

 TOLEnterpriseConnection

Hierarchy	Properties	Methods	Events	See also

TOLEnterpriseConnection is provided for backward compatibility with applications that connect to an application server using OLEnterprise.

Unit

MConnect

Description

TOLEnterpriseConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server using OLEnterprise. This component is provided for backward compatibility.

TOLEnterpriseConnection establishes the initial connection between the client application and a remote application server using OLEnterprise. Once the connection is established, the client registers any or all of its client datasets with the remote server, and these client datasets use the IAppServer interface from the OLEnterprise connection component to communicate with providers on the application server, or to otherwise call the application server’s data module interface.

To connect to remote application servers using DCOM, use the TDCOMConnection component instead. To connect client applications to remote application servers using TCP/IP sockets, use TSocketConnection. To connect client applications to remote application servers using HTTP, use TWebConnection. To connect to remote application servers using CORBA, use the TCORBAConnection component.


 VCL Reference

TOLEnterpriseConnection properties

TOLEnterpriseConnection	Alphabetically	Legend

In TOLEnterpriseConnection

BrokerName

ComputerName

Derived from TCOMConnection

Connected

Derived from TDispatchConnection

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TOLEnterpriseConnection properties

TOLEnterpriseConnection	By object	Legend

AppServer

BrokerName

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ComputerName

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

ServerGUID

ServerName

Tag

VCLComObject


TOLEnterpriseConnection.BrokerName
 VCL Reference

TOLEnterpriseConnection.BrokerName

TOLEnterpriseConnection	See also

Specifies the name of the Business Object Broker that locates the application server.

property BrokerName: string;

Description

Use BrokerName to specify the OLEnterprise Business Object Broker with which the application server is registered. The Business Object Broker locates an available application server with the name specified by the ServerName property.

If you are not using the Business Object Broker, use the ComputerName property instead. You must specify a value for either BrokerName or ComputerName:

Note:	Setting the value of BrokerName changes the ComputerName property to blank, and vice versa.


TOLEnterpriseConnection.ComputerName
 VCL Reference

TOLEnterpriseConnection.ComputerName

TOLEnterpriseConnection	See also

Specifies the name of the machine on which the application server is located.

property ComputerName: string;

Description

Use ComputerName to specify the machine where the application server resides if you are not using the Business Object Broker. If you are not using the Business Object Broker and ComputerName is blank (the default), TOLEnterpriseConnection assumes the application server can be found on the user’s machine or that the computer name can be derived from the system registry based on the DCOM configuration. If ComputerName is not blank, it overrides any system registry entries.

If you are using the Business Object Broker, use the BrokerName property instead. BrokerName and ComputerName are mutually exclusive: Setting the value of ComputerName changes the BrokerName property to blank, and vice versa.


 VCL Reference

TOLEnterpriseConnection events

TOLEnterpriseConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TOLEnterpriseConnection events

TOLEnterpriseConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TOLEnterpriseConnection methods

TOLEnterpriseConnection	Alphabetically	Legend

In TOLEnterpriseConnection

DoConnect

Derived from TDispatchConnection

Create

GetServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOLEnterpriseConnection methods

TOLEnterpriseConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TOLEnterpriseConnection.DoConnect
 VCL Reference

TOLEnterpriseConnection.DoConnect

TOLEnterpriseConnection	See also

Establishes a connection to the application server.

procedure DoConnect; override;

Description

DoConnect is called when the Connected property is set to True. DoConnect obtains the interface of the remote data module on the application server using OLEnterprise runtime. This interface can then be used to obtain interfaces for the providers on the application server or to make interface calls to the remote data module.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TCOMConnection

TOLEnterpriseConnection


TOPToSoapDomConvert
 VCL Reference

TOPToSoapDomConvert

Hierarchy	Properties	Methods	See also

TOPToSoapDomConvert handles the marshaling and unmarshaling of SOAP method calls.

Unit

OpToSoapDOMConv

Description

TOPToSoapDomConvert is an implementation of the IOPConvert interface that handles the marshaling and unmarshaling of SOAP method calls. It uses a DOM parser to parse and edit the SOAP encoding of a method call and its results.

Typically, applications do not use TOPToSoapDomConvert directly. Rather, It is created and used by THTTPRio on client applications and TSoapPascalInvoker on server applications.

TOPToSoapDomConvert converts between the SOAP encoding of a method call or its results and an invocation context. If the method call results in an exception, TOPToSoapDomConvert generates a SOAP error packet for that exception so that the client can raise the exception remotely.


 VCL Reference

TOPToSoapDomConvert properties

TOPToSoapDomConvert	Alphabetically	Legend

In TOPToSoapDomConvert

WSDLView

Derived from TSOAPDomConv

Options

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TOPToSoapDomConvert properties

TOPToSoapDomConvert	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Options

Owner

Tag

VCLComObject

WSDLView


TOPToSoapDomConvert.WSDLView
 VCL Reference

TOPToSoapDomConvert.WSDLView

TOPToSoapDomConvert

Provides access to information in a WSDL document that represents the SOAP request.

property WSDLView: TWSDLView;

Description

WSDLView represents information about the SOAP request when the application uses a WSDL document to define information about the interface. If the application does not use a WSDL document (for example, when both client and server are written using Delphi), WSDLView is nil.

WSDL includes the parsed WSDL document, as well as properties to identify the target method call.


 VCL Reference

TOPToSoapDomConvert methods

TOPToSoapDomConvert	Alphabetically	Legend

In TOPToSoapDomConvert

Create

Destroy

InvContextToMsg

MakeFault

MakeResponse

MsgToInvContext

ProcessResponse

Derived from TSOAPDomConv

ConvertNativeDataToSoap

ConvertSoapToNativeData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOPToSoapDomConvert methods

TOPToSoapDomConvert	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ConvertNativeDataToSoap

ConvertSoapToNativeData

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InvContextToMsg

IsImplementorOf

MakeFault

MakeResponse

MethodAddress

MethodName

MsgToInvContext

NewInstance

ProcessResponse

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TOPToSoapDomConvert.Create
 VCL Reference

TOPToSoapDomConvert.Create

TOPToSoapDomConvert	See also

Creates a new TOPToSoapDomConvert object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not create instances of TOPToSoapDomConvert. It is created by the THTTPRio and TSoapPascalInvoker objects to handle the marshaling and unmarshaling of SOAP method calls.

The AOwner parameter specifies the component that is responsible for freeing the TOPToSoapDomConvert instance.


TOPToSoapDomConvert.Destroy
 VCL Reference

TOPToSoapDomConvert.Destroy

TOPToSoapDomConvert	See also

Frees the memory associated with the TOPToSoapDomConvert object.

destructor Destroy; override;

Description

Typically, TOPToSoapDomConvert objects are freed by the objects that create them to handle the marshaling and unmarshaling of SOAP method calls.

Do not call Destroy directly in an application. Instead, use the Free method, that checks whether the reference is nil before calling Destroy.


TOPToSoapDomConvert.InvContextToMsg
 VCL Reference

TOPToSoapDomConvert.InvContextToMsg

TOPToSoapDomConvert	See also

Marshals a method call from an invocation context to a transportable string.

function InvContextToMsg(const IntfMD: TIntfMetaData; MethNum: Integer; Con: TInvContext): InvString;

Description

InvContextToMsg looks up a specified method call, including the types and values of any arguments, from an invocation context, and returns an encoded version of that method call that can be transported to the application that executes it.

IntfMD represents the runtime type information (RTTI) from the interface whose method is called.

MethNum identifies the called method by its position in the interface’s method table.

Con is the invocation context that contains details of the method call, including the parameter values passed in, the calling conventions, and any other temporary data used when making the call.

InvContextToMsg returns the encoded version of the method call.


TOPToSoapDomConvert.MakeFault
 VCL Reference

TOPToSoapDomConvert.MakeFault

TOPToSoapDomConvert	See also

Encodes an exception that was raised when trying to execute a method on an invokable interface.

function MakeFault(const Ex: Exception): InvString;

Description

MakeFault encodes an exception that a Web Service application catches when trying to execute a method on an invokable interface. It generates an encoded exception packet, which the client can decode and use to raise the exception on the client application.

Ex is the exception object that represents the exception that occurred.

MakeFault returns the encoded exception packet.


TOPToSoapDomConvert.MakeResponse
 VCL Reference

TOPToSoapDomConvert.MakeResponse

TOPToSoapDomConvert	See also

Encodes the results of successfully executing a method on an invokable interface.

procedure MakeResponse(const IntfMD: TIntfMetaData; const MethNum: Integer; Context: TInvContext; Response: TStream);

Description

MakeResponse retrieves the results of executing a method on an invokable interface from an invocation context and packages them into a transportable string, which it writes to a stream. This string is passed back to the client, which can unpack it using the ProcessResponse method.

IntfMD represents the runtime type information (RTTI) from the interface whose method was executed.

MethNum identifies the called method by its position in the interface’s method table.

Context is the invocation context that contains details of the method call.

Response is a stream to which MakeResponse writes the encoded version of the method result and any output parameters.


TOPToSoapDomConvert.MsgToInvContext
 VCL Reference

TOPToSoapDomConvert.MsgToInvContext

TOPToSoapDomConvert	See also

Unpacks an encoded method call into an invocation context so that it can be executed.

procedure MsgToInvContext(const Request: InvString; const IntfMD: TIntfMetaData; var MethNum: Integer; Context: TInvContext); overload;

procedure MsgToInvContext(const Request: TSteam; const IntfMD: TIntfMetaData; var MethNum: Integer; Context: TInvContext); overload;

Description

MsgToInvContext takes an encoded message that a server application receives and uses it to fill out an invocation context, which can then be used to execute the method call.

Request is the encoded method call, or a stream from which to read that method call. It is generated on the client by a call to InvContextToMsg.

IntfMD represents the runtime type information (RTTI) from the interface whose method is called.

MethNum returns the position of the called method in the interface’s method table.

Context is the invocation context to which this method adds the information encoded in Request.


TOPToSoapDomConvert.ProcessResponse
 VCL Reference

TOPToSoapDomConvert.ProcessResponse

TOPToSoapDomConvert	See also

Unpacks the response packet from a method call into an invocation context.

procedure ProcessResponse(const Response: InvString; const MD: TIntfMetaData; Context: TInvContext); overload;

procedure ProcessResponse(const Response: TStream; const MD: TIntfMetaData; Context: TInvContext); overload;

Description

ProcessResponse takes the encoded results of executing a method on an invokable interface from an invocation context and unpacks them into an invocation context.

Response is the encoded results of executing a method on the invokable interface, or a stream from which those results can be read. It is generated on the server by the MakeResponse method if the call was successful, or the MakeFault method if the call was unsuccessful.

MD describes the runtime type information (RTTI) of the interface whose method was called.

Context is the invocation context that ProcessResponse fills out based on the contents of Response.


Hierarchy

TObject

TPersistent

TComponent

TSOAPDOMProcessor

TSOAPDomConv

TOPToSoapDomConvert


TPageItemsProducer
 VCL Reference

TPageItemsProducer

Hierarchy	Properties	Methods	Events	See also

TPageItemsProducer maintains a list of Web item components for producing a string of HTML commands based on an input template.

Unit

PagItems

Description

Use TPageItemsProducer as the base class for components that convert an HTML template that includes content generated by other components into a string of HTML commands that can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the page items producer in an OnHTMLTag event handler.

Page item producers differ from other page producer components in that they replace special HTML-transparent tags of the format

<#COMPONENT Name=WebContentComponent>

with the HTML produced by the component named WebContentComponent. WebContentComponent must have the same Owner as the page item producer and support the IWebContent interface, which the page item producer uses to obtain the replacement HTML for the COMPONENT tag.

TPageItemsProducer introduces the WebPageItems property to maintain a hierarchical list of these Web content components, where each component produces content for its parent component.


 VCL Reference

TPageItemsProducer properties

TPageItemsProducer	Alphabetically	Legend

In TPageItemsProducer

HTMLDoc

HTMLFile

Derived from TBasePageItemsProducer

WebPageItems

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPageItemsProducer properties

TPageItemsProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext

WebPageItems


TPageItemsProducer.HTMLDoc
 VCL Reference

TPageItemsProducer.HTMLDoc

TPageItemsProducer	See also

Specifies the HTML template used to generate the value returned by the Content method.

property HTMLDoc: TStrings;

Description

Set HTMLDoc to a set of strings that make up the HTML template. Each string is a sequence of one or more HTML commands or HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

Note:	Setting HTMLDoc clears the HTMLFile property.


TPageItemsProducer.HTMLFile
 VCL Reference

TPageItemsProducer.HTMLFile

TPageItemsProducer	See also

Specifies the name of a file that contains the HTML template used to generate the value returned by the Content method.

property HTMLFile: TFileName;

Description

Set HTMLFile to the name of the file that contains an HTML template. The HTML template is a sequence of HTML commands and HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

Note:	Setting HTMLFile clears the HTMLDoc property.

Note:	When distributing applications that contain page producers which use the HTMLFile property, be sure to distribute the file along with the application. Also, be sure that the value of HTMLFile does not include a hard-coded path name that will not be available on the user’s disk.


 VCL Reference

TPageItemsProducer events

TPageItemsProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TPageItemsProducer events

TPageItemsProducer	By object	Legend

OnHTMLTag


 VCL Reference

TPageItemsProducer methods

TPageItemsProducer	Alphabetically	Legend

In TPageItemsProducer

Create

Destroy

Derived from TBasePageProducer

Content

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPageItemsProducer methods

TPageItemsProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPageItemsProducer.Create
 VCL Reference

TPageItemsProducer.Create

TPageItemsProducer

Creates and initializes an instance of TPageItemsProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a page items producer at runtime.


TPageItemsProducer.Destroy
 VCL Reference

TPageItemsProducer.Destroy

TPageItemsProducer	See also

Frees an instance of TPageItemsProducer.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call the Free method, which checks whether the TPageitemsProducer reference is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer

TPageItemsProducer


TPacketInterceptFactory
 VCL Reference

TPacketInterceptFactory

Hierarchy	Properties	Methods	See also

TPacketInterceptFactory is the type of the class factory used to instantiate a data packet interceptor.

Unit

SConnect

Description

Use TPacketInterceptFactory as the class factory for COM objects that implement the IDataIntercept interface. Data packet interceptors implement the IDataIntercept interface, which they use in multi-tiered database applications to modify the data that passes between a socket connection component in the client application and scktsrvr.exe on the server. TPacketInterceptFactory registers the data packet interceptor so that can appear in the drop-down list of the Object Inspector when setting the socket connection’s InterceptName property and in the corresponding list in the properties dialog of scktsrvr.exe.

TPacketInterceptFactory supports the IUnknown, IClassFactory, and IClassFactory2 interfaces. The IClassFactory interface is implemented by class objects associated with class identifiers (CLSIDs) for the classes that they instantiate. IClassFactory must be implemented for every object definition, so that objects of that type can be created. The IClassFactory2 interface is implemented by class factories for classes that need support for licensing.


 VCL Reference

TPacketInterceptFactory properties

TPacketInterceptFactory	Alphabetically	Legend

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TPacketInterceptFactory properties

TPacketInterceptFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TPacketInterceptFactory methods

TPacketInterceptFactory	Alphabetically	Legend

In TPacketInterceptFactory

UpdateRegistry

Derived from TComObjectFactory

Create

CreateComObject

Destroy

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPacketInterceptFactory methods

TPacketInterceptFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TPacketInterceptFactory.UpdateRegistry
 VCL Reference

TPacketInterceptFactory.UpdateRegistry

TPacketInterceptFactory	See also

Registers or unregisters COM objects created by the factory.

procedure UpdateRegistry(Register: Boolean); override;

Description

UpdateRegistry is called for EXEs when the EXE is run, and for DLLs or EXEs when the routines are called to specifically register or unregister the server.

In addition to the standard COM registration that allows clients to instantiate the data packet interceptor that this factory creates, TPacketInterceptFactory also registers its associated COM object as a data packet interceptor. This allows the object’s ProgID to appear in the drop-down list for a socket connection’s InterceptName property, and to appear in the corresponding list on the properties dialog for scktsrvr.exe.


Hierarchy

TObject

TComObjectFactory

TPacketInterceptFactory


TPostButton
 VCL Reference

TPostButton

Hierarchy	Properties	Methods	See also

TPostButton generates an HTML control that posts changes to an XML delta packet.

Unit

MidItems

Description

Add TPostButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to commit the edits on the current record of an associated display control. The resulting HTML button’s action posts all edits to the current record to the emerging delta packet, which can then be submitted using an apply updates button.

Use the properties of TPostButton to customize the appearance of the button and associate it with a Web item that generates the display control.


 VCL Reference

TPostButton properties

TPostButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPostButton properties

TPostButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TPostButton methods

TPostButton	Alphabetically	Legend

In TPostButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPostButton methods

TPostButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPostButton.Create
 VCL Reference

TPostButton.Create

TPostButton	See also

Creates and initializes an instance of TPostButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TPostButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TPostButton


TPriorButton
 VCL Reference

TPriorButton

Hierarchy	Properties	Methods	See also

TPriorButton generates an HTML control that moves to the previous record in an XML data packet.

Unit

MidItems

Description

Add TPriorButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable an associated control to move to the previous record in a dataset. The resulting HTML button’s action changes the current record displayed by the associated control.

Use the properties of TPriorButton to customize the appearance of the button and associate it with a Web item. The associated Web item displays the records that the prior button navigates.


 VCL Reference

TPriorButton properties

TPriorButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPriorButton properties

TPriorButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TPriorButton methods

TPriorButton	Alphabetically	Legend

In TPriorButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPriorButton methods

TPriorButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPriorButton.Create
 VCL Reference

TPriorButton.Create

TPriorButton	See also

Creates and initializes an instance of TPriorButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TPriorButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TPriorButton


TPriorPageButton
 VCL Reference

TPriorPageButton

Hierarchy	Properties	Methods	See also

TPriorPageButton generates an HTML control that moves to the previous set of records in an XML data packet.

Unit

MidItems

Description

Add TPriorPageButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to display the previous group of records in a dataset. If the button is associated with a grid (TDataGrid), the grid scrolls by the number of rows in the grid. If the button is associated with a collection of fields (TFieldGroup), the current record changes to the previous record in the data packet.

Use the properties of TNextPageButton to customize the appearance of the button and associate it with a display component.


 VCL Reference

TPriorPageButton properties

TPriorPageButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPriorPageButton properties

TPriorPageButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TPriorPageButton methods

TPriorPageButton	Alphabetically	Legend

In TPriorPageButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPriorPageButton methods

TPriorPageButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPriorPageButton.Create
 VCL Reference

TPriorPageButton.Create

TPriorPageButton	See also

Creates and initializes an instance of TPriorPageButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TPriorPageButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TPriorPageButton


TQueryButtons
 VCL Reference

TQueryButtons

Hierarchy	Properties	Methods	See also

TQueryButtons assembles the HTML generated by a set of TQueryButton descendants.

Unit

MidItems

Description

Add TQueryButtons as the child of a TQueryForm component (or a layout group that is a child of a TQueryForm component) to enable the generated HTML form to undo or submit changes made by end users. TQueryButtons generates HTML containing the controls generated by its children. These children must be descendants of TQueryButton, such as TSubmitQueryButton and TResetQueryButton.

In order to let other Web items to use the HTML that defines the organized collection of controls, TQueryButtons inherits the IWebContent interface from TWebControlGroup.

Use the properties of TQueryButtons to customize the appearance of the group of buttons.


 VCL Reference

TQueryButtons properties

TQueryButtons	Alphabetically	Legend

Derived from TCustomQueryButtons

Custom

Style

StyleRule

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryButtons properties

TQueryButtons	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls


 VCL Reference

TQueryButtons methods

TQueryButtons	Alphabetically	Legend

Derived from TWebControlGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryButtons methods

TQueryButtons	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TCustomQueryButtons

TQueryButtons


TQueryFieldGroup
 VCL Reference

TQueryFieldGroup

Hierarchy	Properties	Methods	See also

TQueryFieldGroup arranges information on an HTML form as a set of labeled fields.

Unit

MidItems

Description

Add TQueryFieldGroup to a query form component (TQueryForm) or a layout group (TLayoutGroup) that is a child for a query form. TQueryFieldGroup generates the HTML to display information in labeled fields. By default, TQueryFieldGroup displays information about the parameters for an XML broker, but it can be used to display any application-defined named values.

TQueryFieldGroup maintains a list of Web items that generate the individual display fields. These Web items are restricted to the following classes: TQueryText, TQueryTextArea, TQuerySelectOptions, and TQueryRadioGroup. If the query field group displays parameter values, you can bind the query field group to an XML data packet or dataset field within an XML data packet. The Web items can then use that binding to determine the source of the parameters they display.

You can also use the properties of TQueryFieldGroup to affect the overall appearance of the set of fields.


 VCL Reference

TQueryFieldGroup properties

TQueryFieldGroup	Alphabetically	Legend

Derived from TCustomFieldGroup

Custom

Style

StyleRule

Derived from TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryFieldGroup properties

TQueryFieldGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


 VCL Reference

TQueryFieldGroup methods

TQueryFieldGroup	Alphabetically	Legend

Derived from TCustomFieldGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryFieldGroup methods

TQueryFieldGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup

TCustomFieldGroup

TQueryFieldGroup


TRIO
 VCL Reference

TRIO

Hierarchy	Properties	Methods	See also

TRIO is the base class for components that generate calls to remote interfaced objects.

Unit

Rio

Description

Use TRIO as a base class for components that generate statically-linked calls to invokable interfaces. When an application casts a TRIO descendant to a registered invokable interface, it dynamically generates an in-memory method table, providing an implementation to that invokable interface. TRIO uses two helper objects when generating this implementation. These helper objects implement the IOPConvert and IWebNode interfaces. IOPConvert handles the marshaling and unmarshaling of calls to methods on the generated method table, and IWebNode receives the marshaled message call, executes it (typically by sending it to a remote server application), and returns the results of executing the call. These interfaces do not assume any particular encoding or transport protocol. Each TRIO descendant uses its own protocol-specific helper objects to implement these interfaces.

Before TRIO can generate a method table for an invokable interface, the interface must be registered with the invocation registry. To register an invokable interface, use the global InvRegistry function to obtain access to the registry, and call its RegisterInterface method.

Do not create instances of TRIO. To add a component that generates calls to a registered invokable interface, use a TRIO descendant such as THTTPRIO.


 VCL Reference

TRIO properties

TRIO	Alphabetically	Legend

In TRIO

Converter

RefCount

WebNode

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TRIO properties

TRIO	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Converter

DesignInfo

Name

Owner

RefCount

Tag

VCLComObject

WebNode


TRIO.RefCount
 VCL Reference

TRIO.RefCount

TRIO	See also

Maintains a reference count on the use of the TRIO object’s interface.

property RefCount: Integer;

Description

RefCount keeps track of the usage on the TRIO object’s interface. RefCount is incremented by the _AddRef method and decremented by the _Release method. If the TRIO object is created without an Owner, then when RefCount drops to zero, the TRIO instance is automatically freed.


TRIO.Converter
 VCL Reference

TRIO.Converter

TRIO	See also

Handles the marshaling and unmarshaling of calls to an invokable interface.

property Converter: IOPConvert;

Description

TRIO uses Converter internally to marshal and unmarshal calls to an invokable interface. That is, when the TRIO object has been typecast to an invokable interface, it implements each method call by using Converter to marshal the call into an encoding protocol, and to unmarshal any return values after that call is executed.

Each TRIO descendant uses its own protocol-specific helper object as the value of the Converter property.


TRIO.WebNode
 VCL Reference

TRIO.WebNode

TRIO	See also

Handles the execution of method calls on the invokable interface.

property WebNode: IWebNode;

Description

TRIO uses WebNode internally to execute method calls after they have been marshaled by Converter. That is, when the TRIO object has been typecast to an invokable interface, it implements each method call by using Converter to marshal the call into an encoding protocol, and then uses WebNode to execute the encoded call.

Each TRIO descendant uses its own protocol-specific helper object as the value of the WebNode property.


 VCL Reference

TRIO methods

TRIO	Alphabetically	Legend

In TRIO

_AddRef

_Release

AfterConstruction

BeforeDestruction

Create

Destroy

NewInstance

QueryInterface

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TRIO methods

TRIO	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

QueryInterface

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TRIO._AddRef
 VCL Reference

TRIO._AddRef

TRIO	See also

Increments the reference count for the TRIO object’s interface.

function _AddRef: Integer; stdcall;

Description

The Object Pascal compiler automatically generates a call to _AddRef for every reference to the TRIO object’s interface. _AddRef increments the value of the RefCount property, and returns the new value of RefCount..


TRIO._Release
 VCL Reference

TRIO._Release

TRIO	See also

Decrements the reference count for the TRIO object’s interface.

function _Release: Integer; stdcall;

Description

The Object Pascal compiler automatically generates a call to _Release whenever a reference to the TRIO object’s interface goes out of scope. _Release decrements the value of the RefCount property and returns the new reference count.

If the TRIO object does not have an Owner (the Owner property is nil), then when the reference count drops to zero, the TRIO object is automatically freed.


TRIO.Create
 VCL Reference

TRIO.Create

TRIO	See also

Creates an instance of TRIO.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TRIO descendant at runtime. TRIO descendants added to forms or data modules at design time are created automatically.

The AOwner parameter specifies another component (usually a form or data module) that is responsible for freeing the TRIO instance. It becomes the value of the Owner property. If the TRIO instance is created with AOwner set to nil, then it is automatically freed when its reference count drops to zero.


TRIO.Destroy
 VCL Reference

TRIO.Destroy

TRIO	See also

Destroys the instance of a TRIO object.

destructor Destroy; override;

Description

There is no need to explicitly free a TRIO instance.

If the TRIO object is created with an Owner, then that Owner handles the freeing of the TRIO instance. If the TRIO object is created without an Owner, then it is automatically freed when the reference count on its interface drops to zero.


TRIO.AfterConstruction
 VCL Reference

TRIO.AfterConstruction

TRIO	See also

Updates the reference count after the last constructor has executed.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the TRIO object’s last constructor has executed. Do not call it explicitly in your applications.

TRIO overrides the AfterConstruction method to update the RefCount property. TRIO artificially increments the reference count when it is first created to prevent changes to the reference count from causing the TRIO instance to be freed before it is fully instantiated. AfterConstruction returns the reference count back to an appropriate level, now that the constructor is finished.


TRIO.BeforeDestruction
 VCL Reference

TRIO.BeforeDestruction

TRIO	See also

Prevents the destruction of a TRIO instance if the reference count is greater than zero.

procedure BeforeDestruction; override;

Description

BeforeDestruction is called automatically before the TRIO object’s first destructor executes. Do not call it explicitly in your applications.

TRIO overrides the BeforeDestruction method to check the RefCount property. If RefCount is greater than zero, then there is still an outstanding reference to the TRIO object’s interface,. and BeforeDestruction raises an exception to prevent the destruction of this object.


TRIO.NewInstance
 VCL Reference

TRIO.NewInstance

TRIO	See also

Allocates memory for each instance of a remote interfaced object.

class function NewInstance: TObject; override;

Description

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory to allocate from the heap to contain a particular instance. Do not call NewInstance directly.

TRIO overrides NewInstance to increment the reference count when a new instance is created. This prevents any constructor from accidentally deleting the instance due to a RefCount of zero. The AfterConstruction method decrements the value of RefCount after all constructors have executed.


TRIO.QueryInterface
 VCL Reference

TRIO.QueryInterface

TRIO	See also

Implements the IInterface QueryInterface method.

function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;

Description

QueryInterface is called through the IInterface interface to obtain an interface pointer for the interface identified by the IID parameter. This call is generated when an application casts TRIO to an invokable interface using the as operator.

TRIO can only return a single type of interface pointer. The first time an application calls QueryInterface, TRIO generates an in-memory method table to support calls to the methods on the requested interface.

IID specifies the invokable interface that the application wants to call using this TRIO instance. If the TRIO object has already been typecast to an interface, then IID must identify that interface. If the TRIO instance has not yet been typecast to an interface, then IID must be a registered invokable interface.

Obj returns an interface pointer for the specified interface, unless TRIO was already implementing a different interface or IID identified an interface that was not registered.

QueryInterface returns 0 (S_OK) if Obj successfully returns an interface pointer. It returns E_NOINTERFACE otherwise.

If QueryInterface successfully returns an interface pointer, it automatically increments the reference count.


Hierarchy

TObject

TPersistent

TComponent

TRIO


AppNameSpacePrefix variable
 VCL Reference

AppNameSpacePrefix variable

See also

Supplies a unique prefix to use for automatically generated namespaces given to invokable interfaces and remotable types.

Unit

InvokeRegistry

Category

Web Services

var AppNameSpacePrefix: string;

Description

Set AppNameSpacePrefix to a unique string that the invocation registry and remotable type registry use when generating namespaces. These generated namespaces must be unique strings that identify invokable interfaces and remotable classes in a Web Service application. They are generated by the RegisterInterface method of the invocation registry and the RegisterXSClass and RegisterXSInfo methods of the remotable class registry if the application does not explicitly supply a namespace.

The invocation registry and remotable type registry generate namespaces using the value of AppNameSpacePrefix, the name of the unit in which the interface or class is defined, and the name of the class, type, or interface. If your unit and interface or class names are at all generic, it is a good idea to supply a unique value to AppNameSpacePrefix to guard against the possibility of another interface, type, or class with the same name that is registered in another unit with the same name.

Both client and server applications must register invokable interfaces and remotable types and classes using the same namespace. If you rely on automatically-generated namespaces, be sure to use the same value of AppNameSpacePrefix in both the client and the server applications.


GetRemotableDataContext function
 VCL Reference

GetRemotableDataContext function

See also

Returns the TDataContext object that provides temporary storage during a call to an invokable interface.

Unit

InvokeRegistry

Category

Web Services

function GetRemotableDataContext: Pointer;

Description

GetRemotableDataContext returns a pointer to the data context object that stores all the temporary objects and values needed for implementing a call to an invokable interface. When a client application calls an invokable interface on a Web Service application, the Web Service application automatically creates a data context for the call. Any objects or variables that are needed for marshaling the interface call are automatically added to the data context for the duration of the call. In addition, any remotable objects (TRemotable descendants) that are created while there is a remotable data context available are automatically added to the data context. When the interface call is complete, the data context is freed, and it automatically frees the stored objects and variables.


InvRegistry function
 VCL Reference

InvRegistry function

See also

Provides access to the invocation registry.

Unit

InvokeRegistry

Category

Web Services

function InvRegistry: TInvokableClassRegistry;

Description

Call InvRegistry to access the invocation registry. The returned object has two methods, RegisterInterface and RegisterInvokableClass, that you can use for registering invokable interfaces (interfaces compiled with RTTI) and the classes that implement them.

Server applications that implement Web Services need to register both the invokable interfaces and the implementation classes. The invoker component can then use the invocation registry to locate invokable interfaces and identify classes that implement them.

Client applications that call on Web Services register the invokable interfaces that they call. The remote interfaced object component can then use the invocation registry to generate a dynamic method table for calling the invokable interfaces.

Note:	Both client and server applications must register invokable interfaces using the same namespace. You can either supply this namespace explicitly when you register an interface, or you can use the automatically generated namespace. If you use the automatically generated interface, the interface must be defined in the same unit on both client and server, and both client and server must have the same value set for the global AppNameSpacePrefix variable.


RemClassRegistry function
 VCL Reference

RemClassRegistry function

See also

Provides access to the remotable class registry.

Unit

InvokeRegistry

Category

Web Services

function RemClassRegistry: TPascalRemotableClassRegistry;

Description

RemClassRegistry returns the object that implements the remotable class registry. Use its RegisterXSClass method to register a remotable class in an application that publishes or uses Web Services.

Remotable classes are classes that can be transmitted between the client of a Web Services application and the server that implements the service. They can be used to represent non-scalar types for parameters and return values, or they can represent exceptions that occur when trying to execute a request to a Web Service application. All remotable classes are compiled with runtime type information (RTTI) and have a virtual constructor that the remotable class registry recognizes and uses to obtain class instances.

Both the client application and server application must register remotable classes before they can use them. They must register them to use the same namespace. You can either supply this namespace explicitly when you register the class, or you can use the automatically generated namespace. If you use the automatically generated interface, the class must be defined in the same unit on both client and server, and both client and server must have the same value set for the global AppNameSpacePrefix variable.

Note:	The remotable class registry is the same thing as the remotable type registry. You can use RemClassRegistry interchangeably with the RemTypeRegistry function.


RemTypeRegistry function
 VCL Reference

RemTypeRegistry function

See also

Provides access to the remotable type registry.

Unit

InvokeRegistry

Category

Web Services

function RemTypeRegistry: TPascalRemotableTypeRegistry;

Description

Call RemTypeRegistry to access to the remotable type registry. Use the RegisterXSClass method of the returned object to register a remotable class in an application that publishes or uses Web Services. Use its RegisterXSInfo method to register a remotable type.

Remotable classes are classes that can be transmitted between the client of a Web Services application and the server that implements the service. They can be used to represent non-scalar types for parameters and return values, or they can represent exceptions that occur when trying to execute a request to a Web Service application. All remotable classes are compiled with runtime type information (RTTI) and have a virtual constructor that the remotable class registry recognizes and uses to obtain class instances.

Remotable types include dynamic arrays, enumerated types, and boolean types, which can be used in an invokable interface without resorting to a remotable class representation, but which must be registered because their values require special marshaling.

Both the client application and server application must register remotable classes and types before they can use them. They must register them to use the same namespace. You can either supply this namespace explicitly when you register the class or type, or you can use the automatically generated namespace. If you use the automatically generated interface, the class must be defined in the same unit on both client and server, and both client and server must have the same value set for the global AppNameSpacePrefix variable.

Note:	The remotable type registry is the same thing as the remotable class registry. You can use RemTypeRegistry interchangeably with the RemClassRegistry function.


SetRemotableDataContext procedure
 VCL Reference

SetRemotableDataContext procedure

See also

Sets the data context that provides temporary storage during a call to an invokable interface.

Unit

InvokeRegistry

Category

Web Services

procedure SetRemotableDataContext(Value: Pointer);

Description

SetRemotableDataContext assigns a data context for a remote call to an invokable interface. Once a data context is assigned, it is available to store the temporary objects and values needed for implementing a call to an invokable interface. If the application creates a TRemotable descendant while there is a remotable data context, that remotable object is automatically added to the data context and freed when the application frees the data context.

Note:	The invoker component in a Web Services application automatically calls SetRemotableDataContext to set up a data context for incoming SOAP requests. Thus, there is typically no need to call this method in server applications.

Value is a pointer to a TDataContext descendant that temporarily stores information for remote interface calls.


TSmallIntArray
 VCL Reference

TSmallIntArray

Hierarchy	Properties	Methods	See also

TSmallIntArray is a dynamically resizable array of 16-bit integers.

Unit

mxarrays

Description

Use TSmallIntArray to represent an array of short integers when the number of elements in the array is unknown. For example, decision cubes use TSmallIntArray objects to represent the coordinates of a cell in the multidimensional cache of summary values.


 VCL Reference

TSmallIntArray properties

TSmallIntArray	Alphabetically	Legend

In TSmallIntArray

Items

Derived from TBaseArray

AutoSize

Capacity

CompareProc

Count

Duplicates

ItemSize

Limit

List

SortOrder


 VCL Reference

TSmallIntArray properties

TSmallIntArray	By object	Legend

AutoSize

Capacity

CompareProc

Count

Duplicates

Items

ItemSize

Limit

List

SortOrder


TSmallIntArray.Items
 VCL Reference

TSmallIntArray.Items

TSmallIntArray	See also

Lists the elements in the array.

property Items[ Index: Integer ]: SmallInt; default;

Description

Use Items to read or set the value of the element indicated by the Index parameter, where 0 specifies the first element in the array, 1 specifies the second parameter, and so on. Items is the default property for TSmallIntArray, which means the name of the Items property need not be included when using it. Thus, the line

FirstInt := SmallIntArray1.Items[0];

can be written

FirstInt := SmallIntArray1[0].


 VCL Reference

TSmallIntArray methods

TSmallIntArray	Alphabetically	Legend

In TSmallIntArray

Add

Assign

Create

GetItem

PutItem

Derived from TBaseArray

Clear

Delete

Destroy

Exchange

FindItem

IndexOf

Insert

InsertAt

RemoveItem

Sort

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSmallIntArray methods

TSmallIntArray	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Exchange

FieldAddress

FindItem

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InsertAt

InstanceSize

MethodAddress

MethodName

NewInstance

PutItem

RemoveItem

SafeCallException

Sort


TSmallIntArray.Add
 VCL Reference

TSmallIntArray.Add

TSmallIntArray	See also

Adds a new element to the array.

function Add( Value: SmallInt ): Integer;

Description

Call Add to add an item to the end of an unsorted array, or to the appropriate position in a sorted array. To insert an element at a specified position within the array, use the Insert method instead.

Note:	Add assumes that sorted arrays are sorted in ascending order. To use Add on an array where SortOrder is TS_DESCENDING, temporarily change the CompareProc property to a function that multiplies the value returned by CompareProc by -1.


TSmallIntArray.Assign
 VCL Reference

TSmallIntArray.Assign

TSmallIntArray	See also

Copies the Items property of another TSmallIntArray object.

procedure Assign( Source: TPersistent ); override;

Description

Call Assign to copy the array from another object. If the Source parameter is a TSmallIntArray object, Assign replaces the Items property with the array from the source array. Otherwise, Assign calls the inherited method which will assign values from any Source object that handles a TSmallIntArray in its AssignTo method.

Note:	Assign only changes the list of elements. It does not copy the AutoSize, Capacity, CompareProc, Duplicates, or SortOrder properties. If the AutoSize property is False, be sure that the value of Capacity is at least as big as the Count property of the source array. If the array is sorted, source items will appear in sorted order. If the Duplicates property is not dupAccept, duplicate elements will not be copied from the source array.


TSmallIntArray.Create
 VCL Reference

TSmallIntArray.CreateTSmallIntArray

TSmallIntArray	See also

Creates an instance of TSmallIntArray.

constructor Create( Itemcount, iSize: Integer ); virtual;

Description

Call Create to create and initialize a TSmallIntArray object. Create sets the Capacity property to Itemcount and ignores the iSize parameter.

Create also initializes the following properties:

ItemSize is set to 2 (the size of a small integer).

CompareProc is initialized to a function that returns the difference between two 16-bit integers.

AutoSize is set to True.

Count is set to 0.


TSmallIntArray.GetItem
 VCL Reference

TSmallIntArray.GetItem

TSmallIntArray	See also

Returns the integer at the indicated position.

function GetItem(Index: Integer): SmallInt;

Description

Call GetItem to obtain the value of an integer in the array. The Index parameter indicates the element of the array, where the first element has the index 0, the second element has the index 1, and so on.


TSmallIntArray.PutItem
 VCL Reference

TSmallIntArray.PutItem

TSmallIntArray	See also

Replaces the value of an element in the array.

procedure PutItem( Index: Integer; Value: SmallInt );

Description

Call PutItem to change the value of an integer to the value Value. Unlike the Insert method, PutItem does not add a new item to the array, but replaces the value of an existing element. The Index parameter indicates which element to change, where 0 specifies the first element, 1 specifies the second element, and so on.

Note:	Calling PutItem with Index set to the value of the Count property will add a new element to the end of the array. This is the only case where PutItem adds a new element instead of replacing an existing one.


Hierarchy

TObject

TPersistent

TBaseArray

TSmallIntArray


TSoapConnection
 VCL Reference

 TSoapConnection

Hierarchy	Properties	Methods	Events	Using TSoapConnection	See also

TSoapConnection connects to an application server that is implemented as a Web Service.

Unit

SoapConn

Description

TSoapConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server that is implemented as a Web Service. The SOAP connection object can

Establish an initial connection to a remote application server.

Obtain an IAppServer for the application server.

Obtain a list of providers on the application server.

Drop the connection to the remote application server.

TSoapConnection establishes the initial connection between the client application and a remote application server using SOAP. To use TSoapConnection, you must have Wininet.dll installed on the client system. Wininet.dll is found in the Windows system directory if you have IE3 or higher installed.

Once the connection is established, the client registers any or all of its client datasets, and these client datasets use the IAppServer interface from the SOAP connection component to communicate with providers on the application server, or to otherwise call the application server’s data module interface.

Note:	Unlike when using other WebSnap connection components, you can’t use the AppServer property of TSoapConnection to call methods of the application server’s interface that are not IAppServer methods. Instead, to communicate with a SOAP data module on the application interface, use a separate THTTPRIO object.

To connect to remote application servers using DCOM, use the TDCOMConnection component instead. To connect to remote application servers using TCP/IP, use the TSocketConnection component instead. To connect to remote application servers using HTTP (but not SOAP), use TWebConnection. To connect to remote application servers using CORBA, use the TCORBAConnection component.


 VCL Reference

TSoapConnection properties

TSoapConnection	Alphabetically	Legend

In TSoapConnection

Agent

Connected

Password

Proxy

ProxyByPass

URL

UserName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSoapConnection properties

TSoapConnection	By object	Legend

Agent

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

Password

Proxy

ProxyByPass

Tag

URL

UserName

VCLComObject


TSoapConnection.Agent
 VCL Reference

TSoapConnection.Agent

TSoapConnection	See also

Provides the value of the User-Agent header for HTTP messages to the server.

property Agent: string;

Description

Use Agent to supply HTTP messages generated by the SOAP connection component with the name of your application. This name is included as a User-Agent header. The User-Agent header is an optional string that describes the application generating the HTTP message.


TSoapConnection.Connected
 VCL Reference

TSoapConnection.Connected

TSoapConnection	See also

Indicates whether the SOAP connection component is connected to the application server.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to the application server. Set Connected to False to terminate the connection.

When changing the value of Connected, TSoapConnection generates a BeforeConnect and an AfterConnect event, or a BeforeDisconnect and an AfterDisconnect event.


TSoapConnection.Password
 VCL Reference

TSoapConnection.Password

TSoapConnection	See also

Specifies the password that allows the client application to log on to the application server.

property Password: string;

Description

When the SOAP connection component connects to the application server, it supplies the values of the UserName and Password properties so that it can log on to the host or proxy. The value of Password can be an empty string if neither the host nor proxy requires authentication.


TSoapConnection.Proxy
 VCL Reference

TSoapConnection.Proxy

TSoapConnection	See also

Lists any proxy servers that are required to make the connection.

property Proxy: string;

Description

Use Proxy if the SOAP connection component can’t resolve the host portion of URL locally. If the server is registered locally, Proxy can be a null string. Otherwise, Proxy lists the host names of any proxy servers that can forward request messages on to the intended server machine.


TSoapConnection.ProxyByPass
 VCL Reference

TSoapConnection.ProxyByPass

TSoapConnection	See also

Lists the host names of locally registered servers that do not require a proxy.

property ProxyByPass: string;

Description

Use ProxyByPass to indicate any server systems to which the SOAP connection component can make a direct connection. When the URL property identifies a server in this list, the Web connection component makes a direct connection even if the Proxy property is specified.

When ProxyByPass is an empty string, the Web connection component checks the registry for any locally known servers and bypasses the proxy server if the host portion of URL refers to a registered local server.


TSoapConnection.URL
 VCL Reference

TSoapConnection.URL

TSoapConnection	See also

Specifies the Uniform Resource Locator for the THTTPSoapDispatcher on the application server.

property URL: string;

Description

Use URL to specify the Uniform Resource Locator that the SOAP connection component uses to locate the application server.

URL includes the protocol (http or https), host name, and scriptname for the application server, as well as a path portion that identifies the THTTPSoapDispatcher on the application server. Typically, it has the form

http://DataHost.org/scripts/AppServer.dll/SOAP

Note:	URL is a standard Uniform Resource Locator. As such, you can also use it to override the port associated with http (80) or https (443) if the Web server is configured differently. The port number follows the host name, preceded by a colon.


TSoapConnection.UserName
 VCL Reference

TSoapConnection.UserName

TSoapConnection	See also

Specifies the user name that allows the client application to log on to the application server.

property UserName: string;

Description

When the SOAP connection component connects to the application server on a local host or to the proxy server, it supplies the values of the UserName and Password properties so that it can log in. If neither the host nor the proxy server requires authentication, UserName can be an empty string.


 VCL Reference

TSoapConnection events

TSoapConnection	Alphabetically	Legend

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TSoapConnection events

TSoapConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TSoapConnection methods

TSoapConnection	Alphabetically	Legend

In TSoapConnection

Create

Destroy

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSoapConnection methods

TSoapConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSoapConnection.Create
 VCL Reference

TSoapConnection.Create

TSoapConnection	See also

Creates and initializes an instance of TSoapConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TSoapConnection object at runtime. SOAP connection components added to forms or data modules at design time are created automatically.

The AOwner parameter specifies the component (usually a form or data module) that is responsible for freeing the SOAP connection component.


TSoapConnection.Destroy
 VCL Reference

TSoapConnection.Destroy

TSoapConnection

Destroys an instance of TSoapConnection.destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the SOAP connection is not nil before calling Destroy.


TSoapConnection.GetServer
 VCL Reference

TSoapConnection.GetServer

TSoapConnection	See also

Returns the IAppServer interface of the application server.

function GetServer: IAppServer; override;

Description

Client datasets call GetServer to set the value of their AppServer property. This allows them to access providers on the remote application server.

GetServer ensures that there is a connection and then returns an IAppServer interface that can be used to communicate with providers on the application server. To use other methods of the application server’s interface, use a separate THTTPRIO object instead.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TSoapConnection


TSoapDataModule
 VCL Reference

TSoapDataModule

Hierarchy	Properties	Methods	Events	Using TSoapDataModule	See also

TSoapDataModule encapsulates the objects and interfaces of an application server in a SOAP-based multi-tiered database application.

Unit

DataBkr

Description

Use a TSoapDataModule object as the central repository for all objects in a SOAP-based application server. SOAP data modules can contain any nonvisual components. Typically these are data access components, such as datasets and the provider components that handle communication between these datasets and client applications. They can also contain other nonvisual components, such as TTimer, or TImageList.

At design time a TSoapDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. In the unit file for the SOAP data module a developer can also code any business rules that are to be centralized in the middle tier of a multi-tiered application.

TSoapDataModule implements the IAppServer interface, which is an invokable interface. As such, if you add TSoapDataModule to a Web Service application, the invoker automatically forwards all IAppServer calls to the SOAP data module. The client application uses a TSoapConnection component to generate these calls.

To create a SOAP data module at design time,

1. Choose File|New|Other, and select Web Services application from the Web Services page of the new items dialog. This generates a Web module that contains a dispatcher and an invoker component. These components work together to interpret and execute incoming SOAP request.

2. Choose File|New|Other, and select SOAP DataModule from the Web Services page of the new items dialog. This adds a TSoapDataModule descendant to your application. The TSoapDataModule descendant supports an invokable interface that descends from IAppServer.

Note:	Web Service applications should not include more than one TSoapDataModule descendant. When the invoker component that appears in the primary Web module receives a request for the IAppServer interface, it can’t distinguish between multiple implementation classes.


 VCL Reference

TSoapDataModule properties

TSoapDataModule	Alphabetically	Legend

In TSoapDataModule

ProviderCount

Providers

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSoapDataModule properties

TSoapDataModule	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

ProviderCount

Providers

Tag

VCLComObject


TSoapDataModule.ProviderCount
 VCL Reference

TSoapDataModule.ProviderCount

TSoapDataModule	See also

Indicates the number of providers registered with the SOAP data module.

property ProviderCount: Integer;

Description

ProviderCount is the number of providers that can be accessed using the Providers property.


TSoapDataModule.Providers
 VCL Reference

TSoapDataModule.Providers

TSoapDataModule	See also

Lists the registered provider components that are contained in the SOAP data module.

property Providers[const ProviderName: string]: TCustomProvider;

Description

Use Providers to access a provider component from the SOAP data module given its name. The SOAP data module uses Providers to locate the target of method calls made using the IAppServer interface.

If the value passed as is not one of the names returned by AS_GetProviderNames (for example, if the provider’s Exported property is False) reading Providers raises an exception.


 VCL Reference

TSoapDataModule events

TSoapDataModule	Alphabetically	Legend

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TSoapDataModule events

TSoapDataModule	By object	Legend

OnCreate

OnDestroy


 VCL Reference

TSoapDataModule methods

TSoapDataModule	Alphabetically	Legend

In TSoapDataModule

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

Create

Destroy

GetProvider

Lock

RegisterProvider

Unlock

UnRegisterProvider

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSoapDataModule methods

TSoapDataModule	By object	Legend

AfterConstruction

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetProvider

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Lock

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterProvider

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Unlock

UnRegisterProvider

UpdateAction


TSoapDataModule.AS_ApplyUpdates
 VCL Reference

TSoapDataModule.AS_ApplyUpdates

TSoapDataModule	See also

Applies updates received from a client dataset using a specified provider.

function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

AS_ApplyUpdates writes client updates to a dataset or database server. ProviderName specifies the name of the provider component that manages the update operation. Delta is a Variant containing the updated, inserted, and deleted records to write to the database. MaxErrors indicates the maximum number of errors to permit before rolling back the update operation; ErrorCount returns the actual number of errors encountered during the update operation. OwnerData is information supplied by the client application in a BeforeApplyUpdates event handler and returned to the client application in an AfterApplyUpdates event handler. It is passed to the provider’s BeforeApplyUpdates event handler and returned from the provider’s AfterApplyUpdates event handler.

AS_ApplyUpdates returns a Variant that is a data packet containing all records that could not be applied.

Note:	Applications can only call the protected AS_ApplyUpdates method using the IAppServer interface. To apply updates directly in code from the application server, use the provider component’s ApplyUpdates method.


TSoapDataModule.AS_DataRequest
 VCL Reference

TSoapDataModule.AS_DataRequest

TSoapDataModule	See also

Generates an OnDataRequest event on the specified provider component.

function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; safecall;

Description

Use AS_DataRequest to invoke an OnDataRequest event handler of the provider named by ProviderName. This method is provided to allow application developers to customize the communication between a client application and a provider component. There is no predefined meaning for the Data parameter or the return value.

Note:	Applications can only call the protected AS_DataRequest method using the IAppServer interface.


TSoapDataModule.AS_Execute
 VCL Reference

TSoapDataModule.AS_Execute

TSoapDataModule	See also

Executes the query or stored procedure bound to a specified provider.

procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; var Params, OwnerData: OleVariant); safecall;

Description

Use AS_Execute to pass an execute command to a remote provider, using a specified set of parameters. AS_Execute calls the Execute method of the specified provider after assigning any parameters. Output parameters that result from executing a query or stored procedure are returned in the Params parameter.

Note:	AS_Execute should only be called for a provider whose dataset represents a query or stored procedure that does not return a cursor.

The ProviderName parameter specifies the name of the provider component associated with the query or stored procedure.

CommandText specifies an optional SQL statement that replaces the SQL of the provider’s query, or the name of a stored procedure that replaces the provider’s underlying stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

The Params parameter encodes any parameters expected by the query or stored procedure and returns any output parameters. To create a properly encoded value for Params from a TParams object, use the PackageParams method.

The OwnerData parameter contains custom information that appears as an argument to the provider’s BeforeExecute and AfterExecute event handlers. This information originates in a client dataset’s BeforeExecute event handler. The value returned in OwnerData is passed to the client dataset’s AfterExecute event handler.

Note:	Applications can only call the protected AS_Execute method using the IAppServer interface. To execute a dataset in code from the application server, use the dataset component directly.


TSoapDataModule.AS_GetParams
 VCL Reference

TSoapDataModule.AS_GetParams

TSoapDataModule	See also

Fetches current parameter values from the dataset bound to a specified provider.

function AS_GetParams(const ProviderName: WideString, var Ownerdata: OleVariant): OleVariant; safecall;

Description

Use AS_GetParams to retrieve the current parameter values from the dataset associated with a provider. The ProviderName parameter specifies the name of the provider component whose dataset has the parameters. The OwnerData represents custom information that originates in a client dataset’s BeforeGetParams event handler and returns information that is passed tot he client dataset’s AfterGetParams event handler.

AS_GetParams returns the parameters, encoded as a Variant array, or, if the provider does not support parameter fetching, AS_GetParams returns a Null Variant. Use the UnpackParams procedure to convert parameter values returned by AS_GetParams to a TParams object.

Warning: 	It is not a good idea to call AS_GetParams on a SOAP data module. SOAP data modules are stateless, and any parameter values you fetch may be changed by other applications. The recommended way to obtain output parameter values is to call the AS_Execute method instead.

Note:	Applications can only call the protected AS_GetParams method using the IAppServer interface.


TSoapDataModule.AS_GetProviderNames
 VCL Reference

TSoapDataModule.AS_GetProviderNames

TSoapDataModule	See also

Returns a list of all the available providers on the SOAP data module.

function AS_GetProviderNames: OleVariant; safecall;

Description

Call AS_GetProviderNames for a list of all registered providers available from a SOAP data module. These values indicate the possible values for the ProviderName property of a client dataset that connects to the SOAP data module. When calling any of the SOAP data modules through the IAppServer interface, pass one of these names to indicate the provider that is the target of the method call.

AS_GetProviderNames returns the names of the providers in a Variant array. Client datasets are associated with a provider by setting their ProviderName property to one of these names.

Note:	Applications can only call the protected AS_GetProviderNames method using the IAppServer interface.


TSoapDataModule.AS_GetRecords
 VCL Reference

TSoapDataModule.AS_GetRecords

TSoapDataModule	See also

Returns a data packet that contains the specified data.

function AS_GetRecords(const ProviderName: WideString, Count: Integer; out RecsOut: Integer; Options: Integer; const CommandText: WideString; var Params, OwnerData:OleVariant): OleVariant; safecall;

Description

Call AS_GetRecords to retrieve a specified number of records. AS_GetRecords returns the requested records, starting with the current record of the provider’s dataset. Because SOAP data modules are stateless, you may need to reposition the cursor or re-execute a query or stored procedure in the provider’s BeforeGetRecords event handler.

ProviderName gives the name of the provider component that provides the records.

Count indicates the number or type of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only Count records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It is a combination of the GetRecordOption constants.  For example, the following value requests metadata along with a data packet encoded in XML:

MetaDataOption + XMLOption

CommandText specifies an optional SQL statement that replaces the SQL of the provider’s query, or the name of a table or stored procedure that replaces the provider’s underlying database table or stored procedure. This parameter is ignored if the provider’s Options property does not include poAllowCommandText.

Params is a Variant containing any parameters that should be passed to the provider’s dataset before it executes to generate the requested data. It returns any output parameters.

OwnerData contains custom information that is supplied by a client dataset’s BeforeGetRecords event handler. This information is passed to the provider’s BeforeGetRecords event handler. OwnerData returns information supplied by the provider’s AfterGetRecords event handler.

Records are returned as a data packet in a Variant.

Note:	Applications can only call the protected AS_GetRecords method using the IAppServer interface. To fetch records directly in code from the application server, use the provider component’s GetRecords method.


TSoapDataModule.AS_RowRequest
 VCL Reference

TSoapDataModule.AS_RowRequest

TSoapDataModule	See also

Returns information from a specified record of the provider’s dataset.

function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

Client datasets call AS_RowRequest automatically to implement their FetchBlobs, FetchDetails , or RefreshRecord method.

The ProviderName parameter indicates the provider associated with the dataset from which information should be fetched.

The Row parameter is an OleVariant that describes the current record on the client dataset.

The RequestType parameter indicates the type of information required. It is an integer version of the TFetchOptions type. (An integer because the value may be marshaled to a remote application server). To create a value for RequestType, take the corresponding TFetchOptions value, cast it to a Byte, and cast the result to an Integer:

Integer(Byte([foBlobs, foDetails]));

OwnerData contains custom information that is supplied by a client dataset’s BeforeRowRequest event handler. This information is passed to the provider’s BeforeRowRequest event handler. OwnerData returns custom information supplied by the provider’s AfterRowRequest event handler.

The requested data is returned as a delta packet.

Note:	Applications can only call the protected AS_RowRequest method using the IAppServer interface.


TSoapDataModule.Create
 VCL Reference

TSoapDataModule.Create

TSoapDataModule	See also

Creates a SOAP data module instance.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the constructor for TSoapDataModule.  Instead, add a SOAP data module to a Web service application using the SOAP data module wizard on the SOAP page of the new items dialog.

AOwner specifies the component that is responsible for freeing the SOAP data module (typically the application).


TSoapDataModule.Destroy
 VCL Reference

TSoapDataModule.Destroy

TSoapDataModule	See also

Frees a SOAP data module instance.

destructor Destroy; override;

Description

Most applications do not need to call the destructor for TSoapDataModule.  The SOAP data module is freed by its owner when the application shuts down.

If you must destroy a SOAP data module at runtime, call the Free method instead.


TSoapDataModule.GetProvider
 VCL Reference

TSoapDataModule.GetProvider

TSoapDataModule	See also

Returns a registered provider component given its name.

function GetProvider(const ProviderName: string): TCustomProvider; virtual;

Description

GetProvider is the protected read implementation of the Providers property. ProviderName specifies the name of a provider that is returned. If ProviderName is not one of the names returned by AS_GetProviderNames (for example, if the provider’s Exported property is False), GetProvider raises an exception.


TSoapDataModule.Lock
 VCL Reference

TSoapDataModule.Lock

TSoapDataModule	See also

Locks the SOAP data module so that it can’t be locked by other threads.

procedure Lock; virtual;

Description

SOAP data modules use Lock internally to ensure that all IAppServer calls are thread-safe. When implementing a SOAP data module descendant, call Lock before accessing any instance data, including the providers contained in the data module. When finished with the block of code that must be protected from thread conflicts, call the Unlock method to release the lock.

Lock uses a critical section to guard against thread conflicts. This means that any code that accesses the SOAP data module’s properties or contained objects must call Lock or it will introduce thread conflicts.


TSoapDataModule.RegisterProvider
 VCL Reference

TSoapDataModule.RegisterProvider

TSoapDataModule	See also

Adds a provider to the list returned by AS_GetProviderNames.

procedure RegisterProvider(Value: TCustomProvider); virtual;

Description

Call RegisterProvider to make a provider available through the SOAP data module’s IAppServer interface. Pass a reference to the provider as the Value parameter. Once a provider is registered, its availability to client applications can be turned on or off using its Exported property.

There is no need to call RegisterProvider for providers that are added at design time or when the SOAP data module is assigned as an Owner in the provider’s constructor. These are registered automatically.

Before a registered provider is destroyed, it must be unregistered using the UnRegisterProvider method. Providers that have the SOAP data module as an Owner are unregistered automatically from their destructors.


TSoapDataModule.Unlock
 VCL Reference

TSoapDataModule.Unlock

TSoapDataModule	See also

Unlocks the SOAP data module after it was locked by a call to the Lock method.

procedure Unlock; virtual;

Description

Use Unlock to release the critical section that was entered by a call to the Lock method. Every call to the Lock method must be paired with a corresponding call to Unlock.


TSoapDataModule.UnRegisterProvider
 VCL Reference

TSoapDataModule.UnRegisterProvider

TSoapDataModule	See also

Removes a provider from the list returned by AS_GetProviderNames.

procedure UnRegisterProvider(Value: TCustomProvider); virtual;

Description

Call UnRegisterProvider to remove a provider from the SOAP data module’s list of available providers. Pass a reference to the provider that should be removed as the Value parameter. When a provider is not registered, it is not returned by the AS_GetProviderNames method, which can be accessed through the IAppServer interface.

To temporarily disable a provider, use the provider’s Exported property. Unexported providers can’t be accessed through any IAppServer method calls.

Before a registered provider is destroyed, it must be unregistered using the UnRegisterProvider method. Providers that have the SOAP data module as an Owner are unregistered automatically from their destructors.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TSoapDataModule


TSOAPDOMProcessor
 VCL Reference

TSOAPDOMProcessor

Hierarchy	Properties	Methods	See also

TSOAPDOMProcessor is the base class for components that process the SOAP headers from SOAP requests.

Unit

soapdomconv

Description

TSOAPDOMProcessor is the base class for DOM-based components that interpret and create SOAP method calls. It manages a list of interfaces that it uses to create or interpret specialized headers in the SOAP message. Such headers can include application-specific information such as authentication, compression/decompression, encryption/decryption, and so on.

Do not create instances of TSOAPDOMProcessor. It is intended only as a base class for components that use the information in SOAP headers when interpreting or creating SOAP method calls.


 VCL Reference

TSOAPDOMProcessor properties

TSOAPDOMProcessor	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSOAPDOMProcessor properties

TSOAPDOMProcessor	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSOAPDOMProcessor methods

TSOAPDOMProcessor	Alphabetically	Legend

In TSOAPDOMProcessor

_AddRef

_Release

AddHeaderProcessor

AfterConstruction

DefaultProcessHeader

Destroy

FindHeaderProcessor

MakeHeaderNodes

NewInstance

Derived from TComponent

BeforeDestruction

Create

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TSOAPDOMProcessor methods

TSOAPDOMProcessor	By object	Legend

_AddRef

_Release

AddHeaderProcessor

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefaultProcessHeader

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindHeaderProcessor

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MakeHeaderNodes

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSOAPDOMProcessor.Destroy
 VCL Reference

TSOAPDOMProcessor.Destroy

TSOAPDOMProcessor	See also

Frees the memory associated with the TSOAPDOMProcessor object.

destructor Destroy; override;

Description

Do not call Destroy to free an instance of TSOAPDOMProcessor. Instead, use the Free method, which first checks for a nil reference before calling Destroy.


TSOAPDOMProcessor._AddRef
 VCL Reference

TSOAPDOMProcessor._AddRef

TSOAPDOMProcessor 	See also

Implements the IInterface AddRef method.

function _AddRef: Integer; stdcall;

Description

Do not call the protected _AddRef method directly. _AddRef is called through the IInterface interface to indicate that another object is using the TSOAPDOMProcessor object’s interface pointer. When the other object is through with the interface, it calls _Release through the same interface. This allows the TSOAPDOMProcessor object to free itself when it is no longer used (when the reference count goes to zero).


TSOAPDOMProcessor._Release
 VCL Reference

TSOAPDOMProcessor._Release

TSOAPDOMProcessor 	See also

Implements the IInterface Release method.

function _Release: Integer; stdcall;

Description

Do not call the protected _Release method directly. _Release is called through the IInterface interface to indicate that another object is through with the TSOAPDOMProcessor object’s interface pointer. This allows the TSOAPDOMProcessor object to free itself when it is no longer used (when the reference count goes to zero).


TSOAPDOMProcessor.AddHeaderProcessor
 VCL Reference

TSOAPDOMProcessor.AddHeaderProcessor

TSOAPDOMProcessor	See also

Adds a processor to the internal list of interfaces to use for interpreting and creating SOAP headers.

procedure AddHeaderProcessor(Namespace, HeaderName, TypeName: WideString; Processor: IDOMHeaderProcessor); virtual;

Description

AddHeaderProcessor stores a specified processor interface and the information necessary to identify the SOAP headers that it handles.

Namespace is the namespace URI in which the SOAP header identified by HeaderName is defined.

HeaderName is the name of the SOAP header that the processor handles.

TypeName is the name of the type that is used for the value of the header.

Processor is the interface for a helper object that creates or interprets SOAP headers that match Namespace, HeaderName, and TypeName.


TSOAPDOMProcessor.AfterConstruction
 VCL Reference

TSOAPDOMProcessor.AfterConstruction

TSOAPDOMProcessor	See also

Responds after the last constructor executes.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.

When an instance of TSOAPDOMProcessor is allocated, its reference count is incremented to prevent its destruction while processing the constructor. AfterConstruction decrements that reference count to re-establish the correct count after all constructors have executed.


TSOAPDOMProcessor.DefaultProcessHeader
 VCL Reference

TSOAPDOMProcessor.DefaultProcessHeader

TSOAPDOMProcessor	See also

Handles the interpretation of a SOAP header when no processor can be found.

procedure DefaultProcessHeader(HeaderNode: IXMLNode; var Handled, AbortRequest: Boolean); virtual;

Description

DefaultProcessHeader is called to provide a default interpretation of a SOAP header when it is not processed by one of the processors that FindHeaderProcessor returns.

HeaderNode is the interface of the DOM representation of the SOAP header to be processed.

Handled returns True if DefaultProcessHeader handles the header node.

AbortRequest returns True if DefaultProcessHeader determines that the SOAP header can’t be handled and that this results in an inability to interpret the entire SOAP request.


TSOAPDOMProcessor.FindHeaderProcessor
 VCL Reference

TSOAPDOMProcessor.FindHeaderProcessor

TSOAPDOMProcessor	See also

Locates a processor to interpret or generate a specified SOAP header.

function FindHeaderProcessor(Namespace, HeaderName, TypeName: WideString): IDOMHeaderProcessor; virtual;

Description

FindHeaderProcessor returns the interface of the helper object that can generate or interpret a specified SOAP header. This processor must be previously added to the TSOAPDOMProcessor object’s internal list of processors by a call to the AddHeaderProcessor method.

Namespace is the namespace URI in which the SOAP header identified by HeaderName is defined.

HeaderName is the name of the SOAP header that the processor handles.

TypeName is the name of the type that is used for the value of the header.


TSOAPDOMProcessor.MakeHeaderNodes
 VCL Reference

TSOAPDOMProcessor.MakeHeaderNodes

TSOAPDOMProcessor	See also

Generates all the SOAP headers that this object knows how to create.

function MakeHeaderNodes(HeaderNode: IXMLNode): IXMLNode;

Description

MakeHeaderNodes uses the processors that have been added by the AddHeaderProcessor method to generate a set of SOAP header nodes. These generated nodes are added as child nodes to the node specified by HeaderNode.


TSOAPDOMProcessor.NewInstance
 VCL Reference

TSOAPDOMProcessor.NewInstance

TSOAPDOMProcessor	See also

Allocates memory for each instance of TSOAPDOMProcessor.

class function NewInstance: TObject; override;

Description

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory to allocate from the heap to contain a particular instance. Do not call NewInstance directly.

TSOAPDOMProcessor overrides NewInstance to increment the reference count when a new instance is created. This prevents any constructor from accidentally deleting the instance due to a reference count of zero. The AfterConstruction method decrements the reference count after all constructors have executed.


Hierarchy

TObject

TPersistent

TComponent

TSOAPDOMProcessor


TSoapPascalInvoker
 VCL Reference

TSoapPascalInvoker

Hierarchy	Properties	Methods	See also

TSoapPascalInvoker is the base class for components that interpret SOAP requests and execute the corresponding invokable interface.

Unit

SOAPPasInv

Description

Use TSoapPascalInvoker as a base class for components that interpret SOAP requests. TSoapPascalInvoker implements the logic that parses a SOAP request, given its target invokable interface, executes the interface call, and encodes the results of that code.

Each TSoapPascalInvoker descendant receives SOAP requests that arrive via a specific transport protocol. The TSoapPascalInvoker descendant must implement the logic to take the incoming SOAP request, identify the target invokable interface, and look up its implementation class and runtime type information (RTTI).


 VCL Reference

TSoapPascalInvoker properties

TSoapPascalInvoker	Alphabetically	Legend

In TSoapPascalInvoker

Converter

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSoapPascalInvoker properties

TSoapPascalInvoker	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Converter

DesignInfo

Name

Owner

Tag

VCLComObject


TSoapPascalInvoker.Converter
 VCL Reference

TSoapPascalInvoker.Converter

TSoapPascalInvoker	See also

Specifies the interface of the component that handles the marshaling of SOAP messages.

property Converter: TOpToSoapDomConvert;

Description

Converter is the component that marshals and unmarshals method calls for the invoker. The invoker uses this object to interpret incoming method calls and to generate the results it returns.


 VCL Reference

TSoapPascalInvoker methods

TSoapPascalInvoker	Alphabetically	Legend

In TSoapPascalInvoker

Create

Destroy

Invoke

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSoapPascalInvoker methods

TSoapPascalInvoker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

Invoke

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSoapPascalInvoker.Create
 VCL Reference

TSoapPascalInvoker.Create

TSoapPascalInvoker	See also

Creates a new TSoapPascalInvoker object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an invoker at runtime. Invoker components added to Web modules at design time (including the one that the Soap Server wizard adds automatically) are created automatically.

The AOwner parameter specifies the component that is responsible for freeing the TSoapPascalInvoker instance.


TSoapPascalInvoker.Destroy
 VCL Reference

TSoapPascalInvoker.Destroy

TSoapPascalInvoker	See also

Frees the memory associated with the TSoapPascalInvoker object.

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the invoker component is not nil before calling Destroy.


TSoapPascalInvoker.Invoke
 VCL Reference

TSoapPascalInvoker.Invoke

TSoapPascalInvoker	See also

Interprets a SOAP request message, calls the target interface, and encodes any return values.

procedure Invoke(AClass: TClass; IntfInfo: PTypeInfo; MethName: string; const Request: TStream; Response: TStream); virtual;

Description

Call Invoke to convert a SOAP request to an interface call on an invokable interface.

AClass is the class that implements the invokable interface. The invoker passes this to the invocation registry so that it can obtain an instance of the implementation class, which it uses to execute the SOAP request.

IntfInfo is the runtime type information (RTTI) from the invokable interface that is the target of the SOAP request. The invoker uses this to interpret the SOAP request.

MethName is the name of the method to call on the invokable interface.

Request is a stream from which Invoke can read the SOAP request. It contains the SOAP encoding of an interface call.

Response is a stream to which Invoke writes the SOAP encoding of any return values.


Hierarchy

TObject

TPersistent

TComponent

TSoapPascalInvoker


TSimpleObjectBroker
 VCL Reference

 TSimpleObjectBroker

Hierarchy	Properties	Methods	See also

TSimpleObjectBroker maintains a list of available application servers for a connection component.

Unit

ObjBrkr

Description

TSimpleObjectBroker maintains a list of servers, all of which run the application server for a multi-tiered application. When a connection component requests a server, the simple object broker passes the name of one of the available servers in the list. This process allows client applications to locate server systems dynamically at runtime. If there are redundant server systems, this allows client applications to continue functioning when a server goes down.

TSimpleObjectBroker can randomize the selection of servers from among the currently available servers in its list to provide a simple system of load balancing.


 VCL Reference

TSimpleObjectBroker properties

TSimpleObjectBroker	Alphabetically	Legend

In TSimpleObjectBroker

LoadBalanced

ServerData

Servers

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSimpleObjectBroker properties

TSimpleObjectBroker	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

LoadBalanced

Name

Owner

ServerData

Servers

Tag

VCLComObject


TSimpleObjectBroker.LoadBalanced
 VCL Reference

TSimpleObjectBroker.LoadBalanced

TSimpleObjectBroker 	See also

Specifies how the simple object broker picks a server from its list.

property LoadBalanced: Boolean;

Description

Set LoadBalanced to True to indicate that the simple object broker should supply computer names randomly from the available servers listed in the Servers property. When LoadBalanced is False, GetComputerForGUID and GetComputerForProgID always return the first available server.

If the simple object broker is used by multiple connection components in the client application, it is preferable to set LoadBalanced to True in order to distribute the work among available servers.

When there is only a single connection component, there is no need to randomize the selection of servers, because only one connection will be used at a time. However, when deploying client applications, you may want to reorder the Servers list in the simple object broker for each client, so that different clients give preference to different servers.


TSimpleObjectBroker.ServerData
 VCL Reference

TSimpleObjectBroker.ServerData

TSimpleObjectBroker 	See also	Example

Encapsulates the list of servers as an OleVariant.

property ServerData: OleVariant;

Description

Reading ServerData returns the value of the Servers property stored in Delphi’s internal component format. Writing ServerData sets the value of the Servers property from an OleVariant that was saved previously.

Use the ServerData property to provide a mechanism for loading and saving the list of servers represented by the Servers property. For example, An application can write the value of ServerData to an .ini file or the system registry. Later, it can read the value it saved as an OleVariant, and set ServerData to restore the Servers property to the value that was saved.

Note:	The implementation of ServerData uses the SaveToStream method to encode the Servers property as an OleVariant and the LoadFromStream method to decode that OleVariant and restore the Servers property.


TSimpleObjectBroker.Servers
 VCL Reference

TSimpleObjectBroker.Servers

TSimpleObjectBroker 	See also	Example

Maintains the list of servers that can be provided to connection components.

property Servers: TServerCollection;

Description

Use Servers to specify the list of servers that the simple object broker can return from the GetComputerForProgID and GetComputerForGUID methods.

Each item in the collection keeps track of whether the last connection attempt to that server was successful, and if not, the simple object broker ignores that server. In addition, individual servers in the collection can be disabled so that the simple object broker ignores them until they are re-enabled.


 VCL Reference

TSimpleObjectBroker methods

TSimpleObjectBroker	Alphabetically	Legend

In TSimpleObjectBroker

Create

Destroy

GetComputerForGUID

GetComputerForProgID

GetPortForComputer

LoadFromStream

SaveToStream

SetConnectStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSimpleObjectBroker methods

TSimpleObjectBroker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetComputerForGUID

GetComputerForProgID

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetPortForComputer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToStream

SetConnectStatus

SetSubComponent

UpdateAction


TSimpleObjectBroker.Create
 VCL Reference

TSimpleObjectBroker.Create

TSimpleObjectBroker 	See also

Creates and initializes a simple object broker.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a simple object broker at runtime.

After calling the inherited constructor, Create initializes the LoadBalanced property to False and creates the TServerCollection that implements the Servers property.


TSimpleObjectBroker.Destroy
 VCL Reference

TSimpleObjectBroker.Destroy

TSimpleObjectBroker 	See also

Destroys an instance of TSimpleObjectBroker.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which verifies that the simple object broker is not nil, and only then calls Destroy.


TSimpleObjectBroker.GetComputerForGUID
 VCL Reference

TSimpleObjectBroker.GetComputerForGUID

TSimpleObjectBroker 	See also

Returns a string that identifies an available server machine.

function GetComputerForGUID(GUID: TGUID): string; override;

Description

Call GetComputerForGUID to obtain the name of an available server machine. The GUID parameter (which specifies the global unique identifier of the desired server interface) is ignored.

GetComputerForGUID returns the ComputerName property of an available server from the Servers property. If the LoadBalanced property is True, this server is chosen at random from available servers. If the LoadBalanced property is False, this server is the first available server listed in the Servers property. If no servers are available, GetComputerForGUID raises an EBrokerException exception.

A server is considered available if its Enabled property is True and its HasFailed property is False. The broker automatically sets HasFailed to False when it is notified of a connection failure for that server.


TSimpleObjectBroker.GetComputerForProgID
 VCL Reference

TSimpleObjectBroker.GetComputerForProgID

TSimpleObjectBroker 	See also

Returns a string that identifies an available server machine.

function GetComputerForProgID(const ProgID): string; override;

Description

Call GetComputerForProgID to obtain the name of an available server machine. The ProgID parameter (which specifies the desired server interface) is ignored.

TSimpleObjectBroker returns the ComputerName property of an available server from the Servers property. If the LoadBalanced property is True, this server is chosen at random from available servers. If the LoadBalanced property is False, this server is the first available server listed in the Servers property. If no servers are available, GetComputerForGUID raises an EBrokerException exception.

A server is considered available if its Enabled property is True and its HasFailed property is False. The broker automatically sets HasFailed to False when it is notified of a connection failure for that server.


TSimpleObjectBroker.GetPortForComputer
 VCL Reference

TSimpleObjectBroker.GetPortForComputer

TSimpleObjectBroker	See also

Returns a port number for connecting to a specified remote server.

function GetPortForComputer(const ComputerName: string): Integer; virtual; abstract;

Description

Socket connection components call GetPortForComputer to get a value for their Port property. The ComputerName parameter specifies a Host name or IP address that was returned by GetComputerForGUID or GetComputerForProgID. This value is used to identify a server in the list maintained by the Servers property.


TSimpleObjectBroker.LoadFromStream
 VCL Reference

TSimpleObjectBroker.LoadFromStream

TSimpleObjectBroker	See also

Sets the value of the Servers property from a stream.

procedure LoadFromStream(Stream: TStream);

Description

Call LoadFromStream to load a list of available servers that has been previously saved using the SaveToStream method.


TSimpleObjectBroker.SaveToStream
 VCL Reference

TSimpleObjectBroker.SaveToStream

TSimpleObjectBroker	See also

Saves the value of the Servers property to a stream.

procedure SaveToStream(Stream: TStream);

Description

Call SaveToStream to save the list of available servers. The servers can be restored later by calling the LoadFromStream method.


TSimpleObjectBroker.SetConnectStatus
 VCL Reference

TSimpleObjectBroker.SetConnectStatus

TSimpleObjectBroker	See also

Records whether a connection was established to a specified server.

procedure SetConnectStatus(ComputerName: string; Success: Boolean); virtual; override;

Description

After calling GetComputerForGUID or GetComputerForProgID, connection components use the returned value to open a connection to the identified server. They then call SetConnectStatus to inform the broker of whether the connection was successfully opened.

SetConnectStatus sets the HasFailed property of the corresponding server to True if the connection was unsuccessful. It sets the HasFailed property to False if the connection was successful.

When the HasFailed property of a server is True, that server is ignored when the GetComputerForGUID or GetComputerForProgID method looks for available connections.


Hierarchy

TObject

TPersistent

TComponent

TCustomObjectBroker

TSimpleObjectBroker


TServerCollection
 VCL Reference

TServerCollection

Hierarchy	Properties	Methods	See also

TServerCollection is a collection of TServerItem objects.

Unit

ObjBrkr

Description

TSimpleObjectBroker uses TServerCollection to represent the set of available application servers to which a client application can connect. Use the properties and methods of TServerCollection to manage the set of servers. For example, you can add items as new server systems come on line, disable server items when the corresponding system is temporarily out of commission, and so on.


 VCL Reference

TServerCollection properties

TServerCollection	Alphabetically	Legend

In TServerCollection

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TServerCollection properties

TServerCollection	By object	Legend

Count

ItemClass

Items


TServerCollection.Items
 VCL Reference

TServerCollection.Items

TServerCollection	See also

Lists the TServerItem objects in the collection.

property Items[Index: Integer]: TServerItem; default;

Description

Use Items to access individual TServerItem objects maintained by TServerCollection. Items is the default property of TServerCollection, so the name of the Items property can be left off when using this property. Thus the line

TSimpleObjectBroker1.Servers.Items[I].Enabled := False;

can be written

TSimpleObjectBroker.Servers[I].Enabled := False;


 VCL Reference

TServerCollection methods

TServerCollection	Alphabetically	Legend

In TServerCollection

Create

FindServer

GetBalancedName

GetNextName

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerCollection methods

TServerCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

FindServer

Free

FreeInstance

GetBalancedName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextName

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TServerCollection.Create
 VCL Reference

TServerCollection.Create

TServerCollection	See also

Creates and initializes a TServerCollection object.

constructor Create(Owner: TComponent;

Description

Applications should not need to instantiate TServerCollection. The simple object broker that uses TServerCollection to manage its list of available servers creates this object from its own constructor.


TServerCollection.FindServer
 VCL Reference

TServerCollection.FindServer

TServerCollection	See also

Returns the server from the Items property array that has a specified computer name.

function FindServer(const ComputerName: string): TServerItem;

Description

Call FindServer to locate a server in the items property array given its ComputerName property. The ComputerName parameter specifies this computer name. Usually, this value is obtained by a previous call to GetBalancedName or GetNextName.

Note:	FindServer returns the first item it finds with the given ComputerName property. Unlike the GetBalancedName and GetNextName methods, it does not ignore servers that have failed or been disabled (HasFailed is True, or Enabled is False).


TServerCollection.GetBalancedName
 VCL Reference

TServerCollection.GetBalancedName

TServerCollection	See also

Returns the ComputerName property of a randomly chosen server from the Items property array.

function GetBalancedName: string;

Description

Call GetBalancedName to get the name of an available server. Servers in the Items property array are considered available when no connection attempts have failed (HasFailed is False) and their Enabled property has not been set to False. GetBalancedName selects an available TServerItem at random from the Items property array and returns its ComputerName property.


TServerCollection.GetNextName
 VCL Reference

TServerCollection.GetNextName

TServerCollection	See also

Returns the ComputerName property of the first available server in the Items property array.

function GetNextName: string;

Description

Call GetNextName to get the name of an available server. Servers in the Items property array are considered available when no connection attempts have failed (HasFailed is False) and their Enabled property has not been set to False. GetNextName selects the first available TServerItem in the Items property array and returns its ComputerName property.

Note:	GetNextName always returns the same name as long as the servers’ HasFailed and Enabled properties do not change. To choose an available server at random, use GetBalancedName instead.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TServerCollection


TStatusColumn
 VCL Reference

TStatusColumn

Hierarchy	Properties	Methods	See also

TStatusColumn generates an HTML control that indicates whether a record in a data grid has been modified by the end user.

Unit

MidItems

Description

Add TStatusColumn as the child of a TDataGrid component to provide feedback about whether records in the grid have been modified. The generated control displays an M if the user has edited a record, an I if the user has inserted the record, and blank if the user has made no changes to the record.

Use the properties and methods of TStatusColumn to

Specify the caption that appears at the top of the column.

Customize the appearance of the control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TStatusColumn properties

TStatusColumn	Alphabetically	Legend

Derived from TWebStatus

DisplayWidth

Derived from TWebDataDisplay

Caption

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TStatusColumn properties

TStatusColumn	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

Name

Owner

Style

StyleRule

TabIndex

Tag

VCLComObject


 VCL Reference

TStatusColumn methods

TStatusColumn	Alphabetically	Legend

In TStatusColumn

IsColumn

Derived from TWebStatus

Create

Identifier

Derived from TWebDataDisplay

Destroy

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStatusColumn methods

TStatusColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Identifier

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TStatusColumn.IsColumn
 VCL Reference

TStatusColumn.IsColumn

TStatusColumn	See also

Indicates whether the component generates a control that can appear in the column of a data grid.

class function IsColumn: Boolean; override;

Description

Call IsColumn to determine whether a Web item generates a control that represents a column in a data grid (TDataGrid). IsColumn returns True, because TStatusColumn is designed specifically for TDataGrid to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebStatus

TStatusColumn


TTextAreaColumn
 VCL Reference

TTextAreaColumn

Hierarchy	Properties	Methods	See also

TTextAreaColumn creates a multi-line HTML input control to represent a field value in a data grid.

Unit

MidItems

Description

Add TTextAreaColumn as the child of a TDataGrid component to add a multi-line edit control as the display control for a column. TTextAreaColumn represents the value of a field in the TDataGrid’s associated dataset.

Use the properties and methods of TTextAreaColumn to

Specify the field whose value the control displays.

Specify the caption that appears at the top of the column.

Customize the appearance of the control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TTextAreaColumn properties

TTextAreaColumn	Alphabetically	Legend

Derived from TWebTextAreaInput

DisplayRows

DisplayWidth

ReadOnly

Wrap

Derived from TWebDataInput

FieldName

Caption

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTextAreaColumn properties

TTextAreaColumn	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayRows

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject

Wrap


 VCL Reference

TTextAreaColumn methods

TTextAreaColumn	Alphabetically	Legend

IsColumn

Derived from TWebTextAreaInput

Create

Derived from TWebDataDisplay

Destroy

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTextAreaColumn methods

TTextAreaColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TTextAreaColumn.IsColumn
 VCL Reference

TTextAreaColumn.IsColumn

TTextAreaColumn	See also

Indicates whether the component generates a control that can appear in the column of a data grid.

class function IsColumn: Boolean; override;

Description

Call IsColumn to determine whether a Web display component generates a control that represents a column in a data grid (TDataGrid). IsColumn returns True, because TTextAreaColumn is designed specifically for TDataGrid to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextAreaInput

TTextAreaColumn


TUndoButton
 VCL Reference

TUndoButton

Hierarchy	Properties	Methods	See also

TUndoButton generates an HTML control that backs out changes to the current record.

Unit

MidItems

Description

Add TUndoButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to undo edits made in an associated display control or controls. The resulting HTML button’s action backs out all edits to the current record.

Use the properties of TUndoButton to customize the appearance of the button and associate it with a Web item that generates the display controls.


 VCL Reference

TUndoButton properties

TUndoButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TUndoButton properties

TUndoButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TUndoButton methods

TUndoButton	Alphabetically	Legend

In TUndoButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TUndoButton methods

TUndoButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TUndoButton.Create
 VCL Reference

TUndoButton.Create

TUndoButton	See also

Creates and initializes an instance of TUndoButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TUndoButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TUndoButton


TValueArray
 VCL Reference

TValueArray

Hierarchy	Properties	Methods	See also

TValueArray is a dynamically resizable array of 16-bit integers.

Unit

mxarrays

Description

Use TValueArray to represent an array of short integers when the number of elements in the array is unknown. For example, decision cubes use TValueArray objects to represent the coordinates of a cell in the multidimensional cache of summary values.


 VCL Reference

TValueArray properties

TValueArray	Alphabetically	Legend

Derived from TSmallIntArray

Items

Derived from TBaseArray

AutoSize

Capacity

CompareProc

Count

Duplicates

ItemSize

Limit

List

SortOrder


 VCL Reference

TValueArray properties

TValueArray	By object	Legend

AutoSize

Capacity

CompareProc

Count

Duplicates

Items

ItemSize

Limit

List

SortOrder


 VCL Reference

TValueArray methods

TValueArray	Alphabetically	Legend

Derived from TSmallIntArray

Add

Assign

Create

GetItem

PutItem

Derived from TBaseArray

Clear

Delete

Destroy

Exchange

FindItem

IndexOf

Insert

InsertAt

RemoveItem

Sort

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TValueArray methods

TValueArray	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Exchange

FieldAddress

FindItem

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InsertAt

InstanceSize

MethodAddress

MethodName

NewInstance

PutItem

RemoveItem

SafeCallException

Sort


Hierarchy

TObject

TPersistent

TBaseArray

TValueArray


TWebButton
 VCL Reference

TWebButton

Hierarchy	Properties	Methods	See also

TWebButton is the base class for Web items that create HTML button controls.

Unit

MidItems

Description

Use TWebButton as a base class for components that generate the HTML statements defining a specialized button control in an InternetExpress application. TWebButton introduces the properties and methods for

Generating the HTML code to define the button control.

Defining a button caption.

Specifying tag attributes of the HTML button control, including those defined by a style sheet.

In order to allow other Web items to use the HTML generated by the button control, TWebButton implements the IWebContent interface.

Do not create instances of TWebButton. TWebButton relies on an abstract method to generate the HTML statements defining a button control. Instead, create descendants of TWebButton that represent buttons with specific purposes.


 VCL Reference

TWebButton properties

TWebButton	Alphabetically	Legend

In TWebButton

Caption

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebButton properties

TWebButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject


TWebButton.Caption
 VCL Reference

TWebButton.Caption

TWebButton	See also

Specifies the caption that appears on the button.

property Caption: string;

Description

Use Caption to specify the caption that appears on the generated HTML button. The value of Caption is used as the value of a VALUE parameter on the HTML INPUT tag generated to implement the button.


TWebButton.Custom
 VCL Reference

TWebButton.Custom

TWebButton	See also

Represents a tag option and its value in the generated INPUT tag.

property Custom: string;

Description

Use Custom to represent one or more options that qualify the INPUT tag generated by the Web button. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to add an ALIGN option that aligns the caption and a TABINDEX tag to control tab order, set Custom to

ALIGN=TOP TABINDEX=2


TWebButton.Style
 VCL Reference

TWebButton.Style

TWebButton	See also

Adds style attributes to the generated button control.

property Style: string;

Description

Use Style to add a STYLE option that qualifies the INPUT tag generated by the Web button. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated INPUT tag as the value of a STYLE option.


TWebButton.StyleRule
 VCL Reference

TWebButton.StyleRule

TWebButton	See also

Applies a style in the page producer’s style sheet to the button.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated button control. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the button’s Style property.


 VCL Reference

TWebButton methods

TWebButton	Alphabetically	Legend

In TWebButton

Content

Create

Destroy

GetCaption

GetLayoutAttributes

ImplContent

SetCaption

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebButton methods

TWebButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCaption

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLayoutAttributes

GetNamePath

GetParentComponent

HasParent

ImplContent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetCaption

SetSubComponent

UpdateAction


TWebButton.Content
 VCL Reference

TWebButton.Content

TWebButton	See also

Returns the HTML that defines the button control.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string;

Description

Content implements the IWebContent method of the same name. This method allows the Web button’s parent to extract the HTML defining the button.

Content calls the virtual ImplContent method to provide the content it returns. Each TWebButton descendant overrides ImplContent to generate the definition of its particular button control.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the Web button should format the HTML control it generates. It implements the ILayoutWebContent interface.

Content returns a string of HTML defining the button control.


TWebButton.Create
 VCL Reference

TWebButton.Create

TWebButton	See also

Creates and initializes an instance of TWebButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a Web button at runtime. Web buttons added at design time using the Web Page editor are instantiated automatically.


TWebButton.Destroy
 VCL Reference

TWebButton.Destroy

TWebButton

Frees an instance of TWebButton.

destructor Destroy; override;

Description

Destroy removes the Web button from its parent’s list of components that generate HTML before freeing the button instance.


TWebButton.GetCaption
 VCL Reference

TWebButton.GetCaption

TWebButton	See also

Returns the value of the Caption property.

function GetCaption: string; virtual;

Description

GetCaption is the protected read implementation for the Caption property.


TWebButton.GetLayoutAttributes
 VCL Reference

TWebButton.GetLayoutAttributes

TWebButton	See also

Returns the layout object that specifies how the generated control should look.

function GetLayoutAttributes: TLayoutAttributes; virtual;

Description

GetLayoutAttributes is used internally by Web items to allow the layout object supplied by a parent (as a parameter to the Content method) to take into account layout properties of the child component.

As implemented by TWebButton, GetLayoutAttributes returns nil, because the layout of buttons does not make use of layout attributes.


TWebButton.ImplContent
 VCL Reference

TWebButton.ImplContent

TWebButton	See also

Provides the underlying implementation for the Content method.

function ImplContent(Options: TWebContentOptions; ParentLayout: TLayout): string; virtual; abstract;

Description

The Content method calls ImplContent to generate the HTML that defines the button control. TWebButton introduces ImplContent as an abstract method. TWebButton descendants must override ImplContent to generate the definition of their particular button control.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the Web button should format the HTML control it generates. It implements the ILayoutWebContent interface.

ImplContent returns a string of HTML defining the button control.


TWebButton.SetCaption
 VCL Reference

TWebButton.SetCaption

TWebButton	See also

Sets the value of the Caption property.

procedure SetCaption(const AValue: string); virtual;

Description

SetCaption is the protected write implementation for the Caption property.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton


TWebComponentList
 VCL Reference

TWebComponentList

Hierarchy	Properties	Methods	See also

TWebComponentList maintains a list of Web item components.

Unit

WebComp

Description

TWebComponentList provides the structure for the hierarchy of Web items that generate HTML documents in an InternetExpress application. At the top of the hierarchy is a TInetXPageProducer component, which assembles an HTML document that displays data from an application server and allows Web browsers to navigate, edit, and update that data. To assemble this document, TInetXPageProducer uses a set of helper components, each of which generates a portion of the final HTML. Each of these components, in turn, uses one or more helper components to generate a portion of its HTML, and so on. Each component that uses helper components to generate HTML maintains a list of its helper components. That list is a TWebComponentList object.

Each component in the list must support the IWebComponent interface. TWebComponentList uses this interface to coordinate the objects it manages. In addition, the components in the list should support the IWebContent interface. IWebContent allows the parent component to extract HTML generated by its children.

Use the properties and methods of TWebComponentList to

Add or delete the components in the list.

Locate and access components in the list.

Rearrange components in the list.

Access the parent component that uses the list.


 VCL Reference

TWebComponentList properties

TWebComponentList	Alphabetically	Legend

In TWebComponentList

Count

ParentComponent

WebComponents


 VCL Reference

TWebComponentList properties

TWebComponentList	By object	Legend

Count

ParentComponent

WebComponents


TWebComponentList.Count
 VCL Reference

TWebComponentList.Count

TWebComponentList	See also

Indicates the number of components in the list.

property Count: Integer;

Description

Read Count to determine the number of components in the WebComponents array. Count is a read-only property. To change the size of the WebComponents array, add or remove components using the Add and Remove methods.


TWebComponentList.ParentComponent
 VCL Reference

TWebComponentList.ParentComponent

TWebComponentList	See also

Identifies the component that uses this Web component list to maintain its Web Items.

property ParentComponent: TComponent;

Description

Read ParentComponent to access the parent of the Web Items in the list. The value of ParentComponent is assigned in the constructor when the parent first instantiates the Web component list.


TWebComponentList.WebComponents
 VCL Reference

TWebComponentList.WebComponents

TWebComponentList	See also

Lists the Web items in the list.

property WebComponents[Index: Integer]: TComponent; default;

Description

Use WebComponents to access the Web components listed by TWebComponentList. Use WebComponents with the Count property to iterate through all of the components in the list. Use the Add or Remove method to add or remove components from the list.

WebComponents is the default property for TWebComponentList. This means that the property name can be omitted when accessing a component in the list. Thus, the line

WebItem := InetXPageProducer1.WebPageItems.WebComponents[0];

can be written

WebItem := InetXPageProducer1.WebPageItems[0];


 VCL Reference

TWebComponentList events

TWebComponentList	Alphabetically	Legend

In TWebComponentList

OnChange


 VCL Reference

TWebComponentList events

TWebComponentList	By object	Legend

OnChange


TWebComponentList.OnChange
 VCL Reference

TWebComponentList.OnChange

TWebComponentList

Occurs when a change occurs in the web component list.

property OnChange: TNotifyEvent;

Description

Use OnChange to write an event handler to process an action when a change occurs in the web component list, such as when a new component is added.


 VCL Reference

TWebComponentList methods

TWebComponentList	Alphabetically	Legend

In TWebComponentList

Add

Clear

Create

Destroy

IndexOf

Remove

SetComponentIndex

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebComponentList methods

TWebComponentList	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException

SetComponentIndex


TWebComponentList.Add
 VCL Reference

TWebComponentList.Add

TWebComponentList	See also

Inserts a new component at the end of the list.

procedure Add(Component: TComponent);

Description

Call Add to insert a component at the end of the WebComponents array.

Add increments the Count property. After calling Add, the value of Count is one greater than the index of the inserted component in the WebComponents array. To move this component to another position, use the SetComponentIndex method.


TWebComponentList.Clear
 VCL Reference

TWebComponentList.Clear

TWebComponentList	See also

Deletes all components from the list.

procedure Clear;

Description

Call Clear to empty the WebComponents array and set Count to 0.


TWebComponentList.Create
 VCL Reference

TWebComponentList.Create

TWebComponentList

Creates and initializes new TWebComponentList object.

constructor Create(AParentComponent: TComponent);

Description

Call Create to instantiate TWebComponentList at runtime. Most applications do not need to instantiate TWebComponentList. Instead, the Web items that use TWebComponentList to manage their own Web items instantiate a TWebComponentList from their constructors.


TWebComponentList.Destroy
 VCL Reference

TWebComponentList.Destroy

TWebComponentList	See also

Frees an instance of TWebComponentList.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free. Free verifies that the TWebComponentList reference is not nil, and only then calls Destroy.

Destroy frees the memory used to store the list of WebComponents.

Note:	Destroy does not free the components in the list.


TWebComponentList.IndexOf
 VCL Reference

TWebComponentList.IndexOf

TWebComponentList	See also

Returns the index of a specified component in the WebComponents array.

function IndexOf(Component: TComponent): Integer;

Description

Call IndexOf to get the index for a component in the WebComponents array. Specify the desired component as the Component parameter.

The first component in the array has index 0, the second component has index 1, and so on. If a component is not in the list, IndexOf returns -1. If a component appears more than once in the array, IndexOf returns the index of the first appearance.


TWebComponentList.Remove
 VCL Reference

TWebComponentList.Remove

TWebComponentList	See also

Removes a component from the WebComponents array.

procedure Remove(Component: TComponent);

Description

Call Remove to remove a specific component from the WebComponents array. After a component is removed, all the WebComponents that follow it are moved up in index position and Count is reduced by one.


TWebComponentList.SetComponentIndex
 VCL Reference

TWebComponentList.SetComponentIndex

TWebComponentList	See also

Moves a component to a new position in the WebComponents array.

procedure SetComponentIndex(Component: TComponent; Value: Integer);

Description

Call SetComponentIndex to move a component to a new position in the list. Component specifies the component to move. Value specifies the index it should have after it is moved. If Value is less than 0, the component is moved to the first position. If Value is greater than or equal to count, the component is moved to the last position.


Hierarchy

TObject

TPersistent

TWebComponentList


TXMLDisplayGroup
 VCL Reference

TXMLDisplayGroup

Hierarchy	Properties	Methods	See also

TXMLDisplayGroup is the base class for Web items that arrange a set of special-purpose controls in an HTML form.

Unit

MidItems

Description

Use TXMLDisplayGroup as a base class for Web items that generate the HTML to arrange a collection of HTML controls. Each TXMLDisplayGroup object maintains a list of Web items that display information in the final HTML document. The XML display group arranges the controls that these items generate.

If the controls generated for TXMLDisplayGroup by its Web items represent database information, you can bind the XML display group to an XML data packet or dataset field within an XML data packet. The Web items can use that binding to determine the source of the data they display.

In order to let other Web items use the HTML that the TXMLDisplayGroup object generates, TXMLDisplayGroup inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TXMLDisplayGroup. TXMLDisplayGroup manages the Web items that generate display controls, but does not produce any content. Instead, use a descendant of TXMLDisplayGroup that generates the HTML for its set of specialized controls such as TDataGrid, TFieldGroup or TQueryFieldGroup.


 VCL Reference

TXMLDisplayGroup properties

TXMLDisplayGroup	Alphabetically	Legend

In TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLDisplayGroup properties

TXMLDisplayGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


TXMLDisplayGroup.VisibleFields
 VCL Reference

TXMLDisplayGroup.VisibleFields

TXMLDisplayGroup	See also

Indicates the controls displayed by the HTML that the XML display group generates.

property VisibleFields: TWebComponentList;

Description

Use VisibleFields to access the components that generate HTML controls for the XML display group. If a set of Web items is explicitly assigned to the WebFieldControls property, VisibleFields has the same value as WebFieldControls. Otherwise, VisibleFields represents a set of default Web items that generate display controls for all the fields or parameters of the associated dataset or dataset field.

When no Web items are assigned to WebFieldControls, the default Web items in the VisibleFields list are specific to the TXMLDisplayGroup descendant.


TXMLDisplayGroup.XMLBroker
 VCL Reference

TXMLDisplayGroup.XMLBroker

TXMLDisplayGroup	See also

Binds the XML display group to an XML broker that represents a dataset.

property XMLBroker: TXMLBroker;

Description

Most XML display groups contain controls that represent database information. TDataGrid and TFieldGroup represent the fields from a dataset. By default, TQueryFieldGroup represents the parameter values for a query or stored procedure or field values that filter a table. XMLBroker indicates the XML broker component that fetches XML data packets for the dataset whose values the controls display.

If the controls arranged by TXMLDisplayGroup represent the data from a dataset nested within the XML broker’s data packet, use the XMLDataSetField to indicate which dataset field to use from the data packet associated with XMLBroker.


TXMLDisplayGroup.XMLDataSetField
 VCL Reference

TXMLDisplayGroup.XMLDataSetField

TXMLDisplayGroup	See also

Binds the XML display group to a nested dataset from the XML data packet.

property XMLDataSetField: string;

Description

Most XML display groups contain controls that represent database information. TDataGrid and TFieldGroup represent the fields from a dataset. By default, TQueryFieldGroup represents the parameter values for a query or stored procedure or field values that filter a table. If the database information comes from the dataset represented by an XML broker’s data packet, XMLDataSetField is an empty string and the XMLBroker property fully describes the dataset. However, if the database information comes from a nested detail set, XMLDataSetField indicates what detail dataset to use from the data packet associated with XMLBroker.

Specify the name of the dataset field as the value of XMLDataSetField. If the XML display group is bound to the detail set of a detail set, you can use periods to qualify dataset field names. Thus, for example, if XMLBroker represents a customer dataset with a nested Orders dataset field that has its own nested LineItems field, you can bind the XML display group to the LineItems dataset by setting XMLDataSetField to

Orders.LineItems


 VCL Reference

TXMLDisplayGroup methods

TXMLDisplayGroup	Alphabetically	Legend

In TXMLDisplayGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLDisplayGroup methods

TXMLDisplayGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TXMLDisplayGroup.Create
 VCL Reference

TXMLDisplayGroup.Create

TXMLDisplayGroup	See also

Creates and initializes an instance of TXMLDisplayGroup.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TXMLDisplayGroup at runtime. TXMLDisplayGroup components added at design time using the Web Page editor are instantiated automatically.


TXMLDisplayGroup.Destroy
 VCL Reference

TXMLDisplayGroup.Destroy

TXMLDisplayGroup	See also

Frees an instance of TXMLDisplayGroup.

Description

Do not call Destroy directly. Instead, call Free, which checks that the object is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup


TXMLDisplayReferenceButton
 VCL Reference

TXMLDisplayReferenceButton

Hierarchy	Properties	Methods	See also

TXMLDisplayReferenceButton is the base class for Web items that generate HTML buttons for influencing controls that display data.

Unit

MidItems

Description

Use TXMLDisplayReferenceButton as a base class for components that generate the HTML statements defining a specialized button control for working with a data display control in the Web page produced by TInetXPageProducer.

TXMLDisplayReferenceButton defines properties and methods for

Generating the HTML code to define the button.

Associating the button with another Web item that generates a data display control.

Specifying tag attributes of the HTML button control, including those defined by a style sheet.

Fitting the component into a hierarchy of Web items, each of which generates part of a larger HTML document.

In order to allow other Web items to use the HTML generated by the button control, TXMLDisplayReferenceButton inherits support for the IWebContent interface from TWebButton.

Do not create instances of TXMLDisplayReferenceButton. TXMLDisplayReferenceButton relies on an abstract method to generate the HTML statements defining a button control. Instead, create descendants of TXMLDisplayReferenceButton, such as TPostButton, TInsertButton, and so on.


 VCL Reference

TXMLDisplayReferenceButton properties

TXMLDisplayReferenceButton	Alphabetically	Legend

In TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Caption

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLDisplayReferenceButton properties

TXMLDisplayReferenceButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


TXMLDisplayReferenceButton.XMLComponent
 VCL Reference

TXMLDisplayReferenceButton.XMLComponent

TXMLDisplayReferenceButton	See also

Associates the button with the component that generates the display control it influences.

property XMLComponent: TComponent;

Description

Set XMLComponent to specify the Web item that generates a display control that the button influences.

Note:	Typically, descendants of TXMLDisplayReferenceButton are used by a descendant of TXMLDisplayReferenceGroup, which has its own XMLComponent property. If the button influences this same component, you need not set the XMLComponent property. Instead, setting the XMLUseParent property to True (the default) sets XMLComponent to the value of the parent’s XMLComponent property.


TXMLDisplayReferenceButton.XMLUseParent
 VCL Reference

TXMLDisplayReferenceButton.XMLUseParent

TXMLDisplayReferenceButton	See also

Specifies whether the button is associated with its parent’s display object.

property XMLUseParent: Boolean;

Description

Use XMLUseParent to indicate how the dataset button determines the component that it influences. When XMLUseParent is False, the XMLComponent property must be set to indicate the display component. When XMLUseParent is True, the button influences the component specified by its parent’s XMLComponent property.

The button’s parent is the Web item that uses the button to assemble its own HTML content (typically a TDataNavigator or TQueryButtons object). If the parent does not have an associated display component, setting XMLUseParent to True sets the XMLComponent property to nil.


 VCL Reference

TXMLDisplayReferenceButton methods

TXMLDisplayReferenceButton	Alphabetically	Legend

In TXMLDisplayReferenceButton

Create

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLDisplayReferenceButton methods

TXMLDisplayReferenceButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TXMLDisplayReferenceButton.Create
 VCL Reference

TXMLDisplayReferenceButton.Create

TXMLDisplayReferenceButton	See also

Creates and initializes an instance of TXMLDisplayReferenceButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a dataset button at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


TXMLDisplayReferenceButton.Destroy
 VCL Reference

TXMLDisplayReferenceButton.Destroy

TXMLDisplayReferenceButton

Frees an instance of TXMLDisplayReferenceButton.

destructor Destroy; override;

Description

Destroy removes the button from its parent’s list of components that generate HTML.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton


TApplyUpdatesButton
 VCL Reference

TApplyUpdatesButton

Hierarchy	Properties	Methods	See also

TApplyUpdatesButton generates an HTML control that sends an Update message to the XML broker on an InternetExpress application.

Unit

MidItems

Description

Add TApplyUpdatesButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to submit changes made by end users. The resulting HTML button’s action generates an HTTP message that forwards all changes to a specific XML data packet back to the XML broker on the InternetExpress application.

Use the properties of TApplyUpdatesButton to customize the appearance of the button and associate it with an XML broker. The associated XML broker adds the XML data packet to the HTML document and responds to update messages generated by the apply updates button on the HTML form.


 VCL Reference

TApplyUpdatesButton properties

TApplyUpdatesButton	Alphabetically	Legend

Derived from TXMLButton

Caption

XMLBroker

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TApplyUpdatesButton properties

TApplyUpdatesButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLBroker

XMLUseParent


 VCL Reference

TApplyUpdatesButton methods

TApplyUpdatesButton	Alphabetically	Legend

In TApplyUpdatesButton

Create

Derived from TXMLButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TApplyUpdatesButton methods

TApplyUpdatesButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TApplyUpdatesButton.Create
 VCL Reference

TApplyUpdatesButton.Create

TApplyUpdatesButton	See also

Creates and initializes an instance of TApplyUpdatesButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TApplyUpdatesButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLButton

TApplyUpdatesButton


EArrayError
 VCL Reference

EArrayError

Hierarchy	Properties	Methods	See also

EArrayError is the exception class for failures that occur when manipulating a descendant of TBaseArray.

Unit

mxarrays

Description

EArrayError is raised when an application tries to

Use an invalid index when accessing the elements of an array.

Add too many elements into a fixed-capacity array.

Insert an element into a sorted array.


 VCL Reference

EArrayError properties

EArrayError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EArrayError properties

EArrayError	By object	Legend

HelpContext

Message


 VCL Reference

EArrayError methods

EArrayError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EArrayError methods

EArrayError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EArrayError


TBaseArray
 VCL Reference

TBaseArray

Hierarchy	Properties	Methods	See also

TBaseArray is the base class for all arrays used by the decision cube components.

Unit

mxarrays

Description

Use TBaseArray as a base class when defining a specialized array for a specific data type. Like the TList or TStringList object, TBaseArray represents an ordered list of items that can grow dynamically. However, the elements of TBaseArray are arbitrary types whose size is specified in the constructor, while TStringList is limited to strings and TList is limited to pointers.

Descendants of TBaseArray represent arrays of specific data types such as short integers.

Note:	TBaseArray is only available in the Enterprise edition.


 VCL Reference

TBaseArray properties

TBaseArray	Alphabetically	Legend

In TBaseArray

AutoSize

Capacity

CompareProc

Count

Duplicates

ItemSize

Limit

List

SortOrder


 VCL Reference

TBaseArray properties

TBaseArray	By object	Legend

AutoSize

Capacity

CompareProc

Count

Duplicates

ItemSize

Limit

List

SortOrder


TBaseArray.AutoSize
 VCL Reference

TBaseArray.AutoSize

TBaseArray	See also

Indicates whether the array grows dynamically as items are added.

property AutoSize: Boolean;

Description

Set AutoSize to True to allow the array to hold an arbitrary number of values. When AutoSize is True, the Capacity property increases automatically when new items are added beyond the current capacity of the array. When AutoSize is False, the Capacity property must be explicitly set to the number of entries allowed in the array. If an attempt is made to add items beyond the number specified in the Capacity property, an EArrayError exception is raised if AutoSize is False.


TBaseArray.Capacity
 VCL Reference

TBaseArray.Capacity

TBaseArray	See also

Specifies the maximum number of items that can be added to the array.

property Capacity: Integer;

Description

Set Capacity to change the amount of memory allocated for the array. Trying to set Capacity to a value less than the Count property will raise an EArrayError exception.

If the AutoSize property is True, the Capacity of the array increases automatically when necessary to accommodate new items as they are added.

Note:	To determine the amount of memory used by the array, use Capacity * ItemSize.


TBaseArray.CompareProc
 VCL Reference

TBaseArray.CompareProc

TBaseArray	See also

Implements a sort order for the elements of the array.

type TCompareProc = function ( var item1, item2 ): Integer;

property CompareProc: TCompareProc;

Description

Set CompareProc to change the function that is used to sort the items of the array. If the SortOrder property is not TS_NONE, CompareProc is used to locate the position in which to add new items to the array and to locate items using the FindItem method.

CompareProc should compare the two items given as parameters and return a value less than 0 if item1 comes before item2, return a value greater than 0 if item1 comes after item2, and return 0 if item1 is the same as item2.


TBaseArray.Count
 VCL Reference

TBaseArray.Count

TBaseArray	See also

Specifies the number of items in the array.

property Count: Integer;

Description

Read Count to determine the number of entries in the array. Set Count to increase or decrease the number of entries. Increasing Count always increases the Capacity if necessary, even if the AutoSize property is False. Decreasing the Count property truncates the array after Count items, but does not affect the Capacity of the array.

When the value of Count is increased, new entries with the value of 0 are added to the end of the array. If the array is sorted, this will throw off the internal sort order, and cause the FindItem method to fail. If the array is sorted, call the Sort method to restore the sort order after filling the newly added members of the array.


TBaseArray.Duplicates
 VCL Reference

TBaseArray.Duplicates

TBaseArray	See also

Specifies whether duplicate items can be added to sorted arrays.

type TDuplicates = (dupIgnore, dupAccept, dupError);

property Duplicates: TDuplicates;

Description

Set Duplicates to specify what should happen when an attempt is made to add a duplicate item to a sorted array. The value of Duplicates should be one of the following.

Value	Meaning

dupIgnore	Ignore attempts to add duplicate items to the sorted array.

dupError	Raise an EArrayError exception when an attempt is made to add duplicate items to the sorted array.

dupAccept	Permit duplicate items in the sorted array.

Set Duplicates before adding any items to the list. Setting Duplicates to dupIgnore or dupError does nothing about duplicate strings that are already in the array.

Note:	Duplicates does nothing if the array is not sorted.


TBaseArray.ItemSize
 VCL Reference

TBaseArray.ItemSize

TBaseArray	See also

Indicates the number of bytes used to store each item in the array.

property ItemSize: Integer;

Description

Read ItemSize to determine the size of the elements of the array. The value of ItemSize is set by the Create method to the value of the iSize parameter. Descendants of TBaseArray change this value to the size of the data type they represent.


TBaseArray.Limit
 VCL Reference

TBaseArray.Limit

TBaseArray	See also

Specifies the size of the array.

property Limit: Integer;

Description

Use Limit to determine the size of the array. If the array is empty, Limit is the same as the Capacity property. If the array is not empty, Limit is the same as the Count property, even if the value of Capacity is larger than Count. Setting Limit sets the Capacity of the array.


TBaseArray.List
 VCL Reference

TBaseArray.List

TBaseArray	See also

Points to the array of values maintained by TBaseArray.

property List: Pointer;

Description

Use List to get direct access to the memory used to store the array items. Calculate the position of individual items in the list using the ItemSize property.

To access specific items in the list, use the GetItem method.


TBaseArray.SortOrder
 VCL Reference

TBaseArray.SortOrder

TBaseArray	See also

Determines whether the array is sorted.

type TSortOrder = (TS_NONE, TS_ASCENDING, TS_DESCENDING);

property SortOrder: TSortOrder;

Description

Set SortOrder to indicate whether the array should be sorted using the CompareProc property. When an array is sorted, all new items are added in the correct sort-order position so as to maintain the sort order. SortOrder can have one of the following values:

Value	Meaning

TS_NONE	The array is unsorted.

TS_ASCENDING	The elements of the array are sorted in ascending order.

TS_DESCENDING	The elements of the array are sorted in descending order.

Setting the SortOrder property does not sort the items already in the array. If the array is not empty when the SortOrder property is changed to TS_ASCENDING or TS_DESCENDING, be sure to explicitly call the Sort method to sort the existing items.

Note:	The Duplicates property has no effect when SortOrder is TS_NONE.


 VCL Reference

TBaseArray methods

TBaseArray	Alphabetically	Legend

In TBaseArray

Clear

Create

Delete

Destroy

Exchange

FindItem

GetItem

IndexOf

Insert

InsertAt

PutItem

RemoveItem

Sort

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBaseArray methods

TBaseArray	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Exchange

FieldAddress

FindItem

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InsertAt

InstanceSize

MethodAddress

MethodName

NewInstance

PutItem

RemoveItem

SafeCallException

Sort


TBaseArray.Clear
 VCL Reference

TBaseArray.Clear

TBaseArray	See also

Clear removes all items from the array.

procedure Clear;

Description

Call Clear to empty the array and free all associated memory. Clear does the same thing as setting both the Count and Capacity properties to 0.


TBaseArray.Create
 VCL Reference

TBaseArray.Create

TBaseArray	See also

Creates an instance of TBaseArray for elements of a specific size.

constructor Create( Itemcount, iSize: Integer ); virtual;

Description

Call Create to create an array containing elements with the size specified by the iSize parameter.Create sets the Capacity property to Itemcount and the ItemSize property to iSize. It also initializes the AutoSize property to True and the Count property to 0.


TBaseArray.Delete
 VCL Reference

TBaseArray.Delete

TBaseArray	See also

Removes an element from the array.

procedure Delete(Index: Integer); virtual;

Description

Call Delete to remove the element indicated by the Index parameter, where 0 is the first element, 1 is the second element, and so on. All subsequent elements in the array are moved up to fill the gap left when the element is removed.


TBaseArray.Destroy
 VCL Reference

TBaseArray.Destroy

TBaseArray	See also

Destroys an instance of TBaseArray.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the array reference is not nil before calling Destroy.

Destroy frees the memory allocated to hold the list of elements before calling the inherited destructor.


TBaseArray.Exchange
 VCL Reference

TBaseArray.Exchange

TBaseArray	See also

Provides the interface for a method that swaps the values of two elements in the array.

procedure Exchange(Index1, Index2: Integer); virtual;

Description

The Exchange method for TBaseArray does nothing other than provide an interface for a method that interchanges the values of two elements.


TBaseArray.FindItem
 VCL Reference

TBaseArray.FindItem

TBaseArray	See also

Locates a value in a sorted array and indicates whether an element with that value already exists.

function FindItem( var Index: Integer; var Value ): Boolean;

Description

Use FindItem to obtain the index in a sorted array where an element with the value Value should be added. If an element with the value Value already exists in the array, FindItem returns True. If none of the elements in the array have the value Value, FindItem returns False.

The index where Value should appear is returned in the Index parameter. The value of Index is zero-based, where the first element has the index 0, the second element has the index 1, and so on.

Note:	FindItem assumes the SortOrder property is TS_ASCENDING. For unsorted arrays, use the IndexOf method instead. For descending arrays, invert the CompareProc property before calling FindItem.


TBaseArray.GetItem
 VCL Reference

TBaseArray.GetItem

TBaseArray	See also

Returns the element in the array at the indicated position.

procedure GetItem(index: Integer; var Value );

Description

Call GetItem to obtain the value of an element in the array. The Index parameter indicates the element of the array, where the first element has the index 0, the second element has the index 1, and so on.


TBaseArray.IndexOf
 VCL Reference

TBaseArray.IndexOf

TBaseArray	See also

Returns the position of the first element with a specified value.

function IndexOf( var Item ): Integer; virtual;

Description

Call IndexOf to obtain the position of the first occurrence of the value Value. IndexOf returns the 0-based index of the element. Thus, if Value matches the first element in the array, IndexOf returns 0, if Value matches the second element, IndexOf returns 1, and so on. If the value is not in the array, IndexOf returns -1.

Note:	IndexOf does not work for arrays sorted in descending order.


TBaseArray.Insert
 VCL Reference

TBaseArray.Insert

TBaseArray	See also

Inserts an element into the array and assigns it a value.

procedure Insert(Index: Integer; var Value ); virtual;

Description

Call InsertAt to add an element to the array at the position specified by Index and assign it the value Value. If Index is 0, the element is inserted at the beginning of the array. If Index is 1, the element is put in the second position of the array, and so on.

Note:	Insert does not check the SortOrder property. If the array is sorted, be sure to insert the element in the proper sort-order position.


TBaseArray.InsertAt
 VCL Reference

TBaseArray.InsertAt

TBaseArray	See also

Adds an element to the array at the position specified by Index.

procedure InsertAt(Index: Integer; const Value: Variant);

Description

InsertAt does the same thing as the Insert method. For most purposes, use the Insert method.

Descendants of TBaseArray can override the Insert method to raise an exception when an attempt is made to insert an element in a sorted array. InsertAt always succeeds as long as the value of Index is appropriate. InsertAt is intended for internal use when the value of Index is known to be appropriate.


TBaseArray.PutItem
 VCL Reference

TBaseArray.PutItem

TBaseArray	See also

Replaces the value of an element in the array.

procedure PutItem(Index: Integer; var Value );

Description

Call PutItem to change the value of an element to the value Value. Unlike the Insert method, PutItem does not add a new item to the array, but replaces the value of an existing element. The Index parameter indicates which element to change, where 0 specifies the first element, 1 specifies the second element, and so on.

Note:	Calling PutItem with Index set to the value of the Count property will add a new element to the end of the array. This is the only case where PutItem adds a new element instead of replacing an existing one.


TBaseArray.RemoveItem
 VCL Reference

TBaseArray.RemoveItem

TBaseArray	See also

Removes an element from the array.

procedure RemoveItem(Index: Integer);

Description

RemoveItem does the same thing as the Delete method. Use the Delete method instead.


TBaseArray.Sort
 VCL Reference

TBaseArray.Sort

TBaseArray	See also

Provides the interface for a method that sorts the elements in the array.

type TCompareProc = function (var item1, item2): Integer;

procedure Sort(Compare: TCompareProc); virtual;

Description

The Sort method for TBaseArray does nothing. Descendants of TBaseArray override this method to sort the elements of the array using the ordering function provided in the Compare parameter.


Hierarchy

TObject

TPersistent

TBaseArray


TBaseInetXPageProducer
 VCL Reference

TBaseInetXPageProducer

Hierarchy	Properties	Methods	Events	See also

TBaseInetXPageProducer is an base class for InternetExpress page producer classes.

Unit

MidProd

Description

Do not create instances of TBaseInetXPageProducer. Instead, use one of its descendant classes, such as TInetXPageProducer.

TBaseInetXPageProducer introduces the logic for working with an XML broker to obtain database information and for translating the special HTML-transparent tags that are used in InternetExpress applications. Unlike its immediate descendant (TCustomInetXPageProducer) however, TBaseInetXPageProducer does not initialize the HTMLDoc property to the default template for an InternetExpress application, although it dynamically generates the InternetExpress-specific tags.

You can use TBaseInetXPageProducer as a base class when writing a page producer that does not use the default template, but which translates InternetExpress tags into HTML and javascript.


 VCL Reference

TBaseInetXPageProducer properties

TBaseInetXPageProducer	Alphabetically	Legend

In TBaseInetXPageProducer

EnableXMLIslands

IncludePathURL

Styles

StylesFile

Derived from TBasePageItemsProducer

WebPageItems

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBaseInetXPageProducer properties

TBaseInetXPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

EnableXMLIslands

IncludePathURL

Name

Owner

ScriptEngine

StripParamQuotes

Styles

StylesFile

Tag

VCLComObject

WebModuleContext

WebPageItems


TBaseInetXPageProducer.EnableXMLIslands
 VCL Reference

TBaseInetXPageProducer.EnableXMLIslands

TBaseInetXPageProducer	See also

Specifies whether XML data packets should be declared using XML islands if the requesting browser supports them.

property EnableXMLIslands: Boolean;

Description

Set EnableXMLIslands to indicate whether the XML in the generated HTML document should be declared using XML islands. XML islands are only used if the document is created in response to a request message whose headers indicate that the browser supports XML islands.

Set EnableXMLIslands to False to prevent the page producer from declaring XML islands even if the requesting browser supports them.


TBaseInetXPageProducer.IncludePathURL
 VCL Reference

TBaseInetXPageProducer.IncludePathURL

TBaseInetXPageProducer	See also

Indicates the URL where the javascript libraries are installed.

property IncludePathURL: string;

Description

Set IncludePathURL to indicate where the javascript libraries are installed. The page producer uses this value to create HTML statements that include the libraries in the generated HTML document. These statements have the form

<SCRIPT language=Javascript type="text/javascript" SRC="IncludePathURL/xmldb.js"> </SCRIPT>

The javascript libraries define classes and methods that allow the HTML document to interpret XML data packets if the Web browser is not XML-enabled, and that enable controls in the document to navigate the data, post changes, and apply updates.


TBaseInetXPageProducer.Styles
 VCL Reference

TBaseInetXPageProducer.Styles

TBaseInetXPageProducer	See also

Defines the styles that can be used by the page producer and its Web items.

property Styles: TStrings;

Description

Use Styles to define a style sheet for the HTML document produced by TBaseInetXPageProducer. Each string in the TStrings object specifies a specific style by giving a style selector followed by a set of attributes in curly braces. These definitions can define styles for standard HTML elements such as

H2 B  {color: red}

or they can define styles that you name, such as

.MyStyle  {font-family: arial; font-weight: bold; font-size: 18px }

Note that user-defined style names must begin with a dot.

Styles for standard elements are applied automatically to HTML that uses the tag or tags that form the style selector. User-defined styles can be applied by setting the StyleRule property of a Web item to the user-defined style name that forms the selector.

Note:	If you are sharing a set of styles between multiple page producers or multiple applications, you can define the styles in a file. To define the styles in a file, use the StylesFile property instead. If StylesFile is defined, it takes precedence over the Styles property.


TBaseInetXPageProducer.StylesFile
 VCL Reference

TBaseInetXPageProducer.StylesFile

TBaseInetXPageProducer	See also

Specifies a file containing the individual styles for the page producer’s style sheet.

property StylesFile: TFileName;

Description

Set StylesFile to the name of a file containing the style definitions used by the page producer. The page producer uses these style definitions to declare a style sheet in the HTML document it generates.

Styles for standard elements are applied automatically to HTML in the document. User-defined styles can be applied by setting the StyleRule property of a Web item to the user-defined style name that forms the selector of a style definition.

Note:	If the StylesFile property is not set, you can specify the style definitions using the Styles property instead.


 VCL Reference

TBaseInetXPageProducer events

TBaseInetXPageProducer	Alphabetically	Legend

In TBaseInetXPageProducer

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TBaseInetXPageProducer events

TBaseInetXPageProducer	By object	Legend

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

OnHTMLTag


TBaseInetXPageProducer.OnAfterGetContent
 VCL Reference

TBaseInetXPageProducer.OnAfterGetContent

TBaseInetXPageProducer	See also

Occurs after the page producer generates its HTML document.

property OnAfterGetContent: TNotifyEvent;

Description

Write an OnAfterGetContent event handler to take specific action immediately after the page producer generates an HTML document. This event occurs immediately before the Content method returns the generated document. Typically it is used in applications where the page producer automatically responds to messages as the Provider property of an action item or the Response producer property of an XML broker.


TBaseInetXPageProducer.OnAfterGetXMLData
 VCL Reference

TBaseInetXPageProducer.OnAfterGetXMLData

TBaseInetXPageProducer	See also

Occurs after the page producer translates fetches an XML data packet from an XML broker.

property OnAfterGetXMLData: TXMLDataEvent;

Description

Write an OnAfterGetXMLData event handler to take specific action immediately after the page producer obtains an XML data packet from an XML broker. Typically, the OnAfterGetXMLData event handler responds to any values returned by the provider on the application server as the OwnerData parameter.

When the page producer generates its HTML document (that is, when the Content method executes), it adds code to define the XML data packets manipulated in the document. To fetch these XML data packets, the page producer calls an XML broker’s RequestRecords method. OnAfterGetXMLData occurs after the page producer has returned an XML data packet but before it is assigned as part of the emerging content.


TBaseInetXPageProducer.OnBeforeGetContent
 VCL Reference

TBaseInetXPageProducer.OnBeforeGetContent

TBaseInetXPageProducer	See also

Occurs when the Content method is called.

property OnBeforeGetContent: TNotifyEvent;

Description

Write an OnBeforeGetContent event handler to take specific action immediately before the page producer generates an HTML document. This event occurs when the Content method is called before the page producer starts assembling its HTML document. Typically it is used in applications where the page producer automatically responds to messages as the Provider property of an action item or the Response producer property of an XML broker.


TBaseInetXPageProducer.OnBeforeGetXMLData
 VCL Reference

TBaseInetXPageProducer.OnBeforeGetXMLData

TBaseInetXPageProducer	See also	Example

Occurs before the page producer fetches an XML data packet from an XML broker.

property OnAfterGetXMLData: TXMLDataEvent;

Description

Write an OnBeforeGetXMLData event handler to take specific action immediately before the page producer requests an XML data packet from an XML broker. Typically, the OnBeforeGetXMLData event handler encodes any values for the provider on the application server as the OwnerData parameter or initializes properties on the XML broker that affect the data packet.

When the page producer generates its HTML document (that is, when the Content method executes), it adds code to define the XML data packets manipulated in the document. To fetch these XML data packets, the page producer calls an XML broker’s RequestRecords method. OnBeforeGetXMLData occurs immediately before the page producer requests an XML data packet. Any value assigned to the OwnerData parameter is passed to the XML broker’s OnRequestRecords event handler, and from there to the provider’s OnBeforeGetRecords event handler.


 VCL Reference

TBaseInetXPageProducer methods

TBaseInetXPageProducer	Alphabetically	Legend

In TBaseInetXPageProducer

ContentFromStream

Create

FindXMLBroker

FindXMLBrokerName

GetRequiredTags

GetXMLData

SetIncludePathURL

SetStyles

SetStylesFile

Derived from TBasePageItemsProducer

Destroy

Derived from TBasePageProducer

Content

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBaseInetXPageProducer methods

TBaseInetXPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindXMLBroker

FindXMLBrokerName

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetRequiredTags

GetXMLData

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetIncludePathURL

SetStyles

SetStylesFile

SetSubComponent

UpdateAction


TBaseInetXPageProducer.ContentFromStream
 VCL Reference

TBaseInetXPageProducer.ContentFromStream

TBaseInetXPageProducer	See also

Returns the content produced in response to input read from a stream.

function ContentFromStream(Stream: TStream): string; override;

Description

Call ContentFromStream to retrieve the content produced by the content producer based on the information provided by the Stream parameter. ContentFromStream

1. Generates an OnBeforeGetContent event.

2. Translates the HTML template that is the value of Stream, using information produced by the items listed in the WebPageItems property.

3. Generates an OnAfterGetContent event.

4. Returns the HTML produced in step 2.


TBaseInetXPageProducer.Create
 VCL Reference

TBaseInetXPageProducer.Create

TBaseInetXPageProducer	See also

Creates an instance of a TBaseInetXPageProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TBaseInetXPageProducer component at runtime if it was not created at design time.

AOwner is the component, typically the Web module, that becomes the value of this page producer’s Owner property. The Owner is responsible for freeing the TBaseInetXPageProducer instance.


TBaseInetXPageProducer.FindXMLBroker
 VCL Reference

TBaseInetXPageProducer.FindXMLBroker

TBaseInetXPageProducer	See also

Returns the XML broker that supplies the data packet specified by a DATAPACKET tag.

function FindXMLBroker(TagParams: TStrings): TXMLBroker; virtual;

Description

The page producer translates HTML-transparent tags of the form

<#DATAPACKET XMLBroker=BrokerName>

into the XML returned by the XML broker. To do so, it calls FindXMLBroker to locate the XML broker specified by the XMLBroker parameter.

TagParams is a set of Name=Value pairs. This comes from the parameter portion of the DATAPACKET tag.

FindXMLBroker returns the XML broker with the name specified by the XMLBroker parameter. If TagParams does not contain a string of the form XMLBroker=BrokerName, FindXMLBroker returns nil.


TBaseInetXPageProducer.FindXMLBrokerName
 VCL Reference

TBaseInetXPageProducer.FindXMLBrokerName

TBaseInetXPageProducer	See also

Returns the name of an XML broker given the parameters in a DATAPACKET tag..

function FindXMLBrokerName(TagParams: TStrings): string; virtual;

Description

The page producer translates HTML-transparent tags of the form

<#DATAPACKET XMLBroker=BrokerName>

into the XML returned by the XML broker. To do so, it calls FindXMLBrokerName to parse the parameters for the value of the XMLBroker parameter.

TagParams is a set of Name=Value pairs. This comes from the parameter portion of the DATAPACKET tag.

FindXMLBrokerName returns the value string from the XMLBroker parameter. If TagParams does not contain a string of the form XMLBroker=BrokerName, FindXMLBrokerName returns an empty string.


TBaseInetXPageProducer.GetRequiredTags
 VCL Reference

TBaseInetXPageProducer.GetRequiredTags

TBaseInetXPageProducer	See also

Returns the default set of HTML-transparent tags for an InternetExpress page producer.

class function GetRequiredTags: string; virtual;

Description

GetRequiredTags dynamically generates the InternetExpress-specific tags that form the basis of an InternetExpress page producer’s default template.

GetRequiredTags returns the string

<#INCLUDES> <#STYLES> <#WARNINGS> <#FORMS> <#SCRIPT>


TBaseInetXPageProducer.GetXMLData
 VCL Reference

TBaseInetXPageProducer.GetXMLData

TBaseInetXPageProducer	See also

Obtains an XML data packet from a specified XML broker.

function GetXMLData(XMLBroker: TXMLBroker, XMLOptions: TXMLOptions): string; virtual;

Description

GetXMLData first generates an OnBeforeGetXMLData event. It then calls the RequestRecords method of the XML broker specified by XMLBroker, passing in the formatting options specified by XMLOptions. Finally, it generates an OnAfterGetXMLData event.

GetXMLData returns the XML data packet that XMLBroker supplies.


TBaseInetXPageProducer.SetIncludePathURL
 VCL Reference

TBaseInetXPageProducer.SetIncludePathURL

TBaseInetXPageProducer	See also

Assigns a value to the IncludePathURL property.

procedure SetIncludePathURL(const Value: string);

Description

SetIncludePathURL is the write implementation of the IncludePathURL property.


TBaseInetXPageProducer.SetStyles
 VCL Reference

TBaseInetXPageProducer.SetStyles

TBaseInetXPageProducer	See also

Assigns a value to the Styles property.

procedure SetStyles(Value: TStrings);

Description

SetStyles is the write implementation of the Styles property.


TBaseInetXPageProducer.SetStylesFile
 VCL Reference

TBaseInetXPageProducer.SetStylesFile

TBaseInetXPageProducer	See also

Assigns a value to the StylesFile property.

procedure SetStylesFile(const Value: TFileName);

Description

SetStylesFile is the write implementation of the StylesFile property.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer

TBaseInetXPageProducer


TCustomDataGrid
 VCL Reference

TCustomDataGrid

Hierarchy	Properties	Methods	See also

TCustomDataGrid is the base class for Web items that generate an HTML table to display a dataset in an XML data packet.

Unit

MidItems

Description

Use TCustomDataGrid as a base class for Web items that generate an HTML table to display multiple records from a dataset as a set of rows and columns.  Each TCustomDataGrid object maintains a list of Web items that generate the individual fields (columns) of the table. These Web items can be from the following classes: TTextColumn, TSelectOptionColumn, TTextAreaColumn, and TStatusColumn.

You can bind the data grid to an XML data packet or dataset field within an XML data packet. The column Web items can then use that binding to determine the source of the data they display.

TCustomDataGrid introduces a number of properties that affect the appearance of the generated table.

In order to let other Web items use the HTML table that the data grid generates, TCustomDataGrid inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TCustomDataGrid. Instead, use a descendant of TCustomDataGrid such as TDataGrid.


 VCL Reference

TCustomDataGrid properties

TCustomDataGrid	Alphabetically	Legend

In TCustomDataGrid

DisplayRows

HeadingAttributes

RowAttributes

TableAttributes

Derived from TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomDataGrid properties

TCustomDataGrid	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisplayRows

HeadingAttributes

Name

Owner

RowAttributes

TableAttributes

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


TCustomDataGrid.DisplayRows
 VCL Reference

TCustomDataGrid.DisplayRows

TCustomDataGrid	See also

Limits the number of rows in the HTML table.

property DisplayRows: Integer;

Description

Use DisplayRows to specify the number of rows that appear in the generated HTML table.

Note that the number of rows in the HTML table does not limit the number of records that end users can view and edit.  When DisplayRows is less than the number of records in the data packet, the control generated by TNextPageButton or TPriorPageButton lets end users scroll through the records in the data packet.


TCustomDataGrid.HeadingAttributes
 VCL Reference

TCustomDataGrid.HeadingAttributes

TCustomDataGrid	See also

Determines the display characteristics of the table’s header.

property HeadingAttributes: TGridRowAttributes;

Description

Use HeadingAttributes to specify any display attributes that apply only to the heading of the generated HTML table. HeadingAttributes determines the options that are added to the <TR> tag that defines the header of the grid. These include the color of the header, the alignment of the caption for each column, and any custom options or style rules.

Note:	To influence the display attributes of the grid as a whole or only the rows of the grid, use the TableAttributes or RowAttributes property instead.


TCustomDataGrid.RowAttributes
 VCL Reference

TCustomDataGrid.RowAttributes

TCustomDataGrid	See also

Determines the display characteristics of the table’s body.

property RowAttributes: TGridRowAttributes;

Description

Use RowAttributes to specify any display attributes that apply only to the rows of the generated HTML table. RowAttributes determines the options that are added to the <TR> tag for each row in the body of the grid. These include the color of the rows, the alignment of data within each cell, and any custom options or style rules.

Note:	To influence the display attributes of the grid as a whole or only the header of the grid, use the TableAttributes or HeadingAttributes property instead.


TCustomDataGrid.TableAttributes
 VCL Reference

TCustomDataGrid.TableAttributes

TCustomDataGrid	See also

Determines the basic display characteristics of the table.

property TableAttributes: TGridAttributes;

Description

Use TableAttributes to specify values for the most common options on the HTML <TABLE> tag. TableAttributes lets you specify the alignment of the table in its HTML document, its color and border size, the offset of data within each table cell, as well as any custom options or style rules.

Note:	To influence the display attributes of only the header of the grid, or only the rows in its body, use the TableAttributes or HeadingAttributes property instead.


 VCL Reference

TCustomDataGrid methods

TCustomDataGrid	Alphabetically	Legend

In TCustomDataGrid

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDataGrid methods

TCustomDataGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomDataGrid.Create
 VCL Reference

TCustomDataGrid.Create

TCustomDataGrid	See also

Creates and initializes an instance of TCustomDataGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCustomDataGrid at runtime. TCustomDataGrid components added at design time using the Web Page editor are instantiated automatically.


TCustomDataGrid.Destroy
 VCL Reference

TCustomDataGrid.Destroy

TCustomDataGrid	See also

Frees an instance of TCustomDataGrid.

Description

Do not call Destroy directly. Instead, call Free, which checks whether the object reference is nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup

TCustomDataGrid


TCustomDecisionGrid
 VCL Reference

TCustomDecisionGrid

Hierarchy	Properties	Methods	Events	See also

TCustomDecisonGrid is the base class for controls that present crosstabulated data in a two-dimensional grid.

Unit

MXGRID

Description

Use TCustomDecisionGrid as a base class when defining a decision grid object. Decision grids can present a single summary that is calculated over an arbitrary number of dimensions.

The field that is summarized and the fields (dimensions) over which it is summarized can be changed dynamically at runtime to view any configuration of summary and dimensions chosen from the dimension map of a decision cube. Changes to the dimensions and summary can be initiated by direct manipulation of the decision grid, or by using a TDecisionPivot object.

Do not create instances of TCustomDecisionGrid. To add a decision grid to a form, use the TDecisionGrid object.


 VCL Reference

TCustomDecisionGrid properties

TCustomDecisionGrid	Alphabetically	Legend

In TCustomDecisionGrid

CaptionColor

CaptionFont

Cells

ColCount

DataColor

DataFont

DataSumColor

DecisionSource

DefaultColWidth

DefaultRowHeight

Dimensions

FixedCols

FixedRows

GridLineColor

GridLineWidth

LabelColor

LabelFont

LabelSumColor

Options

RowCount

ShowCubeEditor

Totals

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BoundsRect

BiDiMode

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomDecisionGrid properties

TCustomDecisionGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CaptionColor

CaptionFont

Cells

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColCount

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataColor

DataFont

DataSumColor

DecisionSource

DefaultColWidth

DefaultRowHeight

DesignInfo

Dimensions

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

FixedCols

FixedRows

Floating

FloatingDockSiteClass

GridLineColor

GridLineWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

LabelColor

LabelFont

LabelSumColor

Left

LRDockWidth

Name

Options

Owner

Parent

ParentWindow

RowCount

ShowCubeEditor

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

Totals

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomDecisionGrid.CaptionColor
 VCL Reference

TCustomDecisionGrid.CaptionColor

TCustomDecisionGrid	See also

Specifies the background color of cells containing the names of the row and column dimensions.

property CaptionColor: TColor;

Description

Set CaptionColor to the color that should be used to make the names of the row and column dimensions stand out. These are the names for the dimensions that are set in the Decision Cube Editor.

The actual values of the fields that make up the row and column dimensions are drawn using the LabelColor property.


TCustomDecisionGrid.CaptionFont
 VCL Reference

TCustomDecisionGrid.CaptionFont

TCustomDecisionGrid	See also

Specifies the font used to write the names of the row and column dimensions.

property CaptionFont: TFont;

Description

Set CaptionFont to the font that should be used to make the names of the row and column dimensions stand out. These are the names for the dimensions that are set in the Decision Cube Editor.

The actual values of the fields that make up the row and column dimensions are written using the LabelFont property.


TCustomDecisionGrid.Cells
 VCL Reference

TCustomDecisionGrid.Cells

TCustomDecisionGrid	See also

Provides indexed access to the values of all cells in the decision grid.

property Cells[ACol, ARow: Integer]: string;

Description

Use Cells to obtain the value of a cell in the grid, formatted as a string. The ACol and ARow parameters indicate the column and row indexes of the cell, where (0,0) indicates the top left cell of the data region (not the top left cell of the grid). Cells that have been closed up using the Display Data or Display SubTotals menu items are still counted even though they are not visible.

If the cell is a row or column caption (negative value for ACol or ARow), Cells returns the name of the dimension. If the cell is a row or column label, Cells returns the field value of the dimension field. If the cell is a subtotal label, Cells returns the string Sum. If the cell is in the data region of the grid, Cells returns the summarized value.


TCustomDecisionGrid.ColCount
 VCL Reference

TCustomDecisionGrid.ColCount

TCustomDecisionGrid	See also

Indicates the total number of columns in the decision grid.

property ColCount: Integer;

Description

Read ColCount to determine the number of columns in the decision grid, including the columns containing dimension captions and label cells. Compute the number of columns in the data region of the decision grid by subtracting the value of FixedCols from ColCount.


TCustomDecisionGrid.DataColor
 VCL Reference

TCustomDecisionGrid.DataColor

TCustomDecisionGrid	See also

Specifies the background color of the cells containing summarized values.

property DataColor: TColor;

Description

Set DataColor to the color that should be used for the scrollable data region of the decision grid. The data region contains the values of the current summary of the decision cube, where each cell represents the value of a field summarized over the values indicated by the row and column dimensions.

The subtotals that represent values summarized over all values within a given dimension (as well as the single value in other dimensions) are drawn using the DataSumColor property.


TCustomDecisionGrid.DataFont
 VCL Reference

TCustomDecisionGrid.DataFont

TCustomDecisionGrid	See also

Specifies the font used to write the summarized values in the scrollable region of the decision grid.

property DataFont: TFont;

Description

Set DataFont to the font that should be used for the data region of the decision grid. The data region contains the values of the current summary of the decision cube, where each cell represents the value of a field summarized over the values indicated by the row and column dimensions. It also includes the dimension subtotals over the summary field.


TCustomDecisionGrid.DataSumColor
 VCL Reference

TCustomDecisionGrid.DataSumColor

TCustomDecisionGrid	See also

Specifies the background color of cells that represent subtotals over entire dimensions.

property DataSumColor: TColor;

Description

Set DataSumColor to make the subtotals that represent an entire dimension stand out from the summary values that summarize information over a single value in each dimension. The subtotal cells are placed in the scrollable data region at the ends of the set of rows or columns that correspond to a given dimension.


TCustomDecisionGrid.DecisionSource
 VCL Reference

TCustomDecisionGrid.DecisionSource

TCustomDecisionGrid	See also

Specifies the decision source that supplies crosstabulated data to the decision grid.

property DecisionSource: TDecisionSource;

Description

Set DecisionSource to link the decision grid to the crosstabulated data from a decision cube. The DecisionSource object maintains information about the current pivot state of the data. Thus, any two decision controls that share the same decision source will display the data from the decision cube using the same configuration of row and column dimensions, including any closed dimensions or drilled down values.


TCustomDecisionGrid.DefaultColWidth
 VCL Reference

TCustomDecisionGrid.DefaultColWidth

TCustomDecisionGrid	See also

Specifies the width of all columns that are not explicitly resized.

property DefaultColWidth: Integer;

Description

Set DefaultColWidth to the desired width of the columns in the decision grid that are not resized using the mouse. Setting DefaultColWidth changes the size of all columns in the grid, including columns that have been resized.


TCustomDecisionGrid.DefaultRowHeight
 VCL Reference

TCustomDecisionGrid.DefaultRowHeight

TCustomDecisionGrid	See also

Specifies the height of all rows that are not explicitly resized.

property DefaultRowHeight: Integer;

Description

Set DefaultRowHeight to the desired height of the rows in the decision grid that are not resized using the mouse. Setting DefaultRowHeight changes the size of all rows in the grid, including rows that have been resized.


TCustomDecisionGrid.Dimensions
 VCL Reference

TCustomDecisionGrid.Dimensions

TCustomDecisionGrid	See also

Provides access to the collection of TDisplayDim objects that control the appearance of each dimension.

property Dimensions: TDisplayDims;

Description

Set the properties of the individual TDisplayDim objects to control the appearance of individual dimensions within the grid. The TDisplayDim objects have properties that can override the various color and font properties of the grid to make individual dimensions stand out. They also allow the dimension names, alignments, and formats to be customized, and permit the dimension subtotals for a dimension to be turned on or off.

Note:	Do not change the Dimensions property, only the properties of individual TDisplayDim objects accessed through the Dimensions property. To programmatically change the configuration of dimensions that appears in the grid, use the decision source object.


TCustomDecisionGrid.FixedCols
 VCL Reference

TCustomDecisionGrid.FixedCols

TCustomDecisionGrid	See also

Indicates the number of columns used for dimension captions and dimension value labels.

property FixedCols: Integer;

Description

Read FixedCols to determine the number of columns in the decision grid that are not part of the data region. Subtract FixedCols from the value of the ColCount property to obtain the number of columns in the data region.


TCustomDecisionGrid.FixedRows
 VCL Reference

TCustomDecisionGrid.FixedRows

TCustomDecisionGrid	See also

Indicates the number of rows used for dimension captions and dimension value labels.

property FixedRows: Integer;

Description

Read FixedRows to determine the number of rows in the decision grid that are not part of the data region. Subtract FixedRows from the value of the RowCount property to obtain the number of rows in the data region.


TCustomDecisionGrid.GridLineColor
 VCL Reference

TCustomDecisionGrid.GridLineColor

TCustomDecisionGrid	See also

Specifies the color of the lines that separate the cells in the decision grid.

property GridLineColor: TColor;

Description

Set GridLineColor to specify the color of the lines drawn between the cells of the grid. The grid lines only appear when the Options property includes cgGridLines.


TCustomDecisionGrid.GridLineWidth
 VCL Reference

TCustomDecisionGrid.GridLineWidth

TCustomDecisionGrid	See also

Specifies the width, in pixels, of the lines that separate the cells of the grid.

property GridLineWidth: Integer;

Description

Set GridLineWidth to make the lines that separate the cells in the decision grid heavier or lighter. The grid lines only appear when the Options property includes cgGridLines.


TCustomDecisionGrid.LabelColor
 VCL Reference

TCustomDecisionGrid.LabelColor

TCustomDecisionGrid	See also

Specifies the color of the individual row and column labels.

property LabelColor: TColor;

Description

Set LabelColor to the color that should be used to make the row and column labels stand out. The row and column labels of the decision grid contain the values of the fields that correspond to the dimensions of the decision cube. These are the values over which the data is summarized.


TCustomDecisionGrid.LabelFont
 VCL Reference

TCustomDecisionGrid.LabelFont

TCustomDecisionGrid	See also

Specifies the font used to write the individual row and column labels.

property LabelFont: TFont;

Description

Set LabelFont to the font that should be used to write the labels that display the values of the dimensions over which data is summarized. The row and column labels of the decision grid contain the values of the fields that correspond to the dimensions of the decision cube. LabelFont is also used when writing the labels for rows or columns that represent dimension subtotals.


TCustomDecisionGrid.LabelSumColor
 VCL Reference

TCustomDecisionGrid.LabelSumColor

TCustomDecisionGrid	See also

Specifies the background color for the subtotal labels.

property LabelSumColor: TColor;

Description

Set LabelSumColor make the subtotal labels stand out from the labels that represent individual field values along a dimension. The subtotal labels appear at the end of the set of field value labels for an individual dimension.


TCustomDecisionGrid.Options
 VCL Reference

TCustomDecisionGrid.Options

TCustomDecisionGrid	See also

Specifies settings that affect the entire grid display.

type

  TDecisionGridOption = (cgGridLines, cgOutliner, cgPivotable);

TDecisionGridOptions = set of TDecisionGridOption;

property Options: TDecisionGridOptions;

Description

Set Options to include the desired properties for the grid. Options is a set drawn from the following values:

Value	Meaning

cgGridLines	Vertical and horizontal lines are drawn to separate the cells in the scrollable data region.

cgOutliner	The dimension caption cells contain plus (+) and minus (-) signs that open or close dimensions in the grid when clicked. The minus sign closes (hides) an adjacent dimension. The plus sign opens (shows) an adjacent dimension.

cgPivotable	Dimensions can be rearranged by clicking on the dimension caption cells and dragging them to a new position.

Note:	If Options does not include cgOutliner, individual dimensions can still be opened and closed using the decision pivot. Similarly, if Options does not include cgPivotable, individual dimensions can still be opened and closed with the decision pivot.


TCustomDecisionGrid.RowCount
 VCL Reference

TCustomDecisionGrid.RowCount

TCustomDecisionGrid	See also

Indicates the total number of rows in the decision grid.

property RowCount: Integer;

Description

Read RowCount to determine the number of rows in the decision grid, including the rows containing dimension captions and label cells. Compute the number of rows in the data region of the decision grid by subtracting the value of FixedRows from RowCount.


TCustomDecisionGrid.ShowCubeEditor
 VCL Reference

TCustomDecisionGrid.ShowCubeEditor

TCustomDecisionGrid	See also

Determines whether the Cube Editor can be displayed.

property ShowCubeEditor: Boolean;

Description

ShowCubeEditor determines whether the Cube Editor for the associated TDecisionCube can be invoked. If set to True, a menu item to invoke the Cube Editor is added to the speed menu displayed on a right-click on the decision grid at runtime.


TCustomDecisionGrid.Totals
 VCL Reference

TCustomDecisionGrid.Totals

TCustomDecisionGrid	See also

Indicates whether the grid includes subtotals.

property Totals: Boolean;

Description

Set Totals to turn row and column subtotals on or off for the whole grid. To turn subtotals on or off for individual dimensions, use the Dimensions property.


 VCL Reference

TCustomDecisionGrid events

TCustomDecisionGrid	Alphabetically	Legend

In TCustomDecisionGrid

OnDecisionDrawCell

OnDecisionExamineCell

OnTopLeftChanged


 VCL Reference

TCustomDecisionGrid events

TCustomDecisionGrid	By object	Legend

OnDecisionDrawCell

OnDecisionExamineCell

OnTopLeftChanged


TCustomDecisionGrid.OnDecisionDrawCell
 VCL Reference

TCustomDecisionGrid.OnDecisionDrawCell

TCustomDecisionGrid	See also

Occurs just before a cell in the grid is drawn.

type

  TDecisionDrawStates = (dsGroupStart, dsRowCaption, dsColCaption, dsSum, dsRowValue, dsColValue, dsData, dsOpenAfter, dsCloseAfter, dsRowIndicator, dsColIndicator, dsRowPlus, dsColPlus, dsNone);

  TDecisionDrawState = set of TDecisionDrawStates;

TDecisionDrawCellEvent = procedure (Sender: TObject; Col, Row: Longint; var Value: string; var AFont: TFont; var AColor: TColor; AState: TGridDrawState; ADrawState: TDecisionDrawState) of object;

property OnDecisionDrawCell: TDecisionDrawCellEvent;

Description

Write an OnDecisionDrawCell event handler to change the color, font, or text used to display an individual cell in the grid. Change the AColor, AFont, or Value parameter to change the color, font, or text respectively.

For example, to change the row and column labels from the values of the fields in the dataset to customized labels, change the Value parameter of the event handler when the Row and Column parameters represent a label cell.

The Row and Column parameters indicate the row and column of a cell within the grid, where (0,0) specifies the upper left summary value, not the upper left corner of the grid. Thus, the label cells contain negative row or column indexes. In addition, the AState parameter includes gdFixed when the cell is a label cell. AState also indicates whether the cell being drawn is selected.

The ADrawState parameter indicates the type of cell that is about to be drawn. ADrawState includes one or more of the following values:

Value	Meaning

dsGroupStart	The cell is the first row or column label for a dimension. Always appears with dsRowValue or dsColValue.

dsRowCaption	The cell displays a row caption (the name of a dimension whose values are listed down a column on the left of the grid).

dsColCaption	The cell displays a column caption (the name of a dimension whose values are listed along the top of the grid).

dsSum	The cell displays a subtotal label or value. Always appears with dsRowValue, dsColValue, or dsData.

dsRowValue	The cell is a row label. It represents a value from a dimension listed down a column on the left of the grid or a summary label that appears at the end of each group of dimension values.

dsColValue	The cell is a column label. It represents a value from a dimension listed across the top of the grid or a summary label that appears at the end of the dimension.

dsData	The cell is in the scrollable data region of the grid.

dsOpenAfter	The cell has a plus sign (+) on the right that will open following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.

dsCloseAfter	The cell has a minus sign (-) on the right that will close the following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.

dsRowIndicator	The cell appears on the left grid margin that is used to display the open and close indicators (+ and -).

dsColIndicator	The cell appears on the upper grid margin that is used to display the open and close indicators (+ and -).

dsRowPlus	The cell appears in the left margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsRowIndicator.

dsColPlus	The cell appears in the top margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsColIndicator.

dsNone	The cell has no function.


TCustomDecisionGrid.OnDecisionExamineCell
 VCL Reference

TCustomDecisionGrid.OnDecisionExamineCell

TCustomDecisionGrid	See also

Occurs when the user right-clicks on a cell in the data region of the grid.

Type

  TDecisionExamineCellEvent = procedure (Sender: TObject; ICol, IRow: Longint; ISum: Integer; const ValueArray: TValueArray) of object;

property OnDecisionExamineCell: TDecisionExamineCellEvent;

Description

Write an OnDecisionExamineCell event handler to take specific action when the user right-clicks on one of the cells that contains summarized data. The ICol and IRow parameters indicate the column and row indexes of the cell. The column and row indexes specify the value 0 for the top or leftmost cell in the scrollable data region, not the top left cell of the decision grid. The ISum parameter is the index of the current summary in the decision cube, where the first active summary has an index of 0. The ValueArray parameter gives the coordinates of the cell in terms of the dimensions of the decision source. If the cell represents a subtotal value, the entry in the ValueArray for the dimension over which the subtotal is calculated is a negative number.

Use the Cells property to obtain the value of the summary in the cell. Use the GetDimensionName method of the decision source to get the name of each dimension represented by an entry in the ValueArray parameter. Use the GetValueAsString or GetValueAsVariant method of the decision source to obtain the label values for each dimension represented in the ValueArray parameter.


TCustomDecisionGrid.OnTopLeftChanged
 VCL Reference

TCustomDecisionGrid.OnTopLeftChanged

TCustomDecisionGrid	See also

Occurs when the data region of the grid scrolls.

property OnTopLeftChanged: TNotifyEvent;

Description

Write an OnTopLeftChanged event handler to take specific action when the summarized data in the grid scrolls. Use the Cells property or the CellDrawState method to obtain the new values of the data cells.


 VCL Reference

TCustomDecisionGrid methods

TCustomDecisionGrid	Alphabetically	Legend

In TCustomDecisionGrid

CellDrawState

CellRect

CellValueArray

ColWidthsChanged

Create

Destroy

DrawCell

GetCells

MouseDown

MouseMove

MouseUp

Notification

Paint

RowHeightsChanged

SelectCell

TopLeftChanged

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

Dock

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

Hide

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDecisionGrid methods

TCustomDecisionGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellDrawState

CellRect

CellValueArray

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColWidthsChanged

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawCell

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCells

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseDown

MouseMove

MouseUp

MouseWheelHandler

NewInstance

Notification

Paint

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowHeightsChanged

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectCell

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TopLeftChanged

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomDecisionGrid.CellDrawState
 VCL Reference

TCustomDecisionGrid.CellDrawState

TCustomDecisionGrid	See also

Retrieves information about a data cell in the grid.

type

  TDecisionDrawStates = (dsGroupStart, dsRowCaption, dsColCaption, dsSum, dsRowValue, dsColValue, dsData, dsOpenAfter, dsCloseAfter, dsCloseBefore, dsOpenBefore, dsRowIndicator, dsColIndicator, dsRowPlus, dsColPlus, dsNone);

TDecisionDrawState = set of TDecisionDrawStates;&DrawState);

function CellDrawState(ACol, ARow: Integer; var Value: string; var DrawState: TDecisionDrawState): Boolean;

Description

Call CellDrawState to obtain information about a cell in the scrollable data region of the grid. The ACol and ARow parameters specify the index of the cell, where (0,0) is the upper left cell in the data region, not the upper left cell in the grid. The Value parameter returns the value of the summary in the cell, formatted for display. The DrawState parameter returns information about the type of information contained in the cell. For more information about the possible values of DrawState, see the entry for the OnDecisionDrawCell event.

CellDrawState returns True if the Value and DrawState parameters are correctly filled in. CellDrawState returns False if the cell specified by ACol and ARow is not in the data region of the grid.

The ADrawState parameter indicates the type of cell that is about to be drawn. ADrawState includes one or more of the following values:

Value	Meaning

dsGroupStart	The cell is the first row or column label for a dimension. Always appears with dsRowValue or dsColValue.

dsRowCaption	The cell displays a row caption (the name of a dimension whose values are listed down a column on the left of the grid).

dsColCaption	The cell displays a column caption (the name of a dimension whose values are listed along the top of the grid).

dsSum	The cell displays a subtotal label or value. Always appears with dsRowValue, dsColValue, or dsData.

dsRowValue	The cell is a row label. It represents a value from a dimension listed down a column on the left of the grid or a summary label that appears at the end of each group of dimension values.

dsColValue	The cell is a column label. It represents a value from a dimension listed across the top of the grid or a summary label that appears at the end of the dimension.

dsData	The cell is in the scrollable data region of the grid.

dsOpenAfter	The cell has a plus sign (+) on the right that will open following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.

dsCloseAfter	The cell has a minus sign (-) on the right that will close the following dimension when clicked. Always appears with dsRowCaption, dsColCaption, dsRowPlus, or dsColPlus.

dsRowIndicator	The cell appears on the left grid margin that is used to display the open and close indicators (+ and -).

dsColIndicator	The cell appears on the upper grid margin that is used to display the open and close indicators (+ and -).

dsRowPlus	The cell appears in the left margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsRowIndicator.

dsColPlus	The cell appears in the top margin and contains a plus sign (+) indicating that the adjacent dimension is closed. Always appears with dsColIndicator.

dsNone	The cell has no function.


TCustomDecisionGrid.CellRect
 VCL Reference

TCustomDecisionGrid.CellRect

TCustomDecisionGrid	See also

Returns the screen coordinates of a cell in the grid.

function CellRect(ACol, ARow: Longint): TRect;

Description

Call CellRect to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ACol and ARow parameters. The top left cell that contains data is specified when ACol and ARow are set to zero.

If the indicated cell is not visible, CellRect returns an empty rectangle.


TCustomDecisionGrid.CellValueArray
 VCL Reference

TCustomDecisionGrid.CellValueArray

TCustomDecisionGrid	See also

Returns the values of all dimension fields over which a data cell is summarized.

function CellValueArray(ACol, ARow: Integer; var ValueArray: TValueArray): Boolean;

Description

Call CellValueArray to obtain the coordinates of a data cell in the multidimensional array maintained by the decision cube. The ACol and ARow parameters represent the indexes of the column and row containing the cell, where (0,0) specifies the upper left data cell, not the top left cell in the grid. The ValueArray parameter returns the indexes of the field values for each dimension over which the cell summarizes data. Use the GetMemberAsString or GetMemberAsVariant method of the decision source to convert the indexes in the ValueArray parameter into field values. CellValueArray returns a boolean indicating whether the function was successful.


TCustomDecisionGrid.ColWidthsChanged
 VCL Reference

TCustomDecisionGrid.ColWidthsChanged

TCustomDecisionGrid	See also

Responds when the column widths change.

procedure ColWidthsChanged; override;

Description

ColWidthsChanged is called immediately after the column widths change.

ColWidthsChanged adjusts the scroll bar to accommodate the change. At design time, ColWidthsChanged forces all columns to have the same size when the columns are resized using the mouse.


TCustomDecisionGrid.Create
 VCL Reference

TCustomDecisionGrid.Create

TCustomDecisionGrid	See also

Creates and initializes an instance of TCustomDecisionGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a decision grid at runtime. Decision grids added to forms at design time are created automatically.

AOwner is the form that contains the decision grid. It becomes the value of the Owner property.


TCustomDecisionGrid.Destroy
 VCL Reference

TCustomDecisionGrid.Destroy

TCustomDecisionGrid	See also

Destroys an instance of TCustomDecisionGrid.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the decision grid is not nil, and only then calls Destroy. Destroy frees all helper objects used by TCustomDecisionGrid.


TCustomDecisionGrid.DrawCell
 VCL Reference

TCustomDecisionGrid.DrawCell

TCustomDecisionGrid	See also

Draws a cell in the grid.

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

Description

DrawCell is called automatically when the cell specified by the ACol and ARow parameters needs to be painted. DrawCell generates an OnDecisionDrawCell event, and then draws the cell using the color, font, and value for the cell.


TCustomDecisionGrid.GetCells
 VCL Reference

TCustomDecisionGrid.GetCells

TCustomDecisionGrid	See also

Returns the value of a cell in the grid, formatted as a string.

function GetCells(ACol, ARow: Integer): String;

Description

GetCells is the protected property access method for the Cells property. Override GetCells to change the implementation of the Cells property.


TCustomDecisionGrid.MouseDown
 VCL Reference

TCustomDecisionGrid.MouseDown

TCustomDecisionGrid	See also

Starts the drag of a dimension to a new location.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseDown is called automatically when the user clicks the mouse in a cell of the grid. After calling the inherited method, MouseDown starts a pivot operation if the cell is a dimension label that can be dragged.

When overriding the MouseDown method, be sure to call the inherited method.


TCustomDecisionGrid.MouseMove
 VCL Reference

TCustomDecisionGrid.MouseMove

TCustomDecisionGrid	See also

Computes the drop site of a pivoting dimension.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

MouseMove is called automatically when the user moves the mouse. After calling the inherited method, MouseMove calculates the new pivot state if a dimension is being dragged to a new location.

When overriding the MouseMove method, be sure to call the inherited method.


TCustomDecisionGrid.MouseUp
 VCL Reference

TCustomDecisionGrid.MouseUp

TCustomDecisionGrid	See also

Rearranges the dimensions after a pivot and updates the decision source.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseUp is called automatically when the user releases the mouse. After calling the inherited method, MouseUp checks whether a dimension was just dragged to a new location. If a dimension was just moved, MouseUp changes the Dimensions property appropriately and updates the decision source to reflect the new configuration.

When overriding the MouseUp method, be sure to call the inherited method.


TCustomDecisionGrid.Notification
 VCL Reference

TCustomDecisionGrid.Notification

TCustomDecisionGrid	See also

Links the buttons in TDecisionPivot to the decision source.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification performs the necessary internal adjustments when new elements are added to the decision grid. When overriding the Notification method, be sure to call the inherited method.


TCustomDecisionGrid.Paint
 VCL Reference

TCustomDecisionGrid.Paint

TCustomDecisionGrid	See also

Renders the image of the decision grid.

procedure Paint; override;

Description

Paint is called when the grid receives a Windows paint message. Paint draws the grid, calling the DrawCell method when it is time to paint the contents of each cell. After all the cells are drawn, Paint draws the grid lines.

If DefaultDrawing is False, Paint does not draw the background of the cells or draw the focus rectangle around the selected cell when it has focus.


TCustomDecisionGrid.RowHeightsChanged
 VCL Reference

TCustomDecisionGrid.RowHeightsChanged

TCustomDecisionGrid	See also

Responds when the row heights change.

procedure RowHeightsChanged; override;

Description

RowHeightsChanged is called immediately after the row heights change.

RowHeightsChanged adjusts the scroll bar to accommodate the change. At design time, RowHeightsChanged forces all rows to have the same size when the rows are resized using the mouse.


TCustomDecisionGrid.SelectCell
 VCL Reference

TCustomDecisionGrid.SelectCell

TCustomDecisionGrid	See also

Indicates whether the user can navigate to a specified cell.

function SelectCell(Arow, AColumn:LongInt): Boolean; override;

Description

Decision grids call SelectCell internally before attempting to move selection to the cell identified by the ACol and ARow parameters. ACol and ARow are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0.

As implemented in TCustomDecisionGrid, SelectCell always returns True, indicating that focus can move to the indicated cell.


TCustomDecisionGrid.TopLeftChanged
 VCL Reference

TCustomDecisionGrid.TopLeftChanged

TCustomDecisionGrid	See also

Generates an OnTopLeftChanged event.

procedure TopLeftChanged; override;

Description

Decision grids call TopLeftChanged internally, whenever the data region of the grid scrolls.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDecisionGrid


TCustomInetXPageProducer
 VCL Reference

 TCustomInetXPageProducer

Hierarchy	Properties	Methods	Events	See also

TCustomInetXPageProducer is the base class for page producers that display live database information in an InternetExpress application.

Unit

MidProd

Description

Use TCustomInetXPageProducer as a base class for components that create Web pages in an InternetExpress Web application. These pages display database information from an application server and include data packets encoded in XML and javascript that lets Web browsers navigate that data, post changes, and apply updates back to the application server.

The InetX page producer creates its HTML document from a template. Unlike other page producers, the InetX page producer has a default template that coordinates several top-level declarations for the HTML document with content produced by other components. The other components that generate HTML content for the InetX page producer can be added at design time using the Web Page editor.

Do not instantiate TCustomInetXPageProducer. To create a producer that generates HTML pages with javascript database functions and XML data packets, use a descendant class such as TInetXPageProducer.


 VCL Reference

TCustomInetXPageProducer properties

TCustomInetXPageProducer	Alphabetically	Legend

In TCustomInetXPageProducer

HTMLDoc

HTMLFile

Derived from TBaseInetXPageProducer

EnableXMLIslands

IncludePathURL

Styles

StylesFile

Derived from TBasePageItemsProducer

WebPageItems

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomInetXPageProducer properties

TCustomInetXPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

EnableXMLIslands

HTMLDoc

HTMLFile

IncludePathURL

Name

Owner

ScriptEngine

StripParamQuotes

Styles

StylesFile

Tag

VCLComObject

WebModuleContext

WebPageItems


TCustomInetXPageProducer.HTMLDoc
 VCL Reference

TCustomInetXPageProducer.HTMLDoc

TCustomInetXPageProducer	See also

Specifies the HTML template used to generate the value returned by the Content method.

property HTMLDoc: TStrings;

Description

Set HTMLDoc to a set of strings that make up the HTML template. By default, HTMLDoc is initialized to the following template:

<HTML>

<HEAD>

</HEAD>

<BODY>

<#INCLUDES> <#STYLES> <#WARNINGS> <#FORMS> <#SCRIPT>

</BODY>

</HTML>

Each string is a sequence of one or more HTML commands or HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. TCustomInetXPageProducer automatically handles the conversion of the HTML-transparent tags in the default template, as well as the tags described in the help for the Content method. If you set HTMLDoc to include other HTML-transparent tags, you must translate these in an OnHTMLTag event handler.

Note:	Setting HTMLDoc clears the HTMLFile property.


TCustomInetXPageProducer.HTMLFile
 VCL Reference

TCustomInetXPageProducer.HTMLFile

TCustomInetXPageProducer	See also

Specifies the name of a file that contains the HTML template used to generate the value returned by the Content method.

property HTMLFile: TFileName;

Description

Set HTMLFile to the name of the file that contains an HTML template. The HTML template is a sequence of HTML commands and HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

Note:	Setting HTMLFile clears the HTMLDoc property.

Note:	When distributing applications that contain page producers which use the HTMLFile property, be sure to distribute the file along with the application. Also, be sure that the value of HTMLFile does not include a hard-coded path name that will not be available on the user’s disk.


 VCL Reference

TCustomInetXPageProducer events

TCustomInetXPageProducer	Alphabetically	Legend

Derived from TBaseInetXPageProducer

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TCustomInetXPageProducer events

TCustomInetXPageProducer	By object	Legend

OnAfterGetContent

OnAfterGetXMLData

OnBeforeGetContent

OnBeforeGetXMLData

OnHTMLTag


 VCL Reference

TCustomInetXPageProducer methods

TCustomInetXPageProducer	Alphabetically	Legend

In TCustomInetXPageProducer

Content

Create

Destroy

In TBaseInetXPageProducer

ContentFromStream

FindXMLBroker

FindXMLBrokerName

GetRequiredTags

GetXMLData

SetIncludePathURL

SetStyles

SetStylesFile

Derived from TBasePageProducer

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomInetXPageProducer methods

TCustomInetXPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FindXMLBroker

FindXMLBrokerName

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetRequiredTags

GetXMLData

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetIncludePathURL

SetStyles

SetStylesFile

SetSubComponent

UpdateAction


TCustomInetXPageProducer.Content
 VCL Reference

TCustomInetXPageProducer.Content

TCustomInetXPageProducer	See also

Returns the HTML document assembled by the InternetExpress page producer.

function Content: string; override;

Description

Call Content to get the HTML document produced by TCustomInetXPageProducer. This document contains a mixture of HTML, XML, and javascript. It allows Web browsers to view and edit data from an application server.

The InternetExpress page producer creates its content by replacing HTML-transparent tags in the template specified by HTMLDoc or HTMLFile.

By default, this template has the form

<HTML>

<HEAD>

</HEAD>

<BODY>

<#INCLUDES> <#STYLES> <#WARNINGS> <#FORMS> <#SCRIPT>

</BODY>

</HTML>

Although the template can be changed to include any combination of these tags with tags of the following forms

<#COMPONENT Name=WebItemName>

<#DATAPACKET XMLBroker=BrokerName>

which are also translated automatically. The template can replace the default HTML-transparent tags with the tag

<#BODYELEMENTS>

Finally, the template can include any tags translated by the OnHTMLTag event handler.

The Content method translates the tags listed above as follows:

<#INCLUDES> generates the statements that include the javascript libraries at the location specified by IncludePathURL.

<#STYLES> generates the statements that defines a style sheet from the definitions listed in the Styles or StylesFile property.

<#WARNINGS> generates nothing at runtime. At design time, it adds warning messages for problems detected while generating the HTML document. You can see these messages in the Web page editor.

<#FORMS> generates the HTML produced by the components listed in the WebPageItems property. The HTML from each component is listed in the order it appears in WebPageItems.

<#SCRIPT> generates a block of javascript declarations that are used by the components listed in WebPageItems.

<#BODYELEMENTS> generates the same HTML as results from the 5 tags in the default template. It is useful when generating a template in an HTML editor when you want to use the default layout but add additional elements (such as style sheets) using the editor.

<#COMPONENT> is replaced with the content produced by the specified component. Typically, this is a component listed in the WebPageItems property, but it can be any component that supports the IWebContent interface and has the same Owner as the INETX page producer.

<#DATAPACKET> is replaced with the XML data packet obtained from the specified XML broker.

The string returned by Content can be used as the Content property of the response to an HTTP request message.


TCustomInetXPageProducer.Create
 VCL Reference

TCustomInetXPageProducer.Create

TCustomInetXPageProducer	See also

Creates and initializes an instance of TCustomInetXPageProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an InternetExpress page producer at runtime. InternetExpress page producers placed in a Web module at design time are instantiated automatically.

AOwner is a component, typically a Web module, that becomes the value of the Owner property. The Owner is responsible for freeing the TCustomInetXPageProducer instance.


TCustomInetXPageProducer.Destroy
 VCL Reference

TCustomInetXPageProducer.Destroy

TCustomInetXPageProducer	See also

Frees an instance of TCustomInetXPageProducer.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call the Free method, which checks whether the reference to the producer is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TComponentsPageProducer

TBasePageItemsProducer

TBaseInetXPageProducer

TCustomInetXPageProducer


TCustomObjectBroker
 VCL Reference

TCustomObjectBroker

Hierarchy	Properties	Methods	See also

TCustomObjectBroker is the base class for components that locate available application servers for a DataSnap connection component.

Unit

MConnect

Description

TCustomObjectBroker defines the methods by which a connection component obtains information about available application servers. When a connection component uses an object broker, it does not save any properties that identify a particular server machine. Instead, when it needs to open a connection, it uses the methods of the object broker to get that identifying information. This process allows client applications to locate server systems dynamically at runtime. If there are redundant server systems, this allows client applications to continue functioning when a server goes down.

TCustomObjectBroker does not implement any of the methods that provide information to connection components. Instead, descendants such as TSimpleObjectBroker implement a mechanism for choosing servers and identifying them to connection components. Application developers can derive more elaborate object brokers that provide additional benefits such as intelligent load balancing.


 VCL Reference

TCustomObjectBroker properties

TCustomObjectBroker	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomObjectBroker properties

TCustomObjectBroker	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomObjectBroker methods

TCustomObjectBroker	Alphabetically	Legend

In TCustomObjectBroker

GetComputerForGUID

GetComputerForProgID

GetPortForComputer

SetConnectStatus

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomObjectBroker methods

TCustomObjectBroker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetComputerForGUID

GetComputerForProgID

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetPortForComputer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetConnectStatus

SetSubComponent

UpdateAction


TCustomObjectBroker.GetComputerForGUID
 VCL Reference

TCustomObjectBroker.GetComputerForGUID

TCustomObjectBroker 	See also

Returns a string that identifies a server machine for an interface identified by its GUID.

function GetComputerForGUID(GUID: TGUID): string; virtual; abstract;

Description

Call GetComputerForGUID to obtain a string that identifies a server machine on which a given interface is registered. The GUID parameter specifies the global unique identifier of the desired interface.

TCustomObjectBroker declares GetComputerForGUID as an abstract method. It is implemented in descendant objects that return a string designed to work with a particular connection component.

Connection components call this method, passing in the value of their ServerGUID property. They use the return value to set the ComputerName, URL, Host, or Address property, as appropriate.


TCustomObjectBroker.GetComputerForProgID
 VCL Reference

TCustomObjectBroker.GetComputerForProgID

TCustomObjectBroker 	See also

Returns the machine name, URL, host name, or IP address of a server machine that supports an interface identified by its class name.

function GetComputerForProgID(const ProgID): string; virtual; abstract;

Description

Call GetComputerForProgID to obtain the name or address of a server machine on which a given interface is registered. The ProgID parameter specifies the name of the desired interface. If the server was created using one of Delphi’s Wizards, this is the value that was entered as the class name for the Wizard.

TCustomObjectBroker declares GetComputerForProgID as an abstract method. It is implemented in descendant objects that return a string designed to work with a particular connection component.

Connection components can call this method, passing in the value of their ServerName property. They can use the return value to set the ComputerName, URL, Host, or Address property, as appropriate.


TCustomObjectBroker.GetPortForComputer
 VCL Reference

TCustomObjectBroker.GetPortForComputer

TCustomObjectBroker	See also

Returns a port number for connecting to a specified remote server.

function GetPortForComputer(const ComputerName: string): Integer; virtual; abstract;

Description

Socket connection components call GetPortForComputer to get a value for their Port property. The ComputerName parameter specifies a Host name or IP address that was returned by GetComputerForGUID or GetComputerForProgID.

TCustomObjectBroker declares GetPortForComputer as an abstract method. It is implemented in descendant objects that return a string designed to work with a particular connection component.

Note:	This interface assumes that a single socket dispatcher on each server system handles all client requests, even when they are destined for different application servers on the same host.


TCustomObjectBroker.SetConnectStatus
 VCL Reference

TCustomObjectBroker.SetConnectStatus

TCustomObjectBroker	See also

Records whether a connection was established to a specified server.

procedure SetConnectStatus(ComputerName: string; Success: Boolean); virtual; abstract;

Description

After calling GetComputerForGUID or GetComputerForProgID, connection components use the returned value to open a connection to the identified server. They then call SetConnectStatus to tell the broker whether the connection was successfully opened.

TCustomObjectBroker declares SetConnectStatus as an abstract method. Descendants override this method to keep track of when server machines are down or to monitor the number of connections created for each server.


Hierarchy

TObject

TPersistent

TComponent

TCustomObjectBroker


TCOMConnection
 VCL Reference

TCOMConnection

Hierarchy	Properties	Methods	Events	See also

TCOMConnection is the base class for components that connect to application servers using DCOM or OLE.

Unit

MConnect

Description

Do not create instances of TCOMConnection. Instead, use TCOMConnection as a base class when created a custom component that forms a COM-based connection to an application server.

TCOMConnection adds to the ability to work with COM objects to the generic connection capabilities inherited from TDispatchConnection. It has two descendants: TDCOMConnection, which creates and manages connections using DCOM, and TOLEnterpriseConnection, which is provided for backward compatibility and handles connections using OLEnterprise.


 VCL Reference

TCOMConnection properties

TCOMConnection	Alphabetically	Legend

In TCOMConnection

Connected

Derived from TDispatchConnection

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCOMConnection properties

TCOMConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

ServerGUID

ServerName

Tag

VCLComObject


TCOMConnection.Connected
 VCL Reference

TCOMConnection.Connected

TCOMConnection	See also

Indicates whether the TCOMConnection object is connected to an application server.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to the application server. Set Connected to False to terminate the connection.

When changing the value of Connected, TCOMConnection generates a BeforeConnect and an AfterConnect event, or a BeforeDisconnect and an AfterDisconnect event. In addition, when setting Connected to True, TCOMConnection may display a login dialog, depending on the value of LoginPrompt.

The Connected property uses the protected DoConnect and DoDisconnect methods to connect to or disconnect from an application server. Descendants of TCOMConnection override DoConnect and DoDisconnect to change the way the connection is formed or terminated.


 VCL Reference

TCOMConnection events

TCOMConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TCOMConnection events

TCOMConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TCOMConnection methods

TCOMConnection	Alphabetically	Legend

In TCOMConnection

DoConnect

SetConnected

Derived from TDispatchConnection

Create

GetServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCOMConnection methods

TCOMConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetConnected

SetSubComponent

UpdateAction


TCOMConnection.DoConnect
 VCL Reference

TCOMConnection.DoConnect

TCOMConnection	See also

Connects to an application server.

procedure DoConnect; override;

Description

DoConnect is called internally when the Connected property is set to True. DoConnect creates a COM object for the application server (based on the ServerName or ServerGUID property), and sets the value of the AppServer property to this COM object.

Descendants of TCOMConnection override DoConnect to change the way the client application forms a connection to an application server.


TCOMConnection.SetConnected
 VCL Reference

TCOMConnection.SetConnected

TCOMConnection	See also

Sets the Connected property.

procedure SetConnected(Value: Boolean); override;

Description

SetConnected is the protected implementation of the Connected property.

If Value is False, SetConnected generates a BeforeDisconnect event, closes the connection, and generates an AfterDisconnect event.

If Value is True, SetConnected performs the following actions:

1. It checks the value of the ServerGUID or ServerName property and raises an exception if these do not specify a valid application server.

2. If LoginPrompt is True, and the connection is not already open, SetConnected generates an OnGetUsername event, and uses that to initialize a login dialog. It displays the login dialog, and aborts the connection if the user cancels.

3. It generates a BeforeConnect event.

4. It opens the connection.

5. It generates an AfterConnect event.

6. If LoginPrompt is True, and the connection opened successfully, SetConnected generates an OnLogin event.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TCOMConnection


TCorbaDataModule
 VCL Reference

TCorbaDataModule

Hierarchy	Properties	Methods	Events	Using TCorbaDataModule	See also

TCorbaDataModule encapsulates the objects and interfaces of a CORBA application server.

Unit

CorbaRdm

Description

Use a TCorbaDataModule object as the central repository for all objects in a CORBA-enabled application server. CORBA data modules can contain any nonvisual components. Typically these are data access components, such as datasets and the provider components that handle communication between these datasets and client applications. CORBA data modules can also contain other nonvisual components, such as TTimer, or TImageList.

At design time a TCorbaDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. In the unit file for the remote data module a developer may also code any business rules that are to be centralized in the middle tier of multi-tiered applications.

To create a CORBA data module at design time, choose File|New|Other, and select CORBA Data Module from the multitier page of the new items dialog. The Corba Data Module Wizard then creates a new descendant of TCorbaDataModule that supports an interface that descends from IAppServer.


 VCL Reference

TCorbaDataModule properties

TCorbaDataModule	Alphabetically	Legend

Derived from TRemoteDataModule

ProviderCount

Providers

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCorbaDataModule properties

TCorbaDataModule	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

ProviderCount

Providers

Tag

VCLComObject


 VCL Reference

TCorbaDataModule events

TCorbaDataModule	Alphabetically	Legend

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TCorbaDataModule events

TCorbaDataModule	By object	Legend

OnCreate

OnDestroy


 VCL Reference

TCorbaDataModule methods

TCorbaDataModule	Alphabetically	Legend

Derived from TRemoteDataModule

Create

Destroy

Lock

RegisterProvider

Unlock

UnRegisterProvider

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCorbaDataModule methods

TCorbaDataModule	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Lock

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterProvider

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Unlock

UnRegisterProvider

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TRemoteDataModule

TCorbaDataModule


TLayout type
 VCL Reference

TLayout type

See also

The type for helper objects that generate layout code for a Web item.

Unit

WebComp

type TLayout = TObject;

Description

TLayout is the type for objects that Web items use to transmit common functions that control the layout of HTML controls. When a Web item generates content that includes HTML produced by child components, it passes a TLayout object to those children. The TLayout object implements an interface (ILayoutWebContent) that generates HTML to lay out the controls which the child components generate.


TWebComponentContainer type
 VCL Reference

TWebComponentContainer type

See also

The type for components that maintain a list of Web items.

Unit

WebComp

type TWebComponentContainer = TObject;

Description

TWebComponentContainer is the type for objects that make use of Web items (components that generate HTML and support the IWebContent interface). Each TWebComponentContainer has a property of type TWebComponentList that lists its Web items. The TWebComponentContainer uses these Web items to generate constituent parts of the HTML that it generates.


TXMLDataEvent type
 VCL Reference

TXMLDataEvent type

See also

The type for event handlers that occur when an InternetExpress page producer adds an XML data packet to its HTML document.

Unit

MidProd

type

  TXMLDataEvent = procedure (Sender: TObject; Request: TWebRequest; XMLBroker: TXMLBroker; var OwnerData: OleVariant) of object;

Description

TXMLDataEvent is the type for event handlers that occur before and after an InternetExpress page producer translates a DATAPACKET tag into a string of XML.

Sender is the InternetExpress page producer that is creating an HTML document containing the XML data packet.

Request is the request message in response to which the InternetExpress page producer is creating the HTML document.

XMLBroker is the XMLBroker that fetches the XML data packet from the application server and returns it to the InternetExpress page producer.

OwnerData is application-specific information that allows the InternetExpress page producer to communicate with the XMLBroker and with the provider on the application server. Typically, this parameter is used to communicate persistent state information when the application server is stateless. If the event handler is used for an OnBeforeGetXMLData event, the event handler creates and returns a value in OwnerData which is passed to the XMLBroker’s OnRequestRecords event handler, and from there passed to the provider on the application server. If the event handler is used for an OnAfterGetXMLData event, OwnerData is set to the value returned by the provider on the application server on entry into the event handler and is ignored on exit.


TXMLOption, TXMLOptions type
 VCL Reference

TXMLOption, TXMLOptions type

See also

A set of flags that indicates how database information should be formatted in an XML data packet.

Unit

XMLBrokr

type

  TXMLOption = (xoQuote);

  TXMLOptions = set of TXMLOption;

Description

TXMLOption is the type for flags that influence how an XML broker formats the XML string that an application server provides. After the XML broker fetches data from an application server, it reformats the data using a set of TXMLOption flags.

TXMLOptions is a set of zero or more TXMLOption flags.

The following table lists the TXMLOption flags:

Value	Meaning

xoQuote	The XML string is divided into readable lines, each of which is enclosed in quotation marks.


TCubeDim
 VCL Reference

TCubeDim

Hierarchy	Properties	Methods	See also

TCubeDim represents an entry in the dimension map of a decision cube.

Unit

mxstore

Description

Use TCubeDim to obtain information about the dimensions or summaries maintained by a decision cube. The decision cube maintains a collection of TCubeDim objects that describe the fields over which the information in the decision cube is summarized and the fields that supply those summarized values. The properties of TCubeDim can be used to change the display names of the dimensions of the decision cube, or to expand or collapse individual dimensions of the multidimensional array of values cached by the decision cube.

TCubeDim introduces properties and methods to allow a decision cube to include date ranges as the values along one of its dimensions.


 VCL Reference

TCubeDim properties

TCubeDim	Alphabetically	Legend

In TCubeDim

BinData

BinFormat

BinType

Loaded

StartDate

StartValue

ValueCount

Derived from TDimensionItem

ActiveFlag

BaseName

DerivedFrom

DimensionType

Fieldname

FieldType

Format

Name

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TCubeDim properties

TCubeDim	By object	Legend

ActiveFlag

BaseName

BinData

BinFormat

BinType

Collection

DerivedFrom

DimensionType

DisplayName

Fieldname

FieldType

Format

ID

Index

Loaded

Name

StartDate

StartValue

ValueCount


TCubeDim.BinData
 VCL Reference

TCubeDim.BinData

TCubeDim	See also

Represents information about the implementation of paged dimensions.

property BinData: TBinData;

Description

Do not use the BinData property. It is used internally to manage paged (permanently drilled) dimensions.


TCubeDim.BinFormat
 VCL Reference

TCubeDim.BinFormat

TCubeDim	See also

Indicates how range values are formatted.

property BinFormat: string;

Description

Set BinFormat to indicate how the labels for date ranges should appear. Use any standard Delphi date and time formatting strings, such as those used with the FormatDateTime function.


TCubeDim.BinType
 VCL Reference

TCubeDim.BinType

TCubeDim	See also

Indicates how the values of the field represented by the dimension are grouped.

type TBinType = (binNone, binYear, binQuarter, binMonth, binSet, binCustom);;

property BinType: TBinType;

Description

Set BinType to restrict the values that appear along the dimension. BinType can have one of the following values:

Value	Meaning

binNone	All values along the dimension appear.

binYear	Each cell along the dimension represents all field values that represent dates from the same year.

binQuarter	Each cell along the dimension represents all field values that represent dates from the same quarter.

binMonth	Each cell along the dimension represents all field values that represent dates from the same month.

binSet	The dimension is in a paged (permanently drilled) state. The drill-down value of the dimension can be changed, but the dimension can not be opened or closed.

binCustom	binCustom is not currently used but is provided to allow component writers to support other types of ranges.

If BinType is binYear, binQuarter, or binMonth, use the BinFormat property to indicate how the values of the ranges along the dimension should be formatted.

If BinType is binSet, use the StartValue property to specify which value along the dimension is used as the drill-down value. Unlike the drill-down value of a normal dimension, which is part of the pivot state stored by the decision source, the drill-down value of a paged dimension is the only value cached by the decision cube. Changing the drill-down value of paged dimensions causes the decision cube to rebuild its cache, which can be very time-consuming.

Note:	When BinType is binSet, the dimension item consumes considerably less memory in the decision cube.

Note:	Do not set BinType to binYear, binQuarter, or binMonth if the dimension does not represent a date or date-time field.


TCubeDim.Loaded
 VCL Reference

TCubeDim.Loaded

TCubeDim	See also

Indicates whether the dimension item is currently cached by the decision cube.

property Loaded: Boolean;

Description

Read Loaded to determine whether the dimension item is currently available through the decision cube. When the ActiveFlag property is diActive, Loaded is always True. When the value of ActiveFlag is diInactive, Loaded is always False. When the value of ActiveFlag is diAsNeeded, use Loaded to determine whether the decision cube has cached the dimension item so that it is available to a decision source.

When Loaded is True, the dimension item consumes memory. When Loaded is False, the dimension item is unavailable.


TCubeDim.StartDate
 VCL Reference

TCubeDim.StartDate

TCubeDim	See also

Determines how values are grouped along a dimension.

property StartDate: TDate;

Description

When the BinType property is binYear, binQuarter, or binMonth, set StartValue to the first date in the first range of the dimension. If the BinType property is binSet, set StartValue to the drill-down value of the dimension.


TCubeDim.StartValue
 VCL Reference

TCubeDim.StartValue

TCubeDim	See also

Determines how values are grouped along a dimension.

property StartValue: String;

Description

When the BinType property is binYear, binQuarter, or binMonth, set StartValue to the first date (expressed as a string) in the first range of the dimension. If the BinType property is binSet, set StartValue to the drill-down value of the dimension.


TCubeDim.ValueCount
 VCL Reference

TCubeDim.ValueCount

TCubeDim	See also

Indicates the number of distinct values exist for the dimension.

property ValueCount: Integer;

Description

Read ValueCount to determine the number of distinct values for this dimension. The decision cube sets this value using its GetDimensionMemberCount method.


 VCL Reference

TCubeDim methods

TCubeDim	Alphabetically	Legend

In TCubeDim

DefineProperties

GetBinValues

IsBinData

Derived from TDimensionItem

IsDimension

IsSummary

Derived from TCollectionItem

Create

Destroy

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCubeDim methods

TCubeDim	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineProperties

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetBinValues

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

IsBinData

IsDimension

IsSummary

MethodAddress

MethodName

NewInstance

SafeCallException


TCubeDim.DefineProperties
 VCL Reference

TCubeDim.DefineProperties

TCubeDim	See also

Designates methods for storing the dimension’s unpublished data on a stream such as a form file.

procedure DefineProperties(Filer: TFiler); override;

Description

Do not call DefineProperties. It is called automatically when forms or data modules containing the dimension’s decision cube component are loaded or saved.

DefineProperties allows the dimension to load and save information as if it were a set of published property values. TCubeDim uses this method to save some of its unpublished properties, including

an indication of whether the dimension is open or closed.

the public StartValue property.

DefineProperties also allows the dimension to read information that was previously saved in other formats so as to preserve backward compatibility.


TCubeDim.GetBinValues
 VCL Reference

TCubeDim.GetBinValues

TCubeDim	See also

Returns the set of values that are summarized by a single value along a dimension.

function GetBinValues(Value: Variant): Variant;

Description

Call GetBinValues to determine the actual values that underlie a single dimension member when the BinType property is not binNone. The Value parameter is the single dimension member that represents a date range or the single value of a paged dimension. The value of Value can be obtained by calling the GetMemberAsVariant method of the decision cube or decision source.

If the BinType property of the dimension is binYear, binQuarter, or binMonth, GetBinValues returns the starting and ending values of the range that includes the Value parameter. If the BinType property is binSet, GetBinValues returns the single drilled value of the dimension.


TCubeDim.IsBinData
 VCL Reference

TCubeDim.IsBinData

TCubeDim	See also

Indicates whether the dimension includes a member for every field value.

function IsBinData: Boolean;

Description

Call IsBinData to determine if the dimension item represents a dimension of the decision cube that groups values into date ranges or represents a paged dimension. IsBinData returns True if the value of the BinType property is not binNone.


Hierarchy

TObject

TPersistent

TCollectionItem

TDimensionItem

TCubeDim


TCubeDims
 VCL Reference

TCubeDims

Hierarchy	Properties	Methods	See also

TCubeDims is a collection of TCubeDim objects.

Unit

mxstore

Description

Use TCubeDims as the dimension map of a crosstabulated data store. Each TCubeDim object maintained by TCubeDims corresponds to a field from the data set of the crosstabulated data store. Each TCubeDim object can be used as either a dimension (a field over which data is summarized), or a summary (a value summarized over the dimensions).

TCubeDims introduces new properties to handle dimension maps that include date ranges.


 VCL Reference

TCubeDims properties

TCubeDims	Alphabetically	Legend

In TCubeDims

IsDirty

Items

Derived from TDimensionItems

ActiveDimensionCount

ActiveSummaryCount

DimensionCount

SummaryCount

Derived from TCollection

Count

ItemClass


 VCL Reference

TCubeDims properties

TCubeDims	By object	Legend

ActiveDimensionCount

ActiveSummaryCount

Count

DimensionCount

IsDirty

ItemClass

Items

SummaryCount


TCubeDims.IsDirty
 VCL Reference

TCubeDims.IsDirty

TCubeDims	See also

Indicates that the fields that correspond to the TCubeDim objects in the Items array have changed.

property IsDirty: Boolean;

Description

Read IsDirty to determine whether the information cached by the decision cube is valid. When any of the properties of the TCubeDim objects in the Items array change, IsDirty becomes True. When the value of IsDirty is read, IsDirty is reset to False.


TCubeDims.Items
 VCL Reference

TCubeDims.Items

TCubeDims	See also

Lists all dimension items maintained by the TCubeDims object.

property Items[Index: Integer]:TCubeDimdefault;

Description

Use Items to access individual dimensions or summaries maintained by the TCubeDims object. The first TCubeDim object has an Index of 0, the second has an Index of 1, and so on.

Each TCubeDim object in the Items array represents a field from the data set of a decision cube. Each item represents either a dimension (a field over which data is summarized), or a summary (a value summarized over the dimensions).

Items is the default property of TCubeDims. This means that the name of the Items property can be eliminated from code that uses the Items property. Thus, the line

DecisionCube1.DimensionMap.Items[0].ActiveFlag := diAsNeeded;

could be written

DecisionCube1.DimensionMap[0].ActiveFlag := diAsNeeded;

Note:	Do not change the Items property. The set of items in the Items array is set automatically to represent the fields from the data set. The properties of individual TCubeDim objects within the Items array may be changed to specify whether they should be cached by the data store, the name to use when displaying them, and so on.


 VCL Reference

TCubeDims methods

TCubeDims	Alphabetically	Legend

Derived from TDimensionItems

Add

AddDerivedField

AlreadyExists

Assign

AverageFieldCheck

Create

Derived from TCollection

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCubeDims methods

TCubeDims	By object	Legend

Add

AddDerivedField

AfterConstruction

AlreadyExists

Assign

AverageFieldCheck

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


Hierarchy

TObject

TPersistent

TCollection

TDimensionItems

TCubeDims


TCustomDataForm
 VCL Reference

TCustomDataForm

Hierarchy	Properties	Methods	See also

TCustomDataForm is the base class for components that generate an HTML form in an InternetExpress application.

Unit

MidItems

Description

TCustomDataForm is the base class for components that generate HTML forms to display database information that users can view and edit. Such forms can be added to the items of an InternetExpress page producer (InetXPageProducer).

TCustomDataForm implements the ability to generate an HTML form that contains controls for displaying information from an XML data packet. Buttons on the form manipulate that data, and submit updates back to the XML broker that supplies the XML data packet.

TCustomDataForm generates the HTML FORM tag and assembles the HTML generated by its Web items. It restricts the Web items that generate the contents of the form to components that generate data displays (TDataGrid or TFieldGroup), components that contain buttons which operate on those displays (TDataNavigator), and components that manage the layout of HTML controls (TLayoutGroup). At design time, you can add these Web items to the form using the Web page editor.


 VCL Reference

TCustomDataForm properties

TCustomDataForm	Alphabetically	Legend

Derived from TWebForm

Custom

Style

StyleRule

WebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomDataForm properties

TCustomDataForm	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebComponents


 VCL Reference

TCustomDataForm methods

TCustomDataForm	Alphabetically	Legend

Derived from TWebForm

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDataForm methods

TCustomDataForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebForm

TCustomDataForm

TCustomDataForm


TCustomDataBlockInterpreter
 VCL Reference

TCustomDataBlockInterpreter

Hierarchy	Methods	See also

TCustomDataBlockInterpreter marshals COM interface calls for streamed connection components.

Unit

SConnect

Description

TCustomDataBlockInterpreter introduces the methods needed for marshaling the messages that pass between a client application and an application server in a multi-tiered database application.

Streamed connection components use data block interpreters to marshal of messages sent to and received from an application server. An object that supports the IDataBlock interface stores the messages themselves.


 VCL Reference

TCustomDataBlockInterpreter methods

TCustomDataBlockInterpreter	Alphabetically	Legend

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomDataBlockInterpreter methods

TCustomDataBlockInterpreter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TCustomDataBlockInterpreter


TCustomDataNavigator
 VCL Reference

TCustomDataNavigator

Hierarchy	Properties	Methods	See also

TCustomDataNavigator assembles the HTML generated by a set of TDataSetButton and TXMLButton descendants.

Unit

MidItems

Description

Use TCustomDataNavigator as a base class for Web items that generate the HTML to arrange a collection of button controls in a data form. Each TCustomDataNavigator object has an associated Web item that generates display controls in the form. The buttons arranged by the data navigator component manipulate the information these display controls show.

TCustomDataNavigator introduces properties that customize the appearance of the buttons it arranges.

Do not create instances of TCustomDataNavigator. TCustomDataNavigator is intended to act as a base class. Instead, instantiate a descendant class such as TDataNavigator.


 VCL Reference

TCustomDataNavigator properties

TCustomDataNavigator	Alphabetically	Legend

In TCustomDataNavigator

Custom

Style

StyleRule

Derived from TXMLDisplayReferenceGroup

XMLComponent

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomDataNavigator properties

TCustomDataNavigator	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls

XMLComponent


TCustomDataNavigator.Custom
 VCL Reference

TCustomDataNavigator.Custom

TCustomDataNavigator	See also

Represents a tag option and its value in the generated TABLE tag.

property Custom: string;

Description

TCustomDataNavigator generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use Custom to add options that qualify the TABLE tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to add a border around the buttons and color the background blue, you can set Custom to

BORDER=2 BGCOLOR=BLUE


TCustomDataNavigator.Style
 VCL Reference

TCustomDataNavigator.Style

TCustomDataNavigator	See also

Adds style attributes to the generated HTML table.

property Style: string;

Description

TCustomDataNavigator generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use Style to add a STYLE option that qualifies the TABLE tag. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated TABLE tag as the value of a STYLE option.


TCustomDataNavigator.StyleRule
 VCL Reference

TCustomDataNavigator.StyleRule

TCustomDataNavigator	See also

Applies a style in the page producer’s style sheet to the group of buttons.

property StyleRule: string;

Description

TCustomDataNavigator generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated table. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the Style property.


 VCL Reference

TCustomDataNavigator methods

TCustomDataNavigator	Alphabetically	Legend

Derived from TWebDisplayReferenceGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDataNavigator methods

TCustomDataNavigator	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TWebDisplayReferenceGroup

TXMLDisplayReferenceGroup

TCustomDataNavigator


TCustomFieldGroup
 VCL Reference

TCustomFieldGroup

Hierarchy	Properties	Methods	See also

TCustomFieldGroup is the base class for Web items that arrange information on an HTML form as a set of labeled fields.

Unit

MidItems

Description

Use TCustomFieldGroup as a base class for Web items that display information in labeled fields on an HTML form. Each TCustomFieldGroup object maintains a list of Web items that generate the individual display fields. These Web items are restricted to classes that are appropriate for the specific TCustomFieldGroup descendant.

If the controls generated for TCustomFieldGroup by its Web items represent database information, you can bind the field group to an XML data packet or dataset field within an XML data packet. The Web items can use that binding to determine the source of the data they display.

TCustomFieldGroup introduces a number of properties that affect the appearance of the generated set of fields.

In order to let other Web items use the HTML that the TCustomFieldGroup object generates, TCustomFieldGroup inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TCustomFieldGroup. Instead, use a descendant of TCustomFieldGroup such as TFieldGroup or TQueryFieldGroup.


 VCL Reference

TCustomFieldGroup properties

TCustomFieldGroup	Alphabetically	Legend

In TCustomFieldGroup

Custom

Style

StyleRule

Derived from TXMLDisplayGroup

VisibleFields

XMLBroker

XMLDataSetField

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomFieldGroup properties

TCustomFieldGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

VisibleFields

WebFieldControls

XMLBroker

XMLDataSetField


TCustomFieldGroup.Custom
 VCL Reference

TCustomFieldGroup.Custom

TCustomFieldGroup	See also

Represents a tag option and its value in the generated TABLE tag.

property Custom: string;

Description

TCustomFieldGroup generates an HTML table to manage the layout of the HTML controls that its Web items generate. Use Custom to add options that qualify the TABLE tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to surround the set of fields with a border and give them a blue background, set Custom to

BORDER=2 BGCOLOR=BLUE


TCustomFieldGroup.Style
 VCL Reference

TCustomFieldGroup.Style

TCustomFieldGroup	See also

Adds style attributes to the generated set of fields.

property Style: string;

Description

TCustomFieldGroup generates an HTML table to lay out the fields that its Web items generate. Use Style to add a STYLE option that qualifies the TABLE tag. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated TABLE tag as the value of a STYLE option.


TCustomFieldGroup.StyleRule
 VCL Reference

TCustomFieldGroup.StyleRule

TCustomFieldGroup	See also

Applies a style in the page producer’s style sheet to the table.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated set of fields. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the Style property.


 VCL Reference

TCustomFieldGroup methods

TCustomFieldGroup	Alphabetically	Legend

In TCustomFieldGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomFieldGroup methods

TCustomFieldGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomFieldGroup.Create
 VCL Reference

TCustomFieldGroup.Create

TCustomFieldGroup	See also

Creates and initializes an instance of TCustomFieldGroup.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCustomFieldGroup at runtime. TCustomFieldGroup components added at design time using the Web Page editor are instantiated automatically.


TCustomFieldGroup.Destroy
 VCL Reference

TCustomFieldGroup.Destroy

TCustomFieldGroup	See also

Frees an instance of TCustomFieldGroup.

Description

Do not call Destroy directly. Instead, call Free, which checks whether the object reference is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TXMLDisplayGroup

TCustomFieldGroup


TCustomLayoutGroup
 VCL Reference

TCustomLayoutGroup

Hierarchy	Properties	Methods	See also

TCustomLayoutGroup is the base class for Web items that arrange content produced by arbitrary Web items.

Unit

MidItems

Description

Use TCustomLayoutGroup as a base class for Web items that are used purely for layout. There are few restrictions on what Web items can use a layout group because it has no special content that it displays. It merely imposes a layout on content generated by other Web items.

TCustomLayoutGroup maintains a list of Web items that display information in the final HTML document, but imposes no restrictions of its own on the possible types of Web items. Instead, it restricts those Web items to the classes that its parent allows. In order to let the parent component use the HTML that TCustomLayoutGroup generates, TCustomLayoutGroup inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TCustomLayoutGroup. Instead, use a descendant of TCustomLayoutGroup such as TLayoutGroup.


 VCL Reference

TCustomLayoutGroup properties

TCustomLayoutGroup	Alphabetically	Legend

In TCustomLayoutGroup

Custom

DisplayColumns

Style

StyleRule

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomLayoutGroup properties

TCustomLayoutGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayColumns

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls


TCustomLayoutGroup.Custom
 VCL Reference

TCustomLayoutGroup.Custom

TCustomLayoutGroup	See also

Represents a tag option and its value in the generated TABLE tag.

property Custom: string;

Description

TCustomLayoutGroup generates an HTML table to lay out the controls generated by the Web items in its WebFieldControls property. Use Custom to add options that qualify the TABLE tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to add a border around the group of controls and color the background blue, you can set Custom to

BORDER=2 BGCOLOR=BLUE


TCustomLayoutGroup.DisplayColumns
 VCL Reference

TCustomLayoutGroup.DisplayColumns

TCustomLayoutGroup	See also

Specifies the number of columns the layout group uses to lay out its child controls.

property DisplayColumns: Integer;

Description

TCustomLayoutGroup generates an HTML table to lay out the controls generated by the Web items in its WebFieldControls property. It adds the HTML generated by each Web item listed in WebFieldControls to a cell of the table, filling the cells out row by row until it displays all the Web items. DisplayColumns determines the number of cells in each row.


TCustomLayoutGroup.Style
 VCL Reference

TCustomLayoutGroup.Style

TCustomLayoutGroup	See also

Adds style attributes to the generated HTML table.

property Style: string;

Description

TCustomLayoutGroup generates an HTML table to lay out the controls generated by the Web items in WebFieldControls. Use Style to add a STYLE option that qualifies the TABLE tag. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated TABLE tag as the value of a STYLE option.


TCustomLayoutGroup.StyleRule
 VCL Reference

TCustomLayoutGroup.StyleRule

TCustomLayoutGroup	See also

Applies a style in the page producer’s style sheet to the group of buttons.

property StyleRule: string;

Description

TCustomLayoutGroup generates an HTML table to lay out the controls generated by its Web items. Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated table. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the Style property.


 VCL Reference

TCustomLayoutGroup methods

TCustomLayoutGroup	Alphabetically	Legend

In TCustomLayoutGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomLayoutGroup methods

TCustomLayoutGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomLayoutGroup.Create
 VCL Reference

TCustomLayoutGroup.Create

TCustomLayoutGroup	See also

Creates and initializes an instance of TCustomLayoutGroup.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCustomLayoutGroup at runtime. TCustomLayoutGroup components added at design time using the Web Page editor are instantiated automatically.


TCustomLayoutGroup.Destroy
 VCL Reference

TCustomLayoutGroup.Destroy

TCustomLayoutGroup	See also

Frees an instance of TCustomLayoutGroup.

Description

Do not call Destroy directly. Instead, call Free, which checks whether the layout group is nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TCustomLayoutGroup


TCustomQueryButtons
 VCL Reference

TCustomQueryButtons

Hierarchy	Properties	Methods	See also

TCustomQueryButtons assembles the HTML generated by a set of TQueryButton descendants.

Unit

MidItems

Description

Use TCustomQueryButtons as a base class for Web items that generate the HTML to arrange a collection of button controls in a query form. The buttons arranged by the query buttons component manipulate information shown by display controls in the parent Query form.

TCustomQueryButtons introduces properties that customize the appearance of the buttons it arranges.

Do not create instances of TCustomQueryButtons. TCustomQueryButtons is intended to act as a base class. Instead, instantiate a descendant class such as TQueryButtons.


 VCL Reference

TCustomQueryButtons properties

TCustomQueryButtons	Alphabetically	Legend

In TCustomQueryButtons

Custom

Style

StyleRule

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomQueryButtons properties

TCustomQueryButtons	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls


TCustomQueryButtons.Custom
 VCL Reference

TCustomQueryButtons.Custom

TCustomQueryButtons	See also

Represents a tag option and its value in the generated TABLE tag.

property Custom: string;

Description

TCustomQueryButtons generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use Custom to add options that qualify the TABLE tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to add a border around the query buttons and color the background blue, you can set Custom to

BORDER=2 BGCOLOR=BLUE


TCustomQueryButtons.Style
 VCL Reference

TCustomQueryButtons.Style

TCustomQueryButtons	See also

Adds style attributes to the generated HTML table.

property Style: string;

Description

TCustomQueryButtons generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use Style to add a STYLE option that qualifies the TABLE tag. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated TABLE tag as the value of a STYLE option.


TCustomQueryButtons.StyleRule
 VCL Reference

TCustomQueryButtons.StyleRule

TCustomQueryButtons	See also

Applies a style in the page producer’s style sheet to the group of buttons.

property StyleRule: string;

Description

TCustomQueryButtons generates an HTML table to lay out the buttons listed in the WebFieldControls property. Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated table. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the Style property.


 VCL Reference

TCustomQueryButtons methods

TCustomQueryButtons	Alphabetically	Legend

Derived from TWebControlGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomQueryButtons methods

TCustomQueryButtons	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TCustomQueryButtons


TDataBlockInterpreter
 VCL Reference

TDataBlockInterpreter

Hierarchy	Methods	See also

TDataBlockInterpreter marshals COM interface calls for non COM-based connection components.

Unit

SConnect

Description

Many streamed connection components use TDataBlockInterpreter to handle the marshaling of messages sent to and received from an application server. An object that supports the IDataBlock interface stores the messages themselves.


 VCL Reference

TDataBlockInterpreter methods

TDataBlockInterpreter	Alphabetically	Legend

In TDataBlockInterpreter

CallCreateObject

Create

Destroy

InterpretData

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataBlockInterpreter methods

TDataBlockInterpreter	By object	Legend

AfterConstruction

BeforeDestruction

CallCreateObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

InterpretData

MethodAddress

MethodName

NewInstance

SafeCallException


TDataBlockInterpreter.Create
 VCL Reference

TDataBlockInterpreter.Create

TDataBlockInterpreter	See also

Creates and initializes an instance of TDataBlockInterpreter.

constructor Create(SendDataBlock: ISendDataBlock; CheckRegValue: string);

Description

Applications should not need to instantiate data block interpreters. Typically, they are instantiated by the streamed connection components that use them to marshal data. To access a streamed connection component’s data block interpreter instance, use its Interpreter property.

Create takes two arguments:

An ISendDataBlock interface that the data block interpreter can use to send information in a data block to its destination object (usually the remote data module of an application server).

A string that specifies a registry key value which must appear for application servers that can be accessed using the data block interpreter.


TDataBlockInterpreter.CallCreateObject
 VCL Reference

TDataBlockInterpreter.CallCreateObject

TDataBlockInterpreter	See also

Creates a COM object on a remote application server given its class name.

function CallCreateObject(Name: String): OleVariant; override;

Description

CallCreateObject sends a message to the remote application server, telling it to create an object of the class specified by the Name parameter. Name is the string representation of the Class ID (CLSID). CreateObject returns a reference to an interface that can be used to communicate with the remote COM object.


TDataBlockInterpreter.Destroy
 VCL Reference

TDataBlockInterpreter.Destroy

TDataBlockInterpreter	See also

Destroys an instance of TDataBlockInterpreter.

destructor Destroy; override;

Description

Applications have no need to free data block interpreters. They are freed by the streamed connection component that uses them to marshal interface calls.


TDataBlockInterpreter.InterpretData
 VCL Reference

TDataBlockInterpreter.InterpretData

TDataBlockInterpreter

Interprets a call received from a remote application server.

procedure InterpretData(const Data: IDataBlock); override;

Description

Call InterpretData to respond to a COM interface call that is marshaled to a data block. The Data parameter specifies an IDataBlock interface that can be used to read the marshaled version of the message.

InterpretData reads the call, interprets it as an IDispatch call, and performs the appropriate actions (such as invoking a local COM interface).


Hierarchy

TObject

TCustomDataBlockInterpreter

TDataBlockInterpreter


TDataContext
 VCL Reference

TDataContext

Hierarchy	Methods	See also

TDataContext stores temporary information about a set of objects, Variants, and other related values.

Unit

InvokeRegistry

Description

TDataContext is a repository for information that belongs together. It introduces a number of methods for storing different types of information, including objects, Variants, pointers, and raw data (untyped bytes). When the TDataContext object is freed, it performs all necessary cleanup of the information it stores, freeing the objects, clearing the Variants, and so on.

Do not use TDataContext directly. It is intended as a base class for classes that need a temporary repository that serves a specific purpose. TDataContext does not allocate the internal dynamic arrays that store pointers and raw data: This task is left to descendant classes, such as TInvContext.


 VCL Reference

TDataContext methods

TDataContext	Alphabetically	Legend

In TDataContext

AddDynArrayToClear

AddObjectToDestroy

AddStrToClear

AddVariantToClear

AllocData

Create

Destroy

GetDataPointer

RemoveObjectToDestroy

SetDataPointer

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataContext methods

TDataContext	By object	Legend

AddDynArrayToClear

AddObjectToDestroy

AddStrToClear

AddVariantToClear

AfterConstruction

AllocData

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDataPointer

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RemoveObjectToDestroy

SafeCallException

SetDataPointer


TDataContext.AddDynArrayToClear
 VCL Reference

TDataContext.AddDynArrayToClear

TDataContext	See also

Stores a dynamic array that can be cleared when the data context is finished.

procedure AddDynArrayToClear(P: Pointer; Info: PTypeInfo);

Description

Call AddDynArrayToClear to add a dynamic array to the list of temporary dynamic arrays that TDataContext maintains. When the TDataContext instance is freed, it clears all dynamic arrays in this list of temporary arrays.

P is a pointer to the dynamic array.

Info is the TypeInfo pointer for the dynamic array.

Note:	TDataContext does not provide access to this list. The caller must keep a reference to the dynamic arrays for use while the TDataContext instance exists.


TDataContext.AddObjectToDestroy
 VCL Reference

TDataContext.AddObjectToDestroy

TDataContext	See also

Stores an object that can be freed when the data context is finished.

procedure AddObjectToDestroy(Obj: TObject);

Description

Call AddObjectToDestroy to add an object instance to the list of temporary objects that TDataContext maintains. When the TDataContext instance is freed, it frees all the objects in this list of temporary objects.

Note:	TDataContext does not provide access to this list. The caller must keep a reference to the object for use while the TDataContext instance exists.


TDataContext.AddStrToClear
 VCL Reference

TDataContext.AddStrToClear

TDataContext	See also

Stores a string that can be cleared when the data context is finished.

procedure AddStrToClear(P: Pointer);

Description

Call AddStrToClear to add a string to the list of temporary strings that TDataContext maintains. When the TDataContext instance is freed, it clears all strings in this list.

P is a pointer to the string.

Note:	TDataContext does not provide access to this list. The caller must keep a reference to the string for use while the TDataContext instance exists.


TDataContext.AddVariantToClear
 VCL Reference

TDataContext.AddVariantToClear

TDataContext	See also

Stores the value of a Variant that can be cleared when the data context is finished.

type PVarData = ^TVarData;

procedure AddVariantToClear(P: PVarData);

Description

Call AddVariantToClear to add a Variant to the list of temporary Variant values that TDataContext maintains. When the TDataContext instance is freed, it clears all the Variants in this list of temporary Variant values.

Note:	TDataContext does not provide access to this list. The caller must keep a reference to the Variant for use while the TDataContext instance exists.


TDataContext.AllocData
 VCL Reference

TDataContext.AllocData

TDataContext	See also

Returns a pointer to the data context’s cache of raw memory.

function AllocData(Size: Integer): Pointer;

Description

Use AllocData to obtain a pointer to a chunk of temporary memory.

Size is the number of bytes desired.

AllocData returns a pointer to Size bytes.

Note:	TDataContext does not actually allocate the memory that AllocData returns. Descendant classes must initialize the internal cache that the returned pointer addresses.


TDataContext.Create
 VCL Reference

TDataContext.Create

TDataContext

Creates an instance of TDataContext.

constructor Create;

Description

Call Create to instantiate a TDataContext object.


TDataContext.Destroy
 VCL Reference

TDataContext.Destroy

TDataContext	See also

Destroys an instance of TDataContext.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the TDataContext reference is not nil before calling Destroy.

Destroy frees all the temporary data stored in the TDataContext instance.


TDataContext.GetDataPointer
 VCL Reference

TDataContext.GetDataPointer

TDataContext	See also

Returns a pointer from the internal cache of pointers.

function GetDataPointer(Index: Integer): Pointer;

Description

GetDataPointer returns a pointer from the internal cache of pointers. This value is assigned by a call to the SetDataPointer method.

Index is the index of the desired pointer, where 0 is the first pointer, 1 is the second pointer, and so on.

Note:	TDataContext does not actually allocate the memory to store these pointers. Descendant classes must initialize the internal dynamic array that TDataContext uses to store pointers.


TDataContext.RemoveObjectToDestroy
 VCL Reference

TDataContext.RemoveObjectToDestroy

TDataContext	See also

Remove an object from the list of objects to free when the data context is freed.

procedure RemoveObjectToDestroy(Obj: TObject);

Description

Call RemoveObjectToDestroy to remove an object instance from the list of temporary objects that TDataContext maintains. This prevents TDataContext from freeing the object when it is itself freed.

For example, TRemotable descendants that are created by a Web Service application when it executes an invokable interface call are automatically added to a data context that persists for the length of the method call. When an application changes the remotable object’s DataContext property, it automatically calls RemoveObjectToDestroy so that the object is not automatically freed when the method call is complete.


TDataContext.SetDataPointer
 VCL Reference

TDataContext.SetDataPointer

TDataContext	See also

Stores a pointer in the internal cache of pointers.

procedure SetDataPointer(Index: Integer; P: Pointer);

Description

SetDataPointer stores a pointer that can later be retrieved by a call to GetDataPointer. TDataContext owns only the pointer, not the data to which it points. When you free the TDataContext instance, it frees its list of pointers, but not the memory to which they point, unless they are first obtained by a call to the AllocData method.

Index is the index of the pointer in the internal cache of pointers, where 0 specifies the first pointer, 1 specifies the second pointer, and so on.

P is the pointer to store.

Note:	TDataContext does not actually allocate the memory to store these pointers. Descendant classes must initialize the internal dynamic array that TDataContext uses to store pointers.


Hierarchy

TObject

TDataContext


TDataNavigator
 VCL Reference

TDataNavigator

Hierarchy	Properties	Methods	See also

TDataNavigator assembles the HTML generated by a set of TDataSetButton and TXMLButton descendants.

Unit

MidItems

Description

Add TDataNavigator as the child of a TDataForm component (or a layout group that is a child of a TDataForm component) to enable the generated HTML form to navigate the displayed data and apply updates that end users make to the data. TDataNavigator can be associated with the Web item that displays the data, such as TDataGrid or TFieldGroup.

TDataNavigator generates HTML containing the controls generated by its children. These children must be descendants of TDataSetButton or TXMLButton, such as TInsertButton and TApplyUpdatesButton.

Use the properties of TDataNavigator to customize the appearance of the group of buttons.


 VCL Reference

TDataNavigator properties

TDataNavigator	Alphabetically	Legend

Derived from TCustomDataNavigator

Custom

Style

StyleRule

Derived from TXMLDisplayReferenceGroup

XMLComponent

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataNavigator properties

TDataNavigator	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebFieldControls

XMLComponent


 VCL Reference

TDataNavigator methods

TDataNavigator	Alphabetically	Legend

Derived from TWebDisplayReferenceGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataNavigator methods

TDataNavigator	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TWebDisplayReferenceGroup

TXMLDisplayReferenceGroup

TCustomDataNavigator

TDataNavigator


TCustomDataStore
 VCL Reference

TCustomDataStore

Hierarchy	Properties	Methods	Events	See also

TCustomDataStore is the base class for components that analyze and maintain crosstabulated data.

Unit

mxstore

Description

Use TCustomDataStore as a base class when defining classes that fetch data from appropriately structured datasets and analyze it into a multidimensional array of summary values. Each dimension corresponds to a field in the dataset over which information is summarized. TCustomDataStore maintains a cached projection of this array over a set of active dimensions. The cache allows TCustomDataStore to quickly provide a projection of any subset of the active dimensions.

TCustomDataStore introduces properties and methods that describe the dimensions of the crosstabulated data array and the summary values that are computed over those dimensions.

Do not create instances of TCustomDataStore. To make the crosstabulated data from a TCustomDataStore object available to the objects in a form, use a TDecisionCube object.


 VCL Reference

TCustomDataStore properties

TCustomDataStore	Alphabetically	Legend

In TCustomDataStore

BinData

Capacity

CurrentSummary

DataSet

DimensionCount

DimensionMap

DimensionMapCount

MaxCells

MaxDimensions

MaxSummaries

ShowProgressDialog

SummaryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomDataStore properties

TCustomDataStore	By object	Legend

BinData

Capacity

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CurrentSummary

DataSet

DesignInfo

DimensionCount

DimensionMap

DimensionMapCount

MaxCells

MaxDimensions

MaxSummaries

Name

Owner

ShowProgressDialog

SummaryCount

Tag

VCLComObject


TCustomDataStore.BinData
 VCL Reference

TCustomDataStore.BinData

TCustomDataStore	See also

Indicates whether all the dimensions in the multidimensional array include a cell for every value along the dimension.

property BinData: Boolean;

Description

Read BinData to determine whether any of the active dimensions have been grouped into ranges or been put into a paged (permanently drilled) state. When BinData is True, at least one dimension has been paged or has been collapsed into ranges of values. When BinData is False, all dimensions include entries for every value of the dimension field that appears in the dataset.


TCustomDataStore.Capacity
 VCL Reference

TCustomDataStore.Capacity

TCustomDataStore	See also

Limits the memory that may be used by the cached array of summary values.

property Capacity: Integer;

Description

Set Capacity to limit the number of bytes that may be used by the crosstabulated data store for storing the multidimensional array of summary values. If the number of active dimensions and summaries causes the cache to exceed this value, an ELowCapacityError is raised.


TCustomDataStore.CurrentSummary
 VCL Reference

TCustomDataStore.CurrentSummary

TCustomDataStore	See also

Specifies the index of the current summary from the set of active summaries maintained by the crosstabulated data store.

property CurrentSummary: Integer;

Description

Use CurrentSummary to determine which of the active summaries is used to provide values to clients of the data store. CurrentSummary returns 0 if the first active summary is the current summary. CurrentSummary returns SummaryCount-1 if the last active summary is the current summary.

The dataset specified by the DataSet property provides all the fields that make up the dimensions and summaries of the dimension map. At any time, a subset of all the dimensions and summaries provided by the dataset is cached by the crosstabulated data store and available to decision source objects. Of all the active (cached) summaries, only one can be provided to decision source objects at a time. That one summary is the current summary.


TCustomDataStore.DataSet
 VCL Reference

TCustomDataStore.DataSet

TCustomDataStore	See also

Specifies the dataset that provides the fields which make up the dimensions and summaries maintained by the crosstabulated data store.

property DataSet: TDataSet;

Description

Set DataSet to the dataset that contains the crosstabulated data for the data store. Usually, DataSet is a TDecisionQuery object. TDecisionQuery objects are SQL queries that are grouped appropriately to calculate summaries for a crosstabulated data store.

The DataSet property can also be set to a TQuery object where the SQL has the same form as that of a TDecisionQuery or to any other dataset that contains summarized values in the same structure as the result of a TDecisionQuery query.

If the DataSet property is a TQuery or TDecisionQuery object, the crosstabulated data store automatically determines which fields are dimensions and which are summaries. If the DataSet property is not a query, the fields in the dimension map must be explicitly identified as dimensions or summaries, and, if they represent summaries, the type of summary must be indicated.

Note:	The summary values for the crosstabulated data store must be calculated by the TDataSet object. The data store does not summarize raw data, but analyzes summarized data into dimensions.


TCustomDataStore.DimensionCount
 VCL Reference

TCustomDataStore.DimensionCount

TCustomDataStore	See also

Specifies the number of dimensions cached by the crosstabulated data store.

property DimensionCount: Integer;

Description

Read DimensionCount to determine the number of active dimensions. The dataset specified by the DataSet property provides all the fields that make up the dimensions and summaries of the dimension map. At any time, a subset of all the dimensions and summaries provided by the dataset is cached by the crosstabulated data store and available to decision source objects. DimensionCount is the number of active (cached) dimensions that can be provided to decision source objects.


TCustomDataStore.DimensionMap
 VCL Reference

TCustomDataStore.DimensionMap

TCustomDataStore	See also

Describes the dimensions and summaries maintained by the crosstabulated data store.

property DimensionMap: TCubeDims;

Description

Read DimensionMap to access the dimensions and summaries of the data store. The individual entries of the dimension map represent the fields of the dataset specified by the DataSet property or calculated fields derived from those fields, such as averages. DimensionMap provides information about these fields from the dataset that make up the crosstabulated data store, including the field names and the use of the fields within the multidimensional array.

When the data store is not active, use the properties of the TCubeDim objects to change the information cached by the data store. Use the ActiveFlag property of individual TCubeDim objects to specify whether those dimensions or summaries from the dataset are cached by the crosstabulated data store. Use the BinType property of the TCubeDim objects to allow cells along temporal dimensions to represent date ranges or to put the dimensions in a paged (permanently drilled) state.

If the dataset is not a query, use the DimensionType property of the TCubeDim objects to identify which fields are dimensions and which are summaries, and to identify the type of summary represented by the summary fields.

To change the properties of the entries in the dimension map when the data store is active, use the Refresh method.

Note:	At design time, the DimensionType, Name, and ActiveFlag properties of the TCubeDim objects that make up the dimension map can be set using the Decision Cube Editor.


TCustomDataStore.DimensionMapCount
 VCL Reference

TCustomDataStore.DimensionMapCount

TCustomDataStore	See also

Specifies the total number of fields from the dataset that make up the dimensions and summaries of the dimension map.

property DimensionMapCount: Integer;

Description

Read DimensionMapCount to determine the number of TCubeDim objects that can be accessed through the DimensionMap property. The value of DimensionMapCount is the number of fields in the dataset specified by the DataSet property plus the number of derived fields based on those fields, such as fields for average values that are derived from count and summary fields.

The value of DimensionMapCount is not the same as DimensionCount + SummaryCount. DimensionCount and SummaryCount count the number of dimensions and summaries that are cached by the crosstabulated data cube and available to the decision source. DimensionMapCount also counts any inactive dimensions or summaries that are not included in the cache.


TCustomDataStore.MaxCells
 VCL Reference

TCustomDataStore.MaxCells

TCustomDataStore	See also

Limits the number of cells that can be included in the cache at any one time.

property MaxCells: Integer;

Description

Use MaxCells to limit the memory usage of the crosstabulated data store. Memory consumption increases geometrically with each dimension that is cached in the multidimensional array and linearly with each summary. MaxCells prevents too many dimensions or summaries from being cached at once.

When the ActiveFlag property of a dimension or summary is diActive, it is always added to the cache. When the ActiveFlag property of a dimension or summary is diAsNeeded, it can be added only if it does not cause the number of cells to exceed MaxCells. The data store swaps in as-needed dimensions and summaries when they are used by the decision source, making room, if necessary, by swapping out closed dimensions or summaries that are not current.

Note:	Be sure to set MaxCells to a value big enough to accommodate all active dimensions and summaries plus the number of as-needed dimensions and summaries that can be open at one time.


TCustomDataStore.MaxDimensions
 VCL Reference

TCustomDataStore.MaxDimensions

TCustomDataStore	See also

Limits the number of dimensions that can be cached by the crosstabulated data store at any one time.

property MaxDimensions: Integer;

Description

Use MaxDimensions to limit the memory usage of the data store. Memory consumption increases geometrically with each dimension that is cached in the multidimensional array. MaxDimensions prevents too many dimensions to be cached at once.

When the ActiveFlag property of a dimension is diActive, the dimension is always added to the cache. When the ActiveFlag property of a dimension is diAsNeeded, it can be added only if it does not cause the number of active dimensions to exceed MaxDimensions. The data store swaps in as-needed dimensions when they are open in the decision source, making room, if necessary, by swapping out closed dimensions.

Note:	Be sure to set MaxDimensions to a value big enough to accommodate all active dimensions plus the number of as-needed dimensions that can be open at one time.


TCustomDataStore.MaxSummaries
 VCL Reference

TCustomDataStore.MaxSummaries

TCustomDataStore	See also

Limits the number of summaries that can be cached by the crosstabulated data store at one time.

property MaxSummaries: Integer;

Description

Use MaxSummaries to limit the memory usage of the data store. Memory consumption increases linearly with each summary that is cached in the multidimensional array. MaxSummaries prevents too many summaries to be cached at once.

When the ActiveFlag property of a summary is diActive, the summary is always added to the cache. When the ActiveFlag property is diAsNeeded, it can be added only if it does not cause the number of active summaries to exceed MaxSummaries. The data store swaps in as-needed summaries when they are chosen as the current summary, making room, if necessary, by swapping out other as-needed summaries.


TCustomDataStore.ShowProgressDialog
 VCL Reference

TCustomDataStore.ShowProgressDialog

TCustomDataStore	See also

Determines whether a progress bar appears when the cache of crosstabulated values is built.

property ShowProgressDialog: Boolean;

Description

Set ShowProgressDialog to specify whether a progress bar should appear to provide users with a visual indication when the cache is being built. If the crosstabulated data store includes may dimensions, rebuilding the cache can take a noticeable amount of time. The progress bar provides users with feedback about how long this process will take.


TCustomDataStore.SummaryCount
 VCL Reference

TCustomDataStore.SummaryCount

TCustomDataStore	See also

Specifies the number of summary fields cached by the crosstabulated data store.

property SummaryCount: Integer;

Description

Read SummaryCount to determine the number of active summaries in the dimension map. The dataset specified by the DataSet property provides all the fields that make up the dimensions and summaries of the dimension map. At any time, a subset of all the dimensions and summaries provided by the dataset is cached by the crosstabulated data store and available to decision source objects. SummaryCount is the number of active (cached) summaries that can provide data to decision source objects.


 VCL Reference

TCustomDataStore events

TCustomDataStore	Alphabetically	Legend

In TCustomDataStore

AfterClose

AfterOpen

BeforeClose

BeforeOpen

OnLowCapacity

OnRefresh


 VCL Reference

TCustomDataStore events

TCustomDataStore	By object	Legend

AfterClose

AfterOpen

BeforeClose

BeforeOpen

OnLowCapacity

OnRefresh


TCustomDataStore.AfterClose
 VCL Reference

TCustomDataStore.AfterClose

TCustomDataStore	See also

Occurs immediately after the crosstabulated data store has been deactivated.

type TCubeNotifyEvent = procedure(DataCube: TCustomDataStore) of object;

property AfterClose: TCubeNotifyEvent;

Description

Write an AfterClose event handler to take specific action when the crosstabulated data store has been shut down. For example, an application could provide feedback about the state of the data store, or update the dimension map for the next time the data store is activated.


TCustomDataStore.AfterOpen
 VCL Reference

TCustomDataStore.AfterOpen

TCustomDataStore	See also

Occurs immediately after the crosstabulated data store has been activated.

type TCubeNotifyEvent = procedure(DataCube: TCustomDataStore) of object;

property AfterOpen: TCubeNotifyEvent;

Description

Write an AfterOpen event handler to take specific action when the crosstabulated data store is activated. This is the first opportunity to determine how much memory is consumed by the multidimensional cache maintained by the data store.


TCustomDataStore.BeforeClose
 VCL Reference

TCustomDataStore.BeforeClose

TCustomDataStore	See also

Occurs immediately before the crosstabulated data store is deactivated.

type TCubeNotifyEvent = procedure(DataCube: TCustomDataStore) of object;

property BeforeClose: TCubeNotifyEvent;

Description

Write a BeforeClose event handler to take specific action before the data store shuts down. For example, an application can store information about the current state of the cache before it is cleared and all associated memory freed.


TCustomDataStore.BeforeOpen
 VCL Reference

TCustomDataStore.BeforeOpen

TCustomDataStore	See also

Occurs immediately before the crosstabulated data store is activated.

type TCubeNotifyEvent = procedure(DataCube: TCustomDataStore) of object;

property BeforeOpen: TCubeNotifyEvent;

Description

Write a BeforeOpen event handler to take specific action before the crosstabulated data store is activated. This is an appropriate time to adjust the value of Capacity, or set the ShowProgressDialog based on the number of active dimensions in the DimensionMap.

This is the last opportunity to adjust the entries in the DimensionMap before the cache is built. If the data store has never been active before this, the DimensionMap property will be nil at this point. A BeforeOpen event handler can build a dimension map programmatically if it is nil. If the dimension map is not nil, the properties of the dimension items can be changed, but the order and number of the dimension items themselves should not be changed.


TCustomDataStore.OnLowCapacity
 VCL Reference

TCustomDataStore.OnLowCapacity

TCustomDataStore	See also

Occurs when the multidimensional cache requires more memory than is allowed by the Capacity property.

type

  TErrorAction = (eaFail, eaContinue);

TCapacityErrorEvent = procedure(var EAction: TErrorAction) of object;

property OnLowCapacity: TCapacityErrorEvent;

Description

Write an OnLowCapacity event handler to respond to ELowCapacityError exceptions. An OnLowCapacity event handler can change the value of Capacity or deactivate some of the dimensions in the dimension map in order to allow the cache to fit in the available memory. If the memory problem is handled by the OnLowCapacity event handler, change the Action parameter to eaContinue to allow the data store to continue building the cache. Otherwise, an ELowCapacityError exception will be raised.


TCustomDataStore.OnRefresh
 VCL Reference

TCustomDataStore.OnRefresh

TCustomDataStore	See also

Occurs immediately before the dimension map is changed.

type TCubeRefreshEvent = procedure(DataCube: TCustomDataStore; DimMap: TCubeDims) of object;

property OnRefresh: TCubeRefreshEvent;

Description

Write an OnRefresh event handler to take specific action when the dimension map changes. The DimMap parameter specifies the new value that is about to be set for the DimensionMap property. Use an OnRefresh event handler to change the properties of these dimension items before the DimensionMap property is set and the cache is rebuilt. This is also an opportunity to reset the MaxDimensions or MaxSummaries property to accommodate the dimension map that is about to be set.


 VCL Reference

TCustomDataStore methods

TCustomDataStore	Alphabetically	Legend

In TCustomDataStore

CalcSubTotals

Create

Destroy

GetDimensionMemberCount

GetDimensionName

GetMemberAsString

GetMemberAsVariant

GetMemoryUsage

GetSummaryAsString

GetSummaryAsVariant

GetSummaryName

Refresh

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDataStore methods

TCustomDataStore	By object	Legend

AfterConstruction

Assign

BeforeDestruction

CalcSubTotals

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDimensionMemberCount

GetDimensionName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMemberAsString

GetMemberAsVariant

GetMemoryUsage

GetNamePath

GetParentComponent

GetSummaryAsString

GetSummaryAsVariant

GetSummaryName

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomDataStore.Create
 VCL Reference

TCustomDataStore.Create

TCustomDataStore	See also

Creates an instance of TCustomDataStore.

constructor Create(AOwner: TComponent); override;

Description

Create allocates the helper objects used by the crosstabulated data store to manage the dimension map and the crosstabulated data.


TCustomDataStore.CalcSubTotals
 VCL Reference

TCustomDataStore.CalcSubTotals

TCustomDataStore	See also

Calculates dimension subtotals.

procedure CalcSubTotals;

Description

CalcSubTotals calculates dimension subtotals in cached data. CalcSubtotal is used internally by TCustomDataStore; an application should not call CalcSubTotals directly.


TCustomDataStore.Destroy
 VCL Reference

TCustomDataStore.Destroy

TCustomDataStore	See also

Destroys an instance of TCustomDataStore.

destructor Destroy; override;

Description

Do not call the Destroy method directly. Instead call Free. Free verifies that the decision cube is not nil, and only then calls Destroy.


TCustomDataStore.GetDimensionMemberCount
 VCL Reference

TCustomDataStore.GetDimensionMemberCount

TCustomDataStore	See also

Returns the number of distinct values for a dimension of the data store.

function GetDimensionMemberCount(Dimension: Integer): Integer; virtual;

Description

Call GetDimensionMemberCount to determine the number of distinct field values in the dimension specified by the Dimension parameter. Zero specifies the first active dimension, and DimensionCount-1 specifies the last active dimension.

To obtain the individual values of the dimension, use the GetMemberAsString or GetMemberAsVariant method. GetDimensionMemberCount returns a value that provides an upper limit to the Index parameter of the GetMemberAsString or GetMemberAsVariant method.

To obtain the name of the dimension referred to by the Dimension parameter, use the GetDimensionName method.


TCustomDataStore.GetDimensionName
 VCL Reference

TCustomDataStore.GetDimensionName

TCustomDataStore	See also

Returns the name of an active dimension.

function GetDimensionName(Dimension: Integer): String; virtual;

Description

Call GetDimensionName to obtain the name of the dimension indexed by the Dimension parameter. Zero specifies the first active dimension and DimensionCount-1 specifies the last active dimension. The name of a dimension is the name of the database field the dimension represents, unless the Name property of the corresponding TDimensionItem object is changed.


TCustomDataStore.GetMemberAsString
 VCL Reference

TCustomDataStore.GetMemberAsString

TCustomDataStore	See also

Returns the specified value from a dimension of the data store, formatted as a string.

function GetMemberAsString(Dimension, Index: Integer): String; virtual;

Description

Call GetMemberAsString to retrieve one of the values from the dimension specified by the Dimension parameter. Zero specifies the first dimension, and DimensionCount-1 specifies the last dimension. The Index parameter indicates which value along the dimension is returned, where 0 is the first value. GetDimensionMemberCount returns the number of values included in the dimension.

GetMemberAsString returns a field value formatted as a string. To obtain the field value as an unformatted variant, use the GetMemberAsVariant method.


TCustomDataStore.GetMemberAsVariant
 VCL Reference

TCustomDataStore.GetMemberAsVariant

TCustomDataStore	See also

Returns the specified value from a dimension of the crosstabulated data store.

function GetMemberAsVariant(Dimension, Index: Integer): Variant;

Description

Call GetMemberAsVariant to retrieve one of the values from the dimension specified by the Dimension parameter. Zero specifies the first dimension, and DimensionCount-1 specifies the last dimension. The Index parameter indicates which value along the dimension is returned, where 0 is the first value. GetDimensionMemberCount returns the number of values included in the dimension.


TCustomDataStore.GetMemoryUsage
 VCL Reference

TCustomDataStore.GetMemoryUsage

TCustomDataStore	See also

Returns the number of bytes of memory used to cache the multidimensional array of summaries along all active dimensions.

function GetMemoryUsage: Integer;

Description

Call GetMemoryUsage to determine the size of the cache that stores the crosstabulated information for the data store. If the returned value is too large, consider making some of the active dimensions paged by setting their BinType property to binSet or allowing the data store to swap some dimensions out by setting their ActiveFlag property to diAsNeeded. The cube dimension can be accessed using the DimensionMap property.

The storage needs of the crosstabulated data store increase geometrically with each active dimension that is added. Applications must find the best balance between the performance benefit of caching many dimensions so that they are immediately available to decision controls, and the need to keep the number of active dimensions small enough so that the cache does not consume inordinate amounts of memory.


TCustomDataStore.GetSummaryAsString
 VCL Reference

TCustomDataStore.GetSummaryAsString

TCustomDataStore	See also

Returns the value of the current summary for a set of values along all the active dimensions.

function GetSummaryAsString(Coord: TSmallIntArray): String; virtual;

Description

Call GetSummaryAsString to obtain the value of a single cell from the multidimensional array of summary values. Set the Coord parameter to an array of indexes, where each index identifies a value along one of the dimensions of the array. The first value of Coord is the index of the desired value along the first active dimension, the second value of Coord is the index of the desired value along the second active dimension, and so on. Coord should contain DimensionCount values.

To obtain the names of the active dimensions that correspond to the entries in the Coord parameter, use the GetDimensionName method. To obtain the name of the specified value along any of the dimensions, use the GetMemberAsString method.

GetSummaryAsString formats the summarized value as a string. To obtain the summary as a variant, use the GetSummaryAsVariant method.


TCustomDataStore.GetSummaryAsVariant
 VCL Reference

TCustomDataStore.GetSummaryAsVariant

TCustomDataStore	See also

Returns the value of the current summary for a set of values along all the active dimensions.

function GetSummaryAsVariant(Coord: TSmallIntArray): Variant; virtual;

Description

Call GetSummaryAsVariant to obtain the value of a single cell from the multidimensional array of summary values. Set the Coord parameter to an array of indexes, where each index identifies a value along one of the dimensions of the array. The first value of Coord is the index of the desired value along the first active dimension, the second value of Coord is the index of the desired value along the second active dimension, and so on. Coord should contain DimensionCount values.

To obtain the names of the active dimensions that correspond to the entries in the Coord parameter, use the GetDimensionName method. To obtain the name of the specified value along any of the dimensions, use the GetMemberAsString method.

To obtain the summary formatted as a string, use the GetSummaryAsString method.


TCustomDataStore.GetSummaryName
 VCL Reference

TCustomDataStore.GetSummaryName

TCustomDataStore	See also

Returns the name of an active summary.

function GetSummaryName(ISum: Integer): String; virtual;

Description

Call GetSummaryName to obtain the name of the summary specified by the ISum parameter. Zero specifies the first active summary and SummaryCount-1 specifies the last active summary.


TCustomDataStore.Refresh
 VCL Reference

TCustomDataStore.Refresh

TCustomDataStore	See also

Updates the dimension map of the crosstabulated data store.

procedure Refresh(DimensionMap : TCubeDims; bForce: Boolean);

Description

To change the properties of the dimensions in the dimension map, make a copy of the DimensionMap property, make any desired changes to the properties of the TCubeDim objects, and call Refresh, passing in the altered dimension map. The bForce parameter specifies whether the cache should be rebuilt unconditionally. When bForce is False, the cache will not be rebuilt unless the changes require it.

When the data store is active, call Refresh rather than directly altering the dimension map. Do not call Refresh while the data store is building the cache. Use the BeforeOpen and AfterOpen events to determine when the cache is being rebuilt.


Hierarchy

TObject

TPersistent

TComponent

TCustomDataStore


TDCOMConnection
 VCL Reference

 TDCOMConnection

Hierarchy	Properties	Methods	Events	Using TDCOMConnection	See also

TDCOMConnection handles a client application’s DCOM connection to the remote server in a in a multi-tiered application.

Unit

MConnect

Description

TDCOMConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server. The DCOM connection object can

Establish an initial connection to a remote application server.

Obtain an IAppServer for the application server.

Obtain a list of providers on the application server.

Drop the connection to the remote application server.

TDCOMConnection uses DCOM to establish the initial connection between the client application and a remote application server. In order to do so, the application server must be registered on the client machine.

Once the connection is established, the client registers any or all of its client datasets with TDCOMConnection, and these client datasets use the IAppServer interface from the DCOM connection component to communicate with providers on the application server, or to otherwise call the application server’s data module interface.

To connect client applications to remote application servers using TCP/IP sockets, use TSocketConnection instead. To connect to remote application servers using HTTP, use the TWebConnection component. To connect to application servers using CORBA, use the TCORBAConnection component. To connect to application servers using SOAP, use TSoapConnection.


 VCL Reference

TDCOMConnection properties

TDCOMConnection	Alphabetically	Legend

In TDCOMConnection

ComputerName

Derived from TCOMConnection

Connected

In TDispatchConnection

Connected

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDCOMConnection properties

TDCOMConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ComputerName

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

ObjectBroker

Owner

ServerGUID

ServerName

Tag

VCLComObject


TDCOMConnection.ComputerName
 VCL Reference

TDCOMConnection.ComputerName

TDCOMConnection	See also

Specifies the name of the machine on which the application server is located.

property ComputerName: string;

Description

Set ComputerName to the machine name of the computer where the application server resides. If ComputerName is blank (the default), TDCOMConnection assumes the application server can be found on the user’s machine or that the computer name can be derived from the system registry based on the DCOM configuration. If ComputerName is not blank, it overrides any system registry entries.

Normally the client and the application server run on different machines, so ComputerName must be set by the client application or available as part of the registry’s DCOM configuration.


 VCL Reference

TDCOMConnection events

TDCOMConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TDCOMConnection events

TDCOMConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TDCOMConnection methods

TDCOMConnection	Alphabetically	Legend

In TDCOMConnection

Create

DoConnect

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDCOMConnection methods

TDCOMConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDCOMConnection.Create
 VCL Reference

TDCOMConnection.Create

TDCOMConnection

Creates and initializes a DCOM connection component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TDCOMConnection at runtime. DCOM connection components placed in forms or data modules at design time are created automatically.

The AOwner parameter specifies the component (usually the form or data module) that is responsible for freeing the DCOM connection component.


TDCOMConnection.DoConnect
 VCL Reference

TDCOMConnection.DoConnect

TDCOMConnection	See also

Connects to an application server.

procedure DoConnect; override;

Description

DoConnect is called when the Connected property is set to True. DoConnect establishes a dual interface with the remote data module on the application server. This interface is used to locate providers on the application server.

To locate the server system, DoConnect uses the ComputerName property. If the ObjectBroker property is set, DoConnect gets this value from the object broker. Otherwise, the application must assign this property a value directly.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TCOMConnection

TDCOMConnection


TDecisionCube
 VCL Reference

 TDecisionCube

Hierarchy	Properties	Methods	Events 	Using TDecisionCube	See also

TDecisionCube maintains crosstabulated data that it provides to a TDecisionSource object.

Unit

MXDB

Description

Add a TDecisionCube object to a form or data module to allow an application to represent crosstabulated data. TDecisionCube analyzes the data from a source dataset into a multidimensional structure where each dimension corresponds to a field in the dataset over which information is summarized. Any dataset can be used as the source of a TDecisionCube object, but it is easiest to work with TDecisionQuery.

Usually, the summarized values are calculated by the dataset that is the source of the decision cubes. However, average values can be calculated internally by the Decision Cube instead.  Internally calculated averages have the advantage that they can be pivoted, subtotaled, and drilled-in correctly by Decision grids that display the data from the Decision Cube.

TDecisionCube introduces properties and methods that allow a crosstabulated data store to provide its data to a TDecisionSource object. Decision grids and Decision graphs do not retrieve data directly from the decision cube. They use a TDecisionSource object, which represents a configuration of the dimensions from the TDecisionCube object.


 VCL Reference

TDecisionCube properties

TDecisionCube	Alphabetically	Legend

In TDecisionCube

Active

DesignState

Derived from TCustomDataStore

BinData

Capacity

CurrentSummary

DataSet

DimensionCount

DimensionMap

DimensionMapCount

MaxCells

MaxDimensions

MaxSummaries

ShowProgressDialog

SummaryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDecisionCube properties

TDecisionCube	By object	Legend

Active

BinData

Capacity

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CurrentSummary

DataSet

DesignInfo

DesignState

DimensionCount

DimensionMap

DimensionMapCount

MaxCells

MaxDimensions

MaxSummaries

Name

Owner

ShowProgressDialog

SummaryCount

Tag

VCLComObject


TDecisionCube.Active
 VCL Reference

TDecisionCube.Active

TDecisionCube	See also

Specifies whether the decision cube can provide data.

property Active: Boolean;

Description

Read Active to determine whether the decision cube is ready to provide data to a decision control. Set Active to True to cause the decision cube to fetch and analyze data from the dataset specified in the DataSet property.

When Active is False, the decision cube is closed and the decision source cannot read data from the decision cube. When Active is True, data can be read from the decision cube.

Note:	The Active property cannot be set to True unless the dataset specified by the DataSet property is already active.


TDecisionCube.DesignState
 VCL Reference

TDecisionCube.DesignState

TDecisionCube	See also

Specifies how much data is displayed by the decision cube at design time.

type TCubeDesignState = (dsNoData, dsMetaData, dsDimensionData, dsAllData );

property DesignState: TCubeDesignState;

Description

Set DesignState to limit the amount of information that is provided when the decision cube is active at design time. Building the cache of the decision cube can be time and memory intensive.  Limiting the information the decision cube can supply at design time can improve design time performance when the decision cube has many dimensions or when the dimensions have many values.

DesignState has one of the following values:

Value	Meaning

dsNoData	The decision cube can’t be activated at design time.

dsMetaData	The decision cube provides the dimension captions, but no listing of values along the dimensions, and no summarized data.

dsDimensionData	The decision cube provides dimension captions, and the values of the dimension fields, but no summarized data.

dsAllData	The decision cube provides all possible data: dimension captions, the values of dimension fields, and summarized data.

Note:	The Value of DesignState can be changed at design time using the Decision Cube editor.


 VCL Reference

TDecisionCube events

TDecisionCube	Alphabetically	Legend

Derived from TCustomDataStore

AfterClose

AfterOpen

BeforeClose

BeforeOpen

OnLowCapacity

OnRefresh


 VCL Reference

TDecisionCube events

TDecisionCube	By object	Legend

AfterClose

AfterOpen

BeforeClose

BeforeOpen

OnLowCapacity

OnRefresh


 VCL Reference

TDecisionCube methods

TDecisionCube	Alphabetically	Legend

In TDecisionCube

Create

Destroy

GetDetailSQL

GetSQL

ShowCubeDialog

StateChanged

Derived from TCustomDataStore

CalcSubTotals

GetDimensionMemberCount

GetDimensionName

GetMemberAsString

GetMemberAsVariant

GetMemoryUsage

GetSummaryAsString

GetSummaryAsVariant

GetSummaryName

Refresh

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

CalcSubTotals

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionCube methods

TDecisionCube	By object	Legend

AfterConstruction

Assign

BeforeDestruction

CalcSubTotals

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDetailSQL

GetDimensionMemberCount

GetDimensionName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMemberAsString

GetMemberAsVariant

GetMemoryUsage

GetNamePath

GetParentComponent

GetSQL

GetSummaryAsString

GetSummaryAsVariant

GetSummaryName

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

ShowCubeDialog

StateChanged

UpdateAction


TDecisionCube.Create
 VCL Reference

TDecisionCube.Create

TDecisionCube	See also

Creates an instance of TDecisionCube.

constructor Create( AOwner: TComponent ); override;

Description

Call Create to instantiate a decision cube at runtime. Decision cubes placed on a form or data module at design time are created automatically.

Create allocates the memory for the decision cube and its helper objects and initializes the Active property to False and the DesignState property to dsAllData.


TDecisionCube.Destroy
 VCL Reference

TDecisionCube.Destroy

TDecisionCube	See also

Destroys an instance of TDecisionCube.

destructor Destroy; override;

Description

Do not call the Destroy method directly. Instead call Free. Free checks that the decision cube is not nil, and only then calls Destroy.


TDecisionCube.GetDetailSQL
 VCL Reference

TDecisionCube.GetDetailSQL

TDecisionCube	See also

Returns an SQL statement that can be used to generate the described subset of the data in the decision cube.

function GetDetailSQL( ValueArray: TSmallIntArray; SelectList: String; bActive: Boolean): string;

Description

Use the SQL statement returned by GetDetailSQL to generate a dataset that represents the records that gave rise to a subset of the values in the decision cube. The resulting query produces the records represented in the projection described by the ValueArray parameter. The dataset will include all fields that make up the dimensions of the decision cube, plus any fields listed in the SelectList parameter. The query does not include any summary values or grouping, such as must be imposed by the dataset of the decision cube.

Each entry in the ValueArray parameter corresponds to a dimension of the decision cube, where the first entry corresponds to the first dimension, the second entry corresponds to the second dimension, and so on. If the value of an entry in the value array is less than 0, all field values over that dimension are included in the new dataset. If the value of an entry in the value array is equal to or greater than 0, it is interpreted as the index of a value over the dimension field. When the ValueArray specifies a field value, the SQL statement restricts the dataset to records that match that value on the corresponding field of the original database table. Thus, ValueArray represents the dimension array with a set of drilled dimensions.

bActive specifies whether the ValueArray parameter includes inactive dimensions. Only active dimensions are included when bActive is True. Also when bActive is True, only the fields that correspond to active dimensions are included automatically in the SQL query.

The SelectList parameter is a list of comma delimited field names for the fields that are included in the result set of the SQL query. The query always includes the fields that correspond to the dimensions represented by the ValueArray parameter. If SelectList consists of a single asterisk (*), all the fields in the original dataset are included.


TDecisionCube.GetSQL
 VCL Reference

TDecisionCube.GetSQL

TDecisionCube	See also

Returns an SQL statement that can be used to generate the described subset of the data in the decision cube

function GetSQL( ValueArray: TSmallIntArray; bActive: Boolean): String;

Description

Use the SQL statement returned by GetSQL to view the data that gave rise to a subset of the information in the decision cube. The resulting query produces a dataset containing the projection described by the ValueArray parameter. All the summaries of the current dataset are included in the resulting query.

Each entry in the ValueArray parameter corresponds to a dimension of the decision cube, where the first entry corresponds to the first dimension, the second entry corresponds to the second dimension, and so on. If the value of an entry in the value array is less than 0, all field values over that dimension are included in the new dataset. If the value of an entry in the value array is equal to or greater than 0, it is interpreted as the index of a value over the dimension field. When the ValueArray specifies a field value, the SQL statement restricts the dataset to records that match that value on the corresponding field of the original database table. Thus, ValueArray represents the dimension array with a set of drilled dimensions.

bActive specifies whether the ValueArray parameter includes inactive dimensions. Only active dimensions are included when bActive is True.

To further restrict the dataset so that it includes only a subset of the dimensions in the decision cube, use the GetDetailSQL method.


TDecisionCube.ShowCubeDialog
 VCL Reference

TDecisionCube.ShowCubeDialog

TDecisionCube	See also

Displays the Decision Cube editor.

procedure ShowCubeDialog;

Description

Call ShowCubeDialog to allow the user to change the active dimensions of the data cube using the Decision Cube editor. ShowCubeDialog brings up the same dialog that appears when Decision Cube editor is selected from the pop-up menu of the decision cube component at design time.

The Decision Cube editor allows the user to make dimensions active or inactive and to change the names of dimensions. It also controls how much information is shown in a decision control at design time.


TDecisionCube.StateChanged
 VCL Reference

TDecisionCube.StateChanged

TDecisionCube	See also

Updates the dimension map when the pivot state changes.

procedure StateChanged; virtual;

Description

StateChanged is called automatically when dimensions are opened or closed, the current summary changes, or dimensions are pivoted. In response, the decision cube updates the dimension map to reflect the current state of its dimensions and summaries.


Hierarchy

TObject

TPersistent

TComponent

TCustomDataStore

TDecisionCube


TDecisionGraph
 VCL Reference

TDecisionGraph

Hierarchy	Properties	Methods	Events 	Using TDecisionGraph	See also

TDecisionGraph displays a graph of crosstabulated data.

Unit

MXGRAPH

Description

Use TDecisionGraph to put a decision graph in a form. Decision graphs chart a single summary that is calculated over a number of dimensions. The axes of the graph correspond to these dimensions, which are provided by a decision source object. By default, the first row dimension appears as the x axis and the first column dimension appears as the y axis.

The field that is summarized and the fields (dimensions) over which it is summarized can be changed dynamically at runtime to view any configuration of summary and dimensions chosen from the dimension map of a decision cube. Changes to the dimensions and summary can be initiated using a TDecisionPivot object.

TDecisionGraph publishes many of the properties, events, and methods inherited from TCustomDecisionGraph, but introduces no new behavior.

To present the crosstabulated data in a grid, use TDecisionGrid instead.


 VCL Reference

TDecisionGraph properties

TDecisionGraph	Alphabetically	Legend

Derived from TCustomDecisionGraph

DecisionSource

Derived from TChart

AllowPanning

AllowZoom

AnimatedZoom

AnimatedZoomSteps

BackImage

BackImageInside

BackImageMode

Foot

Gradient

LeftWall

PrintResolution

Title

Zoomed

Derived from TCustomChart

AxisVisible

BackColor

BottomWall

BottomAxis

BufferedDisplay

Chart3DPercent

ClipPoints

Frame

LeftAxis

Legend

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Page

RightAxis

ScaleLastPage

Series

SeriesList

TopAxis

View3d

View3dWalls

Derived from TCustomTeePanel

Canvas

Derived from TCustomPanel

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

Locked

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDecisionGraph properties

TDecisionGraph	By object	Legend

Action

Align

AlignDisabled

AllowPanning

AllowZoom

Anchors

AnimatedZoom

AnimatedZoomSteps

AxisVisible

BackColor

BackImage

BackImageInside

BackImageMode

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

BiDiMode

BottomAxis

BottomWall

BoundsRect

Brush

BufferedDisplay

Canvas

Chart3DPercent

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ClipPoints

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DecisionSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Foot

Frame

Gradient

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LeftAxis

LeftWall

Legend

Locked

LRDockWidth

MarginBottom

MarginLeft

MarginRight

MarginTop

MaxPointsPerPage

Monochrome

Name

Owner

Page

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

PrintResolution

RightAxis

ScaleLastPage

Series

SeriesList

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Title

Top

TopAxis

UndockHeight

UndockWidth

VCLComObject

View3d

View3dWalls

Visible

VisibleDockClientCount

Width

WindowProc

Zoomed


 VCL Reference

TDecisionGraph events

TDecisionGraph	Alphabetically	Legend

Derived from TChart

OnAllowScroll

OnClickAxis

OnClickBackground

OnClickLegend

OnClickSeries

OnGetLegendPos

OnGetLegendRect

OnScroll

OnUndoZoom

OnZoom

Derived from TCustomChart

OnAfterDraw

OnGetAxisLabel

OnGetLegendText

OnGetNextAxisLabel

OnPageChange

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TDecisionGraph events

TCustomDecisionGraph	By object	Legend

OnAfterDraw

OnAllowScroll

OnCanResize

OnClick

OnClickAxis

OnClickBackground

OnClickLegend

OnClickSeries

OnConstrainedResize

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetAxisLabel

OnGetLegendPos

OnGetLegendRect

OnGetLegendText

OnGetNextAxisLabel

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPageChange

OnResize

OnScroll

OnStartDock

OnStartDrag

OnUnDock

OnUndoZoom

OnZoom


 VCL Reference

TDecisionGraph methods

TDecisionGraph	Alphabetically	Legend

Derived from TCustomDecisionGraph

Create

Destroy

Updated

Derived from TChart

CalcClickedPart

ChartPrintRect

CopyToClipboardBitmap

CopyToClipboardMetafile

ExchangeSeries

GetEditorClass

IsScreenHighColor

NextPage

PreviousPage

Print

PrintLandscape

PrintOrientation

PrintPartial

PrintPartialCanvas

PrintPortrait

PrintRect

SaveToBitmapFile

SaveToMetafile

SaveToMetafileEnh

SeriesDown

SeriesUp

TeeCreateMetafile

UndoZoom

ZoomPercent

ZoomRect

Derived from TCustomChart

ActiveSeriesLegend

AddSeries

BackWallRect

CalcSize3d

CalcSize3dWalls

ChartRegionRect

CheckDataSource

ClipRectangle

Draw

FormattedLegend

FormattedValueLegend

GetASeries

GetAxisSeries

GetFreeSeriesColor

GetLabelsSeries

IsFreeSeriesColor

IsValidDataSource

MarkText

MaxMarkWidth

MaxTextWidth

MaxXValue

MaxYValue

MinXValue

MinYValue

NumPages

RemoveAllSeries

RemoveSeries

SeriesCount

SeriesTitleLegend

UnClipRectangle

XLabelText

Derived from TCustomTeePanel

CanvasChanged

FontCanvas

GetCursorPos

GetRectangle

GetWidthHeight

ReCalcWidthHeight

RotateLabel

SetBrushCanvas

SetInternalCanvas

TeeCharHeight

TeeTextHeight

TeeTextOut

TeeTextWidth

Derived from TCustomPanel

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionGraph methods

TDecisionGraph	By object	Legend

ActiveSeriesLegend

AddSeries

AfterConstruction

Assign

BackWallRect

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CalcClickedPart

CalcSize3d

CalcSize3dWalls

CanFocus

CanvasChanged

ChartPrintRect

ChartRegionRect

CheckDataSource

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ClipRectangle

ContainsControl

ControlAtPos

CopyToClipboardBitmap

CopyToClipboardMetafile

Create

CreateParented

CreateParentedControl

DefaultHandler

DestroyComponents

Destroying

Destroy

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

Draw

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExchangeSeries

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FontCanvas

FormattedLegend

FormattedValueLegend

Free

FreeInstance

FreeNotification

FreeOnRelease

GetASeries

GetAxisSeries

GetControlsAlignment

GetCursorPos

GetEditorClass

GetFreeSeriesColor

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLabelsSeries

GetNamePath

GetParentComponent

GetRectangle

GetTabOrderList

GetTextBuf

GetTextLen

GetWidthHeight

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsFreeSeriesColor

IsImplementorOf

IsRightToLeft

IsScreenHighColor

IsValidDataSource

ManualDock

ManualFloat

MarkText

MaxMarkWidth

MaxTextWidth

MaxXValue

MaxYValue

MethodAddress

MethodName

MinXValue

MinYValue

MouseWheelHandler

NewInstance

NextPage

NumPages

PaintTo

ParentToClient

Perform

PreviousPage

Print

PrintLandscape

PrintOrientation

PrintPartial

PrintPartialCanvas

PrintPortrait

PrintRect

Realign

ReCalcWidthHeight

ReferenceInterface

Refresh

RemoveAllSeries

RemoveComponent

RemoveControl

RemoveFreeNotification

RemoveSeries

Repaint

ReplaceDockedControl

RotateLabel

SafeCallException

SaveToBitmapFile

SaveToMetafile

SaveToMetafileEnh

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SeriesCount

SeriesDown

SeriesTitleLegend

SeriesUp

SetBounds

SetBrushCanvas

SetFocus

SetInternalCanvas

SetSubComponent

SetTextBuf

Show

TeeCharHeight

TeeCreateMetafile

TeeTextHeight

TeeTextOut

TeeTextWidth

UnClipRectangle

UndoZoom

Update

UpdateAction

UpdateControlState

Updated

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

XLabelText

ZoomPercent

ZoomRect


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel

TCustomTeePanel

TCustomChart

TChart

TCustomDecisionGraph

TDecisionGraph


TDecisionGrid
 VCL Reference

 TDecisionGrid

Hierarchy	Properties	Methods	Events 	Using TDecisionGrid	See also

TDecisionGrid presents crosstabulated data from a decision source in a grid format.

Unit

MXGRID

Description

Use TDecisionGrid to put a decision grid in a form. Decision grids present a single summary that is calculated over an arbitrary number of dimensions. The dimensions can appear as rows or columns in the grid, with the field values of the dimensions listed as labels along the top and left edges of the grid.

The field that is summarized and the fields (dimensions) over which it is summarized can be changed dynamically at runtime to view any configuration of summary and dimensions chosen from the dimension map of a decision cube. Changes to the dimensions and summary can be initiated by direct manipulation of the decision grid, or by using a TDecisionPivot object.

TDecisionGrid publishes many of the properties, events, and methods inherited from TCustomDecisionGrid, but introduces no new behavior.

To present the crosstabulated data in a chart, use TDecisionGraph instead.


 VCL Reference

TDecisionGrid properties

TDecisionGrid	Alphabetically	Legend

Derived from TCustomDecisionGrid

CaptionColor

CaptionFont

Cells

ColCount

DataColor

DataFont

DataSumColor

DecisionSource

DefaultColWidth

DefaultRowHeight

Dimensions

FixedCols

FixedRows

GridLineColor

GridLineWidth

LabelColor

LabelFont

LabelSumColor

Options

RowCount

ShowCubeEditor

Totals

Derived from TCustomGrid

BorderStyle

DefaultDrawing

ScrollBars

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Ctl3D

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BoundsRect

BiDiMode

ClientHeight

ClientWidth

Constraints

Color

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDecisionGrid properties

TDecisionGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

CaptionColor

CaptionFont

Cells

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColCount

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataColor

DataFont

DataSumColor

DecisionSource

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

Dimensions

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Enabled

FixedCols

FixedRows

Floating

FloatingDockSiteClass

GridLineColor

GridLineWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

LabelColor

LabelFont

LabelSumColor

Left

LRDockWidth

Name

Options

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

RowCount

ScrollBars

ShowCubeEditor

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

Totals

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TDecisionGrid events

TDecisionGrid	Alphabetically	Legend

Derived from TCustomDecisionGrid

OnDecisionDrawCell

OnDecisionExamineCell

OnTopLeftChanged

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 VCL Reference

TDecisionGrid events

TDecisionGrid	By object	Legend

OnClick

OnDblClick

OnDecisionDrawCell

OnDecisionExamineCell

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag

OnTopLeftChanged


 VCL Reference

TDecisionGrid methods

TDecisionGrid	Alphabetically	Legend

Derived from TCustomDecisionGrid

CellDrawState

CellRect

CellValueArray

Create

Destroy

Notification

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

Dock

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionGrid methods

TDecisionGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellDrawState

CellRect

CellValueArray

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDecisionGrid

TDecisionGrid


TDecisionPivot
 VCL Reference

 TDecisionPivot

Hierarchy	Properties	Methods	Events 	Using TDecisionPivot	See also

TDecisionPivot allows the user to control the pivot state of a decision source.

Unit

MXPIVSRC

Description

Add a decision pivot to a form to allow users to control the pivot state of decision graphs and decision grids. Decision pivots contain buttons that correspond to the active dimensions of a decision cube and a drop-down list box for choosing the current summary.

Pressing the dimension buttons opens or closes the dimensions, controlling whether the decision source provides detailed data values for those dimensions. Right-clicking the buttons of a decision pivot brings up a menu that allows users to control the drill state of a dimension. Drilled dimensions focus on a single value within the dimension. Dragging the buttons on a decision pivot rearranges the dimensions of the decision source into a new pivot configuration.

Note:	Do not use the Decision pivot to pivot, subtotal, or drill in on summaries that are not additive.  SUM and COUNT summaries are additive, AVERAGE (unless calculated by the Decision cube), MAX, and MIN are not.


 VCL Reference

TDecisionPivot properties

TDecisionPivot	Alphabetically	Legend

In TDecisionPivot

BorderStyle

BorderWidth

ButtonAutoSize

ButtonHeight

ButtonSpacing

ButtonWidth

DecisionSource

GroupLayout

Groups

GroupSpacing

Derived from TCustomPanel

Alignment

BevelInner

BevelOuter

BevelWidth

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDecisionPivot properties

TDecisionPivot	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BevelInner

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

ButtonAutoSize

ButtonHeight

ButtonSpacing

ButtonWidth

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DecisionSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

GroupLayout

Groups

GroupSpacing

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDecisionPivot.BorderStyle
 VCL Reference

TDecisionPivot.BorderStyle

TDecisionPivot	See also

Determines whether a line is drawn around the perimeter of the decision pivot.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to specify whether the decision pivot has a single line drawn around it. When BorderStyle is bsSingle, a single line is drawn around the panel outside of the outer bevel.

Note:	Do not confuse the line drawn around the decision pivot with the BorderWidth property. The BorderWidth is the distance between the outer and inner bevels.


TDecisionPivot.BorderWidth
 VCL Reference

TDecisionPivot.BorderWidth

TDecisionPivot	See also

Specifies the distance, in pixels, between the outer and inner bevels.

type TBorderWidth: 0..MaxInt;

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to specify how wide the border around the decision pivot should be. A value of 0 means no border should appear.

The border of the decision pivot is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the controls in the pivot even if BevelInner is bvNone.

Do not confuse the border of the pivot with line drawn around it. The line around the pivot is specified by the BorderStyle property.


TDecisionPivot.ButtonAutoSize
 VCL Reference

TDecisionPivot.ButtonAutoSize

TDecisionPivot	See also

Specifies whether the dimension buttons resize automatically when the decision pivot resizes.

property ButtonAutoSize: Boolean;

Description

Set ButtonAutoSize to True to cause the dimension buttons to expand and contract automatically when the size of the decision pivot changes. Set ButtonAutoSize to False to specify fixed size buttons.

Note:	The value of ButtonAutoSize is ignored when GroupLayout is xtTopLeft.


TDecisionPivot.ButtonHeight
 VCL Reference

TDecisionPivot.ButtonHeight

TDecisionPivot	See also

Specifies the height, in pixels, of the dimension buttons.

property ButtonHeight: Integer;

Description

Use ButtonHeight to determine the Height of the dimension buttons. Do not set ButtonHeight when the ButtonAutoSize property is True. When ButtonAutoSize is True, the height of the buttons is reset automatically whenever the layout of the decision pivot changes.


TDecisionPivot.ButtonSpacing
 VCL Reference

TDecisionPivot.ButtonSpacing

TDecisionPivot	See also

Specifies the number of pixels that appear between dimension buttons.

property ButtonSpacing: Integer;

Description

Set ButtonSpacing to control the spacing between the buttons in a single group. Increase ButtonSpacing to make a decision pivot look less crowded. Decrease ButtonSpacing to make the row and column groups look more compact.


TDecisionPivot.ButtonWidth
 VCL Reference

TDecisionPivot.ButtonWidth

TDecisionPivot	See also

Specifies the width, in pixels, of the dimension buttons.

property ButtonWidth: Integer;

Description

Use ButtonWidth to determine the Width of the dimension buttons. Do not set ButtonWidth when the ButtonAutoSize property is True. When ButtonAutoSize is True, the width of the buttons is reset automatically whenever the layout of the decision pivot changes.


TDecisionPivot.DecisionSource
 VCL Reference

TDecisionPivot.DecisionSource

TDecisionPivot	See also

Specifies the decision source object that the decision pivot controls.

property DecisionSource: TDecisionSource;

Description

Set DecisionSource to link the decision pivot to a decision source component. The controls in the decision pivot change the pivot state of the decision source.

The pivot state of the decision source can also change in response to another control, such as a decision grid. When the pivot state of the decision source changes, the decision pivot updates the layout of the dimension buttons and the selection in the summary combo box.


TDecisionPivot.GroupLayout
 VCL Reference

TDecisionPivot.GroupLayout

TDecisionPivot	See also

Specifies how the dimension buttons and summary control are arranged on the decision pivot.

Type

  TDecisionButtonPosition = (xtHorizontal, xtVertical, xtLeftTop);

property GroupLayout: TDecisionButtonPosition;

Description

Set Layout to specify the organization of a decision pivot. Layout can have one of the following values:

Value	Meaning

xtHorizontal	The controls in the pivot are lined up side by side.

xtVertical	The controls in the pivot are lined up top to bottom.

xtLeftTop	The controls in the pivot are lined up along the edges of the pivot, with the row dimensions down the left side, the column dimensions along the top, and the summary control in the upper left corner.

When Layout is xtLeftTop, the center of the decision pivot is empty. A decision graph or decision grid can be placed in this empty spot so that the buttons line up with the dimensions they control.

When Layout is xtHorizontal or xtVertical, the summary control appears first, followed by a the row dimensions and then the column dimensions. The Groups property can omit any of these from the layout.


TDecisionPivot.Groups
 VCL Reference

TDecisionPivot.Groups

TDecisionPivot	See also

Specifies which controls appear in a decision pivot.

type

  TDecisionPivotOption = (xtRows, xtColumns, xtSummaries);

TDecisionPivotOptions = set of TDecisionPivotOption;

property Groups: TDecisionPivotOptions;

Description

Set Groups to limit the types of controls that appear in the decision pivot. This allows greater flexibility over where the controls appear in a form. For example, a form can contain three decision pivots: one containing only row dimension buttons, one containing only column dimension buttons, and one containing only the summary selection combo box. These three pivots can then be arranged anywhere on the form.

Groups is a set containing one or more of the following values:

Value	Meaning

xtRows	The pivot contains row dimension buttons.

xtColumns	The pivot contains column dimension buttons.

xtSummaries	The pivot contains a summary selection combo box.


TDecisionPivot.GroupSpacing
 VCL Reference

TDecisionPivot.GroupSpacing

TDecisionPivot	See also

Determines the number of pixels that appear between control groups.

property GroupSpacing: Integer;

Description

Set GroupSpacing to control the spaces that appear between the summary combo box, the group of row dimension buttons, and the group of column dimension buttons. Increase GroupSpacing to make the groups of controls appear more distinct. Decrease GroupSpacing to make the decision pivot look more compact.


 VCL Reference

TDecisionPivot events

TDecisionPivot	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnResize

OnStartDrag


 VCL Reference

TDecisionPivot events

TDecisionPivot	By object	Legend

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnResize

OnStartDrag


 VCL Reference

TDecisionPivot methods

TDecisionPivot	Alphabetically	Legend

In TDecisionPivot

Create

Destroy

SetBounds

Derived from TCustomPanel

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionPivot methods

TDecisionPivot	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDecisionPivot.Create
 VCL Reference

TDecisionPivot.Create

TDecisionPivot	See also

Creates and initializes an instance of TDecisionPivot.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a decision pivot at runtime. Decision pivots placed on forms at design time are created Pass a single Component as a parameter to provide the decision pivot with an Owner that is responsible for freeing it.


TDecisionPivot.Destroy
 VCL Reference

TDecisionPivot.Destroy

TDecisionPivot	See also

Destroys an instance of TDecisionPivot.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the decision pivot reference is not nil, and only then calls Destroy.


TDecisionPivot.SetBounds
 VCL Reference

TDecisionPivot.SetBounds

TDecisionPivot	See also

Resizes the decision pivot.

procedure SetBounds(Left, Top, Height, Width: Integer); override;

Description

Use SetBounds to change all of the decision pivot’s boundary properties at once. The same effect can be achieved by setting the Left, Top, Width, and Height properties separately. By setting all four properties at once, SetBounds ensures that the control will not repaint between changes. Specify the values for the Left, Top, Width, and Height properties as the value of the Left, Top, Width, and Height parameters, respectively.

SetBounds overrides the inherited method to adjust the layout of the buttons in the decision pivot when the size changes.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel

TDecisionPivot


TDecisionQuery
 VCL Reference

 TDecisionQuery

Hierarchy	Properties	Methods	Events 	Using TDecisionQuery	See also

Unit

MXTABLES

Description

TDecisionQuery is a specialized query that prepares crosstabulated data for a decision cube.

Use a TDecisionQuery as the dataset of a decision cube to ensure that the data is properly prepared. TDecisionQuery allows the dimensions and summaries to be defined directly on the dataset analyzed in a decision control. It then prepares an SQL query to provide the information from that dataset in a format that can be used by a decision cube.

Decision cubes can use other types of datasets, but the information must be structured in the same way as the output of a TDecisionQuery object.

Note:	In the Decision Query editor that is displayed from the Decision query component, the query is initially handled in ANSI-92 SQL syntax, then translated (if necessary) into the dialect used by the data source of the query. Use only ANSI standard SQL in the Decision Query editor. Use the dialect of the data source in the SQL property of the Decision Query.


 VCL Reference

TDecisionQuery properties

TDecisionQuery	Alphabetically	Legend

Derived from TQuery

Constrained

DataSource

Local

ParamCheck

ParamCount

Params

Prepared

RequestLive

RowsAffected

SQL

SQLBinary

Text

UniDirectional

Derived from TDBDataSet

AutoRefresh

Database

DatabaseName

DBHandle

DBLocale

DBSession

Handle

SessionName

UpdateMode

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

KeySize

Locale

RecNo

RecordCount

RecordSize

StmtHandle

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

Constraints

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

State

SparseArrays

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDecisionQuery properties

TDecisionQuery	By object	Legend

Active

AggFields

AutoCalcFields

AutoRefresh

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constrained

Constraints

Database

DatabaseName

DataSetField

DataSource

DBHandle

DBLocale

DBSession

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Local

Locale

Modified

Name

ObjectView

Owner

ParamCheck

ParamCount

Params

Prepared

RecNo

RecordCount

RecordSize

RequestLive

RowsAffected

SessionName

SparseArrays

SQL

SQLBinary

State

StmtHandle

Tag

Text

UniDirectional

UpdateMode

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


 VCL Reference

TDecisionQuery events

TDecisionQuery	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TDecisionQuery events

TDecisionQuery	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TDecisionQuery methods

TDecisionQuery	Alphabetically	Legend

Derived from TQuery

Create

Destroy

ExecSQL

GetDetailLinkFields

ParamByName

Prepare

UnPrepare

Derived from TDBDataSet

CheckOpen

CloseDatabase

OpenDatabase

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

CreateBlobStream

DisableConstraints

EnableConstraints

FetchAll

GetFieldData

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionQuery methods

TDecisionQuery	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

CheckOpen

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CloseDatabase

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecSQL

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

OpenDatabase

ParamByName

Post

Prepare

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UnPrepare

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TDBDataSet

TQuery

TDecisionQuery


TDecisionSource
 VCL Reference

 TDecisionSource

Hierarchy	Properties	Methods	Events 	Using TDecisionSource	See also

TDecisionSource links a decision control to a configuration (pivot state) of the data from a decision cube.

Unit

MXDB

Description

Use TDecisionSource to provide a decision grid or decision graph with cross-tabulated data from a decision cube. TDecisionSource represents a particular pivot state of dimensions from the decision cube into row and column dimensions. TDecisionSource also provides methods to drill down the display of a dimension to focus on summaries over a single value, or hide or show dimensions in the pivot state.

All decision controls that share a decision source display the same pivot state. For example, a form could contain a decision grid and a decision graph linked to the same decision source. Pivoting the dimensions of the decision grid would automatically update the image of the graph accordingly. To display two separate projections of the information from a decision cube in a single form, use two separate decision sources.

The pivot state of a decision source can be changed by manipulating a decision grid or by using a decision pivot.


 VCL Reference

TDecisionSource properties

TDecisionSource	Alphabetically	Legend

In TDecisionSource

ControlType

CurrentSum

DecisionCube

nColDims

nDataCols

nDataRows

nDims

nOpenColDims

nOpenRowDims

nRowDims

nSums

Ready

SparseCols

SparseRows

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDecisionSource properties

TDecisionSource	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ControlType

CurrentSum

DecisionCube

DesignInfo

Name

nColDims

nDataCols

nDataRows

nDims

nOpenColDims

nOpenRowDims

nRowDims

nSums

Owner

Ready

SparseCols

SparseRows

Tag

VCLComObject


TDecisionSource.ControlType
 VCL Reference

TDecision.ControlType

TDecisionSource	See also

Specifies how the decision source responds to messages from the decision pivot.

type

  TDecisionControlType = (xtCheck, xtRadio, xtRadioEx);

property ControlType: TDecisionControlType;

Description

Use ControlType to specify what combination of row or column dimensions can be open at the same time. ControlType has one of the following values:

Value	Meaning

xtCheck	Pressing dimension buttons opens or closes an individual dimension, changing the number of open dimensions.

xtRadio	Pressing dimension buttons opens or closes the selected dimension and closes all other dimensions in that direction. When ControlType is xtRadio, at most one row dimension and one column dimension may be open at a time.

xtRadionEx	Pressing dimension buttons opens the selected dimension and closes all other dimensions in that direction or closes the selected dimension and opens another dimension in the same direction. When ControlType is xtRadioEx, exactly one row dimension and one column dimension must be open at any time.


TDecisionSource.CurrentSum
 VCL Reference

TDecisionSource.CurrentSum

TDecisionSource	See also

Indicates the index of the current summary from the set of active summaries maintained by the decision cube.

property CurrentSum: Integer;

Description

Read CurrentSum to determine which of the active summaries is used to provide values to clients of the decision source. CurrentSum returns 0 if the first active summary is the current summary. CurrentSum returns nSums-1 if the last active summary is the current summary.

To change the current summary, use the SetCurrentSummary method. Use the GetSummaryName method to obtain the name of the current summary.

Note:	Do not pivot, subtotal, or drill the information provided by the Decision source unless the CurrentSum property refers to an additive summary. Additive Summaries are SUM and COUNT. AVERAGE (unless calculated internally by the Decision Cube), MAX, and MIN are not additive.


TDecisionSource.DecisionCube
 VCL Reference

TDecisionSource.DecisionCube

TDecisionSource	See also

Specifies the decision cube that provides the crosstabulated data for the decision source.

property DecisionCube: TDecisionCube;

Description

Set DecisionCube to specify where the decision source should fetch its data. The decision cube maintains a multidimensional array of summaries in a cache. The decision source can provide decision controls with any projection of the data in that cache.


TDecisionSource.nColDims
 VCL Reference

TDecisionSource.nColDims

TDecisionSource	See also

Indicates the number of column dimensions in the current pivot state of the decision source.

property nColDims: Integer;

Description

Read nColDims to determine the number of column dimensions the decision source can provide to a decision control. Column dimensions appear on the y axis of a decision graph or listed along the top of a decision grid. nColDims counts both the open and closed column dimensions. To determine the number of column dimensions actually provided to decision controls, use the nOpenColDims property.


TDecisionSource.nDataCols
 VCL Reference

TDecisionSource.nDataCols

TDecisionSource	See also

Indicates the number of columns provided to the data region of a decision grid.

property nDataCols: Integer;

Description

Read nDataCols to determine the number of summarized values the decision source provides for a row in a decision grid. Each of the columns counted by nDataCols represents a combination of values or dimension subtotals for each of the open column dimensions.


TDecisionSource.nDataRows
 VCL Reference

TDecisionSource.nDataRows

TDecisionSource	See also

Indicates the number of rows provided to the data region of a decision grid.

property nDataRows: Integer;

Description

Read nDataRows to determine the number of summarized values the decision source provides for a column in a decision grid. Each of the rows counted by nDataRows represents a combination of values or dimension subtotals for each of the open row dimensions.


TDecisionSource.nDims
 VCL Reference

TDecisionSource.nDims

TDecisionSource	See also

Indicates the number of active dimensions in the decision cube.

property nDims: Integer;

Description

Read nDims to determine the number of dimensions the decision source can provide to a decision control. The decision source does not necessarily provide decision controls with all the dimensions counted by the nDims property. Some of the dimensions may be closed.

The dimensions available through the decision source are divided into column dimensions and row dimensions. These are counted by the nColDims and nRowDims properties, respectively. nDims is equal to the sum of nColDims and nRowDims.


TDecisionSource.nOpenColDims
 VCL Reference

TDecisionSource.nOpenColDims

TDecisionSource	See also

Indicates the number of column dimensions provided by the decision source.

property nOpenColDims: Integer;

Description

Read nOpenColDims to determine the number of open column dimensions the decision source provides to a decision control. Column dimensions appear on the y axis of a decision graph or listed along the top of a decision grid. nOpenColDims counts only the open column dimensions that appear in the decision control. To determine the number of column dimensions potentially available in the current pivot state, use the nColDims property.


TDecisionSource.nOpenRowDims
 VCL Reference

TDecisionSource.nOpenRowDims

TDecisionSource	See also

Indicates the number of row dimensions provided by the decision source.

property nOpenRowDims: Integer;

Description

Read nOpenRowDims to determine the number of open row dimensions the decision source provides to a decision control. Row dimensions appear on the x axis of a decision graph or listed along the left side of a decision grid. nOpenRowDims counts only the open row dimensions that appear in the decision control. To determine the number of row dimensions potentially available in the current pivot state, use the nRowDims property.


TDecisionSource.nRowDims
 VCL Reference

TDecisionSource.nRowDims

TDecisionSource	See also

Indicates the number of row dimensions in the current pivot state of the decision source.

property nRowDims: Integer;

Description

Read nRowDims to determine the number of row dimensions the decision source can provide to a decision control. Row dimensions appear on the x axis of a decision graph or listed along the left side of a decision grid. nRowDims counts both the open and closed row dimensions. To determine the number of row dimensions actually provided to decision controls, use the nOpenRowDims property.


TDecisionSource.nSums
 VCL Reference

TDecisionSource.nSums

TDecisionSource	See also

Indicates the number of active summaries in the decision cube.

property nSums: Integer;

Description

Read nSums to determine the number of summary types the decision source can provide to a decision control. The decision source can only provide decision controls with a single summary at a time. The CurrentSum property indicates which of the nSums possibilities is currently provided by the decision source.


TDecisionSource.Ready
 VCL Reference

TDecisionSource.Ready

TDecisionSource	See also

Indicates whether the decision source is linked to an active decision cube.

property Ready: Boolean;

Description

Read Ready to determine whether the decision source can provide data to a decision control.


TDecisionSource.SparseCols
 VCL Reference

TDecisionSource.SparseCols

TDecisionSource	See also

Indicates whether empty columns are removed from the current projection.

property SparseCols: Boolean;

Description

Set SparseCols to True to display columns that are empty in the current pivot state. Set SparseCols to False to show only those dimension values that have summarized data over one or more of the row dimensions.

Note:	SparseCols does not change the value returned by GetDimensionMemberCount.


TDecisionSource.SparseRows
 VCL Reference

TDecisionSource.SparseRows

TDecisionSource	See also

Indicates whether empty rows are removed from the current projection.

property SparseRows: Boolean;

Description

Set SparseRows to True to display rows that are empty in the current pivot state. Set SparseRows to False to show only those dimension values that have summarized data over one or more of the column dimensions.

Note:	SparseRows doesn’t change the value returned by GetDimensionMemberCount.


 VCL Reference

TDecisionSource events

TDecisionSource	Alphabetically	Legend

In TDecisionSource

OnAfterPivot

OnBeforePivot

OnLayoutChange

OnNewDimensions

OnStateChange

OnSummaryChange


 VCL Reference

TDecisionSource events

TDecisionSource	By object	Legend

OnAfterPivot

OnBeforePivot

OnLayoutChange

OnNewDimensions

OnStateChange

OnSummaryChange


TDecisionSource.OnAfterPivot
 VCL Reference

TDecisionSource.OnAfterPivot

TDecisionSource	See also

Occurs immediately after the current pivot state changes.

property OnAfterPivot: TNotifyEvent;

Description

Write an OnAfterPivot event handler to take specific action after the information provided by the decision source changes but before any decision controls are updated to reflect the change. This is a good opportunity to save information about the pivot state.

When the pivot state of the decision source changes, an OnBeforePivot occurs when the results of the change have been calculated, and OnAfterPivot occurs when the decision source has been updated to reflect the change. Once the decision controls that are linked to the decision pivot are updated to reflect the change, an OnLayoutChange event occurs.


TDecisionSource.OnBeforePivot
 VCL Reference

TDecisionSource.OnBeforePivot

TDecisionSource	See also

Occurs just before the current pivot state changes.

property OnBeforePivot: TNotifyEvent;

Description

Write an OnBeforePivot event handler to take specific action just before the information provided by the decision source changes. When OnBeforePivot occurs, the results of the pivot have been computed but not implemented. Use the GetGroup, GetIndex, GetState, GetValue, and GetRowState methods to get information about the pivot state that is about to be implemented. To get information about the pivot state that is ending, save the dimension information in an OnAfterPivot event handler. The information about the new state can then be compared to information captured the last time the pivot state was changed. The OnBeforePivot event handler can make additional alterations to the pivot state using the methods of the decision source.


TDecisionSource.OnLayoutChange
 VCL Reference

TDecisionSource.OnLayoutChange

TDecisionSource	See also

Occurs immediately after decision controls are updated to reflect a change to the pivot state of the decision source.

property OnLayoutChange: TNotifyEvent;

Description

Write an OnLayoutChange event handler to respond to changes in the configuration of the active dimensions. OnLayoutChange occurs when the pivot or drill state changes, but the information cached by the decision cube remains the same. When OnLayoutChange occurs, the information the decision source can potentially provide does not change, only the current configuration of that information. To respond to changes in the data cached by the decision cube, use the OnNewDimensions event.


TDecisionSource.OnNewDimensions
 VCL Reference

TDecisionSource.OnNewDimensions

TDecisionSource	See also

Occurs immediately after the data provided by the decision cube changes.

property OnNewDimensions: TNotifyEvent;

Description

Write an OnNewDimensions event handler to respond to changes that alter the data array, such as when the active property of a dimension in the data cube changes. When OnNewDimensions occurs, the information the decision source can provide changes. To respond to changes that reorganize the data but do not change the data cached by the data cube, use the OnEndPivot or OnLayoutChange event. To respond to changes in the data cube itself, use the OnStateChange event.


TDecisionSource.OnStateChange
 VCL Reference

TDecisionSource.OnStateChange

TDecisionSource	See also

Occurs when the DecisionCube property changes.

property OnStateChange: TNotifyEvent;

Description

Write an OnStateChange event handler to respond when the DecisionCube property changes or when the decision cube’s Active property changes. To respond to less drastic changes, use the OnNewDimensions event, the OnLayoutChange event, or the OnEndPivot event.


TDecisionSource.OnSummaryChange
 VCL Reference

TDecisionSource.OnSummaryChange

TDecisionSource	See also

Occurs immediately after the CurrentSum property changes.

property OnSummaryChange: TNotifyEvent;

Description

Write an OnSummaryChange event handler to take specific action when the summary provided by the decision source changes. The value of the CurrentSum property reflects the new current summary.


 VCL Reference

TDecisionSource methods

TDecisionSource	Alphabetically	Legend

In TDecisionSource

CloseDimIndexRight

Create

DefineProperties

Destroy

DrillDimIndex

Get2DDataAsVariant

GetActiveDim

GetDataAsString

GetDataAsVariant

GetDimensionMemberCount

GetDimensionName

GetGroup

GetGroupCount

GetGroupExtent

GetIndex

GetMemberAsString

GetMemberAsVariant

GetRowState

GetState

GetSummaryName

GetValue

GetValueArray

GetValueIndex

MoveDimIndexes

OpenDimIndexLeft

OpenDimIndexRight

SetCurrentSummary

SwapDimIndexes

ToggleDimIndex

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDecisionSource methods

TDecisionSource	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseDimIndexRight

Create

DefaultHandler

DefineProperties

Destroy

DestroyComponents

Destroying

Dispatch

DrillDimIndex

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

Get2DDataAsVariant

GetActiveDim

GetDataAsString

GetDataAsVariant

GetDimensionMemberCount

GetDimensionName

GetGroup

GetGroupCount

GetGroupExtent

GetIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMemberAsString

GetMemberAsVariant

GetNamePath

GetParentComponent

GetRowState

GetState

GetSummaryName

GetValue

GetValueArray

GetValueIndex

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

MoveDimIndexes

NewInstance

OpenDimIndexLeft

OpenDimIndexRight

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetCurrentSummary

SetSubComponent

SwapDimIndexes

ToggleDimIndex

UpdateAction


TDecisionSource.CloseDimIndexRight
 VCL Reference

TDecisionSource.CloseDimIndexRight

TDecisionSource	See also

Closes a dimension.

procedure CloseDimIndexRight(dimGroup: TDimGroup; Index: Integer; bOpen: Boolean);

Description

Call CloseDimIndexRight to close a dimension so that it does not appear in the projection displayed by decision controls that use the decision source.

CloseDimIndexRight closes the first open dimension after the dimension identified by the Index parameter.

The dimGroup parameter indicates whether the dimension to be closed is a row dimension (dgRow) or a column dimension (dgCol). No other values for dimGroup should be used with the CloseDimIndexRight method.

If the dimGroup parameter is dgRow, Index identifies a row dimension, where 0 specifies the first row dimension, 1 specifies the second row dimension, and so on. If the dimGroup parameter is dgCol, Index identifies a column dimension, starting with an index of 0 for the first column dimension. No other values for dimGroup should be used with the CloseDimIndexRight method. To close the first open row or column dimension, set Index to -1.

The bOpen parameter specifies whether closed dimensions are counted when interpreting Index. Only open dimensions are counted when bOpen is True.


TDecisionSource.Create
 VCL Reference

TDecisionSource.Create

TDecisionSource	See also

Creates and initializes an instance of TDecisionSource.

constructor Create( AOwner: TComponent ); override;

Description

Call Create to instantiate a decision source at runtime. Decision source objects placed in forms or data modules at design time are created automatically.


TDecisionSource.DefineProperties
 VCL Reference

TDecisionSource.DefineProperties

TDecisionSource	See also

Designates methods for storing the decision source’s unpublished data on a stream such as a form file.

procedure DefineProperties(Filer: TFiler); override;

Description

Do not call DefineProperties. It is called automatically when forms or data modules containing a decision source component are loaded or saved.

DefineProperties allows the decision source to load and save information as if it were a set of published property values. The decision source uses this method to save some of its unpublished properties, including

CurrentSum

nDims

nSums

DefineProperties also calls the inherited method, to allow additional properties or pseudo-properties to be saved with the decision source.


TDecisionSource.Destroy
 VCL Reference

TDecisionSource.Destroy

TDecisionSource	See also

Destroys an instance of TDecisionSource.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the decision source reference is not nil and only then calls Destroy.

For all decision controls linked to the decision source, Destroy changes the DecisionSource property to nil.


TDecisionSource.DrillDimIndex
 VCL Reference

TDecisionSource.DrillDimIndex

TDecisionSource	See also

Collapses a dimension to focus on a single value.

procedure DrillDimIndex(dimGroup: TDimGroup; Index: Integer; ValueIndex: Integer; bOpen: Boolean);

Description

Call DrillDimIndex to “drill down” on a dimension, so that only the summaries for a single value are displayed.

The dimGroup parameter specifies the type of dimension to be drilled. If dimGroup is dgRow, the Index parameter identifies a row dimension to be drilled. If dimGroup is dgCol, Index identifies a column dimension to be drilled. No other values for dimGroup should be used with the DrillDimIndex method. The first row or column dimension has an Index of 0, the second dimension has an Index of 1, and so on.

The ValueIndex parameter is the index of single value from all values over the dimension that should be displayed. To display only the summaries over the entire dimension, rather than for a single value along the dimension, set ValueIndex to -1.

 The bOpen parameter specifies whether closed dimensions are counted when interpreting Index. Only open dimensions are counted when bOpen is True.

To restore the dimension from its drilled state so that it displays all values again, use the ToggleDimIndex method.

Note:	Do not drill a dimension of the Decision Source unless the CurrentSum property specifies an additive summary. Additive Summaries are SUM and COUNT.  AVERAGE (unless calculated internally by the Decision Cube), MAX, and MIN are not additive.


TDecisionSource.Get2DDataAsVariant
 VCL Reference

TDecisionSource.Get2DDataAsVariant

TDecisionSource	See also

Returns the summary for a two dimensional projection of the current pivot state.

function Get2DDataAsVariant(iDimA, iDimB: Integer; aValueIndex, bValueIndex: Integer): Variant;

Description

Call Get2DDataAsVariant to obtain the summary value from the decision cube that corresponds to the coordinates of aValueIndex on the iDimA dimension and bValueIndex on the iDimB dimension. The returned value is a variant that summarizes all values over the other active dimensions, unless they are drilled. For drilled dimensions, only the drilled value is included in the summary.

The iDimA and iDimB parameters specify the dimensions for the two dimensional projection, where 0 indicates the first active dimension, 1 indicates the second active dimension, and so on. The dimension indexes are expressed as absolute indexes. To obtain an absolute index from a row or column index, use the GetActiveDim method. The aValueIndex and bValueIndex parameters are the indexes of the values on the two dimensions, where 0 indicates the first value, 1 indicates the second value, and so on. Use the GetMemberAsString or GetMemberAsVariant method to obtain the field values that correspond to the aValueIndex and bValueIndex parameters.


TDecisionSource.GetActiveDim
 VCL Reference

TDecisionSource.GetActiveDim

TDecisionSource	See also

Converts a row-specific or column-specific dimension index into an absolute dimension index.

function GetActiveDim(dimGroup: TDimGroup; Index: Integer; bOpen: Boolean): Integer;

Description

Call GetActiveDim to obtain the index of a dimension in the decision cube from its position in a decision grid. The names and values of row dimensions appear in the label cells on the right of the decision grid. The first row dimension appears in the first column, the second row dimension appears in the second column, and so on. Similarly, column dimensions appear in the label cells on the top of the decision grid, with the first column dimension appearing in the first row of the grid.

The dimGroup parameter indicates whether the dimension of interest is a row dimension or column dimension. If dimGroup is dgRow, the dimension is a row dimension. If dimGroup is dgCol, the dimension is a column dimension. GetActiveDim is only implemented for dimGroup values of dgRow and dgCol.

The Index parameter indicates the position of the dimension in the set of row or column dimensions, where 0 specifies the first row or column dimension, 1 specifies the second dimension, and so on.

The bOpen parameter specifies whether closed dimensions are counted when interpreting Index. Only open dimensions are counted when bOpen is True.

GetActiveDim returns the absolute index of the dimension. Absolute indexes are used by many methods of the decision source, such as GetDimensionName or GetMemberAsString.

Note:	To obtain a row-specific index or column-specific index from an absolute dimension index, use the GetIndex method.


TDecisionSource.GetDataAsString
 VCL Reference

TDecisionSource.GetDataAsString

TDecisionSource	See also

Returns the data value that should appear in the cell of a decision grid, formatted as a string.

function GetDataAsString(ARow, ACol:Integer; var SubLevel: Integer): String;

Description

Call GetDataAsString to obtain the display string for a data cell in a decision grid. The ARow and ACol parameters indicate the row and column numbers of the cell in the decision grid, where (0,0) specifies the top left cell in the data region.

GetDataAsString computes the dimension coordinates in the decision cube that correspond to the row and column indexes, making note of all dimensions over which subtotals must be taken. It then obtains the summary value from the decision cube, combining values for each summarized dimension. GetDataAsString returns the final summary value, formatted as a string. It also returns the number of summarized dimensions in the SubLevel parameter.


TDecisionSource.GetDataAsVariant
 VCL Reference

TDecisionSource.GetDataAsVariant

TDecisionSource	See also

Returns the data value that should appear in the cell of a decision grid.

function GetDataAsVariant(ARow, ACol: Integer; var SubLevel: Integer): Variant;

Description

Call GetDataAsVariant to obtain the value of a data cell in a decision grid. The ARow and ACol parameters indicate the row and column numbers of the cell in the decision grid, where (0,0) specifies the top left cell in the data region.

GetDataAsVariant computes the dimension coordinates in the decision cube that correspond to the row and column indexes, making note of all dimensions over which subtotals must be taken. It then obtains the summary value from the decision cube, combining values for each summarized dimension. GetDataAsVariant returns the final summary value. It also returns the number of summarized dimensions in the SubLevel parameter.


TDecisionSource.GetDimensionMemberCount
 VCL Reference

TDecisionSource.GetDimensionMemberCount

TDecisionSource	See also

Returns the number of distinct values to be displayed for a given dimension.

function GetDimensionMemberCount(iDim: Integer): Integer;

Description

Call GetDimensionMemberCount to determine the number of values in the dimension identified by the iDim parameter. The iDim parameter is the absolute index of the dimension, where 0 indicates the first active dimension in the decision cube, 1 indicates the second active dimension, and so on. To convert from a row-specific or column-specific dimension index into an absolute dimension index, use the GetActiveDim method.

GetDimensionMemberCount provides an upper limit to the ValueIndex parameter of the GetMemberAsString or GetMemberAsVariant method.

Note:	The value returned by GetDimensionMemberCount may change depending on the pivot state.


TDecisionSource.GetDimensionName
 VCL Reference

TDecisionSource.GetDimensionName

TDecisionSource	See also

Returns the display name for a dimension.

function GetDimensionName(iDim: Integer): String;

Description

Call GetDimensionName to obtain a name to display as a label for the dimension. The iDim parameter is the absolute index of the dimension, where 0 indicates the first active dimension in the decision cube, 1 indicates the second active dimension, and so on. To convert from a row-specific or column-specific dimension index into an absolute dimension index, use the GetActiveDim method.

The name of a dimension is often the name of the field the dimension represents. The dimension name can be changed in the Decision Cube Editor or by setting the Name property of the dimension in the dimension map of the decision cube.


TDecisionSource.GetGroup
 VCL Reference

TDecisionSource.GetGroup

TDecisionSource	See also

Indicates where a dimension appears in the current pivot state.

function GetGroup(iDim: Integer): TDimGroup;

Description

Call GetGroup to determine how the dimension specified by the iDim parameter is used in the current pivot state. The iDim parameter is the absolute index of the dimension, where 0 is the first active dimension, 1 is the second active dimension, and so on.

If the dimension is a row dimension (displayed to the left of a decision grid or on the y-axis of a decision graph), GetGroup returns dgRow. If it is a column dimension (displayed at the top of a decision grid or on the x-axis of a decision graph), GetGroup returns dgCol. If the dimension is a paged dimension (not appearing in the decision control but limiting the data to a single value along the dimension), GetGroup returns dgPage. GetGroup never returns dgSum or dgNone.

Note:	To determine the position of the dimension within the row dimensions or column dimensions, use the GetIndex method.


TDecisionSource.GetGroupCount
 VCL Reference

TDecisionSource.GetGroupCount

TDecisionSource	See also

Returns the number of dimensions there are of a specified type.

function GetGroupCount( dimGroup: TDimGroup, bOpen: Boolean): Integer;

Description

Call GetGroupCount to determine how many row, column, or paged dimensions exist in the current pivot state.

Specify the type of dimension to count as the value of dimGroup. This value can be dgRow, dgCol, or dgPage.  Do not use other TDimGroup values with GetGroupCount.

bOpen indicates whether to count all dimensions (including those currently closed), or only the open dimensions.

Note:	You can get the same information about row and column dimensions using the nRowDims, nOpenRowDims, nColDims, or nOpenColDims property.


TDecisionSource.GetGroupExtent
 VCL Reference

TDecisionSource.GetGroupExtent

TDecisionSource	See also

Returns the range of cell indexes for a single value of a dimension.

type

  TDimRange = Record

    First: Integer;

    Last: Integer;

  end;

function GetGroupExtent(dimGroup: TDimGroup; Index: Integer; Cell: Integer): TDimRange;

Description

Call GetGroupExtent to find the range of cells in a decision grid that has the same value on a given dimension as the cell specified by the Cell parameter.

Cell is the index of the row or column containing the cell, where 0 specifies the first row or column in the data area of a decision grid.

If dimGroup is dgRow, Cell identifies a row of the grid. If dimGroup is dgCol, Cell identifies a column of the grid. Do not use other values for dimGroup.

Index specifies the row-specific or column-specific index of the dimension.

For example, if a decision grid has two row dimensions listed in the first two columns of the decision grid, the line

MyRange := GetGroupExtent(dgRow, 0, 3);

sets MyRange to the range of row indexes for cells that have the same value on the first row dimension as the third cell. The number of cells in this range is the same as the value returned by GetDimensionMemberCount for the second open row dimension. The line

MyRange := GetGroupExtent(dgRow, 1, 3);

sets MyRange to the range from 3 to 3, because the second row dimension is the innermost row dimension, so each value is represented by a single row.

Note:	If the dimension includes subtotals, the subtotal cell is included in the range returned by GetGroupExtent.


TDecisionSource.GetIndex
 VCL Reference

TDecisionSource.GetIndex

TDecisionSource	See also

Returns the row-specific or column-specific index of a dimension.

function GetIndex(iDim: Integer; bOpen: Boolean): Integer;

Description

Call GetIndex to obtain the row-specific index or column-specific index of a dimension from its index in the decision cube. GetIndex returns 0 for the first row dimension or the first column dimension. GetIndex returns 1 for the second row dimension or the second column dimension, and so on. The iDim parameter is the absolute index of the dimension. If the bOpen parameter is True, GetIndex is the position of the dimension when only open dimensions are counted. If bOpen is False, all dimensions, including closed dimensions are counted.

Use the GetGroup method to determine whether the index returned by GetIndex is a row-specific index (GetGroup returns dgRow) or a column-specific index (GetGroup returns dgCol).

To obtain the index of a dimension in the decision cube from its row-specific or column-specific index, use the GetActiveDim method.


TDecisionSource.GetMemberAsString
 VCL Reference

TDecisionSource.GetMemberAsString

TDecisionSource	See also

Returns the label string for a dimension value.

function GetMemberAsString(iDim: Integer; ValueIndex: Integer): String;

Description

Call GetMemberAsString to obtain the value indicated by the ValueIndex parameter along the dimension specified by the iDim parameter, formatted as a string.

The iDim parameter is the absolute index of the dimension, where 0 indicates the first active dimension in the decision cube, 1 indicates the second active dimension, and so on. To convert from a row-specific or column-specific dimension index into an absolute dimension index, use the GetActiveDim method.

The ValueIndex parameter is the index of a value along the dimension, where 0 specifies the first value of the dimension and GetDimensionMemberCount returns the number of values along the dimension.


TDecisionSource.GetMemberAsVariant
 VCL Reference

TDecisionSource.GetMemberAsVariant

TDecisionSource	See also

Returns a value along a dimension.

function GetMemberAsVariant(iDim: Integer; ValueIndex: Integer): Variant;

Description

Call GetMemberAsVariant to obtain the value indicated by the ValueIndex parameter along the dimension specified by the iDim parameter.

The iDim parameter is the absolute index of the dimension, where 0 indicates the first active dimension in the decision cube, 1 indicates the second active dimension, and so on. To convert from a row-specific or column-specific dimension index into an absolute dimension index, use the GetActiveDim method.

The ValueIndex parameter is the index of a value along the dimension, where 0 specifies the first value of the dimension and GetDimensionMemberCount returns the number of values along the dimension.


TDecisionSource.GetRowState
 VCL Reference

TDecisionSource.GetRowState

TDecisionSource	See also

Indicates whether the adjacent dimensions are open or closed.

type

  TRowStates = (rcNextOpen, rcPrevOpen, rcNextClosed, rcPrevClosed);

TRowState = set of TRowStates;

function GetRowState(iDim: Integer): TRowState;

Description

Call GetRowState to determine the state of the dimensions that are adjacent to a dimension in the current pivot state. The iDim parameter specifies the absolute index of the dimension whose neighbors are to be checked. When iDim is 0, the dimension is the first active dimension in the decision cube. When iDim is 1, it is the second active dimension, and so on.

The return value includes rcPrevOpen if the previous dimension is open or rcPrevClosed if the previous dimension is closed. The return value includes rcNextOpen if the following dimension is open or rcNextClosed if it is closed. The first row or column dimension does not include either rcPrevOpen or rcPrevClosed. The last row or column does not include either rcNextOpen or rcNextClosed.

Note:	Do not be confused by the name of the GetRowState method. It provides information about the adjacent column dimensions if iDim specifies a column dimension, or information about the adjacent row dimensions if iDim specifies a row dimension.


TDecisionSource.GetState
 VCL Reference

TDecisionSource.GetState

TDecisionSource	See also

Returns the state of a dimension.

type

  TDimState = (dmClosed, dmOpen, dmDrilled, dmPaged, dmNone);

function GetState(iDim: Integer): TDimState;

Description

Call GetState to determine whether a specified dimension is open, closed, or drilled. The iDim parameter is the absolute index of the dimension, where 0 specifies the first active dimension in the decision cube, 1 specifies the second active dimension, and so on. GetState returns one of the following values:

Value	Meaning

dmClosed	The dimension is closed. None of its values appear in the decision control.

dmOpen	The dimension is open. All of its values appear in the decision control.

dmDrilled	The dimension is drilled. Only a single value (or a summary over all values) along the dimension appears in the decision control.

dmPaged	The dimension can only display a single value or summarize all values together.

dmNone	The dimension is not active.

Note:	The state dmDrilled appears the same as dmPaged in a decision control. However, drilled dimensions can be changed to open or closed, while paged dimensions cannot change their state. Paged dimensions use considerably less memory than other types.


TDecisionSource.GetSummaryName
 VCL Reference

TDecisionSource.GetSummaryName

TDecisionSource	See also

Returns the name of an active summary in the decision cube.

function GetSummaryName(iSum: Integer): String;

Description

Call GetSummaryName to determine the name of a summary. The iSum parameter is the index of the summary from the list of active summaries available from the decision cube. Use GetSummaryName to determine the name of the possible summaries that can be set using the SetCurrentSummary method.


TDecisionSource.GetValue
 VCL Reference

TDecisionSource.GetValue

TDecisionSource	See also

Returns the drill value of a drilled or paged dimension.

function GetValue(iDim: Integer): Integer;

Description

Call GetValue to determine the value focused on by a drilled or paged dimension. Drilled dimensions and paged dimensions display only the data for a single field value along the dimension. GetValue returns the index of that single value. The value itself can be obtained from this index by calling the GetMemberAsString or GetMemberAsVariant method.

The iDim parameter is the absolute index of the drilled or paged dimension, where 0 specifies the first active dimension in the decision cube, 1 specifies the second active dimension, and so on.

Note:	If the dimension is drilled so that it displays only summaries over all the values in the dimension, GetValue returns -1. If the dimension specified by the iDim parameter is not drilled or paged, GetValue returns -1.


TDecisionSource.GetValueArray
 VCL Reference

TDecisionSource.GetValueArray

TDecisionSource	See also

Returns the values of all dimension fields over which a data cell is summarized.

function GetValueArray(ACol, ARow: Integer; var ValueArray: TSmallIntArray): Boolean;

Description

Call GetValueArray to obtain the coordinates of a data cell from a decision grid in the multidimensional array maintained by the decision cube. The ACol and ARow parameters represent the indexes of the column and row containing the cell, where (0,0) specifies the upper left data cell, not the top left cell in the grid. The ValueArray parameter returns the indexes of the field values along each active dimension. An index of -1 indicates that the cell represents a subtotal across all values in the corresponding dimension. Use the GetMemberAsString or GetMemberAsVariant method to convert the indexes in the ValueArray parameter into field values. GetValueArray returns a boolean indicating whether the function was successful.


TDecisionSource.GetValueIndex
 VCL Reference

TDecisionSource.GetValueIndex

TDecisionSource	See also

Returns the index of a single dimension value that corresponds to a cell in a decision grid.

function GetValueIndex(dimGroup: TDimGroup; Index: Integer; Cell: Integer; var isBreak: Boolean; var isSum: boolean) : Integer;

Description

Call GetValueIndex to obtain the coordinate of a cell in a decision grid along the dimension specified by the Index parameter. The dimGroup parameter indicates whether the dimension is a row dimension (dgRow) or a column dimension (dgCol). Do not call GetValueIndex with dimGroup set to any other TDimGroup value. The Index parameter is the row- or column-specific index of the dimension. The first row or column dimension has an Index of 0, the second dimension has an Index of 1, and so on. The Cell parameter is the index of the cell row or column, where 0 specifies the first row or column in the data region of the grid.

In addition to returning the index of the dimension value, GetValueIndex provides additional information about the position of Cell within the cells for the dimension. GetValueIndex sets isBreak to True when Cell is the first cell in the dimension group with the returned value on the specified dimension. GetValueIndex sets iSum to True when Cell represents a subtotal over the dimension.


TDecisionSource.MoveDimIndexes
 VCL Reference

TDecisionSource.MoveDimIndexes

TDecisionSource	See also

Changes the position of a dimension.

procedure MoveDimIndexes(SdimGroup, DdimGroup: TDimGroup; SIndex, DIndex: Integer; bOpen: Boolean);

Description

Call MoveDimIndexes to change the pivot state of the decision grid. MoveDimIndexes moves the dimension indicated by the SIndex and SdimGroup parameters to the position indicated by the DIndex and DdimGroup parameters.

The SdimGroup and DdimGroup parameters specify whether the dimension position is along the rows of a decision grid (SdimGroup or DdimGroup is dgRow), or across the columns of the decision grid (SdimGroup or DdimGroup is dgCol). The SIndex and DIndex parameters indicate the index of the dimension position among the row dimensions or column dimensions, where 0 specifies the first position, 1 specifies the second position, and so on. The bOpen parameter specifies whether closed dimensions are counted when interpreting the SIndex and DIndex parameters. When bOpen is True, only open dimensions are counted.

Note:	Do not move a dimension of the Decision Source unless the CurrentSum property specifies an additive summary. Additive Summaries are SUM and COUNT.  AVERAGE (unless calculated internally by the Decision Cube), MAX, and MIN are not additive.


TDecisionSource.OpenDimIndexLeft
 VCL Reference

TDecisionSource.OpenDimIndexLeft

TDecisionSource	See also

Opens the first closed dimension that appears before a specified dimension.

procedure OpenDimIndexLeft(dimGroup: TDimGroup; Index: Integer; bOpen: Boolean);

Description

Call OpenDimIndexLeft to reopen a closed dimension so that its values appear in the decision control.

OpenDimIndexLeft opens the first closed dimension before the dimension identified by the Index parameter. If the dimGroup parameter is dgRow, Index identifies a row dimension, where 0 specifies the first row dimension, 1 specifies the second row dimension, and so on. If the dimGroup parameter is dgCol, Index identifies a column dimension, starting with an index of 0 for the first column dimension. No other values for dimGroup should be used with the OpenDimIndexLeft method. To open the last closed row or column dimension, set Index to -1. The bOpen parameter specifies whether closed dimensions are counted when interpreting Index. Only open dimensions are counted when bOpen is True.


TDecisionSource.OpenDimIndexRight
 VCL Reference

TDecisionSource.OpenDimIndexRight

TDecisionSource	See also

Opens the first closed dimension that appears after a specified dimension.

procedure OpenDimIndexRight(dimGroup: TDimGroup; Index: Integer; bOpen: Boolean);

Description

Call OpenDimIndexRight to reopen a closed dimension so that its values appear in the decision control.

OpenDimIndexRight opens the first closed dimension after the dimension identified by the Index parameter. If the dimGroup parameter is dgRow, Index identifies a row dimension, where 0 specifies the first row dimension, 1 specifies the second row dimension, and so on. If the dimGroup parameter is dgCol, Index identifies a column dimension, starting with an index of 0 for the first column dimension. No other values for dimGroup should be used with the OpenDimIndexRight method. To open the first closed row or column dimension, set Index to -1. The bOpen parameter specifies whether closed dimensions are counted when interpreting Index. Only open dimensions are counted when bOpen is True.


TDecisionSource.SetCurrentSummary
 VCL Reference

TDecisionSource.SetCurrentSummary

TDecisionSource	See also

Specifies which summary is provided by the decision source.

procedure SetCurrentSummary(Value: Integer);

Description

The decision cube maintains a set of active summaries in its cache. The decision source can only present one of those summaries to decision controls. Call SetCurrentSummary to specify which of the active summaries is surfaced by the decision source. The Value parameter specifies the index of the summary in the list of active summaries maintained by the decision cube.

To obtain the names of the active summaries from which the current summary is chosen, use the GetSummaryName method.


TDecisionSource.SwapDimIndexes
 VCL Reference

TDecisionSource.SwapDimIndexes

TDecisionSource	See also

Interchanges the positions of two dimensions.

procedure SwapDimIndexes(SdimGroup, DdimGroup: TDimGroup; SIndex, DIndex: Integer; bOpen: Boolean);

Description

Call SwapDimIndexes to change the pivot state of the decision grid. SwapDimIndexes interchanges the positions of the dimension indicated by the SIndex and SdimGroup parameters and the dimension indicated by the DIndex and DdimGroup parameters.

The SdimGroup and DdimGroup parameters specify whether the dimension position is along the rows of a decision grid (SdimGroup or DdimGroup is dgRow), or across the columns of the decision grid (SdimGroup or DdimGroup is False). The SIndex and DIndex parameters indicate the index of the dimension position among the row dimensions or column dimensions, where 0 specifies the first position, 1 specifies the second position, and so on. The bOpen parameter specifies whether closed dimensions are considered when interpreting the SIndex and DIndex parameters. When bOpen is True, only open dimensions are counted.

Note:	Do not move a dimension of the Decision Source unless the CurrentSum property specifies an additive summary. Additive Summaries are SUM and COUNT. AVERAGE (unless calculated internally by the Decision Cube), MAX, and MIN are not additive.


TDecisionSource.ToggleDimIndex
 VCL Reference

TDecisionSource.ToggleDimIndex

TDecisionSource	See also

Changes whether a dimension is open, closed, or drilled.

procedure ToggleDimIndex(dimGroup: TDimGroup; Index: Integer; bOpen: Boolean);

Description

Call ToggleDimIndex to open a closed dimension, close an open dimension, or expand a drilled dimension.

When dimGroup is dgRow, the Index parameter specifies the row-specific index of the dimension. When dimGroup is dgCol, Index specifies the column-specific index of the dimension. The first row or column dimension has an Index of 0, the second dimension has an Index of 1, and so on. The bOpen parameter specifies whether closed dimensions should be counted when interpreting the Index parameter. When bOpen is True, only open dimensions are counted.


Hierarchy

TObject

TPersistent

TComponent

TDecisionSource


TDeleteButton
 VCL Reference

TDeleteButton

Hierarchy	Properties	Methods	See also

TDeleteButton generates an HTML control that deletes a record from an XML data packet.

Unit

MidItems

Description

Add TDeleteButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to delete records. The resulting HTML button’s action adds the record deletion to the emerging delta packet, which can then be submitted using an apply updates button.

Use the properties of TDeleteButton to customize the appearance of the button and associate it with a Web item. The associated Web item displays the records that the delete button can delete.


 VCL Reference

TDeleteButton properties

TDeleteButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDeleteButton properties

TDeleteButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TDeleteButton methods

TDeleteButton	Alphabetically	Legend

In TDeleteButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDeleteButton methods

TDeleteButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDeleteButton.Create
 VCL Reference

TDeleteButton.Create

TDeleteButton	See also

Creates and initializes an instance of TDeleteButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TDeleteButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TDeleteButton


EDimIndexError
 VCL Reference

EDimIndexError

Hierarchy	Properties	Methods	See also

EDimIndexError is the exception class for when an invalid index is used to specify a dimension in a decision source.

Unit

MXDB

Description

EDimIndexError is raised when any of the methods of a decision source are called with a dimension index that does not correspond to a dimension.


 VCL Reference

EDimIndexError properties

EDimIndexError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDimIndexError properties

EDimIndexError	By object	Legend

HelpContext

Message


 VCL Reference

EDimIndexError methods

EDimIndexError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDimIndexError methods

EDimIndexError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDimIndexError


EDimensionMapError
 VCL Reference

EDimensionMapError

Hierarchy	Properties	Methods	See also

EDimensionMapError is the exception class for when the dataset of a decision cube does not have the proper format.

Unit

MXDB

Description

EDimensionMapError is raised when the dataset of a decision cube does not contain any summary values, contains only summary values, or is a query that does not contain the appropriate grouping.


 VCL Reference

EDimensionMapError properties

EDimensionMapError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDimensionMapError properties

EDimensionMapError	By object	Legend

HelpContext

Message


 VCL Reference

EDimensionMapError methods

EDimensionMapError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDimensionMapError methods

EDimensionMapError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDimensionMapError


TDispatchConnection
 VCL Reference

TDispatchConnection

Hierarchy	Properties	Methods	Events	See also

TDispatchConnection is the base class for objects that connect client applications to an IDispatch-based application server.

Unit

MConnect

Description

Do not create instances of TDispatchConnection. Instead, use TDispatchConnection as a base class when creating a custom component that forms a connection to a COM-based application server in a multi-tiered database application.

TDispatchConnection introduces the infrastructure for logging on to an application server, obtaining an IAppServer interface, calling the application server’s interface, and managing a remote connection. Additionally, TCustomRemoteServer inherits the ability to work with one or more client datasets.

TDispatchConnection is not capable of connecting to an application server. This ability is added by descendants, which are specialized for different connection types. Once a connection is formed, however, TDispatchConnection makes the application server’s IAppServer interface available to TClientDataSet components.

To enable a client application to connect to a COM-based application server, use a descendant of TDispatchConnection such as TSocketConnection, TWebConnection, or TDCOMConnection.


 VCL Reference

TDispatchConnection properties

TDispatchConnection	Alphabetically	Legend

In TDispatchConnection

Connected

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDispatchConnection properties

TDispatchConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

ObjectBroker

Owner

ServerGUID

ServerName

Tag

VCLComObject


TDispatchConnection.Connected
 VCL Reference

TDispatchConnection.Connected

TDispatchConnection	See also

Indicates whether the TDispatchConnection object is connected to an application server.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to the application server. Set Connected to False to terminate the connection.

When changing the value of Connected, TDispatchConnection generates a BeforeConnect and an AfterConnect event, or a BeforeDisconnect and an AfterDisconnect event. In addition, when setting Connected to True, TDispatchConnection may display a login dialog, depending on the value of LoginPrompt.

The Connected property uses the protected DoConnect and DoDisconnect methods to connect to or disconnect from an application server. Descendants of TDispatchConnection override DoConnect and DoDisconnect to change the way the connection is formed or terminated.


TDispatchConnection.ObjectBroker
 VCL Reference

TDispatchConnection.ObjectBroker

TDispatchConnection	See also

Specifies an Object Broker that allows the connection component to choose from several application servers.

property ObjectBroker: TCustomObjectBroker;

Description

Set ObjectBroker to use a broker that maintains a list of servers that support the application specified by ServerName or ServerGUID. When the connection component needs to open a connection, it requests information to identify a server machine from the Object Broker.

Descendants of TDispatchConnection define properties that specify how to locate server machines. These properties are not saved with the connection component if the ObjectBroker property is set. Instead, the Object Broker provides this information dynamically at runtime from its list of available servers.

Applications can use TSimpleObjectBroker for an object broker, or derive their own object brokers from TCustomObjectBroker.


TDispatchConnection.ServerGUID
 VCL Reference

TDispatchConnection.ServerGUID

TDispatchConnection	See also

Specifies the GUID of the application server with which to connect.

property ServerGUID: string;

Description

Use ServerGUID to specify the application server to which the client application should connect by its GUID (global unique identifier). If the value specifies a valid GUID for a registered application server, setting ServerGUID changes the value of ServerName to the class name of the corresponding COM object.

Using ServerGUID rather than ServerName to identify the application server is more robust because it does not require the application server to be registered on the client system.

Note:	Either ServerName or ServerGUID must be provided so that the dispatch connection can create and communicate with the appropriate server COM object. This is true even for connections that are not formed using DCOM, because the remote data module on the application server is always implemented as a COM object.


TDispatchConnection.ServerName
 VCL Reference

TDispatchConnection.ServerName

TDispatchConnection	See also

Specifies the name of the application server with which to connect.

property ServerName: string;

Description

Use ServerName to specify the name of the application server to which the client application should connect. At design time, the Object Inspector provides a drop-down list of all available servers if one of the following conditions is met

For DCOM and OLEnterprise connections, the servers must be registered in the system Registry.

For Socket connections, ScktSrvr.exe must be running on the server machine.

For Web connections, the connection component must have an URL for locating httpsrvr.dll.

If ServerName specifies a valid name for a registered application server, setting ServerName sets the ServerGUID property to the GUID that corresponds to the named application server.

Note:	Either ServerName or ServerGUID must be provided so that the dispatch connection can create and communicate with the appropriate server COM object. This is true even for connections that are not formed using DCOM, because the remote data module on the application server is always implemented as a COM object. Using ServerGUID rather than ServerName to identify the application server is more robust because it does not require the application server to be registered on the client system when using a COM-based connection.


 VCL Reference

TDispatchConnection events

TDispatchConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TDispatchConnection events

TDispatchConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TDispatchConnection methods

TDispatchConnection	Alphabetically	Legend

In TDispatchConnection

Create

DoDisconnect

GetConnected

GetServer

GetServerCLSID

GetServerList

Notification

SetConnected

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDispatchConnection methods

TDispatchConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoDisconnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetConnected

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

GetServerCLSID

GetServerList

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetConnected

SetSubComponent

UpdateAction


TDispatchConnection.Create
 VCL Reference

TDispatchConnection.Create

TDispatchConnection	See also

Creates an instance of a dispatch connection component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a dispatch connection component at runtime. Connection components placed in forms or data modules at design time are created automatically.

After calling the inherited constructor, Create initializes the LoginPrompt property to False.


TDispatchConnection.DoDisconnect
 VCL Reference

TDispatchConnection.DoDisconnect

TDispatchConnection	See also

Drops a connection to an application server.

procedure DoDisonnect; override;

Description

DoDisconnect is called internally when the Connected property is set to False. It drops the connection and changes the AppServer property to a NULL Variant.


TDispatchConnection.GetConnected
 VCL Reference

TDispatchConnection.GetConnected

TDispatchConnection	See also

Returns the value of the Connected property.

function GetConnected: Boolean; override;

Description

GetConnected is the protected implementation of the Connected property. It uses the AppServer property (set by the DoConnect method of a TDispatchConnection descendant) to determine whether a connection is established.

If a connection is established, GetConnected returns True. Otherwise, GetConnected returns False.


TDispatchConnection.GetServer
 VCL Reference

TDispatchConnection.GetServer

TDispatchConnection	See also

Returns the IAppServer interface of the application server.

function GetServer: IAppServer; override;

Description

Client datasets call GetServer to set the value of their AppServer property. This allows them to access providers on the remote application server.

GetServer ensures that there is a connection and then returns an IAppServer interface that can be used to communicate with providers on the application server. To use other methods of the application server’s interface, use the AppServer property instead.


TDispatchConnection.GetServerCLSID
 VCL Reference

TDispatchConnection.GetServerCLSID

TDispatchConnection	See also

Returns the GUID for the application server.

function GetServerCLSID: TGUID;

Description

GetServerCLSID is used internally to obtain the GUID for the application server.

In most cases, GetServerCLSID returns the value of the ServerGUID property. However, if the application server was specified using the ServerName property, and the application server was not registered when the ServerName property was set, ServerGUID will not represent the application server’s GUID. GetServerCLSID can return a GUID that only becomes available when a connection is opened.

If neither the ServerName nor the ServerGUID property is set, GetServerCLSID raises an exception.


TDispatchConnection.GetServerList
 VCL Reference

TDispatchConnection.GetServerList

TDispatchConnection	See also

Returns a list of remote data modules to which the component can connect.

function GetServerList: OleVariant; virtual;

Description

Connection components use GetServerList internally to fill the drop down list in the Object Inspector for the ServerName property. GetServerList returns a variant array that lists all application servers that are on the local machine, registered in the system registry, or on the remote machine identified by the connection component.


TDispatchConnection.Notification
 VCL Reference

TDispatchConnection.Notification

TDispatchConnection	See also

Responds when other objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called automatically so objects can make internal adjustments when components are created or destroyed. TDispatchConnection overrides the inherited method to set the ObjectBroker property to nil when it receives notification that that object is about to be destroyed.


TDispatchConnection.SetConnected
 VCL Reference

TDispatchConnection.SetConnected

TDispatchConnection	See also

Sets the Connected property.

procedure SetConnected(Value: Boolean); override;

Description

SetConnected is the protected implementation of the Connected property. It establishes a connection to the Application server if Value is True, and disconnects from the application server if Value is False.

If Value is False, SetConnected generates a BeforeDisconnect event, closes the connection, and generates an AfterDisconnect event.

If Value is True, SetConnected performs the following actions:

1. If LoginPrompt is True, and the connection is not already open, SetConnected generates an OnGetUsername event, and uses that to initialize a login dialog. It displays the login dialog, and aborts the connection if the user cancels.

2. It generates a BeforeConnect event.

3. It opens the connection.

4. It generates an AfterConnect event.

5. If LoginPrompt is True, and the connection opened successfully, SetConnected generates an OnLogin event.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection


TDisplayDim
 VCL Reference

TDisplayDim

Hierarchy	Properties	Methods	See also

TDisplayDim represents a dimension in a decision grid.

Unit

MXGRID

Description

Use TDisplayDim to set the properties of a dimension in a decision grid. Decision grids maintain a collection of TDisplayDim objects that describe the dimension labels that run along their left and top edges. The properties of TDisplayDim can be used to make the labels for a single dimension stand out, or to turn on or off subtotals over the dimension.


 VCL Reference

TDisplayDim properties

TDisplayDim	Alphabetically	Legend

In TDisplayDim

Alignment

Color

DisplayName

FieldName

Format

Subtotals

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TDisplayDim properties

TDisplayDim	By object	Legend

Alignment

Collection

Color

DisplayName

FieldName

Format

ID

Index

Subtotals


TDisplayDim.Alignment
 VCL Reference

TDisplayDim.Alignment

TDisplayDim 	See also

Specifies the placement of values within the label cells.

property Alignment: TAlignment;

Description

Set Alignment to determine how the values of the dimension field are aligned in the label cells. Alignment can be one of the following values:

Value	Meaning

taLeftJustify	Values appear lined up along the left edge of the label cells.

taRightJustify	Values appear lined up along the right edge of the label cells.


TDisplayDim.Color
 VCL Reference

TDisplayDim.Color

TDisplayDim	See also

Specifies the background color of the label cells for the dimension.

property Color: TColor;

Description

Set Color to override the LabelColor property of the decision grid for the labels along a single dimension. Cells that display the field values along this dimension use Color for the background color.


TDisplayDim.DisplayName
 VCL Reference

TDisplayDim.DisplayName

TDisplayDim	See also

Describes the dimension in the caption cell.

property DisplayName: String;

Description

Set DisplayName to the name that appears in the caption cell that displays the name of this dimension. DisplayName overrides the name of the dimension returned by the decision source in its GetDimensionName method.


TDisplayDim.FieldName
 VCL Reference

TDisplayDim.FieldName

TDisplayDim	See also

Names the field in the underlying data set that the dimension represents.

property FieldName: String;

Description

Read FieldName to determine the name of the field on which the dimension item is based. FieldName is the same as the FieldName property of the TField object for the field in the dataset.

Note:	Do not change the FieldName property. Changing the FieldName property loses the link to the underlying field in the data set.


TDisplayDim.Format
 VCL Reference

TDisplayDim.Format

TDisplayDim	See also

Specifies the format of the value labels along the dimension.

property Format: String;

Description

Set Format to specify how the values of the dimension field should be formatted into display labels. The format specifiers that make up the Format string depend on the field type.

See the FormatFloat runtime library function for a description of the format specifiers for a numeric field. See the FormatDateTime runtime library function for a description of the format specifiers for a temporal field. Format has no effect on other field types.


TDisplayDim.Subtotals
 VCL Reference

TDisplayDim.Subtotals

TDisplayDim	See also

Indicates whether the grid should display subtotals over the dimension.

property Subtotals: Boolean;

Description

Set Subtotals to True to add a row or column of subtotals following the last value of the dimension. The subtotal row or column contains values of the summary field summarized over all values in the dimension. Set Subtotals to False to omit the subtotal row or column at the end of the dimension.

To turn subtotals on or off for all dimensions in the grid at once, use the Totals property of the decision grid.


 VCL Reference

TDisplayDim methods

TDisplayDim	Alphabetically	Legend

Derived from TCollectionItem

Create

Destroy

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDisplayDim methods

TDisplayDim	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TPersistent

TCollectionItem

TDimensionItem

TDisplayDim


TDisplayDims
 VCL Reference

TDisplayDims

Hierarchy	Properties	Methods	See also

TDisplayDims represents a collection of TDisplayDim objects.

Unit

MXGRID

Description

Use TDisplayDims to describe the dimensions of a decision grid. Each TDisplayDim object maintained by TDisplayDims corresponds to a field from the decision source. Decision grids use TDisplayDims to specify the appearance of the dimension labels that appear along the left and top edges of the grid.


 VCL Reference

TDisplayDims properties

TDisplayDims	Alphabetically	Legend

In TDisplayDims

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TDisplayDims properties

TDisplayDims	By object	Legend

Count

ItemClass

Items


TDisplayDims.Items
 VCL Reference

TDisplayDims.Items

TDisplayDims	See also

Lists the TDisplayDim objects in the collection.

property Items[Index: Integer]: TDisplayDim; default;

Description

Use Items to access the properties of the TDisplayDim objects maintained by TDisplayDims. Items is the default property of TDisplayDims, so the name of the Items property can be left off when using this property. Thus the line

MyDim := DecisionGrid1.Dimensions.Items[0];

can be written

MyDim := DecisionGrid1.Dimensions[0];

The TDisplayDim objects in the Items array should correspond exactly to the dimensions of the decision source used by the decision control associated with the TDisplayDims object. Do not directly change the elements of the Items array. To rearrange the display dimensions, use the SwapDimIndexes method of the decision source. To hide display dimensions, use the CloseDimIndexRight method of the decision source. To show hidden dimensions, use the OpenDimIndexLeft or OpenDimIndexRight method of the decision source.


 VCL Reference

TDisplayDims methods

TDisplayDims	Alphabetically	Legend

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Create

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDisplayDims methods

TDisplayDims	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


Hierarchy

TObject

TPersistent

TCollection

TDisplayDims


TDOMVendor
 VCL Reference

TDOMVendor

Hierarchy	Methods	See also

TDOMVendor is the abstract base class for components that provide access to a DOM implementation.

Unit

XMLDOM

Description

Use TDOMVendor as a base class for a class that can be used to represent a DOM implementation. TDOMVendor introduces two abstract methods, which provide information about a specific DOM implementation. One returns the IDOMImplementation interface that acts as the top-level interface for a DOM vendor’s implementation. The other returns a unique string that identifies the DOM implementation.

Once a TDOMVendor object has been registered, TXMLDocument objects can assign the DOM implementation as the value of their DOMVendor property by choosing the identifying string in the Object Inspector.


 VCL Reference

TDOMVendor methods

TDOMVendor	Alphabetically	Legend

In TDOMVendor

Description

DOMImplementation

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDOMVendor methods

TDOMVendor	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Description

Destroy

Dispatch

DOMImplementation

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TDOMVendor.Description
 VCL Reference

TDOMVendor.Description

TDOMVendor	See also

Returns a string that uniquely identifies the associated DOM implementation.

function Description: string; virtual; abstract;

Description

Description returns the name, or description, of the associated DOM implementation. This is the string that appears in the Object Inspector for a TXMLDocument object’s DOMVendor property.

Description is anabstract method in TDOMVendor. Descendant classes override this method to provide a unique identifier for the DOM implementation.


TDOMVendor.DOMImplementation
 VCL Reference

TDOMVendor.DOMImplementation

TDOMVendor	See also

Returns the IDOMImplementation interface for the associated DOM implementation.

function DOMImplementation: IDOMIMplementation; virtual; abstract;

DOMImplementation

DOMImplementation returns the top-level interface for a DOM implementation. This interface is the starting point for any application that uses the DOM implementation to parse and edit an XML document.

DOMImplementation is anabstract method in TDOMVendor. Descendant classes override this method to return the IDOMImplementation interface for the associated DOM implementation.

Note:	For more information about the IDOMImplementation, see the W3C Document Object Model (DOM) Level 2 Specification or the documentation provided by your DOM vendor.


Hierarchy

TObject

TDOMVendor


TDOMVendorList
 VCL Reference

TDOMVendorList

Hierarchy	Properties	Methods	See also

TDOMVendorList represents a collection of available DOM implementations.

Unit

XMLDoc

Description

TDOMVendorList is the type of the global DOMVendors variable. It represents a collection of DOM implementations (TDOMVendor objects).

TDOMVendorList introduces a single property, Vendors, that can be used to iterate through all the DOM vendors in the collection. It also introduces methods that can be used to add, delete, or locate vendors.

Note:	Do not explicitly use TDOMVendorList methods to add or delete vendors from the global DOMVendors variable. Instead, add or remove vendors from this global list by calling the global RegisterDOMVendor and UnRegisterDOMVendor procedures.


 VCL Reference

TDOMVendorList properties

TDOMVendorList	Alphabetically 	Legend

In TDOMVendorList

Vendors


 VCL Reference

TDOMVendorList properties

TDOMVendorList	By object 	Legend

Vendors


TDOMVendorList.Vendors
 VCL Reference

TDOMVendorList.Vendors

TDOMVendorList 	See also

Lists the DOM vendors maintained by this TDOMVendorList object.

property Vendors[Index: Integer]: TDOMVendor; default;

Description

Use Vendors to access the DOM vendors in this collection. Index is the index of the vendor. Its value ranges from 0 to one less than the value returned by the Count method.

Vendors is the default property for TDOMVendorList. This means that the property name can be omitted in code. That is, the statement

for i := 0 to DOMVendors.Count do

  StringList1.Add(DOMVendors.Vendors[i].Description);

Can be written

for i := 0 to DOMVendors.Count do

  StringList1.Add(DOMVendors[i].Description);


 VCL Reference

TDOMVendorList methods

TDOMVendorList	Alphabetically	Legend

In TDOMVendorList

Add

Count

Find

Remove

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDOMVendorList methods

TDOMVendorList	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException


TDOMVendorList.Add
 VCL Reference

TDOMVendorList.Add

TDOMVendorList	See also

Adds a new DOM implementation to the end of the list.

procedure Add(const Vendor: TDOMVendor);

Description

Call Add to add a DOM vendor to the end of the list.

Vendor is an object that provides access to the IDOMImplementation interface for the new DOM vendor.

If the list already includes a DOM vendor with the same description as that supplied by Vendor, Add raises an exception.


TDOMVendorList.Count
 VCL Reference

TDOMVendorList.Count

TDOMVendorList	See also

Returns the number of DOM vendors in the collection.

function Count: Integer;

Description

Call Count to determine the number of DOM implementations stored in the list. Count returns a value that can be used as an upper bound when iterating over the vendors using the Vendors property.

Count increases when the Add method adds a vendor to the list and decreases when the Remove method removes a vendor from the list.


TDOMVendorList.Find
 VCL Reference

TDOMVendorList.Find

TDOMVendorList	See also

Returns a vendor from the list, given its description.

function Find(const VendorDesc: string): TDOMVendor;

Description

Call Find to access a vendor in the list, given its description. If there is no vendor in the list with the specified description, Find returns nil.

VendorDesc is the string that is returned by the TDOMVendor object’s Description method.

Find returns a TDOMVendor object, which can be used as a value for the DOMVendor property of a TXMLDocument component.


TDOMVendorList.Remove
 VCL Reference

TDOMVendorList.Remove

TDOMVendorList	See also

Removes a specified vendor from the list.

procedure Remove(const Vendor: TDOMVendor);

Description

Remove removes the specified vendor from the list.

Vendor is the DOM vendor to remove from the list. If the list does not include a vendor with the same description as this parameter, Remove does nothing.


Hierarchy

TObject

TDOMVendorList

TDOMVendorList


TDataSetButton
 VCL Reference

TDataSetButton

Hierarchy	Properties	Methods	See also

TDataSetButton is the base class for Web items that create HTML buttons for navigating or editing data.

Unit

MidItems

Description

Use TDataSetButton as a base class for components that generate the HTML statements defining a specialized button control for working with the data displayed by another Web item. TDataSetButton objects are used by TDataNavigator, which organizes the generated buttons.

TDataSetButton defines properties and methods for

Generating the HTML code to define the button control.

Associating the button with another Web item that generates HTML for displaying the data that the button manipulates.

Specifying tag attributes of the HTML button control, including those defined by a style sheet.

Fitting the component into a hierarchy of Web items, each of which generates part of a larger HTML document.

In order to allow other Web items to use the HTML generated by the button control, TDataSetButton inherits support for the IWebContent interface from TWebButton.

Do not create instances of TDataSetButton. TDataSetButton relies on an abstract method to generate the HTML statements defining a button control. Instead, create descendants of TDataSetButton, such as TNextButton, TPostButton, TInsertButton, and so on.


 VCL Reference

TDataSetButton properties

TDataSetButton	Alphabetically	Legend

In TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetButton properties

TDataSetButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


TDataSetButton.Caption
 VCL Reference

TDataSetButton.Caption

TDataSetButton	See also

Specifies the caption that appears on the button.

property Caption: string;

Description

Use Caption to specify the caption that appears on the generated HTML button. The value of Caption is used as the value of a VALUE parameter on the HTML INPUT tag generated to implement the button.


 VCL Reference

TDataSetButton methods

TDataSetButton	Alphabetically	Legend

Derived from TXMLDisplayReferenceButton

Create

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetButton methods

TDataSetButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton


EBrokerException
 VCL Reference

EBrokerException

Hierarchy	Properties 	Methods 	See also

EBrokerException is the exception raised by simple object brokers when they can’t locate an available server.

Unit

ObjBrkr

Description

EBrokerException is raised when a simple object broker can’t locate an available server.


 VCL Reference

EBrokerException properties

EBrokerException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EBrokerException properties

EBrokerException	By object	Legend

HelpContext

Message


 VCL Reference

EBrokerException methods

EBrokerException	Alphabetically	Legend

In EBrokerException

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EBrokerException methods

EBrokerException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EBrokerException


EDOMParseError
 VCL Reference

EDOMParseError

Hierarchy	Properties	Methods	See also

EDOMParseError is the exception class for errors that occur when a DOM implementation parses an XML document.

Unit

DB

Description

EDOMParseError is raised when TXMLDocument encounters an error while parsing an XML document. It wraps the information that is available from the DOM implementation’s IDOMParseError interface.


 VCL Reference

EDOMParseError properties

EDOMParseError	Alphabetically	Legend

In EDOMParseError

ErrorCode

FilePos

Line

LinePos

Reason

SrcText

URL

Derived from Exception

HelpContext

Message


 VCL Reference

EDOMParseError properties

EDOMParseError	By object	Legend

ErrorCode

FilePos

HelpContext

Line

LinePos

Message

Reason

SrcText

URL


EDOMParseError.ErrorCode
 VCL Reference

EDOMParseError.ErrorCode

EDOMParseError	See also

Indicates the error code that the DOM parser returned.

property ErrorCode: Integer;

Description

ErrorCode is the error code supplied by the DOM parser when it encountered a problem parsing the XML document.


EDOMParseError.FilePos
 VCL Reference

EDOMParseError.FilePos

EDOMParseError	See also

Indicates the offset in the XML document where the parser encountered an error.

property FilePos: Integer;

Description

FilePos is the offset in the XML document where the parser detected the error.


EDOMParseError.Line
 VCL Reference

EDOMParseError.Line

EDOMParseError	See also

Indicates the line of the XML document where the parser encountered an error.

property Line: Integer;

Description

Line is the line of the XML document where the parser detected the error.


EDOMParseError.LinePos
 VCL Reference

EDOMParseError.LinePos

EDOMParseError	See also

Indicates the position within the problem line where the parser encountered an error.

property LinePos: Integer;

Description

LinePos is the offset in the line specified by the Line property where the DOM parser detected an error.


EDOMParseError.Reason
 VCL Reference

EDOMParseError.Reason

EDOMParseError	See also

Indicates the error code that the DOM parser returned.

property Reason: DOMString;

Description

Reason is a short text string that describes the error that was encountered. It corresponds to the error code specified by ErrorCode.


EDOMParseError.SrcText
 VCL Reference

EDOMParseError.SrcText

EDOMParseError	See also

Indicates the text of the line where the parser encountered an error.

property SrcText: DOMString;

Description

SrcText is the text from the XML document that the DOM parser could not interpret.


EDOMParseError.URL
 VCL Reference

EDOMParseError.URL

EDOMParseError	See also

Identifies the source that could not be parsed by its URL.

property URL: DOMString;

Description

URL identifies the problem the DOM parser encountered by its URL.


 VCL Reference

EDOMParseError methods

EDOMParseError	Alphabetically	Legend

In EDOMParseError

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp>main

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDOMParseError methods

EDOMParseError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EDOMParseError.EDOMParseError
 VCL Reference

EDOMParseError.Create

EDOMParseError

Creates a new EDOMParseError object.

constructor Create(const ParseError: IDOMParseError; const Msg: string);

Description

EDOMParseError instantiates an exception object that represents an error encountered by a DOM parser.ParseError is the interface that the DOM parser provides to describe the error it encountered.

Msg is the runtime error message that appears in the exception dialog box.


Hierarchy

TObject

Exception

EDOMParseError


EInterpreterError
 VCL Reference

EInterpreterError

Hierarchy	Properties	Methods 	See also

EInterpreterError is the exception class for errors that arise when trying to interpret COM calls that have been marshaled to a data block.

Unit

SConnect

Description

Data block interpreters (TCustomDataBlockInterpreter descendants) raise EInterpreterError when they can’t interpret the information in a data block. Streamed connection components such as TSocketConnection use data block interpreters to send interface calls to and receive interface calls from a remote application server.


 VCL Reference

EInterpreterError properties

EInterpreterError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInterpreterError properties

EInterpreterError	By object	Legend

HelpContext

Message


 VCL Reference

EInterpreterError methods

EInterpreterError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInterpreterError methods

EInterpreterError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInterpreterError


EInterfaceRTTIException
 VCL Reference

EInterfaceRTTIException

Hierarchy	Properties	Methods	Using EInterfaceRTTIException	See also

EInterfaceRTTIException is the exception raised when an interface does not have RTTI.

Unit

IntfInfo

Description

EInterfaceRTTIException is thrown when an application expects an interface to be invokable but discovers that it does not include any runtime type information (RTTI). For example, the invocation registry raises an EInterfaceRTTIException exception when an application tries to register an interface that is not compiled with RTTI. Invoker components raise an EInterfaceRTTIException exception when an incoming request includes a call to an interface that does not include RTTI.


 VCL Reference

EInterfaceRTTIException properties

EInterfaceRTTIException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInterfaceRTTIException properties

EInterfaceRTTIException	By object	Legend

HelpContext

Message


 VCL Reference

EInterfaceRTTIException methods

EInterfaceRTTIException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInterfaceRTTIException methods

EInterfaceRTTIException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInterfaceRTTIException


ESOAPDomConvertError
 VCL Reference

ESOAPDomConvertError

Hierarchy	Properties	Methods	See also

ESOAPDomConvertError is the class for exceptions that occur when marshaling or unmarshaling a SOAP request.

Unit

OpToSoapDOMConv

Description

TOPToSoapDomConvert raises ESOAPDomConvertError exceptions when it can’t marshal or unmarshal a SOAP packet that encodes a method call or its results.


 VCL Reference

ESOAPDomConvertError properties

ESOAPDomConvertError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ESOAPDomConvertError properties

ESOAPDomConvertError	By object	Legend

HelpContext

Message


 VCL Reference

ESOAPDomConvertError methods

ESOAPDomConvertError	Alphabetically	Legend

In ESOAPDomConvertError

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ESOAPDomConvertError methods

ESOAPDomConvertError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ESOAPDomConvertError


ESocketConnectionError
 VCL Reference

ESocketConnectionError

Hierarchy	Properties	Methods 	See also

ESocketConnectionError is the exception class for errors that arise when sending or receiving messages using TSocketConnection.

Unit

SConnect

Description

Socket connection components raise ESocketConnectionError when the socket they use to send and receive messages reports an error, or when the information read from the socket is incomplete.


 VCL Reference

ESocketConnectionError properties

ESocketConnectionError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ESocketConnectionError properties

ESocketConnectionError	By object	Legend

HelpContext

Message


 VCL Reference

ESocketConnectionError methods

ESocketConnectionError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ESocketConnectionError methods

ESocketConnectionError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ESocketConnectionError


ETypeRegistryException
 VCL Reference

ETypeRegistryException

Hierarchy	Properties	Methods	Using ETypeRegistryException	See also

ETypeRegistryException is the exception raised when the invocation registry or the invokable type registry encounters an invalid type.

Unit

InvokeRegistry

Description

ETypeRegistryException is thrown when

An application tries to register an implementation class with the invocation registry and that class does not implement any interfaces.

An application tries to look up a type in the remotable type registry that is not remotable.


 VCL Reference

ETypeRegistryException properties

ETypeRegistryException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ETypeRegistryException properties

ETypeRegistryException	By object	Legend

HelpContext

Message


 VCL Reference

ETypeRegistryException methods

ETypeRegistryException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ETypeRegistryException methods

ETypeRegistryException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ETypeRegistryException


ETypeTransException
 VCL Reference

ETypeTransException

Hierarchy	Properties	Methods	Using ETypeTransException	See also

ETypeTransException is the exception raised when a conversion between a SOAP type description and an Object Pascal type fails.

Unit

TypeTrans

Description

ETypeTransException is thrown when an application attempts to convert a type in a SOAP packet to an Object Pascal type and fails for some reason.


 VCL Reference

ETypeTransException properties

ETypeTransException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ETypeTransException properties

ETypeTransException	By object	Legend

HelpContext

Message


 VCL Reference

ETypeTransException methods

ETypeTransException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ETypeTransException methods

ETypeTransException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ETypeTransException


EXMLDocError
 VCL Reference

EXMLDocError

Hierarchy	Properties	Methods	See also

EXMLDocError is the exception class for errors editing or parsing an XML document.

Unit

XMLIntf

Description

EXMLDocError is raised by TXMLDocument or TXMLNode when

An error occurs when loading an XML document.

An error occurs when creating a node in an XML document.

A required DOM interface is not found.

An option is requested that is not supported by the DOM implementation.

An attempt is made to perform an action that is not consistent with the specified node type.


 VCL Reference

EXMLDocError properties

EXMLDocError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EXMLDocError properties

EXMLDocError	By object	Legend

HelpContext

Message


 VCL Reference

EXMLDocError methods

EXMLDocError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EXMLDocError methods

EXMLDocError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EXMLDocError


TFirstButton
 VCL Reference

TFirstButton

Hierarchy	Properties	Methods	See also

TFirstButton generates an HTML control that moves to the first record in an XML data packet.

Unit

MidItems

Description

Add TFirstButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to move quickly to the first record in a dataset. The resulting HTML button’s action changes the associated display control so that it shows the first record as current.

Use the properties of TFirstButton to customize the appearance of the button and associate it with a Web item. The associated Web item displays the records that the first button navigates.


 VCL Reference

TFirstButton properties

TFirstButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFirstButton properties

TFirstButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TFirstButton methods

TFirstButton	Alphabetically	Legend

In TFirstButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFirstButton methods

TFirstButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TFirstButton.Create
 VCL Reference

TFirstButton.Create

TFirstButton	See also

Creates and initializes an instance of TFirstButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TFirstButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TFirstButton


TFieldRadioGroup
 VCL Reference

TFieldRadioGroup

Hierarchy	Properties	Methods	See also

TFieldRadioGroup creates an HTML radio group control to represent a field in an XML data packet.

Unit

MidItems

Description

Add TFieldRadioGroup as the child of a TFieldGroup component to add a radio group control that represents a field from the field group’s associated dataset.

Use the properties and methods of TFieldRadioGroup to

Specify the field whose value the radio group displays.

Specify the possible values for the field from which the user can choose.

Specify a caption that describes the field.

Customize the appearance of the radio group.

Fit the radio group into the tab order of the generated HTML form.


 VCL Reference

TFieldRadioGroup properties

TFieldRadioGroup	Alphabetically	Legend

Derived from TWebRadioGroupInput

DisplayColumns

DisplayWidth

ReadOnly

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldRadioGroup properties

TFieldRadioGroup	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayColumns

DisplayWidth

FieldName

Items

ItemsField

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


 VCL Reference

TFieldRadioGroup methods

TFieldRadioGroup	Alphabetically	Legend

Derived from TWebRadioGroupInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldRadioGroup methods

TFieldRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebRadioGroupInput

TFieldRadioGroup


TFieldSelectOptions
 VCL Reference

TFieldSelectOptions

Hierarchy	Properties	Methods	See also

TFieldSelectOptions creates an HTML list control to represent a field in an XML data packet.

Unit

MidItems

Description

Add TFieldSelectOptions as the child of a TFieldGroup component to add a list control that represents a field from the field group’s associated dataset.

Use the properties and methods of TFieldSelectOptions to

Specify the field whose value the list box displays.

Specify the possible values for the field from which the user can choose.

Specify a caption that describes the field.

Customize the appearance of the list box.

Fit the list box into the tab order of the generated HTML form.


 VCL Reference

TFieldSelectOptions properties

TFieldSelectOptions	Alphabetically	Legend

Derived from TWebSelectOptionsInput

DisplayRows

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldSelectOptions properties

TFieldSelectOptions	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayRows

FieldName

Items

ItemsField

Name

Owner

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


 VCL Reference

TFieldSelectOptions methods

TFieldSelectOptions	Alphabetically	Legend

Derived from TWebSelectOptionsInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldSelectOptions methods

TFieldSelectOptions	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebSelectOptionsInput

TFieldSelectOptions


TFieldStatus
 VCL Reference

TFieldStatus

Hierarchy	Properties	Methods	See also

TFieldStatus generates an HTML control that indicates whether a record in an XML data packet has been modified by the end user.

Unit

MidItems

Description

Add TFieldStatus as the child of a TFieldGroup component to provide feedback about whether the current record has been modified. The generated control displays an M if the user has edited the record, an I if the user has inserted the record, and blank if the user has made no changes to the record.

Use the properties and methods of TFieldStatus to

Specify a caption that labels the status control.

Customize the appearance of the control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TFieldStatus properties

TFieldStatus	Alphabetically	Legend

Derived from TWebStatus

DisplayWidth

Derived from TWebDataDisplay

Caption

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldStatus properties

TFieldStatus	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

Name

Owner

Style

StyleRule

TabIndex

Tag

VCLComObject


 VCL Reference

TFieldStatus methods

TFieldStatus	Alphabetically	Legend

Derived from TWebStatus

Create

Identifier

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldStatus methods

TFieldStatus	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Identifier

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebStatus

TFieldStatus


TFieldText
 VCL Reference

TFieldText

Hierarchy	Properties	Methods	See also

TFieldText creates a single-line HTML input control to represent a field in an XML data packet.

Unit

MidItems

Description

Add TFieldText as the child of a TFieldGroup component to add a single-line edit control that represents a field from the field group’s associated dataset.

Use the properties and methods of TFieldText to

Specify the field whose value the control displays.

Specify a caption that describes the field.

Customize the appearance of the edit control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TFieldText properties

TFieldText	Alphabetically	Legend

Derived from TWebTextInput

DisplayWidth

ReadOnly

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldText properties

TFieldText	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject


 VCL Reference

TFieldText methods

TFieldText	Alphabetically	Legend

Derived from TWebTextInput

Create

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldText methods

TFieldText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextInput

TFieldText


TFieldTextArea
 VCL Reference

TFieldTextArea

Hierarchy	Properties	Methods	See also

TFieldTextArea creates a multi-line HTML input control to represent a field in an XML data packet.

Unit

MidItems

Description

Add TFieldTextArea as the child of a TFieldGroup component to add a multi-line edit control that represents a field from the field group’s associated dataset.

Use the properties and methods of TFieldTextArea to

Specify the field whose value the control displays.

Specify a caption that describes the field.

Customize the appearance of the control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TFieldTextArea properties

TFieldTextArea	Alphabetically	Legend

Derived from TWebTextAreaInput

DisplayRows

DisplayWidth

ReadOnly

Wrap

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFieldTextArea properties

TFieldTextArea	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayRows

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject

Wrap


 VCL Reference

TFieldTextArea methods

TFieldTextArea	Alphabetically	Legend

Derived from TWebTextAreaInput

Create

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFieldTextArea methods

TFieldTextArea	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextAreaInput

TFieldTextArea


TGridAttributes
 VCL Reference

TGridAttributes

Hierarchy	Properties	Methods	See also

TGridAttributes describes the options the TDataGrid component adds to an HTML <TABLE> tag.

Unit

MidItems

Description

TGridAttributes implements the TableAttributes property of a TDataGrid component. It describes display attributes that apply to an HTML table generated by TDataGrid. The properties of TGridAttributes specify the options added to the generated HTML <TABLE> tag, as well as any styles that should be applied.


 VCL Reference

TGridAttributes properties

TGridAttributes	Alphabetically	Legend

In TGridAttributes

Align

BgColor

Border

CellPadding

CellSpacing

Custom

Parent

Style

StyleRule


 VCL Reference

TGridAttributes properties

TGridAttributes	By object	Legend

Align

BgColor

Border

CellPadding

CellSpacing 	Custom

Parent

Style

StyleRule


TGridAttributes.Align
 VCL Reference

TGridAttributes.Align

TGridAttributes 	See also

Specifies the alignment of the table within the HTML document.

property Align: THTMLAlign;

Description

Set Align to indicate the desired alignment of the table within the HTML document, or within the cell of a surrounding HTML table in a layout group.  Align indicates the desired value of the Align option of the HTML table tag.

The default value of Align is haDefault, which means the web browser that reads the HTML document positions the HTML table where it wants.


TGridAttributes.BgColor
 VCL Reference

TGridAttributes.BgColor

TGridAttributes	See also

Specifies the background color of the HTML table.

property BgColor: THTMLBgColor;

Description

Use BgColor to indicate the desired background color of the HTML table. The value of BgColor is the name of color. This can be one of the following strings:

Aqua	Black	Blue
Fuschia	Gray	Green
Lime	Maroon	Navy
Olive	Purple	Red
Silver	Teal	White
Yellow
Note:	The row or heading attributes can override this background color for a portion of the HTML table.


TGridAttributes.Border
 VCL Reference

TGridAttributes.Border

TGridAttributes	See also

Specifies the thickness of the border drawn around the HTML table.

property Border: Integer;

Description

Set Border to specify whether a border should be drawn around the table, and if so, how thick it should be. The thickness specified by any particular value of border depends on the web browser that views the HTML table. For any browser, however, larger numbers indicate thicker borders. A value of -1 indicates that no border should be drawn around the table.


TGridAttributes.CellPadding
 VCL Reference

TGridAttributes.CellPadding

TGridAttributes	See also

Specifies the amount of space to leave around the contents of each cell in the HTML table.

property CellPadding: Integer;

Description

Set CellPadding to specify how many pixels of whitespace should appear between a cell’s contents and the edges of the cell. A value of -1 indicates that the web browser should decide how to pad the cells of the HTML table.


TGridAttributes.CellSpacing
 VCL Reference

TGridAttributes.CellSpacing

TGridAttributes	See also

Specifies the amount of space to leave between cells in the HTML table.

property CellSpacing: Integer;

Description

Set CellSpacing to specify how many pixels of whitespace should appear between the cells in the table. A value of -1 indicates that the web browser should decide how to separate the cells of the HTML table.

Note:	CellSpacing refers to the whitespace between cells in an HTML table, not the thickness of the lines drawn to separate rows and columns.


TGridAttributes.Custom
 VCL Reference

TGridAttributes.Custom

TGridAttributes	See also

Represents a tag option and its value in an HTML tag.

property Custom: string;

Description

Use Custom to represent one or more options to be added to the HTML <TABLE> tag. Each option and its value should have the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to hide the side borders and add row dividers, you can set Custom to

FRAME=HSIDES RULES=ROWS


TGridAttributes.Parent
 VCL Reference

TGridAttributes.Parent

TGridAttributes	See also

Indicates the TDataGrid object that uses this TGridAttributes to describe its attributes.

property Parent: TComponent;

Description

Read Parent to access the TDataGrid that uses this TGridAttributes object. The value of Parent is assigned by the constructor.


TGridAttributes.Style
 VCL Reference

TGridAttributes.Style

TGridAttributes	See also

Adds style attributes to the generated table.

property Style: string;

Description

Use Style to specify display characteristics that affect the entire table. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the <TABLE> tag as the value of a STYLE option.


TGridAttributes.StyleRule
 VCL Reference

TGridAttributes.StyleRule

TGridAttributes	See also

Applies a style in the page producer’s style sheet to the generated table.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated table. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

To apply a style definition that is not included in the style sheet, use the Style property instead.


 VCL Reference

TGridAttributes methods

TGridAttributes	Alphabetically	Legend

In TGridAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TGridAttributes methods

TGridAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TGridAttributes.Create
 VCL Reference

TGridAttributes.Create

TGridAttributes	See also

Creates an instance of TGridAttributes.

constructor Create(AParent: TComponent);

Description

Most applications have no need to instantiate TGridAttributes. TGridAttributes is instantiated by the TDataGrid component that uses it.

The AParent parameter is the TDataGrid component that uses the TGridAttributes instance. This parameter becomes the value of the Parent property.


Hierarchy

TObject

TPersistent

TGridAttributes


TGridRowAttributes
 VCL Reference

TGridRowAttributes

Hierarchy	Properties	Methods	See also

TGridRowAttributes describes the options the TDataGrid component adds to its HTML row tags (<TR>).

Unit

MidItems

Description

TGridRowAttributes implements the RowAttributes and HeadingAttributes properties of a TDataGrid component. It describes display attributes that apply to the generated HTML table’s rows. The properties of TGridRowAttributes specify the options added to the generated HTML <TR> tag, as well as any styles that should be applied to the header or body of the table.


 VCL Reference

TGridRowAttributes properties

TGridRowAttributes	Alphabetically	Legend

In TGridRowAttributes

Align

BgColor

Custom

Parent

Style

StyleRule

VAlign


 VCL Reference

TGridRowAttributes properties

TGridRowAttributes	By object	Legend

Align

BgColor

Custom

Parent

Style

StyleRule

VAlign


TGridRowAttributes.Align
 VCL Reference

TGridRowAttributes.Align

TGridRowAttributes 	See also

Specifies the alignment of the table within the HTML document.

property Align: THTMLAlign;

Description

Set Align to indicate the desired alignment of the contents of each cell in the table row or header.  Align indicates the desired value of the Align option of the <TR> tag.

The default value of Align is haDefault, which means the web browser that reads the HTML document positions the cell contents wherever it wants horizontally.


TGridRowAttributes.BgColor
 VCL Reference

TGridRowAttributes.BgColor

TGridRowAttributes	See also

Specifies the background color of the rows or header of an HTML table.

property BgColor: THTMLBgColor;

Description

Use BgColor to indicate the desired background color of the rows or heading of an HTML table. The value of BgColor is the name of color. This can be one of the following strings:

Aqua	Black	Blue
Fuschia	Gray	Green
Lime	Maroon	Navy
Olive	Purple	Red
Silver	Teal	White
Yellow
Note:	This property overrides the background color option of the HTML table itself.


TGridRowAttributes.Custom
 VCL Reference

TGridRowAttributes.Custom

TGridRowAttributes	See also

Represents a tag option and its value in an HTML tag.

property Custom: string;

Description

Use Custom to represent one or more options to be added to the HTML <TR> tag. Each option and its value should have the form

OPTIONNAME=Value

To specify multiple options, separate the Name/value pairs with spaces.


TGridRowAttributes.Parent
 VCL Reference

TGridRowAttributes.Parent

TGridRowAttributes	See also

Indicates the TDataGrid object that uses this TGridRowAttributes to describe its header or row attributes.

property Parent: TComponent;

Description

Read Parent to access the TDataGrid that uses this TGridRowAttributes object. The value of Parent is assigned by the constructor.


TGridRowAttributes.Style
 VCL Reference

TGridRowAttributes.Style

TGridRowAttributes	See also

Adds style attributes to the generated table body or header.

property Style: string;

Description

Use Style to specify display characteristics that affect the rows or header of the HTML table. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the <TR> tag as the value of a STYLE option.


TGridRowAttributes.StyleRule
 VCL Reference

TGridRowAttributes.StyleRule

TGridRowAttributes	See also

Applies a style in the page producer’s style sheet to the generated table body or header.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated table body or header. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

To apply a style definition that is not included in the style sheet, use the Style property instead.


TGridRowAttributes.VAlign
 VCL Reference

TGridRowAttributes.VAlign

TGridRowAttributes	See also

Specifies the vertical alignment within the cells of the HTML table body or header.

property VAlign: THTMLVAlign;

Description

Set VAlign to indicate the desired vertical alignment of the contents of each cell. VAlign indicates the desired value of the VAlign option of the <TR> tag for the table rows or header.

The default value of VAlign is haVDefault, which means the web browser that reads the HTML document positions the contents of cells in the table element wherever it wishes vertically.


 VCL Reference

TGridRowAttributes methods

TGridRowAttributes	Alphabetically	Legend

In TGridRowAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TGridRowAttributes methods

TGridRowAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TGridRowAttributes.Create
 VCL Reference

TGridRowAttributes.Create

TGridRowAttributes	See also

Creates an instance of TGridRowAttributes.

constructor Create(AParent: TComponent);

Description

Most applications have no need to instantiate TGridRowAttributes. TGridRowAttributes is instantiated by the TDataGrid component that uses it.

The AParent parameter is the TDataGrid component that uses the TGridRowAttributes instance. This parameter becomes the value of the Parent property.


Hierarchy

TObject

TPersistent

TGridRowAttributes


THTTPRIO
 VCL Reference

 THTTPRIO

Hierarchy	Properties	Methods	Using THTTPRIO	See also

THTTPRIO uses HTTP messages to call remote interfaced objects using SOAP.

Unit

SoapHTTPClient

Description

Use THTTPRIO to generate statically-linked calls to invokable interfaces on a remote Web Service application. When an application casts THTTPRIO to a registered invokable interface, it dynamically generates an in-memory method table, providing an implementation to that invokable interface. THTTPRIO executes the methods in this method table by encoding the method call as a SOAP request and sending an HTTP request message to the Web Service application. It unpacks the resulting HTTP response message to obtain the return value and any output parameters, or to raise an exception if the request generated an exception on the server.

Use the published properties of THTTPRIO to indicate how connect to the Web Service application. If the Web Service application was written using Delphi, you need only specify the URL property to indicate where the server application is located. Otherwise, THTTPRIO can get this information from a WSDL document. Set the WSDLLocation property to the location of the WSDL document. Once you have set WSDLLocation, you can select values for the Service and Port properties from drop-down lists in the object inspector, to fully specify the binding you want to use. If you need to use a proxy server, or if the server requires authentication, use the properties of the THTTPReqResp object that is the value of the HTTPWebNode property to provide the necessary information.

Before THTTPRIO can generate a method table for an invokable interface, the interface must be registered with the invocation registry. To register an invokable interface, use the global InvRegistry function to access the registry, and use its RegisterInterface method.


 VCL Reference

THTTPRIO properties

THTTPRIO	Alphabetically	Legend

In THTTPRIO

Converter

HTTPWebNode

Port

Service

URL

WSDLItems

WSDLLocation

Derived from TRIO

RefCount

WebNode

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPRIO properties

THTTPRIO	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Converter

DesignInfo

HTTPWebNode

Name

Owner

Port

RefCount

Service

Tag

URL

VCLComObject

WebNode

WSDLItems

WSDLLocation


THTTPRIO.Converter
 VCL Reference

THTTPRIO.Converter

THTTPRIO	See also

Handles the marshaling and unmarshaling of calls to an invokable interface.

property Converter: TOPToSoapDomConvert;

Description

THTTPRIO uses Converter internally to marshal and unmarshal calls to an invokable interface. That is, when the THTTPRIO object has been typecast to an invokable interface, it implements each method call by using Converter to marshal the call from an internal format into an encoding protocol, and to unmarshal any return values after that call is executed.


THTTPRIO.HTTPWebNode
 VCL Reference

THTTPRIO.HTTPWebNode

THTTPRIO	See also

Handles the execution of method calls on the invokable interface.

property HTTPWebNode: THTTPReqResp;

Description

THTTPRIO uses HTTPWebNode internally to execute method calls. It is the implementation of the WebNode property.

THTTPRio executes a method call by sending a SOAP request as an HTTP message to the Web Service identified by either the URL property or the WSDLLocation, Service, and Port properties. If you need to use a proxy server to access the Web Service application, or if the server requires authentication, use the properties of the THTTPReqResp object to provide the necessary information.


THTTPRIO.Port
 VCL Reference

THTTPRIO.Port

THTTPRIO	See also

Specifies the port to use when sending the SOAP message to execute a method call.

property Port: string;

Description

Set Port to indicate the desired port within the service specified by the Service property. Port is the name of a port defined in the WSDL document specified by the WSDLLocation property. Once you have set the WSDLLocation property, you can select a value for Port from a drop-down list in the Object Inspector.

A port defines a binding (which indicates the interface to call and the encoding and transport protocols to use) and the address of the server machine.


THTTPRIO.Service
 VCL Reference

THTTPRIO.Service

THTTPRIO	See also

Specifies the Service to use when sending the SOAP message to execute a method call.

property Service: string;

Description

Set Service to indicate the Service that you want to use by making a remote method call. Service is the name of a Service defined in the WSDL document specified by the WSDLLocation property. Once you have set the WSDLLocation property, you can select a value for Service from a drop-down list in the Object Inspector.

A Service is a set of related interfaces provided by a Web Service application. The interface that THTTPRIO represents must be on one of the interfaces that make up the specified service.

Note:	When defining the target Web Service application by referring to a WSDL document, you must set the Port property as well as the Service and WSDLLocation properties.


THTTPRIO.URL
 VCL Reference

THTTPRIO.URL

THTTPRIO	See also

Specifies the URL that identifies the target Web Service application.

property URL: string;

Description

Use URL to identify the target application that implements the invokable interface when the Web Service application was written using Delphi. The path portion of this URL must match the target path name of the THTTPSoapDispatcher component on the Web Service application. The protocol portion must specify http or https.

When the target application is written using Delphi, THTTPRIO obtains a namespace for the target interface from the invocation registry. It is necessary, therefore, that the target interface be registered with the same namespace in both client and server applications. This happens automatically if you

Use the same unit to declare and register the target interface in both client and server applications.

Use the same value for the AppNamespacePrefix global variable.

Use the automatically-generated namespace.

Note:	If the Web Service application you are calling was not written using Delphi, you must use the WSDLLocation, Service, and Port properties instead. Using the URL property is mutually exclusive with the use of WSDLLocation, Service and Port.


THTTPRIO.WSDLItems
 VCL Reference

THTTPRIO.WSDLItems

THTTPRIO	See also

Provides access to the definitions in the WSDL file specified by WSDLLocation.

property WSDLItems: TWSDLItems;

Description

WSDLItems is a helper object whose methods return the definitions included in the WSDL file specified by WSDLLocation. Applications should not need to use this object. Rather, THTTPRio uses this property to obtain information about how to connect to the Web Service application and how to encode request messages.


THTTPRIO.WSDLLocation
 VCL Reference

THTTPRIO.WSDLLocation

THTTPRIO	See also

Specifies the location of the WSDL document that describes the target Web Service.

property WSDLLocation: string;

Description

Use WSDLLocation to specify a WSDL document that defines the target interface (port type). WSDLLocation can be either a fully qualified path name, or a URL that indicates where the WSDL document can be found.

When using a WSDL document to indicate the target Web Service, you must also specify values for the Service and Port properties. Once WSDLLocation is set, you can use a drop-down list in the Object Inspector to select values for Port and Service.

Note:	If the Web Service application you are calling was written using Delphi, you can use the URL property instead. Using the WSDLLocation property is mutually exclusive with the use of the URL property.


 VCL Reference

THTTPRIO methods

THTTPRIO	Alphabetically	Legend

In THTTPRIO

Create

Destroy

QueryInterface

Derived from TRIO

_AddRef

_Release

AfterConstruction

BeforeDestruction

NewInstance

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

THTTPRIO methods

THTTPRIO	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

QueryInterface

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


THTTPRIO.Create
 VCL Reference

THTTPRIO.Create

THTTPRIO	See also

Creates an instance of THTTPRIO.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a THTTPRIO object at runtime. THTTPRIO components added to forms or data modules at design time are created automatically.

The AOwner parameter specifies another component (usually a form or data module) that is responsible for freeing the THTTPRIO instance. It becomes the value of the Owner property. If the THTTPRIO instance is created with AOwner set to nil, then it is automatically freed when its reference count drops to zero.


THTTPRIO.Destroy
 VCL Reference

THTTPRIO.Destroy

THTTPRIO	See also

Destroys the instance of a THTTPRIO object.

destructor Destroy; override;

Description

There is no need to explicitly free a THTTPRIO instance.

If the THTTPRIO object is created with an Owner, then that Owner handles the freeing of the THTTPRIO instance. If the THTTPRIO object is created without an Owner, then it is automatically freed when the reference count on its interface drops to zero.


THTTPRIO.QueryInterface
 VCL Reference

THTTPRIO.QueryInterface

THTTPRIO	See also

Implements the IInterface QueryInterface method.

function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;

Description

QueryInterface is called through the IInterface interface to obtain an interface pointer for the interface identified by the IID parameter. This call is generated when an application casts THTTPRIO to an invokable interface using the as operator.

THTTPRIO can only return a single type of interface pointer. The first time an application calls QueryInterface, THTTPRIO generates an in-memory method table to support calls to the methods on the requested interface.

IID specifies the invokable interface that the application wants to call using this THTTPRIO instance. If the THTTPRIO object has already been typecast to an interface, then IID must identify that interface. If the THTTPRIO instance has not yet been typecast to an interface, then IID must be a registered invokable interface.

Obj returns an interface pointer for the specified interface, unless THTTPRIO was already implementing a different interface or IID identified an interface that was not registered.

QueryInterface returns 0 (S_OK) if Obj successfully returns an interface pointer. It returns E_NOINTERFACE otherwise.

If QueryInterface successfully returns an interface pointer, it automatically increments the reference count.


Hierarchy

TObject

TPersistent

TComponent

TRIO

THTTPRIO


THTTPReqResp
 VCL Reference

THTTPReqResp

Hierarchy	Properties	Methods	See also

THTTPReqResp executes a method call on an invokable interface by sending a SOAP message to the server.

Unit

SoapHTTPTrans

Description

THTTPReqResp is an implementation of the IWebNode interface that handles the execution of method calls to an invokable interface. It uses WinInet to send an HTTP message that contains the method call, which has been encoded using SOAP. Therefore, Wininet.dll must be installed on the client system. Wininet.dll is found in the Windows system directory if you have IE3 or higher installed.

The Web Service that is the target of the HTTP message can be specified directly, using the SoapAction and URL properties, or it can be taken from the a SoapAction in a WSDL document, as specified by the WSDLView property. Additional properties provide details that are included in the HTTP request message header.

The THTTPRio component on client applications uses THTTPReqResp internally to pass method calls to the server for execution and to retrieve the results.


 VCL Reference

THTTPReqResp properties

THTTPReqResp	Alphabetically	Legend

In THTTPReqResp

Agent

Password

Proxy

ProxyByPass

SoapAction

URL

UserName

WSDLView

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPReqResp properties

THTTPReqResp	By object	Legend

Agent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Password

Proxy

ProxyByPass

SoapAction

Tag

URL

UserName

VCLComObject

WSDLView


THTTPReqResp.Agent
 VCL Reference

THTTPReqResp.Agent

THTTPReqResp	See also

Provides the value of the User-Agent header for HTTP messages to the Web Service provider.

property Agent: string;

Description

Use Agent to supply the SOAP request message with the name of your application. This name is included as a User-Agent header. The User-Agent header is an optional string that describes the application generating the request.


THTTPReqResp.Password
 VCL Reference

THTTPReqResp.Password

THTTPReqResp	See also

Specifies the password that allows the client application to log on when the Web Service provider requires authentication.

property Password: string;

Description

When THTTPReqResp establishes a connection, it supplies the values of the UserName and Password properties so that it can log on to the host or proxy. The value of Password can be an empty string if neither the host nor proxy requires authentication.


THTTPReqResp.Proxy
 VCL Reference

THTTPReqResp.Proxy

THTTPReqResp	See also

Lists any proxy servers that are required to make the connection.

property Proxy: string;

Description

Use Proxy if the client application can’t resolve the value of host portion of URL locally. If the server is registered locally, Proxy can be a null string. Otherwise, Proxy lists the host names of any proxy servers that can forward request messages on to the intended server machine.


THTTPReqResp.ProxyByPass
 VCL Reference

THTTPReqResp.ProxyByPass

THTTPReqResp	See also

Lists the host names of locally registered servers that do not require a proxy.

property ProxyByPass: string;

Description

Use ProxyByPass to indicate any server systems to which the client application can make a direct connection. When the URL property addresses a server in this list, THTTPReqResp makes a direct connection even if the Proxy property is specified.

When ProxyByPass is an empty string, THTTPReqResp checks the registry for any locally known servers and bypasses the proxy server if URL refers to a registered local server.


THTTPReqResp.SoapAction
 VCL Reference

THTTPReqResp.SoapAction

THTTPReqResp	See also

Specifies the SoapAction header to include in the HTTP message that executes the method call.

property SoapAction: string;

Description

SoapAction specifies the SoapAction header that appears in the HTTP message that is sent by the Send method. If the Web Service application is written in Delphi, this header contains the namespace with which the interface is registered. Otherwise, the value of this header is deduced from information in a WSDL document, as indicated by the WSDLView property.


THTTPReqResp.URL
 VCL Reference

THTTPReqResp.URL

THTTPReqResp	See also

Specifies the URL that identifies the target interface on the target Web Service application.

property URL: string;

Description

URL specifies the URL to which the Send method sends the message containing the SOAP request.  When the Web Service application was written using Delphi, the path portion of this URL must match the target path name of the THTTPSoapDispatcher component on the Web Service application and the protocol portion must specify http or https. Otherwise, the value of URL is deduced from information in a WSDL document, as indicated by the WSDLView property.


THTTPReqResp.UserName
 VCL Reference

THTTPReqResp.UserName

THTTPReqResp	See also

Specifies the user name that allows the client application to log on to the application server.

property UserName: string;

Description

When THTTPReqResp establishes a connection, it supplies the values of the UserName and Password properties so that it can log on to the host or proxy. The value of Password can be an empty string if neither the host nor proxy requires authentication.


THTTPReqResp.WSDLView
 VCL Reference

THTTPReqResp.WSDLView

THTTPReqResp	See also

Indicates the target interface method using a WSDL document.

property WSDLView: TWSDLView;

Description

WSDLView is a helper object that represents the WSDL file used to define the interfaces and protocols in the target Web Service application, as well as properties that indicate which is the target method call. It is used to generate the URL and SoapAction properties when the target Web Service application is not written using Delphi.


 VCL Reference

THTTPReqResp methods

THTTPReqResp	Alphabetically	Legend

In THTTPReqResp

AfterConstruction

Check

Connect

Create

Execute

NewInstance

Receive

Send

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

THTTPReqResp methods

THTTPReqResp	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Check

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Connect

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Receive

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Send

SetSubComponent

UpdateAction


THTTPReqResp.Create
 VCL Reference

THTTPReqResp.Create

THTTPReqResp	See also

Creates a new THTTPReqResp object.

constructor Create(Owner: TComponent); override;

Description

Most applications do not create instances of THTTPReqResp. It is created and used by the THTTPRio class.

The Owner parameter specifies the component that is responsible for freeing the THTTPReqResp instance.


THTTPReqResp.AfterConstruction
 VCL Reference

THTTPReqResp.AfterConstruction

THTTPReqResp	See also

Responds after the last constructor executes.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.

When an instance of THTTPReqResp is allocated, its reference count is incremented to prevent its destruction while processing the constructor. AfterConstruction decrements that reference count to re-establish the correct count after all constructors have executed.


THTTPReqResp.Check
 VCL Reference

THTTPReqResp.Check

THTTPReqResp	See also

Raises an exception when an error is detected.

procedure Check(Error: Boolean);

Description

THTTPReqResp calls Check internally to raise an exception when it encounters an error.

Error indicates whether an error condition was detected.


THTTPReqResp.Connect
 VCL Reference

THTTPReqResp.Connect

THTTPReqResp	See also

Establishes or terminates a connection to the Web Service application.

procedure Connect(Value: Boolean);

Description

Call Connect to open or close a connection to the Web Service application identified by the URL property. Connect opens a connection using WinInet.

Value indicates whether to open or close the connection. When Value is True, Connect establishes a connection. When Value is False, Connect terminates the connection.


THTTPReqResp.Execute
 VCL Reference

THTTPReqResp.Execute

THTTPReqResp	See also

Executes a SOAP method call and returns the encoded results.

procedure Execute(const DataMsg: WideString, Resp: TStream);

Description

Execute implements the IWebNode method of the same name. THTTPRio uses this method to execute a method on an invokable interface that has been encoded as a SOAP method call.

Execute

1. Connects to the Web Service application identified by the URL property.

2. Creates an HTTP message with DataMsg as its content and SoapAction as its SoapAction header.

3. Sends it to the Web Service application using the Send message.

4. Retrieves the results using the Receive method.

5. Writes those results to the stream specified by Resp.


THTTPReqResp.NewInstance
 VCL Reference

THTTPReqResp.NewInstance

THTTPReqResp	See also

Allocates memory for each instance of THTTPReqResp.

class function NewInstance: TObject; override;

Description

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory to allocate from the heap to contain a particular instance. Do not call NewInstance directly.

THTTPReqResp overrides NewInstance to increment the reference count when a new instance is created. This prevents any constructor from accidentally deleting the instance due to a reference count of zero. The AfterConstruction method decrements the reference count after all constructors have executed.


THTTPReqResp.Receive
 VCL Reference

THTTPReqResp.Receive

THTTPReqResp	See also

Receives the contents of an HTTP response to the message sent by the Send message.

procedure Receive(Context: Integer; Resp: TStream): string;

Description

Receive fetches the HTTP response to the message sent by the SendMessage, and writes its contents to the specified stream.

Context is the context ID that identifies the original request message that the Send message sent. It is the return value from a previous call to the Send method.

Resp is a stream to which Receive can write the contents of the response message.


THTTPReqResp.Send
 VCL Reference

THTTPReqResp.Send

THTTPReqResp	See also

Sends the encoded method call as an HTTP-based SOAP message.

function Send(const S: WideString): Integer;

Description

Send sends an HTTP request message with the SoapAction header specified by SoapAction to the URL specified by URL.

S is the contents of a SOAP message for the method call.

Send returns a context ID that identifies this request message. This context ID is passed to the Receive method to retrieve the corresponding response message from the server.


Hierarchy

TObject

TPersistent

TComponent

THTTPReqResp


THTTPSoapDispatcher
 VCL Reference

 THTTPSoapDispatcher

Hierarchy	Properties	Methods	Using THTTPSoapDispatcher	See also

THTTPSoapDispatcher responds to SOAP messages by forwarding them to an invoker for interpretation.

Unit

WebBrokerSoap

Description

Use THTTPSoapDispatcher in an application that publishes a Web Service using SOAP. THTTPSoapDispatcher responds to all SOAP-based calls made to the invokable interfaces that are registered in the application. These interfaces are registered by calling the RegisterInterface method of the invocation registry (InvRegistry).

THTTPSoapDispatcher only acts as a dispatcher, receiving incoming messages and forwarding them on to another component that handles the task of interpreting and executing them. The component that interprets and executes SOAP message is identified by the Dispatcher property. Dispatcher is the interface of an invoker component, which interprets the SOAP message, identifies the invokable interface that is the target of the call, executes the call, and assembles the content of the response message.

THTTPSoapDispatcher automatically registers itself with the Web module (or Web dispatcher) as an auto-dispatching object. This means that the Web module or Web dispatcher forwards all incoming HTTP messages directed to the SOAP dispatcher without requiring the use of Web action items.


 VCL Reference

THTTPSoapDispatcher properties

THTTPSoapDispatcher	Alphabetically	Legend

In THTTPSoapDispatcher

WebDispatch

Derived from THTTPSoapDispatchNode

Dispatcher

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPSoapDispatcher properties

THTTPSoapDispatcher	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

Name

Owner

Tag

VCLComObject

WebDispatch


THTTPSoapDispatcher.WebDispatch
 VCL Reference

THTTPSoapDispatcher.WebDispatch

THTTPSoapDispatcher	See also

Lets the Web dispatcher identify what HTTP messages should be forwarded to the HTTP SOAP dispatcher.

property WebDispatch: TWebDispatch;

Description

Use WebDispatch to specify the SOAP messages to which this component responds.

The TWebDispatch object that implements WebDispatch includes properties that let you specify the path portion of URLs to which the Web Service application responds, as well as the values allowed in the types of messages it accepts. By default, WebDispatch enables the HTTP SOAP dispatcher to respond to any URL whose path portion begins with the string “soap”.

Note:	You can’t use WebDispatch to disable the THTTPSoapDispatcher object. Setting its Enabled property to False does nothing.


 VCL Reference

THTTPSoapDispatcher methods

THTTPSoapDispatcher	Alphabetically	Legend

In THTTPSoapDispatcher

Create

Destroy

DispatchEnabled

DispatchMask

DispatchMethodType

DispatchRequest

Derived from THTTPSoapDispatchNode

DispatchSOAP

Notification

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THTTPSoapDispatcher methods

THTTPSoapDispatcher	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchEnabled

DispatchMask

DispatchMethodType

DispatchRequest

DispatchSOAP

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


THTTPSoapDispatcher.Create
 VCL Reference

THTTPSoapDispatcher.Create

THTTPSoapDispatcher	See also

Creates a new THTTPSoapDispatcher object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the THTTPSoapDispatcher constructor. Typically the HTTP SOAP dispatcher is added to a Web module at design time, so that the constructor is called automatically.

 The Owner parameter specifies the component (usually the Web module) that is responsible for freeing the THTTPSoapDispatcher instance.


THTTPSoapDispatcher.Destroy
 VCL Reference

THTTPSoapDispatcher.Destroy

THTTPSoapDispatcher	See also

Frees the memory associated with the THTTPSoapDispatcher object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead,call Free, which verifies that the THTTPSoapDispatcher reference is not nil before calling Destroy.


THTTPSoapDispatcher.DispatchEnabled
 VCL Reference

THTTPSoapDispatcher.DispatchEnabled

THTTPSoapDispatcher	See also

Indicates whether the HTTP SOAP dispatcher is enabled to respond to incoming SOAP messages.

function DispatchEnabled: Boolean;

Description

The DispatchEnabled method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to determine whether it can receive incoming messages. In THTTPSoapDispatcher, DispatchEnabled always returns True, because the HTTP SOAP dispatcher can’t be disabled.


THTTPSoapDispatcher.DispatchMask
 VCL Reference

THTTPSoapDispatcher.DispatchMask

THTTPSoapDispatcher	See also

Returns a mask that matches the path portion of any URL to which this object responds.

function DispatchMask: TMask;

Description

The DispatchMask method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to identify the HTTP messages it should forward to the this component. It returns the Mask property of the TWebDispatch object specified by the WebDispatch property.


THTTPSoapDispatcher.DispatchMethodType
 VCL Reference

THTTPSoapDispatcher.DispatchMethodType

THTTPSoapDispatcher	See also

Returns the method type of all HTTP messages to which this component responds.

function DispatchMethodType: TMethodType;

Description

The DispatchMethodType method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to identify the HTTP messages it should forward to the this component. It returns the MethodType property of the TWebDispatch object specified by the WebDispatch property.


THTTPSoapDispatcher.DispatchRequest
 VCL Reference

THTTPSoapDispatcher.DispatchRequest

THTTPSoapDispatcher	See also

Responds to an incoming message and generates the appropriate response message.

function DispatchRequest(Sender: TObject; Request: TWebRequest; Response: TWebResponse): Boolean;

Description

The Web Module (or Web Dispatcher) calls DispatchRequest when it identifies an HTTP message that matches the properties of the WebDispatch property. DispatchRequest passes the request on to the component whose interface is the value of the Dispatcher property. That object interprets the request message, calls the appropriate invokable interface, and returns the content of the response message.

Sender is not used in the DispatchRequest method.

Request contains information about the incoming SOAP message.

Response is a TWebResponse object that is filled out to indicate the response that should be returned to the Web client.

DispatchRequest returns True if it successfully passes the request on to an invoker and that invoker handles the request and fills out the Response parameter. It returns False if it could not handle the request.


Hierarchy

TObject

TPersistent

TComponent

THTTPSoapDispatchNode

THTTPSoapDispatcher


THTTPSoapPascalInvoker
 VCL Reference

 THTTPSoapPascalInvoker

Hierarchy	Properties	Methods	Using THTTPSoapPascalInvoker	See also

THTTPSoapPascalInvoker interprets a SOAP request message and executes the corresponding invokable interface.

Unit

SoapHTTPPasInv

Description

Use THTTPSoapPascalInvoker in an application that publishes a Web Service using SOAP. THTTPSoapPascalInvoker receives an incoming SOAP request from a THTTPSoapDispatcher component, parses it and generates the appropriate call to a registered invokable interface, and encodes the results of that interface call.

THTTPSoapPascalInvoker implements the IHTTPSoapDispatch interface, which the dispatcher uses to pass it incoming SOAP requests and to receive the content of the response message. To enable the dispatcher to use this interface, assign it as the value of the THTTPSoapDispatcher component’s Dispatcher property.

THTTPSoapPascalInvoker uses the invocation registry (InvRegistry) to determine whether the interface call encoded in the incoming SOAP request matches a method on a registered invokable interface. Thus, before the invoker can handle a call, the target interface must be registered using the RegisterInterface method of the invocation registry. In addition, the implementation class for that interface must be registered with the invocation registry.


 VCL Reference

THTTPSoapPascalInvoker properties

THTTPSoapPascalInvoker	Alphabetically	Legend

Derived from TSoapPascalInvoker

Converter

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPSoapPascalInvoker properties

THTTPSoapPascalInvoker	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Converter

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

THTTPSoapPascalInvoker methods

THTTPSoapPascalInvoker	Alphabetically	Legend

In THTTPSoapPascalInvoker

DispatchSOAP

Derived from TSoapPascalInvoker

Create

Invoke

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THTTPSoapPascalInvoker methods

THTTPSoapPascalInvoker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchSOAP

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

Invoke

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


THTTPSoapPascalInvoker.DispatchSOAP
 VCL Reference

THTTPSoapPascalInvoker.DispatchSOAP

THTTPSoapPascalInvoker	See also

Interprets an incoming SOAP message, calls the target interface, and encodes any return values.

procedure DispatchSOAP(const Path, SoapAction: WideString; const Request: TStream; Response: TStream);

Description

The SOAP dispatcher component (THTTPSoapDispatcher) calls DispatchSOAP when it receives an incoming SOAP message. DispatchSOAP interprets the message, looks up the target interface in the invocation registry, and calls the Invoke method to execute the call and encode any return values as a SOAP string.

Path is the path portion of the URL to which the incoming request message was addressed.

SoapAction is the content of the SOAP Action header of the incoming HTTP request message.

Request is a stream from which DispatchSOAP can read the content of the incoming request message. It contains the SOAP encoding of an interface call.

Response is a stream to which DispatchSOAP writes the SOAP encoding of any return values. THTTPSoapPascalInvoker uses this as the content for the outgoing response message.


Hierarchy

TObject

TPersistent

TComponent

TSoapPascalInvoker

THTTPSoapPascalInvoker


IDataBlock
 VCL Reference

IDataBlock

Hierarchy	Properties	Methods	See also

IDataBlock is the interface used by data block interpreters to access memory buffers.

Unit

SConnect

Description

Data block interpreters uses IDataBlock when marshaling COM interface calls. Streamed connection components send data obtained from IDataBlock to an application server once the data block interpreter has filled its memory by marshaling interface calls. They also read data from the application server into IDataBlock and pass it to a data block interpreter for marshaling.

IDataBlock is an interface, and as such can’t be directly instantiated. Instead, objects that implement the IDataBlock properties and methods include IDataBlock in their class definition. Such objects can be cast to an IDataBlock so that they can be used by data block interpreters.


 VCL Reference

IDataBlock properties

IDataBlock	Alphabetically	Legend

In IDataBlock

BytesReserved

Memory

Signature

Size

Stream


 VCL Reference

IDataBlock properties

IDataBlock	By object	Legend

BytesReserved

Memory

Signature

Size

Stream


IDataBlock.BytesReserved
 VCL Reference

IDataBlock.BytesReserved

IDataBlock	See also

Indicates the number of bytes from Memory that are reserved for internal use.

property BytesReserved: Integer;

Description

BytesReserved indicates how many bytes of Memory can’t be used for reading and writing. When interpreting the value of the Size property, use BytesReserved to determine how much buffer space is available for reading and writing data.


IDataBlock.Memory
 VCL Reference

IDataBlock.Memory

IDataBlock	See also

Points to a buffer from which data is read or to which data is written.

property Memory: Pointer;

Description

Memory provides access to the buffer that contains data that is read or written. Memory includes a reserved area (of size BytesReserved) for internal information such as the value of Signature,

Note:	When implementing the Receive and Send methods of the ITransport interface, component writers should read directly from and write directly to Memory, rather than using the Read and Write methods. Otherwise, the information in the reserved area will not be sent to or from the application server.


IDataBlock.Signature
 VCL Reference

IDataBlock.Signature

IDataBlock	See also

Indicates the contents of the data block.

property Signature: Integer;

Description

Write Signature values to indicate what type of data is written to the data block. Read Signature to determine what type of data can be read from the data block.

The value of signature is stored somewhere in the first BytesReserved bytes of Memory.


IDataBlock.Size
 VCL Reference

IDataBlock.Size

IDataBlock	See also

Indicates the size of the data in the memory buffer.

property Size: Integer;

Description

Size is the number of bytes available in Memory, excluding the reserved bytes. Set Size to ensure that Memory is large enough to contain the data that the data block will read or write.


IDataBlock.Stream
 VCL Reference

IDataBlock.Stream

IDataBlock	See also

Provides access to an internal stream that contains the data block’s memory.

property Stream: TStream;

Description

Stream allows component writers more convenient access to the data block’s memory buffer. This memory buffer contains the data that is read or written.


 VCL Reference

IDataBlock methods

IDataBlock	Alphabetically	Legend

In IDataBlock

Clear

GetBytesReserved

GetMemory

GetSignature

GetSize

GetStream

IgnoreStream

InitData

Read

SetSignature

SetSize

Write

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDataBlock methods

IDataBlock	By object	Legend

_AddRef

_Release

Clear

GetBytesReserved

GetMemory

GetSignature

GetSize

GetStream

IgnoreStream

InitData

QueryInterface

Read

SetSignature

SetSize

Write


IDataBlock.Clear
 VCL Reference

IDataBlock.Clear

IDataBlock	See also

Removes all data from Memory except for the reserved bytes.

procedure Clear;

Description

Call Clear when finished reading from Memory or when the information written to Memory has been used. Clear reclaims the resources used to store information that is read from or written to the data block.


IDataBlock.GetBytesReserved
 VCL Reference

IDataBlock.GetBytesReserved

IDataBlock	See also

Returns the value of the BytesReserved property.

function GetBytesReserved: Integer;

Description

GetBytesReserved is the read implementer for the BytesReserved property.


IDataBlock.GetMemory
 VCL Reference

IDataBlock.GetMemory

IDataBlock	See also

Returns the value of the Memory property.

function GetMemory: Pointer;

Description

GetMemory is the read implementer for the Memory property.


IDataBlock.GetSignature
 VCL Reference

IDataBlock.GetSignature

IDataBlock	See also

Returns the value of the Signature property.

function GetSignature: Integer;

Description

GetSignature is the read implementer for the Signature property.


IDataBlock.GetSize
 VCL Reference

IDataBlock.GetSize

IDataBlock	See also

Returns the value of the Size property.

function GetSize: Integer;

Description

GetSize is the read implementer for the Size property.


IDataBlock.GetStream
 VCL Reference

IDataBlock.GetStream

IDataBlock	See also

Returns the value of the Stream property.

function GetStream: TStream; stdcall;

Description

GetStream is the read implementer for the Stream property.


IDataBlock.IgnoreStream
 VCL Reference

IDataBlock.IgnoreStream

IDataBlock	See also

Informs the data block when its stream is invalidated.

procedure IgnoreStream; stdcall;

Description

Call IgnoreStream after taking responsibility for freeing the component specified by Stream. After a call to IgnoreStream, the data block will not free the memory for its internal Stream component.


IDataBlock.InitData
 VCL Reference

IDataBlock.InitData

IDataBlock	See also

Adds data to the data block.

function InitData(Data: Pointer; DataLen: Integer; CheckLen: Boolean): Integer; stdcall;

Description

Data is the data to be added to the data block. It must include a valid signature or InitData raises an exception.

DataLen is the number of bytes referenced by Data.

CheckLen specifies whether InitData should verify that the signature indicates the same amount of data as is indicated by the DataLen parameter.


IDataBlock.Read
 VCL Reference

IDataBlock.Read

IDataBlock	Methods 	See also

Reads a specified number of bytes into a buffer.

function Read(var Buffer; Count: Integer): Integer;

Description

Call Read to copy the contents stored in the memory buffer to the buffer supplied by the Buffer parameter. Read reads up to Count bytes and returns the number of bytes actually read.

The first call to Read begins reading from Memory at the first position after the reserved bytes. Subsequent calls begin reading at the point where the last call to Read left off.

Note:	The Count parameter should specify a value less than or equal to Size - BytesReserved.


IDataBlock.SetSignature
 VCL Reference

IDataBlock.SetSignature

IDataBlock	Methods 	See also

Sets the value of the Signature property.

procedure SetSignature(Value: Integer);

Description

SetSignature is the write implementer for the Signature property.


IDataBlock.SetSize
 VCL Reference

IDataBlock.SetSize

IDataBlock	Methods 	See also

Sets the value of the Size property.

procedure SetSize(Value: Integer);

Description

SetSize is the write implementer for the Size property.


IDataBlock.Write
 VCL Reference

IDataBlock.Write

IDataBlock	Methods 	See also

Writes a specified number of bytes from a buffer.

function Write(const Buffer; Count: Integer): Integer;

Description

Call Write to copy the contents of the buffer supplied as the Buffer parameter to the next position in Memory. Write writes up to Count bytes and returns the number of bytes actually written.

The first call to Write begins writing to Memory at the first position after the reserved bytes. Subsequent calls begin writing at the point where the last call to Write left off.

Note:	The Count parameter should specify a value less than or equal to Size - BytesReserved.


Hierarchy

IInterface

IUnknown

IDataBlock


IDataIntercept
 VCL Reference

IDataIntercept

Hierarchy	Methods	See also

IDataIntercept is the interface used by TSocketConnection components to transform data that is communicated over the connection.

Unit

SConnect

Description

IDataIntercept is the interface implemented by data packet interceptors. A data packet interceptor is a COM object that implements IDataIntercept to transform data that is accessed through an IDataBlock interface. TSocketConnection can use a data packet interceptor before messages are sent and after responses are received.

Developers can create a data packet interceptor to encrypt and decrypt data or to compress and decompress messages. The transformation must leave the reserved bytes of the data blocks unchanged or the socket connection component won’t be able to communicate properly. When creating a data packet interceptor, use TPacketInterceptFactory as its class factory.

Once you have created and registered a data packet interceptor, Set the InterceptName or InterceptGUID property of a socket connection component to identify the data packet interceptor. This tells the socket connection to instantiate the interceptor and use it to transform messages before they are sent and after they are received. On the server side, right click on the Tray Icon for scktsrvr.exe and assign the interceptor using the properties dialog.


 VCL Reference

IDataIntercept methods

IDataIntercept	Alphabetically	Legend

In IDataIntercept

DataIn

DataOut

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDataIntercept methods

IDataIntercept	By object	Legend

_AddRef

_Release

DataIn

DataOut

QueryInterface


IDataIntercept.DataIn
 VCL Reference

IDataIntercept.DataIn

IDataIntercept	Methods 	See also

Undoes the transformation applied by the DataOut method.

procedure DataIn(const Data: IDataBlock); stdcall;

Description

Call DataIn to undo any transformations that were applied to information received by the connection. For example, use this method to decrypt or decompress data.

The Data parameter is an IDataBlock interface to the data that was received by the socket connection component. Use the properties and methods of IDataBlock to reverse the transformation that was applied by the DataOut method.

Warning:	Do not transform the reserved bytes in the data block.


IDataIntercept.DataOut
 VCL Reference

IDataIntercept.DataOut

IDataIntercept	Methods 	See also

Returns the value of the BytesReserved property.

procedure DataOut(const Data: IDataBlock); stdcall;

Description

Call DataOut to transform data before it is sent using a connection component. For example, use this method to encrypt or compress data.

The Data parameter is an IDataBlock interface to the data that is about to be sent by the socket connection component. Use the properties and methods of IDataBlock to transform the data.

Warning:	Do not transform the reserved bytes in the data block.


Hierarchy

IInterface

IDataIntercept

IDataIntercept


IDOMHeaderProcessor
 VCL Reference

IDOMHeaderProcessor

Hierarchy	Methods	See also

IDOMHeaderProcessor is the interface for objects that interpret and create SOAP headers.

Unit

soapdomconv

Description

IDOMHeaderProcessor provides an interface for working with specialized SOAP headers. Each object that implements IDOMHeaderProcessor handles a specific type of soap header. The TSoapDomProcessor class calls on this interface when it needs to create or interpret the headers of a SOAP packet.

IDOMHeaderProcessor declares two methods, CreateHeader and ProcessHeader, which create or respond to a given SOAP header, respectively.


 VCL Reference

IDOMHeaderProcessor methods

IDOMHeaderProcessor	Alphabetically	Legend

In IDOMHeaderProcessor

CreateHeader

ProcessHeader

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDOMHeaderProcessor methods

IDOMHeaderProcessor	By object	Legend

_AddRef

_Release

CreateHeader

ProcessHeader

QueryInterface


IDOMHeaderProcessor.CreateHeader
 VCL Reference

IDOMHeaderProcessor.CreateHeader

IDOMHeaderProcessor	See also

Creates a new SOAP header node.

function CreateHeader(HeaderNode: IXMLNode): IXMLNode;

Description

CreateHeader creates a new header node.

HeaderNode is the node in the emerging SOAP packet that acts as a parent to the new header.

CreateHeader returns the new header node.


IDOMHeaderProcessor.ProcessHeader
 VCL Reference

IDOMHeaderProcessor.ProcessHeader

IDOMHeaderProcessor

Interprets and responds to a SOAP header.

procedure ProcessHeader(HeaderNode: IXMLNode; var Handled, AbortRequest: Boolean);

Description

ProcessHeader provides a response to a given SOAP header node.

HeaderNode is the interface of the DOM representation of the SOAP header to be processed.

Handled returns True if ProcessHeader handles the header node.

AbortRequest returns True if ProcessHeader determines that the SOAP header can’t be handled and that this results in an inability to interpret the entire SOAP request. For example, if the header node represents authentication information, ProcessHeader could set AbortRequest to True if the header supplied an invalid password.


Hierarchy

IInterface

IDOMHeaderProcessor


IDataSetComponent
 VCL Reference

IDataSetComponent

Hierarchy	Properties	Methods	See also

IDataSetComponent defines the methods that bind a Web item to an XML broker.

Unit

MidItems

Description

The TXMLDisplayGroup class implements IDataSetComponent to provide information about the dataset from which its child controls obtain their data. The child Web items use this information to determine the default data binding.

Most Web items that generate a group of data-aware controls inherit the support for IDataSetComponent from TXMLDisplayGroup.


 VCL Reference

IDataSetComponent properties

IDataSetComponent	Alphabetically	Legend

In IDataSetComponent

DataSet

XMLBroker

XMLDataSet


 VCL Reference

IDataSetComponent properties

IDataSetComponent	By object	Legend

DataSet

XMLBroker

XMLDataSet


IDataSetComponent.DataSet
 VCL Reference

IDataSetComponent.DataSet

IDataSetComponent	See also

Provides access to an interface for working with the associated dataset.

property DataSet: IInetXWebDataSet;

Description

The child Web items of the item that implements IDataSetComponent use the DataSet property to obtain information about the dataset to which they are bound and to respond when this information changes. This information includes details about the available fields and parameters in the dataset to which they can be bound.


IDataSetComponent.XMLBroker
 VCL Reference

IDataSetComponent.XMLBroker

IDataSetComponent	See also

Indicates the XML broker that fetches the data packets to which the Web item is bound.

property XMLBroker: TXMLBroker;

Description

Use XMLBroker to access the TXMLBroker object that fetches XML data packets from the application server. The XML broker can be used to obtain information about the source of the dataset, the form that contains the XML data packet, the javascript variables that represent this data packet, and so on.

Note:	The dataset represented by the Web item may not correspond directly to the XML broker’s dataset. It may be a nested dataset contained by that dataset. The XMLDataSet property indicates whether the dataset is nested, and if so, describes the field that represents it.


IDataSetComponent.XMLDataSet
 VCL Reference

IDataSetComponent.XMLDataSet

IDataSetComponent	See also

Indicates the TXMLDataSet object that represents the dataset to which the Web item is bound.

property XMLDataSet: TXMLDataSet;

Description

XMLDataSet describes how to locate the appropriate dataset, given the XML broker that provides its XML data packet. This dataset may be the main dataset of the XML broker, or it may be a nested dataset that is represented by a dataset field within that dataset (or a dataset field nested in a dataset field, and so on).


 VCL Reference

IDataSetComponent methods

IDataSetComponent	Alphabetically	Legend

In IDataSetComponent

GetDataSet

GetXMLBroker

GetXMLDataSet

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDataSetComponent methods

IDataSetComponent	By object	Legend

_AddRef

_Release

GetDataSet

GetXMLBroker

GetXMLDataSet

QueryInterface


IDataSetComponent.GetDataSet
 VCL Reference

IDataSetComponent.GetDataSet

IDataSetComponent	See also

Returns the value of the DataSet property.

function GetDataSet: IInetXWebDataSet;

Description

GetDataSet is the read access method for the DataSet property.


IDataSetComponent.GetXMLBroker
 VCL Reference

IDataSetComponent.GetXMLBroker

IDataSetComponent	See also

Returns the value of the XMLBroker property.

function GetXMLBroker: TXMLBroker;

Description

GetXMLBroker is the read access method for the XMLBroker property.


IDataSetComponent.GetXMLDataSet
 VCL Reference

IDataSetComponent.GetXMLDataSet

IDataSetComponent	See also

Returns the value of the XMLDataSet property.

function GetXMLDataSet: TXMLDataSet;

Description

GetXMLDataSet is the read access method for the XMLDataSet property.


Hierarchy

IInterface

IDataSetComponent


IHTMLField
 VCL Reference

IHTMLField

Hierarchy	Properties	Methods	See also

IHTMLField is an interface that must be implemented by Web items that generate <INPUT> elements.

Unit

MidItems

Description

The TWebDataDisplay class implements IHTMLField to provide information about information about the HTML control it represents. This interface is used when generating javascript that refers to the control.

Most Web items that generate HTML <INPUT> elements inherit the support for IHTMLField from TWebDataDisplay. However, when writing custom Web items that generate <INPUT> tags but that do not descend from TWebDataDisplay, component writers must ensure that the Web item supports the IHTMLField interface.


 VCL Reference

IHTMLField properties

IHTMLField	Alphabetically	Legend

In IHTMLField

HTMLControlName


 VCL Reference

IHTMLField properties

IHTMLField	By object	Legend

HTMLControlName


IHTMLField.HTMLControlName
 VCL Reference

IHTMLField.HTMLControlName

IHTMLField

Indicates the name of the generated HTML control.

property HTMLControlName: string;

Description

HTMLControlName is the value of the NAME option on the generated <INPUT> tag. This value is used when creating javascript references to the control.


 VCL Reference

IHTMLField methods

IHTMLField	Alphabetically	Legend

In IHTMLField

GetHTMLControlName

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IHTMLField methods

IHTMLField	By object	Legend

_AddRef

_Release

GetHTMLControlName

QueryInterface


IHTMLField.GetHTMLControlName
 VCL Reference

IHTMLField.GetHTMLControlName

IHTMLField	See also

Returns the name of the generated HTML <INPUT> control.

function GetHTMLControlName: string;

Description

GetHTMLFormName is the read access method for the HTMLControlName property.


Hierarchy

IInterface

IHTMLField


IHTMLForm
 VCL Reference

IHTMLForm

Hierarchy	Properties	Methods	See also

IHTMLForm is an interface that must be implemented by Web items that generate forms.

Unit

MidItems

Description

Web items that produce forms (such as TQueryForm or TDataForm) must implement the IHTML form interface. This interface allows other Web items to access information about form elements when generating javascript declarations and method calls.


 VCL Reference

IHTMLForm properties

IHTMLForm	Alphabetically	Legend

In IHTMLForm

HTMLFormName

HTMLFormVarName


 VCL Reference

IHTMLForm properties

IHTMLForm	By object	Legend

HTMLFormName

HTMLFormVarName


IHTMLForm.HTMLFormName
 VCL Reference

IHTMLForm.HTMLFormName

IHTMLForm	See also

Indicates the name of the generated HTML form.

property HTMLFormName: string;

Description

HTMLFormName is the value of the NAME option on the generated form. Other Web items can use this property when they need to refer to the form name. For example, this property is used to declare the javascript variable that represents the form.


IHTMLForm.HTMLFormVarName
 VCL Reference

IHTMLForm.HTMLFormVarName

IHTMLForm	See also

Indicates the name of the javascript variable that represents the HTML form.

property HTMLFormVarName: string;

Description

HTMLFormVarName is the value of the javascript variable for the form. Other Web items can use this property when they need to refer to the form in generated javascript code.


 VCL Reference

IHTMLForm methods

IHTMLForm	Alphabetically	Legend

In IHTMLForm

GetHTMLFormName

GetHTMLFormVarName

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IHTMLForm methods

IHTMLForm	By object	Legend

_AddRef

_Release

GetHTMLFormName

GetHTMLFormVarName

QueryInterface


IHTMLForm.GetHTMLFormName
 VCL Reference

IHTMLForm.GetHTMLFormName

IHTMLForm	See also

Returns the name of the generated HTML form.

function GetHTMLFormName: string;

Description

GetHTMLFormName is the read access method for the HTMLFormName property.


IHTMLForm.GetHTMLFormVarName
 VCL Reference

IHTMLForm.GetHTMLFormVarName

IHTMLForm	See also

Returns the name of the javascript variable that refers to the generated form.

function GetHTMLFormVarName: string;

Description

GetHTMLFormVarName is the read access method for the HTMLFormVarName property.


Hierarchy

IInterface

IHTMLForm


IHTTPSoapDispatch
 VCL Reference

IHTTPSoapDispatch

Hierarchy	Methods	See also

IHTTPSoapDispatch is the interface for objects that interpret SOAP request messages and execute the corresponding invokable interface.

Unit

SoapHTTPDisp

Description

The THTTPSoapDispatcher component uses this interface to call the object that interprets and responds to the incoming SOAP messages that it receives. By using an interface, THTTPSoapDispatcher can work with any component that interprets and executes SOAP messages.

In Delphi, this interface is implemented by THTTPSoapPascalInvoker.


 VCL Reference

IHTTPSoapDispatch methods

IHTTPSoapDispatch	Alphabetically	Legend

In IHTTPSoapDispatch

DispatchSOAP

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IHTTPSoapDispatch methods

IHTTPSoapDispatch	By object	Legend

_AddRef

_Release

DispatchSOAP

QueryInterface


IHTTPSoapDispatch.DispatchSOAP
 VCL Reference

IHTTPSoapDispatch.DispatchSOAP

IHTTPSoapDispatch	See also

Interprets an incoming SOAP message, calls the target interface, and encodes any return values.

procedure DispatchSOAP(const Path, SoapAction: WideString; const Request: TStream; Response: TStream);

Description

DispatchSOAP interprets a SOAP message, executes the interface call it represents, and encodes any return values as a SOAP string.

Path is the path portion of the URL to which the incoming request message was addressed.

SoapAction is the content of the SOAP Action header of the incoming HTTP request message.

Request is a stream from which DispatchSOAP can read the content of the incoming request message. It contains the SOAP encoding of an interface call.

Response is a stream to which DispatchSOAP writes the content for the outgoing response message. DispatchSoap fills it out with the SOAP encoding of any return values.


Hierarchy

IInterface

IHTTPSoapDispatch


IInetXWebDataSet
 VCL Reference

IInetXWebDataSet

Hierarchy	Methods	See also

IInetXWebDataSet lets a Web item interact with information about a dataset in an XML broker’s data packet.

Unit

MidItems

Description

Web items use the IInetXWebDataSet interface (formerly known as IMidasWebDataSet) to obtain information about a dataset supplied by an XML broker. By using this interface, the Web item does not need to worry about whether the dataset is the top-level dataset in the XML data packet or a nested dataset in that data packet.

IInetXWebDataSet defines methods for obtaining information about the fields and parameters of the associated dataset. It also defines methods for assigning an event handler that receives notifications when this information changes.


 VCL Reference

IInetXWebDataSet methods

IInetXWebDataSet	Alphabetically	Legend

In IInetXWebDataSet

AddOnDataChange

FetchParams

FieldCount

Fields

ParamCount

Params

RemoveOnDataChange

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IInetXWebDataSet methods

IInetXWebDataSet	By object	Legend

_AddRef

_Release

AddOnDataChange

FetchParams

FieldCount

Fields

ParamCount

Params

QueryInterface

RemoveOnDataChange


IInetXWebDataSet.AddOnDataChange
 VCL Reference

IInetXWebDataSet.AddOnDataChange

IInetXWebDataSet	See also

Adds an event handler to the list of event handlers that are called when the fields or parameters of the dataset change.

procedure AddOnDataChange(const Value: TNotifyEvent);

Description

Call AddOnDataChange to specify an event handler that is called when the fields or parameters of the dataset change. This allows Web items to update their data bindings to reflect changes in the associated data packet.

Value specifies the event handler that is added to the list.


IInetXWebDataSet.FetchParams
 VCL Reference

IInetXWebDataSet.FetchParams

IInetXWebDataSet	See also

Tells the XML broker that manages the associated dataset to fetch parameter values from the application server.

procedure FetchParams;

Description

Call FetchParams to tell the XML broker to fetch parameter values from the application server. This ensures that the Params method returns the current values of any parameters on the server.


IInetXWebDataSet.FieldCount
 VCL Reference

IInetXWebDataSet.FieldCount

IInetXWebDataSet	See also

Returns the number of fields in the associated dataset.

function FieldCount: Integer;

Description

Call FieldCount to determine the number of fields returned by the Fields method. This is the number of fields in the XML data packet belonging to the associated dataset.


IInetXWebDataSet.Fields
 VCL Reference

IInetXWebDataSet.Fields

IInetXWebDataSet	See also

Returns the set of fields in the associated dataset.

function Fields: TFields;

Description

Call Fields to obtain access to the field objects (TField) that represent the fields in the XML data packet. Each field object can be used to read the value of the field, determine its type, and so on.


IInetXWebDataSet.ParamCount
 VCL Reference

IInetXWebDataSet.ParamCount

IInetXWebDataSet	See also

Returns the number of parameters for the associated dataset.

function ParamCount: Integer;

Description

Call ParamCount to determine the number of parameters returned by the Params method. This is the number of parameters in the XML data packet belonging to the associated dataset.


IInetXWebDataSet.Params
 VCL Reference

IInetXWebDataSet.Params

IInetXWebDataSet	See also

Returns the set of parameters in the associated dataset.

function Params: TParams;

Description

Call Params to obtain access to the parameter objects (TParam) that represent the parameters in the XML data packet. Each parameter object can be used to read the value of the parameter, determine its type, and so on.


IInetXWebDataSet.RemoveOnDataChange
 VCL Reference

IInetXWebDataSet.RemoveOnDataChange

IInetXWebDataSet	See also

Removes an event handler from the list of event handlers that are called when the fields or parameters of the dataset change.

procedure RemoveOnDataChange(const Value: TNotifyEvent);

Description

Call RemoveOnDataChange to remove an event handler that was added using the AddOnDataChange method.

Value specifies the event handler to remove from the list.


Hierarchy

IInterface

IInetXWebDataSet


IInvokable
 VCL Reference

IInvokable

Hierarchy	Methods	Using IInvokable	See also

IInvokable is the base class for invokable interfaces.

Unit

System

Description

Use IInvokable as a base interface when defining invokable interfaces. IInvokable does not add any properties or methods to the methods it inherits from IInterface. It exists, rather, to ensure that the interface an all its descendants are compiled with runtime type information (RTTI). This RTTI can be used by Web Service applications or the clients of Web Service applications for translating between the code that implements a method and the symbolic encoding of that method call that is sent between client and server applications.


 VCL Reference

IInvokable methods

IInvokable	Alphabetically	Legend

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IInvokable methods

IInvokable	By object	Legend

_AddRef

_Release

QueryInterface


Hierarchy

IInterface

IInvokable

IInvokable


ILayoutWebContent
 VCL Reference

ILayoutWebContent

Hierarchy	Methods	See also

ILayoutWebContent lets child Web items adhere to layout rules imposed by their parent.

Unit

WebComp

Description

The Content method, implemented by all Web items to return the generated HTML, takes as a parameter an object of type TLayout. TLayout is any object that implements the ILayoutWebContent interface.

Parent components pass the TLayout object to child Web items to provide helper functions that the child items use to fit their generated content into the parent object’s HTML structure (typically a <TABLE> tag). For example, the ILayoutWebContent methods may add <TD> tags around generated HTML that fills the cells of a parent’s HTML table.


 VCL Reference

ILayoutWebContent methods

ILayoutWebContent	Alphabetically	Legend

In ILayoutWebContent

LayoutButton

LayoutField

LayoutLabelAndField

LayoutTable

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

ILayoutWebContent methods

ILayoutWebContent	By object	Legend

_AddRef

_Release

LayoutButton

LayoutField

LayoutLabelAndField

LayoutTable

QueryInterface


ILayoutWebContent.LayoutButton
 VCL Reference

ILayoutWebContent.LayoutButton

ILayoutWebContent

Converts the HTML declaring a button into a form the Web item’s parent can use.

function LayoutButton(const HTMLButton: string; Attributes: TLayoutAttributes): string;

Description

Call LayoutButton to convert the HTML that declares a button (typically an <INPUT> tag) into the form required by the Web item’s parent.

HTMLButton is the HTML that declares a button. This is produced by the Web item.

Attributes describes any style attributes or layout considerations that should be applied to the final HTML for the button.

LayoutButton returns the HTML for the button in a form that can be used by the Web item’s parent.


ILayoutWebContent.LayoutField
 VCL Reference

ILayoutWebContent.LayoutField

ILayoutWebContent

Converts the HTML declaring a field into a form the Web item’s parent can use.

function LayoutField(const HTMLField: string; Attributes: TLayoutAttributes): string;

Description

Call LayoutField to convert the HTML that declares a field (an input control that represents a data field or a named value) into the form required by the Web item’s parent.

HTMLField is the HTML that declares the field. This is produced by the Web item.

Attributes describes any style attributes or layout considerations that should be applied to the final HTML for the field.

LayoutField returns the HTML for the field in a form that can be used by the Web item’s parent.


ILayoutWebContent.LayoutLabelAndField
 VCL Reference

ILayoutWebContent.LayoutLabelAndField

ILayoutWebContent

Converts the HTML declaring a labeled field into a form the Web item’s parent can use.

function LayoutLabelAndField(const HTMLLabel: string; const HTMLField: string; Attributes: TLayoutAttributes): string;

Description

Call LayoutLabelAndField to convert the HTML that declares a labeled field (an input control that represents a data field or a named value along with its label) into the form required by the Web item’s parent.

HTMLLabel is the HTML that declares the label. This is produced by the Web item.

HTMLField is the HTML that declares the field. This is produced by the Web item.

Attributes describes any style attributes or layout considerations that should be applied to the final HTML for the field and its label.

LayoutLabelAndField returns the HTML for the field and label in a form that can be used by the Web item’s parent.


ILayoutWebContent.LayoutTable
 VCL Reference

ILayoutWebContent.LayoutTable

ILayoutWebContent

Converts the HTML declaring a table into a form the Web item’s parent can use.

function LayoutTable(const HTMLField: string; Attributes: TLayoutAttributes): string;

Description

Call LayoutTable to convert the HTML that declares a table (typically a structure used to layout the content produced by the Web item’s children) into the form required by the Web item’s parent.

HTMLTable is the HTML that declares the table. This is produced by the Web item.

Attributes describes any style attributes or layout considerations that should be applied to the final HTML for the table.

LayoutTable returns the HTML for the table in a form that can be used by the Web item’s parent.


Hierarchy

IInterface

ILayoutWebContent


OnBeforeGetXMLData, Params, FetchParams, AssignStrings, ContentFields Example
 VCL Reference

OnBeforeGetXMLData, Params, FetchParams, AssignStrings, ContentFields Example

This example shows an OnBeforeGetXMLData event handler that assigns parameter values to an XML broker before it supplies the XML data packet. The parameter values are retrieved from a request message that was sent by a query form (generated by TQueryForm with a TSubmitQueryButton object).

procedure WebModule1.InetXPageProducer1BeforeGetXMLData(Sender: TObject; Request: TWebRequest; XMLBroker: TXMLBroker; var OwnerData: OleVariant);

begin

  if XMLBroker.Params.Count = 0 then

    XMLBroker.FetchParams;

  XMLBroker.Params.AssignStrings(Request.ContentFields);

end;


OnRequestRecords Example
 VCL Reference

OnRequestRecords Example

This example shows how to use the OnRequestRecords event handler to supply parameter values from the request message before fetching a data packet.

procedure TWebModule1.XMLBroker1RequestRecords(Sender: TObject; Request: TWebRequest; out RecCount: Integer; var OwnerData: OleVariant; var Records: String);

begin

  // Set params using name/value pairs in URL

  XMLBroker1.Params.AssignStrings(Request.QueryFields);

end;


TInsertButton
 VCL Reference

TInsertButton

Hierarchy	Properties	Methods	See also

TInsertButton generates an HTML control that inserts a new record in an XML data packet.

Unit

MidItems

Description

Add TInsertButton as the child of a TDataNavigator component (or a layout group that is a child of a TDataNavigator component) to enable the generated HTML form to add records to an XML data packet. The resulting HTML button’s action adds a new blank record to the emerging XML delta packet and causes the associated display control to display that new record.

Use the properties of TInsertButton to customize the appearance of the button and associate it with a Web item. The associated Web item generates the HTML control that displays the newly inserted record.


 VCL Reference

TInsertButton properties

TInsertButton	Alphabetically	Legend

Derived from TDataSetButton

Caption

Derived from TXMLDisplayReferenceButton

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TInsertButton properties

TInsertButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TInsertButton methods

TInsertButton	Alphabetically	Legend

In TInsertButton

Create

Derived from TXMLDisplayReferenceButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TInsertButton methods

TInsertButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TInsertButton.Create
 VCL Reference

TInsertButton.Create

TInsertButton	See also

Creates and initializes an instance of TInsertButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TInsertButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLDisplayReferenceButton

TDataSetButton

TInsertButton


TInvokableClass
 VCL Reference

TInvokableClass

Hierarchy	Properties	Methods	Using TInvokableClass	See also

TInvokableClass is the base class for the implementation classes of invokable interfaces.

Unit

InvokeRegistry

Description

Use TInvokableClass as a base class when writing the implementation class of an invokable interface. TInvokableClass has two important attributes:

The invocation registry (InvRegistry) knows how to create instances of TInvokableClass and (because it has a virtual constructor) its descendants. This allows the registry to supply an invoker in a Web Service application with an instance of the invokable class that can handle an incoming request.

TInvokableClass is an interfaced object that frees itself when the reference count on its interface drops to zero. Invoker components do not know when to free the implementation classes of the interfaces they call. Because TInvokableClass knows when to free itself, you do not need to supply your own lifetime management for this object.

To use a TInvokableClass descendant in a Web Service application, you must register it with the invocation registry. Use the RegisterInvokableClass method of the invocation registry to register your TInvokableClass descendant.

Note:	If you do not use TInvokableClass as a base class when writing the implementation class for an invokable interface, you must supply the invocation registry with a method to retrieve instances of your class and you must handle the lifetime management of your class.


 VCL Reference

TInvokableClass properties

TInvokableClass	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TInvokableClass properties

TInvokableClass	By object 	Legend

RefCount


 VCL Reference

TInvokableClass methods

TInvokableClass	Alphabetically	Legend

In TInvokableClass

Create

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TInvokableClass methods

TInvokableClass	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TInvokableClass.Create
 VCL Reference

TInvokableClass.Create

TInvokableClass	See also

Creates and initializes a TInvokableClass object.

constructor Create; virtual;

Description

The TInvokableClass constructor does nothing special. It exists primarily because

The invocation registry knows how to call it.

It is virtual, so that the invocation registry can also instantiate descendant classes.


Hierarchy

TObject

TInterfacedObject

TInvokableClass


ISendDataBlock
 VCL Reference

ISendDataBlock

Hierarchy	Methods	See also

ISendDataBlock is the interface used by data block interpreters to send messages to an application server after they are marshaled.

Unit

SConnect

Description

Streamed connection components implement ISendDataBlock to allow a data block interpreter (which handles marshaling of COM interface calls) to send interface calls to the application server.

ISendDataBlock is an interface, and as such can’t be directly instantiated. Instead, streamed connection components (which implement ISendDataBlock) can be cast to an ISendDataBlock.


 VCL Reference

ISendDataBlock methods

ISendDataBlock	Alphabetically	Legend

In ISendDataBlock

Send

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

ISendDataBlock methods

ISendDataBlock	By object	Legend

_AddRef

_Release

QueryInterface

Send


ISendDataBlock.Send
 VCL Reference

ISendDataBlock.Send

ISendDataBlock	Methods 	See also

Sends information retrieved from an IDataBlock interface to the application server.

function Send(const Data: IDataBlock; WaitForResult: Boolean): IDataBlock;

Description

ISendDataBlock dispatches information to an application server. The information must be available as the Memory property of an IDataBlock interface.

The WaitForResult parameter indicates whether the caller requires a response when the information is sent. If WaitForResult is True, Send does not return until a response is received from the application server. This response is returned as an IDataBlock interface. If  WaitForResult is False, Send may still return a response, but only if the application server responds immediately.


Hierarchy

IInterface

ISendDataBlock

ISendDataBlock


ITransport
 VCL Reference

ITransport

Hierarchy	Properties	Methods	See also

ITransport is the interface used by TStreamedConnection to connect to, read from, and write to a remote application server.

Unit

SConnect

Description

Streamed connection components use ITransport to connect to an application server and to send or receive data over that connection. ITransport is responsible only for managing the communication protocols. It does not provide any support for marshaling or storing information.

ITransport is an interface, and as such can’t be directly instantiated. Instead, objects that implement the ITransport properties and methods include ITransport in their class definition. Such objects can be cast to an ITransport so that they can be used by TStreamedConnection.


 VCL Reference

ITransport properties

ITransport	Alphabetically	Legend

In ITransport

Connected


 VCL Reference

ITransport properties

ITransport	By object	Legend

Connected


ITransport.Connected
 VCL Reference

ITransport.Connected

ITransport	See also

Indicates whether the connection to the application server is established.

property Connected: Boolean;

Description

Set Connected to True to connect to the application server. Set Connected to False to close a connection.

Read the Connected property to verify that the connection is open before reading from or writing to the application server.


 VCL Reference

ITransport methods

ITransport	Alphabetically	Legend

In ITransport

GetConnected

GetWaitEvent

Receive

Send

SetConnected

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

ITransport methods

ITransport	By object	Legend

_AddRef

_Release

GetConnected

GetWaitEvent

QueryInterface

Receive

Send

SetConnected


ITransport.GetConnected
 VCL Reference

ITransport.GetConnected

ITransport	See also

Returns the value of the Connected property.

function GetConnected: Boolean;

Description

GetConnected is the read property implementer for the Connected property.


ITransport.GetWaitEvent
 VCL Reference

ITransport.GetWaitEvent

ITransport	See also

Returns the handle for an event object that is managed by the object that implements ITransport.

type THandle = Integer;

function GetWaitEvent: THandle; stdcall;

Description

Streamed connection components perform all reading from and writing to the application server using a separate execution thread. This limits the impact that communication with the application server has on the speed of the client application, because execution does not need to wait while messages are marshaled and sent or received. The streamed connection component needs to coordinate its use of the communication thread. To do this, it uses an event object that is a member of the object that implements ITransport.

GetWaitEvent returns a handle to this event object. When implementing an object that supports ITransport, create a TEvent object as a member and return its handle as the return value of GetWaitEvent. Do not use the event object for internal purposes or it will interfere with the streamed connection’s use of the event.


ITransport.Receive
 VCL Reference

ITransport.Receive

ITransport	See also

Returns an IDataBlock interface that can be used to read information received from the application server.

function Receive(WaitForInput: Boolean; Context: Integer): IDataBlock;

Description

Receive creates aCOM object that implements the IDataBlock interface and reads information from the application server into its Memory property.

If WaitForInput is True, Receive halts execution until the application server sends the expected information. If WaitForInput is False, Receive can fail (reading no information) if the application server does not send any information immediately (or after a brief timeout period).

Context is transport-specific data that can be used when implementing a class that supports ITransport. Its value is the return value of the Send method.


ITransport.Send
 VCL Reference

ITransport.Send

ITransport	See also

Sends information retrieved from an IDataBlock interface to the application server.

function Send(const Data: IDataBlock): Integer; stdcall;

Description

Send sends the entire contents of the Data parameter’s Memory property to the application server. It returns a transport-specific value that is used by the next call to the Receive method. For example, HTTP transport classes return the handle for the Internet connection.


ITransport.SetConnected
 VCL Reference

ITransport.SetConnected

ITransport

Sets the value of the Connected property.

property Connected: Boolean;

Description

SetConnected is the write implementer for the Connected property.


Hierarchy

IInterface

IUnknown

ITransport


IWebComponentEditor
 VCL Reference

IWebComponentEditor

Hierarchy	Methods	See also

IWebComponentEditor enables a Web item to be assigned children in the Web Page editor.

Unit

WebComp

Description

When the Web Page editor builds the list of new items that can be added as the child of a Web item, it calls the IWebComponentEditor interface. Components that contain child items for generating portions of their HTML content must implement this interface so that the Web Page editor can display the appropriate list of components to add.

IWebComponentEditor defines a single method, CanAddClass, which indicates whether a specified class can be used for a child Web item by the Web item that implements the interface.


 VCL Reference

IWebComponentEditor methods

IWebComponentEditor	Alphabetically	Legend

In IWebComponentEditor

CanAddClass

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IWebComponentEditor methods

IWebComponentEditor	By object	Legend

_AddRef

_Release

CanAddClass

QueryInterface


IWebComponentEditor.CanAddClass
 VCL Reference

IWebComponentEditor.CanAddClass

IWebComponentEditor

Indicates whether a specified class can be used as a child Web item.

function CanAddClass(AParent: TComponent; AClass: TClass): Boolean;

Description

The Web page editor calls CanAddClass to determine what Web items can be added to supply content for the Web item that implements this interface.

AParent is the Web item that will act as a parent to the added Web item.

AClass is the class of the proposed child Web item.

CanAddClass returns True if the Web item can use content generated by a component of type AClass, False otherwise.


Hierarchy

IInterface

IWebComponentEditor


IWebComponent
 VCL Reference

IWebComponent

Hierarchy	Properties	Methods	See also

IWebComponent is the interface supported by components that TWebComponentList manages.

Unit

WebComp

Description

TWebComponentList uses IWebComponent to ensure that all components in its list have access to information about how they fit in the hierarchy of Web items.


 VCL Reference

IWebComponent properties

IWebComponent	Alphabetically	Legend

In IWebComponent

ComponentList

Container

Index


 VCL Reference

IWebComponent properties

IWebComponent	By object	Legend

ComponentList

Container

Index


IWebComponent.ComponentList
 VCL Reference

IWebComponent.ComponentList

IWebComponent	See also

Indicates the component list that contains the Web item.

property ComponentList: TObject;

Description

The Web component list assigns a value to ComponentList when the component is added to it. The component can use this value to access the list and obtain information about the other components in the list.

Note that the IWebComponent interface does not include any methods for reading the value of ComponentList.


IWebComponent.Container
 VCL Reference

IWebComponent.Container

IWebComponent	See also

Specifies the component that uses content generated by this Web item.

property Container: TWebComponentContainer;

Description

Web items are arranged in a hierarchy, where each item generates its content using content produced by its children. Container specifies the parent that uses the content of this Web item. Container maintains a list of all its children using a TWebComponentList object.


IWebComponent.Index
 VCL Reference

IWebComponent.Index

IWebComponent	See also

Indicates where the Web item appears in the Web component list’s array of Web items.

property Index: Integer;

Description

The Web component list sets Index to indicate where the component sits in its WebComponents property array.


 VCL Reference

IWebComponent methods

IWebComponent	Alphabetically	Legend

In IWebComponent

GetContainer

GetIndex

SetComponentList

SetContainer

SetIndex

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IWebComponent methods

IWebComponent	By object	Legend

_AddRef

_Release

GetContainer

GetIndex

QueryInterface

SetComponentList

SetContainer

SetIndex


IWebComponent.GetContainer
 VCL Reference

IWebComponent.GetContainer

IWebComponent	See also

Returns the value of the Container property.

function GetContainer: TWebComponentContainer;

Description

GetContainer is the read method for the Container property.


IWebComponent.GetIndex
 VCL Reference

IWebComponent.GetIndex

IWebComponent	See also

Returns the value of the Index property.

function GetIndex: Integer;

Description

GetIndex is the read method for the Index property.


IWebComponent.SetComponentList
 VCL Reference

IWebComponent.SetComponentList

IWebComponent	See also

Sets the value of the ComponentList property.

procedure SetComponentList(List: TObject);

Description

SetComponentList is the write method for the ComponentList property. The List parameter specifies the value to assign to ComponentList.


IWebComponent.SetContainer
 VCL Reference

IWebComponent.SetContainer

IWebComponent	See also

Sets the value of the Container property.

procedure SetContainer(Container: TWebComponentContainer);

Description

SetContainer is the write method for the Container property. The Container parameter specifies the value to assign to Container.


IWebComponent.SetIndex
 VCL Reference

IWebComponent.SetIndex

IWebComponent	See also

Sets the value of the Index property.

procedure SetIndex(Value: Integer);

Description

SetIndex is the write method for the Index property. The Value parameter specifies the value to assign to Index.


Hierarchy

IInterface

IWebComponent


IWebContent
 VCL Reference

IWebContent

Hierarchy	Methods	See also

IWebContent is an interface that allows components page producers and Web items to access the HTML generated by other components.

Unit

WebComp

Description

TInetXPageProducer and TComponentsPageProducer create HTML documents that include content generated by other components, called Web items. Similarly, the Web items that generate content can make use of other Web items when producing their content.

For a component to act as a Web item, it must support the IWebContent interface. This interface defines one new method, Content, which returns the HTML generated by the Web item.

Note:	The only other required interface for Web items is IWebComponent.


 VCL Reference

IWebContent methods

IWebContent	Alphabetically	Legend

In IWebContent

Content

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IWebContent methods

IWebContent	By object	Legend

_AddRef

_Release

Content

QueryInterface


IWebContent.Content
 VCL Reference

IWebContent.Content

IWebContent	See also

Returns the HTML that the Web item generates.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string;

Description

Call Content to access the HTML produced by the Web item.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the Web item should lay out its constituent parts. This object supports the ILayoutWebContent interface, which the Web item uses to fit its own content into the parent’s HTML structures.

Content returns a string of HTML produced by the Web item.


Hierarchy

IInterface

IWebContent


IWebNode
 VCL Reference

IWebNode

Hierarchy	Methods	See also

IWebNode is the interface for executing invokable interface calls from the client of a Web Service.

Unit

WebNode

Description

TRio objects use IWebNode to execute method calls on an invokable interface. IWebNode declares a single method, Execute, which takes an encoded method call, executes it, and returns the encoded results. Typically, objects that implement IWebNode use a specific transport protocol to forward the encoded method call to a remote server. For example, the THTTPReqResp class implements this interface for making interface calls to a remote Web Service application using HTTP.

When implementing the IWebNode interface, you can use another IWebNode implementation to delegate part of the method execution. For example, you can write a class that compresses or encrypts the encoded method call, passes it to another IWebNode implementation that expects the compressed or encrypted string, and then decompresses or decrypts the results returned by the other IWebNode implementation.


 VCL Reference

IWebNode methods

IWebNode	Alphabetically	Legend

In IWebNode

Execute

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IWebNode methods

IWebNode	By object	Legend

_AddRef

_Release

Execute

QueryInterface


IWebNode.Execute
 VCL Reference

IWebNode.Execute

IWebNode	See also

Executes an encoded method call and returns the encoded results in a stream.

procedure Execute(const DataMsg: WideString, Response: TStream);

Description

Execute interprets an encoded method call, executes it, and returns the encoded results using a stream. Typically, this method works in conjunction with an object that implements the IOPConvert interface, which marshals a method call into the DataMsg string and unmarshals the return value.

DataMsg is an encoded method call. It represents the results of marshaling a method call on an invokable interface into a transportable string.

Response is a stream object that receives the encoded results that arise from executing the method call in DataMsg.


Hierarchy

IInterface

IInvokable

IWebNode


IXMLNode
 VCL Reference

IXMLNode

Hierarchy	Properties	Methods	See also

IXMLNode is the interface for a node in an XML document.

Unit

XMLIntf

Description

Use IXMLNode to work with a node in an XML document. The IXMLNode interface is designed to work with TXMLDocument and the code generated by the Data Binding wizard.

IXMLNode is similar to the IDOMNode interface that is defined as part of the Document Object Model (DOM) specification. However, IXMLNode is designed to simplify the task of navigating and editing XML documents by

including some of the properties and methods from the IDOMElement interface, resulting in a simpler model for examining an XML node.

including additional properties and methods to simplify access to data in common XML structures.

The Data Binding wizard generates descendants of IXMLNode that further simplify the task of working with XML documents by converting the attributes and child nodes of a node into properties of the node interface.


 VCL Reference

IXMLNode properties

IXMLNode	Alphabetically 	Legend

In IXMLNode

AttributeNodes

Attributes

ChildNodes

ChildValues

Collection

DOMNode

HasChildNodes

IsTextElement

LocalName

NamespaceURI

NodeName

NodeType

NodeValue

OwnerDocument

ParentNode

Prefix

ReadOnly

Text

XML


 VCL Reference

IXMLNode properties

IXMLNode	By object 	Legend

AttributeNodes

Attributes

ChildNodes

ChildValues

Collection

DOMNode

HasChildNodes

IsTextElement

LocalName

NamespaceURI

NodeName

NodeType

NodeValue

OwnerDocument

ParentNode

Prefix

ReadOnly

Text

XML


IXMLNode.AttributeNodes
 VCL Reference

IXMLNode.AttributeNodes

IXMLNode 	See also

Lists the interfaces for nodes that represent attributes of this node.

property AttributeNodes: IXMLNodeList;

Description

Use AttributeNodes to access the attributes of this node using an IXMLNode interface. Attributes modify a node in an XML document. For example, given the node for

<Movie genre=scifi title="Star Wars">

both genre and title are attributes of the node, with values of “scifi” and “Star Wars”, respectively.

If an attribute consists of a simple Name=Value pair, it is simpler to use the Attributes property to read or set attribute values. AttributeNodes is an IXMLNodeList interface, which can be used to

Read the count of attributes before iterating over all the attributes of this node.

Add or delete attribute nodes from this node.

Access attributes through an XML node interface (for example, to read the attribute names from the nodes).

Only element nodes have attributes, and not every element node has them. If the node does not have any attributes, AttributeNodes is the interface for an empty list.

Note:	Attributes are not considered child nodes of a node and can’t be accessed using the ChildNodes property.


IXMLNode.Attributes
 VCL Reference

IXMLNode.Attributes

IXMLNode 	See also

Represents the values of this node’s attributes.

property Attributes[const AttrName: DOMString]: OleVariant;

Description

Use Attributes to read or set the values of this node’s attributes. Attributes modify a node in an XML document. For example, given the node for

<Movie genre=scifi title="Star Wars">

both genre and title are attributes of the node, with values of “scifi” and “Star Wars”, respectively.

The AttrName index gives the name of the attribute to access. In the previous example, “genre” and “title” are the names of the attributes. When setting Attributes, if you specify the name of an attribute that already exists for a node, you change that attribute’s value. If you specify an attribute name that does not correspond to an existing attribute of the node, a new attribute is created.

When reading Attributes, if you specify the name of an attribute that does not exist for the node, the value depends on the Options property of the document that contains the node. If Options includes doAttrNull, reading an attribute that does not exist for the node results in a Null Variant. When Options does not include doAttrNull, reading an attribute that does not exist results in an empty string.

The value of Attributes is the text of the specified attribute. When setting attributes, the value string is not parsed. Any markup in the supplied value (for example, an entity reference) is treated as literal text. If you set an attribute to nil, it is removed from this node. Note that you can set an attribute’s value to an empty string.


IXMLNode.ChildNodes
 VCL Reference

IXMLNode.ChildNodes

IXMLNode 	See also

Represents the child nodes of the node.

property ChildNodes: IXMLNodeList;

Description

Use ChildNodes to access the children of a node. ChildNodes is an IXMLNodeList interface, which can be used to access individual child nodes or to add child nodes to or delete them from this node. Each child node specifies this node as its parent node.

Tip:	To get or set the values of the child nodes rather than their interfaces, use the ChildValues property instead.

Note:	Attributes are not considered child nodes of a node. To get the values of this node’s attributes, use the Attributes or AttributeNodes property instead.


IXMLNode.ChildValues
 VCL Reference

IXMLNode.ChildValues

IXMLNode 	See also

Represents the values of this node’s child nodes.

property ChildValues[const IndexOrName: OleVariant]: OleVariant; default;

Description

Use ChildValues to access the values of this node’s children.

IndexOrName identifies the desired child node either by its interface, or by a string that is the local name of the child node. If IndexOrName does not identify a child of this node, trying to get or set ChildValues causes an exception.

The value of a child node depends on the type of the child node, as indicated in the following table:

NodeType	Value

ntElement	If the element contains only text, this is that text value. Otherwise, it is the Value of the first child node.

ntText	The text

ntCData	The content of the CDATA section.

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

If the child node is any other node type, reading or setting ChildValues causes an exception.

ChildValues is the default property for IXMLNode. That means that you can omit the property name when using this property. For example

Edit1.Text := XMLDocument1.DocumentElement.ChildValues['Name'];

can also be written

Edit1.Text := XMLDocument1.DocumentElement['Name'];

Note:	Attributes are not considered child nodes of a node. To get or set the values of this node’s attributes, use the Attributes property instead.


IXMLNode.Collection
 VCL Reference

IXMLNode.Collection

IXMLNode 	See also

Indicates the collection in which this node appears.

property Collection: IXMLNodeCollection;

Description

Read Collection to determine whether this node is one of a repeating set of child nodes. The node specified by Collection represents the same node in the XML document as this node’s ParentNode property, but it is specialized to work with this node and any other child nodes of the same type. The node identified by Collection lists ParentNode as the value of its HostNode property.

For example, consider the following XML fragment:

<students>

  <student name="John Smith">

    <grade>incomplete</grade>

  </student>

  <student name="Jane Doe">

    <grade>B+</grade>

  </student>

  <auditor name="Bill Jones"></auditor>

</students>

If this node represents one of the <student> nodes, then ParentNode represents the <students> node, and Collection represents a copy of the <students> node that is used for only those children that are <student> nodes, and not the <auditor> nodes.

If this node does not represent one of a set of repeating child elements, Collection is nil.


IXMLNode.DOMNode
 VCL Reference

IXMLNode.DOMNode

IXMLNode

Provides access to the IDOMNode interface for this node.

property DOMNode: IDOMNode;

Description

IDOMNode is the interface for this node provided by the DOM implementation that parsed the XML document. You can use this interface to work with the node using the lower-level properties and methods of the DOM.

Typically, applications use the IXMLNode interface to work with a node rather than the IDOMNode interface. For more information on DOM interfaces, see the DOM specification on the W3 website or the documentation provided by your DOM vendor.


IXMLNode.HasChildNodes
 VCL Reference

IXMLNode.HasChildNodes

IXMLNode	See also

Indicates whether this node has any child nodes.

property HasChildNodes: Boolean;

Description

HasChildNodes is True if the underlying DOM node has any child nodes, False if it has no children.

Note that in the underlying DOM implementation, given the following XML

<Title> Understanding XML </Title>

the “Title” node has a single child (a text node with the value ‘Understanding XML’).


IXMLNode.IsTextElement
 VCL Reference

IXMLNode.IsTextElement

IXMLNode 	See also

Indicates whether the node has a single text value.

property IsTextElement: Boolean;

Description

Read IsTextElement to determine whether this node represents a single text value. For example, if the node represents the following:

<Title> Understanding XML </Title>

IsTextElement is True, because the node represents a tagged element and the text that is its value.

Note:	In the underlying DOM implementation, nodes for which IsTextElement is True are element nodes that have a single child node that is a text node. IXMLNode flattens this out so that you can use the element node to work with the text value (through the Text property), rather than requiring you to use a separate node for the text value.


IXMLNode.LocalName
 VCL Reference

IXMLNode.LocalName

IXMLNode 	See also

Indicates the name of the node without any namespace prefix.

property LocalName: DOMString;

Description

Read LocalName to determine the local name of the underlying DOM node. LocalName is only defined for nodes of type ntElement or ntAttrribute.

For element nodes, LocalName is derived from the name that appears in the XML tag. For example, the local name for <xsi:Name First=John Last=Doe> is ‘Name’. (The string “xsi” is called the prefix).

For attribute nodes, the local name is derived from the string that appears to the left of the equals sign in the attribute declaration. For example, the element <xsi:Name xsi:First=John xsi:Last=Doe> results in two attribute nodes, with the local names ‘First’ and ‘Last’.

For any other node types, localName is nil.

To get the name of a node when localName is not defined, use the NodeName property instead. If the node’s name has no namespace prefix, LocalName has the same value as NodeName.


IXMLNode.NamespaceURI
 VCL Reference

IXMLNode.NamespaceURI

IXMLNode	See also

Identifies the URI for the namespace used in the qualified node name.

property NamespaceURI: DOMString;

Description

NamespaceURI is the URI for the namespace that should be used to interpret the node’s name.

Only element and attribute nodes can have a namespace URI value. For any other node type, NamespaceURI is an empty string.

The namespace URI is only available if it is explicitly assigned when the node is created. By default, IXMLNode does not assign namespaces to the new nodes it creates.


IXMLNode.NodeName
 VCL Reference

IXMLNode.NodeName

IXMLNode	See also

Indicates the node name.

property NodeName: DOMString;

Description

NodeName is the name of the underlying DOM node.

The node’s name depends on the type of the node, as indicated in the following table:

NodeType	NodeName

ntAttribute	The attribute name

ntElement	The tag name

ntText	‘#text’

ntCData	‘#cdata-section’

ntEntityRef	The name of the entity reference.

ntEntity	The entity name

ntProcessingInstr	the target of the processing instruction

ntComment	‘#comment’

ntDocument	‘#document’

ntDocType	The document type name

ntDocFragment	‘#document-fragment’

ntNotation	The notation name

Note:	If Prefix and LocalName are both defined for a node, the node name is the combination of these two values.


IXMLNode.NodeType
 VCL Reference

IXMLNode.NodeType

IXMLNode 	See also

Indicates the type of the node.

property NodeType: TNodeType;

Description

Read NodeType to determine the type of the node. The type reflects the way the node is used in the XML document.


IXMLNode.NodeValue
 VCL Reference

IXMLNode.NodeValue

IXMLNode	See also

Specifies the value of this node.

property NodeValue: OleVariant;

Description

Use NodeValue to get or set the value of the node. The meaning of a node’s value depends on the type of the node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, trying to read or set NodeValue causes an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

Trying to read or set the value of any other node type causes an exception.


IXMLNode.OwnerDocument
 VCL Reference

IXMLNode.OwnerDocument

IXMLNode	See also

Identifies the document in which this node appears.

property OwnerDocument: IXMLDocument;

Description

Read OwnerDocument to obtain the IXMLDocument interface of the document to which this node belongs.


IXMLNode.ParentNode
 VCL Reference

IXMLNode.ParentNode

IXMLNode 	See also

Identifies the interface of the node’s parent node.

property ParentNode: IXMLNode;

Description

Read ParentNode to access the node’s parent node.


IXMLNode.Prefix
 VCL Reference

IXMLNode.Prefix

IXMLNode	See also

Identifies the namespace prefix of the node’s name.

property Prefix: DOMString;

Description

Prefix is the namespace prefix of an element or attribute node’s name. A namespace prefix is a symbolic name for a namespace URI.

For element nodes, the namespace prefix is derived from the name that appears in the XML tag. For example, the namespace prefix for <xsi:Name First=John Last=Doe> is ‘xsi’.

For attribute nodes, the namespace prefix is derived from the string that appears to the left of the equals sign in the attribute declaration. For example the element <xsi:Name xsn:First=John Last=Doe> results in two attribute nodes, with namespace prefixes of ‘xsn’ and ‘’, respectively. Note that the attribute never inherits a namespace prefix from the node to which it is attached.

For any other node types, the namespace prefix is nil.


IXMLNode.ReadOnly
 VCL Reference

IXMLNode.ReadOnly

IXMLNode	See also

Specifies whether the node can be modified.

property ReadOnly: Boolean;

Description

ReadOnly specifies whether the value, child nodes, or attributes of the node can be changed. When ReadOnly is True, the node can’t be modified. Read-only nodes raise an exception when an attempt is made to modify them.

When ReadOnly is False, the node can be modified.


IXMLNode.Text
 VCL Reference

IXMLNode.Text

IXMLNode 	See also

Represents the Text of the node.

property Text: DOMString;

Description

Text represents the text of the node. For example, if the node corresponds to

<Title> Understanding XML </Title>

The text of the node is the string ‘Understanding XML’.

Text is intended for use nodes where the IsTextElement property is True. If IsTextElement is False, then

If the node has no children, the value of Text is an empty string. Setting Text is this case result in a node where IsTextElement isTrue.

If the node has children (other than a single DOM text node), reading or setting Text causes an exception.


IXMLNode.XML
 VCL Reference

IXMLNode.XML

IXMLNode	See also

Indicates the XML that corresponds to the subtree rooted at this node.

property XML: DOMString;

Description

XML is the XML that corresponds to the document fragment that consists of this node and any child nodes it contains.

Note:	XML is only available when the DOMVendor used to parse this node’s XML document is MSXML.


 VCL Reference

IXMLNode methods

IXMLNode	Alphabetically	Legend

In IXMLNode

AddChild

CloneNode

DeclareNamespace

FindNamespaceDecl

FindNamespaceURI

GetAttribute

GetAttributeNodes

GetAttributeNS

GetChildNodes

GetChildValue

GetCollection

GetDOMNode

GetHasChildNodes

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNodeName

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetReadOnly

GetText

HasAttribute

NextSibling

Normalize

PreviousSibling

Resync

SetAttribute

SetAttributeNS

SetChildValue

SetNodeValue

SetReadOnly

SetText

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IXMLNode methods

IXMLNode	By object	Legend

_AddRef

_Release

AddChild

CloneNode

DeclareNamespace

FindNamespaceDecl

FindNamespaceURI

GetAttribute

GetAttributeNodes

GetAttributeNS

GetChildNodes

GetChildValue

GetCollection

GetDOMNode

GetHasChildNodes

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNodeName

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetReadOnly

GetText

HasAttribute

NextSibling

Normalize

PreviousSibling

QueryInterface

Resync

SetAttribute

SetAttributeNS

SetChildValue

SetNodeValue

SetReadOnly

SetText


IXMLNode.AddChild
 VCL Reference

IXMLNode.AddChild

IXMLNode	See also

Adds a new child node to this node.

function AddChild(const TagName, NamespaceURI: DOMString; GenPrefix: Boolean = False; Index: Integer = -1): IXMLNode; overload;

function AddChild(const TagName: DOMString; Index: Integer = -1): IXMLNode; overload;

Description

AddChild creates a new element node as the child of this node.

TagName provides the tag name of the newly created node.

NamespaceURI identifies the namespace that includes the new node’s definition. If NamespaceURI is omitted (the second syntax), the namespace of the new node is deduced from the namespace prefix of TagName. If TagName has no namespace prefix and there is no NamespaceURI parameter, the namespace is the same as this node’s NamespaceURI property.

GenPrefix controls whether AddChild generates a namespace prefix for the namespace URI when the NamespaceURI parameter identifies a URI that is not already declared in the document. Note that setting GenPrefix to True does not cause AddChild to add a declaration of the new namespace prefix unless the document’s Options property includes doNamespaceDecl.

Index indicates the position of the child node in this node’s list of children, where 0 is the first position, 1 is the second position, and so on. If Index is –1, the new node is added to the end.

AddChild returns the interface for the newly created child node.

Tip:	AddChild only adds element nodes. To add other types of child nodes, use the XML document’s CreateNode method instead, and then add the resulting node to the ChildNodes property array.


IXMLNode.CloneNode
 VCL Reference

IXMLNode.CloneNode

IXMLNode	See also

Creates a copy of this node and returns its interface.

function CloneNode(Deep: Boolean): IXMLNode;

Description

CloneNode returns a copy of this node that has no parent. Any attributes of this node are copied as well, including attribute nodes that represent default values.

Deep indicates whether the child nodes of this node should be cloned as well. For example, if an element node contains any text, CloneNode only copies then text when deep is True, because in the underlying DOM implementation, the text is contained in a child node.

After calling CloneNode to create a new node, you can add that node into the ChildNodes  property of another node (or, if this node represents an attribute, into the AttributeNodes property) by calling ChildNodes.Add or ChildNodes.Insert.


IXMLNode.DeclareNamespace
 VCL Reference

IXMLNode.DeclareNamespace

IXMLNode	See also

Adds an attribute to the node that declares a specified namespace URI.

procedure DeclareNamespace(const Prefix, URI: DOMString);

Description

DeclareNamespace adds an attribute to this node that declares the specified namespace URI as the value of the specified prefix.

Prefix is the namespace prefix that appears in tag names that reference the namespace.

URI is the corresponding namespace URI.

Note:	This method is called automatically for newly created nodes when the document’s Options property includes doNamespaceDecl.


IXMLNode.FindNamespaceDecl
 VCL Reference

IXMLNode.FindNamespaceDecl

IXMLNode	See also

Returns the attribute node that declares a specified Namespace URI.

function FindNamespaceDecl(const NamespaceURI: DOMString): IXMLNode;

Description

FindNamespaceDecl searches the node hierarchy that contains this node for an attribute that specifies the mapping between a namespace prefix and the namespace URI identified by NamespaceURI. If it finds such a mapping, FindNamespaceDecl returns the interface for the Attribute node. If it does not find a mapping, FindNamespaceDecl returns nil.

NamespaceURI is the namespace URI to locate.


IXMLNode.FindNamespaceURI
 VCL Reference

IXMLNode.FindNamespaceURI

IXMLNode	See also

Returns the namespace URI for a namespace prefix or qualified tag name.

function FindNamespaceURI(const TagOrPrefix: DOMString): DOMString;

Description

FindNamespaceDecl searches the node hierarchy that contains this node for an attribute that specifies the mapping between the namespace prefix identified by TagOrPrefix and a namespace URI. If it finds such a mapping, FindNamespaceURI returns the namespace URI. If it does not find a mapping, FindNamespaceURI returns an empty string.

TagOrPrefix is the namespace prefix or a tag name that includes the namespace prefix.


IXMLNode.GetAttribute
 VCL Reference

IXMLNode.GetAttribute

IXMLNode	See also

Returns the value of one of this node’s attributes.

function GetAttribute(const AttrName: DOMString): OleVariant;

Description

GetAttribute is the read implementation of the Attributes property.

AttrName is the name of the attribute.

GetAttribute returns the value of the specified attribute. Typically, this value is a string. If the node does not have an attribute with the name specified by AttrName, GetAttribute returns a Null Variant.

Note:	Do not call GetAttribute unless this node is an element node. Only element nodes have attributes.


IXMLNode.GetAttributeNodes
 VCL Reference

IXMLNode.GetAttributeNodes

IXMLNode	See also

Returns the value of the AttributeNodes property.

function GetAttributeNodes: IXMLNodeList;

Description

GetAttributeNodes is the read implementation of the AttributeNodes property.


IXMLNode.GetAttributeNS
 VCL Reference

IXMLNode.GetAttributeNS

IXMLNode	See also

Returns the value of a specified attribute.

function GetAttributeNS(const AttrName, NamespaceURI: DOMString): OleVariant;

Description

Call GetAttributeNS to determine the value of an attribute when you must explicitly specify the namespace for the attribute.

AttrName is the name of the attribute whose value you want to fetch.

NamespaceURI identifies the namespace in which the attribute resides.

GetAttributeNS returns the value of the attribute. If AttrName and NamespaceURI do not identify an attribute of this node, GetAttributeNS returns a Null Variant.


IXMLNode.GetChildNodes
 VCL Reference

IXMLNode.GetChildNodes

IXMLNode	See also

Returns the value of the ChildNodes property.

function GetChildNodes: IXMLNodeList;

Description

GetChildNodes is the read implementation of the ChildNodes property.


IXMLNode.GetChildValue
 VCL Reference

IXMLNode.GetChildValue

IXMLNode	See also

Returns the value of a specified child node.

function GetChildValue(const IndexOrName: OleVariant): OleVariant;

Description

GetChildValue is the read implementation of the ChildValues property.

IndexOrName identifies the desired child node by either its interface, or by a string that is the local name of the child node.

The return value depends on the type of the child node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, reading the child’s value causes an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntEntityRef	nil

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

ntDocFragment	nil


IXMLNode.GetCollection
 VCL Reference

IXMLNode.GetCollection

IXMLNode	See also

Returns the value of the Collection property.

function GetCollection: IXMLNodeCollection;

Description

GetCollection is the read implementation of the Collection property.


IXMLNode.GetDOMNode
 VCL Reference

IXMLNode.GetDOMNode

IXMLNode	See also

Returns the value of the DOMNode property.

function GetDOMNode: IDOMNode;

Description

GetDOMNode is the read implementation of the DOMNode property.


IXMLNode.GetHasChildNodes
 VCL Reference

IXMLNode.GetHasChildNodes

IXMLNode	See also

Indicates whether the node has any child nodes.

function GetHasChildNodes: Boolean;

Description

GetHasChildNodes is the read implementation of the HasChildNodes property.


IXMLNode.GetIsTextElement
 VCL Reference

IXMLNode.GetIsTextElement

IXMLNode	See also

Indicates whether the node has a single text value.

function GetIsTextElement: Boolean;

Description

GetIsTextElement is the read implementation of the IsTextElement property.


IXMLNode.GetLocalName
 VCL Reference

IXMLNode.GetLocalName

IXMLNode	See also

Returns the name of the node without any namespace prefix.

function GetLocalName: DOMString;

Description

GetLocalName is the read implementation of the LocalName property.


IXMLNode.GetNamespaceURI
 VCL Reference

IXMLNode.GetNamespaceURI

IXMLNode	See also

Returns the namespace URI for the node’s qualified name.

function GetNamespaceURI: DOMString;

Description

GetNamespaceURI is the read implementation of the NamespaceURI property.


IXMLNode.GetNodeName
 VCL Reference

IXMLNode.GetNodeName

IXMLNode	See also

Returns the name of the node.

function GetNodeName: DOMString;

Description

GetNodeName is the read implementation of the NodeName property.


IXMLNode.GetNodeType
 VCL Reference

IXMLNode.GetNodeType

IXMLNode	See also

Returns the type of the node.

function GetNodeType: TNodeType;

Description

GetNodeType is the read implementation of the NodeType property.


IXMLNode.GetNodeValue
 VCL Reference

IXMLNode.GetNodeValue

IXMLNode	See also

Returns the value of the node.

function GetNodeValue: OleVariant;

Description

GetNodeValue is the read implementation of the NodeValue property.


IXMLNode.GetOwnerDocument
 VCL Reference

IXMLNode.GetOwnerDocument

IXMLNode	See also

Returns the interface for the document in which this node appears.

function GetOwnerDocument: IXMLDocument;

Description

GetOwnerDocument is the read implementation of the OwnerDocument property.


IXMLNode.GetParentNode
 VCL Reference

IXMLNode.GetParentNode

IXMLNode	See also

Returns the interface for the node’s parent node.

function GetParentNode: IXMLNode;

Description

GetParentNode is the read implementation of the ParentNode property.


IXMLNode.GetPrefix
 VCL Reference

IXMLNode.GetPrefix

IXMLNode	See also

Returns the namespace prefix from the node’s name.

function GetPrefix: DOMString;

Description

GetPrefix is the read implementation of the Prefix property.


IXMLNode.GetReadOnly
 VCL Reference

IXMLNode.GetReadOnly

IXMLNode	See also

Returns the value of the ReadOnly property.

function GetReadOnly: Boolean;

Description

GetReadOnly is the read implementation of the ReadOnly property.


IXMLNode.GetText
 VCL Reference

IXMLNode.GetText

IXMLNode	See also

Returns the text value of the node.

function GetText: DOMString;

Description

GetText is the read implementation for the Text property.


IXMLNode.GetXML
 VCL Reference

IXMLNode.GetXML

IXMLNode	See also

Returns the value of the XML property.

function GetXML: DOMString;

Description

GetXML is the read implementation of this node’s XML property.


IXMLNode.HasAttribute
 VCL Reference

IXMLNode.HasAttribute

IXMLNode	See also

Indicates whether the node has an attribute with a specified name.

function HasAttribute(const Name: DOMString): Boolean; overload;

function HasAttribute(const Name, NamespaceURI: DOMString): Boolean; overload;

Description

Call HasAttribute to determine whether this node has a specified attribute.

Name is the name of the attribute about which you want to know.

NamespaceURI is the namespace of the attribute.

HasAttribute returns True if this node has the specified attribute, False otherwise.


IXMLNode.NextSibling
 VCL Reference

IXMLNode.NextSibling

IXMLNode	See also

Returns the next child of this node’s parent.

function NextSibling: IXMLNode;

Description

NextSibling returns the node that follows this one in the parent node’s ChildNodes property list.

If this node is the last node in its parent’s child list, NextSibling raises an exception.


IXMLNode.Normalize
 VCL Reference

IXMLNode.Normalize

IXMLNode	See also

Converts the subtree beneath this node to the structure it would have if it were just loaded from a document.

procedure Normalize;

Description

Use the IXMLNode interface to call the protected Normalize method. Normalize consolidates adjacent text nodes and remove any empty text nodes in the subtree beneath this node. This method ensures that for all child nodes of this node and of its attributes, only structure nodes (element nodes, comments, processing instructions, CDATA sections, and entity references) separate text nodes and that there are no empty text nodes.


IXMLNode.PreviousSibling
 VCL Reference

IXMLNode.PreviousSibling

IXMLNode	See also

Returns the previous child of this node’s parent.

function PreviousSibling: IXMLNode;

Description

PreviousSibling returns the node that precedes this one in the parent node’s ChildNodes property list.

If this node is the first node in its parent’s child list, PreviousSibling raises an exception.


IXMLNode.Resync
 VCL Reference

IXMLNode.Resync

IXMLNode	See also

Forces all child nodes and attribute nodes to be reread from the underlying DOM implementation.

procedure Resync;

Description

Resync forces the node to reread the values of its child nodes and attribute nodes, discarding any changes that have not been propagated to the underlying DOM implementation.


IXMLNode.SetAttribute
 VCL Reference

IXMLNode.SetAttribute

IXMLNode	See also

Sets the value of one of this node’s attributes.

procecure SetAttribute(const AttrName: DOMString, const Value:OleVariant);

Description

SetAttribute is the write implementation for the Attributes property.

AttrName is the name of the attribute. If the attribute already exists for the node, its value is changed. If the attribute does not already exist, a new attribute is created.

Value is the value to assign to the attribute. This value is a string that is not parsed. Any markup (for example, for an entity reference) is treated as literal text, and must include appropriate escape sequences. If Value is nil, the attribute is removed from this node. If Value is an empty string, the attribute is assigned an empty value.


IXMLNode.SetAttributeNS
 VCL Reference

IXMLNode.SetAttributeNS

IXMLNode	See also

Sets the value of one of this node’s attributes when you must explicitly specify the attribute’s namespace.

procecure SetAttributeNS(const AttrName, NamespaceURI: DOMString, const Value:OleVariant);

Description

SetAttributeNS sets the value of a specified attribute of this node.

AttrName is the name of the attribute. If the attribute already exists for the node, its value is changed. If the attribute does not already exist, a new attribute is created.

NamespaceURI is the namespace for the attribute.

Value is the value to assign to the attribute. This value is a string that is not parsed. Any markup (for example, for an entity reference) is treated as literal text, and must include appropriate escape sequences. If Value is nil, the attribute is removed from this node. If Value is an empty string, the attribute is assigned an empty value.


IXMLNode.SetChildValue
 VCL Reference

IXMLNode.SetChildValue

IXMLNode	See also

Sets the value of a specified child node.

procedure SetChildValue(const IndexOrName: OleVariant; const Value: OleVariant);

Description

SetChildValue is the write implementation of the ChildValues property.

IndexOrName identifies the desired child node by either its interface, or by a string that is the local name of the child node.

Value is the value to assign.


IXMLNode.SetNodeValue
 VCL Reference

IXMLNode.SetNodeValue

IXMLNode	See also

Sets the value of this node.

procedure SetNodeValue(const Value: OleVariant);

Description

SetNodeValue is the write implementation of the NodeValue property.

Value is the value to assign.


IXMLNode.SetReadOnly
 VCL Reference

IXMLNode.SetReadOnly

IXMLNode	See also

Specifies whether the node can be modified.

procedure SetReadOnly(const Value: Boolean);

Description

SetReadOnly is the write implementation of the ReadOnly property.

Value is the new read-only status of the node.


IXMLNode.SetText
 VCL Reference

IXMLNode.SetText

IXMLNode	See also

Sets the text value of the node.

function SetText(const Value: DOMString);

Description

SetText is the write implementation for the Text property.

Value is the new text value for the node.


IXMLNode.TransformNode
 VCL Reference

IXMLNode.TransformNode

IXMLNode	See also

Transforms the subtree rooted at this node, using a specified XSL interface.

procedure TransformNode(const stylesheet: IXMLNode; var output: WideString); overload;

procedure TransformNode(const stylesheet: IXMLNode; const output: IXMLDocument); overload;

Description

Call TransformNode to transform the XML that is the value of the XML property using the transformation specified by an XSL document.

stylesheet is a node in an XML document that represents an XSL transformation. Typically, it is the document element of that document.

output represents the result of the transformation. If output is a WideString, TransformNode returns a string of XML. If output is the interface to an XML document, TransformNode replaces the content of that document with the results of the transformation.

Note:	TransformNode is only available when the DOMVendor used to parse this node’s XML document is MSXML.


Hierarchy

IInterface

IXMLNode


TPascalRemotableTypeRegistry
 VCL Reference

TPascalRemotableTypeRegistry

Hierarchy	Methods	See also

TPascalRemotableTypeRegistry is the type of the remotable type registry.

Unit

InvokeRegistry

Description

TPascalRemotableTypeRegistry manages information about remotable classes and types that can be communicated between client applications and a Web Service provider. Remotable classes can be used to represent non-scalar types for parameters and return values, or they can represent exceptions that occur when the Web Service application is trying to execute a request. All remotable classes are compiled with runtime type information (RTTI) and have a virtual constructor that the remotable type registry recognizes and uses to supply class instances. Remotable types include dynamic arrays, enumerated types, and boolean types, which can be used in an invokable interface without resorting to a remotable class representation, but which must be registered because their values require special marshaling.

Both the client application and server application must register remotable classes and types with the remotable type registry before they can use them. Use the RegisterXSClass method to register a remotable class. Use the RegiterXSInfo method to register a dynamic array type, enumerated type, or boolean type.

Do not create instances of TPascalRemotableTypeRegistry. Instead, use the global RemTypeRegistry function to access the remotable type registry. Most applications need only call the RegisterXSClass or RegisterXSInfo methods. The other TPascalRemotableTypeRegistry methods are used internally to create or look up information about remotable classes and types.


 VCL Reference

TPascalRemotableTypeRegistry methods

TPascalRemotableTypeRegistry	Alphabetically	Legend

In TPascalRemotableTypeRegistry

ClassOptions

Create

Destroy

GetExternalPropName

GetInternalPropName

GetURICount

GetURIMap

GetVarTypeFromXSD

GetXSDInfoForClass

InfoToURI

IsClassScalar

Lock

RegisterExternalPropName

RegisterXSClass

RegisterXSInfo

TypeInfoToXSD

UnLock

UnRegisterXSClass

UnRegisterXSInfo

URIToClass

URIToInfo

VariantToInfo

XSDToTypeInfo

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPascalRemotableTypeRegistry methods

TPascalRemotableTypeRegistry	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassOptions

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetExternalPropName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInternalPropName

GetURICount

GetURIMap

GetVarTypeFromXSD

GetXSDInfoForClass

InfoToURI

InheritsFrom

InitInstance

InstanceSize

IsClassScalar

Lock

MethodAddress

MethodName

NewInstance

RegisterExternalPropName

RegisterXSClass

RegisterXSInfo

SafeCallException

TypeInfoToXSD

UnLock

UnRegisterXSClass

UnRegisterXSInfo

URIToClass

URIToInfo

VariantToInfo

XSDToTypeInfo


TPascalRemotableTypeRegistry.Create
 VCL Reference

TPascalRemotableTypeRegistry.Create

TPascalRemotableTypeRegistry	See also

Creates and initializes a TPascalRemotableTypeRegistry object.

constructor Create;

Description

Do not create your own instances of TPascalRemotableTypeRegistry. Instead, use the global RemClassRegistry function, which provides access to a single global instance of TPascalRemotableTypeRegistry.


TPascalRemotableTypeRegistry.Destroy
 VCL Reference

TPascalRemotableTypeRegistry.Destroy

TPascalRemotableTypeRegistry	See also

Frees the memory associated with the TPascalRemotableTypeRegistry object.

destructor Destroy; override;

Description

Do not destroy the global TPascalRemotableTypeRegistry instance that is available through the RemClassRegistry function. This object is freed automatically when the application unloads the InvokeRegistry unit.


TPascalRemotableTypeRegistry.ClassOptions
 VCL Reference

TPascalRemotableTypeRegistry.ClassOptions

TPascalRemotableTypeRegistry	See also

Indicates how to handle multiple references to the same object when converting a specified remotable class to its SOAP representation.

function ClassOptions(AClass: TClass): TObjMultiOptions;

Description

When an application converts a remotable class to its SOAP representation, it can convert multiple references to the same object in one of two ways. It can treat the object as if its properties have meaning, but not the reference itself. (That is, two references to the same object are equivalent values, but not the same thing.) Alternately, if the object reference itself has meaning, it can encode the fact that these are multiple references to the same entity in the SOAP packet.

Individual remotable classes can specify how they want this conversion to be handled, overriding any defaults that would otherwise be used. For example, both THTTPRIO and THTTPSoapPascalInvoker use TOPToSoapDomConvert to convert between remotable classes and their SOAP representation. TOPToSoapDomConvert has an Options property that specifies, among other things, whether to encode multiple references to the same object by value or as references. Individual remotable classes can supply an override to this default strategy when they are registered using the RegisterXSClass method.

ClassOptions returns how to handle multiple references of a specified class.

AClass is the registered class that you want to know how to convert.


TPascalRemotableTypeRegistry.GetExternalPropName
 VCL Reference

TPascalRemotableTypeRegistry.GetExternalPropName

TPascalRemotableTypeRegistry	See also

Returns the name of the XML element that corresponds to a property of a registered remotable class.

function GetExternalPropName(Info: PTypeInfo; InternalName: string): InvString;

Description

Use GetExternalPropName to obtain the name of the XML element that was registered as the XML schema analog of a property on a registered remotable class. The association between the element and the property must be previously registered by the RegisterExternalPropname method.

Info points to the type information of the remotable class that has the property.

InternalName is the name of the property from which you want to obtain the corresponding XML element name.


TPascalRemotableTypeRegistry.GetInternalPropName
 VCL Reference

TPascalRemotableTypeRegistry.GetInternalPropName

TPascalRemotableTypeRegistry	See also

Returns the name of the property on a remotable class that corresponds to a specified XML element.

function GetInternalPropName(Info: PTypeInfo; ExternalName: InvString): string;

Description

Use GetInternalPropName to obtain the name of the property on a registered remotable class that corresponds to a specified XML element. The association between the element and the property must be previously registered by the RegisterExternalPropname method.

Info points to the type information of the remotable class that has the property.

ExternalName is the name of an XML element that is part of a complex type defined in an XML schema. The remotable class identified by Info must represent the complex type that includes ExternalName.


TPascalRemotableTypeRegistry.GetURICount
 VCL Reference

TPascalRemotableTypeRegistry.GetURICount

TPascalRemotableTypeRegistry	See also

Returns the number of entries in the remotable type registry.

function GetURICount: Integer;

Description

GetURICount returns the number of entries in the remotable type registry. This value can be used as an upper bound for the index parameter of the GetURIMap method.

Each entry in the remotable type registry represents a registered class or a registered type. The RegisterXSClass method adds entries for classes, and the The RegisterXSInfo method adds entries for types. Each entry associates the class or type with a unique namespace URI.


TPascalRemotableTypeRegistry.GetURIMap
 VCL Reference

TPascalRemotableTypeRegistry.GetURIMap

TPascalRemotableTypeRegistry	See also

Returns an entry from the remotable type registry.

type

  TRemRegEntry = record

    ClassType: TClass;

    Info: PTypeInfo;

    URI: WideString;

    Name: WideString;

    ExtName: WideString;

    IsScalar: Boolean;

    MultiRefOpt: TObjMultiOptions;

  end;

function GetURIMap(Index: Integer): TRemRegEntry;

Description

GetURIMap returns an entry from the remotable type registry that is identified by its index. It is useful for operations that iterate over all the registered entries. Use the GetURICount method to obtain an upper bound for the index.

Index is the index of the entry you want to see.

GetURIMap returns a TRemRegEntry record that describes a registered class or type. The RegisterXSClass method adds entries for classes, and the RegisterXSInfo method adds entries for types.

ClassType is the class reference for the class. It is not used for entries that represent .

Info is the type info pointer for a registered class or type.

URI is the namespace URI that the registry associates with the class or type.

Name is the type name of the class or type, as it appears in encoded method calls or WSDL documents.

ExtName is the same as Name.

IsScalar indicates whether the entry describes a class or type that is marshaled as a scalar type.

MultiRefOpt indicates how to marshal multiple instances of a registered class. It is not used for entries that represent types.


TPascalRemotableTypeRegistry.GetVarTypeFromXSD
 VCL Reference

TPascalRemotableTypeRegistry.GetVarTypeFromXSD

TPascalRemotableTypeRegistry	See also

Returns the variant type that corresponds to a registered remotable type.

function GetVarTypeFromXSD(URI, TypeName: InvString): TVarType;

Description

GetVarTypeFromXSD returns the built-in Variant type that corresponds most naturally to a remotable type that was registered by a call to the RegisterXSInfo method.

URI is the namespace URI associated with the type when it was registered.

TypeName is the type name associated with the type when it was registered.


TPascalRemotableTypeRegistry.GetXSDInfoForClass
 VCL Reference

TPascalRemotableTypeRegistry.GetXSDInfoForClass

TPascalRemotableTypeRegistry	See also

Returns type name and namespace URI that correspond to a remotable class.

procedure GetXSDInfoForClass(Info: PTypeInfo; var URI, TypeName: WideString);

Description

GetXSDInfoForClass returns the type name under which a remotable class is registered, along with the namespace URI in which that type name is defined. The class must be previously registered by a call to the RegisterXSClass method.

Info is the type info pointer for the registered remotable class.

URI returns the namespace URI that was associated with the class when it was registered.

TypeName returns the type name that was associated with the class when it was registered.


TPascalRemotableTypeRegistry.InfoToURI
 VCL Reference

TPascalRemotableTypeRegistry.InfoToURI

TPascalRemotableTypeRegistry	See also

Returns the namespace URI and type name for a registered type.

function InfoToURI(Info: PTypeInfo; var URI, Name: WideString; var IsScalar: Boolean): Boolean;

Description

InfoToURI returns the namespace URI and type name that is associated with the specified type description. This association is established when you register a type by calling the RegisterXSInfo method.

Info is a pointer to the TypeInfo record for the registered type.

URI returns the namespace URI that is associated with the type.

Name returns the registered name of the type.

IsScalar indicates whether the type corresponds to a scalar type in a WSDL document.


TPascalRemotableTypeRegistry.IsClassScalar
 VCL Reference

TPascalRemotableTypeRegistry.IsClassScalar

TPascalRemotableTypeRegistry	See also

Indicates whether a registered class represents a scalar type.

function IsClassScalar(AClass: TClass): Boolean;

Description

IsClassScalar returns True if the specified class represents a scalar type. Classes that represent scalar types descend from the TRemotableXS class, and can convert their value to or from a string.

AClass identifes the class to check. It must be previously registered by a call to RegisterXSClass.


TPascalRemotableTypeRegistry.Lock
 VCL Reference

TPascalRemotableTypeRegistry.Lock

TPascalRemotableTypeRegistry	See also

Prevents other threads from accessing the type registry.

procedure Lock; virtual;

Description

Lock uses a critical section to prevent simultaneous use of the type registry by multiple threads in the same application. Once one thread has called Lock to obtain access to the type registry, no other thread can return from the Lock method until the first thread has called the UnLock method to release its lock.

Typically, applications do not need to call the Lock method, because it is called automatically by the methods of TPascalRemotableTypeRegistry.


TPascalRemotableTypeRegistry.RegisterExternalPropName
 VCL Reference

TPascalRemotableTypeRegistry.RegisterExternalPropName

TPascalRemotableTypeRegistry

Registers the correspondence between a property name on a remotable class and the corresponding element name in an XML schema.

procedure RegisterExternalPropName(Info: PTypeInfo; InternalName: string; const ExternalName: InvString);

Description

Use RegisterExternalPropName to create an association between the name of an element in an XML schema complex type and the corresponding property of the remotable class that represents that type. This allows the remotable class to represent complex types that include elements with names that are not legal in Object Pascal (for example, keywords).

Info points to the type information of the remotable class that corresponds to a complex type defined in an XML schema.

InternalName is the name used for the property of the remotable class that corresponds to the element.

ExternalName is the name of the element that is part of the complex type that the XML schema defines.


TPascalRemotableTypeRegistry.RegisterXSClass
 VCL Reference

TPascalRemotableTypeRegistry.RegisterXSClass

TPascalRemotableTypeRegistry	See also

Registers a remotable class.

procedure RegisterXSClass(AClass: TClass; URI: WideString = ''; Name: WideString = ''; ExtName: WideString = ''; IsScalar: Boolean = False, MultiRefOpt:TObjMultiOptions = ocDefault);

Description

Call RegisterXSClass to register a remotable class so that it can be communicated between client applications and a Web Service provider. All remotable classes are compiled with runtime type information (RTTI) and have a virtual constructor that the remotable type registry recognizes and uses to supply class instances.

When the remotable class is a TRemotable descendant, it can be used to represent non-scalar types for parameters and return values on an invokable interface. When it is an ERemotableException descendant, it allows the Web Service application to send clients a fault packet that includes all the published properties of the exception class.

AClass is the class reference for the remotable class.

URI is the namespace URI to associate with that class. This should uniquely identify the class. If you supply an empty string (the default), RegisterXSClass generates a namespace URI for you, based on the name of the class, the name of the unit in which it is declared, and the value of the global AppNameSpacePrefix variable. Note that the namespace URI must be the same in both client and server applications. Thus, if you do not explicitly supply a namespace URI, the class must be declared in a unit with the same name, and the value of AppNameSpacePrefix must be the same in both applications.

Name is the name of a type that the class represents. This is used for the mapping between the class and its definition in a WSDL document.

ExtName is the same as Name.

IsScalar indicates whether the class represents a scalar type. Remotable classes that represent scalar types must implement the XSToNative and NativeToXS methods.

MultiRefOpt indicates how multiple references to the same instance of the class should be handled when converting them to their SOAP representation. For more information, see the ClassOptions method.


TPascalRemotableTypeRegistry.RegisterXSInfo
 VCL Reference

TPascalRemotableTypeRegistry.RegisterXSInfo

TPascalRemotableTypeRegistry	See also

Registers a remotable type.

procedure RegisterXSInfo(Info: PTypeInfo; URI: WideString = ''; Name: WideString = ''; ExtName: WideString = '');

Description

Call RegisterXSInfo to register a type that requires special marshaling but does not need to be represented by a TRemotable descendant before it can be marshaled for transport to or from a Web Services provider. Such types include dynamic arrays (such as the dynamic array types defined in the Types unit), enumerated types, and boolean types.

Info is the TypeInfo pointer for the type. It can be obtained using the global TypeInfo function.

URI is the namespace URI to associate with that type. This should uniquely identify the type. If you supply an empty string (the default), RegisterXSInfo generates a namespace URI for you, based on the name of the type, the name of the unit in which it is declared, and the value of the global AppNameSpacePrefix variable. Note that the namespace URI must be the same in both client and server applications. Thus, if you do not explicitly supply a namespace URI, the class must be declared in a unit with the same name, and the value of AppNameSpacePrefix must be the same in both applications.

Name is the name of the type as it appears in encoded method calls and WSDL documents.

ExtName is the same as Name.


TPascalRemotableTypeRegistry.TypeInfoToXSD
 VCL Reference

TPascalRemotableTypeRegistry.TypeInfoToXSD

TPascalRemotableTypeRegistry	See also

Returns the type name and namespace URI registered with a remotable class or type.

function TypeInfoToXSD(Info: PTypeInfo; var URI, TypeName: WideString): Boolean;

Description

TypInfoToXSD returns a type name and namespace URI from a type information pointer. The type information can describe either a remotable class that was previously registered by a call to RegisterXSClass, or a remotable type that was previously registered by a call to RegisterXSInfo.

Info is the type information pointer that describes the class or type.

URI returns the namespace URI that was associated with the class or type when it was registered.

TypeName returns the type name that was associated with the class or type when it was registered.


TPascalRemotableTypeRegistry.UnLock
 VCL Reference

TPascalRemotableTypeRegistry.UnLock

TPascalRemotableTypeRegistry	See also

Allows other threads to access the type registry after it was locked.

procedure UnLock; virtual;

Description

UnLock exits the critical section that the Lock method entered. It reenables other threads access to the type registry after a call to the Lock method.

Every call to the Lock method must be paired by a call to UnLock when the locking thread is finished with the type registry. The methods of TPascalRemotableTypeRegistry that call the Lock method also call the UnLock method when they are finished.


TPascalRemotableTypeRegistry.UnRegisterXSClass
 VCL Reference

TPascalRemotableTypeRegistry.UnRegisterXSClass

TPascalRemotableTypeRegistry	See also

Unregisters a remotable class.

procedure UnRegisterXSClass(AClass: TClass);

Description

Call UnRegisterXSClass to Unregister a remotable class that was previously registered by a call to the RegisterXSClass method. Typically, this call is made in the finalization section of the unit that implements the remotable class.

AClass is the class reference for the remotable class.


TPascalRemotableTypeRegistry.UnRegisterXSInfo
 VCL Reference

TPascalRemotableTypeRegistry.UnRegisterXSInfo

TPascalRemotableTypeRegistry	See also

Unregisters a remotable type.

procedure UnRegisterXSInfo(Info: PTypeInfo);

Description

Call UnRegisterXSInfo to unregister a type that was previously registered by a call to the RegisterXSInfo method.

Info is the TypeInfo pointer for the type. It is the same as the Info parameter of the RegisterXSInfo method.


TPascalRemotableTypeRegistry.URIToClass
 VCL Reference

TPascalRemotableTypeRegistry.URIToClass

TPascalRemotableTypeRegistry	See also

Returns the class associated with a specified namespace URI.

function URIToClass(URI, Name: WideString; var IsScalar: Boolean): TClass;

Description

URIToClass looks up a registered remotable class given its namespace URI and typename.

URI is the namespace URI associated with the class. This association is established by the RegisterXSClass method.

Name is the name of the type that the class represents. If the class does not have a corresponding type name, Name should be an empty string.

IsScalar returns True if the class represents a scalar type, False otherwise.

URIToClass returns the class reference for the class identified by URI (and Name).


TPascalRemotableTypeRegistry.URIToInfo
 VCL Reference

TPascalRemotableTypeRegistry.URIToInfo

TPascalRemotableTypeRegistry	See also

Returns the type information pointer for a registered remotable class or type.

function URIToInfo(URI, Name: WideString): PTypeInfo;

Description

URIToInfo looks up a registered remotable class or type given its namespace URI and typename. It returns the type information pointer that describes the type or class.

URI is the namespace URI associated with the class or type. This association is established by the RegisterXSClass or RegisterXSInfo method.

Name is the type name that was associated with the class or type when it was registered.

Tip:	To look up the type information for a namespace and type that may possibly represent a built-in XML schema type, use the XSDToTypeInfo method instead.


TPascalRemotableTypeRegistry.VariantToInfo
 VCL Reference

TPascalRemotableTypeRegistry.VariantToInfo

TPascalRemotableTypeRegistry	See also

Returns the TypeInfo pointer for the type of a specified Variant’s data.

function VariantToInfo(V: Variant; TryAllSchema: Boolean): PTypeInfo;

Description

VariantToInfo returns the TypeInfo pointer of the scalar type that represents the value of a Variant. If the Variant’s value is not a scalar type that can be marshaled without using a registered object or type, VariantToInfo raises an ETypeRegistryException exception.

V is the Variant for which you want the corresponding TypeInfo pointer.

TryAllSchema specifies whether VariantToInfo should check for corresponding scalar type definitions in the XML schema associated with this application, or whether it should check all the possible sets of XML schema types that are defined in the xmlschema unit.


TPascalRemotableTypeRegistry.XSDToTypeInfo
 VCL Reference

TPascalRemotableTypeRegistry.XSDToTypeInfo

TPascalRemotableTypeRegistry	See also

Returns the type information pointer associated with a specified type name.

function XSDToTypeInfo(URI, TypeName: WideString): PTypeInfo;

Description

XSDToTypeInfo looks up a namespace URI and typename, and returns the type information pointer that describes the corresponding Object Pascal type or class. Unlike the URIToInfo method, XSDToTypeInfo can look up built-in type correspondences that do not need to be registered.

URI is the namespace URI for the type.

TypeName is the type name to look up.


Hierarchy

TObject

TPascalRemotableTypeRegistry


TQueryRadioGroup
 VCL Reference

TQueryRadioGroup

Hierarchy	Properties	Methods	See also

TQueryRadioGroup creates an HTML radio group control to represent named parameter.

Unit

MidItems

Description

Add TQueryRadioGroup as the child of a TQueryFieldGroup component to add a radio group control that represents a parameter value. By default, the children of TQueryFieldGroup represent the parameters of an XML broker. However, TQueryRadioGroup can represent any named value that the InternetExpress application uses.

Use the properties and methods of TQueryRadioGroup to

Specify the field or parameter whose value the radio group displays.

Specify the possible values from which the user can choose.

Initialize the value of the radio group.

Specify a caption that describes the value of the radio group.

Customize the appearance of the radio group.

Fit the radio group into the tab order of the generated HTML form.


 VCL Reference

TQueryRadioGroup properties

TQueryRadioGroup	Alphabetically	Legend

In TQueryRadioGroup

Text

Derived from TWebRadioGroupInput

DisplayColumns

DisplayWidth

ReadOnly

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

ParamName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryRadioGroup properties

TQueryRadioGroup	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayColumns

DisplayWidth

FieldName

Items

ItemsField

Name

Owner

ParamName

ReadOnly

Style

StyleRule

TabIndex

Tag

Text

Values

ValuesField

VCLComObject


TQueryRadioGroup.Text
 VCL Reference

TQueryRadioGroup.Text

TQueryRadioGroup	See also

Specifies the initial value of the radio group.

property Text: string;

Description

Use Text to initialize the value that appears in the generated radio group. This should be one of the values listed in the Items property or in the field referenced by the ItemsField property.


 VCL Reference

TQueryRadioGroup methods

TQueryRadioGroup	Alphabetically	Legend

In TQueryRadioGroup

IsQueryField

Derived from TWebRadioGroupInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryRadioGroup methods

TQueryRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQueryRadioGroup.IsQueryField
 VCL Reference

TQueryRadioGroup.IsQueryField

TQueryRadioGroup	See also

Indicates whether the component generates a control that can appear in a query form.

class function IsQueryField: Boolean; override;

Description

Call IsQueryField to determine whether a Web display component generates a control that represents a named value in a query form (TQueryForm). IsQueryField returns True, because TQueryRadioGroup is designed specifically for use by TQueryFieldGroup.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebRadioGroupInput

TQueryRadioGroup


TQuerySelectOptions
 VCL Reference

TQuerySelectOptions

Hierarchy	Properties	Methods	See also

TQuerySelectOptions creates an HTML list control to represent a named parameter.

Unit

MidItems

Description

Add TQuerySelectOptions as the child of a TQueryFieldGroup component to add a list control that represents a parameter value. By default, the children of TQueryFieldGroup represent the parameters of an XML broker. However, TQuerySelectOptions can represent any named value that the InternetExpress application uses.

Use the properties and methods of TQuerySelectOptions to

Specify the field or parameter whose value the list box displays.

Specify the possible values from which the user can choose.

Assign an initial value to the list box.

Specify a caption that describes the value of the list box.

Customize the appearance of the list box.

Fit the list box into the tab order of the generated HTML form.


 VCL Reference

TQuerySelectOptions properties

TQuerySelectOptions	Alphabetically	Legend

In TQuerySelectOptions

Text

Derived from TWebSelectOptionsInput

DisplayRows

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

ParamName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQuerySelectOptions properties

TQuerySelectOptions	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayRows

FieldName

Items

ItemsField

Name

Owner

ParamName

Style

StyleRule

TabIndex

Tag

Text

Values

ValuesField

VCLComObject


TQuerySelectOptions.Text
 VCL Reference

TQuerySelectOptions.Text

TQuerySelectOptions	See also

Specifies the initial value selected in the list box.

property Text: string;

Description

Use Text to initialize the value of the generated list control. Text should specify one of the values listed in the Items property or referenced by the ItemsField property.


 VCL Reference

TQuerySelectOptions methods

TQuerySelectOptions	Alphabetically	Legend

In TQuerySelectOptions

IsQueryField

Derived from TWebSelectOptionsInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQuerySelectOptions methods

TQuerySelectOptions	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQuerySelectOptions.IsQueryField
 VCL Reference

TQuerySelectOptions.IsQueryField

TQuerySelectOptions	See also

Indicates whether the component generates a control that can appear in a query form.

class function IsQueryField: Boolean; override;

Description

Call IsQueryField to determine whether a Web display component generates a control that represents a named value in a query form (TQueryForm). IsQueryField returns True, because TQuerySelectOptions is designed specifically for use by TQueryFieldGroup.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebSelectOptionsInput

TQuerySelectOptions


TQueryText
 VCL Reference

TQueryText

Hierarchy	Properties	Methods	See also

TQueryText creates a single-line HTML input control to represent a named parameter.

Unit

MidItems

Description

Add TQueryText as the child of a TQueryFieldGroup component to add an edit control that represents a parameter value. By default, the children of TQueryFieldGroup represent the parameters of an XML broker. However, TQueryText can represent any named value that the InternetExpress application uses.

Use the properties and methods of TQueryText to

Specify the field or parameter whose value the control displays.

Assign an initial value to the control.

Specify a caption that describes the value of the control.

Customize the appearance of the input control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TQueryText properties

TQueryText	Alphabetically	Legend

In TQueryText

MaxWidth

Text

Derived from TWebTextInput

DisplayWidth

ReadOnly

Derived from TWebDataInput

Caption

FieldName

ParamName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryText properties

TQueryText	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

FieldName

MaxWidth

Name

Owner

ParamName

ReadOnly

Style

StyleRule

TabIndex

Tag

Text

VCLComObject


TQueryText.MaxWidth
 VCL Reference

TQueryText.MaxWidth

TQueryText	See also

Limits the length of text users can type into the control.

property MaxWidth: Integer;

Description

Use MaxWidth to limit the length of strings (in characters) that users can type into the generated control.

Note:	MaxWidth has no effect on the size of the generated control. To limit the size of the control, use the DisplayWidth property.


TQueryText.Text
 VCL Reference

TQueryText.Text

TQueryText	See also

Specifies the initial value of the generated control.

property Text: string;

Description

Use Text to initialize the value that appears in the generated display control.


 VCL Reference

TQueryText methods

TQueryText	Alphabetically	Legend

In TQueryText

Create

IsQueryField

Derived from TWebDataDisplay

Destroy

IsColumn

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryText methods

TQueryText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQueryText.Create
 VCL Reference

TQueryText.Create

TQueryText	See also

Creates and initializes an instance of TQueryText.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TQueryText at runtime. TQueryText components added at design time using the Web Page editor are instantiated automatically.


TQueryText.IsQueryField
 VCL Reference

TQueryText.IsQueryField

TQueryText	See also

Indicates whether the component generates a control that can appear in a query form.

class function IsQueryField: Boolean; override;

Description

Call IsQueryField to determine whether a Web display component generates a control that represents a named value in a query form (TQueryForm). IsQueryField returns True, because TQueryText is designed specifically for TQueryFieldGroup to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextInput

TQueryText


TQueryTextArea
 VCL Reference

TQueryTextArea

Hierarchy	Properties	Methods	See also

TQueryTextArea creates a multi-line HTML input control to represent named parameter.

Unit

MidItems

Description

Add TQueryTextArea as the child of a TQueryFieldGroup component to add a multi-line edit control that represents a parameter value. By default, the children of TQueryFieldGroup represent the parameters of an XML broker. However, TQueryTextArea can represent any named value that the InternetExpress application uses.

Use the properties and methods of TQueryTextArea to

Specify the field or parameter whose value the control displays.

Assign an initial value to the control.

Specify a caption that describes the value of the control.

Customize the appearance of the control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TQueryTextArea properties

TQueryTextArea	Alphabetically	Legend

In TQueryTextArea

Lines

Derived from TWebTextAreaInput

DisplayRows

DisplayWidth

ReadOnly

Wrap

Derived from TWebDataInput

Caption

FieldName

ParamName

Derived from TWebDataDisplay

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryTextArea properties

TQueryTextArea	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayRows

DisplayWidth

FieldName

Lines

Name

Owner

ParamName

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject

Wrap


TQueryTextArea.Lines
 VCL Reference

TQueryTextArea.Lines

TWebDataInput	See also

Specifies the initial value that appears in the multi-line edit control.

property Text: TStrings;

Description

Use Lines to initialize the value that appears in the generated display control.

Each string in the TStrings object designates a line in the text value. This may affect the formatting, depending on the value of Wrap.


 VCL Reference

TQueryTextArea methods

TQueryTextArea	Alphabetically	Legend

In TQueryTextArea

Create

Destroy

IsQueryField

Derived from TWebDataDisplay

IsColumn

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryTextArea methods

TQueryTextArea	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQueryTextArea.Create
 VCL Reference

TQueryTextArea.Create

TQueryTextArea	See also

Creates and initializes an instance of TQueryTextArea.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TQueryTextArea at runtime. TQueryTextArea components added at design time using the Web Page editor are instantiated automatically.


TQueryTextArea.Destroy
 VCL Reference

TQueryTextArea.Destroy

TQueryTextArea	See also

Frees an instance of TQueryTextArea.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the component reference is not nil, and only then calls Destroy.


TQueryTextArea.IsQueryField
 VCL Reference

TQueryTextArea.IsQueryField

TQueryTextArea	See also

Indicates whether the component generates a control that can appear in a query form.

class function IsQueryField: Boolean; override;

Description

Call IsQueryField to determine whether a Web display component generates a control that represents a named value in a query form (TQueryForm). IsQueryField returns True, because TQueryTextArea is designed specifically for TQueryFieldGroup to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextAreaInput

TQueryTextArea


TQueryButton
 VCL Reference

TQueryButton

Hierarchy	Properties	Methods	See also

TQueryButton is the base class for Web items that create HTML buttons that manage application-defined values.

Unit

MidItems

Description

Use TQueryButton as a base class in an InternetExpress application for components that generate the HTML statements defining a specialized button control for managing the application-defined input controls. TQueryButton objects are used by TQueryForm, which organizes the generated buttons and the input controls they manipulate.

TQueryButton defines properties and methods for

Generating the HTML code to define the button control.

Specifying tag attributes of the HTML button control, including those defined by a style sheet.

Associating the button with a Query form whose controls it influences.

Fitting the component into a hierarchy of Web items, each of which generates part of a larger HTML document.

In order to allow other Web items to use the HTML generated by the button control, TQueryButton inherits support for the IWebContent interface from TWebButton.

Do not create instances of TQueryButton. TQueryButton relies on an abstract method to generate the HTML statements defining a button control. Instead, create descendants of TQueryButton, such as TResetQueryButton or TSubmitQueryButton.


 VCL Reference

TQueryButton properties

TQueryButton	Alphabetically	Legend

In TQueryButton

Caption

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryButton properties

TQueryButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


TQueryButton.Caption
 VCL Reference

TQueryButton.Caption

TQueryButton	See also

Specifies the caption that appears on the button.

property Caption: string;

Description

Use Caption to specify the caption that appears on the generated HTML button. The value of Caption is used as the value of a VALUE parameter on the HTML INPUT tag generated to implement the button.


TQueryButton.XMLComponent
 VCL Reference

TQueryButton.XMLComponent

TQueryButton	See also

Associates the button with the query form whose display controls it influences.

property XMLComponent: TComponent;

Description

Set XMLComponent to specify the Web item that generates the form whose controls the query button influences. If this query form contains the TQueryButtons object that formats the query button with its siblings, you need not set the XMLComponent property. Instead, setting the XMLUseParent property to True (the default) sets XMLComponent to the Query form that contains the parent TQueryButtons object.


TQueryButton.XMLUseParent
 VCL Reference

TQueryButton.XMLUseParent

TQueryButton	See also

Specifies whether the button is associated with its parent’s query form.

property XMLUseParent: Boolean;

Description

Use XMLUseParent to indicate how the query button determines the form whose controls it influences. When XMLUseParent is False, the XMLComponent property must be set to indicate the query form. When XMLUseParent is True, the button influences controls on the query form that contains its parent TQueryButtons component.


 VCL Reference

TQueryButton methods

TQueryButton	Alphabetically	Legend

In TQueryButton

Create

Derived from TWebButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryButton methods

TQueryButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQueryButton.Create
 VCL Reference

 TQueryButton.Create

TQueryButton	See also

Creates and initializes an instance of TQueryButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a dataset button at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.

AOwner is the component that is responsible for freeing the query button. Typically, this is the Web module that contains the InterenetExpress page producer that uses the query button’s generated HTML.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TQueryButton


TQueryForm
 VCL Reference

TQueryForm

Hierarchy	Properties	Methods	See also

TQueryForm generates HTML forms for letting users enter application-defined values.

Unit

MidItems

Description

Add TQueryForm to the Web items of an InternetExpress page producer to add an HTML form that displays application-defined values that users can view and edit. Query forms submit these values to the InternetExpress application using a specified URL and method type.

TQueryForm generates the HTML FORM tag and assembles the HTML generated by its Web items. It restricts the Web items that generate the contents of the form to components that display application-defined values (TQueryFieldGroup), components that contain buttons to operate on those displays (TQueryButtons), and components that manage the layout of HTML controls (TLayoutGroup). At design time, you can add these Web items to the form using the Web page editor.


 VCL Reference

TQueryForm properties

TQueryForm	Alphabetically	Legend

Derived from TCustomQueryForm

Action

Method

Derived from TWebForm

Custom

Style

StyleRule

WebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryForm properties

TQueryForm	By object	Legend

Action

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Method

Name

Owner

Style

StyleRule

Tag

VCLComObject

WebComponents


 VCL Reference

TCustomQueryForm methods

TCustomQueryForm	Alphabetically	Legend

Derived from TCustomQueryForm

AssignStrings

Create

Derived from TWebForm

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomQueryForm methods

TCustomQueryForm	By object	Legend

AfterConstruction

Assign

AssignStrings

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebForm

TCustomQueryForm

TQueryForm


TRemotable
 VCL Reference

TRemotable

Hierarchy	Properties	Methods	Using TRemotable	See also

TRemotable is the base class for classes that can be passed as parameters or return values in a Web Service application.

Unit

InvokeRegistry

Description

Use TRemotable as a base class when defining a class that can be used for parameters or return values on an invokable interface. TRemotable descendants can represent non-scalar types, or scalar types that do not correspond to Object Pascal types. TRemotable is compiled with runtime type information (RTTI) and has a virtual constructor that the remotable class registry recognizes and uses to supply class instances.

Note:	To create a class that represents scalar values that do not correspond directly to an Object Pascal type, use TRemotableXS as a base class instead. TRemotableXS is a descendant of the TRemotable class.

Both the client application and server application must register a TRemotable descendant with the remotable class registry before they can use it. To register a remotable class, use the RegisterXSClass method of the object that the global RemTypeRegistry function returns.

On server applications, instances of TRemotable descendants that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TRemotable descendant is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TRemotable instances that it passes as input parameters, and for freeing any TRemotable instances it creates or that are returned as output parameters or method results.


 VCL Reference

TRemotable properties

TRemotable	Alphabetically	Legend

In TRemotable

DataContext


 VCL Reference

TRemotable properties

TRemotable	By object	Legend

DataContext


TRemotable.DataContext
 VCL Reference

TRemotable.DataContext

TRemotable

Specifies the object that controls the lifetime of a TRemotable instance.

property DataContext: TDataContext;

Description

By default, when a Web Service application creates an instance of a remotable object, that object exists only for the time it takes to marshal the information it represents or to unmarshal that information into the TRemotable instance and then make a method call that uses the instance. The object specified by DataContext handles the freeing of the TRemotable instance.

There are times when a server may not want the TRemotable instance to be so transient. For example, if the object contains state information, it may be more efficient to have a single instance that is used for every message call. If you change DataContext, the TRemotable instance is removed from the data context, and is not freed when the data context goes away at the end of the method call.

Note:	If DataContext is nil, the application is responsible for freeing the TRemotable instance. For example, TRemotable objects created on client applications are created with a nil value for DataContext and must be freed by the client application.


 VCL Reference

TRemotable methods

TRemotable	Alphabetically	Legend

In TRemotable

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRemotable methods

TRemotable	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TRemotable.Create
 VCL Reference

TRemotable.Create

TRemotable	See also

Creates and initializes a TRemotable object.

constructor Create; virtual;

Description

The TRemotable constructor does nothing special. It exists primarily because

The remotable type registry knows how to call it.

It is virtual, so that the remotable type registry can also instantiate descendant classes.


TRemotable.Destroy
 VCL Reference

TRemotable.Destroy

TRemotable	See also

Frees the memory associated with the TRemotable object.

destructor Destroy; override;

Description

Use the Free method to free a TRemotable instance. Free checks that the object is not nil before calling Destroy.

On server applications, there is typically no need to explicitly free a TRemotable instance (for example, one created as a return value or output parameter). By default, when a TRemotable descendant is created in a method that was called remotely using an invokable interface, it is added to a data context (the value of the DataContext property). As long as the remotable object belongs to the data context, the data context handles freeing the object. Similarly, TRemotable instances that are passed in as a parameter belong to the data context.

On client applications, TRemotable instances created and passed to an invokable interface or returned as a parameter or result of an invokable interface must be freed by the calling application.


Hierarchy

TObject

TRemotable


TRemotableXS
 VCL Reference

TRemotableXS

Hierarchy	Properties	Methods	Using TRemotableXS	See also

TRemotableXS is the base class for classes that represent a non-native scalar type on an invokable interface in a Web Service application.

Unit

InvokeRegistry

Description

Use TRemotableXS as a base class when defining a class to represent scalar values from a WSDL document that have no corresponding Object Pascal type. When creating a TRemotableXS descendant, override the XSToNative and NativeToXS methods to indicate how the value of the class can be converted to and from the string representation that is used to encode the value for transport.

Both the client application and server application must register a TRemotableXS descendant with the remotable class registry before they can use it. To register a remotable class, use the RegisterXSClass method of the object that the global RemTypeRegistry function returns.

On server applications, instances of TRemotableXS descendants that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TRemotableXS descendant is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TRemotableXS instances that it passes as input parameters, and for freeing any TRemotableXS instances it creates or that are returned as output parameters or method results.


 VCL Reference

TRemotableXS properties

TRemotableXS	Alphabetically	Legend

Derived from TRemotable

DataContext


 VCL Reference

TRemotableXS properties

TRemotableXS	By object	Legend

DataContext


 VCL Reference

TRemotableXS methods

TRemotableXS	Alphabetically	Legend

In TRemotableXS

NativeToXS

XSToNative

Derived from TRemotable

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRemotableXS methods

TRemotableXS	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

XSToNative


TRemotableXS.NativeToXS
 VCL Reference

TRemotableXS.NativeToXS

TRemotableXS	See also

Returns a string that represents the value of a TRemotableXS instance.

function NativeToXS: WideString; virtual;

Description

Override NativeToXS when implementing a TRemotableXS descendant that represents a non-native scalar type. NativeToXS returns a string that represents the value of the TRemotableXS instance. This string is used when marshaling the value of the TRemotableXS descendant.

Classes that implement NativeToXS must also override the XSToNative method so that it performs the converse transformation.


TRemotableXS.XSToNative
 VCL Reference

TRemotableXS.XSToNative

TRemotableXS	See also

Assigns the value of a string to the TRemotableXS instance.

procedure XSToNative(Data: WideString); virtual;

Description

Override XSToNative when implementing a TRemotableXS descendant that represents a non-native scalar type. NativeToXS interprets a string that represents the value of the TRemotableXS instance and uses it to make any necessary changes so that the TRemotableXS object reflects that value. It reverses the transformation that the NativeToXS method performs.

Data is a string that represents the value of the TRemotableXS instance.


Hierarchy

TObject

TRemotable

TRemotableXS


TRemoteServer
 VCL Reference

 TRemoteServer

Hierarchy	Properties	Methods	Events	See also

TRemoteServer handles a DCOM connection to a remote server in a client application that is part of a multi-tiered application.

Unit

MidasCon

Description

TRemoteServer is provided for backward compatibility. When writing client applications that connect to application servers using DCOM, use TDCOMConnection instead.


 VCL Reference

TRemoteServer properties

TRemoteServer	Alphabetically	Legend

Derived from TDCOMConnection

ComputerName

Derived from TCOMConnection

Connected

Derived from TDispatchConnection

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TRemoteServer properties

TRemoteServer	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ComputerName

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

ObjectBroker

Owner

ServerGUID

ServerName

Tag

VCLComObject


 VCL Reference

TRemoteServer events

TRemoteServer	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TRemoteServer events

TRemoteServer	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TRemoteServer methods

TRemoteServer	Alphabetically	Legend

Derived from TDCOMConnection

Create

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRemoteServer methods

TRemoteServer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TCOMConnection

TDCOMConnection

TRemoteServer


TRemoteDataModule
 VCL Reference

TRemoteDataModule

Hierarchy	Properties	Methods	Events	Using TRemoteDataModule	See also

TRemoteDataModule encapsulates the objects and interfaces of an application server in a multi-tiered database application.

Unit

DataBkr

Description

Use a TRemoteDataModule object as the central repository for all objects in an application server. Remote data modules can contain any nonvisual components. Typically these are data access components, such as datasets and the provider components that handle communication between these datasets and client applications. Remote data modules can also contain other nonvisual components, such as TTimer, or TImageList.

At design time a TRemoteDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. In the unit file for the remote data module a developer can also code any business rules that are to be centralized in the middle tier of a multi-tiered application.

Remote data modules are dual-interface Automation servers that implement the IAppServer interface.Connection components on client applications are designed to look for this interface.

To create a remote data module at design time, choose File|New, and select Remote Data Module from the multi-tiered page of the new items dialog. The Remote Data Module Wizard then creates a new descendant of TRemoteDataModule that supports an interface that descends from IAppServer.


 VCL Reference

TRemoteDataModule properties

TRemoteDataModule	Alphabetically	Legend

In TRemoteDataModule

ProviderCount

Providers

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TRemoteDataModule properties

TRemoteDataModule	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

ProviderCount

Providers

Tag

VCLComObject


TRemoteDataModule.ProviderCount
 VCL Reference

TRemoteDataModule.ProviderCount

TRemoteDataModule	See also

Indicates the number of providers registered with the remote data module.

property ProviderCount: Integer;

Description

ProviderCount is the number of providers that can be accessed using the Providers property.


TRemoteDataModule.Providers
 VCL Reference

TRemoteDataModule.Providers

TRemoteDataModule	See also

Lists the registered provider components that are contained in the remote data module.

property Providers[const ProviderName: string]: TCustomProvider;

Description

Use Providers to access a provider component from the remote data module given its name. The remote data module uses Providers to locate the target of method calls made using the IAppServer interface.

If the value passed as is not one of the names returned by AS_GetProviderNames (for example, if the provider’s Exported property is False) reading Providers raises an exception.


 VCL Reference

TRemoteDataModule events

TRemoteDataModule	Alphabetically	Legend

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TRemoteDataModule events

TRemoteDataModule	By object	Legend

OnCreate

OnDestroy


 VCL Reference

TRemoteDataModule methods

TRemoteDataModule	Alphabetically	Legend

In TRemoteDataModule

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

Create

Destroy

GetProvider

Lock

RegisterProvider

Unlock

UnRegisterProvider

UpdateRegistry

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRemoteDataModule methods

TRemoteDataModule	By object	Legend

AfterConstruction

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetProvider

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Lock

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterProvider

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Unlock

UnRegisterProvider

UpdateAction

UpdateRegistry


TRemoteDataModule.AS_ApplyUpdates
 VCL Reference

TRemoteDataModule.AS_ApplyUpdates

TRemoteDataModule	See also

Applies updates received from a client dataset using a specified provider.

function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

AS_ApplyUpdates writes client updates to a dataset or database server. ProviderName specifies the name of the provider component that manages the update operation. Delta is a Variant containing the updated, inserted, and deleted records to write to the database. MaxErrors indicates the maximum number of errors to permit before rolling back the update operation; ErrorCount returns the actual number of errors encountered during the update operation. OwnerData is information supplied by the client application in a BeforeApplyUpdates event handler and returned to the client application in an AfterApplyUpdates event handler. It is passed to the provider’s BeforeApplyUpdates event handler and returned from the provider’s AfterApplyUpdates event handler.

AS_ApplyUpdates returns a Variant that is a data packet containing all records that could not be applied.

Note:	Applications can only call the protected AS_ApplyUpdates method using the IAppServer interface. To apply updates directly in code from the application server, use the provider component’s ApplyUpdates method.


TRemoteDataModule.AS_DataRequest
 VCL Reference

TRemoteDataModule.AS_DataRequest

TRemoteDataModule	See also

Generates an OnDataRequest event on the specified provider component.

function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; safecall;

Description

Use AS_DataRequest to invoke an OnDataRequest event handler of the provider named by ProviderName. This method is provided to allow application developers to customize the communication between a client application and a provider component. There is no predefined meaning for the Data parameter or the return value.

Note:	Applications can only call the protected AS_DataRequest method using the IAppServer interface.


TRemoteDataModule.AS_Execute
 VCL Reference

TRemoteDataModule.AS_Execute

TRemoteDataModule	See also

Executes the query or stored procedure bound to a specified provider.

procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; var Params, OwnerData: OleVariant); safecall;

Description

Use AS_Execute to pass an execute command to a remote provider, using a specified set of parameters. AS_Execute calls the Execute method of the specified provider after assigning any parameters. Output parameters that result from executing a query or stored procedure are returned in the Params parameter.

Note:	AS_Execute should only be called for a provider whose dataset represents a query or stored procedure that does not return a cursor.

The ProviderName parameter specifies the name of the provider component associated with the query or stored procedure.

CommandText specifies an optional SQL statement that replaces the SQL of the provider’s query, or the name of a table or stored procedure that replaces the provider’s underlying database table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

The Params parameter encodes any parameters expected by the query or stored procedure and returns any output parameters. To create a properly encoded value for Params from a TParams object, use the PackageParams method.

The OwnerData parameter contains custom information that appears as an argument to the provider’s BeforeExecute and AfterExecute event handlers. This information originates in a client dataset’s BeforeExecute event handler. The value returned in OwnerData is passed to the client dataset’s AfterExecute event handler.

Note:	Applications can only call the protected AS_Execute method using the IAppServer interface. To execute a dataset in code from the application server, use the dataset component directly.


TRemoteDataModule.AS_GetParams
 VCL Reference

TRemoteDataModule.AS_GetParams

TRemoteDataModule	See also

Fetches current parameter values from the dataset bound to a specified provider.

function AS_GetParams(const ProviderName: WideString, var Ownerdata: OleVariant): OleVariant; safecall;

Description

Use AS_GetParams to retrieve the current parameter values from the dataset associated with a provider. The ProviderName parameter specifies the name of the provider component whose dataset has the parameters. The OwnerData represents custom information that originates in a client dataset’s BeforeGetParams event handler and returns information that is passed tot he client dataset’s AfterGetParams event handler.

AS_GetParams returns the parameters, encoded as a Variant array, or, if the provider does not support parameter fetching, AS_GetParams returns a Null Variant. Use the UnpackParams procedure to convert parameter values returned by AS_GetParams to a TParams object.

AS_GetParams should not be used to retrieve output parameters from stateless application servers, because parameter values may be changed by other applications. When writing a stateless application server, obtain output parameters using the AS_Execute method handler instead.

Note:	Applications can only call the protected AS_GetParams method using the IAppServer interface.


TRemoteDataModule.AS_GetProviderNames
 VCL Reference

TRemoteDataModule.AS_GetProviderNames

TRemoteDataModule	See also

Returns a list of all the available providers on the remote data module.

function AS_GetProviderNames: OleVariant; safecall;

Description

Call AS_GetProviderNames for a list of all registered providers available from a remote data module. These values indicate the possible values for the ProviderName property of a client dataset that connects to the remote data module. When calling any of the remote data modules through the IAppServer interface, pass one of these names to indicate the provider that is the target of the method call.

AS_GetProviderNames returns the names of the providers in a Variant array. Client datasets are associated with a provider by setting their ProviderName property to one of these names.

Note:	Applications can only call the protected AS_GetProviderNames method using the IAppServer interface.


TRemoteDataModule.AS_GetRecords
 VCL Reference

TRemoteDataModule.AS_GetRecords

TRemoteDataModule	See also

Returns a data packet that contains the specified data.

function AS_GetRecords(const ProviderName: WideString, Count: Integer; out RecsOut: Integer; Options: Integer; const CommandText: WideString; var Params, OwnerData:OleVariant): OleVariant; safecall;

Description

Call AS_GetRecords to retrieve a specified number of records. AS_GetRecords returns the requested records, starting with the current record of the provider’s dataset. When working with a stateless remote data module, you may need to reposition the cursor or re-execute a query or stored procedure in the provider’s BeforeGetRecords event handler.

ProviderName gives the name of the provider component that provides the records.

Count indicates the number or type of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only Count records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It is a combination of the GetRecordOption constants.  For example, the following value requests metadata along with a data packet encoded in XML:

MetaDataOption + XMLOption

CommandText specifies an optional SQL statement that replaces the SQL of the provider’s query, or the name of a table or stored procedure that replaces the provider’s underlying database table or stored procedure. This parameter is ignored if the provider’s Options property does not include poAllowCommandText.

Params is a Variant containing any parameters that should be passed to the provider’s dataset before it executes to generate the requested data. It returns any output parameters.

OwnerData contains custom information that is supplied by a client dataset’s BeforeGetRecords event handler. This information is passed to the provider’s BeforeGetRecords event handler. OwnerData returns information supplied by the provider’s AfterGetRecords event handler.

Records are returned as a data packet in a Variant.

Note:	Applications can only call the protected AS_GetRecords method using the IAppServer interface. To fetch records directly in code from the application server, use the provider component’s GetRecords method.


TRemoteDataModule.AS_RowRequest
 VCL Reference

TRemoteDataModule.AS_RowRequest

TRemoteDataModule	See also

Returns information from a specified record of the provider’s dataset.

function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

Client datasets call AS_RowRequest automatically to implement their FetchBlobs, FetchDetails , or RefreshRecord method.

The ProviderName parameter indicates the provider associated with the dataset from which information should be fetched.

The Row parameter is an OleVariant that describes the current record on the client dataset.

The RequestType parameter indicates the type of information required. It is an integer version of the TFetchOptions type. (An integer because the value may be marshaled to a remote application server). To create a value for RequestType, take the corresponding TFetchOptions value, cast it to a Byte, and cast the result to an Integer:

Integer(Byte([foBlobs, foDetails]));

OwnerData contains custom information that is supplied by a client dataset’s BeforeRowRequest event handler. This information is passed to the provider’s BeforeRowRequest event handler. OwnerData returns custom information supplied by the provider’s AfterRowRequest event handler.

The requested data is returned as a delta packet.

Note:	Applications can only call the protected AS_RowRequest method using the IAppServer interface.


TRemoteDataModule.Create
 VCL Reference

TRemoteDataModule.Create

TRemoteDataModule	See also

Creates a remote data module instance.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the constructor for TRemoteDataModule.  Instead, add a remote data module to a server application using the remote data module wizard on the multi-tier page of the new items dialog.

AOwner specifies the component that is responsible for freeing the remote data module (typically the application).


TRemoteDataModule.Destroy
 VCL Reference

TRemoteDataModule.Destroy

TRemoteDataModule	See also

Frees a remote data module instance.

destructor Destroy; override;

Description

Most applications do not need to call the destructor for TRemoteDataModule.  The remote data module is freed by its owner when the application shuts down.

If you must destroy a remote data module at runtime, call the Free method instead.


TRemoteDataModule.GetProvider
 VCL Reference

TRemoteDataModule.GetProvider

TRemoteDataModule	See also

Returns a registered provider component given its name.

function GetProvider(const ProviderName: string): TCustomProvider; virtual;

Description

GetProvider is the protected read implementation of the Providers property. ProviderName specifies the name of a provider that is returned. If ProviderName is not one of the names returned by AS_GetProviderNames (for example, if the provider’s Exported property is False), GetProvider raises an exception.


TRemoteDataModule.Lock
 VCL Reference

TRemoteDataModule.Lock

TRemoteDataModule	See also

Locks the remote data module so that it can’t be locked by other threads.

procedure Lock; virtual;

Description

Remote data modules use Lock internally to ensure that all IAppServer calls are thread-safe. When implementing a remote data module descendant that supports the free-threading model (including all multi-threaded CORBA data modules), call Lock before accessing any instance data, including the providers contained in the data module. When finished with the block of code that must be protected from thread conflicts, call the Unlock method to release the lock.

Lock uses a critical section to guard against thread conflicts. This means that any code which accesses the remote data module’s properties or contained objects must call Lock or it will introduce thread conflicts.


TRemoteDataModule.RegisterProvider
 VCL Reference

TRemoteDataModule.RegisterProvider

TRemoteDataModule	See also

Adds a provider to the list returned by AS_GetProviderNames.

procedure RegisterProvider(Value: TCustomProvider); virtual;

Description

Call RegisterProvider to make a provider available through the remote data module’s IAppServer interface. Pass a reference to the provider as the Value parameter. Once a provider is registered, its availability to client applications can be turned on or off using its Exported property.

There is no need to call RegisterProvider for providers that are added at design time or when the remote data module is assigned as an Owner in the provider’s constructor. These are registered automatically.

Before a registered provider is destroyed, it must be unregistered using the UnRegisterProvider method. Providers that have the remote data module as an Owner are unregistered automatically from their destructors.


TRemoteDataModule.Unlock
 VCL Reference

TRemoteDataModule.Unlock

TRemoteDataModule	See also

Unlocks the remote data module after it was locked by a call to the Lock method.

procedure Unlock; virtual;

Description

Use Unlock to release the critical section that was entered by a call to the Lock method. Every call to the Lock method must be paired with a corresponding call to Unlock.


TRemoteDataModule.UnRegisterProvider
 VCL Reference

TRemoteDataModule.UnRegisterProvider

TRemoteDataModule	See also

Removes a provider from the list returned by AS_GetProviderNames.

procedure UnRegisterProvider(Value: TCustomProvider); virtual;

Description

Call UnRegisterProvider to remove a provider from the remote data module’s list of available providers. Pass a reference to the provider that should be removed as the Value parameter. When a provider is not registered, it is not returned by the AS_GetProviderNames method, which can be accessed through the IAppServer interface.

To temporarily disable a provider, use the provider’s Exported property. Unexported providers can’t be accessed through any IAppServer method calls.

Before a registered provider is destroyed, it must be unregistered using the UnRegisterProvider method. Providers that have the remote data module as an Owner are unregistered automatically from their destructors.


TRemoteDataModule.UpdateRegistry
 VCL Reference

TRemoteDataModule.UpdateRegistry

TRemoteDataModule	See also	Example

Registers the remote data module in the system registry as an automation server.

class procedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); override;

Description

The protected UpdateRegistry is called automatically when you register or unregister the application server as an automation server.

The Register parameter is True when registering an application server, false when unregistering.

The ClassID and ProgID parameters specify the server’s ClassID and ProgID respectively.

Note:	If your application server pools remote data modules, you must override this method to call the global RegisterPooled procedure when the Register parameter is True and UnregisterPooled when the Register parameter is false.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TRemoteDataModule


TResetQueryButton
 VCL Reference

TResetQueryButton

Hierarchy	Properties	Methods	See also

TResetQueryButton generates an HTML control that backs out changes to the values on a query form.

Unit

MidItems

Description

Add TResetQueryButton as the child of a TQueryButtons component (or a layout group that is a child of a TQueryButtons component) to enable the generated HTML form to undo edits made in the query form’s display fields. The resulting HTML button’s action backs out all edits to the values displayed on the query form.

Use the properties of TResetQueryButton to customize the appearance of the button.


 VCL Reference

TResetQueryButton properties

TResetQueryButton	Alphabetically	Legend

Derived from TQueryButton

Caption

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TResetQueryButton properties

TResetQueryButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TResetQueryButton methods

TResetQueryButton	Alphabetically	Legend

In TResetQueryButton

Create

Derived from TWebButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TResetQueryButton methods

TResetQueryButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TResetQueryButton.Create
 VCL Reference

TResetQueryButton.Create

TResetQueryButton	See also

Creates and initializes an instance of TResetQueryButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TResetQueryButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TQueryButton

TResetQueryButton


DisableSocketTransport procedure
 VCL Reference

DisableSocketTransport procedure

See also	Example

Unregisters a remote data module so clients can’t access it using a Socket connection.

Unit

DataBkr

Category

multi-tier support

procedure DisableSocketTransport(const ClassID: string);

Description

The remote data module Wizard automatically adds a call to DisableSocketTransport to the overridden UpdateRegistry method of the new remote data module descendant. This removes the registry entries that Scktsrvr.exe uses to check whether clients can access the application server. The registry entries are added by a call to EnableSocketTransport (also added to UpdateRegistry).

To make an application server unavailable to Socket-based connections, remove these two calls from UpdateRegistry. The application server can still receive requests over connections formed using other protocols.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls DisableSocketTransport.


DisableWebTransport procedure
 VCL Reference

DisableWebTransport procedure

See also	Example

Unregisters a remote data module so clients can’t access it using a Web connection.

Unit

DataBkr

Category

multi-tier support

procedure DisableWebTransport(const ClassID: string);

Description

The remote data module Wizard automatically adds a call to DisableWebTransport to the overridden UpdateRegistry method of the new remote data module descendant. This removes the registry entries that httpsrvr.dll uses to check whether clients can access the application server. The registry entries are added by a call to EnableWebTransport (also added to UpdateRegistry).

To make an application server unavailable to HTTP-based connections, remove these two calls from UpdateRegistry. The application server can still receive requests over connections formed using other protocols.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls DisableSocketTransport.


EnableSocketTransport procedure
 VCL Reference

EnableSocketTransport procedure

See also	Example

Registers a remote data module so clients can access it using a Socket connection.

Unit

DataBkr

Category

multi-tier support

procedure EnsableSocketTransport(const ClassID: string);

Description

The remote data module Wizard automatically adds a call to EnableSocketTransport to the overridden UpdateRegistry method of the new remote data module descendant. This adds the registry entries that Scktsrvr.exe uses to check whether clients can access the application server. The registry entries are removed by a call to EnableSocketTransport (also added to UpdateRegistry).

To make an application server unavailable to Socket-based connections, remove these two calls from UpdateRegistry. The application server can still receive requests over connections formed using other protocols.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls EnableSocketTransport.


EnableWebTransport procedure
 VCL Reference

EnableWebTransport procedure

See also	Example

Registers a remote data module so clients can access it using a Web connection.

Unit

DataBkr

Category

multi-tier support

procedure EnableWebTransport(const ClassID: string);

Description

The remote data module Wizard automatically adds a call to EnableWebTransport to the overridden UpdateRegistry method of the new remote data module descendant. This adds the registry entries that httpsrvr.dll uses to check whether clients can access the application server. The registry entries are removed by a call to DisableWebTransport (also added to UpdateRegistry).

To make an application server unavailable to HTTP-based connections, remove these two calls from UpdateRegistry. The application server can still receive requests over connections formed using other protocols.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls DisableSocketTransport.


RegisterPooled procedure
 VCL Reference

RegisterPooled procedure

See also	Example

Registers a remote data module so that instances are pooled.

Unit

DataBkr

Category

multi-tier support

procedure RegisterPooled(const ClassID: string; Max, Timeout: Integer; Singleton: Boolean = False);

Description

To enable remote data module instances to be pooled, call RegisterPooled from the UpdateRegistry method of a TRemoteDataModule descendant. When data module instances are pooled, the server maintains a cache of remote data module instances. Each client request is serviced by the first available instance from that cache. Because instances are shared, the remote data module can’t rely on persistent state information.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls RegisterPooled.

Max indicates the maximum number of instances in the pool. If client applications request more than this maximum number, the application server raises a “Server too busy” exception.

Timeout indicates the number of minutes a remote data module instance can sit idle in the object pool. If an instance receives no client requests for more than Timeout minutes, it is automatically freed. The server checks every 6 minutes, so an object may persist in an idle state up to 6 minutes longer than Timeout. Setting Timeout to 0 indicates an infinite timeout period (that is, unused objects are not freed until the application server shuts down).

Singleton indicates that all client calls go to the same remote data module instance. There is only a single instance rather than a pool of available instances. Only set Singleton to True if the remote data module is free-threaded.

Note:	When Singleton is True, the values of Max and Timeout are ignored because there is only one instance with no timeout period.


UnregisterPooled procedure
 VCL Reference

UnregisterPooled procedure

See also	Example

Removes the object pooling registry entries for a remote data module.

Unit

DataBkr

Category

multi-tier support

procedure UnregisterPooled(const ClassID: string);

Description

When remote data module instances are pooled, call UnregisterPooled from the UpdateRegistry method of a TRemoteDataModule descendant. This unregisters the object pooling at the same time the remote data module is unregistered as an automation server.

ClassID is the class ID of the remote data module. This value is passed as a parameter to the UpdateRegistry method that calls UnregisterPooled.


SafeRef function
 VCL Reference

SafeRef function

See also

Returns a reference to a transactional object that is safe to pass outside its context.

Unit

Mtx

Category

COM utilities

function SafeRef(const rid: TGUID; Unk: IUnknown): Pointer;

Description

SafeRef encapsulates the SafeRef MTS function that passes in

a reference to the interface ID of the interface (rid) that the current object wants to pass to another object or client

and

a reference to an interface on the current object (Unk).

SafeRef returns a pointer to the interface specified in the rid parameter that is safe to pass outside the current object's context.

When using COM+, it is always safe to pass a self-reference to a client or other object. Thus, when you call SafeRef in an application that is running under a version of Windows that implemnts COM+, SafeRef simply returns the pointer passed as Unk. Thus, it is not necessary to call SafeRef for COM+ applications. It will, however, do no harm in an application that is used under both MTS and COM+.

Under MTS, and should always call SafeRef before passing a self-reference to a client or other object and then pass the reference returned by this call. Under MTS, it is not safe for an object to pass a self pointer, or a self-reference obtained through an internal call to QueryInterface, to a client or to any other object. Once such a reference is passed outside the object's context, it is no longer a valid reference.

Calling SafeRef on a reference that is already safe returns the safe reference unchanged, except that the reference count on the interface is incremented.

When a client calls QueryInterface on a reference that is safe, MTS automatically ensures that the reference returned to the client is also a safe reference.

An object that obtains a safe reference must release the safe reference when it is finished with it.

Under MTS, safe references have different pointer values than their unsafe counterparts. For example, self and the safe version of self do not have the same value. It is important to be aware of this when testing whether two pointers refer to the same object. Calling QueryInterface for IID_IUnknown on each of the pointers and comparing the value of the returned pointers may result in the wrong conclusion. It is possible that both pointers refer to the same object, but that one is a safe reference and the other is not. If both references are safe references, they can be compared in the usual way. This is only a consideration for MTS objects, because clients should never have access to unsafe references.


CreateSharedPropertyGroup function
 VCL Reference

CreateSharedPropertyGroup function

See also

Returns the interface for a SharedPropertyGroup that allows MTS objects within a server process to share state.

Unit

Mtx

Category

COM utilities

function CreateSharedPropertyGroup(const Name: WideString): ISharedPropertyGroup;

Description

CreateSharedPropertyGroup returns an interface to a new shared property group. If a property group of the specified name exists, it returns a reference to the existing shared property group. Use this function to create and access the shared properties of a shared property group.

CreateSharedPropertyGroup sets up a SharedPropertyGroup with the default values of LockSetGet for locking (isolation) mode, and Process for release mode. LockSetGet locks a property during every get or set operation on a shared property, making each operation atomic. This ensures that two clients cannot read or write to the same property at the same time, but it does not prevent other clients from concurrently accessing other properties in the same group. The Process release mode ensures that the property group is not destroyed until the process in which it was created has terminated.  (Objects that hold references on a property group must still call Release on their references).

To override these defaults, call CreateSharedPropertyGroupManager and use the resulting interface to create a property group.

ISharedPropertyGroup has several methods that can be used to share state among multiple objects in a server process. See ISharedPropertyGroup in the MTS documentation for a list of methods.

By using shared property groups, you eliminate name collisions because they establish unique name spaces for the shared properties they contain. The Shared Property Manager also implements locks and semaphores to protect shared properties from simultaneous access, which could result in lost updates and could leave the properties in an unpredictable state.

Note:	Only objects running in the same process can share properties. If you want instances of different components to share properties, you have to install the components in the same MTS package. Because there is a risk that administrators will move components from one package to another, it's safest to limit the use of a shared property group to instances of components that are defined in the same DLL.


CreateSharedPropertyGroupManager function
 VCL Reference

CreateSharedPropertyGroupManager function

See also

Returns an interface for a new shared property group manager that creates and coordinates shared properties of MTS objects.

Unit

Mtx

Category

COM utilities

function CreateSharedPropertyGroupManager: ISharedPropertyGroupManager;

Description

Call CreateSharedPropertyGroupManager before creating shared property groups if you are not using the CreateSharedPropertyGroup function. The ISharedPropertyGroupManager interface lets you create and access shared properties with more control that is provided by CreateSharedPropertyGroup.

By using shared property groups, you eliminate name collisions because they establish unique name spaces for the shared properties they contain. The Shared Property Manager also implements locks and semaphores to protect shared properties from simultaneous access, which could result in lost updates and could leave the properties in an unpredictable state.

For more information about the ISharedPropertyGroupManager interface, see the MTS documentation.


CreateTransactionContext function
 VCL Reference

CreateTransactionContext function

See also	Example

Starts an MTS transaction.

Unit

Mtx

Category

COM utilities

function CreateTransactionContext: ITransactionContext;

Description

CreateTransactionContext allows client applications to control MTS transactions. CreateTransactionContext returns an interface to the new transaction context. Use this interface to enlist MTS server objects in the transaction, and to commit or roll back the transaction when done.


CreateTransactionContextEx function
 VCL Reference

CreateTransactionContextEx function

See also	Example

Instantiates a TransactionContextEx object, which marks the beginning of a transaction.

Unit

Mtx

Category

COM utilities

function CreateTransactionContextEx: ITransactionContextEx;

Description

MTS base clients use CreateTransactionEx to combine the work of one or more MTS objects into an atomic transaction and to commit or abort the transaction. Clients initiate a transaction by instantiating a CreateTransactionEx object; they end a transaction by calling Complete or Abort on the object.

ITransactionContextEx exposes the following methods:

Method	Description

Abort	Aborts the work of all MTS objects participating in the current transaction. The transaction is completed on return from this method.

Commit	Attempts to commit the work of all MTS objects participating in the current transaction. If any of the MTS objects participating in the transaction call SetAbort or DisableCommit, or if a system error occurs, the transaction is aborted. Otherwise, the transaction is committed. In either case, the transaction is completed on return from this method.

CreateInstance	Instantiates another MTS object. If the component that provides the object is configured to support or require a transaction, then the new object runs under the transaction of the TransactionContextEx object.


 VCL Reference


CreateDOMNode function
 VCL Reference

CreateDOMNode function

Creates a new DOM node and returns its interface.

function CreateDOMNode(Doc: IDOMDocument; const NameOrData: DOMString; NodeType: TNodeType = ntElement; const AddlData: DOMString = ''): IDOMNode;

Description

CreateDOMNode generates a new DOM node.

Doc is the DOM interface for the document to which the new node will belong.

NameOrData provides the tag name or value of the newly created node. Its interpretation depends on the type of node created, as indicated in the following table:

NodeType	NameOrData

ntElement	The tag name.

ntAttribute	The attribute name.

ntText	The value of the node.

ntCData	The value of the CDATA section.

ntEntityRef	The name of the referenced entity.

ntProcessingInstr	The target of the processing instruction.

ntComment	The value (text) of the comment.

ntDocFragment	Not used.

NodeType indicates the type of node to create. It can only be one of the types listed in the previous table.

The meaning of AddlData depends on the node type, as indicated in the following table:

NodeType	AddlData

ntElement	The namespace URI that qualifies the tag name.

ntAttribute	The namespace URI that qualifies the attribute name.

ntProcessingInstr	The content of the processing instruction, except for the target.

CreateDOMNode returns the interface for the newly created DOM node.


FormatXMLData function
 VCL Reference

FormatXMLData function

Formats a string of XML so that it is more readable.

Unit

XMLDoc

Category

XML support

function FormatXMLData(const XMLData: DOMString): DOMString;

Description

Use FormatXMLData to convert a string of XML into a format that represents its structure. FormatXMLData changes the input string (XMLData) so that each element node appears on its own line, indented appropriately to reflect its nesting in the node hierarchy.


LoadXMLDocument function
 VCL Reference

LoadXMLDocument function

See also

Returns the interface for an XML document given the name of an XML file.

Unit

XMLDoc

Category

XML support

function LoadXMLDocument(const FileName: DOMString): IXMLDocument;

Description

Call LoadXMLDocument to load an XML document from a file on disk and obtain its interface. LoadXMLDocument creates a new TXMLDocument object and uses it to parse the file specified by the FileName parameter. The TXMLDocument component is not given an owner, which means that it behaves like an interfaced object. When the application releases the interface that LoadXMLDocument returns, the TXMLDocument instance is automatically freed.


LoadXMLData function
 VCL Reference

LoadXMLData function

See also

Creates and returns the interface of an XML document object, given a string of XML.

Unit

XMLDoc

Category

XML support

function LoadXMLDocument(const XMLData: DOMString): IXMLDocument; overload;

function LoadXMLDocument(const XMLData: string): IXMLDocument; overload;

Description

Call LoadXMLData to create an XML document that represents a specified XML string and obtain its interface. LoadXMLData creates a new TXMLDocument object and uses it to parse the XML specified by the XMLText parameter. The TXMLDocument component is not given an owner, which means that it behaves like an interfaced object. When the application releases the interface that LoadXMLData returns, the TXMLDocument instance is automatically freed.


NewXMLDocument function
 VCL Reference

NewXMLDocument function

See also

Returns the interface for a new, empty XML document.

Unit

XMLDoc

Category

XML support

function NewXMLDocument(Version: DOMString = '1.0'): IXMLDocument;

Description

Call NewXMLDocument to create a TXMLDocument object for a new, empty XML document.

Version specifies the XML version that the document should use. It becomes the value of the new document’s Version property.


XMLDocError procedure
 VCL Reference

XMLDocError procedure

See also

Raises an EXMLDocError exception.

Unit

XMLDoc

Category

XML support

procedure XMLDocError(const Msg: string); overload;

procedure XMLDocError(const Msg: string; const Args: array of const); overload;

Description

Call XMLDocError to raise an EXMLDocError exception. Using XMLDocError rather than explicitly creating the EXMLDocError instance can result in more space-efficient code.

Msg is the error message associated with the EXMLDocError instance.

Args supplies arguments for any format specifiers embedded in Msg.


DefaultVendorName variable
 VCL Reference

DefaultVendorName variable

See also

Identifies the DOM implementation that is used by default.

Unit

XMLDOM

Category

XML support

var DefaultVendorName: string;

Description

DefaultVendorName is the descriptive string that was used to register the default DOM implementation. The default DOM implementation is used to parse an XML document when a vendor is not explicitly specified.

Tip:	To obtain the IDOMImplementation interface from DefaultVendorName, use the global GetDOMVendor function.


DOMVendors variable
 VCL Reference

DOMVendors variable

See also

Lists all registered DOM Vendors.

Unit

XMLDOM

Category

XML support

var DOMVendors: TDOMVendorList;

Description

Use DOMVendors to determine all the DOM implementations currently registered with an application. For example, you can iterate through the Vendors property to obtain each registered TDOMVendor object, which can then be used to extract its IDOMImplementation interface or a descriptive string. Any of the TDOMVendor objects in the list can be assigned as the DOMVendor property of an XML document component.

Do not add or delete vendors using this global variable: Instead, add and remove vendors by calling the RegisterDOMVendor or UnregisterDOMVendor procedure.


ExtractLocalName function
 VCL Reference

ExtractLocalName function

See also

Strips the namespace prefix, if present, from the tag name of an XML node.

Unit

XMLDOM

Category

XML support

function ExtractLocalName(const AName: DOMString): DOMString;

Description

Call ExtractLocalName to convert a full tag name for an XML node into the corresponding local name.

AName is the tag name to be converted.

ExtractLocalName returns the value of AName with any namespace prefix stripped away.


ExtractPrefix function
 VCL Reference

ExtractPrefix function

See also

Returns the namespace prefix of an XML node’s tag name.

Unit

XMLDOM

Category

XML support

function ExtractPrefix(const AName: DOMString): DOMString;

Description

Call ExtractPrefix to determine the namespace prefix, if any, of a full tag name for an XML node.

AName is the tag name of the XML node.

ExtractPrefix returns the namespace prefix, not including the colon (:) that separates the namespace from the local name of the XML node. If the tag name does not include a namespace prefix, ExtractPrefix returns an empty string.


GetDOM function
 VCL Reference

GetDOM function

See also

Returns the top-level DOM interface for a registered DOM implementation.

Unit

XMLDOM

Category

XML support

function GetDOM(const VendorDesc: string = ''): IDOMImplementation;

Description

Call GetDOM to obtain an IDOMImplementation interface that you can use for parsing and editing XML documents. The IDOMImplementation interface is the top-level DOM interface, which you can use to check for the presence of a specific feature or to obtain an interface for working with a DOM document.

VendorDesc is a short descriptive name that identifies the DOM implementation. This name is returned by the Description method of the DOM implementation factory that is used to register the implementation.

Note:	The DOM implementation must be registered before you can access it using GetDOM. To register a DOM implementation, use the RegisterDOMVendor procedure.


GetDOMVendor function
 VCL Reference

GetDOMVendor function

See also

Returns the TDOMVendor object for a specified DOM vendor.

Unit

XMLDOM

Category

XML support

function GetDOMVendor(VendorDesc: string): TDOMVendor;

Description

Call GetDOMVendor to obtain the TDOMVendor object that represents a registered DOM implementation. You can then assign this return value as the DOMVendor property of TXMLDocument, or call this object’s DOMImplementation method to access the IDOMImplementation interface for the DOM implementation.

VendorDesc is the descriptive string that identifies the particular DOM implementation that is desired. This is the value returned by the TDOMVendor object’s Description method.


IsPrefixed function
 VCL Reference

IsPrefixed function

See also

Indicates whether an XML tag name includes a namespace prefix.

Unit

XMLDOM

Category

XML support

function IsPrefixed(const AName: DOMString): Boolean;

Description

Call IsPrefixed to determine whether a tag name includes a namespace prefix.

AName is the tag name of the XML node.

IsPrefixed returns True if AName includes a namespace prefix followed by the colon (:) separator character, False otherwise.


MakeNodeName function
 VCL Reference

MakeNodeName function

See also

Assembles a full tag name from a local name and namespace prefix.

Unit

XMLDOM

Category

XML support

function MakeNodeName(const Prefix, LocalName: DOMString): DOMString;

Description

Call MakeNodeName to create a tag name from a namespace prefix and a local tag name.

Prefix is the namespace prefix.

LocalName is the local name for the node.

MakeNodeName returns the full tag name that consists of the namespace prefix, followed by a colon and then the local name.


NodeMatches function
 VCL Reference

NodeMatches function

See also

Indicates whether a specified node matches a given namespace and tag name.

Unit

XMLDOM

Category

XML support

function NodeMatches(const Node: IDOMNode; const TagName, NamespaceURI: DOMString): Boolean;

Description

Call NodeMatches to determine whether the node with the interface specified by Node refers to the same node as is described by the TagName and NamespaceURI parameters.

NodeMatches returns True if

The value of Node’s NamespaceURI property is the same as the NamespaceURI parameter.

The local name or tag name of Node is the same as the TagName parameter.

Tip:	Given an IXMLNode interface, you can obtain the IDOMNode interface required for the Node parameter by reading its DOMNode property.


RegisterDOMVendor procedure
 VCL Reference

RegisterDOMVendor procedure

See also

Registers an implementation of the DOM interfaces so that it is available to the TXMLDocument class.

Unit

XMLDOM

Category

XML support

procedure RegisterDOMVendor(const Vendor: TDOMVendor);

Description

Call RegisterDOMVendor to register a DOM implementation that you want to use for parsing XML documents. A DOM (Document Object Model) implementation is a set of objects that implement the standard DOM interfaces.

Delphi ships with two DOM implementations, by IBM and by Microsoft. If you are using one of these implementations, you do not need to call RegisterDOMVendor. Instead, include the relevant unit (IBMXMLDOM or MSXMLDOM) in your uses clause and that unit registers the implementation.

If you are using another DOM implementation, you must create a TDOMVendor descendant that can supply the IDOMImplementation interface and description string for the DOM implementation. Pass an instance of this object as the Vendor parameter to RegisterDOMVendor.


SameNamespace function
 VCL Reference

SameNamespace function

See also

Indicates whether a specified node is defined within a specified namespace.

Unit

XMLDOM

Category

XML support

function SameNamespace(const Node: IDOMNode; const NamespaceURI: WideString): Boolean; overload;

function SameNamespace(const URI1, URI2: WideString): Boolean; overload;

Description

Call SameNamespace to determine whether the two parameters identify the same namespace.

Using the first syntax, the Node parameter identifies a node and the NamespaceURI parameter a namespace. SameNamespace checks whether the node is defined in the specified namespace.

Using the second syntax, both parameters are namespace URI values. SameNamespace checks whether they both identify the same namespace.

Tip:	Given an IXMLNode interface, you can obtain the IDOMNode interface required for the Node parameter by reading its DOMNode property.


UnRegisterDOMVendor procedure
 VCL Reference

UnRegisterDOMVendor procedure

See also

Unregisters a DOM implementation that was registered using RegisterDOMVendor .

Unit

XMLDOM

Category

XML support

procedure UnRegisterDOMVendor(const Vendor: TDOMVendor);

Description

Call UnRegisterDOMVendor to unregister a DOM implementation when it is no longer available. After unregistering a DOM implementation, it can’t be used by TXMLDocument for parsing XML documents.

Vendor is the TDOMVendor descendant the represents the DOM implementation that is to be unregistered. It must be the same object used when registering the DOM implementation when you called RegisterDOMVendor.


DateTimeToXSDateTime function
 VCL Reference

DateTimeToXSDateTime function

See also

Returns a TXSDateTime object that encodes a TDateTime value.

Unit

XSBuiltIns

Category

Web Services

function DateTimeToXSDateTime(Value: TDateTime; CalcLocalBias: Boolean = False): TXSDateTime;

Description

DateTimeToXSDateTime returns a TXSDateTime object that corresponds to a specified TDateTime value. The TXSDateTime object can be used to represent a date-and-time value on an invokable interface. As a remotable object, it can encoded in SOAP packets.

Value is the TDateTime value to convert. If the time zone information is important, this value is assumed to be given in Coordinated Universal Time (UTC).

CalcLocalBias indicates whether the TXSDateTime object should include offsets for converting Value to the local time zone. If CalcLocalBias is True, DateTimeToXSDateTime looks up the local time zone and uses it to set the HourOffset and MinuteOffset properties of the return value.


TSubmitQueryButton
 VCL Reference

TSubmitQueryButton

Hierarchy	Properties	Methods	See also

TSubmitQueryButton generates an HTML control that backs out changes to the values on a query form.

Unit

MidItems

Description

Add TSubmitQueryButton as the child of a TQueryButtons component (or a layout group that is a child of a TQueryButtons component) to enable the generated HTML form to send the values entered in the query form back to the Web application. When the user presses the generated button, the values in the query form are sent to the Web application, using the path info specified by the query form’s Action property.

Use the properties of TSubmitQueryButton to customize the appearance of the button.


 VCL Reference

TSubmitQueryButton properties

TSubmitQueryButton	Alphabetically	Legend

Derived from TQueryButton

Caption

XMLComponent

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSubmitQueryButton properties

TSubmitQueryButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLComponent

XMLUseParent


 VCL Reference

TSubmitQueryButton methods

TSubmitQueryButton	Alphabetically	Legend

In TSubmitQueryButton

Create

Derived from TWebButton

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSubmitQueryButton methods

TSubmitQueryButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

MethodAddress

MethodName

NewInstance

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSubmitQueryButton.Create
 VCL Reference

TSubmitQueryButton.Create

TSubmitQueryButton	See also

Creates and initializes an instance of TSubmitQueryButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TSubmitQueryButton at runtime. Buttons added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TQueryButton

TSubmitQueryButton


TSocketConnection
 VCL Reference

 TSocketConnection

Hierarchy	Properties	Methods	Events	Using TSocketConnection	See also

TSocketConnection uses Windows sockets to manage the connection to an application server.

Unit

SConnect

Description

TSocketConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server. The Socket connection object can

Establish an initial connection to a remote application server.

Obtain an IAppServer for the application server.

Call into a separate COM object that encodes and decodes the content of messages.

Obtain a list of providers on the application server.

Drop the connection to the remote application server.

TSocketConnection establishes the initial connection between the client application and a remote application server using TCP/IP. To use TSocketConnection, the application server must be running ScktSrvr.exe.

Once the connection is established, the client registers any or all of its client datasets, and these client datasets use the IAppServer interface from the socket connection component to communicate with providers on the application server, or to otherwise call the application server’s data module interface.

To connect to remote application servers using DCOM, use the TDCOMConnection component instead. To connect to remote application servers using HTTP, use the TWebConnection component instead. To connect to remote application servers using CORBA, use the TCORBAConnection component.


 VCL Reference

TSocketConnection properties

TSocketConnection	Alphabetically	Legend

In TSocketConnection

Address

Host

Port

Derived from TStreamedConnection

InterceptGUID

InterceptName

SupportCallbacks

Derived from TDispatchConnection

Connected

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSocketConnection properties

TSocketConnection	By object	Legend

Address

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

Host

InterceptGUID

InterceptName

LoginPrompt

Name

ObjectBroker

Owner

Port

ServerGUID

ServerName

SupportCallbacks

Tag

VCLComObject


TSocketConnection.Address
 VCL Reference

TSocketConnection.Address

TSocketConnection	See also

Specifies the IP address of the server.

property Address: String;

Description

Use Address to specify the IP address of the application server to which the client application connects. In addition to the address, you must provide a value for the Port property so that the socket connection component can locate the listening socket on the server system.

Sockets require either an IP address or a Host name to locate the server system. You can use the Host property instead of the Address property to specify the server system using a host name. The Address and Host properties are mutually exclusive: Setting Address causes Host to be set to an empty string, and vice versa.

Note:	If the socket connection component uses an Object Broker, you do not need to specify the Address property. Instead, the Object Broker supplies an Address for a server that is located dynamically at runtime. Explicitly setting the Address property overrides the value supplied by the Object Broker, but such overridden values are not saved with the socket connection component.


TSocketConnection.Host
 VCL Reference

TSocketConnection.Host

TSocketConnection	See also

Specifies the host name of the server.

property Host: String;

Description

Use Host to specify the host name of the server system to which the client application should connect. In addition to the host name, you must provide a value for the Port property so that the socket connection component can locate the listening socket on the server system.

Sockets require either a Host name or an IP address to locate the server system. You can use the Address property instead of the Host property to specify the server system using an IP address. The Host and Address properties are mutually exclusive: Setting Host causes Address to be set to an empty string, and vice versa.

Note:	If the socket connection component uses an Object Broker, you do not need to specify the Host property. Instead, the Object Broker supplies a host name for a server that is located dynamically at runtime. Explicitly setting the Host property overrides the value supplied by the Object Broker, but such overridden values are not saved with the socket connection component.


TSocketConnection.Port
 VCL Reference

TSocketConnection.Port

TSocketConnection	See also

Specifies the port number of the socket dispatcher application on the server system.

property Port: Integer;

Description

Use Port to specify the port that the socket dispatcher uses to listen for client connection requests. By default, Port is 211, which is the default port number of ScktSrvr.exe (the socket dispatcher application provided with Delphi). Change the value of Port if the socket dispatcher is configured to use a different port.

Note:	If the socket connection component uses an Object Broker, you do not need to specify the Port property. Instead, the Object Broker supplies a port number for a server that is located dynamically at runtime. Explicitly setting the Port property overrides the value supplied by the Object Broker, but such overridden values are not saved with the socket connection component.


 VCL Reference

TSocketConnection events

TSocketConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TSocketConnection events

TSocketConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TSocketConnection methods

TSocketConnection	Alphabetically	Legend

In TSocketConnection

Create

CreateTransport

DoConnect

Derived from TStreamedConnection

Destroy

GetInterceptorList

GetServerList

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSocketConnection methods

TSocketConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

CreateTransport

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterceptorList

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

GetServerList

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSocketConnection.Create
 VCL Reference

TSocketConnection.Create

TSocketConnection	See also

Creates and initializes an instance of TSocketConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TSocketConnection object at runtime. Socket connection components added to forms or data modules at design time are created automatically.

Create overrides the inherited constructor to initialize the Port property to 211.


TSocketConnection.CreateTransport
 VCL Reference

TSocketConnection.CreateTransport

TSocketConnection	See also

Returns an ITransport interface that can be used to connect to and communicate with the application server.

function CreateTransport: ITransport; virtual;

Description

Socket connection components use an ITransport interface to connect to and communicate with the application server. CreateTransport instantiates the internal helper object that connects to the socket dispatcher on the server and sends or receives messages. CreateTransport passes the values of the Host, Address and Port properties to this helper object and returns its ITransport interface.


TSocketConnection.DoConnect
 VCL Reference

TSocketConnection.DoConnect

TSocketConnection	See also

Connects to a remote application server.

procedure DoConnect; override;

Description

DoConnect is used internally to connect to the application server when the Connected property is set to True. If the Host or Address and Port properties are set, DoConnect uses these to locate the socket on the server machine. Otherwise, if the ObjectBroker property is set, it obtains these values from the object broker.

Once the server machine is located, DoConnect opens a connection.

Note:	When ObjectBroker is nil, the values of Host, Address, and Port are saved with the socket connection component. If ObjectBroker is not nil, these values are not saved from design time. However, once these values are set (either by values obtained from the Object Broker or by values specified in code at runtime), they are used every time a connection must be re-established. If these values subsequently fail, the socket connection component fetches new values from the Object Broker.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TStreamedConnection

TSocketConnection


TSelectOptionsColumn
 VCL Reference

TSelectOptionsColumn

Hierarchy	Properties	Methods	See also

TSelectOptionsColumn creates an HTML list control to represent a field value in a data grid.

Unit

MidItems

Description

Add TSelectOptionsColumn as the child of a TDataGrid component to add a list control as the display control for a column. TSelectOptionsColumn represents the value of a field in the TDataGrid’s associated dataset.

Use the properties and methods of TSelectOptionsColumn to

Specify the field whose value the list box displays.

Specify the possible values for the field from which the user can choose.

Specify the caption that appears at the top of the column.

Customize the appearance of the list box.

Fit the list box into the tab order of the generated HTML form.


 VCL Reference

TSelectOptionsColumn properties

TSelectOptionsColumn	Alphabetically	Legend

Derived from TWebSelectOptionsInput

DisplayRows

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSelectOptionsColumn properties

TSelectOptionsColumn	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayRows

FieldName

Items

ItemsField

Name

Owner

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


 VCL Reference

TSelectOptionsColumn methods

TSelectOptionsColumn	Alphabetically	Legend

In TSelectOptionsColumn

IsColumn

Derived from TWebSelectOptionsInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSelectOptionsColumn methods

TSelectOptionsColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSelectOptionsColumn.IsColumn
 VCL Reference

TSelectOptionsColumn.IsColumn

TSelectOptionsColumn	See also

Indicates whether the component generates a control that can appear in the column of a data grid.

class function IsColumn: Boolean; override;

Description

Call IsColumn to determine whether a Web display component generates a control that represents a column in a data grid (TDataGrid). IsColumn returns True, because TSelectOptionsColumn is designed specifically for TDataGrid to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebSelectOptionsInput

TSelectOptionsColumn


TServerItem
 VCL Reference

TServerItem

Hierarchy	Properties	Methods	See also

TServerItem describes an application server for a simple object broker.

Unit

ObjBrkr

Description

Use TServerItem to describe an application server to which client applications can connect. TSimpleObjectBroker maintains a list of these descriptions. Then, when a connection component needs to open a connection, it can use the information stored in a server item to identify an available application server.


 VCL Reference

TServerItem properties

TServerItem	Alphabetically	Legend

In TServerItem

ComputerName

DisplayName

Enabled

HasFailed

Port

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TServerItem properties

TServerItem	By object	Legend

Collection

ComputerName

DisplayName

Enabled

HasFailed

ID

Index

Port


TServerItem.ComputerName
 VCL Reference

TServerItem.ComputerName

TServerItem	See also	Example

Identifies the machine where the application server resides.

property ComputerName: string;

Description

Set ComputerName to a string that identifies the machine where the application server resides. The value of this string depends on the type of connection component that requests this value from its object broker.

If the connection component is a TDCOMConnection object, ComputerName is the Windows computer name. (This value can be found in the Control panel under network settings.)

If the connection component is a TSocketConnection object, ComputerName is either the host name or IP address of the system running the application server. Socket connection components parse this string to determine which it is.

If the connection component is a TWebConnection or TSoapConnection object, ComputerName is the URL of the dispatcher httpsrvr.dll or soapsrvr.dll running on the system with the application server.


TServerItem.DisplayName
 VCL Reference

TServerItem.DisplayName

TServerItem	See also

Specifies the name of the server item as it appears in the collection editor.

property DisplayName: String;

Description

DisplayName is the string that represents the server item in the Collection editor. If the ComputerName property is set, DisplayName is the same as ComputerName. Otherwise, if DisplayName is not explicitly set, it is the name of the class (ServerItem) with a number appended to ensure uniqueness.


TServerItem.Enabled
 VCL Reference

TServerItem.Enabled

TServerItem	See also	Example

Enables or disables the server item.

property Enabled: Boolean;

Description

Set Enabled to indicate whether the server should made available in the simple object broker. When Enabled is True, the ComputerName property can be supplied to connection components by the object broker’s GetComputerForGUID or GetComputerForProgID methods. When Enabled is False, the server item is not returned.

Note:	Even when the server item is disabled, it is still returned by TServerCollection’s FindServer method.


TServerItem.HasFailed
 VCL Reference

TServerItem.HasFailed

TServerItem	See also	Example

Indicates whether a connection attempt to the associated server machine has failed.

property HasFailed: Boolean;

Description

When connection components can’t successfully open a connection to an application server, they inform the object broker by calling SetConnectStatus. The simple object broker, in turn, records this fact by setting the HasFailed property to True.

When HasFailed is False, the ComputerName property can be supplied to connection components by the object broker’s GetComputerForGUID or GetComputerForProgID methods. When HasFailed is True, the server item is not returned.

Once a server has failed it is presumed to be down until the application explicitly resets the HasFailed property to False.

Do not use HasFailed to disable server items. Instead, use the Enabled property to disable servers for any reason other than a failed connection.

Note:	Even when HasFailed is True, the server item is still returned by TServerCollection’s FindServer method.


TServerItem.Port
 VCL Reference

TServerItem.Port

TServerItem	See also

Specifies the port number for the associated server application.

property DataType: TFieldType;

Description

Read Port to obtain a port number when using the server item to supply information for connecting using TCP/IP. This value is returned by the GetPortForComputer method of the simple object broker.

By default, the value of Port is 211, which is the default port number for the socket dispatcher application ScktSrvr.exe. If the server listens on a different port, change this property to indicate the listening port.

Note:	Server items that supply a Port number should specify the server system’s IP address or host name as the value of ComputerName.


 VCL Reference

TServerItem methods

TServerItem	Alphabetically	Legend

In TServerItem

Create

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerItem methods

TServerItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TServerItem.Create
 VCL Reference

TServerItem.Create

TServerItem	See also

Creates and initializes a TServerItem instance.

constructor Create(AOwner: TCollection); override;

Description

Do not call Create directly to add a new server item to a server collection. Instead, use the Add or Insert method of the TServerCollection object.

The AOwner parameter specifies the server collection that manages the newly created server item.

After calling the inherited constructor, Create initializes the Enabled property to True, the HasFailed property to False, and the Port property to 211.


Hierarchy

TObject

TPersistent

TCollectionItem

TServerItem


TSharedConnection
 VCL Reference

 TSharedConnection

Hierarchy	Properties	Methods	Events	Using TSharedConnection	See also

TSharedConnection connects to a child remote data module that is accessible only through the properties of a main remote data module on the application server.

Unit

MConnect

Description

TSharedConnection manages a connection to a “child” remote data module that is managed by a single main remote data module on an application server. The client application does not connect directly to the “child” remote data module. Rather, it uses a single connection to the main remote data module on the server machine, and that main remote data module dispatches calls to the IAppServer interface of other “child” data modules. This allows the client application to use a single connection rather than one connection for each remote data module on the application server.

On the server-side, the interface for the child remote data module is surfaced as a property of the main remote data module’s interface. The TSharedConnection component uses this property name to indicate which child remote data module is the actual target of its connection.

TSharedConnection uses a TDispatchConnection descendant (TDCOMConnection, TWebConnection, or TSocketConnection) to form the connection to the main remote data module on the application server. When you use TSharedConnection to open a connection, it causes the associated dispatch connection to connect to the main remote data module if it has not already done so. When you close the connection maintained by TSharedConnection, however, it severs only the connection to the child remote data module, leaving the connection to the main remote data module open in case other components on the client application are still using it.


 VCL Reference

TSharedConnection properties

TSharedConnection	Alphabetically	Legend

In TSharedConnection

ChildName

ParentConnection

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSharedConnection properties

TSharedConnection	By object	Legend

AppServer

ChildName

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

ParentConnection

Tag

VCLComObject


TSharedConnection.ChildName
 VCL Reference

TSharedConnection.ChildName

TSharedConnection	See also

Identifies the child remote data module on the application server with which you want to communicate.

property ChildName: string;

Description

Set ChildName to the name of the property on the application server’s main remote data module that exposes the interface for the desired child remote data module. TSharedConnection uses this property to obtain the interface for the child remote data module, which it sets as the value of the AppServer property.


TSharedConnection.ParentConnection
 VCL Reference

TSharedConnection.ParentConnection

TSharedConnection	See also

Specifies the connection component that establishes a connection to the main remote data module on the application server.

property ParentConnection: TDispatchConnection;

Description

Set ParentConnection to a connection component that connects to the main remote data module on the application server. TSharedConnection uses this component’s connection for communicating to the child remote data module.

The main remote data module with which ParentConnection communicates must expose the interface for the child remote data module as a property on its IAppServer interface.


 VCL Reference

TSharedConnection events

TSharedConnection	Alphabetically	Legend

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TSharedConnection events

TSharedConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TSharedConnection methods

TSharedConnection	Alphabetically	Legend

In TSharedConnection

Destroy

GetServer

Derived from TCustomRemoteServer

Create

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSharedConnection methods

TSharedConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSharedConnection.Destroy
 VCL Reference

TSharedConnection.Destroy

TSharedConnection	See also

Destroys the TSharedConnection instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which verifies that the reference to the shared connection component is not nil before calling Destroy


TSharedConnection.GetServer
 VCL Reference

TSharedConnection.GetServer

TSharedConnection	See also

Returns the IAppServer interface of the child remote data module.

function GetServer: IAppServer; override;

Description

Call GetServer to obtain the interface of the remote data module on the application server. GetServer returns the IAppServer interface of the same remote data module as the one whose interface is the value of the AppServer property. Client applications can communicate directly with the child remote data module through this interface.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TSharedConnection


TSOAPDomConv
 VCL Reference

TSOAPDomConv

Hierarchy	Properties	Methods	See also

TSOAPDomConv is the base class for components that use a DOM to interpret and create SOAP method calls.

Unit

OpToSoapDOMConv

Description

TSOAPDomConv is the base class for DOM-based components that interpret and create SOAP method calls. It handles the logic of converting between the SOAP representation of a type and its Object Pascal representation. TSOAPDomConv uses the remotable type registry (RemTypeRegistry) to look up the native type or class that corresponds to a type from a SOAP method call and to generate an instance of that type to represent an incoming value. It uses runtime type information (RTTI) to convert a native Object Pascal type or remotable class to its SOAP representation.

Do not create instances of TSOAPDomConv. It is intended only as a base class for components that interpret or create SOAP method calls.


 VCL Reference

TSOAPDomConv properties

TSOAPDomConv	Alphabetically	Legend

In TSOAPDomConv

Options

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSOAPDomConv properties

TSOAPDomConv	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Options

Owner

Tag

VCLComObject


TSOAPDomConv.Options
 VCL Reference

TSOAPDomConv.Options

TSOAPDomConv	See also

Controls how the TSOAPDomConv object performs certain types of conversions.

type

  TSOAPConvertOption = (soSendUntyped, soSendMultiRefObj, soSendMultiRefArray, soTryAllSchema);

  TSOAPConvertOptions = set of TSOAPConvertOption;

property Options: TSOAPConvertOptions;

Description

Set Options to indicate how you want the TSOAPDomConv object to handle various types of conversions. Options can contain zero or more of the following:

Option	Meaning

soSendUntyped	When converting from a native type to SOAP, do not include the type attribute. Some Web Service applications do not need type information to be included in the SOAP request, but simply assume that values match the function signature.

soSendMultiRefObj	When converting from a native type to SOAP, indicate when multiple references refer to the same object. That is, treat objects so that their identify is based on the object reference, rather than simply treating them as structures, where their identity is based only on the value of their properties.

soSendMultiRefArray	When converting from a native type to SOAP, indicate when multiple references refer to the same array. That is, treat arrays so that their identify is based on the array reference, rather than simply treating them as structures, where their identity is based only on the value of their elements.

soTryAllSchema	When converting from SOAP to a native type, TSOAPDomConv assumes, by default, that xml schema definitions fall in the xml schema that is associated with the application. If it is possible that the SOAP request uses another xml schema to define standard types, include soTryAllSchema. This causes TSOAPDomConv to look in all schema documents that that are defined in the xmlschema unit to locate type definitions.


 VCL Reference

TSOAPDomConv methods

TSOAPDomConv	Alphabetically	Legend

In TSOAPDomConv

ConvertNativeDataToSoap

ConvertSoapToNativeData

Create

Derived from TSOAPDOMProcessor

AfterConstruction

Destroy

NewInstance

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TSOAPDomConv methods

TSOAPDomConv	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ConvertNativeDataToSoap

ConvertSoapToNativeData

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSOAPDomConv.Create
 VCL Reference

TSOAPDomConv.Create

TSOAPDomConv	See also

Creates a new TSOAPDomConv object.

constructor Create(AOwner: TComponent); override;

Description

Typically, applications do not need to create instances of TSOAPDomConv. Instead, it is created and used by THTTPRio on client applications and TSoapPascalInvoker on server applications.

The AOwner parameter specifies the component that is responsible for freeing the TSOAPDomConv instance.


TSOAPDomConv.ConvertNativeDataToSoap
 VCL Reference

TSOAPDomConv.ConvertNativeDataToSoap

TSOAPDomConv	See also

Converts a native Object Pascal type to its SOAP representation.

procedure ConvertNativeDataToSoap(RootNode, Node: IXMLNode; Name: InvString; Info: PTypeInfo; P: Pointer; NumIndirect: Integer);

Description

ConvertNativeDataToSoap performs the conversion from a native Object Pascal type to its SOAP representation and adds that to the emerging DOM representation of a SOAP packet. It uses the options specified by the Options property to determine whether to include type data and how to handle multiple references to the same remotable object.

RootNode is the node in the emerging SOAP representation that acts as a parent to any elements that represent an object that has multiple references.

Node is the parent node to which ConvertNativeDataToSoap adds a new child node that represents the native value.

Name is the type name of the SOAP encoding of the native type.

Info is a TypeInfo pointer that indicates the type in which the native data appears.

P is a pointer to the value to convert. It points (possibly with additional levels of indirection) to a value of the type indicated by Info.

NumIndirect indicates the number of levels of indirection by which P points to a value of the type indicated by Info.


TSOAPDomConv.ConvertSoapToNativeData
 VCL Reference

TSOAPDomConv.ConvertSoapToNativeData

TSOAPDomConv	See also

Converts the SOAP representation of a value to a pointer to the corresponding Object Pascal representation.

procedure ConvertSoapToNativeData(DataP: Pointer; TypeInfo: PTypeInfo; Context: TDataContext; RootNode, Node: IXMLNode; Translate, ByRef: Boolean; NumIndirect: Integer);

Description

ConvertSoapToNativeData performs the conversion from a DOM node that represents a SOAP encoding of a value to the corresponding native representation.

DataP is a pointer to the memory allocated to hold the native representation of the value, and points to the results of the conversion.

TypeInfo is the typeinfo pointer that describes the native type that will represent the value.

Context is the TDataContext object that stores the value.

RootNode is the node in the SOAP packet that acts as a parent to any elements to which there are multiple references.

Node is the node in the SOAP packet whose value is to be translated.

Translate indicates whether Node represents a value to be translated, as opposed to a reference to value that is found elsewhere in the SOAP packet.

ByRef indicates whether the node corresponds to a parameter that is passed by reference.

NumIndirect indicates the number of levels of indirection by which DataP points to its value.


Hierarchy

TObject

TPersistent

TComponent

TSoapDomProcessor

TSOAPDomConv


InvString type
 VCL Reference

InvString type

The type for strings that are used to represent all or part of an encoded call on an invokable interface.

Unit

InvokeRegistry

type InvString = WideString;

Description

InvString is the type for encoded method calls in Web Service applications. It is used for the results of encoding an interface call or its results so that it can be transported between client and server applications.


TIntfMetaData type
 VCL Reference

TIntfMetaData type

Represents the runtime type information (RTTI) from an invokable interface.

Unit

IntfInfo

type

  TIntfMetaData = record

    Name: string;

    UnitName: string;

    MDA: TIntfMethEntryArray;

    IID: TGUID;

    Info: PTypeInfo;

    AncInfo: PTypeInfo;

    NumAnc: Integer;

  end;

Description

TIntfMetaData is used by classes that work with the runtime type information (RTTI) extracted from an invokable interface.

Name is the name of the invokable interface.

UnitName is the name of the unit in which the interface is declared.

MDA is an array of records, each of which describes a method on the interface, including its calling conventions and function signature.

IID is the globally unique identifier (GUID) of the interface.

Info is a pointer to the type description for the interface.

AncInfo is a pointer to the type description for the interface’s ancestor type.

NumAnc indicates the number of methods that the interface inherits from its ancestor. It provides the offset in MDA of the first method that is introduced by the interface rather than inherited from an ancestor interface.


TIntfMethEntry, TIntfMethEntryArray types
 VCL Reference

TIntfMethEntry, TIntfMethEntryArray types

See also

Represents the table of interface methods in a TInfMetaData record.

Unit

IntfInfo

type

  TCallConv = (ccReg, ccCdecl, ccPascal, ccStdCall, ccSafeCall);

  TIntfMethEntry = record

    Name: string;

    CC: TCallConv;

    Pos: Integer;

    ParamCount: Integer;

    ResultInfo: PTypeInfo;

    SelfInfo: PTypeInfo;

    Params: TIntfParamEntryArray;

    HasRTTI: Boolean;

  end;

  TIntfMethEntryArray = array of TIntfMethEntry;

Description

TIntfMethEntry describes a single method on an invokable interface.

Name is the name of the method.

CC is the calling convention for that method. It is one of the following values:

Value	Meaning

ccReg	register

ccCdecl	cdecl

ccPascal	pascal

ccStdCall	stdcall

ccSafeCall	safecall

Pos is the position of the method in the interface’s method table.

ParamCount is the number of parameters that the method has.

ResultInfo is a pointer to the type description for the return type.

SelfInfo is a pointer to the type description for the method type.

Params is a dynamic array of records describing the method parameters.

HasRTTI indicates whether there is runtime type information (RTTI) for the method. If the method is inherited from an interface that was not compiled with RTTI, HasRTTI is False.


TIntfParamEntry, TIntfParamEntryArray types
 VCL Reference

TIntfParamEntry, TIntfParamEntryArray types

See also

Represents the array of parameters in a TInfMethEntry record.

Unit

IntfInfo

type

  TIntfParamEntry = record

    Flags: TParamFlags;

    Name: string;

    Info: PTypeInfo;

  end;

  TIntfParamEntryArray = array of TIntfParamEntry;

Description

TIntfParamEntry describes a single parameter on a method. TIntfParamEntryArray describes all the parameters on a method.

Flags gives the attributes of the parameter.

Info is a pointer to the type description for the parameter type.


TObjMultiOptions type
 VCL Reference

TObjMultiOptions type

See also

Indicates how multiple references to the same remotable class should be translated into a SOAP representation.

Unit

InvokeRegistry

type TObjMultiOptions = (ocDefault, ocMultiRef, ocNoMultiRef);

Description

TObjMultiOptions indicates a class-specific override to the default strategy for converting multiple references to the same object instance into the corresponding SOAP representation. It indicates whether a remotable object should be treated by value (like a structure) or by reference (where object identity is meaningful).

Value	Meaning

ocDefault	Use the default strategy for handling multiple references.

ocMultiRef	Always indicate in the SOAP packet when multiple references refer to the same instance of the specified class.

ocNoMultiRef	Never indicate in the SOAP packet when multiple references refer to the same instance of the specified class. That is, always treat it “by value”.


TPascalRemotableClassRegistry type
 VCL Reference

TPascalRemotableClassRegistry type

See also

The type of the remotable class registry.

Unit

InvokeRegistry

type TPascalRemotableClassRegistry = TPascalRemotableTypeRegistry;

Description

TRemotableClassRegistry is the type of the remotable class registry. This is the same as the remotable type registry, but is sometimes used when registering TRemotable descendants as opposed to other remotable types.


TStreamedConnection
 VCL Reference

TStreamedConnection

Hierarchy	Properties	Methods	Events	See also

TStreamedConnection is the base class for components that handle their own marshaling of interface calls when connecting to application servers.

Unit

SConnect

Description

Do not create instances of TStreamedConnection. Instead, instantiate a descendant of TStreamedConnection such as TSocketConnection or TWebConnection.

TStreamedConnection handles the marshaling of all COM data types so that the streamed connection component can generate, interpret, and respond to remote COM interface calls without using DCOM. It uses an ITransport interface to connect to application servers and to send and receive messages.

TStreamedConnection can’t actually connect to or communicate with an application server. Descendants of TStreamedConnection override the CreateTransport method to obtain an ITransport interface that enables these behaviors.

Interfaces

TStreamedConnection implements the ISendDataBlock interface.


 VCL Reference

TStreamedConnection properties

TStreamedConnection	Alphabetically	Legend

In TStreamedConnection

Handle

InterceptGUID

InterceptName

Interpreter

SupportCallbacks

Derived from TDispatchConnection

Connected

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TStreamedConnection properties

TStreamedConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

Handle

InterceptGUID

InterceptName

Interpreter

LoginPrompt

Name

Owner

ServerGUID

ServerName

SupportCallbacks

Tag

VCLComObject


TStreamedConnection.Handle
 VCL Reference

TStreamedConnection.Handle

TStreamedConnection	See also

Provides access to an internal window handle that can receive messages from the transport layer.

type THandle = Integer;

property Handle: THandle;

Description

Streamed connection components perform all reading from and writing to the application server using a separate execution thread. This limits the impact that communication with the application server has on the speed of the client application, because execution does not need to wait while messages are marshaled and sent or received.

The internal thread that handles these communication tasks uses Windows messages to coordinate events. TStreamedConnection uses the Handle property to provide this internal thread with a window handle that it can use.


TStreamedConnection.InterceptGUID
 VCL Reference

TStreamedConnection.InterceptGUID

TStreamedConnection	See also

Specifies the GUID of a COM object that manipulates interface calls before they are sent or after return values are received.

property InterceptGUID: string;

Description

Set InterceptGUID to the GUID of a COM object that intercepts messages between the connection component and an application server before they are sent and after they are received.

The COM object must implement the IDataIntercept interface. Use the IDataIntercept methods to manipulate the data that is communicated using the socket connection. For example, applications can use these methods to encrypt and decrypt data or to compress and decompress data.

Tip:	To specify the COM object that intercepts messages using a ProgID instead of a GUID, use the InterceptName property instead.

Note:	When using InterceptGUID, the server must use the same COM object to undo the transformation performed by the socket connection component’s InterceptGUID. For servers that respond to TSocketConnection, you can set the server’s InterceptGUID to the same GUID using the Socket server dialog of ScktSrvr.exe.


TStreamedConnection.InterceptName
 VCL Reference

TStreamedConnection.InterceptName

TStreamedConnection	See also

Specifies the ProgID of a COM object that manipulates interface calls before they are sent or after return values are received.

property InterceptName: string;

Description

Set InterceptName to the programmatic ID (ProgID) of a COM object that intercepts messages between the connection component and an application server before they are sent and after they are received. At design time, you can choose the ProgID of any COM objects that have been registered to perform this task from a drop-down list in the Object Inspector if they use TPacketInterceptFactory as a class factory.

The COM object must implement the IDataIntercept interface. Use the IDataIntercept methods to manipulate the data that is communicated using the socket connection. For example, applications can use these methods to encrypt and decrypt data or to compress and decompress data.

Tip:	To specify the COM object that intercepts messages using a GUID instead of a ProgID, use the InterceptGUID property instead.

Note:	When using InterceptName, the server must use the same COM object to undo the transformation performed by the socket connection component’s InterceptName. For servers that respond to TSocketConnection, you can set the COM object that the server uses with the Socket server dialog of ScktSrvr.exe.


TStreamedConnection.Interpreter
 VCL Reference

TStreamedConnection.Interpreter

TStreamedConnection	See also

Provides access to the helper object that marshals interface calls for the streamed connection.

property Interpreter: TCustomDataBlockInterpreter;

Description

Streamed connection components use a data block interpreter internally to provide marshaling support.


TStreamedConnection.SupportCallbacks
 VCL Reference

TStreamedConnection.SupportCallbacks

TStreamedConnection	See also

Determines whether the streamed connection component can handle callbacks in the application server interface.

property SupportCallbacks: Boolean;

Description

Use SupportCallbacks to indicate whether the connection component can marshal callback functions in the application server’s interface. When SupportCallbacks is True, the connection component can marshal calls from the application server to the client application over an interface supplied as a callback.

For TSocketConnection, callbacks are optional. Set SupportCallbacks to True if you are using callbacks as part of the application server’s interface. When SupportCallbacks is True, the socket connection component requires WinSock2. Set SupportCallbacks to False if you are not using callback functions and want to eliminate the dependency on WinSock2.

TWebConnection can’t support callback functions. It initializes SupportCallbacks to False in the constructor and never changes this value.


 VCL Reference

TStreamedConnection events

TStreamedConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TStreamedConnection events

TStreamedConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TStreamedConnection methods

TStreamedConnection	Alphabetically	Legend

In TStreamedConnection

_AddRef

_Release

Create

CreateTransport

Destroy

DoConnect

DoDisconnect

DoError

GetInterceptorList

GetInterpreter

GetServerList

InternalClose

InternalOpen

QueryInterface

Send

ThreadException

ThreadReceivedStream

WndProc

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStreamedConnection methods

TStreamedConnection	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

CreateTransport

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

DoDisconnect

DoError

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterceptorList

GetInterpreter

GetNamePath

GetParentComponent

GetServer

GetServerList

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InternalClose

InternalOpen

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

QueryInterface

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Send

SetSubComponent

ThreadException

ThreadReceivedStream

UpdateAction

WndProc


TStreamedConnection._AddRef
 VCL Reference

TStreamedConnection._AddRef

TStreamedConnection	See also

Increments an internal reference counter.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IUnknown interface method, AddRef, by incrementing an internal reference counter. The reference count is decreased by calling _Release.


TStreamedConnection._Release
 VCL Reference

TStreamedConnection._Release

TStreamedConnection	See also

Decrements an internal reference counter.

function _AddRef: Integer; stdcall;

Description

_Release implements the IUnknown interface method, Release, by decrementing an internal reference counter. The reference count is increased by calling _AddRef


TStreamedConnection.Create
 VCL Reference

TStreamedConnection.Create

TStreamedConnection	See also

Creates and initializes an instance of TStreamedConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a streamed connection component at runtime. Connection components placed in forms or data modules at design time are instantiated automatically.

After calling the inherited constructor, Create instantiates the data block interpreter accessed by the Interpreter property.


TStreamedConnection.CreateTransport
 VCL Reference

TStreamedConnection.CreateTransport

TStreamedConnection	See also

Provides the backstop for a method that obtains an ITransport interface.

function CreateTransport: ITransport; virtual;

Description

Streamed connection components use an ITransport interface to connect to and communicate with the application server. As implemented in TStreamedConnection, CreateTransport always returns nil.

Descendants of TStreamedConnection override CreateTransport to obtain an ITransport  interface from a specialized helper object that connects to and communicates with the application server.

Component writers wanting to create connection components for specialized transport protocols need only override CreateTransport. Once the streamed connection has a working ITransport interface, all other functions of the connection component are handled automatically.


TStreamedConnection.Destroy
 VCL Reference

TStreamedConnection.Destroy

TStreamedConnection	See also

Disposes of a TStreamedConnection instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the streamed connection is not nil, and only then calls Destroy.

Destroy ensures that the connection to the server is closed. It then frees all resources and helper objects before calling the inherited destructor.


TStreamedConnection.DoConnect
 VCL Reference

TStreamedConnection.DoConnect

TStreamedConnection	See also

Connects to an application server.

procedure DoConnect; override;

Description

DoConnect is called internally when the Connected property is set to True. DoConnect creates a separate thread for managing the connection so that communication with the application server does not block execution in the client application. Using the ITransport interface, DoConnect connects to the application server and sets the value of the AppServer property to its interface.

Note:	Descendants of TStreamedConnection override CreateTransport rather than DoConnect to change the way the client application forms a connection to application servers.


TStreamedConnection.DoDisconnect
 VCL Reference

TStreamedConnection.DoDisconnect

TStreamedConnection	See also

Disconnects from an application server.

procedure DoDisconnect; override;

Description

DoDisconnect is called internally when the Connected property is set to False. Using the ITransport interface, DoDisconnect drops the connection to the application server.


TStreamedConnection.DoError
 VCL Reference

TStreamedConnection.DoError

TStreamedConnection	See also

Raises an exception for a specified exception object.

procedure DoError(E: Exception); virtual;

Description

TStreamedConnection uses a separate thread when making interface calls to the application server. When that thread encounters an exception, it sends a message to the Window handle specified by the Handle property. The connection component uses DoError to raise those exceptions.

Note:	DoError is called by the ThreadException method, which is the message handler for thread exceptions. It is also called when thread exception messages are taken from the message queue before they are received by the internal window procedure.


TStreamedConnection.GetInterceptorList
 VCL Reference

TStreamedConnection.GetInterceptorList

TStreamedConnection	See also

Retrieves a list of registered interceptors that can be used to transform messages between the connection component and the application server.

function GetInterceptorList: OleVariant; virtual;

Description

Call GetInterceptorList to obtain a list of ProgIDs that can be assigned to the InterceptName property. GetInterceptorList retrieves a list of all COM objects that have been registered by TPacketInterceptFacotry as data packet interceptors (objects that support the IDataIntercept interface that can be used to intercept and transform messages passed between a connection component and an application server.)

GetInterceptorList returns a Variant array of strings. Any of these strings can be used as a valid setting for the InterceptName property.

At design time, TStreamedConnection uses the GetInterceptorList method to populate the InterceptName drop-down in the Object Inspector.


TStreamedConnection.GetInterpreter
 VCL Reference

TStreamedConnection.GetInterpreter

TStreamedConnection	See also

Returns the value of the Interpreter property.

function GetInterpreter: TCustomDataBlockInterpreter; virtual;

Description

GetInterpreter is the protected read implementation of the Interpreter property. As implemented in TStreamedConnection, GetInterpreter instantiates a TDataBlockInterpreter object.


TStreamedConnection.GetServerList
 VCL Reference

TStreamedConnection.GetServerList

TStreamedConnection	See also

Retrieves a list of registered data brokers from the remote server system.

function GetServerList: OleVariant; virtual;

Description

Call GetServerList to obtain a list of servers that are registered on the system to which the streamed connection communicates. GetServerList returns a Variant array of strings. Any of these strings can be used as a valid setting for the ServerName property.

At design time, TStreamedConnection uses the GetServerList method to populate the ServerName drop-down in the Object Inspector. Note that, unlike COM-based connection components (which populate that list with servers that are registered on the client machine), this results in a list of application servers that are registered on the server machine.


TStreamedConnection.InternalClose
 VCL Reference

TStreamedConnection.InternalClose

TStreamedConnection	See also

Terminates a connection to the application server.

procedure InternalClose: OleVariant; virtual;

Description

Streamed connection components use InternalClose to handle the details of closing a connection to the application server. This method is called by the DoDisconnect method (which implements the Connected property) and at other times when the connection component must terminate a connection.


TStreamedConnection.InternalOpen
 VCL Reference

TStreamedConnection.InternalOpen

TStreamedConnection	See also

Opens a connection to the application server.

procedure InternalOpen: OleVariant; virtual;

Description

Streamed connection components use InternalOpen to handle the details of establishing a connection to the application server. This method is called by the DoConnect method (which implements the Connected property) and at other times when the connection component must establish a connection.


TStreamedConnection.QueryInterface
 VCL Reference

TStreamedConnection.QueryInterface

TStreamedConnection	See also

Implements the IUnknown QueryInterface method.

function QueryInterface(const IID: TGUID; out Obj): HResult; reintroduce; stdcall;

Description

QueryInterface returns a reference to the interface specified by the IID parameter as the Obj parameter. It the streamed connection supports the specified interface, QueryInterface returns 0. If the streamed connection does not support the interface, the Obj parameter is nil and QueryInterface returns E_NOINTERFACE.


TStreamedConnection.Send
 VCL Reference

TStreamedConnection.Send

TStreamedConnection	See also

Sends an interface call to the application server and returns the response.

function Send(const Data: IDataBlock; WaitForResult: Boolean): IDataBlock; stdcall;

Description

The data block interpreter (specified by the Interpreter property) calls Send to dispatch interface messages to the application server. It supplies an IDataBlock interface that encapsulates the interface from the application server.

Communication with the application server occurs on a separate thread. The WaitForResult parameter indicates whether execution on the main thread should halt until the interface call returns a result (WaitForResult =True), or whether the interface call can occur asynchronously (WaitForResult =False). If WaitForResult is True, Send returns an IDataBlock interface that supplies the result.


TStreamedConnection.ThreadException
 VCL Reference

TStreamedConnection.ThreadException

TStreamedConnection	See also

Raises an exception for the thread that communicates with the application server.

procedure ThreadException(var Message: TMessage);

Description

TStreamedConnection uses a separate thread when making interface calls to the application server. When that thread encounters an exception, it sends a message to the Window handle specified by the Handle property. ThreadException is the message handler for that Windows message. It raises an exception in the main execution thread.


TStreamedConnection.ThreadReceivedStream
 VCL Reference

TStreamedConnection.ThreadReceivedStream

TStreamedConnection	See also

Handles callbacks from the application server.

procedure ThreadReceivedStream(var Message: TMessage);

Description

TStreamedConnection uses a separate thread for interface calls to and from the application server. When the application server calls a client application interface, that thread sends a message to the Window handle specified by the Handle property. ThreadReceivedStream is the message handler for the Windows message from the application server.

ThreadReceivedStream passes the interface call to the data block interpreter specified by the Interpreter property.


TStreamedConnection.WndProc
 VCL Reference

TStreamedConnection.WndProc

TStreamedConnection	See also

Dispatches messages from the transport layer.

procedure WndProc(var Message: TMessage);

Description

TStreamedConnection uses a separate thread for interface calls to and from the application server. That thread communicates with the streamed connection component by sending Windows messages to the handle specified by the Handle property. WndProc is the window procedure associated with that Window handle. It dispatches any messages that have message handlers such as ThreadException or ThreadReceivedStream. All other messages are ignored.


Hierarchy

TObject

TPersistent

TComponent

TStreamedConnection

TCustomRemoteServer

TDispatchConnection

TStreamedConnection


TTextColumn
 VCL Reference

TTextColumn

Hierarchy	Properties	Methods	See also

TTextColumn creates a single-line HTML input control to represent a field value in a data grid.

Unit

MidItems

Description

Add TTextColumn as the child of a TDataGrid component to add an edit control as the display control for a column. TTextColumn represents the value of a field in the TDataGrid’s associated dataset.

Use the properties and methods of TTextColumn to

Specify the field whose value the control displays.

Specify the caption that appears at the top of the column.

Customize the appearance of the edit control.

Fit the control into the tab order of the generated HTML form.


 VCL Reference

TTextColumn properties

TTextColumn	Alphabetically	Legend

Derived from TWebTextInput

DisplayWidth

ReadOnly

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTextColumn properties

TTextColumn	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject


 VCL Reference

TTextColumn methods

TTextColumn	Alphabetically	Legend

In TTextColumn

IsColumn

Derived from TWebTextInput

Create

Derived from TWebDataDisplay

Destroy

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTextColumn methods

TTextColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TTextColumn.IsColumn
 VCL Reference

TTextColumn.IsColumn

TTextColumn	See also

Indicates whether the component generates a control that can appear in the column of a data grid.

class function IsColumn: Boolean; override;

Description

Call IsColumn to determine whether a Web display component generates a control that represents a column in a data grid (TDataGrid). IsColumn returns True, because TTextColumn is designed specifically for TDataGrid to use.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextInput

TTextColumn


TranslateException
 VCL Reference

TranslateException

Hierarchy	Properties	Methods	See also

TranslateException is the exception class for errors that occur when converting an XML document to a data packet or a data packet to an XML document.

Unit

Xmlxform

Description

TranslateException is raised by the transform components (TXMLTransform, TXMLTransformClient, and TXMLTransformProvider) when they can't find a file that is needed to perform a transformation. The missing file can be the XML document that is to be translated into a data packet, or a transformation file that contains instructions on how to map between a data packet and an XML document.


 VCL Reference

TranslateException properties

TranslateException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

TranslateException properties

TranslateException	By object	Legend

HelpContext

Message


 VCL Reference

TranslateException methods

TranslateException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TranslateException methods

TranslateException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

TranslateException


EUnsupportedTypeError
 VCL Reference

EUnsupportedTypeError

Hierarchy	Properties	Methods	See also

EUnsupportedTypeError is the exception class for failures that occur when adding dimensions to the cache of a decision cube.

Unit

mxarrays

Description

EUnsupportedTypeError is raised when an invalid field type is chosen as an active dimension in a decision cube. For example, making a dimension that corresponds to a BLOB field active raises an EUnsupportedTypeError.


 VCL Reference

EUnsupportedTypeError properties

EUnsupportedTypeError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EUnsupportedTypeError properties

EUnsupportedTypeError	By object	Legend

HelpContext

Message


 VCL Reference

EUnsupportedTypeError methods

EUnsupportedTypeError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EUnsupportedTypeError methods

EUnsupportedTypeError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EUnsupportedTypeError


TWebContainedContainerComponent
 VCL Reference

TWebContainedContainerComponent

Hierarchy	Properties	Methods	See also

TWebContainedContainerComponent is the base class for Web items that generate HTML on behalf of another component and also use Web items to generate HTML.

Unit

WebComp

Description

Use TWebContainedContainerComponent as a base class for Web items that have their own subitems. Web items are items that generate HTML statements on behalf of another component. The component that uses the generated HTML has a property whose type is a TWebComponentList object that lists a set of its Web items. In addition, the TWebContainedContainerComponent descendant uses a TWebComponentList object to store a set of Web items that it uses.

TWebContainedContainerComponent implements the logic that fits a component into the hierarchy of Web items. TWebContainedContainerComponent descendants act as internal nodes in this hierarchy. That is, they have both a Web parent and a set of child Web items.

In order to allow the parent’s TWebComponentList object to manage this Web item, TWebContainedContainerComponent implements the IWebComponent interface.

Do not create instances of TWebContainedContainerComponent. TWebContainedContainerComponent does not produce any HTML, but merely handles the relationships to parent and child TWebComponentList objects.


 VCL Reference

TWebContainedContainerComponent properties

TWebContainedContainerComponent	Alphabetically	Legend

In TWebContainedContainerComponent

WebContainedComponentHelper

WebContainerComponentHelper

WebParent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebContainedContainerComponent properties

TWebContainedContainerComponent	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WebContainedComponentHelper

WebContainerComponentHelper

WebParent


TWebContainedContainerComponent.WebContainedComponentHelper
 VCL Reference

TWebContainedContainerComponent.WebContainedComponentHelper

TWebContainedContainerComponent	See also

Provides access to the helper object that implements the IWebComponent interface for this contained component.

property WebContainedComponentHelper: TWebContainedComponentHelper;

Description

TWebContainedContainerComponent uses WebContainedComponentHelper internally to access the separate helper object that implements the IWebComponent interface. In addition to providing the implementation for the IWebComponent interface, WebContainedComponentHelper provides the underlying implementation for other properties and methods that are common to components that appear in a list of Web items.


TWebContainedContainerComponent.WebContainerComponentHelper
 VCL Reference

TWebContainedContainerComponent.WebContainerComponentHelper

TWebContainedContainerComponent	See also

Provides access to the helper object that allows this object to manage sub Web items.

property WebContainerComponentHelper: TWebContainerComponentHelper;

Description

TWebContainedContainerComponent uses WebContainerComponentHelper internally to handle two lists of child Web items:

One list contains the default Web items that this component uses if the application does not explicitly assign sub Web items. The GetDefaultWebComponents method returns this list.

The other list contains explicitly assigned Web items that this component uses. The GetWebComponents method returns this list.


TWebContainedContainerComponent.WebParent
 VCL Reference

TWebContainedContainerComponent.WebParent

TWebContainedContainerComponent	See also

Indicates the component that uses this TWebContainedContainerComponent as one of its Web items.

property WebParent: TComponent;

Description

TWebContainedContainerComponent uses WebParent to access the component on whose behalf it generates HTML. WebParent uses a TWebComponentList object that includes this TWebContainedContainerComponent object to represent its child Web items.


 VCL Reference

TWebContainedContainerComponent methods

TWebContainedContainerComponent	Alphabetically	Legend

In TWebContainedContainerComponent

Create

Destroy

GetChildren

GetContainerList

GetDefaultWebComponents

GetParentComponent

GetWebComponents

HasParent

ImplGetDefaultComponentList

IsDefaultField

ParentChanged

ReadState

SetChildOrder

SetDefaultWebComponents

SetParentComponent

SetWebParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebContainedContainerComponent methods

TWebContainedContainerComponent	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetContainerList

GetDefaultWebComponents

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetWebComponents

HasParent

ImplGetDefaultComponentList

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsDefaultField

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentChanged

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetChildOrder

SetDefaultWebComponents

SetParentComponent

SetSubComponent

SetWebParent

UpdateAction


TWebContainedContainerComponent.Create
 VCL Reference

TWebContainedContainerComponent.Create

TWebContainedContainerComponent	See also

Creates and initializes an instance of TWebContainedContainerComponent.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a contained component at runtime. Web items added at design time using the Web Page editor are instantiated automatically.

AOwner is the component, typically a form or data module, that becomes the value of the Owner property. The Owner is responsible for initiating the loading and saving of this component, and for freeing the TWebContainedContainerComponent instance.


TWebContainedContainerComponent.Destroy
 VCL Reference

TWebContainedContainerComponent.Destroy

TWebContainedContainerComponent

Frees an instance of TWebContainedContainerComponent.

destructor Destroy; override;

Description

Destroy removes this component from its parent’s list of components that generate HTML before freeing the memory used by TWebContainedContainerComponent.


TWebContainedContainerComponent.GetChildren
 VCL Reference

TWebContainedContainerComponent.GetChildren

TWebContainedContainerComponent	See also

Executes a callback for each child Web item.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

TWebContainedContainerComponent overrides the GetChildren method that is introduced in TComponent for the streaming system that loads and saves components. It executes the Proc procedure for each child that in the list that GetWebComponents returns, as long as that component has Root for an Owner. This allows the sub Web items to be loaded and saved with the TWebContainedContainerComponent object.


TWebContainedContainerComponent.GetContainerList
 VCL Reference

TWebContainedContainerComponent.GetContainerList

TWebContainedContainerComponent	See also

Returns the TWebComponentList object that the Web parent uses to manage this and its other Web items.

function GetContainerList: TWebComponentList;

Description

Applications can’t access the protected GetContainerList method. It is used internally to access the object manages this item along with the other Web items of the Web parent.


TWebContainedContainerComponent.GetDefaultWebComponents
 VCL Reference

TWebContainedContainerComponent.GetDefaultWebComponents

TWebContainedContainerComponent	See also

Returns a list of Web items that are used by default if an application does not explicitly assign child items to this object.

function GetDefaultWebComponents: TWebComponentList; virtual;

Description

GetDefaultWebComponents supplies the default set of child items for this Web item. As implemented in TWebContainedContainerComponent, GetDefaultWebComponents always returns nil. Descendant classes override this method to supply a set of default items.


TWebContainedContainerComponent.GetParentComponent
 VCL Reference

TWebContainedContainerComponent.GetParentComponent

TWebContainedContainerComponent	See also

Returns the object that uses this component to generate HTML.

function GetParentComponent: TComponent; override;

Description

TWebContainedContainerComponent overrides the GetParentComponent method that is introduced in TComponent for the streaming system that loads and saves components. It returns the value of the WebParent property (the object that uses the HTML generated by this component when assembling its own portion of an HTML document.)


TWebContainedContainerComponent.GetWebComponents
 VCL Reference

TWebContainedContainerComponent.GetWebComponents

TWebContainedContainerComponent	See also

Returns the list of Web items that this item uses to generate its HTML.

function GetWebComponents: TWebComponentList;

Description

GetWebComponents returns the TWebComponentList object that manages all of the child items of this component.


TWebContainedContainerComponent.HasParent
 VCL Reference

TWebContainedContainerComponent.HasParent

TWebContainedContainerComponent	See also

Indicates whether this component appears in another component’s list of Web items.

function HasParent: Boolean; override;

Description

TWebContainedContainerComponent overrides the HasParent method that is introduced in TComponent for the streaming system that loads and saves components. It returns True if the WebParent property is not nil.

If the contained component has a parent, that parent component is responsible for writing this component to a stream.


TWebContainedContainerComponent.ImplGetDefaultComponentList
 VCL Reference

TWebContainedContainerComponent.ImplGetDefaultComponentList

TWebContainedContainerComponent	See also

Returns a list of Web items that are used by default if an application does not explicitly assign child items to this object.

function ImplGetDefaultComponentList: TWebComponentList; virtual;

Description

ImplGetDefaultComponentList supplies the default set of child items for this Web item. ImplGetDefaultComponentList calls the virtual GetDefaultWebComponents method, which descendant classes override to return this list.


TWebContainedContainerComponent.IsDefaultField
 VCL Reference

TWebContainedContainerComponent.IsDefaultField

TWebContainedContainerComponent	See also

Indicates whether this component represents a Web item that is used by default when the parent’s set of Web items is not explicitly assigned.

function IsDefaultField: Boolean; virtual;

Description

TWebContainedComponent uses IsDefaultField internally to locate the property on the Web parent that lists this item along with other Web items.

IsDefaultField returns Ttrue if the TWebComponentList that contains this item represents a set of Web items that are used when the application does not explicitly assign Web items to the Web parent. IsDefaultField returns False if this component does not belong to such a default list.


TWebContainedContainerComponent.ParentChanged
 VCL Reference

TWebContainedContainerComponent.ParentChanged

TWebContainedContainerComponent	See also

Responds when the WebParent property changes.

procedure ParentChanged; virtual; abstract;

Description

The protected ParentChanged method is called automatically when the WebParent property changes. As implemented in TWebContainedContainerComponent, ParentChanged does nothing. Descendant classes can override this method to perform any necessary updates in response to the change in Web parent.


TWebContainedContainerComponent.ReadState
 VCL Reference

TWebContainedContainerComponent.ReadState

TWebContainedContainerComponent	See also

Reads the component’s published properties, stored data, and owned components from a reader object.

procedure ReadState(Reader: TReader); override;

Description

ReadState is part of a sequence of calls used by the streaming system that loads and saves components. It reads the values of all the component's published properties, stored data, and owned components from the reader object passed in Reader. Do not call ReadState directly.

TWebContainedContainerComponent overrides ReadState to obtain the parent component from the reader, which it assigns as the value of the WebParent property.

Note:	Any descendant classes overriding ReadState should end with a call to the inherited ReadState method.


TWebContainedContainerComponent.SetChildOrder
 VCL Reference

TWebContainedContainerComponent.SetChildOrder

TWebContainedContainerComponent	See also

Positions a child component in the list of child Web items.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

SetChildOrder is part of the streaming system that loads and saves components. It positions a newly loaded child component in the list that GetWebComponents returns.

Child is the newly loaded child component.

Order indicates its position in the list of child Web items, where 0 is the first position, 1 is the second position, and so on.


TWebContainedContainerComponent.SetDefaultWebComponents
 VCL Reference

TWebContainedContainerComponent.SetDefaultWebComponents

TWebContainedContainerComponent	See also

Sets the list of Web items that are used by default if an application does not explicitly assign child items to this object.

procedure SetDefaultWebComponents(AList: TWebComponentList); virtual;

Description

SetDefaultWebComponents assigns the default set of child items for this Web item. This default list can be retrieved by calling the GetDefaultWebComponents method.

As implemented in TWebContainedContainerComponent, SetDefaultWebComponents does nothing. Descendant classes override this method to store the list of default items in a class-specific manner.


TWebContainedContainerComponent.SetParentComponent
 VCL Reference

TWebContainedContainerComponent.SetParentComponent

TWebContainedContainerComponent	See also

Sets the WebParent property to be the same as this component’s parent.

procedure SetParentComponent(AParent: TComponent); override;

Description

TWebContainedContainerComponent overrides the SetParentComponent method that is introduced in TComponent for the streaming system that loads and saves components. It sets the WebParent property to AParent, so that it is the same as the parent that loads and saves this component.


TWebContainedContainerComponent.SetWebParent
 VCL Reference

TWebContainedContainerComponent.SetWebParent

TWebContainedContainerComponent	See also

Sets the value of the WebParent property.

procedure SetWebParent(Value: TComponent);

Description

SetWebParent is used internally to set the read-only WebParent property. To assign a Web parent in an application, add this component to the TWebComponentList object that implements a property on the new Web parent.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent


TWebContainedComponentHelper
 VCL Reference

TWebContainedComponentHelper

Hierarchy	Properties	Methods	Events	See also

TWebContainedComponentHelper implements the common behavior of components that generate HTML on behalf of another component.

Unit

WebComp

Description

Components that generate HTML for another component use TWebContainedComponentHelper to provide the underlying implementation of many of their properties and methods. TWebContainedComponentHelper implements the IWebComponent interface, which allows a TWebComponentList object manage a list of child components. In addition, it implements a number of properties and methods that allow a child Web item to interact with its parent item.


 VCL Reference

TWebContainedComponentHelper properties

TWebContainedComponentHelper	Alphabetically	Legend

In TWebContainedComponentHelper

ContainerList

WebParent


 VCL Reference

TWebContainedComponentHelper properties

TWebContainedComponentHelper	By object	Legend

ContainerList

WebParent


TWebContainedComponentHelper.ContainerList
 VCL Reference

TWebContainedComponentHelper.ContainerList

TWebContainedComponentHelper	See also

Indicates the list that contains the associated component.

property ContainerList: TWebComponentList;

Description

Use ContainerList to access the list in which the associated component appears. The parent item uses the components in the list to generate HTML, which it then assembles into its own HTML output.


TWebContainedComponentHelper.WebParent
 VCL Reference

TWebContainedComponentHelper.WebParent

TWebContainedComponentHelper	See also

Indicates the component that uses the list of Web items that includes the associated component.

property WebParent: TComponent;

Description

WebParent specifies the component on whose behalf the associated component generates HTML. WebParent is the component that uses the list that is the value of the ContainerList property.


 VCL Reference

TWebContainedComponentHelper events

TWebContainedComponentHelper	Alphabetically	Legend

In TWebContainedComponentHelper

OnParentChanged


 VCL Reference

TWebContainedComponentHelper events

TWebContainedComponentHelper	By object	Legend

OnParentChanged


TWebContainedComponentHelper.OnParentChanged
 VCL Reference

TWebContainedComponentHelper.OnParentChanged

TWebContainedComponentHelper	See also

Occurs when the WebParent property changes.

property OnParentChanged: TNotifyEvent;

Description

Components that use TWebContainedComponentHelper so that they can act as a child Web item in a hierarchy of Web items assign an event handler to OnParentChanged.

The associated component uses TWebContainedComponentHelper to implement the IWebComponent interface. This interface can be used to change the value of WebParent. By assigning an OnParentChanged event handler, the associated component can update itself when it moves from one parent item to another.


 VCL Reference

TWebContainedComponentHelper methods

TWebContainedComponentHelper	Alphabetically	Legend

In TWebContainedComponentHelper

Create

Destroy

GetContainer

GetIndex

IsDefaultField

ParentChanged

SetComponentList

SetContainer

SetIndex

SetWebParent

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebContainedComponentHelper methods

TWebContainedComponentHelper	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetContainer

GetIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsDefaultField

MethodAddress

MethodName

NewInstance

ParentChanged

SafeCallException

SetComponentList

SetContainer

SetIndex

SetWebParent


TWebContainedComponentHelper.Create
 VCL Reference

TWebContainedComponentHelper.Create

TWebContainedComponentHelper	See also

Creates an instance of TWebContainedComponentHelper.

constructor Create(AComponent: TComponent; AOnParentChanged: TNotifyEvent);

Description

Applications do not create instances of TWebContainedComponentHelper. The component that uses TWebContainedComponentHelper so that it can appear as a child item in a TWebComponentList object instantiates TWebContainedComponentHelper.

AComponent is the component that uses TWebContainedComponentHelper to implement those properties and methods that allow it to appear in a TWebComponentList object.

AOnParentChanged is an event handler that AComponent supplies so that it can update itself when it is moved to the list of a different parent component. This becomes the event handler for the OnParentChanged event.


TWebContainedComponentHelper.Destroy
 VCL Reference

TWebContainedComponentHelper.Destroy

TWebContainedComponentHelper	See also

Destroys an instance of TWebContainedComponentHelper.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TWebContainedComponentHelper object is not nil and only then calls Destroy.


TWebContainedComponentHelper.GetContainer
 VCL Reference

TWebContainedComponentHelper.GetContainer

TWebContainedComponentHelper	See also

Returns the value of the WebParent property.

function GetContainer: TWebComponentContainer;

Description

Use GetContainer to access the component that uses this helper object’s associated component to assemble its HTML output. The component that this method returns uses the list specified by ContainerList to manage its list of Web items.


TWebContainedComponentHelper.GetIndex
 VCL Reference

TWebContainedComponentHelper.GetIndex

TWebContainedComponentHelper	See also

Returns the position of the associated Web item in the parent item’s array of Web items.

function GetIndex: Integer;

Description

GetIndex returns the index of the associated component in the list that is the value of the ContainerList property. The index of the first item is 0, the index of the second item is 1, and so on.


TWebContainedComponentHelper.IsDefaultField
 VCL Reference

TWebContainedComponentHelper.IsDefaultField

TWebContainedComponentHelper	See also

Indicates whether the associated component represents a Web item that is used by default when the parent’s set of Web items is not explicitly assigned.

function IsDefaultField: Boolean; virtual;

Description

TWebContainedComponentHelper uses IsDefaultField internally to locate the property on the Web parent that lists the associated item along with other Web items.

IsDefaultField returns Ttrue if the TWebComponentList that contains the associated item represents a set of Web items that are used when the application does not explicitly assign Web items to the Web parent. IsDefaultField returns False if the associated component does not belong to such a default list.


TWebContainedComponentHelper.ParentChanged
 VCL Reference

TWebContainedComponentHelper.ParentChanged

TWebContainedComponentHelper	See also

Generates an OnParentChanged event.

procedure ParentChanged; virtual;

Description

ParentChanged is called automatically when the WebParent property changes. It generates an OnParentChanged event, which is handled by the event handler that the associated component passes to the TWebContainedComponentHelper constructor.


TWebContainedComponentHelper.SetComponentList
 VCL Reference

TWebContainedComponentHelper.SetComponentList

TWebContainedComponentHelper	See also

Sets the value of the ContainerList property.

procedure SetComponentList(List: TObject);

Description

SetComponentList assigns the object specified by List as the value of the ContainerList property. Note that List must be an instance of TWebComponentList (or nil).


TWebContainedComponentHelper.SetContainer
 VCL Reference

TWebContainedComponentHelper.SetContainer

TWebContainedComponentHelper	See also

Sets the value of the WebParent property.

procedure SetContainer(Container: TWebComponentContainer);

Description

SetContainer assigns a new value to the WebParent property.

Container is the new Web parent.


TWebContainedComponentHelper.SetIndex
 VCL Reference

TWebContainedComponentHelper.SetIndex

TWebContainedComponentHelper	See also

Sets the position of the associated component in the list specified by ContainerList.

procedure SetIndex(Value: Integer);

Description

SetIndex moves the associated component to a specified position in the list of Web items that contains it.

Value is the new index of the associated component, where 0 specifies the first position, 1 specifies the second position, and so on.


TWebContainedComponentHelper.SetWebParent
 VCL Reference

TWebContainedComponentHelper.SetWebParent

TWebContainedComponentHelper	See also

Sets the value of the WebParent property.

procedure SetWebParent(Value: TComponent);

Description

SetWebParent moves the associated component to the component list of a new parent. To do so, it removes the associated component from the current parent’s list of Web items, adds it to the new Web parent’s list of Web items, and then generates an OnParentChanged event.

Value is the new index of the associated component, where 0 specifies the first position, 1 specifies the second position, and so on.

Value is the new Web parent.


Hierarchy

TObject

TWebContainedComponentHelper


TWebContainedComponent
 VCL Reference

TWebContainedComponent

Hierarchy	Properties	Methods	See also

TWebContainedComponent is the base class for Web items that generate HTML on behalf of another component.

Unit

WebComp

Description

Use TWebContainedComponent as a base class for Web items. Web items are items that generate HTML statements on behalf of another component. The component that uses the generated HTML has a property whose type is a TWebComponentList object that lists a set of its Web items.

TWebContainedComponent implements the logic that fits a component into the hierarchy of Web items. TWebContainedComponent descendants act as leaf nodes in this hierarchy. That is, they do not have their own Web items that they use to generate HTML.

In order to allow TWebComponentList to manage the Web item, TWebContainedComponent implements the IWebComponent interface.

Do not create instances of TWebContainedComponent. TWebContainedComponent does not produce any HTML, but merely handles the relationship to a managing TWebComponentList object.


 VCL Reference

TWebContainedComponent properties

TWebContainedComponent	Alphabetically	Legend

In TWebContainedComponent

WebContainedComponentHelper

WebParent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebContainedComponent properties

TWebContainedComponent	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WebContainedComponentHelper

WebParent


TWebContainedComponent.WebContainedComponentHelper
 VCL Reference

TWebContainedComponent.WebContainedComponentHelper

TWebContainedComponent	See also

Provides access to the helper object that implements the IWebComponent interface for this contained component.

property WebContainedComponentHelper: TWebContainedComponentHelper;

Description

TWebContainedComponent uses WebContainedComponentHelper internally to access the separate helper object that implements the IWebComponent interface. In addition to providing the implementation for the IWebComponent interface, WebContainedComponentHelper provides the underlying implementation for most of the other properties and methods that are common to components that appear in a list of Web items.


TWebContainedComponent.WebParent
 VCL Reference

TWebContainedComponent.WebParent

TWebContainedComponent	See also

Indicates the component that uses this TWebContainedComponent as one of its Web items.

property WebParent: TComponent;

Description

TWebContainedComponent uses WebParent to access the component on whose behalf it generates HTML. WebParent uses a TWebComponentList object that includes this TWebContainedComponent object to represent its Web items.


 VCL Reference

TWebContainedComponent methods

TWebContainedComponent	Alphabetically	Legend

In TWebContainedComponent

Create

Destroy

GetContainerList

GetParentComponent

HasParent

IsDefaultField

ParentChanged

ReadState

SetParentComponent

SetWebParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebContainedComponent methods

TWebContainedComponent	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetContainerList

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsDefaultField

IsImplementorOf

MethodAddress

MethodName

NewInstance

ParentChanged

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetParentComponent

SetSubComponent

SetWebParent

UpdateAction


TWebContainedComponent.Create
 VCL Reference

TWebContainedComponent.Create

TWebContainedComponent	See also

Creates and initializes an instance of TWebContainedComponent.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a contained component at runtime. Web items added at design time using the Web Page editor are instantiated automatically.

AOwner is the component, typically a form or data module, that becomes the value of the Owner property. The Owner is responsible for initiating the loading and saving of this component, and for freeing the TWebContainedComponent instance.


TWebContainedComponent.Destroy
 VCL Reference

TWebContainedComponent.Destroy

TWebContainedComponent

Frees an instance of TWebContainedComponent.

destructor Destroy; override;

Description

Destroy removes this component from its parent’s list of components that generate HTML before freeing the memory used by TWebContainedComponent.


TWebContainedComponent.GetContainerList
 VCL Reference

TWebContainedComponent.GetContainerList

TWebContainedComponent	See also

Returns the TWebComponentList object that the Web parent uses to manage this and its other Web items.

function GetContainerList: TWebComponentList;

Description

Applications can’t access the protected GetContainerList method. It is used internally to access the object manages this item along with the other Web items of the Web parent.


TWebContainedComponent.GetParentComponent
 VCL Reference

TWebContainedComponent.GetParentComponent

TWebContainedComponent	See also

Returns the object that uses this component to generate HTML.

function GetParentComponent: TComponent; override;

Description

TWebContainedComponent overrides the GetParentComponent method that is introduced in TComponent for the streaming system that loads and saves components. It returns the value of the WebParent property (the object that uses the HTML generated by this component when assembling its own portion of an HTML document.)


TWebContainedComponent.HasParent
 VCL Reference

TWebContainedComponent.HasParent

TWebContainedComponent	See also

Indicates whether this component appears in another component’s list of Web items.

function HasParent: Boolean; override;

Description

TWebContainedComponent overrides the HasParent method that is introduced in TComponent for the streaming system that loads and saves components. It returns True if the WebParent property is not nil.

If the contained component has a parent, that parent component is responsible for writing this component to a stream.


TWebContainedComponent.IsDefaultField
 VCL Reference

TWebContainedComponent.IsDefaultField

TWebContainedComponent	See also

Indicates whether this component represents a Web item that is used by default when the parent’s set of Web items is not explicitly assigned.

function IsDefaultField: Boolean; virtual;

Description

TWebContainedComponent uses IsDefaultField internally to locate the property on the Web parent that lists this item along with other Web items.

IsDefaultField returns Ttrue if the TWebComponentList that contains this item represents a set of Web items that are used when the application does not explicitly assign Web items to the Web parent. IsDefaultField returns False if this component does not belong to such a default list.


TWebContainedComponent.ParentChanged
 VCL Reference

TWebContainedComponent.ParentChanged

TWebContainedComponent	See also

Responds when the WebParent property changes.

procedure ParentChanged; virtual;

Description

The protected ParentChanged method is called automatically when the WebParent property changes. As implemented in TWebContainedComponent, ParentChanged does nothing. Descendant classes can override this method to perform any necessary updates in response to the change in Web parent.


TWebContainedComponent.ReadState
 VCL Reference

TWebContainedComponent.ReadState

TWebContainedComponent	See also

Reads the component’s published properties, stored data, and owned components from a reader object.

procedure ReadState(Reader: TReader); override;

Description

ReadState is part of a sequence of calls used by the streaming system that loads and saves components. It reads the values of all the component's published properties, stored data, and owned components from the reader object passed in Reader. Do not call ReadState directly.

TWebContainedComponent overrides ReadState to obtain the parent component from the reader, which it assigns as the value of the WebParent property.

Note:	Any descendant classes overriding ReadState should end with a call to the inherited ReadState method.


TWebContainedComponent.SetParentComponent
 VCL Reference

TWebContainedComponent.SetParentComponent

TWebContainedComponent	See also

Sets the WebParent property to be the same as this component’s parent.

procedure SetParentComponent(AParent: TComponent); override;

Description

TWebContainedComponent overrides the SetParentComponent method that is introduced in TComponent for the streaming system that loads and saves components. It sets the WebParent property to AParent, so that it is the same as the parent that loads and saves this component.


TWebContainedComponent.SetWebParent
 VCL Reference

TWebContainedComponent.SetWebParent

TWebContainedComponent	See also

Sets the value of the WebParent property.

procedure SetWebParent(Value: TComponent);

Description

SetWebParent is used internally to set the read-only WebParent property. To assign a Web parent in an application, add this component to the TWebComponentList object that implements a property on the new Web parent.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent


TWebContainerComponentHelper
 VCL Reference

TWebContainerComponentHelper

Hierarchy	Properties	Methods	Events	See also

TWebContainerComponentHelper implements the common behavior of components that maintain a list of Web items to generate HTML.

Unit

WebComp

Description

Components that maintain a list of Web items to help them generate HTML use TWebContainerComponentHelper to provide the common implementation of properties and methods for managing the list of sub components. This includes

The logic for handling two lists of Web items: one that represents the Web items that the application assigns, and one that represents a set of default items that can be used when the application does not explicitly assign Web items.

The logic for interacting with the component streaming system, so that child Web items are correctly loaded and saved with the component that uses TWebContainerComponentHelper.


 VCL Reference

TWebContainerComponentHelper properties

TWebContainerComponentHelper	Alphabetically	Legend

In TWebContainerComponentHelper

DefaultWebComponents

WebComponents


 VCL Reference

TWebContainerComponentHelper properties

TWebContainerComponentHelper	By object	Legend

DefaultWebComponents

WebComponents


TWebContainerComponentHelper.DefaultWebComponents
 VCL Reference

TWebContainerComponentHelper.DefaultWebComponents

TWebContainerComponentHelper	See also

Lists the Web items that the associated component uses by default if the application does not explicitly assign any Web items.

property DefaultWebComponents: TWebComponentList;

Description

Use DefaultWebComponents to access the list of default Web items that can be used when no items have been explicitly assigned.

TWebContainerComponentHelper does not actually store this list. It leaves that task to the component that uses TWebContainerComponentHelper. Instead, TWebContainerComponentHelper uses two events, OnGetDefaultComponentList and OnSetDefaultComponentList for reading and writing this list. The associated component that uses TWebContainerComponentHelper assigns event handlers to these two events, thereby providing the implementation for this property.


TWebContainerComponentHelper.WebComponents
 VCL Reference

TWebContainerComponentHelper.WebComponents

TWebContainerComponentHelper	See also

Lists the Web items of the associated component.

property WebComponents: TWebComponentList;

Description

WebComponents is the list of Web items that the associated component uses to generate HTML. TWebContainerComponentHelper stores this list on behalf of the object that uses it.


 VCL Reference

TWebContainerComponentHelper events

TWebContainerComponentHelper	Alphabetically	Legend

In TWebContainerComponentHelper

OnGetDefaultComponentList


 VCL Reference

TWebContainerComponentHelper events

TWebContainerComponentHelper	By object	Legend

OnGetDefaultComponentList


TWebContainerComponentHelper.OnGetDefaultComponentList
 VCL Reference

TWebContainerComponentHelper.OnGetDefaultComponentList

TWebContainerComponentHelper	See also

Occurs when TWebContainerComponentHelper needs to access the value of DefaultWebComponents.

type TGetComponentListEvent = procedure(Sender: TObject; var AList: TWebComponentList) of object;

property OnGetDefaultComponentList: TGetComponentListEvent;

Description

The component that uses TWebContainerComponentHelper assigns an event handler for OnGetDefaultComponentList when it creates the TWebContainerComponentHelper instance. This event handler provides the underlying read implementation of the DefaultWebComponents property.

Sender is the TWebContainerComponentHelper instance that needs to access the list of default Web items.

AList returns the list of default Web items.

If the component that uses TWebContainerComponentHelper does not provide an OnGetDefaultComponentList event handler, then the value of the DefaultWebComponents property is nil.


TWebContainerComponentHelper.OnSetDefaultComponentList
 VCL Reference

TWebContainerComponentHelper.OnSetDefaultComponentList

TWebContainerComponentHelper	See also

Occurs when TWebContainerComponentHelper needs to assign the value of DefaultWebComponents.

type TSetChildOrderEvent = procedure(Sender: TObject; AList: TWebComponentList) of object;

property OnSetDefaultComponentList: TSetChildOrderEvent;

Description

The component that uses TWebContainerComponentHelper assigns an event handler for OnSetDefaultComponentList when it creates the TWebContainerComponentHelper instance. This event handler provides the underlying write implementation of the DefaultWebComponents property.

Sender is the TWebContainerComponentHelper instance that needs to assign a list of default Web items.

AList is the new value of the DefaultWebComponents property.

If the component that uses TWebContainerComponentHelper does not provide an OnSetDefaultComponentList event handler, then the value of the DefaultWebComponents can’t be changed.


 VCL Reference

TWebContainerComponentHelper methods

TWebContainerComponentHelper	Alphabetically	Legend

In TWebContainerComponentHelper

Create

Destroy

GetChildren

GetComponentList

GetDefaultComponentList

GetDefaultWebComponents

SetChildOrder

SetDefaultWebComponents

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebContainerComponentHelper methods

TWebContainerComponentHelper	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetChildren

GetComponentList

GetDefaultComponentList

GetDefaultWebComponents

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetChildOrder

SetDefaultWebComponents


TWebContainerComponentHelper.Create
 VCL Reference

TWebContainerComponentHelper.Create

TWebContainerComponentHelper	See also

Creates an instance of TWebContainerComponentHelper.

constructor Create(AComponent: TComponent; AOnGetDefaultComponentList: TGetComponentListEvent; AOnSetDefaultComponentList: TSetChildOrderEvent);

Description

Applications do not create instances of TWebContainerComponentHelper. The component that uses TWebContainerComponentHelper so that it can manage a set of Web items instantiates TWebContainerComponentHelper.

AComponent is the component that uses TWebContainerComponentHelper to manage its list of Web items and to interact with the component streaming system.

AOnGetDefaultComponentList is an event handler that AComponent supplies to provide the read implementation of the DefaultWebComponents property. It is assigned as the event handler for OnGetDefaultComponentList.

AOnSetDefaultComponentList is an event handler that AComponent supplies to provide the write implementation of the DefaultWebComponents property. It is assigned as the event handler for OnSetDefaultComponentList.


TWebContainerComponentHelper.Destroy
 VCL Reference

TWebContainerComponentHelper.Destroy

TWebContainerComponentHelper	See also

Destroys an instance of TWebContainerComponentHelper.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TWebContainerComponentHelper object is not nil and only then calls Destroy.


TWebContainerComponentHelper.GetChildren
 VCL Reference

TWebContainerComponentHelper.GetChildren

TWebContainerComponentHelper	See also

Executes a callback for each child Web item.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent);

Description

GetChildren provides the underlying implementation of the associated component’s GetChildren method. GetChildren is introduced in TComponent for the streaming system that loads and saves components.

GetChildren executes the Proc procedure for each child that in the list specified by the WebComponents property, as long as that component has Root for an Owner. This allows the sub Web items to be loaded and saved with the component that uses TWebContainerComponentHelper.


TWebContainerComponentHelper.GetComponentList
 VCL Reference

TWebContainerComponentHelper.GetComponentList

TWebContainerComponentHelper	See also

Returns the value of the WebComponents property.

function GetComponentList: TObject;

Description

GetComponentList returns the list of Web items that have been assigned to the associated component. The return value is an instance of TWebComponentList.


TWebContainerComponentHelper.GetDefaultComponentList
 VCL Reference

TWebContainerComponentHelper.GetDefaultComponentList

TWebContainerComponentHelper	See also

Returns the list of Web items that is used if an application does not explicitly assign any Web items to the associated component.

function GetDefaultComponentList: TObject;

Description

GetComponentList returns the value of the DefaultWebComponents property. The return value is an instance of TWebComponentList.


TWebContainerComponentHelper.GetDefaultWebComponents
 VCL Reference

TWebContainerComponentHelper.GetDefaultWebComponents

TWebContainerComponentHelper	See also

Generates an OnGetDefaultComponentList event.

procedure GetDefaultWebComponents; virtual;

Description

GetDefaultWebComponents is the read implementation of the DefaultWebComponents property. It generates an OnGetDefaultComponentList event, so that the associated component can supply this list of default items. If there is no OnGetDefaultComponentList event handler, GetDefaultWebComponents returns nil.


TWebContainerComponentHelper.SetChildOrder
 VCL Reference

TWebContainerComponentHelper.SetChildOrder

TWebContainerComponentHelper	See also

Positions a child component in the list of child Web items.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

SetChildOrder provides the underlying implementation of the associated component’s SetChildOrder method. SetChildOrder is introduced in TComponent for the streaming system that loads and saves components. It positions a newly loaded child component in the list specified by WebComponents.

Child is the newly loaded child component.

Order indicates its position in WebComponents, where 0 is the first position, 1 is the second position, and so on.


TWebContainerComponentHelper.SetDefaultWebComponents
 VCL Reference

TWebContainerComponentHelper.SetDefaultWebComponents

TWebContainerComponentHelper	See also

Generates an OnSetDefaultComponentList event.

procedure SetDefaultWebComponents(AList: TWebComponentList);

Description

GetDefaultWebComponents is the write implementation of the DefaultWebComponents property. It generates an OnSetDefaultComponentList event, so that the associated component can assign the new list of default items.


Hierarchy

TObject

TWebContainerComponentHelper


TWebConnection
 VCL Reference

 TWebConnection

Hierarchy	Properties	Methods	Events	Using TWebConnection	See also

TWebConnection uses HTTP to manage the connection to an application server.

Unit

SConnect

Description

TWebConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server. The Web connection object can

Establish an initial connection to a remote application server.

Obtain an IAppServer for the application server.

Obtain a list of providers on the application server.

Drop the connection to the remote application server.

TWebConnection establishes the initial connection between the client application and a remote application server using HTTP. To use TWebConnection, you must have the following:

Wininet.dll must be installed on the client system. Wininet.dll is found in the Windows system directory if you have IE3 or higher installed.

The server system must have IIS version 4 or better or Netscape Enterprise version 3.6 or better.

HTTPsrvr.dll must be installed with the Web server to which TWebConnection forms a connection. HTTPsrvr.dll launches the application server and marshals all calls to the application server interface. It ships with Delphi.

Once the connection is established, the client registers any or all of its client datasets, and these client datasets use the IAppServer interface from the Web connection component to communicate with providers on the application server, or to otherwise call the application server’s data module interface.

To connect to remote application servers using DCOM, use the TDCOMConnection component instead. To connect to remote application servers using TCP/IP, use the TSocketConnection component instead. To connect to remote application servers using SOAP, use the TSoapConnection component. To connect to remote application servers using CORBA, use the TCORBAConnection component.


 VCL Reference

TWebConnection properties

TWebConnection	Alphabetically	Legend

In TWebConnection

Agent

Password

Proxy

ProxyByPass

URL

UserName

Derived from TDispatchConnection

Connected

ObjectBroker

ServerGUID

ServerName

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebConnection properties

TWebConnection	By object	Legend

Agent

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

ObjectBroker

Owner

Password

Proxy

ProxyByPass

ServerGUID

ServerName

Tag

URL

UserName

VCLComObject


TWebConnection.Agent
 VCL Reference

TWebConnection.Agent

TWebConnection	See also

Provides the value of the User-Agent header for HTTP messages to the server.

property Agent: string;

Description

Use Agent to supply HTTP messages generated by the Web connection component with the name of your application. This name is included as a User-Agent header. The User-Agent header is an optional string that describes the application generating the HTTP message.


TWebConnection.Password
 VCL Reference

TWebConnection.Password

TWebConnection	See also

Specifies the password that allows the client application to log on to the application server.

property Password: string;

Description

When the Web connection component connects to the application server, it supplies the values of the UserName and Password properties so that it can log on to the host or proxy. The value of Password can be an empty string if neither the host nor proxy requires authentication.


TWebConnection.Proxy
 VCL Reference

TWebConnection.Proxy

TWebConnection	See also

Lists any proxy servers that are required to make the connection.

property Proxy: string;

Description

Use Proxy if the Web connection component can’t resolve the value of Host locally. If the server is registered locally, Proxy can be a null string. Otherwise, Proxy lists the host names of any proxy servers that can forward request messages on to the intended server machine.


TWebConnection.ProxyByPass
 VCL Reference

TWebConnection.ProxyByPass

TWebConnection	See also

Lists the host names of locally registered servers that do not require a proxy.

property ProxyByPass: string;

Description

Use ProxyByPass to indicate any server systems to which the Web connection component can make a direct connection. When the Host property specifies a server in this list, the Web connection component makes a direct connection even if the Proxy property is specified.

When ProxyByPass is an empty string, the Web connection component checks the registry for any locally known servers and bypasses the proxy server if Host refers to a registered local server.


TWebConnection.URL
 VCL Reference

TWebConnection.URL

TWebConnection	See also

Specifies the Uniform Resource Locator for httpsrvr.dll on the server system.

property URL: string;

Description

Use URL to specify the Uniform Resource Locator that the Web connection component uses to locate httpsrvr.dll. This DLL, which ships with Delphi in the BIN directory, is deployed on the same machine as the Web server so that it can accept HTTP request messages and convert them into COM calls that communicate with the application server.

URL includes the protocol (http or https), host name, and scriptname for httpsrvr.dll. Typically, it has the form

http://DataHost.org/scripts/httpsrvr.dll

Note:	URL is a standard Uniform Resource Locator. As such, you can also use it to override the port associated with http (80) or https (443) if the Web server is configured differently. The port number follows the host name, preceded by a colon.


TWebConnection.UserName
 VCL Reference

TWebConnection.UserName

TWebConnection	See also

Specifies the user name that allows the client application to log on to the application server.

property UserName: string;

Description

When the Web connection component connects to the application server on a local host or to the proxy server, it supplies the values of the UserName and Password properties so that it can log in. If neither the host nor the proxy server requires authentication, UserName can be an empty string.


 VCL Reference

TWebConnection events

TWebConnection	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TWebConnection events

TWebConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TWebConnection methods

TWebConnection	Alphabetically	Legend

In TWebConnection

Create

Destroy

Derived from TStreamedConnection

GetInterceptorList

GetServerList

Derived from TDispatchConnection

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebConnection methods

TWebConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterceptorList

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

GetServerList

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebConnection.Create
 VCL Reference

TWebConnection.Create

TWebConnection	See also

Creates and initializes an instance of TWebConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TWebConnection object at runtime. Web connection components added to forms or data modules at design time are created automatically.

The AOwner parameter specifies the component (usually a form or data module) that is responsible for freeing the Web connection component.


TWebConnection.Destroy
 VCL Reference

TWebConnection.Destroy

TWebConnection

Destroys an instance of TWebConnection.destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the Web connection is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TDispatchConnection

TStreamedConnection

TWebConnection


TWebContentOptions
 VCL Reference

TWebContentOptions

Hierarchy	Properties	Methods	See also

TWebContentOptions controls what a Web item can include in its generated HTML.

Unit

WebComp

Description

Use TWebContentOptions to influence the HTML generated by a component that supports the IWebContent interface. Each TWebContentOptions represents a set of flags that are passed to the constructor.


 VCL Reference

TWebContentOptions properties

TWebContentOptions	Alphabetically	Legend

In TWebContentOptions

Flags


 VCL Reference

TWebContentOptions properties

TWebContentOptions	By object	Legend

Flags


TWebContentOptions.Flags
 VCL Reference

TWebContentOptions.Flags

TWebContentOptions	See also

Lists the flags that indicate what type of generated HTML is permitted.

type

  TWebContentFlag = (coNoScript, coLocalPaths);

  TWebContentFlags = set of TWebContentFlag;

property Flags: TWebContentFlags;

Description

Read Flags to determine what types of HTML a Web item can generate. Flags is a set that contains zero or more of the following:

Value	Meaning

coNoScript	The generated HTML can’t contain any javascript.

coLocalPaths	The generated HTML can use local paths to included resources rather than requiring URLs. This option is for HTML documents that are only viewed on the same machine as the included resources.


 VCL Reference

TWebContentOptions methods

TWebContentOptions	Alphabetically	Legend

In TWebContentOptions

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebContentOptions methods

TWebContentOptions	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TWebContentOptions.Create
 VCL Reference

TWebContentOptions.Create

TWebContentOptions	See also

Creates a new TWebContentOptions object.

constructor Create(AFlags: TWebContentFlags);

Description

Call Create to create a TWebContentOptions instance at runtime. Pass the flags that the object should represent as the value of the AFlags parameter. This value initializes the Flags property.


Hierarchy

TObject

TWebContentOptions


TWebControlGroup
 VCL Reference

TWebControlGroup

Hierarchy	Properties	Methods	See also

TWebControlGroup is the base class for Web items that arrange HTML controls.

Unit

MidItems

Description

Use TWebControlGroup as a base class for components that generate organized portions of the HTML document containing one or more related HTML controls.  TWebControlGroup introduces the properties and methods for managing a collection of Web items that generate the HTML controls that make up the group.

In order to let other Web items to use the HTML that defines the organized collection of controls, TWebControlGroup implements the IWebContent interface.

Do not create instances of TWebControlGroup. TWebControlGroup manages the Web items that generate HTML defining controls, but does not combine the generated content into any content of its own. Instead, use a descendant of TWebControlGroup that generates the HTML for its set of specialized controls. These descendants include TDataNavigator, TQueryButtons, TDataGrid, TFieldGroup, and TQueryFieldGroup.


 VCL Reference

TWebControlGroup properties

TWebControlGroup	Alphabetically	Legend

In TWebControlGroup

WebFieldControls

DefaultWebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebControlGroup properties

TWebControlGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DefaultWebComponents

DesignInfo

Name

Owner

Tag

VCLComObject

WebFieldControls


TWebControlGroup.DefaultWebComponents
 VCL Reference

TWebControlGroup.DefaultWebComponents

TWebControlGroup	See also

Specifies the default value of the WebFieldControls property when that property is not explicitly set.

property DefaultWebComponents: TWebComponentList;

Description

Most TWebControlGroup descendants have a default set of values for the WebFieldControls property. For example, TDataNavigator has a default set of buttons and TFieldGroup defaults to a control for each field in the associated data packet. TWebControlGroup descendants that supply default sets of Web items store these default sets as the value of the protected DefaultWebComponents property. Then, if the value of WebFieldControls is not set, the TWebControlGroup descendant uses DefaultWebComponents instead.


TWebControlGroup.WebFieldControls
 VCL Reference

TWebControlGroup.WebFieldControls

TWebControlGroup	See also

Lists the components that generate HTML controls for the Web control group.

property WebFieldControls: TWebComponentList;

Description

WebFieldControls lists the components that generate the related HTML controls that the Web control group assembles into a single unit. Each of these components supports the IWebContent interface, and some can contain their own list of Web items that help them generate their content.

The type of items that can be added to the WebFieldControls list are restricted by the CanAddClass method. TWebControlGroup does not restrict the items in the list at all, but descendant classes add restrictions to limit the list to related types of controls. For example, TDataNavigator limits the list to button generators that are descendants of TDataSetButton or TXMLButton.

At design time, add components to the WebFieldControls property by bringing up the Web page editor for the containing TInetXPageProducer component. Select the Web control group in the editor, and use the editor to add child controls.


 VCL Reference

TWebControlGroup methods

TWebControlGroup	Alphabetically	Legend

In TWebControlGroup

AddElements

CanAddClass

ChangeFieldControls

Content

Create

Destroy

GetDefaultWebComponents

GetLayoutAttributes

GetSubComponents

ImplAddElements

ImplCanAddClass

ImplContent

ImplGetSubComponents

SetDefaultWebComponents

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebControlGroup methods

TWebControlGroup	By object	Legend

AddElements

AfterConstruction

Assign

BeforeDestruction

CanAddClass

ChangeFieldControls

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDefaultWebComponents

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLayoutAttributes

GetNamePath

GetParentComponent

GetSubComponents

HasParent

ImplAddElements

ImplCanAddClass

ImplContent

ImplGetSubComponents

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetDefaultWebComponents

SetSubComponent

UpdateAction


TWebControlGroup.AddElements
 VCL Reference

TWebControlGroup.AddElements

TWebControlGroup	See also

Used internally to generate any javascript declarations needed by the group of controls.

procedure AddElements(AddIntf: IAddScriptElements);

Description

The InternetExpress page producer calls AddElements when it generates the block of javascript declarations in its HTML document. This method allows the generated group of controls to use javascript classes and methods.

AddElements calls on the virtual ImplAddElements method, which uses the provided interface to return javascript declarations. Each TWebControlGroup descendant overrides ImplAddElements to add any declarations it needs.


TWebControlGroup.CanAddClass
 VCL Reference

TWebControlGroup.CanAddClass

TWebControlGroup	See also

Specifies whether a Web item of a specified type can be added to the WebFieldControls property list.

type TClass = class of TObject;

function CanAddClass(AParent: TComponent; AClass: TClass): Boolean;

Description

The Web page editor calls CanAddClass to determine what Web items can be added to supply content for the TWebControlGroup descendant. CanAddClass calls the virtual ImplCanAddClass method to determine whether a class of Web item is valid.

AParent is the TWebControlGroup descendant to whose WebFieldControls property the Web item will be added.

AClass is the class of the proposed child Web item.

CanAddClass returns True if the TWebControlGroup descendant can use content generated by a component of type AClass, False otherwise.


TWebControlGroup.ChangeFieldControls
 VCL Reference

TWebControlGroup.ChangeFieldControls

TWebControlGroup	See also

Responds when the group of HTML controls changes.

procedure ChangeFieldControls(Sender: TObject);

Description

ChangeFieldControls is called automatically when the list of Web items that generate HTML controls in this group changes. (It is assigned as the OnChange event handler to the TWebComponentList object that implements the WebFieldControls property.)

ChangeFieldControls sets the DefaultWebComponents property to nil when an application explicitly assigns child items to the WebFieldControls property.


TWebControlGroup.Content
 VCL Reference

TWebControlGroup.Content

TWebControlGroup	See also

Returns the HTML that defines the group of HTML controls.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string;

Description

Content implements the IWebContent method of the same name. This method allows the TWebControlGroup object’s parent to extract the HTML that defines and lays out a set of controls.

Content calls the virtual ImplContent method to provide the HTML it returns. Each TWebControlGroup descendant overrides ImplContent to generate its particular group of controls. The generated HTML can make use of any javascript declarations supplied by the AddElements method.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the component should format the HTML it generates. It implements the ILayoutWebContent interface.

Content returns a string of HTML defining the group of controls.


TWebControlGroup.Create
 VCL Reference

TWebControlGroup.Create

TWebControlGroup	See also

Creates and initializes an instance of TWebControlGroup.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebControlGroup at runtime. TWebControlGroup descendants added at design time using the Web Page editor are instantiated automatically.


TWebControlGroup.Destroy
 VCL Reference

TWebControlGroup.Destroy

TWebControlGroup

Frees an instance of TWebControlGroup.

destructor Destroy; override;

Description

Destroy removes the Web control group from its parent’s list of components that generate HTML before freeing its own resources.


TWebControlGroup.GetDefaultWebComponents
 VCL Reference

TWebControlGroup.GetDefaultWebComponents

TWebControlGroup	See also

Returns the value of the DefaultWebComponents property.

function GetDefaultWebComponents: TWebComponentList;

Description

GetDefaultWebComponents returns the value of DefaultWebComponents. When no Web items have explicitly been added to the control group, this is a list of controls that appear by default. Once an application explicitly assigns controls to the WebFieldControls property, GetDefaultWebComponents returns nil.


TWebControlGroup.GetLayoutAttributes
 VCL Reference

TWebControlGroup.GetLayoutAttributes

TWebControlGroup	See also

Returns an object that specifies how the generated group of controls should look.

function GetLayoutAttributes: TLayoutAttributes; virtual;

Description

GetLayoutAttributes is used internally by Web items to allow the layout object supplied by a parent (as a parameter to the Content method) to take into account layout properties of the child component.

As implemented by TWebControlGroup, GetLayoutAttributes returns nil, because TWebControlGroup descendants not make use of layout attributes.


TWebControlGroup.GetSubComponents
 VCL Reference

TWebControlGroup.GetSubComponents

TWebControlGroup	See also

Returns the value of the WebFieldControls property.

function GetSubComponents: TObject;

Description

GetSubComponents returns the TWebControlGroup’s list of Web items that it uses to generate HTML content. This method is part of the mechanism that fits TWebControlGroup into a hierarchy of Web items, each of which generates part of a larger HTML document.


TWebControlGroup.ImplAddElements
 VCL Reference

TWebControlGroup.ImplAddElements

TWebControlGroup	See also

Provides the underlying implementation for the AddElements method.

procedure ImplAddElements(AddIntf: IAddScriptElements); virtual;

Description

The AddElements method calls ImplAddElements to add any javascript declarations by calling the AddIntf interface. These declarations allow the generated display control to call javascript methods in response to user events by ensuring that the required methods are declared.

As implemented in TWebControlGroup, ImplAddElements does nothing. TWebControlGroup descendants override ImplAddElements to add any required declarations.


TWebControlGroup.ImplCanAddClass
 VCL Reference

TWebControlGroup.ImplCanAddClass

TWebControlGroup	See also

Provides the underlying implementation for the CanAddClass method.

type TClass = class of TObject;

function ImplCanAddClass(AParent: TComponent; AClass: TClass): Boolean; virtual;

Description

The CanAddClass method calls ImpleCanAddClass to determine whether the TWebControlGroup descendant can add a component of type AClass to its WebComponents property list. AParent is the TWebControlGroup instance to which the component will be added.

In TWebControlGroup, ImplCanAddClass always returns True. TWebControlGroup descendants override ImplCanAddClass to indicate what types of Web Items they can use when generating their HTML content.


TWebControlGroup.ImplContent
 VCL Reference

TWebControlGroup.ImplContent

TWebControlGroup	See also

Provides the underlying implementation for the Content method.

function ImplContent(Options: TWebContentOptions; ParentLayout: TLayout): string; virtual;

Description

The Content method calls ImplContent to generate the group of HTML controls. As implemented in TWebControlGroup, ImplContent returns an empty string. TWebControlGroup descendants override it to generate HTML for the group of controls.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the TWebControlGroup should format the HTML controls it generates. It implements the ILayoutWebContent interface.

ImplContent returns the generated HTML.


TWebControlGroup.ImplGetSubComponents
 VCL Reference

TWebControlGroup.ImplGetSubComponents

TWebControlGroup	See also

Provides the underlying implementation for the GetSubComponents method.

function  function ImplGetSubComponents: TObject; virtual;

Description

The GetSubComponents method calls ImplGetSubComponents to retrieve the value of WebFieldControls as a TObject. TWebControlGroup descendants override this method if the list is not simply the value of WebFieldControls. For example, some TWebControlGroup descendants supply a default value (DefaultWebComponents) when the WebFieldControls property list is empty.

ImplGetSubComponents returns the TWebComponentList object that contains all subitems of the Web control group.


TWebControlGroup.SetDefaultWebComponents
 VCL Reference

TWebControlGroup.SetDefaultWebComponents

TWebControlGroup	See also

Sets the value of the DefaultWebComponents property.

function SetDefaultWebComponents(Value: TWebComponentList);

Description

SetDefaultWebComponents assigns a list of Web items as the value of the DefaultWebComponents property. This list specifies the controls that appear in the control group if the application does not explicitly assign any controls to the WebFieldControls property.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup


TWebDataDisplay
 VCL Reference

TWebDataDisplay

Hierarchy	Properties	Methods	See also

TWebDataDisplay is the base class for Web items that create HTML display controls.

Unit

MidItems

Description

Use TWebDataDisplay as a base class for components that generate HTML controls which display information in an InternetExpress application. TWebDataDisplay descendants generate the individual controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebDataDisplay introduces the properties and methods for

Generating a caption that describes the information displayed.

Customizing the appearance of the control that displays information.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebDataDisplay implements the IWebContent interface.

Do not create instances of TWebDataDisplay. TWebDataDisplay relies on an abstract method for generating the display control. Instead, use a descendant of TWebDataDisplay that generates an HTML control of the desired type.


 VCL Reference

TWebDataDisplay properties

TWebDataDisplay	Alphabetically	Legend

In TWebDataDisplay

Caption

CaptionAttributes

CaptionPosition

Custom

LayoutAttributes

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebDataDisplay properties

TWebDataDisplay	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

LayoutAttributes

Name

Owner

Style

StyleRule

TabIndex

Tag

VCLComObject


TWebDataDisplay.Caption
 VCL Reference

TWebDataDisplay.Caption

TWebDataDisplay	See also

Specifies the text of a label that indicates what information the generated control displays.

property Caption: string;

Description

Use Caption to specify the text of the control’s label.


TWebDataDisplay.CaptionAttributes
 VCL Reference

TWebDataDisplay.CaptionAttributes

TWebDataDisplay	See also

Customizes the appearance of the generated control’s label.

property CaptionAttributes: TCaptionAttributes;

Description

Use CaptionAttributes to customize the appearance of the control’s label. CaptionAttributes defines a set of options that are added to an HTML SPAN tag surrounding the value of the Caption property.


TWebDataDisplay.CaptionPosition
 VCL Reference

TWebDataDisplay.CaptionPosition

TWebDataDisplay	See also

Specifies where the label appears relative to the generated display control.

type TCaptionPosition = (capLeft, capRight, capAbove, capBelow);

property CaptionPosition: TCaptionPosition;

Description

Use CaptionPosition to indicate where the label should appear relative to the control that displays information. CaptionPosition has one of the following values:

Value	Meaning

capLeft	The caption appears to the left of the display control.

capRight	The caption appears to the right of the display control.

capAbove	The caption appears above the display control.

capBelow	The caption appears below the display control.

Note:	CaptionPosition has no effect on column controls. The position of column labels is always in the table header.


TWebDataDisplay.Custom
 VCL Reference

TWebDataDisplay.Custom

TWebDataDisplay	See also

Represents a tag option and its value in the tag for the display control.

property Custom: string;

Description

TWebDataDisplay descendants generate different HTML tags to generate the control that displays information. Use Custom to add options that qualify the tag. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to provide an INPUT control with an accelerator key and align text to the bottom, you can set Custom to

ACCESSKEY=A ALIGN=BOTTOM

Note:	To add custom options to the control’s label, use the CaptionAttributes property instead.


TWebDataDisplay.LayoutAttributes
 VCL Reference

TWebDataDisplay.LayoutAttributes

TWebDataDisplay	See also

Encodes attributes that describe how the generated control should look.

property LayoutAttributes: TLayoutAttributes;

Description

LayoutAttributes is used internally by Web items to allow the layout object supplied by a parent (as a parameter to the Content method) to take into account layout properties of the child component.

LayoutAttributes encodes the information in the CaptionPosition and CaptionAttributes properties. Some descendant classes add information from the Style and StyleRule properties as well.


TWebDataDisplay.Style
 VCL Reference

TWebDataDisplay.Style

TWebDataDisplay	See also

Adds style attributes to the generated display control.

property Style: string;

Description

Use Style to specify display characteristics that affect the generated control. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the HTML tag that generates the control as the value of a STYLE option.

Note:	To add style attributes to the control’s label, use the CaptionAttributes property instead.


TWebDataDisplay.StyleRule
 VCL Reference

TWebDataDisplay.StyleRule

TWebDataDisplay	See also

Applies a style in the page producer’s style sheet to the generated display control.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated display control. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

To apply a style definition that is not included in the style sheet, use the Style property instead.

Note:	To apply a style to the control’s label, use the CaptionAttributes property instead.


TWebDataDisplay.TabIndex
 VCL Reference

TWebDataDisplay.TabIndex

TWebDataDisplay

Determines the position of the generated control in the HTML form’s tab order.

property TabIndex: Integer;

Description

Use TabIndex to control the order that focus moves between controls when the end-user presses the Tab key. TabIndex specifies the position of the control in the tab order. If TabIndex is less than 0, the HTML tag’s TABINDEX option is not set.


 VCL Reference

TWebDataDisplay methods

TWebDataDisplay	Alphabetically	Legend

In TWebDataDisplay

Content

ControlContent

Create

Destroy

EventContent

FormatCaption

GetCaption

GetContainer

GetHTMLControlName

GetHTMLForm

GetLayoutAttributes

GetXmlDisplayName

GetXmlRowSetName

ImplContent

ImplGetHTMLControlName

IsColumn

IsQueryField

LabelContent

SetCaption

SetCaptionAttributes

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebDataDisplay methods

TWebDataDisplay	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ControlContent

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

EventContent

ExecuteAction

FieldAddress

FindComponent

FormatCaption

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCaption

GetContainer

GetHTMLControlName

GetHTMLForm

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLayoutAttributes

GetNamePath

GetParentComponent

GetXmlDisplayName

GetXmlRowSetName

HasParent

ImplContent

ImplGetHTMLControlName

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

LabelContent

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetCaption

SetCaptionAttributes

SetSubComponent

UpdateAction


TWebDataDisplay.Content
 VCL Reference

TWebDataDisplay.Content

TWebDataDisplay	See also

Returns the HTML that defines the display control.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string;

Description

Content implements the IWebContent method of the same name. This method allows the TWebDataDisplay component’s parent to extract the HTML defining the display control.

Content calls the virtual ImplContent method to provide the HTML content that it returns. Each TWebDataDisplay descendant overrides ImplContent to generate the definition of its particular control.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the component should format the HTML control it generates. It supports the ILayoutWebContent interface.

Content returns a string of HTML defining the display control.


TWebDataDisplay.ControlContent
 VCL Reference

TWebDataDisplay.ControlContent

TWebDataDisplay	See also

Returns the HTML that defines the display control (without its caption).

function ControlContent(Options: TWebContentOptions): string; virtual; abstract;

Description

ControlContent is used internally to generate the HTML for the display control. This method does not generate any HTML for the control’s label, which is handled separately by the FormatCaption method.

TWebDataDisplay introduces ControlContent as an abstract method. Descendant classes override this method to generate the appropriate type of display component.

Options contains a set of flags that limit what can be included in the generated HTML.

ControlContent returns a string of HTML defining the display control.


TWebDataDisplay.Create
 VCL Reference

TWebDataDisplay.Create

TWebDataDisplay	See also

Creates and initializes an instance of TWebDataDisplay.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebDataDisplay at runtime. TWebDataDisplay descendants added at design time using the Web Page editor are instantiated automatically.


TWebDataDisplay.Destroy
 VCL Reference

TWebDataDisplay.Destroy

TWebDataDisplay	See also

Frees an instance of TWebDataDisplay.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the component is not nil, and only then calls Destroy.


TWebDataDisplay.EventContent
 VCL Reference

TWebDataDisplay.EventContent

TWebDataDisplay	See also

Returns the tag options that indicate how the control responds to defined events.

function EventContent(Options: TWebContentOptions): string; virtual;

Description

EventContent is used internally when generating the HTML for the display control. It generates the javascript calls that respond to defined user events. The resulting string is added to the options of the HTML tag that defines the control.

As implemented in TWebDataDisplay, EventContent returns an empty string. Descendant classes override this method to generate the appropriate javascript calls.

Options contains a set of flags that limit what can be included in the generated HTML.

EventContent returns a string of HTML listing the events followed by the javascript calls that handle them.


TWebDataDisplay.FormatCaption
 VCL Reference

TWebDataDisplay.FormatCaption

TWebDataDisplay	See also

Returns the HTML for the display control’s caption.

function FormatCaption: string; virtual;

Description

FormatCaption generates the HTML for the display control’s caption, using the attributes specified by the CaptionAttributes property. FormatCaption returns the resulting string of HTML.

In addition, FormatCaption encodes the layout properties of the caption and the value of the CaptionPosition property into the LayoutAttributes property. The TWebDataDisplay component uses this value later to lay out the control and its caption appropriately.


TWebDataDisplay.GetCaption
 VCL Reference

TWebDataDisplay.GetCaption

TWebDataDisplay	See also

Returns the value of the Caption property.

function GetCaption: string; virtual;

Description

GetCaption is the protected read implementation for the Caption property.


TWebDataDisplay.GetContainer
 VCL Reference

TWebDataDisplay.GetContainer

TWebDataDisplay	See also

Returns the component that uses TWebDataDisplay to generate part of its own HTML..

function GetContainer: TWebComponentContainer;

Description

GetContainer implements the IWebComponent method of the same name. By implementing the IWebComponent interface, TWebDataDisplay can fit into a hierarchy of Web items, each of which generates part of a larger HTML document.

GetContainer returns the component that uses the HTML display control which the TWebDataDisplay descendant generates.


TWebDataDisplay.GetHTMLControlName
 VCL Reference

TWebDataDisplay.GetHTMLControlName

TWebDataDisplay	See also

Returns the name that other components can use to refer to the generated display control.

function GetHTMLControlName: string;

Description

GetHTMLControlName returns the name of the generated control. This value is assigned to a NAME option on the generated HTML tag.

GetHTMLControlName returns the value supplied by the ImplGetHTMLControlName method. Unlike GetHTMLControlName, ImplGetHTMLControlName is a virtual method that descendants can override to supply a name in class-specific ways.


TWebDataDisplay.GetHTMLForm
 VCL Reference

TWebDataDisplay.GetHTMLForm

TWebDataDisplay	See also

Used internally to retrieve information about the HTML form in which the display control is defined.

function GetHTMLForm: IHTMLForm;

Description

TWebDataDisplay and its descendants use GetHTMLForm to obtain information about the form in which the generated display control appears. This information is used to generate code for calling form methods in response to user events.

GetHTMLForm walks up the hierarchy of Web items (using the GetParentComponent method) until it finds a component that can supply an interface for the HTML form.


TWebDataDisplay.GetLayoutAttributes
 VCL Reference

TWebDataDisplay.GetLayoutAttributes

TWebDataDisplay	See also

Returns the value of the LayoutAttributes property.

function GetLayoutAttributes: TLayoutAttributes; virtual;

Description

GetLayoutAttributes is used internally by Web items to allow the layout object supplied by a parent (as a parameter to the Content method) to take into account layout properties of the child component.

GetLayoutAttributes returns the value of the LayoutAttributes property.


TWebDataDisplay.GetParentComponent
 VCL Reference

TWebDataDisplay.GetParentComponent

TWebDataDisplay	See also

Returns the Web item that uses this component to generate HTML.

function GetParentComponent: TComponent; override;

Description

TWebDataDisplay overrides the GetParentComponent method that is introduced in TComponent for the streaming system that loads and saves VCL components. It returns the Web item that uses the HTML generated by the Web data display component when assembling its own portion of the HTML document.


TWebDataDisplay.GetXmlDisplayName
 VCL Reference

TWebDataDisplay.GetXmlDisplayName

TWebDataDisplay	See also

Returns the name of the javascript object that uses TWebDataDisplay to generate one of its display controls.

function GetHTMLControlName: string;

Description

GetXmlDisplayName returns the name of the javascript object that groups the set of display controls which includes this TWebDataDisplay descendant’s generated control. The javascript object is generated by a TDataGrid or TFieldGroup component, and provides the display component’s link to its XML data packet. Typically, the TDataGrid or TFieldGroup component is the parent of the TWebDataDisplay component, but it may be higher in the parent hierarchy if the application uses layout groups.


TWebDataDisplay.GetXmlRowSetName
 VCL Reference

TWebDataDisplay.GetXmlRowSetName

TWebDataDisplay	See also

Returns the name of the rowset in the XML data packet whose data is represented by the HTML this component generates.

function GetXmlRowSetName; string;

Description

GetXmlRowSetName is used when generating HTML that accesses data from the XML data packet. It returns the name of the rowset that represents the data in the Web data display.

As implemented in TWebDataDisplay, GetXmlRowSetName walks up the parent hierarchy until it finds a Web item associated with a rowset, and then returns the name of that rowset.


TWebDataDisplay.HasParent
 VCL Reference

TWebDataDisplay.HasParent

TWebDataDisplay	See also

Indicates whether the component generates its display control on behalf of another component.

function HasParent: Boolean; override;

Description

TWebDataDisplay overrides the HasParent method that is introduced in TComponent for the streaming system that loads and saves VCL components. It returns True if there is a Web item that uses the generated display control when assembling its own portion of the HTML document.

If the Web data display component has a parent, that parent component is responsible for writing it to a stream.


TWebDataDisplay.ImplContent
 VCL Reference

TWebDataDisplay.ImplContent

TWebDataDisplay	See also

Provides the underlying implementation for the Content method.

function ImplContent(Options: TWebContentOptions; ParentLayout: TLayout): string; virtual;

Description

The Content method calls ImplContent to generate the HTML that defines the display control and its label. ImplContent formats the caption and combines this HTML with the results of the ControlContent method. ControlContent is an abstract method in TWebDataDisplay. TWebDataDisplay descendants override it to generate the definition of their particular display control.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the TWebDataDisplay should format the HTML control it generates. It implements the ILayoutWebContent interface.

ImplContent returns a string of HTML defining the display control.


TWebDataDisplay.ImplGetHTMLControlName
 VCL Reference

TWebDataDisplay.ImplGetHTMLControlName

TWebDataDisplay	See also

Returns the name that other components can use to refer to the generated display control.

function ImplGetHTMLControlName: string; virtual;

Description

ImplGetHTMLControlName returns the name of the generated control. This value is assigned to a NAME option on the generated HTML tag.

ImplGetHTMLControlName returns the value of the Name property. TWebDataDisplay descendants can override this method to return a more meaningful value such as the name of the field or parameter displayed in the control.


TWebDataDisplay.IsColumn
 VCL Reference

TWebDataDisplay.IsColumn

TWebDataDisplay	See also

Indicates whether the component generates the controls that appear in the column of a data grid.

class function IsColumn: Boolean; virtual;

Description

Call IsColumn to determine whether a TWebDataDisplay descendant generates the controls that appear in a single column of a data grid. As implemented in TWebDataDisplay, IsColumn returns False. Descendant classes that generate controls for the columns of a data grid override this method to return True.


TWebDataDisplay.IsQueryField
 VCL Reference

TWebDataDisplay.IsQueryField

TWebDataDisplay	See also

Indicates whether the component generates the controls that appear in a query form.

class function IsQueryField: Boolean; virtual;

Description

Call IsQueryField to determine whether a TWebDataDisplay descendant generates the controls that represent a named value in a query form (TQueryForm). As implemented in TWebDataDisplay, IsQueryField returns False. Descendant classes that generate controls for a TQueryFieldGroup component override this method to return True.


TWebDataDisplay.LabelContent
 VCL Reference

TWebDataDisplay.LabelContent

TWebDataDisplay	See also

Returns the HTML for the display control’s caption.

function LabelContent: string; virtual;

Description

The ImplContent method calls LabelContent to provide the HTML for the label of the generated display control. LabelContent calls the FormatCaption method to produce this HTML and returns the resulting string.


TWebDataDisplay.SetCaption
 VCL Reference

TWebDataDisplay.SetCaption

TWebDataDisplay	See also

Sets the value of the Caption property.

procedure SetCaption(const Value: string);

Description

SetCaption is the protected write implementation for the Caption property.


TWebDataDisplay.SetCaptionAttributes
 VCL Reference

TWebDataDisplay.SetCaptionAttributes

TWebDataDisplay	See also

Sets the value of the CaptionAttributes property.

procedure SetCaptionAttributes(const Value: TCaptionAttributes;);

Description

SetCaptionAttributes is the protected write implementation for the CaptionAttributes property.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay


TWebDataInput
 VCL Reference

TWebDataInput

Hierarchy	Properties	Methods	See also

TWebDataInput is the base class for Web items that create HTML display controls for entering information.

Unit

MidItems

Description

Use TWebDataInput as a base class for components that generate HTML controls which display information in an InternetExpress application and into which users can enter values. TWebDataInput descendants generate controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebDataInput defines or inherits properties and methods for

Generating a caption that describes the information displayed.

Customizing the appearance of the control that displays information.

Specifying a field or parameter whose value the control displays.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebDataInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebDataInput. TWebDataInput relies on an abstract method for generating the display control. Instead, use a descendant of TWebDataInput that generates an HTML control of the desired type.


 VCL Reference

TWebDataInput properties

TWebDataInput	Alphabetically	Legend

In TWebDataInput

Caption

FieldName

ParamName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebDataInput properties

TWebDataInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

FieldName

Name

Owner

ParamName

Style

StyleRule

TabIndex

Tag

VCLComObject


TWebDataInput.Caption
 VCL Reference

TWebDataInput.Caption

TWebDataInput	See also

Specifies the caption on the HTML control that this component generates.

property Caption: string;

Description

Use Caption to specify the text of the control’s label.

If Caption is an empty string, the control’s label displays the first of the following values that is set:

The value of the FieldName property.

The value of the ParamName property.

The value of the Name property.


TWebDataInput.FieldName
 VCL Reference

TWebDataInput.FieldName

TWebDataInput	See also

Specifies the name of the field whose value the generated control represents.

property FieldName: string;

Description

Use FieldName to bind the Web data input component to a field in the XML data packet. When the display control represents a field value, this is the field whose value is displayed and edited using the control. When the display control represents a parameter value, this is a field that is used to filter records that appear in data packets.

The dataset that contains the field is identified by the XMLBroker and XMLDataSetField properties of the Web item that acts as a parent to the Web data input component.


TWebDataInput.ParamName
 VCL Reference

TWebDataInput.ParamName

TWebDataInput	See also

Specifies the name of the parameter whose value the generated control represents.

property ParamName: string;

Description

Use ParamName to bind the Web data input component to a parameter in the XML data packet or supply an application-specific name to the value for this control.  ParamName is only used when the IsQueryField method returns True. By default, the controls in a query form represent parameter values. However, they can be used to represent any named value.

If ParamName identifies one of the parameters of an XML broker, the XML broker property of the parent Web item identifies the broker that uses the parameter.


 VCL Reference

TWebDataInput methods

TWebDataInput	Alphabetically	Legend

Derived from TWebDataDisplay

Create

Destroy

GetParentComponent

HasParent

IsColumn

IsQueryField

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebDataInput methods

TWebDataInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebDataDisplay

TWebDataInput


TWebDisplayReferenceGroup
 VCL Reference

TWebDisplayReferenceGroup

Hierarchy	Properties	Methods	See also

TWebDisplayReferenceGroup is the base class for Web items that arrange a set of button controls that influence a control that displays data.

Unit

MidItems

Description

Use TWebDisplayReferenceGroup as a base class for Web items that generate the HTML to arrange a collection of button controls. Each TXMLDisplayGroup object has an associated Web item that generates controls that display data in the final HTML document. The buttons arranged by TWebDisplayReferenceGroup manipulate the information the display controls show.

In order to let other Web items use the HTML that the TWebDisplayReferenceGroup object generates, TWebDisplayReferenceGroup inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TWebDisplayReferenceGroup. TWebDisplayReferenceGroup manages the Web items that generate buttons and the association to a display generator, but does not produce any content. Instead, use a descendant of TWebDisplayReferenceGroup that generates the HTML for its set of specialized buttons such as TDataNavigator or TQueryButtons.


 VCL Reference

TWebDisplayReferenceGroup properties

TWebDisplayReferenceGroup	Alphabetically	Legend

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebDisplayReferenceGroup properties

TWebDisplayReferenceGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WebFieldControls


 VCL Reference

TWebDisplayReferenceGroup methods

TWebDisplayReferenceGroup	Alphabetically	Legend

In TWebDisplayReferenceGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebDisplayReferenceGroup methods

TWebDisplayReferenceGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebDisplayReferenceGroup.Create
 VCL Reference

TWebDisplayReferenceGroup.Create

TWebDisplayReferenceGroup

Creates an instance of TWebDisplayReferenceGroup.

constructor Create(AOwner: TComponent); override;

Call TWebDisplayReferenceGroup to instantiate TWebDisplayReferenceGroup at runtime. TWebDisplayReferenceGroup components added at design time using the Web Page editor are instantiated automatically.


TWebDisplayReferenceGroup.Destroy
 VCL Reference

TWebDisplayReferenceGroup.Destroy

TWebDisplayReferenceGroup	See also

Frees an instance of TWebDisplayReferenceGroup.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks whether the object is not nil before calling Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TWebDisplayReferenceGroup


TWebForm
 VCL Reference

TWebForm

Hierarchy	Properties	Methods	See also

TWebForm is the base class for Web items that create HTML forms in InternetExpress applications.

Unit

MidItems

Description

Use TWebForm as a base class for components that generate the HTML statements defining a form that is contained in an HTML document. The list of Web items that generate content for an InternetExpress page producer can only contain descendants of TWebForm.

In order to allow the InternetExpress page producer to use the HTML generated by the TWebForm descendant, TWebForm implements the IWebContent interface. In order to allow other Web items to generate javascript that refers to form elements, TWebForm implements the IHTMLForm interface.

Do not create instances of TWebForm. TWebForm relies on an abstract method to generate the HTML form. Instead, create descendants of TWebForm such a TDataForm or TQueryForm.


 VCL Reference

TWebForm properties

TWebForm	Alphabetically	Legend

In TWebForm

Custom

Style

StyleRule

VisibleFields

WebComponents

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebForm properties

TWebForm	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

VisibleFields

WebComponents


TWebForm.Custom
 VCL Reference

TWebForm.Custom

TWebForm	See also

Represents a tag option and its value in the generated FORM tag.

property Custom: string;

Description

Use Custom to represent one or more options that qualify the FORM tag generated by the TWebForm descendant. Each option and its value has the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to specify that the form includes files with the text it submits and indicate that the page returned after submitting the form goes into a separate window, use a Custom value such as the following:

ENCTYPE="multipart/form-data" TARGET="ResultFrame"


TWebForm.Style
 VCL Reference

TWebForm.Style

TWebForm	See also

Adds style attributes to the generated form.

property Style: string;

Description

Use Style to add a STYLE option that qualifies the FORM tag generated by the TWebForm descendant. The Style option consists of one or more attribute descriptions such as

font-family: arial; font-weight: bold; font-size: 10px

These attributes are added to the generated FORM tag as the value of a STYLE option.


TWebForm.StyleRule
 VCL Reference

TWebForm.StyleRule

TWebForm	See also

Applies a style in the page producer’s style sheet to the button.

property StyleRule: string;

Description

Use StyleRule to assign one of the user-defined styles in the HTML document’s style sheet to the generated form. The value of StyleRule specifies one of the user-defined style names defined in the InternetExpress page producer’s Styles or StylesFile property.

Note:	To apply a style definition that is not included in the style sheet, use the Style property.


TWebForm.VisibleFields
 VCL Reference

TWebForm.VisibleFields

TWebForm	See also

Lists the Web items whose generated content appears in the HTML form.

property VisibleFields: TWebComponentList;

Description

VisibleFields is used internally when assembling the HTML form from the HTML generated by the form’s Web items. For TWebForm, the value of VisibleFields is always the same as WebComponents.

Override GetVisibleFields in a descendant class to provide a default set of that appear when the WebComponents property is not set.


TWebForm.WebComponents
 VCL Reference

TWebForm.WebComponents

TWebForm	See also

Maintains a list of components that generate HTML content for the TWebForm descendant.

property WebComponents: TWebComponentList;

Description

WebComponents lists the components that generate content for the Web form. Each of these components supports the IWebContent interface, and some can contain their own list of Web items that help them generate their content.

The type of items that can be added to the WebComponents list are restricted by the protected CanAddClass method. Descendant classes override this method to indicate what types of items can be added to the list. For example, TQueryForm limits the list to components that display or manipulate named values (TQueryButtons, TQueryFields) or layout groups that manage the layout of those items (TLayoutGroup).

At design time, add components to the WebComponents property by bringing up the Web page editor for the containing TInetXPageProducer component. Select the TWebForm descendant in the editor, and use the editor to add child controls.


 VCL Reference

TWebForm methods

TWebForm	Alphabetically	Legend

In TWebForm

AddElements

CanAddClass

Content

Create

Destroy

GetDefaultWebComponents

GetHTMLFormName

GetHTMLFormVarName

GetLayoutAttributes

GetSubComponents

GetVisibleFields

ImplAddElements

ImplCanAddClass

ImplContent

SetDefaultWebComponents

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebForm methods

TWebForm	By object	Legend

AddElements

AfterConstruction

Assign

BeforeDestruction

CanAddClass

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDefaultWebComponents

GetHTMLFormName

GetHTMLFormVarName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLayoutAttributes

GetNamePath

GetSubComponents

GetVisibleFields

ImplAddElements

ImplCanAddClass

ImplContent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

SetDefaultWebComponents

UpdateAction


TWebForm.AddElements
 VCL Reference

TWebForm.AddElements

TWebForm	See also

Used internally to generate any javascript declarations needed by the form.

procedure AddElements(AddIntf: IAddScriptElements);

Description

The InternetExpress page producer calls AddElements when it generates the block of javascript declarations in its HTML document. This method allows the generated form to use javascript classes and methods.

AddElements calls on the virtual ImplAddElements method, which uses the provided interface to return javascript declarations. Each TWebForm descendant overrides ImplAddElements to add any declarations it needs.


TWebForm.CanAddClass
 VCL Reference

TWebForm.CanAddClass

TWebForm	See also

Specifies whether a Web item of a specified type can be added to the WebComponents property list.

type TClass = class of TObject;

function CanAddClass(AParent: TComponent; AClass: TClass): Boolean;

Description

The Web page editor calls CanAddClass to determine what Web items can be added to supply content for the TWebForm descendant. CanAddClass calls the virtual ImplCanAddClass method to determine whether a class of Web item is valid.

AParent is the TWebForm descendant to whose WebComponents property the Web item will be added.

AClass is the class of the proposed child Web item.

CanAddClass returns True if the Web form can use content generated by a component of type AClass, False otherwise.


TWebForm.Content
 VCL Reference

TWebForm.Content

TWebForm	See also

Returns the HTML that defines the HTML form.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string;

Description

Content implements the IWebContent method of the same name. This method allows the page producer to extract the HTML defining the form.

Content calls the virtual ImplContent method to provide the HTML form it returns. Each TWebForm descendant overrides ImplContent to generate its particular HTML form. The generated HTML can make use of any javascript declarations supplied by the AddElements method.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the component should format the HTML form it generates. Typically, this parameter is nil for forms.

Content returns a string of HTML defining the form.


TWebForm.Create
 VCL Reference

TWebForm.Create

TWebForm	See also

Creates and initializes an instance of TWebForm.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TWebForm descendant at runtime. TWebForm descendants added at design time using the Web Page editor are instantiated automatically.


TWebForm.Destroy
 VCL Reference

TWebForm.Destroy

TWebForm

Frees an instance of TWebForm.

destructor Destroy; override;

Description

Destroy removes the form generator from its parent’s list of components that generate HTML before freeing the TWebForm instance.


TWebForm.GetDefaultWebComponents
 VCL Reference

TWebForm.GetDefaultWebComponents

TWebForm	See also

Returns nil.

function GetDefaultWebComponents: TObject;

Description

GetDefaultWebComponents is implemented by all Web items that use sub Web items when generating HTML. (TWebForm uses the subitems in the WebComponents property). This method returns a list of Web items that are used by default when an application does not explicitly assign child Web items.

In TWebForm, GetDefaultWebComponents returns nil because Web forms do not any set of items that appear by default.


TWebForm.GetHTMLFormName
 VCL Reference

TWebForm.GetHTMLFormName

TWebForm	See also

Returns the name of the generated HTML form.

function GetHTMLFormName: string;

Description

TWebForm uses GetHTMLFormName internally to specify the NAME option of the generated form and to declare a javascript variable that references the form.

GetHTMLFormName returns the value of the Name property.


TWebForm.GetHTMLFormVarName
 VCL Reference

TWebForm.GetHTMLFormVarName

TWebForm	See also

Returns the name of the javascript variable that refers to the generated form.

function GetHTMLFormVarName: string;

Description

TWebForm uses GetHTMLFormVarName internally to declare a javascript variable that references the form. GetHTMLFormVarName returns the value of the Name property.


TWebForm.GetLayoutAttributes
 VCL Reference

TWebForm.GetLayoutAttributes

TWebForm	See also

Returns the object that specifies how the generated form should look.

function GetLayoutAttributes: TLayoutAttributes; virtual;

Description

GetLayoutAttributes is used internally by Web items to allow the layout object supplied by a parent (as a parameter to the Content method) to take into account layout properties of the child component.

As implemented by TWebForm, GetLayoutAttributes returns nil, because the layout at the form level does not make use of layout attributes.


TWebForm.GetSubComponents
 VCL Reference

TWebForm.GetSubComponents

TWebForm	See also

Returns the value of the WebComponents property.

function GetSubComponents: TObject;

Description

GetSubComponents returns the TWebForm’s list of Web items that it uses to generate HTML content. This method is part of the mechanism that fits TWebForm into a hierarchy of Web items, each of which generates part of a larger HTML document.


TWebForm.GetVisibleFields
 VCL Reference

TWebForm.GetVisibleFields

TWebForm	See also

Returns the value of the VisibleFields property.

function GetVisibleFields: TWebComponentList;

Description

GetVisibleFields is the protected read implementation of the VisibleFields property.


TWebForm.ImplAddElements
 VCL Reference

TWebForm.ImplAddElements

TWebForm	See also

Provides the underlying implementation for the AddElements method.

procedure ImplAddElements(AddIntf: IAddScriptElements); virtual;

Description

The AddElements method calls ImplAddElements to add any javascript declarations by calling the AddIntf interface. These declarations allow the generated display control to call javascript methods in response to user events by ensuring that the required methods are declared.

As implemented in TWebForm, ImplAddElements does nothing. TWebForm descendants can override ImplAddElements to add any required declarations.


TWebForm.ImplCanAddClass
 VCL Reference

TWebForm.ImplCanAddClass

TWebForm	See also

Provides the underlying implementation for the CanAddClass method.

type TClass = class of TObject;

function ImplCanAddClass(AParent: TComponent; AClass: TClass): Boolean; virtual; abstract;

Description

The CanAddClass method calls ImpleCanAddClass to determine whether the TWebForm descendant can add a component of type AClass to its WebComponents property list. AParent is the TWebForm instance to which the component will be added.

In TWebForm, ImplCanAddClass is abstract. TWebForm descendants must override ImplCanAddClass to indicate what types of Web Items they can use when generating their HTML forms.


TWebForm.ImplContent
 VCL Reference

TWebForm.ImplContent

TWebForm	See also

Provides the underlying implementation for the Content method.

function Content(Options: TWebContentOptions; ParentLayout: TLayout): string; virtual; abstract;

Description

The Content method calls ImplContent to generate the HTML form. ImplContent is an abstract method in TWebForm. TWebForm descendants override it to generate the HTML form.

Options contains a set of flags that limit what can be included in the generated HTML.

ParentLayout specifies a helper object that the caller supplies for determining how the TWebForm should format the HTML control it generates. Typically, this parameter is nil for forms.

ImplContent returns an HTML form definition.


TWebForm.SetDefaultWebComponents
 VCL Reference

TWebForm.SetDefaultWebComponents

TWebForm	See also

Prevents an application from trying to assign a default set of Web items on the form.

procedure SetDefaultWebComponents(AList: TWebComponentList); override;

Description

SetDefaultWebComponents is implemented by all Web items that use sub Web items when generating HTML. (TWebForm uses the subitems in the WebComponents property). This method assigns a list of Web items that are used by default when an application does not explicitly assign child Web items.

In TWebForm, SetDefaultWebComponents does nothing with the list supplied as the AList parameter. This is because web forms do not have default items.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebForm


TWebListInput
 VCL Reference

TWebListInput

Hierarchy	Properties	Methods	See also

TWebListInput is the base class for Web items that create HTML display controls which present a fixed set of possible values.

Unit

MidItems

Description

Use TWebListInput as a base class for components that generate HTML controls for displaying a fixed set of possible values from which a user can choose. TWebListInput descendants generate controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebListInput defines or inherits properties and methods for

Specifying a field or parameter whose value the control displays.

Specifying the possible values from which the user can choose.

Generating a caption that describes the information displayed.

Customizing the appearance of the control that displays information.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebListInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebListInput. Instead, use a descendant of TWebListInput such as TFieldRadioGroup, TQueryRadioGroup, TFieldSelectOptions, TQuerySelectOptions, or TSelectOptionsColumn.


 VCL Reference

TWebListInput properties

TWebListInput	Alphabetically	Legend

In TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebListInput properties

TWebListInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

FieldName

Items

ItemsField

Name

Owner

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


TWebListInput.DataSet
 VCL Reference

TWebListInput.DataSet

TWebListInput	See also

Specifies a dataset that supplies the possible values listed in the generated control.

property DataSet: TDataSet;

Description

Use DataSet to specify a dataset from which the component can extract the selections that appear to the user and the underlying values they represent. The ItemsField property specifies the field in this dataset that lists the selections that appear in the generated control. The ValuesField property specifies the field in this dataset that lists the corresponding values that are assigned to the control.

Note:	If the list of possible values is not available in a dataset, use the Items and Values properties instead to list the selections that appear to the user and the underlying values they represent.


TWebListInput.Items
 VCL Reference

TWebListInput.Items

TWebListInput	See also

Lists the possible selections that appear in the generated control.

property Items: TStrings;

Description

Use Items to supply a list of possible selections to the generated control. The end-user can choose from these selections to assign a value to the generated control. The value that is assigned comes from the corresponding entry in the Values property.

Note:	To use a dataset to supply items and values, rather than explicitly listing them in the Items and Values properties, use the DataSet, ItemsField, and ValuesField properties.


TWebListInput.ItemsField
 VCL Reference

TWebListInput.ItemsField

TWebListInput	See also

Indicates which field in DataSet supplies the possible selections for the generated control.

property ItemsField: string;

Description

Use ItemsField to specify which field in the dataset specified by the DataSet property contains selections that appear in the generated control. The end-user can choose from these selections to assign a value to the generated control. The value that is assigned comes from the field specified by the ValuesField property.

Note:	If the list of possible values is not available in a dataset, use the Items and Values properties instead to list the selections that appear to the user and the underlying values they represent.


TWebListInput.Values
 VCL Reference

TWebListInput.Values

TWebListInput	See also

Lists the possible values that can be assigned to the control.

property Values: TStrings;

Description

Use Values to supply a list of possible values for the generated control. When the end-user chooses one of the selections listed by the Items property, the control is assigned the corresponding value in the Values property.

Note:	To use a dataset to supply items and values, rather than explicitly listing them in the Items and Values properties, use the DataSet, ItemsField, and ValuesField properties.


TWebListInput.ValuesField
 VCL Reference

TWebListInput.ValuesField

TWebListInput	See also

Indicates which field in DataSet supplies the possible values for the generated control.

property ValuesField: string;

Description

Use ValuesField to specify which field in the dataset specified by the DataSet property contains values that can be assigned to the generated control. When the end-user selects the corresponding value form the ItemsField field, the control gets the value in the ValuesField field.

Note:	If the list of possible values is not available in a dataset, use the Items and Values properties instead to list the selections that appear to the user and the underlying values they represent.


 VCL Reference

TWebListInput methods

TWebListInput	Alphabetically	Legend

In TWebListInput

Create

Destroy

Derived from TWebDataDisplay

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebListInput methods

TWebListInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebListInput.Create
 VCL Reference

TWebListInput.Create

TWebListInput	See also

Creates and initializes an instance of TWebListInput.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebListInput at runtime. TWebListInput descendants added at design time using the Web Page editor are instantiated automatically.


TWebListInput.Destroy
 VCL Reference

TWebListInput.Destroy

TWebListInput	See also

Frees an instance of TWebListInput.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the component is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput


TWebRadioGroupInput
 VCL Reference

TWebRadioGroupInput

Hierarchy	Properties	Methods	See also

TWebRadioGroupInput is the base class for Web items that create HTML radio group controls.

Unit

MidItems

Description

Use TWebRadioGroupInput as a base class for components that generate HTML radio groups that represent field or parameter values. TWebRadioGroupInput descendants generate controls that are organized by TFieldGroup or TQueryFieldGroup.

TWebRadioGroupInput defines or inherits properties and methods for

Specifying a field or parameter whose value the radio group displays.

Specifying the possible values from which the user can choose.

Generating a caption that describes the information displayed.

Customizing the appearance of the radio group.

Fitting the radio group into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebRadioGroupInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebRadioGroupInput. Instead, use a descendant of TWebRadioGroupInput such as TFieldRadioGroup or TQueryRadioGroup.


 VCL Reference

TWebRadioGroupInput properties

TWebRadioGroupInput	Alphabetically	Legend

In TWebRadioGroupInput

DisplayColumns

DisplayWidth

ReadOnly

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebRadioGroupInput properties

TWebRadioGroupInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayColumns

DisplayWidth

FieldName

Items

ItemsField

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


TWebRadioGroupInput.DisplayColumns
 VCL Reference

TWebRadioGroupInput.DisplayColumns

TWebRadioGroupInput	See also

Specifies the number of radio buttons that appear in each row of the control.

property DisplayColumns: Integer;

Description

Use DisplayColumns to specify how many radio buttons can appear in a single line of the radio group. If DisplayColumns is less than the number of items, the radio group displays its buttons in multiple rows.


TWebRadioGroupInput.DisplayWidth
 VCL Reference

TWebRadioGroupInput.DisplayWidth

TWebRadioGroupInput	See also

Specifies the width of the radio group, in characters.

property DisplayWidth: Integer;

Description

Use DisplayWidth to limit the width of the generated control. TWebRadioGroup generates an INPUT tag of type RADIO to implement the radio group. DisplayWidth is added as a WIDTH option.


TWebRadioGroupInput.ReadOnly
 VCL Reference

TWebRadioGroupInput.ReadOnly

TWebRadioGroupInput	See also

Indicates whether end users can use the generated control to set values.

property ReadOnly: Boolean;

Description

Use ReadOnly to indicate whether users can change the value displayed by the radio group. TWebRadioGroup generates an INPUT tag of type RADIO to implement the radio group. ReadOnly is added as a READONLY option.


 VCL Reference

TWebRadioGroupInput methods

TWebRadioGroupInput	Alphabetically	Legend

In TWebRadioGroupInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebRadioGroupInput methods

TWebRadioGroupInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebRadioGroupInput.Create
 VCL Reference

TWebRadioGroupInput.Create

TWebRadioGroupInput	See also

Creates and initializes an instance of TWebRadioGroupInput.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebRadioGroupInput at runtime. TWebRadioGroupInput descendants added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebRadioGroupInput


TWebSelectOptionsInput
 VCL Reference

TWebSelectOptionsInput

Hierarchy	Properties	Methods	See also

TWebSelectOptionsInput is the base class for Web items that create HTML list controls.

Unit

MidItems

Description

Use TWebSelectOptionsInput as a base class for components that generate HTML list controls that represent field or parameter values. TWebSelectOptionsInput descendants generate controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebSelectOptionsInput defines or inherits properties and methods for

Specifying a field or parameter whose value the list box displays.

Specifying the possible values from which the user can choose.

Generating a caption that describes the information displayed.

Customizing the appearance of the list box.

Fitting the list box into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebSelectOptionsInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebSelectOptionsInput. Instead, use a descendant of TWebSelectOptionsInput such as TFieldSelectOptions, TQuerySelectOptions, or TSelectOptionsColumn.


 VCL Reference

TWebSelectOptionsInput properties

TWebSelectOptionsInput	Alphabetically	Legend

In TWebSelectOptionsInput

DisplayRows

Derived from TWebListInput

DataSet

Items

ItemsField

Values

ValuesField

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebSelectOptionsInput properties

TWebSelectOptionsInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DataSet

DesignInfo

DisplayRows

FieldName

Items

ItemsField

Name

Owner

Style

StyleRule

TabIndex

Tag

Values

ValuesField

VCLComObject


TWebSelectOptionsInput.DisplayRows
 VCL Reference

TWebSelectOptionsInput.DisplayRows

TWebSelectOptionsInput	See also

Specifies the number of rows that appear in the generated list box.

property DisplayRows: Integer;

Description

Use DisplayRows to specify how many rows appear in the generated list control. If DisplayRows is less than the number of items, the generated list displays only DisplayRows options at one time, but can scroll to display the hidden items. If DisplayRows is 1, the generated control becomes a drop-down list box.


 VCL Reference

TWebSelectOptionsInput methods

TWebSelectOptionsInput	Alphabetically	Legend

In TWebSelectOptionsInput

Create

Derived from TWebListInput

Destroy

Derived from TWebDataDisplay

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebSelectOptionsInput methods

TWebSelectOptionsInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebSelectOptionsInput.Create
 VCL Reference

TWebSelectOptionsInput.Create

TWebSelectOptionsInput	See also

Creates and initializes an instance of TWebSelectOptionsInput.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebSelectOptionsInput at runtime. TWebSelectOptionsInput descendants added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebListInput

TWebSelectOptionsInput


TWebStatus
 VCL Reference

TWebStatus

Hierarchy	Properties	Methods	See also

TWebStatus is the base class for Web items that indicate the status of records in an XML data packet.

Unit

MidItems

Description

Use TWebStatus as a base class for components that generate HTML controls which indicate whether records have been inserted or modified by the user. TWebStatus descendants generate controls that are added to TDataGrid or TFieldGroup to provide feedback about modifications to the underlying XML data packet.

TWebStatus defines or inherits properties and methods for

Generating a caption that describes the information displayed.

Customizing the appearance of the control.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebStatus inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebStatus. Instead, use a descendant of TWebStatus such as TFieldStatus or TStatusColumn.


 VCL Reference

TWebStatus properties

TWebStatus	Alphabetically	Legend

In TWebStatus

DisplayWidth

Derived from TWebDataDisplay

Caption

CaptionAttributes

CaptionPosition

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebStatus properties

TWebStatus	By object	Legend

Caption

CaptionAttributes

CaptionPosition

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

Name

Owner

Style

StyleRule

TabIndex

Tag

VCLComObject


TWebStatus.DisplayWidth
 VCL Reference

TWebStatus.DisplayWidth

TWebStatus

Specifies the width, in characters, of the generated HTML control.

property DisplayWidth: Integer;

Description

Use DisplayWidth to control the width of the HTML control that displays record status information. By default, DisplayWidth is 1 because the TWebStatus control values are one character (M for modified or I for inserted).


 VCL Reference

TWebStatus methods

TWebStatus	Alphabetically	Legend

In TWebStatus

Create

Identifier

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebStatus methods

TWebStatus	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

Identifier

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebStatus.Create
 VCL Reference

TWebStatus.Create

TWebStatus	See also

Creates and initializes an instance of TWebStatus.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebStatus at runtime. TWebStatus descendants added at design time using the Web Page editor are instantiated automatically.


TWebStatus.Identifier
 VCL Reference

TWebStatus.Identifier

TWebStatus

Returns the name under which record status information is stored in the XML data packet.

class function Identifier: string;

Description

Call Identifier to determine the name of the pseudo-field in the XML data packet that stores the status information displayed by the generated control.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebStatus


TWebTextAreaInput
 VCL Reference

TWebTextAreaInput

Hierarchy	Properties	Methods	See also

TWebTextAreaInput is the base class for Web items that create HTML multi-line text controls.

Unit

MidItems

Description

Use TWebTextAreaInput as a base class for components that generate HTML controls for displaying a field or parameter value in a multi-line text control. TWebTextAreaInput descendants generate controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebTextAreaInput defines or inherits properties and methods for

Specifying a field or parameter whose value the control displays.

Generating a caption that describes the information displayed.

Customizing the appearance of the control that displays information.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebTextAreaInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebTextAreaInput. Instead, use a descendant of TWebTextAreaInput such as TFieldTextArea, TQueryTextArea, or TTextAreaColumn.


 VCL Reference

TWebTextAreaInput properties

TWebTextAreaInput	Alphabetically	Legend

In TWebTextAreaInput

DisplayRows

DisplayWidth

ReadOnly

Wrap

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebTextAreaInput properties

TWebTextAreaInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayRows

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject

Wrap


TWebTextAreaInput.DisplayRows
 VCL Reference

TWebTextAreaInput.DisplayRows

TWebTextAreaInput	See also

Specifies the height of the generated control.

property DisplayRows: Integer;

Description

Use DisplayRows to indicate the desired height of the generated HTML control. DisplayRows specifies the number of lines of text that can be displayed in the control. This value is assigned to the ROWS option of the generated TEXTAREA tag.


TWebTextAreaInput.DisplayWidth
 VCL Reference

TWebTextAreaInput.DisplayWidth

TWebTextAreaInput	See also

Specifies the horizontal size of the generated control.

property DisplayWidth: Integer;

Description

Use DisplayWidth to indicate the desired width of the generated HTML control. DisplayWidth specifies the number of characters that can be displayed in one line of the control. This value is assigned to the COLS option of the generated TEXTAREA tag.


TWebTextAreaInput.ReadOnly
 VCL Reference

TWebTextAreaInput.ReadOnly

TWebTextAreaInput

Indicates whether end users can use the generated control to set values.

property ReadOnly: Boolean;

Description

Use ReadOnly to indicate whether users can change the value displayed by the generated control. This value determines whether there is a READONLY option added to the generated TEXTAREA tag.


TWebTextAreaInput.Wrap
 VCL Reference

TWebTextAreaInput.Wrap

TWebTextAreaInput	See also

Specifies how the generated control treats lines that are longer than the display width.

type TTextAreaWrap = (wrOff, wrPhysical, wrVirtual);

property Wrap: TTextAreaWrap;

Description

Use Wrap to specify how the generated control formats lines that are longer than the number of characters specified by DisplayWidth. TWebTextAreaInput uses Wrap to add a WRAP option to the generated TEXTAREA tag.

Wrap can have any of the following values:

Value	WRAP option value	Meaning

wrOff	OFF	The control does not wrap long lines. Only newline characters that are part of the text string cause the lines in the control to wrap.

wrPhysical	PHYSICAL	The control formats its text value by wrapping long lines so that no text is hidden. The control inserts carriage returns into the text string.

wrVirtual	VIRTUAL	The control formats its text value by wrapping long lines so that no text is hidden but does not change the actual value of the text string.


 VCL Reference

TWebTextAreaInput methods

TWebTextAreaInput	Alphabetically	Legend

In TWebTextAreaInput

Create

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebTextAreaInput methods

TWebTextAreaInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebTextAreaInput.Create
 VCL Reference

TWebTextAreaInput.Create

TWebTextAreaInput	See also

Creates and initializes an instance of TWebTextAreaInput.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TWebTextAreaInput at runtime. TWebTextAreaInput descendants added at design time using the Web Page editor are instantiated automatically.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextAreaInput


TWebTextInput
 VCL Reference

TWebTextInput

Hierarchy	Properties	Methods	See also

TWebTextInput is the base class for Web items that create HTML single-line text controls.

Unit

MidItems

Description

Use TWebTextInput as a base class for components that generate HTML controls for displaying a field or parameter value as a single-line text string. TWebTextInput descendants generate controls that are organized by TDataGrid, TFieldGroup, or TQueryFieldGroup.

TWebTextInput defines or inherits properties and methods for

Specifying a field or parameter whose value the control displays.

Generating a caption that describes the information displayed.

Customizing the appearance of the control that displays information.

Fitting the control into the tab order of the generated HTML form.

Fitting the component into a hierarchy of Web items that collectively generate the content of an HTML document.

In order to let other Web items to use the HTML control it generates, TWebTextInput inherits the IWebContent interface from TWebDataDisplay.

Do not create instances of TWebTextInput. Instead, use a descendant of TWebTextInput such as TFieldText, TQueryText, or TTextColumn.


 VCL Reference

TWebTextInput properties

TWebTextInput	Alphabetically	Legend

In TWebTextInput

DisplayWidth

ReadOnly

Derived from TWebDataInput

Caption

FieldName

Derived from TWebDataDisplay

CaptionAttributes

Custom

Style

StyleRule

TabIndex

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebTextInput properties

TWebTextInput	By object	Legend

Caption

CaptionAttributes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

DisplayWidth

FieldName

Name

Owner

ReadOnly

Style

StyleRule

TabIndex

Tag

VCLComObject


TWebTextInput.DisplayWidth
 VCL Reference

TWebTextInput.DisplayWidth

TWebTextInput

Specifies the horizontal size of the generated control.

property DisplayWidth: Integer;

Description

Use DisplayWidth to indicate the desired width of the generated HTML control. DisplayWidth specifies the number of characters that can be displayed in the control.

Note:	DisplayWidth controls the size of the generated control, not the size of the text that users can enter. If the user enters a string longer than DisplayWidth characters, the text scrolls in the control.


TWebTextInput.ReadOnly
 VCL Reference

TWebTextInput.ReadOnly

TWebTextInput

Indicates whether end users can use the generated control to set values.

property ReadOnly: Boolean;

Description

Use ReadOnly to indicate whether users can change the value displayed by the generated control.


 VCL Reference

TWebTextInput methods

TWebTextInput	Alphabetically	Legend

In TWebTextInput

Create

Derived from TWebDataDisplay

Destroy

IsColumn

IsQueryField

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebTextInput methods

TWebTextInput	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsColumn

IsImplementorOf

IsQueryField

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebTextInput.Create
 VCL Reference

TWebTextInput.Create

TWebTextInput	See also

Creates and initializes an instance of TWebTextInput.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TWebTextInput descendant at runtime. TWebTextInput descendants added at design time using the Web Page editor are instantiated automatically.


TWebTextInput.Destroy
 VCL Reference

TWebTextInput.Destroy

TWebTextInput	See also

Frees an instance of TWebTextInput.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the component is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebDataDisplay

TWebDataInput

TWebTextInput


TWideStrings
 VCL Reference

TWideStrings

Hierarchy	Properties	Methods	Using TWideStrings	See also

TWideStrings represents a list of WideString values.

Unit

WSDLIntf

Description

TWideStrings manages a list of WideString values. It is used for handling the strings in a WSDL document.

TWideStrings introduces properties and methods to

Add a WideString to the list.

Read or set the WideString at a particular location.

Find the position of a specified WideString.


 VCL Reference

TWideStrings properties

TWideStrings	Alphabetically	Legend

In TWideStrings

Strings


 VCL Reference

TWideStrings properties

TWideStrings	By object	Legend

Strings


TWideStrings.Strings
 VCL Reference

TWideStrings.Strings

TWideStrings	See also

References the WideStrings in the list by position.

property Strings[Index: Integer]: WideString; default;

Description

Use the Strings property to get or set the string at a particular position. Strings is the default property of TWideStrings objects. The Strings identifier can be omitted when accessing the Strings property of a descendant of TWideStrings. For example, the following two lines of code are both acceptable and do the same thing:

WString := MyStrings.Strings[0];

WString := MyStrings[0];


 VCL Reference

TWideStrings methods

TWideStrings	Alphabetically	Legend

In TWideStrings

Add

Clear

Count

Create

Destroy

IndexOf

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWideStrings methods

TWideStrings	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TWideStrings.Add
 VCL Reference

TWideStrings.Add

TWideStrings	See also

Adds a Widestring at the end of the list.

function Add(const S: WideString): Integer;

Description

Call Add to add a string to the end of the list. Add returns the index of the new string.


TWideStrings.Clear
 VCL Reference

TWideStrings.Clear

TWideStrings	See also

Empties the list of all its strings.

procedure Clear;

Description

Call Clear method to delete all the strings in the list.


TWideStrings.Count
 VCL Reference

TWideStrings.Count

TWideStrings	See also

Returns the number of WideStrings in the list.

function Count: Integer;

Description

Call Count method to determine the number of strings in the list. This value provides an upper bound to the Index parameter of the Strings property.


TWideStrings.Create
 VCL Reference

TWideStrings.Create

TWideStrings

Creates an instance of TWideStrings.

constructor Create;

Description

Call Create to create a TWideStrings object at runtime.


TWideStrings.Destroy
 VCL Reference

TWideStrings.Destroy

TWideStrings	See also

Destroys an instance of TWideStrings.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TWideStrings reference is not nil, and only then calls Destroy.


TWideStrings.IndexOf
 VCL Reference

TWideStrings.IndexOf

TWideStrings	See also

Returns the position of a string in the list.

function IndexOf(const S: WideString): Integer;

Description

Call IndexOf to obtain the position of the first occurrence of the string S, or of a string that differs from S only by case. IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string is not in the string list, IndexOf returns -1.

Note:	If the string appears in the list more than once, IndexOf returns the position of the first occurrence.


TWideStrings.Insert
 VCL Reference

TWideStrings.Insert

TWideStrings	See also

Inserts a WideString at a specified position in the list.

procedure Insert(Index: Integer; const S: WideString);

Description

Call Insert to add a WideString to a specified position in the list. Insert adds the string specified by S so that it has the index specified by Index. The string previously at that position, as well as all subsequent strings in the list are moved so that their indexes are one greater than before.


Hierarchy

TObject

TWideStrings


TWSDLDocument
 VCL Reference

TWSDLDocument

Hierarchy	Properties	Methods	Events	See also

TWSDLDocument represents a WSDL document.

Unit

WSDLBind

Description

Use TWSDLDocument to represent a WSDL (Web Services Definition Language) document. A WSDL document is a special form of XML document that describes the contents of a Web Service application and how you call the services it implements.

TWSDLDocument can read an existing WSDL document from a file, it can be associated with an in-memory string that is the contents of a WSDL document, or it can create a new, empty WSDL document. TWSDLDocument uses an external DOM (Document Object Model) parser to analyze the WSDL document. This parser is usually assigned by specifying the DOMVendor property. When you set the Active property to True, TWSDLDocument uses the DOM parser to parse the WSDL document so that you can examine or modify it.

When TWSDLDocument is created without an Owner, it behaves like an interfaced object. That is, when all references to its interface are released, the TWSDLDocument instance is automatically freed. When TWSDLDocument is created with an Owner, however, it behaves like any other component, and is freed by its Owner.

Tip:	Although you can work directly with TWSDLDocument to access a WSDL document, it is often easier to use TWSDLItems, a TWSDLDocument descendant. TWSDLItems implements a number of methods for getting at the definitions in a WSDL document.


 VCL Reference

TWSDLDocument properties

TWSDLDocument	Alphabetically	Legend

In TWSDLDocument

Definition

Derived from TXMLDocument

Active

AsyncLoadState

ChildNodes

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Node

NodeIndentStr

NSPrefixBase

Options

ParseOptions

SchemaRef

StandAlone

Version

XML

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWSDLDocument properties

TWSDLDocument	By object	Legend

Active

AsyncLoadState

ChildNodes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Definition

DesignInfo

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Name

Node

NodeIndentStr

NSPrefixBase

Options

Owner

ParseOptions

SchemaRef

StandAlone

Tag

VCLComObject

Version

XML


TWSDLDocument.Definition
 VCL Reference

TWSDLDocument.Definition

TWSDLDocument	See also

Provides access to the definitions contained in the WSDL document.

property Definition: IDefinition;

Description

Definition is the IDefinition interface of the root node in the WSDL document. This interface is implemented by the node specified by DocumentElement.

You can use the IDefinition interface to access the Bindings, Messages, PortTypes, Services, and Types defined in the WSDL document by reading properties of the same names. Alternately, you can use the methods of TWSDLItems (a TWSDLDocument descendant) to access those definitions.


 VCL Reference

TWSDLDocument events

TWSDLDocument	Alphabetically	Legend

Derived from TXMLDocument

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


 VCL Reference

TWSDLDocument events

TWSDLDocument	By object	Legend

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


 VCL Reference

TWSDLDocument methods

TWSDLDocument	Alphabetically	Legend

In TWSDLDocument

AfterConstruction

Derived from TXMLDocument

AddChild

Create

CreateElement

CreateNode

Destroy

GeneratePrefix

GetDocBinding

IsEmptyDoc

LoadFromFile

LoadFromStream

LoadFromXML

Refresh

RegisterDocBinding

Resync

SaveToFile

SaveToStream

SaveToXML

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWSDLDocument methods

TWSDLDocument	By object	Legend

AddChild

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateElement

CreateNode

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GeneratePrefix

GetDocBinding

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsEmptyDoc

IsImplementorOf

LoadFromFile

LoadFromStream

LoadFromXML

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RegisterDocBinding

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SaveToFile

SaveToStream

SaveToXML

SetSubComponent

UpdateAction


TWSDLDocument.AfterConstruction
 VCL Reference

TWSDLDocument.AfterConstruction

TWSDLDocument	See also

Initializes the TWSDLDocument object after the last constructor has executed.

procedure AfterConstruction; override;

Description

The AfterConstruction method is called automatically after the last constructor has finished executing. TWSDLDocument overrides this method to register an implementation class for the document element. That class implements the IDefinition interface that is the value of the Definition property.


Hierarchy

TObject

TPersistent

TComponent

TXMLDocument

TWSDLDocument


TWSDLHTMLPublish
 VCL Reference

 TWSDLHTMLPublish

Hierarchy	Properties	Methods	Using TWSDLHTMLPublish	See also

TWSDLHTMLPublish publishes a list of WSDL documents describing a Web Services application.

Unit

WSDLPub

Description

Add TWSDLHTMLPublish to the Web module of a Web Service application to publish a list of WSDL documents that describe how to call that Web Service application. By publishing WSDL documents for your Web Service application, you allow arbitrary clients (including those not written using Delphi) to call on your Web Services.

TWSDLHTMLPublish publishes definitions it derives from all the invokable interfaces that are registered with the invocation registry (InvRegistry), as well as from all remotable classes and types that are registered with the remotable type registry (RemTypeRegistry). By default, it uses the address where you install the application that contains the TWSDLHTMLPublish component as the address where those services are available. If you deploy the implementation of those Web Services elsewhere, you can enable the WSDL administrator (using the AdminEnabled property), and then launch the WSDL administrator from a Web browser to change the addresses specified in the generated WSDL documents.

TWSDLHTMLPublish automatically registers itself with the Web module (or Web dispatcher) as an auto-dispatching object. This means that the Web module or Web dispatcher forwards all incoming HTTP messages directed to the WSDL publisher without requiring the use of Web action items. Those messages include requests for the list of WSDL documents and requests for the WSDL administrator.


 VCL Reference

TWSDLHTMLPublish properties

TWSDLHTMLPublish	Alphabetically	Legend

In TWSDLHTMLPublish

AdminEnabled

WebDispatch

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWSDLHTMLPublish properties

TWSDLHTMLPublish	By object	Legend

AdminEnabled

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WebDispatch


TWSDLHTMLPublish.AdminEnabled
 VCL Reference

TWSDLHTMLPublish.AdminEnabled

TWSDLHTMLPublish	See also

Enables or disables the WSDL administrator.

property AdminEnabled: Boolean;

Description

Use AdminEnabled to indicate whether this application implements the WSDL administrator. When AdminEnabled is True, pointing a Web browser at the URL that addresses this application using the path info specified by WebDispatch launches a Web page that includes a button for the WSDL administrator. The WSDL administrator can then adjust the published WSDL documents to indicate an address other than the one where this application is installed as the location or locations where the Web Services are deployed.

When AdminEnabled is False, the URL that includes WebDispatch publishes a list of WSDL documents but does not provide access to the WSDL administrator.

Tip:	You can set AdminEnabled to True, update the URLs in the resulting WSDL documents, and then rebuild your application, setting AdminEnabled to False. The WSDL administrator stores your changes in a .ini file so that they appear in the list of WSDL documents even after you have changed AdminEnabled.


TWSDLHTMLPublish.WebDispatch
 VCL Reference

TWSDLHTMLPublish.WebDispatch

TWSDLHTMLPublish	See also

Lets the Web dispatcher identify what HTTP messages should return a list of WSDL documents.

property WebDispatch: TWebDispatch;

Description

Use WebDispatch to specify the messages to which TWSDLHTMLPublish responds by providing a list of WSDL documents. These documents describe the Web Services that this application knows about, based on the registered interfaces, remotable classes, and remotable types. If this application registers but does not implement the invokable interface, you should also enable the WSDL administrator and use the WSDL administrator to indicate where the application that implements the Web Services is deployed.

The TWebDispatch object that implements WebDispatch includes properties that let you specify the path portion of URLs to which this component responds with an HTML page that publishes WSDL documents describing the Web Service. It also specifies the values allowed in the MESSAGE header. By default, WebDispatch identifies any URL whose path portion begins with the string “wsdl”.

Note:	You can’t use WebDispatch to disable the TWSDLHTMLPublish object’s ability to publish WSDL documents describing the Web Services. Setting its Enabled property to False does nothing.


 VCL Reference

TWSDLHTMLPublish methods

TWSDLHTMLPublish	Alphabetically	Legend

In TWSDLHTMLPublish

Create

Destroy

DispatchEnabled

DispatchMask

DispatchMethodType

DispatchRequest

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TWSDLHTMLPublish methods

TWSDLHTMLPublish	By object	Legend

Assign

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchEnabled

DispatchMask

DispatchMethodType

DispatchRequest

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWSDLHTMLPublish.Create
 VCL Reference

TWSDLHTMLPublish.Create

TWSDLHTMLPublish	See also

Creates an instance of TWSDLHTMLPublish.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TWSDLHTMLPublish object at runtime. TWSDLHTMLPublish components added to web modules at design time are created automatically.

The AOwner parameter specifies another component (usually the web module) that is responsible for freeing the TWSDLHTMLPublish instance. It becomes the value of the Owner property.


TWSDLHTMLPublish.Destroy
 VCL Reference

TWSDLHTMLPublish.Destroy

TWSDLHTMLPublish	See also

Destroys the instance of a TWSDLHTMLPublish object.

destructor Destroy; override;

Description

Use the Free method to free a TWSDLHTMLPublish instance. Unlike the Destroy method, Free guards against a nil reference.


TWSDLHTMLPublish.DispatchEnabled
 VCL Reference

TWSDLHTMLPublish.DispatchEnabled

TWSDLHTMLPublish	See also

Indicates whether the WSDL publisher is enabled to respond to incoming messages.

function DispatchEnabled: Boolean;

Description

The DispatchEnabled method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to determine whether it can receive incoming messages. In TWSDLHTMLPublish, DispatchEnabled always returns True.


TWSDLHTMLPublish.DispatchMask
 VCL Reference

TWSDLHTMLPublish.DispatchMask

TWSDLHTMLPublish	See also

Returns a mask that matches the path portion of any URL to which this object responds.

function DispatchMask: TMask;

Description

The DispatchMask method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to identify the HTTP messages it should forward to the this component. It returns a Mask derived from the Mask property of the WebDispatch property.


TWSDLHTMLPublish.DispatchMethodType
 VCL Reference

TWSDLHTMLPublish.DispatchMethodType

TWSDLHTMLPublish	See also

Returns the method type of all HTTP messages to which this component responds.

function DispatchMethodType: TMethodType;

Description

The DispatchMethodType method must be implemented by all auto-dispatching objects to allow Web Module (or Web Dispatcher) to identify the HTTP messages it should forward to this component. It returns  the MethodType properties of WebDispatch.


TWSDLHTMLPublish.DispatchRequest
 VCL Reference

TWSDLHTMLPublish.DispatchRequest

TWSDLHTMLPublish	See also

Responds to an incoming message and generates the appropriate response message.

function DispatchRequest(Sender: TObject; Request: TWebRequest; Response: TWebResponse): Boolean;

Description

The Web Module (or Web Dispatcher) calls DispatchRequest when it identifies an HTTP message that matches the properties of the WebDispatch property. DispatchRequest responds by generating an HTML page that lists the WSDL documents describing the Web Service, and including a button for the WSDL administrator if the AdminEnabled property is True.

Sender is not used in the DispatchRequest method.

Request contains information about the incoming request message.

Response is a TWebResponse object that is filled out to indicate the response that should be returned to the Web client.

DispatchRequest returns True if it successfully generates a response. It returns False if it could not handle the request.


Hierarchy

TObject

TPersistent

TComponent

TWSDLHTMLPublish


TWSDLItems
 VCL Reference

TWSDLItems

Hierarchy	Properties	Methods	Events	See also

TWSDLItems represents the definitions in a WSDL document.

Unit

WSDLItems

Description

Use TWSDLItems to represent a WSDL (Web Services Definition Language) document. A WSDL document is a special form of XML document that describes the contents of a Web Service application and how you call the services it implements. TWSDLItems augments its immediate ancestor (TWSDLDocument) by introducing methods that provide easier access to the definitions in the WSDL document.

TWSDLItems can read an existing WSDL document from a file, it can be associated with an in-memory string that is the contents of a WSDL document, or it can create a new, empty WSDL document. TWSDLItems uses an external DOM (Document Object Model) parser to analyze the WSDL document. This parser is usually assigned by specifying the DOMVendor property. When you set the Active property to True, TWSDLItems uses the DOM parser to parse the WSDL document so that you can examine or modify it.

When TWSDLItems is created without an Owner, it behaves like an interfaced object. That is, when all references to its interface are released, the TWSDLItems instance is automatically freed. When TWSDLItems is created with an Owner, however, it behaves like any other component, and is freed by its Owner.


 VCL Reference

TWSDLItems properties

TWSDLItems	Alphabetically	Legend

Derived from TWSDLDocument

Definition

Derived from TXMLDocument

Active

AsyncLoadState

ChildNodes

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Node

NodeIndentStr

NSPrefixBase

Options

ParseOptions

SchemaRef

StandAlone

Version

XML

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWSDLItems properties

TWSDLItems	By object	Legend

Active

AsyncLoadState

ChildNodes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Definition

DesignInfo

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Name

Node

NodeIndentStr

NSPrefixBase

Options

Owner

ParseOptions

SchemaRef

StandAlone

Tag

VCLComObject

Version

XML


 VCL Reference

TWSDLItems events

TWSDLItems	Alphabetically	Legend

Derived from TXMLDocument

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


 VCL Reference

TWSDLItems events

TWSDLItems	By object	Legend

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


 VCL Reference

TWSDLItems methods

TWSDLItems	Alphabetically	Legend

In TWSDLItems

GetBindingForServicePort

GetBindings

GetBindingType

GetImports

GetInOutMessagesForOperation

GetLocationForImport

GetMessageNode

GetMessages

GetName

GetOperationNode

GetOperations

GetOperationsForBinding

GetPartNode

GetParts

GetPartsForOperation

GetPortsForService

GetPortTypeNode

GetPortTypes

GetSchemaNode

GetSchemas

GetServiceNode

GetServices

GetSoapAddressForServicePort

GetSoapBindingAttribute

GetSoapBodyAttribute

GetSoapBodyNamespace

GetSoapFaultAttribute

GetSoapFaultsForOperation

GetSoapHeaderAttribute

GetSoapOperationAttribute

GetTargetNamespace

HasTypesNode

Derived from TWSDLDocument

AfterConstruction

Derived from TXMLDocument

AddChild

Create

CreateElement

CreateNode

Destroy

GeneratePrefix

GetDocBinding

IsEmptyDoc

LoadFromFile

LoadFromStream

LoadFromXML

Refresh

RegisterDocBinding

Resync

SaveToFile

SaveToStream

SaveToXML

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWSDLItems methods

TWSDLItems	By object	Legend

AddChild

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateElement

CreateNode

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GeneratePrefix

GetBindingForServicePort

GetBindings

GetBindingType

GetDocBinding

GetImports

GetInOutMessagesForOperation

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLocationForImport

GetMessageNode

GetMessages

GetName

GetNamePath

GetOperationNode

GetOperations

GetOperationsForBinding

GetParentComponent

GetPartNode

GetParts

GetPartsForOperation

GetPortsForService

GetPortTypeNode

GetPortTypes

GetSchemaNode

GetSchemas

GetServiceNode

GetServices

GetSoapAddressForServicePort

GetSoapBindingAttribute

GetSoapBodyAttribute

GetSoapBodyNamespace

GetSoapFaultAttribute

GetSoapFaultsForOperation

GetSoapHeaderAttribute

GetSoapOperationAttribute

GetTargetNamespace

HasParent

HasTypesNode

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsEmptyDoc

IsImplementorOf

LoadFromFile

LoadFromStream

LoadFromXML

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RegisterDocBinding

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SaveToFile

SaveToStream

SaveToXML

SetSubComponent

UpdateAction


TWSDLItems.GetBindingForServicePort
 VCL Reference

TWSDLItems.GetBindingForServicePort

TWSDLItems	See also

Returns the name of the binding associated with a specified service and port.

function GetBindingForServicePort(const ServiceName, PortName: WideString): WideString;

Description

Call GetBindingForServicePort to retrieve the name of a binding that is associated with the specified service and port. The binding is defined in the WSDL document or another document that it imports. A binding identifies an encoding format (e.g. soap:rpc) and communications protocol (eg. HTML) that is available for a specific port type (interface).

ServiceName is the name of the service to which the desired binding belongs.

PortName is the name of a port within the specified service that uses the binding.


TWSDLItems.GetBindings
 VCL Reference

TWSDLItems.GetBindings

TWSDLItems	See also

Fills a WideString list with the names of all bindings defined in the WSDL document.

procedure GetBindings(BindingNames: TWideStrings);

Description

Call GetBindings to retrieve the names of all bindings defined in the WSDL document. A binding identifies an encoding format (e.g. soap:rpc) and communications protocol (eg. HTML) that is available for a specific port type (interface).

BindingNames is an existing TWideStrings object to which the names of any defined bindings are added.

Note:	GetBindings does not clear the WideString list before adding the names of all defined bindings.


TWSDLItems.GetBindingType
 VCL Reference

TWSDLItems.GetBindingType

TWSDLItems	See also

Returns the port type to which a specified binding applices.

function GetBindingType(const BindingName: WideString): WideString;

Description

Call GetBindingType to retrieve the names of the port type to which a specified binding applies.

BindingName is the name of a binding defined in the WSDL document.


TWSDLItems.GetImports
 VCL Reference

TWSDLItems.GetImports

TWSDLItems	See also

Fills a WideString list with the namespaces of all documents imported by this one.

procedure GetImports(ImportNames: TWideStrings);

Description

Call GetImports to retrieve the namespaces for of all documents that are imported into this one using an <import> tag. The location of these imported documents can be retrieved from the namespace using the GetLocationForImport method.

ImportNames is an existing TWideStrings object to which the namespaces for any imports are added.

Note:	GetImports does not clear the WideString list before adding the namespaces for all imported documents.


TWSDLItems.GetInOutMessagesForOperation
 VCL Reference

TWSDLItems.GetInOutMessagesForOperation

TWSDLItems	See also

Fills a WideString list with the names of all messages that must be passed in or out when calling a specified operation.

procedure GetInOutMessagesForOperation(const PortTypeName, OperationName: WideString; OperationIndex: Integer; InOutMessages: TWideStrings);

Description

Call GetInOutMessagesForOperation to retrieve the names of all messages that must be passed in or out when calling a specified operation, along with an indication of whether the message is passed in (from the caller) or out (a return value).

PortTypeName is the name of the port type that contains the operation. A port type corresponds to an interface.

OperationName is the name of the operation whose messages you want listed. An operation corresponds to a method on the interface that corresponds to PortTypeName.

OperationIndex is the index of the operation on the port type, where 0 specifies the first operation, 1 specifies the second operation, and so on.

InOutMessages is an existing TWideStrings object that is filled with a list of messages. Each message added to the list corresponds to a datum that is passed in or out (a parameter or return value). The strings that are added include an indication of whether they are input or output messages.

Note:	GetInOutMessagesForOperation does not clear the WideString list before adding the names of all messages passed in or out.


TWSDLItems.GetLocationForImport
 VCL Reference

TWSDLItems.GetLocationForImport

TWSDLItems	See also

Fills a string list with the names of all messages that must be passed in or out when calling a specified operation.

function GetLocationForImport(const ImportNameSpace: WideString): WideString;

Description

Call GetLocationForImport to retrieve the URI that indicates the location of an imported document, given its namespace.

ImportNameSpace is the namespace that identifies another document that is imported into this WSDL document. It is one of the strings retrieved by the GetImports method.


TWSDLItems.GetMessageNode
 VCL Reference

TWSDLItems.GetMessageNode

TWSDLItems	See also

Returns the interface for the node that describes a message.

function GetMessageNode(const MessageName: WideString): IXMLNode;

Description

Call GetMessageNode to obtain information about a message defined in the WSDL document. A message describes a single item of data that is passed in or out when executing an operation (method). The parameters and return value of a method each map onto a message.

MessageName is the name of the message whose node is returned.


TWSDLItems.GetMessages
 VCL Reference

TWSDLItems.GetMessages

TWSDLItems	See also

Fills a WideString list with the names of all messages defined in the WSDL document.

procedure GetMessages(MessageNames: TWideStrings);

Description

Call GetMessages to retrieve the names of all messages defined in the WSDL document. Each message describes a single item of data that is passed in or out when executing an operation (method). The parameters and return value of a method each map onto a message.

MessageNames is an existing TWideStrings object to which the names of all messages are added.

Note:	GetMessages does not clear the WideString list before adding the message names defined in the WSDL document.


TWSDLItems.GetName
 VCL Reference

TWSDLItems.GetName

TWSDLItems	See also

Returns the name of the definitions node in the WSDL document.

function GetName: WideString;

Description

The root node of a WSDL document is always a definitions node. This node gives a name to the set of definitions in the WSDL document. Call GetName to retrieve that name.


TWSDLItems.GetOperationNode
 VCL Reference

TWSDLItems.GetOperationNode

TWSDLItems	See also

Returns the interface for the node that describes an operation.

function GetOperationNode(const PortTypeName, OperationName: WideString): IXMLNode;

Description

Call GetOperationNode to obtain information about an operation defined in the WSDL document. An operation corresponds to a method on the interface that corresponds to a specified port type.

PortTypeName is the name of the port type that contains the specified operation.

OperationName is the name of the operation whose node is returned.


TWSDLItems.GetOperations
 VCL Reference

TWSDLItems.GetOperations

TWSDLItems	See also

Fills a WideString list with the names of all operations defined for a specified port type.

procedure GetOperations(const PortTypeName: WideString; OperationNames: TWideStrings);

Description

Call GetOperations to retrieve the names of all operations defined in for the port type specified by PortTypeName. An operation corresponds to a method on the interface that corresponds to the specified port type.

PortTypeName is the name of the port type whose operations are retrieved.

OperationNames is an existing TWideStrings object to which the names of all operations on PortTypeName are added.

Note:	GetOperations does not clear the WideString list before adding the names of the operations on the specified port type.


TWSDLItems.GetOperationsForBinding
 VCL Reference

TWSDLItems.GetOperationsForBinding

TWSDLItems	See also

Fills a list with the names of all operations defined on the port type of a specified binding.

procedure GetOperationsForBinding(const BindingName: WideString; OperationNames: TWideStrings);

Description

Call GetOperationsForBinding to retrieve the names of all operations defined for the port type associated with a specified binding. An operation corresponds to a method on the interface that corresponds to a port type. A binding represents a port type, plus the protocols used to encode data and transmit requests when calling that port type.

BindingName is the name of the binding associated with the port type whose operations are retrieved.

OperationNames is an existing TWideStrings object to which the names of all operations on the binding’s port type are added.

Note:	GetOperationsForBinding does not clear the WideString list before adding the names of the operations.


TWSDLItems.GetPartNode
 VCL Reference

TWSDLItems.GetPartNode

TWSDLItems	See also

Returns the interface for the node that describes a part of a message.

function GetPartNode(const MessageName, PartName: WideString): IXMLNode;

Description

Call GetPartNode to obtain information about a part that is defined for a message. Every message consists of one or more parts, each of which is associated with a definition from some type system.

MessageName is the name of the message that is defined using the part.

PartName is the name of the part whose node is returned.


TWSDLItems.GetParts
 VCL Reference

TWSDLItems.GetParts

TWSDLItems	See also

Fills a list with the names of all parts defined for a specified message.

procedure GetParts(const MessageName: WideString; PartNames: TWideStrings);

Description

Call GetParts to retrieve the names of all parts that make up a specified message. A part corresponds to definition from some type system.

MessageName is the name of the message whose parts are retrieved.

PartNames is an existing TWideStrings object to which the names of all parts on MessageName are added.

Note:	GetParts does not clear the WideString list before adding the names of the parts of the specified message.


TWSDLItems.GetPartsForOperation
 VCL Reference

TWSDLItems.GetPartsForOperation

TWSDLItems	See also

Fills a list with the names of all parts defined for input messages of a specified operation.

procedure GetPartsForOperation(const PortTypeName, OperationName: WideString; OpeationIndex: Integer; PartNames: TWideStrings);

Description

Call GetPartsForOperation to retrieve the names of all parts that make up input messages on a specified operation. The part definition must be in the WSDL document or a document that it imports. A part corresponds to definition from some type system.

PortTypeName is the name of the port type that contains the operation. A port type corresponds to an invokable interface in a Web Service application.

OperationName is the name of the operation from whose input messages the parts are retrieved. An operation corresponds to a method on the interface that corresponds to PortTypeName.

PartNames is an existing TWideStrings object to which the names of all parts on input messages (input parameters) of the operation specified by OperationName.

Note:	GetPartsForOperation does not clear the WideString list before adding the names of the parts of the specified message.


TWSDLItems.GetPortsForService
 VCL Reference

TWSDLItems.GetPortsForService

TWSDLItems	See also

Fills a list with the names of all ports defined within a specified service.

procedure GetPortsForService(const ServiceName: WideString; PortNames: TWideStrings);

Description

Call GetPortsForService to retrieve the names of all ports defined for the specified service. A port represents a binding, plus the address where that binding can be found.

ServiceName is the name of the service whose ports are listed.

PortNames is an existing TWideStrings object to which the names of all ports in the specified service are added.

Note:	GetPortsForService does not clear the WideString list before adding the names of the ports.


TWSDLItems.GetPortTypeNode
 VCL Reference

TWSDLItems.GetPortTypeNode

TWSDLItems	See also

Returns the interface for the node that describes a port type defined in the WSDL document.

function GetPortTypeNode(const PortTypeName: WideString): IXMLNode;

Description

Call GetPortTypeNode to obtain information about a port type that is defined in the WSDL document or a document that it imports. Each port type corresponds to an interface that the Web Service application can execute.

PortTypeName is the name of the port type whose node is returned.


TWSDLItems.GetPortTypes
 VCL Reference

TWSDLItems.GetPortTypes

TWSDLItems	See also

Fills a list with the names of all port types defined in the WSDL document.

procedure GetPortTypes(PortTypeNames: TWideStrings);

Description

Call GetPortTypes to retrieve the names of all port types defined in the WSDL document or any document that it imports. Each port type corresponds to an interface that the Web Service application can execute.

PortTypeNames is an existing TWideStrings object to which the names of all port types are added.

Note:	GetPortTypes does not clear the WideString list before adding the names of the port types.


TWSDLItems.GetSchemaNode
 VCL Reference

TWSDLItems.GetSchemaNode

TWSDLItems	See also

Returns the interface for the schema node that defines a type.

function GetSchemaNode(const SchemaTns: WideString): IXMLNode;

Description

Call GetSchemaNode to obtain information about a schema definition for a type that is defined in the WSDL document.

SchemaTns is the target namespace of the schema definition for a type.

GetSchemaNode returns the corresponding node.


TWSDLItems.GetSchemas
 VCL Reference

TWSDLItems.GetSchemas

TWSDLItems	See also

Fills a list with the namespaces for all schema definitions of types in the WSDL document.

procedure GetSchemas(SchemaNames: TWideStrings);

Description

Call GetSchemaTypes to retrieve the namespaces that correspond to schema definitions of types.

SchemaNames is an existing TWideStrings object to which the namespaces for the schema definitions are added.

Note:	GetSchemas does not clear the WideString list before adding the namespaces of the schema definitions.


TWSDLItems.GetServiceNode
 VCL Reference

TWSDLItems.GetServiceNode

TWSDLItems	See also

Returns the interface for the node that describes a service defined in the WSDL document.

function GetServiceNode(const ServiceName: WideString): IXMLNode;

Description

Call GetServiceNode to obtain information about a service that is defined in the WSDL document. A service is a collection of related ports.

ServiceName is the name of the service whose node is returned.


TWSDLItems.GetServices
 VCL Reference

TWSDLItems.GetServices

TWSDLItems	See also

Fills a list with the names of all services defined in the WSDL document.

procedure GetServices(ServiceNames: TWideStrings);

Description

Call GetServices to retrieve the names of all services defined in the WSDL document or any document that it imports. Each service is a collection of related ports.

ServiceNames is an existing TWideStrings object to which the names of all services are added.

Note:	GetServices does not clear the WideString list before adding the names of the services.


TWSDLItems.GetSoapAddressForServicePort
 VCL Reference

TWSDLItems.GetSoapAddressForServicePort

TWSDLItems	See also

Returns the address of a specified port from a specified service.

function GetSoapAddressForServicePort(const ServiceName, PortName: WideString): WideString;

Description

Call GetSoapAddressForServicePort to retrieve the address to which a SOAP request should be sent if it wants to access a specified port from a specified service.

ServiceName is the name of the service that contains the desired port. It is defined in the WSDL document or another document that it imports.

PortName is the name of the port whose address is returned.


TWSDLItems.GetSoapBindingAttribute
 VCL Reference

TWSDLItems.GetSoapBindingAttribute

TWSDLItems	See also

Returns the value of a specified attribute of a specified SOAP binding.

function GetSoapBindingAttribute(const BindingName: WideString; Attribute: WideString): WideString;

Description

Call GetSoapBindingAttribute to retrieve value of an attribute on a SOAP binding. GetSoapBindingAttribute locates a binding with the specified name that includes a <soap:binding> tag, and returns the specified attribute from that <soap:binding> tag.

BindingName is the name of the binding that includes the <soap:binding> tag. A binding describes the encoding and transport protocols for an associated port type.

Attribute is the name of the desired attribute on the <soap:binding> tag.

If BindingName does not identify a binding that includes a <soap:binding> tag that has the specified attribute, GetSoapBindingAttribute returns an empty string.


TWSDLItems.GetSoapBodyAttribute
 VCL Reference

TWSDLItems.GetSoapBodyAttribute

TWSDLItems	See also

Returns the value of an attribute of a body tag of a message type in an operation on the port type of a SOAP binding.

function GetSoapBodyAttribute(const BindingName, Operation, IOType, Attribute: WideString): WideString;

Description

Call GetSoapBodyAttribute to retrieve value of an attribute on the body tag for a message type that is part of an operation of the port type associated with a specified binding. The body tag can come from the WSDL document or another document that it imports.

BindingName is the name of the binding that includes the operation.

Operation is the name of the operation that includes the message.

IOType indicates the type of the message (input or output).

Attribute is the name of the desired attribute on the <soap:body> tag.


TWSDLItems.GetSoapBodyNamespace
 VCL Reference

TWSDLItems.GetSoapBodyNamespace

TWSDLItems	See also

Returns the value of the first namespace attribute found on a SOAP body node inside a binding with a specified port type.

function GetSoapBodyNamespace(const BindingPortType: WideString): WideString;

Description

GetSoapBodyNamespace searches the bindings in the WSDL document and any documents it imports for one that has a port type that matches BindingPortType. It then searches the operations of that binding to find one whose messages include a SOAP body node. It returns the namespace attribute of that SOAP body node.

PortTypeName is the name of the port type (interface) that must appear in the binding.


TWSDLItems.GetSoapFaultAttribute
 VCL Reference

TWSDLItems.GetSoapFaultAttribute

TWSDLItems	See also

Returns the value of an attribute on the node that defines a SOAP fault packet.

function GetSoapFaultAttribute(const BindingName, Operation, FaultName, Attribute: WideString): WideString;

Description

Call GetSoapFaultAttribute to retrieve value of an attribute on the <soap:fault> tag associated with an operation on a specified SOAP binding.

BindingName is the name of the binding that includes the operation.

Operation is the name of the operation that uses the fault definition.

FaultName indicates the name of the <soap:fault> element.

Attribute is the name of the desired attribute on the <soap:fault> tag.


TWSDLItems.GetSoapFaultsForOperation
 VCL Reference

TWSDLItems.GetSoapFaultsForOperation

TWSDLItems	See also

Fills a list with the names of all faults defined for a specified operation on a SOAP binding.

procedure GetSoapFaultsForOperation(const BindingName, Operation: WideString; FaultNames: TWideStrings);

Description

Call GetSoapFaultsForOperation to retrieve the names of all faults defined for the specified operation.

BindingName is the name of the binding that includes the operation.

Operation is the operation whose associated faults are retrieved.

FaultNames is an existing TWideStrings object to which the names of all faults are added.

Note:	GetSoapFaultsForOperation does not clear the WideString list before adding the names of the faults.


TWSDLItems.GetSoapHeaderAttribute
 VCL Reference

TWSDLItems.GetSoapHeaderAttribute

TWSDLItems	See also

Fills a list with the values of a specified attribute on all soap headers of a messages type on a specified operation of a SOAP binding.

procedure GetSoapHeaderAttribute(const BindingName, Operation, IOType, Attribute: WideString; SoapHeaderAttrs: TWideStrings);

Description

Call GetSoapHeaderAttribute to retrieve the values of an attribute for every SOAP header tag of a message type that is part of an operation of the port type associated with a specified binding.

BindingName is the name of the binding that includes the operation.

Operation is the name of the operation that includes the message.

IOType indicates the type of the message (input or output).

Attribute is the name of the desired attribute on all the <soap:header> tags.

SoapHeaderAttrs is an existing TWideStrings object to which the value of the specified attribute for each <soap:header> tag is added.

Note:	GetSoapFaultsForOperation does not clear the WideString list before adding the attribute values.


TWSDLItems.GetSoapOperationAttribute
 VCL Reference

TWSDLItems.GetSoapOperationAttribute

TWSDLItems	See also

Returns the value of an attribute on the <soap:operation> node of an operation on a SOAP binding.

function GetSoapOperationAttribute(const BindingName, Operation, Attribute: WideString): WideString;

Description

Call GetSoapOperationAttribute to retrieve value of an attribute on the <soap:operation> tag associated with an operation on a specified SOAP binding. The soap operation tag can be in the WSDL document or in another document that it imports.

BindingName is the name of the binding that includes the operation.

Operation is the name of the operation that includes the <soap:operation> tag.

Attribute is the name of the desired attribute on the <soap:operation> tag.


TWSDLItems.GetTargetNamespace
 VCL Reference

TWSDLItems.GetTargetNamespace

TWSDLItems	See also

Returns the target namespace of the definitions node in the WSDL document.

function GetTargetNamespace: WideString;

Description

The root node of a WSDL document is always a definitions node. This node includes a targetNamespace attribute that uniquely identifies the set of definitions in the WSDL document. Call GetTargetNamespace to retrieve that namespace.


TWSDLItems.HasTypesNode
 VCL Reference

TWSDLItems.HasTypesNode

TWSDLItems

Indicates whether the WSDL document includes any type definitions.

function HasTypesNode: Boolean;

Description

HasTypesNode returns True if the WSDL document includes any type definitions, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TXMLDocument

TWSDLItems


TWSDLView
 VCL Reference

TWSDLView

Hierarchy	Properties	Methods	See also

TWSDLView represents a specific binding and operation in a WSDL document.

Unit

WSDLNode

Description

TWSDLView is used by components that work with WSDL documents to represent a specific port and/or operation that is defined in a WSDL document. The WSDL property provides access to the WSDL document itself. The other properties give the names of the entities of interest that are defined within that document.


 VCL Reference

TWSDLView properties

TWSDLView	Alphabetically	Legend

In TWSDLView

Operation

Port

PortType

Service

WSDL

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWSDLView properties

TWSDLView	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Operation

Owner

Port

PortType

Service

Tag

VCLComObject

WSDL


TWSDLView.Operation
 VCL Reference

TWSDLView.Operation

TWSDLView	See also

Identifies the target operation that is defined in the WSDL document.

property Operation: string;

Description

Operation is the name of an operation that is defined in the WSDL document identified by the WSDL property. Operation maps to a method on the interface that corresponds to the PortType property.


TWSDLView.Port
 VCL Reference

TWSDLView.Port

TWSDLView	See also

Specifies the target port that is defined in the WSDL document.

property Port: string;

Description

Port is the name of a port that is defined in the WSDL document identified by the WSDL property. A Port represents the address of a Web Service application, a transport protocol that is used for requests to that application, the data format to use for encoding requests, and the port type that defines the operations contained in those requests.


TWSDLView.PortType
 VCL Reference

TWSDLView.PortType

TWSDLView	See also

Specifies the target port type that is defined in the WSDL document.

property PortType: string;

Description

Port is the name of a port type that is defined in the WSDL document identified by the WSDL property. A port type corresponds to an interface that the Web Service application implements.

The target method on that interface is identified by the Operation property. The address and protocols to use when calling this interface are identified by the Port property.


TWSDLView.Service
 VCL Reference

TWSDLView.Service

TWSDLView	See also

Specifies the target service that is defined in the WSDL document.

property Service: string;

Description

Service is the name of the service of interest that is defined in the WSDL document identified by the WSDL property. A service is a collection of related ports, including the one specified by the Port property.


TWSDLView.WSDL
 VCL Reference

TWSDLView.WSDL

TWSDLView

Provides access to the definitions in the WSDL document.

property WSDLItems: TWSDLItems;

Description

WSDLItems is a helper object whose methods return the definitions included in the WSDL document. All the other TWSDLView properties refer to definitions contained in this WSDL document


 VCL Reference

TWSDLView methods

TWSDLView	Alphabetically	Legend

Derived from TComponent

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TWSDLView methods

TWSDLView	By object	Legend

Assign

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWSDLView


TXMLBroker
 VCL Reference

 TXMLBroker

Hierarchy	Properties	Methods	Events	Using TXMLBroker	See also

TXMLBroker fetches XML data packets from an application server and applies XML updates to the application server.

Unit

XMLBrokr

Description

Use TXMLBroker in an application that is simultaneously the client of a multi-tiered database application and a Web server application. This class serves two major functions:

It fetches XML data packets from a provider using the IAppServer interface.

It receives HTTP messages from Web browsers that contain XML delta packets and applies them to the application server.

Add a TXMLBroker object to a Web module to make database information supplied by a provider on the application server available as XML. An InternetExpress page producer (TInetXPageProducer) in the same Web module uses this XML to build HTML pages that represent that database information.

The XML broker automatically registers itself with the Web module (or Web dispatcher) as an auto-dispatching object. This means that the Web module or Web dispatcher forwards all incoming HTTP messages directed to the XML broker without requiring the use of Web action items.

These incoming messages are assumed to be update messages created by the browser in response to HTML generated by a TApplyUpdatesButton component. The XML broker automatically applies the delta packet (the content of the HTTP request message) to the application server, and passes any update errors to a separate content producer, which can generate a response message.


 VCL Reference

TXMLBroker properties

TXMLBroker	Alphabetically	Legend

In TXMLBroker

AppServer

Connected

HasAppServer

MaxErrors

MaxRecords

Notify

NotifyCount

Params

ProviderName

ReconcileProducer

RemoteServer

WebDispatch

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLBroker properties

TXMLBroker	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

HasAppServer

MaxErrors

MaxRecords

Name

Notify

NotifyCount

Owner

Params

ProviderName

ReconcileProducer

RemoteServer

Tag

VCLComObject

WebDispatch


TXMLBroker.AppServer
 VCL Reference

TXMLBroker.AppServer

TXMLBroker	See also

Provides access to the interface the XML broker uses to communicate with the application server.

property AppServer: IAppServer;

Description

Use AppServer to communicate with the providers that supply data to and resolve updates for the XML broker. If the providers are on a remote application server, AppServer has the same value as the AppServer property of the connection component. If the XML broker uses a provider in the same process space, AppServer is the interface to an internally created object that dispatches IAppServer calls to the local provider.

Applications don’t need to work directly with the IAppServer interface. The properties and methods of the XML broker are automatically translated into IAppServer calls as needed.


TXMLBroker.Connected
 VCL Reference

TXMLBroker.Connected

TXMLBroker	See also

Determines whether the XML broker has an active connection to the provider that supplies its data and applies its updates.

property Connected: Boolean;

Description

Use Connected to determine whether the XML broker can supply XML data packets and apply updates. If the XML broker uses a provider on an application server, setting Connected to True sets the Connected property of the connection component to True. If the XML broker uses a local provider component, setting Connected to True causes the XML broker to generate an internal object that communicates with the provider using the IAppServer interface. Thus, the value of Connected indicates whether an IAppServer interface is available for communicating with a provider, and so the value of Connected is the same as the value of HasAppServer.

You can’t set Connected to True unless the XML broker has a provider to which it can connect. Trying to set Connected to True before the ProviderName property is set or a local provider is assigned using the SetProvider method causes the XML broker to raise an exception.

Note:	In the Web Page editor, default fields or parameter values may not appear if the associated XML broker is not connected.


TXMLBroker.HasAppServer
 VCL Reference

TXMLBroker.HasAppServer

TXMLBroker	See also

Indicates whether the XML broker has an IAppServer interface for communicating with its provider.

property HasAppServer: Boolean;

Description

Read HasAppServer to determine whether the XML broker can get its data from an IAppServer interface. When HasAppServer is True, the XML broker can interact with its provider through the IAppServer interface.

Use HasAppServer to check whether the XML broker is connected rather than reading the AppServer property. Reading AppServer causes the XML broker to obtain an IAppServer interface if it does not already have one.


TXMLBroker.MaxErrors
 VCL Reference

TXMLBroker.MaxErrors

TXMLBroker	See also

Specifies the maximum number of update errors allowed before aborting an update operations.

property MaxErrors: Integer;

Description

Set MaxErrors to indicate the maximum number of errors that the associated provider should allow before prematurely stopping an update operation. Set MaxErrors to –1 to indicate that there is no limit to the number of errors.


TXMLBroker.MaxRecords
 VCL Reference

TXMLBroker.MaxRecords

TXMLBroker	See also

Specifies the maximum number of records that can appear in XML data packets.

property MaxRecords: Integer;

Description

Set MaxRecords to limit the size of XML data packets retrieved from the associated provider.

When MaxRecords is –1, XML data packets contain all the records in the provider’s dataset.

When MaxRecords is 0, XML data packets contain only metadata.

When MaxRecords is greater than 0, XML data packets contain up to MaxRecords records, depending on the number of records in the provider’s dataset.

Tip:	Because an InternetExpress application sends the entire data packet to client applications, it is important to limit the size of data packets. Otherwise, the time to download web pages containing data packets can be prohibitively long.

Note:	When limiting the number of records that appear in data packets, you may need to fetch several data packets before all data is returned. Because InternetExpress applications are always stateless, you will need to supply information about what record should start the next data packet as the OwnerData parameter of GetXMLRecords or RequestRecords. You can use a query form to obtain information about the last record seen by a particular Web client.


TXMLBroker.Notify
 VCL Reference

TXMLBroker.Notify

TXMLBroker	See also

Lists the objects that are notified when any properties affecting the XML broker’s connection to its provider change.

property Notify[Index: Integer]: TObject;

Description

Read Notify to access the objects that respond when the XML broker’s connection to its provider changes. These objects are sent a notification when the ProviderName, AppServer, or RemoteServer property changes.

Most applications do not need to use the Notify property. It allows the Web page editor to remain synchronized with property changes made at design time.


TXMLBroker.NotifyCount
 VCL Reference

TXMLBroker.NotifyCount

TXMLBroker	See also

Indicates the number of objects in the Notify property list.

property NotifyCount: Integer;

Description

NotifyCount specifies the number of objects listed in the Notify property.


TXMLBroker.Params
 VCL Reference

TXMLBroker.Params

TXMLBroker	See also	Example

Contains parameter values that are sent to or retrieved from the application server.

property Params: TXMLParams;

Description

Use Params to specify parameter values that should be passed to a source dataset on the application server. These parameter values are used in one of two ways:

If the associated provider represents a query or stored procedure, they supply parameter values that the application server uses when executing the query or stored procedure.

If the associated provider represents a table, they limit the records that are sent in data packets so that they only include records where each field with the same name as a parameter has the same value as the parameter.

After the application specifies parameters (at design time or runtime), they are sent to the application server automatically when the XML broker fetches data.

To send parameter values to a query or stored procedure, add a parameter object (TParam) to Params for every parameter on the query or stored procedure for which you want to supply a value. Assign each parameter object the same Name, DataType, and ParamType as the corresponding parameter on the query or stored procedure. These values are automatically encoded and sent to the application server when the XML broker fetches data.

To send parameter values to a table, add a parameter object for each field in the table that is used to limit the values sent in data packets. Assign each parameter object the same Name and DataType as the corresponding field component on the table. These parameter values are automatically sent when the client dataset fetches data, and the records returned in data packets from the application server only contain records that match the assigned value on the corresponding fields.

Tip:	You can assign parameter values from the content fields supplied to a request message by TSubmitQueryButton using the AssignStrings method of Params.

Note:	To initialize Params so that it reflects the parameters of a query or stored procedure on an application server, call the FetchParams method.


TXMLBroker.ProviderName
 VCL Reference

TXMLBroker.ProviderName

TXMLBroker	See also

Specifies the name of a registered provider from the application server.

property ProviderName: string;

Description

Use ProviderName to specify the provider with which to communicate on the server (or in the same Web module). This property is passed as a parameter to IAppServer interface calls when the XML broker fetches data or applies updates. If an application server contains multiple provider objects, an XML broker can set ProviderName to any of them once the connection component establishes a connection to the application server.

ProviderName can be set from a drop-down in the Object Inspector once the RemoteServer property is set.

Note:	ProviderName can also be used to link the XML broker to a provider in the same process space, as long as the provider component has the same Owner as the XML broker. If the local provider component has a different Owner, use the SetProvider method instead.


TXMLBroker.ReconcileProducer
 VCL Reference

TXMLBroker.ReconcileProducer

TXMLBroker	See also

Specifies the producer that generates response message content when an update generates errors.

property ReconcileProducer: TCustomContentProducer;

Description

Use ReconcileProducer to specify the component that generates the content of response messages to update requests when the update operation generated errors.

When the XML broker applies updates, the application server returns a delta packet containing all records that could not be updated because of errors. The XML broker can attempt to respond to those errors or generate its own response message using the OnGetErrorResponse event. However, unless the OnGetErrorResponse event handler generates an HTML document to be sent in the response message and indicates that the update is completely handled, the XML broker must still generate a response to the update operation. To do so, it calls the Content method of the ReconcileProducer to generate the content of the response message.

Tip:	The Reconcile producer will probably need information about the update errors that the application server returned. You can provide it with this information either by initializing the Reconcile producer in an OnGetErrorResponse event handler or by having the Reconcile producer call the GetErrors method.

Note:	If there is no ReconcileProducer assigned and an update generates errors, the XML broker raises an exception unless the OnGetErrorResponse event handler generates a response message.

Tip:	The InetXCustom demo contains a TReconcilePageProducer component that you can use as the value of the ReconcileProducer property or as the basis of your own reconcile producer.


TXMLBroker.RemoteServer
 VCL Reference

TXMLBroker.RemoteServer

TXMLBroker	See also

Specifies the connection component that this XML broker uses to connect to an application server.

property RemoteServer: TCustomRemoteServer;

Description

Use RemoteServer to specify the connection component that establishes a connection to the remote application server. The connection component obtains an IAppServer interface for data exchange and maintains the interface of the remote data module on the application server.

If a Web application uses more than connection component, the application can change which connection an XML broker uses by changing the value for this property.


TXMLBroker.WebDispatch
 VCL Reference

TXMLBroker.WebDispatch

TXMLBroker	See also

Lets the Web dispatcher identify what HTTP messages should be forwarded to the XML broker.

property WebDispatch: TWebDispatch;

Description

Use WebDispatch to specify the HTTP messages to which the XML broker responds. Typically, these originate from a button added to HTML forms by TApplyUpdatesButton.

The TWebDispatch object that implements WebDispatch includes properties that let you specify the path portion of URLs to which the XML broker responds, as well as the types of messages it accepts (typically post messages). You can also use this property to disable the XML broker so that the Web dispatcher does not send it any HTTP messages. When the XML broker is disabled in this way, it can still provide XML data packets to an InternetExpress page producer, but any update messages must be handled by a Web action item.


 VCL Reference

TXMLBroker events

TXMLBroker	Alphabetically	Legend

In TXMLBroker

AfterDispatch

BeforeDispatch

OnGetErrorResponse

OnGetResponse

OnRequestRecords

OnRequestUpdate


 VCL Reference

TXMLBroker events

TXMLBroker	By object	Legend

AfterDispatch

BeforeDispatch

OnGetErrorResponse

OnGetResponse

OnRequestRecords

OnRequestUpdate


TXMLBroker.AfterDispatch
 VCL Reference

TXMLBroker.AfterDispatch

TXMLBroker	See also

Occurs after the XML broker generates the content of a response message.

property AfterDispatch: THTTPMethodEvent;

Description

Write an AfterDispatch event handler to perform any final actions before sending a response back to the Web browser that sent the XML broker an update message. Usually by the time AfterDispatch occurs, the XML broker has already applied the updates and generated the response message (using the ReconcileProducer or one of the events that occurs when the XML broker receives an update request).


TXMLBroker.BeforeDispatch
 VCL Reference

TXMLBroker.BeforeDispatch

TXMLBroker	See also

Occurs when the XML broker receives an HTTP request message.

property BeforeDispatch: THTTPMethodEvent;

Description

Write a BeforeDispatch event handler to initialize the response to an update request or to handle any messages sent to the XML broker that are not update requests. If the event handler completely handles the request, filling out the response object so that it is ready to send, it should set the Handled parameter to True, thereby preventing the XML broker from applying the updates.

Unless the BeforeDispatch event handler sets the Handled parameter to True, the XML broker receives an OnRequestUpdate event after the BeforeDispatch event handler exits. After the OnRequestUpdate event, the XML broker applies the updates to the application server and generates the contents of the response based on whether there were any update errors. Finally, the XML broker receives an AfterDispatch event where it can perform any final changes to the response message before it is sent back to the Web browser.

If the BeforeDispatch event handler sets the Handled parameter to True, the XML broker receives an AfterDispatch event, but does not attempt to apply updates from the request message or receive any of the events that accompany that process.


TXMLBroker.OnGetErrorResponse
 VCL Reference

TXMLBroker.OnGetErrorResponse

TXMLBroker	See also

Occurs when there are errors applying updates to the application server.

type TGetErrorResponseEvent = procedure (Sender: TObject; ErrorCount: Integer; XMLErrors: string; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean) of object;

property OnGetErrorResponse: TGetErrorResponseEvent;

Description

Write an OnGetErrorResponse event handler to generate the response message after an update request encountered errors or to initialize a ReconcileProducer before it generates the response.

The Sender parameter is the XML broker that applied updates to the application server and received back a delta packet of update errors.

ErrorCount is the number of update errors found by the application server before it halted the update operation.

XMLErrors is a string of XML returned by the application server. It is a delta packet containing all the updates that could not be applied.

Request is the original request message that contains the delta packet of updates from the Web browser.

Response is the emerging response message that will be sent to the Web browser in response to the update request. Fill in the properties of this object to generate a response (such as an error message or a reconcile form) that indicates the errors in XMLErrors.

Handled indicates whether the event handler completed filling out Response. Set Handled to True if the event handler completes the response for the Web browser. Leave Handled as False if ReconcileProducer should generate the content of Response.

Note:	If the OnGetErrorResponse event handler does not set Handled to True and there is no ReconcileProducer, the XML broker raises an exception.


TXMLBroker.OnGetResponse
 VCL Reference

TXMLBroker.OnGetResponse

TXMLBroker	See also

Occurs when there are no errors applying updates to the application server.

type TGetResponseEvent = procedure (Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean) of object;

property OnGetResponse: TGetResponseEvent;

Description

Write an OnGetResponse event handler to edit the response message after an update request is successfully applied.

The Sender parameter is the XML broker that applied updates to the application server with no errors.

Request is the original request message that contains the delta packet of updates from the Web browser.

Response is the emerging response message that will be sent to the Web browser in response to the update request. Fill in the properties of this object to generate a response (such as refreshing the data).

Handled indicates whether the event handler completed filling out Response. Set Handled to True if the event handler completes the response for the Web browser. Leave Handled as False if the XML broker should send a redirect response that sends the browser back to the page that generated the update request.


TXMLBroker.OnRequestRecords
 VCL Reference

TXMLBroker.OnRequestRecords

TXMLBroker	See also	Example

Occurs when the XML broker needs to fetch a data packet from its associated provider.

type TRequestRecordsEvent = procedure (Sender: TObject; Request: TWebRequest; out RecCount: Integer; var OwnerData: OleVariant; var Records: string) of object;

property OnRequestRecords: TRequestRecordsEvent;

Description

Write an OnRequestRecords event handler to provide an alternate mechanism for providing XML data packets or to perform other actions whenever the XML broker needs to fetch an XML data packet. For example, the OnRequestRecords event handler might call GetXMLRecords to fetch an XML data packet from the application server and then edit its contents.

OnRequestRecords occurs when the InternetExpress page producer requests an XML data packet (usually in response to a request message) or when the application calls the XML broker’s RequestRecords method.

The Sender parameter is the object that originates the request (usually an InternetExpress page producer).

Request is the request message that prompted the request for an XML data packet. This value may be nil if the request did not arise from a page producer or if the page producer is not processing a request message.

OwnerData contains an application-defined variant that is sent to the provider’s BeforeGetRecords event handler. The InternetExpress page producer that is requesting records or the caller of RequestRecords may initialize this value. OwnerData can be used to pass persistent state information to a stateless application server (for example, the first record that should appear in the data packet when MaxRecords is greater than 0).

Records optionally returns an XML data packet as a string. If Records is an empty string on exit from the event handler, the XML broker automatically fetches the XML data packet from its associated provider. Otherwise, the XML broker uses the value of Records as the new XML data packet.


TXMLBroker.OnRequestUpdate
 VCL Reference

TXMLBroker.OnRequestUpdate

TXMLBroker	See also

Occurs immediately before the XML broker applies updates to the application server.

type TRequestUpdateEvent = procedure (Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean) of object;

property OnRequestUpdate: TRequestUpdateEvent;

Description

Write an OnRequestUpdate event handler to provide an alternate mechanism for applying updates to the application server. For example, the OnRequestUpdate event handler might call GetDelta to extract the delta packet from the request message and then preprocess the XML string before applying the updates with a call to ApplyXMLUpdates.

OnRequestUpdate occurs immediately after the BeforeDispatch event or when the application calls the XML broker’s RequestUpdate method.

The Sender parameter is the object that received the update request (the XML broker or a Web action item).

Request is the request message that contains the updates to be applied. The XML delta packet can be extracted from this request object using the GetDelta method.

Response is the emerging response message that will be sent back to the Web browser that generated the update request. The event handler can set properties on this response object to partially or completely specify the message will be returned to the Web browser.

Handled indicates whether the event handler applied the updates. If Handled is True on exit from the event handler, the XML broker does not apply the updates, does not receive an OnGetResponse or OnGetErrorResponse event, and does not call on the ReconcileProducer to generate a response message. (It does still receive an AfterDispatch event). If Handled is False on exit from the event handler, the XML broker proceeds to apply the updates contained in the request message and receives all the associated events.

Note:	If the event handler applies the updates, it must also generate the response message.


 VCL Reference

TXMLBroker methods

TXMLBroker	Alphabetically	Legend

In TXMLBroker

AddNotify

ApplyXMLUpdates

Create

Destroy

FetchParams

GetDelta

GetErrorCount

GetErrors

GetXMLRecords

HTMLSubmitFormName

MasterRowSetVarName

RemoveNotify

RequestRecords

RequestUpdate

RowSetVarName

SetProvider

SubmitFormVarName

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLBroker methods

TXMLBroker	By object	Legend

AddNotify

AfterConstruction

ApplyXMLUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FetchParams

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDelta

GetErrorCount

GetErrors

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetXMLRecords

HasParent

HTMLSubmitFormName

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MasterRowSetVarName

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RemoveNotify

RequestRecords

RequestUpdate

RowSetVarName

SafeCallException

SetProvider

SetSubComponent

SubmitFormVarName

UpdateAction


TXMLBroker.AddNotify
 VCL Reference

TXMLBroker.AddNotify

TXMLBroker	See also

Adds an object to the Notify property list.

procedure AddNotify(ANotify: TObject);

Description

Call AddNotify to add an object to the list maintained by the Notify property. Each object in this list is notified every time a property that affects the metadata of the XML broker’s data packets changes. These include changes to the RemoteServer, AppServer, and ProviderName properties.

ANotify specifies the object that wants to be notified of property changes. This object must support the INotifyConnectionChange interface, which the XML broker uses to notify it of changes.


TXMLBroker.ApplyXMLUpdates
 VCL Reference

TXMLBroker.ApplyXMLUpdates

TXMLBroker	See also

Sends an XML delta packet of updated, inserted, and deleted records to the provider on the application server for writing to the database.

function ApplyXMLUpdates(const Delta: string; out ErrorCount: Integer): string;

Description

Call ApplyXMLUpdates to send the updates in the XML delta packet specified by Delta to the application server. ApplyXMLUpdates is used internally (by the RequestUpdate method) to apply updates in an XML delta packet and retrieve a delta packet containing any failed updates.

Delta is the XML delta packet that contains the insertions, deletions and modifications from a Web browser. Typically, it is retrieved from an HTTP request message using the GetDelta method.

ErrorCount returns the number of errors encountered on the application server before it terminated the update operation. If ErrorCount is 0, all updates were applied successfully. ErrorCount can not exceed the value of MaxErrors.

ApplyXMLUpdates returns an XML delta packet containing all updates that were not successfully applied.  If ErrorCount is 0, this is an empty string.


TXMLBroker.Create
 VCL Reference

TXMLBroker.Create

TXMLBroker	See also

Creates a new TXMLBroker object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the XML broker constructor. Typically the XML broker is added to a Web module at design time, so that the constructor is called automatically.

 The Owner parameter specifies the component (usually the Web module) that is responsible for freeing the XML broker.


TXMLBroker.Destroy
 VCL Reference

TXMLBroker.Destroy

TXMLBroker	See also

Frees the memory associated with the TXMLBroker object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead,call Free, which verifies that the XML broker is not nil before calling Destroy.


TXMLBroker.FetchParams
 VCL Reference

TXMLBroker.FetchParams

TXMLBroker	See also	Example

Retrieves parameter values from the application server.

function FetchParams; virtual;

Description

Call FetchParams to initialize the Params property with the current parameter values on the application server. FetchParams does nothing unless the provider component on the application server can supply parameter values.

Warning:	if the XML broker uses a stateless application server, other clients can change the values returned by FetchParams at any time.


TXMLBroker.GetDelta
 VCL Reference

TXMLBroker.GetDelta

TXMLBroker	See also

Extracts an XML delta packet from an HTTP request message.

function GetDelta(Request: TWebRequest): string;

Description

Call GetDelta to obtain the XML delta packet contained in the content of the request message specified by Request. This value can be used to apply the updates from the request message by calling ApplyXMLUpdates.


TXMLBroker.GetErrorCount
 VCL Reference

TXMLBroker.GetErrorCount

TXMLBroker	See also

Returns the number of errors in the delta packet returned by GetErrors.

function GetErrorCount: Integer;

Description

Call GetErrorCount to determine the number errors included in the XML delta packet that the application server returns when an update operation causes errors.


TXMLBroker.GetErrors
 VCL Reference

TXMLBroker.GetErrors

TXMLBroker	See also

Returns the XML delta packet (if any) that describes the errors that occurred when applying updates.

function GetErrors: string;

Description

Call GetErrors to obtain the XML delta packet returned by the application server when an update operation included some errors.

Note:	See the template err.html (included with Delphi in the WebMidas directory) for one possible use for the XML delta packet of errors. In err.html, the string returned by GetErrors should replace the <#XMLEMBED_VAR_ERR> tag.


TXMLBroker.GetXMLRecords
 VCL Reference

TXMLBroker.GetXMLRecords

TXMLBroker	See also

Retrieves an XML data packet from the application server.

function GetXMLRecords(var RecsOut: Integer; var OwnerData: OleVariant; XMLOptions: TXMLOptions): string;

Description

Call GetXMLRecords to obtain the XML data packet from the application server. GetXMLRecords calls the interface specified by AppServer, requesting an XML data packet with at most MaxRecords records. It returns the resulting XML data packet in a form that is ready for insertion into an HTML document.

RecsOut returns the number of records in the XML data packet.

On entry, OwnerData contains an application-defined value that is passed to the provider’s BeforeGetRecords event handler. OwnerData returns an application-defined value that is set by the provider’s AfterGetRecords event handler. Typically, this parameter is used to transmit persistent state information to and from a stateless application server.

XMLOptions is a set of flags that indicate how the broker should format the XML data packet after it is retrieved from the application server.

GetXMLRecords returns the formatted XML data packet.

Note:	Unlike the RequestRecords method, GetXMLRecords bypasses the OnRequestRecords event.


TXMLBroker.HTMLSubmitFormName
 VCL Reference

TXMLBroker.HTMLSubmitFormName

TXMLBroker	See also

Returns the name of the HTML form that submits updates to the XML broker.

function HTMLSubmitFormName: string;

Description

When the InternetExpress page producer assembles an HTML document that uses the XML data packets managed by the XML broker, it declares an HTML form that submits the updates to the XML broker. HTMLSubmitFormName is the name of that HTML form.

The HTML form named by this return value sends the HTTP request messages containing an XML delta packet of updates to be applied.


TXMLBroker.MasterRowSetVarName
 VCL Reference

TXMLBroker.MasterRowSetVarName

TXMLBroker	See also

Returns the name of the javascript variable for the XML broker’s dataset.

function MasterRowSetVarName(Path: TStrings): string;

Description

When the InternetExpress page producer assembles an HTML document that uses the XML data packets managed by the XML broker, it declares a javascript variable of type RowSet for the javascript object that represents the XML broker’s dataset. When the variable is first declared, the InternetExpress page producer calls MasterRowSetVarName.

Path is a set of variable names for all the master datasets for which the XML broker’s dataset is a detail set. These names come from previous calls to the MasterRowSetVarName method of their XML brokers. The last string in Path refers to the XML broker’s dataset itself.

MasterRowSetVarName returns the name of the XML broker, qualified by all strings in Path except for the last one, which is assumed to refer to the XML broker’s dataset. Thus, to change the name of the generated variable for an XML broker’s dataset, change the Name property of the XML broker.

Note:	To retrieve the name of the XML broker preceded by all the datasets in Path, use the RowSetVarName method instead.


TXMLBroker.RemoveNotify
 VCL Reference

TXMLBroker.RemoveNotify

TXMLBroker	See also

Removes an object to the Notify property list.

procedure RemoveNotify(ANotify: TObject);

Description

Call RemoveNotify to remove an object from the list maintained by the Notify property. Each object in this list is notified every time a property that affects the metadata of the XML broker’s data packets changes.


TXMLBroker.RequestRecords
 VCL Reference

TXMLBroker.RequestRecords

TXMLBroker	See also

Returns an XML data packet from the application server.

function RequestRecords(Sender: TObject; Request: TWebRequest; out RecCount: Integer; var OwnerData: OleVariant; XMLOptions: TXMLOptions): string; virtual;

Description

Call RequestRecords to obtain a current XML data packet, while first allowing the OnRequestRecords event handler to customize it. After generating the OnRequestRecords event, RequestRecords fetches the XML data packet by calling GetXMLRecords, unless the event handler supplies the XML data packet first.

Sender is the object that is requesting the XML data packet (usually an InternetExpress page producer).

Request describes an HTTP request message that originated the need for an XML data packet. Typically, this is a request message for which the InternetExpress page producer is creating a response.

RecCount returns the number of records in the XML data packet.

On entry, OwnerData contains an application-defined value that is passed to the OnRequestRecords event handler, and then forwarded (with any changes provided by the event handler) to the provider’s BeforeGetRecords event handler. OwnerData returns an application-defined value that is set by the provider’s AfterGetRecords event handler. Typically, this parameter is used to transmit persistent state information to and from a stateless application server.

XMLOptions is a set of flags indicating how the XML broker should format the XML data packet that the application server or OnRequestRecords event handler supplies.

RequestRecords returns the XML data packet.


TXMLBroker.RequestUpdate
 VCL Reference

TXMLBroker.RequestUpdate

TXMLBroker	See also

Responds to an HTTP update request.

function RequestUpdate(Sender: TObject; Request: TWebRequest; Response: TWebResponse): Boolean; virtual;

Description

Call RequestUpdate when using a Web action item to respond to update requests from a Web browser. When using a Web action item to respond to update requests, instead of letting the XML broker receive the update requests directly, you should set the Enabled property of the WebDispatch to False.

RequestUpdate generates an OnRequestUpdate event, to allow the event handler to apply the updates in the HTTP request message and generate a response. If the OnRequestUpdate event handler does not handle the message, RequestUpdate applies the updates using the ApplyXMLUpdates method. Finally, if there are no update errors, RequestUpdate generates an OnGetResponse event. If there were update errors, RequestResponse generates an OnGetErrorResponse event and (if the event handler does not generate a response) assigns the content of ReconcileProducer to the response message. If there are update errors and the response is not completed by an event handler or the ReconcileProducer, the XML broker raises an exception.

Sender is the object that received the request message.

Request describes an HTTP request message that contains the updates that need to be applied.

Response is the emerging response object that should be completed by RequestUpdate so that the XML broker can send it back to the Web browser.

RequestUpdate returns True if the response message is ready to send back to the Web browser, False if it still needs more processing.


TXMLBroker.RowSetVarName
 VCL Reference

TXMLBroker.RowSetVarName

TXMLBroker	See also

Returns the name of the javascript variable for the XML broker’s dataset.

function RowSetVarName(Path: TStrings): string;

Description

When the InternetExpress page producer assembles an HTML document that uses the XML data packets managed by the XML broker, it declares a javascript variable of type RowSet for the javascript object that represents the XML broker’s dataset. When the InternetExpress page producer needs to determine whether a RowSet variable was already declared, it looks up the variable name by calling RowSetVarName.

Path is a set of variable names for all the master datasets for which the XML broker’s dataset is a detail set.

RowSetVarName returns the name of the XML broker, qualified by all strings in Path.

Note:	Variable names are assigned for an XML broker’s dataset using the MasterRowSetVarName method.


TXMLBroker.SetProvider
 VCL Reference

TXMLBroker.SetProvider

TXMLBroker	See also

Associates the XML broker with a provider in the same process space.

procedure SetProvider(Provider: TComponent);

Description

Use SetProvider to specify a local provider component that provides data to and applies updates from the XML broker. The XML broker communicates with this provider using the IAppServer interface specified by the AppServer property.

Do not use SetProvider for remote providers on an application server. If the provider is not in the same process space as the XML broker, use the ProviderName property.

The Provider parameter must be a descendant of TCustomProvider. Otherwise, SetProvider raises an exception.


TXMLBroker.SubmitFormVarName
 VCL Reference

TXMLBroker.SubmitFormVarName

TXMLBroker	See also

Returns the name of the variable that refers to the HTML form named by HTMLSubmitFormName.

function HTMLSubmitFormName: string;

Description

When the InternetExpress page producer assembles an HTML document that uses the XML data packets managed by the XML broker, it declares an HTML form that submits the updates to the XML broker. In addition, it declares a variable that refers to that form. SubmitFormVarName is the name of that variable.


Hierarchy

TObject

TPersistent

TComponent

TXMLBroker


TXMLButton
 VCL Reference

TXMLButton

Hierarchy	Properties	Methods	See also

TXMLButton is the base class for Web items that create HTML buttons that perform some action with the XML data packet.

Unit

MidItems

Description

Use TXMLButton as a base class for components that generate the HTML statements defining a specialized button control for manipulating an XML data packet.  TXMLButton defines properties and methods for

Generating the HTML code to define the button control.

Associating the button with an XML broker that fetches the XML data packet and responds to update messages.

Specifying tag attributes of the HTML button control, including those defined by a style sheet.

Fitting the component into a hierarchy of Web items, each of which generates part of a larger HTML document.

In order to allow other Web items to use the HTML generated by the button control, TXMLButton inherits support for the IWebContent interface from TWebButton.

Do not create instances of TXMLButton. TXMLButton relies on an abstract method to generate the HTML statements defining a button control. Instead, create descendants of TXMLButton, such as TApplyUpdatesButton.


 VCL Reference

TXMLButton properties

TXMLButton	Alphabetically	Legend

In TXMLButton

Caption

XMLBroker

XMLUseParent

Derived from TWebButton

Custom

Style

StyleRule

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLButton properties

TXMLButton	By object	Legend

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Custom

DesignInfo

Name

Owner

Style

StyleRule

Tag

VCLComObject

XMLBroker

XMLUseParent


TXMLButton.Caption
 VCL Reference

TXMLButton.Caption

TXMLButton	See also

Specifies the caption that appears on the button.

property Caption: string;

Description

Use Caption to specify the caption that appears on the generated HTML button. The value of Caption is used as the value of a VALUE parameter on the HTML INPUT tag generated to implement the button.


TXMLButton.XMLBroker
 VCL Reference

TXMLButton.XMLBroker

TXMLButton	See also

Associates the XML button with an XML broker.

property XMLBroker: TXMLBroker;

Description

Set XMLBroker to specify the XML broker whose data packets the XML button manipulates.

When XML buttons are used by TDataNavigator, the data navigator already establishes a connection (indirectly) to an XML broker. If the XML button uses this same XML broker, you do not need to set the XMLBroker property. Instead, setting the XMLUseParent property to True (the default) automatically associates the XML button with the same broker as the one associated with the navigator.


TXMLButton.XMLUseParent
 VCL Reference

TXMLButton.XMLUseParent

TXMLButton	See also

Specifies whether the XML button is associated with its parent’s XML broker.

property XMLUseParent: Boolean;

Description

Use XMLUseParent to indicate how the XML button determines the XML broker whose data packets it manipulates. When XMLUseParent is False, the XMLBroker property must be set to indicate the XML broker. When XMLUseParent is True, the XML broker associated with the XML button’s parent determines the associated XML broker.

The XML button’s parent is the Web item (typically TDataNavigator) that uses the XML button to assemble its own HTML content. The parent’s associated broker may be defined through an indirect association. For example, the data navigator acts on another component, such as a field group, which has an associated broker.

If the parent does not have an associated XML broker, setting XMLUseParent to True sets the XMLBroker property to nil.


 VCL Reference

TXMLButton methods

TXMLButton	Alphabetically	Legend

In TXMLButton

Create

Destroy

Derived from TWebContainedComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLButton methods

TXMLButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TXMLButton.Create
 VCL Reference

TXMLButton.Create

TXMLButton	See also

Creates and initializes an instance of TXMLButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an XML button at runtime. Web buttons added at design time using the Web Page editor are instantiated automatically.


TXMLButton.Destroy
 VCL Reference

TXMLButton.Destroy

TXMLButton

Frees an instance of TXMLButton.

destructor Destroy; override;

Description

Destroy removes the XML button from its parent’s list of components that generate HTML before freeing the button instance.


Hierarchy

TObject

TPersistent

TComponent

TWebContainedComponent

TWebButton

TXMLButton


TXMLData
 VCL Reference

 TXMLData

Hierarchy	Properties	Methods	Events	See also

TXMLData manages the relationship between an XML broker and a Web item that represents a dataset in that XML broker’s data packet.

Unit

MidItems

Description

TXMLData represents the link to an XML broker for a Web item that is bound to a dataset in the XML broker’s data packet. It is the base class for TXMLDataSet, which allows the Web item to bind to a dataset field nested in the XML broker’s top-level dataset.

TXMLData does not support the ability to bind to a nested dataset field. Rather, it introduces the underlying support needed to keep track of the XML broker for components that supply this ability.


 VCL Reference

TXMLData properties

TXMLData	Alphabetically	Legend

In TXMLData

Parent

XMLBroker


 VCL Reference

TXMLData properties

TXMLData	By object	Legend

Parent

XMLBroker


TXMLData.Parent
 VCL Reference

TXMLData.Parent

TXMLData	See also

Indicates the Web item that uses this object to represent its link to an XML broker.

property Parent: TComponent;

Description

Read Parent to determine the Web item that uses this object to bind to a dataset from an XML broker. The value of Parent is set by the constructor.


TXMLData.XMLBroker
 VCL Reference

TXMLData.XMLBroker

TXMLData	See also

Specifies the XML broker that generates the dataset to which the associated Web item is bound.

property XMLBroker: TXMLBroker;

Description

The Web item specified by the Parent property sets XMLBroker to bind to an XML broker.

When the value of XMLBroker changes, the TXMLData object generates an OnChange event.


 VCL Reference

TXMLData events

TXMLData	Alphabetically	Legend

In TXMLData

OnChange


 VCL Reference

TXMLData events

TXMLData	By object	Legend

OnChange


TXMLData.OnChange
 VCL Reference

TXMLData.OnChange

TXMLData	See also

Occurs when the XMLBroker property changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to respond immediately after the Web item specified by Parent becomes bound to a different XML broker. This occurs when Parent changes the XMLBroker property explicitly in response to a change in its own properties, or when the XML broker object to which it is bound is destroyed.


 VCL Reference

TXMLData methods

TXMLData	Alphabetically	Legend

In TXMLData

Create

Notification

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXMLData methods

TXMLData	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Notification

SafeCallException


TXMLData.Create
 VCL Reference

TXMLData.Create

TXMLData	See also

Creates a new TXMLData object.

constructor Create(AParent: TComponent);

Description

Most applications do not need to call the TXMLData constructor. The Web item that uses the TXMLData object to represent its link to a dataset instantiates this object.

The AParent parameter specifies the Web item that uses the TXMLData object to link to an XML broker. This becomes the value of the Parent property.


TXMLData.Notification
 VCL Reference

TXMLData.Notification

TXMLData	See also

Responds to notifications when objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); virtual;

Description

Do not call the Notification method. It is called automatically when objects are created or destroyed. TXMLData responds to notifications by setting the XMLBroker property to nil if it is notified that this component is about to be destroyed.


Hierarchy

TObject

TXMLData


TXMLDataSet
 VCL Reference

 TXMLDataSet

Hierarchy	Properties	Methods	Events	See also

TXMLDataSet manages the relationship between a Web item and the XML dataset to which it is bound.

Unit

MidItems

Description

TXMLDataSet represents a Web item’s link to an XML dataset. The Web item can be bound to an XML broker’s data packet, or to a dataset field nested in an XML broker’s data packet.


 VCL Reference

TXMLDataSet properties

TXMLDataSet	Alphabetically	Legend

In TXMLDataSet

DataSet

DataSetField

DataSetPath

XMLBroker

Derived from TXMLDataSet

Parent


 VCL Reference

TXMLDataSet properties

TXMLDataSet	By object	Legend

DataSet

DataSetField

DataSetPath

Parent

XMLBroker


TXMLDataSet.DataSet
 VCL Reference

TXMLDataSet.DataSet

TXMLDataSet	See also

Provides access to an interface for working with the associated dataset.

property DataSet: IInetXWebDataSet;

Description

Use DataSet to manipulate the associated dataset. DataSet is an interface that provides information about the available fields and parameters of the dataset and lets you respond when this information changes.

An advantage of using the DataSet property is that it handles the task of identifying the correct dataset within the associated XML broker’s data packet. This lets you treat nested datasets in the same way that you interact with the XML broker’s main dataset.


TXMLDataSet.DataSetField
 VCL Reference

TXMLDataSet.DataSetField

TXMLDataSet	See also

Identifies a nested dataset in the associated XML broker’s data packet.

property DataSetField: string;

Description

Use DataSetField, in conjunction with the XMLBroker property, to identify the XML dataset that the TXMLDataSet object represents. If the dataset is the dataset represented directly by the XML broker’s data packet, DataSetField is an empty string and the XMLBroker property fully describes the dataset. If the dataset is a nested detail set, DataSetField indicates what detail dataset to use from the data packet associated with XMLBroker.

Specify the name of the dataset field as the value of DataSetField. If the dataset is the detail set of a detail set, you can use periods to qualify dataset field names. Thus, for example, if XMLBroker represents a customer dataset with a nested Orders dataset field that has its own nested LineItems field, you can specify the LineItems dataset by setting DataSetField to

Orders.LineItems


TXMLDataSet.DataSetPath
 VCL Reference

TXMLDataSet.DataSetPath

TXMLDataSet	See also

Represents the parsed value of the DataSetField property.

property DataSetPath: TStrings;

Description

DataSetPath is a parsed version of the DataSetField property, where each dataset field is a separate string in the TStrings object. The order of the strings indicates the level of nesting, where the first string names a dataset field in the XML broker’s data packet, the second string names a dataset field in that nested dataset, and so on.


TXMLDataSet.XMLBroker
 VCL Reference

TXMLDataSet.XMLBroker

TXMLDataSet	See also

Specifies the XML broker whose data packet includes the specified dataset.

property XMLBroker: TXMLBroker;

Description

XMLBroker identifies the XML broker that fetches an XML data packet containing the associated dataset. If the DataSetField property is an empty string, the TXMLDataSet object represents this XML broker’s data packet. Otherwise, the DataSetField property indicates which nested dataset in the XML broker’s data packet is associated with the TXMLDataSet object.

When the value of XMLBroker changes, the TXMLDataSet object generates an OnChange event.


 VCL Reference

TXMLDataSet events

TXMLDataSet	Alphabetically	Legend

Derived from TXMLData

OnChange


 VCL Reference

TXMLDataSet events

TXMLDataSet	By object	Legend

OnChange


 VCL Reference

TXMLDataSet methods

TXMLDataSet	Alphabetically	Legend

In TXMLDataSet

Create

Destroy

Derived from TXMLData

Notification

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXMLDataSet methods

TXMLDataSet	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Notification

SafeCallException


TXMLDataSet.Create
 VCL Reference

TXMLDataSet.Create

TXMLDataSet	See also

Creates a new TXMLDataSet object.

constructor Create(AParent: TComponent);

Description

Most applications do not need to call the TXMLDataSet constructor. The Web item that uses the TXMLDataSet object to represent its link to a dataset instantiates this object.

The AParent parameter specifies the Web item that uses the TXMLDataSet object to link to an XML dataset. This becomes the value of the Parent property.


TXMLDataSet.Destroy
 VCL Reference

TXMLDataSet.Destroy

TXMLDataSet	Frees the memory associated with the TXMLDataSet object.

destructor Destroy; override;

Description

Typically, applications do not free instances of TXMLDataSet. Instead, this object is freed by the Web item that uses it.

Hierarchy

TObject

TXMLData

TXMLDataSet


TXMLDocument
 VCL Reference

 TXMLDocument

Hierarchy	Properties	Methods	Events	Using TXMLDocument	See also

TXMLDocument represents an XML document.

Unit

XMLDoc

Description

Use TXMLDocument to represent an XML document. TXMLDocument can read an existing XML document from a file, it can be associated with an in-memory string that is the contents of an XML document, or it can create a new, empty XML document.

You can use TXMLDocument directly to load an XML document, read and edit it, and save any changes. You can also use TXMLDocument to access the objects generated by the XML Data Binding wizard.

TXMLDocument uses an external DOM (Document Object Model) parser to analyze the XML document. This parser is usually assigned by specifying the DOMVendor property.

When you set the Active property to True, TXMLDocument uses the DOM parser to parse the XML document so that you can examine or modify it. In particular, the DocumentElement property provides an interface to the root node of the document. You can use that interface to access its child nodes and to add or delete child nodes.

TXMLDocument implements the IXMLDocument interface. Applications obtain this interface from TXMLDocument or from the nodes in the document.

When TXMLDocument is created without an Owner, it behaves like an interfaced object. That is, when all references to its interface are released, the TXMLDocument instance is automatically freed. When TXMLDocument is created with an Owner, however, it behaves like any other component, and is freed by its Owner. When you add a TXMLDocument component from the component palette to a form or data module, it is automatically created with an Owner. When the TXMLDocument component is created using the global LoadXMLDocument function (or by a function that the XML Data Binding wizard generates to return the root node of the document), the function creates a TXMLDocument instance without an Owner.


 VCL Reference

TXMLDocument properties

TXMLDocument	Alphabetically	Legend

In TXMLDocument

Active

AsyncLoadState

ChildNodes

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Node

NodeIndentStr

NSPrefixBase

Options

ParseOptions

StandAlone

Version

XML

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

SchemaRef

Tag

VCLComObject


 VCL Reference

TXMLDocument properties

TXMLDocument	By object	Legend

Active

AsyncLoadState

ChildNodes

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DocumentElement

DOMDocument

DOMImplementation

DOMVendor

Encoding

FileName

Modified

Name

Node

NodeIndentStr

NSPrefixBase

Options

Owner

ParseOptions

SchemaRef

StandAlone

Tag

VCLComObject

Version

XML


TXMLDocument.Active
 VCL Reference

TXMLDocument.Active

TXMLDocument	See also

Specifies whether the XML document has been parsed so that the DOM interfaces are available to examine or change its contents.

property Active: Boolean;

Description

Before you can use TXMLDocument to examine or change the contents of an XML document, it must be active. Setting Active to True causes TXMLDocument to do the following:

1.	Generate a BeforeOpen event.

2.	If necessary, load the DOM parser and assign the DOMImplementation property.

3.	Parse the XML document specified by FileName or, if FileName is an empty string, by the XML property using the options specified by ParseOptions. If both FileName and XML are empty strings, TXMLDocument creates an empty document. The interface for the parsed document is assigned to the DOMDocument property.

4. Generate an AfterOpen event.

Note:	Once the DOMDocument property is assigned, you can also use the DocumentElement property.

Setting Active to False causes TXMLDocument to do the following:

1.	Generate a BeforeClose event.

2.	Release all of the DOM interfaces, such as DOMDocument and DocumentElement, that represent the parsed XML document.

3. Generate an AfterClose event.


TXMLDocument.AsyncLoadState
 VCL Reference

TXMLDocument.AsyncLoadState

TXMLDocument	See also

Indicates the state of the DOM parser when it parses the XML document asynchronously.

property AsyncLoadState: Integer;

Description

Use AsyncLoadState to determine that status of the DOM parser when it is parsing an XML document asynchronously. AsyncLoadState is only meaningful when the value of ParseOptions is poAsyncLoad.

The value of AsyncLoadState is vendor-specific. That is, each DOM parser that loads and parses an XML document asynchronously supplies its own flags to indicate state information.

When the DOM vendor is MSXML, AsyncLoadState can have any of the following values:

Value	Meaning

0	Uninitialized: The AsyncLoadState is not assigned. (Usually indicates that the parser has not tried to parse a document or it is not parsing the document asynchronously.)

1	Loading: The parser is currently parsing the structure of the XML document.

2	Loaded: The parser has finished reading and parsing the structure of the XML document, but the corresponding DOM interfaces are not yet available.

3	Interactive: The parser has parsed the structure of the XML document, the corresponding DOM interfaces are available, but the parser has not finished reading all the node values.

4	Complete: The parser has fully read and parsed the XML document.


TXMLDocument.ChildNodes
 VCL Reference

TXMLDocument.ChildNodes

TXMLDocument	See also

Lists all of the child nodes of the document.

property ChildNodes: IXMLNodeList;

Description

Use ChildNodes to access all of the nodes that are children of the document object. In addition to DocumentElement, which is the root of the data hierarchy, ChildNodes can include nodes for comments, processing instructions, and so on.

Note:	ChildNodes is not available unless the XML document is Active.


TXMLDocument.DocumentElement
 VCL Reference

TXMLDocument.DocumentElement

TXMLDocument	See also

Provides access to the root node of the XML document.

property DocumentElement: IXMLNode;

Description

Use DocumentElement to access the root node of the XML document. Because XML documents are hierarchical in structure, DocumentElement is the entry point to all data in the XML document. Setting DocumentElement replaces the entire data hierarchy with a new hierarchy of nodes.

Note:	For some DOM implementations, if you set DocumentElement, all of the new nodes must already be associated with this document. That is, the new value should be a node that came from the existing node hierarchy or that was created using the CreateNode method.

The IXMLNode interface includes properties and methods for examining and changing the text and attributes of a node, for adding and deleting child nodes, and for traversing the hierarchy of nodes rooted at that node.

Note:	DocumentElement is not available unless the XML document is Active.


TXMLDocument.DOMDocument
 VCL Reference

TXMLDocument.DOMDocument

TXMLDocument	See also

Provides access to the DOM interface for the parsed XML document.

property DOMDocument: IDOMDocument;

Description

Use DOMDocument to directly access the IDOMDocument interface for the parsed XML document. This is the interface supported by the DOM parser for the document that is represented in raw (unparsed) form by the FileName or XML property.

DOMDocument provides access to the IDOMImplementation and IDOMElement interfaces that are surfaced as the DOMImplementation and DocumentElement properties. It also provides access to an IDOMDocumentType interface that describes the structure of the XML document, and supports a number of methods for creating elements within the document.

Most applications do not need to use the DOMDocument property directly. Instead, it supplies the underlying support for parsing and manipulating the nodes accessed through DocumentElement. If you do want to make use of DOMDocument’s low-level support, you must be familiar with the W3C Document Object Model (DOM) Level 1 Specification.

Note:	DOMDocument is not available unless the XML document is Active.


TXMLDocument.DOMImplementation
 VCL Reference

TXMLDocument.DOMImplementation

TXMLDocument	See also

Provides access to the DOM interface for document-independent functions.

property DOMImplementation: IDOMImplemenation;

Description

Use DOMImplementation to directly access the IDOMImplemenation interface identified by the DOMVendor property. This is the interface TXMLDocument uses to generate the IDOMDocument interface that is the value of DOMDocument.

Typically, the value of DOMImplementation is obtained automatically, based on the value of the DOMVendor property. You can, however, assign the DOMImplementation property directly to an IDOMImplementation interface that you have obtained through some other mechanism.

Most applications do not need to use the DOMImplementation property directly. If you do want to make use of DOMImplementation’s low-level support, you must be familiar with the W3C Document Object Model (DOM) Level 2 Specification.

You must assign a value to either DOMVendor or DOMImplementation before you can set the Active property to True.


TXMLDocument.DOMVendor
 VCL Reference

TXMLDocument.DOMVendor

TXMLDocument	See also

Specifies the DOM implementation to use for parsing and manipulating the XML document.

property DOMVendor: TDOMVendor;

Description

DOMVendor is the object that represents a registered DOM implementation. TXMLDocument uses this object to obtain an IDOMImplementation interface, which it can use to access all the other DOM interfaces needed for parsing and manipulating the XML document. Once DOMVendor is assigned, TXMLDocument obtains the IDOMImplementation interface (when needed) and assigns it to the DOMImplementation property.

DOMVendor must be registered before it can be used to obtain an IDOMImplementation interface. For a list of all the currently registered DOM implementations, use the global DOMVendors variable. To obtain a specific DOM implementation, given its description, use the global GetDOMVendor function. Use the RegisterDOMVendor procedure to register a new DOM implementation.

You must assign a value to either DOMVendor or DOMImplementation before you can set the Active property to True.


TXMLDocument.Encoding
 VCL Reference

TXMLDocument.Encoding

TXMLDocument	See also

Indicates the character set that the XML document uses to encode characters.

property Encoding: DOMString;

Description

Encoding is the encoding name that appears in the document type declaration of the XML document. It is a string such as ‘UTF-8’, ‘UTF-16’, or ‘ISO-10646-UCS-2’ that indicates the character set used in the document.


TXMLDocument.FileName
 VCL Reference

TXMLDocument.FileName

TXMLDocument	See also

Specifies the file name for the XML document associated with this TXMLDocument object.

property FileName: DOMString;

Description

Set FileName to specify the XML document you want to examine or manipulate using the TXMLDocument object. Once you have set FileName to the name of an XML document, you can activate the XML document and examine or manipulate it using the DocumentElement property.

When you set the value of FileName, the XML property automatically changes (at runtime) to represent the contents of that file.

Note:	Setting the value of FileName automatically sets the Active property to False.

After activating the XML document, any changes you make to the document are not saved back to disk until you call the SaveToFile method.

Tip:	If the underlying DOM implementation supports it, you can use FileName to specify an URL rather than a file on disk.


TXMLDocument.Modified
 VCL Reference

TXMLDocument.Modified

TXMLDocument	See also

Indicates whether the XML document has been modified.

property Modified: Boolean;

Description

Read Modified to determine whether the application has made any changes to the nodes in the XML document. When Modified is True, the value of the XML property may differ from the contents of the file specified by FileName. You can call the SaveToFile method to update the XML document file to reflect the changes.

Note:	Modfied changes to False when you call the Refresh or SaveToFile method.


TXMLDocument.Node
 VCL Reference

TXMLDocument.Node

TXMLDocument	See also

Provides access to the document node for the XML document.

property Node: IXMLNode;

Description

Read Node to access the document node for the XML document. The document node represents information about the entire document. It may have several child nodes, which represent comments, processing instructions, and which include the DocumentElement node that acts as the root of the data hierarchy.


TXMLDocument.NodeIndentStr
 VCL Reference

TXMLDocument.NodeIndentStr

TXMLDocument	See also

Indicates the string that is inserted before nested nodes in the formatted XML text.

property NodeIndentStr: DOMString;

Description

Use NodeIndentStr to customize how TXMLDocument formats nodes that are added. When the Options property includes doNodeAutoIndent, this string is inserted in the generated XML before any newly added node, once for each nesting level.

If you do not assign a value to NodeIndentStr, TXMLDocument inserts two spaces to represent each nesting level.


TXMLDocument.NSPrefixBase
 VCL Reference

TXMLDocument.NSPrefixBase

TXMLDocument	See also

Specifies the base string for automatically-generated namespace prefixes.

property NSPrefixBase: DOMString;

Description

The AddChild method for each node allows the caller to specify that the new node should use an automatically-generated namespace prefix. When this option is specified, the node uses NSPrefixBase to generate a unique string to act as a namespace prefix. This unique string consists of NSPrefixBase followed by a number that ensures uniqueness. Thus, for example, if NSPrefixBase is ‘NS’, automatically-generated namespace prefixes have the form ‘NS1’, ‘NS2’, and so on.

The generated namespace prefixes are only unique within a single document. If two document components have the same value for NSPrefixBase, they will generate the same namespace prefixes.


TXMLDocument.Options
 VCL Reference

TXMLDocument.Options

TXMLDocument	See also

Influences various aspects of the document’s behavior.

property Options: TXMLDocOptions;

Description

Set Options to configure how you want the document to respond when the application tries to read nodes or attributes that do not exist, when it creates a new namespace when adding a node, when it generates XML text from the nodes in the document, or whether it saves its value automatically when you close the document. Options can include any of the following values:

Value	Meaning

doNodeAutoCreate	If the application tries to read a node by name, using the Nodes property of an IXMLNodeList interface, and that node does not exist, then the application creates a new node using the specified name.

doNodeAutoIndent	When formatting the XML text from the parsed set of nodes, child nodes are automatically indented from their parent nodes.

doAttrNull	When reading the value of an attribute that does not exist, the value is given as a Null Variant (as opposed to a value of an empty string).

doAutoPrefix	When generating the name of a new node, the value is automatically given a namespace prefix if a namespace URI is supplied.

doNamespaceDecl	When the AddChild method must create a new namespace for the node, it also adds a namespace attribute to declare that new namespace. If doNamespaceDecl is not included, AddChild creates the new namespace but does not add an attribute to declare it.

doAutoSave	When you close the document (set Active to False), any changes are automatically saved back to the file specified by FileName or to the XML property.


TXMLDocument.ParseOptions
 VCL Reference

TXMLDocument.ParseOptions

TXMLDocument	See also

Specifies implementation-specific options that are followed when parsing the XML document.

property ParseOptions: TParseOptions;

Description

Set ParseOptions to influence the way the DOM implementation parses the XML document. Different DOM implementations support different options. If you attempt to use an option that is not supported by your DOM implementation, TXMLDocument raises an EXMLDocError exception.


TXMLDocument.SchemaRef
 VCL Reference

TXMLDocument.SchemaRef

TXMLDocument	See also

Returns the name of the schema associated with this XML document.

property SchemaRef: DOMString;

Description

Read SchemaRef to determine the schema associated with this XML document. If the document does not have an attribute that identifies an associated schema, the value of SchemaRef is an empty string.


TXMLDocument.StandAlone
 VCL Reference

TXMLDocument.StandAlone

TXMLDocument	See also

Indicates whether the XML document includes any external markup declarations.

property StandAlone: DOMString;

Description

StandAlone is the value of the standalone attribute on the document type declaration of the XML document. StandAlone has a value of ‘yes’ or ‘no’.

When StandAlone is ‘yes’, the document contains no external markup declarations. It may, however, still contain references to external entities, as long as they are not declarations.

When StandAlone is ‘no’, the document may or may not contain external markup declarations.


TXMLDocument.Version
 VCL Reference

TXMLDocument.Version

TXMLDocument	See also

Indicates the XML version that the document uses.

property Version: DOMString;

Description

Version indicates the XML version number that the document uses. An XML version number is a string of the form ‘n.m’, where n is the major version number and m is the minor version number.


TXMLDocument.XML
 VCL Reference

TXMLDocument.XML

TXMLDocument	See also

Specifies the content of the XML document associated with this TXMLDocument object.

property XML: TStrings;

Description

Read XML to obtain the contents of the associated XML document. Set XML to specify the XML document you want to examine or manipulate. Once XML is set, you can activate the XML document and examine or manipulate it using the DocumentElement property.

XML is a TStrings object. This means you can supply a value using the Strings editor at design time, or manipulate the XML line by line at runtime. To read or write the XML in the document as a single string, use the LoadFromXML or SaveToXML method.


 VCL Reference

TXMLDocument events

TXMLDocument	Alphabetically	Legend

In TXMLDocument

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


 VCL Reference

TXMLDocument events

TXMLDocument	By object	Legend

AfterClose

AfterNodeChange

AfterOpen

BeforeClose

BeforeNodeChange

BeforeOpen

OnAsyncLoad


TXMLDocument.AfterClose
 VCL Reference

TXMLDocument.AfterClose

TXMLDocument	See also

Occurs after the XML document is closed.

property AfterClose: TNotifyEvent;

Description

Write an AfterClose event handler to take specific action after the XML document interfaces are released. For example, you can use an AfterClose event to update your user interface to indicate that the XML document is no longer available.

AfterClose is the last event to occur when the Active property is set to False.


TXMLDocument.AfterNodeChange
 VCL Reference

TXMLDocument.AfterNodeChange

TXMLDocument	See also

Occurs after a change is made to one of the nodes in the document.

property AfterNodeChange: TNodeChangeEvent;

Description

Write an AfterNodeChange event handler to take specific action after a change is made to a node in the XML document. When an application makes a change to one of the nodes, the following steps occur:

1. The Modified property is set to True.

2. A BeforeNodeChange event occurs.

3. The change is made to the node.

4. An AfterNodeChange event occurs.


TXMLDocument.AfterOpen
 VCL Reference

TXMLDocument.AfterOpen

TXMLDocument	See also

Occurs immediately after the XML document is opened.

property AfterOpen: TNotifyEvent;

Description

Write an AfterOpen event handler to take specific action once the XML document interfaces become available. For example, you can use an AfterOpen event to update your user interface to reflect the structure of the XML document once it is opened.

AfterOpen is the last event to occur when the Active property is set to True.


TXMLDocument.BeforeClose
 VCL Reference

TXMLDocument.BeforeClose

TXMLDocument	See also

Occurs immediately before the XML document is closed.

property BeforeClose: TNotifyEvent;

Description

Write a BeforeClose event handler to take specific action before the XML document interfaces are released. For example, you can use an BeforeClose event to cache information about the XML document before it becomes unavailable.

BeforeClose is the first event to occur when the Active property is set to False.


TXMLDocument.BeforeNodeChange
 VCL Reference

TXMLDocument.BeforeNodeChange

TXMLDocument	See also

Occurs before a change is made to one of the nodes in the document.

property BeforeNodeChange: TNodeChangeEvent;

Description

Write a BeforeNodeChange event handler to take specific action before a change is made to a node in the XML document. When an application makes a change to one of the nodes, the following steps occur:

1. The Modified property is set to True.

2. A BeforeNodeChange event occurs.

3. The change is made to the node.

4. An BeforeNodeChange event occurs.


TXMLDocument.BeforeOpen
 VCL Reference

TXMLDocument.BeforeOpen

TXMLDocument	See also

Occurs immediately before the XML document is opened.

property BeforeOpen: TNotifyEvent;

Description

Write a BeforeOpen event handler to take specific action before the XML document interfaces become available. For example, you can use a BeforeOpen event to provide feedback to the user that the XML document is being parsed (which can be cleared in an AfterOpen event handler).

BeforeOpen is the first event to occur when the Active property is set to True.


TXMLDocument.OnAsyncLoad
 VCL Reference

TXMLDocument.OnAsyncLoad

TXMLDocument	See also

Occurs at various stages during the asynchronous parsing of an XML document.

property OnAsyncLoad: TAsyncEventHandler;

Description

Write a OnAsyncLoad event handler to respond appropriately during the asynchronous parsing of an XML document. For example, OnAsyncLoad can update a progress indicator, or initiate operations that can’t be performed until the document is fully parsed. OnAsyncLoad occurs every time the AsyncLoadState property changes to reflect a new stage in the parsing process.


 VCL Reference

TXMLDocument methods

TXMLDocument	Alphabetically	Legend

In TXMLDocument

AddChild

Create

CreateElement

CreateNode

Destroy

GeneratePrefix

GetDocBinding

IsEmptyDoc

LoadFromFile

LoadFromStream

LoadFromXML

Refresh

RegisterDocBinding

Resync

SaveToFile

SaveToStream

SaveToXML

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLDocument methods

TXMLDocument	By object	Legend

AddChild

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateElement

CreateNode

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GeneratePrefix

GetDocBinding

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsEmptyDoc

IsImplementorOf

LoadFromFile

LoadFromStream

LoadFromXML

MethodAddress

MethodName

NewInstance

ReferenceInterface

Refresh

RegisterDocBinding

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SaveToFile

SaveToStream

SaveToXML

SetSubComponent

UpdateAction


TXMLDocument.AddChild
 VCL Reference

TXMLDocument.AddChild

TXMLDocument	See also

Creates and adds a node to the child nodes of this document.

function AddChild(const TagName: DOMString; const NamespaceURI: DOMString): IXMLNode; overload;

function AddChild(const TagName: DOMString): IXMLNode; overload;

Description

Call AddChild to add a new child element node to the document itself. The new node is added to the end of the list maintained by the ChildNodes property.

TagName is the tag name for the new element node.

NamespaceURI identifies the namespace, if any, that includes the new node’s definition.

AddChild returns the interface for the newly created node.

Note:	Do not call AddChild to add a child to the document element of this document. When adding data to the XML document, use the AddChild method of the document element or of the node in the hierarchy that should be the parent of the new node.


TXMLDocument.Create
 VCL Reference

TXMLDocument.Create

TXMLDocument	See also

Instantiates a TXMLDocument object.

constructor Create(const AFileName: DomString); reintroduce; overload;

Description

Call Create to instantiate a TXMLDocument component at runtime. You do not need to explicitly create TXMLDocument components that are added to forms or data modules at design time: they are created automatically.

AFileName specifies the file that the new TXMLDocument instance represents.

TXMLDocument components that are created at runtime are freed automatically when all references to their IXMLDocument interface are released. This differs from TXMLDocument components added to a form or data module at design time. When added to a form or data module at design time, the object is explicitly freed by its Owner (the form or data module).


TXMLDocument.CreateElement
 VCL Reference

TXMLDocument.CreateElement

TXMLDocument	See also

Creates a new element node that is associated with this document.

function CreateElement(const TagOrData, NamespaceURI: DOMString): IXMLNode;

Description

Call CreateElement to create a new generic element node. The resulting node does not have a parent, but can be added to the ChildNodes list of any node in the document (including this document’s ChildNodes property). It can also be assigned to the DocumentElement property to replace the entire data hierarchy of this document.

TagOrData provides the tag name of the newly created node.

NamespaceURI identifies the namespace that includes the new node’s definition.

CreateElement returns the interface for the new node.

Note:	To add a node as the child of another node in this document, it is simpler to call that node’s AddChild method.


TXMLDocument.CreateNode
 VCL Reference

TXMLDocument.CreateNode

TXMLDocument	See also

Creates a new node that is associated with this document.

function CreateNode(const NameOrData: DOMString; NodeType: TNodeType = ntElement; const AddlData: DOMString = ''): IXMLNode;

Description

Call CreateNode to create a new generic XML node. The resulting node does not have a parent, but can be added to the ChildNodes or AttributeNodes list of any node in the document (including this document’s ChildNodes property). It can also be assigned to the DocumentElement property to replace the entire data hierarchy of this document.

NameOrData provides the tag name or value of the newly created node. Its interpretation depends on the type of node created, as indicated in the following table:

NodeType	NameOrData

ntElement	The tag name.

ntAttribute	The attribute name.

ntText	The value of the node.

ntCData	The value of the CDATA section.

ntEntityRef	The name of the referenced entity.

ntProcessingInstr	The target of the processing instruction.

ntComment	The value (text) of the comment.

ntDocFragment	Not used.

NodeType indicates the type of node to create. It can only be one of the types listed in the previous table.

The meaning of AddlData depends on the node type, as indicated in the following table:

NodeType	AddlData

ntElement	The namespace URI that qualifies the tag name.

ntAttribute	The namespace URI that qualifies the attribute name.

ntProcessingInstr	The content of the processing instruction, except for the target.

CreateNode returns the interface for the new node.

Note:	To add a node as the child of another node in this document, it is simpler to call that node’s AddChild method.


TXMLDocument.Destroy
 VCL Reference

TXMLDocument.Destroy

TXMLDocument	See also

Disposes of a TXMLDocument object.

destructor Destroy; override;

Description

It is not necessary to explicitly free a TXMLDocument component. If the component is created with an Owner, that Owner handles the task of freeing the document. If the component is created without an Owner, it is freed automatically when the reference count on its IXMLDocument interface drops to zero.


TXMLDocument.GeneratePrefix
 VCL Reference

TXMLDocument.GeneratePrefix

TXMLDocument	See also

Generates a unique namespace prefix that can be used for a node in the document.

function GeneratePrefix(const Node: IXMLNode): DomString;

Description

Call GeneratePrefix to generate a new namespace prefix that is not already used in the document to represent a namespace URI. GeneratePrefix uses the NSPrefixBase property to generate a unique string to act as a namespace prefix. This unique string consists of NSPrefixBase followed by a number that ensures uniqueness. Thus, for example, if NSPrefixBase is ‘NS’, automatically-generated namespace prefixes have the form ‘NS1’, ‘NS2’, and so on.

Node is the interface for the node which will use the newly-generated namespace prefix.

The generated namespace prefixes are only unique within a single document. If two document components have the same value for NSPrefixBase, they will generate the same namespace prefixes.


TXMLDocument.GetDocBinding
 VCL Reference

TXMLDocument.GetDocBinding

TXMLDocument	See also

Replaces the document element with an instance of a specified implementation class.

function GetDocBinding(const TagName: DOMString; DocNodeClass: TClass; NamespaceURI: DOMString = ''): IXMLNode;

Description

Call GetDocBinding to specify the implementation class and tag name for the document element. After replacing the specified node with an instance of the specified class, GetDocBinding returns the interface of the document element.

TagName is the tag name of the child node to be replaced. Typically, this identifies the document element.

DocNodeClass is the implementation class to use for all child nodes with the specified tag name.

NamespaceURI is the URI of the namespace in which TagName is defined.


TXMLDocument.IsEmptyDoc
 VCL Reference

TXMLDocument.IsEmptyDoc

TXMLDocument	See also

Indicates whether the TXMLDocument instance represents an empty document.

function IsEmptyDoc: Boolean;

Description

Call IsEmptyDoc to determine whether the TXMLDocument instance represents an empty document. IsEmptyDoc returns True if the DOMDocument property is not set (for example, if there is no DOM implementation) or if this object represents a document with no child nodes.


TXMLDocument.LoadFromFile
 VCL Reference

TXMLDocument.LoadFromFile

TXMLDocument	See also

Loads an XML document and activates it.

procedure LoadFromFile(AFileName: DOMString = '');

Description

Call LoadFromFile to load the XML document specified by AFileName and set the Active property to True so that you can examine or modify the document.

AFileName is the name of the XML document to load from disk. If AFileName is an empty string, TXMLDocument uses the value of the FileName property. If AFileName is not an empty string, TXMLDocument changes the FileName property to AFileName.

Once you have loaded an XML document, any changes you make to the document are not saved back to disk until you call the SaveToFile method.


TXMLDocument.LoadFromStream
 VCL Reference

TXMLDocument.LoadFromStream

TXMLDocument	See also

Loads an XML document from a stream and activates it.

procedure LoadFromStream(const Stream: TStream; EncodingType: TXMLEncodingType = xetUnknown);

Description

Call LoadFromStream to load the XML document from a stream.

Stream is a stream object that can be used to read the string of XML that makes up the document.

EncodingType indicates the character set that is used for Stream. If EncodingType is xetUnknown (the default), LoadFromStream attempts to infer the encoding type from the XML encoding declaration at the beginning of the document.

After loading the document from Stream, LoadFromStream sets the Active property to True.


TXMLDocument.LoadFromXML
 VCL Reference

TXMLDocument.LoadFromXML

TXMLDocument	See also

Loads a string representation of an XML document and activates it.

procedure LoadFromXML(const XML: string); overload;

procedure LoadFromXML(const XML: DOMString); overload;

Description

Call LoadFromXML to assign a string as the value of the XML document. Unlike the XML property, which lets you assign XML on a line-by-line basis, LoadFromXML treats the text of the XML document as a whole.

The XML parameter is a string containing the text of an XML document. It should represent the XML text encoded using UTF-8, Unicode, or UTF-16.

After assigning the XML property as the contents of the document, LoadFromXML sets the Active property to True.


TXMLDocument.Refresh
 VCL Reference

TXMLDocument.Refresh

TXMLDocument	See also

Updates the parsed XML document to reflect external changes.

procedure Refresh;

Description

Call Refresh when the XML document specified by FileName has changed due to an external cause. Refresh updates the parsed version of the XML document (which can be traversed starting with DocumentElement) to reflect the current contents of the file specified by FileName.

The Active property must be True when you call Refresh. If the XML document is not active when you call Refresh, TXMLDocument raises an EXMLDocError exception.

Note:	Do not call Refresh after making changes directly to the XML property, because assigning a value to XML automatically closes the XML document. To refresh the XML document after assigning a new value to XML, set the Active property to True.


TXMLDocument.RegisterDocBinding
 VCL Reference

TXMLDocument.RegisterDocBinding

TXMLDocument	See also

Registers an implementation class for child nodes with a specified tag name.

procedure RegisterDocBinding(const TagName: DOMString; DocNodeClass: TClass; NamespaceURI: DOMString = '');

Description

Call RegisterDocBinding to specify the implementation class for one of the child nodes of the document node. RegisterDocBinding replaces the specified node with an instance of the specified class.

TagName is the tag name of the child node to be replaced. Typically, this identifies the document element.

DocNodeClass is the implementation class to use for all child nodes with the specified tag name.

NamespaceURI is the URI of the namespace in which TagName is defined.


TXMLDocument.Resync
 VCL Reference

TXMLDocument.Resync

TXMLDocument	See also

Forces all child nodes and attribute nodes to be reread from the underlying DOM implementation.

procedure Resync;

Description

Resync forces the document to reread the values of its child nodes and attribute nodes, discarding any changes that have not been propagated to the underlying DOM implementation.


TXMLDocument.SaveToFile
 VCL Reference

TXMLDocument.SaveToFile

TXMLDocument	See also

Saves the XML document to disk.

procedure SaveToFile(AFileName: DOMString = ''); dynamic;

Description

Call SaveToFile to save any modifications you have made to the parsed XML document.

AFileName is the name of the file to save. If AFileName is an empty string, TXMLDocument uses the value of the FileName property.


TXMLDocument.SaveToStream
 VCL Reference

TXMLDocument.SaveToStream

TXMLDocument	See also

Saves the XML document to a stream.

procedure SaveToStream(const Stream: TStream);

Description

Call SaveToStream to save the contents of the XML document to the stream specified by Stream. Regardless of the encoding system of the original XML document, SaveToStream always saves the stream in UTF-16.


TXMLDocument.SaveToXML
 VCL Reference

TXMLDocument.SaveToXML

TXMLDocument	See also

Saves the XML document to a string-type variable.

procedure SaveToXML(var XML: string); overload;

procedure SaveToXML(var XML: DomString); overload;

Description

Call SaveToXML to save the contents of the XML document to the string-type variable specified by XML. SaveToXML writes the contents of XML document using UTF-8 or UTF-16 as an encoding system, depending on the type of the XML parameter.

Unlike the XML property, which lets you write individual lines from the XML document, SaveToXML writes the entire text of the XML document.


Hierarchy

TObject

TPersistent

TComponent

TXMLDocument


TXMLDisplayReferenceGroup
 VCL Reference

TXMLDisplayReferenceGroup

Hierarchy	Properties	Methods	See also

TXMLDisplayReferenceGroup is the base class for Web items that arrange a set of button controls that influence a control that displays data.

Unit

MidItems

Description

Use TXMLDisplayReferenceGroup as a base class for Web items that generate the HTML to arrange a collection of button controls. Each TXMLDisplayGroup object has an associated Web item that generates controls that display data in the final HTML document. The buttons arranged by TXMLDisplayReferenceGroup manipulate the information the display controls show.

In order to let other Web items use the HTML that the TXMLDisplayReferenceGroup object generates, TXMLDisplayReferenceGroup inherits the IWebContent interface from TWebControlGroup.

Do not create instances of TXMLDisplayReferenceGroup. TXMLDisplayReferenceGroup manages the Web items that generate buttons and the association to a display generator, but does not produce any content. Instead, use a descendant of TXMLDisplayReferenceGroup that generates the HTML for its set of specialized buttons such as TDataNavigator or TQueryButtons.


 VCL Reference

TXMLDisplayReferenceGroup properties

TXMLDisplayReferenceGroup	Alphabetically	Legend

In TXMLDisplayReferenceGroup

XMLComponent

Derived from TWebControlGroup

WebFieldControls

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLDisplayReferenceGroup properties

TXMLDisplayReferenceGroup	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WebFieldControls

XMLComponent


TXMLDisplayReferenceGroup.XMLComponent
 VCL Reference

TXMLDisplayReferenceGroup.XMLComponent

TXMLDisplayReferenceGroup	See also

Associates the group with a component that generates HTML display controls.

property XMLComponent: TComponent;

Description

Use XMLComponent to associate the group of buttons with a Web item that generates the display controls those buttons influence. Typical values of XMLComponent are TFieldGroup or TDataGrid.

If all the buttons arranged by the TXMLDisplayReferenceGroup object operate on the same set of display controls, it is most efficient to specify the Web item generating these controls as the value of XMLComponent. Then, each button uses this value to determine its associated display controls when its XMLUseParent property is True. Any buttons that do not operate on the display controls generated by XMLComponent can set their own XMLComponent property to another Web item.


 VCL Reference

TXMLDisplayReferenceGroup methods

TXMLDisplayReferenceGroup	Alphabetically	Legend

Derived from TWebDisplayReferenceGroup

Create

Destroy

Derived from TWebContainedContainerComponent

GetParentComponent

HasParent

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLDisplayReferenceGroup methods

TXMLDisplayReferenceGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TWebContainedContainerComponent

TWebControlGroup

TWebDisplayReferenceGroup

TXMLDisplayReferenceGroup


TXMLNodeCollection
 VCL Reference

TXMLNodeCollection

Hierarchy	Properties	Methods	See also

TXMLNodeCollection represents a node in an XML document whose children are instances of the same repeating element.

Unit

XMLDoc

Description

The XML Data Binding Wizard uses TXMLNodeCollection as a base class for the classes it generates to represent nodes that have repeating elements for child nodes. For example, if the XML document includes the following:

<students>

  <student name="John Smith">

    <grade>incomplete</grade>

  </student>

  <student name="Jane Doe">

    <grade>B+</grade>

  </student>

  <auditor name="Bill Jones"></auditor>

</students>

then the XML Data Binding Wizard generates 3 nodes to represent the <students> node: a TXMLNode descendant to represent the entire <students> node, and two TXMLNodeCollection descendants to represent the repeating elements: one for the child nodes with the tag <student>, and one for the child nodes with the tag <auditor>.

As with any of the classes the Data Binding Wizard generates to represent nodes in an XML document, child nodes and node attributes appear as properties of the TXMLNodeCollection descendant.

TXMLNodeCollection implements the IXMLNodeCollection interface. Each TXMLNodeCollection descendant implements a class-specific interface that descends from IXMLNodeCollection. Typically, applications do not work directly with TXMLNodeCollection. Instead, they use the IXMLNodeCollection interface or the IXMLNodeCollection descendant that is implemented by a TXMLNodeCollection descendant.


 VCL Reference

TXMLNodeCollection properties

TXMLNodeCollection	Alphabetically 	Legend

In TXMLNodeCollection

Count

ItemInterface

ItemNS

ItemTag

List

Derived from TInterfacedObject

RefCount


 VCL Reference

TXMLNodeCollection properties

TXMLNodeCollection	By object 	Legend

Count

ItemInterface

ItemNS

ItemTag

List

RefCount


TXMLNodeCollection.Count
 VCL Reference

TXMLNodeCollection.Count

TXMLNodeCollection 	See also

Indicates the number of repeating child nodes.

property Count: Integer;

Description

Use the IXMLNodeCollection interface to read this protected property. Count is the number of child nodes for this node that are repetitions of the repeating child node type. That is, Count is the number of nodes in the List property.

Use Count to obtain an upper limit when addressing child nodes by index (for example, when iterating over all nodes in using the GetNode method).

Count is changed when you add child nodes using the AddChild method or delete them using the Delete or Remove method. You can access the individual repeating child nodes using the GetNode method.


TXMLNodeCollection.ItemInterface
 VCL Reference

TXMLNodeCollection.ItemInterface

TXMLNodeCollection 	See also

Indicates the interface type for the repeating child nodes.

property ItemInterface: TGuid;

Description

Applications can’t use this protected property. It is used internally to identify the interface for all child nodes that represent the repeating child element.

ItemInterface is the GUID for the default interface of the class that implements the nodes in the collection.


TXMLNodeCollection.ItemNS
 VCL Reference

TXMLNodeCollection.ItemNS

TXMLNodeCollection 	See also

Indicates the default namespace URI for the tag names of repeating child elements.

property ItemNS: DOMString;

Description

Applications can’t use this protected property. It is used internally to identify the namespace used to interpret tag names on members of this node collection.


TXMLNodeCollection.ItemTag
 VCL Reference

TXMLNodeCollection.ItemTag

TXMLNodeCollection 	See also

Indicates the tag name that occurs on the repeating child elements.

property ItemTag: OleVariant;

Description

Applications can’t use this protected property. It is used internally to identify the tag name that appears on members of this node collection.

ItemTag is interpreted in the context of the namespace specified by the ItemNS property.


TXMLNodeCollection.List
 VCL Reference

TXMLNodeCollection.List

TXMLNodeCollection	See also

Lists the interfaces for the children that are repeated elements.

property List: IXMLNodeList;

Description

Applications can’t use the protected List property. TXMLNodeCollection uses this property internally to identify those child nodes that are repeated elements. Because TXMLNodeCollection can correspond to a node in the XML document that has additional children that are not instances of the repeating node type, List is kept separate from the ChildNodes property, which lists all child nodes.

Applications that need to access the child nodes in this list should use the Nodes property of the IXMLNodeCollection interface for this node or the Items property of an IXMLNodeCollection descendant that is generated by the XML Data Binding wizard.


 VCL Reference

TXMLNodeCollection methods

TXMLNodeCollection	Alphabetically	Legend

In TXMLNodeCollection

AddItem

AfterConstruction

ChildListNotify

Clear

CreateItemList

Delete

GetCount

GetList

GetNode

InsertInCollection

IsCollectionItem

Remove

SetChildNodes

UpdateCollectionList

Derived from TXMLNode

Create

Derived from TInterfacedObject

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TXMLNodeCollection methods

TXMLNodeCollection	By object	Legend

AddItem

AfterConstruction

BeforeDestruction

ChildListNotify

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateItemList

DefaultHandler

Delete

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetList

GetNode

InheritsFrom

InitInstance

InsertInCollection

InstanceSize

IsCollectionItem

MethodAddress

MethodName

NewInstance

Remove

SafeCallException

SetChildNodes

UpdateCollectionList


TXMLNodeCollection.AddItem
 VCL Reference

TXMLNodeCollection.AddItem

TXMLNodeCollection	See also

Adds a new repetition of the repeating child element to this node.

function AddItem(Index: Integer): IXMLNode; virtual;

Description

Applications can’t call the protected AddItem method. It is used internally to create a new child node for this node that is an instance of the repeating element. The new child node is given the first tag name listed by the ItemTag property.

Index indicates the position of the new child node in this node’s list of children, where 0 is the first position, 1 is the second position, and so on. If Index is –1, the new node is added to the end.

Note:	Index refers to the list of repeating elements (the List property), not the list of all children (the ChildNodes property).

AddItem returns the interface for the newly created child node.


TXMLNodeCollection.AfterConstruction
 VCL Reference

TXMLNodeCollection.AfterConstruction

TXMLNodeCollection	See also

Initializes the node collection object once it is fully created.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.

AfterConstruction sets the UpdateCollectionList method as the event handler for the collection’s OnHostChildNotify event. This allows the collection to update itself when the list of child nodes (for which this collection manages a subset) changes.


TXMLNodeCollection.ChildListNotify
 VCL Reference

TXMLNodeCollection.ChildListNotify

TXMLNodeCollection	See also

Responds to notifications of changes in the list of child nodes.

procedure ChildListNotify(Operation: TNodeListOperation; var Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean); virtual;

Description

Applications can’t call this protected method. The class that implements the ChildNodes property calls ChildListNotify when child nodes are inserted, removed, or need to be created. ChildListNotify calls the inherited method to generate a BeforeNodeChange or AfterNodeChange event and to ensure that the DOM implementation for this node reflects the change. After calling the inherited method, ChildListNotify updates the List property so that it stays in sync with the ChildNodes property.

Operation indicates what type of change is about to occur.

Node is the interface for the child node that is added or removed. If Operation is nlCreateNode, Node returns a newly created child node.

IndexOrName is the index of the node that is added or removed when Operation is nlInsert or nlRemove. When Operation is nlCreateNode, IndexOrName is the name or value of the new node to create.

BeforeOperation indicates whether the call occurs before or after the change.


TXMLNodeCollection.Clear
 VCL Reference

TXMLNodeCollection.Clear

TXMLNodeCollection	See also

Removes all child nodes in the List property from the ChildNodes and List properties.

procedure Clear;

Description

Use the IXMLNodeCollection interface for this node to call the protected Clear method. Clear deletes every child node from the collection (all the nodes in the List property), along with the corresponding nodes in the ChildNodes property.


TXMLNodeCollection.CreateItemList
 VCL Reference

TXMLNodeCollection.CreateItemList

TXMLNodeCollection	See also

Creates the object that implements the List property.

procedure CreateItemList(CheckFirst: Boolean = False);

Description

Applications can’t call the protected CreateItemList method. It is used internally when TXMLNodeCollection needs to create a separate object to implement the List property. A separate implementation object is only needed if this node contains child nodes that are not in the collection. Otherwise, TXMLNodeCollection can simply use the ChildNodes property.

CheckFirst specifies whether CreateItemList should check whether the ChildNodes property currently includes any nodes that are not in the collection. When CheckFirst is True, CreateItemList first checks the ChildNodes property, and if all nodes are in the collection, it does not create a separate list to store the nodes of the collection. When CheckFirst is False (or when the ChildNodes property includes nodes that are not in the collection), CreateItemList instantiates a list to hold the nodes in the collection, and adds to it any nodes listed in ChildNodes that belong in the collection.


TXMLNodeCollection.Delete
 VCL Reference

TXMLNodeCollection.Delete

TXMLNodeCollection	See also

Removes one of the repeating child nodes from this node.

procedure Delete(Index: Integer);

Description

Use the TXMLNodeCollection object’s IXMLNodeCollection interface to call the protected Delete method. Delete removes a specified child node from this node.

Index identifies the child to remove. It is the index of the child in the list of repeating child nodes (The List property, not the ChildNodes property). The index 0 represents the first repetition, 1 represents the second repetition, and so on.


TXMLNodeCollection.GetCount
 VCL Reference

TXMLNodeCollection.GetCount

TXMLNodeCollection	See also

Returns the value of the Count property.

function GetCount: Integer;

Description

GetCount is the protected read implementation of the Count property. It returns the number of nodes in the List property.


TXMLNodeCollection.GetList
 VCL Reference

TXMLNodeCollection.GetList

TXMLNodeCollection	See also

Returns the value of the List property.

function GetList: IXMLNodeList; virtual;

Description

GetList is the protected read implementation of the List property.


TXMLNodeCollection.GetNode
 VCL Reference

TXMLNodeCollection.GetNode

TXMLNodeCollection	See also

Returns the interface for one of the repeating child nodes.

function GetNode(Index: Integer): IXMLNode;

Description

Use the TXMLNodeCollection object’s IXMLNodeCollection interface to call the protected GetNode method. GetNode returns an interface for working with one of the repeating child nodes.

Index identifies which repetition of the child node is desired, where 0 is the first repetition, 1 is the second repetition, and so on. Note that Index is the index of the node in the List property, not in the index in the ChildNodes property.


TXMLNodeCollection.InsertInCollection
 VCL Reference

TXMLNodeCollection.InsertInCollection

TXMLNodeCollection	See also

Copies a child node from the ChildNodes property to the List property.

procedure InsertInCollection(Node: IXMLNode; Index: Integer);

Description

Applications can’t call this protected method. It is called automatically when nodes are added to the ChildNodes property list.

Node is the node that was just added to the ChildNodes property.

Index is the index of Node in the ChildNodes property.

InsertInCollection first checks whether Node belongs in the collection. If so, it adds it to the List property in the position that corresponds to Index (that is, in the index of Node when you ignore all the nodes in ChildNodes that do not belong in the collection.)


TXMLNodeCollection.IsCollectionItem
 VCL Reference

TXMLNodeCollection.IsCollectionItem

TXMLNodeCollection	See also

Indicates whether a specified node represents the type of node that appears as a repeating child of this node.

function IsCollectionItem(const Node: IXMLNode): Boolean;

Description

Applications can’t call the protected IsCollectionItem method. TXMLNodeCollection uses this method internally to distinguish nodes that represent instances of the repeating child node type.

IsCollectionItem checks whether Node implements the interface specified by the ItemInterface property . If so, it returns True. Otherwise, it returns False.


TXMLNodeCollection.Remove
 VCL Reference

TXMLNodeCollection.Remove

TXMLNodeCollection	See also

Removes one of the repeating child nodes from this node.

function Remove(const AItem: IXMLNode): Integer;

Description

Use the TXMLNodeCollection object’s IXMLNodeCollection interface to call the protected Remove method. Remove removes a specified child node from this node.

AItem is the interface of the child to remove. It must represent on of the repeating child nodes.

Remove deletes the child node from both the List property and from the ChildNodes property. It returns the index that the child node held in the List property.

To remove a child that is not one of the repeating child nodes, use the ChildNodes property instead.


TXMLNodeCollection.SetChildNodes
 VCL Reference

TXMLNodeCollection.SetChildNodes

TXMLNodeCollection	See also

Sets the value of the ChildNodes property.

procecure SetChildNodes(const Value: IXMLNodeList); override;

Description

Applications can’t call this protected method. It is called internally the first time an application reads the ChildNodes property to supply the interface that implements that property.

TXMLNodeCollection overrides the inherited method to update the List property as well.


TXMLNodeCollection.UpdateCollectionList
 VCL Reference

TXMLNodeCollection.UpdateCollectionList

TXMLNodeCollection	See also

Updates the List property to reflect changes to the set of child nodes.

procecure UpdateCollectionList(Operation: TNodeListOperation; var Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean);

Description

Applications can’t call this protected method. This method is called automatically when the ChildNodes property changes so that the collection can update the List property to reflect the repeating elements in the current set of child nodes.

Operation indicates whether the change to ChildNodes is the addition of a new node (nlInsert) or the deletion of a child node (nlRemove).

Node is the interface for a child node that is added or removed.

IndexOrName is the index or tag name of the node that is added or removed.

BeforeOperation indicates whether this method is called before ChildNodes has changed or after the change has occurred.


Hierarchy

TObject

TInterfacedObject

TXMLNodeCollection


TXMLNode
 VCL Reference

TXMLNode

Hierarchy	Properties	Methods	Events	See also

TXMLNode represents a node in an XML document.

Unit

XMLDoc

Description

The XML Data Binding Wizard uses TXMLNode as a base class for the classes it generates to represent nodes that have child nodes. For example, if the XML document includes the following:

<Address country="US">

  <Name>

    <First> John </First>

    <MI> Q. </MI>

    <Last> Public </Last>

  </Name>

  <Street> 123 Easy Street </Street>

  <City> Anytown </City>

  <State> CA </State>

</Address>

then the XML Data Binding Wizard generates TXMLNode descendants for the elements Address and Name. Child nodes and node attributes appear as properties of the TXMLNode descendant.

Note:	The XML Data Binding Wizard also generates code that can create TXMLNode objects for attributes as well as element nodes. However, there are no special TXMLNode descendants for attribute nodes. Rather, each attribute is represented directly by TXMLNode.

TXMLNode implements the IXMLNode interface. Each TXMLNode descendant implements a class-specific interface that descends from IXMLNode. Typically, applications do not work directly with TXMLNode. Instead, they use the IXMLNode interface or the IXMLNode descendant that is implemented by a TXMLNode descendant.


 VCL Reference

TXMLNode properties

TXMLNode	Alphabetically 	Legend

In TXMLNode

AttributeNodes

ChildNodeClasses

ChildNodes

Collection

DOMNode

HostedNodes

HostNode

OwnerDocument

ParentNode

Derived from TInterfacedObject

RefCount


 VCL Reference

TXMLNode properties

TXMLNode	By object 	Legend

AttributeNodes

ChildNodeClasses

ChildNodes

Collection

DOMNode

HostedNodes

HostNode

OwnerDocument

ParentNode

RefCount


TXMLNode.AttributeNodes
 VCL Reference

TXMLNode.AttributeNodes

TXMLNode 	See also

Lists the interfaces for nodes that represent attributes of this node.

property AttributeNodes: IXMLNodeList;

Description

TXMLNode uses AttributeNodes to keep track of its attributes. AttributeNodes is an IXMLNodeList interface, which can be used to access individual attribute nodes or to add attributes to or delete them from this node.

Applications can’t use this protected property to access the attributes of a node. Instead, they use the AttributeNodes property of the IXMLNode interface for this node.

Attributes modify a node in an XML document. For example, given the node

<Movie genre=scifi title="Star Wars"> ... </Movie>

both genre and title are attributes of the node, with values of “scifi” and “Star Wars”, respectively.

Only element nodes have attributes, and not every element node has them. If the node does not have any attributes, AttributeNodes is the interface for an empty list.

Note:	Attributes are not considered child nodes of a node and can’t be accessed using the ChildNodes property.


TXMLNode.ChildNodeClasses
 VCL Reference

TXMLNode.ChildNodeClasses

TXMLNode 	See also

Lists the classes that the XML Data Binding wizard defines to represent child nodes of this node.

property ChildNodeClasses: TNodeClassArray;

Description

ChildNodeClasses is used internally when creating child nodes for this node. The XML Data Binding wizard defines TXMLNode descendants for each node in the XML document that represents a node that has (or can have) children. ChildNodeClasses lists only those TXMLNode descendants that can represent child nodes of this node. These classes become the types of the corresponding properties on the TXMLNode descendant that represents this node.

Classes are added to ChildNodeClasses by the RegisterChildNode method.


TXMLNode.ChildNodes
 VCL Reference

TXMLNode.ChildNodes

TXMLNode 	See also

Lists the child nodes of this node.

property ChildNodes: IXMLNodeList;

Description

TXMLNode uses ChildNodes to keep track of the subnodes of a node. ChildNodes is an IXMLNodeList interface, which can be used to access individual child nodes or to add child nodes to or delete them from this node. Each child node specifies this node as its parent node.

Applications can’t use this protected property to access the child nodes of a node. Instead, they use the ChildNodes property of the IXMLNode interface for this node.

Note:	Attributes are not considered child nodes of a node. To get the values of this node’s attributes, use the Attributes property instead.


TXMLNode.Collection
 VCL Reference

TXMLNode.Collection

TXMLNode 	See also

Indicates the collection in which this node appears.

property Collection: TXMLNodeCollection;

Description

Collection indicates the collection that contains this node if it represents one of a repeating set of child nodes. The node specified by Collection represents the same node in the XML document as this node’s ParentNode property, but it is specialized to work with this node and any other child nodes of the same type.

The node identified by Collection is one of the collections listed by the parent node’s HostedNodes property, and it lists ParentNode as the value of its HostNode property.

For example, consider the following XML fragment:

<students>

  <student name="John Smith">

    <grade>incomplete</grade>

  </student>

  <student name="Jane Doe">

    <grade>B+</grade>

  </student>

  <auditor name="Bill Jones"></auditor>

</students>

If this node represents one of the <student> nodes, then ParentNode represents the <students> node, and Collection represents a copy of the <students> node that is used for only those children that are <student> nodes, and not the <auditor> nodes.

Applications can’t use this protected property to access the Collection that contains this node. Instead, they use the Collection property of the IXMLNode interface for this node.


TXMLNode.HostedNodes
 VCL Reference

TXMLNode.HostedNodes

TXMLNode 	See also

Lists the nodes that share this node’s lists of child and attribute nodes.

property HostedNodes: TList;

Description

TXMLNode uses HostedNodes to keep track of the nodes it uses to represent this same node, restricted to a specialized purpose. For example, any node that represents a subset of this node’s child nodes that are all of the same type is a hosted node.

Each object in the HostedNodes list is a representation of a particular aspect of this node. Each hosted node acts as a sibling to this TXMLNode object but does not represent a separate element in the XML document. Rather, it represents a different view of this element.

For example, consider the following XML fragment:

<students>

  <fulltime student>Joe Smith</fulltime student>

  <fulltime student>Jane Doe</fulltime student>

  <auditor>Bill Jones</auditor>

</students>

The TXMLNode that represents students would define two hosted nodes for collections of repeating child elements, one for the fulltime students, and one for the auditors. The two collections share the same underlying DOM node as students, but each represents only those child elements of a particular type.


TXMLNode.HostNode
 VCL Reference

TXMLNode.HostNode

TXMLNode 	See also

Indicates the main object for the node to which this node corresponds when it represents a specialized view.

property HostNode: TXMLNode;

Description

If this node represents a hosted node, HostNode is the main node for which this node represents a subset or specialized view. For example, if this node represents a set of repeating child elements, HostNode is the node that uses this node to represent its repeating child elements.

For example, consider the following XML fragment:

<students>

  <student name="John Smith">

    <grade>incomplete</grade>

  </student>

  <student name="Jane Doe">

    <grade>B+</grade>

  </student>

  <auditor name="Bill Jones"></auditor>

  <auditor name="Susan Brown"></auditor>

</students>

The <students> node spawns two hosted nodes to represent the collections of repeating child nodes: one for all of the child nodes of type <student>, and one for all of the child nodes of type <auditor>. If this node represents one of those hosted nodes, then HostNode is the <students> node to which this node belongs. The host node lists this node in its HostedNodes property.

Applications can’t use this protected property to access the host node that created this node. Instead, they use the HostNode property of the IXMLNode interface for this node.


TXMLNode.OwnerDocument
 VCL Reference

TXMLNode.OwnerDocument

TXMLNode	See also

Provides access to the document that contains this node.

property OwnerDocument: TXMLDocument;

Description

Applications can’t use this protected property to access the document that contains this. Instead, they use the OwnerDocument property of the IXMLNode interface for this node.

The value of OwnerDocument is set to the TXMLDocument that is provided to the TXMLNode constructor.


TXMLNode.DOMNode
 VCL Reference

TXMLNode.DOMNode

TXMLNode	See also

Provides access to the IDOMNode interface for this node.

property DOMNode: IDOMNode;

Description

IDOMNode is the interface for this node provided by the DOM implementation that parsed the XML document. It can be accessed through the DOMNode property of the node’s IXMLNode interface.

Typically, applications that contain TXMLNode descendants use the IXMLNode interface to work with a node rather than the IDOMNode interface. IDOMNode is used more typically in applications that work directly with the DOM interfaces.

The value of DOMNode is set to the IDOMNode interface that is provided to the TXMLNode constructor.


TXMLNode.ParentNode
 VCL Reference

TXMLNode.ParentNode

IXMLNode 	See also

Identifies the object that represents this node’s parent node.

property ParentNode: TXMLNode;

Description

TXMLNode uses ParentNode to access the implementation of the node’s parent, if it exists.

Applications can’t use this protected property to access the parent node of a node. Instead, they use the ParentNode property of the IXMLNode interface for this node.


 VCL Reference

TXMLNode events

TXMLNode	Alphabetically 	Legend

In TXMLNode

OnHostAttrNotify

OnHostChildNotify


 VCL Reference

TXMLNode events

TXMLNode	By object 	Legend

OnHostAttrNotify

OnHostChildNotify


TXMLNode.OnHostAttrNotify
 VCL Reference

TXMLNode.OnHostAttrNotify

IXMLNode 	See also

Occurs when changes occur to the attribute list of this node’s HostNode.

property OnHostAttrNotify: TNodeListNotification;

Description

Use the OnHostAttrNotify event to update a TXMLNode descendant that represents a hosted node (such as a collection of repeating child elements) when the host node changes its attribute list.

The AttributeListNotify method of a host node generates an OnHostAttrNotify event on all of its hosted nodes. This allows the hosted nodes (for example, the nodes that represent a subset of the child nodes that are all the same type) to update their own representation of node attributes so that they reflect the attributes of the host node.


TXMLNode.OnHostChildNotify
 VCL Reference

TXMLNode.OnHostChildNotify

IXMLNode 	See also

Occurs when changes occur to the list of child nodes on this node’s HostNode.

property OnHostChildNotify: TNodeListNotification;

Description

Use the OnHostChildNotify event to update a TXMLNode descendant that represents a hosted node (such as a collection of repeating child elements) when the host node changes its list of child nodes. For example, TXMLNodeCollection assigns its UpdateCollectionList method as an OnHostChildNotify event handler so that its list of repeating child elements reflects any changes to the host node’s list of child nodes.

The ChildListNotify method of a host node generates an OnHostChildNotify event on all of its hosted nodes.


 VCL Reference

TXMLNode methods

TXMLNode	Alphabetically	Legend

In TXMLNode

_AddRef

_Release

AddChild

AttributeListNotify

CheckNotHosted

CheckReadOnly

CheckTextNode

ChildListNotify

ClearDocumentRef

CloneNode

Create

CreateAttributeList

CreateAttributeNode

CreateChildList

CreateChildNode

CreateCollection

CreateHosted

DeclareNamespace

Destroy

DOMElement

DoNodeChange

FindHostedNode

FindNamespaceDecl

FindNamespaceURI

GetAttribute

GetAttributeNodes

GetAttributeNS

GetChildNodeClasses

GetChildNodes

GetChildValue

GetCollection

GetDOMNode

GetHasChildNodes

GetHostedNodes

GetHostNode

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNodeName

GetNodeObject

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetPrefixedName

GetReadOnly

GetText

GetXML

HasAttribute

HasChildNode

InternalAddChild

NestingLevel

NextSibling

Normalize

PreviousSibling

RegisterChildNode

RegisterChildNodes

Resync

SetAttribute

SetAttributeNodes

SetAttributeNS

SetChildNodes

SetChildValue

SetCollection

SetNodeValue

SetParentNode

SetReadOnly

SetText

TransformNode

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TXMLNode methods

TXMLNode	By object	Legend

_AddRef

_Release

AddChild

AfterConstruction

AttributeListNotify

BeforeDestruction

CheckNotHosted

CheckReadOnly

CheckTextNode

ChildListNotify

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearDocumentRef

CloneNode

Create

CreateAttributeList

CreateAttributeNode

CreateChildList

CreateChildNode

CreateCollection

CreateHosted

DeclareNamespace

DefaultHandler

Destroy

Dispatch

DOMElement

DoNodeChange

FieldAddress

FindHostedNode

FindNamespaceDecl

FindNamespaceURI

Free

FreeInstance

GetAttribute

GetAttributeNodes

GetAttributeNS

GetChildNodeClasses

GetChildNodes

GetChildValue

GetCollection

GetDOMNode

GetHasChildNodes

GetHostedNodes

GetHostNode

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetIsTextElement

GetLocalName

GetNamespaceURI

GetNodeName

GetNodeObject

GetNodeType

GetNodeValue

GetOwnerDocument

GetParentNode

GetPrefix

GetPrefixedName

GetReadOnly

GetText

GetXML

HasAttribute

HasChildNode

InheritsFrom

InitInstance

InstanceSize

InternalAddChild

MethodAddress

MethodName

NewInstance

NextSibling

NestingLevel

Normalize

PreviousSibling

RegisterChildNode

RegisterChildNodes

Resync

SafeCallException

SetAttribute

SetAttributeNodes

SetAttributeNS

SetChildNodes

SetChildValue

SetCollection

SetNodeValue

SetParentNode

SetReadOnly

SetText

TransformNode


TXMLNode._AddRef
 VCL Reference

TXMLNode._AddRef

TXMLNode	See also

Increments the reference count for this node.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IInterface or IUnknown method that is called automatically when an application obtains a reference to this node’s interface pointer. _AddRef increments the RefCount property. In addition, to ensure that the document object is alive, it also increments the reference count for the owning document.

When the caller is through with the interface, it calls _Release. This allows the node to free itself when it is no longer used (when the reference count goes to zero).


TXMLNode._Release
 VCL Reference

TXMLNode._Release

TXMLNode	See also

Decrements the reference count for this node.

function _Release: Integer; stdcall;

Description

_Release implements the IInterface or IUnknown method that is called automatically when an application releases a reference to this node’s interface pointer. _Release decrements the RefCount property. In addition, it also decrements the reference count for the owning document, which it incremented when the _AddRef method was called.

When _Release causes the node’s reference count to drop to zero, _Release causesthe node to free itself.


TXMLNode.AddChild
 VCL Reference

TXMLNode.AddChild

TXMLNode	See also

Adds a new child node to this node.

function AddChild(const TagName: DOMString; Index: Integer = -1): IXMLNode; overload;

function AddChild(const TagName, NamespaceURI: DOMString; GenPrefix: Boolean = False; Index: Integer = -1): IXMLNode; overload;

function AddChild(const TagName, NamespaceURI: DOMString; NodeClass: TXMLNodeClass; Index: Integer = -1): IXMLNode; overload;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected AddChild method. Only the first two versions of AddChild are available on the IXMLNode interface. The third syntax is used by TXMLNode descendants that the XML data binding wizard creates.

AddChild creates a new element node as the child of this node.

TagName provides the tag name of the newly created node.

Index indicates the position of the child node in this node’s list of children, where 0 is the first position, 1 is the second position, and so on. If Index is –1, the new node is added to the end.

NamespaceURI identifies the namespace that includes the new node’s definition. If NamespaceURI is omitted (the first syntax), the namespace of the new node is deduced from the namespace prefix of TagName. If TagName has no namespace prefix and there is no NamespaceURI parameter, the namespace is the same as this node’s NamespaceURI property.

GenPrefix controls whether AddChild generates a namespace prefix for the namespace URI when the NamespaceURI parameter identifies a URI that is not already declared in the document. Note that setting GenPrefix to True does not cause AddChild to add a declaration of the new namespace prefix unless the document’s Options property includes doNamespaceDecl.

NodeClass identifies the implementation class to use for the new child node. It must be TXMLNode or one of its descendants.

AddChild returns the interface for the newly created child node.

Tip:	AddChild only adds element nodes. To add other types of child nodes, use the XML document’s CreateNode method instead, and then add the resulting node to the ChildNodes property array.


TXMLNode.AttributeListNotify
 VCL Reference

TXMLNode.AttributeListNotify

TXMLNode	See also

Responds to notifications of changes in the list of attributes.

procedure AttributeListNotify(Operation: TNodeListOperation; var Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean);

Description

Applications can’t call this protected method. The class that implements the AttributeNodes property calls AttributeListNotify when attribute nodes are inserted or removed, or when a new attribute node needs to be created. AttributeListNotify generates a BeforeNodeChange or AfterNodeChange event on the document object, and, if the change has not yet occurred, updates the underlying DOM implementation to reflect the change.

Operation indicates what type of change occurred.

Node is the interface for the attribute node that was added or removed. If a new attribute node needs to be created, Node returns the new node.

IndexOrName is the name of the attribute when Operation is nlCreateNode.

BeforeOperation indicates whether the call occurs before the attribute node is added or removed.


TXMLNode.CheckNotHosted
 VCL Reference

TXMLNode.CheckNotHosted

TXMLNode	See also

Raises an EXMLDocError exception if this is a hosted node.

procedure CheckNotHosted;

Description

Applications can’t call this protected method. It is used internally in methods that can only be used by the main node that corresponds to an element. If the node represents a hosted node (that is, if the node is used to represent a subset of the main, or host, node), then CheckNotHosted raises an EXMLDocError exception.

For example, the CreateCollection method calls CheckNotHosted, because only the main node for an element can host collection nodes.


TXMLNode.CheckReadOnly
 VCL Reference

TXMLNode.CheckReadOnly

TXMLNode	See also

Raises an EXMLDocError exception if this is a read-only node.

procedure CheckReadOnly;

Description

Applications can’t call this protected method. It is used internally in methods that change the value, children, or attributes of the node, to check whether the change is permitted, and if not, raise an exception.


TXMLNode.CheckTextNode
 VCL Reference

TXMLNode.CheckTextNode

TXMLNode

Generates a DOM text node implementation if it does not yet exist.

procedure CheckTextNode;

Description

Applications can’t call this protected method. It is used internally to generate a DOM node implementation for text values.

If the XML node is an element that has child nodes (other than a single DOM text node), CheckTextNode raises an exception.


TXMLNode.ChildListNotify
 VCL Reference

TXMLNode.ChildListNotify

TXMLNode	See also

Responds to notifications of changes in the list of child nodes.

procedure ChildListNotify(Operation: TNodeListOperation; var Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean); virtual;

Description

Applications can’t call this protected method. The class that implements the ChildNodes property calls ChildListNotify when child nodes are inserted or removed, or when a node needs to be created. ChildListNotify generates a BeforeNodeChange or AfterNodeChange event on the document object, and, if the change has not yet occurred, updates the underlying DOM implementation to reflect the change.

Operation indicates what type of change is occuring.

Node is the interface for the child node about which this method is called. When nodes are added or removed, this is the node that is added or removed. When a node needs to be created, this parameter returns the newly created node.

IndexOrName is the index of the node that is added or removed when Operation is nlInsert or nlRemove. When Operation is nlCreateNode, IndexOrName is the name of the child node to create.

BeforeOperation indicates whether the call occurs before the child node is added or removed.


TXMLNode.ClearDocumentRef
 VCL Reference

TXMLNode.ClearDocumentRef

TXMLNode	See also

Sets the value of OwnerDocument to nil.

procedure ClearDocumentRef;

Description

Applications can’t call this protected method. The document that contains this node calls ClearDocumentRef when it is freed so that the node does not maintain a reference to a non-existent document.

In addition to setting the OwnerDocument property to nil, ClearDocumentRef propagates this call to all of this nodes child nodes and attribute nodes.


TXMLNode.CloneNode
 VCL Reference

TXMLNode.CloneNode

TXMLNode	See also

Creates a copy of this node and returns its interface.

function CloneNode(Deep: Boolean): IXMLNode;

Description

Applications can’t call the protected CloneNode method. To create a copy of this node, use the CloneNode method of this node’s IXMLNode interface.

CloneNode returns a copy of this node that has no parent. Any attributes of this node are copied as well, including attribute nodes that represent default values.

Deep indicates whether the child nodes of this node should be cloned as well. For example, if an element node contains any text, CloneNode only copies then text when deep is True, because in the underlying DOM implementation, the text is contained in a child node.


TXMLNode.Create
 VCL Reference

TXMLNode.Create

TXMLNode	See also

Instantiates a TXMLNode object.

constructor Create(const ADOMNode: IDOMNode; const AParentNode: TXMLNode; const OwnerDoc: TXMLDocument);

Description

Createinstantiates a new TXMLNode object to wrap an existing DOM node implementation.

ADOMNode is the interface for the DOM implementation of the node.

AParentNode is the implementation of the parent node of this node.

OwnerDoc represents the XML document in which the new node occurs.

Typically, applications do not directly call the TXMLNode constructor. Instead, new nodes are created automatically for an XML document as necessary when the application reads their interfaces, starting with the DocumentElement property of the TXMLDocument object. To add new nodes to a document, applications call the parent node’s AddChild method.


TXMLNode.CreateAttributeList
 VCL Reference

TXMLNode.CreateAttributeList

TXMLNode	See also

Creates the object that implements the AttributeNodes property.

function CreateAttributeList: IXMLNodeList; dynamic;

Description

Applications can’t call the protected CreateAttributeList method. This method is used internally the first time an application reads the AttributeNodes property.

CreateAttributeList creates an implementation class for the AttributeNodes property, telling it to call the AttributeListNotify method when it changes the list of attributes for this node, and filling it with nodes based on the current attributes of this node.


TXMLNode.CreateAttributeNode
 VCL Reference

TXMLNode.CreateAttributeNode

TXMLNode	See also

Creates a new TXMLNode object for an attribute of this node.

function CreateAttributeNode(const ADOMNode: IDOMNode): IXMLNode; virtual;

Description

Applications can’t call the protected CreateAttributeNode method. TXMLNode uses this method internally to generate the nodes that populate the AttributeNodes property.

CreateAttributeNode creates a new TXMLNode object for the specified IDOMNode interface and returns its interface.

ADOMNode is the interface for the DOM implementation’s version of the attribute node.


TXMLNode.CreateChildList
 VCL Reference

TXMLNode.CreateChildList

TXMLNode	See also

Creates the object that implements the ChildNodes property.

function CreateChildList: IXMLNodeList; dynamic;

Description

Applications can’t call the protected CreateChildList method. This method is used internally the first time an application reads the ChildNodes property.

CreateChildList creates an implementation class for the ChildNodes property, telling it to call the ChildListNotify method when it changes the list of attributes for this node, and filling it with nodes that are based on the current children of this node.


TXMLNode.CreateChildNode
 VCL Reference

TXMLNode.CreateChildNode

TXMLNode	See also

Creates a new TXMLNode object for a child node of this node.

function CreateChildNode(const ADOMNode: IDOMNode): IXMLNode; virtual;

Description

Applications can’t call the protected CreateChildNode method. This method is used internally to create the implementation object for a new child node.

CreateChildNode creates a new TXMLNode descendant for the specified IDOMNode interface, with this node as the parent. If the node name of the DOM node matches one of the names listed by the ChildNodeClasses property, the corresponding descendant of TXMLNode becomes the implementation class of the new node. Otherwise, the new node is an instance of TXMLNode.

ADOMNode is the interface for the DOM implementation’s version of the node.

CreateChildNode returns the interface for the newly created child node.


TXMLNode.CreateCollection
 VCL Reference

TXMLNode.CreateCollection

TXMLNode	See also

Creates an instance of a TXMLNodeCollection descendant and returns it.

type TXMLNodeCollectionClass = class ofTXMLNodeCollection;

function CreateCollection(const CollectionClass: TXMLNodeCollectionClass; const ItemInterface: TGuid; const ItemTag: DOMString; ItemNS: DOMString = ''): TXMLNodeCollection;

Description

Applications can’t call the protected CreateCollection method. It is used internally to generate the collections that are listed in the HostedNodes property.

CollectionClass specifies the class (a TXMLNodeCollection descendant) that implements the collection of child nodes.

ItemInterface specifies the interface for each child node in the collection.

ItemTag specifies the tag name for each child node in the colleciton.

ItemNS specifies the namespace in which ItemTag is defined.

CreateCollection returns the new hosted collection node. This new node has the same parent node, DOM interface, attribute nodes, and child nodes as this node, but it also maintains a list of only those child nodes with the specified tag and interface. The new collection node lists this node as the value of its HostNode property.

Note:	CreateCollection raises an exception if this is a hosted node.


TXMLNode.CreateHosted
 VCL Reference

TXMLNode.CreateHosted

TXMLNode	See also

Creates a TXMLNode instance that represents the same DOM node as another “host” node.

type TXMLNodeClass = class of TXMLNode;

constructor CreateHosted(HostNode: TXMLNode);

Description

CreateHosted instantiates a new TXMLNode object to represent a specific view on an existing TXMLNode object.

HostNode is another TXMLNode object that represents the host node of this node. The new node becomes a “hosted” node, which means it shares the same underlying parent and DOM node as the host node, but represents a different view of the host node. For example, a node that contains some child nodes that are all of the same type creates a hosted node to represent only the set of repeating child nodes.

Typically, applications do not directly call CreateHosted to create a hosted node. Instead, this method is called in code generated by the XML Data Binding Wizard, or by the CreateCollection method of the host node.

HostNode (or, if HostNode is hosted, the host node of HostNode) becomes the value of the new node’s HostNode property, and the new node is added to the HostedNodes property list of the new host node.


TXMLNode.DeclareNamespace
 VCL Reference

TXMLNode.DeclareNamespace

TXMLNode	See also

Adds an attribute to the node that declares a specified namespace URI.

procedure DeclareNamespace(const Prefix, URI: DOMString);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected DeclareNamespace method. DeclareNamespace adds an attribute to this node that declares the specified namespace URI as the value of the specified prefix.

Prefix is the namespace prefix that appears in tag names that reference the namespace.

URI is the corresponding namespace URI.

Note:	This method is called automatically for newly created nodes when the document’s Options property includes doNamespaceDecl.


TXMLNode.Destroy
 VCL Reference

TXMLNode.Destroy

TXMLNode	See also

Frees the memory associated with the TXMLNode object.

destructor Destroy; override;

Description

Do not explicitly destroy TXMLNode objects. As interfaced objects, XML nodes are destroyed automatically when the reference count of their IXMLNode interface drops to zero.


TXMLNode.DOMElement
 VCL Reference

TXMLNode.DOMElement

TXMLNode	See also

Returns the IDOMElement interface for this node if it exists.

function DOMElement: IDOMElement;

Description

Application’s can’t call the protected DOMElement method. TXMLNode uses this method internally to obtain the DOM element interface, which it uses for working with attributes.

If the TXMLNode instance does not represent an element node, DOMElement raises an EXMLDocError exception.


TXMLNode.DoNodeChange
 VCL Reference

TXMLNode.DoNodeChange

TXMLNode	See also

Generates a BeforeNodeChange or AfterNodeChange event on this node’s document.

procedure DoNodeChange(ChangeType: TNodeChange; BeforeOperation: Boolean); virtual;

Description

Applications can’t call the protected DoNodeChange method. It is called internally before and after every change that is made to the node. DoNodeChange checks whether the node’s OwnerDocument property is set, and if so, generates a BeforeNodeChange or AfterNodeChange event on that document, as appropriate.

ChangeType indicates the type of change that is occurring to the node.

BeforeOperation is True if the change is about to occur, False if the change has just occurred.


TXMLNode.FindHostedNode
 VCL Reference

TXMLNode.FindHostedNode

TXMLNode	See also

Returns the IXMLNode interface for a hosted node given its implementation class.

type TXMLNodeClass = class of TXMLNode;

function FindHostedNode(const NodeClass: TXMLNodeClass): IXMLNode;

Description

Applications can’t call the protected FindHostedNode method. Descendant classes call this method to locate a hosted node of a particular class type.

FindHostedNode searches the nodes in the HostedNodes list and returns the first one it finds that is an instance of descendant of NodeClass. If this node does not have a hosted node of the specified class, FindHostedNode returns nil.


TXMLNode.FindNamespaceDecl
 VCL Reference

TXMLNode.FindNamespaceDecl

TXMLNode	See also

Returns the attribute node that declares a specified Namespace URI.

function FindNamespaceDecl(const NamespaceURI: DOMString): IXMLNode;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected FindNamespaceDecl method. FindNamespaceDecl searches the node hierarchy that contains this node for an attribute that specifies the mapping between a namespace prefix and the namespace URI specified by NamespaceURI. If it finds such a mapping, FindNamespaceDecl returns the interface for the Attribute node. If it does not find a mapping, FindNamespaceDecl returns nil.

NamespaceURI is the namespace URI to locate.


TXMLNode.FindNamespaceURI
 VCL Reference

TXMLNode.FindNamespaceURI

TXMLNode	See also

Returns the namespace URI for a namespace prefix or qualified tag name.

function FindNamespaceURI(const TagOrPrefix: DOMString): DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected FindNamespaceURI method. FindNamespaceDecl searches the node hierarchy that contains this node for an attribute that specifies the mapping between the namespace prefix identified by TagOrPrefix and a namespace URI. If it finds such a mapping, FindNamespaceURI returns the namespace URI. If it does not find a mapping, FindNamespaceURI returns an empty string.

TagOrPrefix is the namespace prefix or a tag name that includes the namespace prefix.


TXMLNode.GetAttribute
 VCL Reference

TXMLNode.GetAttribute

TXMLNode	See also

Returns the value of one of this node’s attributes.

function GetAttribute(const AttrName: DOMString): OleVariant;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetAttribute method. GetAttribute returns the value of an attribute of this node.

AttrName is the name of the attribute.

GetAttribute returns the value of the specified attribute. Typically, this value is a string. If the node does not have an attribute with the name specified by AttrName, the value that GetAttribute returns is determined by the document’s Options property. When Options include doAttrNull, GetAttribute returns a Null Variant for missing attributes. When Options does not include doAttrNull, GetAttribute returns an empty string as the value of missing attributes.

If this node is not an element node, GetAttribute raises an EXMLDocError exception.


TXMLNode.GetAttributeNodes
 VCL Reference

TXMLNode.GetAttributeNodes

TXMLNode	See also

Returns the value of the AttributeNodes property.

function GetAttributeNodes: IXMLNodeList;

Description

GetAttributeNodes is the read implementation of the AttributeNodes property on the IXMLNode interface for this node.

GetAttributeNodes generates the list that implements the AttributeNodes property the first time an application reads the AttributeNodes property.


TXMLNode.GetAttributeNS
 VCL Reference

TXMLNode.GetAttributeNS

TXMLNode	See also

Returns the value of a specified attribute when you must explicitly specify the namespace for the attribute.

function GetAttributeNS(const AttrName, NamespaceURI: DOMString): OleVariant;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetAttributeNS method. GetAttributeNS returns the value of an attribute of this node.

AttrName is the name of the attribute.

NamespaceURI identifies the namespace in which the attribute resides.

GetAttributeNS returns the value of the specified attribute. If AttrName and NamespaceURI do not identify an attribute of this node, GetAttributeNS returns a Null Variant.

If this node is not an element node, GetAttributeNS raises an EXMLDocError exception.


TXMLNode.GetChildNodeClasses
 VCL Reference

TXMLNode.GetChildNodeClasses

TXMLNode	See also

Returns a list of the classes that can implement child nodes of this node.

function GetChildNodeClasses: TNodeClassArray;

Description

GetChildNodeClasses is used internally to obtain a list of the classes that can be used to represent child nodes of this node.

If this node is not a hosted node, GetChildNodeClasses returns an array containing every class that has been registered using the RegisterChildNode method. If this node is a hosted node, GetChildNodeClasses returns the ChildNodeClasses property of the host node.


TXMLNode.GetChildNodes
 VCL Reference

TXMLNode.GetChildNodes

TXMLNode	See also

Returns the value of the ChildNodes property.

function GetChildNodes: IXMLNodeList;

Description

GetChildNodes is the protected read implementation of the ChildNodes property.

GetChildNodes generates the list that implements the ChildNodes property the first time an application reads the ChildNodes property.


TXMLNode.GetChildValue
 VCL Reference

TXMLNode.GetChildValue

TXMLNode	See also

Returns the value of a specified child node.

function GetChildValue(const IndexOrName: OleVariant): OleVariant;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetChildValue method. GetChildValue returns the value of the node.

IndexOrName identifies the desired child node by either its interface, or by a string that is the local name of the child node.

If IndexOrName does not identify a child of this node, GetChildValue nil. Otherwise, the return value depends on the type of the child node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, GetChildValue raises an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntEntityRef	nil

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

ntDocFragment	nil

Note:	Attributes are not considered child nodes of a node. To get the values of this node’s attributes, use the GetAttribute method instead.


TXMLNode.GetCollection
 VCL Reference

TXMLNode.GetCollection

TXMLNode	See also

Returns the value of the Collection property.

function GetCollection: IXMLNodeCollection;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetCollection method. GetCollection returns the value of the Collection property. If this node is not a member of a collection (that is, if it does not represent one of a set of child nodes that are all the same type), then GetCollection returns nil.


TXMLNode.GetDOMNode
 VCL Reference

TXMLNode.GetDOMNode

TXMLNode	See also

Returns the value of the DOMNode property.

function GetDOMNode: IDOMNode;

Description

GetDOMNode is the protected read implementation of the DOMNode property.


TXMLNode.GetHasChildNodes
 VCL Reference

TXMLNode.GetHasChildNodes

TXMLNode	See also

Indicates whether this node has any child nodes.

function GetHasChildNodes: Boolean;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetHasChildNodes method. GetHasChildNodes returns True if the underlying DOM node has any child nodes, False if it doesn’t.

Note that even if the underlying DOM node has a child node, there may not be a TXMLNode object to represent that child. For example, text nodes do not, by default, have corresponding TXMLNode wrappers. Rather, the text becomes the value of the parent element node.


TXMLNode.GetHostedNodes
 VCL Reference

TXMLNode.GetHostedNodes

TXMLNode	See also

Returns a list of the hosted nodes that share this node’s attribute and child node lists.

function GetHostedNodes: TList;

Description

GetHostedNodes is the read implementation of the HostedNodes property. It returns a list of all nodes that represent aspects of this node, sharing its attributes and list of child nodes.


TXMLNode.GetHostNode
 VCL Reference

TXMLNode.GetHostNode

TXMLNode	See also

Returns the value of the HostNode property.

function GetHostNode: TXMLNode;

Description

GetHostNode returns the node that uses this node to represent a particular aspect of it, sharing the same attributes and list of child nodes. If this is not a hosted node, GetHostNode returns nil.


TXMLNode.GetIsTextElement
 VCL Reference

TXMLNode.GetIsTextElement

TXMLNode	See also

Indicates whether the node has a single text value.

function GetIsTextElement: Boolean;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetIsTextElement method. GetIsTextElement returns True if the node represents an XML fragment such as

<Title> Understanding XML </Title>

where the node has a tag name (in this case Title) and a single text value (in this case ‘Understanding XML’).

GetIsTextElement returns False if the node is any other type of node.

Note:	In the underlying DOM implementation, nodes for which GetIsTextElement is True are element nodes that have a single child node that is a text node. TXMLNode flattens this out so that the child text node does not appear as a child node. Instead, the text can be accessed through the GetText method.


TXMLNode.GetLocalName
 VCL Reference

TXMLNode.GetLocalName

TXMLNode	See also

Returns the name of the node without any namespace prefix.

function GetLocalName: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetLocalName method. GetLocalName returns the local name of the underlying DOM node.

For element nodes, the local name is derived from the name that appears in the XML tag. For example, the local name for <xsi:Name First=John Last=Doe> is ‘Name’.

For attribute nodes, the local name is derived from the string that appears to the left of the equals sign in the attribute declaration. For example the element <Name First=John Last=Doe> results in two attribute nodes, with the local names ‘First’ and ‘Last’.

For any other node types, the local name is nil.

Note:	If both GetPrefix and GetLocalName return a value for a node, the node name (returned by GetNodeName) is the combination of these two values.


TXMLNode.GetNamespaceURI
 VCL Reference

TXMLNode.GetNamespaceURI

TXMLNode	See also

Returns the URI for the namespace used in the qualified node name.

function GetNamespaceURI: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetNamespaceURI method. GetNamespaceURI returns the URI for the namespace that should be used to interpret the node’s name.

Only element and attribute nodes can have a namespace URI value. For any other node type, GetNamespaceURI returns nil.

The namespace URI is only available if it is explicitly assigned when the node is created. By default, TXMLNode does not assign namespaces to the new nodes it creates.


TXMLNode.GetNodeName
 VCL Reference

TXMLNode.GetNodeName

TXMLNode	See also

Returns the node name.

function GetNodeName: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetNodeName method. GetNodeName returns the name of the underlying DOM node.

The node’s name depends on the type of the node, as indicated in the following table:

NodeType	NodeName

ntAttribute	The attribute name

ntElement	The tag name

ntText	‘#text’

ntCData	‘#cdata-section’

ntEntityRef	The name of the entity reference.

ntEntity	The entity name

ntProcessingInstr	the target of the processing instruction

ntComment	‘#comment’

ntDocument	‘#document’

ntDocType	The document type name

ntDocFragment	‘#document-fragment’

ntNotation	The notation name

Note:	If GetPrefix and GetLocalName both return values for a node, the node name is the combination of these two values.


TXMLNode.GetNodeObject
 VCL Reference

TXMLNode.GetNodeObject

TXMLNode

Returns a reference to this TXMLNode object.

function GetNodeObject: TXMLNode;

Description

GetNodeObject returns Self.


TXMLNode.GetNodeType
 VCL Reference

TXMLNode.GetNodeType

TXMLNode	See also

Returns the type of the node.

function GetNodeType: TNodeType;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetNodeType method. GetNodeType returns the type of the underlying DOM node that this TXMLNode object represents.


TXMLNode.GetNodeValue
 VCL Reference

TXMLNode.GetNodeValue

TXMLNode	See also

Returns the value of this node.

function GetNodeValue: OleVariant;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetNodeValue method. GetNodeValue returns the value of the node. This value depends on the type of the node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, GetNodeValue raises an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntEntityRef	nil

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

ntDocFragment	nil


TXMLNode.GetOwnerDocument
 VCL Reference

TXMLNode.GetOwnerDocument

TXMLNode	See also

Returns the interface for the document in which this node appears.

function GetOwnerDocument: IXMLDocument;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetOwnerDocument method. GetOwnerDocument returns the value of the OwnerDocument property.


TXMLNode.GetParentNode
 VCL Reference

TXMLNode.GetParentNode

TXMLNode	See also

Returns the interface for the node’s parent node.

function GetParentNode: IXMLNode;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetParentNode method. GetParentNode returns the interface of the node’s parent node.


TXMLNode.GetPrefix
 VCL Reference

TXMLNode.GetPrefix

TXMLNode	See also

Returns the namespace prefix of the node’s name.

function GetPrefix: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetPrefix method. GetPrefix returns the namespace prefix of an element or attribute node’s name. A namespace prefix is a symbolic name for a namespace URI.

For element nodes, the namespace prefix is derived from the name that appears in the XML tag. For example, the namespace prefix for <xsi:Name First=John Last=Doe> is ‘xsi’.

For attribute nodes, the namespace prefix is derived from the string that appears to the left of the equals sign in the attribute declaration. For example the element <xsi:Name xsn:First=John Last=Doe> results in two attribute nodes, with namespace prefixes of ‘xsn’ and ‘’, respectively. Note that the attribute never inherits a namespace prefix from the node to which it is attached.

For any other node types, the namespace prefix is nil.

Note:	If both GetPrefix and GetLocalName return a value for a node, the node name (returned by GetNodeName) is the combination of these two values.


TXMLNode.GetPrefixedName
 VCL Reference

TXMLNode.GetPrefixedName

TXMLNode	See also

Returns a node name includes a namespace prefix for a specified namespace URI.

function GetPrefixedName(const Name, NamespaceURI: DOMString): DOMString;

Description

GetPrefixedName adds a prefix to a local node name based on the specified namespace URI. If there is no corresponding namespace already declared or if the name is already prefixed, GetPrefixedName returns the original node name.

Name is the node name to which the namespace prefix should be added.

NamespaceURI is the URI for the namespace that should be identified by the namespace prefix.

Note:	If the document containing this node does not include doAutoPrefix in its Options property, GetPrefixedName always returns the value of Name, without trying to generate or add a namespace prefix.


TXMLNode.GetReadOnly
 VCL Reference

TXMLNode.GetReadOnly

TXMLNode	See also

Indicates whether the node can be modified.

function GetReadOnly: Boolean;

Description

GetReadOnly returns True if the node can’t be modified. Read-only nodes raise an EXMLDocError exception when an attempt is made to change their value, child nodes, or attributes.

GetReadOnly returns False if the node can be modified.

Note:	Use the ReadOnly property on the IXMLNode interface to specify whether a node is read-only.


TXMLNode.GetText
 VCL Reference

TXMLNode.GetText

TXMLNode	See also

Returns the text value of the node.

function GetText: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetText method. GetText returns the text of the node. For example, if the node represents an XML fragment such as

<Title> Understanding XML </Title>

GetText returns the string ‘Understanding XML’.

GetText is intended for use when the GetIsTextElement method returns True. If GetIsTextElement returns False, GetText returns an empty string if the node has no children, otherwise it raises an exception.


TXMLNode.GetXML
 VCL Reference

TXMLNode.GetXML

TXMLNode	See also

Returns the XML that corresponds to the subtree rooted at this node.

function GetXML: DOMString;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected GetXML method. GetXML returns the XML that corresponds to this node and any child nodes it contains.

Note:	GetXML is only available when the DOMVendor used to parse this node’s XML document is MSXML.


TXMLNode.HasAttribute
 VCL Reference

TXMLNode.HasAttribute

TXMLNode	See also

Indicates whether the node has an attribute with a specified name.

function HasAttribute(const Name: DOMString): Boolean; overload;

function HasAttribute(const Name, NamespaceURI: DOMString): Boolean; overload;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected HasAttribute method.

Name is the name of the attribute about which you want to know.

NamespaceURI is the namespace of the attribute.

HasAttribute returns True if this node has the specified attribute, False otherwise.


TXMLNode.HasChildNode
 VCL Reference

TXMLNode.HasChildNode

TXMLNode	See also

Indicates whether the node has a child node with the specified name.

function HasChildNode(const ChildTag, NamespaceURI: DOMString): Boolean; overload;

function HasChildNode(const ChildTag: DOMString): Boolean; overload;

Description

Applications can’t call the protected HasChildNode method. It is used internally to determine when the underlying DOM node has a child with the specified name.

ChildTag is the local tag name of the child to find.

NamespaceURI identifies the namespace in which ChildTag is defined.

HasChildNode returns True if the underlying DOM node includes the specified child node. Otherwise, it returns False.


TXMLNode.InternalAddChild
 VCL Reference

TXMLNode.InternalAddChild

TXMLNode	See also

Provides the underlying implementation for the AddChild method.

type TXMLNodeClass = class of TXMLNode;

function InternalAddChild(NodeClass: TXMLNodeClass; const NodeName, NamespaceURI: DOMString; Index: Integer): IXMLNode;

Description

Applications can’t call the protected InternalAddChild method. It is used internally to perform all the tasks common to the various overloads of the AddChild method. InternalAddChild creates a new element node as the child of this node and returns its interface.

NodeClass specifies the implementation class to use for the new child node. It must be TXMLNode or one of its descendants.

NodeName specifies the tag name of the newly created node.

NamespaceURI identifies the namespace that includes the new node’s definition.

Index indicates the position of the child node in this node’s list of children, where 0 is the first position, 1 is the second position, and so on. If Index is –1, the new node is added to the end.


TXMLNode.NextSibling
 VCL Reference

TXMLNode.NextSibling

TXMLNode	See also

Returns the next child of this node’s parent.

function NextSibling: IXMLNode;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected NextSibling method. NextSibling returns the node that follows this one in the parent node’s ChildNodes property list.

If this node is the last node in its parent’s child list, NextSibling raises an exception.


TXMLNode.NestingLevel
 VCL Reference

TXMLNode.NestingLevel

TXMLNode	See also

Returns the number of parents for this node in the node hierarchy.

function NestingLevel: Integer;

Description

Application’s can’t call the protected NestingLevel property. It is used internally when formatting the XML text that corresponds to this XML document.

NestingLevel returns the number of ancestors for this node in the node hierarchy.


TXMLNode.Normalize
 VCL Reference

TXMLNode.Normalize

TXMLNode	See also

Converts the subtree beneath this node to the structure it would have if it were just loaded from a document.

procedure Normalize;

Description

Use the IXMLNode interface to call the protected Normalize method. Normalize consolidates adjacent text nodes and remove any empty text nodes in the subtree beneath this node. This method ensures that for all child nodes of this node and of its attributes, only structure nodes (element nodes, comments, processing instructions, CDATA sections, and entity references) separate text nodes and that there are no empty text nodes.


TXMLNode.PreviousSibling
 VCL Reference

TXMLNode.PreviousSibling

TXMLNode	See also

Returns the previous child of this node’s parent.

function PreviousSibling: IXMLNode;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected PreviousSibling method. PreviousSibling returns the node that precedes this one in the parent node’s ChildNodes property list.

If this node is the first node in its parent’s child list, PreviousSibling raises an exception.


TXMLNode.RegisterChildNode
 VCL Reference

TXMLNode.RegisterChildNode

TXMLNode	See also

Registers a descendant of TXMLNode that can represent the children of this node.

type TXMLNodeClass = class of TXMLNode;

procedure RegisterChildNode(const TagName: DOMString; ChildNodeClass: TXMLNodeClass; NamespaceURI: DOMString = '');

Description

Applications can’t call the protected RegisterChildNode method. It is called by the RegisterChildNodes method to register a TXMLNode descendant so that it can be used as a child of this node. Each TXMLNode descendant is specific to the structure of the XML document, with properties that correspond to the child nodes and attributes of a node.

RegisterChildNode adds an entry to the ChildNodeClasses property for the specified node class and tag name.

TagName is the tag name of the child node that the class represents.

NodeClass is the TXMLNode descendant that implements child nodes that have the specified tag name.

NamespaceURI identifies the namespace in which TagName is defined.

Note:	RegisterChildNode raises an exception if this is a hosted node.


TXMLNode.RegisterChildNodes
 VCL Reference

TXMLNode.RegisterChildNodes

TXMLNode	See also

Registers a set of TXMLNode descendants that can represent the children of this node.

type TXMLNodeClass = class of TXMLNode;

procedure RegisterChildNodes(TagNames: array ofDOMString; const NodeClasses: array of TXMLNodeClass);

Description

Applications can’t call the protected RegisterChildNodes method. It is used in code that the XML Data Binding wizard generates to register the special TXMLNode descendants the are created for nodes in the XML document. Each of these descendant classes is specific to the structure of the XML document, with properties that correspond to the child nodes and attributes of the node.

RegisterChildNodes adds an entry to the ChildNodeClasses property for each specified node class and tag name.

TagNames is an array containing the names of the child nodes that the classes represent.

NodeClasses is an array containing the TXMLNode descendants that implement child nodes that have the tag names in the corresponding entries in TagNames.


TXMLNode.Resync
 VCL Reference

TXMLNode.Resync

TXMLNode	See also

Forces all child nodes and attribute nodes to be reread from the underlying DOM implementation.

procedure Resync;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected Resync method. Resync forces the node to reread the values of its child nodes and attribute nodes, discarding any changes that have not been propagated to the underlying DOM implementation.


TXMLNode.SetAttribute
 VCL Reference

TXMLNode.SetAttribute

TXMLNode	See also

Sets the value of one of this node’s attributes.

procecure SetAttribute(const AttrName: DOMString, const Value:OleVariant);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected SetAttribute method. SetAttribute sets the value of a specified attribute of this node.

AttrName is the name of the attribute. If the attribute already exists for the node, its value is changed. If the attribute does not already exist, a new attribute is created.

Value is the value to assign to the attribute. This value is a string that is not parsed. Any markup (for example, for an entity reference) is treated as literal text, and must include appropriate escape sequences. If Value is nil, the attribute is removed from this node. If Value is an empty string, the attribute is assigned an empty value.


TXMLNode.SetAttributeNodes
 VCL Reference

TXMLNode.SetAttributeNodes

TXMLNode	See also

Sets the value of the AttributeNodes property.

procecure SetAttributeNodes(const Value: IXMLNodeList); virtual;

Description

Applications can’t call this protected method. It is called internally the first time an application reads the AttributeNodes property to supply the interface that implements that property.


TXMLNode.SetAttributeNS
 VCL Reference

TXMLNode.SetAttributeNS

TXMLNode	See also

Sets the value of one of this node’s attributes when you must explicitly specify the attribute’s namespace.

procecure SetAttributeNS(const AttrName, NamespaceURI: DOMString, const Value:OleVariant);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected SetAttributeNS method. SetAttributeNS sets the value of a specified attribute of this node.

AttrName is the name of the attribute. If the attribute already exists for the node, its value is changed. If the attribute does not already exist, a new attribute is created.

NamespaceURI is the namespace for the attribute.

Value is the value to assign to the attribute. This value is a string that is not parsed. Any markup (for example, for an entity reference) is treated as literal text, and must include appropriate escape sequences. If Value is nil, the attribute is removed from this node. If Value is an empty string, the attribute is assigned an empty value.


TXMLNode.SetChildNodes
 VCL Reference

TXMLNode.SetChildNodes

TXMLNode	See also

Sets the value of the ChildNodes property.

procecure SetChildNodes(const Value: IXMLNodeList); virtual;

Description

Applications can’t call this protected method. It is called internally the first time an application reads the ChildNodes property to supply the interface that implements that property.


TXMLNode.SetChildValue
 VCL Reference

TXMLNode.SetChildValue

TXMLNode	See also

Sets the value of a specified child node.

procedure SetChildValue(const IndexOrName: OleVariant; const Value: OleVariant);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected SetChildValue method. SetChildValue sets the value of a specified child node to a specified value.

IndexOrName identifies the desired child node by either its interface, or by a string that is the local name of the child node. If IndexOrName does not identify a child of this node, SetChildValue raises an exception.

Value is the value to assign. It’s interpretation depends on the type of the child node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, SetChildValue raises an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

If the child node is any other node type, SetChildValue raises an exception.

Note:	Attributes are not considered child nodes of a node. To set the values of this node’s attributes, use the SetAttribute method instead.


TXMLNode.SetCollection
 VCL Reference

TXMLNode.SetCollection

TXMLNode	See also

Sets the value of the Collection property.

procecure SetCollection(const Value: TXMLNodeCollection);

Description

SetCollection assigns Value as the value of the Collection property. This protected method is called when this node is added to the collection specified by the Value property.

Value is a TXMLNodeCollection descendant that represents a repeating set of child nodes, of which this node is a member.


TXMLNode.SetNodeValue
 VCL Reference

TXMLNode.SetNodeValue

TXMLNode	See also

Sets the value of this node.

procedure SetNodeValue(const Value: OleVariant);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected SetNodeValue method. SetNodeValue sets the value of this node.

Value is the value to assign. It’s meaning depends on the type of the node, as indicated in the following table:

NodeType	Value

ntAttribute	The attribute value

ntElement	If the element contains only text, this is that text value. Otherwise, SetNodeValue raises an exception.

ntText	The text

ntCData	The content of the CDATA section.

ntProcessingInstr	The content of the processing instruction except for the target.

ntComment	The value (text) of the comment.

If the node is any other node type, SetNodeValue raises an exception.


TXMLNode.SetParentNode
 VCL Reference

TXMLNode.SetParentNode

TXMLNode	See also

Sets the value of the ParentNode property.

procedure SetParentNode(const Value: TXMLNode); virtual;

Description

Applications can’t use this protected property. It is used internally when nodes are added to the ChildNodes or AttributeNodes property.


TXMLNode.SetReadOnly
 VCL Reference

TXMLNode.SetReadOnly

TXMLNode	See also

Specifies whether the node can be modified.

procedure SetReadOnly(const Value: Boolean);

Description

SetReadOnly assigns the read-only status of the node.

Value is the new read-only status of the node. When Value is True, the node raises an EXMLDocError exception when an attempt is made to change its value, child nodes, or attributes. When Value is False, the node can be modified.


TXMLNode.SetText
 VCL Reference

TXMLNode.SetText

TXMLNode	See also

Sets the text value of the node.

function SetText(const Value: DOMString);

Description

Use the TXMLNode object’s IXMLNode interface to call the protected SetText method. SetText replaces the text of the node.

SetText is intended for use when the GetIsTextElement method returns True. If GetIsTextElement returns False, SetText adds a new text value to a node that has no children, otherwise, it raises an exception.


TXMLNode.TransformNode
 VCL Reference

TXMLNode.TransformNode

TXMLNode	See also

Transforms the subtree rooted at this node, using a specified XSL interface.

procedure TransformNode(const stylesheet: IXMLNode; var output: WideString); overload;

procedure TransformNode(const stylesheet: IXMLNode; const output: IXMLDocument); overload;

Description

Use the TXMLNode object’s IXMLNode interface to call the protected TransformNode method.

stylesheet is a node in an XML document that represents an XSL transformation. Typically, it is the document element of that document.

output represents the result of the transformation. If output is a WideString, TransformNode returns a string of XML. If output is the interface to an XML document, TransformNode replaces the content of that document with the results of the transformation.

Note:	TransformNode is only available when the DOMVendor used to parse this node’s XML document is MSXML.


Hierarchy

TObject

TInterfacedObject

TXMLNode


TXMLNodeList
 VCL Reference

TXMLNodeList

Hierarchy	Properties	Methods	See also

TXMLNodeList represents a set of nodes in an XML document.

Unit

XMLDoc

Description

TXMLNodeList is used to represent a set of related nodes (IXMLNode interfaces) in an XML document. For example, TXMLNodeList is used to represent all of the children of a node, or all of the attributes of a node, or all of the nodes in a collection of repeating nodes.

TXMLNodeList can be used to add or delete nodes from the collection, or to access specific nodes.

Typically, applications do not use TXMLNodeList directly. Instead, they access it through the IXMLNodeList interface.


 VCL Reference

TXMLNodeList properties

TXMLNodeList	Alphabetically 	Legend

In TXMLNodeList

Count

DefaultNamespaceURI

List

NotificationProc

Owner

UpdateCount

Derived from TInterfacedObject

RefCount


 VCL Reference

TXMLNodeList properties

TXMLNodeList	By object 	Legend

Count

DefaultNamespaceURI

List

NotificationProc

Owner

RefCount

UpdateCount


TXMLNodeList.Count
 VCL Reference

TXMLNodeList.Count

TXMLNodeList 	See also

Indicates the number of nodes in the collection.

property Count: Integer;

Description

Read Count to determine the number of nodes in the list. To change the value of Count, use the IXMLNodeList interface. Add nodes using the Add or Insert method, or remove them using the Delete or Remove method.


TXMLNodeList.DefaultNamespaceURI
 VCL Reference

TXMLNodeList.DefaultNamespaceURI

TXMLNodeList 	See also

Identifies the default Namespace for the nodes in this collection.

property DefaultNamespaceURI: DOMString;

Description

Read DefaultNamespaceURI to determine the namespace that is used by default when locating nodes in the list. The IndexOf, FindNode, and Delete methods all use this namespace when trying to match the name of a node if a namespace is not explicitly supplied.

The value of DefaultNamespaceURI is set by the TXMLNodeList constructor.


TXMLNodeList.List
 VCL Reference

TXMLNodeList.List

TXMLNodeList 	See also

Stores the interfaces for every node in the list.

property List: IInterfaceList;

Description

TXMLNodeList uses List internally to store and manage the interfaces to the nodes it represents.


TXMLNodeList.NotificationProc
 VCL Reference

TXMLNodeList.NotificationProc

TXMLNodeList 	See also

Specifies a callback that TXMLNodeList calls when nodes are added to or removed from the list, or when new nodes need to be created

property NotificationProc: TNodeListNotification;

Description

The node that instantiates TXMLNodeList to manage a set of its child or attribute nodes supplies the value of this callback to the TXMLNodeList constructor. TXMLNodeList then calls this callback when its methods are used to add, create, or remove nodes.


TXMLNodeList.Owner
 VCL Reference

TXMLNodeList.Owner

TXMLNodeList 	See also

Specifies the node that uses this TXMLNodeList object to manage a set of its child or attribute nodes.

property Owner: TXMLNode;

Description

Owner designates the node that instantiates TXMLNodeList to manage a set of its child or attribute nodes. This value is supplied to the TXMLNodeList constructor.


TXMLNodeList.UpdateCount
 VCL Reference

TXMLNodeList.UpdateCount

TXMLNodeList 	See also

Indicates the number of times an application has called BeginUpdate without a matching call to EndUpdate.

property UpdateCount: Integer;

Description

UpdateCount keeps track of whether all update operations have been completed. When an application starts making changes to the list, it calls BeginUpdate, which increments UpdateCount. When those changes are complete, it calls EndUpdate, which decrements UpdateCount. Thus, UpdateCount allows calls to BeginUpdate and EndUpdate to be nested.

Applications can avoid responding to updates in a piecemeal fashion by checking UpdateCount and only responding when it is 0. For example, the callback that is supplied to the TXMLNodeList constructor typically checks UpdateCount before responding to change notifications.


 VCL Reference

TXMLNodeList methods

TXMLNodeList	Alphabetically	Legend

In TXMLNodeList

Add

BeginUpdate

Clear

Create

Delete

DoNotify

EndUpdate

FindNode

FindSibling

First

Get

GetCount

GetNode

GetUpdateCount

IndexOf

Insert

InternalInsert

Last

Remove

ReplaceNode

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TXMLNodeList methods

TXMLNodeList	By object	Legend

Add

AfterConstruction

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

DoNotify

EndUpdate

FieldAddress

FindNode

FindSibling

First

Free

FreeInstance

Get

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNode

GetUpdateCount

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

InternalInsert

Last

MethodAddress

MethodName

NewInstance

Remove

ReplaceNode

SafeCallException


TXMLNodeList.Add
 VCL Reference

TXMLNodeList.Add

TXMLNodeList	See also

Adds a new node to the end of the list.

function Add(const Node: IXMLNode): Integer;

Description

Call Add to add a node to the end of the list. Add returns the index of the node once it is added, where 0 is the index of the first node in the list, 1 is the index of the second node, and so on.

Node is the node to add to the list.


TXMLNodeList.BeginUpdate
 VCL Reference

TXMLNodeList.BeginUpdate

TXMLNodeList	See also

Increments the value of UpdateCount.

procedure BeginUpdate;

Description

Call BeginUpdate before making several changes to the nodes in the list (such as adding or removing several nodes). BeginUpdate increments the UpdateCount property, to keep track of the fact that the list is in the middle of an update. When the update is complete, call EndUpdate to decrement the UpdateCount property.

Every call to BeginUpdate should be matched by a call to EndUpdate, so that the UpdateCount property accurately reflects whether an update operation is underway.


TXMLNodeList.Clear
 VCL Reference

TXMLNodeList.Clear

TXMLNodeList	See also

Removes all nodes from the list.

procedure Clear;

Description

Call Clear to empty the list.

Note:	Clear does not call the BeginUpdate and EndUpdate methods. NotificationProc is called for every node in the list as it is removed.


TXMLNodeList.Create
 VCL Reference

TXMLNodeList.Create

TXMLNodeList	See also

Instantiates a TXMLNodeList object.

constructor Create(AOwner: TXMLNode; const DefaultNamespaceURI: DOMString; NotificationProc: TNodeListNotification);

Description

Createinstantiates a new TXMLNodeList object. Typically, TXMLNodeList is created by another object that represents a node. The TXMLNodeList represents a set of nodes that are of interest to the other object that creates it.

AOwner is the node that creates TXMLNodeList to represent a set of its child nodes or attributes.

DefaultNamespaceURI identifies the namespace that is used by default for nodes added to this list when no namespace is explicitly specified.

NotificationProc is a callback that TXMLNodeList calls when nodes are added to or removed from the list, or when new nodes need to be created.


TXMLNodeList.Delete
 VCL Reference

TXMLNodeList.Delete

TXMLNodeList	See also

Removes a specified node from the list.

function Delete(const Name: DOMString): Integer; overload;

function Delete(const Name, NamespaceURI: DOMString): Integer; overload;

function Delete(const Index: Integer): Integer; overload;

Description

Delete removes the node specified by the Index or Name parameter.

Name identifies the node to remove from the list. This is the local name of the node to remove.

NamespaceURI identifies the namespace to use when interpreting Name. If the node is identified by Name, but no NamespaceURI parameter is provided, Delete uses DefaultNamespaceURI.

Index identifies the node to remove by index rather than name. Index ranges from 0 to one less than the value of the Count property.

Delete returns the index of the node that was removed. If there was no node that matched the value of Index or Name, Delete returns –1.


TXMLNodeList.DoNotify
 VCL Reference

TXMLNodeList.DoNotify

TXMLNodeList	See also

Executes the callback specified by NotificationProc.

function DoNotify(Operation: TNodeListOperation; const Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean): IXMLNode;

Description

DoNotify executes the callback that is assigned to NotificationProc when the list adds, deletes, or needs to create nodes in the list. The parameters are supplied as parameters to the callback, and DoNotify returns the node that was added, deleted, or created.

Operation indicates what change is about to occur or has just occurred.

Node is the node that is being added or removed from the list, or that acts as a parent if the callback must create a node (when Operation is nlCreateNode).

IndexOrName is the name of the node to be created when Operation is nlCreateNode. Otherwise, it is the name or index of the node being deleted or added.

BeforeOperation indicates whether the call occurs before the indicated operation or after. When nodes are inserted and removed, a call is made first with BeforeOperation set to True, then the operation occurs, and then a second callback is made with BeforeOperation set to False. When nodes must be created, only one call is made, with BeforeOperation set to True.


TXMLNodeList.EndUpdate
 VCL Reference

TXMLNodeList.EndUpdate

TXMLNodeList	See also

Decrements the value of UpdateCount.

procedure BeginUpdate;

Description

Call EndUpdate after making several changes to the nodes in the list (such as adding or removing several nodes). EndUpdate decrements the UpdateCount property, which was incremented by a previous call to BeginUpdate.

Every call to BeginUpdate should be matched by a call to EndUpdate, so that the UpdateCount property accurately reflects whether an update operation is underway.


TXMLNodeList.FindNode
 VCL Reference

TXMLNodeList.FindNode

TXMLNodeList	See also

Returns a specified node from the list.

function FindNode(NodeName: DOMString): IXMLNode; overload;

function FindNode(NodeName, NamespaceURI: DOMString): IXMLNode; overload;

function FindNode(ChildNodeType TGuid): IXMLNode; overload;

Description

Call FindNode to access a particular node in the list.

NodeName is the node to access. It specifies the LocalName property of the desired node.

NamespaceURI identifies the namespace that qualifies NodeName. It is the same as the NamespaceURI property of the desired node. If the first syntax is used (omitting NamespaceURI), FindNode uses the value of the DefaultNamespaceURI property.

ChildNodeType identifies the node to access by its interface type (GUID), rather than by name. When using ChildNodeType, FindNode returns the first child node it finds that implements the specified interface.

FindNode returns the interface for the node if it is in the list. If NodeName or ChildNodeType does not specify a node in the list, FindNode returns nil.


TXMLNodeList.FindSibling
 VCL Reference

TXMLNodeList.FindSibling

TXMLNodeList	See also

Returns a node that appears a specified amount before or after another node.

function FindSibling(const Node: IXMLNode; Delta: Integer): IXMLNode;

Description

Call FindSibling to access the node whose position has a specified relationship to another node.

Node is a node in the list to use as a reference point.

Delta indicates where the desired node appears, relative to Node. If Delta is positive, FindSibling returns the node that appears Delta positions after Node. If Delta is negative, FindSibling returns a node that appears before Node.

FindSibling returns the node that appears at the position offset by Delta, relative to the position of Node. If Delta specifies a position before the first node or after the last node in the list, FindSibling returns nil.


TXMLNodeList.First
 VCL Reference

TXMLNodeList.First

TXMLNodeList	See also

Returns the first node in the list.

function First: IXMLNode;

Description

Call First to access the first node in the list. If the list is empty, First raises an exception.


TXMLNodeList.Get
 VCL Reference

TXMLNodeList.Get

TXMLNodeList	See also

Returns a specified node in the list.

function Get(Index: Integer): IXMLNode;

Description

Call Get to retrieve a node from the list, given its index.

Index specifies the node to fetch, where 0 identifies the first node, 1 identifies the second node, and so on. Index should be less than the value of the Count property.


TXMLNodeList.GetCount
 VCL Reference

TXMLNodeList.GetCount

TXMLNodeList	See also

Returns the number of nodes in the list.

function GetCount: Integer;

Description

GetCount is the read implementation of the Count property.


TXMLNodeList.GetNode
 VCL Reference

TXMLNodeList.GetNode

TXMLNodeList	See also

Returns a specified node from the list.

function GetNode(const IndexOrName: OleVariant): IXMLNode;

Description

GetNode returns the interface to a node that is identified by name or by position.

IndexOrName identifies the desired node. It can be

The index of the node, where 0 is the index of the first node, 1 is the index of the second node, and so on.

The LocalName property of a node in the list.

If IndexOrName does not identify a node in the list, GetNode tries to create a new node with the name specified by IndexOrName. If it can’t create the new node, GetNode raises an exception.


TXMLNodeList.GetUpdateCount
 VCL Reference

TXMLNodeList.GetUpdateCount

TXMLNodeList	See also

Returns the value of the UpdateCount property.

function GetUpdateCount: Integer;

Description

GetUpdateCount is the read implementation of the UpdateCount property.


TXMLNodeList.IndexOf
 VCL Reference

TXMLNodeList.IndexOf

TXMLNodeList	See also

Returns the index of a specified node.

function IndexOf(const Name: DomString): Integer; overload;

function IndexOf(const Name, NamespaceURI: DomString): Integer; overload;

function IndexOf(const Node: IXMLNode): Integer; overload;

Description

Call IndexOf to locate a node in the list. You can specify which node to locate using its name or its interface.

Name is the LocalName property of the node to locate.

NamespaceURI identifies the namespace to use when interpreting LocalName. If Name is used without a NamespaceURI parameter (the first syntax), IndexOf uses the value of the DefaultNamespaceURI property.

Node is the interface of the node to locate.

IndexOf returns the index of the specified node, where 0 is the index of the first node, 1 is the index of the second node, and so on. If the specified node is not in the list, IndexOf returns -1.


TXMLNodeList.Insert
 VCL Reference

TXMLNodeList.Insert

TXMLNodeList	See also

Inserts a new node into a specified position in the list.

procedure Insert(Index: Integer; const Node: IXMLNode);

Description

Call Insert to add a node at the position specified by Index.

Index specifies where to insert the node, where 0 is the first position, 1 is second position, and so on. If Index does not specify a valid index, Insert raises an exception.

Node is the node to add to the list.


TXMLNodeList.InternalInsert
 VCL Reference

TXMLNodeList.InternalInsert

TXMLNodeList	See also

Provides the underlying implementation of the Insert method

function InternalInsert(Index: Integer; const Node: IXMLNode): Integer;

Description

The Insert method calls InternalInsert to add a node at the position specified by Index.

Index specifies where to insert the node, where 0 is the first position, 1 is second position, and so on. If Index is –1, the node is added to the end of the list.

Node is the node to add to the list.

InternalInsert returns the index of the node after it is inserted. This is the same as the Index parameter when Index is not –1.


TXMLNodeList.Last
 VCL Reference

TXMLNodeList.Last

TXMLNodeList	See also

Returns the last node in the list.

function Last: IXMLNode;

Description

Call Last to access the last node in the list. If the list is empty, Last raises an exception.


TXMLNodeList.Remove
 VCL Reference

TXMLNodeList.Remove

TXMLNodeList	See also

Removes a specified node from the list.

function Remove(const Node: IXMLNode): Integer;

Description

Remove removes the specified node from the list.

Node is the node to remove from the list.

Remove returns the index of Node before it was removed. If node is not a node in the list, Remove returns -1.


TXMLNodeList.ReplaceNode
 VCL Reference

TXMLNodeList.ReplaceNode

TXMLNodeList	See also

Replaces a node in the list with another node.

function ReplaceNode(const OldNode, NewNode: IXMLNode): IXMLNode;

Description

Call ReplaceNode to replace the node specified by OldNode with the node specified by NewNode.

OldNode is the node to replace. If OldNode does not appear in the list, then ReplaceNode adds the new node to the end of the list.

NewNode is the node to add to the list in place of OldNode.

ReplaceNode returns OldNode (even if OldNode did not appear in the list).


Hierarchy

TObject

TInterfacedObject

TXMLNodeList


TXMLParams
 VCL Reference

TXMLParams

Hierarchy	Properties	Methods	See also

TXMLParams manages a list of parameters for an XML broker.

Unit

XMLBrokr

Description

XML brokers use TXMLParams to manage a list of parameters that it passes to a provider on the application server. These parameters supply values to a query or stored procedure on the application server, or limit the records provided from a table on the application server.

Use the properties and methods of TXMLParams to:

Access a specific parameter.

Add or delete parameters from the list.

Get or set the values of individual parameters.

Assign parameter values from a list such as the one supplied in a request message from a Web browser.

Compare parameters.

Iterate through all parameters.

Copy a set of parameters to another parameter list.


 VCL Reference

TXMLParams properties

TXMLParams	Alphabetically	Legend

Derived from TParams

Items

ParamValues

Derived from TCollection

Count

ItemClass


 VCL Reference

TXMLParams properties

TXMLParams	By object	Legend

Count

ItemClass

Items

ParamValues


 VCL Reference

TXMLParams methods

TXMLParams	Alphabetically	Legend

In TXMLParams

AssignStrings

Derived from TParams

AddParam

AssignValues

Create

CreateParam

FindParam

GetParamList

IsEqual

ParamByName

ParseSQL

RemoveParam

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXMLParams methods

TXMLParams	By object	Legend

Add

AddParam

AfterConstruction

Assign

AssignStrings

AssignValues

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateParam

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

FindParam

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParamList

InheritsFrom

InitInstance

Insert

InstanceSize

IsEqual

MethodAddress

MethodName

NewInstance

ParamByName

ParseSQL

RemoveParam

SafeCallException


TXMLParams.AssignStrings
 VCL Reference

TXMLParams.AssignStrings

TXMLParams	See also	Example

Assigns values to the parameters from a list of name/value pairs.

procedure AssignStrings(Value: TStrings);

Description

Use AssignStrings to update the values of the parameters in the Items list to match the values in the list specified by Value. For each string in Value of the form Name=Value, AssignStrings locates the parameter (if any) that has the same name as the name portion of the string. It then assigns the Value portion of the string as the parameter’s value.

AssignStrings makes it very convenient to assign parameter values that are received as the content of a request message. In particular, TSubmitQueryButton generates an HTML control that sends the values in an HTML query form to the Web application. If the query form displays parameter values that should be sent to a provider on the application server, you can call AssignStrings with the ContentFields property of that Web request message.


Hierarchy

TObject

TPersistent

TCollection

TParams

TXMLParams


TXMLTransformProvider
 VCL Reference

 TXMLTransformProvider

Hierarchy	Properties 	Methods 	Events	Using TXMLTransformProvider	See also

TXMLTransformProvider provides data from and resolves updates to an XML document.

Unit

Xmlxform

Description

Use TXMLTransformProvider to provide data from an XML document to a client dataset or XML broker and to resolve updates from that client dataset or XML broker back to the source XML document. TXMLTransformProvider can be a part of the same application as the client dataset or XML broker, or it can be placed in the application server of a multi-tiered application.  It serves as a translator between an XML document and a client dataset.

TDataSetProvider packages data from the source XML document and passes it in one or more transportable data packets to the client dataset or XML broker.

When the provider supplies data to a client dataset, the client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the source XML document.

When the provider supplies data to an XML broker, the XML broker adds the data packet, in XML format, to an HTML document that is downloaded by a Web client. When the XML broker receives updates from the Web client, it sends the updates to the provider, which applies them to the source XML document.

Client datasets and XML brokers communicate with a provider through the IAppServer interface. In multi-tiered applications, this is the interface of the remote data module that contains the provider. To enable the remote data module to pass calls to the provider, the provider’s Exported property must be True, and its Owner property must specify the remote data module.


 VCL Reference

TXMLTransformProvider properties

TXMLTransformProvider	Alphabetically	Legend

In TXMLTransformProvider

CacheData

TransformRead

TransformWrite

XMLDataFile

Derived from TCustomProvider

Data

Exported

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLTransformProvider properties

TXMLTransformProvider	By object	Legend

CacheData

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

Exported

Name

Owner

Tag

TransformRead

TransformWrite

VCLComObject

XMLDataFile


TXMLTransformProvider.CacheData
 VCL Reference

TXMLTransformProvider.CacheData

TXMLTransformProvider 	See also

Specifies whether the provider caches the data packet internally in memory.

property CacheData: Boolean;

Description

Set CacheData to True to specify that the provider should cache its data packet in memory after the first time it is read from the source XML document. When CacheData is False, every time the Data property is read, the GetRecords method is called, or updates are applied, the provider must reread the source document specified by XMLDataFile.

Caching the data improves performance on subsequent data fetches or when applying updates, but consumes additional resources.


TXMLTransformProvider.TransformRead
 VCL Reference

TXMLTransformProvider.TransformRead

TXMLTransformProvider 	See also

Specifies the TXMLTransform component that converts the source XML document into data packets.

property TransformRead: TXMLTransform;

Description

Use TransformRead to access the subcomponent that transforms the source XML document into the data packet that is the value of the Data property. Before you can use TXMLTransformProvider, you must specify the transformation that this subcomponent uses by setting its TransformationFile or TransformationDocument property. In addition, if the transformation includes any user-defined nodes, you must supply TransformRead with an OnTranslate event handler.


TXMLTransformProvider.TransformWrite
 VCL Reference

TXMLTransformProvider.TransformWrite

TXMLTransformProvider 	See also

Specifies the TXMLTransform component that generates the new value of the source XML document when updates are applied.

property TransformWrite: TXMLTransform;

Description

Use TransformWrite to access the subcomponent that transforms a data packet back into the format required by the source XML document. When a client calls the ApplyUpdates method, the delta packet is merged into the transformed data from the XML document, and then TransformWrite converts the resulting dataset into the format of the source XML document.

Before you can use TXMLTransformProvider to apply updates, you must specify the transformation that this subcomponent uses by setting its TransformationFile or TransformationDocument property. In addition, if the transformation includes any user-defined nodes, you must supply TransformWrite with an OnTranslate event handler.


TXMLTransformProvider.XMLDataFile
 VCL Reference

TXMLTransformProvider.XMLDataFile

TXMLTransformProvider	See also

Specifies the XML document from which the provider creates data packets and to which it applies updates.

property XMLDataFile: string;

Description

Use XMLDataFile to specify the XML document whose data the provider represents. When the Data property is read or the GetRecords method is called, TXMLTransformProvider reads the contents of XMLDataFile and converts it into a data packet using the transform component specified by TransformRead. When the ApplyUpdates method is called, TXMLTransformProvider uses the transform component specified by TransformWrite to convert the data into the proper format for XMLDataFile and updates this XML document accordingly.

XMLDataFile is the same as the SourceXmlFile property of TransformRead.


 VCL Reference

TXMLTransformProvider events

TXMLTransformProvider	Alphabetically	Legend

Derived from TCustomProvider

AfterApplyUpdates

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 VCL Reference

TXMLTransformProvider events

TXMLTransformProvider	By object	Legend

AfterApplyUpdates

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 VCL Reference

TXMLTransformProvider methods

TXMLTransformProvider	Alphabetically	Legend

In TXMLTransformProvider

Create

Derived from TCustomProvider

ApplyUpdates

DataRequest

Destroy

Execute

GetParams

GetRecords

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLTransformProvider methods

TXMLTransformProvider	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataRequest

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParams

GetParentComponent

GetRecords

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction


TXMLTransformProvider.Create
 VCL Reference

TXMLTransformProvider.Create

TXMLTransformProvider	See also

Creates and initializes a TXMLTransformProvider object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an XML transform provider at runtime. Providers placed in forms or data modules at design time are created automatically.

The AOwner parameter specifies another component (typically a form or data module) that is responsible for freeing the provider.


Hierarchy

TObject

TPersistent

TComponent

TCustomProvider

TXMLTransformProvider


TXMLTransform
 VCL Reference

 TXMLTransform

Hierarchy	Properties	Methods	Events	Using TXMLTransform	See also

TXMLTransform converts an XML document into a data packet or an XML data packet into an XML document with another structure.

Unit

Xmlxform

Description

Use TXMLTransform to convert an XML document into a data packet or an XML data packet into an XML document that is not a data packet. You can use a TXMLTransform component by itself, or specify the transformation to be performed on a TXMLTransform component that is part of another component such as TXMLTransformClient or TXMLTransformProvider.

TXMLTransform uses a special XML document called a transformation, which indicates how to perform the conversion. This transformation is specified by the TransformationFile or TransformationDocument property. You can generate a transformation file using the xmlmapper.exe utility.

There are three ways to specify the source document or data packet that TXMLTransform converts:

Use the SourceXmlFile property if the source document is a file on disk.

Use the SourceXml property if the source document is an in-memory string of XML.

Use the SourceXmlDocument property if the source document is available through a DOM interface (IDOMDocument).

TXMLTransform performs its transformation when you read the Data property or call the TransformXML method. Once the source XML has been transformed, you can access the DOM interface for the resulting XML document or data packet using the ResultDocument property, or read the Data property to directly access the string of XML.


 VCL Reference

TXMLTransform properties

TXMLTransform	Alphabetically	Legend

In TXMLTransform

Data

EmptyDestinationDocument

ResultDocument

ResultString

SourceXml

SourceXmlDocument

SourceXmlFile

TransformationDocument

TransformationFile

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLTransform properties

TXMLTransform	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

EmptyDestinationDocument

Name

Owner

ResultDocument

ResultString

SourceXml

SourceXmlDocument

SourceXmlFile

Tag

TransformationDocument

TransformationFile

VCLComObject


TXMLTransform.Data
 VCL Reference

TXMLTransform.Data

TXMLTransform	See also

Represents the translated string of XML.

property Data: string;

Description

Read Data to obtain the results of the transformation. Reading the Data property causes TXMLTransform to translate its source XML document or data packet into the destination format, which becomes the value of the Data property. The resulting XML string is not cached in memory: reading Data a second time causes TXMLTransform to perform its transformation a second time.

If the source XML is an XML document and the transformation indicates how to convert it into a data packet, Data is the contents of a data packet in XML format.

If the source XML is an XML data packet and the transformation indicates how to convert it into another type of XML document, Data is the contents of the resulting document.

There are three ways to specify the source document or data packet that is converted to produce Data:

Use the SourceXmlFile property if the source document is a file on disk.

Use the SourceXml property if the source document is an in-memory string of XML.

Use the SourceXmlDocument property if the source document is available through a DOM interface (IDOMDocument).

If SourceXMLFile is set to an invalid file name or SourceXMLFile is an empty string and SourceXml is not a valid string of XML, or SourceXMLFile and SourceXML are both empty strings and SourceXmlDocument is not set, TXMLTransform raises a TranslateException when you try to read Data.

There are two ways to specify the transformation that converts the source XML into Data:

Use the TransformationFile property if the transformation is stored in a file on disk.

Use the TransformationDocument method if the transformation is available through a DOM interface (IDOMDocument).

If TransformationFile is set to an invalid file name or TransformationFile is an empty string and TransformationDocument is not set, TXMLTransform raises a TranslateException when you try to read Data.

You can augment the transformation by using the EmptyDestinationDocument property to supply a skeleton document that has the form that the resulting XML document should take.

When you read Data, for every user-defined node in the source XML document, TXMLTransform generates an OnTranslate event to convert the node.

Tip:	When converting an XML document into a data packet, the value of Data can be assigned to a client dataset’s XMLData property.


TXMLTransform.EmptyDestinationDocument
 VCL Reference

TXMLTransform.EmptyDestinationDocument

TXMLTransform	See also

Specifies the DOM interface for an XML document that defines the structure of the transformation result.

property EmptyDestinationDocument: IDOMDocument;

Description

The transformation defined by TransformationFile or TransformationDocument contains a default structure for the results of transforming the source document in addition to the mappings between nodes in the source document and nodes in the destination. You can override this default structure, however, by setting EmptyDestinationDocument. This is the DOM interface for an XML document that has the desired structure, but with no values in the nodes that should be filled in using values in the source document. This is useful, for example, when you want to add additional information that does not come from the source document.

EmptyDestinationDocument is not changed when TXMLTransform performs its transformation. To obtain a DOM interface for the resulting document, use the ResultDocument property.


TXMLTransform.ResultDocument
 VCL Reference

TXMLTransform.ResultDocument

TXMLTransform	See also

Specifies the DOM interface for the results of the transformation.

property ResultDocument: IDOMDocument;

Description

Read ResultDocument to work with the results of the transformation using a DOM interface. ResultDocument is created you call the TransformXML method to perform the transformation.


TXMLTransform.ResultString
 VCL Reference

TXMLTransform.ResultString

TXMLTransform	See also

Specifies the results of the transformation.

property ResultString: string;

Description

Read ResultString to obtain the results of the transformation as a string of XML. ResultString is created you call the TransformXML method to perform the transformation.


TXMLTransform.SourceXml
 VCL Reference

TXMLTransform.SourceXml

TXMLTransform	See also

Specifies a string of XML to be translated.

property SourceXml: string;

Description

Specify the XML to be translated as the value of SourceXml. SourceXml can be the text of any XML document, including an XML data packet. It must, however, conform to the schema expected by the transformation specified by TransformationFile or TransformationDocument: If the transformation converts a specific type of XML document into a data packet, then SourceXml must conform to the expected schema. If the transformation converts a data packet into an XML document, then SourceXml is an XML data packet with the expected metadata.

SourceXmlDocument is used only if the SourceXMLFile property has not been set. If both SourceXMLFile and SourceXml are empty strings, TXMLTransform uses the SourceXmlDocument property instead. SourceXml takes precedence over SourceXmlDocument: If SourceXmlDocument is set, TXMLTransform still uses SourceXml (even if its value is not a valid string of XML).


TXMLTransform.SourceXmlDocument
 VCL Reference

TXMLTransform.SourceXmlDocument

TXMLTransform	See also

Specifies the DOM interface for the XML document to be converted.

property SourceXmlDocument: IDOMDocument;

Description

Specify the document to be translated as the value of SourceXmlDocument. SourceXmlDocument can be any type of XML document, including an XML data packet. It must, however, conform to the schema expected by the transformation specified by TransformationFile or TransformationDocument : If the transformation converts a specific type of XML document into a data packet, then SourceXmlDocument is a document with the expected schema. If the transformation converts a data packet into an XML document, then SourceXmlDocument is the interface to an XML data packet with the expected metadata.

SourceXmlDocument is used only if the SourceXMLFile and SourceXml properties have not been set.


TXMLTransform.SourceXmlFile
 VCL Reference

TXMLTransform.SourceXmlFile

TXMLTransform	See also

Specifies an XML document or XML data packet file to be translated.

property SourceXmlFile: string;

Description

Specify the file to be translated as the value of SourceXmlFile. SourceXmlFile can be any type of XML document, including an XML data packet. It must, however, conform to the schema expected by the transformation specified by TransformationFile or TransformationDocument: If the transformation converts a specific type of XML document into a data packet, then SourceXmlFile is a document with the expected schema. If the transformation converts a data packet into an XML document, then SourceXmlFile is an XML data packet with the expected metadata.

If SourceXmlFile is an empty string, TXMLTransform uses the SourceXml or SourceXmlDocument property instead. SourceXmlFile takes precedence over both these other properties: If SourceXml or SourceXmlDocument is set, TXMLTransform still uses SourceXmlFile (even if it does not specify a valid file name).


TXMLTransform.TransformationDocument
 VCL Reference

TXMLTransform.TransformationDocument

TXMLTransform	See also

Specifies the transformation that indicates how to convert the source XML document.

property TransformationDocument: IDOMDocument;

Description

TransformationDocument is the DOM interface for the transformation that contains instructions for converting the source XML document into the XML that is the value of Data and ResultDocument.

A transformation is a special type of XML document that defines the mapping between the nodes of a source document and a destination document and the structure of the destination document. Each transformation is specific to a particular XML schema and data packet format and represents a one-way transformation. Use the xmlmapper.exe utility to create transformations.

If the EmptyDestinationDocument property is set, TXMLTransform uses that to override the default structure for the destination document that is defined in TransformationDocument.

TransformationDocument is only used if the value of TransformationFile is an empty string.


TXMLTransform.TransformationFile
 VCL Reference

TXMLTransform.TransformationFile

TXMLTransform	See also

Specifies the transformation file that indicates how to convert the source XML document.

property TransformationFile: string;

Description

TransformationFile is a transformation file that contains instructions for converting the source XML document into the XML that is the value of Data and ResultDocument. If the source document is a general XML document, TransformationFile represents a transformation from that document’s schema into a data packet. If the source document is an XML data packet, TransformationFile represents a transformation from that data packet into another type of XML document.

A transformation file is a special type of XML file with the .xtr extension. Each transformation file is specific to a particular XML schema and data packet format and represents a one-way transformation. Use the xmlmapper.exe utility to create transformation files.

If the EmptyDestinationDocument property is set, TXMLTransform uses that to override the default structure for the destination document that is defined in the transformation file.

TransformationFile takes precedence over the TransformationDocument property. That is, TXMLTransform only uses TransformationDocument if TransformationFile is an empty string.


 VCL Reference

TXMLTransform events

TXMLTransform	Alphabetically	Legend

In TXMLTransform

AfterEachRow

AfterEachRowSet

BeforeEachRow

BeforeEachRowSet

OnTranslate


 VCL Reference

TXMLTransform events

TXMLTransform	By object	Legend

AfterEachRow

AfterEachRowSet

BeforeEachRow

BeforeEachRowSet

OnTranslate


TXMLTransform.AfterEachRow
 VCL Reference

TXMLTransform.AfterEachRow

TXMLTransform	See also

Occurs after TXMLTransform has finished transforming a record in the XML data packet.

property AfterEachRow: TRowEvent;

Description

Write an AfterEachRow event handler to take specific action after the XML transform component has translated each row in the data packet. For example, you can use AfterEachRow to read the data from the generated row and use it to compute the value of an internally calculated field.


TXMLTransform.AfterEachRowSet
 VCL Reference

TXMLTransform.AfterEachRowSet

TXMLTransform	See also

Occurs after TXMLTransform has finished transforming the entire XML data packet or a nested detail set.

property AfterEachRowSet: TRowEvent;

Description

Write an AfterEachRowSet event handler to take specific action after the XML transform component has translated an entire dataset. This can be a nested detail set, or the entire XML data packet.

For example, you can use AfterEachRowSet with the BeforeEachRowSet and OnTranslate methods to compute summary values: initialize a variable in the BeforeEachRowSet method, update it for every OnTranslate event, and use the result in the AfterEachRowSet event.


TXMLTransform.BeforeEachRow
 VCL Reference

TXMLTransform.BeforeEachRow

TXMLTransform	See also

Occurs immediately before TXMLTransform starts transforming a record in the XML data packet.

property BeforeEachRow: TRowEvent;

Description

Write a BeforeEachRow event handler to take specific action before the XML transform component starts translating each row in the data packet.


TXMLTransform.BeforeEachRowSet
 VCL Reference

TXMLTransform.BeforeEachRowSet

TXMLTransform	See also

Occurs immediately before TXMLTransform starts transforming the entire XML data packet or a nested detail set.

property BeforeEachRowSet: TRowEvent;

Description

Write an BeforeEachRowSet event handler to take specific action before the XML transform component starts translating a dataset. This can be a nested detail set, or the entire XML data packet.

For example, you can use BeforeEachRowSet with the AfterEachRowSet and OnTranslate methods to compute summary values: initialize a variable in the BeforeEachRowSet method, update it for every OnTranslate event, and use the result in the AfterEachRowSet event.


TXMLTransform.OnTranslate
 VCL Reference

TXMLTransform.OnTranslate

TXMLTransform	See also 	Example

Occurs when the TXMLTransform component needs to translate a user-defined node.

property OnTranslate: TTranslateEvent;

Description

Write an OnTranslate event handler to provide the translation for user-defined nodes.

TXMLTransform performs a translation when an application reads the Data property or calls the TransformXML method. If the transformation document that governs how to perform that translation indicates that a node in the XML document is user-defined, TXMLTransform generates an OnTranslate event when it needs to translate to or from that node. OnTranslate only occurs for nodes that are marked as user defined.

If you do not translate a user-defined node in an OnTranslate event handler, the corresponding node in the translated XML is assigned the source XML node’s value, if available. Otherwise, it is left blank.


 VCL Reference

TXMLTransform methods

TXMLTransform	Alphabetically	Legend

In TXMLTransform

TransformXML

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLTransform methods

TXMLTransform	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

TransformXML

UpdateAction


TXMLTransform.TransformXML
 VCL Reference

TXMLTransform.TransformXML

TXMLTransform	See also

Converts an XML document using the specifications in a transformation file.

function TransformXML(const SourceXml: string; const ATransformationFile: string = ''): string;

Description

Call TransformXML to convert an XML document when the source XML is an in-memory string.

SourceXml is a string of XML to be transformed. It can be any type of XML document, including an XML data packet. It must, however, conform to the schema expected by the transformation document used to perform the transformation. If the transformation converts a specific type of XML document into a data packet, then SourceXml must conform to the expected schema. If the transformation converts a data packet into an XML document, then SourceXml must be an XML data packet with the expected metadata.

ATransformationFile is the transformation file to use when performing the translation. A transformation file is a special type of XML file with the .xtr extension. Each transformation file is specific to a particular XML schema and data packet format and represents a one-way transformation. Use the xmlmapper.exe utility to create transformation files.

If the ATransformationFile parameter is omitted, TransformXML uses the file specified by the TransformationFile property, or the document specified by the TransformationDocument property.

TransformXML returns the results of the conversion as a string of XML.


Hierarchy

TObject

TPersistent

TComponent

TXMLTransform


TXMLTransformClient
 VCL Reference

 TXMLTransformClient

Hierarchy	Properties	Methods	Using TXMLTransformClient	See also

TXMLTransformClient acts as an adapter between an XML document and a provider component.

Unit

Xmlxform

Description

Use TXMLTransformClient to convert the data from a provider into an XML document or to apply updates in the form of an XML document to a provider component. TXMLTransformClient can act as the client of any provider component, local or remote. It uses a transformation file that is generated using the xmlmapper.exe utility to convert between XML documents and the data packets and delta packets used by the provider.


 VCL Reference

TXMLTransformClient properties

TXMLTransformClient	Alphabetically	Legend

In TXMLTransformClient

ProviderName

RemoteServer

TransformApplyUpdates

TransformGetData

TransformSetParams

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TXMLTransformClient properties

TXMLTransformClient	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

ProviderName

RemoteServer

Tag

TransformApplyUpdates

TransformGetData

TransformSetParams

VCLComObject


TXMLTransformClient.ProviderName
 VCL Reference

TXMLTransformClient.ProviderName

TXMLTransformClient	See also

Specifies the name of a provider component that supplies data to and applies updates from the XML transform client.

property ProviderName: string;

Description

Use ProviderName to specify the provider object that supplies the XML transform client with data packets and applies updates on its behalf. This property is passed as a parameter to IAppServer interface calls when the client fetches data from or applies updates to the source dataset, its database server, or the source XML document.

The provider specified by ProviderName can reside in the same application as the XML transform client or in an application server running on another system.

If the provider is in the same application as the XML transform client, it must have the same Owner as the client.

If the provider is on a remote application server, it must be exported by that application server. If the application server contains multiple provider objects, you can set ProviderName to any of them once the XML transform client establishes an initial connection to the application server through its RemoteServer property. If the connection component is a Web connection or socket connection, or if the application server is registered on the client system (using TRegsvr.exe), ProviderName can be set from a drop-down in the Object Inspector once the RemoteServer property is set.


TXMLTransformClient.RemoteServer
 VCL Reference

TXMLTransformClient.RemoteServer

TXMLTransformClient	See also

Specifies the connection component that this XML transform client uses to connect to an application server.

property RemoteServer: TCustomRemoteServer;

Description

If the XML transform client is in the client portion of a multi-tiered application, use RemoteServer to specify the connection component that connects to the application server. The connection component locates the application server and obtains its IAppServer interface, which the XML transform client can use for communicating with a remote provider.

If a client application uses more than connection component, the application can change which connection an XML transform client uses by changing the value for this property.


TXMLTransformClient.TransformApplyUpdates
 VCL Reference

TXMLTransformClient.TransformApplyUpdates

TXMLTransformClient	See also

Specifies the TXMLTransform component that converts XML into delta packets that are then sent to the provider to apply updates.

property TransformApplyUpdates: TXMLTransform;

Description

Use TransformApplyUpdates to access the subcomponent that transforms the XML passed as the UpdateXML parameter of the ApplyUpdates method into a delta packet, which is then forwarded to the provider. If the transformation passed to the ApplyUpdates method includes any user-defined nodes, you must supply TransformApplyUpdates with an OnTranslate event handler.


TXMLTransformClient.TransformGetData
 VCL Reference

TXMLTransformClient.TransformGetData

TXMLTransformClient	See also

Specifies the TXMLTransform component that converts data packets from the provider into XML.

property TransformGetData: TXMLTransform;

Description

Use TransformGetData to access the subcomponent that performs the transformation of data packets from the provider into another XML format. When an application calls the GetDataAsXml method, this subcomponent converts the data packet from the provider into XML.

Before you can call GetDataAsXml, you must specify the transformation that this subcomponent uses by setting its TransformationFile or TransformationDocument property. In addition, if the transformation includes any user-defined nodes, you must supply TransformGetData with an OnTranslate event handler.


TXMLTransformClient.TransformSetParams
 VCL Reference

TXMLTransformClient.TransformSetParams

TXMLTransformClient	See also

Specifies the TXMLTransform component that converts the XML supplied to the Setparams method into a data packet format.

property TransformSetParams: TXMLTransform;

Description

Use TransformSetParams to directly access the subcomponent that performs the transformation of an XML document into a set of parameter values. When an application calls the Setparams method, this subcomponent converts the XML supplied as the ParmsXml parameter into a data packet, which it then uses to read and store parameter values. These parameter values are later passed to the provider when you call GetDataAsXml.

If the transformation passed to the Setparams method includes any user-defined nodes, you must supply TransformSetParams with an OnTranslate event handler.


 VCL Reference

TXMLTransformClient methods

TXMLTransformClient	Alphabetically	Legend

In TXMLTransformClient

ApplyUpdates

Create

Destroy

GetDataAsXml

SetParams

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TXMLTransformClient methods

TXMLTransformClient	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetDataAsXml

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetParams

SetSubComponent

UpdateAction


TXMLTransformClient.ApplyUpdates
 VCL Reference

TXMLTransformClient.ApplyUpdates

TXMLTransformClient	See also

Inserts or deletes the records corresponding to the data in an XML document.

function ApplyUpdates(const UpdateXML, UpdateTransformFile: string; MaxErrors: Integer): Integer; virtual;

Description

Call ApplyUpdates to transform an XML document into a delta packet that inserts or deletes all of the resulting records and send it to the associated provider so that it can be applied. Before you can call ApplyUpdates, you must define the transformation to use by setting properties on the XML transform component specified by TransformApplyUpdates.

UpdateXML is the XML document that can be transformed into a delta packet. Typically, it contains the contents of an XML document file.

UpdateTransformFile is the name of a transformation file that converts UpdateXML into an insert or delete delta packet. A transformation file is a special type of XML file with the .xtr extension. The transformation file is specific to a particular XML schema, data packet format, and update operation (insert or delete). Use the xmlmapper.exe utility to create the transformation file.

Note:	If UpdateTransformFile includes any user-defined conversions, ApplyUpdates generates an OnTranslate event on TransformApplyUpdates when it needs to transform user-defined nodes in the UpdateXML string into corresponding field values.

MaxErrors indicates the maximum number of errors that the provider should allow before prematurely stopping the update operation. Set MaxErrors to –1 to indicate that there is no limit to the number of errors.

ApplyUpdates returns the number of errors it encountered.


TXMLTransformClient.Create
 VCL Reference

TXMLTransformClient.Create

TXMLTransformClient	See also

Creates and initializes a TXMLTransformClient object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an XML transform client at runtime. XML transform clients placed in forms or data modules at design time are created automatically.

The AOwner parameter specifies another component (typically a form or data module) that is responsible for freeing the TXMLTransformClient object.


TXMLTransformClient.Destroy
 VCL Reference

TXMLTransformClient.Destroy

TXMLTransformClient	See also

Destroys the instance of a TXMLTransformClient component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of TXMLTransformClient objects is handled automatically. If an application creates its own instances of TXMLTransformClient without assigning an Owner, however, it should call Free, which verifies that the dataset component is not nil before calling Destroy.


TXMLTransformClient.GetDataAsXml
 VCL Reference

TXMLTransformClient.GetDataAsXml

TXMLTransformClient	See also

Fetches a data packet from the provider and converts it to an XML document.

function GetDataAsXml(const PublishTransformFile: string): string; virtual;

Description

Call GetDataAsXml to obtain an XML document that is the translation of a data packet from the associated provider. GetDataAsXml

1. Passes any parameters supplied to the SetParams method to the provider specified by ProviderName.

2. Obtains a data packet that the provider returns.

3. Uses the transform component specified by TransformGetData to convert the data packet to an XML document. If the PublishTransformFile parameter is not an empty string, GetDataAsXml uses the file specified by this parameter as the transformation file. Otherwise, it uses the transformation file specified on the TransformGetData property.

4. Generates an OnTranslate event for every user-defined conversion in its transformation. The application can use this event to perform the user-defined conversion that converts field values into XML nodes.

5. Returns the resulting XML document as a string.

Once you have obtained the resulting, translated XML document, you can assign it to a TXMLDocument component or save it to a file.

Note:	Before you can call GetDataAsXml, you must supply any input parameters using the SetParams method and set properties on TransformGetData to indicate what transformation to perform.


TXMLTransformClient.SetParams
 VCL Reference

TXMLTransformClient.SetParams

TXMLTransformClient	See also

Sets input parameters to values supplied in an XML document.

procedure SetParams(const ParamsXml, ParamsTransformFile: string);

Description

Call Setparams to supply input parameter values before fetching data from the provider. Parameter values can represent the input parameters to a query or stored procedure, or they can represent field values that filter the data when the provider represents the data in a TTable or TSQLTable component.

ParamsXML is the XML document that represents the parameter values to set. Typically, it contains the contents of an XML document file.

ParamsTransformFile is the name of a transformation file that converts ParamsXml into a data packet. A transformation file is a special type of XML file with the .xtr extension. The transformation file is specific to a particular XML schema and data packet format. Use the xmlmapper.exe utility to create the transformation file.

Note:	If ParamsTransformFile includes any user-defined conversions, the component specified by TransformSetParams generates an OnTranslate event when it needs to transform user-defined nodes in the ParamsXml string into corresponding parameter values.

The TXMLTransformClient component stores parameter values internally. Each time you call Setparams, you update those internally stored values. Parameter values from previous calls are not cleared, so be sure to set every parameter value you want to change.

The next the GetDataAsXml method is called, TXMLTransformClient sends the currently stored parameter values to the provider.


Hierarchy

TObject

TPersistent

TComponent

TXMLTransformClient


DOMString type
 VCL Reference

DOMString type

The type for strings that are used by a DOM parser.

Unit

XMLDOM

type DOMString = WideString;

Description

DOM implementations work with wide characters. The strings that are used, therefore, when working with DOM interfaces, are of type DOMString, which simply maps to the WideString type.


TAsyncEventHandler type
 VCL Reference

TAsyncEventHandler type

See also

Occurs when the AsyncLoadState of an XML document changes.

Unit

XmlDom

type TAsyncEventHandler = procedure(Sender: TObject; AsyncLoadState: Integer) of object;

Description

TAsyncEventHandler is the type for event handlers that respond at various stages during the asynchronous parsing of an XML document.

Sender is the TXMLDocument object that receives the event.

AsyncLoadState is an integer that indicates the current stage of the parsing process. Its value is vendor-specific, and corresponds to the document’s AsyncLoadState property.


TNodeChange type
 VCL Reference

TNodeChange type

See also

Indicates the type of change made to a node in an XML document.

Unit

XmlDoc

type TNodeChange = (ncUpdateValue, ncInsertChild, ncRemoveChild, ncAddAttribute, ncRemoveAttribute);

Description

The following table lists the possible values:

Value	Meaning

ncUpdateValue	The value of the node is changed.

ncInsertChild	A new child node is added to the node.

ncRemoveChild	A child node is removed from the node.

ncAddAttribute	A new attribute is added to the node.

ncRemoveAttribute	An attribute is removed from the node.


TNodeChangeEvent type
 VCL Reference

TNodeChangeEvent type

See also

The type for event handlers that respond when XML nodes are changed.

Unit

XmlDoc

type TNodeChangeEvent = procedure(const Node: IXMLNode; ChangeType: TNodeChange) of object;

Description

TNodeChangeEvent is the type for the BeforeNodeChange and AfterNodeChange event handlers. These events occur before and after changes are made to the nodes in an XML document.

Node identifies the node to which the change occurs.

ChangeType indicates the type of change made to Node.


TNodeClassInfo, TNodeClassArray types
 VCL Reference

TNodeClassInfo, TNodeClassArray types

Represent information about the classes that implement XML node interfaces.

Unit

XMLDoc

type

  TXMLNodeClass = class of TXMLNode;

  TNodeClassInfo = record

    NodeName: DOMString;

    NamespaceURI: DOMString;

    NodeClass: TXMLNodeClass;

  end;

  TNodeClassArray = array of TNodeClassInfo;

Description

TNodeClassArray is a dynamic array of TNodeClassInfo values. Each element of the array describes the implementation of a node.

TNodeClassInfo describes the name and implementation class for a node in an XML document. It contains the following fields:

Field	Meaning

NodeName	The name of the node. This string describes the identifier or use of the node. For example, on element nodes, this is the tag name. On attribute nodes, this is the name of the attribute. On comment nodes, this is the string “#comment”. This is the value returned by a node’s NodeName property, and is used as a property name in classes generated by the XML Data Binding Wizard.

NamespaceURI	The namespace of the node’s name. This string is a Uniform Resource Identifier that identifies the namespace that contains NodeName. It is used to interpret the value of NodeName.

NodeClass	The class of a TXMLNode descendant that represents the node.


TNodeListNotification type
 VCL Reference

TNodeListNotification type

See also

The type of the callback the TXMLNodeList calls when it adds, deletes, or creates XML nodes.

Unit

XmlDoc

type

  TNodeListNotification = procedure(Operation: TNodeListOperation; var Node: IXMLNode; const IndexOrName: OleVariant; BeforeOperation: Boolean) of object;

Description

TNodeListNotification is the type for the callback supplied to TXMLNodeList in its constructor. TXMLNodeList calls this procedure before and after it adds or deletes nodes in the list and when it needs to create a new node.

Operation indicates what change is about to occur or has just occurred.

Node specifies the node that is the focus of that change. It’s use depends on the operation, as indicated in the following table:

Operation	Node

nlInsert	The node that is about to be added to the list or that has just been added.

nlRemove	The node that is about to be removed from the list or that has just been removed.

nlCreateNode	The newly-created node. This should be created by the callback and returned as the Node parameter.

IndexOrName is used only when Operation is nlCreateNode. It is the value assigned to the Nodes property using the index of a node that does not yet exist. The interpretation of IndexOrName depends on the type of node that the callback creates, as indicated in the following table:

NodeType	IndexOrName

ntElement	The tag name.

ntAttribute	The name of the attribute.

ntText	The value of the node.

ntCData	The value of the CDATA section.

ntEntityRef	The name of the referenced entity.

ntProcessingInstr	The target of the processing instruction.

ntComment	The value (text) of the comment.

ntDocFragment	Not used.

BeforeOperation indicates whether the callback occurs before the indicated operation or after. When nodes are inserted and removed, the callback is called first with BeforeOperation set to True, then the operation occurs, and then a second callback is made with BeforeOperation set to False. When nodes must be created, only one call is made, with BeforeOperation set to True.


TNodeListOperation type
 VCL Reference

TNodeListOperation type

Indicates what type of change is about to occur using an IXMLNodeList interface.

Unit

XMLDoc

type  TNodeListOperation = (nlInsert, nlRemove, nlCreateNode);

Description

When an application makes a change using the IXMLNodeList interface, the implementing object sends its owner a notification of that change. TNodeListOperation identifies the type of change that is about to occur. The following table lists the possible values:

Value	Meaning

nlInsert	An existing node is about to be added to the list.

nlRemove	A node is about to be removed from the list.

nlCreateNode	A new node needs to be created so that it can be added to the list.


TNodeType type
 VCL Reference

TNodeType type

Identifies the type of a node in an XML document.

Unit

XMLIntf

type TNodeType = (ntReserved, ntElement, ntAttribute, ntText, ntCData, ntEntityRef, ntEntity, ntProcessingInstr, ntComment, ntDocument, ntDocType, ntDocFragment, ntNotation);

Description

TNodeType identifies the type of a node in an XML document. The following table lists the possible values:

Value	Meaning

ntReserved	Not used

ntElement	The node represents an element. Element nodes represent simple tags that have child nodes. (Note that sometimes these child nodes do not appear when using IXMLNode. For example child nodes of type ntText are typically hidden by IXMLNode and appear only as the value of the Text property). The child nodes of an element node can have the following node types: ntElement, ntText, ntCData, ntEntityRef, ntProcessingInstr, and ntComment. Element nodes can also have attributes (ntAttribute). Element nodes can be the child of a node of type ntDocument, ntDocFragment, ntEntityRef, and ntElement.

ntAttribute	The node represents an attribute of an element. It is not the child of another node, but its value can be accessed using the Attribute property of the element node’s IXMLNode interface. An attribute node can have child nodes of type ntText and ntEntityRef.

ntText	The node represents the text content of a tag. A text node cannot have any child nodes, but can appear as the child node of a node of type ntAttribute, ntDocFragment, ntElement, or ntEntityRef.

ntCData	The node represents a CDATA section in the XML source. CDATA sections identify blocks of text that would otherwise be interpreted as markup. An ntCData node can’t have any child nodes. They can appear as the child of an ntDocFragment, ntEntityRef, or ntElement node.

ntEntityRef	The node represents a reference to an entity in the XML document. This can be any type of entity, including character entity references. The children of an entity reference node can be of the following types: ntElement, ntProcessingInstr, ntComment, ntText, ntCData, and ntEntityRef. The entity reference node can appear as the child of an ntAttribute, ntDocFragment, ntElement, or ntEntityRef node.

ntEntity	The node represents an expanded entity. Entity nodes can have child nodes that represent the expanded entity (for example, ntText and ntEntityRef nodes). Entity nodes only appear as the child of an ntDocType node.

ntProcessingInstr	The node represents a processing instruction (PI) from the XML document. A PI node cannot have any child nodes, but can appear as the child node of a node of type ntDocument, ntDocFragment, ntElement, or ntEntityRef.

ntComment	The node represents a comment in the XML document. Comment nodes do not have child nodes. They appear as the child of an ntDocument, ntDocFragment, ntElement, or ntEntityRef node.

ntDocument	The node represents a document object, which is the root of the entire XML document. Document nodes have a single ntElement node as a child (the DocumentElement). In addition, they can have child nodes of type ntProcessingInstr, ntComment, and ntDocType. Because the document is the root of the XML document, it never appears as a child node.

ntDocType	The node represents the document type declaration, indicated by the <!DOCTYPE > tag. The document type node can child nodes of type ntNotation and ntEntity. It always appears as the child of the document node.

ntDocFragment	The node represents a document fragment. A document fragment node associates a node or subtree with a document without actually being contained in the document. Document fragment nodes can have child nodes of type ntElement, ntProcessingInstr, ntComment, ntText, ntCData, and ntEntityRef. It never appears as the child of another node.

ntNotation	A node represents a notation in the document type declaration. It always appears as the child of an ntDocType node and never has any child nodes.


TParseOption, TParseOptions types
 VCL Reference

TParseOption, TParseOptions types

Represents implementation-specific options that are followed when parsing the XML document.

Unit

XMLIntf

type

  TParseOption = (poResolveExternals, poValidateOnParse, poPreserveWhiteSpace, poAsyncLoad);

  TParseOptions = set of TParseOption;

Description

TParseOptions is a set of TParseOption values. Each TParseOption value provides information about how a DOM parser should parse an XML document. Different DOM implementations support different options.

The following table lists the possible values:

Option	DOM Vendor	Meaning

poResolveExternals	MSXML	External definitions (resolvable namespaces, DTD external subsets, and external entity references) are resolved at parse time.

poValidateOnParse	MSXML	The DOM parser validates the XML document against its schema information as well as verifying that it is well-formed XML.

poPreserveWhiteSpace	MSXML	White space in the text of the XML document is not stripped off.

poAsyncLoad	MSXML	The DOM parser works asynchronously. This can speed up performance, especially when parsing a large XML document, but can also lead to exceptions if the application tries to access nodes in the document before it is completely parsed.


TRowEvent type
 VCL Reference

TRowEvent type

See also

The type for event handlers of events that occur at discrete points during an XML transformation.

Unit

Xmlxform

type

  TRowEvent = procedure(Sender: TObject; Id: string; SrcNode: IDOMNode; DestNode: IDOMNode) of object;

Description

TRowEvent is the type for the event handlers of events that occur while TXMLTransform is converting an XML document into an XML data packet, or vice versa.

Sender is the XML transform component that generates the event.

Id is a string that identifies the node in the XML document that is about to be translated. This identifier is assigned using the Node Repository page of Xmlmapper.exe when the transformation file is generated. If the node does not have an assigned identifier, Id is an empty string.

SrcNode is the DOM interface for the node that is about to be translated. This node may correspond to the entire XML data packet, a dataset field in the XML data packet, or a record in the XML data packet.

DestNode is the DOM interface for the translated value of SrcNode.


TTranslateEvent type
 VCL Reference

TTranslateEvent type

See also

The type for the OnTranslate event handler.

Unit

Xmlxform

type

  TTranslateEvent = procedure(Sender: TObject; Id: string; SrcNode: IDOMNode; var Value: string; DestNode: IDOMNode) of object;

Description

TTranslateEvent is the type of the OnTranslate event handler. OnTranslate occurs when an XML transform component needs to translate user-defined nodes. This event can occur when translating XML documents into data packets or when translating data packets into XML documents.

Sender is the XML transform component that generates the event.

Id is a string that identifies the node in the XML document. This identifier is assigned using the Node Repository page of Xmlmapper.exe when the transformation file is generated.

SrcNode is the DOM interface for the node being translated. If the current translation is from XML document to data packet, this is the node with the Id specified by Id. If the current translation is from a data packet to an XML document, this is a node in the XML form of the data packet.

Value returns the translation of SrcNode. If the current translation is from XML document to data packet, on entry to the event handler this is the value of SrcNode, if available. On exit, this is a string representation of the value to be assigned to the corresponding field in the data packet. If the current translation is from data packet to XML document, on entry to the event handler this is a string representation of the field (or parameter) value. On exit, it should be the value of the XML node that has the identifier Id (including any subnodes, if appropriate).

DestNode is the DOM interface for the translated node. If the current translation is from XML document to data packet, this is the node for the field in the XML data packet. If the current translation is from data packet to XML document, this is the XML node that has the identifier ID.


TXMLDocOption, TXMLDocOptions types
 VCL Reference

TXMLDocOption, TXMLDocOptions types

Indicates types of information that an XML document automatically supplies.

Unit

XMLIntf

type

  TXMLDocOption = (doNodeAutoCreate, doNodeAutoIndent, doAttrNull, doAutoPrefix, doNamespaceDecl, doAutoSave);

  TXMLDocOptions = set of TXMLDocOption;

Description

TXMLDocOptions is a set of TXMLDocOption values. The following table lists the TXMLDocOption values:

Value	Meaning

doNodeAutoCreate	If the application tries to read a node by name, using the Nodes property of an IXMLNodeList interface, and that node does not exist, then the application creates a new node using the specified name.

doNodeAutoIndent	When formatting the XML text from the parsed set of nodes, child nodes are automatically indented from their parent nodes.

doAttrNull	When reading the value of an attribute that does not exist, the value is given as a Null Variant (as opposed to a value of an empty string).

doAutoPrefix	When generating the name of a new node, the value is automatically given a namespace prefix if a namespace URI is supplied.

doNamespaceDecl	When the AddChild method must create a new namespace for the node, it also adds a namespace attribute to declare that new namespace. If doNamespaceDecl is not included, AddChild creates the new namespace but does not add an attribute to declare it.

doAutoSave	When the XML document closes, any changes are automatically saved back to the XML document file or to the XML property.


TXMLEncodingType type
 VCL Reference

TXMLEncodingType type

Indicates the character set used to encode characters in an XML document.

Unit

XMLIntf

type TXMLEncodingType = (xetUnknown, xetUCS_4BE, xetUCS_4LE, xetUCS_4Order2134, xetUCS_4Order3412, xetUTF_16BE, xetUTF_16LE, xetUTF_8, xetUCS_4Like, xetUTF_16BELike, xetUTF_16LELike, xetUTF_8Like, xetEBCDICLike);

Description

The following table lists the possible TXMLEncodingType values:

Value	Character encoding

xetUnknown	The character set is unknown.

xetUCS_4BE	UCS-4, big-endian (1234).

xetUCS_4LE	UCS-4, little-endian (4321).

xetUCS_4Order2134	UCS-4, unusual octet order (2134)

xetUCS_4Order3412	UCS-4, unusual octet order (3412)

xetUTF_16BE	UTF-16, big-endian order

xetUTF_16LE	UTF-16, little-endian order

xetUTF_8	UTF-8

xetUCS_4Like	Any UCS-4 encoding

xetUTF_16BELike	Any UTF-16, big-endian encoding, may be without byte order mark

xetUTF_16LELike	Any UTF-16, little-endian encoding, my be without byte order mark

xetUTF_8Like	UTF-8, ISO 646, ASCII, or other 7- or 8-bit encoding, including multi-byte character sets such as Shift-JIS.

xetEBCDICLike	EBCDIC


TXSCustomDateTime
 VCL Reference

TXSCustomDateTime

Hierarchy	Properties	Methods	See also

TXSCustomDateTime is the base class for classes that represent both date and time values for an invokable interface.

Unit

XSBuiltIns

Description

Use TXSCustomDateTime as a base class when defining a class to represent a type that includes both date and time portions and that represents a scalar value in a WSDL document. When creating a TXSCustomDateTime descendant, override the XSToNative and NativeToXS methods to indicate how the value of the class can be converted to and from the string representation that is used to encode the value for transport.

On server applications, instances of TXSCustomDateTime descendants that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSCustomDateTime descendant is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TXSCustomDateTime instances that it passes as input parameters, and for freeing any TXSCustomDateTime instances it creates or that are returned as output parameters or method results.


 VCL Reference

TXSCustomDateTime properties

TXSCustomDateTime	Alphabetically	Legend

In TXSCustomDateTime

AsDateTime

Day

Hour

Minute

Month

Second

Year

Derived from TRemotable

DataContext


 VCL Reference

TXSCustomDateTime properties

TXSCustomDateTime	By object	Legend

AsDateTime

DataContext

Day

Hour

Minute

Month

Second

Year


TXSCustomDateTime.AsDateTime
 VCL Reference

TXSCustomDateTime.AsDateTime

TXSCustomDateTime	See also

Represents the object’s value as a TDateTime value.

property AsDateTime: TDateTime;

Description

Use AsDateTime to read the value of the TXSCustomDateTime object into a variable of type TDateTime or set its value from a TDateTime value. AsDateTime handles the mapping between a TDateTime value and the Year, Month, Day, Hour, Minute, and Second values.

Note:	AsDateTime represents the date-and-time using Coordinated Universal Time (UTC). To convert this to a local time, add the offsets specified by HourOffset and MinuteOffset to the hours and minutes.


TXSCustomDateTime.Day
 VCL Reference

TXSCustomDateTime.Day

TXSCustomDateTime	See also

Indicates the Day of the month that the object represents.

property Day: Word;

Description

Use Day to get or set the day portion of the date-and-time value. Valid Day values are 1 through 28, 29, 30, or 31, depending on the Month value.


TXSCustomDateTime.Hour
 VCL Reference

TXSCustomDateTime.Hour

TXSCustomDateTime	See also

Indicates the hour of the day that the object represents.

property Hour: Word;

Description

Use Hour to get or set the hour portion of the date-and-time value. Valid Hour values are 0 through 23.

Note:	Hour represents the hour using Coordinated Universal Time (UTC). To convert the hour to local time, you must add the hour offset.


TXSCustomDateTime.Minute
 VCL Reference

TXSCustomDateTime.Minute

TXSCustomDateTime	See also

Indicates the minute of the hour that the object represents.

property Minute: Word;

Description

Use Minute to get or set the minute portion of the date-and-time value. Valid Minute values are 0 through 59.

Note:	Minute represents the minute using Coordinated Universal Time (UTC). To convert the minutes to local time, you must add the minute offset.


TXSCustomDateTime.Month
 VCL Reference

TXSCustomDateTime.Month

TXSCustomDateTime	See also

Indicates the month of the year that the object represents.

property Month: Word;

Description

Use Month to get or set the month portion of the date-and-time value. Valid Month values are 1 through 12.


TXSCustomDateTime.Second
 VCL Reference

TXSCustomDateTime.Second

TXSCustomDateTime	See also

Indicates the second of the minute that the object represents.

property Second: Word;

Description

Use Second to get or set the seconds portion of the date-and-time value. Valid Second values are 0 through 59.


TXSCustomDateTime.Year
 VCL Reference

TXSCustomDateTime.Year

TXSCustomDateTime	See also

Indicates the year that the object represents.

property Year: Word;

Description

Use Year to get or set the year portion of the date-and-time value. Valid Year values are 1 through 9999.


 VCL Reference

TXSCustomDateTime methods

TXSCustomDateTime	Alphabetically	Legend

In TXSCustomDateTime

Create

Destroy

GetAsDateTime

GetDay

GetHour

GetHourOffset

GetMillisecond

GetMinute

GetMinuteOffset

GetMonth

GetSecond

GetYear

SetAsDateTime

SetDay

SetHour

SetHourOffset

SetMillisecond

SetMinute

SetMinuteOffset

SetMonth

SetSecond

SetYear

Derived from TRemotableXS

NativeToXS

XSToNative

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXSCustomDateTime methods

TXSCustomDateTime	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetAsDateTime

GetDay

GetHour

GetHourOffset

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMillisecond

GetMinute

GetMinuteOffset

GetMonth

GetSecond

GetYear

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

SetAsDateTime

SetDay

SetHour

SetHourOffset

SetMillisecond

SetMinute

SetMinuteOffset

SetMonth

SetSecond

SetYear

XSToNative


TXSCustomDateTime.Create
 VCL Reference

TXSCustomDateTime.Create

TXSCustomDateTime	See also

Creates and initializes a TXSCustomDateTime object.

constructor Create;  override;

Description

Call Create to create a TXSCustomDateTime object at runtime.


TXSCustomDateTime.Destroy
 VCL Reference

TXSCustomDateTime.Destroy

TXSCustomDateTime	See also

Frees the memory associated with the TXSCustomDateTime object.

destructor Destroy;  override;

Description

Do not call Destroy to free a TXSCustomDateTime object. Instead, use the Free method, which checks that the TXSCustomDataTime reference is not nil before calling Destroy.

On server applications, there is typically no need to explicitly free a TXSCustomDateTime instance (for example, one created as a return value or output parameter). By default, when a TXSCustomDateTime descendant is created in a method that was called remotely using an invokable interface, it is added to a data context (the value of the DataContext property). As long as the remotable object belongs to the data context, the data context handles freeing the object. Similarly, TCustomXSDateTime objects that are passed in as a parameter belong to the data context.

On client applications, TXSCustomDateTime instances created and passed to an invokable interface or returned as a parameter or result of an invokable interface must be freed by the calling application.


TXSCustomDateTime.GetAsDateTime
 VCL Reference

TXSCustomDateTime.GetAsDateTime

TXSCustomDateTime	See also

Returns the value of the AsDateTime property.

function GetAsDateTime: TDateTime;

Description

GetAsDateTime is the protected read implementation of the AsDateTime property.


TXSCustomDateTime.GetDay
 VCL Reference

TXSCustomDateTime.GetDay

TXSCustomDateTime	See also

Returns the value of the Day property.

function GetDay: Word;

Description

GetDay is the protected read implementation of the Day property.


TXSCustomDateTime.GetHour
 VCL Reference

TXSCustomDateTime.GetHour

TXSCustomDateTime	See also

Returns the value of the Hour property.

function GetHour: Word;

Description

GetHour is the protected read implementation of the Hour property.


TXSCustomDateTime.GetHourOffset
 VCL Reference

TXSCustomDateTime.GetHourOffset

TXSCustomDateTime	See also

Returns the offset that converts the Hour property to local time.

function GetHourOffset: SmallInt;

Description

The Hour property represents the hour of the day using Coordinated Universal Time (UTC). GetHourOffset returns the correction factor that you can add to Hour to obtain the hour of the day in local time.


TXSCustomDateTime.GetMillisecond
 VCL Reference

TXSCustomDateTime.GetMillisecond

TXSCustomDateTime	See also

Returns the number of milliseconds of the second in the TXSCustomDateTime’s value.

function GetMillisecond: Word;

Description

GetMillisecond returns the number of milliseconds beyond the seconds that the Second property represents. This method is used by descendant classes that implement a Millisecond property.


TXSCustomDateTime.GetMinute
 VCL Reference

TXSCustomDateTime.GetMinute

TXSCustomDateTime	See also

Returns the value of the Minute property.

function GetMinute: Word;

Description

GetMinute is the protected read implementation of the Minute property.


TXSCustomDateTime.GetMinuteOffset
 VCL Reference

TXSCustomDateTime.GetMinuteOffset

TXSCustomDateTime	See also

Returns the offset that converts the Minute property to local time.

function GetMinuteOffset: SmallInt;

Description

The Minute property represents the minute of the day using Coordinated Universal Time (UTC). GetMinuteOffset returns the correction factor that you can add to Minute to obtain the minute of the day in local time.


TXSCustomDateTime.GetMonth
 VCL Reference

TXSCustomDateTime.GetMonth

TXSCustomDateTime	See also

Returns the value of the Month property.

function GetMonth: Word;

Description

GetMonth is the protected read implementation of the Month property.


TXSCustomDateTime.GetSecond
 VCL Reference

TXSCustomDateTime.GetSecond

TXSCustomDateTime	See also

Returns the value of the Second property.

function GetSecond: Word;

Description

GetSecond is the protected read implementation of the Second property.


TXSCustomDateTime.GetYear
 VCL Reference

TXSCustomDateTime.GetYear

TXSCustomDateTime	See also

Returns the value of the Year property.

function GetYear: Word;

Description

GetYear is the protected read implementation of the Year property.


TXSCustomDateTime.SetAsDateTime
 VCL Reference

TXSCustomDateTime.SetAsDateTime

TXSCustomDateTime	See also

Sets the value of the AsDateTime property.

procedure SetAsDateTime(const Value: TDateTime); virtual;

Description

SetAsDateTime is the protected write implementation of the AsDateTime property.


TXSCustomDateTime.SetDay
 VCL Reference

TXSCustomDateTime.SetDay

TXSCustomDateTime	See also

Sets the value of the Day property.

procedure SetDay(const Value: Word); virtual;

Description

SetDay is the protected write implementation of the Day property.


TXSCustomDateTime.SetHour
 VCL Reference

TXSCustomDateTime.SetHour

TXSCustomDateTime	See also

Sets the value of the Hour property.

procedure SetHour(const Value: Word); virtual;

Description

SetHour is the protected write implementation of the Hour property.


TXSCustomDateTime.SetHourOffset
 VCL Reference

TXSCustomDateTime.SetHourOffset

TXSCustomDateTime	See also

Sets the offset that converts the Hour property to local time.

procedure SetHourOffset(const Value: SmallInt); virtual;

Description

The Hour property represents the hour of the day using Coordinated Universal Time (UTC). SetHourOffset assigns a correction factor that can be added to Hour to obtain the hour of the day in local time.


TXSCustomDateTime.SetMillisecond
 VCL Reference

TXSCustomDateTime.SetMillisecond

TXSCustomDateTime	See also

Sets the number of milliseconds of the second in the TXSCustomDateTime’s value.

procedure SetMillisecond(const Value: Word); virtual;

Description

SetMillisecond sets the number of milliseconds beyond the seconds that the Second property represents. This method is used by descendant classes that implement a Millisecond property.


TXSCustomDateTime.SetMinute
 VCL Reference

TXSCustomDateTime.SetMinute

TXSCustomDateTime	See also

Sets the value of the Minute property.

procedure SetMinute(const Value: Word); virtual;

Description

SetMinute is the protected write implementation of the Minute property.


TXSCustomDateTime.SetMinuteOffset
 VCL Reference

TXSCustomDateTime.SetMinuteOffset

TXSCustomDateTime	See also

Sets the offset that converts the Minute property to local time.

procedure SetMinuteOffset(const Value: SmallInt); virtual;

Description

The Minute property represents the minute of the hour using Coordinated Universal Time (UTC). SetMinuteOffset assigns a correction factor that can be added to Minute to obtain the minute of the day in local time.


TXSCustomDateTime.SetMonth
 VCL Reference

TXSCustomDateTime.SetMonth

TXSCustomDateTime	See also

Sets the value of the Month property.

procedure SetMonth(const Value: Word); virtual;

Description

SetMonth is the protected write implementation of the Month property.


TXSCustomDateTime.SetSecond
 VCL Reference

TXSCustomDateTime.SetSecond

TXSCustomDateTime	See also

Sets the value of the Second property.

procedure SetSecond(const Value: Word); virtual;

Description

SetSecond is the protected write implementation of the Second property.


TXSCustomDateTime.SetYear
 VCL Reference

TXSCustomDateTime.SetYear

TXSCustomDateTime	See also

Sets the value of the Year property.

procedure SetYear(const Value: Word); virtual;

Description

SetYear is the protected write implementation of the Year property.


Hierarchy

TObject

TRemotable

TRemotableXS

TXSCustomDateTime


TXSDate
 VCL Reference

TXSDate

Hierarchy	Properties	Methods	See also

TXSDate implements the XML schema date type so that it can be used on invokable interfaces.

Unit

XSBuiltIns

Description

TXSDate acts as a wrapper for the simple scalar type date that W3C defines for XML schemas. Because this type does not correspond directly to an Object Pascal type, it requires special marshaling when used in an invokable interface. TXSDate enables this marshaling because it is a descendant of TRemotable.

To convert a TXSDate value to a TDateTime value, use the AsDate property. Other properties give the Year, Month, and Day that make up that value.

On server applications, instances of TXSDate that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSDate instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TXSDate instances that it passes as input parameters, and for freeing any TXSDate instances it creates or that are returned as output parameters or method results.


 VCL Reference

TXSDate properties

TXSDate	Alphabetically	Legend

In TXSDate

AsDate

Day

Month

Year

Derived from TRemotable

DataContext


 VCL Reference

TXSDate properties

TXSDate	By object	Legend

AsDate

Day

Month

DataContext

Year


TXSDate.AsDate
 VCL Reference

TXSDate.AsDate

TXSDate	See also

Represents the object’s value as a TDateTime value.

property AsDate: TDateTime;

Description

Use AsDate to read the value of the TXSDate object into a variable of type TDateTime or set this objects value from a TDateTime value. AsDate handles the mapping between a TDateTime value and the Year, Month, and Day properties. When reading AsDate, the resulting TDateTime value has a time portion of 0. When setting AsDate, the time portion is ignored.


TXSDate.Day
 VCL Reference

TXSDate.Day

TXSDate	See also

Indicates the Day of the month that the object represents.

property Day: Word;

Description

Use Day to get or set the day portion of the date-and-time value. Valid Day values are 1 through 28, 29, 30, or 31, depending on the Month value.


TXSDate.Month
 VCL Reference

TXSDate.Month

TXSDate	See also

Indicates the month of the year that the object represents.

property Month: Word;

Description

Use Month to get or set the month portion of the date-and-time value. Valid Month values are 1 through 12.


TXSDate.Year
 VCL Reference

TXSDate.Year

TXSDate	See also

Indicates the year that the object represents.

property Year: Word;

Description

Use Year to get or set the year portion of the date-and-time value. Valid Year values are 1 through 9999.


 VCL Reference

TXSDate methods

TXSDate	Alphabetically	Legend

In TXSDate

Clone

Create

NativeToXS

XSToNative

Derived from TRemotable

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXSDate methods

TXSDate	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clone

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

XSToNative


TXSDate.Create
 VCL Reference

TXSDate.Create

TXSDate

Creates and initializes a TXSDate object.

constructor Create;  override;

Description

Call Create to create a TXSDate object at runtime.


TXSDate.Clone
 VCL Reference

TXSDate.Clone

TXSDate

Returns a new TXSDate object that represents the same value as this one.

function Clone: TXSDate;

Description

Call Clone to obtain a new TXSDate instance that represents the same time as this one. Clone returns the new TXSDate object.


TXSDate.NativeToXS
 VCL Reference

TXSDate.NativeToXS

TXSDate	See also

Returns a string that represents the value of a TXSDate instance.

function NativeToXS: WideString; override;

Description

NativeToXS returns the string that represents the value of this TXSDate in a SOAP packet.


TXSDate.XSToNative
 VCL Reference

TXSDate.XSToNative

TXSDate	See also

Assigns the properties of the TXSDate instance from the string representation of its value.

procedure XSToNative(Data: WideString); override;

Description

XSToNative parses the string specified by Data, which is the SOAP encoding of a date value. It uses this information to set the properties of the TXSDate object.


Hierarchy

TObject

TRemotable

TRemotableXS

TXSDate


TXSDateTime
 VCL Reference

TXSDateTime

Hierarchy	Properties	Methods	See also

TXSDateTime implements the XML schema datetime type so that it can be used on invokable interfaces.

Unit

XSBuiltIns

Description

TXSDateTime acts as a wrapper for the simple scalar type datetime that W3C defines for XML schemas. Because this type does not correspond directly to an Object Pascal type, it requires special marshaling when used in an invokable interface. TXSDateTime enables this marshaling because it is a descendant of TRemotable.

To convert a TXSDateTime value to a TDateTime value, use the AsDateTime property. The resulting value represents the time portion using Coordinated Universal Time (UTC). To convert that to a local time zone, adjust the hour and minute portions using the HourOffset and MinuteOffset properties.

On server applications, instances of TXSDateTime that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSDateTime instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TXSDateTime instances that it passes as input parameters, and for freeing any TXSDateTime instances it creates or that are returned as output parameters or method results.


 VCL Reference

TXSDateTime properties

TXSDateTime	Alphabetically	Legend

In TXSDateTime

HourOffset

Millisecond

MinuteOffset

Derived from TXSCustomDateTime

AsDateTime

Day

Hour

Minute

Month

Second

Year

Derived from TRemotable

DataContext


 VCL Reference

TXSDateTime properties

TXSDateTime	By object	Legend

AsDateTime

Day

Hour

HourOffset

Millisecond

Minute

MinuteOffset

Month

DataContext

Second

Year


TXSDateTime.HourOffset
 VCL Reference

TXSDateTime.HourOffset

TXSDateTime	See also

Indicates the difference between the Hour property and the hour in the local time zone.

property HourOffset: SmallInt;

Description

The Hour property represents the hour of the day using Coordinated Universal Time (UTC). HourOffset is the correction factor you can add to Hour to obtain the hour of the day in local time.


TXSDateTime.Millisecond
 VCL Reference

TXSDateTime.Millisecond

TXSDateTime	See also

Indicates the Millisecond of the second that the object represents.

property Millisecond: Word;

Description

Use Millisecond to get or set the millisecond portion of the date-and-time value. Valid Millisecond values are 1 through 59.


TXSDateTime.MinuteOffset
 VCL Reference

TXSDateTime.MinuteOffset

TXSDateTime	See also

Indicates the difference between the Minute property and the minute of the hour in local time.

property MinuteOffset: SmallInt;

Description

The Minute property represents the minute of the hour using Coordinated Universal Time (UTC). MinuteOffset is the correction factor you can add to Minute to obtain the minute of the hour in local time.


 VCL Reference

TXSDateTime methods

TXSDateTime	Alphabetically	Legend

In TXSDateTime

Clone

NativeToXS

XSToNative

Derived from TXSCustomDateTime

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXSDateTime methods

TXSDateTime	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clone

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

XSToNative


TXSDateTime.Clone
 VCL Reference

TXSDateTime.Clone

TXSDateTime

Returns a new TXSDateTime object that represents the same value as this one.

function Clone: TXSDateTime;

Description

Call Clone to obtain a new TXSDateTime instance that represents the same date and time as this one. Clone returns the new TXSDateTime object.


TXSDateTime.NativeToXS
 VCL Reference

TXSDateTime.NativeToXS

TXSDateTime	See also

Returns a string that represents the value of a TXSDateTime instance.

function NativeToXS: WideString; override;

Description

NativeToXS returns the string that represents the value of this TXSDateTime in a SOAP packet.


TXSDateTime.XSToNative
 VCL Reference

TXSDateTime.XSToNative

TXSDateTime	See also

Assigns the properties of the TXSDateTime instance from the string representation of its value.

procedure XSToNative(Data: WideString); override;

Description

XSToNative parses the string specified by Data, which is the SOAP encoding of a datetime value. It uses this information to set the properties of the TXSDateTime object.


Hierarchy

TObject

TRemotable

TRemotableXS

TXSCustomDateTime

TXSDateTime


EXSDateTimeException
 VCL Reference

 EXSDateTimeException

Hierarchy	Properties	Methods	See also

EXSDateTimeException is the exception class for errors encountered by the remotable objects that represent XML schema date and time values.

Unit

XSBuiltIns

Description

EXSDateTimeException is raised by the TXSDate, TXSTime, TXSDateTime, and TXSDuration objects when

An application assigns a value that is out of range to one of their properties. Such values include Month values greater than 12, Hour values greater than 23, Minute values greater than 59, and so on.

The string that represents the object’s value does not have the proper format and can’t be parsed.


 VCL Reference

EXSDateTimeException properties

EXSDateTimeException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EXSDateTimeException properties

EXSDateTimeException	By object	Legend

HelpContext

Message


 VCL Reference

EXSDateTimeException methods

EXSDateTimeException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EXSDateTimeException methods

EXSDateTimeException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EXSDateTimeException


TXSDuration
 VCL Reference

TXSDuration

Hierarchy	Properties	Methods	See also

TXSDuration implements the XML schema duration type so that it can be used on invokable interfaces.

Unit

XSBuiltIns

Description

TXSDuration acts as a wrapper for the simple scalar type duration that W3C defines for XML schemas. That is, TXSDuration represents the interval between two points in time. Because this type does not correspond directly to an Object Pascal type, it requires special marshaling when used in an invokable interface. TXSDuration enables this marshaling because it is a descendant of TRemotable.

To convert a TXSDuration value to a TDateTime value, use the AsDateTime property.

On server applications, instances of TXSDuration that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSDuration instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TXSDuration instances that it passes as input parameters, and for freeing any TXSDuration instances it creates or that are returned as output parameters or method results.


 VCL Reference

TXSDuration properties

TXSDuration	Alphabetically	Legend

In TXSDuration

DecimalSecond

Derived from TXSCustomDateTime

AsDateTime

Day

Hour

Minute

Month

Second

Year

Derived from TRemotable

DataContext


 VCL Reference

TXSDuration properties

TXSDuration	By object	Legend

AsDateTime

Day

DataContext

DecimalSecond

Hour

Minute

Month

Second

Year


TXSDuration.DecimalSecond
 VCL Reference

TXSDuration.DecimalSecond

TXSDuration	See also

Indicates the number of seconds, including fractional seconds, in the duration.

property DecimalSecond: Double;

Description

Use the DecimalSecond property to determine the size of the duration with a granularity finer than the Seconds property provides. DecimalSecond represents the number of seconds in the duration (above and beyond the years, months, days, hours and minutes represented by the other TXSDuration properties), including any fractional seconds.


 VCL Reference

TXSDuration methods

TXSDuration	Alphabetically	Legend

In TXSDuration

Create

NativeToXS

XSToNative

Derived from TXSCustomDateTime

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXSDuration methods

TXSDuration	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

XSToNative


TXSDuration.Create
 VCL Reference

TXSDuration.Create

TXSDuration

Creates and initializes a TXSDuration object.

constructor Create;  override;

Description

Call Create to create a TXSDuration object at runtime.


TXSDuration.NativeToXS
 VCL Reference

TXSDuration.NativeToXS

TXSDuration	See also

Returns a string that represents the value of a TXSDuration instance.

function NativeToXS: WideString; override;

Description

NativeToXS returns the string that represents the value of this TXSDuration in a SOAP packet.


TXSDuration.XSToNative
 VCL Reference

TXSDuration.XSToNative

TXSDuration	See also

Assigns the properties of the TXSDuration instance from the string representation of its value.

procedure XSToNative(Data: WideString); override;

Description

XSToNative parses the string specified by Data, which is the SOAP encoding of a duration value. It uses this information to set the properties of the TXSDuration object.


Hierarchy

TObject

TRemotable

TRemotableXS

TXSCustomDateTime

TXSDuration


TXSTime
 VCL Reference

TXSTime

Hierarchy	Properties	Methods	See also

TXSTime implements the XML schema time type so that it can be used on invokable interfaces.

Unit

XSBuiltIns

Description

TXSTime acts as a wrapper for the simple scalar type time that W3C defines for XML schemas. Because this type does not correspond directly to an Object Pascal type, it requires special marshaling when used in an invokable interface. TXSTime enables this marshaling because it is a descendant of TRemotable.

To convert a TXSTime value to a TDateTime value, use the AsTime property. Other properties give the Hour, Minute, Second, and Millisecond that make up that value. These properties represent the time using Coordinated Universal Time (UTC). To convert that to a local time zone, adjust the hour and minute portions using the HourOffset and MinuteOffset properties.

On server applications, instances of TXSTime that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TXSTime instance is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.

The caller of an invokable interface (client) is responsible for creating any TXSTime instances that it passes as input parameters, and for freeing any TXSTime instances it creates or that are returned as output parameters or method results.


 VCL Reference

TXSTime properties

TXSTime	Alphabetically	Legend

In TXSTime

AsTime

Hour

HourOffset

Millisecond

Minute

MinuteOffset

Second

Derived from TRemotable

DataContext


 VCL Reference

TXSTime properties

TXSTime	By object	Legend

AsTime

DataContext

Hour

HourOffset

Millisecond

Minute

MinuteOffset

Second


TXSTime.AsTime
 VCL Reference

TXSTime.AsTime

TXSTime	See also

Represents the object’s value as a TDateTime value.

property AsTime: TDateTime;

Description

Use AsTime to read the value of the TXSTime object into a variable of type TDateTime or set its value from a TDateTime value. AsTime handles the mapping between a TDateTime value and the Hour, Minute, and Second properties. When reading AsTime, the resulting TDateTime value is given a data portion of 0. When setting AsTime, the data portion is ignored.

Note:	AsTime represents the time using Coordinated Universal Time (UTC). To convert this to a local time, add the offsets specified by HourOffset and MinuteOffset to the hours and minutes.


TXSTime.Hour
 VCL Reference

TXSTime.Hour

TXSTime	See also

Indicates the hour of the day that the object represents.

property Hour: Word;

Description

Use Hour to get or set the hour portion of the time value. Valid Hour values are 0 through 23.

Note:	Hour represents the hour using Coordinated Universal Time (UTC). To convert the hour to local time, you must add the value of the HourOffset property.


TXSTime.HourOffset
 VCL Reference

TXSTime.HourOffset

TXSTime	See also

Indicates the difference between the Hour property and the hour in the local time zone.

property HourOffset: SmallInt;

Description

The Hour property represents the hour of the day using Coordinated Universal Time (UTC). HourOffset is the correction factor you can add to Hour to obtain the hour of the day in local time.


TXSTime.Millisecond
 VCL Reference

TXSTime.Millisecond

TXSTime	See also

Indicates the Millisecond of the second that the object represents.

property Millisecond: Word;

Description

Use Millisecond to get or set the millisecond portion of the time value. Valid Millisecond values are 1 through 59.


TXSTime.Minute
 VCL Reference

TXSTime.Minute

TXSTime	See also

Indicates the minute of the hour that the object represents.

property Minute: Word;

Description

Use Minute to get or set the minute portion of the time value. Valid Minute values are 0 through 59.

Note:	Minute represents the minute using Coordinated Universal Time (UTC). To convert the minutes to local time, you must add the value of the MinuteOffset property.


TXSTime.MinuteOffset
 VCL Reference

TXSTime.MinuteOffset

TXSTime	See also

Indicates the difference between the Minute property and the minute of the hour in local time.

property MinuteOffset: SmallInt;

Description

The Minute property represents the minute of the hour using Coordinated Universal Time (UTC). MinuteOffset is the correction factor you can add to Minute to obtain the minute of the hour in local time.


TXSTime.Second
 VCL Reference

TXSTime.Second

TXSTime	See also

Indicates the second of the minute that the object represents.

property Second: Word;

Description

Use Second to get or set the seconds portion of the time value. Valid Second values are 0 through 59.


 VCL Reference

TXSTime methods

TXSTime	Alphabetically	Legend

In TXSTime

Clone

NativeToXS

XSToNative

Derived from TRemotable

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TXSTime methods

TXSTime	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clone

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NativeToXS

NewInstance

SafeCallException

XSToNative


TXSTime.Clone
 VCL Reference

TXSTime.Clone

TXSTime

Returns a new TXSTime object that represents the same value as this one.

function Clone: TXSTime;

Description

Call Clone to obtain a new TXSTime instance that represents the same time as this one. Clone returns the new TXSTime object.


TXSTime.NativeToXS
 VCL Reference

TXSTime.NativeToXS

TXSTime	See also

Returns a string that represents the value of a TXSTime instance.

function NativeToXS: WideString; override;

Description

NativeToXS returns the string that represents the value of this TXSTime object in a SOAP packet.


TXSTime.XSToNative
 VCL Reference

TXSTime.XSToNative

TXSTime	See also

Assigns the properties of the TXSTime instance from the string representation of its value.

procedure XSToNative(Data: WideString); override;

Description

XSToNative parses the string specified by Data, which is the SOAP encoding of a time value. It uses this information to set the properties of the TXSTime object.


Hierarchy

TObject

TRemotable

TRemotableXS

TXSTime


TADOBlobStream
 VCL Reference

TADOBlobStream

Hierarchy	Properties	Methods	See also

TADOBlobStream is a stream object that reads from and writes to field objects that represent Binary large object (BLOB) fields.

Unit

ADODB

Description

Use TADOBlobStream to access or modify the value of a BLOB or memo field in an ADO dataset. BLOB fields are represented by TBlobField objects and descendants of TBlobField such as TGraphicField and TMemoField.

TADOBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field (raw binary data) to read or write such data by employing the uniform stream interface.

To use an ADO BLOB stream, create an instance of TADOBlobStream, use the methods of the stream to read or write the data, and then free the BLOB stream. Do not use the same instance of TADOBlobStream to access data from more than one record. Instead, create a new TADOBlobStream object every time you need to read or write BLOB data on a new record.

Use the Read method to copy the data from BLOB field object to a PChar (or comparable) buffer. Use the Write method to copy from buffer to BLOB field object. When reading data from the BLOB field object, use the Size property to determine the volume of the field’s contents and to allocate the correct amount of space in memory for the receiving buffer.


 VCL Reference

TADOBlobStream properties

TADOBlobStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TADOBlobStream properties

TADOBlobStream	By object	Legend

Memory

Position

Size


 VCL Reference

TADOBlobStream methods

TADOBlobStream	Alphabetically	Legend

In TADOBlobStream

Create

Destroy

Truncate

Write

Derived from TMemoryStream

Clear

LoadFromFile

LoadFromStream

SetSize

Derived from TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TADOBlobStream methods

TADOBlobStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

SetSize

Truncate

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TADOBlobStream.Create
 VCL Reference

TADOBlobStream.Create

TADOBlobStream	See also

Creates a new TADOBlobStream object.

constructor Create(Field: TBlobField; Mode: TBlobStreamMode);

Description

Call Create to obtain an instance of TADOBlobStream for reading from or writing to a specific BLOB field object.

Create links the TADOBlobStream to the field object specified by the Field parameter. Mode specifies whether the BLOB stream will be used to read data (bmRead), write data (bmWrite) or modify data (bmReadWrite).


TADOBlobStream.Destroy
 VCL Reference

TADOBlobStream.Destroy

TADOBlobStream	See also

Destroys an instance of TADOBlobStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TADOBlobStream reference is not nil before calling Destroy.

Destroy a TADOBlobStream object when it is no longer needed to store or write data. Destroy calls Clear to free the memory buffer before calling the inherited destructor.

Destroy performs the following tasks:

Sets the field’s data.

Changes the field object’s Modified property to True.

Triggers a field change event in the field’s dataset object.

Calls the inherited destructor.


TADOBlobStream.Truncate
 VCL Reference

TADOBlobStream.Truncate

TADOBlobStream	See also

Discards all data in the BLOB field from the current position on.

procedure Truncate;

Description

Use Truncate to limit the size of the data in the BLOB field. Calling Truncate when the current position is 0 will clear the contents of the BLOB field. If Position is other than zero, data is cleared from the point to the end of the field's data for the current record.

Note:	Do not call Truncate when the TADOBlobStream was created in bmRead mode.


TADOBlobStream.Write
 VCL Reference

TADOBlobStream.Write

TADOBlobStream	See also

Writes data from a memory buffer to a BLOB field object.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to copy data from a PChar (or comparable) buffer in memory to the BLOB field object. Write copies data from the buffer to the current position in the BLOB field object (current position indicated by the Position property). Write copies the number of bytes specified in Count or the number of bytes remaining in the memory buffer (counting from the current position to the end), whichever is less. Write can be called multiple times during the lifetime of a TADOBlobStream, each call copying less than the total number of bytes to be copied.

Count represents the maximum number of bytes to copy in a single call to Write. Count may be less than, the same as, or greater than the number of bytes actually contained in the memory buffer. If Count is greater than the actual number of bytes present or remaining in the memory buffer, copying stops at the last byte. No penalty is incurred on exceptions generated by specifying a number greater than the actual size of the contents.

Write updates the Size property to Position + Count, and sets the Position property to the new value of Size. Thus, any data that was stored in the memory stream in the Count bytes after the current position is lost when calling Write.

After successful execution, Write returns the number of bytes copied to the BLOB field object. If the return value is less than Count, the most likely reason is that the end of the buffer was reached prior to copying the specified number of bytes.

var

  P: PChar;

  S: Integer;

  BS: TADOBlobStream;

begin

  if not (ADOTable1.State in [dsEdit, dsInsert]) then

    ADOTable1.Edit;

  BS := TADOBlobStream.Create(TMemoField(ADOTable1.Fields[1]), bmWrite);

  try

    S := Memo1.GetTextLen;

    Inc(S);

    P := AllocMem(S);

    FillChar(P^, S, #0);

    Memo1.GetTextBuf(P, S);

    BS.Write(P^, S);

  finally

    BS.Free;

    FreeMem(P, S);

  end;

end;


Hierarchy

TObject

TStream

TCustomMemoryStream

TMemoryStream

TADOBlobStream


TADOCommand
 VCL Reference

TADOCommand

Hierarchy	Properties	Methods	Using TADOCommand	See also

TADOCommand represents an ADO command object.

Unit

ADODB

Description

The TADOCommand represents the ADO Command object. Use TADOCommand for issuing commands against a data store accessed through an ADO (ActiveX Data Objects) provider.

The TADOCommand component executes the command specified in its CommandText property. One command may be executed at a time. Parameters, if the command includes them, are specified in its Parameters property. The command is executed by a call to the Execute method.

TADOCommand can either use a TADOConnection object to connect to a data store (through its Connection property) or connect directly to the data store if the connection information is specified in the ConnectionString property.

TADOCommand is most often used for executing data definition language (DDL) SQL commands or to execute a stored procedure that does not return a result set. For SQL statements that return a result set, TADODataSet, TADOQuery, or TADOStoredProc is better suited. The Execute method of TADOCommand is, however, capable of returning a recordset. To use that recordset, however, you will need a separate ADO dataset component.

As a close representation of the ADO Command object, many of the TADOCommand properties and methods have the same name as those of the ADO Command object and serve the same purpose. For example, the CommandType property and Execute methods are the same in both the TADOCommand component and ADO Command object. Note that subsequent versions of ADO may introduce changes in the underlying ADO command object, which will change the behavior of TADOCommand. As a result, you may want to view the Microsoft Data Store SDK documentation for additional information about the behavior of TADOCommand.


 VCL Reference

TADOCommand properties

TADOCommand	Alphabetically	Legend

In TADOCommand

CommandObject

CommandText

CommandTimeout

CommandType

Connection

ConnectionString

ExecuteOptions

Name

ParamCheck

Parameters

Prepared

Properties

States

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TADOCommand properties

TADOCommand	By object	Legend

CommandObject

CommandText

CommandTimeout

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

DesignInfo

ExecuteOptions

Name

Owner

ParamCheck

Parameters

Prepared

Properties

States

Tag

VCLComObject


TADOCommand.CommandObject
 VCL Reference

TADOCommand.CommandObject

TADOCommand	See also

Provides direct access to the ADO command object.

property CommandObject: _Command;

Description

Use CommandObject to get direct access to the ADO command object the command component represents. Accessing the underlying command object is especially useful for utilizing properties and methods not surfaced in TADOCommand.

Note:	Use of CommandObject to directly access the underlying ADO command object requires a good working knowledge of ADO objects in general and the ADO command object in specific. It is not recommended that you use the command object directly unless familiar with command object operations. Consult the Microsoft Data Store SDK help for specific information on using ADO command objects.


TADOCommand.CommandText
 VCL Reference

TADOCommand.CommandText

TADOCommand	See also

Specifies command to execute.

property CommandText: WideString;

Description

Use CommandText to specify the command to execute using the ADO command component. CommandText is a textual representation of the command such as an SQL statement, a table name, or the name of a stored procedure to execute.

ADOCommand1.CommandText := 'DROP TABLE Employee1986';

If the command includes parameters, as might be the case with an SQL statement or stored procedure, access the them through the Parameters property.


TADOCommand.CommandTimeout
 VCL Reference

TADOCommand.CommandTimeout

TADOCommand	See also

Specifies the amount of time to attempt execution of the command.

property CommandTimeout: Integer;

Description

Use CommandTimeout to indicate the time, in seconds, that can elapse before an attempt to execute the command is considered unsuccessful. The default value for CommandTimeout is 30.

If a command is successfully executed prior to the expiration of the seconds specified, CommandTimeout has no effect.


TADOCommand.CommandType
 VCL Reference

TADOCommand.CommandType

TADOCommand	See also

Specifies the type of command to execute.

property CommandType: TCommandType;

Description

Set CommandType to indicate the type of command that is contained in the CommandText property. The value in CommandType should agree with that of CommandText. For instance, if CommandText is the name of a table, CommandType should be cmdTable or cmdTableDirect.

The default value of CommandType is cmdUnknown. While CommandType may be left as cmdUnknown for all commands, setting CommandType to explicitly indicate the type of the command results in better performance. When CommandType is cmdUnknown, ADO must evaluate the command to determine its type, which slows the operation.

Note:	The TCommandType constants cmdTable, cmdTableDirect, and cmdOpenFile should not be used with commands executed from a TADOCommand component.


TADOCommand.Connection
 VCL Reference

TADOCommand.Connection

TADOCommand	See also

Specifies ADO connection component to use.

property Connection: TADOConnection;

Description

Set Connection to specify the TADOConnection the command component uses to connect to the data store.

ADOCommand1.Connection := ADOConnection1;

Note:	the connection of an ADO command component to a data store can either be through a TADOConnection specified in the Connection property or directly through the connection string specified in ConnectionString. These two properties are mutually exclusive.


TADOCommand.ConnectionString
 VCL Reference

TADOCommand.ConnectionString

TADOCommand	See also

Specifies the connection information for the database.

property ConnectionString: WideString;

Description

Set ConnectionString to specify the information needed to connect the command component to the data store. The value used for ConnectionString consists of one or more arguments ADO uses to establish the connection. Specify multiple arguments as a list with individual arguments separated by semicolons.

ADOCommand1.ConnectionString := 'Provider=YourProviderName;Remote Server=YourServerName';

At design-time, select from the list of available ADO database connections invoked from the Object Inspector.

A connection string may be saved to file for later use. Specify only the name of such a file in ConnectionString to reuse a saved connection string.

The connection string may also contain login information such as user ID and password, for automated logins.

ADO supports the following four arguments for connection strings. Any other arguments (such as a user ID and password) are not processed by ADO and simply passed on to the provider.

Argument	Meaning

Provider	The name of the provider to use for the connection.

File name	The name of a file containing connection information.

Remote Provider	The name of the provider to use for a client-side connection.

Remote Server	The path name of the server to use for a client-side connection.

Note:	the connection of an ADO command component to a database can either be through a TADOConnection specified in the Connection property or directly through the connection string specified in ConnectionString. These two means for connecting to a database are mutually exclusive.

Note:	After opening a connection, the contents of ConnectionString may be changed by ADO. One example of this behavior is when ADO-defined arguments are mapped to their provider equivalents.


TADOCommand.ExecuteOptions
 VCL Reference

TADOCommand.ExecuteOptions

TADOCommand

Specifies the characteristics of a command execution.

property ExecuteOptions: TExecuteOptions;

Description

Set ExecuteOptions to control the characteristics of a command executed from the ADO dataset component.


TADOCommand.Name
 VCL Reference

TADOCommand.Name

TADOCommand

Specifies the name of the ADO command object as referenced by other components.

property Name: TComponentName;

Description

Use Name to change the name of an ADO command object to reflect its purpose in the current application. This is the name to use when referencing the TADOCommand object in code.

Note:	Name also provides for doing late bound executes from the connection. See the Microsoft Data Access Components SDK for more information.


TADOCommand.ParamCheck
 VCL Reference

TADOCommand.ParamCheck

TADOCommand	See also

Specifies whether the parameter list for an ADO command component is regenerated if the SQL changes at runtime.

property ParamCheck: Boolean;

Description

Set ParamCheck to specify whether or not the Parameters property is initialized using ":Param" style parameters in an SQL statement specified in the CommandText property. If the SQL statement in CommandText only contains "?" style parameters, the Parameters property will only be initialized if the OLE DB provider returns parameter information for an SQL command. Otherwise, the parameters must be explicitly created using the TParameters.CreateParameter method.

When ParamCheck is True, a parameter is generated for each ":Param" style parameter in the SQL statement.

The default value of ParamCheck is True.

This property is useful for data definition language (DDL) statements that contain parameters as part of the DDL statement and that are not parameters for the ADO command component. For example, the DDL statement to create a stored procedure may contain parameter statements that are part of the stored procedure. Set ParamCheck to False to prevent these parameters from being mistaken for parameters of the ADO command component executing the DDL statement.


TADOCommand.Parameters
 VCL Reference

TADOCommand.Parameters

TADOCommand	See also

Contains the parameters for an ADO command object’s SQL statement.

property Parameters: TParameters;

Description

Access Parameters at runtime to view and set parameter names, values, and data types dynamically (at design time use the collection editor for the Parameters property to set parameter information). Parameters is a zero-based array of TParameter parameter records. Index specifies the array element to access.

Note:	Parameters is only applicable when the ADO command object issues an SQL statement or executes a stored procedure (the CommandType is cmdText or cmdStoredProc) and parameters are actually used in the SQL statement or stored procedure.


TADOCommand.Prepared
 VCL Reference

TADOCommand.Prepared

TADOCommand	See also

Specifies whether the command is prepared before execution.

property Prepared: WordBool;

Description

Set Prepared before calling the Execute method to specify whether ADO prepares the command. If Prepared is set to True and the command component is connected to a data store, ADO prepares the command before executing it. If Prepared is set to False, ADO does not prepare the command.

The default value of Prepared is False.


TADOCommand.Properties
 VCL Reference

TADOCommand.Properties

TADOCommand

Properties is the implementation of the Properties Collection object.

property Properties: Properties;

Description

Use Properties to get direct access to the ADO Properties Collection for the ADO Command object the ADO command component represents. A Properties Collection object is a container for one or more Property objects. Each Property object corresponds to a characteristic of an ADO object, here an ADO Command object.

Note:	Use of Properties to directly access the underlying ADO Properties Collection object requires a good working knowledge of ADO objects in general and ADO Properties Collection objects in specific. Consult the Microsoft Data Store SDK help for specific information on using ADO Properties Collection objects.


TADOCommand.States
 VCL Reference

TADOCommand.States

TADOCommand	See also

Indicates the current state of the ADO command component.

property States: TObjectStates;

Description

Read States at runtime to determine the activity being performed, if any, by the command component at a specific point in time. Activity status includes the command component connecting to a data store, executing a command, fetching rows for a recordset, sitting idle but open, and sitting idle and closed.


 VCL Reference

TADOCommand methods

TADOCommand	Alphabetically	Legend

In TADOCommand

Assign

Cancel

Create

Destroy

Execute

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Derived from TButton

UseRightToLeftAlignment


 VCL Reference

TADOCommand methods

TADOCommand	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Cancel

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TADOCommand.Assign
 VCL Reference

TADOCommand.Assign

TADOCommand

Makes one ADO command component a duplicate of another.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to copy the property values from one ADO command object to the properties of the current ADO command object.

Source is the ADO command object from which property values are copied. Source must be another TADOCommand object or an instance of a descendant class.

ADOCommand1.Assign(ADOCommand2);

Assign copies the values of the following properties specific to ADO command objects:

Connection, if assigned; otherwise the ConnectionString property is copied.

CommandText.

CommandTimeout.

CommandType.

Prepared.

Parameters.


TADOCommand.Cancel
 VCL Reference

TADOCommand.Cancel

TADOCommand	See also

Halts execution of an ADO command.

procedure Cancel;

Description

Call Cancel abort the execution of a command executed by the command component. To use Cancel to abort a command, the command by have been executed asynchronously (the eoAsyncExecute TExecuteOption must have been used). If the command is not asynchronous an exception is raised. Use the command component’s ExecuteOptions to specify that a command is executed asynchronously.

Note:	To successfully cancel a command, Cancel must be called before the number of seconds specified in CommandTimeout have expired.


TADOCommand.Create
 VCL Reference

TADOCommand.Create

TADOCommand	See also

Constructs an instance of an ADO command component.

constructor Create(AOwner: TComponent); override;

Description

Use Create to programmatically instantiate an ADO command component. Command components added in the form designer are created automatically.

Create

Calls its inherited Create method.

Initializes the CommandObject property.

Initializes the Parameters property.

Sets the ParamCheck property to True.


TADOCommand.Destroy
 VCL Reference

TADOCommand.Destroy

TADOCommand	See also

Destroys the command component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free.  Free verifies that the command component is not nil, and only then calls Destroy.

Destroy performs the following tasks:

Destroys the command object in the CommandObject property.

Destroys the parameter collection in the Parameters property.

Calls the inherited destructor.


TADOCommand.Execute
 VCL Reference

TADOCommand.Execute

TADOCommand	See also

Causes the ADO command object’s command to be executed.

function Execute: _Recordset; overload;

function Execute(const Parameters: OleVariant): _Recordset; overload;

function Execute(var RecordsAffected: Integer; const Parameters: OleVariant): _RecordSet; overload;

Description

Call Execute to immediately execute the command specified in the CommandText property.

RecordsAffected indicates the number of records, if the command operates on data, that are affected by the command after execution.

Parameters is a collection of parameters for the command, unnecessary if the command does not use any parameters.

When a command is executed that creates a recordset, Execute returns the recordset and it must be accessed through an ADO dataset component. To do this, assign the return value of Execute directly to the recordset property of an ADO data set component. For example:

ADODataSet1.Recordset := ADOCommand1.Execute;


Hierarchy

TObject

TPersistent

TComponent

TADOCommand


TADOConnection
 VCL Reference

TADOConnection

Hierarchy	Properties	Methods	Events	Using TADOConnection	See also

TADOConnection connects to an ADO data store.

Unit

ADODB

Description

TADOConnection encapsulates the ADO connection object. Use TADOConnection for connecting to ADO data stores. The connection provided by a single TADOConnection component can be shared by multiple ADO command and dataset components through their Connection properties.

TADOConnection allows you to control the attributes and conditions of a connection to a data store. Use the properties of TADOConnection to control such attributes as record locking scheme (optimistic versus pessimistic), cursor type, cursor location, isolation level, and connection timeout. Methods are also provided for implementing transactions and retrieving metadata about the database to which this component connects.


 VCL Reference

TADOConnection properties

TADOConnection	Alphabetically	Legend

In TADOConnection

Attributes

CommandCount

Commands

CommandTimeout

Connected

ConnectionObject

ConnectionString

ConnectionTimeout

ConnectOptions

CursorLocation

DataSetCount

DataSets

DefaultDatabase

Errors

InTransaction

IsolationLevel

KeepConnection

Mode

Properties

Provider

State

Version

Derived from TCustomConnection

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TADOConnection properties

TADOConnection	By object	Legend

Attributes

CommandCount

Commands

CommandTimeout

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

ConnectionObject

ConnectionString

ConnectionTimeout

ConnectOptions

CursorLocation

DataSetCount

DataSets

DefaultDatabase

DesignInfo

Errors

InTransaction

IsolationLevel

KeepConnection

LoginPrompt

Mode

Name

Owner

Properties

Provider

State

Tag

VCLComObject

Version


TADOConnection.Attributes
 VCL Reference

TADOConnection.Attributes

TADOConnection 	See also

Specifies automated transaction behavior.

property Attributes: TXactAttributes;

Description

Set Attributes to specify whether a connection object performs retaining commits or retaining aborts. The two behaviors are independent of each other.

Attributes can contain one of the two TXactAttribute values (xaCommitRetaining and xaAbortRetaining), both values, or neither value.

ADOConnection1.Attributes := [xaCommitRetaining, xaAbortRetaining];


TADOConnection.CommandCount
 VCL Reference

TADOConnection.CommandCount

TADOConnection	See also

Indicates the number of command components associated with the connection.

property CommandCount: Integer

Description

Read CommandCount to determine the number of command components associated with the connection component. A command component is associated with a connection component if its Connection property is set to the connection component.

CommandCount can be used as the basis for a loop to access each command component using the Commands property. For example, to execute all of the TADOCommand components connected through the TADOConnection component ADOConnection1:

var

  i: Integer;

begin

  for i := 0 to (ADOConnection1.CommandCount – 1) do

    ADOConnection1.Commands[i].Execute;

end;


TADOConnection.Commands
 VCL Reference

TADOConnection.Commands

TADOConnection	See also

Lists all active commands for the connection component.

property Commands[Index: Integer]: TADOCommand

Description

Use Commands to access active command components associated with a connection component. An active command component is one that is currently open.

Commands connected through an ADO connection object can be accessed in sequence through the Commands property in a loop based on CommandCount. For example, to execute all of the TADOCommand components connected through the TADOConnection component ADOConnection1:

var

  i: Integer;

begin

  for i := 0 to (ADOConnection1.CommandCount – 1) do

    ADOConnection1.Commands[i].Execute;

end;


TADOConnection.CommandTimeout
 VCL Reference

TADOConnection.CommandTimeout

TADOConnection	See also

Specifies amount of time to attempt execution of a command.

property CommandTimeout: Integer;

Description

Use CommandTimeout to specify the amount of time, in seconds, that that can expire before an attempt to execute a command is considered unsuccessful. The default value is 30 seconds.

If a command successfully executed prior to the expiration of the seconds specified in CommandTimeout, this property has no effect. If execution of a command has not been successfully completed before the time has elapsed, the command is canceled.


TADOConnection.Connected
 VCL Reference

TADOConnection.Connected

TADOConnection	See also

Specifies whether the connection is active.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to an ADO data store without opening a dataset. Set Connected to False to close a connection. The default value for Connected is False.

An application can check Connected to determine the current status of a connection. If Connected is True, the connection is active; if False, and the KeepConnection property is also False, then the connection is inactive.

Connected can also be used in a program to determine the success of a call to the Open method (a True value in Connected) or the Close method (a False value).

with ADOConnection1 do begin

  Open;

  if Connected then

    { connection successful }

  else

    { connection unsuccessful };

end;


TADOConnection.ConnectionObject
 VCL Reference

TADOConnection.ConnectionObject

TADOConnection	See also

Provides direct access to the ADO connection object.

property ConnectionObject: _Connection;

Description

Use ConnectionObject to get direct access to the ADO connection object the connection component represents. This direct access reference allows an application to use properties and methods of the underlying connection object. Accessing the underlying connection object is especially useful for utilizing properties and methods of the connection object not surfaced in TADOConnection.

Note:	Use of ConnectionObject to directly access the underlying ADO connection object requires a good working knowledge of ADO objects in general and the ADO connection object in specific. Using the connection object directly is not recommended unless you are familiar with connection object operations. Consult the Microsoft Data Store SDK help for specific information on using ADO connection objects.


TADOConnection.ConnectionString
 VCL Reference

TADOConnection.ConnectionString

TADOConnection	See also

Specifies the connection information for the data store.

property ConnectionString: WideString;

Description

Set ConnectionString to specify the information needed to connect the ADO connection component to the data store. The value used for ConnectionString consists of one or more arguments ADO uses to establish the connection. Specify multiple arguments as a list with individual arguments separated by semicolons.

ADOConnection1.ConnectionString := 'Provider=ProviderRef;Remote Server=ServerRef';

At design-time, select from the list of available ADO database connections invoked from the Object Inspector.

A connection string may be saved to file for later use. Specify only the name of such a file in ConnectionString to reuse a saved connection string.

The connection string may also contain login information such as user ID and password, for automated logins.

When explicitly passing login information through either the Open method or the ConnectionString, the LoginPrompt property should be set to False to prevent an unnecessary login dialog.

ADO supports the following four arguments for connection strings. Any other arguments (such as a user ID and password) are not processed by ADO and simply passed on to the provider.

Argument	Meaning
Provider	The name of the provider to use for the connection.
File name	The name of a file containing connection information.
Remote Provider	The name of the provider to use for a client-side connection.
Remote Server	The path name of the server to use for a client-side connection.
Note:	After opening a connection, the contents of ConnectionString may be changed by ADO. One example of this behavior is when ADO-defined arguments are mapped to their provider equivalents.


TADOConnection.ConnectionTimeout
 VCL Reference

TADOConnection.ConnectionTimeout

TADOConnection	See also

Specifies amount of time to attempt a connection.

property ConnectionTimeout: Integer;

Description

Use ConnectionTimeout to specify the amount of time, in seconds, that can expire before an attempt to make a connection is considered unsuccessful. The default value is 15 seconds.

If a connection is successfully made prior to the expiration of the seconds specified or the Cancel method is called, ConnectionTimeout has no effect. If the specified time expires and a connection has not been successfully made, the attempt is terminated and an exception is raised.


TADOConnection.ConnectOptions
 VCL Reference

TADOConnection.ConnectOptions

TADOConnection	See also

Specifies whether a connection is synchronous or asynchronous.

property ConnectOptions: TConnectOption;

Description

Set ConnectOptions to specify whether the connection established by the TADOConnection is synchronous or asynchronous. The default value for ConnectOptions is coConnectUnspecified.

An application will typically use the default of a synchronous connection (coConnectUnspecified). Typically an asynchronous is only really needed to compensate for a slow server.


TADOConnection.CursorLocation
 VCL Reference

TADOConnection.CursorLocation

TADOConnection

Specifies whether cursors for the connection is client-side or server-side.

property CursorLocation: TCursorLocation;

Description

Use CursorLocation to indicate whether the cursors that use the connection object to connect to the ADO datastore use a client-side or server-side cursor library. CursorLocation only affects connections opened after the property is set. The default value for CursorLocation is clUseClient.

A client-side cursor offers more flexibility. All data is retrieved to the local machine and then operated on there, allowing operations not normally supported by servers like sorting and resorting the data and additional filtering. SQL statements are executed at the server, so for statements that restrict the result set with a WHERE clause, oly the reduced result set is retrieved to a local cursor.

A server-side cursor offers less flexibility, but may be more advantageous (or necessary) for large result sets. Using a server-side cursor becomes necessary when the sheer size of a result set exceeds the available disk space that would be needed to create the client-side cursor. Also, many servers only support unidirectional cursors. This would preclude moving the record pointer in the dataset backward (even one record) through the result set.


TADOConnection.DataSetCount
 VCL Reference

TADOConnection.DataSetCount

TADOConnection	See also

Indicates the number of active datasets associated with the connection component.

property DataSetCount: Integer;

Description

Read DataSetCount to determine the number of currently active datasets associated with the connection component. As datasets are opened and closed this value changes appropriately.

DataSetCount can be used as the basis for a loop to access each connected dataset using the DataSets property.

var

  i: Integer;

begin

  for i := 0 to (ADOConnection1.DataSetCount – 1) do

    ListBox1.Items.Add(ADOConnection1.DataSets[i].Name)

end;


TADOConnection.DataSets
 VCL Reference

TADOConnection.DataSets

TADOConnection	See also

Provides an indexed array of all active datasets for a connection component.

property DataSets[Index: Integer]: TCustomADODataSet;

Description

Use DataSets to access active datasets associated with a connection component. An active dataset is one that is currently open.

Datasets connected through an ADO connection object can be accessed in sequence through the DataSets property in a loop based on DataSetCount.

var

  i: Integer;

begin

  for i := 0 to (ADOConnection1.DataSetCount – 1) do

    ListBox1.Items.Add(ADOConnection1.DataSets[i].Name)

end;

Note:	If a TADOClientDataSet uses the connection component to connect to a database server, DataSets lists the internal dataset that the client dataset creates to access data, not the client dataset itself.


TADOConnection.DefaultDatabase
 VCL Reference

TADOConnection.DefaultDatabase

TADOConnection	See also

Indicates the database the ADO connection uses by default.

property DefaultDatabase: WideString;

Description

Set DefaultDatabase to indicate the database the ADO connection objects uses if the connection to the database specified in ConnectionString is unavailable, the connection cannot be made, or the database is not specified in the connection string.

Note:	If a default database is specified in the ConnectionString property, it has precedence over the value in DefaultDatabase. The DefaultDatabase value is automatically changed to the database specified in ConnectionString when the connection component is opened.


TADOConnection.Errors
 VCL Reference

TADOConnection.Errors

TADOConnection

Errors is the implementation of the Errors Collection.

property Errors: Errors;

Description

Use Errors to get direct access to the ADO Errors Collection for the ADO Connection object the TADOConnection component represents. This direct access reference allows an application to use properties and methods of the underlying Errors Collection object. Accessing the underlying connection object is especially useful for utilizing properties and methods of the Errors Collection not surfaced in TADOConnection.

The Errors Collection object of a Connection object contains the errors generated by the provider. For each provider error, one or more ADO Error objects are placed in the Errors Collection. Error objects represent individual errors from the provider and are not ADO-specific. On a subsequent error, the Errors Collection is cleared of any Error objects and new Error objects are inserted for the current error.

Note:	Use of Errors to directly access the underlying ADO Errors Collection object requires a good working knowledge of ADO objects in general and ADO Errors Collection objects in specific. Using the Errors Collection object directly is not recommended unless you are familiar with connection object operations. Consult the Microsoft Data Store SDK help for specific information on using ADO Errors Collection objects.


TADOConnection.InTransaction
 VCL Reference

TADOConnection.InTransaction

TADOConnection	See also

Indicates whether a transaction is in progress.

property InTransaction: Boolean;

Description

Read InTransaction at runtime to determine whether a transaction is currently active for the ADO connection component. If the connection component is currently in a transaction, InTransaction contains a True value. If no transaction is currently active it contains False.

A transaction is will be active if the BeginTrans method has been called to initiate a transaction but that transaction has not either been consumated by calling CommitTrans or canceled by calling the RollbackTrans method. Use the InTransaction property to prevent calling BeginTrans when a transaction has already been initiated for the connection component.


TADOConnection.IsolationLevel
 VCL Reference

TADOConnection.IsolationLevel

TADOConnection

Specifies the transaction isolation level for transactions.

property IsolationLevel: TIsolationLevel;

Description

Use IsolationLevel to specify the transaction isolation level for a connection. The transaction isolation level determines how a transaction interacts with other simultaneous transactions when they work with the same tables, and how much a transaction sees of the work performed by other transactions. The default value for IsolationLevel is ilCursorStability.

Set IsolationLevel to a valid TIsolationLevel value prior to starting a new transaction. Read IsolationLevel after the transaction has been activated to determine the actual transaction isolation level used. It is possible that a server will force an isolation level other than that requested if the level requested is not supported.

Below are four of the supported transaction levels and the transaction phenomena that may occur under each. For more information on all supported transaction levels, see the topic for the TIsolationLevel type.

Isolation Level	Dirty Reads	Nonrepeatable Reads	Phantoms

Read uncommitted	Yes	Yes	Yes

Read committed	Yes	Yes

Repeatable read	Yes

Serializable

Dirty reads occur when a transaction reads data that has not yet been committed. Nonrepeatable reads occur when a transaction reads the same row twice and the data is different each time. Phantoms are rows that match the criteria used to compose a result set, but that are not initially visible.


TADOConnection.KeepConnection
 VCL Reference

TADOConnection.KeepConnection

TADOConnection

Specifies whether an application remains connected to a database even if no datasets are open.

property KeepConnection: Boolean;

Description

Use KeepConnection to specify whether an application remains connected to a database even if no associated dataset components are currently active. When KeepConnection is True (the default) the connection is maintained. For connections to remote database servers, or for applications that frequently open and close datasets, set KeepConnection to True to reduce network traffic, speed up applications, and avoid logging in to the server each time the connection is reestablished.

When KeepConnection is False a connection is dropped when there are no open datasets. Dropping a connection releases system resources allocated to the connection, but if a dataset is later opened that uses the database, the connection must be reestablished and initialized.


TADOConnection.Mode
 VCL Reference

TADOConnection.Mode

TADOConnection

Indicate the persimissions available to a connection.

property Mode: TConnectMode;

Description

Read Mode to determine the permissions available to the connection after the connection has been activated. The permissions expressed in Mode govern the types of operations (such as reading and writing) can be performed through the connection. They also control how these operations are affected by and affect other concurrent users.


TADOConnection.Properties
 VCL Reference

TADOConnection.Properties

TADOConnection

Properties is the implementation of the Properties Collection object.

property Properties: Properties;

Description

Use Properties to get direct access to the ADO Properties Collection for the ADO Connection object the ADO connection component represents. A Properties Collection object is a container for one or more Property objects. Each Property object corresponds to a characteristic of an ADO object, here an ADO Connection object.

Note:	Use of Properties to directly access the underlying ADO Properties Collection object requires a good working knowledge of ADO objects in general and ADO Properties Collection objects in specific. Consult the Microsoft Data Store SDK help for specific information on using ADO Properties Collection objects.


TADOConnection.Provider
 VCL Reference

TADOConnection.Provider

TADOConnection	See also

Specifies the provider for the ADO connection.

property Provider: WideString;

Description

Set Provider to indicate the provider the ADO connection object uses.

The provider a connection is to use can also be specified in the string entered in ConnectionString. If Provider is left blank and the provider specified through ConnectionString, when the connection is activated the Provider property is automatically set indicating the provider used.


TADOConnection.State
 VCL Reference

TADOConnection.State

TADOConnection	See also

Indicates the current state of the ADO connection.

property State: TObjectStates;

Description

Read State at runtime to determine the activity being performed, if any, by the connection at a specific point in time. Activity status includes the command component connecting to a data store, executing a connection, fetching rows for a recordset, sitting idle but open, and sitting idle and closed.


TADOConnection.Version
 VCL Reference

TADOConnection.Version

TADOConnection

Indicates the version of ADO used.

property Version: WideString;

Description

Read Version at runtime to determine the version of ADO used. Some versions of ADO do not support all possible features, so querying Version is important when using features only supported in later versions.


 VCL Reference

TADOConnection events

TADOConnection	Alphabetically	Legend

In TADOConnection

OnBeginTransComplete

OnCommitTransComplete

OnConnectComplete

OnDisconnect

OnExecuteComplete

OnInfoMessage

OnRollbackTransComplete

OnWillConnect

OnWillExecute

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TADOConnection events

TADOConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnBeginTransComplete

OnCommitTransComplete

OnConnectComplete

OnDisconnect

OnExecuteComplete

OnInfoMessage

OnLogin

OnRollbackTransComplete

OnWillConnect

OnWillExecute


TADOConnection.OnBeginTransComplete
 VCL Reference

TADOConnection.OnBeginTransComplete

TADOConnection	See also

Occurs after beginning a transaction.

TBeginTransCompleteEvent = procedure(Connection: TADOConnection; TransactionLevel: Integer; const Error: Error; var EventStatus: TEventStatus) of object;

property OnBeginTransComplete: TBeginTransCompleteEvent read FOnBeginTransComplete write FOnBeginTransComplete;

Description

Write an OnBeginTransComplete event handler to take specific action after an attempt to begin a transaction has successfully completed. The OnBeginTransComplete event fires after the corresponding operation (initiation of a transaction) has executed at the ADO Connection object. Calling the BeginTrans method will lead to this event occurring.

TransactionLevel is the new transaction level from the call to the BeginTrans method.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnCommitTransComplete
 VCL Reference

TADOConnection.OnCommitTransComplete

TADOConnection	See also

Occurs after committing a transaction.

TConnectErrorEvent = procedure(Connection: TADOConnection; Error: Error; var EventStatus: TEventStatus) of object;

property OnCommitTransComplete: TConnectErrorEvent read FOnCommitTransComplete write FOnCommitTransComplete;

Description

Write an OnCommitTransComplete event handler to take specific action after an attempt to commit a transaction has successfully completed. The OnCommitTransComplete event fires after the corresponding operation (committing a transaction) has executed at the ADO Connection object. Calling the CommitTrans method will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnConnectComplete
 VCL Reference

TADOConnection.OnConnectComplete

TADOConnection	See also

Occurs after starting a connection.

TConnectErrorEvent = procedure(Connection: TADOConnection; Error: Error; var EventStatus: TEventStatus) of object;

property OnConnectComplete: TConnectErrorEvent read FOnConnectComplete write FOnConnectComplete;

Description

Write an OnConnectComplete event handler to take specific action after an attempt to connect to a database has successfully completed and the connection has started. The OnConnectComplete event fires after the corresponding operation (establishing a connection) has executed at the ADO Connection object. Calling the Open method or setting the Connected property to True will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnDisconnect
 VCL Reference

TADOConnection.OnDisconnect

TADOConnection	See also

Occurs after a connection is terminated.

TDisconnectEvent = procedure(Connection: TADOConnection; var EventStatus: TEventStatus) of object;

property OnDisconnect: TDisconnectEvent read FOnDisconnect write FOnDisconnect;

Description

Write an OnDisconnect event handler to take specific action after a connection to a database is terminated. The OnDisconnect event fires after the corresponding operation (ending a connection) has executed at the ADO Connection object. Calling the Close method or setting the Connected property to False will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnExecuteComplete
 VCL Reference

TADOConnection.OnExecuteComplete

TADOConnection	See also

Occurs after a command is executed.

TExecuteCompleteEvent = procedure(Connection: TADOConnection; RecordsAffected: Integer; const Error: Error; var EventStatus: TEventStatus; const Command: _Command; const Recordset: _Recordset) of object;

property OnExecuteComplete: TExecuteCompleteEvent read FOnExecuteComplete write FOnExecuteComplete;

Description

Write an OnExecuteComplete event handler to take specific action after the ADO connection object has successfully executed a command. The OnExecuteComplete event fires after the corresponding operation (executing an ADO command) has completed execution at the ADO Connection object. Calling the Execute method will lead to this event occurring.

Connection indicates the TADOConnection component executing the ADO command.

RecordsAffected indicated the number of rows in the table that were affected by the execution of the command. For instance, if the command deletes rows in a table, RowsAfftected indicates how many rows were deleted (possibly less than all rows if a WHERE clause is used in the command).

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Command is the ADO Command object executing the command. If no Command object was used, this parameter contains a nil value.

Recordset is an ADO Recordset object containing the result set for the command. Recordset only contains an ADO Recordset object if the command was a SELECT statement, otherwise it contains a nil value.


TADOConnection.OnInfoMessage
 VCL Reference

TADOConnection.OnInfoMessage

TADOConnection

Occurs when information messages are received from the data store connection.

TInfoMessageEvent = procedure(Connection: TADOConnection; const Error: Error; var EventStatus: TEventStatus) of object;

property OnInfoMessage: TInfoMessageEvent read FOnInfoMessage write FOnInfoMessage;

Description

Write an OnInfoMessage event handler to take specific action after an information message is received from a database connection. This event occurs when a connection event successfully completes and additional information is returned by the provider.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnRollbackTransComplete
 VCL Reference

TADOConnection.OnRollbackTransComplete

TADOConnection	See also

Occurs after rolling back a transaction.

TConnectErrorEvent = procedure(Connection: TADOConnection; Error: Error; var EventStatus: TEventStatus) of object;

property OnRollbackTransComplete: TConnectErrorEvent read FOnRollbackTransComplete write FOnRollbackTransComplete;

Description

Write an OnRollbackTransComplete event handler to take specific action after an attempt to roll back a transaction has successfully completed. The OnRollbackTransComplete event fires after the corresponding operation (rolling back a transaction) has executed at the ADO Connection object. Calling the RollbackTrans method will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TADOConnection.OnWillConnect
 VCL Reference

TADOConnection.OnWillConnect

TADOConnection	See also

Occurs after a request to start a connection.

TWillConnectEvent = procedure(Connection: TADOConnection; var ConnectionString, UserID, Password: WideString; var ConnectOptions: TConnectOption; var EventStatus: TEventStatus) of object;

property OnWillConnect: TWillConnectEvent read FOnWillConnect write FOnWillConnect;

Description

Write an OnWillConnect event handler to take specific action before a connection starts and after the provider indicates the connection attempt can be made. The OnWillConnect event fires after the corresponding operation (requesting a connection attempt) has executed at the ADO Connection object. Calling the Open method or setting the Connected property to True will lead to this event occurring.

Connection indicates the TADOConnection component attempting the connection.

ConnectionString contains the connection information for the pending connection.

UserID contains the user identification for the pending connection.

Password contains the password for the pending connection.

ConnectionOptions contains the TConnectOption value that describes how the provider is to evaluate the connection string for the pending connection.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. In a handler for this event, set this parameter to esCancel to request cancellation of the pending connection operation.


TADOConnection.OnWillExecute
 VCL Reference

TADOConnection.OnWillExecute

TADOConnection	See also

Occurs after a database server signals acceptance of a command execution.

TWillExecuteEvent = procedure(Connection: TADOConnection; var CommandText: WideString; var CursorType: TCursorType; var LockType: TADOLockType; var ExecuteOptions: TExecuteOptions; var EventStatus: TEventStatus; const Command: _Command; const Recordset: _Recordset) of object;

property OnWillExecute: TWillExecuteEvent read FOnWillExecute write FOnWillExecute;

Description

Write an OnWillExecute event handler to take specific action before a command is executed. The OnWillExecute event fires after the corresponding operation (requesting a command execution) has executed at the ADO Connection object. Calling the Execute method will lead to this event occurring.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the indicating value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. In a handler for this event, set this parameter to esCancel to request cancellation of the pending command execution.


 VCL Reference

TADOConnection methods

TADOConnection	Alphabetically	Legend

In TADOConnection

BeginTrans

Cancel

CommitTrans

Create

Destroy

Execute

GetProcedureNames

GetFieldNames

GetTableNames

Open

OpenSchema

RollbackTrans

Derived from TCustomConnection

Close

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADOConnection methods

TADOConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginTrans

Cancel

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

CommitTrans

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetProcedureNames

GetTableNames

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

OpenSchema

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RollbackTrans

SafeCallException

SetSubComponent

UpdateAction


TADOConnection.BeginTrans
 VCL Reference

TADOConnection.BeginTrans

TADOConnection	See also

Initiates a new transaction in the associated database.

function BeginTrans: Integer;

Description

Call BeginTrans to start a new transaction in the data store the ADO connection component is connected to.

BeginTrans returns a value of type Integer, indicating the nesting level of the new transaction.

A successful execution of BeginTrans triggers an OnBeginTransComplete event and sets the InTransaction property to True.

Note:	The ADO connection object must have an active connection before BeginTrans can be used.


TADOConnection.Cancel
 VCL Reference

TADOConnection.Cancel

TADOConnection	See also

Aborts an attempt to connect to a data store.

procedure Cancel;

Description

Call Cancel to abort an attempt to connect to an ADO data store. To use cancel, the connection attempted must be asynchronous (the ConnectOptions property must be set to coAsyncConnect).

Cancel must be used after an attempt to connect is initiated by calling the Open method (or setting Connected to True) and before the connection has been successfully made or has timed out.


TADOConnection.CommitTrans
 VCL Reference

TADOConnection.CommitTrans

TADOConnection	See also

Commits an open transaction.

procedure CommitTrans;

Description

Call CommitTrans to save any changes made during the current transaction and to end the transaction.

A successful execution of CommitTrans triggers an OnCommitTransComplete event and sets the InTransaction property to False.


TADOConnection.Create
 VCL Reference

TADOConnection.Create

TADOConnection	See also

Constructs an instance of the button control and initializes its values.

constructor Create(AOwner: TComponent); override;

Description

Use Create to programmatically instantiate an ADO connection. ADO connections added in the form designer are created automatically.

Create

Calls its inherited Create method.

Initializes its connection interface.

Initializes is list of associated datasets.


TADOConnection.Destroy
 VCL Reference

TADOConnection.Destroy

TADOConnection	See also

Destroys the bitmap button object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application.  Instead, call Free. Free verifies that the ADO connection is not nil, and only then calls Destroy.

Destroy performs the following tasks:

Closes the connection.

Destroys its list of associated datasets.

Checks for unprocessed connection events.

Destroys its connection interface.

Calls the inherited destructor.


TADOConnection.Execute
 VCL Reference

TADOConnection.Execute

TADOConnection	See also

Executes a command.

function Execute(const CommandText: WideString; ExecuteOptions: TExecuteOptions = []): _RecordSet; overload;

procedure Execute(const CommandText: WideString; var RecordsAffected: Integer; ExecuteOptions: TExecuteOptions = [eoExecuteNoRecords]); overload;

Description

Call Execute to execute a command using the ADO connection object.

CommandText is the command to execute.

ExecuteOptions is a TExecuteOptions value that specifies the characteristics of the command execution.

Execute returns a recordset if the command executed is one that generates a recordset.

RecordsAffected indicates the number of records, if the command operates on data, that are affected by the command after execution.


TADOConnection.GetFieldNames
 VCL Reference

TADOConnection.GetFieldNames

TADOConnection	See also

Populates a string list with the names of fields in a table.

procedure GetFieldNames(const TableName: String; List: TStrings);

Description

Call GetFieldNames to retrieve a list of fields in a table. The names of the fields are put into the already-existing string list object specified in the List parameter. Specify the table for which to retrieve the names of fields in the TableName property.

ADOConnection1.GetFieldNames('Employee', ListBox1.Items);


TADOConnection.GetProcedureNames
 VCL Reference

TADOConnection.GetProcedureNames

TADOConnection	See also

Populates a string list with the names of stored procedures in the database.

procedure GetProcedureNames(List: TStrings);

Description

Call GetProcedureNames to retrieve a list of stored procedures in the associated database. The names of the stored procedures are put into the already-existing string list object specified in the List parameter.

ADOConnection1.GetProcedureNames(ListBox1.Items);

Note:	Any contents already in the target string list object are eliminated and overwritten by the data produces by GetProcedureNames.


TADOConnection.GetTableNames
 VCL Reference

TADOConnection.GetTableNames

TADOConnection	See also	Example

Populates a string list with the names of tables in the database.

procedure GetTableNames(List: TStrings; SystemTables: Boolean = False);

Description

Call GetTableNames to retrieve a list of tables in the associated database.

List is the already-existing string list object into which the tables names are put.

Set SystemTables to indicate whether the list of table names should include the database’s system tables.

ADOConnection1.GetTableNames(ListBox2.Items, False);

Note:	Any contents already in the target string list object are eliminated and overwritten by the data produces by GetTableNames.


TADOConnection.Open
 VCL Reference

TADOConnection.Open

TADOConnection	See also

Initiates a connection to a database.

procedure Open; overload;

procedure Open(const UserID: WideString; const Password: WideString); overload;

Description

Call Open to initiate a connection to the database specified in the ConnectionString property.

UserID and Password parameters for Open can be optionally used to pass the user ID and login password to the database server at the same time the request is made to connect.

ADOConnection1.Open('Joe Sixpack', 'SecretWord');

Alternately, this login information may be passed in the value in ConnectionString.

When explicitly passing login information through either the Open method or the ConnectionString, the LoginPrompt property should be set to False to prevent an unnecessary login dialog.


TADOConnection.OpenSchema
 VCL Reference

TADOConnection.OpenSchema

TADOConnection	See also

Retrieves schema information from the connection’s provider.

procedure OpenSchema(const Schema: TSchemaInfo; const Restrictions: OleVariant; const SchemaID: OleVariant; DataSet: TADODataSet);

Description

Call OpenSchema to open a connection and retrieve schema information from the associated provider. OpenSchema retrieves the schema information in the form of a recordset that can then be accessed through an ADO dataset component.

The Schema parameter is the type of schema information to retrieve, or in ADO terms, the query type.

The Restrictions parameter is an array of query constraints for the specified type of schema information. This lists the type of information requested for the entity specified by Schema. In ADO terms, the elements of the array list the criteria for the query type.

SchemaID is the GUID for a provider-schema schema query not defined by the OLE DB specification. This parameter is required if the Schema parameter is set to siProviderSpecific, otherwise it is not used.

DataSet is the ADO dataset component (such as a TADOTable) into the Recordset property of which the schema information is retrieved and through which the information is subsequently accessed. After OpenSchema loads the ADO dataset component with the schema information, use the standard navigation methods like First and Next to traverse the rows of data. Use the Fields property or the FieldByName method of the dataset component to read the value of any one column. Alternately, the schema data may be displayed using visual data-aware controls and a TDataSource.


TADOConnection.RollbackTrans
 VCL Reference

TADOConnection.RollbackTrans

TADOConnection	See also

Rolls back an active transaction.

procedure RollbackTrans;

Description

Call RollbackTrans to cancel any changes made during the current transaction and to end the transaction.

A successful execution of RollbackTrans triggers an OnRollbackTransComplete event and sets the InTransaction property to True.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TADOConnection


TADODataSet
 VCL Reference

 TADODataSet

Hierarchy	Properties	Methods	Events 	Using TADODataSet	See also

TADODataSet represents a dataset retrieved from an ADO data store.

Unit

ADODB

Description

TADODataSet is the most generic of the ADO dataset components. TADODataSet is capable of retrieving a result set from one or more tables in an ADO data store. The retrieval can be either directly from a table or from one or more tables through an SQL statement.

Connect a TADODataSet to a data store before using it to retrieve a dataset. Do this with a connection string in its ConnectionString property or with a connection already established by a TADOConnection component specified in the Connection property.

Use the TADODataSet component's CommandText property to retrieve the dataset, specifying either a table name or an SQL statement (SELECT only). TADODataSet is not capable of issuing Data Manipulation Language (DML) SQL statements that do not return result sets (like DELETE, INSERT, and UPDATE). For this use a component like TADOCommand or TADOQuery.


 VCL Reference

TADODataSet properties

TADODataSet	Alphabetically	Legend

In TADODataSet

RDSConnection

Derived from TCustomADODataSet

BlockReadSize

CacheSize

CanModify

CommandText

CommandTimeout

CommandType

Connection

ConnectionString

CursorLocation

CursorType

DesignerData

EnableBCD

ExecuteOptions

Filter

Filtered

FilterGroup

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

LockType

MarshalOptions

MasterFields

MaxRecords

ParamCheck

Parameters

Prepared

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

StoreDefs

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TADODataSet properties

TADODataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheSize

CanModify

CommandText

CommandTimeout

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

CursorLocation

CursorType

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

EnableBCD

Eof

ExecuteOptions

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterGroup

FilterOptions

Found

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

LockType

MarshalOptions

MasterFields

MaxRecords

Modified

Name

ObjectView

Owner

ParamCheck

Parameters

Prepared

Properties

RDSConnection

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

SparseArrays

State

StoreDefs

Tag

VCLComObject


TADODataSet.RDSConnection
 VCL Reference

TADODataSet.RDSConnection

TADODataSet	See also

Specifies the RDS connection component to use.

property RDSConnection: TRDSConnection

Description

Use RDSConnection to specify the RDS connection component to use to obtain the recordset when the TADODataSet is opened. This property is mutually exclusive of the Connection property. If the TADODataSet uses RDSConnection to connect to the default RDS DataFactory, then the ConnectionString property should also be set with the connection information required by the DataFactory. The CommandText property should either specify the name of a property on the associated business object or be an SQL query.


 VCL Reference

TADODataSet events

TADODataSet	Alphabetically	Legend

Derived from TCustomADODataSet

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnMoveComplete

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TADODataSet events

TADODataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnFilterRecord

OnMoveComplete

OnNewRecord

OnPostError

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove


 VCL Reference

TADODataSet methods

TADODataSet	Alphabetically	Legend

In TADODataSet

CreateDataSet

GetIndexNames

Derived from TCustomADODataSet

BookmarkValid

CancelBatch

CancelUpdates

Clone

CompareBookmarks

Create

CreateBlobStream

DeleteRecords

Destroy

FilterOnBookmarks

GetBlobFieldData

GetDetailLinkFields

GetFieldData

IsSequenced

LoadFromFile

Locate

Lookup

Next

Requery

SaveToFile

Seek

Supports

UpdateBatch

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

Cancel

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADODataSet methods

TADODataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelBatch

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Clone

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FilterOnBookmarks

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordset

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Requery

Resync

SafeCallException

SaveToFile

Seek

SetFields

SetSubComponent

Supports

Translate

UpdateAction

UpdateBatch

UpdateCursorPos

UpdateRecord

UpdateStatus


TADODataSet.CreateDataSet
 VCL Reference

TADODataSet.CreateDataSet

TADODataSet

Creates the recordset for an ADO dataset.

procedure CreateDataSet;

Description

Applications should not need to call CreateDataSet themselves. CreateDataSet is called automatically by an ADO dataset to create its recordset.


TADODataSet.GetIndexNames
 VCL Reference

TADODataSet.GetIndexNames

TADOConnection	See also

Retrieves a list of available indexes for a table.

procedure GetIndexNames(List: TStrings);

Description

Call GetIndexNames to retrieve a list of all available indexes for a table. GetIndexNames fills a string list object (such as a TStringList) with the names of the index for the table represented by the TADODataSet component (and only that table). Any previous contents in the string list object are completely overwritten by the new information.

List is the string list object, created and maintained by the application, into which the index names are retrieved. This string list object must be created prior to the call to GetIndexNames.

The command line below fills the Items property of a TListBox with the names of indexes for the table represented by ADODataSet1.

ADODataSet1.GetIndexNames(ListBox1.Items);


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomADODataSet

TADODataSet


TADOQuery
 VCL Reference

 TADOQuery

Hierarchy	Properties	Methods	Events 	Using TADOQuery	See also

TADOQuery provides the means for issuing SQL against an ADO data store.

Unit

ADODB

Description

Use TADOQuery to access one or more tables in a data store using SQL statements.

Retrieve data from tables in an ADO data store using SELECT statements. Perform actions on tables and other metadata objects in an ADO data store with statements like INSERT, DELETE, UPDATE, ALTER TABLE, and CREATE TABLE. Execute stored procedures.


 VCL Reference

TADOQuery properties

TADOQuery	Alphabetically	Legend

In TADOQuery

DataSource

RowsAffected

SQL

Derived from TCustomADODataSet

BlockReadSize

CacheSize

CanModify

CommandTimeout

Connection

ConnectionString

CursorLocation

CursorType

DesignerData

EnableBCD

ExecuteOptions

Filter

Filtered

FilterGroup

IndexFieldCount

IndexFields

IndexName

LockType

MarshalOptions

MaxRecords

ParamCheck

Parameters

Prepared

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TADOQuery properties

TADOQuery	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheSize

CanModify

CommandTimeout

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

CursorLocation

CursorType

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

EnableBCD

Eof

ExecuteOptions

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterGroup

FilterOptions

Found

IndexFieldCount

IndexFields

IndexName

IsUniDirectional

LockType

MarshalOptions

MaxRecords

Modified

Name

ObjectView

Owner

ParamCheck

Parameters

Prepared

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

RowsAffected

Sort

SparseArrays

SQL

State

Tag

VCLComObject


TADOQuery.DataSource
 VCL Reference

TADOQuery.DataSource

TADOQuery	See also

Specifies the data source component from which to extract current field values to use in same-name parameters in the ADO query’s SQL statement.

property DataSource: TDataSource;

Description

Set DataSource to automatically fill parameters in a query with fields values from another dataset. Parameters that have the same name as fields in the other dataset are filled with the field values. Parameters with names that are not the same as fields in the other dataset do not automatically get values, and must be programmatically set. For example, if the SQL property of the TADOQuery contains the SQL statement below and the dataset referenced through DataSource has a CustNo field, the value from the current record in that other dataset is used in the CustNo parameter:

SELECT *

FROM Orders O

WHERE (O.CustNo = :CustNo)

DataSource must point to a TDataSource component linked to another dataset component; it cannot point to this query component. The dataset specified in DataSource must be created, populated, and opened before attempting to bind parameters. Parameters are bound by setting the ADO query’s Prepared property to True prior to executing the query. If the SQL statement used by a query does not contain parameters, or all parameters are bound by the application using the Parameters property or the ParamByName method, DataSource need not be assigned. The example below shows setting the DataSource property of ADOQuery2 to the data source for ADOQuery1, preparing ADOQuery2, and activating ADOQuery2:

with ADOQuery2 do begin

  DataSource := DataSource1;

  Prepared := True;

  Open;

end;

If the SQL statement in the TADOQuery is a SELECT query, the query is executed using the new field values each time the record pointer in the other dataset is changed. It is not necessary to call the Open method of the TADOQuery each time. This makes using the DataSource property to dynamically filter a query result set useful for establishing Master-Detail relationships. Set the DataSource property in the Detail query to the TDataSource component for the Master dataset.

If the SQL statement uses other than a SELECT query (such as INSERT or UPDATE), the parameters with the same name as fields in the other dataset still get values, but the query must be explicitly executed each time the other dataset’s record pointer moves. For example, the SQL statement below uses the INSERT statement and has the parameters CustNo and CompanyName:

INSERT INTO Customer

(CustNo, Company)

VALUES (:CustNo, :CompanyName)

Another dataset, ADOQuery1 and DataSource1, has a CustNo field but no CompanyName field. If this dataset is used through the DataSource property, the CompanyName parameter must be programmatically assigned a value. Because ADOQuery1 has a CustNo field and ADOQuery1 is referenced through the DataSource property, the CustNo parameter automatically receives a value.

with ADOQuery2 do begin

  DataSource := DataSource1;

  ParamByName('CompanyName').AsString := Edit1.Text;

  Prepared := True;

  ExecSQL;

end;

If the SQL statement contains parameters with the same name as fields in the other dataset, do not manually set values for these parameters. Any values programmatically set, such as by using the Parameters property or the ParamByName method, will be overridden with automatic values. Parameters of other names must be programmatically given values. These parameters are unaffected by setting DataSource.

DataSource can be set at runtime or at design-time using the Object Inspector. At design-time, select the desired TDataSource from the drop-down list or type in the name.


TADOQuery.RowsAffected
 VCL Reference

TADOQuery.RowsAffected

TADOQuery	See also

Returns the number of rows operated upon by the latest query execution.

property RowsAffected: Integer;

Description

Inspect RowsAffected to determine how many rows were updated or deleted by the last query operation. If no rows were updated or deleted, RowsAffected has a value of zero. RowsAffected will have a value of –1 if the execution of the SQL statement could not be executed due to an error condition. This latter situation would typically follow the raising of an exception.


TADOQuery.SQL
 VCL Reference

TADOQuery.SQL

TADOQuery	See also

Contains the text of the SQL statement to execute for the ADO query.

property SQL: TStrings;

Description

Use SQL to provide the SQL statement that an ADO query component executes when its ExecSQL or Open method is called.

The SQL statement provided to the SQL property may contain replaceable parameters, following standard ADO syntax conventions. Parameters are created and stored in the Parameters property.

At design-time, edit the SQL statement using the property editor invoked by clicking the ellipsis button of the property in the Object Inspector. At runtime, use properties and methods of string list objects to clear the current contents, add new contents, or to modify existing contents.

with ADOQuery1 do begin

  with SQL do begin

    Clear;

    Add('SELECT EmpNo, LastName, FirstName, HireDate');

    Add('FROM Employee');

  end;

  Open;

end;

Note:	Delphi does not evaluate the SQL sent to the database via a TADOQuery component. The SQL used must be valid for the particular database type accessed via ADO. Any error messages passed back to the application will have originated at the ADO or database level, and so will have error codes and messages specific to those systems.


 VCL Reference

TADOQuery events

TADOQuery	Alphabetically	Legend

Derived from TCustomADODataSet

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnMoveComplete

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TADOQuery events

TADOQuery	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnFilterRecord

OnMoveComplete

OnNewRecord

OnPostError

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove


 VCL Reference

TADOQuery methods

TADOQuery	Alphabetically	Legend

In TADOQuery

Create

Destroy

ExecSQL

Derived from TCustomADODataSet

BookmarkValid

CancelBatch

CancelUpdates

Clone

CompareBookmarks

CreateBlobStream

DeleteRecords

FilterOnBookmarks

GetBlobFieldData

GetDetailLinkFields

GetFieldData

IsSequenced

LoadFromFile

Locate

Lookup

NextRecordset

Requery

SaveToFile

Seek

Supports

UpdateBatch

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

Cancel

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADOQuery methods

TADOQuery	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelBatch

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Clone

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecSQL

ExecuteAction

FieldAddress

FieldByName

FilterOnBookmarks

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordset

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Requery

Resync

SafeCallException

SaveToFile

Seek

SetFields

SetSubComponent

Supports

Translate

UpdateAction

UpdateBatch

UpdateCursorPos

UpdateRecord

UpdateStatus


TADOQuery.Create
 VCL Reference

TADOQuery.Create

TADOQuery	See also

Creates an instance of a TADOQuery component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an ADO query component at runtime. Query components placed in forms or data modules at design time are created automatically.


TADOQuery.Destroy
 VCL Reference

TADOQuery.Destroy

TADOQuery	See also

Destroys the TADOQuery instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of ADO query components is handled automatically by Delphi. If an application creates its own instances of a query, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which checks that the query is not nil before calling Destroy.


TADOQuery.ExecSQL
 VCL Reference

TADOQuery.ExecSQL

TADOQuery	See also

Executes the SQL statement for the ADO query.

function ExecSQL: Integer;

Description

Call ExecSQL to execute the SQL statement currently assigned to the SQL property. Use ExecSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE).

ExecSQL returns an integer value reflecting the number of rows affected by the executed SQL statement.

Note:	For SELECT statements, call Open instead of ExecSQL or set the Active property to True.

To speed performance, an application should ordinarily prepare the query by setting the Prepared property to True before calling ExecSQL for the first time.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomADODataSet

TADOQuery


TADOStoredProc
 VCL Reference

 TADOStoredProc

Hierarchy	Properties	Methods	Events 	Using TADOStoredProc	See also

TADOStoredProc encapsulates a stored procedure in an ADO database.

Unit

ADODB

Description

Use a TADOStoredProc object when a client application must use a stored procedure in a database. A stored procedure is a grouped set of statements, stored as part of a database’s metadata (just like tables, indexes, and domains), that performs a frequently-repeated, database-related task on the server and passes results to the client.

Note:	Not all database servers support stored procedures. See a specific server’s documentation to determine if it supports stored procedures.

Many stored procedures require a series of input arguments, or parameters, that are used during processing. TADOStoredProc provides a Parameters property that enables an application to set these parameters before executing the stored procedure.

TADOStoredProc reuses the Parameters property to hold the results returned by a stored procedure. Parameters is a collection of TParameter objects, each representing an individual parameter for the stored procedure. Depending on server implementation, a stored procedure can return either a single set of values, or a result set similar to the result set returned by a query.


 VCL Reference

TADOStoredProc properties

TADOStoredProc	Alphabetically	Legend

In TADOStoredProc

ProcedureName

Derived from TCustomADODataSet

BlockReadSize

CacheSize

CanModify

CommandTimeout

Connection

ConnectionString

CursorLocation

CursorType

DesignerData

EnableBCD

ExecuteOptions

Filter

Filtered

FilterGroup

IndexFieldCount

IndexFields

IndexName

LockType

MarshalOptions

MaxRecords

Parameters

Prepared

Properties

RecNo

RecordCount

RecordSet

RecordsetState

RecordSize

RecordStatus

Sort

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TADOStoredProc properties

TADOStoredProc	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheSize

CanModify

CommandTimeout

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

CursorLocation

CursorType

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

EnableBCD

Eof

ExecuteOptions

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterGroup

FilterOptions

Found

IndexFieldCount

IndexFields

IndexName

IsUniDirectional

LockType

MarshalOptions

MaxRecords

Modified

Name

ObjectView

Owner

Parameters

Prepared

ProcedureName

Properties

RecNo

RecordCount

RecordSet

RecordsetState

RecordSize

RecordStatus

Sort

SparseArrays

State

Tag

VCLComObject


TADOStoredProc.ProcedureName
 VCL Reference

TADOStoredProc.ProcedureName

TADOStoredProc	See also

Indicates the stored procedure used by the TADOStoredProc.

property ProcedureName: WideString;

Description

Set ProcedureName to specify the stored procedure in an ADO database with which the TADOStoredProc is associated.

At design-time, the property editor displays a list of available stored procedures. This list is only possible when a valid connection can be established between the stored procedure component and a database.

At runtime, set the ProcedureName property using a WideString (or comparable) value. The value used must be a valid name for a stored procedure in the associated database.


 VCL Reference

TADOStoredProc events

TADOStoredProc	Alphabetically	Legend

Derived from TCustomADODataSet

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnMoveComplete

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TADOStoredProc events

TADOStoredProc	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnFilterRecord

OnMoveComplete

OnNewRecord

OnPostError

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove


 VCL Reference

TADOStoredProc methods

TADOStoredProc	Alphabetically	Legend

In TADOStoredProc

Create

Derived from TCustomADODataSet

BookmarkValid

CancelBatch

CancelUpdates

Clone

CompareBookmarks

CreateBlobStream

DeleteRecords

Destroy

FilterOnBookmarks

GetBlobFieldData

GetDetailLinkFields

GetFieldData

IsSequenced

LoadFromFile

Locate

Lookup

NextRecordset

Requery

SaveToFile

Seek

Supports

UpdateBatch

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

Cancel

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADOStoredProc methods

TADOStoredProc	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelBatch

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Clone

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FilterOnBookmarks

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordset

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Requery

Resync

SafeCallException

SaveToFile

Seek

SetFields

SetSubComponent

Supports

Translate

UpdateAction

UpdateBatch

UpdateCursorPos

UpdateRecord

UpdateStatus


TADOStoredProc.Create
 VCL Reference

TADOStoredProc.Create

TADOStoredProc	See also

Creates an instance of a TADOStoredProc component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an ADO stored procedure component at runtime. Stored procedure components placed in forms or data modules at design time are created automatically.

Create

Calls its inherited Create method.

Sets the CommandType property to cmdStoredProc.


TADOStoredProc.ExecProc
 VCL Reference

TADOStoredProc.ExecProc

TADOStoredProc	See also

Executes the stored procedure on the server.

procedure ExecProc;

Description

Call ExecProc to execute a stored procedure. Before calling ExecProc:

1	Provide any input parameters in the Parameters property. At design-time, a developer can provide parameters using the Parameters Editor. At runtime an application must access the Parameters property directly.

2	Set the Prepared property to True to bind the parameters.

If a stored procedure returns output parameters, they are stored in the Parameters property when ExecProc returns control to the application. An application can access the output parameters using the Parameters property and identifying the particular parameter by its number.

Tip:	If an application is only interested in the result set returned by a stored procedure, call Open method for the TADOStoredProc component or set its Active property to True.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomADODataSet

TADOStoredProc


TADOTable
 VCL Reference

 TADOTable

Hierarchy	Properties	Methods	Events 	Using TADOCommand	See also

TADOTable is a dataset component that encapsulates a table accessed through an ADO data store.

Unit

ADODB

Description

Use TADOTable to access data in a single database table using ADO. TADOTable provides direct access to every record and field in an underlying database table. An ADO table component can also work with a subset of records within a database table using ranges and filters.


 VCL Reference

TADOTable properties

TADOTable	Alphabetically	Legend

In TADOTable

MasterSource

ReadOnly

TableDirect

TableName

Derived from TCustomADODataSet

BlockReadSize

CacheSize

CanModify

CommandTimeout

Connection

ConnectionString

CursorLocation

CursorType

DesignerData

EnableBCD

ExecuteOptions

Filter

Filtered

FilterGroup

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

LockType

MarshalOptions

MasterFields

MaxRecords

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TADOTable properties

TADOTable	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheSize

CanModify

CommandTimeout

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

CursorLocation

CursorType

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

EnableBCD

Eof

ExecuteOptions

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterGroup

FilterOptions

Found

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

LockType

MarshalOptions

MasterFields

MasterSource

MaxRecords

Modified

Name

ObjectView

Owner

Properties

ReadOnly

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

SparseArrays

State

TableDirect

TableName

Tag

VCLComObject


TADOTable.MasterSource
 VCL Reference

TADOTable.MasterSource

TADOTable	See also

Specifies the data source component used for a Master-Detail relationship.

property MasterSource: TDataSource;

Description

Use MasterSource to specify the name of the data source component whose DataSet property identifies a dataset to use as a Master table in establishing a Master-Detail relationship between this table and another one.

After setting the MasterSource property, specify which fields to use in the master table by setting the MasterFields property. At runtime each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this table for display.

ADOTable2.MasterSource := DataSource1;

ADOTable2.MasterFields := 'CustID';

Note:	At design time choose an available data source from the MasterSource property’s drop-down list in the Object Inspector.


TADOTable.ReadOnly
 VCL Reference

TADOTable.ReadOnly

TADOTable	See also

Specifies whether the data retrieved is read-only.

property ReadOnly: Boolean

Description

Use the ReadOnly property to prevent users from updating, inserting, or deleting data through the TADOTable. By default, ReadOnly is False, meaning users can alter a table’s data.


TADOTable.TableDirect
 VCL Reference

TADOTable.TableDirect

TADOTable

Specifies how the table is referenced.

property TableDirect: Booleanread GetTableDirect write SetTableDirect default False;

Description

Set TableDirect to specify whether the table is accessed simply via its name or whether a background SQL statement is used. Not all providers support accessing a table by its name and require that this access be done with a SELECT statement. If TableDirect is True the data retrieval request uses a background SQL statement and all columns are simply returned. If it is False, the TADOTable component creates a SELECT statement to retrieve the table's data. The default value of TableDirect is False.


TADOTable.TableName
 VCL Reference

TADOTable.TableName

TADOTable	See also	Example

Indicates the base table operated on.

property TableName: WideString;

Description

Use TableName to specify the base table in a database on which the ADO table component operates. Data is retrieved from and changes written to this base table.

Before setting or changing the value of TableName, you should deactivate the ADO table component by calling its Close method or setting its Active property to False.

At design-time, if a valid connection to a database can be established, the Object Inspector provides a drop-down list of names of available tables.


 VCL Reference

TADOTable events

TADOTable	Alphabetically	Legend

Derived from TCustomADODataSet

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnMoveComplete

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TADOTable events

TADOTable	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnFilterRecord

OnMoveComplete

OnNewRecord

OnPostError

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove


 VCL Reference

TADOTable methods

TADOTable	Alphabetically	Legend

In TADOTable

Create

Destroy

GetIndexNames

In TCustomADODataSet

BookmarkValid

CancelBatch

CancelUpdates

Clone

CompareBookmarks

CreateBlobStream

DeleteRecords

FilterOnBookmarks

GetBlobFieldData

GetDetailLinkFields

GetFieldData

IsSequenced

LoadFromFile

Locate

Lookup

NextRecordset

Requery

SaveToFile

Seek

Supports

UpdateBatch

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

Cancel

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADOTable methods

TADOTable	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelBatch

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Clone

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FilterOnBookmarks

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordset

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Requery

Resync

SafeCallException

SaveToFile

Seek

SetFields

SetSubComponent

Supports

Translate

UpdateAction

UpdateBatch

UpdateCursorPos

UpdateRecord

UpdateStatus


TADOTable.Create
 VCL Reference

TADOTable.Create

TADOTable	See also

Creates an instance of a TADOTable component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an ADO table component at runtime. Table components placed in forms or data modules at design time are created automatically.

Create

Calls its inherited Create method.

Sets the CommandType property to cmdTable.


TADOTable.Destroy
 VCL Reference

TADOTable.Destroy

TADOTable	See also

Destroys the TADOTable instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of ADO table components is handled automatically by Delphi. If an application creates its own instances of a table, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which checks that the table component is not nil before calling Destroy.

Destroy performs the following tasks:

Closes the dataset.

Calls the inherited destructor.


TADOTable.GetIndexNames
 VCL Reference

TADOTable.GetIndexNames

TADOConnection

Retrieves a list of available indexes for a table.

procedure GetIndexNames(List: TStrings);

Description

Call GetIndexNames to retrieve a list of all available indexes for a table. GetIndexNames fills a string list object (such as a TStringList) with the names of the index for the table represented by the TADOTable component (and only that table). Any previous contents in the string list object are completely overwritten by the new information.

List is the string list object, created and maintained by the application, into which the index names are retrieved. This string list object must be created prior to the call to GetIndexNames.

The command line below fills the Items property of a TListBox with the names of indexes for the table represented by ADOTable1.

ADOTable1.GetIndexNames(ListBox1.Items);


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomADODataSet

TADOTable


TCommandType type
 VCL Reference

TCommandType type

See also

TCommandType values designate the type of a command.

Unit

ADOdb

type TCommandType = (cmdUnknown, cmdText, cmdTable, cmdStoredProc, cmdFile, cmdTableDirect);

Description

Use TCommandType values to specify the type for a command contained in the CommandText property of an ADO component capable of issuing commands.

The constants that make up the TCommandType type correspond directly to the ADO CommandTypeEnum constants. These constants are used in the CommandType property of ADO Command objects. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the CommandType property of the ADO Command object.

TCommandType consists of the seven constants summarized in the following table:

Command type	Meaning

cmdUnknown	The type of command in the CommandText property is not known.

cmdText	CommandText is a textual definition of a command or stored procedure call; data returned by an internal SQL statement.

cmdTable	CommandText is the name of a table.

cmdStoredProc	CommandText is the name of a stored procedure.

cmdFile	CommandText is the name of a saved recordset file.

cmdTableDirect	CommandText is the name of a table; all columns are returned.

Note:	The TCommandType constants cmdTable, cmdTableDirect, and cmdOpenFile are not for use with commands executed from a TADOCommand component.


TConnectMode type
 VCL Reference

TConnectMode type

See also

TConnectMode values indicate the persimissions available to a connection.

Unit

ADOdb

type TConnectMode = (cmUnknown, cmRead, cmWrite, cmReadWrite, cmShareDenyRead, cmShareDenyWrite, cmShareExclusive, cmShareDenyNone);

Description

Use TConnectMode values to determine the permissions available to a connection and thus what type of data operations can be performed through that connection.

TConnectMode constants correspond directly to the ConnectModeEnum values for the Mode property of the ADO Connection object. The TConnectMode constants have the same effect on a TADOConnection component as the ConnectModeEnum values have on the Connection object. These values are discussed in the Microsoft Data Access SDK help.

TConnectMode consists of the eight constants summarized in the following table:

Connect Mode	Meaning

cmUnknown	The permissions have not yet been set for the connection or cannot be determined.

cmRead	Read-only permissions are available to the connection.

cmWrite	Write-only permissions are available to the connection.

cmReadWrite	Read/write permissions are available to the connection.

cmShareDenyRead	Prevents others from opening connections with read permissions.

cmShareDenyWrite	Prevents others from opening connection with write permissions.

cmShareExclusive	Prevents others from opening connection.

cmShareDenyNone	Prevents others from opening connection with any permissions.


TConnectOption type
 VCL Reference

TConnectOption type

See also

TConnectOption indicates whether the connection to the ADO data store is synchronous or asynchronous.

Unit

ADOdb

type TConnectOption = (coConnectUnspecified, coAsyncConnect);

Description

TConnectOption is the type of the TADOConnection object’s ConnectOptions property. It specifies whether the connection established by the TADOConnection is synchronous or asynchronous. The following table lists the possible values:

Value	Meaning

coConnectUnspecified	The connection is formed synchronously.

coAsyncConnect	The connection is formed asynchronously. This is useful if the server is very slow, but the application must be aware that not all data values are necessarily available when the connection is first established.


TCursorLocation type
 VCL Reference

TCursorLocation type

See also

TCursorLocation values specify whether to use client-side or server-side cursor library.

Unit

ADOdb

type TCursorLocation = (clUseServer, clUseClient);

Description

Use TCursorLocation values when determining a cursor location to specify whether to use a client-side or server-side cursor library. The value clUseServer indicates a server-side cursor library is used and clUseClient that a client-side cursor is used.

The TCursorLocation constants correspond to the Long value in the CursorLocation property of ADO Connection and Recordset objects. The ADO constants are adUseNone, adUseClient, and adUseServer. The Delphi values clUseServer and clUseClient have the same effect as the ADO values adUseClient and adUseServer. See the Microsoft Data Access SDK help for information on these values and their effects.


TCursorOption, TCursorOptions type
 VCL Reference

TCursorOption, TCursorOptions type

See also

TCursorOptions values indicate the functionality a recordset provides.

Unit

ADOdb

type

  TCursorOption = (coHoldRecords, coMovePrevious, coAddNew, coDelete, coUpdate, coBookmark, coApproxPosition, coUpdateBatch, coResync, coNotify, coFind , coSeek, coIndex);

  TCursorOptions = set of TCursorOption;

Description

TCursorOptions values are individual options the Supports method checks for. Include one or more of these values as a set for the CursorOptions parameter of Supports.

The constants of the TCursorOptions type correspond directly with the CursorOptions parameter of the Supports method of the ADO Recordset object. See the Microsoft Data Access SDK help for information on these values and their effects.

TCursorOptions consists of the eleven constants summarized in the following table:

Cursor Option	Meaning

coHoldRecords	More records can be retrieved or the position of the next retrieve can be changed without committing pending changes.

coMovePrevious	The pointer in the ADO Recordset object can be moved backwards without using bookmarks.

coAddNew	The recordset supports adding new records.

coDelete	The recordset supports deleting existing records.

coUpdate	The recordset supports modifying existing records.

coBookmark	The Bookmark property of the Recordset object can be used to move to or access specific records.

coApproxPosition	The recordset supports use of the RecNo property of the ADO dataset component.

coUpdateBatch	Batch updating (using the UpdateBatch and CancelBatch methods) can be used to transmit changes to the provider in groups.

coResync	The data in the cursor can be updated with the Resync method.

coNotify	The recordset supports notifications and returns events.

coFind	The Locate method can be used with the ADO dataset component.

coSeek	The Seek method can be used to search for a row in a dataset.

coIndex	The IndexName property of the ADO dataset component can be used to specify an index.


TCursorType type
 VCL Reference

TCursorType type

See also

TCursorType valies indicate the type of cursor to use for a recordset.

Unit

ADOdb

type TCursorType = (ctUnspecified, ctOpenForwardOnly, ctKeyset, ctDynamic, ctStatic);

Description

Use TCursorType values to indicate the type of cursor to use when a recordset is opened.

The constants of TCursorType correspond with the CursorTypeEnum values for the CursorType property of the ADO recordset object. See the Microsoft Data Access SDK help for information on these values and their effects.

TCursorType consists of the five constants summarized in the following table:

Cursor Type	Meaning

ctUnspecified	A specific cursor type has not yet been specified.

ctOpenForwardOnly	Forward-only cursor in which you can only scroll forward; better performance because only requires single through recordset.

ctKeyset	Keyset cursor; records added by other users are not visible; records deleted by other users are inaccessible.

ctDynamic	Dynamic cursor; data modifications, deletions, and insertions by other users are visible; scrolling forward and back allowed.

ctStatic	Static cursor; static copy of records; data changes by other users not visible; used mostly for reporting.

Note:	Only ctStatic is supported if the CursorLocation property of the ADO dataset component is set to clUseClient.

Note:	If the requested cursor type is not supported by the provider, the provider may return another cursor type. This alternate cursor type is reflected in the CursorType property after the recordset is opened.


TDataType type
 VCL Reference

TDataType type

Indicates the type of a parameter.

Unit

AdoDb

type TDataType = TFieldType;

Description

TDataType represents a field type when it is applied to a parameter.


TExecuteOptions type
 VCL Reference

TExecuteOption, TExecuteOptions type

See also

TExecuteOptions values specify the characteristics of an execution operation.

Unit

ADOdb

type

  TExecuteOption = (eoAsyncExecute, eoAsyncFetch, eoAsyncFetchNonBlocking, eoExecuteNoRecords);

  TExecuteOptions = set of TExecuteOption;

Description

When executing a command or connection using a method, use TExecuteOptions values to specify the characteristics of the execution operation. When reacting to a command or connection execution in an event handler, read the execute options parameter to determine the options already established for the connection triggering the event.

TExecuteOptions consists of the constants summarized in the following table:

Execute Option	Meaning

eoAsyncExecute	The command is executed asynchronously.

eoAsyncFetch	The command fetches remaining rows after the initial quantity specified in the Cache property asynchronously.

eoAsyncFetchNonBlocking	Execution is performed without blocking the thread.

eoExecuteNoRecords	A command or stored procedure that does not return. If any rows are retrieved, they are discarded and not returned.


TEventReason type
 VCL Reference

TEventReason type

See also

TEventReason values indicate the reason an event occurred.

Unit

ADOdb

type

 TEventReason = (erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, erRequery, erResynch, erClose, erMove, erFirstChange, erMoveFirst, erMoveNext, erMovePrevious, erMoveLast);

Description

Use TEventReason values to determine the reason an event has occurred.

TEventReason consists of the five constants summarized in the following table:

Execute Option	Meaning

erAddNew	A new row was added.

erDelete	An existing row was deleted.

erUpdate	An existing row was modified with new values.

erUndoUpdate	An update operation was canceled.

erUndoAddNew	A row insert operation was canceled.

erUndoDelete	A row delete operation was canceled.

erRequery	The recordset was refreshed with the Requery method.

erResynch	The recordset was resynchronized with the Resynch method.

erClose	The recordset was closed.

erMove	The recordset's row pointer moved.

erFirstChange	Equivalent to the ADO value ad.

erMoveFirst	The recordset's row pointer moved to the first row.

erMoveNext	The recordset's row pointer moved to the next row.

erMovePrevious	The recordset's row pointer moved to the previous row.

erMoveLast	The recordset's row pointer moved to the last row.


TEventStatus type
 VCL Reference

TEventStatus type

See also

TEventStatus values indicate the success or failure of an operation.

Unit

ADOdb

type

  TEventStatus = (esOK, esErrorsOccured, esCantDeny, esCancel, esUnwantedEvent);

Description

Read TEventStatus values to determine the success or failure status of an operation that triggers an event. A TEventStatus value is passed to the handler for every event of the TADOConnection and TCustomADODataSet descendant. Each TEventStatus is directly equivalent to the ADO value with a similar name.

In some cases, the event handler status parameter may be assigned a value to alter the outcome of the occurrence that triggered the event. These cases are documented in the help topics for individual connection and dataset component events.

The EventStatus parameter of associated event handlers surfaces the ADO adStatus parameter of its events, which is of ADO type EventStatusEnum. If the operation executed without problem, the TEventStatus value returned is esOK. If the operation did not execute without problem, one of the other values is returned. For instance, esErrorsOccured is returned when the operation failed because of one or more error conditions.

TEventStatus consists of the five constants summarized in the following table:

Execute Option	Meaning

esOK	Operation executed without problem.

esErrorsOccured	An error occurred during execution of the operation.

esCantDeny	A pending connection operation cannot be canceled. (Connection events only.).

esCancel	A pending connection has been canceled before it became active. (Connection events only.)

esUnwantedEvent	Set by the ADO method, prevents subsequent notification of the event.


TADOLockType type
 VCL Reference

TADOLockType type

See also

TADOLockType specifies the types of locks used.

Unit

ADOdb

type TADOLockType = (ltUnspecified, ltReadOnly, ltPessimistic, ltOptimistic, ltBatchOptimistic);

Description

Use TADOLockType with execution methods to specify the types of record locks used during editing. Lock type values allow you to specify whether the locking scheme used for a recordset is optimistic or pessimistic. To use a specific locking scheme, the provider and database type must support that locking scheme. Use ltUnspecified to have the provider use the default locking scheme. Use the LockType ltBatchOptimistic to open a recordset in batch update mode.

In addition to use as command execution method parameters, TADOLockType values are passed as var parameters to event handlers related to execution. This value indicates the lock type already in use when the execution was initiated. The LockType parameter of the TADOConnection.OnWillExecute event is an example of this.

The constants that make up the TADOLockType type correspond directly to the LockTypeEnum values with similar names. These values are discussed in the Microsoft Data Access SDK help, in the topic for the LockType property of the ADO Recordset object. See the SDK for additional information on the ADO constants and their effects.

TADOLockType consists of the five constants summarized in the following table:

Lock Type	Meaning

ltUnspecified	A specific lock type has not been specified or determined.

ltReadOnly	Read-only; the current execution cannot modify data.

ltPessimistic	Pessimistic locks; locks instantiated on a record-by-record basis when edit mode is applied to a record.

ltOptimistic	Optimistic locks; locked are initiated on a record-by-record basis, but only when updates are applied and a record is being updated.

ltBatchOptimistic	Optimistic batch updates; used for batch update mode rather than immediate update mode.


TIsolationLevel type
 VCL Reference

TIsolationLevel type

See also

TIsolationLevel values specify the level of isolation for a connection.

Unit

ADOdb

type TIsolationLevel = (ilUnspecified, ilChaos, ilReadUncommitted, ilBrowse, ilCursorStability, ilReadCommitted, ilRepeatableRead, ilSerializable, ilIsolated);

Description

Use TIsolationLevel values to specify the transaction isolation level for a connection.

Note:	it is possible that a server will force an isolation level other than that requested.

The constants that make up the TIsolationLevel type correspond directly to the ADO IsolationLevelEnum values with the same names. These values are discussed in the Microsoft Data Access SDK help, in the topic for the IsolationLevel property of the ADO Connection object. See the SDK for additional information on the ADO constants and their effects.

The constants that make up the TADOLockType type correspond directly to the LockTypeEnum values with similar names and have the same effects. These values are discussed in the Microsoft Data Access SDK help, in the topic for the LockType property of the ADO Recordset object. See the SDK for additional information on the ADO constants and their effects.

TIsolationLevel consists of the nine constants summarized in the following table:

Isolation Level	Meaning

ilUnspecified	Server is using a an isolation level other than what was requested and the specific isolation level cannot be determined.

ilChaos	Changes from more highly isolated transactions cannot be overwritten by the current connection.

ilReadUncommitted	Uncommitted changes in other transactions are visible.

ilBrowse	Uncommitted changes in other transactions are visible.

ilCursorStability	Changes from other transactions only visible after being committed.

ilReadCommitted	Changes from other transactions only visible after being committed.

ilRepeatableRead	Changes made in other transactions not visible, but requerying can retrieve new recordsets.

ilSerializable	Transactions conducted in isolation from other transactions.

ilIsolated	Transactions conducted in isolation from other transactions.

Note:	The constants ilSerializable and ilIsolated have the same effects. These two Delphi constants parallel the ADO constants adXactSerializable and adXactIsolated, which have the same effects.


TObjectStates type
 VCL Reference

TObjectState, TObjectStates type

See also

TObjectStates values indicate the current state of an ADO object.

Unit

ADOdb

type

  TObjectState = (stClosed, stOpen, stConnecting, stExecuting, stFetching);

  TObjectStates = set of TObjectState;

Description

Use TObjectStates values to determine the current activity status of a connection or recordset.

The constants that make up the TObjectStates type correspond directly to the similarly named constants used for the State property of the ADO Connection, Command, and Recordset objects. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the State property.

TObjectStates consists of the five constants summarized in the following table:

Object State	Meaning

stClosed	Connection object is inactive and not connected to a database.

stOpen	Connection object is inactive, but connected to a database.

stConnecting	Connection object is in the process of connecting to a database.

stExecuting	Connection object is currently executing.

stFetching	Connection object is retrieving data from the database.


TParameterAttributes type
 VCL Reference

TParameterAttribute, TParameterAttributes type

See also

TParameterAttributes values indicate the types of values a parameter can accept.

Unit

ADOdb

type

  TParameterAttribute = (paSigned, paNullable, paLong);

  TParameterAttributes = set of TParameterAttribute;

Description

Use TParameterAttributes values to specify the characteristics of a parameter that control the types of values a parameter can accept.

The constants that make of the TParameterAttributes type correspond to the ADO ParameterAttributesEnum values of similar names. For instance, the TParameterAttributes type constant paSigned corresponds to the ADO constant adParamSigned. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the Attributes property of the ADO Parameter object.

TParameterAttributes consists of the three constants summarized in the following table:

Parameter Attribute	Meaning

psSigned	The parameter accepts signed values.

psNullable	The parameter accepts NULL values.

psLong	The parameter accepts long binary data.


TParameterDirection type
 VCL Reference

TParameterDirection type

See also

TParameterDirection specifies the direction of a parameter.

Unit

ADOdb

type TParameterDirection = (pdUnknown, pdInput, pdOutput, pdInputOutput, pdReturnValue);

Description

Use a TParameterDirection value to specify whether a parameter is an input parameter, an output parameter, both, or conveys a return value.

The constants that make up the TParameterDirection type correspond directly to the ADO ParameterDirectionEnum constants with similar names used for the Direction property of the ADO Parameter object. For instance, the constant pdInput corresponds to the ADO constant adParamInput. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the Direction property of the ADO Parameter object.

TParameterDirection consists of the five constants summarized in the following table:

Parameter Direction	Meaning

pdUnknown	Parameter direction is unknown or cannot be determined.

pdInput	Parameter can only be used to convey data to a stored procedure or SQL statement.

pdOutput	Parameter can only be used to convey data from a stored procedure or SQL statement.

pdInputOutput	Parameter can be used to convey data to or from a stored procedure or SQL statement.

pdReturnValue	Parameter is used to convey a return value.


TPersistFormat type
 VCL Reference

TPersistFormat type

See also

TPersistFormat values indicate the format for a saved recordset.

Unit

ADOdb

type TPersistFormat = (pfADTG, pfXML);

Description

Use TPersistFormat values to specify the format in which recordsets are saved to file. The value pfADTG indicates the file is saved in ADTG (Advanced Data Tablegram) format. The value pfXML saves the recordset in XML format (requires ADO 2.1 and above).

The constants that make up the TPersistFormat type correspond directly to the ADO PersistFormatEnum constants adPersistADTG and adPersistXML. PersistFormatEnum constants are used in the PersistFormat parameter of the Save method of the ADO Recordset object. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the Direction property of the ADO Parameter object.


TRecordStatusSet type
 VCL Reference

TRecordStatus, TRecordStatusSet type

See also

TRecordStatusSet values indicate the status of the current record relative to batch updates or other bulk operations

Unit

ADOdb

type

  TRecordStatus = (rsOK, rsNew, rsModified, rsDeleted, rsUnmodified, rsInvalid, rsMultipleChanges, rsPendingChanges, rsCanceled, rsCantRelease, rsConcurrencyViolation, rsIntegrityViolation, rsMaxChangesExceeded, rsObjectOpen, rsOutOfMemory, rsPermissionDenied, rsSchemaViolation, rsDBDeleted);

  TRecordStatusSet = set of TRecordStatus;

Description

Use TRecordStatusSet values to determine the status of the current row.

The constants that make up the TRecordStatus type correspond directly to the ADO RecordStatusEnum values used for the Status property of the ADO Recordset object. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the Status property of the ADO Recordset object.

A TRecordStatusSet value may contain any one or more of the following constants:

Record Status Set Constant	Meaning

rsOK	The row was successfully updated

rsNew	The row is a new insert.

rsModified	The row has been modified.

rsDeleted	The row has been deleted.

rsUnmodified	The row has not been modified since being retrieved.

rsInvalid	The row was not saved due because the bookmark was invalid.

rsMultipleChanges	The row was not saved because it would have affected multiple rows.

rsPendingChanges	The row was not saved because it refers to a pending insert.

rsCanceled	The row was not saved because the operation was canceled.

rsCantRelease	The new row was not saved because of existing row locks.

rsConcurrencyViolation	The row was not saved because optimistic concurrency was in use.

rsIntegrityViolation	The row was not saved because the user violated integrity constraints.

rsMaxChangesExceeded	The row was not saved because there were too many pending changes.

rsObjectOpen	The row was not saved because of a conflict with an open storage object.

rsOutOfMemory	The row was not saved because the computer has run out of memory.

rsPermissionDenied	The row was not saved because the user has insufficient permissions.

rsSchemaViolation	The row was not saved because it violates the structure of the underlying database.

rsDBDeleted	The row has already been deleted from the data source.


TSchemaInfo type
 VCL Reference

TSchemaInfo type

See also

TSchemaInfo values indicate the type of schema information to retrieve.

Unit

ADOdb

type

TSchemaInfo = (siAsserts, siCatalogs, siCharacterSets, siCollations, siColumns, siCheckConstraints, siConstraintColumnUsage, siConstraintTableUsage, siKeyColumnUsage, siReferentialConstraints, siTableConstraints, siColumnsDomainUsage, siIndexes, siColumnPrivileges, siTablePrivileges, siUsagePrivileges, siProcedures, siSchemata, siSQLLanguages, siStatistics, siTables, siTranslations, siProviderTypes, siViews, siViewColumnUsage, siViewTableUsage, siProcedureParameters, siForeignKeys, siPrimaryKeys, siProcedureColumns, siDBInfoKeywords, siDBInfoLiterals, siCubes, siDimensions, siHierarchies, siLevels, siMeasures, siProperties, siMembers, siProviderSpecific);

Description

Use TSchemaInfo values to specify the type of schema information to retrieve from a provider.

The constants that make up the TSchemaInfo type correspond directly to the ADO constants used for the QueryType parameter for the OpenSchema method of the ADO Connection object. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the OpenSchema method of the ADO Connection object.

A TSchemaInfo value may be any of the constants below:

Schema Parameter Value	ADO Criteria Values

siProviderSpecific	The provider defines its own nonstandard schema queries outside those listed below.

siAsserts	CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME

siCatalogs	CATALOG_NAME

siCharacterSets	CHARACTER_SET_CATALOG
CHARACTER_SET_SCHEMA
CHARACTER_SET_NAME

siCollations	COLLATION_CATALOG
COLLATION_SCHEMA
COLLATION_NAME

siColumns	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME

siCheckConstraints	CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME

siConstraintColumnUsage	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME

siConstraintTableUsage	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME

siKeyColumnUsage	CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME

siReferentialConstraints	CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME

siTableConstraints	CONSTRAINT_CATALOG
CONSTRAINT_SCHEMA
CONSTRAINT_NAME
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
CONSTRAINT_TYPE

siColumnsDomainUsage	DOMAIN_CATALOG
DOMAIN_SCHEMA
DOMAIN_NAME
COLUMN_NAME

siIndexes	TABLE_CATALOG
TABLE_SCHEMA
INDEX_NAME
TYPE
TABLE_NAME

siColumnPrivileges	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
GRANTOR
GRANTEE

siTablePrivileges	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
GRANTOR
GRANTEE

siUsagePrivileges	OBJECT_CATALOG
OBJECT_SCHEMA
OBJECT_NAME
OBJECT_TYPE
GRANTOR
GRANTEE

siProcedures	PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
PARAMTER_TYPE

siSchemata	CATALOG_NAME
SCHEMA_NAME
SCHEMA_OWNER

siSQLLanguages	None.

siStatistics	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME

siTables	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
TABLE_TYPE

siTranslations	TRANSLATION_CATALOG
TRANSLATION_SCHEMA
TRANSLATION_NAME

siProviderTypes	DATA_TYPE
BEST_MATCH

siViews	TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME

siViewColumnUsage	VIEW_CATALOG
VIEW_SCHEMA
VIEW_NAME

siViewTableUsage	VIEW_CATALOG
VIEW_SCHEMA
VIEW_NAME

siProcedureParameters	PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
PARAMTER_NAME

siForeignKeys	PK_TABLE_CATALOG
PK_TABLE_SCHEMA
PK_TABLE_NAME
FK_TABLE_CATALOG
FK_TABLE_SCHEMA
FK_TABLE_NAME

siPrimaryKeys	PK_TABLE_CATALOG
PK_TABLE_SCHEMA
PK_TABLE_NAME

siProcedureColumns	PROCEDURE_CATALOG
PROCEDURE_SCHEMA
PROCEDURE_NAME
COLUMN_NAME

siDBInfoKeywords	(Defined in OLE DB, but not supported by ADO.)

siDBInfoLiterals	(Defined in OLE DB, but not supported by ADO.)

siCubes	(Defined in OLE DB, but not supported by ADO.)

siDimensions	(Defined in OLE DB, but not supported by ADO.)

siHierarchies	(Defined in OLE DB, but not supported by ADO.)

siLevels	(Defined in OLE DB, but not supported by ADO.)

siMeasures	(Defined in OLE DB, but not supported by ADO.)

siProperties	(Defined in OLE DB, but not supported by ADO.)

siMembers	(Defined in OLE DB, but not supported by ADO.)


TXactAttribute type
 VCL Reference

TXactAttribute, TXactAttributes type

See also

TXactAttribute values specify automated transaction behavior.

Unit

ADOdb

type

  TXactAttribute = (xaCommitRetaining, xaAbortRetaining);

  TXactAttributes = set of TXactAttribute;

Description

Use TXactAttribute to specify how the committing and aborting of a connection component’s transactions is handled. A property of type TXactAttribute may contain one TXactAttribute constant, both, or none.

An xaCommitRetaining value specifies that the connection performs retaining commits. Committing a transaction automatically starts a new transaction.

An xaAbortRetaining value specifies that the connection performs retaining aborts. Rolling back a transaction automatically starts a new transaction.

The constants that make up the TXactAttributes type correspond directly to the ADO XactAttributeEnum constants adXactCommitRetaining and adXactAbortRetaining. These ADO constants are in the Attributes property of the ADO Connection object. For additional information on these ADO constants and their effects, see the Microsoft Data Access SDK help in the topic for the Attributes property of the ADO Connection object.


TCustomADODataSet
 VCL Reference

TCustomADODataSet

Hierarchy	Properties	Methods	Events	See also

TCustomADODataSet is the virtualized base class for all ADO dataset components.

Unit

ADODB

Description

TCustomADODataSet encapsulates a set of properties, events, and methods for working with data accessed through an ADO (ActiveX Data Objects) provider. TCustomADODataSet is the base class from which all ADO dataset components descend. Applications should never instantiate TCustomADODataSet objects. Instead, instantiate an object from one of the descendant classes: TADODataSet, TADOTable, TADOQuery, or TADOStoredProc.

Some of the properties, events, and methods in TCustomADODataSet are abstract. Abstract declarations are declarations without implementations. At the TCustomADODataSet level they cannot be used or accessed. Developers must use or derive descendants of TCustomADODataSet that declare and implement these abstract methods. Many of the other TCustomADODataSet methods are declared and implemented in TCustomADODataSet as virtual methods, but the implementations are merely stubs that are reimplemented in descendants such as TADODataSet, TADOQuery, TADOStoredProc, and TADOTable.


 VCL Reference

TCustomADODataSet properties

TCustomADODataSet	Alphabetically	Legend

In TCustomADODataSet

BlockReadSize

CacheSize

CanModify

Command

CommandText

CommandTimeout

CommandType

Connection

ConnectionString

CursorLocation

CursorType

DesignerData

EnableBCD

ExecuteOptions

Filter

Filtered

FilterGroup

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

LockType

MarshalOptions

MasterDataLink

MasterFields

MaxRecords

ParamCheck

Parameters

Prepared

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

StoreDefs

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomADODataSet properties

TCustomADODataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheSize

CanModify

Command

CommandText

CommandTimeout

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connection

ConnectionString

CursorLocation

CursorType

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

EnableBCD

Eof

ExecuteOptions

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterGroup

FilterOptions

Found

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

LockType

MarshalOptions

MasterDataLink

MasterFields

MaxRecords

Modified

Name

ObjectView

Owner

ParamCheck

Parameters

Prepared

Properties

RecNo

RecordCount

Recordset

RecordsetState

RecordSize

RecordStatus

Sort

SparseArrays

State

StoreDefs

Tag

VCLComObject


TCustomADODataSet.BlockReadSize
 VCL Reference

TCustomADODataSet.BlockReadSize

TCustomADODataSet	See also

Determines how many record buffers are read in each block.

property BlockReadSize: Integer;

Description

Set BlockReadSize when to scan through the entire dataset quickly without updating data-aware controls. When BlockReadSize is greater than zero and Next is called, data-aware controls are not updated and data events are not triggered. Set BlockReadSize to zero to disable block read mode. The dataset State is dsBlockRead when BlockReadSize is greater than zero.


TCustomADODataSet.CacheSize
 VCL Reference

TCustomADODataSet.CacheSize

TCustomADODataSet	See also

Specifies the size of the cache for the dataset.

property CacheSize: Integer;

Description

Set CacheSize to control how many rows the ADO dataset’s provider keeps cached in its buffer and how many to retrieve at one time into local memory. Default value of CacheSize is 1 and the minimum allowed value is 1.

For example, if CacheSize is set to 20, when the dataset is first activated the associated provider retrieves the first 20 rows into local memory. As the row pointer is moved through this recordset, the provider retrieves the data from the local memory buffer. If the dataset’s row pointer moves beyond the last of these 20 buffered rows, the provider retrieves the next 20.

CacheSize represents the maximum number of rows to retrieve at one time. If the number of rows remaining to be retrieved is less than CacheSize, the remaining rows are retrieved and no exception is raised. The number of rows that can be returned by the provider can be less than all of the rows if the ADO dataset component’s MaxRecords property is set to other than the default (all rows).

Note:	The rows retrieved from the cache do not reflect any changes made by other concurrent users of the data.


TCustomADODataSet.CanModify
 VCL Reference

TCustomADODataSet.CanModify

TCustomADODataSet	See also

Indicates whether the underlying recordset permits write access to data.

property CanModify: Boolean;

Description

Read CanModify to determine whether the underlying recordset is updatable. If CanModify is True, the recordset can be modified. If CanModify is False, the recordset is read-only.

CanModify is set automatically when an ADO dataset is activated. Criteria that determine whether a record set is updatable or read-only are specific to ADO. The Supports method of the ADO recordset object is used to query ADO as to whether the cursor supports the adUpdate parameter for Supports.

if ADOTable1.CanModify then

  ADOTable1.Edit

else

  ShowMessage('Recordset is read-only!');


TCustomADODataSet.Command
 VCL Reference

TCustomADODataSet.Command

TCustomADODataSet	See also

Provides access to the internal command object that executes commands for the dataset.

property Command: TADOCommand;

Description

Applications can’t use the protected Command property. Command is an internal  TADOCommand component that the dataset uses to execute commands against the data store. For example, when the dataset is opened, the ADO dataset uses Command to execute the command that returns the records in the dataset.


TCustomADODataSet.CommandText
 VCL Reference

TCustomADODataSet.CommandText

TCustomADODataSet	See also

Specifies a command to be executed.

property CommandText: WideString;

Description

Use CommandText to specify the command to execute using the ADO command component. CommandText is a textual representation of the command such as an SQL statement, a table name, or the name of a stored procedure to execute. The command specified in CommandText is executed when the dataset’s Open method is called.

If the command includes parameters, as might be the case with an SQL statement or stored procedure, access them through the dataset’s Parameters property.

with ADODataSet1 do begin

  CommandType := cmdText;

  CommandText := 'SELECT * FROM CustomerTable';

  Open;

end;

Note:	ADO dataset components are typically used for operating on recordsets, and so the contents of the CommandText property will usually be one that returns a result set. For commands that only perform an action and do not result in the creation of a recordset, use the TADOCommand component.


TCustomADODataSet.CommandTimeout
 VCL Reference

TCustomADODataSet.CommandTimeout

TCustomADODataSet	See also

Specifies amount of time to attempt execution of a command.

property CommandTimeout: Integer;

Description

Use CommandTimeout to specify the amount of time that expires before an attempt to execute a command is considered unsuccessful. Measured in seconds, the default value for CommandTimeout is 30.

If a command is successfully executed prior to the expiration of the seconds specified, CommandTimeout has no effect.


TCustomADODataSet.CommandType
 VCL Reference

TCustomADODataSet.CommandType

TCustomADODataSet	See also

Specifies the type of command to execute.

property CommandType: TCommandType;

Description

Set CommandType to indicate the type of command that is contained in the CommandText property. The value in CommandType should agree with that of CommandText. For instance, if CommandText is the name of a table, CommandType should be cmdTable or cmdTableDirect.

The default value of CommandType is cmdUnknown. While CommandType may be left as cmdUnknown for all commands, better performance will be realized if CommandType is used to explicitly indicate the type of the command. When the type cmdUnknown is used, ADO must evaluate the command to determine its type, which slows the operation.

with ADODataSet1 do begin

  CommandType := cmdText;

  CommandText := 'SELECT * FROM CustomerTable';

  Open;

end;


TCustomADODataSet.Connection
 VCL Reference

TCustomADODataSet.Connection

TCustomADODataSet	See also

Specifies the ADO connection component to use.

property Connection: TADOConnection;

Description

Use Connection to specify an ADO connection object to use to connect to an ADO data store.

At design-time, select from the list of available TADOConnection objects (if any have been added to the application) invoked from the Object Inspector.

At runtime, set Connection to reference an existing TADOConnection object.

ADOTable1.Connection := ADOConnection1;

Note:	a connection to an ADO database can be established either using a separate TADOConnection object (configured to connect to the database) or directly with a valid entry in the ConnectionString property.


TCustomADODataSet.ConnectionString
 VCL Reference

TCustomADODataSet.ConnectionString

TCustomADODataSet	See also

Specifies the connection information for the data store.

property ConnectionString: WideString;

Description

Set ConnectionString to specify the information needed to connect the ADO dataset component to the data store. The value used for ConnectionString consists of one or more arguments ADO uses to establish the connection. Specify multiple arguments as a list with individual arguments separated by semicolons.

ADOQuery1.ConnectionString := 'Provider=ProviderRef;Remote Server=ServerRef';

At design-time, select from the list of available ADO database connections invoked from the Object Inspector.

A connection string may be saved to file for later use. Specify only the name of such a file in ConnectionString to reuse a saved connection string.

The connection string may also contain login information such as user ID and password, for automated logins.

ADO supports the following four arguments for connection strings. Any other arguments (such as a user ID and password) are not processed by ADO and simply passed on to the provider.

Argument	Meaning

Provider	The name of the provider to use for the connection.

File name	The name of a file containing connection information.

Remote Provider	The name of the provider to use for a client-side connection.

Remote Server	The path name of the server to use for a client-side connection.

Note:	After opening a connection, the contents of ConnectionString may be changed by ADO. One example of this behavior is when ADO-defined arguments are mapped to their provider equivalents.


TCustomADODataSet.CursorLocation
 VCL Reference

TCustomADODataSet.CursorLocation

TCustomADODataSet	See also

Specifies whether the cursor for the connection is client-side or server-side.

property CursorLocation: TCursorLocation;

Description

Use CursorLocation to indicate whether the cursors that use the connection object to connect to the ADO datastore use a client-side or server-side cursor library. CursorLocation only affects connections opened after the property is set. The default value for CursorLocation is clUseClient.

A client-side cursor offers more flexibility. All data is retrieved to the local machine and then operated on there, allowing operations not normally supported by servers like sorting and resorting the data and additional filtering. SQL statements are executed at the server, so for statements that restrict the result set with a WHERE clause, only the reduced result set is retrieved to a local cursor.

A server-side cursor offers less flexibility, but may be more advantageous (or necessary) for large result sets. Using a server-side cursor becomes necessary when the sheer size of a result set exceeds the available disk space that would be needed to create the client-side cursor. Also, many servers only support unidirectional cursors. This would preclude moving the record pointer in the dataset backward (even one record) through the result set.


TCustomADODataSet.CursorType
 VCL Reference

TCustomADODataSet.CursorType

TCustomADODataSet	See also

Specifies type of cursor an ADO dataset uses.

property CursorType: TCursorType;

Description

Set CursorType to indicate the type of cursor the ADO dataset uses for the recordset when it is opened. CursorType must be set prior to activating the dataset component. Among other cursor aspects, CursorType affects directional scrolling through a recordset and the visibility of changes made by other users.

The default value of CursorType is ctKeyset.


TCustomADODataSet.DesignerData
 VCL Reference

TCustomADODataSet.DesignerData

TCustomADODataSet

Stores custom data.

property DesignerData: String

Description

Component writers use this property for storing designer-specific information with the TCustomADODataSet descendent component. The VCL system does not use this property or its value at all. Use must be implemented by the programmer.


TCustomADODataSet.EnableBCD
 VCL Reference

TCustomADODataSet.EnableBCD

TCustomADODataSet	See also

Specifies whether to treat numeric fields as floating-point or BCD.

property EnableBCD: Boolean;

Description

Use the EnableBCD property to specify how fields are mapped to field classes. If EnableBCD is True, (the default value) adDecimal and adNumeric fields are mapped to the TBCDField class when field objects are created. If EnableBCD is False, the fields are mapped to the TFloatField class.

EnableBCD determines whether numeric and decimal fields are translated as floating-point values or binary coded decimal (BCD) values. BCD values eliminate the rounding errors associated with floating point math (such as a 3 * (2/3) resulting in 2.00000000001).

If persistent field objects are used (such as those created using the Fields Editor), the field class associated with a given field can contradict the setting of EnableBCD. Three numeric fields in the same table could, for instance, each be represented by a TFloatField, a TBCDField, and a TVariantField – regardless of the value in EnableBCD. Select field classes on a field-by-field basis for greater flexibility.

Note:	For numeric values with more than 4 digits to the right of the decimal place, use of TFloatField is generally better. This is because TBCDField uses the currency data type that has a fixed scale of 4 decimal places.

Note:	For fields with very large numbers of more than 19 significant digits, you can use TVariantField type persistent field objects. The TFloatField and TBCDField classes lack sufficient capacity for fields of this size. TVariantField allows the getting and setting of the field data as strings, preventing without loss of data due to insufficient capacity. However, arithmetic operations cannot be performed on numbers accessed through a TVariantField object.


TCustomADODataSet.ExecuteOptions
 VCL Reference

TCustomADODataSet.ExecuteOptions

TCustomADODataSet

Specifies the characteristics of a command execution.

property ExecuteOptions: TExecuteOptions;

Description

Set ExecuteOptions to control the characteristics of a command (a data retrieval operation) executed from the ADO dataset component.


TCustomADODataSet.Filter
 VCL Reference

TCustomADODataSet.Filter

TCustomADODataSet	See also

Specifies the text of the current filter for a recordset.

property Filter: String;

Description

Use Filter to specify a recordset filter. When filtering is applied to a recordset by setting the Filtered property to True, only those records that meet a filter’s conditions are available to the application. Filter contains the expression used to evaluate the rows in the recordset. At design-time, enter the filter expression into the editing cell for the Filter property within the Object Inspector. At runtime, assign astring containing the filter expression to the Filter property.

The filter expression below displays only those rows where the State field is "CA" or "MA":

State = 'CA' OR State = 'MA'

The following runtime example shows how to assign that filter expression to the Filter property and activate the filtering.

with ADODataSet1 do begin

  Filtered := False;

  Filter := 'State = ' + QuotedStr('CA') + ' OR ' +

    'State = ' + QuotedStr('CA');

  Filtered := True;

end;

When a filter is set, Blank records do not appear unless explicitly included in the filter. To include rows based on blank, (or "NULL") values in table columns, compare the column to NULL in the expression. For example:

with ADODataSet1 do begin

  Filtered := False;

  Filter := 'State = ' + QuotedStr('CA') + ' OR ' +

    'State = NULL';

  Filtered := True;

end;

Tip:	Applications can set Filter at runtime to change the filtering condition for a dataset at (for example, in response to user input).

Note: include a space between comparison values and comparison operators in filter expressions. For instance, ensure that there is a space after the field name and before the operator.


TCustomADODataSet.Filtered
 VCL Reference

TCustomADODataSet.Filtered

TCustomADODataSet	See also

Specifies whether or not filtering is active for a dataset.

property Filtered: Boolean;

Description

Check Filtered to determine whether or not dataset filtering is in effect. If Filtered is True, then filtering is active.

To apply filter conditions specified in the Filter property or the OnFilterRecord event handler, set Filtered to True.

Note:	When filtering is enabled, user edits to a record may mean that the record no longer meets a filter’s test condition. The next time an attempt is made to the read the record from the dataset while the filter is in effect, the record is not visible. If that happens, the next record that passes the filter condition becomes the active record.


TCustomADODataSet.FilterGroup
 VCL Reference

TCustomADODataSet.FilterGroup

TCustomADODataSet	See also

Filters a recordset based on row update status.

TFilterGroup = (fgUnassigned, fgNone, fgPendingRecords, fgAffectedRecords, fgFetchedRecords, fgPredicate, fgConflictingRecords);

property FilterGroup: TfilterGroup;

Description

Use FilterGroup to filter the recordset displayed with an ADO dataset component. The filter requires the dataset be in update batch mode and the rows are filtered based on the update status of individual rows. Set FilterGroup to a TFilterGroup constant to filter the dataset to show just the rows that match that batch update status. For instance, set FilterGroup to fgPendingRecords to show just the rows that have been modified since the last update application.

if (ADODataSet1.LockType = ltBatchOptimistic) then begin

  ADODataSet1.Filtered := True;

  ADODataSet1.FilterGroup := fgPendingRecords;

end;

To use FilterGroup to filter based on the update status of rows, ensure that the LockType property is set to ltBatchOptimistic (a prerequisite for batch updating) and the Filtered property is set to True. In a filtered dataset, check the update status of individual rows using the RecordStatus property.

The TFilterGroup type consists of the following constants:

Filter group type	Meaning

fgUnassigned	Specifies that no filtering is in effect. This constant is used internally by the ADO dataset component.

fgNone	Removes any current filtering and all rows are visible. Can also be done by setting the Filtered property to False.

fgPendingRecords	Filters to show just the rows that have been changed and the changes have not been applied (UpdateBatch method) or canceled (CancelBatch).

fgAffectedRecords	Filters to show just the rows affected by the last update.

fgFetchedRecords	Filters to show just the rows in the current update cache. This is the results of the last call to retrieve rows from the database.

fgPredicate	Filters to show just deleted rows.

fgConflictingRecords	Filters to show just the rows that had changes made to them, but could not be applied due to errors on the apply attempt.


TCustomADODataSet.IndexDefs
 VCL Reference

TCustomADODataSet.IndexDefs

TCustomADODataSet	See also

Contains the definitions of the indexes for the current table.

property IndexDefs: TIndexDefs;

Description

IndexDefs contains definitions for each index the current table has. IndexDefs is a collection of TIndexDef objects. Each TIndexDef object contains the definition for one index.

Inspect IndexDefs at runtime to get information on a given index. Use an index with IndexDefs to address a specific TIndexDef object. Use properties of TIndexDef to evaluate various index attributes. The example below retrieves the fields list for the third index of the table accessed through the component ADOTable1.

ADOTable1.IndexDefs.Update;

StrVar := ADOTable1.IndexDefs[2].Fields;

Call the TIndexDefs.Update method prior to inspecting the property to ensure it contains the most current index information for the table.


TCustomADODataSet.IndexFieldCount
 VCL Reference

TCustomADODataSet.IndexFieldCount

TCustomADODataSet	See also

Indicates the number of fields that comprise the current key.

property IndexFieldCount: Integer;

Description

Examine IndexFieldCount to determine the number of fields that comprise the current key. For indexes based on a single column, IndexFieldCount returns 1. For multi-column indexes, IndexFieldCount indicates the number of fields upon which the index is based.


TCustomADODataSet.IndexFieldNames
 VCL Reference

TCustomADODataSet.IndexFieldNames

TCustomADODataSet	See also

Lists the columns to use for a persistent sort of the recordset.

property IndexFieldNames: String;

Description

Use IndexFieldNames as an alternative method of specifying the sort order of a recordset. IndexFieldNames is a direct implementation of the Sort property of the ADO recordset object, with the field list from IndexFieldNames being used for the Sort property. The actual sorting of data occurs on the OLE DB side and use of indexes for the sort depend on the particular provider.

To use IndexFieldNames to establish a recordset’s sort order, the recordset must have been opened using a client-side cursor (the dataset component’s CursorLocation property must be clUseClient). An exception is raised on attempts to use IndexFieldNames with server-side cursors.

IndexFieldNames may be used to set the sort order for the detail table in a master-detail link, increasing the performance of the link. However, use of IndexFieldNames is not required for master-detail links.


TCustomADODataSet.IndexFields
 VCL Reference

TCustomADODataSet.IndexFields

TCustomADODataSet	See also

Retrieves or sets a field for an index.

property IndexFields[Index: Integer]: TField;

Description

IndexFields provides a zero-based array of field objects, each of which corresponds to a field in the current index. Index is an ordinal value indicating the position of a field in the index. The first field in the index is IndexFields[0], the second is IndexFields[1], and so on.


TCustomADODataSet.IndexName
 VCL Reference

TCustomADODataSet.IndexName

TCustomADODataSet	See also

Specifies the currently active index.

property IndexName: String;

Description

Use IndexName to activate an index and cause it to actively order the dataset’s rows. At runtime, set IndexName to aString containing the name of the index. At design-time, select the desired index from the drop-down list in the Object Inspector.

ADOTable1.IndexName := 'LastName';

Set IndexName to an empty String to have no index actively ordering the dataset. The rows then appear in natural order. In some database systems, the primary index of a table does not have a name. In these cases, setting IndexName to an empty String activates the primary index.

An index must be active for certain index dependent operations to be used, such as the Seek method.

Note:	Many providers do not support changing indexes while the dataset is active, raising an exception when an attempt is made to do this. Ensure that the dataset is closed before changing the index through the IndexName property and reopen the dataset after specifying a new index.


TCustomADODataSet.LockType
 VCL Reference

TCustomADODataSet.LockType

TCustomADODataSet	See also

Specifies the lock type to use when opening a dataset.

property LockType: TADOLockType;

Description

Use LockType to specify the lock type to use when opening a dataset. LockType determines whether the row locking scheme for a recordset will be pessimistic, optimistic, or read-only. To be effective, LockType must be set prior to activating the ADO dataset component.

The default value of LockType is ltOptimistic.

Use the LockType ltBatchOptimistic to open a dataset in batch update mode.


TCustomADODataSet.MarshalOptions
 VCL Reference

TCustomADODataSet.MarshalOptions

TCustomADODataSet

Specifies which records are marshaled back to the server.

TMarshalOption = (moMarshalAll, moMarshalModifiedOnly);

property MarshalOptions: TMarshalOption

Description

Use MarshalOptions when the dataset component uses a client-side cursor and data changes are to be sent back to the server. MarshalOptions specifies which records in the local recordset are sent to the middle tier or server. A value of moMarshalAll results in all records in the local recordset being packaged and sent back. A value of moMarshalModifiedOnly sends back only those records that have actually been changed in the local recordset The default value for MarshalOptions is moMarshalAll.


TCustomADODataSet.MasterDataLink
 VCL Reference

TCustomADODataSet.MasterDataLink

TADOTable	See also

Manages the relationship between the ADO dataset and a master table.

property MasterDataLink: TMasterDataLink;

Description

Applications can’t use the protected MasterDataLink property. It is used internally to handle the coordination of this dataset with the dataset that is associated with the DataSource property.


TCustomADODataSet.MasterFields
 VCL Reference

TCustomADODataSet.MasterFields

TADOTable	See also

Specifies field or fields on which a Master-Detail link is based.

property MasterFields: String;

Description

Use MasterFields after setting the MasterSource or DataSource property to specify the names of one or more fields in another, master, dataset that are used to establish a Master-Detail relationship between this dataset and the master dataset. The master dataset is specified by assigning its data source to the MasterSource or DataSource property.

MasterFields is a string containing one or more field names in the master dataset. When the datasets are related based on two fields, separate field names with semicolons:

ADOTable2.MasterSource := DataSource1;

ADOTable2.MasterFields := 'CustID;SaleDate'

Each time the current record in the master dataset changes, the new values in those fields are used to select corresponding records in this table for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two tables.


TCustomADODataSet.MaxRecords
 VCL Reference

TCustomADODataSet.MaxRecords

TCustomADODataSet	See also

Specifies how many rows to return in a result set.

property MaxRecords: Integer

Description

Use MaxRecords to control the number of rows the provider for the ADO dataset component returns from the data source. Set MaxRecords to indicate the maximum number of rows. The default value for MaxRecords is 0 (zero), which places no limits on the result set.


TCustomADODataSet.ParamCheck
 VCL Reference

TCustomADODataSet.ParamCheck

TCustomADODataSet	See also

Specifies whether the parameter list for an ADO dataset component is regenerated if the SQL changes at runtime.

property ParamCheck: Boolean;

Description

Set ParamCheck to specify whether or not the Parameters property is initialized using ":Param" style parameters in an SQL statement specified in the CommandText property. If the SQL statement in CommandText only contains "?" style parameters, the Parameters property will only be initialized if the OLE DB provider returns parameter information for an SQL command. Otherwise, the parameters must be explicitly created using the TParameters.CreateParameter method.

When ParamCheck is True, a parameter is generated for each ":Param" style parameter in the SQL statement.

The default value of ParamCheck is True.

This property is useful for data definition language (DDL) statements that contain parameters as part of the DDL statement and that are not parameters for the ADO dataset component. For example, the DDL statement to create a stored procedure may contain parameter statements that are part of the stored procedure. Set ParamCheck to False to prevent these parameters from being mistaken for parameters of the ADO dataset component executing the DDL statement.


TCustomADODataSet.Parameters
 VCL Reference

TCustomADODataSet.Parameters

TCustomADODataSet	See also

Contains the collection of parameters for an SQL statement.

property Parameters: TParameters;

Description

At design-time, use Parameters to access the parameters for the SQL statement used by the ADO component. Use the properties and methods of Parameters to set and get individual parameter values or to set or inspect parameter attributes.

At runtime, use the Parameters property editor to access the collection of parameters.


TCustomADODataSet.Prepared
 VCL Reference

TCustomADODataSet.Prepared

TCustomADODataSet	See also

Specifies whether the command is prepared before execution.

property Prepared: Boolean;

Description

Set Prepared before calling the Open method to specify whether ADO prepares the command used to create the dataset’s recordset. If Prepared is set to True and the dataset component is connected to a data store, ADO prepares the command before executing it. If Prepared is set to False, ADO does not prepare the command.

The default value of Prepared is False.


TCustomADODataSet.Properties
 VCL Reference

TCustomADODataSet.Properties

TCustomADODataSet

Properties is the implementation of the Properties Collection object.

property Properties: Properties

Description

Use Properties to get direct access to the ADO Properties Collection for the ADO Recordset object the ADO dataset component represents. A Properties Collection object is a container for one or more Property objects. Each Property object corresponds to a characteristic of an ADO object, here an ADO Recordset object.

Note:	Use of Properties to directly access the underlying ADO Properties Collection object requires a good working knowledge of ADO objects in general and ADO Properties Collection objects in specific. Consult the Microsoft Data Store SDK help for specific information on using ADO Properties Collection objects.


TCustomADODataSet.RecNo
 VCL Reference

TCustomADODataSet.RecNo

TCustomADODataSet	See also

Indicates ordinal position of the active record in the recordset.

property RecNo: Integer;

Description

Read RecNo at runtime to determine the ordinal position of the active record within the dataset’s recordset. The dataset must be active for RecNo to have a valid value. When a dataset component is active, RecNo will be a number between one and the total number of rows in the recordset (reflected in the RecordCount property).

The value of RecNo for a given row in a recordset is relative to the rows that precede the current row. Thus, if a check of RecNo for a row indicates 10 and then a preceding row is deleted, a subsequent inspection of RecNo will show a new position of 9.

In the example below, the RecNo and RecordCount properties of a TCustomDataSet descendant are used to display the current record's number and the total number of records in a TStatusBar component. This would be done in a handler for the AfterScroll event of the ADO dataset component so that it is updated after each row pointer movement.

StatusBar1.Panels[0].Text := 'Record ' + IntToStr(TCustomADODataSet(DataSet).RecNo) + ' of ' + IntToStr(TCustomADODataSet(DataSet).RecordCount);

Set RecNo at runtime to move the record pointer to the record at the specified absolute position within the recordset. Use the value of the RecordCount property to determine the maximum number to which RecNo can be set. For example, going to the last row using RecNo:

ADOTable1.RecNo := ADOTable1.RecordCount;

Note:	The number of rows indicated might be less than the total number of rows in a table. This can happen when the rows retrieved as a recordset for a dataset component are a conditional subset of the table.


TCustomADODataSet.RecordCount
 VCL Reference

TCustomADODataSet.RecordCount

TCustomADODataSet	See also

Indicates the total number of records in the recordset.

property RecordCount: Integer;

Description

Examine RecordCount to determine the total number of records in the recordset of the dataset component. Applications might use this property with RecNo to iterate through all the records in a dataset, though typically record iteration is handled with calls to First, Last, MoveBy, and Prior using Eof and Bof to set the limits of row traversing.

The dataset component must be active for RecordCount to provide a valid number. Should ADO not be able to determine that actual number of rows, RecordCount will return a value of negative one (-1).

In the example below, the RecNo and RecordCount properties of a TCustomDataSet descendant are used to display the current record's number and the total number of records in a TStatusBar component. This would be done in a handler for the AfterScroll event of the ADO dataset component so that it is updated after each row pointer movement.

StatusBar1.Panels[0].Text := 'Record ' + IntToStr(TCustomADODataSet(DataSet).RecNo) + ' of ' + IntToStr(TCustomADODataSet(DataSet).RecordCount);

Note:	The number of rows indicated might be less than the total number of rows in a table. This can happen when the rows retrieved as a recordset for a dataset component are a conditional subset of the table.


TCustomADODataSet.RecordSet
 VCL Reference

TCustomADODataSet.Recordset

TCustomADODataSet	See also

Provides direct access to the ADO recordset object.

property Recordset: _Recordset;

Description

Recordset is the interface through which the records of an ADO dataset are accessed. When you open an ADO dataset, the value of Recordset is automatically set to the interface that provides access to the records. This value should not be used until after an OnRecordSetCreate event occurs.

Use Recordset to get direct access to the ADO recordset object the dataset component represents. This direct access reference allows an application to use properties and methods of the underlying recordset object. Accessing the underlying recordset object is especially useful for utilizing properties and methods of the recordset object not surfaced in ADO dataset components.

Ordinarily, an application would seldom need to access the underlying recordset object directly. One situation that would use such access is directing the recordset produced by the execution of a TADOCommand component. In these situations, assign the recordset returned by the TADOCommand.Execute method directly to the Recordset property.

ADODataSet1.Recordset := ADOCommand1.Execute;

Note:	Use of Recordset to directly access the underlying ADO recordset object requires a good working knowledge of ADO objects in general and the ADO recordset object in particular. Using recordset is not recommended unless you are familiar with recordset object operations. Consult the Microsoft Data Store SDK help for specific information on using recordset objects.


TCustomADODataSet.RecordSetState
 VCL Reference

TCustomADODataSet.RecordsetState

TCustomADODataSet	See also

Indicates the current state of the ADO dataset component.

property RecordsetState: TObjectStates;

Description

Read States at runtime to determine the activity being performed, if any, by the dataset component at a specific point in time. Activity status includes the dataset component connecting to a data store, executing a command, fetching rows for a recordset, sitting idle but open, and sitting idle and closed.


TCustomADODataSet.RecordSize
 VCL Reference

TCustomADODataSet.RecordSize

TCustomADODataSet	See also

Indicates the size of a record in the dataset.

property RecordSize: Word;

Description

RecordSize is an abstract property that is redeclared and implemented in descendant objects derived from TCustomADODataSet. For TCustomADODataSet, RecordSize is meaningless and always returns a value of 0 (zero).


TCustomADODataSet.RecordStatus
 VCL Reference

TCustomADODataSet.RecordStatus

TCustomADODataSet	See also

Indicates the status of the current row.

property RecordStatus: TRecordStatusSet

Description

Read RecordStatus to determine the status of the current row relative to batch updates or other bulk operations. Among other record state aspects, RecordStatus indicates whether the current record is new, modified, deleted, or unmodified. RecordStatus will also give an indication why a row is not saved when modifying, adding, or deleting data.

Note:	RecordStatus only provides meaningful information if the dataset is opened in batch update mode.


TCustomADODataSet.Sort
 VCL Reference

TCustomADODataSet.Sort

TCustomADODataSet	See also

Specifies the sort order of the recordset.

property Sort: WideString;

Description

Set Sort to establish or change the list of fields on which the recordset is sorted. Set sort to the name of a single field or to a comma-separated list of fields. Each field may optionally be followed by the keyword ASCENDING or DESCENDING to specify a sort direction for the field. If one of these keywords is not used, the default sort direction for the field is ascending. Set Sort to an empty string to reset the recordset to the sort order originally used when the recordset’s data was first retrieved.

ADOQuery1.Sort := 'LastName ASC, DateDue DESC'

Read Sort to determine the field (or fields) on which the recordset is sorted.

Note:	If the cursor is client-side (the dataset component’s CursorLocation property or that of an associated TADOConnection component is clUseClient) and no index already exists matching the requested field sort order, a temporary index is created. Resetting the sort order by setting Sort to an empty string automatically deletes the temporary index.


TCustomADODataSet.StoreDefs
 VCL Reference

TCustomADODataSet.StoreDefs

TCustomADODataSet	See also

Specifies whether field definitions are stored with the ADO dataset.

property StoreDefs: Boolean;

Description

StoreDefs controls whether the FieldDefs property value is saved with the ADO dataset when it is saved to a form (.dfm) file. By default, StoreDefs is False unless you explicitly change any of the field definitions.


 VCL Reference

TCustomADODataSet events

TCustomADODataSet	Alphabetically	Legend

In TCustomADODataSet

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnMoveComplete

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TCustomADODataSet events

TCustomADODataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnEndOfRecordset

OnFetchComplete

OnFetchProgress

OnFieldChangeComplete

OnFilterRecord

OnMoveComplete

OnNewRecord

OnPostError

OnRecordChangeComplete

OnRecordsetChangeComplete

OnRecordsetCreate

OnWillChangeField

OnWillChangeRecord

OnWillChangeRecordset

OnWillMove


TCustomADODataSet.OnEndOfRecordset
 VCL Reference

TCustomADODataSet.OnEndOfRecordset

TCustomADODataSet

Occurs when moving a recordset's row pointer past the last row.

TEndOfRecordsetEvent = procedure (DataSet: TCustomADODataSet; var MoreData: WordBool; var EventStatus: TEventStatus) of object;

property OnEndOfRecordset: TEndOfRecordsetEvent;

Description

Write an OnEndOfRecordset event handler to take specific action after an attempt to move to a row past the end of the recordset. No Delphi row navigation methods should trigger this event due to the effects of the Eof property. This event should only be triggered by internal recordset navigation operations or by direct access to the Recordset object (through the dataset component's Recordset property).

DataSet is the ADO dataset component that triggered the OnEndOfRecordset event. This dataset component also contains the recordset in question.

MoreData is a boolean value indicating whether there are more unfetched rows beyond the last row fetched prior to the OnEndOfRecordset event.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: A Recordset object's row pointer is distinct from the record pointer of its ADO dataset component. It is possible that the ADO Recordset object will generate row movement events without the ADO dataset component generating a BeforeScroll or AfterScroll event. A couple reasons for this are background updating and resynchronizing of the records as data is changed. The OnEndOfRecordset event is purely a Recordset object event and independent of any dataset component record navigation events.


TCustomADODataSet.OnFetchComplete
 VCL Reference

TCustomADODataSet.OnFetchComplete

TCustomADODataSet	See also

Occurs after records have been retrieved into the recordset.

TRecordsetEvent = procedure(DataSet: TCustomADODataSet; const Error: Error; var EventStatus: TEventStatus) of object;

property OnFetchComplete: TRecordsetEvent;

Description

Write an OnFetchComplete event handler to take specific action after all of the rows from an asynchronous data retrieval operation have been returned to the recordset. Calling the dataset component's Open method or setting its Active property to True will lead to this event occurring.

DataSet is the ADO dataset component that triggered the OnFetchComplete event. This dataset component also contains the recordset in question.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.


TCustomADODataSet.OnFetchProgress
 VCL Reference

TCustomADODataSet.OnFetchProgress

TCustomADODataSet	See also

Occurs periodically during an asynchronous data retrieval operation.

TFetchProgressEvent = procedure(DataSet: TCustomADODataSet; Progress, MaxProgress: Integer; var EventStatus: TEventStatus) of object;

property OnFetchProgress: TfetchProgressEvent;

Description

Write an OnFetchProgress event handler to take specific action during an asynchronous data retrieval operation. The OnFetchProgress event fires periodically during the data retrieval to provide indications of its progress. Create a handler for this event to react to this periodic notification, such as providing the user with a visual indication of the progress of the data retrieval.

DataSet is the ADO dataset component that triggered the OnFetchProgress event. This dataset component also contains the recordset in question.

Progress is the number of records that have been received since the data fetching operation began.

MaxProgress is the total number of records to be retrieved by the operation.

Progress and MaxProgress used together to get percent complete. For example, Progress divided by MaxProgress and multiplied by 100 yields the percent completion of the data fetching.

procedure TForm1.ADODataSet1FetchProgress(DataSet: TCustomADODataSet; Progress, MaxProgress: Integer; var EventStatus: TEventStatus);

begin

  Caption := 'Percent complete: ' +

    IntToStr(Trunc(Progress / MaxProgress * 100)) + '%';

  Application.ProcessMessages;

end;


TCustomADODataSet.OnFieldChangeComplete
 VCL Reference

TCustomADODataSet.OnFieldChangeComplete

TCustomADODataSet	See also

Occurs after a field has changed.

TFieldChangeCompleteEvent = procedure(DataSet: TCustomADODataSet; const FieldCount: Integer; const Fields: OleVariant; const Error: Error; var EventStatus: TEventStatus) of object;

property OnFieldChangeComplete: TfieldChangeCompleteEvent;

Description

Write an OnFieldChangeComplete event handler to take specific action before a pending operation changes the value of one or more ADO Field objects in the Recordset object. (The term "Field object" as used here refers to the ADO Field object, not VCL persistent field objects that descend from TField.)

DataSet is the ADO dataset component that triggered the OnFieldChangeComplete event. This dataset component also contains the recordset in question.

FieldCount is the number of ADO Field objects in the Fields parameter.

Fields is an array of Variants representing the ADO Field objects about to be changed by the operation. See the Microsoft Data Access SDK for more information on using ADO Field objects.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note:	A Recordset object's Field objects are distinct from the VCL field objects of its ADO dataset component. The OnFieldChangeComplete event is purely a Recordset object event and independent of any VCL field change events.


TCustomADODataSet.OnMoveComplete
 VCL Reference

TCustomADODataSet.OnMoveComplete

TCustomADODataSet	See also

Occurs after the row pointer in a recordset has moved.

TRecordsetErrorEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; const Error: Error; var EventStatus: TEventStatus) of object;

property OnMoveComplete: TrecordsetErrorEvent;

Description

Write an OnMoveComplete event handler to take specific action after the row pointer has moved in the dataset component's Recordset object. Calls to the First, Last, Next, Prior, MoveBy, Insert, Delete, Post, Requery, and Resynch methods can lead to the firing of this event. Setting or getting a bookmark can also trigger the event.

DataSet is the ADO dataset component that triggered the OnMoveComplete event. This dataset component also contains the recordset in question.

Reason indicates the type of move that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnMoveComplete event is limited to: erRequery, erMove, erMoveFirst, erMoveNext, erMovePrevious, and erMoveLast.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: A Recordset object's row pointer is distinct from the record pointer of its ADO dataset component. It is possible that the ADO Recordset object will generate row movement events without the ADO dataset component generating a BeforeScroll or AfterScroll event. A couple reasons for this are background updating and resynchronizing of the records as data is changed. The OnMoveComplete event is purely a Recordset object event and independent of any dataset component record navigation events.


TCustomADODataSet.OnRecordChangeComplete
 VCL Reference

TCustomADODataSet.OnRecordChangeComplete

TCustomADODataSet	See also

Occurs after one or more records in the recordset change.

TRecordChangeCompleteEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; const RecordCount: Integer; const Error: Error; var EventStatus: TEventStatus) of object;

property OnRecordChangeComplete: TrecordChangeCompleteEvent;

Description

Write an OnRecordChangeComplete event handler to take specific action after one or more rows in the dataset component's Recordset object have changed.

DataSet is the ADO dataset component that triggered the OnRecordChangeComplete event. This dataset component also contains the recordset in question.

Reason indicates the type of change that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnRecordChangeComplete event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange.

RecordCount is the number of records that were changed.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: The OnRecordChangeComplete event is purely a Recordset object event and independent of any VCL data change events.


TCustomADODataSet.OnRecordsetChangeComplete
 VCL Reference

TCustomADODataSet.OnRecordsetChangeComplete

TCustomADODataSet	See also

Occurs after the recordset has changed.

TRecordsetErrorEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; const Error: Error; var EventStatus: TEventStatus) of object;

property OnRecordsetChangeComplete: TRecordsetErrorEvent;

Description

Write an OnRecordsetChangeComplete event handler to take specific action after the dataset component's Recordset object has changed.

DataSet is the ADO dataset component that triggered the OnRecordsetChangeComplete event. This dataset component also contains the recordset in question.

Reason indicates the type of change that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnRecordsetChangeComplete event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange.

Error is an ADO Error object. See the Microsoft Data Access SDK for more information on using ADO Error objects. The Error parameter is only set if an error occurred during execution of the operation that triggered the event. In this case, the EventStatus parameter will contain the value esErrorsOccured.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. EventStatus will be esOK if the operation that triggered the event executed without error, esErrorsOccured if error occurred during execution of that operation, or esCancel if the operation was canceled.

Note: The OnRecordsetChangeComplete event is purely a Recordset object event and independent of any VCL data change events.


TCustomADODataSet.OnRecordsetCreate
 VCL Reference

TCustomADODataSet.OnRecordsetCreate

TCustomADODataSet	See also

Occurs when the recordset has been initialized and is ready to use.

type TRecordsetCreate = procedure(DataSet: TCustomADODataSet; const Recordset: _Recordset) of object;

property OnRecordsetCreate: TRecordsetCreate;

Description

Write an OnRecordsetCreate event handler to take specific action when the Recordset property is first available for use. When the ADO dataset is first opened, it initializes the Recordset property to the interface that it uses for accessing with data. OnRecordsetCreate occurs when Recordset is fully initialized, and can be used by an application.

DataSet is the ADO dataset component whose Recordset property has just been initialized to the interface for an ADO recordset.

Recordset is the interface to the ADO recordset. It is the value of the Recordset property.


TCustomADODataSet.OnWillChangeField
 VCL Reference

TCustomADODataSet.OnWillChangeField

TCustomADODataSet	See also

Occurs before a field is changed.

TWillChangeFieldEvent = procedure(DataSet: TCustomADODataSet; const FieldCount: Integer; const Fields: OleVariant; var EventStatus: TEventStatus) of object;

property OnWillChangeField: TwillChangeFieldEvent;

Description

Write an OnWillChangeField event handler to take specific action before a pending operation changes the value of one or more ADO Field objects in the Recordset object. (The term "Field object" as used here refers to the ADO Field object, not VCL persistent field objects that descend from TField.)

DataSet is the ADO dataset component that triggered the OnWillChangeField event. This dataset component also contains the recordset in question.

FieldCount is the number of ADO Field objects in the Fields parameter.

Fields is an array of Variants representing the ADO Field objects about to be changed by the operation. See the Microsoft Data Access SDK for more information on using ADO Field objects.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: A Recordset object's Field objects are distinct from the VCL field objects of its ADO dataset component. The OnWillChangeField event is purely a Recordset object event and independent of any VCL field change events.


TCustomADODataSet.OnWillChangeRecord
 VCL Reference

TCustomADODataSet.OnWillChangeRecord

TCustomADODataSet	See also

Occurs before a record in the recordset is changed.

TWillChangeRecordEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; const RecordCount: Integer; var EventStatus: TEventStatus) of object;

property OnWillChangeRecord: TwillChangeRecordEvent;

Description

Write an OnWillChangeRecord event handler to take specific action just before a pending operation changes a row in the dataset component's recordset object.

DataSet is the ADO dataset component that triggered the OnWillChangeRecord event. This dataset component also contains the recordset in question.

Reason indicates the type of change that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnWillChangeRecord event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange.

RecordCount is the number of records that were changed.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: The OnWillChangeRecord event is purely a Recordset object event and independent of any VCL data change events.


TCustomADODataSet.OnWillChangeRecordset
 VCL Reference

TCustomADODataSet.OnWillChangeRecordset

TCustomADODataSet	See also

Occurs before the recordset has changed.

TRecordsetReasonEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; var EventStatus: TEventStatus) of object;

property OnWillChangeRecordset: TrecordsetReasonEvent;

Description

Write an OnWillChangeRecordset event handler to take specific action before the dataset component's Recordset object is changed.

DataSet is the ADO dataset component that triggered the OnWillChangeRecordset event. This dataset component also contains the recordset in question.

Reason indicates the type of change that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnWillChangeRecordset event is limited to: erAddNew, erDelete, erUpdate, erUndoUpdate, erUndoAddNew, erUndoDelete, and erFirstChange.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event. EventStatus will be esOK if the operation that triggered the event executed without error, esErrorsOccured if error occurred during execution of that operation, or esCancel if the operation was canceled.

Note: The OnWillChangeRecordset event is purely a Recordset object event and independent of any VCL data change events.


TCustomADODataSet.OnWillMove
 VCL Reference

TCustomADODataSet.OnWillMove

TCustomADODataSet	See also

Occurs before the row pointer in a recordset is moved.

TRecordsetReasonEvent = procedure(DataSet: TCustomADODataSet; const Reason: TEventReason; var EventStatus: TEventStatus) of object;

property OnWillMove: TRecordsetReasonEvent;

Description

Write an OnWillMove event handler to take specific action before an attempt to move the row pointer in the dataset component's Recordset object. Calls to the First, Last, Next, Prior, MoveBy, Insert, Delete, Post, Requery, and Resynch methods can lead to the firing of this event. Setting or getting a bookmark can also trigger the event.

DataSet is the ADO dataset component that triggered the OnWillMove event. This dataset component also contains the recordset in question.

Reason indicates the type of move that triggered the event. While the TEventReason type contains more constants, the value of Reason for an OnWillMove event is limited to: erRequery, erMove, erMoveFirst, erMoveNext, erMovePrevious, and erMoveLast.

The EventStatus value (ADO EventStatusEnum) indicates the success or failure of the execution of the operation that triggered the event.

Note: A Recordset object's row pointer is distinct from the record pointer of its ADO dataset component. It is possible that the ADO Recordset object will generate row movement events without the ADO dataset component generating a BeforeScroll or AfterScroll event. A couple reasons for this are background updating and resynchronizing of the records as data is changed. The OnWillMove event is purely a Recordset object event, and independent of any dataset component record navigation events.


 VCL Reference

TCustomADODataSet methods

TCustomADODataSet	Alphabetically	Legend

In TCustomADODataSet

BookmarkValid

CancelBatch

CancelUpdates

Clone

CompareBookmarks

Create

CreateBlobStream

DeleteRecords

Destroy

FilterOnBookmarks

GetBlobFieldData

GetDetailLinkFields

GetFieldData

IsSequenced

LoadFromFile

Locate

Lookup

NextRecordset

Requery

SaveToFile

Seek

Supports

UpdateBatch

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

Cancel

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomADODataSet methods

TCustomADODataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelBatch

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Clone

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FilterOnBookmarks

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordset

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Requery

Resync

SafeCallException

SaveToFile

Seek

SetFields

SetSubComponent

Supports

Translate

UpdateAction

UpdateBatch

UpdateCursorPos

UpdateRecord

UpdateStatus


TCustomADODataSet.BookmarkValid
 VCL Reference

TCustomADODataSet.BookmarkValid

TCustomADODataSet	See also

Tests the validity of a specified bookmark.

function BookmarkValid(Bookmark: TBookmark): Boolean; override;

Description

Call BookmarkValid to determine if a specified bookmark is currently assigned a value. BookmarkValid returns True if a bookmark is valid. Otherwise, it returns False.

Bookmark specifies the bookmark to test.


TCustomADODataSet.CancelBatch
 VCL Reference

TCustomADODataSet.CancelBatch

TCustomADODataSet	See also

Cancels a pending batch update.

TAffectRecords = (arCurrent, arFiltered, arAll, arAllChapters);

procedure CancelBatch(AffectRecords: TAffectRecords = arAll);

Description

Call CancelBatch to cancel any pending updates in a dataset that has been opened in batch update mode. CancelBatch may be called without error when there are no pending updates, but this has no effect.

CancelBatch is not applicable to datasets in immediate update mode. Calling CancelBatch for such datasets without the arCurrent constant raises an exception.

The default AffectsRecords parameter value is arAll.

The AffectRecords parameter may be any one of the following TAffectRecords values:

Option	Meaning

arCurrent	Only the updates for the current row are applied.

arFiltered	Only updates for rows matching the current filter are applied.

arAll	Updates for all rows are applied.

arAllChapters	Update affects all chapters (ADO chapters)

Note: To use batch updating, the CursorType property of the dataset component must be either ctKeySet (the default) or ctStatic and the LockType property must be ltBatchOptimistic.


TCustomADODataSet.CancelUpdates
 VCL Reference

TCustomADODataSet.CancelUpdates

TCustomADODataSet	See also

Cancels pending cached updates.

procedure CancelUpdates;

Description

Call CancelUpdates to cancel any pending cached updates and revert field values to their original values (the values present since the last applied update, if any).

Note:	CancelUpdates does the same thing as CancelBatch(arAll).


TCustomADODataSet.Clone
 VCL Reference

TCustomADODataSet.Clone

TCustomADODataSet	See also

Duplicates another dataset in the calling component

procedure Clone(Source: TCustomADODataSet; LockType: TLockType = ltUnspecified);

Description

Call Clone to make the recordset of the calling ADO dataset component a duplicate of the recordset active in another TCustomADODataSet descendant component. If the attempt to clone a dataset is successful, the current ADO dataset component’s recordset will be the same as that in the other dataset. If unsuccessful, the recordset is set to nil and an EADOError exception raised.

LockType specifies the lock type to use when opening the clone recordset. By default, LockType is ltUnspecified.


TCustomADODataSet.CompareBookmarks
 VCL Reference

TCustomADODataSet.CompareBookmarks

TCustomADODataSet	See also

Compares two bookmarks.

function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; override;

Description

Call CompareBookmarks to compare one bookmark to another. CompareBookmarks returns an integer value indicating the difference between the two bookmarks. CompareBookmarks returns a 0 (zero) if the two bookmarks are the same, a –1 (negative one) if bookmark one is less than bookmark two, or a 1 (positive one) if bookmark one is greater than bookmark two. CompareBookmarks also returns a zero if one of the two bookmarks is nil.

Bookmark1 and Bookmark2 are the two TBookmark values to compare.


TCustomADODataSet.Create
 VCL Reference

TCustomADODataSet.Create

TCustomADODataSet	See also

Creates an instance of a TCustomADODataSet component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an ADO dataset component at runtime. TCustomADODataSet contains abstract methods, and is not intended to be used in applications. Instead, applications instantiate dataset descendants such as TADODataSet, TADOTable, TADOQuery, or TADOStoredProc.

Create

Calls its inherited Create method.

Sets the CursorType property of the dataset to ctKeyset.

Sets the LockType property of the dataset to ltOptimistic.

Sets the CacheSize property of the dataset to 1 (one).

Sets the CommandType property of the dataset to cmdText.

Sets the ObjectView property of the dataset to True.


TCustomADODataSet.CreateBlobStream
 VCL Reference

TCustomADODataSet.CreateBlobStream

TCustomADODataSet	See also

Creates a blob stream for a Binary large object (BLOB) field in the dataset.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Description

Call CreateBlobStream to obtain a stream for reading and writing the value of the field specified by the Field parameter.

Field is a string containing the name of the BLOB (or comparable type) field in the dataset.

Mode indicates whether the stream will be used for reading the field’s value (bmRead), writing the field’s value (bmWrite), or both (bmReadWrite).


TCustomADODataSet.Destroy
 VCL Reference

TCustomADODataSet.Destroy

TCustomADODataSet	See also

Destroys the TCustomADODataSet instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically by Delphi. If an application creates its own instances of a dataset, however, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which verifies that the dataset reference is not nil before calling Destroy.

Destroy performs the following tasks:

Closes the dataset.

Disconnects from the associated database.

Calls the inherited destructor.


TCustomADODataSet.DeleteRecords
 VCL Reference

TCustomADODataSet.DeleteRecords

TCustomADODataSet	See also

Deletes one or more records in the dataset.

TAffectRecords = (arCurrent, arFiltered, arAll, arAllChapters);

procedure DeleteRecords(AffectRecords: TAffectRecords = arAll);

Description

Use DeleteRecords to delete one or more records from the recordset the ADO dataset component represents.

If the recordset does not support record deletions, an exception is raised. Use the Supports method to determine whether the recordset supports deleting records.

If the dataset was opened in batch update mode, the records are only marked for deletion. Apply the batch deletions by calling the UpdateBatch method. If the dataset is not in batch update mode, the records are immediately removed from the base table.

AffectRecords is a TAffectRecords constant that determines which records are deleted by DeleteRecords. The default value for the AffectRecords parameter is arAll, which causes all records in the recordset to be deleted.

Option	Meaning

arCurrent	Only the deletes the current record.

arFiltered	Only deletes records accessible through the current filter.

arAll	Deletes all records in the recordset.

arAllChapters	Deletes records in all chapters (ADO chapters)


TCustomADODataSet.FilterOnBookmarks
 VCL Reference

TCustomADODataSet.FilterOnBookmarks

TCustomADODataSet	See also

Filters a data set to just rows with pre-defined bookmarks.

procedure FilterOnBookmarks(Bookmarks: array of const);

Description

Use FilterOnBookmarks to filter an ADO dataset to display only those data rows for which a bookmark has been defined. To successfully use FilterOnBookmarks, you must have already defined at least one valid bookmark in the dataset.

When FilterOnBookmarks is called, the Filter property is automatically cleared, the FilterGroup property is set to fgUnassigned, and the Filtered property is set to True.


TCustomADODataSet.GetBlobFieldData
 VCL Reference

TCustomADODataSet.GetBlobFieldData

TCustomADODataSet	See also

Retrieves the current value of a field into a buffer.

function GetBlobFieldData(FieldNo: Integer; var Buffer: TBlobByteData): Integer; override;

Description

Most applications do not need to call GetBlobFieldData, this method being used internally by descendants of TCustomADODataSet. GetBlobFieldData reads blob data from the field specified by FieldNo into a Buffer. The buffer is a dynamic array of bytes, so that it can grow to accommodate the size of the BLOB data. GetBlobFieldData returns the size of the buffer.


TCustomADODataSet.GetDetailLinkFields
 VCL Reference

TCustomADODataSet.GetDetailLinkFields

TCustomADODataSet	See also

Lists the field components that link this dataset as a detail of a master dataset.

procedure GetDetailLinkFields(MasterFields, DetailFields: TList); override;

Description

GetDetailLInkFIelds fills the two lists with field components that define a master-detail relationship between this dataset and another (master) dataset. The MasterFields list is filled with fields from the master table whose values must equal the values of the fields in the DetailFields list. The DetailFields list is filled with fields from this dataset.

Applications seldom call GetDetailLinkFields. It is used internally by the Field Link designer when setting up master/detail relationships.


TCustomADODataSet.GetFieldData
 VCL Reference

TCustomADODataSet.GetFieldData

TCustomADODataSet	See also

Retrieves the current value of a field into a buffer.

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; override;

Description

Most applications do not need to call GetFieldData. TField objects call this method to implement their GetData method.

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number.

Buffer is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). GetFieldData returns a value that indicates whether the data was successfully fetched.

GetFieldData returns a boolean value indicating whether the operation was successful.


TCustomADODataSet.IsSequenced
 VCL Reference

TCustomADODataSet.IsSequenced

TCustomADODataSet

Indicates whether the underlying database table uses record numbers to indicate the order of records.

function IsSequenced: Boolean; override;

Description

Use IsSequenced to determine whether the underlying database table supports sequence numbers, or whether these are computed by the dataset component. When IsSequenced returns True, applications can safely use the RecNo property to navigate to records in the dataset.


TCustomADODataSet.LoadFromFile
 VCL Reference

TCustomADODataSet.LoadFromFile

TCustomADODataSet	See also

Loads a recordset from a file.

procedure LoadFromFile(const FileName: WideString);

Description

Call LoadFromFile to load the recordset for the calling ADO dataset component from a file. If the loading operation fails, the current recordset is neutralized (set to nil), the dataset component remains inactive, and an EOleException exception is raised. If the attempt to load data from a file is successful, the ADO dataset component is automatically activated and the data made available.

FileName is a string containing the name of the file.

LoadFromFile closes the dataset component before loading the recordset from the file specified in FileName.


TCustomADODataSet.Locate
 VCL Reference

TCustomADODataSet.Locate

TCustomADODataSet	See also

Searches the dataset for a specified record and makes that record the current record.

function Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;

Description

Call Locate to search a dataset for a specific row and make it the current row.

KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a variant that specifies the values to match in the key fields. If KeyFields lists a single field, KeyValues specifies the value for that field on the desired row. To specify multiple search values, pass a variant array as KeyValues, or construct a variant array on the fly using the VarArrayOf routine. For example:

with ADOTable1 do

  Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P', '408-431-1000']), [loPartialKey]);

Options is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then Locate allows partial-string matching on strings in KeyValues. If Options is an empty set, or if KeyFields does not include any string fields, Options is ignored.

Locate returns True if it finds a matching row, and makes that row the current one. Otherwise Locate returns False.


TCustomADODataSet.Lookup
 VCL Reference

TCustomADODataSet.Lookup

TCustomADODataSet	See also

Retrieves field values from a row that matches specified search values.

function Lookup(const KeyFields: String; const KeyValues: Variant; const ResultFields: String): Variant; override;

Description

Call Lookup to retrieve values for specified fields from a row that matches search criteria. KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a variant array containing the values to match in the key fields. To specify multiple search values, pass KeyValues as a variant array as an argument, or construct a variant array on the fly using the VarArrayOf routine.

ResultFields is a string containing a semicolon-delimited list of field names whose values should be returned from the matching row.

Lookup returns a variant array containing the values from the fields specified in ResultFields.


TCustomADODataSet.NextRecordset
 VCL Reference

TCustomADODataSet.NextRecordset

TCustomADODataSet

Provides access to a secondary recordset.

function NextRecordset(var RecordsAffected: Integer): _Recordset;

Description

Call NextRecordset in situations where multiple recordsets are returned to provide access to the second (and subsequent) recordsets. The ADO Recordset object returned by NextRecordset must be assigned to the Recordset property of an ADO dataset component, such as TADODataSet, to be accessible.

ADODataSet1.Recordset := ADOQuery1.NextRecordset

RecordsAffected is the number of rows in the returned recordset.


TCustomADODataSet.Requery
 VCL Reference

TCustomADODataSet.Requery

TCustomADODataSet	See also

Refreshes the recordset.

procedure Requery(Options: TExecuteOptions = []);

Description

Call Requery to refresh the recordset. Requery updates the dataset by re-executing the original command or SQL statement that produced the recordset.

The effects of Requery are the same as calling the dataset’s Close method and then its Open method. However, there are circumstances when one means of refreshing the recordset is better than the other. The values in properties like CursorLocation, CursorType, and LockType cannot be changed while the dataset is open, so Requery can only refresh the recordset using the existing values in these properties. To refresh the recordset using different values for these properties, effect the refresh using the Close and Open methods.

Options is a TExecuteOptions value that specifies the characteristics of the command execution affected by the requery that produces the recordset for the dataset.


TCustomADODataSet.SaveToFile
 VCL Reference

TCustomADODataSet.SaveToFile

TCustomADODataSet	See also

Saves a recordset to a file.

procedure SaveToFile(const FileName: String = ''; Format: TPersistFormat = pfADTG);

Description

Call SaveToFile to save the current recordset to a file. If the destination file already exists, it is overwritten.

FileName is a string containing the name of the destination file. This file remains open from the first call to SaveToFile until the dataset is closed. This file can be read by other applications while it is open, but they cannot write to the file.

Format specifies the file format for the saved recordset. By default, Format is pfADTG (Advanced Data Tablegram format).

Note:	Microsoft recommends using a client-side cursor (the dataset is opened with a CursorLocation property value of clUseClient). This way, if the provider used does not support saving the recordset the client cursor will provide the necessary functionality.


TCustomADODataSet.Seek
 VCL Reference

TCustomADODataSet.Seek

TCustomADODataSet	See also

Searches for a record using the current index.

TSeekOption = (soFirstEQ, soLastEQ, soAfterEQ, soAfter, soBeforeEQ, soBefore);

function Seek(const KeyValues: Variant; SeekOption: TSeekOption = soFirstEQ): Boolean;

Description

Call Seek to find a record with a specified value (or values) in the field (or fields) on which the current index is based. An index must be active to use Seek. The field used for the search is that of the currently active index. Seek moved the record pointer of the dataset based on the success of the search. If the search finds a record, the record pointer is moved to that record. If Seek does not find a record matching the value in KeyValues using the comparison method specified in SeekOption, the record pointer is positioned to the end of the dataset. Seek returns a boolean value reflecting the success of the search: True if a record was found or False if no record was found.

SuccessVar := ADODataSet1.Seek('Jones', soFirstEQ);

If the current index is based on more than one field, search values supplied in the Seek method must be for all fields sequentially from left to right in the index expression. That is, if the index is based on three fields, the search can be on the first field, the first and second fields, or on the first and second and third fields. It cannot be based only on the third field or on a combination of the first and third fields. To search based on multiple fields, pass a variant array to the Seek method.

KeyValues is the value to search for or multiple values if the index is based on multiple fields.

ADODataSet1.Seek(VarArrayOf([90030, 90020]), soFirstEQ);

SeekOption specifies the type of comparison made in determining whether the search was successful. SeekOption can be one of the six constants:

Seek Option	Meaning

soFirstEQ	Record pointer positioned at the first matching record, if one is found, or at the end of the dataset if one is not found.

soLastEQ	Record pointer positioned at the last matching record, if one is found, or at the end of the dataset if one is not found.

soAfterEQ	Record pointer positioned at matching record, if found, or just after where that matching record would have been found.

soAfter	Record pointer positioned just after where a matching record would have been found.

soBeforeEQ	Record pointer positioned at matching record, if found, or just before where that matching record would have been found.

soBefore	Record pointer positioned just before where a matching record would have been found.

Using the Seek method depends on the settings of a few properties. IndexName must be set to activate the index to use, CommandType must be cmdTableDirect (for TADODataSet, set TableDirect to True for a TADOTable), CursorLocation must be clUseServer, and CursorType must be ctKeySet.

Note:	The VCL Seek method is a direct implementation of the Seek method for the ADO Recordset object. At the time of this writing, this method is only supported for use with Microsoft Access2000 and the Jet 4 provider.


TCustomADODataSet.Supports
 VCL Reference

TCustomADODataSet.Supports

TCustomADODataSet

Indicates whether a dataset supports certain types of operations.

function Supports(CursorOptions: TCursorOptions): Boolean;

Description

Call Supports to determine whether the active recordset supports the cursor operations specified in CursorOptions. Supports will indicate the active recordset, as defined, will support such cursor functionality as adding new rows, using ADO bookmarks, deleting rows, and updating rows. Other cursor functionality can be specified.

CursorOptions specifies one or more TCursorOptions cursor operations.

If the recordset is active Supports returns a boolean whether the specified cursor operations are supported by the recordset. If all specified cursor operations are supported, Supports returns True, otherwise Supports returns False (one or more of the specified cursor operations are not supported by the recordset).


TCustomADODataSet.UpdateBatch
 VCL Reference

TCustomADODataSet.UpdateBatch

TCustomADODataSet	See also

Writes pending batch updates to disk.

TAffectRecords = (arCurrent, arFiltered, arAll, arAllChapters);

procedure UpdateBatch(AffectRecords: TAffectRecords = arAll);

Description

Call UpdateBatch to write any pending updates to disk for a dataset that is in batch update mode to the associated database.

The AffectRecords parameter may be any one of the following TAffectRecords values:

Option	Meaning

arCurrent	Only the updates for the current row are applied.

arFiltered	Only updates for rows matching the current filter are applied.

arAll	Updates for all rows are applied.

arAllChapters	Update affects all chapters (ADO chapters)

Note: To use batch updating, the CursorType property of the dataset component must be either ctKeySet (the default) or ctStatic and the LockType property must be ltBatchOptimistic.


TCustomADODataSet.UpdateStatus
 VCL Reference

TCustomADODataSet.UpdateStatus

TCustomADODataSet	See also

Indicates the update status of the current record.

function UpdateStatus: TUpdateStatus; override;

Description

Call UpdateStatus for datasets opened in batch update mode to determine the update status of the currently active record. UpdateStatus only provides useful information when the dataset has been opened in batch update mode. Otherwise there cannot be any unapplied updates.

Note: To use batch updating, the CursorType property of the dataset component must be either ctKeySet (the default) or ctStatic and the LockType property must be ltBatchOptimistic.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomADODataSet


EADOError
 VCL Reference

EADOError

Hierarchy	Properties	Methods	See also

EADOError is the exception class for database errors generated by ADO databases.

Unit

ADODB

Description

An EADOError exception is raised when a component detects a database error. Use EADOError in an exception handling block or to create a database exception.


 VCL Reference

EADOError properties

EADOError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EADOError properties

EADOError	By object	Legend

HelpContext

Message


 VCL Reference

EADOError methods

EADOError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp>main

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EADOError methods

EADOError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDatabaseError

EADOError


TParameter
 VCL Reference

TParameter

Hierarchy	Properties	Methods	See also

TParameter represents a parameter.

Unit

ADODB

Description

Use the properties and methods of a TParameter to set or get the value of a parameter used in an ADO query, stored procedure, dataset, or command component. Objects that use parameters create TParameter objects to represent those parameters and use a TParameters collection to organize and operate on the TParameter objects. For example, TParameters are used by TADOQuery objects and TADOStoredProc components (in their Parameters properties).


 VCL Reference

TParameter properties

TParameter	Alphabetically	Legend

In TParameter

Attributes

DataType

Direction

DisplayName

Name

NumericScale

ParameterObject

Parameters

Precision

Properties

Size

Value

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TParameter properties

TParameter	By object	Legend

Attributes

Collection

DataType

Direction

DisplayName

ID

Index

Name

NumericScale

ParameterObject

Parameters

Precision

Properties

Size

Value


TParameter.Attributes
 VCL Reference

TParameter.Attributes

TParameter

Specifies the attributes of a parameter.

property Attributes: TParameterAttributes;

Description

Set Attributes to specify the attributes of a parameter, thus controlling the type of values a parameter will accept. By default, Attributes is assigned no value at all. Attributes may be set to any one or a combination of the three value TParameterAttributes constants: psSigned, psNullable, and psLong.


TParameter.DataType
 VCL Reference

TParameter.DataType

TParameter

Indicates the type of value the parameter represents.

property DataType: TDataType;

Description

Set DataType to reflect the data type of the value the parameter represents. The default value of DataType is ftUnknown.

Read DataType to discover the type of data that was assigned to the parameter. Each possible value of DataType corresponds to a type of table field.

ADOStoredProc1.Parameters.Items[0].DataType := ftString;


TParameter.Direction
 VCL Reference

TParameter.Direction

TParameter

Indicates the type of parameter.

property Direction: TParameterDirection;

Description

Set Direction to indicate the type of parameter the TParameter object represents. A parameter can be one of the types: input, output, input-output, or return value. Assign a type of pdUnknown when the actual type of the parameter is not known at the time. The default value of Direction is pdInput.


TParameter.DisplayName
 VCL Reference

TParameter.DisplayName

TParameter

The name displayed in the collection editor.

property DisplayName: String;

Description

DisplayName is the string that represents the item in the collection editor. When the item is selected in the collection editor, the DisplayName can also appear in the Object Inspector as the value of another property. By default, DisplayName contains the same value as the Name property.


TParameter.Name
 VCL Reference

TParameter.Name

TParameter

Identifies the TParameter object.

property Name: WideString;

Description

Use Name to identify a particular parameter within a TParameters object.

Note:	Name is the name of the TParameter object, not the name of the parameter it represents in a query or stored procedure.


TParameter.NumericScale
 VCL Reference

TParameter.NumericScale

TParameter	See also

Specifies the number of decimal places for the parameter.

property NumericScale: Byte;

Description

Set NumericScale to indicate the maximum number of characters that can appear to the right of the decimal place in the parameter's value (the scale). (The Precision property controls the total number of digits allowed.) By default, NumericScale is zero.


TParameter.ParameterObject
 VCL Reference

TParameter.ParameterObject

TParameter

Provides direct access to the ADO Parameter object.

property ParameterObject: _Parameter;

Description

Use ParameterObject to gain direct access to the ADO Parameter object that corresponds to the Delphi parameter object. Using this reference, you can access properties and call methods of the ADO Parameter object.

Under ordinary circumstances it should not be necessary to use the ADO Parameter directly in an application. This property is provided for the instances where a property or method of the ADO Parameter is needed but not implemented in the Delphi parameter object. You should be familiar with ADO objects before attempting to use them directly. Consult the Microsoft Data Access SDK for more specific information on ADO objects and their properties and methods.


TParameter.Parameters
 VCL Reference

TParameter.Parameters

TParameter	See also

Provides a reference to the TParameters container.

property Parameters: TParameters;

Description

Use Parameters to get a reference to the TParameters object in which the TParameter object is contained.


TParameter.Precision
 VCL Reference

TParameter.Precision

TParameter	See also

Specifies the number of digits allowed for a numeric parameter.

property Precision: Byte;

Description

Set Precision to indicate the maximum number of digits allowed in the parameter, including both significant and fractional (the precision). (The NumericScale property controls the total number of decimal digits allowed.) By default, Precision is zero.


TParameter.Properties
 VCL Reference

TParameter.Properties

TParameter

Provides read-only access to the Properties property of the ADO Parameter object.

property Properties: Properties;

Description

Read Properties to get the values of the Properties property of the ADO Parameter object that corresponds to the Delphi parameter object.

Note:	Directly accessing the underlying ADO Parameter object requires a good working knowledge of ADO objects in general and the ADO Parameter object in specific. It is not recommended that you use the Parameter object directly unless familiar with Parameter object operations. Consult the Microsoft Data Store SDK help for specific information on using ADO Parameter objects.


TParameter.Size
 VCL Reference

TParameter.Size

TParameter	See also

Specifies the size of a string type parameter.

property Size: Integer;

Description

Set Size to indicate the maximum number of characters the parameter may contain. By default, Size is zero.

Note:	Size only pertains to string type parameters (like CHAR and VARCHAR). For numeric type parameters, use the NumericScale and Precision properties. For other column types, Size should remain set to zero.


TParameter.Value
 VCL Reference

TParameter.Value

TParameter

Represents the value of the parameter as a Variant.

property Value: OleVariant;

Description

Use Value in generic code that manipulates the values of parameters without needing to know the field type the parameters represent.


 VCL Reference

TParameter methods

TParameter	Alphabetically	Legend

In TParameter

AppendChunk

Assign

LoadFromFile

LoadFromStream

In TCollectionItem

Create

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParameter methods

TParameter	By object	Legend

AfterConstruction

AppendChunk

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException


TParameter.AppendChunk
 VCL Reference

TParameter.AppendChunk

TParameter	See also

Adds data to a parameter.

procedure AppendChunk(Val: OleVariant);

Description

Call AppendChunk to put data into or add data to a parameter's value. Use AppendChunk to insert binary or text data into a parameter.

AppendChunk may be used to pass all of the data at one time or in pieces using multiple calls to the method. The first call to AppendChunk overwrites any existing data in the parameter. If the data is being passed in its entirety using one call to AppendChunk, no further action takes place. If data is passed in multiple calls, the data passed in Val in each subsequent call to AppendChunk is appended to data previously passed.

Val is the data to pass to the parameter.

Note: The Attributes property must contain paLong to use AppendChunk.


TParameter.Assign
 VCL Reference

TParameter.Assign

TParameter	See also

Copies the properties and value of one TParameter object to another.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to make one TParameter an exact clone of another. Assign copies the values of the Attributes, DataType, Direction, Name, NumericScale, Precision, Size, and Value properties from the parameter object specified in Source to the calling parameter object.

ADOStoredProc1.Parameters[0].Assign(ADOStoredProc2.Parameters.Items[0]);

Assign may be used with various types of sources: another TParameter, a field in a table, a string list object (most often for a memo type parameter), or a TBitmap (for BLOB type fields), a TPicture (for BLOB type fields). In the example below, Assign is used to give a value for a memo type parameter from a string list object (the Lines property of a TMemo).

ADOStoredProc1.Parameters[1].Assign(Memo1.Lines);


TParameter.LoadFromFile
 VCL Reference

TParameter.LoadFromFile

TParameter	See also

Loads the value of a parameter from a file.

procedure LoadFromFile(const FileName: String; DataType: TDataType);

Description

Call LoadFromFile to copy the contents of a file into a parameter.

FileName is a String containing the name of the file from which to copy data.

DataType is the field data type the loaded data is to be treated as.


TParameter.LoadFromStream
 VCL Reference

TParameter.LoadFromStream

TParameter	See also

Loads the value of a parameter from a memory stream.

procedure LoadFromStream(Stream: TStream; DataType: TDataType);

Description

Call LoadFromStream to copy the contents of a memory stream into a parameter.

Stream is a reference to the memory stream from which to copy data.

DataType is the field data type the loaded data is to be treated as.

var

  MS: TMemoryStream;

begin

  MS := TMemoryStream.Create;

  try

    … fill memory stream with data …

    ADOQuery1.Parameters[4].LoadFromStream(MS);

  finally

  if assigned(MS) then

    MS.Free;

  end;

end;


Hierarchy

TObject

TPersistent

TCollectionItem

TParameter


TParameters
 VCL Reference

TParameters

Hierarchy	Properties	Methods	See also

TParameters manages a collection of parameters.

Unit

ADODB

Description

Use TParameters to manage a collection of TParameter objects for an object that uses field parameters. For example, TADOStoredProc objects and TADOQuery objects use TParameters objects (in properties named Parameters) to create and access their parameters.

Use the properties and methods of TParameters to:

Access a specific parameter.

Add or delete field parameters from the list.

Get or set the values of individual parameters.

Compare collections of parameters.

Iterate through all parameters.

Copy a collection of parameters to another parameter collection.


 VCL Reference

TParameters properties

TParameters	Alphabetically	Legend

Derived from TParameters

Command

Items

ParameterCollection

ParamValues

Derived from TCollection

Count

ItemClass


 VCL Reference

TParameters properties

TParameters	By object	Legend

Command

Count

ItemClass

Items

ParameterCollection

ParamValues


TParameters.Command
 VCL Reference

TParameters.Command

TParameters

Indicates the associated ADO command object.

property Command: TADOCommand;

Description

Read Command to get a reference to the ADO command object associated with the ADO dataset object that contains the TParameters object.


TParameters.Items
 VCL Reference

TParameters.Items

TParameters	See also

Contains the collection of parameters.

property Items[Index: Integer]: TParameter;

Description

Items is a collection of TParameter objects. Each TParameter object in the collection represents an individual parameter. Use Items to access a particular parameter.

Index indicates the specific parameter to access. Index is an Integer identifying the parameter’s position in the collection of parameters, in the range 0 to Count - 1.


TParameters.ParameterCollection
 VCL Reference

TParameters.ParameterCollection

TParameters	See also

Encapsulates the ADO Parameters Collection object.

property ParameterCollection: Parameters;

Description

Use Properties to get direct access to the ADO Parameters Collection for the ADO Recordset object with which the TParameters is associated. A Parameters Collection object contains al of the ADO Parameters objects for a command. A Parameters Collection contains one or more ADO Parameter objects.

Note:	Use of ParameterCollection to directly access the underlying ADO Parameters Collection object requires a good working knowledge of ADO objects in general and ADO Parameters Collection objects in specific. Consult the Microsoft Data Store SDK help for specific information on using ADO Parameters Collection objects.


TParameters.ParamValues
 VCL Reference

TParameters.ParamValues

TParameters	See also

Retrieves the value of one or more parameters.

property ParamValues[const ParamName: String]: Variant;

Description

Use ParamValues to get or set the individual values of parameters identified by name.

ParamName is a String containing the names of the individual parameters of interest. If ParamValues is used to access more than one parameter, the names are separated by semicolons (;).

Setting ParamValues sets the Value property for each parameter listed in the ParamName string. Specify the values as Variants, in order, in a variant array.

Getting ParamValues retrieves a variant array of variants, each of which represents the value of one of the named parameters.

If ParamName includes a name that does not match any of the field parameters in Items, an exception is raised.

Note:	ParamValues operates with the names of parameters as they appear in an SQL statement or stored procedure, not the Name property of TParameter objects. The two should not be confused.


 VCL Reference

TParameters methods

TParameters	Alphabetically	Legend

In TParameters

AddParameter

AssignValues

CreateParameter

FindParam

GetParamList

IsEqual

ParamByName

ParseSQL

Refresh

Derived from TOwnedCollection

Create

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParameters methods

TParameters	By object	Legend

Add

AddParameter

AfterConstruction

Assign

AssignValues

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateParameter

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

FindParam

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParamList

InheritsFrom

InitInstance

Insert

InstanceSize

IsEqual

MethodAddress

MethodName

NewInstance

Owner

ParamByName

ParseSQL

Refresh

SafeCallException


TParameters.AddParameter
 VCL Reference

TParameters.AddParameter

TParameters	See also

Adds a parameter to the collection.

function AddParameter: TParameter;

Description

Call AddParameter to create a single empty TParameter object and add it to the TParameters collection. All properties of the newly added TParameter object are either at their default value or are empty.

with ADOStoredProc1.AddParameter do begin

  DataType := ftString;

..Direction := pdInput;

  Value := 'malathion';

end;


TParameters.AssignValues
 VCL Reference

TParameters.AssignValues

TParameters	See also

Assigns parameter values from another parameters collection.

procedure AssignValues(Value: TParams);

Description

Call AssignValues to assign the values of parameters in the calling TParameters object using the values in another TParameters.

ADOQuery1.Parameters.AssignValues(ADOQuery2.Parameters);

Each parameter with the same name as a parameter in the source TParameters specified in Value is assigned the value from the source parameter. Parameters in the calling TParameters object that do not exist in the source TParameters object are unaffected. Parameters that only exist in the source TParameters are not subsequently created in the calling TParameters object. For example if the calling TParameters has parameters named Parm1 and Parm2 and the source TParameters has Parm2 and Parm3:

Parm1 in the calling TParameters is unaffected.

Parm2 gets the value of Parm2 in the source TParameters.

No Parm3 is created in the calling TParameters.


TParameters.CreateParameter
 VCL Reference

TParameters.CreateParameter

TParameters	See also

Adds a parameter to the collection.

function CreateParameter(const Name: WideString; DataType: TDataType; Direction: TParameterDirection; Size: Integer; Value: OleVariant): TParameter;

Description

Call CreateParameter to create a single TParameter object and add it to the TParameters collection. Property values for the newly added TParameter object are supplied via CreateParameter parameters.

Name is a WideString value containing the name of the newly created TParameter object.

DataType is a TDataType value indicating the data type of the parameter the new TParameter object represents.

Direction is a TParameterDirection value indicating the parameter type. A parameter represented by a TParameter may be any one of: input, output, input-output, return value. Designate a parameter as unknown if the parameter type is not know at the time the TParameter is created.

Size is an Integer value indicating the maximum size of the parameter’s value.

Value is an OleVariant containing the parameter’s value. A value need not be passed for Value when the TParameter is created. It can be assigned later. If no value is assigned at this time, pass a nil for Value.

ADOStoredProc1.CreateParameter('Parm1', ftString, pdInput, 10, nil);


TParameters.FindParam
 VCL Reference

TParameters.FindParam

TParameters	See also

Locates the parameter with a given name.

function FindParam(const Value: String): TParam;

Description

Use FindParam method to find a parameter with the name specified in Value. If a match is found, FindParam returns a reference to the TParameter object (assignment-compatible with TParam objects) for the parameter of the specified name. Otherwise, it returns nil. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate more than one parameter at a time, by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.

Note:	FindParam operates with the name of a parameter as it appears in an SQL statement or stored procedure, not the Name property of a TParameter object. The two ways of referring to a parameter should not be confused.


TParameters.GetParamList
 VCL Reference

TParameters.GetParamList

TParameters	See also

Fills a TList object with names of available parameters.

procedure GetParamList(List: TList; const ParamNames: String);

Description

Use GetParamList to obtain a subset of the parameters in the TParameters collection that have been identified by name.

ParamNames is a string giving the names of all field parameters of interest. Multiple parameter names are separated by semicolons (;).

List is the TList object into which the parameters names are placed. GetParamList adds the field parameters to List in the order they appear in ParamNames. If ParamNames includes a name that does not match any of the field parameters in Items, an exception is raised.

Note:	GetParamList operates with the names of parameters as they appear in an SQL statement or stored procedure, not the Name property of TParameter objects. The two ways of referring to a parameter should not be confused.


TParameters.IsEqual
 VCL Reference

TParameters.IsEqual

TParameters	See also

Indicates whether two TParameters objects have identical contents.

function IsEqual(Value: TParams): Boolean;

Description

Use IsEqual to compare the contents of two TParameters objects. IsEqual returns True if the parameter collection specified in Value exactly matches the calling parameter collection. To match, each parameter collection must have the same number of TParameter objects, in the same order, which match on name, datatype, parameter type, and value.

if (ADOQuery1.Parameters.IsEqual(ADOQuery2.Parameters) then

  { do one thing }

else

  { do something else };


TParameters.ParamByName
 VCL Reference

TParameters.ParamByName

TParameters	See also

Locates the parameter with a given name.

function ParamByName(const Value: WideString): TParameter;

Description

Use ParamByName method to find a parameter with the name specified in Value. If a match is found, ParamByName returns a reference to the corresponding TParameter object. Otherwise, the TParameter reference is nil and an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

ADOQuery1.Parameters.ParamByName('Verb').Value := 'propitiate';

ADOQuery1.Open;

To locate a parameter by name without raising an exception if the parameter is not found, use the FindParam method.

To locate more than one parameter at a time, by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.

Note:	ParamByName operates with the name of a parameter as it appears in an SQL statement or stored procedure, not the Name property of a TParameter object. The two ways of referring to a parameter should not be confused.


TParameters.ParseSQL
 VCL Reference

TParameters.ParseSQL

TParameters

Parses an SQL statement for parameters and TParameter objects.

function ParseSQL(SQL: String; DoCreate: Boolean): String;

Description

Call ParseSQL to parse an SQL statement for parameters. For each parameter found in the SQL statement, a TParameter object is added to the calling TParameters object using the name of the parameter in the SQL statement.

SQL is aString containing the SQL statement to parse.

DoCreate indicates whether to clear all existing parameter definitions before parsing the SQL statement.

ParseSQL returns aString containing a parsed version of the SQL statement specified in the SQL parameter.

ADOQuery1.Parameters.ParseSQL(ADOQuery1.Text, True);


TParameters.Refresh
 VCL Reference

TParameters.Refresh

TParameters	See also

Refreshes a parameter collection.

procedure Refresh;

Description

Call Refresh to ensure a parameter collection has the most up to date information on available parameters.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TParameters


TRDSConnection
 VCL Reference

 TRDSConnection

Hierarchy	Properties	Methods	Events	See also

TRDSConnection implements an RDS DataSpace object.

Unit

ADODB

Description

The TRDSConnection class exposes the functionality of the RDS DataSpace object. RDS DataSpace objects manage the marshaling of data when a Recordset object is passed from one process or machine to another. Use TRDSConnection when building multi-tier applications using ADO-based business objects (Application Servers).

Use TRDSConnection in the place of TADOConnection. Associate the TRDSComponent with a TADODataSet component using the latter's RDSConnection property.

By default, an RDS connection component is configured to work with the RDS DataFactory object. The DataFactory object can be used when you do not require a specialized business object. When using a DataFactory object, the ConnectionString and CommandText properties of the TADODataSet are passed to the Query method of the DataFactory object. When using a business object, the CommandText property should contain the name of a property of the business object which returns the desired Recordset for the TADODataSet. The A value for the ConnectionString property is not required when using a business object.


 VCL Reference

TRDSConnection properties

TRDSConnection	Alphabetically	Legend

In TRDSConnection

AppServer

ComputerName

DataSpaceObject

InternetTimeout

ServerName

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomConnection properties

TCustomConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ComputerName

Connected

DataSetCount

DataSets

DataSpaceObject

DesignInfo

InternetTimeout

LoginPrompt

Name

Owner

ServerName

Tag

VCLComObject


TRDSConnection.AppServer
 VCL Reference

TRDSConnection.AppServer

TRDSConnection

Provides access to the application server communication interface.

property AppServer: OleVariant;

Description

Use AppServer to get direct access to the interface the ADO dataset uses to communicate with the application server. Use this property if you need to access additional properties or methods of the business object not related to Recordsets.


TRDSConnection.ComputerName
 VCL Reference

TRDSConnection.ComputerName

TRDSConnection

Specifies the source of a business object.

property ComputerName: WideString

Description

Use ComputerName to specify the source of a business object to use through the TRDSConnection component. If left blank, the business object is loaded from the local machine.

Several protocols are supported for creating the business object: HTTP, HTTPS, and DCOM. For business objects created with HTTP and HTTPS, ComputerName is a string containing a Universal Resource Identifier (URL) identifying the Internet Information Server (IIS) Web server where an instance of the server business object is created. For DCOM, ComputerName is the name of the machine.


TRDSConnection.DataSpaceObject
 VCL Reference

TRDSConnection.DataSpaceObject

TRDSConnection

Provides access to the interface for the RDS DataSpace object.

property DataSpaceObject: DataSpace;

Description

Use DataSpaceObject to get direct access to the RDS DataSpace object the RDS connection component represents. This direct access reference allows an application to use properties and methods of the underlying DataSpace object. Accessing the underlying DataSpace object is especially useful for utilizing properties and methods of the DataSpace object not surfaced in TRDSConnection.

Note:	Use of DataSpaceObject to directly access the underlying RDS DataSpace object requires a good working knowledge of ADO objects in general and the RDS DataSpace object in specific. It is not recommended that you use the DataSpace object directly unless familiar with DataSpace object operations. Consult the Microsoft Data Store SDK help for specific information on using RDS DataSpace objects.


TRDSConnection.InternetTimeout
 VCL Reference

TRDSConnection.InternetTimeout

TRDSConnection

Specifies the amount of time before a request times out.

property InternetTimeout: Integer

Description

Use InternetTimeout to specify the amount of time (measured in milliseconds) after which a request times out. InternetTimeout only applies to requests sent with the HTTP and HTTPS protocols. The default value for InternetTimeout is zero.

In a multi-tier environment, requests for data may take several minutes to execute. InternetTimeout can be used to specify a longer timeout period for long-running requests.


TRDSConnection.ServerName
 VCL Reference

TRDSConnection.ServerName

TRDSConnection

Specifies the business object.

property ServerName: WideString

Description

Use ServerName to specify the ProgID of the business object to instantiate. The default value is that in the RDSServer.DataFactory property. This is the ProgID of the RDS DataFactory object. The DataFactory allows for execution of queries against any datasource. See the Microsoft Data Store SDK help for more information on the DataFactory object.


 VCL Reference

TRDSConnection events

TRDSConnection	Alphabetically	Legend

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TRDSConnection events

TRDSConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TRDSConnection methods

TRDSConnection	Alphabetically	Legend

In TRDSConnection

Create

Destroy

GetRecordset

In TCustomConnection

Close

Open

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRDSConnection methods

TRDSConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetRecordset

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

SafeCallException

SetSubComponent

UpdateAction


TRDSConnection.Create
 VCL Reference

TRDSConnection.Create

TRDSConnection	See also

Creates an instance of TRDSConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an RDS connection component at runtime. The Owner parameter specifies another component (usually a form or data module) that is responsible for freeing the RDS connection component.

Create

Calls its inherited Create method.

Associates the RDS connection component to the default DataFactory.


TRDSConnection.Destroy
 VCL Reference

TRDSConnection.Destroy

TRDSConnection	See also

Destroys the instance of a connection component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which verifies that the TRDSConnection reference is not nil before calling Destroy

Destroy closes all active datasets and closes its connection before freeing all internal resources.

Destroyperforms the following tasks:

Clears refs.

Frees its data space object.

Calls the inherited destructor.


TRDSConnection.GetRecordset
 VCL Reference

TRDSConnection.GetRecordset

TRDSConnection

Retrieves a Recordset.

function GetRecordset(const CommandText: WideString; ConnectionString: WideString = ''): _Recordset;

Description

Call GetRecordset to retrieve a Recordset object from a business object. GetRecordset is called automatically by the TADODataSet associated with the RDS connection component.

When using a business object, only the CommandText parameter should be passed a value. This is the Name property of the business object that returns the Recordset object. When GetRecordset is called by the TADODataSet component, the value used for the CommandText parameter is the value in the CommandText property of the ADO dataset component.

When using a DataFactory, the CommandText parameter is a query command (SQL statement) to execute and the ConnectionString specifies the information needed to establish the connection. When GetRecordset is called by the ADO dataset component, the value used for the ConnectionString parameter is the value in the ConnectionString property of the ADO dataset component.

ADODataSet1.CommandText := 'SELECT * FROM Employee';

ADODataSet1.RecordSet := RDSConnection1.GetRecordset(ADODataSet1.CommandText, '');


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TRDSConnection


TActionToolBar
 VCL Reference

TActionToolBar

Hierarchy	Properties	Methods 	Events	Using TActionToolBar	See also

TActionToolBar is a rendering engine that renders action client items as tool buttons.

Unit

ActnCtrls

Description

TActionToolBar is a specialized container (like TPanel) that renders a group of items on screen in the order specified in the Action Manager. All of the items are created dynamically when the TActionToolBar component is connected to an item from the Action Manager.

The items themselves are internal components (similar to TSpeedButton) created by the TActionToolBar and appear consistent with the look and function of a tool bar. The layout of the items on the TActionToolBar is managed automatically and specified by the Action Manager.


 VCL Reference

TActionToolBar properties

TActionToolBar	Alphabetically	Legend

Derived from TCustomActionToolBar

HiddenCount

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Floating

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TActionToolBar properties

TActionToolBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HiddenCount

Hint

HorzMargin

HorzSeparator

HostDockSite

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

PopupMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TActionToolBar events

TActionToolBar	Alphabetically	Legend

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TActionToolBar events

TActionToolBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TActionToolBar methods

TActionToolBar	Alphabetically	Legend

Derived from TCustomActionToolBar

Create

Destroy

SetBounds

Derived from TCustomActionDockBar

Dock

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActionToolBar methods

TActionToolBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomActionBar

TCustomActionDockBar

TCustomActionToolBar

TActionToolBar


TActiveFormControl
 VCL Reference

TActiveFormControl

Hierarchy	Properties	Methods	See also

A COM object which provides the interfaces necessary to support an ActiveX control.

Unit

AxCtrls

Description

TActiveFormControl acts as the bridge between a Delphi form and the ActiveX control API. It is a descendant of TActiveXControl which implements the necessary interfaces for an ActiveX control. It forwards the appropriate information to the ActiveForm.

This object is used internally by the DAX framework. Normally, you would not create an instance of this class.


 VCL Reference

TActiveFormControl properties

TActiveFormControl	Alphabetically	Legend

Derived from TActiveXControl

ClientSite

Control

InPlaceSite

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TActiveFormControl properties

TActiveFormControl	By object	Legend

ClientSite

Control

Controller

Factory

InPlaceSite

RefCount

ServerExceptionHandler


 VCL Reference

TActiveFormControl methods

TActiveFormControl	Alphabetically	Legend

In TActiveFormControl

FreeOnRelease

InitializeControl

Invoke

ObjQueryInterface

Derived from TActiveXControl

Destroy

Initialize

PropChanged

PropRequestEdit

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

ObjAddRef

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActiveFormControl methods

TActiveFormControl	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitializeControl

InitInstance

InstanceSize

Invoke

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

PropChanged

PropRequestEdit

SafeCallException


TActiveFormControl::FreeOnRelease
 VCL Reference

TActiveFormControl.FreeOnRelease

TActiveFormControl

Supports the IVCLComObject interface.

procedure FreeOnRelease;

Description

FreeOnRelease exists solely to support the IVCLComObject interface, and has an empty implementation.


TActiveFormControl.InitializeControl
 VCL Reference

TActiveFormControl.InitializeControl

TActiveFormControl

Creates the TActiveForm instance and establishes a link between itself and the TActiveForm referenced by the control properties.

procedure InitializeControl; override;

Description

InitializeControl also instructs the TActiveForm object to perform any of its own initialization.


TActiveFormControl.Invoke
 VCL Reference

TActiveFormControl.Invoke

TActiveFormControl

Implements the OLE Automation IDispatch Invoke function.

function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; override;

Description

Call Invoke to access the property or method specified by the DispID parameter. The Flags parameter indicates whether the DispID refers to method (DISPATCH_METHOD), a property value that is being read (DISPATCH_PROPERTYGET), or a property value that is being set (DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF).  The Params and ExcepInfo parameters hold parameters and exception information, respectively, and depend on the property or method identified by the DispID parameter.

Invoke returns S_OK if it is successful.  Otherwise, it returns an error code defined by the IDispatch interface.


TActiveFormControl.ObjQueryInterface
 VCL Reference

TActiveFormControl.ObjQueryInterface

TActiveFormControl	See also

The ObjQueryInterface method takes an interface ID (the IID parameter) and returns the requested COM interface on the object.

function ObjQueryInterface(const IID: TGUID; out Obj): HResult; override;

Description

The ObjQueryInterface method forwards the call first to the associated TActiveForm object if it supports the requested interface, otherwise it queries its own interface.


Hierarchy

TObject

TComObject

TTypedComObject

TAutoObject

TActiveXControl

TActiveFormControl


TActiveFormFactory
 VCL Reference

TActiveFormFactory

Hierarchy	Properties	Methods	See also

The ActiveFormFactory object is the class factory for TActiveForm.

Unit

AxCtrls

Description

The ActiveFormFactory object is the class factory resposible for creating instances of the TActiveFormControl object and therefore TActiveForm object.

The ActiveForm wizard adds an ActiveForm factory object in the initialization section of the unit that defines the ActiveForm.


 VCL Reference

TActiveFormFactory properties

TActiveFormFactory	Alphabetically	Legend

Derived from TActiveXControlFactory

MiscStatus

ToolboxBitmapID

WinControlClass

Derived from TAutoObjectFactory

DispIntfEntry

DispTypeInfo

EventIID

EventTypeInfo

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TActiveFormFactory properties

TActiveFormFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

DispIntfEntry

DispTypeInfo

ErrorIID

EventIID

EventTypeInfo

Instancing

LicString

MiscStatus

ProgID

ShowErrors

SupportsLicensing

ThreadingModel

ToolboxBitmapID

WinControlClass


 VCL Reference

TActiveFormFactory methods

TActiveFormFactory	Alphabetically	Legend

In TActiveFormFactory

GetIntfEntry

Derived from TActiveXControlFactory

AddVerb

Create

Destroy

UpdateRegistry

Derived from TTypedComObjectFactory

ClassInfo

GetInterfaceTypeInfo

Derived from TComObjectFactory

CreateComObject

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActiveFormFactory methods

TActiveFormFactory	By object	Legend

AddVerb

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterfaceTypeInfo

GetIntfEntry

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TActiveFormFactory.GetIntfEntry
 VCL Reference

TActiveFormFactory.GetIntfEntry

TActiveFormFactory	See also

Retrieves a pointer to the dispatch interface.

function GetIntfEntry(Guid: TGUID): PInterfaceEntry; override;

Description

The GetIntfEntry method obtains an interface, if it exists, from the TActiveForm class. This is an internal method of the DAX framework.


Hierarchy

TObject

TComObjectFactory

TTypedComObjectFactory

TAutoObjectFactory

TActiveXControlFactory

TActiveFormFactory


TAppletApplication
 VCL Reference

TAppletApplication

Hierarchy	Properties	Methods	See also

TAppletApplication represents a Windows control panel application.

Unit

CtlPanel

Description

TAppletApplication represents an application that implements one or more applets, each of which appear in the Windows control panel. Each applet that the application implements is built using an AppletModule, which is a special data module that holds the nonvisual components in the applet and which responds when users execute the applet from the control panel. TAppletApplication contains a set of AppletModules. It lets you respond to a number of events that are called by the Windows control panel for starting up or shutting down the application.

A global Application variable of type TAppletApplication is declared in the CtlPanel unit.


 VCL Reference

TAppletApplication properties

TAppletApplication	Alphabetically	Legend

In TAppletApplication

ControlPanelHandle

ModuleCount

Modules

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TAppletApplication properties

TAppletApplication	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ControlPanelHandle

DesignInfo

ModuleCount

Modules

Name

Owner

Tag

VCLComObject


TAppletApplication.ControlPanelHandle
 VCL Reference

TAppletApplication.ControlPanelHandle

TAppletApplication

This is the window handle to the controlling application.

type THandle = Integer;

property ControlPanelHandle: THandle;

Description

ControlPanelHandle is the handle to the Control Panel or the controlling application (the application which invoked the CplApplet function).


TAppletApplication.ModuleCount
 VCL Reference

TAppletApplication.ModuleCount

TAppletApplication	See also

Indicates the number of AppletModules available.

property ModuleCount: Integer;

Description

ModuleCount is the number of AppletModules that are available to the controlling application from this AppletApplication.


TAppletApplication.Modules
 VCL Reference

TAppletApplication.Modules

TAppletApplication	See also

A list of the AppletModules available.

property Modules[Index: Integer]: TAppletModule;

Description

Modules is a list of the AppletModules that are available to the AppletApplication.


 VCL Reference

TAppletApplication events

TAppletApplication	Alphabetically	Legend

Derived from TAppletApplication

OnCount

OnExit

OnException

OnInit

OnSetup


 VCL Reference

TAppletApplication events

TAppletApplication	By object	Legend

OnCount

OnException

OnExit

OnInit

OnSetup


TAppletApplication.OnCount
 VCL Reference

TAppletApplication.OnCount

TAppletApplication

Occurs when the control panel requests a count of the AppletModules.

type TCountEvent = procedure (Sender: TObject; var AppCount: Integer) of object;

property OnCount: TCountEvent;

Description

The OnCount event occurs when the Application receives a CPL_GETCOUNT message from the controlling application.  It must return the number of AppletModules that are available.  The default is to return ModuleCount, but it may be overridden by changing the value of the AppCount parameter;


TAppletApplication.OnException
 VCL Reference

TAppletApplication.OnException

TAppletApplication	See also

Occurs when an exception raised by the application is not handled.

type TOnAppletExceptionEvent = procedure (Sender: TObject; E: Exception) of object;

property OnException: TOnAppletExceptionEvent;

Description

Use OnException to change the default behavior that occurs when an exception is not handled by application code. If an exception passes through the try blocks in the application code, the application automatically calls the HandleException method. The HandleException method generates an OnException event when it encounters an exception that descends from Exception. If there is no OnException event handler, or if the Exception object does not descend from Exception, the applet displays a message box indicating an error occured.

Sender is the object that raised the exception.

E is the exception object that describes the exception.


TAppletApplication.OnExit
 VCL Reference

TAppletApplication.OnExit

TAppletApplication

Occurs when the Application should unload.

type TExitEvent = TNotifyEvent;

property OnExit: TExitEvent;

Description

The OnExit event occurs when the Application receives a CPL_EXIT message from the controlling application.  This is a recommended spot to do non-applet specific clean-up.


TAppletApplication.OnInit
 VCL Reference

TAppletApplication.OnInit

TAppletApplication

Occurs when the Application is first initialized.

type TInitEvent = procedure (Sender: TObject; var AppInitOK: Boolean) of object;

property OnInit: TInitEvent;

Description

The OnInit event occurs when the Application receives a CPL_INIT message from the controlling application. The application must return either a True or False to determine whether the controlling application should attempt to continue loading this module. The default is to return True, but this value may be overridden by assigning a value to AppInitOK.


TAppletApplication.OnSetup
 VCL Reference

TAppletApplication.OnSetup

TAppletApplication

Occurs when the applet is invoked from the command line during system installation.

type TSetupEvent = TNotifyEvent;

property OnSetup: TSetupEvent;

Description

This event occurs when the CPL_SETUP message is received from the controlling application. This message is only sent when an applet is invoked from the Command line during system installation.


 VCL Reference

TAppletApplication methods

TAppletApplication	Alphabetically	Legend

In TAppletApplication

Create

CreateForm

Destroy

HandleException

Initialize

Run

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAppletApplication methods

TAppletApplication	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

UpdateAction


TAppletApplication.Create
 VCL Reference

TAppletApplication.Create

TAppletApplication

Instantiates a TAppletApplication object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not need to call the constructor directly. TAppletApplication is instantiated by selecting File | New | Other from the menu of the IDE main window and selecting Applet Application in the New Items dialog. An Application variable of type TAppletApplication is declared and initialized as the instance of the application.


TAppletApplication.CreateForm
 VCL Reference

TAppletApplication.CreateForm

TAppletApplication

Creates the Applet object or objects for the applet application.

procedure CreateForm(InstanceClass: TComponentClass; var Reference); virtual;

Description

Do not call CreateForm in an application. Delphi’s module manager calls CreateForm internally to register the applet objects with the applet application.

CreateForm instantiates a TApplet object for each applet contained in the applet application. CreateForm is called automatically, for the first applet module, when the applet application is first created. Subsequently, CreateForm is called for each new applet module added to the application. To add a new applet module, select File | New | Other from the menu of the IDE main window and choose Applet Module in the New Items dialog.


TAppletApplication.Destroy
 VCL Reference

TAppletApplication.Destroy

TAppletApplication	See also

Disposes of an instance of a TAppletApplication object.

destructor Destroy; override;

Description

Do not call the destructor directly. TAppletApplication is destroyed when your application closes.

The destructor frees the memory associated with sub-objects.


TAppletApplication.HandleException
 VCL Reference

TAppletApplication.HandleException

TAppletApplication	See also

Responds to exceptions that are not caught by a try block in the application.

procedure HandleException(Sender: TObject);

Description

HandleException is called automatically when an exception is not caught by any of the try blocks in the application code. It calls the global ExceptObject function to obtain the exception object.

If ExceptObject is Exception or one of its descendants, HandleException generates an OnException event.

If ExceptObject is not an Exception descendant, or if there is no OnException event handler, HandleException calls the global ShowException method to display a message box that indicates what exception occurred.

Sender is the object that raised the exception.


TAppletApplication.Initialize
 VCL Reference

TAppletApplication.Initialize

TAppletApplication

Sets the initial state of the application and hides any associated MainForm.

procedure Initialize; virtual;

Description

Initialize follows the standard (default) VCL application initialization process.


TAppletApplication.Run
 VCL Reference

TAppletApplication.Run

TAppletApplication

Sets the Applications Exception handler.

procedure Run; virtual;

Description

Run sets the Application’s Exception handler.


Hierarchy

TObject

TPersistent

TComponent

TAppletApplication


TAppletModule
 VCL Reference

TAppletModule

Hierarchy	Properties	Methods	Events	See also

TAppletModule represents a single Control Panel Applet in a control panel applet application.

Unit

CtlPanel

Description

TAppletModule encapsulates the functionality of a Control Panel Applet. Its properties specify how the icon for the applet appears in the control panel, including the help that appears when users press F1. The events of TAppletModule let you specify what the applet does when users start or stop it, either by double-clicking in the control panel or by launching the applet programmatically.


 VCL Reference

TAppletModule properties

TAppletModule	Alphabetically	Legend

In TAppletModule

AppletIcon

Caption

Data

Help

ResidIcon

ResidInfo

ResidName

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder


 VCL Reference

TAppletModule properties

TAppletModule	By object	Legend

AppletIcon

Caption

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

DesignOffset

DesignSize

Help

Name

OldCreateOrder

Owner

ResidIcon

ResidInfo

ResidName

Tag

VCLComObject


TAppletModule.AppletIcon
 VCL Reference

TAppletModule.AppletIcon

TAppletModule	See also

Indicates the icon for the AppletModule.

property AppletIcon: TIcon;

Description

AppletIcon contains the icon that is associated with this Applet Module.


TAppletModule.Caption
 VCL Reference

TAppletModule.Caption

TAppletModule	See also

Indicates the caption of the applet module.

property Caption: string;

Description

Caption is the string that shows in the Control Panel under the icon of the Applet.


TAppletModule.Data
 VCL Reference

TAppletModule.Data

TAppletModule	See also

Indicates user-defined data.

property Data: LongInt;

Description

Data is a user-defined value that is passed to the controlling application on the OnInquire/OnNewInquire events.


TAppletModule.Help
 VCL Reference

TAppletModule.Help

TAppletModule	See also

Indicates a help string.

property Help: string;

Description

Help is the string that is visible in the status bar of the Control Panel when a particular Applet is selected.


TAppletModule.ResidIcon
 VCL Reference

TAppletModule.ResidIcon

TAppletModule	See also

Indicates the resource ID of the icon associated with the applet module.

property ResidIcon: Integer;

 Description

ResidIcon is the resource ID of the icon associated with the applet module.  This property is mutually exclusive with the AppletIcon property.


TAppletModule.ResidInfo
 VCL Reference

TAppletModule.ResidInfo

TAppletModule	See also

Indicates the resource ID of the help string.

property ResidInfo: Integer;

Description

ResidInfo is the resource ID of the help string associated with the applet module.  This property is mutually exclusive with the Help property.


TAppletModule.ResidName
 VCL Reference

TAppletModule.ResidName

TAppletModule	See also

Indicates the resource ID of the caption string.

property ResidName: Integer;

Description

ResidName is the resource ID of the caption string associated with the applet module.  This property is mutually exclusive with the Caption property.


 VCL Reference

TAppletModule events

TAppletModule	Alphabetically	Legend

Derived from TAppletModule

OnActivate

OnInquire

OnNewInquire

OnStartWParms

OnStop

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TAppletModule events

TAppletModule	By object	Legend

OnActivate

OnCreate

OnDestroy

OnInquire

OnNewInquire

OnStartWParms

OnStop


TAppletModule.OnActivate
 VCL Reference

TAppletModule.OnActivate

TAppletModule	See also

Occurs when the applet’s icon is double clicked.

type TActivateEvent = procedure (Sender: TObject; Data: LongInt) of object;

property OnActivate: TActivateEvent;

Description

OnActivate is invoked when the Applet icon is double clicked in the Control Panel.  Sender is the Applet Module which was clicked and Data is the value that was set in the Inquire events.


TAppletModule.OnInquire
 VCL Reference

TAppletModule.OnInquire

TAppletModule	See also

Occurs when the AppletModule is queried for its information.

type TInquireEvent = procedure (Sender: TObject; var idIcon: Integer; var idName: Integer; var idInfo: Integer; var lData: Integer) of object;

property OnInquire: TInquireEvent;

Description

OnInquire occurs when the controlling application requests each applet’s information such as its icon, caption, Help and Data values.  This event populates a structure with the resource ID’s which are changed in this event (such as idIcon, idName, idInfo and lData).  These values default to the corresponding module properties.


TAppletModule.OnNewInquire
 VCL Reference

TAppletModule.OnNewInquire

TAppletModule	See also

Occurs when the AppletModule is queried for its information.

type TNewInquireEvent = procedure (Sender: TObject; var lData: Integer; var hIcon: HICON; var AppletName: string; var AppletInfo: string) of object;

property OnNewInquire: TNewInquireEvent;

Description

OnNewInquire occurs when the controlling application requests each applet’s information such as its Icon, Caption, Help, and Data Values.  This event populates a structure with the values that are changed in this event (such as hIcon, AppletName, AppletInfo, and lData).  HIcon defaults to the handle of the AppletIcon property.  AppletName defaults to Caption, AppletInfo defaults to Help, and lData defaults to the Data property of the AppletModule.


TAppletModule.OnStartWParms
 VCL Reference

TAppletModule.OnStartWParms

TAppletModule	See also

Occurs when the AppletModule is invoked from RunDLL.

type StartWParmsEvent  = procedure (Sender: TObject; Params: string) of object;

property OnStartWParms: TStartWParmsEvent;

Description

OnStartWParms parallels the OnActivate event.  Where it differs is that the invocation is coming from RunDLL.  Params may contain extra directions for execution.


TAppletModule.OnStop
 VCL Reference

TAppletModule.OnStop

TAppletModule	See also

Occurs when the AppletModule receives a request to shutdown.

type TStopEvent = procedure (Sender: TObject; Data: LongInt) of object;

property OnStop: TStopEvent;

Description

Write an OnStop event handler to perform Applet-specific clean-up. OnStop occurs when the applet module receives a request to shutdown.

Data is the value that was initialized in OnInquire/OnNewInquire.


 VCL Reference

TAppletModule methods

TAppletModule	Alphabetically	Legend

In TAppletModule

Create

Destroy

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAppletModule methods

TAppletModule	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TAppletModule.Create
 VCL Reference

TAppletModule.Create

TAppletModule

Instantiates a TAppletModule object.

constructor Create(AOwner: TComponent); override;

Description

Create constructs a TAppletModule instance and adds itself to the list of Modules in the TAppletApplication specified as the value of AOwner.


TAppletModule.Destroy
 VCL Reference

TAppletModule.Destroy

TAppletModule	See also

Disposes of an instance of a TAppletModule object.

destructor Destroy; override;

Description

The destructor destroys the specified instance of a TAppletModule and removes it from the list of applet modules in the owning TAppletApplication.

Typically, applications do not call Destroy, because the owning TAppletApplication is responsible for freeing them. However, if an Owner is not specified, do not call Destroy directly. Rather, call the Free method.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TAppletModule


TWebApplication
 VCL Reference

TWebApplication

Hierarchy	Properties	Methods	Using TWebApplication	See also

TWebApplication encapsulates a Web server application.

Unit

WebBroker

Description

TWebApplication provides the fundamental behavior of a Web server application. TWebApplication provides methods to create TWebRequest and TWebResponse objects that represent HTTP request messages and their responses, pass these objects to the dispatcher so that the response can be filled in, and send the response back to the Web client.

Each Web server project automatically declares an Application variable of type TWebApplication as the instance of the application. For CGI applications, this variable is initialized to a TCGIApplication object in the CGIApp unit. For Apache applications, this variable is initialized to a TApacheApplication object in the ApacheApp unit . For ISAPI applications, this variable is initialized to a TISAPIApplication object in the ISAPIApp unit.

The Application variable is added to a project by selecting File | New from the menu of the Delphi main window and selecting Web Server Application in the New Items dialog. Do not add the Forms unit to the uses list of the project, because that unit declares a conflicting Application variable of type TApplication.In addition, do not add the ApacheApp or ISAPIApp unit to a CGI application or the CGIApp unit to an Apache, ISAPI or NSAPI application. The CGIApp unit, the ISAPIApp unit, and the ApacheApp unit each create the initial instance of the Application variable. Including more than one of these units in the uses list causes the memory for the object created in the first unit to be lost.


 VCL Reference

TWebApplication properties

TWebApplication	Alphabetically	Legend

In TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebApplication properties

TWebApplication	By object	Legend

ActiveCount

CacheConnections

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

VCLComObject

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


TWebApplication.Title
 VCL Reference

TWebApplication.Title

TWebApplication	See also

Contains the text that appears below the icon representing the application when it is minimized.

property Title: string;

Description

Use the Title property to modify the name of this text string appearing below the icon of the application. The default value is taken from the executable DLL/EXE filename at runtime.

Do not confuse Title with the Name property. Name is the identifier for the Web application when it is referred to in code.


 VCL Reference

TWebApplication methods

TWebApplication	Alphabetically	Legend

In TWebApplication

Create

CreateForm

Destroy

Initialize

Run

Derived from TWebRequestHandler

AddWebModuleFactory

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebApplication methods

TWebApplication	By object	Legend

AddWebModuleFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

UpdateAction


TWebApplication.Create
 VCL Reference

TWebApplication.Create

TWebApplication	See also

Creates an instance of TWebApplication.

constructor Create(AOwner: TComponent); override;

Description

Do not call Create. The single Web application object named Application is instantiated automatically when the CGIApp unit, the ISAPIApp unit, or the ApacheApp unit is included in the uses list of the project.

Create allocates the helper objects used by TWebApplication.


TWebApplication.CreateForm
 VCL Reference

TWebApplication.CreateForm

TWebApplication	See also

Registers the single Web module with the Web application.

procedure CreateForm(InstanceClass: TComponentClass; var Reference); virtual;

Description

Do not call CreateForm in an application. Delphi’s module manager calls CreateForm internally to register the Web module for the Web application.

CreateForm registers the class of the Web module for the application.


TWebApplication.Destroy
 VCL Reference

TWebApplication.Destroy

TWebApplication	See also

Destroys an instance of TWebApplication.

destructor Destroy; override;

Description

Never call the Destroy or Free method. The application is freed automatically when the application stops running.

Destroy frees the helper objects that were created at startup, as well as all Web modules created by the application.


TWebApplication.Initialize
 VCL Reference

TWebApplication.Initialize

TWebApplication	See also

Introduces an interface for a method that initializes the application.

procedure Initialize; virtual;

Description

The Initialize method for TWebApplication does nothing. Initialize is the first method called for every Delphi project. Descendants of TWebApplication that must perform any initialization before the application starts running override this method for that purpose.

Note:	Although Initialize is the first method called in the project source code, it is not the first code that is executed in an application.


TWebApplication.Run
 VCL Reference

TWebApplication.Run

TWebApplication	See also

Executes the Web application.

procedure Run; virtual;

Description

When creating a new project, Delphi automatically creates a main program block in the project file that calls the Run method. When the application is executed, the application’s Run method is called.

The Run method for TWebApplication sets up the default error handler and shut down sequence for the application. Descendants of TWebApplication override the Run method to receive HTTP request messages, create the TWebRequest and TWebResponse objects for incoming requests, and call the HandleRequest method to process those requests.


Hierarchy

TObject

TPersistent

TComponent

TWebRequestHandler

TWebApplication


TASPMTSObject
 VCL Reference

TASPMTSObject

Hierarchy	Properties	Methods	Using TASPMTSObject	See also

TASPMTSObject is the base class for Active Server pages when using IIS 4 or IIS 5.

Unit

AspTlb

Description

When you specify Object Context, the Active Server Object wizard generates a TASPMTSObject descendant to implement the Automation server object that is embedded in its generated Active Server Page. The generated Active Server Page instantiates the TASPMTSObject descendant by calling Server.CreateObject.

In addition to the support for the IDispatch interface that it inherits from TAutoObject, TASPMTSObject introduces several properties that surface the ASP intrinsics (built-in Application, Session, Server, Request, and Response objects).


 VCL Reference

TASPMTSObject properties

TASPMTSObject	Alphabetically	Legend

In TASPMTSObject

Application

Request

Response

Server

Session

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TAutoObject properties

TAutoObject	By object	Legend

Application

Controller

Factory

RefCount

Request

Response

Server

ServerExceptionHandler

Session


TASPMTSObject.Application
 VCL Reference

TASPMTSObject.Application

TASPMTSObject	See also

Provides access to the application-level interface for the server.

property Application: IApplicationObject;

Description

Use Application to access the ASP intrinsic Application object. This interface lets you share information among all users of a given application. An ASP-based application is defined as all the .asp files in a virtual directory and its subdirectories. Because the Application object can be shared by more than one user, the interface supplies Lock and Unlock methods to prevent multiple users from trying to alter a property simultaneously.

For more information, see Microsoft’s documentation of the Application Object.


TASPMTSObject.Request
 VCL Reference

TASPMTSObject.Request

TASPMTSObject	See also

Provides access to the request message from the Web browser.

property Request: IRequest;

Description

Use Request to access the ASP intrinsic Request object. This interface lets you access the HTTP headers of the request message from the Web browser that caused the Active Server page to be opened.

For more information, see Microsoft’s documentation of the Request Object.


TASPMTSObject.Response
 VCL Reference

TASPMTSObject.Response

TASPMTSObject	See also

Provides access to the response message that is returned to the Web browser.

property Response: IResponse;

Description

Use Response to access the ASP intrinsic Response object. This interface lets you send output to the client Web browser by specifying the HTTP headers or content of an HTTP response message that ASP sends to the Web browser. For example, you can add cookies or set the expiration of the response content, or redirect the request to a different URL.

For more information, see Microsoft’s documentation of the Response Object.


TASPMTSObject.Server
 VCL Reference

TASPMTSObject.Server

TASPMTSObject	See also

Provides access to the interface for the ASP server.

property Server: IServer;

Description

Use Server to access the ASP intrinsic Server object. This interface lets you access the properties and methods of the ASP server. These include the timeout property that prevents Web browsers from waiting indefinitely if the Active Server Page hangs while trying to run its script. They also include utilities for working with HTML and URLs so that you do not need to explicitly encode escape characters for HTML reserved characters or URLs and can map virtual paths to physical paths.

For more information, see Microsoft’s documentation of the Server Object.


TASPMTSObject.Session
 VCL Reference

TASPMTSObject.Session

TASPMTSObject	See also

Provides access to the interface for the ASP Session.

property Session: ISessionObject;

Description

Use Session to access the ASP intrinsic Session object. This interface lets you store information needed for a particular user-session. Variables stored in the Session object are not discarded when the user jumps between pages in the application; instead, these variables persist for the entire user-session.

The Web server automatically creates a Session object when a user who does not already have a session requests a Web page from the application. The server destroys the Session object when the session expires or is abandoned.

For more information, see Microsoft’s documentation of the Session Object.


 VCL Reference

TASPMTSObject methods

TASPMTSObject	Alphabetically	Legend

Derived from TAutoObject

Initialize

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TASPMTSObject methods

TASPMTSObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease


Hierarchy

TObject

TAutoObject

TASPMTSObject


TASPObject
 VCL Reference

TASPObject

Hierarchy	Properties	Methods	Using TASPObject	See also

TASPObject is the base class for Active Server pages when using IIS 3 or IIS 4.

Unit

AspTlb

Description

When you specify page-level event methods, the Active Server Object wizard generates a TASPObject descendant to implement the Automation server object that is embedded in its generated Active Server Page. The generated Active Server Page instantiates the TASPObject descendant by calling Server.CreateObject.

In addition to the support for the IDispatch interface that it inherits from TAutoObject, TASPObject supports the IASPObject interface. This interface introduces two methods:

OnStartPage, which ASP calls when the Active Server Page is opened in a user’s Web Browser.

OnEndPage, which ASP calls when the Web browser closes the Active Server Page.

TASPObject implements these methods to provide support for its properties, which surface the ASP intrinsics (built-in Application, Session, Server, Request, and Response objects).


 VCL Reference

TASPObject properties

TASPObject	Alphabetically	Legend

In TASPObject

Application

Request

Response

ScriptingContext

Server

Session

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TASPObject properties

TASPObject	By object	Legend

Application

Controller

Factory

RefCount

Request

Response

ScriptingContext

Server

ServerExceptionHandler

Session


TASPObject.Application
 VCL Reference

TASPObject.Application

TASPObject	See also

Provides access to the application-level interface for the server.

property Application: IApplicationObject;

Description

Use Application to access the ASP intrinsic Application object. This interface lets you share information among all users of a given application. An ASP-based application is defined as all the .asp files in a virtual directory and its subdirectories. Because the Application object can be shared by more than one user, the interface supplies Lock and Unlock methods to prevent multiple users from trying to alter a property simultaneously.

For more information, see Microsoft’s documentation of the Application Object.


TASPObject.Request
 VCL Reference

TASPObject.Request

TASPObject	See also

Provides access to the request message from the Web browser.

property Request: IRequest;

Description

Use Request to access the ASP intrinsic Request object. This interface lets you access the HTTP headers of the request message from the Web browser that caused the Active Server page to be opened.

For more information, see Microsoft’s documentation of the Request Object.


TASPObject.Response
 VCL Reference

TASPObject.Response

TASPObject	See also

Provides access to the response message that is returned to the Web browser.

property Response: IResponse;

Description

Use Response to access the ASP intrinsic Response object. This interface lets you send output to the client Web browser by specifying the HTTP headers or content of an HTTP response message that ASP sends to the Web browser. For example, you can add cookies or set the expiration of the response content, or redirect the request to a different URL.

For more information, see Microsoft’s documentation of the Response Object.


TASPObject.ScriptingContext
 VCL Reference

TASPObject.ScriptingContext

TASPObject	See also

Provides access to the ScriptingContext interface for the Active Server Page.

property ScriptingContext: IScriptingContext;

Description

ScriptingContext is the interface that is supplied to the OnStartPage method by ASP when the Active Server Page is opened. There is no need to use this interface, because it only provides access to the ASP intrinsics, which are surfaced by the other properties of TASPObject.


TASPObject.Server
 VCL Reference

TASPObject.Server

TASPObject	See also

Provides access to the interface for the ASP server.

property Server: IServer;

Description

Use Server to access the ASP intrinsic Server object. This interface lets you access the properties and methods of the ASP server. These include the timeout property that prevents Web browsers from waiting indefinitely if the Active Server Page hangs while trying to run its script. They also include utilities for working with HTML and URLs so that you do not need to explicitly encode escape characters for HTML reserved characters or URLs and can map virtual paths to physical paths.

For more information, see Microsoft’s documentation of the Server Object.


TASPObject.Session
 VCL Reference

TASPObject.Session

TASPObject	See also

Provides access to the interface for the ASP Session.

property Session: ISessionObject;

Description

Use Session to access the ASP intrinsic Session object. This interface lets you store information needed for a particular user-session. Variables stored in the Session object are not discarded when the user jumps between pages in the application; instead, these variables persist for the entire user-session.

The Web server automatically creates a Session object when a user who does not already have a session requests a Web page from the application. The server destroys the Session object when the session expires or is abandoned.

For more information, see Microsoft’s documentation of the Session Object.


 VCL Reference

TASPObject methods

TASPObject	Alphabetically	Legend

In TASPObject

OnEndPage

OnStartPage

Derived from TAutoObject

Initialize

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TASPObject methods

TASPObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

OnEndPage

OnStartPage

SafeCallException


TASPObject.OnEndPage
 VCL Reference

TASPObject.OnEndPage

TASPObject	See also

Releases the ScriptingContext interface when the Web page is closed.

procedure OnEndPage; safecall;

Description

When the server finishes processing script on an ASP page, it calls OnEndPage. As implemented in TASPObject, OnEndPage releases the ScriptingContext interface that was initially passed to the OnStartPage method.

Override this method to free any objects created by the OnStartPage method and release any resources that should not persist beyond the processing of the TASPObject instance.

Note:	 OnEndPage is only called on page-level and session-level objects. If the TASPObject instance has application-level scope (for example, if it was created in global.asa in the Application_OnStart event and added to the Application object), this method is not called. Similarly, if the TASPObject instance was created by means other than Server.CreateObject or <OBJECT RUNAT=Server ...> in the ASP page, the method is not called.


TASPObject.OnStartPage
 VCL Reference

TASPObject.OnStartPage

TASPObject	See also

Sets the ScriptingContext property, which is used internally to access the ASP intrinsics.

procedure OnStartPage(AScriptingContext: IUnknown); safecall;

Description

The server calls OnStartPage when a user requests a Web page in an ASP application. This call occurs the first time the object is accessed by a script. OnStartPage sets the ScriptingContext property to the interface passed as the AScriptingContext parameter.

Override this method to write any code that should run when the user opens the Active Server Page. The first line in the overridden method should call the inherited OnStartPage method, so that the values of all properties (which represent ASP intrinsics) are set to meaningful values. You can then use the built-in objects that are surfaced by the TASPObject properties.

Note:	 OnStartPage is only called on page-level and session-level objects. If the TASPObject instance has application-level scope (for example, if it was created in global.asa in the Application_OnStart event and added to the Application object), this method is not called. Similarly, if the TASPObject instance was created by means other than Server.CreateObject or <OBJECT RUNAT=Server ...> in the ASP page, the method is not called.


Hierarchy

TObject

TAutoObject

TASPObject


TCheckConstraint
 VCL Reference

TCheckConstraint

Hierarchy	Properties	Methods

TCheckConstraint represents a record-level constraint on a dataset component.

Unit

DB

Description

BDE-enabled and client dataset components implement a Constraints property that uses check constraints to represent record-level constraints. These constraints can be derived from the server or the data dictionary, and can be customized in applications. Each TCheckConstraint object represents an individual constraint associated with a dataset.


 VCL Reference

TCheckConstraint properties

TCheckConstraint	Alphabetically	Legend

In TCheckConstraint

CustomConstraint

ErrorMessage

FromDictionary

ImportedConstraint

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TCheckConstraint properties

TCheckConstraint	By object	Legend

Collection

CustomConstraint

DisplayName

ErrorMessage

FromDictionary

ID

ImportedConstraint

Index


TCheckConstraint.CustomConstraint
 VCL Reference

TCheckConstraint.CustomConstraint

TCheckConstraint	See also

Contains the SQL text representation of a constraint defined on a record by an application.

property CustomConstraint: string;

Description

Use CustomConstraint to store the SQL text that defines a check constraint defined by the application for a dataset component. Custom constraints are local to the application and do not get applied by the server when an application writes its changes to a database.

Note:	Custom constraints are SQL expressions. Because of this, always use a period (.) as a floating-point separator.  This may be inconsistent with international Windows settings.


TCheckConstraint.ErrorMessage
 VCL Reference

TCheckConstraint.ErrorMessage

TCheckConstraint	See also

Contains the text of an error message to display if data entered in a record by a user violates the constraint condition.

Property ErrorMessage string;

Description

Use ErrorMessage to set the error message string to display in an exception message dialog if a user enters data in a record that violates a check constraint condition.


TCheckConstraint.FromDictionary
 VCL Reference

TCheckConstraint.FromDictionary

TCheckConstraint	See also

Indicates whether to fetch a check constraint from the Data Dictionary.

property FromDictionary: Boolean;

Description

Use FromDictionary to indicate whether this check constraint is derived from the Data Dictionary (True), or is local to the application (False).


TCheckConstraint.ImportedConstraint
 VCL Reference

TCheckConstraint.ImportedConstraint

TCheckConstraint	See also

Contains the SQL text for a check constraint imported from the Data Dictionary or a remote SQL database server.

property ImportedConstraint: string;

Description

ImportedConstraint stores the SQL text for a check constraint that is imported from the server or Data Dictionary. Although an application can set this property at runtime, ordinarily the text in ImportedConstraint is automatically provided to the application.


 VCL Reference

TCheckConstraint methods

TCheckConstraint	Alphabetically	Legend

In TCheckConstraint

Assign

GetDisplayName

Derived from TCollectionItem

Create

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCheckConstraint methods

TCheckConstraint	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCheckConstraint.Assign
 VCL Reference

TCheckConstraint.Assign

TCheckConstraint

Assigns one constraint to another.

procedure Assign(Source: TPersistent);

Description

Call Assign to copy the SQL that defines the constraint of another TCheckConstraint object into this one. Source is the TCheckConstraint from which to read text.


TCheckConstraint.GetDisplayName
 VCL Reference

TCheckConstraint.GetDisplayName

TCheckConstraint	See also

Retrieves the current text for a constraint.

function GetDisplayName: string;

Description

Call GetDisplayName to retrieve the current text for a check constraint. GetDisplayName returns the current value of the ImportedConstraint property, unless it is an empty string. In that case it returns the current value of the CustomConstraint property. If it, too, is an empty string, GetDisplayName returns the class name of the object.


Hierarchy

TObject

TPersistent

TCollectionItem

TCheckConstraint


TClientSocket
 VCL Reference

 TClientSocket

Hierarchy	Properties	Methods	Events	Using TClientSocket	See also

TClientSocket manages socket connections for a TCP/IP client.

Unit

ScktComp

Description

Add a TClientSocket object to a form or data module to turn an application into a TCP/IP client. TClientSocket specifies a desired connection to a TCP/IP server, manages the connection when it is open, and terminates the connection when the application is through.

Note:	See the CHAT demo for an example of how to use TClientSocket.


 VCL Reference

TClientSocket properties

TClientSocket	Alphabetically	Legend

In TClientSocket

ClientType

Socket

Derived from TAbstractSocket

Active

Address

Host

Port

Service

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TClientSocket properties

TClientSocket	By object	Legend

Active

Address

ClientType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Host

Name

Owner

Port

Service

Socket

Tag

VCLComObject


TClientSocket.ClientType
 VCL Reference

TClientSocket.ClientType

TClientSocket	See also

Specifies whether the client socket reads and writes information asynchronously over the socket connection.

type TClientType = (ctNonBlocking, ctBlocking);

property ClientType: TClientType;

Description

Set ClientType to ctNonBlocking to enable the client socket to respond to asynchronous reading and writing events. When ClientType is ctNonBlocking, execution is not blocked by reading and writing over the socket connection. OnRead or OnWrite events occur when the socket needs to read or write over the connection.

Set ClientType to ctBlocking to force all reading and writing to occur synchronously. It is a good idea to include the client socket object in a thread if the ClientType is ctBlocking, so that I/O does not block all execution within the client application.

When ClientType is ctBlocking, use a TWinSocketStream object for reading and writing. TWinSocketStream prevents the application from hanging indefinitely if a problem occurs while reading or writing. It also can wait for the socket connection to indicate its readiness for reading.

Use a non-blocking socket when the socket needs to synchronize reading and writing with server sockets.


TClientSocket.Socket
 VCL Reference

TClientSocket.Socket

TClientSocket 	Example

Describes the client endpoint of the Windows client socket connection.

property Socket: TClientWinSocket;

Description

Use Socket to

Determine the address and port of both the client and server sockets that are bound to the connection.

Read or write information through the socket connection.

Determine what server notifications the client will respond to.

Obtain the Windows socket handle for making Windows socket API calls.


 VCL Reference

TClientSocket events

TClientSocket	Alphabetically	Legend

Derived from TCustomSocket

OnConnect

OnConnecting

OnDisconnect

OnError

OnLookup

OnRead

OnWrite


 VCL Reference

TClientSocket events

TClientSocket	By object	Legend

OnConnect

OnConnecting

OnDisconnect

OnError

OnLookup

OnRead

OnWrite


 VCL Reference

TClientSocket methods

TClientSocket	Alphabetically	Legend

In TClientSocket

Create

Destroy

Derived from TAbstractSocket

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TClientSocket methods

TClientSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

MethodAddress

MethodName

NewInstance

Open

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction


TClientSocket.Create
 VCL Reference

TClientSocket.Create

TClientSocket	See also

Creates an instance of TClientSocket.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize a client socket component at runtime. TClientSocket objects placed at design time are created automatically.

After calling the inherited constructor, Create

Allocates the TClientWinSocket object that describes the client endpoint of the Windows socket connection.

Initializes the event and error dispatchers for the client socket.


TClientSocket.Destroy
 VCL Reference

TClientSocket.Destroy

TClientSocket	See also

Destroys an instance of TClientSocket.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the client socket is not nil, and only then calls Destroy.

Destroy frees the TClientWinSocket object that describes the client endpoint of the Windows socket connection.


Hierarchy

TObject

TPersistent

TComponent

TAbstractSocket

TCustomSocket

TClientSocket


TClientWinSocket
 VCL Reference

TClientWinSocket

Hierarchy	Properties	Methods	Events	Using TClientWinSocket	See also

TClientWinSocket describes the client endpoint of a Windows socket connection.

Unit

ScktComp

Description

Client socket components use TClientWinSocket to manage the Windows socket API calls for a TCP/IP client application. TClientWinSocket differs from its immediate ancestor TCustomWinSocket only in that it introduces a ClientType property to distinguish blocking from non-blocking client sockets.


 VCL Reference

TClientWinSocket properties

TClientWinSocket	Alphabetically	Legend

In TClientWinSocket

ClientType

Derived from TCustomWinSocket

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


 VCL Reference

TClientWinSocket properties

TClientWinSocket	By object	Legend

Addr

ASyncStyles

ClientType

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


TClientWinSocket.ClientType
 VCL Reference

TClientWinSocket.ClientType

TClientWinSocket	See also

Specifies whether the client Windows socket reads and writes information asynchronously over the socket connection.

type TClientType = (ctNonBlocking, ctBlocking);

property ClientType: TClientType;

Description

Client socket components set ClientType to reflect their own ClientType property. When ClientType is ctNonBlocking, the client Windows socket responds to asynchronous reading and writing events, and execution is not blocked by reading and writing over the connection. OnSocketEvent events occur when the socket needs to read or write over the connection.

When ClientType is ctBlocking, all reading and writing occur synchronously. It is a good idea to perform all reading and writing in a separate thread if ClientType is ctBlocking. Reading and writing in a separate thread ensures that these operations do not block all execution within the client application.

When ClientType is ctBlocking, use a TWinSocketStream object for reading and writing. TWinSocketStream times out so that the application does not hang when a problem occurs while reading or writing. TWinSocketStream also provides a method to wait, before reading, until the socket connection is ready to send information.

Use a non-blocking socket when the socket needs to synchronize reading and writing with server sockets.


 VCL Reference

TClientWinSocket events

TClientWinSocket	Alphabetically	Legend

Derived from TCustomWinSocket

OnErrorEvent

OnSocketEvent


 VCL Reference

TClientWinSocket events

TClientWinSocket	By object	Legend

OnErrorEvent

OnSocketEvent


 VCL Reference

TClientWinSocket methods

TClientWinSocket	Alphabetically	Legend

In TClientWinSocket

Connect

Derived from TCustomWinSocket

Accept

Close

Create

Destroy

Disconnect

Listen

Lock

LookupName

LookupService

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TClientWinSocket methods

TClientWinSocket	By object	Legend

Accept

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

Disconnect

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

Listen

Lock

LookupName

LookupService

MethodAddress

MethodName

NewInstance

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SafeCallException

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write


TClientWinSocket.Connect
 VCL Reference

TClientWinSocket.Connect

TClientWinSocket	See also

Responds to connection notifications.

procedure Connect(Socket: TSocket); virtual;

Description

Applications can not call this protected method. Connect is called in response to notifications that the client socket has successfully completed a connection to a server socket. The Socket parameter is the Windows socket handle for the socket that receives the notification.

Connect generates an OnSocketEvent event with the SocketEvent parameter set to seConnect. Socket components assign an OnSocketEvent event handler that responds to this event by generating an OnConnect event on the socket component.

Note:	Connect is only called if the ASyncStyles property includes asConnect.


Hierarchy

TObject

TCustomWinSocket

TClientWinSocket


TContainedObject
 VCL Reference

TContainedObject

Hierarchy	Properties	Methods	See also

TContainedObject implements the IInterface interface as an inner object in an aggregate.

Unit

System

Description

TContainedObject can be used as a base for classes that create inner, or contained, objects of an aggregate. Use TComObject or its descendants to instantiate an outer object that supports aggregation.

The following implementation rules apply to aggregatable (inner or contained) objects, and are supported by TContainedObject:

When an object of its type is created, the creation succeeds only for a requested interface of type IInterface.

The IInterface methods _AddRef and _Release delegate to the controlling IInterface.

QueryInterface is implemented in TContainedObject only for interfaces implemented in the contained object.

The reference count on the inner object is incremented in the containing object.

TContainedObject is used as a base class for a connection point that must be an inner object in an aggregate.

Note:	An aggregated object is an object that is composed of several interfaced objects. Each object implements its own behavior and interfaces, but all of the objects share the same reference count, which is that of the controller object. In the container pattern, the controller is the container object.

For more information about aggregation, controlling objects, and interfaces, see the Inside OLE, second edition, by Kraig Brockschmidt, the Microsoft Web site, or the Windows SDK Help.


 VCL Reference

TContainedObject properties

TContainedObject	Alphabetically	Legend

Derived from TAggregatedObject

Controller


 VCL Reference

TContainedObject properties

TContainedObject	By object	Legend

Controller


 VCL Reference

TContainedObject methods

TContainedObject	Alphabetically	Legend

Derived from TAggregatedObject

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TContainedObject methods

TContainedObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TAggregatedObject

TContainedObject


TColumnTitle
 VCL Reference

TColumnTitle

Hierarchy	Properties	Methods	See also

TColumnTitle represents the title of a data-grid column (TColumn).

Unit

DBGrids

Description

TDBGrid uses a TDBGridColumns to maintain a collection of TColumn objects. Each TColumn has an associated TColumnTitle that holds information about its title. The TColumnTitle instance is stored in the column’s Title property.


 VCL Reference

TColumnTitle properties

TColumnTitle	Alphabetically	Legend

In TColumnTitle

Alignment

Caption

Color

Column

Font


 VCL Reference

TColumnTitle properties

TColumnTitle	By object	Legend

Alignment

Caption

Color

Column

Font


TColumnTitle.Alignment
 VCL Reference

TColumnTitle.Alignment

TColumnTitle	See also

Specifies how text is aligned within the column title.

property Alignment: TAlignment;

Description

Use Alignment to specify whether the column title is left-justified, right-justified, or centered.


TColumnTitle.Caption
 VCL Reference

TColumnTitle.Caption

TColumnTitle	See also

Specifies the text that appears at the top of the column.

property Caption: String;

Description

The Caption property contains a text string that identifies the column. If the dgTitles flag is set in the data grid’s Options property, the title appears on the form at runtime.

If the FieldName property is set in TColumn, the Caption default value comes from Field.DisplayLabel, which itself defaults to FieldName.


TColumnTitle.Color
 VCL Reference

TColumnTitle.Color

TColumnTitle

Specifies the background color for the column title.

property Color: TColor;

Description

The Color property determines the background color of the column title. You can set Color to one of the constants defined in the Graphics unit (such as clBlue), or to an explicit RGB integer value. The default value is the grid’s FixedColor property.


TColumnTitle.Column
 VCL Reference

TColumnTitle.Column

TColumnTitle 	See also

Specifies the TColumn object that is associated with the column title.

property Column: TColumn;

Description

Use Column to determine the column associated with the column title.


TColumnTitle.Font
 VCL Reference

TColumnTitle.Font

TColumnTitle	See also

Controls the font in which the column title displays its caption.

property Font: TFont;

Description

The Font property points to a TFont object that determines typographic attributes of text displayed in the column title. The default value is the grid’s TitleFont property.


 VCL Reference

TColumnTitle methods

TColumnTitle	Alphabetically	Legend

In TColumnTitle

Assign

Create

DefaultAlignment

DefaultCaption

DefaultColor

DefaultFont

Destroy

RestoreDefaults

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TColumnTitle methods

TColumnTitle	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultAlignment

DefaultCaption

DefaultColor

DefaultFont

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


TColumnTitle.Assign
 VCL Reference

TColumnTitle.Assign

TColumnTitle	See also

Copies the contents of the source column title to a new column title.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the Alignment, Color, Caption, and Font values of the source object if it is another column title. Otherwise, it calls the inherited method, which allows properties to be copied from any object that implements its AssignTo method with a target of TColumn.


TColumnTitle.Create
 VCL Reference

TColumnTitle.Create

TColumnTitle	See also

Creates and initializes a column title.

constructor Create(TColumn);

Description

Call Create to instantiate an instance of TColumnTitle. Create takes a TColumn instance as its argument.

Most applications need not create column title instances as these are instantiated by the associated column.


TColumnTitle.DefaultAlignment
 VCL Reference

TColumnTitle.DefaultAlignment

TColumnTitle	See also

Returns the default alignment of the column title.

function DefaultAlignment: TAlignment;

Description

DefaultAlignment returns the alignment for the column that should be used if the Alignment property is not explicitly set. The DefaultAlignment property for TColumnTitle always returns taLeftJustify. Descendants of TColumnTitle can override this to compute the default alignment in an appropriate way.


TColumnTitle.DefaultCaption
 VCL Reference

TColumnTitle.DefaultCaption

TColumnTitle	See also

Returns the default caption of the column title.

function DefaultCaption: String;;

Description

DefaultCaption returns the DisplayLabel of the TField object associated with the column. If there is no dataset field associated with the column (that is, if the column’s Field property is empty), it returns the column’s FieldName.


TColumnTitle.DefaultColor
 VCL Reference

TColumnTitle.DefaultColor

TColumnTitle	See also

Returns the default background color for the column title.

function DefaultColor: TColor;

Description

Use DefaultColor to determine the background color of the column title if the Color property is not explicitly set. DefaultColor returns the FixedColor of the data grid to which the column belongs. If the column has no associated data grid, DefaultColor returns clBtnFace.


TColumnTitle.DefaultFont
 VCL Reference

TColumnTitle.DefaultFont

TColumnTitle	See also

Returns the default font for the column title.

function DefaultFont: TFont;

Description

Use DefaultColor to determine the font of the column title if the Font property is not explicitly set. DefaultFont returns the TitleFont of the data grid to which the column belongs. If the column has no associated data grid, DefaultFont returns the current value of the associated column’s Font property.


TColumnTitle.Destroy
 VCL Reference

TColumnTitle.Destroy

TColumnTitle	See also

Destroys the column and frees its memory.

destructor Destroy; override;

Description

Destroy eliminates the TColumnTitle instance along with its associated font (TFont).


TColumnTitle.RestoreDefaults
 VCL Reference

TColumnTitle.RestoreDefaults

TColumnTitle	See also

Restores the column title’s default settings.

procedure RestoreDefaults; virtual;

Description

RestoreDefaults reinitializes the Caption and Font properties.


Hierarchy

TObject

TPersistent

TColumnTitle


TCustomResolver
 VCL Reference

TCustomResolver

Hierarchy	Properties	Methods	See also

TCustomResolver is the base class for components that apply updates on behalf of a provider.

Unit

Provider

Description

TCustomResolver defines the fundamental properties and methods used by resolver components for applying updates from a client dataset or XML broker and resolving errors that occur as part of that update process.

TCustomResolver has two descendants: TDataSetResolver, which applies updates to a dataset, and TSQLResolver, which applies updates directly to a database server.

Do not create resolver instances. Provider components create their own TCustomResolver descendants for applying updates.


 VCL Reference

TCustomResolver properties

TCustomResolver	Alphabetically	Legend

In TCustomResolver

Provider

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomResolver properties

TCustomResolver	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Provider

Tag

VCLComObject


TCustomResolver.Provider
 VCL Reference

TCustomResolver.Provider

TCustomResolver 	See also

Indicates the provider that uses this resolver to apply updates.

property Provider: TBaseProvider;

Description

Provider is a read-only property that points to the provider that uses this resolver for applying updates. The Provider property is set in the constructor.

Resolvers use the Provider property internally to obtain information supplied in the provider’s properties. They also use it to generate events on the provider at appropriate points in the update process.


 VCL Reference

TCustomResolver methods

TCustomResolver	Alphabetically	Legend

In TCustomResolver

ApplyUpdates

BeginUpdate

Create

Destroy

DoDelete

DoInsert

DoUpdate

EndUpdate

FreeTreeData

HandleUpdateError

InitializeConflictBuffer

InitKeyFields

InitTreeData

InternalBeforeResolve

InternalUpdateRecord

LogUpdateError

LogUpdateRecord

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomResolver methods

TCustomResolver	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoDelete

DoInsert

DoUpdate

EndUpdate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

FreeTreeData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleUpdateError

HasParent

InheritsFrom

InitializeConflictBuffer

InitInstance

InitKeyFields

InitTreeData

InsertComponent

InstanceSize

InternalBeforeResolve

InternalUpdateRecord

IsImplementorOf

LogUpdateError

LogUpdateRecord

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction


TCustomResolver.ApplyUpdates
 VCL Reference

TCustomResolver.ApplyUpdates

TCustomResolver 	See also

Applies updates received from a provider.

function ApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer); OleVariant; virtual;

Description

Providers call ApplyUpdates to apply updates received from a client dataset or XML broker.

ApplyUpdates generates an OnUpdateData event on the associated provider, and then applies the updates passed in as the Delta parameter, returning an OleVariant that contains any updates that could not be applied.

The Delta parameter specifies a delta packet that contains the insertions, deletions, and modifications to be applied. MaxErrors indicates the maximum number of errors to permit before aborting the update operation. ErrorCount returns the actual number of errors encountered during the update operation. If ErrorCount is greater than MaxErrors, (or an OnUpdateError event returns rrAbort), all updates that have been successfully applied so far are rolled back, and the update process is aborted.

If the associated provider has an OnUpdateError event handler, it is called automatically whenever a record in Delta cannot be updated. In the OnUpdateError handler, applications can correct error conditions and try reapplying an update before returning unsuccessfully updated records back to the client dataset or XML broker.


TCustomResolver.BeginUpdate
 VCL Reference

TCustomResolver.BeginUpdate

TCustomResolver 	See also

Provides the interface for a method that performs any initialization before applying updates.

procedure BeginUpdate; virtual;

Description

The ApplyUpdates method calls BeginUpdate before applying updates in a delta packet.

As implemented in TCustomResolver, BeginUpdate does nothing. Descendants that need take specific action before applying updates override this method.


TCustomResolver.Create
 VCL Reference

TCustomResolver.Create

TCustomResolver	See also

Creates and initializes a resolver.

constructor Create(AProvider: TBaseProvider); reintroduce;

Description

Provider components call the TCustomResolver constructor when they need a resolver component for applying updates. The AProvider parameter specifies the provider that creates and uses the resolver.

Do not create resolver instances directly. Resolvers are designed to be created and used by providers, and can not function independently of a provider.


TCustomResolver.Destroy
 VCL Reference

TCustomResolver.Destroy

TCustomResolver	See also

Frees an instance of a resolver object.

destructor Destroy; override;

Description

Applications rarely have to destroy resolvers explicitly. Once a resolver has been assigned as the Resolver property of a provider, the provider is responsible for freeing the resolver.


TCustomResolver.DoDelete
 VCL Reference

TCustomResolver.DoDelete

TCustomResolver	See also

Defines a method that deletes a record.

procedure DoDelete(Tree: TUpdateTree); virtual; abstract;

Description

DoDelete is one of several helper methods internal to the ApplyUpdates method. These helper methods perform the actual updates in the delta packet. ApplyUpdates wraps the delta packet in a TUpdateTree object. For each record that must be deleted, the resolver calls DoDelete.

TCustomResolver does not implement the DoDelete method. Descendants override this method to delete records in their own specialized way.


TCustomResolver.DoInsert
 VCL Reference

TCustomResolver.DoInsert

TCustomResolver 	See also

Defines a method that inserts a record.

procedure DoInsert(Tree: TUpdateTree); virtual; abstract;

Description

DoInsert is one of several helper methods internal to the ApplyUpdates method. These helper methods perform the actual updates in the delta packet. ApplyUpdates wraps the delta packet in a TUpdateTree object. For each record that must be inserted, the resolver calls DoInsert.

TCustomResolver does not implement the DoInsert method. Descendants override this method to insert records in their own specialized way.


TCustomResolver.DoUpdate
 VCL Reference

TCustomResolver.DoUpdate

TCustomResolver 	See also

Defines a method that modifies a record.

procedure DoUpdate(Tree: TUpdateTree); virtual; abstract;

Description

DoUpdate is one of several helper methods internal to the ApplyUpdates method. These helper methods perform the actual updates passed in the delta packet. ApplyUpdates wraps the delta packet in a TUpdateTree object. For each record that must be modified, the resolver calls DoUpdate.

TCustomResolver does not implement the DoUpdate method. Descendants override this method to insert records in their own specialized way.


TCustomResolver.EndUpdate
 VCL Reference

TCustomResolver.EndUpdate

TCustomResolver 	See also

Provides the interface for a method that performs any finalization after applying updates.

procedure EndUpdate; virtual;

Description

The ApplyUpdates method calls EndUpdate after applying updates.

As implemented in TCustomResolver, EndUpdate does nothing. Descendants that need take specific action after applying updates override this method.


TCustomResolver.FreeTreeData
 VCL Reference

TCustomResolver.FreeTreeData

TCustomResolver	See also

Frees the internal data maintained by a TUpdateTree.

procedure FreeTreeData(Tree: TUpdateTree); virtual;

Description

The ApplyUpdates method wraps delta packets in a TUpdateTree object. The TUpdateTree stores the delta packet, along with information that the resolver uses when applying updates. This information varies, depending on the class of resolver.

FreeTreeData is called internally just before the resolver’s TUpdateTree object is freed. As implemented in TCustomResolver, FreeTreeData does nothing. Descendants override this method if any specific action is required to free the resolver-specific information that is stored in the update tree.


TCustomResolver.HandleUpdateError
 VCL Reference

TCustomResolver.HandleUpdateError

TCustomResolver	See also

Manages the resolving process when errors occur while applying updates.

function HandleUpdateError(Tree: TUpdateTree; E: EUpdateError; var MaxErrors, ErrorCount: Integer): Boolean;

Description

When a resolver encounters errors in applying updates, it calls HandleUpdateError to determine how to proceed. HandleUpdateError generates an OnUpdateError event on the associated provider so that applications have an opportunity to correct update errors. Depending on the response provided by the OnUpdateError handler (if any), HandleUpdateError logs the unresolved error or signals that the resolver should try to apply the (corrected) record again.

The Tree parameter specifies the TUpdateTree that wraps all the updates currently being applied. The MaxErrors parameter indicates the maximum number of errors that the resolver will tolerate before the update operation is rolled back. The ErrorCount parameter specifies how many errors have been encountered so far.

HandleUpdateError returns True if the record has been corrected and the resolver should try to reapply the update. It returns False if the record is added to the error log.


TCustomResolver.InitializeConflictBuffer
 VCL Reference

TCustomResolver.InitializeConflictBuffer

TCustomResolver 	See also

Introduces a method for adding information about a failed update that is passed to an OnUpdateError event handler.

procedure InitializeConflictBuffer(Tree: TUpdateTree); virtual; abstract;

Description

The HandleUpdateError method calls InitializeConflictBuffer before generating an OnUpdateError event. This ensures that the client dataset passed to an OnUpdateError event handler represents the update that caused the problem, with appropriate values for field’s CurValue property.

Descendants of TCustomResolver implement this method to obtain information from the dataset or server to which they are applying updates.


TCustomResolver.InitKeyFields
 VCL Reference

TCustomResolver.InitKeyFields

TCustomResolver 	See also

Sets the provider flag pfInKey on all key fields in a delta data packet.

procedure InitKeyFields(Tree: TUpdateTree; ADelta: TPacketDataSet);

Description

InitKeyFields is used internally to mark fields from a delta packet that can be used to uniquely identify records in the underlying dataset.

The Tree parameter is the internal TUpdateTree that the resolver uses to store information about the delta packet. The ADelta parameter is the delta packet of changes to apply. For every field in this delta packet that acts as a key value to uniquely identify records, InitKeyFields adds pfInKey to its ProviderFlags property.


TCustomResolver.InitTreeData
 VCL Reference

TCustomResolver.InitTreeData

TCustomResolver	See also

Initializes the internal data maintained by TUpdateTree.

procedure InitTreeData(Tree: TUpdateTree); virtual;

Description

The ApplyUpdates method wraps delta packets in a TUpdateTree object. The TUpdateTree stores the delta packet, along with information that the resolver uses when applying updates. This information varies, depending on the class of resolver.

InitTreeData is called internally when the resolver’s TUpdateTree object is created. As implemented in TCustomResolver, InitTreeData does nothing. Descendants override this method to store any class-specific information that they use when applying updates.


TCustomResolver.InternalBeforeResolve
 VCL Reference

TCustomResolver.InternalBeforeResolve

TCustomResolver	See also

Initializes internal data structures once the delta packet has been wrapped in an update tree but before any updates are applied.

procedure InternalBeforeResolve(Tree: TUpdateTree); virtual;

Description

The ApplyUpdates method wraps delta packets in a TUpdateTree object. Once this is complete, InternalBeforeResolve performs any other initialization before the updates are applied.

As implemented in TCustomResolver, InternalBeforeResolve does nothing. Descendants override this method to perform class-specific initialization.


TCustomResolver.InternalUpdateRecord
 VCL Reference

TCustomResolver.InternalUpdateRecord

TCustomResolver	See also

Manages the updating process once a delta packet is wrapped in a TUpdateTree object.

function InternalUpdateRecord(Tree: TUpdateTree): Boolean;

Description

InternalUpdateRecord orchestrates the updating process, ensuring that updates are applied in the correct order and that errors are resolved or logged. For each record that must be updated, InternalUpdateRecord

1.Generates a BeforeUpdateRecord event.

2.Applies the update.

3.Generates an AfterUpdateRecord event if the update is successful, or calls HandleUpdateError to generate an OnUpdateError event.


TCustomResolver.LogUpdateError
 VCL Reference

TCustomResolver.LogUpdateError

TCustomResolver 	See also

Adds an update that could not be resolved to the error log.

procedure LogUpdateError(Tree: TUpdateTree; E: EUpdateError; Response: TResolverResponse);

Description

When the HandleUpdateError method can’t resolve an update conflict, it calls LogUpdateError to add the unapplied update to the error log. This error log is eventually returned by the ApplyUpdates method when the update operation ends.

The Tree parameter represents the set of updates in the delta packet. The E parameter is the EUpdateError exception that represents the current update error. The Response parameter is rrSkip if the update process should continue after the update is logged, and rrAbort if the entire update operation should be rolled back. LogUpdateError is never called with Response set to any other value.


TCustomResolver.LogUpdateRecord
 VCL Reference

TCustomResolver.LogUpdateRecord

TCustomResolver 	See also

Adds records to the error log if their data has been changed by another application.

procedure LogUpdateRecord(Tree: TUpdateTree);

Description

When the InternalUpdateRecord method detects that a record includes other changes than those specified by an update in the delta packet, it calls LogUpdateRecord to add the changed and updated record to the error log so that the client dataset or XML broker can refresh the updated record. This error log is eventually returned by the ApplyUpdates method when the update operation ends.

The Tree parameter represents the set of updates being applied.


TCustomResolver.RowRequest
 VCL Reference

TCustomResolver.RowRequest

TCustomResolver	See also

Returns information from a specified record.

function RowRequest(Row: OleVariant; Options: TFetchOptions): OleVariant; virtual;

Description

RowRequest is called automatically in response to the associated provider’s RowRequest method.

The Row parameter is an OleVariant that describes the record about which information is requested. The resolver uses this to locate the desired record.

The Options parameter indicates the type of information required.

The requested information is returned as a delta packet.


Hierarchy

TObject

TPersistent

TComponent

TCustomResolver


TCustomActionBar
 VCL Reference

TCustomActionBar

Hierarchy	Properties	Methods 	Events	See also

TCustomActionBar is the base class for all action bands.

Unit

ActnMan

Description

TCustomActionBar is the base class for all the action bands that are used by the action manager component as rendering engines to display actions and categories of actions as UI elements.


 VCL Reference

TCustomActionBar properties

TCustomActionBar	Alphabetically	Legend

In TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionBar properties

TCustomActionBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


TCustomActionBar.ActionClient
 VCL Reference

TCustomActionBar.ActionClient

TCustomActionBar

Specifies an action client available from the current action band.

property ActionClient: TActionClient;

Description

Use ActionClient to obtain a reference to an action client available from the current action band.


TCustomActionBar.ActionControls
 VCL Reference

TCustomActionBar.ActionControls

TCustomActionBar	See also

Contains a list of the controls on the action band.

property ActionControls[const Index: Integer]: TCustomActionControl;

Description

Use ActionControl as a list of the controls available on the action band.


TCustomActionBar.ActionManager
 VCL Reference

TCustomActionBar.ActionManager

TCustomActionBar	See also

Specifies the action manager component that is associated with the action band.

property ActionManager: TActionManager;

Description

Use the ActionManager property to specify the action manager component that will be using the action band to render the UI elements managed by that action manager.

Note: When an action is dropped on an action band and the ActionManager property is not assigned, the ActionManager property is automatically assign to the action manager that manages the action that was dropped on the action band.


TCustomActionBar.AllowHiding
 VCL Reference

TCustomActionBar.AllowHiding

TCustomActionBar	See also

Determines whether the action band can be hidden.

property AllowHiding: Boolean;

Description

Use AllowHiding to specify whether the action band can be hidden at runtime, if the application allows runtime customization by the end user. Setting AllowHiding to True allows the action band to be hidden at runtime. If AllowHiding is set to False, the action cannot be hidden. Certain action bands, such as the main menu action band, should set this AllowHiding to False.


TCustomActionBar.ContextBar
 VCL Reference

TCustomActionBar.ContextBar

TCustomActionBar	See also

Indicates whether items shown should be in the Items or ContextItems list.

property ContextBar: Boolean;

Description

If ContextBar is set to False, the menu will display the items in the action client's Items property. If ContextBar is True, then the menu is a context menu, and it should display the items in the action client's ContextItems property.


TCustomActionBar.DesignMode
 VCL Reference

TCustomActionBar.DesignMode

TCustomActionBar

Specifies whether the whether the action band is being customized or being used in the IDE.

property DesignMode: Boolean;

Description

DesignMode is used internally to determine whether the action band is being customized or being used within the IDE.


TCustomActionBar.HorzMargin
 VCL Reference

TCustomActionBar.HorzMargin

TCustomActionBar	See also

Specifies the width of the horizonal margins in pixels.

property HorzMargin: Integer;

Description

HorzMargin specifies the width of the action band's left and right horizonal margins in pixels.


TCustomActionBar.HorzSeparator
 VCL Reference

TCustomActionBar.HorzSeparator

TCustomActionBar	See also

Indicates whether a horizonal separator bar should appear between item lines.

property HorzSeparator: Boolean;

Description

An action band may appear on multiple lines; items which cannot be displayed on one line may wrap to the next in the same way that words will wrap on most word processors. Set HorzSeparator to True if you want a separator bar to appear between the lines.


TCustomActionBar.Items
 VCL Reference

TCustomActionBar.Items

TCustomActionBar

Provides access to the UI elements that are rendered by the action band.

property Items: TActionClients;

Description

Items is used internally to access individual UI elements in the action band.


TCustomActionBar.Orientation
 VCL Reference

TCustomActionBar.Orientation

TCustomActionBar

Specifies the orientation of the items when they are rendered on the action band.

type

TBarOrientation = (boLeftToRight, boRightToLeft, boTopToBottom, boBottomToTop);

property Orientation: TBarOrientation;

Description

The possible values of Orientation are:

Value	Meaning

boLeftToRight	Items are rendered in rows, from left to right.

boRightToLeft	Items are rendered in rows, from right to left.

boTopToBottom	Items are rendered in columns, from top to bottom.

boBottomToTop	Items are rendered in columns, from bottom to top.


TCustomActionBar.PersistentHotKeys
 VCL Reference

TCustomActionBar.PersistentHotKeys

TCustomActionBar

Specifies whether keyboard accelerator shortcuts are always displayed.

property PersistentHotkeys: Boolean;

Description

Use PersistentHotKeys to specify whether keyboard accelerator shortcuts are always displayed. Setting PersistentHotKeys to True cause the underline for the keyboard shortcut key to always be drawn. If PersistentHotKeys is set to False, the underline for the keyboard shortcut key keyboard is only displayed if the user has used the keyboard to navigate through the action band's items. If the user is only using the mouse to navigate through the action band's items and PersistentHotKeys is set to False, the underline under the character denoted as the shortcut key is not drawn.


TCustomActionBar.Spacing
 VCL Reference

TCustomActionBar.Spacing

TCustomActionBar

Determines where the image and text appear on an action bands rendered control that represents the action client.

property Spacing: Integer;

Description

Spacing is used internally to set the number of pixels that should appear between the image specified in an action client's Glyph property and the text specified in its Caption property.


TCustomActionBar.VertMargin
 VCL Reference

TCustomActionBar.VertMargin

TCustomActionBar	See also

Specifies the width of the vertical margins in pixels.

property VertMargin: Integer;

Description

VertMargin specifies the width of the action band's top and bottom vertical margins in pixels.


TCustomActionBar.VertSeparator
 VCL Reference

TCustomActionBar.VertSeparator

TCustomActionBar	See also

Indicates whether a vertical separator bar should appear between item lines.

property VertSeparator: Boolean;

Description

An action band may appear on multiple vertical lines; items which cannot be displayed on one line may wrap to the next in the same way that words will wrap on most word processors. Set VertSeparator to True if you want a separator bar to appear between the lines.


 VCL Reference

TCustomActionBar events

TCustomActionBar	By Object	Legend

In TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionBar events

TCustomActionBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnStartDock

OnStartDrag

OnUnDock


TCustomActionBar.OnControlCreated
 VCL Reference

TCustomActionBar.::OnControlCreated

TCustomActionBar

Occurs when a control is created on the action band.

type TItemCreatedEvent = procedure(Sender: TObject; var AnItem: TCustomActionBarControl) of object;

property OnControlCreated: TItemCreatedEvent;

Description

Write an OnControlCreated event handler to enhance or replace the type of UI element that is rendered on the action band.


TCustomActionBar.OnGetControlClass
 VCL Reference

TCustomActionBar.::OnGetControlClass

TCustomActionBar

Occurs when an item is to be placed on the action band.

type TGetControlClassEvent = procedure(Sender: TObject; AnItem: TActionClient; var ControlClass: TCustomActionBarControlClass) of object;

property OnGetControlClass: TGetControlClassEvent;

Description

Write an OnGetControlClass event handler to place your own custom action item (subclassed from TActionClient) on the action band.


TCustomActionBar.OnPaint
 VCL Reference

TCustomActionBar.::OnPaint

TCustomActionBar

Occurs when the action band is painted.

property OnPaint: TNotifyEvent;

Description

Write an OnPaint event handler to change the way the action band is painted.


 VCL Reference

TCustomActionBar methods

TCustomActionBar	Alphabetically	Legend

In TCustomActionBar

Create

Destroy

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionBar methods

TCustomActionBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionBar.Create
 VCL Reference

TCustomActionBar.Create

TCustomActionBar

Creates and initializes a TCustomActionBar instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionBar and initializes its properties.


TCustomActionBar.DragDrop
 VCL Reference

TCustomActionBar.DragDrop

TCustomActionBar	See also

Generates an OnDragDrop event.

procedure DragDrop(Source: TObject; X, Y: Integer);

Description

When creating an action band that descends from TCustomActionBar, override DragDrop to add additional code that executes before the OnDragDrop event handler is called.

The Source parameter is the object that was dropped onto the control. The X and Y parameters are the mouse coordinates where the object was dropped.


TCustomActionBar.Destroy
 VCL Reference

TCustomActionBar.Destroy

TCustomActionBar	See also

Destroys an instance of TCustomActionBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionBar reference is not nil, and only then calls Destroy.


TCustomActionBar.FindFirst
 VCL Reference

TCustomActionBar.FindFirst

TCustomActionBar	See also

Finds the first TActionClientItem in the Items list.

function FindFirst: TActionClientItem;

Description

Use FindFirst to find the first TActionClientItem in the custom action bar's Items property.


TCustomActionBar.FindFirstVisibleItem
 VCL Reference

TCustomActionBar.FindFirstVisibleItem

TCustomActionBar	See also

Finds the first visibleTActionClientItem in the Items list.

function FindFirstVisibleItem: TActionClientItem;

Description

Use FindFirst to find the first visible TActionClientItem in the custom action bar's Items property.


TCustomActionBar.FindLastVisibleItem
 VCL Reference

TCustomActionBar.FindLastVisibleItem

TCustomActionBar	See also

Finds the last visibleTActionClientItem in the Items list.

function FindLastVisibleItem: TActionClientItem;

Description

Use FindFirst to find the last visible TActionClientItem in the custom action bar's Items property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar


TCustomCachedDataSet
 VCL Reference

TCustomCachedDataSet

Hierarchy	Properties	Methods	Events	See also

TCustomCachedDataSet is the base class for client datasets that cache data from an internal source dataset.

Unit

DBLocal

Description

TCustomCachedDataSet is the common base class for client datasets that contain an internal provider and source dataset. TCustomCachedDataSet descendants provide a simple way to cache updates. Unlike TClientDataSet, which has no associated data access mechanism, each TCustomCachedDataSet descendant is associated with a specific data access mechanism such as the BDE, dbExpress or InterBaseExpress.

TCustomCachedDataSet descendants use an internal dataset to fetch the data from a database server and an internal provider to package that data into data packets and to apply updates. Thus, TCustomCachedDataSet descendants work much like TClientDataSet when it is connected to a local source dataset via a provider, except that the source dataset and provider are internal.

TCustomCachedDataSet surfaces some of the properties and events of the internal dataset and provider so that you can specify the database server from which to fetch data, indicate what data to fetch from that server, influence what information is included in data packets, and provide input on the updating process.

Like other client datasets, TCustomCachedDataSet descendants can read from and write to a dedicated file on disk. The internal provider and source dataset are not needed for working with file-based data, making TClientDataSet a more suitable choice if you are writing a purely file-based application. However, the ability to work with a file on disk makes TCustomCachedDataSet descendants well-suited to “briefcase model” applications.


 VCL Reference

TCustomCachedDataSet properties

TCustomCachedDataSet	Alphabetically	Legend

In TCustomCachedDataSet

Active

CommandText

Options

Provider

SqlDBType

UpdateMode

Derived from TCustomClientDataSet

ActiveAggs

Aggregates

AggregatesActive

AppServer

CanModify

ChangeCount

CloneSource

Data

DataSetField

DataSize

DataSource

Delta

DisableStringTrim

FetchOnDemand

FileName

Filter

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

PacketRecords

Params

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

StatusFilter

XMLData

Derived from TDataSet

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

Constraints

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomCachedDataSet properties

TCustomCachedDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Data

DataSetField

DataSize

DataSource

DefaultFields

Delta

Designer

DesignInfo

DisableStringTrim

Eof

FetchOnDemand

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FileName

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

Modified

Name

ObjectView

Options

Owner

PacketRecords

Params

Provider

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

SparseArrays

SqlDBType

State

StatusFilter

Tag

UpdateMode

VCLComObject

XMLData


TCustomCachedDataSet.Active
 VCL Reference

TCustomCachedDataSet.Active

TCustomCachedDataSet 	See also

Specifies whether the dataset contains data.

property Active: Boolean;

Description

Use Active to determine whether the dataset makes its data available. When Active is False, the dataset is closed; It can’t manipulate the data it represents. When Active is True, data can be read or edited using the dataset.

Setting Active to True:

1	Fills the client dataset with data. If the FileName property is set, this data comes from the specified file. Otherwise, this data is fetched (using the internal source dataset and provider) from the database to which the internal source dataset connects. If the data comes from a database server, The CommandText property indicates what data to fetch.

2	Triggers a BeforeOpen event.

3	Sets the State property to dsBrowse.

4	Opens a cursor into the dataset.

5	Triggers an After Open event.

If an error occurs during the dataset open State is set to dsInactive, and the cursor is closed.

Setting Active to False:

1	Triggers a BeforeClose event.

2	Sets the State property to dsInactive.

3	Closes the cursor, saving the current data to disk if the FileName property is set, and saving the current data packet to a cache so that it can be restored when the client dataset is reopened.

4	Triggers an AfterClose event.

Note:	Calling the Open method sets Active to True; calling the Close method sets Active to False.


TCustomCachedDataSet.CommandText
 VCL Reference

TCustomCachedDataSet.CommandText

TCustomCachedDataSet	See also

Specifies what data to fetch from the database server.

property CommandText: string;

Description

CommandText specifies what data the client dataset wants to receive from the server. Vy default, this is an SQL statement (query) for the database server to execute, but each TCustomCachedDataSet descendant can override this property to allow other types of commands.

If CommandText includes parameters, use the Params property to supply parameter values.

Note:	If the FileName property is set, CommandText is ignored and the data is fetched from the specified file.

Warning:	Do not remove poAllowCommandText from the Options property. If you do, the value of CommandText will be ignored.


TCustomCachedDataSet.Options
 VCL Reference

TCustomCachedDataSet.Options

TCustomCachedDataSet 	See also

Influences how data is fetched and how it can be used.

property Options: TProviderOptions;

Description

Set Options to customize how the client dataset communicates with its internal provider. Options is a set that specifies

Whether nested detail sets and BLOB data are included in data packets or fetched separately. The internal source dataset will always fetch this information, but Options controls whether it is immediately copied into the client dataset’s Data. (This can affect the performance of the dataset.) If nested details or BLOB data are not included, the FetchOnDemand property controls whether they are automatically copied into Data on an as-needed basis, or if the application must explicitly call FetchBlobs or FetchDetails.

Whether Data is read-only, and whether specific types of changes (insertions, edits, or deletions) are disabled.

Whether a single update can affect multiple server records.

Whether records are refreshed when the dataset applies updates.

Note:	Options is the same as the Options property on the internal provider. However, the TProviderOptions type includes some values that are only appropriate to an external provider component. For example, poAllowCommandText should never be removed from Options, or the CommandText property will not work. The internal source dataset does not use persistent fields, so poIncFieldProps does not work. Instead of using poReadOnly, you can set the ReadOnly property.


TCustomCachedDataSet.Provider
 VCL Reference

TCustomCachedDataSet.Provider

TCustomSQLDataSet	See also

Identifies the internal provider component that packages data into the Data property and which applies updates to the database server.

property Provider: TDataSetProvider;

Description

Provider is the internal provider component that packages data into the format required by the Data property and which applies updates when you call the ApplyUpdates method.

Applications do not use this protected property. Instead, the client dataset publishes the properties and events of this provider component that are relevant. These include

The Options property, to influence how the provider assembles data packets.

The UpdateMode property, to specify how the provider locates records when applying updates.

The OnGetTableName event, to allow applications to specify the database table to which updates are applied, in cases where this is ambiguous.

The BeforeUpdateRecord event, to allow applications greater control over the application of updates.


TCustomCachedDataSet.SqlDBType
 VCL Reference

TCustomCachedDataSet.SqlDBType

TCustomCachedDataSet	See also

Specifies what mechanism is used to connect to the database server.

type TSqlDBType = (typeDBX, typeBDE, typeADO, typeIBX);

property SqlDBType: TSqlDBType;

Description

Each TCustomCachedDataSet descendant sets SqlDBType to a value that reflects its data access mechanism. TCustomCachedDataSet uses this value internally to check whether it can perform certain actions. For example, it checks SqlDBType to detect whether the CommandType property can be set.

SqlDBType indicates the type of the internal source dataset and the type of the connection component that is the value of Connection, as indicated in the following table:

Value	Connection type	Internal dataset type

typeDBX	TSQLConnection	TSQLDataSet

typeBDE	TDatabase	TQuery

typeADO	TADOConnection	TADODataSet

typeIBX	TIBDatabase	TIBQuery


TCustomCachedDataSet.UpdateMode
 VCL Reference

TCustomCachedDataSet.UpdateMode

TCustomCachedDataSet	See also

Controls how records are located when applying updates.

property UpdateMode: TUpdateMode;

Description

Use UpdateMode to specify the criteria for locating a record when applying updates. UpdateMode specifies whether modified records are located based on all columns (fields), on only the key fields, or on the key fields plus the original values of fields that have been modified.

Note:	To control how to locate records by specifying individual fields, use the ProviderFlags property on individual field components in a BeforeUpdateRecord event handler.


 VCL Reference

TCustomCachedDataSet events

TCustomCachedDataSet	Alphabetically	Legend

In TCustomCachedDataSet

AfterUpdateRecord

BeforeUpdateRecord

OnGetTableName

OnUpdateData

OnUpdateError

Derived from TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeExecute

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TCustomCachedDataSet events

TCustomCachedDataSet	By object	Legend

AfterApplyUpdates

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterExecute

AfterGetParams

AfterGetRecords

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterRowRequest

AfterScroll

AfterUpdateRecord

BeforeApplyUpdates

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeRowRequest

BeforeScroll

BeforeUpdateRecord

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnGetTableName

OnNewRecord

OnPostError

OnReconcileError

OnUpdateData

OnUpdateError


TCustomCachedDataSet.AfterUpdateRecord
 VCL Reference

TCustomCachedDataSet.AfterUpdateRecord

TCustomCachedDataSet	See also

Occurs immediately after an updated record has been applied to the database server.

property AfterUpdateRecord: TAfterUpdateRecordEvent;

Description

Write an AfterUpdateRecord event handler to provide special processing immediately after a record has been successfully updated. For example, use AfterUpdateRecord to maintain a log of successful updates.


TCustomCachedDataSet.BeforeUpdateRecord
 VCL Reference

TCustomCachedDataSet.BeforeUpdateRecord

TCustomCachedDataSet	See also

Occurs immediately before each record is applied to the database server.

property BeforeUpdateRecord: TBeforeUpdateRecordEvent;

Description

Write a BeforeUpdateRecord event handler to

Prepare individual record updates before they are applied to the database server. For example, you can insert additional changes into a record before it is updated or set the ProviderFlags property of the fields in the DeltaDS parameter to indicate how you want to identify the records that are to be updated or changed and which fields should be updated.

Manually apply updates that the internal provider can’t handle. For example, the provider can’t generate the appropriate SQL when the data results from a multi-table join and more than one table must be updated. Write code in the event handler to apply the update and then set the Applied parameter to True so that the internal provider does not generate an error.


TCustomCachedDataSet.OnGetTableName
 VCL Reference

TCustomCachedDataSet.OnGetTableName

TCustomCachedDataSet	See also

Occurs when the internal provider initializes its information about the table to which it applies updates.

property OnGetTableName: TGetTableNameEvent;

Description

Write an OnGetTableName event handler to enable the internal provider to apply updates to datasets when it can’t determine the target table from the source dataset. This table name is used to generate SQL statements that apply updates.

If this dataset represents a multi-table query or stored procedure, the internal provider has no way to determine the destination of the update without input from an OnGetTableName event handler.


TCustomCachedDataSet.OnUpdateData
 VCL Reference

TCustomCachedDataSet.OnUpdateData

TCustomCachedDataSet	See also

Occurs immediately before the dataset starts applying updates.

property OnUpdateData: TProviderDataEvent;

Description

Write an OnUpdateData event to handle special processing before the dataset begins applying updates. OnUpdateData occurs after the client dataset has packaged all updates in the change log and passed them to the internal provider, but before that internal provider has started applying updates.

Using the methods belonging to the DataSet parameter, an application can

Examine data (for example, for values or data changes that should not permitted), and raise exceptions that cancel applying of updates before they occur.

Change data (for example encrypting or decrypting values) before it is sent on to the database server.


TCustomCachedDataSet.OnUpdateError
 VCL Reference

TCustomCachedDataSet.OnUpdateError

TCustomCachedDataSet	See also

Occurs when the internal provider can’t update a record because of an error condition.

property OnUpdateError: TResolverErrorEvent;

Description

Write an OnUpdateError event handler to respond to error conditions that arise when the provider applies a client dataset’s updates. The OnUpdateError event handler is called for each record that can’t be updated.

Warning:	The provider can’t detect when an update conflicts with another user’s changes to a memo field. This situation will not generate an OnUpdateError event.

OnUpdateError differs from the OnReconcileError event in that OnUpdateError occurs during the updating process, while OnReconcileError occurs after all updating is complete. Thus, update errors corrected in the OnUpdateError event handler are immediately reapplied, and, if the reapplication is successful, do not count toward the maximum number of errors specified to the ApplyUpdates method. This differs from update errors corrected in an OnReconcileError event handler, which must be explicitly reapplied by another call to ApplyUpdates.


 VCL Reference

TCustomCachedDataSet methods

TCustomCachedDataSet	Alphabetically	Legend

In TCustomCachedDataSet

Create

Destroy

LoadFromFile

Derived from TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CloneCursor

CompareBookmarks

ConstraintsDisabled

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromStream

Locate

Lookup

MergeChangeLog

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomCachedDataSet methods

TCustomCachedDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TCustomCachedDataSet.Create
 VCL Reference

TCustomCachedDataSet.Create

TCustomCachedDataSet	See also

Creates and initializes an instance of TCustomCachedDataSet.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TCustomCachedDataSet descendant at runtime. Datasets added to forms or data modules at design time are created automatically.

AOwner is the component that is responsible for freeing the TCustomCachedDataSet instance. If AOwner is nil, the application must explicitly free the dataset.


TCustomCachedDataSet.Destroy
 VCL Reference

TCustomCachedDataSet.Destroy

TCustomCachedDataSet	See also

Destroys the instance of TCustomCachedDataSet.

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically. If an application creates its own instances of a dataset without assigning an Owner, however, it should call Free, which verifies that the dataset component is not nil before calling Destroy.


TCustomCachedDataSet.LoadFromFile
 VCL Reference

TCustomCachedDataSet.LoadFromFile

TCustomCachedDataSet	See also

Loads the dataset’s data from a file.

procedure LoadFromFile(const FileName: string = '');

Description

Call LoadFromFile to populate the Data property with data stored in an external file. FileName is the name of the file containing the data to load. If the FileName parameter is an empty string, or if this parameter is omitted, LoadFromFile reads from the file specified by the FileName property.

LoadFromFile is useful in briefcase-model applications, where the current snapshot of the data from the server is saved to disk for use until the application can reestablish a connection to the database server.

To load data from a file at design time, right-click on the dataset and choose Load from File.

Note:	FileName must contain data saved to a file by a previous call to this or another client dataset’s SaveToFile method.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet

TCustomCachedDataSet


TCustomizeActionBars
 VCL Reference

TCustomizeActionBars

Hierarchy	Properties	Methods	Events	See also

TCustomizeActionBars is an action which causes the ActionBands customization dialog to appear.

Unit

BandActn

Description

TCustomizeActionBars is an action which causes the ActionBands customization dialog to appear. This dialog allows users to customize the ActionBands components (such as the main menu component TActionMainMenuBar) as they see fit. This action works only with the ActionBands action manager (TActionManager); it will not work with action lists by themselves.


 VCL Reference

TCustomizeActionBars properties

TCustomizeActionBars	Alphabetically	Legend

In TCustomizeActionBars

ActionManager

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomizeActionBars properties

TCustomizeActionBars	By object	Legend

ActionComponent

ActionList

ActionManager

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TCustomizeActionBars.ActionManager
 VCL Reference

TCustomizeActionBars.ActionManager

TCustomizeActionBars	See also

Refers to the application's action manager.

property ActionManager: TCustomActionManager

Description

Use ActionManager to refer to the application's action manager object.


 VCL Reference

TCustomizeActionBars events

TCustomizeActionBars	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TCustomizeActionBars events

TCustomizeActionBars	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TCustomizeActionBars methods

TCustomizeActionBars	Alphabetically	Legend

In TCustomizeActionBars

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomizeActionBars methods

TCustomizeActionBars	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TCustomizeActionBars.Create
 VCL Reference

TCustomizeActionBars.Create

TCustomizeActionBars	See also

Creates and initializes a TCustomizeActionBars object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not usually create action objects explicitly. Actions are created automatically when you add them to an action manager or action list component at design time.


TCustomizeActionBars.ExecuteTarget
 VCL Reference

TCustomizeActionBars.ExecuteTarget

TCustomizeActionBars	See also

Creates the actual ActionBands customization dialog object.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget creates an instance of TCustomizeDlg, the ActionBands customization dialog, prepares it for use and makes it visible to the user.


TCustomizeActionBars.HandlesTarget
 VCL Reference

TCustomizeActionBars.HandlesTarget

TCustomizeActionBars	See also

Introduces an interface for verifying that the type, and state, of a target component or control are appropriate for the action.

function HandlesTarget(Target: TObject): Boolean; override;

Description

HandlesTarget was introduced in TBasicAction so that descendants can override it to check the type and state of a target. That was done in TCustomizeActionBars, but since Target is never really the target (the true target is always the ActionBands customization dialog, whose location is stored internally), HandlesTarget always returns True.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TCustomizeActionBars


TCustomDBGrid
 VCL Reference

TCustomDBGrid

Hierarchy	Properties	Methods	Events	See also

TCustomDBGrid is the base class for grid controls that display the records from a dataset in a tabular format.

Unit

DBGrids

Description

TCustomDBGrid introduces new properties, events, and methods to expand the capabilities of TCustomGrid for displaying the fields from a dataset. At runtime, users can manipulate TCustomDBGrid objects using the TDBNavigator object.

Do not create instances of TCustomDBGrid. Use TCustomDBGrid as a base class when declaring grid objects that display information from datasets. Properties and methods of TCustomDBGrid provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomDBGrid properties

TCustomDBGrid	Alphabetically	Legend

In TCustomDBGrid

Columns

DataLink

DataSource

DefaultDrawing

FieldCount

Fields

IndicatorOffset

LayoutLock

Options

ReadOnly

SelectedField

SelectedIndex

SelectedRows

TitleFont

UpdateLock

Derived from TCustomGrid

EditorMode

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomDBGrid properties

TCustomDBGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataLink

DataSource

DefaultDrawing

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditorMode

Enabled

FieldCount

Fields

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IndicatorOffset

LayoutLock

Left

LRDockWidth

Name

Options

Owner

Parent

ParentWindow

ReadOnly

SelectedField

SelectedIndex

SelectedRows

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TitleFont

Top

UndockHeight

UndockWidth

UpdateLock

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomDBGrid.Columns
 VCL Reference

TCustomDBGrid.Columns

TCustomDBGrid	See also

Describes the display attributes and field bindings of the columns.

property Columns: TDBGridColumns;

Description

Use Columns to read or set the field bindings and display attributes of the columns in the data-aware grid. Columns is an indexed collection of TColumn objects. Use the properties of the TColumn objects to specify the display attributes or field bindings of individual columns in the grid. The field binding of a column designates a field within the dataset specified by the DataSource property.

Columns can be set at design time through the Columns editor, or programmatically at runtime.


TCustomDBGrid.DataLink
 VCL Reference

TCustomDBGrid.DataLink

TCustomDBGrid	See also

Helps the data-aware grid manage its link to the data source and respond to data events.

property DataLink: TGridDataLink;

Description

Applications should not need to use the DataLink property. It is exposed as a protected property so that component writers can use descendants of TGridDataLink to respond to additional data events.

DataLink helps TCustomDBGrid to

Resolve the field bindings specified by Columns with the fields in the dataset.

Respond to changes in the values of fields.

Respond to changes in record currency.

Respond to changes in the editing state of the dataset.

Keep track of unposted edits and discard or post them as appropriate.


TCustomDBGrid.DataSource
 VCL Reference

TCustomDBGrid.DataSource

TCustomDBGrid	See also	Example

Identifies the link to the dataset where the data-aware grid finds its data.

property DataSource: TDataSource;

Description

Set DataSource to the TDataSource object that links to the dataset where the data-aware grid should fetch its data. DataSource allows the data-aware grid to read from, write to, and navigate around the dataset.


TCustomDBGrid.DefaultDrawing
 VCL Reference

TCustomDBGrid.DefaultDrawing

TCustomDBGrid	See also

Indicates whether the cells in the data-aware grid are drawn automatically.

property DefaultDrawing: Boolean;

Description

Set DefaultDrawing to True to allow the data-aware grid to draw the data in the cells of the grid automatically. Set DefaultDrawing to False to turn off the default drawing when providing customized painting in an OnDrawColumnCell event handler or an OnDrawDataCell event handler.

When DefaultDrawing is True, the data-aware grid fetches the data for each cell from the appropriate entry in the Fields array, and writes it to the cell. It then draws the focus rectangle if the cell has focus, or if the cell is selected and the Options property includes dgAlwaysShowSelection.

When DefaultDrawing is False, the data-aware grid draws the appropriate background color on the cell and sets up the brush and font described by the appropriate TColumn object. However, the value of the field is not written to the cell, and no focus rectangle is drawn.


TCustomDBGrid.FieldCount
 VCL Reference

TCustomDBGrid.FieldCount

TCustomDBGrid	See also	Example

Specifies the number of fields (columns) displayed in the grid.

property FieldCount: Integer;

Description

Use FieldCount to iterate through all the field components indexed by the Fields property. FieldCount may differ from the number of fields in the underlying dataset because the grid may contain calculated fields, and not all fields in the dataset are necessarily shown in the grid. Individual fields are removed and calculated fields are added using the Columns editor at design time.

FieldCount is the same as the number of columns at runtime. At design time, the grid may contain empty columns.


TCustomDBGrid.Fields
 VCL Reference

TCustomDBGrid.Fields

TCustomDBGrid	See also	Example

Provides indexed access to the field components that correspond to the columns.

property Fields[Index: Integer]: TField;

Description

Use Fields to gain direct access to the field component in the dataset for a particular column in the grid. The field for the first data column is obtained using an Index of 0, the field for the second data column using an Index of 1, and so on. The range for Index is 0... FieldCount - 1.

The first data column in the grid may not be the same as the first column in the grid. If Options includes dgIndicator, the first column in the grid is a non-scrolling column that contains the current row indicator.

The individual field components in Fields can be used to obtain information such as the value of the field on the current record, its preferred display width, or the string to draw when displaying or editing the field. Use the field component to write values directly to the dataset without using the editor in the cell.

Note:	If the column in the grid represents a calculated field, there is no field component for that column in the dataset. Fields returns nil when the Index specifies the column that contains a calculated field. To obtain the field component for a calculated field, use the GetColField method.


TCustomDBGrid.IndicatorOffset
 VCL Reference

TCustomDBGrid.IndicatorOffset

TCustomDBGrid	See also

Indicates the index of the first column in the grid that contains data.

property IndicatorOffset: Byte;

Description

Use IndicatorOffset to convert between the positions of the columns in the Columns property and the columns drawn on the data-aware grid. IndicatorOffset is 1 if the Options property includes dgIndicator, because the first column of the grid is used for the current row indicator. IndicatorOffset is 0 if all columns contain data.


TCustomDBGrid.LayoutLock
 VCL Reference

TCustomDBGrid.LayoutLock

TCustomDBGrid	See also

Counts the number of times BeginLayout has been called without an EndLayout or CancelLayout call.

property LayoutLock: Byte;

Description

Use LayoutLock to determine when the column bindings change. Whenever a column width or binding changes or the fields in the data source change, the BeginLayout method is called. BeginLayout increments LayoutLock to keep track of the fact that the column bindings are changing. When changes are complete, the EndLayout method is called. EndLayout decrements LayoutLock. When LayoutLock returns to 0, the data-aware grid knows that all changes are complete, and the Fields and Columns properties are updated.


TCustomDBGrid.Options
 VCL Reference

TCustomDBGrid.Options

TCustomDBGrid 	See also

Specifies various display and behavioral properties of the data-aware grid.

type

  TDBGridOption = (dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect);

TDBGridOptions = set of TDBGridOption;

property Options: TDBGridOptions;

Description

Set Options to include the desired properties for the data-aware grid. Options is a set drawn from the following values:

Value	Meaning
dgEditing	The user can edit data using the grid. dgEditing is ignored if Options includes dgRowSelect.
dgAlwaysShowEditor	The grid is always in edit mode. That is, the user does not have to press Enter or F2 before editing the contents of a cell. dgAlwaysShowEditor does nothing unless dgEditing is also included in Options. dgAlwaysShowEditor is ignored if Options includes dgRowSelect.
dgTitles	Titles appear at the top of the columns in the grid.
dgIndicator	A small pointer appears in the first column to indicate which row is current.
dgColumnResize	Columns that are bound to fields can be resized or moved.
dgColLines	Lines appear between columns in the grid.
dgRowLines	Lines appear between the rows of the grid.
dgTabs	The user can navigate through the grid using the Tab and Shift+Tab keys.
dgRowSelect	The user can select an entire row, as well as selecting individual cells. If Options includes dgRowSelect, dgEditing and dgAlwaysShowEditor are ignored.
dgAlwaysShowSelection	The selected cell displays the focus rectangle even when the grid does not have focus.
dgConfirmDelete	A message box appears, asking for confirmation, when the user types Ctrl+Delete to delete a row in the grid.
dgCancelOnExit	When the user exits the grid from an inserted record to which the user made no modifications, the inserted record is not posted to the dataset. This prevents the inadvertent posting of empty records.
dgMultiSelect	More than one row in the grid can be selected at a time.


TCustomDBGrid.ReadOnly
 VCL Reference

TCustomDBGrid.ReadOnly

TCustomDBGrid	See also

Indicates whether the grid is used for display only, or whether the user can edit data using the grid.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent users from changing the data in the dataset. Set ReadOnly to False to allow users to edit data using the grid.

When ReadOnly is True, users cannot use the Insert key to insert a new row in the grid or use the Down Arrow key to add a row to the end of the grid.


TCustomDBGrid.SelectedField
 VCL Reference

TCustomDBGrid.SelectedField

TCustomDBGrid	See also	Example

Specifies the field component for the currently selected cell in the grid.

property SelectedField: TField;

Description

Set SelectedField to move focus to a particular field in the grid. Read SelectedField to obtain access to the field component for the currently selected cell. If there is not currently selected cell, SelectedField is nil. For example, when an entire row is selected, SelectedField is nil.


TCustomDBGrid.SelectedIndex
 VCL Reference

TCustomDBGrid.SelectedIndex

TCustomDBGrid	See also	Example

Specifies the index of the currently selected column in the Columns array.

property SelectedIndex: Integer;

Description

Set SelectedIndex to move focus to a column in the grid that is identified by position. Read SelectedIndex to determine which column in the grid has focus. A value of 0 indicates the first data column, 1 is the second data column, and so on. SelectedIndex is -1 if there is no currently selected column.

If the Options property includes dgIndicator, the index of the data column given by SelectedIndex will differ from the index of the physical column in the grid.

To access the field component for the selected column, use the SelectedField property.


TCustomDBGrid.SelectedRows
 VCL Reference

TCustomDBGrid.SelectedRows

TCustomDBGrid	See also	Example

Specifies a set of bookmarks for all the records in the dataset that correspond to rows selected in the grid.

property SelectedRows: TBookmarkList;

Description

Use the properties and methods of the TBookmarkList object returned by SelectedRows to

Determine the number of rows in the grid that are selected.

Determine whether the current record in the dataset is selected.

Determine whether a particular record in the dataset is selected.

Delete all selected rows from the dataset.

SelectedRows is only meaningful when the Options property includes dgRowSelect and dgMultiSelect.


TCustomDBGrid.TitleFont
 VCL Reference

TCustomDBGrid.TitleFont

TCustomDBGrid	See also

Describes the font used to draw the column titles in the grid.

property TitleFont: TFont;

Description

Set TitleFont to change the font used to draw the column headings. TitleFont is only meaningful if the Options property includes dgTitles.


TCustomDBGrid.UpdateLock
 VCL Reference

TCustomDBGrid.UpdateLock

TCustomDBGrid	See also

Counts the number of times BeginUpdate is called without a corresponding call to EndUpdate.

property UpdateLock: Byte;

Description

UpdateLock prevents the grid from repainting while the data in the grid changes. Whenever a change is made that affects the data that is drawn in the grid, the BeginUpdate method is called. BeginUpdate increments UpdateLock to keep track of the fact that the contents of the grid are changing. When changes are complete, the EndUpdate method is called. EndUpdate decrements UpdateLock.

When UpdateLock returns to 0, the data-aware grid can repaint its cells. When UpdateLock is greater than 0, the grid defers repaints. UpdateLock prevents the grid from flickering when the grid is resized or the user scrolls through the data.


 VCL Reference

TCustomDBGrid events

TCustomDBGrid	Alphabetically	Legend

In TCustomDBGrid

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick


 VCL Reference

TCustomDBGrid events

TCustomDBGrid	By object	Legend

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick


TCustomDBGrid.OnCellClick
 VCL Reference

TCustomDBGrid.OnCellClick

TCustomDBGrid	See also

Occurs when the user releases the mouse in one of the cells of the grid.

type TDBGridClickEvent = procedure (Column: TColumn) of object;

property OnCellClick: TDBGridClickEvent;

Description

Write an OnCellClick event handler to take specific action when the user clicks in one of the cells of the data-aware grid. The Column parameter is the TColumn object that corresponds to the column where the mouse was when the user released the left mouse button.

OnCellClick occurs when the user releases the mouse. To take action when the user clicks down on the mouse, use the OnColEnter event.

OnCellClick will not occur when the mouse is released at the end of resizing a row or column, or when the cell is being edited.


TCustomDBGrid.OnColEnter
 VCL Reference

TCustomDBGrid.OnColEnter

TCustomDBGrid	See also	Example

Occurs when focus moves to a new cell in the grid.

property OnColEnter: TNotifyEvent;

Description

Write an OnColEnter event handler to take specific action when a new cell has just been selected. Focus moves to a cell when

The user navigates to the cell using the keyboard. For example, when the user uses the Tab key, or the Home key.

The user clicks the mouse button down in the cell.

The SelectedField or SelectedIndex property is set.

Read the SelectedField or SelectedIndex property to determine which cell was just entered.


TCustomDBGrid.OnColExit
 VCL Reference

TCustomDBGrid.OnColExit

TCustomDBGrid	See also	Example

Occurs just before a cell in the grid loses input focus.

property OnColExit: TNotifyEvent;

Description

Write an OnColExit event handler to take specific action when a cell is about to lose focus. For example, use OnColExit to post edits to the underlying dataset when the user leaves a cell, rather than waiting for the user to leave the record.

A cell loses focus when

The user navigates out of the cell using the keyboard. For example, when the user presses the Tab key or the Home key.

The user clicks the mouse button down in another cell.

The SelectedField or SelectedIndex property is set.

When the selected cell in the data-aware grid changes, first the OnColExit event occurs. Then the values of SelectedField and SelectedIndex are updated. Finally the OnColEnter event occurs. Thus, in an OnColExit event handler, the SelectedField or SelectedIndex property can be used to determine which column is about to lose focus.


TCustomDBGrid.OnColumnMoved
 VCL Reference

TCustomDBGrid.OnColumnMoved

TCustomDBGrid	See also

Occurs when the user moves a column using the mouse.

type TMovedEvent = procedure (Sender: TObject; FromIndex, ToIndex: Longint) of object;

property OnColumnMoved: TMovedEvent;

Description

Write an OnColumnMoved event handler to take specific action just after a column in the grid has been moved. The FromIndex parameter gives the position the column previously occupied in the Columns array. The ToIndex parameter gives the position the column now occupies.

OnColumnMoved can only occur when the Options property includes dgColumnResize.


TCustomDBGrid.OnDrawColumnCell
 VCL Reference

TCustomDBGrid.OnDrawColumnCell

TCustomDBGrid	See also

Occurs when the grid needs to paint a cell.

Type

  TDrawColumnCellEvent = procedure (Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState) of object;

property OnDrawColumnCell: TDrawColumnCellEvent;

Description

Write an OnDrawColumnCell event handler to provide customized drawing for the data in the cells of the grid. Draw on the cell using the methods of the Canvas property.

The Rect parameter indicates the location of the cell on the canvas. The DataCol parameter is the index of the column in the Columns array. The Column parameter is the TColumn object that describes the display attributes and field binding for the cell. The State parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (non-data) cell such as a column header.

An OnDrawColumnCell event handler can call the DefaultDrawColumnCell method to instruct the data-aware grid to write the data value in the cell. The OnDrawColumnCell event handler can augment the DefaultDrawColumnCell method to provide visual indications of selection and focus.

If DefaultDrawing is True, the data will already be drawn in the cell before the OnDrawColumnCell event, and the grid draws a focus rectangle around selected cells after the OnDrawColumnCell event.

Note:	If the Columns property has a State property of csDefault, the OnDrawDataCell event occurs before the OnDrawColumnCell. The OnDrawDataCell event is obsolete, and only included for backward compatibility. Do not set both an OnDrawDataCell event handler and an OnDrawColumnCell event handler.


TCustomDBGrid.OnDrawDataCell
 VCL Reference

TCustomDBGrid.OnDrawDataCell

TCustomDBGrid	See also	Example

Occurs when the grid needs to paint a cell if the State property of Columns is csDefault.

type

  TDrawDataCellEvent = procedure (Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState) of object;

property OnDrawDataCell: TDrawDataCellEvent;

Description

Do not write an OnDrawDataCell event handler. OnDrawDataCell is obsolete and included for backward compatibility. Instead, write an OnDrawColumnCell event handler.


TCustomDBGrid.OnEditButtonClick
 VCL Reference

TCustomDBGrid.OnEditButtonClick

TCustomDBGrid	See also

Occurs when the user presses the ellipsis button in a grid column.

property OnEditButtonClick: TNotifyEvent;

Description

Write an OnEditButtonClick event handler to bring up an appropriate list or dialog when the user presses the ellipsis button in a grid cell. The OnEditButtonClick event handler can set the value of the field based on the user response to the list or dialog. Use the SelectedField property to access the TField component whose value should be set.


TCustomDBGrid.OnTitleClick
 VCL Reference

TCustomDBGrid.OnTitleClick

TCustomDBGrid	See also

Occurs when the user releases the mouse in one of the column headers.

type

  TDBGridClickEvent = procedure (Column: TColumn) of object;

property OnTitleClick: TDBGridClickEvent;

Description

Write an OnTitleClick event handler to take specific action when the user clicks in one of the column headers. The Column parameter is the TColumn object that corresponds to the column where the mouse was when the user released the left mouse button.


 VCL Reference

TCustomDBGrid methods

TCustomDBGrid	Alphabetically	Legend

In TCustomDBGrid

AcquireLayoutLock

BeginColumnDrag

BeginLayout

BeginUpdate

CalcSizingState

CalcTitleRec

CancelLayout

CanEditAcceptKey

CanEditModify

CanEditShow

CellClick

CheckColumnDrag

ColEnter

ColExit

ColumnAtDepth

ColumnMoved

ColWidthsChanged

Create

CreateColumns

CreateDataLink

CreateEditor

CreateWnd

DataToRawColumn

DefaultDrawColumnCell

DefaultDrawDataCell

DefaultHandler

DeferLayout

DefineFieldMap

DefineProperties

Destroy

DrawCell

DrawColumnCell

DrawDataCell

EditButtonClick

EndColumnDrag

EndLayout

EndUpdate

ExecuteAction

GetColField

GetEditLimit

GetEditMask

GetEditStyle

GetEditText

GetFieldValue

HighlightCell

InvalidateTitles

KeyDown

KeyPress

LayoutChanged

LinkActive

Loaded

MouseDown

MouseUp

Notification

RawToDataColumn

Scroll

SetColumnAttributes

SetEditText

ShowPopupEditor

StoreColumns

TimedScroll

TitleClick

TopLeftChanged

UpdateAction

UseRightToLeftAlignmentForField

ValidFieldIndex

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDBGrid methods

TCustomDBGrid	By object	Legend

AcquireLayoutLock

AfterConstruction

Assign

BeforeDestruction

BeginColumnDrag

BeginDrag

BeginLayout

BeginUpdate

BringToFront

Broadcast

CalcSizingState

CalcTitleRec

CancelLayout

CanEditAcceptKey

CanEditModify

CanEditShow

CanFocus

CellClick

CheckColumnDrag

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColEnter

ColExit

ColumnAtDepth

ColumnMoved

ColWidthsChanged

ContainsControl

ControlAtPos

Create

CreateColumns

CreateDataLink

CreateEditor

CreateParented

CreateParentedControl

CreateWnd

DataToRawColumn

DefaultDrawColumnCell

DefaultDrawDataCell

DefaultHandler

DeferLayout

DefineFieldMap

DefineProperties

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawCell

DrawColumnCell

DrawDataCell

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EditButtonClick

EnableAlign

EndColumnDrag

EndDrag

EndLayout

EndUpdate

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetColField

GetControlsAlignment

GetEditLimit

GetEditMask

GetEditStyle

GetEditText

GetFieldValue

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

HighlightCell

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateTitles

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

LayoutChanged

LinkActive

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseDown

MouseUp

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

RawToDataColumn

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SendToBack

SetBounds

SetColumnAttributes

SetEditText

SetFocus

SetSubComponent

SetTextBuf

Show

ShowPopupEditor

StoreColumns

TimedScroll

TitleClick

TopLeftChanged

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftAlignmentForField

UseRightToLeftReading

UseRightToLeftScrollBar

ValidFieldIndex


TCustomDBGrid.AcquireLayoutLock
 VCL Reference

TCustomDBGrid.AcquireLayoutLock

TCustomDBGrid	See also

Calls BeginLayout if the table is not currently being reformatted.

function  AcquireLayoutLock: Boolean;

Description

Applications cannot call this protected method. AcquireLayoutLock is called before recomputing Columns when the fields in the dataset change or when the Columns property changes. AcquireLayoutLock returns True if the table is not already being laid out, to indicate that the computation of Columns should proceed. AcquireLayoutLock prevents the computation of Columns from looping endlessly because of the changes that must occur during the computation.


TCustomDBGrid.BeginColumnDrag
 VCL Reference

TCustomDBGrid.BeginColumnDrag

TCustomDBGrid	See also

Starts the dragging of a column in the grid.

function BeginColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint: Boolean; dynamic;

Description

BeginColumnDrag is called automatically when the user clicks a column to initiate a drag operation.

Origin is the column number of the column to move. When BeginColumnDrag is called, this is the column under the mouse. BeginColumnDrag may adjust this value to take into account non-scrolling columns.

Destination is the current destination of the column. On both entry and exit, this is the same as Origin, because the column has not yet moved.

MousePt is the coordinates of the mouse at the point when the button was clicked.

BeginColumnDrag returns True if the grid permits the column to be moved, False if the column move should be aborted.


TCustomDBGrid.BeginLayout
 VCL Reference

TCustomDBGrid.BeginLayout

TCustomDBGrid	See also

Increments the LayoutLock property when the column bindings or fields in the dataset change.

procedure BeginLayout;

Description

Applications cannot call this protected method. Data-aware grids call BeginLayout internally before making changes to the Columns property or any of the individual TColumn objects in Columns. Once the change is complete, the data-aware grid calls EndLayout. If the response to the change must be canceled or postponed, the grid calls CancelLayout.

Each call to BeginLayout increments the LayoutLock property. Each call to EndLayout or CancelLayout decrements the LayoutLock property. If LayoutLock returns to 0 in a call to EndLayout, the Fields property is updated to match both the bindings of the Columns property and the fields available in the dataset. The Columns property is then updated in turn to match the Fields property. This ensures that the Columns property matches both the specified column bindings and the fields available in the dataset.


TCustomDBGrid.BeginUpdate
 VCL Reference

TCustomDBGrid.BeginUpdate

TCustomDBGrid	See also

Increments the UpdateLock property when the data in the grid changes.

procedure BeginUpdate;

Description

Applications cannot call this protected method. Data-aware grids call BeginUpdate internally before making changes that affect the data that is drawn in the grid. Once the change is complete, the data-aware grid calls EndUpdate, which decrements the UpdateLock property.

While UpdateLock is greater than 0, the grid does not repaint its cells. BeginUpdate and EndUpdate prevent the grid from flickering when the grid is resized or the user scrolls through the data.


TCustomDBGrid.CalcSizingState
 VCL Reference

TCustomDBGrid.CalcSizingState

TCustomDBGrid	See also

Determines the appearance of the mouse cursor during resizing.

procedure CalcSizingState(X, Y: Integer; var State: TGridState; var Index: Longint; var SizingPos, SizingOfs: Integer; var FixedInfo: TGridDrawInfo); override;

Description

Use CalcSizingState to determine if the mouse cursor should be changed to a resize or drag cursor based on where the mouse is in the grid. For example, cursor over a grid line, in the fixed cell region, and column resize is enabled = resize cursor.


TCustomDBGrid.CalcTitleRec
 VCL Reference

TCustomDBGrid.CalcTitleRec

TCustomDBGrid	See also

Calculates the rectangular region that covers the cell indicated by the column and row parameters.

function CalcTitleRec(Col: TColumn; ARow: Integer; var MasterCol: TColumn): TRect;

Description

In ADT datasets with ObjectView set to True, the rectangle covering a cell may be larger than the cell itself, covering several cells.  The MasterCol parameter returns the DBGrid column object that determines the drawing behaviors of the calculated rectangle.  For example, if the column parameter is an ADT child field, MasterCol will point to the column containing the ADT child field's parent field, or grandparent, depending on the Row param.  Row 0 would return the outermost parent of the ADT child, and would return a rectangle that spans all of the ADT children of that parent.  If the current column is not an ADT child, MasterCol returns nil.


TCustomDBGrid.CancelLayout
 VCL Reference

TCustomDBGrid.CancelLayout

TCustomDBGrid	See also

Decrements the LayoutLock property.

procedure CancelLayout;

Description

Applications cannot call this protected method. Data-aware grids call CancelLayout internally when postponing the recomputation of Columns.

Each call to BeginLayout increments the LayoutLock property. Each call to EndLayout or CancelLayout decrements the LayoutLock property. If LayoutLock returns to 0 in a call to CancelLayout, the Columns property is not updated. CancelLayout is called from the DeferLayout method to decrement the LayoutLock and prevent the recomputation of Columns until a more appropriate time.


TCustomDBGrid.CanEditAcceptKey
 VCL Reference

TCustomDBGrid.CanEditAcceptKey

TCustomDBGrid	See also

Indicates whether the Key parameter can be entered into the current cell.

function  CanEditAcceptKey(Key: Char): Boolean; override;

Description

Data-aware grids use CanEditAcceptKey internally to determine whether keys typed by the user are valid for the field represented by the current cell. CanEditAcceptKey calls the IsValidChar method of the field component associated with the column that has input focus.

CanEditAcceptKey provides a crude validation of keyboard input. More refined validation is provided when the value in the cell is written to the record in the dataset, or by an edit mask.


TCustomDBGrid.CanEditModify
 VCL Reference

TCustomDBGrid.CanEditModify

TCustomDBGrid	See also

Indicates whether the current column of the grid can be edited.

function  CanEditModify: Boolean; override;

Description

Data-aware grids use CanEditModify internally to determine whether to allow the user to edit the current cell. CanEditModify returns True if the field in the current column can be edited. CanEditModify returns False if the field cannot be edited. If the dataset is not in edit mode, CanEditModify will attempt to put it in edit mode.

Note:	CanEditModify returns False when the current field is a binary large object (BLOB) field. BLOB fields can only be edited through the clipboard or by streaming.


TCustomDBGrid.CanEditShow
 VCL Reference

TCustomDBGrid.CanEditShow

TCustomDBGrid	See also

Indicates whether the inplace edit control can be created to allow editing.

function CanEditShow: Boolean; override;

Description

TCustomDBGrid overrides the inherited method to prevent the inplace edit control from coming up while the layout of the grid is being recomputed.

Grid controls call CanEditShow internally before creating the editor for a cell. CanEditShow is called after the grid has determined that the field can be edited by calling CanEditModify.


TCustomDBGrid.CellClick
 VCL Reference

TCustomDBGrid.CellClick

TCustomDBGrid	See also

Generates an OnCellClick event.

procedure CellClick(Column: TColumn); dynamic;

Description

Applications cannot directly call CellClick. It is exposed as a protected method so that descendants can call the OnCellClick event handler in response to other events or override the response when the user releases the mouse in a cell of the grid.


TCustomDBGrid.CheckColumnDrag
 VCL Reference

TCustomDBGrid.CheckColumnDrag

TCustomDBGrid	See also

Validates whether the column currently selected for dragging can be dropped at the current location.

function CheckColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Use CheckColumnDrag to validate that the column currently selected for dragging can be dropped at the current location.  CheckColumnDrag can change the Origin (the column being dragged) and/or the Destination (the drop target), as needed, to keep the grid's columns in order.


TCustomDBGrid.ColEnter
 VCL Reference

TCustomDBGrid.ColEnter

TCustomDBGrid	See also

Generates an OnColEnter event.

procedure ColEnter; dynamic;

Description

Applications cannot directly call ColEnter. It is exposed as a protected method so that descendants can call the OnCellEnter event handler in response to other events or override the response when a cell in the grid is selected.


TCustomDBGrid.ColExit
 VCL Reference

TCustomDBGrid.ColExit

TCustomDBGrid	See also

Generates an OnColExit event.

procedure ColExit; dynamic;

Description

Applications cannot directly call ColExit. It is exposed as a protected method so that descendants can call the OnColExit event handler in response to other events or override the response when a cell in the grid loses focus.


TCustomDBGrid.ColumnAtDepth
 VCL Reference

TCustomDBGrid.ColumnAtDepth

TCustomDBGrid	See also

Returns the column object associated with nth parent field of the given column.

function ColumnAtDepth(Col: TColumn; ADepth: Integer): TColumn;

Description

ColumnAtDepth is used to calculate MasterCol used in the CalcTitleRec method.


TCustomDBGrid.ColumnMoved
 VCL Reference

TCustomDBGrid.ColumnMoved

TCustomDBGrid	See also

Generates an OnColumnMoved event.

procedure ColumnMoved(FromIndex, ToIndex: Longint); override;

Description

Applications cannot directly call ColumnMoved. It is exposed as a protected method so that descendants can call the OnColumnMoved event handler in response to other events or override the response after a column in the grid is moved.


TCustomDBGrid.ColWidthsChanged
 VCL Reference

TCustomDBGrid.ColWidthsChanged

TCustomDBGrid	See also

Updates the column widths in the Columns property when the user resizes the columns.

procedure ColWidthsChanged; override;

Description

Applications cannot directly call ColWidthsChanged. It is called automatically when the user resizes the columns in the grid. ColWidthsChanged overrides the inherited method to update the column widths in the Columns property.


TCustomDBGrid.Create
 VCL Reference

TCustomDBGrid.Create

TCustomDBGrid	See also

Creates and initializes an instance of TCustomDBGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a data-aware grid at runtime. Grids placed on a form at design time are created automatically.

Pass a single Component as a parameter to provide the grid with an Owner that is responsible for freeing the grid.


TCustomDBGrid.CreateColumns
 VCL Reference

TCustomDBGrid.CreateColumns

TCustomDBGrid	See also

Creates the TDBGridColumns object that stores the column descriptors for the grid.

function  CreateColumns: TDBGridColumns; dynamic;

Description

Applications cannot call CreateColumns. It is exposed as a protected method so that component writers can substitute a descendant of TDBGridColumns to manage the column descriptors of a data-aware grid.


TCustomDBGrid.CreateDataLink
 VCL Reference

TCustomDBGrid.CreateDataLink

TCustomDBGrid	See also

Creates the data link that the grid uses to manage the connection to its data source.

function  CreateDataLink: TGridDataLink; dynamic;

Description

TCustomDBGrid calls CreateDataLink from its constructor to create the data link that manages the connection to a data source. Descendant classes can override this method to create a different TGridDataLink descendant.


TCustomDBGrid.CreateEditor
 VCL Reference

TCustomDBGrid.CreateEditor

TCustomDBGrid	See also

Creates the inplace editor that allows the cells of the grid to be edited.

function CreateEditor: TInplaceEdit; override;

Description

CreateEditor overrides the inherited method to create a data-aware descendant of TInplaceEdit.


TCustomDBGrid.CreateWnd
 VCL Reference

TCustomDBGrid.CreateWnd

TCustomDBGrid	See also

Creates the window used to display the data-aware grid.

procedure CreateWnd; override;

Description

The Windows control for the grid can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. TCustomDBGrid calls CreateWnd to create this Windows control when necessary.

CreateWnd overrides the inherited method to set up the relationship between the visual display and the data source after the window is created.


TCustomDBGrid.DataToRawColumn
 VCL Reference

TCustomDBGrid.DataToRawColumn

TCustomDBGrid	See also

Converts a column index in the Columns property to the index of the corresponding column in the visual display.

function DataToRawColumn(ACol: Integer): Integer;

Description

Applications cannot call this protected method. It is used internally to allow the data-aware grid to adjust to the presence or absence of the column that contains the row indicator.


TCustomDBGrid.DefaultDrawColumnCell
 VCL Reference

TCustomDBGrid.DefaultDrawColumnCell

TCustomDBGrid	See also

Draws the text in a column cell.

procedure DefaultDrawColumnCell(const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);

Description

Call DefaultDrawColumnCell from an OnDrawColumnCell event handler to lookup up the text representation of a field and write it to the cell. DefaultDrawColumnCell does exactly what the grid does when the DefaultDrawing property is True, except it never draws a focus rectangle on selected cells.

The Rect parameter is the position of the cell on the canvas. The DataCol parameter is the index of the column in the Columns array. The Column parameter is the TColumn object that describes the display attributes and field binding for the cell. The State parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (non-data) cell such as a column header.


TCustomDBGrid.DefaultDrawDataCell
 VCL Reference

TCustomDBGrid.DefaultDrawDataCell

TCustomDBGrid	See also	Example

Draws the text in a column cell.

procedure DefaultDrawDataCell(const Rect: TRect; Field: TField; State: TGridDrawState);

Description

Call DefaultDrawDataCell from an OnDrawDataCell event handler to lookup up the text representation of a field and write it to the cell. Unlike what the grid draws when the DefaultDrawing property is True, DefaultDrawDataCell gets the alignment for the text from the field component rather than the column descriptor, and it never draws a focus rectangle on selected cells.

The Rect parameter gives the position of the cell on the canvas. The Field parameter gives the field component that provides the data and alignment for the cell. The State parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (non-data) cell such as a column header.


TCustomDBGrid.DefaultHandler
 VCL Reference

TCustomDBGrid.DefaultHandler

TCustomDBGrid	See also

Displays the popup menu when a column is right-clicked.

procedure DefaultHandler(var Msg); override;

Description

DefaultHandler is the last method to receive Windows messages that are sent to the grid. After calling the inherited method and allowing it to process the message, DefaultHandler checks if the Msg parameter indicates the right mouse button was released over a column with a popup menu. If the column has a popup menu with its AutoPopup property set toTrue, DefaultHandler displays the popup menu.

When overriding DefaultHandler, be sure to call the inherited method for all unhandled messages.


TCustomDBGrid.DeferLayout
 VCL Reference

TCustomDBGrid.DeferLayout

TCustomDBGrid	See also

Decrements the LayoutLock property and posts a message to the grid to trigger a new layout sequence at a more appropriate time.

procedure DeferLayout;

Description

Applications cannot call this protected method. Data-aware grids call DeferLayout internally to postpone the recomputation of the Columns property after the dataset changes when it is inappropriate to recompute columns immediately.

DeferLayout calls CancelLayout to decrement the LayoutLock property, which was incremented in response to the change in the dataset. It then posts a message to the grid, which triggers another layout attempt at a later point in time. When the message is received, the grid calls BeginLayout and then either EndLayout or DeferLayout, depending on whether it is an appropriate time to proceed with the computation of Columns.


TCustomDBGrid.DefineFieldMap
 VCL Reference

TCustomDBGrid.DefineFieldMap

TCustomDBGrid	See also

Builds the Fields array from the Columns property and the data source.

procedure DefineFieldMap; virtual;

Description

Applications cannot call this protected method. DefineFieldMap rebuilds the Fields array to reflect the fields from the data source that correspond to the columns in the Columns property. After calling DefineFieldMap, the Columns property should be updated to use the field components in the Fields array. This ensures that the Columns property reflects any changes imposed by the dataset.


TCustomDBGrid.DefineProperties
 VCL Reference

TCustomDBGrid.DefineProperties

TCustomDBGrid	See also

Defines a savable version of the Columns property when necessary.

procedure DefineProperties(Filer: TFiler); override;

Description

DefineProperties overrides the inherited method to load and save the Columns property if the columns have been customized.


TCustomDBGrid.Destroy
 VCL Reference

TCustomDBGrid.Destroy

TCustomDBGrid	See also

Destroys an instance of TCustomDBGrid.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the data-aware grid is not nil, and only then calls Destroy. Destroy frees all the helper objects used by the grid.


TCustomDBGrid.DrawCell
 VCL Reference

TCustomDBGrid.DrawCell

TCustomDBGrid	See also

Draws the cell specified by the ACol and ARow parameters.

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

Description

DrawCell overrides the inherited method to use the Columns property when drawing cells in the grid.

DrawCell sets up the font and brush and paints the background of the cell. If the DefaultDrawing property is True, DrawCell fetches the data for the cell and writes it to the position described by the ARect parameter. Whether DefaultDrawing is True or False, DrawCell generates the OnDrawDataCell and OnDrawColumnCell events. Finally, if DefaultDrawing is True and either the cell has focus or the cell is selected and Options includes dgAlwaysShowSelection, DrawCell draws a focus rectangle around the cell.


TCustomDBGrid.DrawColumnCell
 VCL Reference

TCustomDBGrid.DrawColumnCell

TCustomDBGrid	See also

Generates an OnDrawColumnCell event.

procedure DrawColumnCell(const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); dynamic;

Description

Applications cannot call DrawColumnCell directly. It is exposed as a protected method so that descendants can call the OnDrawColumnCell event handler or override the method to block the event.


TCustomDBGrid.DrawDataCell
 VCL Reference

TCustomDBGrid.DrawDataCell

TCustomDBGrid	See also

Generates an OnDrawDataCell event.

procedure DrawDataCell(const Rect: TRect; Field: TField; State: TGridDrawState); dynamic;

Description

Applications cannot call DrawDataCell directly. It is exposed as a protected method so that descendants can call the OnDrawDataCell event handler or override the method to block the event.


TCustomDBGrid.EditButtonClick
 VCL Reference

TCustomDBGrid.EditButtonClick

TCustomDBGrid	See also

Generates an OnEditButtonClick event.

procedure EditButtonClick; dynamic;

Description

Applications cannot call EditButtonClick directly. It is exposed as a protected method so that descendants can call the OnEditButtonClick event handler or override the method to block the event.


TCustomDBGrid.EndColumnDrag
 VCL Reference

TCustomDBGrid.EndColumnDrag

TCustomDBGrid	See also

Ends the dragging of a column in the grid.

function EndColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Call EndColumnDrag to end a drag operation. EndColumnDrag enables the grid to control where the column can be dropped. It is exposed as a protected method so that descendants of TCustomDBGrid can customize column dragging in a grid.


TCustomDBGrid.EndLayout
 VCL Reference

TCustomDBGrid.EndLayout

TCustomDBGrid	See also

Decrements the LayoutLock property and recomputes the Columns property if LayoutLock reaches 0.

procedure EndLayout;

Description

Applications cannot call this protected method. Data-aware grids call EndLayout internally after changes to the Columns property or the dataset. EndLayout decrements the LayoutLock property which was previously incremented by BeginLayout before the Columns property was changed or when notification of the change to the dataset was received.

If LayoutLock returns to 0, EndLayout updates the Fields property to match both the bindings of the Columns property and the fields available in the dataset. The Columns property is then updated in turn to match the Fields property. This ensures that the Columns property matches both the specified column bindings and the fields available in the dataset.


TCustomDBGrid.EndUpdate
 VCL Reference

TCustomDBGrid.EndUpdate

TCustomDBGrid	See also

Decrements the UpdateLock property.

procedure EndUpdate;

Description

Applications cannot call this protected method. Data-aware grids call EndUpdate internally after making changes that affect the data that is drawn in the grid. EndUpdate returns the UpdateLock to the state it was in before the BeginUpdate method was called at the start of the changes.

While UpdateLock is greater than 0, the grid does not repaint its cells. When UpdateLock returns to 0, painting is reenabled. BeginUpdate and EndUpdate prevent the grid from flickering when the grid is resized or the user scrolls through the data.


TCustomDBGrid.ExecuteAction
 VCL Reference

TCustomDBGrid.ExecuteAction

TCustomDBGrid	See also

Executes an action with the DB grid as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the DB grid as its target. The Action parameter specifies the action that was invoked. ExecuteAction returns a boolean value indicating whether the action was successfully executed.

ExecuteAction first calls the inherited method, which checks whether the action knows how to execute with the grid as a target. If this does not successfully dispatch the action, ExecuteAction attempts to invoke the action with the grid’s associated dataset as a target.


TCustomDBGrid.GetColField
 VCL Reference

TCustomDBGrid.GetColField

TCustomDBGrid	See also

Returns the field component that represents the binding of a specified column.

function GetColField(DataCol: Integer): TField;

Description

Call GetColField to obtain the field component for a column in the data-aware grid. The DataCol parameter is the index of the column in the Columns property, where 0 is the first column, 1 is the second column, and so on.

Unlike the Fields property, GetColField will return field components for columns that do not represent fields in the dataset, such as calculated fields. GetColField will return nil if no field is associated with the column or if the dataset is not active.


TCustomDBGrid.GetEditLimit
 VCL Reference

TCustomDBGrid.GetEditLimit

TCustomDBGrid	See also

Limits the number of characters that can be typed into cells representing string fields.

function  GetEditLimit: Integer; override;

Description

GetEditLimit is called by the inplace editor to determine what limit, if any, should be placed on the number of characters a user can type into a cell. GetEditLimit sets no limits except when the selected cell represents a string field.


TCustomDBGrid.GetEditMask
 VCL Reference

TCustomDBGrid.GetEditMask

TCustomDBGrid	See also

Returns the input mask associated with the field for the selected cell.

function GetEditMask(ACol, ARow: Longint): string; override;

Description

The inplace editor calls GetEditMask to obtain any input mask associated with the field binding of the indicated cell. GetEditMask returns the EditMask property of the field component from the Columns array.

The ACol and ARow parameters indicate the index of the row and column of the cell in the grid. The ACol parameter is not the same as the index of the column in the Columns array if the Options property includes dgIndicator.


TCustomDBGrid.GetEditStyle
 VCL Reference

TCustomDBGrid.GetEditStyle

TCustomDBGrid	See also

Indicates whether a specified cell has an ellipsis button or drop-down arrow.

function GetEditStyle(ACol, ARow: Longint): TEditStyle; override;

Description

GetEditStyle indicates whether the specified cell can only be edited directly (esSimple), whether it has an ellipsis button that users can click to launch an editor for modifying field values (esEllipsis ), or whether it has a drop-down arrow that users can click to display a pick list of possible values (esPickList).

ACol is the column that contains the cell. ARow is the row that contains the cell.

In TCustomDBGrid, GetEditStyle checks the properties of the column object that corresponds to ACol.

If the column has a ButtonStyle of cbsEllipsis or if it has a ButtonStyle of cbsAuto and it represents a dataset or reference field, then GetEditStyle returns esEllipsis.

If the column has a ButtonStyle of cbsAuto, is not read-only, and either has a pick list or represents a lookup field, then GetEditStyle returns esPickList.

If the column has a ButtonStyle of cbsNone or neither of the two previous conditions are met, then GetEditStyle returns esSimple.


TCustomDBGrid.GetEditText
 VCL Reference

TCustomDBGrid.GetEditText

TCustomDBGrid	See also

Returns the value of the indicated cell formatted for editing.

function GetEditText(ACol, ARow: Longint): String; override;

Description

The inplace editor calls GetEditText to obtain the text for the indicated cell. GetEditText locates the field component for the cell from the Columns array and returns its value formatted for editing.

The ACol and ARow parameters indicate the index of the row and column of the cell in the grid. The ACol parameter is the “raw” column index, which is not the same as the index of the column in the Columns array if the Options property includes dgIndicator.

Note:	The string returned by GetEditText may differ from the string returned by the GetFieldValue method if the field formats its value differently for editing and display.


TCustomDBGrid.GetFieldValue
 VCL Reference

TCustomDBGrid.GetFieldValue

TCustomDBGrid	See also

Returns the value of the indicated cell formatted for display.

function GetFieldValue(ACol: Integer): string;

Description

The DefaultDrawColumnCell method calls GetFieldValue to obtain the text that should be displayed in a cell. Applications do not call this protected method.

The ACol parameter is the index of the column in the columns array. If the Options property includes dgIndicator, this is not the same as the index of the column in the physical display.


TCustomDBGrid.HighlightCell
 VCL Reference

TCustomDBGrid.HighlightCell

TCustomDBGrid	See also

Indicates whether a specified cell should be highlighted when it is drawn.

function  HighlightCell(DataCol, DataRow: Integer; const Value: String; AState: TGridDrawState): Boolean; virtual;

Description

Applications cannot call this protected method. It is called internally by the DrawCell method to determine whether the cell specified by the DataCol and DataRow parameters should be highlighted. HighlightCell returns True if the cell has focus, the cell is selected and Options includes dgAlwaysShowSelection, or the cell is in a selected row and Options includes dgRowSelect.


TCustomDBGrid.InvalidateTitles
 VCL Reference

TCustomDBGrid.InvalidateTitles

TCustomDBGrid

Invalidates the column titles so that they will be repainted.

procedure InvalidateTitles;

Description

Call InvalidateTitles to cause the column titles to be repainted.


TCustomDBGrid.KeyDown
 VCL Reference

TCustomDBGrid.KeyDown

TCustomDBGrid	See also

Provides special processing when the user presses down on a key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

Applications cannot call KeyDown. It is called automatically when the user presses a key, before the KeyPress method is called.

KeyDown generates an OnKeyDown event and then responds to the following keystrokes:

Keystroke	Response

UpArrow	Move to the previous row. If Options includes dgRowSelect, select it.

Ctrl+UpArrow	Move to the first row in the grid. Deselect any selected rows.

DownArrow	Move to the next row. If Options includes dgRowSelect, select it.

Ctrl+DownArrow	Move to the last row in the grid. Deselect any selected rows.

PageUp	Move up by the number of records shown in the grid. Deselect any selected rows.

Ctrl+PageUp	Move to the first row in the grid. Deselect any selected rows.

PageDown	Move down by the number of records shown in the grid. Deselect any selected rows.

LeftArrow	Move left one column. If Options includes dgRowSelect, move to the previous row without selecting it.

Ctrl+LeftArrow	Move to the first column in the current row.

RightArrow	Move right one column. If Options includes dgRowSelect, move to the next row without selecting it.

Ctrl+RightArrow	Move to the last column in the current row.

Home	Move to the first column of the current row. If Options includes dgRowSelect or the grid has only one column, move to the first record in the dataset. Deselect any selected rows.

Ctrl+Home	Move to the first record in the dataset. Deselect any selected rows.

End	Move to the last column of the current row. If Options includes dgRowSelect or the grid has only one column, move to the last record in the dataset. Deselect any selected rows.

Ctrl+End	Move to the last record in the dataset. Deselect any selected rows.

Tab	Move to the next cell in the grid.

Shift+Tab	Move to the previous cell in the grid.

Ctrl+Delete	Delete the current selection.

Insert	Insert a new row above the current one, and move to it. Deselect any selected rows.

Escape	Cancel any unposted edits. Deselect any selected rows.

F2	Put the grid in edit mode.


TCustomDBGrid.KeyPress
 VCL Reference

TCustomDBGrid.KeyPress

TCustomDBGrid	See also

Responds when the user presses a key.

procedure KeyPress(var Key: Char); override;

Description

When the user presses a key, first the KeyDown method is called, then the KeyPress method, and finally the KeyUp method when the user releases the key. KeyPress overrides the inherited method to write edits to the dataset when the user presses Return.


TCustomDBGrid.LayoutChanged
 VCL Reference

TCustomDBGrid.LayoutChanged

TCustomDBGrid	See also

Recomputes the Columns property.

procedure LayoutChanged; virtual;

Description

Applications cannot call this protected method. It is called automatically in response to changes the affect the layout of the columns. These include

Changes to the fields in the dataset.

Changes in the Options property that affect the layout.

Changes to the TitleFont property.

LayoutChanged calls AcquireLayoutLock to initiate the changes to Columns. If AcquireLayoutLock does not indicate that the call to LayoutChanged is recursive, LayoutChanged calls EndLayout to perform the actual computation.


TCustomDBGrid.LinkActive
 VCL Reference

TCustomDBGrid.LinkActive

TCustomDBGrid	See also

Recomputes the Columns property and the vertical scrollbar of the grid.

procedure LinkActive(Value: Boolean); virtual;

Description

Applications cannot call this protected method. It is called automatically when the dataset is opened. LinkActive calls LayoutChanged to recompute the Columns property, and adjusts the vertical scrollbar for the data in the dataset.


TCustomDBGrid.Loaded
 VCL Reference

TCustomDBGrid.Loaded

TCustomDBGrid	See also

Sets up the Columns property once the data grid and all its child components are loaded.

procedure Loaded; override;

Description

Applications cannot call this protected method. Loaded overrides the inherited method to lay out the grid once all of its parts have been loaded.


TCustomDBGrid.MouseDown
 VCL Reference

TCustomDBGrid.MouseDown

TCustomDBGrid	See also

Provides special processing when the user clicks on the mouse.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseDown is called automatically when the user presses the mouse button. If the mouse is pressed in the row or column resize region of the grid, MouseDown posts any pending edits and calls the inherited method to handle the resize. When Options includes dgRowSelect, MouseDown selects the row that received the click, or toggles its selection state if the Ctrl key is pressed. If the mouse is clicked in a data cell, MouseDown tries to put the grid into edit mode.


TCustomDBGrid.MouseUp
 VCL Reference

TCustomDBGrid.MouseUp

TCustomDBGrid	See also

Provides special processing when the user releases the mouse button.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseUp is called automatically when the user releases the mouse button. After calling the inherited method, MouseUp locates the cell that was under the mouse when it was released. MouseUp generates an OnTitleClick or OnCellClick event, depending on the location of the mouse.


TCustomDBGrid.Notification
 VCL Reference

TCustomDBGrid.Notification

TCustomDBGrid	See also

Responds to notifications that components are about to be destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification

Checks if the pop-up menu for any of its columns is going away, and if so, resets the PopupMenu property of the column object.

Checks if the data source is going away, and if so, sets the DataSource property to nil.

Checks if any of the field components associated with its columns is going away, and if so, removes the column from the layout.


TCustomDBGrid.RawToDataColumn
 VCL Reference

TCustomDBGrid.RawToDataColumn

TCustomDBGrid	See also

Converts the index of a column in the visual display to the corresponding index in the Columns property.

function RawToDataColumn(ACol: Integer): Integer;

Description

Applications cannot call this protected method. It is used internally to allow the data-aware grid to adjust to the presence or absence of the column that contains the row indicator.


TCustomDBGrid.Scroll
 VCL Reference

TCustomDBGrid.Scroll

TCustomDBGrid	See also

Updates the image of the grid to reflect a new record position.

procedure Scroll(Distance: Integer); virtual;

Description

Scroll is called in response to changes in the current record in the dataset. Scroll updates the image in the grid, scrolling the data if necessary.


TCustomDBGrid.SetColumnAttributes
 VCL Reference

TCustomDBGrid.SetColumnAttributes

TCustomDBGrid	See also

Sets the column widths and disables tabbing to cells that can’t be edited.

procedure SetColumnAttributes; virtual;

Description

Applications cannot call this protected method. It is called automatically when the Columns property is recomputed, to adjust the column widths and ensure that the user can only tab to fields that can be edited.


TCustomDBGrid.SetEditText
 VCL Reference

TCustomDBGrid.SetEditText

TCustomDBGrid	See also

Updates the edited version of the current cell’s data.

procedure SetEditText(ACol, ARow: Longint; const Value: String); override;

Description

SetEditText is called by the inplace editor so that the grid can store the new value for the current cell. The grid stores this value until the user moves to a new cell or presses Escape. If the user moves to a new cell, this value is written to the record in the database. If the user presses Escape, the value is discarded.


TCustomDBGrid.ShowPopupEditor
 VCL Reference

TCustomDBGrid.ShowPopupEditor

TCustomDBGrid	See also

Displays the nested dataset associated with Column in a new window.

procedure ShowPopupEditor(Column: TColumn; X: Integer = Low(Integer); Y: Integer = Low(Integer)); dynamic;

Description

Call ShowPopupEditor to display a nested dataset or ADT in a new grid in a new window.  Column is the column that is representing the dataset or reference field of the dataset.

For example, if the seventh column in the grid represents a dataset field, the following code displays the dataset associated with that field for the current record.

DBGrid1.ShowPopupEditor(DBGrid1.Columns[7]);

ShowPopupEditor expects the TColumn object field type passed to be ftDataSet.

When the ellipsis button in the grid cell of a nested dataset or reference field is clicked, EditButtonClick is called. If the grid’s OnEditButtonClick event has an event handler, that event is fired and ShowPopupEditor is not called. If the event handler is not assigned, ShowPopupEditor is called.

The X and Y parameters are screen coordinates to position the popup editor form. Defaults to positioning the form below the cell in the grid.


TCustomDBGrid.StoreColumns
 VCL Reference

TCustomDBGrid.StoreColumns

TCustomDBGrid	See also

Indicates whether the columns of the grid are stored when the grid is saved, or whether they are generated dynamically.

function StoreColumns: Boolean;

Description

StoreColumns causes the Columns property to be stored only when the Columns property has a State property of csCustomized. The State property for Columns indicates whether the columns are generated automatically from the fields in the dataset, or if they are specified programmatically or by the Columns editor.


TCustomDBGrid.TimedScroll
 VCL Reference

TCustomDBGrid.TimedScroll

TCustomDBGrid	See also

Moves the current record in response to the user dragging the mouse outside of the data cells.

type TGridScrollDirection = set of (sdLeft, sdRight, sdUp, sdDown);

procedure TimedScroll(Direction: TGridScrollDirection); override;

Description

If the Direction parameter includes sdUp, TimedScroll moves the dataset to the first visible record in the grid. If the Direction parameter includes sdDown, TimedScroll moves the dataset to the last visible record in the grid. After adjusting the current record, TimedScroll calls the inherited method to update the image.


TCustomDBGrid.TitleClick
 VCL Reference

TCustomDBGrid.TitleClick

TCustomDBGrid	See also

Generates an OnTitleClick event.

procedure TitleClick(Column: TColumn); dynamic;

Description

Applications cannot call TitleClick directly. It is exposed as a protected method so that descendants can call the OnTitleClick event handler or override the method to block the event.


TCustomDBGrid.TopLeftChanged
 VCL Reference

TCustomDBGrid.TopLeftChanged

TCustomDBGrid	See also

Updates the position of the inplace editor when the grid scrolls.

procedure TopLeftChanged; override;

Description

TopLeftChanged is called whenever the LeftCol or TopRow property changes.  InvalidateTitles and the inherited method TopLeftChanged method are called.


TCustomDBGrid.UpdateAction
 VCL Reference

TCustomDBGrid.UpdateAction

TCustomDBGrid	See also

Updates an action to reflect the current state of the grid.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle allow the grid to set action properties to reflect the current state of the grid. The Action parameter is the action to be updated. UpdateAction returns a boolean that indicates whether the action was updated by the grid.

As implemented in TCustomDBGrid, UpdateAction checks whether the action relies on the state of the associated dataset, and if so, updates the action accordingly.


TCustomDBGrid.UseRightToLeftAlignmentForField
 VCL Reference

TCustomDBGrid.UseRightToLeftAlignmentForField

TCustomDBGrid	See also

Indicates whether the alignment of a specified field should be changed from left-aligned to right-aligned.

function UseRightToLeftAlignmentForField(const AField: TField; Alignment: TAlignment): Boolean;

Description

UseRightToLeftAlignmentForField is called internally when drawing field values to determine whether the Alignment of AField should be changed from left-aligned to right-aligned. This method lets the data-aware grid honor the current setting of the BiDiMode property. UseRightToLeftAlignment returns True if the application is running in a mideast locale (where alignment should be reversed), the field contains text (as opposed to numeric or date/time values), and the specified alignment is not taCenter.


TCustomDBGrid.ValidFieldIndex
 VCL Reference

TCustomDBGrid.ValidFieldIndex

TCustomDBGrid	See also

Indicates whether an index into the columns array refers to a valid field in the dataset.

function ValidFieldIndex(FieldIndex: Integer): Boolean;

Description

Call ValidFieldIndex to determine whether a column displays data from a field in the dataset. ValidFieldIndex returns True if the column is associated with a database field. ValidFieldIndex returns False if the column is a calculated field or if the field for the column is undefined.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDBGrid


TCustomProvider
 VCL Reference

TCustomProvider

Hierarchy	Properties 	Methods 	Events	Using TBaseProvider	See also

TCustomProvider is the base class for data providers.

Unit

Provider

Description

TCustomProvider defines the fundamental properties, methods, and events required of all provider objects, either through abstract method declarations or through virtual methods that do nothing but provide a backstop.

Do not create instances of TCustomProvider. To add a provider component to a form or data module, use a descendant of TCustomProvider such as TDataSetProvider or TXMLTransformProvider.

A provider derived from TCustomProvider is an intermediate link between TClientDataSet or TXMLBroker object and a source dataset or source XML document. The source dataset or XML document can reside in the same application as the client dataset or XML broker, or it can be part of a separate application server. The provider packages data from the source dataset or XML document and passes it in one or more transportable data packets to the client dataset or XML broker.

When the provider supplies data to a client dataset, the client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the database, to the source dataset, or to the source XML document.

If the provider can encode data packets in XML, it can supply data to an XML broker, which adds the data packet to an HTML document that is downloaded by a Web client. When the XML broker receives updates from the Web client, it sends the updates to the provider, which applies them to the database, to the source dataset, or to the source XML document.

Client datasets and XML brokers communicate with a provider through the IAppServer interface. In multi-tiered applications, this is the interface of the remote data module that contains the provider. To enable the remote data module to pass calls to the provider, the provider’s Exported property must be True, and its Owner property must specify the remote data module.


 VCL Reference

TCustomProvider properties

TCustomProvider	Alphabetically	Legend

In TCustomProvider

Data

Exported

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomProvider properties

TCustomProvider	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

Exported

Name

Owner

Tag

VCLComObject


TCustomProvider.Data
 VCL Reference

TCustomProvider.Data

TCustomProvider	See also	Example

Denotes a data packet created by the provider.

property Data: OleVariant;

Description

Data is a read-only property that provides access to a data packet containing all records. Reading Data calls GetRecords with a parameter of -1.

As implemented in TCustomProvider, GetRecords returns NULL. Descendants of TCustomProvider reimplement the GetRecords method to implement the Data property.


TCustomProvider.Exported
 VCL Reference

TCustomProvider.Exported

TCustomProvider 	See also

Allows client applications to pass calls to the provider when it resides on an application server.

property Exported: Boolean;

Description

Use Exported to indicate whether the provider is made available to clients of a remote data module that owns it. When Exported is True, client applications can specify the provider as a target for calls made using the IAppServer interface. When Exported is False, IAppServer calls that specify the provider cause an exception.

Note:	In addition to the Exported property, the provider must be registered with the remote data module for clients to access it using the data module’s IAppServer interface. When the provider’s Owner is the remote data module, it is automatically registered. If the provider has a different owner, the server application must explicitly register providers using the remote data module’s RegisterProvider method.


 VCL Reference

TCustomProvider events

TCustomProvider	Alphabetically	Legend

In TCustomProvider

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 VCL Reference

TCustomProvider events

TCustomProvider	By object	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


TCustomProvider.AfterApplyUpdates
 VCL Reference

TCustomProvider.AfterApplyUpdates

TCustomProvider	See also

Occurs after the provider applies updates.

property AfterApplyUpdates: TRemoteEvent;

Description

Write an AfterApplyUpdates event handler to return custom information to a client dataset after applying updates. AfterApplyUpdates is part of the mechanism by which a client dataset and a provider communicate information about updates. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset calls the AS_ApplyUpdates method of the IAppServer interface, the following events occur:

1.	The provider receives a BeforeApplyUpdates event, where it can respond to or change custom information that the client dataset sends.

2.	If it is a dataset provider, the provider receives an OnUpdateData event where it can edit the updates before they are applied.

3. The provider applies the updates, and attempts to resolve problems.

4.	The provider receives an AfterApplyUpdates event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeApplyUpdates event handler.

5.	The client dataset receives an AfterApplyUpdates event, where it can respond to the custom information returned by the provider in its AfterApplyUpdates event handler.

Note:	If ApplyUpdates is called without the OwnerData parameter, on entry to the event handler the OwnerData parameter contains the value set in the BeforeApplyUpdates event handler and it is ignored on exit from the AfterApplyUpdates event handler.


TCustomProvider.AfterExecute
 VCL Reference

TCustomProvider.AfterExecute

TCustomProvider	See also

Occurs after the provider passes an execute command to its dataset.

property AfterExecute: TRemoteEvent;

Description

Write an AfterExecute event handler to return custom information to a client dataset after executing a query or stored procedure. AfterExecute is part of the mechanism by which a client dataset and a provider communicate information when executing queries or stored procedures that do not return a cursor. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset calls the AS_Execute method of the IAppServer interface, the following events occur:

1.	The provider receives a BeforeExecute event, where it can respond to or change custom information that the client dataset sends.

2.	The provider dispatches its Execute method to execute a query or stored procedure.

3.	The provider receives an AfterExecute event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeExecute event handler.

4.	The client dataset receives an AfterExecute event, where it can respond to the custom information returned by the provider in its AfterExecute event handler.


TCustomProvider.AfterGetParams
 VCL Reference

TCustomProvider.AfterGetParams

TCustomProvider	See also

Occurs after the provider creates an OleVariant containing parameter values to send to the client dataset.

property AfterGetParams: TRemoteEvent;

Description

Write an AfterGetParams event handler to send custom information to a client dataset when returning parameters from the provider’s dataset. AfterGetParams is part of the mechanism by which a provider and a client dataset communicate information about parameter values. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset calls the AS_GetParams method of the IAppServer interface, the following events occur:

1.	The provider receives a BeforeGetParams event, where it can respond to or change custom information that the client dataset sends.

2.	The provider looks up the parameter values, if appropriate, and encodes them in an OleVariant.

3.	The provider receives an AfterGetParams event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetParams event handler.

4.	The client dataset receives an AfterGetParams event, where it can respond to the custom information returned by the provider in its AfterGetParams event handler.


TCustomProvider.AfterGetRecords
 VCL Reference

TCustomProvider.AfterGetRecords

TCustomProvider	See also

Occurs after the provider creates a data packet to send to the client dataset.

property AfterGetRecords: TRemoteEvent;

Description

Write an AfterGetRecords event handler to send custom information to a client dataset when providing a data packet. AfterGetRecords is part of the mechanism by which a provider and a client dataset communicate information about data fetching. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset calls the AS_GetRecords method of the IAppServer interface, the following events occur:

1.	The provider receives a BeforeGetRecords event, where it can respond to or change custom information that the client dataset sends.

2.	If it is a dataset provider, the provider receives an OnGetData event where it can edit the data before creating a data packet, and then generates the data packet.

3.	The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.

4.	The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider in its AfterGetRecords event handler.


TCustomProvider.AfterRowRequest
 VCL Reference

TCustomProvider.AfterRowRequest

TCustomProvider	See also

Occurs after the provider fetches new information about the current record.

property AfterRowRequest: TRemoteEvent;

Description

Write an AfterRowRequest event handler to send custom information to a client dataset along with information about the current record. AfterRowRequest is part of the mechanism by which a provider and a client dataset communicate information about data fetching. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset calls the AS_RowRequest method of the IAppServer interface, the following events occur:

1.	The provider receives a BeforeRowRequest event, where it can respond to or change custom information that the client dataset sends.

2.	The provider creates a delta packet that contains the requested information.

3.	The provider receives an AfterRowRequest event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeRowRequest event handler.

4.	The client dataset receives an AfterRowRequest event, where it can respond to the custom information returned by the provider in its AfterRowRequest event handler.


TCustomProvider.BeforeApplyUpdates
 VCL Reference

TCustomProvider.BeforeApplyUpdates

TCustomProvider	See also

Occurs before the provider applies updates from a client dataset.

property BeforeApplyUpdates: TRemoteEvent;

Description

Write a BeforeApplyUpdates event handler to respond to custom information from a client dataset. BeforeApplyUpdates is part of the mechanism by which a provider and a client dataset communicate information about updates. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset’s ApplyUpdates method is called, the following events occur:

1.	The client dataset receives a BeforeApplyUpdates event, where it can encode custom information into an OleVariant.

2.	The provider receives a BeforeApplyUpdates event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before applying the updates.

3.	If it is a dataset provider, the provider applies the updates, and receives an OnUpdateError event for any problem records.

4.	The provider receives an AfterApplyUpdates event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeApplyUpdates event handler.

5.	The client dataset receives an AfterApplyUpdates event, where it can respond to the custom information returned by the provider in its AfterApplyUpdates event handler.

Note:	If ApplyUpdates is called without the OwnerData parameter, the OwnerData parameter is nil on entry to the event handler and its value (on exit) is only passed to the AfterApplyUpdates event handler but not returned to the caller.


TCustomProvider.BeforeExecute
 VCL Reference

TCustomProvider.BeforeExecute

TCustomProvider	See also

Occurs before the provider passes an execute command to its dataset.

property BeforeExecute: TRemoteEvent;

Description

Write a BeforeExecute event handler to respond to custom information from a client dataset before executing a query or stored procedure. Any parameter values supplied by the client dataset with the Execute command are applied before this event.

BeforeExecute is part of the mechanism by which a provider and a client dataset communicate information when executing queries or stored procedures that do not return cursors. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset’s Execute method is called, the following events occur:

1.	The client dataset receives a BeforeExecute event, where it can encode custom information into an OleVariant.

2.	The provider receives a BeforeExecute event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before passing the execute command on to its dataset.

3.	The provider dispatches its Execute method to execute a query or stored procedure.

4.	The provider receives an AfterExecute event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeExecute event handler.

5.	The client dataset receives an AfterExecute event, where it can respond to the custom information returned by the provider in its AfterExecute event handler.


TCustomProvider.BeforeGetParams
 VCL Reference

TCustomProvider.BeforeGetParams

TCustomProvider	See also

Occurs before the provider creates an OleVariant that encodes the current parameter values and sends them to a client dataset.

property BeforeGetParams: TRemoteEvent;

Description

Write a BeforeGetParams event handler to respond to custom information from a client dataset. BeforeGetParams is part of the mechanism by which a provider and a client dataset communicate information during parameter fetching. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset fetches parameter values from the provider, the following events occur:

1.	The client dataset receives a BeforeGetParams event, where it can encode custom information into an OleVariant.

2.	The provider receives a BeforeGetParams event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before it fetches and encodes the parameter values.

3.	The provider generates an OleVariant for the current parameter values of its dataset, if appropriate.

4.	The provider receives an AfterGetParams event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetParams event handler.

5.	The client dataset receives an AfterGetParams event, where it can respond to the custom information returned by the provider in its AfterGetParams event handler.


TCustomProvider.BeforeGetRecords
 VCL Reference

TCustomProvider.BeforeGetRecords

TCustomProvider	See also

Occurs before the provider creates a data packet and sends it to a client dataset.

property BeforeGetRecords: TRemoteEvent;

Description

Write a BeforeGetRecords event handler to respond to custom information from a client dataset. BeforeGetRecords is part of the mechanism by which a provider and a client dataset communicate information about data fetching. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset fetches data from the provider, the following events occur:

1.	The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant.

2.	The provider receives a BeforeGetRecords event, where the OleVariant from the client dataset appears as the OwnerData parameter. The provider can respond to or change that information before it creates a data packet.

3.	The provider generates the data packet.

4.	The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.

5.	The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider in its AfterGetRecords event handler.


TCustomProvider.BeforeRowRequest
 VCL Reference

TCustomProvider.BeforeRowRequest

TCustomProvider	See also

Occurs before the provider creates a delta packet with information about the current record.

property BeforeRowRequest: TRemoteEvent;

Description

Write a BeforeRowRequest event handler to respond to custom information from a client dataset. BeforeRowRequest is part of the mechanism by which a provider and a client dataset communicate information about data fetching. When the provider is part of a stateless application server, this mechanism allows the provider and the client dataset to communicate persistent state information.

When the client dataset fetches detail information about the current record or refreshes the current record, the following events occur:

1.	The client dataset receives a BeforeRowRequest event, where it can encode custom information into an OleVariant.

2.	The provider receives a BeforeRowRequest event, where the custom information appears as the OwnerData parameter. The provider can respond to or change that information before it looks up the requested information.

3.	The provider creates a delta packet that contains the requested information.

4.	The provider receives an AfterRowRequest event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeRowRequest event handler.

5.	The client dataset receives an AfterRowRequest event, where it can respond to the custom information returned by the provider in its AfterRowRequest event handler.


TCustomProvider.OnDataRequest
 VCL Reference

TCustomProvider.OnDataRequest

TCustomProvider	See also 	Example

Occurs when a provider calls its DataRequest method.

type

  TDataRequestEvent = function(Sender: TObject; Input : OleVariant) : OleVariant of object;

property OnDataRequest: TDataRequestEvent;

Declaration

Write an OnDataRequest event handler to do custom processing of data. OnDataRequest has no built-in use. Instead, it allows developers to augment the IAppServer interface so that clients in a multi-tiered application can communicate directly with an individual provider.

If an application does not provide an OnDataRequest event handler, calls to DataRequest return NULL.

Note:	To provide the same sort of custom processing on the client side, use an automation method on the connection component.


 VCL Reference

TCustomProvider methods

TCustomProvider	Alphabetically	Legend

In TCustomProvider

ApplyUpdates

Create

DataRequest

Destroy

DoAfterApplyUpdates

DoAfterExecute

DoAfterGetParams

DoAfterRowRequest

DoBeforeApplyUpdates

DoBeforeExecute

DoAfterGetParams

DoBeforeGetRecords

DoAfterRowRequest

Execute

GetParams

GetRecords

InternalApplyUpdates

InternalExecute

InternalGetParams

InternalGetRecords

InternalRowRequest

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomProvider methods

TCustomProvider	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataRequest

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoAfterApplyUpdates

DoAfterExecute

DoAfterGetParams

DoAfterRowRequest

DoBeforeApplyUpdates

DoBeforeExecute

DoAfterGetParams

DoBeforeGetRecords

DoAfterRowRequest

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParams

GetParentComponent

GetRecords

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InternalApplyUpdates

InternalExecute

InternalGetParams

InternalGetRecords

InternalRowRequest

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction


TCustomProvider.ApplyUpdates
 VCL Reference

TCustomProvider.ApplyUpdates

TCustomProvider	See also

Applies updates received as a delta packet.

function ApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer); OleVariant; overload;

function ApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer; var OwnerData:OleVariant); OleVariant; overload;

Description

Call ApplyUpdates to apply updates contained in a delta packet. ApplyUpdates generates a BeforeApplyUpdates event, applies the updates, and then generates an AfterApplyUpdates event.

Specify the delta packet as the Delta parameter.

Use the MaxErrors parameter to indicate the maximum number of errors that can be applied before stopping the update operation. If MaxErrors is –1, the provider tries to apply all updates.

ErrorCount returns the number of errors encountered during the update operation.

The OwnerData parameter (if used) supplies custom information that is passed to the BeforeApplyUpdates event handler and which returns any information supplied by that event handler.

ApplyUpdates returns a data packet (as an OleVariant) of updates that could not be applied to the database.

Note:	ApplyUpdates always generates the BeforeApplyUpdates and AfterApplyUpdates events, even if you use the syntax that does not include an OwnerData parameter. In that case, the value of OwnerData is nil on entry to the BeforeApplyUpdates event handler and is discarded on exit from the AfterApplyUpdates event handler.

Warning:	The provider can’t detect when an update conflicts with another user’s changes to a memo field. This situation will not contribute to the errors counted by ErrorCount.


TCustomProvider.Create
 VCL Reference

TCustomProvider.Create

TCustomProvider	See also

Creates a new TCustomProvider object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a provider at runtime. Providers placed in forms or data modules at design time are created automatically.

The constructor assigns the AOwner parameter as the owner of the provider. This owner is responsible for freeing the provider when it is destroyed. If the owner is a remote data module, the constructor registers the provider with that remote data module so that it is available to client applications through the IAppServer interface.


TCustomProvider.DataRequest
 VCL Reference

TCustomProvider.DataRequest

TCustomProvider	See also 	Example

Generates an OnDataRequest event.

function DataRequest(Input: OleVariant): OleVariant; virtual;

Description

Write an OnDataRequest event handler and call the DataRequest function to invoke the event handler at runtime. This function and the event it invokes enable an application to perform custom processing in response to a request for data.

Note:	Calling the client dataset’s DataRequest method causes a call to the provider’s DataRequest method.


TCustomProvider.Destroy
 VCL Reference

TCustomProvider.Destroy

TCustomProvider	See also

Frees an instance of a provider object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the provider is not nil before calling its Destroy method. If the provider’s Owner is a remote data module, Destroy unregisters the provider from that remote data module.


TCustomProvider.DoAfterApplyUpdates
 VCL Reference

TCustomProvider.DoAfterApplyUpdates

TCustomProvider	See also

Generates an AfterApplyUpdates event.

procedure DoAfterApplyUpdates(var OwnerData: OleVariant); virtual;

Description

The ApplyUpdates method calls DoAfterApplyUpdates to generate the AfterApplyUpdates event after applying updates and resolving any update errors that are handled by the provider.

OwnerData supplies custom information to the AfterApplyUpdates event handler. This is the same as the outgoing OwnerData parameter of the BeforeApplyUpdates event handler. The AfterApplyUpdates event handler can change this value. The returned value is then passed to the client if it supplied an OwnerData parameter when calling ApplyUpdates.


TCustomProvider.DoAfterExecute
 VCL Reference

TCustomProvider.DoAfterExecute

TCustomProvider	See also

Generates an AfterExecute event.

procedure DoAfterExecute(var Params, OwnerData: OleVariant); virtual;

Description

The Execute method calls DoAfterExecute to generate the AfterExecute event after executing CommandText or the associated query or stored procedure but before fetching any output parameters.

OwnerData supplies custom information to the AfterExecute event handler. This is the same as the outgoing OwnerData parameter of the BeforeExecute event handler. The AfterExecute event handler can change this value. The returned value is then passed to the client.


TCustomProvider.DoAfterGetParams
 VCL Reference

TCustomProvider.DoAfterGetParams

TCustomProvider	See also

Generates an AfterGetParams event.

procedure DoAfterGetParams(OwnerData: OleVariant); virtual;

Description

The GetParams method calls DoAfterGetParams to generate the AfterGetParams event after fetching the current parameter values of the associated dataset.

OwnerData supplies custom information to the AfterGetParams event handler. This is the same as the outgoing OwnerData parameter of the BeforeGetParams event handler. The AfterGetParams event handler can change this value. The returned value is then passed to the client.


TCustomProvider.DoAfterGetRecords
 VCL Reference

TCustomProvider.DoAfterGetRecords

TCustomProvider	See also

Generates an AfterGetRecords event.

procedure DoAfterGetRecords(var OwnerData: OleVariant); virtual;

Description

The GetRecords method calls DoAfterGetRecords to generate the AfterGetRecords event after assembling a data packet but before updating the parameters to reflect any output parameters.

OwnerData supplies custom information to the AfterGetRecords event handler. This is the same as the outgoing OwnerData parameter of the BeforeGetRecords event handler. The AfterGetRecords event handler can change this value. The returned value is then passed to the client.


TCustomProvider.DoAfterRowRequest
 VCL Reference

TCustomProvider.DoAfterRowRequest

TCustomProvider	See also

Generates an AfterRowRequest event.

procedure DoAfterRowRequest(OwnerData: OleVariant); virtual;

Description

The RowRequest method calls DoAfterRowRequest to generate the AfterRowRequest event after fetching the requested data.

OwnerData supplies custom information to the AfterRowRequest event handler. This is the same as the outgoing OwnerData parameter of the BeforeRowRequest event handler. The AfterRowRequest event handler can change this value. The returned value is then passed to the client.


TCustomProvider.DoBeforeApplyUpdates
 VCL Reference

TCustomProvider.DoBeforeApplyUpdates

TCustomProvider	See also

Generates a BeforeApplyUpdates event.

procedure DoBeforeApplyUpdates(var OwnerData: OleVariant); virtual;

Description

The ApplyUpdates method calls DoBeforeApplyUpdates to generate the BeforeApplyUpdates event before it applies the updates in Delta.

OwnerData supplies custom information to the BeforeApplyUpdates event handler. The BeforeApplyUpdates event handler can change this value. The returned value is then passed to the AfterApplyUpdates event handler after applying the updates in Delta.


TCustomProvider.DoBeforeExecute
 VCL Reference

TCustomProvider.DoBeforeExecute

TCustomProvider	See also

Generates a BeforeExecute event.

procedure DoBeforeExecute(const CommandText: WideString, var Params, OwnerData: OleVariant); virtual;

Description

The Execute method calls DoBeforeExecute to generate the BeforeExecute event before it executes CommandText or executes an associated query or stored procedure.

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

Params contains any parameter values that should be applied to CommandText or to the query or stored procedure before execution.

OwnerData supplies custom information to the BeforeExecute event handler. The event handler can change this value. The returned value is then passed to an AfterExecute event handler and then returned to the caller of the Execute method.

As implemented in TCustomProvider, CommandText and Params are ignored. Descendant classes apply these values before generating the BeforeExecute event.


TCustomProvider.DoBeforeGetParams
 VCL Reference

TCustomProvider.DoBeforeGetParams

TCustomProvider	See also

Generates a BeforeGetParams event.

procedure DoBeforeGetParams(OwnerData: OleVariant); virtual;

Description

The GetParams method calls DoBeforeGetParams to generate the BeforeGetParams event before fetching the current parameter values of the associated dataset.

OwnerData supplies custom information to the BeforeGetParams event handler. The event handler can change this value. The returned value is then passed to an AfterGetParams event handler and then returned to the caller of the GetParams method.


TCustomProvider.DoBeforeGetRecords
 VCL Reference

TCustomProvider.DoBeforeGetRecords

TCustomProvider	See also

Generates a BeforeGetRecords event.

procedure DoBeforeGetRecords(Count: Integer; Options: Integer; const CommandText: WideString; var Params, OwnerData: OleVariant); virtual;

Description

The GetRecords method calls DoBeforeGetRecords to generate the BeforeGetRecords event before it fetches data and assembles it into a data packet.

Count is the number of records requested. If Count is –1, all records are requested.

Options indicates whether the data packet should include metadata, whether it should start with the first record, and whether the data packet should be encoded in XML. For details, see the GetRecords method.

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText or if the provider does not have an Options property.

Params contains any parameter values that should be applied to CommandText or to a query or stored procedure before fetching data into a data packet.

OwnerData supplies custom information to the BeforeGetRecords event handler. The event handler can change this value. The returned value is then passed to an AfterGetRecords event handler and then (optionally) returned to the caller of the GetRecords method.

As implemented in TCustomProvider, Count, Options, CommandText, and Params are ignored. Descendant classes can apply these values before generating the BeforeExecute event.


TCustomProvider.DoBeforeRowRequest
 VCL Reference

TCustomProvider.DoBeforeRowRequest

TCustomProvider	See also

Generates a BeforeRowRequest event.

procedure DoBeforeRowRequest(OwnerData: OleVariant); virtual;

Description

The RowRequest method calls DoBeforeRowRequest to generate the BeforeRowRequest event before fetching the requested data.

OwnerData supplies custom information to the BeforeRowRequest event handler. The event handler can change this value. The returned value is then passed to an AfterRowRequest event handler and then returned to the caller of the RowRequest method.


TCustomProvider.Execute
 VCL Reference

TCustomProvider.Execute

TCustomProvider	See also

Executes a query, stored procedure, or custom SQL statement.

procedure Execute(const CommandText: WideString, var Params, OwnerData: OleVariant);

Description

Client datasets call Execute through the AS_Execute method of the IAppServer interface. In response, the provider executes an SQL command. If the provider represents a query or stored procedure that does not return a cursor, calling Execute causes the provider to execute the query or stored procedure. If the caller supplies a value for CommandText, Execute may execute that statement instead (see below).

Before executing the appropriate command, Execute generates a BeforeExecute event. After executing the command, it generates an AfterExecute event. Finally, it returns any output parameters as the value of the Params parameter.

CommandText is an SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

On entry, Params supplies parameter values for the query, stored procedure, or CommandText string. On exit, Params returns any output parameters.

OwnerData contains custom information passed to the provider from the client dataset’s BeforeExecute event handler. This information is passed in to the provider’s BeforeExecute event handler and is returned by the provider’s AfterExecute event handler.


TCustomProvider.GetParams
 VCL Reference

TCustomProvider.GetParams

TCustomProvider	See also

Returns the current parameter values.

function GetParams(var OwnerData: OleVariant); OleVariant;

Description

GetParams returns a variant array of variant arrays that contains the current parameter values for the provider’s data source. The first array dimension is an index into all the parameter values. Its value runs from 0 to one less than the number of parameters. The second array dimension has four values: The parameter name (a string), the parameter data type (a TFieldType), the parameter type (a TParamType), and the parameter value (a Variant). The values in this array can be applied to a TParams object using the global UnpackParams procedure.

Before fetching the current parameter values, GetParams generates a BeforeGetParams event, passing the value supplied as the OwnerData parameter to the event handler. After creating the OleVariant that contains the parameter values, GetParams generates an AfterGetParams event, passing in the current value of OwnerData. Finally, the value of OwnerData returned by the AfterGetParams is returned in the OwnerData parameter.


TCustomProvider.GetRecords
 VCL Reference

TCustomProvider.GetRecords

TCustomProvider	See also

Retrieves a data packet that represents the provider’s associated data.

function GetRecords(Count: Integer; out RecsOut: Integer; Options: Integer); OleVariant; overload;

function GetRecords(Count: Integer; out RecsOut: Integer; Options: Integer; const CommandText: WideString; var Params, OwnerData: OleVariant); OleVariant; overload;

Description

Call GetRecords to retrieve a data packet containing a specified number of records. GetRecords generates a BeforeGetRecords event, assembles a data packet, and then generates an AfterGetRecords event.

Count indicates the number of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only the specified number of records are retrieved.

RecsOut returns the actual number of records in the data packet.

Options indicates what information should be added to the data packet in addition to data. It is a combination of the GetRecordOption constants.  For example, the following value requests metadata along with a data packet encoded in XML:

MetaDataOption + XMLOption

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText or if the provider does not have an Options property.

Params specifies any parameter values that should be applied to CommandText or to an associated query or stored procedure. If the provider is associated with a TTable, Params specifies field values that filter the result set. On exit from GetRecords, Params returns any output parameters.

OwnerData contains custom information that is supplied by a client dataset’s BeforeGetRecords event handler. This information is passed to the provider’s BeforeGetRecords event handler and is returned by the provider’s AfterGetRecords event handler.

Records are returned as a data packet in a Variant.

Note:	GetRecords always generates the BeforeGetRecords and AfterGetRecords events, even if you use the syntax that does not include an OwnerData parameter. In that case, the value of OwnerData is nil on entry to the BeforeGetRecords event handler and is discarded on exit from the AfterGetRecords event handler.

Tip:	If the provider is part of a stateless application server, there is no guarantee that the provider will be positioned on the desired record before it creates a data packet. Use a BeforeGetRecords event handler to position the cursor before the call to GetRecords.


TCustomProvider.InternalApplyUpdates
 VCL Reference

TCustomProvider.InternalApplyUpdates

TCustomProvider	See also

Provides the underlying implementation of the ApplyUpdates method.

function InternalApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer): OleVariant; virtual; abstract;

Description

The ApplyUpdates method calls InternalApplyUpdates to apply the updates contained in a delta packet after generating the BeforeApplyUpdates event and before generating the AfterApplyUpdates event. The InternalApplyUpdates method of TCustomProvider is abstract, meaning that it has no implementation. Descendant classes override this method to apply updates, resolve update errors, and return any updates that could not be applied.

Delta is the delta packet containing insertions, deletions, and modifications to be applied.

MaxErrors indicates the maximum number of errors that can be applied before stopping the update operation. If MaxErrors is –1, the provider tries to apply all updates.

ErrorCount returns the number of errors encountered during the update operation.

InternalApplyUpdates returns a data packet of updates that could not be applied to the database as an OleVariant.


TCustomProvider.InternalExecute
 VCL Reference

TCustomProvider.InternalExecute

TCustomProvider	See also

Provides the underlying implementation of the Execute method.

procedure InternalExecute(const CommandText: WideString, var Params: OleVariant); virtual;

Description

The Execute method calls InternalExecute to execute the appropriate SQL statement after calling DoBeforeExecute to generate a BeforeExecute event and apply the CommandText and Params. As Implemented in TCustomProvider, InternalExecute does nothing. Descendants override this method to pass the execute command on to an associated dataset.

CommandText is an SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

On entry, Params supplies parameter values for the query, stored procedure, or CommandText string. On exit, Params returns any output parameters.


TCustomProvider.InternalGetParams
 VCL Reference

TCustomProvider.InternalGetParams

TCustomProvider	See also

Returns the requested parameter values as a Variant array.

function InternalGetParams(Types: TParamTypes = AllParamTypes): OleVariant; virtual;

Description

TCustomProvider uses InternalGetParams internally whenever it needs to assemble the current parameter values into an OleVariant. This provides the underlying implementation of the GetParams method, as well as assembling parameter values for methods that return output parameters (such as Execute or GetRecords).

The Types parameter limits the parameter values that are returned to a subset of all possible parameter types. If this parameter is omitted, all parameter values are returned.

As implemented in TCustomProvider, InternalGetParams always returns NULL. Descendants override this method to return the requested parameter values.


TCustomProvider.InternalGetRecords
 VCL Reference

TCustomProvider.InternalGetRecords

TCustomProvider	See also

Provides the underlying implementation of the GetRecords method.

function InternalGetRecords(Count: Integer; out RecsOut: Integer; Options: TGetRecordOptions; const CommandText: WideString; var Params: OleVariant); OleVariant; virtual;

Description

The GetRecords method calls InternalGetRecords to assemble a data packet after calling DoBeforeGetRecords to apply the CommandText and Params and generate a BeforeGetRecords event. As implemented in TCustomProvider, InternalGetRecords always returns NULL. Descendant classes override this method to fetch the requested records and assemble them into a data packet.

Count indicates the number of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only the specified number of records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It can include grMetaData (include metadata), grReset (start providing records with the first one in the dataset), and grXML (encode the datapacket in XML rather than as an OleVariant) or grXMLUTF8 (same as grXML except extended characters are encoded using UTF8).

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText or if the provider does not have an Options property.

Params specifies any parameter values that should be applied to CommandText or to an associated query or stored procedure. If the provider is associated with a TTable object, Params specifies field values that filter the result set. On exit from GetRecords, Params returns any output parameters.

Records are returned as a data packet in a Variant.


TCustomProvider.InternalRowRequest
 VCL Reference

TCustomProvider.InternalRowRequest

TCustomProvider	See also

Provides the underlying implementation of the RowRequest method.

function InternalRowRequest(const Row: OleVariant; RequestType: TFetchOptions): OleVariant; virtual;

Description

The RowRequest method calls InternalRowRequest to assemble the specified information after generating a BeforeRowRequest event and before generating an AfterRowRequest event. As implemented in TCustomProvider, InternalRowRequest does nothing. Descendant classes override this method to assemble the requested information into an OleVariant.

The Row parameter is an OleVariant that describes the current record on the client dataset. It enables the provider to locate the record of interest.

The RequestType parameter indicates the type of information required.

InternalRowRequest returns the requested information in a delta packet.


TCustomProvider.RowRequest
 VCL Reference

TCustomProvider.RowRequest

TCustomProvider	See also

Returns information from a specified record.

function RowRequest(const Row: OleVariant; RequestType: Integer; var OwnerData: OleVariant): OleVariant;

Description

RowRequest is called automatically in response to the client dataset’s FetchBlobs, FetchDetails, or RefreshRecord method. It generates a BeforeRowRequest event, assembles the requested information, and generates an AfterRowRequest event.

The Row parameter is an OleVariant that describes the record about which information is requested. It enables the provider to locate the record of interest.

The RequestType parameter indicates the type of information required. It is an integer version of the TFetchOptions type. (An integer because the value must be marshaled over an IAppServer interface). To convert the TFetchOptions value to the appropriate integer, use the Ord function. For example:

Ord(foBlobs) + Ord(foDetails);

RowRequest returns the requested information in a delta packet.

As implemented in TCustomProvider, RowRequest always returns NULL. Descendant classes override this method to return the requested data.


Hierarchy

TObject

TPersistent

TComponent

TCustomProvider


TCustomSocket
 VCL Reference

TCustomSocket

Hierarchy	Properties	Methods	Events	See also

TCustomSocket is the base class for socket components.

Unit

ScktComp

Description

Override TCustomSocket to create a socket component that can be assigned event handlers for the events and error conditions that occur. In addition to the properties and methods introduced by TAbstractSocket that enable an application to work with Windows sockets, TCustomSocket introduces several events that can be used by applications.

Do not create instances of TCustomSocket. Use a descendant of TCustomSocket to add the ability to communicate with other machines using TCP/IP. To create a socket that initiates the connection with another machine, use TClientSocket. To create a socket that responds to requests for connections from other machines, use TServerSocket.


 VCL Reference

TCustomSocket properties

TCustomSocket	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomSocket properties

TCustomSocket	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomSocket events

TCustomSocket	Alphabetically	Legend

In TCustomSocket

OnAccept

OnConnect

OnConnecting

OnDisconnect

OnError

OnListen

OnLookup

OnRead

OnWrite


 VCL Reference

TCustomSocket events

TCustomSocket	By object	Legend

OnAccept

OnConnect

OnConnecting

OnDisconnect

OnError

OnListen

OnLookup

OnRead

OnWrite


TCustomSocket.OnAccept
 VCL Reference

TCustomSocket.OnAccept

TCustomSocket	See also

Occurs on server sockets just after the connection to a client socket is accepted.

property OnAccept: TSocketNotifyEvent;

Description

Write an OnAccept event handler for a server socket to take specific action after the connection to a client socket has been accepted. This is the first point when information is available about the local port and IP address that will be used in the server endpoint of the connection. The port number, and possibly the IP address, will differ from those of the listening socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. After a request from the queue is accepted by the server socket, an OnAccept event occurs. After the server socket accepts the connection, the client socket completes the connection, and an OnConnect event occurs for the client socket.


TCustomSocket.OnConnect
 VCL Reference

TCustomSocket.OnConnect

TCustomSocket	See also

Occurs on client sockets just after the connection to the server is opened.

property OnConnect: TSocketNotifyEvent;

Description

Write an OnConnect event handler for a client socket to take specific action after the connection to a server socket has been established. Depending on the service, this may be the point when the socket should start reading or writing over the connection.

When a client socket opens a connection, the following events occur:

1	An OnLookup event occurs prior to an attempt to locate the server socket.

2	The Windows socket is set up, and initialized for event notification.

3	An OnConnecting event occurs after the server socket is located.

4	The connection request is accepted by the server and completed by the client socket.

5	An OnConnect event occurs after the connection is established.


TCustomSocket.OnConnecting
 VCL Reference

TCustomSocket.OnConnecting

TCustomSocket	See also

Occurs for a client socket after the server socket has been located, but before the connection is established.

property OnConnecting: TSocketNotifyEvent;

Description

Write an OnConnecting event handler for a client socket to take specific action just before the connection to a server socket is established. This is the first opportunity to obtain the actual port and IP address of the server endpoint of the connection that is about to form.

When a client socket opens a connection, the following events occur:

1	An OnLookup event occurs prior to an attempt to locate the server socket.

2	The Windows socket is set up, and initialized for event notification.

3	An OnConnecting event occurs after the server socket is located.

4	The connection request is accepted by the server and completed by the client socket.

5	An OnConnect event occurs after the connection is established.


TCustomSocket.OnDisconnect
 VCL Reference

TCustomSocket.OnDisconnect

TCustomSocket	See also

Occurs just before a client socket closes the connection to a server socket.

property OnDisconnect: TSocketNotifyEvent;

Description

Write an OnDisconnect event handler to take specific action when the connection to a server socket is about to be terminated. OnDisconnect occurs after the value of the Active property is set to False, but before the actual connection is closed.


TCustomSocket.OnError
 VCL Reference

TCustomSocket.OnError

TCustomSocket	See also

Occurs when the socket fails in making, using, or shutting down a connection.

property OnError: TSocketErrorEvent;

Description

Write an OnError event handler to respond to errors that arise with the socket connection. Set the ErrorCode parameter to 0 if the OnError event handler successfully deals with the error condition, to prevent an ESocketError from being raised.


TCustomSocket.OnListen
 VCL Reference

TCustomSocket.OnListen

TCustomSocket	See also

Occurs just before a server socket is opened for listening.

property OnListen: TSocketNotifyEvent;

Description

Write an OnListen event handler for a server socket to take specific action just before the socket is opened for listening. OnListen occurs after Address and Port have been bound to the socket connection, but before it is opened. This is the last opportunity to make changes to the socket endpoint before it is opened for listening. Use the SocketHandle property of the Socket parameter for Windows API calls that change the socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. The connection to a client socket is completed when a request from the queue is accepted.


TCustomSocket.OnLookup
 VCL Reference

TCustomSocket.OnLookup

TCustomSocket	See also

Occurs when a client socket is about to look up the server socket with which it wants to connect.

property OnLookup: TSocketNotifyEvent;

Description

Write an OnLookup event handler for a client socket to take specific action just before attempting to locate a server socket. This is the first opportunity to make Windows API calls that affect the client properties of the socket, such as specifying a particular port number. Use the SocketHandle property of the Socket parameter for Windows API calls.

When a client socket opens a connection, the following events occur:

1	An OnLookup event occurs prior to an attempt to locate the server socket.

2	The Windows socket is set up, and initialized for event notification.

3	An OnConnecting event occurs after the server socket is located.

4	The connection request is accepted by the server and completed by the client socket.

5	An OnConnect event occurs after the connection is established.

Note:	Changing the Address, Host, Port, or Service properties of socket component in an OnLookup event handler has no effect on the address or port used to locate a server socket. These properties must be correct before the Open method is called.


TCustomSocket.OnRead
 VCL Reference

TCustomSocket.OnRead

TCustomSocket	See also

Occurs when a client socket should read information from the socket connection.

property OnRead: TSocketNotifyEvent;

Description

Write an OnRead event handler to read from the socket connection. If the socket is a blocking socket, use a TWinSocketStream object to read from the connection. Otherwise, use the methods of the Socket parameter to perform the actual reading.

Note:	Non-blocking sockets do not always receive an OnRead event for the last bit of data passed over the connection. When using a non-blocking socket, check for any unread data in the OnDisconnect event to make sure that everything is handled.


TCustomSocket.OnWrite
 VCL Reference

TCustomSocket.OnWrite

TCustomSocket	See also

Occurs when a client socket should write information to the socket connection.

property OnWrite: TSocketNotifyEvent;

Description

Write an OnWrite to write from the socket connection. If the socket is a blocking socket, use a TWinSocketStream object to write to the connection. Otherwise, use the methods of the Socket parameter to perform the actual writing.


 VCL Reference

TCustomSocket methods

TCustomSocket	Alphabetically	Legend

In TCustomSocket

Error

Event

Derived from TAbstractSocket

Close

Open

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomSocket methods

TCustomSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Error

Event

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomSocket.Error
 VCL Reference

TCustomSocket.Error

TCustomSocket	See also

Generates an OnError event.

type TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept);

procedure Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer); override;

Description

Applications cannot call Error. It responds to error conditions by calling the OnError event handler if it is assigned. Override Error to add class-specific error processing or to block the OnError event.

The Socket parameter indicates the Windows socket object which encounters the error condition.

The ErrorEvent parameter indicates what the socket was trying to do when the error occurred. It has one of the following values:

Value	Meaning

eeGeneral	The socket received an error message that does not fit into any of the following categories.

eeSend	An error occurred when trying to write to the socket connection.

eeReceive	An error occurred when trying to read from the socket connection.

eeConnect	For client sockets, this indicates that the client socket can’t locate the server, or that a problem on the server prevents the opening of a connection. For server sockets, this indicates that a client connection request that has already been accepted could not be completed.

eeDisconnect	An error occurred when trying to close a connection.

eeAccept	For server sockets only, this indicates that a problem occurred when trying to accept a client connection request.

The ErrorCode parameter is the error code received by the Windows socket object. Setting this value to 0 in the Error method prevents the socket from raising an exception. For information on possible error codes, see the Microsoft documentation on Windows sockets.


TCustomSocket.Event
 VCL Reference

TCustomSocket.Event

TCustomSocket	See also

Dispatches the events that occur in the normal operation of the socket to the appropriate event handlers.

procedure Event(Socket: TCustomWinSocket; SocketEvent: TSocketEvent); override;

Description

Applications cannot call Event. It is called automatically when various events occur. Override Event to introduce class-specific responses when certain events occur or to prevent the socket from calling the associated event handler.

The Socket parameter indicates the Windows socket object that calls Event to indicate when specific events occur.

The SocketEvent parameter indicates the event that occurred.


Hierarchy

TObject

TPersistent

TComponent

TAbstractSocket

TCustomSocket


TDataSource
 VCL Reference

 TDataSource

Hierarchy	Properties	Methods	Events 	Using TDataSource	See also

TDataSource provides an interface between a dataset component and data-aware controls on a form.

Unit

DB

Description

Use TDataSource to

provide a conduit between a dataset and data-aware controls on a form that enable display, navigation, and editing of the data underlying the dataset.

link two datasets in a master/detail relationship.

All datasets must be associated with a data source component if their data is to be displayed and manipulated in data-aware controls. Similarly, each data-aware control needs to be associated with a data source component in order for the control to receive and manipulate data.

Data source components also link datasets in master-detail relationships.


 VCL Reference

TDataSource properties

TDataSource	Alphabetically	Legend

In TDataSource

AutoEdit

DataSet

Enabled

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSource properties

TDataSource	By object	Legend

AutoEdit

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Enabled

Name

Owner

State

Tag

VCLComObject


TDataSource.AutoEdit
 VCL Reference

TDataSource.AutoEdit

TDataSource	See also

Determines if a data source component automatically calls a dataset’s Edit method when a data-aware control associated with the data source receives focus.

property AutoEdit: Boolean;

Description

AutoEdit is True by default. If AutoEdit is True, then when a user attempts to modify the data displayed by the control the data source calls the underlying dataset’s Edit method.

Set AutoEdit to False to protect data from unintentional modification. Even if AutoEdit is False, an application can explicitly call a dataset’s Edit method to permit data modification.


TDataSource.DataSet
 VCL Reference

TDataSource.DataSet

TDataSource	See also	Example

Specifies the dataset for which the data source component serves as a conduit to data-aware controls or other datasets.

property DataSet: TDataSet;

Description

Set DataSet to the name of an existing dataset component either at design time, or at runtime. By changing the value of DataSet at runtime an application can effectively use the same data-aware controls to display and edit data in different datasets.

DataSource.DataSet := Table1;

Note:	To link a dataset that resides in a data module to a form at design-time, choose File | Use unit.


TDataSource.Enabled
 VCL Reference

TDataSource.Enabled

TDataSource	See also

Determines if the data-aware controls associated with the data source component display data.

property Enabled: Boolean;

Description

Use Enabled to control whether data-aware controls connected to a data source display data. If Enabled is True (the default), data are displayed. If Enabled is False, all controls associated with the data source are blank.

Note:	While an application can set Enabled to False to blank out data-aware controls during processing of multiple records, a better choice is to use the TDataSet EnableControls and DisableControls methods. Using these methods prevents the controls from blanking out during processing.


TDataSource.State
 VCL Reference

TDataSource.State

TDataSource	See also	Example

Reads the current state of the dataset component associated with a data source.

property State: TDataSetState;

Description

Examine State to determine the current state of the dataset associated with a data source component. The state of a dataset indicates the action, if any, taking place against the dataset.

The possible values of State correspond to the values for a dataset’s State property and are identical to them except that when Enabled is False or DataSet is unassigned, State is dsInactive regardless of the actual state of the dataset.


 VCL Reference

TDataSource events

TDataSource	Alphabetically	Legend

In TDataSource

OnDataChange

OnStateChange

OnUpdateData


 VCL Reference

TDataSource events

TDataSource	By object	Legend

OnDataChange

OnStateChange

OnUpdateData


TDataSource.OnDataChange
 VCL Reference

TDataSource.OnDataChange

TDataSource	See also 	Example

Occurs when the data in a record has changed, either due to field edits or moving the cursor to a new record.

type TDataChangeEvent = procedure(Sender: TObject; Field: TField) of object;

property OnDataChange: TDataChangeEvent;

Description

Write an OnDataChange event handler to take specific actions when a field in the current record has been edited and the application moves to another field, or when the current record in the associated dataset changes. OnDataChange is especially useful in applications that must synchronize data display in controls that are not data-aware. This event is typically used to make sure the control reflects the current field values in the dataset, because it is triggered by all changes.

Methods that can trigger this event include the Next or Prior methods for the dataset. Data-aware controls notify a data source of a data change when:

Scrolling to a new record.

Modifications to a field’s data.

The Field parameter is nil if the change can affect more than one field value (for example when moving to a new record or refreshing a record buffer).  If only one field is affected, Field indicates the edited field.


TDataSource.OnStateChange
 VCL Reference

TDataSource.OnStateChange

TDataSource	See also

Occurs when the state of a data source component’s dataset changes.

property OnStateChange: TNotifyEvent;

Description

Write an OnStateChange event handler to take specific actions when the State property changes for a dataset associated with a data source component.

During the course of a normal connection to a database, a dataset’s state changes frequently. For example, each time a user starts editing a field in a data-aware control the dataset’s State property is changed from dsBrowse to dsEdit if the State is not already dsEdit. An OnStateChange event handler can respond to changes in state by taking actions such as disabling or enabling menu items or buttons.


TDataSource.OnUpdateData
 VCL Reference

TDataSource.OnUpdateData

TDataSource	See also

Occurs when the data in the current record is about to be updated.

property OnUpdateData: TNotifyEvent;

Description

Write an OnUpdateData event handler to take specific actions prior to posting data changes to the database. If an application posts changes to the database and an OnUpdateData event handler exists, the handler is called before the dataset’s Post method is executed. An OnUpdateData event handler might be useful for performing additional data processing or validation before posting.


 VCL Reference

TDataSource methods

TDataSource	Alphabetically	Legend

In TDataSource

Create

Destroy

Edit

IsLinkedTo

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSource methods

TDataSource	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Edit

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsLinkedTo

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSource.Create
 VCL Reference

TDataSource.Create

TDataSource	See also

Creates an instance of a TDataSource component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a TDataSource component at runtime. Data source components added to a form or data module at design time are automatically created.

Create instantiates a data link list, and sets the Enabled and AutoEdit properties of the component to True.


TDataSource.Destroy
 VCL Reference

TDataSource.Destroy

TDataSource	See also

Destroys the instance of a data source component.

destructor Destroy;

Description

Do not call Destroy directly. Instead, call Free, which checks that the data source reference is not nil before calling Destroy.

Destroy sets OnStateChange to nil, sets the dataset for the component to nil, and frees the data link list before calling the inherited destructor for the component.


TDataSource.Edit
 VCL Reference

TDataSource.Edit

TDataSource	See also

Puts the associated dataset into edit mode, if possible.

procedure Edit;

Description

Call Edit to enable a data source component to control a user’s ability to edit a dataset associated with the data source. Edit checks that the AutoEdit property of the data source is True and that its State property is dsBrowse before calling the dataset’s Edit method. Checking these properties before calling the dataset’s Edit method ensures that the dataset is in a state that supports editing, and that the data source allows editing as well.


TDataSource.IsLinkedTo
 VCL Reference

TDataSource.IsLinkedTo

TDataSource	See also

Checks whether a data source is linked to a specified dataset.

function IsLinkedTo(DataSet: TDataSet): Boolean;

Description

Call IsLinkedTo to verify that a data source is linked to a specific dataset. DataSet is the name of the dataset to which the data source should be linked.

If the data source already uses the specified dataset (or its parent dataset if the specified dataset is nested in another dataset), IsLinkedTo returns True. If the data source does not use the specified dataset IsLinkedTo returns False.

Note:	IsLinkedTo is a low-level method mainly of interest to component developers who need to detect circular data references. Otherwise IsLinkedTo should not be called directly.


Hierarchy

TObject

TPersistent

TComponent

TDataSource


TDateTimeField
 VCL Reference

TDateTimeField

Hierarchy	Properties	Methods	Events 	Using TDateTimeField	See also

TDateTimeField represents a date-time field in a dataset.

Unit

DB

Description

TDateTimeField encapsulates the fundamental behavior common to Date-time fields. Date-time fields contain combined date and time information, sometimes called timestamps. TDateTimeField introduces new properties to convert between date-time values and other data types, and to format the value of a date-time field for display.

Note:	Data-time values accessed through dbExpress use TSQLTimeStampField instead of TDateTimeField

If you use the Fields editor at design time to create a persistent field component for the date-time field, you can access it by name at runtime. When using dynamic field components, you can access the TDateTimeField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TDateTimeField properties

TDateTimeField	Alphabetically	Legend

In TDateTimeField

AsDateTime

AsFloat

AsSQLTimeStamp

AsString

AsVariant

DataSize

DisplayFormat

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsInteger

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDateTimeField properties

TDateTimeField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TDateTimeField.AsDateTime
 VCL Reference

TDateTimeField.AsDateTime

TDateTimeField	See also	Example

Represents the value of the date-time field as a TDateTime value.

property AsDateTime: TDateTime;

Description

Use AsDateTime to

Assign a date-time value to a date-time field.

Assign the date-time field value to a date-time variable.

AsDateTime uses date-time values stored in the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24 hour day that has elapsed.

The time portion of the date-time value is ignored when setting the AsDateTime property on a field where the DataType is ftDate. The date portion of the date-time value is ignored when setting the AsDateTime property on a field where the DataType is ftTime.

Similarly, reading the AsDateTime property of a field with DataType set to ftDate yields a date-time value of 12:00 AM on the date value of the field. Reading the AsDateTime property of a field with DataType set to ftTime yields a date-time value of the time value of the field on Dec. 30, 1899.

Reading or setting the AsDateTime property for a field with DataType set to ftDateTime treats both the date and time portions of the date-time value as meaningful.

Note:	Because TDateTimeField stores date and time values in the TDateTime type, AsDateTime is the same as Value for date-time fields. Use AsDateTime when working with field components where the actual class of the object is not known.


TDateTimeField.AsFloat
 VCL Reference

TDateTimeField.AsFloat

TDateTimeField	See also

Represents the value of the date-time field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign a floating-point value to a date-time field.

Assign the date-time field value to a floating-point variable.

For example, this code assigns a floating-point value to date-time field value:

MyDateTimeField.AsFloat := 35065.75; { A date and time of Jan 1, 1996 6:00 p.m. }

To assign date-time field value to a floating-point value, use code similar to this:

FloatVariable := MyDateTimeField.AsFloat;

TDateTimeField converts dates to the number of days that have passed since Dec. 30 1899. Time values are converted to the fraction of a 24-hour day that has elapsed. The floating-point value for a date-time quantity is the sum of the date and time values.

The fractional (time) portion of the floating-point value is ignored when setting the AsFloat property on a field where the DataType is ftDate. The integral (date) portion of the floating-point value is ignored when setting the AsFloat property on a field where the DataType is ftTime.

Similarly, reading the AsFloat property of a field with DataType set to ftDate yields a floating-point value with no fractional (time) part. Reading the AsFloat property of a field with DataType set to ftTime yields a floating-point value greater than -1 and less than 1.


TDateTimeField.AsSQLTimeStamp
 VCL Reference

TDateTimeField.AsSQLTimeStamp

TDateTimeField	See also

Represents the value of the date-time field as a TSQLTimeStamp record.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Use AsSQLTimeStamp to

Assign a TSQLTimeStamp value to a date-time field.

Assign the date-time field value to a TSQLTimeStamp variable.

It is easier to extract time information (such as the year, month, second, and so on) from a TSQLTimeStamp record than from the more common TDateTime type. However, if you intend to perform many calculations with the date-time value, the TDateTime type is more efficient.


TDateTimeField.AsString
 VCL Reference

TDateTimeField.AsString

TDateTimeField	See also

Represents the value of the date-time field as a string.

property AsString: String;

Description

Use AsString to

Assign a string to a date-time field.

Assign the date-time field value to a string.

For example, this code assigns a string to a date-time field value:

MyDateTimeField.AsString := '1/1/1997 8:00:00 AM';

To assign date-time field value to a string, use code similar to this:

Edit1.Text := MyDateTimeField.AsString;

If the DataType property value of the date-time field is ftDate, setting the AsString property uses the StrToDate function to convert the string to a date value. If the DataType is ftTime, setting the AsString property uses the StrToTime function. If the DataType is ftDateTime, setting the AsString property uses the StrToDateTime function.

Reading the AsString property yields the value of the date-time field formatted using the date and time format specified by the Windows Control Panel. This formats the date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

Note:	The format of the date (such as MM/DD/YY versus DD/MM/YY) depends on the current Windows settings. These settings can be overridden for the scope of the application only using the ShortDateFormat setting.)


TDateTimeField.AsVariant
 VCL Reference

TDateTimeField.AsVariant

TDateTimeField	See also

Represents the value of a date-time field as a Variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the date-time field value to Variant variable.

Assign a Variant value to the date-time field.

Using Variants is useful when the actual field type and the data type are unknown.


TDateTimeField.DataSize
 VCL Reference

TDateTimeField.DataSize

TDateTimeField	See also	Example

Specifies the amount of memory needed to store the value of a date-time field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a date-time field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For date-time fields, DataSize is always 8.


TDateTimeField.DisplayFormat
 VCL Reference

TDateTimeField.DisplayFormat

TDateTimeField	See also

Controls the formatting of the date-time field for display purposes.

property DisplayFormat: String;

Description

Use DisplayFormat to specify the formatting string to use for formatting the value in a date-time field when the field’s value appears as a string. If DisplayFormat is not assigned a string, the value is formatted according to the default date-time format specified by the Windows Control Panel.

Note:	DisplayFormat does not affect the value of the AsString property.

Construct a DisplayFormat string using these format specifiers:

Specifier	Displays

c	The date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

d	The day as a number without a leading zero (1-31).

dd	The day as a number with a leading zero (01-31).

ddd	The day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.

dddd	The day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.

ddddd	The date using the format given by the ShortDateFormat global variable.

dddddd	The date using the format given by the LongDateFormat global variable.

m	The month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm	The month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm	The month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.

mmmm	The month as a full name (January-December) using the strings given by the LongMonthNames global variable.

yy	The year as a two-digit number (00-99).

yyyy	The year as a four-digit number (0000-9999).

h	The hour without a leading zero (0-23).

hh	The hour with a leading zero (00-23).

n	The minute without a leading zero (0-59).

nn	The minute with a leading zero (00-59).

s	The second without a leading zero (0-59).

ss	The second with a leading zero (00-59).

t	The time using the format given by the ShortTimeFormat global variable.

tt	The time using the format given by the LongTimeFormat global variable.

am/pm	The time using the 12-hour clock for the preceding h or hh specifier, followed by "am" for any hour before noon, or "pm" for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p	The time using the 12-hour clock for the preceding h or hh specifier, followed by "a" for any hour before noon, or "p" for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm	The time using the 12-hour clock for the preceding h or hh specifier, followed by the contents of the TimeAMString global variable for any hour before noon, or the contents of the TimePMString global variable for any hour after noon.

/	The date separator character given by the DateSeparator global variable.

:	The time separator character given by the TimeSeparator global variable.

'xx'/"xx"	Characters enclosed in single or double quotes are displayed as-is, with no formatting changes.

Format specifiers may be written in uppercase or lowercase letters; both produce the same result.

If the string given by the Format parameter is empty, the date and time value is formatted as if a c format specifier had been given.


TDateTimeField.Value
 VCL Reference

TDateTimeField.Value

TDateTimeField	See also

Represents the value of the data in the date-time field.

property Value: TDateTime;

Description

Use Value to read data directly from and write data directly to a date-time field component at runtime. TDateTimeField components store and manipulate their data as TDateTime values. Thus, for date-time fields, the Value property is the same as the AsDateTime property.

var

  DT: TDateTime;

begin

  DT := Table1DateField.Value;

  ShowMessage(DateTimeToStr(DT));

end;


 VCL Reference

TDateTimeField events

TDateTimeField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDateTimeField events

TDateTimeField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDateTimeField methods

TDateTimeField	Alphabetically	Legend

In TDateTimeField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDateTimeField methods

TDateTimeField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TDateTimeField.Create
 VCL Reference

TDateTimeField.Create

TDateTimeField	See also

Creates and initializes a TDateTimeField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TDateTimeField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftDateTime. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TDateTimeField. After instantiating a TDateTimeField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TDateTimeField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TDateTimeField with a dataset component by setting its DataSet property to the name of the dataset component. Optionally set the DisplayFormat property to the desired date and time format.

The example below creates a TDateTimeField object for a field named CheckOut accessed through a TClientDataSet named ClientDataSet1.

var

  T: TDateTimeField;

begin

  ClientDataSet1.Close;

  T := TDateTimeField.Create(ClientDataSet1);

  T.FieldName := 'CheckOut';

  T.Name := ClientDataSet1.Name + T.FieldName;

  T.Index := ClientDataSet1.FieldCount;

  T.DataSet := ClientDataSet1;

  T.DisplayFormat := 'mm/dd/yyyy hh:nn:ss ampm';

  ClientDataSet1.FieldDefs.UpDate;

  ClientDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TDateTimeField


TDataSourceLink
 VCL Reference

TDataSourceLink

Hierarchy	Properties	Methods	See also

TDataSourceLink helps manage the link to the data source for a TDBLookupControl object.

Unit

DBCtrls

Description

TDataSourceLink is tailored to work with TDBLookupControl. It should only be used by the TDBLookupControl class.


 VCL Reference

TDataSourceLink properties

TDataSourceLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TDataSourceLink properties

TDataSourceLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TDataSourceLink methods

TDataSourceLink	Alphabetically	Legend

In TDataSourceLink

ActiveChanged

Create

FocusControl

LayoutChanged

RecordChanged

Derived from TDataLink

Destroy

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataSourceLink methods

TDataSourceLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

FocusControl

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

NewInstance

RecordChanged

SafeCallException

UpdateAction

UpdateRecord


TDataSourceLink.ActiveChanged
 VCL Reference

TDataSourceLink.ActiveChanged

TDataSourceLink	See also

Informs the TDBLookupControl of changes in the Active property of its DataSource.

procedure ActiveChanged; override;

Description

Applications can not call the ActiveChanged procedure directly. Changes in the Active property trigger this procedure. When the Active property becomes True, ActiveChanged causes the TDBLookupControl object to reacquire its DataField property. This ensures that the lookup control is working with the correct field component.


TDataSourceLink.Create
 VCL Reference

TDataSourceLink.Create

TDataSourceLink	See also

Creates an instance of TDataSourceLink.

constructor Create;

Description

Create is called from the constructor of any TlookupControl descendant object that uses a TDataSourceLink to implement its DataSource property.

After calling the inherited constructor, Create initializes the VisualControl property to True.


TDataSourceLink.FocusControl
 VCL Reference

TDataSourceLink.FocusControl

TDataSourceLink	See also

Moves input focus to the data field of the TDBLookupControl object.

type TFieldRef = ^TField;

procedure FocusControl(Field: TFieldRef); override;

Description

Applications can not call the FocusControl procedure. It is called automatically when a field component in the DataSet tries to set focus to a control on the form that represents the field. FocusControl moves focus to the DataField of the TDBLookupControl if it matches the Field parameter.


TDataSourceLink.LayoutChanged
 VCL Reference

TDataSourceLink.LayoutChanged

TDataSourceLink	See also

Responds to changes in the representation of the data.

procedure LayoutChanged; override;

Description

LayoutChanged updates the associated lookup control so that its field bindings remain accurate when the field order in the dataset changes.


TDataSourceLink.RecordChanged
 VCL Reference

TDataSourceLink.RecordChanged

TDataSourceLink	See also

Informs the TDBLookupControl of changes in the current record or field of the DataSource.

procedure RecordChanged(Field: TField); override;

Description

Applications can not call RecordChanged directly. It is triggered automatically after changes in the contents of the current record. If the Field parameter is the key field of the lookup control, or if the Field parameter is nil, indicating that the entire record changed, RecordChanged causes the lookup control to refetch the value of its key field.


Hierarchy

TObject

TPersistent

TDataLink

TDataSourceLink


TDBMemo
 VCL Reference

 TDBMemo

Hierarchy	Properties	Methods	Events 	Using TDBMemo	See also

TDBMemo represents a multiline edit control that can display and edit a field in a dataset.

Unit

DBCtrls

Description

Use TDBMemo to let users edit a field that may contain lengthy textual data or to simply display the contents of such a field. TDBMemo uses the Text property to represent the contents of the field.

TDBMemo permits multiple lines of text. Thus, TDBMemo is appropriate for long alphanumeric fields or text binary large objects (BLOBs). For short alphanumeric fields, consider using a TDBEdit component instead.

If the application doesn’t require the data-aware capabilities of TDBMemo, use a memo control (TMemo) instead, to conserve system resources.


 VCL Reference

TDBMemo properties

TDBMemo	Alphabetically	Legend

In TDBMemo

AutoDisplay

DataField

DataSource

Field

ReadOnly

Derived from TCustomMemo

Alignment

CaretPos

Lines

ScrollBars

WantReturns

WantTabs

WordWrap

Derived from TCustomEdit

BorderStyle

CanUndo

HideSelection

MaxLength

Modified

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBMemo properties

TDBMemo	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

AutoDisplay

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

ImeMode

ImeName

Left

Lines

LRDockWidth

MaxLength

Modified

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ScrollBars

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WantReturns

WantTabs

Width

WindowProc

WordWrap


TDBMemo.AutoDisplay
 VCL Reference

TDBMemo.AutoDisplay

TDBMemo	See also 	Example

Determines whether to automatically display the contents of a memo or graphic BLOB in a database memo.

property AutoDisplay: Boolean;

Description

If AutoDisplay is True, the control automatically displays new data when the underlying BLOB field changes (such as when moving to a new record).

If AutoDisplay is False, the control shows only the field name whenever the underlying BLOB field changes. To display the data, the user can double-click on the control or select it and press Enter.

The effect of AutoDisplay is not purely cosmetic. The data shown by the TDBMemo is the value of the Text property. When AutoDisplay is False, if the data changes, the value of the Text property changes to the name of the field. Thus, if AutoDisplay is False, applications should be cautious about using the value of the Text property to ascertain the value of the underlying field.

Calling the LoadMemo method causes Text to update to the current value of the BLOB field. This change will also be reflected in the appearance of the control on screen.

Change the value of AutoDisplay to False if the automatic loading of BLOB fields takes too long.

Note:	AutoDisplay only applies to BLOB fields. If the control is bound to another type of text field, AutoDisplay has no effect.


TDBMemo.DataField
 VCL Reference

TDBMemo.DataField

TDBMemo	See also

Specifies the name of the field for which the database memo displays data.

property DataField: String;

Description

Use DataField to link the memo control to a field in the dataset. Just setting DataField by itself will not link the memo control to a database field. Additionally, the dataset which contains the field must be specified by setting the DataSource property.

DBMemo1.DataField := 'Notes';


TDBMemo.DataSource
 VCL Reference

TDBMemo.DataSource

TDBMemo	See also

Links the memo control to the dataset that contains the field for which the memo control displays data.

property DataSource: TDataSource;

Description

Link the memo control with a dataset by setting DataSource to a data source component that identifies the desired dataset. Specify which field in the dataset contains the memo data using the DataField property.

DBMemo1.DataSource := DataSource1;


TDBMemo.Field
 VCL Reference

TDBMemo.Field

TDBMemo	See also

Identifies the TField component the database memo is linked to.

property Field: TField;

Description

Read Field to get direct access to the contents and properties of the database field without going through the edit window. Use Field to change the contents of the database field programmatically.

Use the Text property instead to change the contents of the memo control without immediately writing the changes to the record in the dataset. Changing the Text property allows the user to cancel the changes.

(DBMemo1.Field as TMemoField).Assign(Memo1.Lines);


TDBMemo.ReadOnly
 VCL Reference

TDBMemo.ReadOnly

TDBMemo	See also

Determines whether the user can change the contents of the database memo.

property ReadOnly: Boolean;

Description

If ReadOnly is True, the user can't change the contents. If ReadOnly is False, the user can modify the contents.

The ReadOnly property determines whether the user can use the database memo to change the value of the field of the current record, or if the control only displays the value. If ReadOnly is False, the user can change the field's value as long as the dataset is in edit mode.


 VCL Reference

TDBMemo events

TDBMemo	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBMemo events

TDBMemo	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBMemo methods

TDBMemo	Alphabetically	Legend

In TDBMemo

Change

Create

Destroy

ExecuteAction

KeyDown

KeyPress

LoadMemo

Notification

UpdateAction

UseRightToLeftAlignment

WndProc

Derived from TCustomMemo

GetControlsAlignment

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBMemo methods

TDBMemo	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

LoadMemo

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TDBMemo.Change
 VCL Reference

TDBMemo.Change

TDBMemo	See also

Informs the data source of changes to the value of the text, before invoking the OnChange event handler.

procedure Change; override;

Description

Applications do not call the Change method directly: it is triggered automatically by Windows events. Derived classes can override the Change method to make additional responses to changes in the Text property. Any class that overrides the Change method should call the inherited method as well.


TDBMemo.Create
 VCL Reference

TDBMemo.Create

TDBMemo	See also

Creates an instance of TDBMemo.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TDBMemo. Create overrides the inherited constructor to initialize the data handling aspects of a TDBMemo.

Pass a single Component as a parameter to provide the TDBMemo with an Owner that is responsible for freeing it.


TDBMemo.Destroy
 VCL Reference

TDBMemo.Destroy

TDBMemo	See also

Destroys an instance of TDBMemo.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBMemo reference is not nil and only then calls Destroy.

Destroy frees up the memory associated with data handling that was allocated in the constructor, before calling the inherited destructor.


TDBMemo.ExecuteAction
 VCL Reference

TDBMemo.ExecuteAction

TDBMemo	See also

Invokes an action with the TDBMemo as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBMemo as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBMemo could not handle the action.


TDBMemo.KeyDown
 VCL Reference

TDBMemo.KeyDown

TDBMemo	See also

Overrides the inherited method to put the dataset in an editing state if the user types Del or Shift+Insert.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

KeyDown first calls the inherited method, which calls the OnKeyDown event handler. KeyDown next attempts to put the dataset into an editing state when the user types Del or Shift+Insert. If the memo control is not linked to a dataset, KeyDown discards the keystroke. Derived classes can override KeyDown to handle additional key combinations, but the inherited method should always be called.


TDBMemo.KeyPress
 VCL Reference

TDBMemo.KeyPress

TDBMemo	See also

KeyPress overrides the inherited method to handle any keystrokes that alter the state of the edit control.

procedure KeyPress(var Key: Char); override;

Description

KeyPress first calls the inherited method, which calls the OnKeyPress event handler. Next, KeyPress checks the value of the key, and throws it away if it is not a valid character for the field type, or if there is no link to a database field. Valid characters cause KeyPress to attempt to put the dataset into edit mode.

If the field for the memo control is a text BLOB, pressing the Pause key causes KeyPress to call the LoadMemo method. Pressing the Escape key causes KeyPress to throw away unposted edits.


TDBMemo.LoadMemo
 VCL Reference

TDBMemo.LoadMemo

TDBMemo	See also 	Example

LoadMemo loads the text BLOB from the field in the database into the memo control.

procedure LoadMemo; virtual;

Description

LoadMemo allows an application to control when the memo control displays the actual contents of a text BLOB field. Use LoadMemo to update the text in the memo control to the value of the field in the current record. LoadMemo only works with text BLOB fields, when the AutoDisplay property is False, so that the value of the field is not loaded automatically.


TDBMemo.Notification
 VCL Reference

TDBMemo.Notification

TDBMemo	See also

Overrides the inherited method to respond to opRemove notifications on the DataSource.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the notification indicates the removal of the DataSource. If so, Notification sets the DataSource property to nil.

Derived classes can override Notification method to handle additional notifications, but the inherited method should be always be called.


TDBMemo.UpdateAction
 VCL Reference

TDBMemo.UpdateAction

TDBMemo	See also

Updates an action to reflect the current state of the TDBMemo.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBMemo an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBMemo they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBMemo.WndProc
 VCL Reference

TDBMemo.::WndProc

TDBMemo	See also

Provides specific message responses for the memo control.

procedure WndProc(var Message: TMessage); override;

Description

WndProc overrides the WndProc for TWinControl to handle window messages that are specific to painting a TDBMemo control, and sends all others to the inherited WndProc.

Derived classes that override WndProc to provide specialized responses to messages should call the inherited WndProc at the end to dispatch any other messages.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo

TDBMemo


TDataSetDelete
 VCL Reference

TDataSetDelete

Hierarchy	Properties	Methods	Events	Using TDataSetDelete	See also

TDataSetDelete deletes the current record, making the next record current.

Unit

DBActns

Description

Add TDataSetDelete to an action list to allow users to delete records from a dataset. Controls such as menu items and tool buttons linked to this action cause the application to delete the current record of a dataset.

TDataSetDelete is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetDelete automatically disables itself if it does not have a target data source attached to an active, nonempty dataset that permits edits.


 VCL Reference

TDataSetDelete properties

TDataSetDelete	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetDelete properties

TDataSetDelete	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetDelete events

TDataSetDelete	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetDelete events

TDataSetDelete	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetDelete methods

TDataSetDelete	Alphabetically	Legend

In TDataSetDelete

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetDelete methods

TDataSetDelete	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetDelete.ExecuteTarget
 VCL Reference

TDataSetDelete.ExecuteTarget

TDataSetDelete 	See also

Deletes the current record in the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Delete method to delete the current record and make the following record current.


TDataSetDelete.UpdateTarget
 VCL Reference

TDataSetDelete.UpdateTarget

TDataSetDelete 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetDelete, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is not empty and that permits edits. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetDelete


TDataSetNext
 VCL Reference

TDataSetNext

Hierarchy	Properties	Methods	Events	Using TDataSetNext	See also

TDataSetNext moves a target dataset to its next record.

Unit

DBActns

Description

Add TDataSetNext to an action list to allow users to navigate to the next record in a dataset. Controls such as menu items and tool buttons linked to this action cause the target dataset to move to the last record.

TDataSetNext is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetNext automatically disables itself if it does not have a target data source attached to an active dataset.


 VCL Reference

TDataSetNext properties

TDataSetNext	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetNext properties

TDataSetNext	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetNext events

TDataSetNext	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetNext events

TDataSetNext	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetNext methods

TDataSetNext	Alphabetically	Legend

In TDataSetNext

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetNext methods

TDataSetNext	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetNext.ExecuteTarget
 VCL Reference

TDataSetNext.ExecuteTarget

TDataSetNext 	See also

Navigates to the next record of the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Next method to move to the next record.


TDataSetNext.UpdateTarget
 VCL Reference

TDataSetNext.UpdateTarget

TDataSetNext 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetNext, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and which is not on the last record. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetNext


TDataSetPost
 VCL Reference

TDataSetPost

Hierarchy	Properties	Methods	Events	Using TDataSetPost	See also

TDataSetPost posts the edits in the current record of a target dataset.

Unit

DBActns

Description

Add TDataSetPost to an action list to allow users to post dataset records. Controls such as menu items and tool buttons linked to this action cause the target dataset to post any edits made to the current record.

TDataSetPost is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetPost automatically disables itself if it does not have a target data source attached to a dataset that is in edit mode.


 VCL Reference

TDataSetPost properties

TDataSetPost	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetPost properties

TDataSetPost	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetPost events

TDataSetPost	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetPost events

TDataSetPost	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetPost methods

TDataSetPost	Alphabetically	Legend

In TDataSetPost

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetPost methods

TDataSetPost	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetPost.ExecuteTarget
 VCL Reference

TDataSetPost.ExecuteTarget

TDataSetPost 	See also

Posts the current record in the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Post method to post all edits to the current record.


TDataSetPost.UpdateTarget
 VCL Reference

TDataSetPost.UpdateTarget

TDataSetPost 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetPost, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is in edit mode. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetPost


TDataSetFirst
 VCL Reference

TDataSetFirst

Hierarchy	Properties	Methods	Events	Using TDataSetFirst	See also

TDataSetFirst moves a target dataset to its first record.

Unit

DBActns

Description

Add TDataSetFirst to an action list to allow users to navigate to the first record in a dataset. Controls such as menu items and tool buttons linked to this action cause the target dataset to move to the first record.

TDataSetFirst is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetFirst automatically disables itself if it does not have a target data source attached to an active dataset that is not already on the first record.


 VCL Reference

TDataSetFirst properties

TDataSetFirst	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetFirst properties

TDataSetFirst	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetFirst events

TDataSetFirst	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetFirst events

TDataSetFirst	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetFirst methods

TDataSetFirst	Alphabetically	Legend

In TDataSetFirst

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetFirst methods

TDataSetFirst	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetFirst.ExecuteTarget
 VCL Reference

TDataSetFirst.ExecuteTarget

TDataSetFirst 	See also

Navigates to the first record of the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s First method to move to the first record.


TDataSetFirst.UpdateTarget
 VCL Reference

TDataSetFirst.UpdateTarget

TDataSetFirst 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetFirst, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and which is not already on the first record. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetFirst


TDataSetPrior
 VCL Reference

TDataSetPrior

Hierarchy	Properties	Methods	Events	Using TDataSetPrior	See also

TDataSetPrior moves a target dataset to the previous record.

Unit

DBActns

Description

Add TDataSetPrior to an action list to allow users to navigate to the previous record in a dataset. Controls such as menu items and tool buttons linked to this action cause the target dataset to move to the previous record.

TDataSetPrior is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. If you set DataSource, do not set it to a data source whose dataset is unidirectional. TDataSetPrior automatically disables itself if it does not have a target data source attached to an active dataset that is not on the first record.


 VCL Reference

TDataSetPrior properties

TDataSetPrior	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetPrior properties

TDataSetPrior	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetPrior events

TDataSetPrior	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetPrior events

TDataSetPrior	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetPrior methods

TDataSetPrior	Alphabetically	Legend

In TDataSetPrior

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetPrior methods

TDataSetPrior	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetPrior.ExecuteTarget
 VCL Reference

TDataSetPrior.ExecuteTarget

TDataSetPrior 	See also

Navigates to the previous record of the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Prior method to move to the previous record.


TDataSetPrior.UpdateTarget
 VCL Reference

TDataSetPrior.UpdateTarget

TDataSetPrior 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetPrior, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and which is not on the first record. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetPrior


TDataSetRefresh
 VCL Reference

TDataSetRefresh

Hierarchy	Properties	Methods	Events	Using TDataSetRefresh	See also

TDataSetRefresh refreshes the records in a target dataset.

Unit

DBActns

Description

Add TDataSetRefresh to an action list to allow users to refresh a dataset with the most current data. Controls such as menu items and tool buttons linked to this action cause the target dataset to refetch its data.

TDataSetRefresh is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetRefresh automatically disables itself if it does not have a target data source attached to an active dataset.


 VCL Reference

TDataSetRefresh properties

TDataSetRefresh	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetRefresh properties

TDataSetRefresh	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetRefresh events

TDataSetRefresh	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetRefresh events

TDataSetRefresh	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetRefresh methods

TDataSetRefresh	Alphabetically	Legend

In TDataSetRefresh

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetRefresh methods

TDataSetRefresh	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetRefresh.ExecuteTarget
 VCL Reference

TDataSetRefresh.ExecuteTarget

TDataSetRefresh 	See also

Refreshes the data of a target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Refresh method to refetch the most current data.


TDataSetRefresh.UpdateTarget
 VCL Reference

TDataSetRefresh.UpdateTarget

TDataSetRefresh 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetRefresh, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and permits edits. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetRefresh


TDataSetResolver
 VCL Reference

TDataSetResolver

Hierarchy	Properties	Methods	See also

TDataSetResolver applies updates to a dataset on behalf of a provider.

Unit

Provider

Description

TDataSetProvider components use TDataSetResolver to apply updates to a dataset when their ResolveToDataSet property is True. Otherwise, they use TSQLResolver.

Do not create instances of TDataSetResolver. Provider components create their own TDataSetResolver objects for applying updates.


 VCL Reference

TDataSetResolver properties

TDataSetResolver	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetResolver properties

TDataSetResolver	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetResolver methods

TDataSetResolver	Alphabetically	Legend

In TDataSetResolver

Create

Derived from TCustomResolver

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetResolver methods

TDataSetResolver	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSetResolver.Create
 VCL Reference

TDataSetResolver.Create

TDataSetResolver	See also

Creates and initializes a dataset resolver.

constructor Create(AProvider: TDataSetProvider); reintroduce;

Description

Provider components call Create when they need a resolver component for applying updates to a dataset. The AProvider parameter specifies the provider that creates and uses the resolver.

Do not create resolver instances directly. Resolvers are designed to be created and used by providers, and can not function independently of a provider.


Hierarchy

TObject

TPersistent

TComponent

TCustomResolver

TDataSetResolver


TDataSetTableProducer
 VCL Reference

 TDataSetTableProducer

Hierarchy	Properties	Methods	Events	Using TDataSetTableProducer	See also

TDataSetTableProducer assembles a sequence of HTML commands to display the records from a dataset in a tabular format.

Unit

DBWeb

Description

Use TDataSetTableProducer to produce an HTML table for the records of a TDataSet object. If the dataset is a query that requires input parameters from an HTTP request message, use TQueryTableProducer instead.

TDataSetTableProducer allows an application to create images of a dataset for an HTTP response message.


 VCL Reference

TDataSetTableProducer properties

TDataSetTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

Caption

CaptionAlignment

Columns

DataSet

Editor

Footer

Header

MaxRows

RowAttributes

TableAttributes

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetTableProducer properties

TDataSetTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

MaxRows

Name

Owner

RowAttributes

TableAttributes

Tag

VCLComObject


 VCL Reference

TDataSetTableProducer events

TDataSetTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TDataSetTableProducer events

TDataSetTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TDataSetTableProducer methods

TDataSetTableProducer	Alphabetically	Legend

In TDataSetTableProducer

Content

Derived from TDSTableProducer

BeginUpdate

Create

Destroy

EndUpdate

Derived from TCustomContentProducer

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetTableProducer methods

TDataSetTableProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

EndUpdate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataSetTableProducer.Content
 VCL Reference

TDataSetTableProducer.Content

TDataSetTableProducer	See also	Example

Returns the HTML representation of the records in the dataset.

function Content: string; override;

Description

Call Content to retrieve the HTML representation specified by the properties of the TDataSetTableProducer object. Content calls the OnCreateContent event handler. If the OnCreateContent event handler indicates that the Content method should continue, Content returns the Header property, followed by an HTML table image of the records in the dataset, followed by the Footer property. If the OnCreateContent event handler indicates that the Content method should not continue, Content returns an empty string.

The string returned by Content can be used as the Content property of the response to an HTTP request message.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TDSTableProducer

TDataSetTableProducer


TDSTableProducer
 VCL Reference

 TDSTableProducer

Hierarchy	Properties	Methods	Events	See also

TDSTableProducer is the base class for objects that produce a set of HTML commands to display the records from a dataset in a tabular format.

Unit

DBWeb

Description

Use TDSTableProducer as a base class when defining a class that produces an HTML table that represents the records of a dataset. TDSTableProducer introduces many properties to describe the appearance and data binding of the HTML table. The events and methods of TDSTableProducer allow an application to retrieve the database information and produce the HTML commands that describe the table.


 VCL Reference

TDSTableProducer properties

TDSTableProducer	Alphabetically	Legend

In TDSTableProducer

Caption

CaptionAlignment

Columns

DataLink

DataSet

DataSource

Editor

Footer

Header

InternalDataSource

MaxRows

RowAttributes

TableAttributes

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDSTableProducer properties

TDSTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataLink

DataSet

DataSource

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

InternalDataSource

MaxRows

Name

Owner

RowAttributes

TableAttributes

Tag

VCLComObject


TDSTableProducer.Caption
 VCL Reference

TDSTableProducer.Caption

TDSTableProducer	See also

Specifies the caption string that appears with the HTML table.

property Caption: string;

Description

Set Caption to add a caption to the HTML table that represents the dataset. Caption indicates the text that should appear inside the HTML CAPTION tag.


TDSTableProducer.CaptionAlignment
 VCL Reference

TDSTableProducer.CaptionAlignment

TDSTableProducer	See also

Specifies where the Caption string should appear relative to the HTML table.

type THTMLCaptionAlignment = (caDefault, caTop, caBottom);

property CaptionAlignment: THTMLCaptionAlignment;

Description

Set CaptionAlignment to specify whether the Caption should appear above or below the HTML table. CaptionAlignment can be one of the following values:

Value	Meaning

caDefault	The Web browser can position the caption where it wants.

caTop	The caption should appear above the HTML table.

caBottom	The caption should appear below the HTML table.

CaptionAlignment is the value of the ALIGN option on the HTML CAPTION tag.


TDSTableProducer.Columns
 VCL Reference

TDSTableProducer.Columns

TDSTableProducer	See also 	Example

Describes the field bindings and display attributes of the columns in the HTML table.

property Columns: THTMLTableColumns;

Description

Use Columns to read or set the field bindings and display attributes of the columns in the HTML table. Each THTMLTableColumn object specifies the display attributes of the corresponding column. Each column object also specifies the name of the field the column represents. The field binding of a column designates a field within the dataset specified by the DataSet property.

Columns can be set at design time through a property editor, or programmatically at runtime.


TDSTableProducer.DataLink
 VCL Reference

TDSTableProducer.DataLink

TDSTableProducer	See also

Manages the link to the dataset.

property DataLink: THTTPDataLink;

Description

Applications cannot use the DataLink property. It is exposed as a protected property so that descendant HTML producers can customize their response to data events.


TDSTableProducer.DataSet
 VCL Reference

TDSTableProducer.DataSet

TDSTableProducer	See also

Specifies the dataset from which the data in the HTML table is taken.

property DataSet: TDataSet;

Description

Set DataSet to specify where the TDSTableProducer should look for the data it displays in the HTML table. The individual field bindings specified by the THTMLTableColumn objects in the Columns property refer to fields in DataSet.

Specify the data binding of a TDSTableProducer using the DataSet property rather than through a DataSource property. TDSTableProducer objects do not use an external TDataSource object.


TDSTableProducer.DataSource
 VCL Reference

TDSTableProducer.DataSource

TDSTableProducer	See also

Represents the link to the DataSet of the TDSTableProducer.

property DataSource: TDataSource;

Description

Do not use the DataSource property. The data source of a TDSTableProducer object is an internally generated TDataSource object that is used for internal interfaces that do not work directly with a TDataSet object.

The InternalDataSource property provides read-only access to the data source represented by DataSource.


TDSTableProducer.Editor
 VCL Reference

TDSTableProducer.Editor

TDSTableProducer

Writes changes made in the property editor at design time to the TDSTableProducer object.

property Editor: TDSTableProducerEditor;

Description

Descendants of TDSTableProducer set the Editor property to the TDSTableProducerEditor object that connects their implementation with a common property editor. Editor allows a single property editor to represent the properties of different table producers.


TDSTableProducer.Footer
 VCL Reference

TDSTableProducer.Footer

TDSTableProducer	See also

Specifies a set of HTML commands that appear in the HTML document following the HTML table.

property Footer: TStrings;

Description

Set Footer to embed the representation of DataSet in a larger document. The Content method of TDSTableProducer descendants returns any Header commands, followed by the HTML table that represents the DataSet, followed by any Footer commands.


TDSTableProducer.Header
 VCL Reference

TDSTableProducer.Header

TDSTableProducer	See also	Example

Specifies a set of HTML commands that appear in the HTML document preceding the HTML table.

property Header: TStrings;

Description

Set Header to embed the representation of DataSet in a larger document. The Content method of TDSTableProducer descendants returns any Header commands, followed by the HTML table that represents the DataSet, followed by any Footer commands.


TDSTableProducer.InternalDataSource
 VCL Reference

TDSTableProducer.InternalDataSource

TDSTableProducer	See also

Represents the link to the dataset.

property InternalDataSource: TDataSource;

Description

Descendants of TDSTableProducer read InternalDataSource to access the properties and methods of the data source. Unlike other data-aware components, TDSTableProducer does not use an external TDataSource object.


TDSTableProducer.MaxRows
 VCL Reference

TDSTableProducer.MaxRows

TDSTableProducer	See also

Specifies the maximum number of rows that appear in the HTML table.

property MaxRows: Integer;

Description

Set MaxRows to change the upper limit on the size of the HTML table produced to represent the DataSet. MaxRows is initialized to 20.

If DataSet contains more than MaxRows records, only the first MaxRows records appear in the HTML commands produced by Content. If DataSet contains fewer than MaxRows records, the HTML table produced by TDSTableProducer will contain only enough rows to display all the records in DataSet.


TDSTableProducer.RowAttributes
 VCL Reference

TDSTableProducer.RowAttributes

TDSTableProducer	See also

Specifies the display attributes of all the rows in the HTML table.

property RowAttributes: THTMLTableRowAttributes;

Description

Set RowAttributes to a THTMLTableRowAttributes object that describes the display attributes of the rows in the HTML table. Setting RowAttributes calls the Assign method of the THTMLTableRowAttributes object stored internally by TDSTableProducer. Thus, the memory for any row attributes object assigned to the RowAttributes property is never owned or freed by TDSTableProducer.

Note:	Not all the properties of the row attributes object are copied when one row attributes object is assigned to another. To ensure that all the attributes represented by RowAttributes are set appropriately, read RowAttributes and set the individual properties of the THTMLTableRowAttributes object.


TDSTableProducer.TableAttributes
 VCL Reference

TDSTableProducer.TableAttributes

TDSTableProducer	See also

Specifies the display attributes that pertain to the entire HTML table produced by TDSTableProducer.

property TableAttributes: THTMLTableAttributes;

Description

Set TableAttributes to a THTMLTableAttributes object that describes the display attributes for the HTML TABLE tag. Setting TableAttributes calls the Assign method of the THTMLTableAttributes object stored internally by TDSTableProducer. Thus, the memory for any table attributes object assigned to the TableAttributes property is never owned or freed by TDSTableProducer.

Note:	Not all the properties of the table attributes object are copied when one table attributes object is assigned to another. To ensure that all the attributes represented by TableAttributes are set appropriately, read TableAttributes and set the individual properties of the THTMLTableAttributes object.


 VCL Reference

TDSTableProducer events

TDSTableProducer	Alphabetically	Legend

In TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TDSTableProducer events

TDSTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


TDSTableProducer.OnCreateContent
 VCL Reference

TDSTableProducer.OnCreateContent

TDSTableProducer	See also

Occurs in descendants of TDSTableProducer when the Content method needs to generate the HTML table image.

type TCreateContentEvent = procedure (Sender: TObject; var Continue: Boolean) of object;

property OnCreateContent: TCreateContentEvent;

Description

Write an OnCreateContent event handler to conditionally prevent the Content method from producing any HTML commands. Set the Continue parameter to False to make Content return an empty string.


TDSTableProducer.OnFormatCell
 VCL Reference

TDSTableProducer.OnFormatCell

TDSTableProducer	See also

Occurs when the HTML for a specified cell specified is about to be generated.

type

  THTMLBgColor = type string;

THTMLAlign = (haDefault, haLeft, haRight, haCenter);

THTMLVAlign = (haVDefault, haTop, haMiddle, haBottom, haBaseline);

THTMLFormatCellEvent = procedure (Sender: TObject; CellRow, CellColumn: Integer; var BgColor: THTMLBgColor; var Align: THTMLAlign; var VAlign: THTMLVAlign; var CustomAttrs, CellData: string) of object;

property OnFormatCell: THTMLFormatCellEvent;

Description

Write an OnFormatCell event handler to change the appearance or contents of individual cells in the HTML table from the default values produced by TDSTableProducer. CellRow and CellColumn specify the cell that is about to be generated, where the table header is CellRow 0, and the first column is CellColumn 0.

BgColor, Align, VAlign, and CustomAttrs represent the default display properties for the cell, taken from the THTMLTableColumn object for the column in which the cell appears. See the corresponding entries for these properties of the THTMLTableColumn object for more information on these values.

CellData is the text that appears in the cell, taken from the field object for the column. The OnFormatCell event handler can change any or all of these values to specify the way the cell should appear in the final HTML table.


TDSTableProducer.OnGetTableCaption
 VCL Reference

TDSTableProducer.OnGetTableCaption

TDSTableProducer	See also

Occurs when the HTML table producer is about to generate the HTML for the table caption.

type

  THTMLCaptionAlignment = (caDefault, caTop, caBottom);

  THTMLGetTableCaptionEvent = procedure (Sender: TObject; var Caption: string; var Alignment: THTMLCaptionAlignment) of object;

property OnGetTableCaption: THTMLGetTableCaptionEvent;

Description

Write an OnGetTableCaption event handler to change the value or placement of the HTML table caption. The Caption and Alignment parameters are originally set to the values of the Caption and CaptionAlignment properties, respectively. The OnGetTableCaption event handler can change these values to alter the caption for the HTML table returned by the Content method.


 VCL Reference

TDSTableProducer methods

TDSTableProducer	Alphabetically	Legend

In TDSTableProducer

AcquireLayoutLock

BeginLayout

BeginUpdate

ColumnHeader

Create

DefineFieldMap

Destroy

DoCreateContent

DoFormatCell

DoGetCaption

EndLayout

EndUpdate

FormatCell

GetDataSet

GetDataSource

LayoutChanged

LinkActive

Notification

RowHeader

SetColumns

SetDataSet

SetDataSource

StoreColumns

TableCaption

TableHeader

Derived from TCustomContentProducer

Content

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDSTableProducer methods

TDSTableProducer	By object	Legend

AcquireLayoutLock

AfterConstruction

Assign

BeforeDestruction

BeginLayout

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ColumnHeader

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

DefineFieldMap

Destroy

DestroyComponents

Destroying

Dispatch

DoCreateContent

DoFormatCell

DoGetCaption

EndLayout

EndUpdate

ExecuteAction

FieldAddress

FindComponent

FormatCell

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDataSet

GetDataSource

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LayoutChanged

LinkActive

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowHeader

SafeCallException

SetColumns

SetDataSet

SetDataSource

SetSubComponent

StoreColumns

TableCaption

TableHeader

UpdateAction


TDSTableProducer.AcquireLayoutLock
 VCL Reference

TDSTableProducer.AcquireLayoutLock

TDSTableProducer	See also

Calls BeginLayout when the HTML table is not currently being laid out.

function AcquireLayoutLock: Boolean;

Description

Applications cannot call this protected method. AcquireLayoutLock is called before recomputing Columns when the fields in the dataset change or when the Columns property changes. AcquireLayoutLock returns True if the HTML table is not already being laid out, to indicate that the computation of Columns should proceed. AcquireLayoutLock prevents the computation of Columns from looping endlessly in response to the changes that occur during the computation.


TDSTableProducer.BeginLayout
 VCL Reference

TDSTableProducer.BeginLayout

TDSTableProducer	See also

Increments a counter that indicates the number of times the computation of the column order was begun but not completed.

procedure BeginLayout;

Description

Applications cannot call this protected method. TDSTableProducer calls BeginLayout internally before making changes to the Columns property or any of the individual THTMLTableColumn objects in Columns. Once the change is complete, TDSTableProducer calls EndLayout.

When all BeginLayout calls have been matched by a corresponding call to EndLayout, the field mapping maintained by DataLink for the fields in the dataset is updated to match both the field bindings of the Columns property and the fields available in the dataset. The Columns property is updated in turn to match the field bindings in DataLink. This ensures that the Columns property matches both the specified column bindings and the fields available in the dataset.


TDSTableProducer.BeginUpdate
 VCL Reference

TDSTableProducer.BeginUpdate

TDSTableProducer	See also

Increments a counter that indicates the number of changes to the contents of the HTML table that have been initiated but not completed.

procedure BeginUpdate;

Description

Applications should not call BeginUpdate. BeginUpdate is called internally before changes that affect the contents of the HTML table. Once a change is complete, EndUpdate is called. BeginUpdate and EndUpdate allow descendants of TDSTableProducer to wait until changes to the dataset are complete before fetching records for the HTML image of the table.


TDSTableProducer.ColumnHeader
 VCL Reference

TDSTableProducer.ColumnHeader

TDSTableProducer	See also

Returns the string of HTML <TH> tags that define the column headers for the table.

function ColumnHeader: string; dynamic;

Description

The table producer uses this protected method when it assembles its HTML table. For each THTMLTableColumn object listed in the Columns property, ColumnHeader looks up the string that labels it (using its Title property or the display name for the field if there is no title caption). ColumnHeader then creates a table header (<TH>) tag that describes the column label, including all the properties specified by the THTMLTableColumn object.


TDSTableProducer.Create
 VCL Reference

TDSTableProducer.Create

TDSTableProducer	See also

Creates an instance of TDSTableProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a table producer from within the OnAction event handler of a TWebActionItem that needs to produce an HTML image of a dataset in response to an HTTP request message.

After calling the inherited constructor, Create allocates all the helper objects used by TDSTableProducer and initializes the MaxRows property to 20.


TDSTableProducer.DefineFieldMap
 VCL Reference

TDSTableProducer.DefineFieldMap

TDSTableProducer	See also

Builds the Fields array in DataLink.

procedure DefineFieldMap;Description

Applications cannot call this protected method. DefineFieldMap rebuilds the field mapping for the dataset that is maintained by DataLink. This mapping reflects both the column bindings of the Columns property and the fields available in the dataset. After calling DefineFieldMap, the Columns property should be updated to match the field bindings in DataLink. This ensures that the Columns property reflects any changes imposed by the dataset.


TDSTableProducer.Destroy
 VCL Reference

TDSTableProducer.Destroy

TDSTableProducer	See also

Destroys an instance of TDSTableProducer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDSTableProducer reference is not nil, and only then calls Destroy.

Destroy frees all the helper objects used by TDSTableProducer.


TDSTableProducer.DoCreateContent
 VCL Reference

TDSTableProducer.DoCreateContent

TDSTableProducer	See also

Indicates whether the Content method should produce a string of HTML commands.

function DoCreateContent: Boolean;

Description

Applications can’t call this protected method. It is called internally by the Content method to allow the OnCreateContent event handler to block the creation of any HTML commands. If DoCreateContent returns True, Content assembles a string of HTML to describe the dataset. If DoCreateContent returns False, Content returns an empty string.

DoCreateContent calls the OnCreateContent event handler if one is assigned. If there is no OnCreateContent event handler, DoCreateContent returns True. Descendants of TDSTableProducer can override DoCreateContent to add additional restrictions on when the HTML describing DataSet should be produced, or to block the OnCreateContent event.


TDSTableProducer.DoFormatCell
 VCL Reference

TDSTableProducer.DoFormatCell

TDSTableProducer	See also

Generates an OnFormatCell event.

type

  THTMLBgColor = type string;

THTMLAlign = (haDefault, haLeft, haRight, haCenter);

THTMLVAlign = (haVDefault, haTop, haMiddle, haBottom, haBaseline);

procedure DoFormatCell(CellRow, CellColumn: Integer; var BgColor: THTMLBgColor; var Align:THTMLAlign; var VAlign: THTMLVAlign; var CustomAttrs, CellData: string); dynamic;

Description

Applications can’t call this protected method. It is called internally by the Content method to allow the OnFormatCell event handler to customize the contents or display attributes of any cell in the HTML table. CellRow and CellColumn indicate the cell about to be rendered as HTML, where CellRow for the table header is 0, and CellColumn for the first column is 0. BgColor, Align, VAlign, and CustomAttrs are the display attributes that can be changed. CellData is the text that goes in the cell.

Descendants of TDSTableProducer can override DoFormatCell to make additional changes to the cells as they are rendered or to block the OnFormatCell event.


TDSTableProducer.DoGetCaption
 VCL Reference

TDSTableProducer.DoGetCaption

TDSTableProducer	See also

Generates an OnGetCaption event.

type = (caDefault, caTop, caBottom);

procedure DoGetCaption(var TableCaption: string; var CaptionAlign: THTMLCaptionAlignment); dynamic;

Description

Applications can’t call this protected method. It is called internally by the Content method to let the OnGetTableCaption event handler change the Caption and CaptionAlignment properties when the table caption is rendered as HTML.

Descendants of TDSTableProducer can override DoCreateCaption to make additional changes when the caption is rendered or to block the OnCreateCaption event.


TDSTableProducer.EndLayout
 VCL Reference

TDSTableProducer.EndLayout

TDSTableProducer	See also

Decrements a counter that indicates the number of times the computation of the column order has been begun but not completed.

procedure EndLayout;

Description

Applications can’t call this protected method. TDSTableProducer objects call EndLayout internally after making changes to the Columns property or when changes are made to the fields in DataSet.

Each call to EndLayout should match a corresponding call to BeginLayout. If all BeginLayout calls have been matched by an EndLayout call, EndLayout calls DefineFieldMap to regenerate the field mapping for the dataset maintained by DataLink. The Columns property is then updated to match the field map in DataLink. This ensures that the Columns property matches both the specified column bindings and the fields available in the dataset.


TDSTableProducer.EndUpdate
 VCL Reference

TDSTableProducer.EndUpdate

TDSTableProducer	See also

Decrements a counter that indicates the number of changes to the contents of the HTML table.

procedure EndUpdate;

Description

Applications should not call EndUpdate. EndUpdate is called internally after changes to the column bindings or DataSet of the TDSTableProducer. BeginUpdate and EndUpdate allow descendants of TDSTableProducer to wait until changes to the dataset are complete before fetching records for the HTML image of the table.


TDSTableProducer.FormatCell
 VCL Reference

TDSTableProducer.FormatCell

TDSTableProducer	See also

Returns an HTML tag of a specified type that reflects a set of specified options.

function FormatCell(CellRow, CellColumn: Integer; CellData: string; const Tag: string; const BgColor: THTMLBgColor; Align: THTMLAlign; VAlign: THTMLVAlign;; const Custom: string): string; dynamic;

Description

The table producer uses this protected utility to assemble a set of properties into a single HTML tag. FormatCell first generates an OnFormatCell event, so that the application can override any of the properties that control the tag options. Then it assembles the resulting values into the specified tag.

CellRow and CellColumn identify the table cell to be formatted. These parameters are passed to an OnFormatCell event handler so that it can identify the cell.

CellData contains the text displayed in the cell (a data value or column header).

Tag indicates the type of HTML tag to generate (<TD> for data cells, <TH> for column headers).

BgColor specifies the background color of the cell. An OnFormatCell event handler can override this value.

Align specifies the horizontal alignment of CellData within the cell. An OnFormatCell event handler can override this value.

VAlign specifies the vertical alignment of CellData within the cell. An OnFormatCell event handler can override this value.

Custom specifies any other options for the generated HTML tag. An OnFormatCell event handler can override this value.

FormatCell returns a string with the generated HTML tag.


TDSTableProducer.GetDataSet
 VCL Reference

TDSTableProducer.GetDataSet

TDSTableProducer	See also

Provides the abstract prototype of a method to access the DataSet property.

function GetDataSet: TDataSet; virtual; abstract;

Description

Descendants of TDSTableProducer implement the GetDataSet method to access their specific implementation of the DataSet property. Descendants of TDSTableProducer restrict the DataSet property to different classes of TDataSet objects.


TDSTableProducer.GetDataSource
 VCL Reference

TDSTableProducer.GetDataSource

TDSTableProducer	See also

Returns the value of the DataSource property.

function GetDataSource: TDataSource;

Description

GetDataSource is exposed as a protected method so that descendants of TDSTableProducer can override the implementation of the DataSource property.

The DataSource property for TDSTableProducer is an internally generated TDataSource object, not an external component that can be shared with other objects. It is surfaced only for internal APIs that require a TDataSource object rather than working directly with TDataSet.


TDSTableProducer.LayoutChanged
 VCL Reference

TDSTableProducer.LayoutChanged

TDSTableProducer	See also

Causes the Columns property to be recomputed when the dataset changes or changes are made to individual column objects.

procedure LayoutChanged;

Description

Applications cannot call this protected method. It is called when the Columns property changes or the fields in the dataset change. LayoutChanged recomputes the Columns property after guarding against recursion from the changes to the Columns property that arise in the computation.

LayoutChanged calls AcquireLayoutLock to initiate the changes to Columns. If AcquireLayoutLock does not indicate that the call to LayoutChanged is recursive, LayoutChanged calls EndLayout to perform the actual computation.


TDSTableProducer.LinkActive
 VCL Reference

TDSTableProducer.LinkActive

TDSTableProducer	See also

Recomputes the Columns property when the dataset becomes active.

procedure LinkActive(Value: Boolean);

Description

Applications cannot call this protected method. LinkActive is called when the DataSource property changes or when the dataset becomes active. It recomputes Columns to reflect any changes that may have occurred in the fields of the dataset when it was not active.


TDSTableProducer.Notification
 VCL Reference

TDSTableProducer.Notification

TDSTableProducer	See also

Adjusts the properties of TDSTableProducer when its helper objects are destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification overrides the inherited method to respond to messages that the DataSource or one of its field objects is about to be destroyed. Notification sets the DataSource property to nil, or unbinds the column that references the field component.


TDSTableProducer.RowHeader
 VCL Reference

TDSTableProducer.RowHeader

TDSTableProducer	See also

Returns the HTML <TR> tag that defines each row of the HTML table.

function RowHeader: string; dynamic;

Description

The table producer calls this protected method for each row when it assembles its HTML table. RowHeader generates an HTML table row tag (<TR>), using the RowAttributes property to determine what options are added to the tag.


TDSTableProducer.SetColumns
 VCL Reference

TDSTableProducer.SetColumns

TDSTableProducer	See also

Sets the Columns property.

procedure SetColumns(Value: THTMLTableColumns);

Description

SetColumns is the protected method used to set the Columns property. SetColumns calls the Assign method of the THTMLTableColumns object stored internally by TDSTableProducer. Thus, the memory for any columns object assigned to the Columns property is never owned or freed by TDSTableProducer.


TDSTableProducer.SetDataSet
 VCL Reference

TDSTableProducer.SetDataSet

TDSTableProducer	See also

Provides the abstract prototype of a method to set the DataSet property.

procedure SetDataSet(ADataSet: TDataSet); virtual; abstract;

Description

Descendants of TDSTableProducer override SetDataSet to ensure that the DataSet property can only be set to an appropriate descendant of TDataSet.


TDSTableProducer.SetDataSource
 VCL Reference

TDSTableProducer.SetDataSource

TDSTableProducer	See also

Sets the DataSource property.

procedure SetDataSource(Value: TDataSource);

Description

SetDataSource is the protected implementation of the DataSource property.

The DataSource property for TDSTableProducer is an internally generated TDataSource object, not an external component that can be shared with other objects. It is surfaced only for internal API calls that require a TDataSource object rather than working directly with TDataSet.


TDSTableProducer.StoreColumns
 VCL Reference

TDSTableProducer.StoreColumns

TDSTableProducer	See also

Indicates whether the Columns property is stored when the TDSTableProducer is saved.

function StoreColumns: Boolean;

Description

StoreColumns causes the Columns property to be stored only when the Columns property has a State property of csCustom. The State property for Columns indicates whether the columns represent default display attributes for all the fields in the dataset, or if the display attributes or field bindings of the columns have been customized programmatically or by the Columns editor.


TDSTableProducer.TableCaption
 VCL Reference

TDSTableProducer.TableCaption

TDSTableProducer	See also

Returns the HTML <Caption> tag that defines the caption for the HTML table.

function TableCaption: string; dynamic;

Description

The table producer calls this protected method when it assembles its HTML table. TableCaption generates an OnGetTableCaption event to allow an event handler to override the Caption and CaptionAlignment properties. It then returns the HTML table caption tag (<caption>) with the resulting caption and alignment.


TDSTableProducer.TableHeader
 VCL Reference

TDSTableProducer.TableHeader

TDSTableProducer	See also

Returns the HTML <Table> tag for the HTML table.

function TableHeader: string; dynamic;

Description

The table producer calls this protected method when it assembles its HTML table. TableHeader generates an HTML table tag (<Table>), using the TableAttributes property to determine what options are added to the tag.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TDSTableProducer


TDSTableProducerEditor
 VCL Reference

TDSTableProducerEditor

Hierarchy	Properties	Methods	See also

TDSTableProducer is the base class for the helper object used by TDSTableProducer objects to communicate with a property editor at design time.

Unit

DBWeb

Description

Component writers can derive objects from TDSTableProducer to enable new descendants of TDSTableProducer to take advantage of the property editors in the IDE. TDSTableProducerEditor introduces methods to communicate changes between a TDSTableProducer object and the property editor.


 VCL Reference

TDSTableProducerEditor properties

TDSTableProducerEditor	Alphabetically	Legend

In TDSTableProducerEditor

DataSource

DSTableProducer


 VCL Reference

TDSTableProducerEditor properties

TDSTableProducerEditor	By object	Legend

DataSource

DSTableProducer


TDSTableProducerEditor.DataSource
 VCL Reference

TDSTableProducerEditor.DataSource

TDSTableProducerEditor	See also

Indicates the DataSource property of the associated TDSTableProducer.

property DataSource: TDataSource;

Description

Applications should not directly change the DataSource property. DataSource allows the property editor to read or change the internal data source of the TDSTableProducer object.


TDSTableProducerEditor.DSTableProducer
 VCL Reference

TDSTableProducerEditor.DSTableProducer

TDSTableProducerEditor	See also

Indicates the TDSTableProducer object that uses TDSTableProducerEditor to communicate with its property editor at design time.

property DSTableProducer: TDSTableProducer;

Description

Read TDSTableProducer to obtain direct access to the TDSTableProducer object that uses TDSTableProducerEditor.


 VCL Reference

TDSTableProducerEditor methods

TDSTableProducerEditor	Alphabetically	Legend

In TDSTableProducerEditor

Changed

Create

Destroy

PostChange

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDSTableProducerEditor methods

TDSTableProducerEditor	By object	Legend

AfterConstruction

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

PostChange

SafeCallException


TDSTableProducerEditor.Changed
 VCL Reference

TDSTableProducerEditor.Changed

TDSTableProducerEditor	See also

Provides the interface for a method that responds to change notifications from the TDSTableProducer object.

procedure Changed; virtual;

Description

The Changed method for TDSTableProducerEditor does nothing. It exists so that descendants of TDSTableProducerEditor can perform any necessary updates when the TDSTableProducer object changes. TDSTableProducer calls Changed when any of its properties change.


TDSTableProducerEditor.Create
 VCL Reference

TDSTableProducerEditor.Create

TDSTableProducerEditor	See also

Creates an instance of TDSTableProducerEditor.

constructor Create(DSTableProducer: TDSTableProducer);

Description

Do not call Create directly in an application. A TDSTableProducerEditor is created at design time when needed.

Create initializes the DSTableProducer property, and sets the Editor property in the TDSTableProducer object passed as the DSTableProducer parameter.


TDSTableProducerEditor.Destroy
 VCL Reference

TDSTableProducerEditor.Destroy

TDSTableProducerEditor	See also

Destroys an instance of TDSTableProducerEditor.

destructor Destroy; override;

Description

Do not call Destroy from an application. A TDSTableProducerEditor object is freed automatically at design time. Destroy sets the Editor property of the associated TDSTableProducer object to nil.


TDSTableProducerEditor.PostChange
 VCL Reference

TDSTableProducerEditor.PostChange

TDSTableProducerEditor	See also

Provides an interface for a method that responds to update notifications from the columns of a TDSTableProducer object.

procedure PostChange; virtual;

Description

The PostChange method for TDSTableProducerEditor does nothing. It exists so that descendants of TDSTableProducerEditor can perform any necessary updates when the columns of the TDSTableProducer object change. THTMLTableColumns calls PostChange when its columns are changed.


Hierarchy

TObject

TDSTableProducerEditor


TDataSetUpdateObject
 VCL Reference

TDataSetUpdateObject

Hierarchy	Properties	Methods	See also

TDataSetUpdateObject is the abstract base class for update objects used to update otherwise unupdateable queries or stored procedures in applications that cache updates.

Unit

DBTables

Description

Use TDataSetUpdateObject as a base class when creating customized update objects that can be used to update BDE datasets.  TDataSetUpdateObject declares a single property and some abstract methods, but provides no implementation details: descendant objects must provide these.


 VCL Reference

TDataSetUpdateObject properties

TDataSetUpdateObject	Alphabetically	Legend

In TDataSetUpdateObject

DataSet

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetUpdateObject properties

TDataSetUpdateObject	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Name

Owner

Tag

VCLComObject


TDataSetUpdateObject.DataSet
 VCL Reference

TDataSetUpdateObject.DataSet

TDataSetUpdateObject	See also

Specifies the dataset that stores the cached updates to be applied by the update object.

property DataSet: TDataSet;

Description

DataSet is the dataset that stores the updates that this update object applies to a database server. The update object uses the dataset to obtain information about the original and updated field values.

Note:	Descendants of TDataSetUpdateObject must implement the abstract GetDataSet and SetDataSet methods to implement the DataSet property.


 VCL Reference

TDataSetUpdateObject methods

TDataSetUpdateObject	Alphabetically 	Legend

In TDataSetUpdateObject

Apply

GetDataSet

SetDataSet

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetUpdateObject methods

TDataSetUpdateObject	By object 	Legend

AfterConstruction

Apply

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDataSet

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetDataSet

SetSubComponent

UpdateAction


TDataSetUpdateObject.Apply
 VCL Reference

TDataSetUpdateObject.Apply

TDataSetUpdateObject	See also

Apply applies changes to the dataset specified by the DataSet property.

procedure Apply(UpdateKind: TUpdateKind); virtual; abstract;

Description

Descendants of TDataSetUpdateObject must implement the abstract Apply method. This method is intended to perform the updates specified by the update object. Descendants must introduce properties to describe the details of the updates that should be performed. The UpdateKind parameter indicates whether the update object should modify existing records, insert new records, or delete existing records.


TDataSetUpdateObject.GetDataSet
 VCL Reference

TDataSetUpdateObject.GetDataSet

TDataSetUpdateObject	See also

GetDataSet returns the value of the DataSet property.

function GetDataSet: TDataSet; virtual; abstract;

Description

Override GetDataSet, along with the SetDataSet method, to provide an implementation of the DataSet property. The DataSet property should represent the dataset that caches the updates to be applied by the update object.


TDataSetUpdateObject.SetDataSet
 VCL Reference

TDataSetUpdateObject.SetDataSet

 TDataSetUpdateObject	See also

SetDataSet sets the value of the DataSet property.

procedure SetDataSet(ADataSet: TDataSet); virtual; abstract;

Description

Override SetDataSet, along with the GetDataSet method, to provide an implementation of the DataSet property. The DataSet property should represent the dataset that caches the updates to be applied by the update object.


Hierarchy

TObject

TPersistent

TComponent

TDataSetUpdateObject


TDataBindItem
 VCL Reference

TDataBindItem

Hierarchy	Properties	Methods

TDateBindItem represents a data binding in a data-aware ActiveX control.

Unit

DbOleCtl

Description

The TDatabBindItem object stores the association between a property in a data-aware control and a field in the dataset. TDataBindings holds a collection of data bindings for a particular ActiveX control, which is represented by a TDBOleControl object.


 VCL Reference

TDataBindItem properties

TDataBindItem	Alphabetically	Legend

In TDataBindItem

DataField

DispID

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TDataBindItem properties

TDataBindItem	By object	Legend

Collection

DataField

DispID

DisplayName

ID

Index


TDataBindItem.DataField
 VCL Reference

TDataBindItem.DataField

TDataBindItem	Properties	See also

Represents the name of the field to be bound.

property DataField: string;

Description

DataField relates a property in a data-aware ActiveX control to a specific field in the dataset. The dataset is specified by the DataSource property of TDBOleControl object.


TDataBindItem.DispID
 VCL Reference

TDataBindItem.DispID

TDataBindItem	Properties	See also

The identifier (DispID) of the data-aware control property to be bound.

property DispID: TDispID;

Description

Every data-aware property in an ActiveX control has a unique DispID. The collection of databindings is represented by the DataBindings property of TDBOleControl object.


 VCL Reference

TDataBindItem methods

TDataBindItem	Alphabetically	Legend

In TDataBindItem

Create

Destroy

Derived from TPersistent

Assign

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataBindItem methods

TDataBindItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TDataBindItem.Create
 VCL Reference

TDataBindItem.Create

TDataBindItem	Methods	See also

Creates an instance of TDataBindItem.

constructor Create(Collection: TCollection); override;

Description

Do not create an instance of TDataBindItem directly. Instead, an instance is created when the Add method of the TDataBindings object is called.


TDataBindItem.Destroy
 VCL Reference

TDataBindItem.Destroy

TDataBindItem	MethodsSee also

Destroys the TDataBindItem instance and frees its memory.

destructor Destroy; override;

Description

Destroy is called indirectly by TCollection’s Clear method.


Hierarchy

TObject

TPersistent

TCollectionItem

TDataBindItem


EDBEngineError
 VCL Reference

EDBEngineError

Hierarchy	Properties	Methods	See also

EDBEngineError is the exception class for Borland Database Engine errors.

Unit

DBTables

Description

EDBEngineError is raised whenever a BDE error occurs. Its Errors property contains TDBError objects.

When EDBEngineError exceptions are raised at design time, they appear in a special dialog (TDbEngineErrorDlg) that displays the complete stack of BDE errors. At runtime, unhandled EDBEngineError exceptions generate the same message box as other exceptions.


 VCL Reference

EDBEngineError properties

EDBEngineError	Alphabetically	Legend

In EDBEngineError

ErrorCount

Errors

Derived from Exception

HelpContext

Message


 VCL Reference

EDBEngineError properties

EDBEngineError	By object	Legend

ErrorCount

Errors

HelpContext

Message


EDBEngineError.ErrorCount
 VCL Reference

EDBEngineError.ErrorCount

EDBEngineError 	See also

Indicates the total number of errors contained in the Errors property.

property ErrorCount: Integer;

Description

Use ErrorCount as an upper bound when iterating through the errors in the error stack.


EDBEngineError.Errors
 VCL Reference

EDBEngineError.Errors

EDBEngineError	See also

Lists the entire Borland Database Engine error stack.

property Errors[Index: Integer]: TDBError;

Description

Errors is an index of TDBError objects. The first error has an index value of 0.


 VCL Reference

EDBEngineError methods

EDBEngineError	Alphabetically	Legend

In EDBEngineError

Create

Destroy

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDBEngineError methods

EDBEngineError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EDBEngineError.Create
 VCL Reference

EDBEngineError.Create

EDBEngineError	See also

Creates an instance of EDBEngineError using a specified BDE error code.

constructor Create(ErrorCode: DBIResult);

Description

Create calls the Create method inherited from Exception (using an empty string) to construct an initialized instance of EDBEngineError. It then creates a TDBError instance for each error in the BDE error stack and builds a single string containing all the error messages. If the BDE is uninitialized when Create is called, the method generates only one generic error message and one TDBError instance.


EDBEngineError.Destroy
 VCL Reference

EDBEngineError.Destroy

EDBEngineError	See also

Disposes of the EDBEngineError instance and each TDBError instance.

destructor Destroy; override;

Description

Destroy first disposes of each TDBError instance referenced in the Errors property, then calls the inherited destructor to dispose of the EDBEngineError instance itself.


Hierarchy

TObject

Exception

EDatabaseError

EDBEngineError


EDSWriter
 VCL Reference

EDSWriter

Hierarchy	Properties 	Methods 	See also

EDSWriter is the exception class for errors that occur when creating data packets to represent the data or metadata in a dataset.

Unit

Provider

Description

EDSWriter is raised whenever a provider component encounters an error while trying to create a data packet from a dataset.


 VCL Reference

EDSWriter properties

EDSWriter	Alphabetically	Legend

In EDSWriter

ErrorCode

Derived from Exception

HelpContext

Message


 VCL Reference

EDSWriter properties

EDSWriter	By object	Legend

ErrorCode

HelpContext

Message


EDSWriter.ErrorCode
 VCL Reference

EDSWriter.ErrorCode

EDSWriter 	See also

Indicates the error code that this exception represents.

property ErrorCode: Integer;

Description

Use ErrorCode to determine what error gave rise to this exception. ErrorCode is the value passed to the Create method.


 VCL Reference

EDSWriter methods

EDSWriter	Alphabetically	Legend

In EDSWriter

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDSWriter methods

EDSWriter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EDSWriter.Create
 VCL Reference

EDSWriter.Create

EDSWriter	See also

Creates an instance of EDSWriter using a specified error code and message string.

constructor Create(ErrMsg: string; Status: Integer);

Description

Create instantiates EDSWriter, setting the Message property to ErrMsg and the ErrorCode property to Status.


Hierarchy

TObject

Exception

EDSWriter


EOleRegistrationError
 VCL Reference

EOleRegistrationError

Hierarchy	Properties	Methods

EOleRegistrationError is the exception class for errors that occur when registering an OLE object.

Unit

ComObj

Description

EOleRegistrationError is raised by the CreateRegKey method when it encounters an error while trying to register a COM class with the system registry.


 VCL Reference

EOleRegistrationError properties

EOleRegistrationError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOleRegistrationError properties

EOleRegistrationError	By object	Legend

HelpContext

Message


 VCL Reference

EOleRegistrationError methods

EOleRegistrationError	Alphabetically	Legend

In EOleRegistrationError

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOleRegistrationError methods

EOleRegistrationError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EOleError

EOleRegistrationError


EOleError
 VCL Reference

EOleError

Hierarchy	Properties	Methods	See also

EOleError is the exception class for low-level OLE errors.

Unit

ComObj

Description

EOleError is raised when the system returns a non-zero HRESULT involving low-level OLE errors or and old OLE 2 errors. Delphi checks for, but does not generate, these exceptions.


 VCL Reference

EOleError properties

EOleError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOleError properties

EOleError	By object	Legend

HelpContext

Message


 VCL Reference

EOleError methods

EOleError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOleError methods

EOleError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EOleError


TFieldDefs
 VCL Reference

TFieldDefs

Hierarchy	Properties	Methods	See also

TFieldDefs holds the field definition (TFieldDef) objects that represent the physical fields underlying a dataset.

Unit

DB

Description

Datasets use TFieldDefs to manage the field definitions they use to create field objects that correspond to fields in a database table. Every field definition listed by TFieldDefs has a corresponding TField object, but not all TField objects have a corresponding field definition. For example, calculated fields do not have field definitions.

TTable and TClientDataSet objects also use TFieldDefs when creating a new table.

With object field types, such as TADTField and TArrayField, there are two ways to represent the field definitions: hierarchically or flattened. When represented hierarchically, object field definitions contain a set of child definitions for the constituent subfields. When represented as a flattened set, child field definitions appear as siblings sequentially after the parent field definition.

TFieldDefs stores field definitions hierarchically. This is in contrast to TFieldDefList, which lists the child TFieldDef objects of object fields sequentially after the parent TFieldDef.

Use the properties and methods of TFieldDefs to:

Access a specific field definition.

Add or delete field definitions from the list (when creating new tables).

Find out how many fields are defined.

Copy a set of field definitions to another dataset.


 VCL Reference

TFieldDefs properties

TFieldDefs	Alphabetically	Legend

In TFieldDefs

HiddenFields

Items

ParentDef

Derived from TDefCollection

DataSet

Updated

Derived from TCollection

Count

ItemClass


 VCL Reference

TFieldDefs properties

TFieldDefs	By object	Legend

Count

DataSet

HiddenFields

ItemClass

Items

ParentDef

Updated


TFieldDefs.HiddenFields
 VCL Reference

TFieldDefs.HiddenFields

TFieldDefs	See also

Determines whether to show the extra hidden columns that may be included to ensure unique records.

property HiddenFields: Boolean;

Description

When the user performs a live query, the BDE returns extra hidden columns in the query result set. Similarly, pProviders sometimes include extra hidden columns in data packets. These extra columns ensure that each record contains enough information to locate the corresponding record in the underlying database tables.

Setting HiddenFields to True and calling TFieldDefs.Update allows these columns to be seen. HiddenFields is primarily for internal use.


TFieldDefs.Items
 VCL Reference

TFieldDefs.Items

TFieldDefs	See also	Example

Lists the field definitions that describe each physical field in the dataset.

property Items[Index: Integer]: TFieldDef; default;

Description

Use Items to access a particular field definition. Specify the field definition to access with the Index parameter. Index is an integer identifying the field definition’s position in the list of field definitions, in the range 0 to Count - 1.

For example, the following code displays the name of the first field definition in a label:

Label1.Caption := Table1.FieldDefs.Items[0].DisplayName;


TFieldDefs.ParentDef
 VCL Reference

TFieldDefs.ParentDef

TFieldDefs	See also

References the field definition of the parent field, if there is one.

property ParentDef: TFieldDef;

Description

When a TFieldDefs object represents the data members of an object field type (such as TADTField), ParentDef specifies the field definition for that object field. Otherwise, ParentDef is nil.


 VCL Reference

TFieldDefs methods

TFieldDefs	Alphabetically	Legend

In TFieldDefs

Add

AddFieldDef

Create

Find

Update

Derived from TDefCollection

GetItemNames

IndexOf

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFieldDefs methods

TFieldDefs	By object	Legend

Add

AddFieldDef

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Find

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemNames

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TFieldDefs.Add
 VCL Reference

TFieldDefs.Add

TFieldDefs	See also

Creates a new field definition object and adds it to the Items property.

procedure Add(const Name: String; DataType: TFieldType; Size: Integer = 0; Required: Boolean = False);

Description

Add is provided for backward compatibility.  The recommended way to add new field definitions to the Items property array is using the AddFieldDef method.

Add uses the values passed in the Name, DataType, Size, and Required parameters and assigns them to the respective properties of the new field definition object.

If a field definition with same name already exists, Add raises an EDatabaseError exception.


TFieldDefs.AddFieldDef
 VCL Reference

TFieldDefs.AddFieldDef

TFieldDefs	See also	Example

Creates a new field definition object and adds it to the Items property of this TFieldDefs object.

function AddFieldDef: TFieldDef;

Description

Call AddFieldDef to add field definitions when creating a client dataset’s data or a database table. AddFieldDef returns the new TFieldDef object that is added to the collection of field definitions. After calling AddFieldDef, set the properties of the newly added TFieldDef object to specify the name, type, and size of field that should be created.

Note:	AddFieldDef is only valid in the context of creating field definitions for a table to be created with a subsequent call to the CreateTable or CreateDataSet method. It cannot be used to add fields to an already-existing table.


TFieldDefs.Create
 VCL Reference

TFieldDefs.Create

TFieldDefs	See also

Creates an instance of TFieldDefs.

constructor Create(AOwner: TPersistent);

Description

Applications should not need to instantiate TFieldDefs. TFieldDefs objects are created automatically by dataset components. An example of such a default TFieldDefs object is the FieldDefs property of the TDataSet component or the ChildDefs property of a TFieldDef object.

The AOwner parameter specifies the object that uses TFieldDefs to implement one of its properties (the dataset or field definition object).


TFieldDefs.Find
 VCL Reference

TFieldDefs.Find

TFieldDefs	See also

Returns a field definition, given the name of the field.

function Find(const Name: String): TFieldDef;

Description

Call Find to obtain information about a particular field definition. Specify the name of the field as the value of the Name parameter.

If no matching field is found, Find raises an exception. The IndexOf method (inherited from TDefCollection) can be used to determine if the field exists first before calling Find. If IndexOf returns a value greater than –1, the TFieldDef exists and Find can be used.


TFieldDefs.Update
 VCL Reference

TFieldDefs.Update

TFieldDefs	See also

Refreshes the field definitions in the Items property array to reflect the current state of the physical fields underlying the dataset.

procedure Update; reintroduce;

Description

Call Update to refresh the field definitions when the structure of the underlying dataset may have changed. Update updates the field definitions without opening the dataset.

Before updating, the Updated property is checked to determine if the list is already up to date. You can force the list to be regenerated by setting the Updated property to False.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TDefCollection

TFieldDefs


TFieldList
 VCL Reference

TFieldList

Hierarchy	Properties	Methods	Events 	See also

TFieldList lists the fields of a dataset, flattening out the structure of any object fields.

Unit

DB

Description

TFieldList is used by a dataset to implement its FieldList property. It lists the fields of the dataset in a flattened format.

With object field types, such as TADTField and TArrayField, there are two ways to represent the field components: hierarchically or flattened. When represented hierarchically, object fields contain a set of child field components for the constituent subfields. When represented as a flattened set, child fields appear as siblings sequentially after the parent field.

TFieldList is a descendant of TStringList. The strings in this string list are the names of fields. The objects that correspond to those strings are the TField objects.


 VCL Reference

TFieldList properties

TFieldList	Alphabetically	Legend

In TFieldList

Fields

Derived from TFlatList

Count

DataSet

Derived from TStringList

Capacity

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

Names

StringsAdapter

Text

Values


 VCL Reference

TFieldList properties

TFieldList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

Fields

Names

Objects

Sorted

Strings

StringsAdapter

Text

Values


TFieldList.Fields
 VCL Reference

TFieldList.Fields

TFieldList	See also

Lists the fields in the dataset.

property Fields[Index: Integer]: TField;

Description

Use Fields to obtain a pointer to a specific field component. The Index parameter indicates the index of the field, where 0 is the index of the first field, 1 is the index of the second field, and so on.

A TFieldList with object field types, such as TADTField and TArrayField, lists child TField objects sequentially after the parent TField.

Use Fields with the Count property to iterate through all of the fields in the list.


 VCL Reference

TFieldList events

TFieldList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 VCL Reference

TFieldList events

TFieldList	By object	Legend

OnChange

OnChanging


 VCL Reference

TFieldList methods

TFieldList	Alphabetically	Legend

In TFieldList

FieldByName

Find

In TFlatList

Create

Update

Derived from TStringList

Add

Clear

Delete

Destroy

Exchange

IndexOf

Insert

Sort

Derived from TStrings

AddObject

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfName

IndexOfObject

InsertObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFieldList methods

TFieldList	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

FieldByName

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort

Update


TFieldList.FieldByName
 VCL Reference

TFieldList.FieldByName

TFieldList	See also

Returns a field, given its name.

function FieldByName(const FieldName: string): TField;

Description

Call FieldByName to retrieve field information for a field when only the field’s name is known. FieldName is the name of an existing field. FieldByName returns the TField component for the specified field. An application can access specific properties and methods of the field directly.

If the specified field is not found, FieldByName raises an EDatabaseError exception.

Note:	FieldByName differs from the Find method only when the named field is not in the list. When the field is not found, FieldByName raises an exception, while Find returns nil.


TFieldList.Find
 VCL Reference

TFieldList.Find

TFieldList 	See also

Returns a field component given the field name.

function Find (const Name: string): TField; reintroduce;

Description

Call Find to determine if a specified field component is referenced in the TFieldList object. FieldName is the name of the field for which to search. If Find finds a field with a matching name, it returns the TField component for the specified field. Otherwise it returns nil.

Note:	Find differs from the FieldByName method only when the named field is not in the list. When the field is not found, Find returns nil, while FieldByName raises an exception.


Hierarchy

TObject

TPersistent

TStrings

TStringList·

TFlatList

TFieldList

TFieldList


TFields
 VCL Reference

TFields

Hierarchy	Properties	Methods 	See also

TFields holds the field (TField) objects that represent the physical fields underlying a dataset or an object field such as TADTField and TArrayField.

Unit

DB

Description

TFields is used by a dataset to manage the field objects that correspond to fields in the database table and by object fields to manage child fields.

When TDataSet.ObjectView is True, the fields are stored hierarchically, meaning any child fields of an object field are referenced by the object field and do not appear sequentially after the object field in the Fields array. When TDataSet.ObjectView is False, the fields are stored sequentially, or flattened out, meaning any child fields of an object field are stored sequentially in the Fields array.

Use the properties and methods of TFields to:

Access a specific field.

Add or delete persistent field components from the list.

Find out how many fields there are.


 VCL Reference

TFields properties

TFields	Alphabetically	Legend

In TFields

Count

DataSet

Fields


 VCL Reference

TFields properties

TFields	By object	Legend

Count

DataSet

Fields


TFields.Count
 VCL Reference

TFields.Count

TFields	See also

Indicates the number of fields in the fields object.

property Count: Integer;

Description

Use Count to determine the number of fields referenced by the TFields object.


TFields.DataSet
 VCL Reference

TFields.DataSet

TFields	See also

Identifies the dataset to which a TFields object belongs.

property DataSet: TDataSet;

Description

Check the value of the DataSet property to determine the dataset that is associated with the TFields object. Applications should not directly assign the DataSet property of a field. It is assigned automatically when the field is created from a TFieldDef object.


TFields.Fields
 VCL Reference

TFields.Fields

TFields	See also

Lists the field references that are managed by the TFields object.

property Fields[Index: Integer]: TField;

Description

Use Fields to obtain a pointer to a specific field. The Index parameter indicates the index of the field, where 0 is the index of the first field, 1 is the index of the second field, and so on.

Set Fields to assign the properties of another field component to one of the fields in the list.

Use Fields with the Count property to iterate through all of the fields in the list.


 VCL Reference

TFields methods

TFields	Alphabetically	Legend

In TFields

Add

CheckFieldName

CheckFieldNames

Clear

Create

Destroy

FieldByName

FieldByNumber

FindField

GetFieldNames

IndexOf

Remove

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFields methods

TFields	By object	Legend

Add

AfterConstruction

BeforeDestruction

CheckFieldName

CheckFieldNames

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FieldByName

FieldByNumber

FindField

Free

FreeInstance

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException


TFields.Add
 VCL Reference

TFields.Add

TFields	See also

Inserts a new field to the end of the Fields array.

procedure Add(Field: TField);

Description

Applications do not normally call the Add method directly. When field objects are created, Add is called automatically by the dataset.


TFields.CheckFieldName
 VCL Reference

TFields.CheckFieldName

TFields	See also

Checks if a field name already exists in the TFields object.

procedure CheckFieldName(const FieldName: String);

Description

CheckFieldName checks for the field specified by FieldName in the Fields property array. If the field with the specified name is already listed, CheckFieldName raises an EDatabaseError exception with a duplicate field name error message.


TFields.CheckFieldNames
 VCL Reference

TFields.CheckFieldNames

TFields	See also

Checks if fields exist in the TFields object.

procedure CheckFieldNames(const FieldNames: String);

Description

CheckFieldNames checks for the set of fields specified by FieldNames in the Fields property array. FieldNames lists the names of the fields to check, separated by semicolons. If any of the fields in FieldNames are not listed, CheckFieldNames raises an EDatabaseError exception with a field not found error message.


TFields.Clear
 VCL Reference

TFields.Clear

TFields	See also

Deletes all fields from the TFields object.

procedure Clear;

Description

Applications do not normally call the Clear method directly. Clear empties the Fields property array, frees the memory used to store the array and sets the DataSet property to nil.


TFields.Create
 VCL Reference

TFields.Create

TFields	See also

Creates an instance of TFields.

constructor Create(ADataSet: TDataSet);

Description

Most applications do not need to create a TFields object. These objects are created by the dataset or object field that uses them.


TFields.Destroy
 VCL Reference

TFields.Destroy

TFields	See also

Destroys an instance of TFields.

destructor Destroy; override;

Description

Most applications do not explicitly free a TFields object. TFields instances are freed by the dataset or object field that uses them.

Destroy frees the memory used to store the list of fields, including the field components themselves.


TFields.FieldByName
 VCL Reference

TFields.FieldByName

TFields	See also

Returns a field given its field name.

function FieldByName(const FieldName: String): TField;

Description

Call FieldByName to retrieve field information for a field when only the field’s name is known. FieldName is the name of an existing field. FieldByName returns the TField component for the specified field. If the field can not be found, an exception is raised.

When the Fields array contains ADT fields, you can use FieldByName to access the subfields of those ADT fields. To access subfields, specify FieldName as the name of the subfield qualified by the name of the ADT field, as in the following:

CityEdit.Text := Customer.FieldByName('Address.City').AsString;

FieldByName is especially useful when you do not have access to the underlying table and cannot use persistent field components.

Note:	FieldByName differs from the FindField method only when the named field is not in the list. When the field is not found, FieldByName raises an exception, while FindField returns nil.


TFields.FieldByNumber
 VCL Reference

TFields.FieldByNumber

TFields	See also

Finds a field based on a specified field number.

function FieldByNumber(FieldNo: Integer): TField;

Description

Call FieldByNumber to retrieve field information for a field given its field number. Note that the field number is the position of the field in the underlying database table, not the index of the field in the TFields object.


TFields.FindField
 VCL Reference

TFields.FindField

TFields	See also

Returns a field given its field name.

function FindField(const FieldName: String): TField;

Description

Call FindField to determine if a specified field component is referenced in the TFields object. FieldName is the name of the field for which to search. If FindField finds a field with a matching name, it returns the TField component for the specified field. Otherwise it returns nil.

Note:	FindField differs from the FieldByName method only when the named field is not in the list. When the field is not found, FindField returns nil, while FieldByName raises an exception.


TFields.GetFieldNames
 VCL Reference

TFields.GetFieldNames

TFields	See also

Retrieves a list of names for all fields in a fields object.

procedure GetFieldNames(List: TStrings);

Description

Call GetFieldNames to fill a list with the field names for all fields in the fields object. List is a TStrings descendant created and maintained by the application.

Retrieving a list of field names is especially useful for applications that work with datasets whose field objects are created dynamically at runtime. By retrieving a list of field names, the application can be restricted to working only with fields that exist at runtime.


TFields.IndexOf
 VCL Reference

TFields.IndexOf

TFields	See also

Finds the index of a field object in the Fields array from the field object.

function IndexOf(Field: TField): Integer;

Description

Call IndexOf to get the index for a field in the Fields array. Specify the field as the Field parameter.

The first field in the array has index 0, the second field has index 1, and so on. If a field is not in the Fields array, IndexOf returns -1.


TFields.Remove
 VCL Reference

TFields.Remove

TFields	See also

Deletes the reference to the Field parameter from the Fields array.

procedure Remove(Field: TField);

Description

Applications do not normally call the Remove method directly. After a field is removed, all of the items that follow it are moved up in index position and the Count is reduced by one.

Note:	Unlike the Clear method, which frees the field components when it removes them, Remove does not free the specified field component.


Hierarchy

TObject

TFields

TFields


TFileRun
 VCL Reference

TFileRun

Hierarchy	Properties	Methods	Events	Using TFileRun	See also

TFileRun is the standard action for performing a specified operation on a file.

Unit

ExtActns

Description

Add TFileRun to an action list to let your application launch an external application or dll in response to user actions. Controls linked to this action cause your application to perform the operation specified by the Operation property on the file specified by the FileName property.

Before this action fires, configure its properties to indicate what application to launch and how to launch it:

To indicate the target file to run, set the FileName property to the name of a file on which the external application operates or to the name of the application’s executable file. If you want to let the user select the file name instead when the action fires, set the Browse property to True, and an open dialog appears when the action fires.

To indicate what action to perform on the specified file, set the Operation property.

To supply parameters to the external application when it is launched, use the Parameters property.

To specify a default directory for the external application, use the Directory property.

To control how the external application’s window appears (minimized, maximized, hidden, and so on), use the ShowCmd property.

If the external application needs a parent window (to parent a dialog such as a properties dialog), or if you want to allow TFileRun to display error messages, use the ParentControl property.


 VCL Reference

TFileRun properties

TFileRun	Alphabetically	Legend

Derived from TCustomFileRun

Browse

BrowseDlg

Directory

FileName

HInst

Operation

Parameters

ParentControl

ShowCmd

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileRun properties

TFileRun	By object	Legend

ActionComponent

ActionList

AutoCheck

Browse

BrowseDlg

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Directory

DisableIfNoHandler

Enabled

FileName

GroupIndex

HelpContext

HelpKeyword

HelpType

HInst

Hint

ImageIndex

Index

Name

Operation

Owner

Parameters

ParentControl

SecondaryShortCuts

ShortCut

ShowCmd

Tag

VCLComObject

Visible


 VCL Reference

TFileRun events

TFileRun	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileRun events

TFileRun	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileRun methods

TFileRun	Alphabetically	Legend

Derived from TCustomFileRun

Create

ExecuteTarget

HandlesTarget

SetupBrowseDialog

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileRun methods

TFileRun	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

SetupBrowseDialog

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCustomFileRun

TFileRun


TFlatList
 VCL Reference

TFlatList

Hierarchy	Properties	Methods	Events 	See also

TFlatList is an abstract base class for objects that represent a flattened list of fields or field definitions.

Unit

DB

Description

Derive a class from TFlatList to store and manipulate a list of fields or field definitions in an iterative manner.  When fields are stored iteratively, the child fields of object fields such as ADTs and Arrays, appear as siblings after the parent object field rather than nested within the parent field.

Descendants of TFlatList include TFieldList and TFieldDefList.

TFlatList is a descendant of TStringList. It uses the string list to maintain its list of fields or field definitions, where the strings in the list are the field names and the associated objects are TField or TFieldDef objects.


 VCL Reference

TFlatList properties

TFlatList	Alphabetically	Legend

In TFlatList

Count

DataSet

Derived from TStringList

Capacity

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

Names

StringsAdapter

Text

Values


 VCL Reference

TFlatList properties

TFlatList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

Names

Objects

Sorted

StringsAdapter

Strings

Text

Values


TFlatList.Count
 VCL Reference

TFlatList.Count

TFlatList	See also

Indicates the number of entries in the list.

property Count: Integer;

Description

Use Count when iterating over all the objects in the list.


TFlatList.DataSet
 VCL Reference

TFlatList.DataSet

TFlatList	See also

Identifies the dataset to which the TFlatList object belongs.

property DataSet: TDataSet;

Description

Check the value of the DataSet property to determine the dataset that uses the TFlatList object to manage information about its fields. Applications should not directly assign the DataSet property of a TFlatList object. It is assigned automatically when a TFlatList object descendant is created.


 VCL Reference

TFlatList events

TFlatList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 VCL Reference

TFlatList events

TFlatList	By object	Legend

OnChange

OnChanging


 VCL Reference

TFlatList methods

TFlatList	Alphabetically	Legend

In TFlatList

Create

Update

Derived from TStringList

Add

Clear

Delete

Destroy

Exchange

Find

IndexOf

Insert

Sort

Derived from TStrings

AddObject

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfName

IndexOfObject

InsertObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFlatList methods

TFlatList	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort

Update


TFlatList.Create
 VCL Reference

TFlatList.Create

TFlatList	See also

Creates an instance of TFlatList.

constructor Create(ADataSet: TDataSet);

Description

Applications should not call the Create method.  TFlatList objects are created by the dataset that uses them to manage information about its fields.  The ADataset parameter specifies the dataset that creates the TFlatList object.  It becomes the value of the Dataset property.


TFlatList.Update
 VCL Reference

TFlatList.Update

TFlatList	See also

Refreshes the strings and objects to reflect the current state of the physical fields underlying the dataset.

procedure Update;

Description

Call Update to refresh the fields or field definitions when the structure of the underlying dataset may have changed. Update updates the field names listed by Strings and the corresponding objects without opening the dataset.


Hierarchy

TObject

TPersistent

TStrings

TStringList

TFlatList


TFieldDataLink
 VCL Reference

TFieldDataLink

Hierarchy	Properties	Methods	Events	See also

TFieldDataLink helps a data-aware windowed control manage its link to a TField object and respond to data events.

Unit

DBCtrls

Description

Use TFieldDataLink as a member in any data-aware object that needs to link to a TField object and respond to data events or track database information. The data-aware object must be a descendant of TWinControl.

The constructor of the data-aware object should call the constructor of the TFieldDataLink member, and initialize any relevant event-handlers. The data-aware object can then link to a TField object by using the FieldName property of the TFieldDataLink and can link to a dataset by using the DataSource property of the TFieldDataLink.


 VCL Reference

TFieldDataLink properties

TFieldDataLink	Alphabetically	Legend

In TFieldDataLink

CanModify

Control

Editing

Field

FieldName

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Eof

ReadOnly

RecordCount


 VCL Reference

TFieldDataLink properties

TFieldDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

CanModify

Control

DataSet

DataSource

DataSourceFixed

Editing

Eof

Field

FieldName

ReadOnly

RecordCount


TFieldDataLink.CanModify
 VCL Reference

TFieldDataLink.CanModify

TFieldDataLink	See also

Indicates whether the Control can modify a field in the database table managed by TFieldDataLink.

property CanModify: Boolean;

Description

Read CanModify to find out whether the Control that owns this TFieldDataLink is able to alter the data in the database that this field represents. CanModify may be False because the control is read-only, or because the underlying field does not permit updates.


TFieldDataLink.Control
 VCL Reference

TFieldDataLink.Control

TFieldDataLink	See also

Specifies the data-aware component that uses this TFieldDataLink object to manage its link to a TField object.

property Control: TComponent;

Description

This property should only be set by components that use TFieldDataLink to manage the link to a TField object. In their own constructors, these data-aware components can set the Control property of their TFieldDataLink member to self, after calling the TFieldDataLink constructor.

The Control property can be read to access methods of the component when processing data events.


TFieldDataLink.Editing
 VCL Reference

TFieldDataLink.Editing

TFieldDataLink	See also

Indicates whether the dataset that contains the associated field is in edit mode.

property Editing: Boolean;

Description

Use Editing to determine whether the value of the field associated with this TDataLink can currently be edited. If Editing is False, calling the Edit method may drive the dataset into edit mode. The Edit method may not be successful, however, if the field cannot be edited. For example, if the CanModify property is False, Editing will always be False.


TFieldDataLink.Field
 VCL Reference

TFieldDataLink.Field

TFieldDataLink	See also

Specifies the field component managed by this TFieldDataLink object.

property Field: TField;

Description

Read Field to gain access to the field object to which the Control of this TFieldDataLink is bound.

Note:	Before using Field to alter the value of a field’s contents, applications should check the CanModify property. The Field object will not be aware of all constraints to edits for this TFieldDataLink.


TFieldDataLink.FieldName
 VCL Reference

TFieldDataLink.FieldName

TFieldDataLink	See also

Specifies the name of the field to which the Control of this TFieldDataLink is bound.

property FieldName: String;

Description

Use FieldName to implement the FieldName property of the data-aware control that owns the TFieldDataLink. Setting FieldName links the TFieldDataLink, and hence the control, to the field in the dataset with that name.


 VCL Reference

TFieldDataLink events

TFieldDataLink	Alphabetically	Legend

In TFieldDataLink

OnActiveChange

OnDataChange

OnEditingChange

OnUpdateData


 VCL Reference

TFieldDataLink events

TFieldDataLink	By object	Legend

OnActiveChange

OnDataChange

OnEditingChange

OnUpdateData


TFieldDataLink.OnActiveChange
 VCL Reference

TFieldDataLink.OnActiveChange

TFieldDataLink	See also

Occurs when the Active property of the TFieldDataLink changes.

property OnActiveChange: TNotifyEvent;

Description

Write an OnActiveChange event handler to take specific action immediately after the dataset transitions into or out of an active state. OnActiveChange is particularly useful for updating objects to reflect changes that occurred while the dataset was not active, as the object can not respond to events while its TFieldDataLink is not Active.


TFieldDataLink.OnDataChange
 VCL Reference

TFieldDataLink.OnDataChange

TFieldDataLink	See also

Occurs when the contents of the dataset change.

property OnDataChange: TNotifyEvent;

Description

Write an OnDataChange event handler to take specific action when there is a change to the contents of the field. OnDataChange allows the control to respond when the dataset sends notifications that the data has changed.


TFieldDataLink.OnEditingChange
 VCL Reference

TFieldDataLink.OnEditingChange

TFieldDataLink	See also

Occurs after the DataSource transitions into or out of an editing state.

property OnEditingChange: TNotifyEvent;

Description

Write an OnEditingChange event handler to take specific action when the DataSource transitions into or out of an editing state. This event can be used to create visual indications of the editing state in the control that uses this TFieldDataLink.


TFieldDataLink.OnUpdateData
 VCL Reference

TFieldDataLink.OnUpdateData

TFieldDataLink	See also

Occurs when it is time to post any pending changes to the dataset.

property OnUpdateData: TNotifyEvent;

Description

Write an OnUpdateData event handler to write the data in the representation of the field to the database record. Posting the data from within OnUpdateData does not trigger a call to OnDataChange.


 VCL Reference

TFieldDataLink methods

TFieldDataLink	Alphabetically	Legend

In TFieldDataLink

ActiveChanged

Create

Edit

EditingChanged

FocusControl

LayoutChanged

Modified

RecordChanged

Reset

UpdateData

Derived from TDataLink

Destroy

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFieldDataLink methods

TFieldDataLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Edit

EditingChanged

ExecuteAction

FieldAddress

FocusControl

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

Modified

NewInstance

RecordChanged

Reset

SafeCallException

UpdateAction

UpdateData

UpdateRecord


TFieldDataLink.ActiveChanged
 VCL Reference

TFieldDataLink.ActiveChanged

TFieldDataLink	See also

Generates an OnActiveChanged event.

procedure ActiveChanged; override;

Description

Changes to the Active property trigger the ActiveChanged method. If an OnActiveChange event handler is assigned, ActiveChanged calls this event handler. If ActiveChanged is triggered by a transition into an active state, then before calling the event handler, ActiveChanged makes sure that the Field for this TFieldDataLink is still valid.


TFieldDataLink.Create
 VCL Reference

TFieldDataLink.CreateTFieldDataLink	See also

Creates an instance of TFieldDataLink.

constructor Create;

Description

Applications should never need to create a TFieldDataLink component. Component writers will need to instantiate a TFieldDataLink object from the constructor of data-aware controls.


TFieldDataLink.Edit
 VCL Reference

TFieldDataLink.Edit

TFieldDataLink	See also

Attempts to drive the DataSource into an editing state if it is not already in one.

function Edit: Boolean;

Description

Use Edit to try to ensure that the contents of the field can be modified. A return value of True indicates that the field was already in an editing state, or that the DataSource was successfully changed to allow editing. A return value of False indicates that the DataSource could not be changed to allow editing. For example, if the CanModify property is False, Edit fails, and returns False.


TFieldDataLink.EditingChanged
 VCL Reference

TFieldDataLink.EditingChanged

TFieldDataLink	See also

Enforces the CanModify property when the field binding changes.

procedure EditingChanged; override;

Description

Changing the field binding can change the validity of the CanModify property, since individual field components can disallow edits. If TFieldDataLink is in an editing state when the Field property is changed, EditingChanged checks the CanModify property. If CanModify is False, it changes back out of the editing state.

Note:	This differs significantly from the inherited EditingChanged method of TDataLink. The functionality of the inherited method is replaced in TFieldDataLink by the OnEditingChange event handler.


TFieldDataLink.FocusControl
 VCL Reference

TFieldDataLink.FocusControl

TFieldDataLink	See also

Sets the input focus to Control.

type TFieldRef = ^TField;

procedure FocusControl(Field: TFieldRef); override;

Description

Call FocusControl to give the Control associated with this TFieldDataLink object the input focus. FocusControl checks whether the Control can receive input focus, and if so, calls its SetFocus method to move focus to the Control.


TFieldDataLink.LayoutChanged
 VCL Reference

TFieldDataLink.LayoutChanged

TFieldDataLink	See also

Ensures that the Field property is valid after changes in the layout of a container of the Control for this TFieldDataLink.

procedure LayoutChanged; override;

Description

LayoutChanged is called after changes in the layout of one of the containers of the Control for this TFieldDataLink that might change the validity of its field binding. For example, if the Control is embedded within a TCustomDBGrid, and one of the columns is deleted, the Field property for the Control might become invalid.


TFieldDataLink.Modified
 VCL Reference

TFieldDataLink.Modified

TFieldDataLink	See also

Keeps track of changes made to the data for this field that are not yet written to the record in the dataset.

procedure Modified;

Description

Call Modified when the Control for this TFieldDataLink begins processing edits.


TFieldDataLink.RecordChanged
 VCL Reference

TFieldDataLink.RecordChanged

TFieldDataLink	See also

Generates an OnDataChange event.

procedure RecordChanged(Field: TField); override;

Description

Applications can not call this protected method. It is triggered automatically when the contents of the current record change. RecordChanged calls the OnDataChange event handler if there is one.


TFieldDataLink.Reset
 VCL Reference

TFieldDataLink.Reset

TFieldDataLink	See also

Ignores all pending changes and generates an OnDataChange event.

procedure Reset;

Description

The Control that owns a TFieldDataLink object calls its Reset method to process a UI action that cancels edits to the field. Reset calls the OnDataChange event handler without writing any pending changes to the record in the dataset.


TFieldDataLink.UpdateData
 VCL Reference

TFieldDataLink.UpdateData

TFieldDataLink	See also

Generates an OnUpdateData event.

procedure UpdateData; override;

Description

UpdateData overrides the default UpdateData method to call the OnUpdateData event handler where the data-aware control can write any pending edits to the record in the dataset.


Hierarchy

TObject

TPersistent

TDataLink

TFieldDataLink


IAppServer
 VCL Reference

IAppServer

Hierarchy	Methods 	See also

IAppServer is the interface that client datasets use to communicate with a dataset provider.

Unit

Midas

Description

Client datasets use an IAppServer interface to implement many of their properties and methods. This interface provides the basis of communication between the client dataset and a provider component from which it receives data and to which it applies updates.

If the provider is in the same application as the client dataset, the IAppServer interface is implemented by a hidden object that is created to manage the communication between the client dataset and the provider. In multi-tiered applications, client datasets obtain an IAppServer instance from a connection component that resides in the client application.

When client datasets use IAppServer to talk to a provider component, they pass the name of the desired provider to all method calls. By default, the interface is stateless, meaning that each method call functions independently, with no reliance on previous method calls. Because of this, IAppServer has no properties, which would represent persistent state information. However, there are cases where the client dataset relies on state information, such as the current database cursor position when performing incremental fetching using the AS_GetRecords method. This state information is preserved only if multiple clients do not share an application server that implements IAppServer.


 VCL Reference

IAppServer methods

IAppServer	Alphabetically	Legend

In IAppServer

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

Derived from IDispatch

GetIDsOfNames

GetTypeInfo

GetTypeInfoCount

Invoke

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IAppServer methods

IAppServer	By object	Legend

_AddRef

_Release

AS_ApplyUpdates

AS_DataRequest

AS_Execute

AS_GetParams

AS_GetProviderNames

AS_GetRecords

AS_RowRequest

GetIDsOfNames

GetTypeInfoCount

GetTypeInfo

Invoke

QueryInterface


IAppServer.AS_ApplyUpdates
 VCL Reference

IAppServer.AS_ApplyUpdates

IAppServer	See also

Applies updates received from a client dataset using a specified provider.

function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

AS_ApplyUpdates writes client updates to a dataset or database server.

ProviderName specifies the name of the provider component that manages the update operation.

Delta is a Variant containing the updated, inserted, and deleted records to write to the database.

MaxErrors indicates the maximum number of errors to permit before stopping the update operation.

ErrorCount returns the actual number of errors encountered during the update operation.

OwnerData is information supplied by the client application in a BeforeApplyUpdates event handler and returned to the client application in an AfterApplyUpdates event handler.

AS_ApplyUpdates returns a Variant that is a data packet containing all records that could not be applied to the database.


IAppServer.AS_DataRequest
 VCL Reference

IAppServer.AS_DataRequest

IAppServer	See also

Generates an OnDataRequest event on the specified provider component.

function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; safecall;

Description

Use AS_DataRequest to invoke an OnDataRequest event handler of the provider named by ProviderName. This method is provided to allow application developers to customize the communication between a client application and a provider component. There is no predefined meaning for the Data parameter or the return value.


IAppServer.AS_Execute
 VCL Reference

IAppServer.AS_Execute

IAppServer	See also

Executes the query or stored procedure bound to a specified provider.

procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; var Params: OleVariant; var OwnerData: OleVariant); safecall;

Description

Use AS_Execute to pass an execute command to a remote provider, using a specified set of parameters. AS_Execute calls the Execute method of the specified provider after assigning any parameters. Output parameters that result from executing a query or stored procedure are returned in the Params parameter.

The provider’s Execute method generates a BeforeExecute event, passes the command on to its associated dataset, and generates an AfterExecute event. The dataset must represent a query or stored procedure that does not return a cursor.

The ProviderName parameter specifies the name of the provider component associated with the query or stored procedure.

CommandText specifies an optional SQL statement that replaces the SQL of the query, or the name of a stored procedure that replaces the dataset’s stored procedure. This parameter is ignored if the provider’s Options property does not include poAllowCommandText.

The Params parameter encodes any parameters expected by the query or stored procedure and returns any output parameters. To create a properly encoded value for Params from a TParams object, use the PackageParams routine. To decode Params into a TParams object, use the UnpackParams routine.

The OwnerData parameter contains custom information that appears as an argument to the provider’s BeforeExecute and AfterExecute event handlers. This information originates in a client dataset’s BeforeExecute event handler. The value returned in OwnerData is passed to the client dataset’s AfterExecute event handler.


IAppServer.AS_GetParams
 VCL Reference

IAppServer.AS_GetParams

IAppServer	See also

Fetches current parameter values from the dataset bound to a specified provider.

function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; safecall;

Description

Use AS_GetParams to retrieve the current parameter values from the dataset associated with a provider.

The ProviderName parameter specifies the name of the provider component whose dataset has the parameters.

The OwnerData represents custom information that originates in a client dataset’s BeforeGetParams event handler and returns information that is passed to the client dataset’s AfterGetParams event handler.

AS_GetParams returns the parameters, encoded as a Variant array, where each element is a 2-element Variant array containing a parameter name and a parameter value. These parameters can be converted to a TParams object using the UnpackParams procedure. If the dataset has no parameters, or if the provider does not support parameter fetching, AS_GetParams returns a Null Variant.

Note:	AS_GetParams should not be used to retrieve output parameters from stateless application servers, because parameter values may be changed by other applications. When writing a stateless application server, retrieve parameter values using the AS_Execute method instead.


IAppServer.AS_GetProviderNames
 VCL Reference

IAppServer.AS_GetProviderNames

IAppServer	See also

Returns a list of all the available providers on a remote data module.

function AS_GetProviderNames: OleVariant; safecall;

Description

Call AS_GetProviderNames for a list of all providers available from a remote data module. These values indicate the possible values for the ProviderName property of a client dataset that uses the IAppServer interface of an application server. When calling any other IAppServer method, pass one of these names to indicate the provider that is the target of the method call.

AS_GetProviderNames returns the names of the providers in a Variant array. Client datasets are associated with a provider by setting their ProviderName property to one of these names.


IAppServer.AS_GetRecords
 VCL Reference

IAppServer.AS_GetRecords

IAppServer	See also

Returns a data packet that contains the specified data.

function AS_GetRecords(const ProviderName: WideString, Count: Integer; out RecsOut: Integer; Options: Integer; const CommandText: WideString; var Params: OleVariant; var OwnerData:OleVariant): OleVariant; safecall;

Description

Call AS_GetRecords to retrieve a specified number of records. GetRecords returns the requested records, starting with the current record of the provider’s dataset. When working with a stateless remote data module, you may need to reposition the cursor or re-execute a query or stored procedure in the provider’s BeforeGetRecords event handler.

ProviderName gives the name of the provider component that provides the records.

Count indicates the number or type of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only Count records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It is a combination of the GetRecordOption constants.  For example, the following value requests metadata along with a data packet encoded in XML:

MetaDataOption + XMLOption

CommandText specifies an optional SQL statement that replaces the SQL of a query, or the name of a table or stored procedure that replaces the provider’s table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

Params is a Variant containing any parameters that should be passed to the provider’s dataset before it executes to generate the requested data. It returns any output parameters. You can convert between the Variant format for parameters used by this argument and a TParams object using the global PackageParams and UnPackParams routines.

OwnerData contains custom information that is supplied by a client dataset’s BeforeGetRecords event handler. This information is passed to the provider’s BeforeGetRecords event handler. OwnerData returns information supplied by the provider’s AfterGetRecords event handler.

Records are returned as a data packet in a Variant.


IAppServer.AS_RowRequest
 VCL Reference

IAppServer.AS_RowRequest

IAppServer	See also

Returns information from a specified record of the provider’s dataset.

function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; var OwnerData: OleVariant): OleVariant; safecall;

Description

Client datasets call AS_RowRequest automatically to implement their FetchBlobs, FetchDetails , or RefreshRecord method.

The ProviderName parameter indicates the provider associated with the dataset from which information should be fetched.

The Row parameter is an OleVariant that describes the current record on the client dataset.

The RequestType parameter indicates the type of information required. It is an integer version of the TFetchOptions type. (An integer because the value may be marshaled to a remote application server). To create a value for RequestType, take the corresponding TFetchOptions value, cast it to a Byte, and cast the result to an Integer:

Integer(Byte([foBlobs, foDetails]));

OwnerData contains custom information that is supplied by a client dataset’s BeforeRowRequest event handler. This information is passed to the provider’s BeforeRowRequest event handler. OwnerData returns custom information supplied by the provider’s AfterRowRequest event handler.

The requested data is returned as a delta packet.


Hierarchy

IInterface

IAppServer


TISAPIRequest
 VCL Reference

TISAPIRequest

Hierarchy	Properties	Methods	Using TISAPIRequest	See also

TISAPIRequest represents client request information that is passed to a server application DLL.

Unit

ISAPIHTTP

Description

Use TISAPIRequest to interpret a client request to a server application DLL.

ISAPI application objects create TISAPIRequest objects to capture client requests. The properties of the TISAPIRequest objects are obtained from the Web server. The ISAPI application uses TISAPIRequest objects to create corresponding TISAPIResponse objects. The TWebDispatcher for the application then invokes the TWebActionItem that is associated with the path portion of the URL of the TISAPIRequest object.


 VCL Reference

TISAPIRequest properties

TISAPIRequest	Alphabetically	Legend

In TISAPIRequest

ECB

Derived from TWebRequest

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TISAPIRequest properties

TISAPIRequest	By object	Legend

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

ECB

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


TISAPIRequest.ECB
 VCL Reference

TISAPIRequest.ECB

TISAPIRequest	See also

Indicates the extension control block structure used by the server application DLL to communicate with the Web server.

property ECB: PEXTENSION_CONTROL_BLOCK;

Description

Read ECB to gain direct access to the extension control block that the server application DLL uses to represent the client request message. Most applications will not need to use the ECB property because the header fields values can be read using the GetFieldByName method.


 VCL Reference

TISAPIRequest methods

TISAPIRequest	Alphabetically	Legend

In TISAPIRequest

Create

GetDateVariable

GetFieldByName

GetIntegerVariable

GetStringVariable

ReadClient

ReadString

TranslateURI

WriteClient

WriteHeaders

WriteString

Derived from TWebRequest

Destroy

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TISAPIRequest methods

TISAPIRequest	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

FieldAddress

Free

FreeInstance

GetDateVariable

GetFieldByName

GetIntegerVariable

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetStringVariable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadClient

ReadString

SafeCallException

TranslateURI

WriteClient

WriteHeaders

WriteString


TISAPIRequest.Create
 VCL Reference

TISAPIRequest.Create

TISAPIRequest	See also

Creates an instance of TISAPIRequest to represent the request message information contained in the AECB parameter.

constructor Create(AECB: PEXTENSION_CONTROL_BLOCK);

Description

Applications don’t need to call Create to instantiate an ISAPI request object. TISAPIApplication creates a TISAPIRequest object whenever it receives a client request.


TISAPIRequest.GetDateVariable
 VCL Reference

TISAPIRequest.GetDateVariable

TISAPIRequest	See also

Extracts a date value from the extension control block.

function GetDateVariable(Index: Integer): TDateTime; override;

Description

GetDateVariable reads date-time values from the extension control block specified by the ECB property. The ISAPI request object uses GetDateVariable to access the properties that represent dates from the HTTP request headers.


TISAPIRequest.GetFieldByName
 VCL Reference

TISAPIRequest.GetFieldByName

TISAPIRequest	See also

Returns the value of the HTTP header variable specified by the Name parameter.

function GetFieldByName(const Name: string): string; override;

Description

Use GetFieldByName to read the value of an HTTP header variable that is not surfaced as one of the properties of TISAPIRequest. For information on possible HTTP request header variables, see the current Internet standards documents.


TISAPIRequest.GetIntegerVariable
 VCL Reference

TISAPIRequest.GetIntegerVariable

TISAPIRequest	See also

Extracts an integer value from the extension control block.

function GetIntegerVariable(Index: Integer): Integer; override;

Description

GetIntegerVariable reads integer values from the extension control block specified by the ECB property. The ISAPI request object uses GetIntegerVariable to access the properties that represent integers from the HTTP request headers.


TISAPIRequest.GetStringVariable
 VCL Reference

TISAPIRequest.GetStringVariable

TISAPIRequest	See also

Extracts a string value from the extension control block.

function GetStringVariable(Index: Integer): string; override;

Description

GetStringVariable reads string values from the extension control block specified by the ECB property. The ISAPI request object uses GetStringVariable to access the properties that represent strings from the HTTP request headers.


TISAPIRequest.ReadClient
 VCL Reference

TISAPIRequest.ReadClient

TISAPIRequest	See also

Reads Count bytes from the HTTP request into Buffer.

function ReadClient(var Buffer; Count: Integer): Integer; override;

Description

Use ReadClient to load a chunk of information from the contents of an HTTP request into a buffer. ReadClient allows the server application to get the next chunk of information when the content of the request message is too large for the Content property. ReadClient returns the number of bytes actually read. If no more content is available, ReadClient returns -1.


TISAPIRequest.ReadString
 VCL Reference

TISAPIRequest.ReadString

TISAPIRequest	See also

Reads Count bytes from the HTTP request into a string.

function ReadString(Count: Integer): string; override;

Description

Use ReadString to load the next chunk of content information form the HTTP request into a string. ReadString allows the server application to get the next chunk of information when the content of the request message is too large for the Content property.


TISAPIRequest.TranslateURI
 VCL Reference

TISAPIRequest.TranslateURI

TISAPIRequest	See also

Translates a Uniform Resource Identifier (URI) into the internal representation of a location on the server.

function TranslateURI(const URI: string): string; virtual; abstract;

Description

Use TranslateURI is used to translate the URI specified in a client request into a format that can be used by the server application.


TISAPIRequest.WriteClient
 VCL Reference

TISAPIRequest.WriteClient

TISAPIRequest	See also

Writes Count bytes from Buffer back to the HTTP client.

function WriteClient(var Buffer; Count: Integer): Integer; override;

Description

Use WriteClient to write the contents of a response back to the Web client.


TISAPIRequest.WriteHeaders
 VCL Reference

TISAPIRequest.WriteHeaders

TISAPIRequest

Writes the header contents back to the HTTP client.

function WriteHeaders(StatusCode: Integer; const StatusString, Headers: string): Boolean; override;

Description

Use WriteHeaders to write the contents of a header back to the Web client.


TISAPIRequest.WriteString
 VCL Reference

TISAPIRequest.WriteString

TISAPIRequest	See also

Writes the string AString back to the HTTP client.

function WriteString(const AString: string): Boolean; virtual; override;

Description

Use WriteString to write the contents of a response back to the web client.


Hierarchy

TObject

TWebRequest

TISAPIRequest


TISAPIResponse
 VCL Reference

TISAPIResponse

Hierarchy	Properties	Methods	Using TISAPIResponse	See also

TISAPIResponse represents HTTP messages sent by an ISAPI application in response to an HTTP request message.

Unit

ISAPIHTTP

Description

Use TISAPIResponse to specify the response to an HTTP request message.

An ISAPI application creates a TISAPIResponse object based on the TISAPIRequest object for an incoming HTTP request message. TWebDispatcher then passes the TISAPIResponse object to the TWebActionItem associated with the TISAPIRequest object. The TWebActionItem sets the properties of the TISAPIResponse object.


 VCL Reference

TISAPIResponse properties

TISAPIResponse	Alphabetically	Legend

Derived from TWebResponse

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TISAPIResponse properties

TISAPIResponse	By object	Legend

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TISAPIResponse methods

TISAPIResponse	Alphabetically	Legend

In TISAPIResponse

Create

GetContent

GetDateVariable

GetIntegerVariable

GetLogMessage

GetStatusCode

GetStringVariable

SendRedirect

SendResponse

SendStream

Sent

SetContent

SetDateVariable

SetIntegerVariable

SetLogMessage

SetStatusCode

SetStringVariable

Derived from TWebResponse

Destroy

GetCustomHeader

SetCookieField

SetCustomHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TISAPIResponse methods

TISAPIResponse	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetContent

GetCustomHeader

GetDateVariable

GetIntegerVariable

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLogMessage

GetStatusCode

GetStringVariable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SendRedirect

SendResponse

SendStream

Sent

SetContent

SetCookieField

SetCustomHeader

SetDateVariable

SetIntegerVariable

SetLogMessage

SetStatusCode

SetStringVariable


TISAPIResponse.Create
 VCL Reference

TISAPIResponse.Create

TISAPIResponse	See also

Creates an instance of TISAPIResponse to represent the response to the HTTPRequest parameter.

constructor Create(HTTPRequest: TWebRequest);

Description

Applications don’t need to call Create to instantiate a ISAPI response object. TISAPIApplication creates a TISAPIResponse for each TISAPIRequest it creates.


TISAPIResponse.GetContent
 VCL Reference

TISAPIResponse.GetContent

TISAPIResponse	See also

Reads the value of the Content property.

function GetContent: string; override;

Description

GetContent is the protected access function for the Content property.


TISAPIResponse.GetDateVariable
 VCL Reference

TISAPIResponse.GetDateVariable

TISAPIResponse	See also

Extracts a date from the internal table of HTTP header variables.

function GetDateVariable(Index: Integer): TDateTime; override;

Description

The ISAPI response object uses GetDateVariable to access the properties that represent dates.


TISAPIResponse.GetIntegerVariable
 VCL Reference

TISAPIResponse.GetIntegerVariable

TISAPIResponse	See also

Extracts an integer value from the internal table of HTTP header variables.

function GetIntegerVariable(Index: Integer): Integer; override;

Description

The ISAPI response object uses GetIntegerVariable to access the properties that represent integers.


TISAPIResponse.GetLogMessage
 VCL Reference

TISAPIResponse.GetLogMessage

TISAPIResponse	See also

Reads the value of the LogMessage property.

function GetLogMessage: string; override;

Description

GetLogMessage is the protected access function for LogMessage property.


TISAPIResponse.GetStatusCode
 VCL Reference

TISAPIResponse.GetStatusCode

TISAPIResponse	See also

Reads the value of the StatusCode property.

function GetStatusCode: Integer; override;

Description

GetStatusCode is the protected access function for the StatusCode property.


TISAPIResponse.GetStringVariable
 VCL Reference

TISAPIResponse.GetStringVariable

TISAPIResponse	See also

Extracts a string value from the internal table of HTTP header variables.

function GetStringVariable(Index: Integer): string; override;

Description

The ISAPI response object uses GetStringVariable to access the properties that represent strings.


TISAPIResponse.SendRedirect
 VCL Reference

TISAPIResponse.SendRedirect

TISAPIResponse	See also

Sends the response with a StatusCode of 301 (Moved Permanently) and with Location set to the URI parameter.

procedure SendRedirect(const URI: string); override;

Description

Call SendRedirect to redirect the web client request to another URI that is the proper target of the request. SendRedirect does the same thing as setting the StatusCode to 301, the Location to URI, and calling SendResponse.


TISAPIResponse.SendResponse
 VCL Reference

TISAPIResponse.SendResponse

TISAPIResponse	See also	Example

Sends the ISAPI response message to the web client.

procedure SendResponse; override;

Description

Call SendResponse after setting the properties of the HTTP response object to specify the response that should be made to the web client. If the request should be redirected to another URI, it is more efficient to call SendRedirect.


TISAPIResponse.SendStream
 VCL Reference

TISAPIResponse.SendStream

TISAPIResponse	See also

Sends the ISAPI response message with the contents set to the contents of AStream.

procedure SendStream(AStream: TStream); override;

Description

Only call SendStream after first calling SendResponse. Unlike SendStream, SendResponse fills the header of the HTTP response message, based on the properties of the TISAPIResponse object. If SendResponse has not been called first to set the header of the HTTP response message, set the ContentStream property to AStream, and call SendResponse.


TISAPIResponse.Sent
 VCL Reference

TISAPIResponse.Sent

TISAPIResponse	See also

Indicates whether the ISAPI response message has been sent.

function Sent: Boolean; override;

Description

Sent returns True if the SendRedirect or SendStream method has been called. TISAPIApplication objects read Sent to determine whether they should send a response to the web client.


TISAPIResponse.SetContent
 VCL Reference

TISAPIResponse.SetContent

TISAPIResponse	See also

Sets the Content property.

procedure SetContent(const Value: string); override;

Description

SetContent is the protected method used by ISAPI response objects to set the Content property.


TISAPIResponse.SetDateVariable
 VCL Reference

TISAPIResponse.SetDateVariable

TISAPIResponse	See also

Sets a date-time valued HTTP header property.

procedure SetDateVariable(Index: Integer; const Value: TDateTime); override;

Description

SetDateVariable writes date-time to the internal table used to store HTTP header variables. The ISAPI response object uses SetDateVariable to set the properties that represent dates.


TISAPIResponse.SetIntegerVariable
 VCL Reference

TISAPIResponse.SetIntegerVariable

TISAPIResponse	See also

Sets an integer valued HTTP header property.

procedure SetIntegerVariable(Index: Integer; Value: Integer); override;

Description

SetIntegerVariable writes integer values to the internal table used to store HTTP header variables. The ISAPI response object uses SetIntegerVariable to set the properties that represent integers.


TISAPIResponse.SetLogMessage
 VCL Reference

TISAPIResponse.SetLogMessage

TISAPIResponse	See also

Sets the value of the LogMessage property.

procedure SetLogMessage(const Value: string); virtual; override;

Description

SetLogMessage is the protected method used by ISAPI response objects to set the LogMessage property.


TISAPIResponse.SetStatusCode
 VCL Reference

TISAPIResponse.SetStatusCode

TISAPIResponse	See also

Sets the StatusCode property.

procedure SetStatusCode(Value: Integer); override;

Description

SetStatusCode is the protected method used by ISAPI response objects to set the StatusCode property.


TISAPIResponse.SetStringVariable
 VCL Reference

TISAPIResponse.SetStringVariable

TISAPIResponse	See also

Sets a string valued HTTP header property.

procedure SetStringVariable(Index: Integer; const Value: string); override;

Description

SetStringVariable writes string values to the internal table used to store HTTP header variables. The ISAPI response object uses SetStringVariable to set the properties that represent strings.


Hierarchy

TObject

TWebResponse

TISAPIResponse


TItemProp
 VCL Reference

TItemProp

Hierarchy	Properties	Methods	See also

TItemProp configures how users can edit the item values in a value list editor.

Unit

Valedit

Description

For each item that it allows users to edit, the TValueListEditor component maintains a TItemProp object. This object’s properties govern how users can edit the value in the value list editor.

TItemProp objects are created and owned by the value list editor that uses them to represent properties of item values (such as an edit mask or maximum length) or to supply a fixed pick list of values that users can assign to the item.


 VCL Reference

TItemProp properties

TItemProp	Alphabetically	Legend

In TItemProp

EditMask

EditStyle

KeyDesc

MaxLength

PickList

ReadOnly


 VCL Reference

TItemProp properties

TItemProp	By object	Legend

EditMask

EditStyle

KeyDesc

MaxLength

PickList

ReadOnly


TItemProp.EditMask
 VCL Reference

TItemProp.EditMask

TItemProp	See also

Restricts the value that can be entered for the associated item.

property EditMask: string;

Description

Use EditMask to restrict the characters a user can enter. If the user attempts to enter a character that is not valid, the character is not accepted. Validation using the EditMask property is performed on a character-by-character basis.

A mask consists of three fields with semicolons separating the fields. The first part of the mask is the mask itself. The second part is the character that determines whether the literal characters of a mask are included as part of the data. The third part of the mask is the character used to represent unentered characters in the mask.

Setting EditMask to an empty string removes the mask.

For more information on using edit masks, see the TEditMask type.


TItemProp.EditStyle
 VCL Reference

TItemProp.EditStyle

TItemProp	See also

Determines whether the cell that contains the associated value has a drop-down arrow or ellipsis button.

property EditStyle: TEditStyle;

Description

Set EditStyle to specify whether the cell in the value list editor that contains the associated value should allow users to drop down a pick list or to launch a dialog to edit the value.

When EditStyle is esSimple, the value cell is a simple edit box that lets users edit the associated value directly (unless the ReadOnly property is True).

When EditStyle is esEllipsis, the value cell contains an ellipsis button that users can click to generate an OnEditButtonClick event. Typically, applications use this event to launch a dialog that edits the value.

When EditStyle is esPickList, the value cell contains a drop-down arrow that users can click to display a list of values from which to select. This value must be supplied by the PickList property or in an OnGetPickList event handler (or supplied by the PickList property and modified in an OnGetPickList event handler).


TItemProp.KeyDesc
 VCL Reference

TItemProp.KeyDesc

TItemProp	See also

Specifies the name of the item, which appears in the names column of the Value list editor.

property KeyDesc: string;

Description

Set KeyDesc to specify a name for this item. This name appears in the names column of the Value list editor.

If ItemProp is not set, then the name that appears in the key column of the Value list editor is the corresponding value of the Keys property.


TItemProp.MaxLength
 VCL Reference

TItemProp.MaxLength

TItemProp	See also

Specifies the maximum number of characters that users can enter for the item’s value.

property MaxLength: Boolean;

Description

Use MaxLength to limit the number of characters that can be typed when assigning a value to the item. A value of 0 indicates that there is no application-defined limit on the length.

Note:	Setting MaxLength will not truncate the existing value, it merely prevents the user from adding more text after reaching the limit of MaxLength characters.

Note:	Even when MaxLength is 0, there may be limitations imposed by the operating system on the number of characters that may be entered.


TItemProp.PickList
 VCL Reference

TItemProp.PickList

TItemProp	See also

Lists the items that appear in the drop-down pick list for the item.

property PickList: TStrings;

Description

Use PickList to supply the values that appear in the drop-down pick list for the associated item. PickList lets you supply a static set of items that appear in the drop-down list for the associated item when EditStyle is esPickList. These items can be subsequently modified by an OnGetPickList event handler.

Note:	PickList is only used when the EditStyle property is esPickList. If EditStyle is esPickList, and PickList does list a set of values, you must supply an OnGetPickList event handler to supply the items.


TItemProp.ReadOnly
 VCL Reference

TItemProp.ReadOnly

TItemProp	See also

Indicates whether users can edit the item’s value by typing in a new value.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent users from typing in a new value for the associated item. For example, to force users to select item values only from a pick list, you can set the EditStyle to esPickList and set ReadOnly to True. Similarly, to force users to enter values only using a property editor, you can set EditStyle to esEllipsis and set ReadOnly to True.


 VCL Reference

TItemProp methods

TItemProp	Alphabetically	Legend

In TItemProp

Create

Destroy

HasPickList

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TItemProp methods

TItemProp	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HasPickList

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TItemProp.Create
 VCL Reference

TItemProp.Create

TItemProp	See also

Creates an instance of TItemProp.

constructor Create(AEditor: TValueListEditor);

Description

Do not call Create directly in an application. TValueListEditor creates TItemProp instances as needed when you make assignments to its ItemProps property.

The AEditor parameter is the value list editor that creates the TItemProp instance to represent the properties of one of its items.


TItemProp.TItemProp
 VCL Reference

TItemProp.DestroyTItemProp	See also

Frees the memory associated with the TItemProp object.

Description

Do not call Destroy. The TValueListEditor that owns this TItemProp object destroys the object when it is no longer needed.


TItemProp.HasPickList
 VCL Reference

TItemProp.HasPickList

TItemProp	See also

Indicates whether the PickList property provides a static set of values for this item.

function HasPickList: Boolean;

Description

Call PickList to determine whether this TItemProp object supplies values using the PickList property. HasPickList returns True if the PickList property contains a nonempty list of values.


Hierarchy

TObject

TPersistent

TItemProp


TListControlCopySelection
 VCL Reference

TListControlCopySelection

Hierarchy	Properties	Methods	Events	Using TListControlCopySelection	See also

TListControlCopySelection copies the selected items in a list control (list view or list box) to another (destination) list control.

Unit

StdActns

Description

Add TListControlCopySelection to an action list to allow users to copy the selected items of a list control to another list control by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to copy all selected items in the target control to another (destination) list control.

Your application must explicitly set the Destination property to indicate the list to which items are copied.

TListControlCopySelection is designed to work with a list control (TCustomListControl descendant) as a target. This target is the source list control, not the destination. TListControlCopySelection automatically disables itself if the target control is not a list control, if that list box or list view has no selected items, or if there is no destination list control assigned.


 VCL Reference

TListControlCopySelection properties

TListControlCopySelection	Alphabetically	Legend

In TListControlCopySelection

Destination

Derived from TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlCopySelection properties

TListControlCopySelection	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Destination

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TListControlCopySelection.Destination
 VCL Reference

TListControlAction.Destination

TListControlAction 	See also

Specifies the list control to which items are copied.

property Destination: TCustomListControl;

Description

Destination is the list control to which the action copies selected items from its target. It is a TCustomListControl descendant, such a TListView or TListBox.

You must explicitly set Destination to indicate the list control that receives the new items. These items are copied from the list control specified by the ListControl property. Destination and ListControl do not need to be the same type of control, as long as they are both TCustomListControl descendants.


 VCL Reference

TListControlCopySelection events

TListControlCopySelection	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlCopySelection events

TListControlCopySelection	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlCopySelection methods

TListControlCopySelection	Alphabetically	Legend

In TListControlCopySelection

ExecuteTarget

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

ReferenceInterface

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlCopySelection methods

TListControlCopySelection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlCopySelection.ExecuteTarget
 VCL Reference

TListControlCopySelection.ExecuteTarget

TListControlCopySelection 	See also

Copies the selected items in the target list control to the list control specified by Destination.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires. It should always be a TCustomListControl descendant (because HandlesTarget returns False if it is not).

ExecuteTarget sets the ListControl property to Target it is not already set.  It then calls the list control’s ClearSelection method, copying any selected items to the list box or list view specified by the Destination property.


TListControlCopySelection.HandlesTarget
 VCL Reference

TTListControlCopySelection.HandlesTarget

TTListControlCopySelection 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget checks that the target is a TCustomListControl descendant (or that the ListControl property is set if Target is nil). It also ensures that the Destination property has been asssigned. HandlesTarget returns True if there is a list control to act as target and a destination control, False otherwise.


TListControlCopySelection.UpdateTarget
 VCL Reference

TListControlCopySelection.UpdateTarget

TListControlCopySelection 	See also

Enables or disables the action, depending on the state of the target control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TListControlCopySelection, UpdateTarget checks whether the current target object (specified by the ListControl property if it is set, otherwise by the Target parameter) is a list control that includes at least one selected item. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction

TListControlCopySelection


TListControlSelectAll
 VCL Reference

TListControlSelectAll

Hierarchy	Properties	Methods	Events	Using TListControlSelectAll	See also

TListControlSelectAll selects all the items in a list control (list view or listbox).

Unit

StdActns

Description

Add TListControlSelectAll to an action list to allow users to select all the items of a list control by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to select all items in the target control (a listbox or list view).

TListControlSelectAll is designed to work with a list control (TCustomListControl descendant) as a target. TListControlSelectAll automatically disables itself if the target control is not a list control, if that target control does not permit multiple selection, or if all of the items in the target control are already selected.


 VCL Reference

TListControlSelectAll properties

TListControlSelectAll	Alphabetically	Legend

Derived from TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlSelectAll properties

TListControlSelectAll	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TListControlSelectAll events

TListControlSelectAll	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlSelectAll events

TListControlSelectAll	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlSelectAll methods

TListControlSelectAll	Alphabetically	Legend

In TListControlSelectAll

ExecuteTarget

UpdateTarget

Derived from TListControlAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

ReferenceInterface

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlSelectAll methods

TListControlSelectAll	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlSelectAll.ExecuteTarget
 VCL Reference

TListControlSelectAll.ExecuteTarget

TListControlSelectAll 	See also

Selects all the items in the target list control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires. It should always be a TCustomListControl descendant (because HandlesTarget returns False if it is not).

ExecuteTarget sets the ListControl property to Target it is not already set.  It then calls the list control’s SelectAll method, selecting all of its items.


TListControlSelectAll.UpdateTarget
 VCL Reference

TListControlSelectAll.UpdateTarget

TListControlSelectAll 	See also

Enables or disables the action, depending on the state of the target control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TListControlSelectAll, UpdateTarget checks whether the current target object (specified by the ListControl property if it is set, otherwise by the Target parameter) is a list control that includes allows multiple selections and that includes at least one unselected item. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction

TListControlSelectAll


TListSourceLink
 VCL Reference

TListSourceLink

Hierarchy	Properties	Methods	See also

TListSourceLink helps manage the link to the ListSource of a TDBLookupControl object.

Unit

DBCtrls

Description

TListSourceLink is tailored to work with TDBLookupControl. It should only be used by the TDBLookupControl class.


 VCL Reference

TListSourceLink properties

TListSourceLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TListSourceLink properties

TListSourceLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TListSourceLink methods

TListSourceLink	Alphabetically	Legend

In TListSourceLink

ActiveChanged

Create

DataSetChanged

LayoutChanged

Derived from TDataLink

Destroy

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListSourceLink methods

TListSourceLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataSetChanged

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

NewInstance

SafeCallException

UpdateAction

UpdateRecord


TListSourceLink.ActiveChanged
 VCL Reference

TListSourceLink.ActiveChanged

TListSourceLink	See also

Informs the TDBLookupControl of changes to the Active property of the dataset that it maintains for the ListSource.

procedure ActiveChanged; override;

Description

Applications should not call the ActiveChanged procedure directly. Changes in the Active property of the dataset trigger this procedure. ActiveChanged causes the TDBLookupControl to reacquire its lookup list.


TListSourceLink.Create
 VCL Reference

TListSourceLink.Create

TListSourceLink	See also

Creates an instance of TDataSourceLink.

constructor Create;

Description

Create is called from the constructor of any TlookupControl descendant object that uses a TListSourceLink to implement its ListSource property.

Create calls the inherited Create method and then sets VisualControl to True.


TListSourceLink.DataSetChanged
 VCL Reference

TListSourceLink.DataSetChanged

TListSourceLink	See also

Informs the TDBLookupControl of changes to the current record of the dataset that the TDBLookupControl uses to populate its list.

procedure DataSetChanged; override;

Description

Applications should not call the DataSetChanged procedure directly. These calls are triggered automatically by the dataset. DataSetChanged informs the TListSourceLink of dataset changes so that it can move to the appropriate record in the dataset.


TListSourceLink.LayoutChanged
 VCL Reference

TListSourceLink.LayoutChanged

TListSourceLink

Ensures that the lookup list of the associated lookup control is up-to-date.

procedure LayoutChanged; override;

Description

LayoutChanged is called automatically after changes in the size or binding of the associated lookup control. It updates the associated lookup control’s lookup list to reflect the current size and binding.


Hierarchy

TObject

TPersistent

TDataLink

TListSourceLink


TMask
 VCL Reference

TMask

Hierarchy	Methods	See also

TMask allows the comparison of strings containing wildcards to a file mask.

Unit

Masks

Description

Use TMask to determine if a string matches the format described by a mask. The mask contains literal characters, wildcards that can match any character, and sets that match a single character that is included in the set.

Note:	Do not confuse TMask with the EditMask of a field or masked edit object. While both are used for comparing strings to a symbolic description of valid values, the special mask symbols and matching rules are completely different.


 VCL Reference

TMask methods

TMask	Alphabetically	Legend

In TMask

Create

Destroy

Matches

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMask methods

TMask	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

Matches

MethodAddress

MethodName

NewInstance

SafeCallException


TMask.Create
 VCL Reference

TMask.Create

TMask	See also

Creates an instance of TMask for a given mask.

constructor Create(const MaskValue: string);

Description

Call Create to create a mask object for comparing strings to the mask given by the MaskValue parameter. A valid mask consists of literal characters, sets, and wildcards.

Each literal character must match a single character in the string. The comparison to literal characters is case-insensitive.

Each set begins with an opening bracket ([) and ends with a closing bracket (]). Between the brackets are the elements of the set. Each element is a literal character or a range. Ranges are specified by an initial value, a dash (-), and a final value. Do not use spaces or commas to separate the elements of the set. A set must match a single character in the string. The character matches the set if it is the same as one of the literal characters in the set, or if it is in one of the ranges in the set. A character is in a range if it matches the initial value, the final value, or falls between the two values. All comparisons are case-insensitive. If the first character after the opening bracket of a set is an exclamation point (!), then the set matches any character that is not in the set.

Wildcards are asterisks (*) or question marks (?). An asterisk matches any number of characters. A question mark matches a single arbitrary character.


TMask.Destroy
 VCL Reference

TMask.Destroy

TMask	See also

Destroys an instance of TMask.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TMask reference is not nil, and only then calls Destroy.

Destroy frees the memory used to store a parsed image of the mask.


TMask.Matches
 VCL Reference

TMask.Matches

TMask	See also

Indicates whether a specified string matches the mask.

function Matches(const Filename: string): Boolean;

Description

Call Matches to compare the Filename parameter to the mask that describes valid values. Matches returns True if the string matches the mask. Matches returns False if the string does not match the mask. Matches raises an exception if the mask is syntactically invalid.

The mask is set when the TMask object is created.

Note:	While the VCL uses TMask to check the whether file names specify valid directories, the Filename parameter does not need to be a file name. TMask can be used to check strings against any syntactically correct mask.


Hierarchy

TObject

TMask


TMemoField
 VCL Reference

TMemoField

Hierarchy	Properties	Methods	Events 	Using TMemoField	See also

TMemoField represents a memo field in a dataset.

Unit

DB

Description

TMemoField encapsulates the fundamental behavior common to fields that contain text data or arbitrary length. Memo fields are a form of binary large object (BLOB) field where the data consists of simple text.

If you use the Fields editor at design time to create a persistent field component for the memo field, you can access it by name at runtime. When using dynamic field components, you can access the TMemoField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TMemoField properties

TMemoField	Alphabetically	Legend

Derived from TBlobField

AsString

AsVariant

BlobSize

BlobType

GraphicHeader

IsNull

Modified

Transliterate

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMemoField properties

TMemoField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

GraphicHeader

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Modified

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


 VCL Reference

TMemoField events

TMemoField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TMemoField events

TMemoField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TMemoField methods

TMemoField	Alphabetically	Legend

In TMemoField

Create

Derived from TBlobField

Assign

Clear

IsBlob

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SetFieldType

Derived from TField

AssignValue

Destroy

FocusControl

GetData

IsValidChar

RefreshLookupList

SetData

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMemoField methods

TMemoField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToFile

SaveToStream

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TMemoField.Create
 VCL Reference

TMemoField.Create

TMemoField	See also

Creates an instance of TMemoField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TMemoField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftMemo, and initializes the Transliterate property to True. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TMemoField. After instantiating a TMemoField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TMemoField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TMemoField with a dataset component by setting its DataSet property.

The example below creates a TMemoField object for a field named Notes accessed through a TQuery named Query1.

var

  T: TMemoField;

begin

  Query1.Close;

  T := TMemoField.Create(Query1);

  T.FieldName := 'Notes';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TBlobField

TMemoField


TDataPacketFormat type
 VCL Reference

TDataPacketFormat type

Indicates how information is encoded in a data packet or delta packet.

Unit

DBClient

type TDataPacketFormat = (dfBinary, dfXML, dfXMLUTF8);

Description

TDataPacketFormat indicates how a provider encodes database information into data packets. The following table lists the possible values:

Value	Meaning

dfBinary	Information is encoded in binary format.

dfXML	Information is encoded in XML, with extended characters encoded using an escape sequence.

dfXMLUTF8	Information is encoded in XML, with extended characters represented using UTF8.


TFetchOption, TFetchOptions type
 VCL Reference

TFetchOption, TFetchOptions type

Indicates the type of information about a record that a client dataset can request.

Unit

DBClient

type

  TFetchOption = (foRecord, foBlobs, foDetails);

  TFetchOptions = set of TFetchOption;

Description

Providers encode the flags received from a client dataset that indicate what type of row information they require into a value of type TFetchOptions. This value is used internally when assembling the requested information. TFetchOptions is a set that includes zero or more of the following values:

Value	Meaning

foRecord	The values of fields on the current record. (Used to refresh records).

foBlobs	The values of BLOB fields on the current record. (Used to implement delayed fetching of BLOB data).

foDetails	Any nested dataset fields for the current record. (Used to implement delayed fetching of detail datasets.


TGetRecordOption, TGetRecordOptions type
 VCL Reference

TGetRecordOption, TGetRecordOptions type

See also

Influences what type of information is added to data packets.

Unit

Provider

type

  TGetRecordOption = (grMetaData, grReset, grXML, grXMLUTF8);

  TGetRecordOptions = set of TGetRecordOption;

Description

TGetRecordOptions is a set of TGetRecordOption values. TGetRecordOption values are listed in the following table:

Value	Meaning

grMetaData	The data packet includes metadata as well as record values.

grReset	The records in the data packet start with the first record, regardless of the contents of any previously sent data packets.

grXML	The data packet is transmitted as a string of XML instead of as an OleVariant. Extended characters are expressed using escape sequences.

grXMLUTF8	The data packet is transmitted as a string of XML instead of as an OleVariant. Extended characters are encoded using UTF-8.


GetRecordOption constants
 VCL Reference

GetRecordOption constants

See also

Integer versions of the TGetRecordOption enumerated values.

Unit

Provider

const

  MetaDataOption: Integer = byte(grMetaData);

  ResetOption: Integer = byte(grReset);

  XMLOption: Integer = byte(grXML);

  XMLUTF8Option: Integer = byte(grXMLUTF8);

Description

The GetRecordOption constants are integer constant versions of TGetRecordOption values. They are used to represent the Options parameter in the AS_GetRecords method. The following table lists the correspondences between these constants and TGetRecordOption enumerated values.

Constant	TGetRecordOption value	Meaning
MetaDataOption	grMetaData	The data packet includes metadata as well as record values.
ResetOption	grReset	The records in the data packet start with the first record, regardless of the contents of any previously sent data packets.
XMLOption	grXML	The data packet is transmitted as a string of XML instead of as an OleVariant.
XMLUTF8Option	grXMLUTF8	The data packet is transmitted as a string of XML instead of as an OleVariant. Extended characters are encoded using UTF-8.


TProviderOption, TProviderOptions type
 VCL Reference

TProviderOption, TProviderOptions type

See also

Influences what type of information is communicated between client datasets and provider components.

Unit

Provider

type

  TProviderOption = (poFetchBlobsOnDemand, poFetchDetailsOnDemand, poIncFieldProps, poCascadeDeletes, poCascadeUpdates, poReadOnly, poAllowMultiRecordUpdates, poDisableInserts, poDisableEdits, poDisableDeletes, poNoReset, poAutoRefresh, poPropogateChanges, poAllowCommandText, poRetainServerOrder);

  TProviderOptions = set of TProviderOption;

Description

TProviderOptions is a set of TProviderOption values. TProviderOption values are listed in the following table:

Value	Meaning

poFetchBlobsOnDemand	BLOB fields are not included in data packets. Instead, client applications must request these values on an as-needed basis. If the client dataset’s FetchOnDemand property is True, the client requests these values automatically. Otherwise, the client application uses the FetchBlobs method to retrieve BLOB data.

poFetchDetailsOnDemand	When the provider represents the master of a master/detail relationship, nested detail values are not included in the data packet. Instead, client applications request these on an as-needed basis. If the client dataset’s FetchOnDemand property is True, the client requests these values automatically. Otherwise the client application uses the FetchDetails method to retrieve nested detail sets.

poIncFieldProps	The data packet includes the following field properties (where applicable): Alignment, DisplayLabel, DisplayWidth, Visible, DisplayFormat, EditFormat, MaxValue, MinValue, Currency, EditMask, DisplayValues

poCascadeDeletes	Tells the server to delete detail records automatically when master table records are deleted. To use this option, the provider must represent the master of a master/detail relationship and the database must support cascaded deletes as part of its referential integrity settings.

poCascadeUpdates	Tells the server to update detail records automatically when master table key values are changed. To use this option, the provider must represent the master of a master/detail relationship and the database must support cascaded updates as part of its referential integrity settings.

poReadOnly	The client dataset can’t apply updates to the provider.

poAllowMultiRecordUpdates	Enables individual updates that affect multiple records. When poAllowMultiRecordUpdates is not included, updates that change multiple records are automatically aborted.

poDisableInserts	Clients can’t add new records. If the client tries to insert a record an exception is raised. (This does not affect the client’s ability to edit or delete records)

poDisableEdits	Clients can’t modify existing data values. If the client tries to edit a field an exception is raised. (This does not affect the client’s ability to insert or delete records)

poDisableDeletes	Clients can’t delete records. If the client tries to delete a record an exception is raised. (This does not affect the client’s ability to edit or insert records)

poNoReset	Ignores the reset flag in calls to AS_GetRecords (TGetRecordsOption value of grReset).

poAutoRefresh	Refreshes the client dataset with current record values whenever it applies updates.

poPropogateChanges	Changes made in a BeforeUpdateRecord or AfterUpdateRecord event handler are sent back to the client and merged into the client dataset.

poAllowCommandText	Enables the client to override the provider’s dataset by replacing its associated SQL text or the name of its stored procedure or table. These overrides are supplied to the GetRecords or Execute method.

poRetainServerOrder	Signals that the client should not attempt to re-establish the default order by sorting the records in the data packet. This prevents the client from changing the record order because, for example, it is unable to duplicate the locale on the server.


TReconcileAction type
 VCL Reference

TReconcileAction type

See also

Indicates how a client dataset should handle a record whose update generated an error.

Unit

DBClient

type TReconcileAction = (raSkip, raAbort, raMerge, raCorrect, raCancel, raRefresh);

Description

TReconcileAction is the type of the return parameter in a client dataset’s OnReconcileError event handler. It indicates the action to take when the OnReconcileError handler exits. The following table lists the possible values and what they indicate:

Value	Meaning

raSkip	Skip updating the record that raised the error condition, and leave the unapplied changes in the change log.

raAbort	Abort the entire reconcile operation.

raMerge	Merge the updated record with the record on the server.

raCorrect	Replace the current updated record with the value of the record in the event handler.

raCancel	Back out all changes for this record, reverting to the original field values.

raRefresh	Back out all changes for this record, replacing it with the current values from the server.


TRemoteEvent type
 VCL Reference

TRemoteEvent type

See also	Example

The type for event handlers that pass custom information to or from a provider.

Unit

DBClient

type

  TRemoteEvent = procedure(Sender: TObject; var OwnerData: OleVariant) of object;

Description

TRemoteEvent is the type for event handlers that allow client applications and providers to customize the communication that occurs over an IAppServer interface. Before every  IAppServer call that is directed toward a provider, the client dataset receives an event of type TRemoteEvent where it can return custom information as an OleVariant. When the IAppServer interface passes the command to the target provider, the provider receives an event of type TRemoteEvent where it can respond to or change the incoming information before the command is executed. After executing the command, the provider receives another event of the same type, where it can once again review the custom information and return custom information to the client dataset. Finally, the client dataset receives the returned information in a TRemoteEvent event handler or as a parameter to the method.

Sender is the client dataset or provider that receives the event:

OwnerData is the custom information defined by the application developer.

In client dataset “BeforeXXX” events, this parameter is for output only so that it can be sent to the provider.

In provider “BeforeXXX” events, this parameter enters as information sent by the client dataset “BeforeXXX” event and returns the information passed to the provider “AfterXXX” event.

 In the provider “AfterXXX” event, this parameter enters as information from the provider (or client dataset) “BeforeXXX” event and returns the information that is passed to the client dataset “AfterXXX” event.

In client dataset “AfterXXX” events, this parameter is for input only, and contains the information returned by the provider.

Note:	OwnerData is an OleVariant. As such, it can contain a single data value, an interface, or a Variant array. See the example link for one way to package multiple values into the OwnerData parameter.


TResolverResponse type
 VCL Reference

TResolverResponse type

See also

Indicates the action a resolver component should take after an OnUpdateError event handler handles an update error.

Unit

Provider

type

  TResolverResponse = (rrSkip, rrAbort, rrMerge, rrApply, rrIgnore);

Description

The following table lists the possible values for TResolverResponse and what they indicate:

Value	Meaning

rrSkip	Skip updating the record that raised the error condition, and leave the unapplied changes in the cache.

rrAbort	Abort the entire update operation without displaying an error message.

rrMerge	Merge the updates in the delta packet with the new underlying value from the database. This will only succeed if none of the updated fields have been changed by another user.

rrApply	Apply the current record value (as it has been fixed in the OnUpdateError handler) instead of the original update.

rrIgnore	Ignore the error condition: Do not apply the record but do not return the record to the client dataset for resolving either.


TNavDataLink
 VCL Reference

TNavDataLink

Hierarchy	Properties	Methods	See also

TNavDataLink helps manage the link to the dataset for a TDBNavigator object.

Unit

DBCtrls

Description

TNavDataLink is tailored to work with a TDBNavigator. It should only be used by the TDBNavigator class.


 VCL Reference

TNavDataLink properties

TNavDataLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TNavDataLink properties

TNavDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TNavDataLink methods

TNavDataLink	Alphabetically	Legend

In TNavDataLink

ActiveChanged

Create

DataSetChanged

Destroy

EditingChanged

Derived from TDataLink

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TNavDataLink methods

TNavDataLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataSetChanged

DefaultHandler

Destroy

Dispatch

Edit

EditingChanged

ExecuteAction

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

UpdateAction

UpdateRecord


TNavDataLink.ActiveChanged
 VCL Reference

TNavDataLink.ActiveChanged

TNavDataLink	See also

Informs TDBNavigator of changes in the Active property.

procedure ActiveChanged; override;

Description

Applications should not call the ActiveChanged procedure directly. Changes in the Active property trigger this procedure, which in turn causes the navigator to enable or disable its buttons, as appropriate.


TNavDataLink.Create
 VCL Reference

TNavDataLink.Create

TNavDataLink	See also

Creates an instance of TNavDataLink.

constructor Create(ANav: TDBNavigator);

Description

Applications should not create instances of TNavDataLink. The TDBNavigator that owns a TNavDataLink calls Create from its own constructor.

Create calls its inherited Create constructor, and then sets VisualControl to True.


TNavDataLink.DataSetChanged
 VCL Reference

TNavDataLink.DataSetChanged

TNavDataLink	See also

Informs the TDBNavigator of changes to the dataset.

procedure DataSetChanged; override;

Description

Applications do not need to call the DataSetChanged procedure. It is called automatically following changes to the contents of the dataset. TNavDataLink informs the TDBNavigator of these changes so that it can enable and disable buttons as appropriate.


TNavDataLink.Create
 VCL Reference

TNavDataLink.Destroy

TNavDataLink	See also

Destroys an instance of TNavDataLink.

destructor Destroy; override;

Description

Applications should not free TNavDataLink objects. The TDBNavigator that owns a TNavDataLink calls Free to destroy the TNavDataLink from its own destructor.


TNavDataLink.EditingChanged
 VCL Reference

TNavDataLink.EditingChanged

TNavDataLink	See also

Informs TDBNavigator of changes to the editing state of the DataSource.

procedure EditingChanged; override;

Description

Applications should not call the EditingChanged procedure directly. Changes to the editing state of the DataSource trigger this procedure, which in turn causes the navigator to enable or disable editing buttons as appropriate.


Hierarchy

TObject

TPersistent

TDataLink

TNavDataLink


TNestedTable
 VCL Reference

 TNestedTable

Hierarchy	Properties	Methods	Events

TNestedTable encapsulates a dataset that is nested as a field within another table.

Unit

DBTables

Description

Use TNestedTable to access data contained in a nested dataset. A nested table inherits BDE functionality from TBDEDataSet and so uses the Borland Database Engine (BDE) to access the nested table data. A nested table provides much of the functionality of a table component, except that the data it accesses is stored in a nested table.

Note:	TNestedTable is used only for dataset fields in tables that have a BDE driver (such as Oracle8 tables). For example, detail sets nested in a client dataset use another client dataset instead.


 VCL Reference

TNestedTable properties

TNestedTable	Alphabetically	Legend

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

Handle

KeySize

Locale

RecNo

RecordCount

RecordSize

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TNestedTable properties

TNestedTable	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Locale

Modified

Name

ObjectView

Owner

RecNo

RecordCount

RecordSize

SparseArrays

State

Tag

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


 VCL Reference

TNestedTable events

TNestedTable	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TNestedTable events

TNestedTable	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TNestedTable methods

TNestedTable	Alphabetically	Legend

In TNestedTable

Create

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

CreateBlobStream

Destroy

DisableConstraints

EnableConstraints

FetchAll

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetFieldData

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNestedTable methods

TNestedTable	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TNestedTable.Create
 VCL Reference

TNestedTable.Create

TNestedTable 	See also

Creates an instance of a TNestedTable component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a nested table declared in an application if it was not placed on a form at design time. Create calls its inherited Create constructor and sets ObjectView to True.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TNestedTable


TNextTab
 VCL Reference

TNextTab

Hierarchy	Properties	Methods	Events	Using TNextTab	See also

TNextTab moves a tabbed control to its next page.

Unit

ExtActns

Description

Add TNextTab to an action list to provide the response to the “Next” and “Finish” buttons or menu items in a tabbed dialog. Controls such as menu items and tool buttons linked to this action cause a different response, depending on the value of the Wrap property and on whether the target control is on the last page:

If the target page control is not on the last page, or if Wrap is True, client controls cause this action to change the current page to the next page. (When Wrap is True, the next page after the last tab is the first tabbed page).

If Wrap is False and the target page control is on the last page, this action changes the caption of client controls (for example, from “Next” to “Finish”) and, when fired, responds by generating an OnFinish event.

Before you can use TNextTab, you must assign a target page control or tab control as the value of the TabControl property. Once the target control is assigned, TNextTab automatically disables itself if the target control is not enabled.


 VCL Reference

TNextTab properties

TNextTab	Alphabetically	Legend

In TNextTab

LastTabCaption

Derived from TTabAction

SkipHiddenTabs

TabControl

Wrap

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TNextTab properties

TNextTab	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

LastTabCaption

Name

Owner

SecondaryShortCuts

ShortCut

SkipHiddenTabs

TabControl

Tag

VCLComObject

Visible

Wrap


TNextTab.LastTabCaption
 VCL Reference

TNextTab.LastTabCaption

TNextTab 	See also

Specifies the caption when the target page control is on its last page and Wrap is False.

property LastTabCaption: string;

Description

Set LastTabCaption to the caption of target controls when the control specified by the TabControl property is on its last page and the action can’t tab beyond the last page. When the target page control is not on the last page, the caption for client controls is given by the Caption property. When the target page control is on the last page (and Wrap is False), TNextTab caches the original value of Caption and changes the Caption property to LastTabCaption. If the target page control returns to a previous page, TNextTab then restores the original value of the Caption property.

LastTabCaption is designed for client controls such as the button in a tabbed dialog that changes from a “Next” button to a “Finish” button when the tabbed dialog reaches the last page.


 VCL Reference

TNextTab events

TNextTab	Alphabetically	Legend

In TNextTab

OnFinish

Derived from TTabAction

AfterTabChange

BeforeTabChange

OnValidateTab

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TNextTab events

TNextTab	By object	Legend

AfterTabChange

BeforeTabChange

OnExecute

OnFinish

OnHint

OnUpdate

OnValidateTab


TNextTab.OnFinish
 VCL Reference

TNextTab.OnFinish

TNextTab 	See also

Occurs when the action fires and the target page control is on its last page.

property OnFinish: TNotifyEvent;

Description

Write an OnFinish event handler to respond when the user indicates that they are finished with the tabbed dialog by clicking a client control when the tabbed dialog is on its last page. OnFinish only occurs when the target control is on its last page and the Wrap property is False. When the target page control is on any other page, or when Wrap is True, TNextTab generates an BeforeTabChange event, changes the current page of the target control, and generates an AfterTabChange event.

Note:	Use the OnFinish event rather than the action’s OnExecute event. If you supply an event handler to the OnExecute event, it blocks the default response by this action, and the action won’t change the current page when the target tabbed dialog is not on its last page.


 VCL Reference

TNextTab methods

TNextTab	Alphabetically	Legend

In TNextTab

ExecuteTarget

UpdateTarget

Derived from TTabAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNextTab methods

TNextTab	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

RegisterChanges

RemoveComponent

RemoveFreeNotification

ReferenceInterface

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TNextTab.ExecuteTarget
 VCL Reference

TNextTab.ExecuteTarget

TNextTab 	See also

Changes the selected tab in the target tab control to the next one, or generates an OnFinish event.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget causes the action to perform its default response based on the state of the target tab control.

Target is the currently active object when the action fires. TNextTab ignores this parameter and uses the TabControl property to identify the target control.

ExecuteTarget performs differently, depending on whether the target control is on the last page and on the value of the Wrap property:

If Wrap is True or the target control is not on the last page, ExecuteTarget generates a BeforeTabChange event, changes the target control to the next page, and generates an AfterTabChange event. If Wrap is True and the target control is on the last page, this causes the target control to move to the first page. Note that the SkipHiddenTabs property determines whether the next page can include a hidden page.

If Wrap is False and the target control is on the last page, ExecuteTarget generates an OnFinish event.


TNextTab.UpdateTarget
 VCL Reference

TNextTab.UpdateTarget

TNextTab 	See also

Updates the action to reflect current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TNextTab, UpdateTarget first checks whether the TabControl property specifies an enabled control that can act as a target. If not, UpdateTarget sets the Enabled property to False.

If the target control is enabled, UpdateTarget sets the Enabled property to True and checks whether the target control is on its last page. If so, (and if Wrap is False) it changes the Caption property to the value of LastTabCaption. If not, it restores the Caption property to its original value.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TTabAction

TNextTab


TNumericField
 VCL Reference

TNumericField

Hierarchy	Properties	Methods	Events 	Using TADTField	See also

TNumericField is the common ancestor of all the numeric fields in a dataset.

Unit

DB

Description

TNumericField encapsulates the fundamental behavior common to all numeric field components. In addition to the properties, events, and methods common to all field components introduced by TField, TNumericField introduces new properties for formatting numeric data for display or editing purposes.

Do not instantiate objects of type TNumericField. Instead, use one of its descendant classes such as TIntegerField and TFloatField.


 VCL Reference

TNumericField properties

TNumericField	Alphabetically	Legend

In TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TNumericField properties

TNumericField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

VCLComObject

Visible


TNumericField.DisplayFormat
 VCL Reference

TNumericField.DisplayFormat

TNumericField	See also

Determines how a numeric field’s value is formatted for display in a data-aware control.

property DisplayFormat: String;

Description

Use the DisplayFormat property to override automatic formatting of a field for display purposes.

Note:	DisplayFormat affects only the display of the field’s data. It does not affect the validity of strings assigned to a numeric field using the AsString property.

The value of DisplayFormat is a string that encodes the formatting of numeric data using the specifiers in the following table:

Specifier	Represents

0	Digit placeholder. If the value being formatted has a digit in the position where the "0" appears in the format string, then that digit is copied to the output string. Otherwise, a "0" is stored in that position in the output string.

#	Digit placeholder. If the value being formatted has a digit in the position where the "#" appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.

.	Decimal point. The first "." character in the format string determines the location of the decimal separator in the formatted value; any additional "." characters are ignored. The actual character used as a the decimal separator in the output string is determined by the DecimalSeparator global variable. The default value of DecimalSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

,	Thousand separator. If the format string contains one or more "," characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of "," characters in the format string does not affect the output, except to indicate that thousand separators are wanted. The actual character used as a the thousand separator in the output is determined by the ThousandSeparator global variable. The default value of ThousandSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

E+	Scientific notation. If any of the strings "E+", "E-", "e+", or "e-" are contained in the format string, the number is formatted using scientific notation. A group of up to four "0" characters can immediately follow the "E+", "E-", "e+", or "e-" to determine the minimum number of digits in the exponent. The "E+" and "e+" formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The "E-" and "e-" formats output a sign character only for negative exponents.

'xx'/"xx"	Characters enclosed in single or double quotes are output as-is, and do not affect formatting.

;	Separates sections for positive, negative, and zero numbers in the format string.

The locations of the leftmost "0" before the decimal point in the format string and the rightmost "0" after the decimal point in the format string determine the range of digits that are always present in the output string.

The number being formatted is always rounded to as many decimal places as there are digit placeholders ("0" or "#") to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number.

If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the "." character in the format string, the extra digits are output before the first digit placeholder.

The following table shows the effect of various format strings:

DisplayFormat	Value	Result	Comment

#.##	12.2	12.2	Note extra digit to left of decimal still appears

#.00	2.5	2.50	Note extra zero: field will always show two decimal places

00.##	.006	00.01	Note extra 0s to right of decimal point and rounding to two decimal places.

To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons.

One section: The format string applies to all values.

Two sections: The first section applies to positive values and zeros, and the second section applies to negative values.

Three sections: The first section applies to positive values, the second applies to negative values, and the third applies to zeros.

If the section for negative values or the section for zero values is empty, that is, if there is nothing between the semicolons that delimit the section, the section for positive values is used instead.

If the section for positive values is empty, or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.


TNumericField.EditFormat
 VCL Reference

TNumericField.EditFormat

TNumericField	See also

Determines how a numeric field’s value is formatted when it is being edited in a data-aware control.

property EditFormat: String;

Description

Use the EditFormat property to override the formatting of a field when the field’s value is being edited in a data-aware control.

When EditFormat is unassigned, but the DisplayFormat property has a value, the DisplayFormat string is used.

The value of EditFormat is a string that encodes the formatting of numeric data using the specifiers in the following table:

Specifier	Represents

0	Digit placeholder. If the value being formatted has a digit in the position where the "0" appears in the format string, then that digit is copied to the output string. Otherwise, a "0" is stored in that position in the output string.

#	Digit placeholder. If the value being formatted has a digit in the position where the "#" appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.

.	Decimal point. The first "." character in the format string determines the location of the decimal separator in the formatted value; any additional "." characters are ignored. The actual character used as a the decimal separator in the output string is determined by the DecimalSeparator global variable. The default value of DecimalSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

,	Thousand separator. If the format string contains one or more "," characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of "," characters in the format string does not affect the output, except to indicate that thousand separators are wanted. The actual character used as a the thousand separator in the output is determined by the ThousandSeparator global variable. The default value of ThousandSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

E+	Scientific notation. If any of the strings "E+", "E-", "e+", or "e-" are contained in the format string, the number is formatted using scientific notation. A group of up to four "0" characters can immediately follow the "E+", "E-", "e+", or "e-" to determine the minimum number of digits in the exponent. The "E+" and "e+" formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The "E-" and "e-" formats output a sign character only for negative exponents.

'xx'/"xx"	Characters enclosed in single or double quotes are output as-is, and do not affect formatting.

;	Separates sections for positive, negative, and zero numbers in the format string.

The locations of the leftmost "0" before the decimal point in the format string and the rightmost "0" after the decimal point in the format string determine the range of digits that are always present in the output string.

The number being formatted is always rounded to as many decimal places as there are digit placeholders ("0" or "#") to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number.

If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the "." character in the format string, the extra digits are output before the first digit placeholder.

To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons.

One section: The format string applies to all values.

Two sections: The first section applies to positive values and zeros, and the second section applies to negative values.

Three sections: The first section applies to positive values, the second applies to negative values, and the third applies to zeros.

If the section for negative values or the section for zero values is empty, that is if there is nothing between the semicolons that delimit the section, the section for positive values is used instead.

If the section for positive values is empty, or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.

Note:	EditFormat affects only the display of the field’s data when it is being edited. It does not affect the validity of strings assigned to a numeric field using the AsString property, nor does it affect the display of the field’s data when it is not being edited.


 VCL Reference

TNumericField events

TNumericField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TNumericField events

TNumericField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TNumericField methods

TNumericField	Alphabetically	Legend

In TNumericField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNumericField methods

TNumericField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TNumericField.Create
 VCL Reference

TNumericField.Create

TNumericField	See also

Creates an instance of a TNumericField object.

constructor Create(AOwner: TComponent); override;

Description

Do not call the create method for TNumericField directly. TNumericField is an abstract class and its constructor should only be called as an inherited method from the constructor of a derived class.

Create changes the Alignment property to taRightJustify.


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField


TObjectField
 VCL Reference

TObjectField

Hierarchy	Properties	Methods	Events 	Using TObjectField 	See also

TObjectField is the common ancestor of TADTField, TArrayField, TDataSetField, and TReferenceField components in a dataset.

Unit

DB

Description

TObjectField encapsulates the fundamental behavior common to fields that are a composite of simpler types. These include ADT fields and array fields, which are built up of subfields, and dataset fields and reference fields, which refer to another dataset. TObjectField introduces the Fields property and the FieldValues property for accessing the subfields that make up the composite (or that reside in the dataset that is the field’s value).

Do not create instances of TObjectField. It is intended only as a base class.


 VCL Reference

TObjectField properties

TObjectField	Alphabetically	Legend

In TObjectField

AsString

AsVariant

DataSet

FieldCount

FieldKind

Fields

FieldValues

HasConstraints

ObjectType

UnNamed

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldName

FieldNo

FullName

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TObjectField properties

TObjectField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMaskPtr

EditMask

FieldCount

FieldKind

FieldName

FieldNo

Fields

FieldValues

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Lookup

Name

NewValue

ObjectType

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

UnNamed

ValidChars

Value

VCLComObject

Visible


TObjectField.AsString
 VCL Reference

TObjectField.AsString

TObjectField	See also

Represents the value of an object field as a string.

property AsString: string;

Description

Use AsString to read the value of the child fields of an object field as a comma delimited string. An exception is raised if an attempt is made to assign the value of an object field as a string.


TObjectField.AsVariant
 VCL Reference

TObjectField.AsVariant

TObjectField	See also

Represents the value of an object field as a variant.

property AsVariant: Variant;

Description

Use AsVariant to read or write the value of the child fields of an object field as a Variant array. Reading AsVariant returns an array containing the child field values.


TObjectField.DataSet
 VCL Reference

TObjectField.DataSet

TObjectField

Identifies the dataset that contains the object field.

property DataSet: TDataSet;

Description

Check the value of the DataSet property to ascertain the dataset that uses the object field component to represent one of its fields.

Applications should not directly assign the DataSet property of a field. It is assigned automatically when the field is created.


TObjectField.FieldCount
 VCL Reference

TObjectField.FieldCount

TObjectField	See also

Indicates the number of child fields that comprise the object field.

property FieldCount: Integer;

Description

Examine FieldCount to determine the number of child fields associated with the object field. This is the number of fields managed by the Fields property.


TObjectField.FieldKind
 VCL Reference

TObjectField.FieldKind

TObjectField	See also

Indicates whether a field represents a column in a dataset, a calculated field, or a lookup field.

property FieldKind: TFieldKind;

Description

Use FieldKind to determine if a field is a data field, a calculated field, or a lookup field. The value of FieldKind can be changed programmatically, but in practice FieldKind for the field and its child fields is automatically set at design time when creating Field components with the Fields editor.

The FieldKind property can take one of the following values:

Value	Description

fkData	Field represents a physical field in a database table

fkCalculated	Field is calculated in an OnCalcFields event handler

fkLookup	Field is a lookup field

fkInternalCalc	Field is calculated but values are stored in the dataset

fkAggregate	Field is an aggregated field

Setting FieldKind on an object field automatically sets the FieldKind of its child fields to the same value.


TObjectField.FieldValues
 VCL Reference

TObjectField.FieldValues

TObjectField	See also

Provides access to the values for all child fields in the object field.

property FieldValues[Index: Integer]: Variant;

Description

Use FieldValues to get or set the values of the object field’s subfields. FieldValues accepts and returns a Variant, so it can handle and convert fields of any type. For example, the following statements are syntactically identical and write the value from an edit box into an ADT field with a child string field called STREET:

DataSet1.FieldByName('ADDRESS.STREET').Value := Edit1.Text;

TADTField(DataSet1.FieldByName('ADDRESS')).FieldValues[0] := Edit1.Text;

The next statements reads a string value from the first child field of the object field ADDRESS into an edit box:

Edit1.Text := DataSet1.FieldByName('ADDRESS').FieldValues[0];

Note:	Because FieldValues always uses Variants, it may be a somewhat slower than directly accessing a subfield and using its native format (i.e., using its AsXXX property), especially in applications that process large amounts of data.


TObjectField.Fields
 VCL Reference

TObjectField.Fields

TObjectField

Specifies the TFields object that contains an array of child fields.

property Fields: TFields;

Description

Child fields of the object field are maintained in a TFields object specified by the Fields property. Use this property to access individual subfield components.


TObjectField.HasConstraints
 VCL Reference

TObjectField.HasConstraints

TObjectField	See also

Indicates whether the object field or any of its child field values are constrained.

property HasConstraints: Boolean;

Description

Read HasConstraints to determine whether the field component imposes custom constraints, imported constraints, or a default expression. HasConstraints is True if the CustomConstraint, DefaultExpression, or ImportedConstraint property of the object field or any of its subfields is set. Otherwise, HasConstraints is False.

Field values can still be limited when HasConstraints is False. For example, an OnValidate event handler can constrain field values.


TObjectField.ObjectType
 VCL Reference

TObjectField.ObjectType

TObjectField

Specifies the classification of the field object in Oracle.

property ObjectType: string;

Description

In Oracle, objects are classified into object types.


TObjectField.UnNamed
 VCL Reference

TObjectField.UnNamed

TObjectField

Indicates whether an object field in a nested table has a name associated with it.

property UnNamed: Boolean;

Description

UnNamed is set to True when the object field in a nested table has no name associated with it.


TObjectField.Value
 VCL Reference

TObjectField.Value

TObjectField	See also

Contains the data in an object field component.

property Value: Variant;

Description

Use Value to read data directly from and write data directly to an object field component at runtime. Value is a Variant array whose elements are the values of the object field’s child fields.

The following example creates a variant array from the contents of edit boxes on a form, and assigns the values to an ADT field called ADDRESS. Each child field of the ADT field is filled according to the order of the contents of the variant array.

Table1.FieldByName('ADDRESS').Value := VarArrayOf([Edit1.Text, Edit2.Text, Edit3.Text, Edit4.Text]);

Note:	TDataSet.ObjectView must be True for this example to work.


 VCL Reference

TObjectField events

TObjectField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TObjectField events

TObjectField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TObjectField methods

TObjectField	Alphabetically	Legend

In TObjectField

Create

Destroy

Derived from TField

Assign

AssignValue

Clear

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TObjectField methods

TObjectField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

DestroyComponents

Destroying

Destroy

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

FreeInstance

FreeNotification

FreeOnRelease

Free

GetData

GetInterfaceEntry

GetInterfaceTable

GetInterface

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TObjectField.Create
 VCL Reference

TObjectField.Create

TObjectField	See also

Creates and initializes a TObjectField object.

constructor Create(AOwner: TComponent); override;

Description

Do not create TObjectField instances. TObjectField is an abstract base class that should not be directly instantiated. The constructor for descendant classes is usually called indirectly by using the Fields editor at design time to create a persistent field component. Dataset objects also call field constructors automatically to create dynamic field components.

Create creates a TFields object to manage the child fields of the object field.


TObjectField.Destroy
 VCL Reference

TObjectField.Destroy

TObjectField	See also

Destroys an instance of TObjectField.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The destructor is called automatically by the dataset that owns the object field component, and applications never need to call it explicitly.

If an application creates a descendant of TObjectField without an owner, it should call Free instead of Destroy. Free checks that the field reference is not nil, and only then calls Destroy.

Destroy closes the dataset, deletes the instance of TObjectField from the dataset, and calls the inherited destructor.


Hierarchy

TObject

TPersistent

TComponent

TField

TObjectField


TOleGraphic
 VCL Reference

TOleGraphic

Hierarchy	Properties	Methods	Events	See also

TOleGraphic is a wrapper for an OLE graphical interface.

Unit

AxCtrls

Description

TOleGraphic is a graphical container for icons, metafiles and bitmaps used in ActiveX controls. TOleGraphic is used internally to expose an IPicture interface as the image of the TPicture property of an ActiveX control. Because TOleGraphic is a wrapper for OLE interfaces, it cannot be used to load or save information to a file.


 VCL Reference

TOleGraphic properties

TOleGraphic	Alphabetically	Legend

In TOleGraphic

Empty

Height

MMHeight

MMWidth

Palette

Picture

Transparent

Width

Derived from TGraphic

Modified

PaletteModified


 VCL Reference

TOleGraphic properties

TOleGraphic	By object	Legend

Empty

Height

MMHeight

MMWidth

Modified

Palette

PaletteModified

Picture

Transparent

Width


TOleGraphic.Empty
 VCL Reference

TOleGraphic.Empty

TOleGraphic

Specifies whether the OLE graphics object contains a graphic.

property Empty: Boolean;

Description

Empty determines if a graphic has been loaded into the OLE graphic object. Empty is True if the OLE graphic contains a graphic, and False if it does not.


TOleGraphic.Height
 VCL Reference

TOleGraphic.Height

TOleGraphic	See also

Specifies the vertical size (in pixels) of the OLE graphic.

property Height: Integer;

Description

Height indicates the height of the OLE graphic in pixels.


TOleGraphic.MMHeight
 VCL Reference

TOleGraphic.MMHeight

TOleGraphic	See also

Indicates the height of the OLE graphic in 0.01 millimeter units.

property MMHeight: Integer;

Description

MMHeight is used for a more accurate reading of the vertical size of the graphic. The Height property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with MMHeight.


TOleGraphic.MMWidth
 VCL Reference

TOleGraphic.MMWidth

TOleGraphic	See also

Indicates the width of the OLE graphic in 0.01 millimeter units.

property MMWidth: Integer;

Description

MMWidth is used for a more accurate reading of the horizontal size of the graphic. The Width property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with MMWidth.


TOleGraphic.Palette
 VCL Reference

TOleGraphic.Palette

TOleGraphic

Controls the OLE graphic’s color mapping.

property Palette: HPALETTE;

Description

The Palette of an OLE graphic contains up to 256 colors that can be used to display the graphic on screen.


TOleGraphic.Picture
 VCL Reference

TOleGraphic.Picture

TOleGraphic

Specifies the interface reference for which the OLE graphic is a container.

property Picture: IPicture;

Description

Picture is for internal use only.


TOleGraphic.Transparent
 VCL Reference

TOleGraphic.Transparent

TOleGraphic

Indicates whether the OLE graphic image completely fills its entire rectangular area.

property Transparent: Boolean;

Description

Use Transparent to determine whether the OLE graphic image covers its entire rectangular area. If Transparent is True the image does not completely cover the entire area. If Transparent is False, the image does cover its entire rectangular area.


TOleGraphic.Width
 VCL Reference

TOleGraphic.Width

TOleGraphic	See also

Specifies the vertical size (in pixels) of the graphic.

property Width: Integer;

Description

Use Width to find the width of the OLE graphic.

Note:	Width assumes the screen resolution, so arithmetic conversions may not be as accurate.


 VCL Reference

TOleGraphic events

TOleGraphic	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 VCL Reference

TOleGraphic events

TOleGraphic	By object	Legend

OnChange

OnProgress


 VCL Reference

TOleGraphic methods

TOleGraphic	Alphabetically	Legend

In TOleGraphic

Assign

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

SaveToClipboardFormat

SaveToStream

Derived from TGraphic

SaveToFile

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TOleGraphic methods

TOleGraphic	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

QueryInterface

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TOleGraphic.Assign
 VCL Reference

TOleGraphic.Assign

TOleGraphic	See also

Copies an IPicture to the OLE graphic object.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the IPicture contained in Source to the OLE graphic object. Assign then calls the inherited Assign. The IPicture can be a bitmap, metafile or icon image.


TOleGraphic.LoadFromClipboardFormat
 VCL Reference

TOleGraphic.LoadFromClipboardFormat

TOleGraphic	See also

Loads an OLE graphic from the Clipboard into the OLE graphic object.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;

Description

LoadFromClipboardFormat is called if the OLE graphic is registered with the TPicture object using the RegisterClipboardFormat method.

LoadFromClipboardFormat replaces the current image with the data pointed to by the AData parameter. The palette for the OLE graphic is specified by the APalette parameter.


TOleGraphic.LoadFromFile
 VCL Reference

TOleGraphic.LoadFromFile

TOleGraphic	See also

Prevents OleGraphics from trying to load from a file.

Procedure LoadFromFile(const Filename: string); override;

Description

LoadFromFile is overridden in TOleGraphic so that it will not load a graphic from a file. Attempting to do so is not appropriate for an IPicture.


TOleGraphic.LoadFromStream
 VCL Reference

TOleGraphic.LoadFromStream

TOleGraphic	See also

Loads an IPicture interface from a stream into the OLE graphic object.

procedure LoadFromStream(Stream: TStream); override;

Description

To use LoadFromStream specify the stream from which the OLE graphic is to be loaded as the value of Stream.


TOleGraphic.SaveToClipboardFormat
 VCL Reference

TOleGraphic.SaveToClipboardFormat

TOleGraphic	See also

Saves the OLE graphic to a Clipboard format.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); override;

Description

Use SaveToClipboardFormat to copy the OLE graphic to a Clipboard format. The resulting values can then be copied to the Windows clipboard using the clipboard’s SetAsHandle method.

The graphic’s palette is returned in the APalette parameter, the format in the AFormat parameter, and a handle to the data in the AData parameter. Before the OLE graphic can be saved, an application must have registered the format using the RegisterClipboardFormat method.


TOleGraphic.SaveToStream
 VCL Reference

TOleGraphic.SaveToStream

TOleGraphic	See also

Saves the OLE graphic to a stream.

procedure SaveToStream(Stream: TStream); override;

Description

Use SaveToStream to save the OLE graphic to the stream specified by the Stream parameter. SaveToStream uses the IPersistStream interface of the graphic write it to the stream.


Hierarchy

TObject

TPersistent

TGraphic

TOleGraphic


TOLEStream
 VCL Reference

TOleStream

Hierarchy	Properties	Methods	See also

TOleStream reads and writes information over a streaming interface that is provided by an OLE object.

Unit

AxCtrls

Description

Use TOleStream to create a TStream wrapper for an OLE stream interface. TOleStream uses the streaming interface of the OLE stream to read and write information. TActiveXControl objects use TOleStream to load themselves from a stream or save themselves to a stream.


 VCL Reference

TOleStream properties

TOLEStream	Alphabetically	Legend

Derived from TStream

Position

Size


 VCL Reference

TOleStream properties

TOLEStream	By object	Legend

Position

Size


 VCL Reference

TOleStream methods

TOLEStream	Alphabetically	Legend

Derived from TOleStream

Create

Read

Seek

Write

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TOleStream methods

TOLEStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TOleStream.Create
 VCL Reference

TOleStream.Create

TOleStream

Creates a TOleStream object to represent a stream interface.

constructor Create(const Stream: IStream);

Description

Call Create to convert a stream interface into a TOleStream object. The Stream parameter is the stream interface that the TOleStream object uses for reading and writing.


TOleStream.Read
 VCL Reference

TOleStream.Read

TOleStream	See also

Reads up to Count bytes from the current position into Buffer.

function Read(var Buffer; Count: Longint): Longint; override;

Description

Call Read to read data from the OLE stream when it is not known how many bytes are available. Buffer must have at least Count bytes allocated to hold the data that was read from the stream.

Read uses the stream interface to transfer up to Count bytes into Buffer, starting at the current position, and then advances the current position by the number of bytes actually transferred. Read returns the number of bytes actually transferred (which may be less than the number requested in Count.)

All the other data-reading methods of an OLE stream (ReadBuffer, ReadComponent) call Read to do their actual reading.


TOLEStream.Seek
 VCL Reference

TOleStream.Seek

TOleStream	See also

Resets the current position of the stream.

function Seek(Offset: Longint; Origin: Word): Longint; override;

);Description

Use Seek to move the current position by the indicated offset. Seek uses the stream interface to change the current position to the value indicated by the Offset and Origin parameters.

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:

Value	Meaning

soFromBeginning	Offset is from the beginning of the OLE stream. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position in the OLE stream. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of the OLE stream. Offset must be <= 0 to indicate a number of bytes before the end of the stream.

Seek returns the new value of the Position property.


TOLEStream.Write
 VCL Reference

TOleStream.Write

TOleStream	See also

Writes Count bytes from Buffer to the current position in the OLE stream and updates the current position by Count bytes.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to write Count bytes to the OLE stream, starting at the current position. Write uses the stream interface to transfer the information from Buffer.

All the other data-writing methods of an OLE stream (WriteBuffer, WriteComponent) call Write to do their actual writing.


Hierarchy

TObject

TStream

TOLEStream


TOpenPicture
 VCL Reference

TOpenPicture

Hierarchy	Properties	Methods	Events	Using TOpenPicture	See also

TOpenPicture is the standard action for displaying the open picture dialog.

Unit

ExtActns

Description

Add TOpenPicture to an action list to add a graphics file selection dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the open picture dialog when invoked. Use the OnAccept event to respond after the user selects a file name in the dialog or the OnCancel event to respond when the user cancels from the dialog. In the event handler, you can read the file name from the dialog specified by the Dialog property.


 VCL Reference

TOpenPicture properties

TOpenPicture	Alphabetically	Legend

In TOpenPicture

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TOpenPicture properties

TOpenPicture	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TOpenPicture.Dialog
 VCL Reference

TOpenPicture.Dialog

TOpenPicture 	See also

Provides access the open picture dialog that the action executes.

property Dialog: TOpenPictureDialog;

Description

Use Dialog to configure the graphics file selection dialog before the action fires or to read the selected file name after the action executes the dialog. For example, you can set the dialog’s default extension or initially selected file at design time using the Object Inspector or read the dialog’s FileName property from an OnAccept event handler to use the file that the user selected.

When using an open picture action, you do not place a TOpenPictureDialog component on the form or data module at design time. Instead, you add the TOpenPicture object to your action list and then use the Dialog property. The dialog component is created by the TOpenPicture constructor.


 VCL Reference

TOpenPicture events

TOpenPicture	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TOpenPicture events

TOpenPicture	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TOpenPicture methods

TOpenPicture	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOpenPicture methods

TOpenPicture	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TOpenPicture


TPacketDataSet
 VCL Reference

TPacketDataSet

Hierarchy	Properties	Methods	Events	See also

TPacketDataSet represents a data packet or delta packet that is used by a provider.

Unit

Provider

Description

TPacketDataSet represents a data packet that a provider creates to represent its dataset’s records and metadata or a delta data packet that a provider receives when it should apply updates. Provider components create instances of TPacketDataSet to represent data packets before they are sent to clients and to represent delta packets after they are received from clients.

TPacketDataSet provides a convenient way for providers and resolvers to work with data packets. As a descendant of TCustomClientDataSet, TPacketDataSet allows providers and resolvers to use any of the standard dataset properties and methods to manipulate the data packet’s records. In addition, TPacketDataSet introduces new properties and methods that describe what information goes into the data packet or how updates should be applied.

Applications do not need to work directly with packet datasets. They are mainly of use to component writers who want to create custom provider components.


 VCL Reference

TPacketDataSet properties

TPacketDataSet	Alphabetically	Legend

In TPacketDataSet

NewValuesModified

StreamMetaData

UseCurValues

Derived from TCustomClientDataSet

ActiveAggs

AppServer

CanModify

ChangeCount

CloneSource

Data

DataSetField

DataSize

DataSource

Delta

Filter

GroupingLevel

HasAppServer

IndexFieldCount

IndexFields

KeyExclusive

KeyFieldCount

KeySize

LogChanges

RecNo

RecordCount

RecordSize

SavePoint

StatusFilter

XMLData

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPacketDataSet properties

TPacketDataSet	By object	Legend

Active

ActiveAggs

AggFields

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DataSetField

DataSize

DataSource

DefaultFields

Delta

Designer

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexFieldCount

IndexFields

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

Modified

Name

NewValuesModified

ObjectView

Owner

RecNo

RecordCount

RecordSize

SavePoint

SparseArrays

State

StatusFilter

StreamMetaData

Tag

UseCurValues

VCLComObject

XMLData


TPacketDataSet.NewValuesModified
 VCL Reference

TPacketDataSet.NewValuesModified

TPacketDataSet 	See also

Indicates whether the NewValue property of any field in the current record has changed.

property NewValuesModified: Boolean;

Description

Read NewValuesModified to determine whether any fields in the current record were edited during the resolving process.


TPacketDataSet.StreamMetaData
 VCL Reference

TPacketDataSet.StreamMetaData

TPacketDataSet	See also

Indicates whether metadata should be included in the data packet.

property StreamMetaData: Boolean;

Description

StreamMetaData reflects the MetaData parameter of the provider’s CreateDataPacket method. When StreamMetaData is True, metadata is included in the data packet. When StreamMetaData is False, the data packet contains records but no metadata.


TPacketDataSet.UseCurValues
 VCL Reference

TPacketDataSet.UseCurValues

TPacketDataSet	See also

Indicates that the CurValue property of fields in the dataset should be used instead of the OldValue property.

property UseCurValues: Boolean;

Description

UseCurValues is set during the resolving process when a record is corrected in an OnUpdateError event handler. This allows the resolver to reapply a corrected record rather than using the originally provided values as the basis of an update.


 VCL Reference

TPacketDataSet events

TPacketDataSet	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TPacketDataSet events

TPacketDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TPacketDataSet methods

TPacketDataSet	Alphabetically	Legend

In TPacketDataSet

AssignCurValues

Create

CreateFromDelta

HasCurValues

HasMergeConflicts

InitAltRecBuffers

UpdateKind

Derived from TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CloneCursor

CompareBookmarks

ConstraintsDisabled

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

Destroy

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPacketDataSet methods

TPacketDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

AssignCurValues

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CreateFromDelta

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasCurValues

HasMergeConflicts

HasParent

InheritsFrom

InitAltRecBuffers

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateKind

UpdateRecord

UpdateStatus


TPacketDataSet.AssignCurValues
 VCL Reference

TPacketDataSet.AssignCurValues

TPacketDataSet 	See also

Updates the current field value for each field in the packet dataset.

procedure AssignCurValues(Source: TDataSet); overload;

procedure AssignCurValues(const CurValues: Variant); overload;

Description

When a resolver component encounters an update error, it calls AssignCurValues to set the CurValue property of fields before triggering the OnUpdateError event handler.

If AssignCurValues is passed a dataset as the Source parameter, then for each field in the packet dataset, the CurValue property is set to the value of the field with the same name in the source dataset.

If AssignCurValues is passed a Variant array as the CurValues parameter, then each entry in the array is used to assign the CurValue property of a field in the packet dataset. CurValues can have one of two forms: an array of field values, or an array of Variant arrays, where each of those arrays has two elements: a field name and a value. In the first form, field values are assigned by position. In the second form, fields are located based on name and the CurValue property assigned accordingly.


TPacketDataSet.Create
 VCL Reference

TPacketDataSet.Create

TPacketDataSet	See also

Creates and initializes instance of TPacketDataSet.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to create packet datasets because they are created by the provider components that use them.Create initializes the properties of the packet dataset.

AOwner is the component that is responsible for freeing the TPacketDataSet instance. If AOwner is nil, the application must explicitly free the packet data set object.


TPacketDataSet.CreateFromDelta
 VCL Reference

TPacketDataSet.CreateFromDelta

TPacketDataSet 	See also

Copies the data from another packet data set.

procedure CreateFromDelta(Source: TPacketDataSet);

Description

Applications should not need to call CreateFromDelta. This method is used internally when applying updates to create the error log of updates that could not be resolved. This log of update errors is eventually returned by the provider’s ApplyUpdates method.


TPacketDataSet.HasCurValues
 VCL Reference

TPacketDataSet.HasCurValues

TPacketDataSet	See also

Indicates whether the CurValue property is available for fields in the packet dataset.

function HasCurValues: Boolean);

Description

When an error occurs while applying an updated record, resolver components attempt to locate the current record in the underlying database (or the dataset to which updates are applied.) This current record can then be used when trying to determine the cause of the update error. If the current record can be located, HasCurValues returns True and the fields in the packet dataset have their CurValue properties set from this record. If the record can’t be located (for example, if another user changed a key field value or deleted the record), then HasCurValues returns False and the CurValue property of packet dataset fields can’t be used.


TPacketDataSet.HasMergeConflicts
 VCL Reference

TPacketDataSet.HasMergeConflicts

TPacketDataSet 	See also

Indicates whether a current record can be merged with updates in a delta packet.

function HasMergeConflicts: Boolean);

Description

When resolving update errors in an OnUpdateError event handler, applications can specify that the updated record should be merged automatically with the current field values of the record. (To do this, set the Response parameter to rrMerge.) However, it is not always possible to merge client edits with the current record. If the updated record includes changes to field values that were also changed by other users, the merge will fail and HasMergeConflicts returns True.


TPacketDataSet.InitAltRecBuffers
 VCL Reference

TPacketDataSet.InitAltRecBuffers

TPacketDataSet 	See also

Fetches values for the CurValue, OldValue, and NewValue properties of fields.

procedure InitAltRecBuffers(CheckModified: Boolean = True);

Description

While applying updates, InitAltRecBuffers is called automatically to ensure that fields in the packet dataset have values for the CurValue, OldValue, and NewValue properties. The CheckModified parameter specifies whether InitAltRecBuffers should check if the current record has been modified when it sets values. This check allows the packet dataset to reflect appropriate values when applying updates that are changed by an OnUpdateError event handler.


TPacketDataSet.UpdateKind
 VCL Reference

TPacketDataSet.UpdateKind

TPacketDataSet

Indicates the type of update the current record represents.

function UpdateKind: TUpdateKind;

Description

Call UpdateKind while applying updates to determine the type of update the current record represents. UpdateKind returns

ukInsert if the current record is a newly inserted record.

ukDelete if the current record represents a record that should be deleted.

ukModify if the current record represents updates to an existing record.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet

TPacketDataSet


TPageProducer
 VCL Reference

 TPageProducer

Hierarchy	Properties	Methods	Events	Using TPageProducer	See also

TPageProducer produces a string of HTML commands based on an input template.

Unit

HTTPProd

Description

Use TPageProducer to convert an HTML template into a string of HTML commands that can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the OnHTMLTag event.

Note:	See the WebServ demo for an example of how to use TPageProducer.


 VCL Reference

TPageProducer properties

TPageProducer	Alphabetically	Legend

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPageProducer properties

TPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

VCLComObject

WebModuleContext


 VCL Reference

TPageProducer events

TPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TPageProducer events

TPageProducer	By object	Legend

OnHTMLTag


 VCL Reference

TPageProducer methods

TPageProducer	Alphabetically	Legend

Derived from TCustomPageProducer

Create

Destroy

Derived from TBasePageProducer

Content

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPageProducer methods

TPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TCustomPageProducer

TPageProducer


TParam
 VCL Reference

TParam

Hierarchy	Properties	Methods	See also

TParam represents a field parameter for a query or stored procedure.

Unit

DB

Description

Use the properties of a TParam to set the value of a parameter that represents the value of a field. Datasets that represent queries and stored procedures create TParam objects to represent the parameters of their query or stored procedures. Client datasets use TParam objects to pass parameter values to a source dataset.

Note:	ADO-based datasets do not use TParam objects to represent parameter values. They use the TParameter class instead.

TParam shares many properties with TField, as both describe the value of a field in a dataset. However, a TField object has several properties to describe the field binding, and how the field is displayed, edited, or calculated that are not needed in a TParam object. Conversely, TParam includes properties that indicate how the field value is passed as a parameter.


 VCL Reference

TParam properties

TParam	Alphabetically	Legend

In TParam

AsBCD

AsBlob

AsBoolean

AsCurrency

AsDate

AsDateTime

AsFloat

AsFMTBCD

AsInteger

AsMemo

AsSmallInt

AsSQLTimeStamp

AsString

AsTime

AsWord

Bound

DataType

IsNull

Name

NativeStr

NumericScale

ParamType

Precision

Size

Text

Value

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TParam properties

TParam	By object	Legend

AsBCD

AsBlob

AsBoolean

AsCurrency

AsDate

AsDateTime

AsFloat

AsFMTBCD

AsInteger

AsMemo

AsSmallInt

AsSQLTimeStamp

AsString

AsTime

AsWord

Bound

Collection

DataType

DisplayName

ID

Index

IsNull

Name

NativeStr

NumericScale

ParamType

Precision

Size

Text

Value


TParam.AsBCD
 VCL Reference

TParam.AsBCD

TParam	See also 	Example

Specifies the value of the parameter when it represents a binary-coded decimal (BCD) field with less than 4 decimal places or 20 significant digits

property AsBCD: Currency;

Description

Set AsBCD to assign the value for a BCD field to the parameter when the BCD field can be converted to the Currency type without a loss of precision.  TBCDField objects use the Currency type to represent the value of BCD fields, so AsBCD takes a Currency value as well. Setting AsBCD sets the DataType property to ftBCD.

Read the AsBCD property to determine the value that was assigned to an output parameter, represented as a Currency type. The value of the parameter is converted to a Currency value if possible.

Tip:	If the BCD field requires greater precision than allowed by the Currency type, use a TFMTBCDField object and the AsFMTBCD property instead.


TParam.AsBlob
 VCL Reference

TParam.AsBlob

TParam	See also

Specifies the value of the parameter when it represents a binary large object (BLOB) field.

type TBlobData = String;

property AsBlob: TBlobData;

Description

Set AsBlob to assign the value for a Blob field to the parameter. AsBlob takes a TBlobData value, which is an untyped string of bytes. Setting AsBlob sets the DataType property to ftBlob.

For example, if the variable Buffer is of type PChar and contains binary data read from a file, the contents of Buffer are directly assigned to the BLOB parameter using the AsBlob property:

Query1.Params[0].AsBlob := Buffer;

Note:	Applications seldom need to read AsBlob because Blob fields can’t be used as output parameters.


TParam.AsBoolean
 VCL Reference

TParam.AsBoolean

TParam	See also 	Example

Specifies the value of the parameter when it represents a boolean field.

property AsBoolean: Boolean;

Description

Set AsBoolean to assign the value for a boolean field to the parameter. Setting AsBoolean sets the DataType property to ftBoolean.

Read the AsBoolean property to determine the value that was assigned to an output parameter, represented as a Boolean. The value of the parameter is converted to a Boolean value if possible.


TParam.AsCurrency
 VCL Reference

TParam.AsCurrency

TParam	See also 	Example

Specifies the value of the parameter when it represents a field of type Currency.

property AsCurrency: Currency;

Description

Set AsCurrency to assign the value for a parameter of type Currency. Setting AsCurrency sets the DataType property to ftCurrency.

Read the AsCurrency property to determine the value that was assigned to an output parameter, represented as a Currency type. The value of the parameter is converted if possible.


TParam.AsDate
 VCL Reference

TParam.AsDate

TParam	See also	Example

Specifies the value of the parameter when it represents a date field.

property AsDate: TDateTime;

Description

Set AsDate to assign the value for a date field to the parameter. Setting AsDate sets the DataType property to ftDate.

Read the AsDate property to determine the value that was assigned to an output parameter, represented as a TDateTime. The value of the parameter is converted to a DateTime value if possible. If the DataType for the parameter is ftDate, only the date portion of the TDateTime value is valid. If a TDateTime value is assigned to a parameter via the AsDate property and the TDateTime value has a nonzero time, the time is ignored and only the date is assigned. If AsDate is used to get the value for a TDateTime container, the date from the parameter is stored but the TDateTime gets a zero time value.

Note:	It is not possible to store a NULL value directly to a parameter using AsDate. Use the TParam.Clear method instead.


TParam.AsDateTime
 VCL Reference

TParam.AsDateTime

TParam	See also	Example

Specifies the value of the parameter when it represents a date-time field.

property AsDateTime: TDateTime;

Description

Set AsDateTime to assign the value for a date-time field to the parameter. Setting AsDateTime sets the DataType property to ftDateTime.

Read the AsDateTime property to determine the value that was assigned to an output parameter, represented as a DateTime. The value of the parameter is converted to a DateTime value if possible. If a TDate value is assigned to a parameter via the AsDateTime property, the date portion of the TDate value is assigned to the parameter and the time portion is assigned a zero value. If AsDateTime is used to get the value for a TDate container, the date from the parameter is stored but the time value returned by AsDateTime is ignored.

Note:	It is not possible to store a NULL value directly to a parameter using AsDateTime. Use the TParam.Clear method instead.


TParam.AsFloat
 VCL Reference

TParam.AsFloat

TParam	See also 	Example

Specifies the value of the parameter when it represents a float field.

property AsFloat: Double;

Description

Set AsFloat to assign the value for a float field to the parameter. Setting AsFloat sets the DataType property to ftFloat.

Read the AsFloat property to determine the value that was assigned to an output parameter, represented as a Double. The value of the parameter is converted to a Double value if possible.


TParam.AsFMTBCD
 VCL Reference

TParam.AsFMTBCD

TParam	See also

Specifies the value of the parameter when it represents a binary-coded decimal (BCD) field with more than 4 decimal places or 20 significant digits

property AsFMTBCD: TBcd;

Description

Set AsFMTBCD to assign the value for a BCD field to the parameter when the BCD field is represented by a TFMTBCDField object.  TFMTBCDField objects and the AsFMTBCD property use a true BCD type to represent the value of BCD fields. This is more accurate but slower than the Currency type used by TBCDField and the AsBCD property. Setting AsFMTBCD sets the DataType property to ftFMTBCD.

Read the AsFMTBCD property to determine the value that was assigned to an output parameter, represented as a TBcd type. The value of the parameter is converted to a TBcd value if possible.

Tip:	If the BCD field uses less than 4 decimal places or 20 significant digits, you can achieve better performance by using a TBCDField object and the AsBCD property instead.


TParam.AsInteger
 VCL Reference

TParam.AsInteger

TParam	See also 	Example

Specifies the value of the parameter when it represents an integer field.

property AsInteger: LongInt;

Description

Set AsInteger to assign the value for an integer field to the parameter. Setting AsInteger sets the DataType property to ftInteger.

Read the AsInteger property to determine the value that was assigned to an output parameter, represented as a 32-bit integer. The value of the parameter is converted to a 32-bit integer if possible.


TParam.:AsMemo
 VCL Reference

TParam.AsMemo

TParam	See also

Specifies the value of the parameter when it represents a memo field.

property AsMemo: String;

Description

Set AsMemo to assign the value for a memo field to the parameter. Setting AsMemo sets the DataType property to ftMemo.

A literal string or a null-terminated string may be directly assigned to the parameter for a memo column using the AsMemo property. For example:

SQLQuery1.Params[0].AsMemo := 'Some text in a long Pascal String';

It is seldom necessary to read AsMemo, because memo fields can not be used as output parameters.

Note:	Some servers support string field types that are too long to fit in the record buffer. These fields are represented as memo fields, although they are not actually Blob fields. When working with such “pseudo-Blob” fields, use the AsString property instead.


TParam.AsSmallInt
 VCL Reference

TParam.AsSmallInt

TParam	See also 	Example

Specifies the value of the parameter when it represents a small integer field.

property AsSmallInt: LongInt;

Description

Set AsSmallInt to assign the value for a small integer field to the parameter. Setting AsSmallInt sets the DataType property to ftSmallint.

Read the AsSmallInt property to determine the value that was assigned to an output parameter, represented as a 32-bit integer. The value of the parameter is converted to a LongInt value if possible.

Note:	AsSmallInt works with a 32-bit integer. Small integer field objects store and manipulate their data as 32-bit integers even though the values in the underlying database are 16-bit integers.


TParam.AsSQLTimeStamp
 VCL Reference

TParam.AsSQLTimeStamp

TParam	See also

Specifies the value of the parameter when it represents an SQL timestamp field.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Set AsSQLTimeStamp to assign the value for an SQL timestamp field to the parameter. Setting AsSQLTimeStamp sets the DataType property to ftTimeStamp.

Read the AsSQLTimeStamp property to determine the value that was assigned to an output parameter, represented as an SQLTimeStamp record. The value of the parameter is converted to an SQLTimeStamp record if possible.


TParam.AsString
 VCL Reference

TParam.AsString

TParam	See also 	Example

Specifies the value of the parameter when it represents a string field.

property AsString: String;

Description

Set AsString to assign the value for a string field to the parameter. Setting AsString sets the DataType property to ftString.

Read the AsString property to determine the value that was assigned to an output parameter, represented as a string. The value of the parameter is converted to a string.

Note:	Some servers support string field types that are too long to fit in the record buffer. These fields are represented as memo fields, although they are not actually Blob fields. When working with such “pseudo-Blob” fields, use the AsString property rather than the AsMemo property.


TParam.AsTime
 VCL Reference

TParam.AsTime

TParam	See also	Example

Specifies the value of the parameter when it represents a time field.

property AsTime: TDateTime;

Description

Set AsTime to assign the value for a time field to the parameter. Setting AsTime sets the DataType property to ftTime.

Read the AsTime property to determine the value that was assigned to the parameter, represented as a DateTime. The value of the parameter is converted to a DateTime value if possible. If the DataType for the parameter is ftTime, only the time portion of the TDateTime value is valid.

Note:	It is not possible to store a NULL value directly to a parameter using AsTime. Use the TParam.Clear method instead.


TParam.AsWord
 VCL Reference

TParam.AsWord

TParam	See also 	Example

Specifies the value of the parameter when it represents a word field.

property AsWord: LongInt;

Description

Set AsWord to assign the value for a word field to the parameter. Setting AsWord sets the DataType property to ftWord.

Read the AsWord property to determine the value that was assigned to the parameter, represented as a 32-bit integer. The value of the parameter is converted to a LongInt value if possible.

Note:	AsWord works with a 32-bit integer. Word field objects store and manipulate their data as 32-bit integers even though the values in the underlying database are unsigned 16-bit values.


TParam.Bound
 VCL Reference

TParam.Bound

TParam	See also

Indicates whether a value (NULL or otherwise) has been assigned to the parameter.

property Bound: Boolean;

Description

Read Bound to determine whether a value has been assigned to the parameter. Whenever a value is assigned to the TParam object, Bound is automatically set to True. Set Bound to False to undo the setting of a value. The Clear method replaces the value of the parameter with NULL, but does not set Bound to False. However, if the Clear method is used to bind the parameter to a NULL value, Bound must be separately set to True.

Datasets that represent queries and stored procedures use the value of Bound to determine whether to assign a default value for the parameter. If Bound is False, datasets that represent queries attempt to assign a value from the dataset indicated by their DataSource property. Similarly, when Bound is False, datasets that represent stored procedures attempt to supply a value directly from the server.


TParam.DataType
 VCL Reference

TParam.DataType

TParam 	Example

Indicates the type of field whose value the parameter represents.

property DataType: TFieldType;

Description

DataType is set automatically when a value is assigned to the parameter. Do not set DataType for bound fields, as that may cause the assigned value to be misinterpreted.

Read DataType to discover the type of data that was assigned to the parameter. Each possible value of DataType corresponds to a type of database field.


TParam.IsNull
 VCL Reference

TParam.IsNull

TParam	See also 	Example

Indicates whether the value assigned to the parameter is NULL (blank).

property IsNull: Boolean;

Description

Inspect IsNull to discover if the value of the parameter is NULL, indicating the value of a blank field. NULL values can arise in the following ways:

Assigning the value of another, NULL, parameter.

Assigning the value of a blank field.

Calling the Clear method.

Note:	NULL parameters are not the same as unbound parameters. Unbound parameters have not had a value assigned. NULL parameters have a NULL value. NULL parameters may be bound or unbound.


TParam.Name
 VCL Reference

TParam.Name

TParam	See also

Specifies the name of the parameter.

property Name: String;

Description

Use Name to identify a particular parameter within a TParams object. Name is the name of the parameter, not the name of the field whose value the parameter represents.


TParam.NativeStr
 VCL Reference

TParam.NativeStr

TParam	See also

Indicates the value of the parameter as a string, using the character set of the database table.

property NativeStr: String;

Description

Use NativeStr to obtain a string version of the parameter value that uses the character set (code page) associated with the underlying database table.


TParam.NumericScale
 VCL Reference

TParam.NumericScale

TParam	See also

Specifies the number of decimal places for the parameter.

property NumericScale: Integer;

Description

Set NumericScale to indicate the maximum number of digits that can appear to the right of the decimal place in a parameter's value (the scale).

Note:	NumericScale only applies to parameters used by dbExpress datasets.

Note:	The Precision property controls the total number of digits allowed.


TParam.ParamType
 VCL Reference

TParam.ParamType

TParam	Example

Indicates the type of the parameter the TParam represents.

property ParamType: TParamType;

Description

Objects that use TParam objects to represent field parameters set ParamType to indicate how the parameter is used. ParamType must be one of the following values:

Value	Description

ptUnknown	Unknown or undetermined. Before executing a stored procedure, the application must set parameters of this type to another kind.

ptInput	Used to input a field value. Identifies a parameter used to pass values to a query or stored procedure for processing.

ptOutput	Used to output a field value. Identifies a parameter used by a stored procedure to return values to an application.

ptInputOutput	Used for both input and output.

ptResult	Used as a return value. Identifies a parameter used by a stored procedure to return an error or status value. A stored procedure can only have one parameter of type ptResult.


TParam.Precision
 VCL Reference

TParam.Precision

TParam	See also

Specifies the number of digits allowed for a numeric parameter.

property Precision: Integer;

Description

Set Precision to indicate the maximum number of digits allowed in the parameter, including both significant and fractional.

Note:	Precision only applies to parameters used by dbExpress datasets.

Note:	The NumericScale property controls the total number of decimal digits allowed.


TParam.Size
 VCL Reference

TParam.Size

TParam	See also

Specifies the number of characters in a string-type parameter.

property Size: Integer;

Description

Set Size to indicate the maximum number of characters allowed in the parameter. Size only pertains to string-type parameters. For numeric type parameters, use the NumericScale and Precision properties. For other parameter types, Size should be zero.

Note:	Size only applies to parameters used by dbExpress datasets.


TParam.Text
 VCL Reference

TParam.Text

TParam	See also

Represents the value of the parameter as a string.

property Text: String;

Description

Set the Text property to assign the value of the parameter to a string without changing the DataType. Unlike the AsString property, which sets the value to a string and changes the DataType, setting the text property converts the string to the DataType of the parameter, and sets the value accordingly. Thus, use AsString to treat the parameter as representing the value of a string field. Use Text instead when assigning a value that is in string form, when making no assumptions about the field type. For example, Text is useful for assigning user data that was input using an edit control.

Reading the Text property is the same as reading the AsString property.


TParam.Value
 VCL Reference

TParam.Value

TParam	See also

Represents the value of the parameter as a Variant.

property Value: Variant;

Description

Use Value in generic code that manipulates the values of parameters without needing to know the field type the parameters represent.


 VCL Reference

TParam methods

TParam	Alphabetically	Legend

In TParam

Assign

AssignField

AssignFieldValue

Clear

Create

GetData

GetDataSize

LoadFromFile

LoadFromStream

SetBlobData

SetData

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParam methods

TParam	By object	Legend

AfterConstruction

Assign

AssignField

AssignFieldValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetData

GetDataSize

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException

SetBlobData

SetData


TParam.Assign
 VCL Reference

TParam.Assign

TParam	See also

Copies the Name and Value of another TParam object.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to copy from another parameter or from a field component. If the Source parameter is another parameter, Assign transfers the value of

The DataType property

The Bound property

The Value property

The Name property

The ParamType property only if it is currently ftUnknown.

If the Source parameter is a field component, Assign transfers the value of

The DataType property

The Value property

The Name property (from the FieldName of the field)

When assigning values from a field, Assign sets the Bound property to True.

Note:	Assign does not alter the use of a parameter, only the identifier and the value.


TParam.AssignField
 VCL Reference

TParam.AssignField

TParam	See also

Assigns the DataType, Name, and Value properties from a TField object.

procedure AssignField(Field: TField);

Description

Use AssignField to set a parameter to represent a particular TField object. AssignField sets the Bound property to True.

Unlike AssignFieldValue, AssignField names the parameter after the field object as well as taking its value.


TParam.AssignFieldValue
 VCL Reference

TParam.AssignFieldValue

TParam	See also

Assigns the DataType and Value properties from a TField object.

procedure AssignFieldValue(Field: TField; const Value: Variant);

Description

Use AssignFieldValue to set the Value property to the value passed as the Value parameter. AssignFieldValue assumes that the Value represents a value from a field like the Field parameter, and assigns the DataType property accordingly. AssignFieldValue sets the Bound property to True.

Unlike AssignField, AssignFieldValue does not name the parameter after the field object.


TParam.Clear
 VCL Reference

TParam.Clear

TParam	See also

Sets the Value of the parameter to NULL.

procedure Clear;

Description

Use Clear to assign a NULL value to a parameter. Calling Clear neither sets nor clears the Bound property. When assigning a NULL value to a parameter, set the Bound property as well as calling Clear.


TParam.Create
 VCL Reference

TParam.Create

TParam	See also

Creates an instance of TParam and inserts it in a parameter list.

constructor Create(AParams: TParams; AParamType: TParamType); reintroduce; overload;

constructor Create(Collection: TCollection); overload; override;

Description

Call Create to instantiate a TParam object. TParam objects are usually created by the dataset that uses them to represent its field parameters.

After allocating the memory for an instance of TParam, Create

Adds the new TParam object to AParams.

Sets the ParamType to AParamType.

Initializes the DataType to ftUnknown.

Sets the Bound property to False.


TParam.GetData
 VCL Reference

TParam.GetData

TParam	See also 	Example

Fills the buffer with the Value of the parameter in the native format of a database field of the appropriate type.

procedure GetData(Buffer: Pointer);

Description

Use GetData to obtain the value of a parameter in the format ready to be written directly to the underlying database. That format is the format used by physical database fields corresponding to DataType. Buffer must have enough space to hold the information. Use the GetDataSize method to determine the necessary size.

The native format for a database field may not be the same as the datatype used by the corresponding field object. Use the As... properties to get the value in the type used by the corresponding field object. Use GetData to get the value in the native database format.

For example, when DataType is ftBCD, GetData retrieves the value in binary-coded decimal, even though the TBCDField object uses Currency to store and manipulate its values. AsBCD gets the value in the Currency type.


TParam.GetDataSize
 VCL Reference

TParam.GetDataSize

TParam	See also 	Example

Returns the number of bytes needed to hold the parameter’s value in the format used by the corresponding type of database field.

function GetDataSize: Integer;

Description

Call GetDataSize to determine the number of bytes used to represent the parameter’s value. GetDataSize indicates the buffer size needed before calling the GetData method. The value returned by GetDataSize depends on the Value of the parameter. For some values of DataType, this is always the same:

DataType	Value of DataSize

ftBoolean	2

ftSmallint	2

ftWord	2

ftAutoInc	4

ftDate	4

ftInteger	4

ftTime	4

ftCurrency	8

ftDateTime	8

ftFloat	8

ftTimeStamp	16

ftBCD	34

ftString	length of the string + 1

ftFixedChar	length of the string + 1

ftVarBytes	If the value is a Variant array, the number of elements in the array, else 0

ftBytes	If the value is a Variant array, the number of elements in the array, else 0

ftBlob	number of bytes of blob data.

ftFmtMemo	number of bytes of blob data.

ftGraphic	number of bytes of blob data.

ftMemo	length of memo string + 1.

ftDBaseOle	number of bytes of blob data.

ftParadoxOle	number of bytes of blob data.

ftOraBlob	number of bytes of blob data.

ftOraClob	number of bytes of blob data.

ftTypedBinary	number of bytes of data

ftADT	0

ftArray	0

ftDataSet	0

ftReference	0

ftCursor	0

ftUnknown	raises an EDatabaseError exception

Note:	The size returned by GetDataSize is the size required for the physical database representation of the Value. The field object that corresponds to that physical database field may store its data in another format requiring a different number of bytes.


TParam.LoadFromFile
 VCL Reference

TParam.LoadFromFile

TParam	See also

Loads the value of a BLOB parameter from the specified file.

procedure LoadFromFile(const FileName: String; BlobType: TBlobType;

Description

Use LoadFromFile to set the value of a BLOB parameter from a value stored in the file specified by the FileName parameter. The DataType property is set to the value passed as the BlobType parameter.

Query2.ParamByName('Notes').LoadFromFile('c:\Files\Note1234.txt', ftMemo);


TParam.LoadFromStream
 VCL Reference

TParam.LoadFromStream

TParam	See also

Loads the value of a BLOB parameter from a stream.

procedure LoadFromStream(Stream: TStream; BlobType:TBlobType;

Description

Use LoadFromStream to set the value of a BLOB parameter from a value read from the stream specified by the Stream parameter. For example, use LoadFromStream to set the value of a BLOB parameter directly from a TBlobStream object. The DataType property is set to the value passed as the BlobType parameter.


TParam.SetBlobData
 VCL Reference

TParam.SetBlobData

TParam	See also

Copies a new value for the parameter in physical database format from Buffer.

procedure SetBlobData(Buffer: Pointer; Size: Integer);

Description

Use SetBlobData to set the value of a parameter from a buffer that contains data from a Binary Large Object (BLOB) field. SetBlobData copies the number of bytes specified by the Size parameter from the buffer specified by the Buffer parameter, and sets the DataType property to ftBlob.


TParam.SetData
 VCL Reference

TParam.SetData

TParam	See also 	Example

Copies a new value for the parameter in physical database format from Buffer.

procedure SetData(Buffer: Pointer);

Description

Use SetData to set the value of a parameter from a buffer that contains data in the physical database format. The GetData method of a TField object fetches data in the physical database format. Borland Database Engine API calls can also provide data in physical database format.

Note:	When the DataType property is ftUnknown, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, or ftTypedBinary, SetData raises an EDatabaseError exception. For BLOB fields, use the SetBlobData method instead.


Hierarchy

TObject

TPersistent

TCollectionItem

TParam


TParams
 VCL Reference

TParams

Hierarchy	Properties	Methods	See also

TParams manages a list of field parameters.

Unit

DB

Description

Datasets that represent queries and stored procedures use TParams objects to represent the parameters of their query or stored procedures. Client datasets use TParams to represent parameters they pass to a source dataset.

Note:	ADO-based datasets do not use TParams objects to represent parameters. They use the TParameters class instead.

Use the properties and methods of TParams to:

Access a specific field parameter.

Add or delete field parameters from the list.

Get or set the values of individual field parameters.

Compare field parameters.

Iterate through all field parameters.

Copy a set of field parameters to another parameter list.


 VCL Reference

TParams properties

TParams	Alphabetically	Legend

In TParams

Items

ParamValues

Derived from TCollection

Count

ItemClass


 VCL Reference

TParams properties

TParams	By object	Legend

Count

ItemClass

Items

ParamValues


TParams.Items
 VCL Reference

TParams.Items

TParams	See also	Example

Lists the individual field parameters of a TParams object.

property Items[Index: Word]: TParam;

Description

Use Items to iterate through all the field parameters. Index identifies the index in the range 0 to Count - 1. Items can reference a particular parameter by its index, but the ParamByName method is preferred when working with named parameters, because it does not depend on the order of the parameters.


TParams.ParamValues
 VCL Reference

TParams.ParamValues

TParams	See also 	Example

Lists the values of individual field parameters that are specified by name.

property ParamValues[const ParamName: String]: Variant;

Description

Use ParamValues to get or set the values of individual named field parameters. ParamName is a string containing the names of the individual field parameters of interest. If ParamValues is used to access more than one field parameter, the names are separated by semicolons (;).

Setting ParamValues sets the Value property for each parameter listed in the ParamName string. Specify the values as Variants, in order, in a Variant array.

Getting ParamValues retrieves a Variant array of Variants, each of which represents the value of one of the named parameters.

If ParamName includes a name that does not match any of the field parameters in Items, an exception is raised.


 VCL Reference

TParams methods

TParams	Alphabetically	Legend

In TParams

AddParam

AssignValues

Create

CreateParam

FindParam

GetParamList

IsEqual

ParamByName

ParseSQL

RemoveParam

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParams methods

TParams	By object	Legend

Add

AddParam

AfterConstruction

Assign

AssignValues

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateParam

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

FindParam

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParamList

InheritsFrom

InitInstance

Insert

InstanceSize

IsEqual

MethodAddress

MethodName

NewInstance

ParamByName

ParseSQL

RemoveParam

SafeCallException


TParams.AddParam
 VCL Reference

TParams.AddParam

TParams	See also 	Example

Inserts a new field parameter into the Items list.

procedure AddParam(Value: TParam);

Description

Use AddParam to add an instantiated parameter to the Items list. To create a field parameter as well as add it to the list, use CreateParam instead.

Note:	Parameters for datasets that represent queries are only created by specifying parameters in the SQL statement. The TParam objects in such a dataset’s	1` Params property are created automatically when parameter tokens are added to the SQL statement.


TParams.AssignValues
 VCL Reference

TParams.AssignValues

TParams	See also	Example

Assigns new values to the parameters of the Items property.

procedure AssignValues(Value: TParams);

Description

Use AssignValues to update the values of the field parameters in the Items list to match the values of the corresponding field parameters in another TParams object. For each entry in Items, the AssignValues method attempts to find a parameter with the same Name property in Value. If successful, the parameter information (type and current data) from the Value parameter is assigned to the Items entry. Entries in Items for which no match is found are left unchanged.


TParams.Create
 VCL Reference

TParams.Create

TParams	See also	Example

Creates an instance of TParams.

constructor Create; overload;

constructor Create(Owner: TPersistent); overload;

Description

Call Create to instantiate a TParams object. Most applications will not need to create a TParams list, as it is created by the dataset that uses the TParams object.


TParams.CreateParam
 VCL Reference

TParams.CreateParam

TParams	See also 	Example

Creates a new field parameter object and inserts it into the Items list.

function CreateParam(FldType: TFieldType; const ParamName: string; ParamType: TParamType): TParam;

Description

Call CreateParam to instantiate a new TParam object and add it to the Items managed by this TParams object. Specify the field type of the new parameter as the value of FldType, specify the name of the parameter as the value of ParamName, and specify the type of parameter as the value of ParamType.

Note:	Parameters for datasets that represent queries are only created by specifying parameters in the SQL statement. The TParam objects in such as dataset’s Params property are created automatically when parameter tokens are added to the SQL statement.


TParams.FindParam
 VCL Reference

TParams.FindParam

TParams 	See also

Locates the parameter with a given name.

function FindParam(const Value: String): TParam;

Description

Use FindParam to find a parameter with the name passed in Value. If a match is found, FindParam returns the parameter. Otherwise, it returns nil. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate more than one parameter at a time, by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.


TParams.GetParamList
 VCL Reference

TParams.GetParamList

TParams	See also

Fills a TList object with the TParam objects specified by name.

procedure GetParamList(List: TList; const ParamNames: String);

Description

Use GetParamList to obtain a subset of the field parameters in the Items list that have been identified by name. ParamNames is a string giving the names of all field parameters of interest. Multiple parameter names are separated by semicolons (;).

GetParamList adds the field parameters to List in the order they appear in ParamNames. If ParamNames includes a name that does not match any of the field parameters in Items, an exception is raised.


TParams.IsEqual
 VCL Reference

TParams.IsEqual

TParams	See also

Indicates whether two TParams objects have identical Items.

function IsEqual(Value: TParams): Boolean;

Description

IsEqual returns True if the Items property of the Value parameter exactly matches the Items property. To match, each Items list must have the same number of field parameters, in the same order, which match on name, datatype, parameter type, and value.


TParams.ParamByName
 VCL Reference

TParams.ParamByName

TParams	See also 	Example

Locates the parameter with a given name.

function ParamByName(const Value: String): TParam;

Description

Use ParamByName to find a parameter with the name passed in Value. If a match is found, ParamByName returns the parameter. Otherwise, an exception is raised. Use this method rather than a direct reference to the Items property to avoid depending on the order of the entries.

To locate a parameter by name without raising an exception if the parameter is not found, use the FindParam method.

To locate more than one parameter at a time, by name, use the GetParamList method instead. To get only the value of a named parameter, use the ParamValues property.


TParams.ParseSQL
 VCL Reference

TParams.ParseSQL

TParams 	See also

Locates the parameters in an SQL statement and replaces them with question marks.

function ParseSQL(SQL: String; DoCreate: Boolean): String;

Description

Call ParseSQL to replace all the parameters in the SQL statement passed as SQL with question marks (?). ParseSQL recognizes parameters by a preceding colon (:). Double colons (::) or colons contained in quoted strings are parsed as literals, and the immediately following name is not replaced with a question mark. The converted SQL statement is returned.

If the DoCreate parameter is True, all parameters in the Items property are replaced with a set of TParam objects whose names are the same as the strings removed from the SQL statement.

For example, given the SQL string

SELECT * FROM EMPLOYEES

WHERE (ID = :EMP_ID) AND (NAME = :EMP_NAME)

ParseSQL returns the string

SELECT *

FROM EMPLOYEES

WHERE (ID = ?) AND (NAME = ?)

and, if DoCreate is True, the Items property contains two TParam objects with the names EMP_ID and EMP_NAME.


TParams.RemoveParam
 VCL Reference

TParams.RemoveParam

TParams	See also 	Example

Removes the specified parameter from the Items property of a TParams object.

procedure RemoveParam(Value: TParam);

Description

Use RemoveParam to remove a field parameter from the Items list. RemoveParam takes Value out of the list but does not free it.

Note:	Parameters for datasets that represent queries are only created and removed by specifying parameters in the SQL statement. The TParam objects in such a dataset’s Params property are deleted automatically when the corresponding parameter tokens are removed from the SQL statement.


Hierarchy

TObject

TPersistent

TCollection

TParams


CheckSqlTimeStamp procedure
 VCL Reference

CheckSqlTimeStamp procedure

See also

Checks whether a TSQLTimeStamp value represents a valid date and time.

Unit

SqlTimSt

Category

Date/time routines

procedure CheckSqlTimeStamp(const ASQLTimeStamp : TSQLTimeStamp);

Description

CheckSqlTimeStamp checks that the specified TSQLTimeStamp value represents a valid date and time. If the fields of the TSQLTimeStamp record are out of the valid range, CheckSqlTimeStamp raises an EConverError exception.


DateTimeToSQLTimeStamp function
 VCL Reference

DateTimeToSQLTimeStamp procedure

See also

Converts a TDateTime value to a TSQLTimeStamp value.

Unit

SqlTimSt

Category

Date/time routines

function DateTimeToSQLTimeStamp(const DateTime: TDateTime): TSQLTimeStamp);

Description

Use DateTimeToSQLTimeStamp to convert the TDateTime value specified by DateTime to a TSQLTimeStamp value.


NullSQLTimeStamp constant
 VCL Reference

NullSQLTimeStamp constant

See also

Represents a NULL TSQLTimeStamp value.

Unit

SqlTimSt

Category

Date/time routines

const

  NullSQLTimeStamp : TSQLTimeStamp= (Year: 0; Month: 0; Day: 0; Hour: 0; Minute: 0; Second: 0; Fractions: 0);

Description

Use NullSQLTimeStamp to indicate an unknown or missing TSQLTimeStamp value.


SQLDayOfWeek function
 VCL Reference

SQLDayOfWeek function

See also

Indicates the day of the week when a specified TSQLTimeStamp value occurs.

Unit

SqlTimSt

Category

Date/time routines

function SQLDayOfWeek(const DateTime: TSQLTimeStamp): Integer;

Description

SQLDayOfWeek returns the day of the week of the specified date as an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.


SQLTimeStampToDateTime function
 VCL Reference

SQLTimeStampToDateTime function

See also

Converts a TSQLTimeStamp value to a TDateTime value.

Unit

SqlTimSt

Category

Date/time routines

function SQLTimeStampToDateTime(const DateTime: TSQLTimeStamp): TDateTime;

Description

Use SQLTimeStampToDateTime to convert the TSQLTimeStamp value specified by DateTime to a TDateTime value.


SQLTimeStampToStr function
 VCL Reference

SQLTimeStampToStr function

See also

Converts a TSQLTimeStamp value to a string.

Unit

SqlTimSt

Category

Date/time routines

function SQLTimeStampToStr(const Format: string; DateTime: TSQLTimeStamp): string;

Description

Use SQLTimeStampToStr to convert a TSQLTimeStamp value to a string.

DateTimeToStr converts the TSQLTimeStamp value given by DateTime using the format given by Format and returns the resulting string.

If the string specified by the Format parameter is empty, the TSQLTimeStamp value is formatted using the ShortDateFormat global variable followed by the LongTimeFormat global variable. The time is not displayed if all time fields in the TSQLTimeStamp record are 0.

To create a format string for the Format parameter, use the standard date-time format specifiers:


StrToSQLTimeStamp function
 VCL Reference

StrToSQLTimeStamp function

See also

Converts a string to a TSQLTimeStamp value.

Unit

SqlTimSt

Category

Date/time routines

function StrToSQLTimeStamp(const S: string): TSQLTimeStamp;

Description

Use StrToSQLTimeStamp to convert the string S to a TSQLTimeStamp value. If S does not represent a valid date-and-time value, StrToSQLTimeStamp raises an EConvertError exception.

Tip:	To convert strings to TSQLTimeStamp values without raising an exception when the string is not a valid date-and-time, use TryStrToSQLTimeStamp instead.


TryStrToSQLTimeStamp function
 VCL Reference

TryStrToSQLTimeStamp function

See also

Converts a string to a TSQLTimeStamp value.

Unit

SqlTimSt

Category

Date/time routines

function TryStrToSQLTimeStamp(const S: string; var TimeStamp: TSQLTimeStamp) : Boolean;

Description

Use TryStrToSQLTimeStamp to convert the string S to a TSQLTimeStamp value.

If S can be converted to a TSQLTimeStamp value, the result is returned as the TimeStamp parameter and TryStrToSQLTimeStamp returns True.

If S can’t be converted to a TSQLTimeStamp value, TimeStamp is set to NullSQLTimeStamp and TryStrToSQLTimeStamp returns False.


VarIsSQLTimeStamp function
 VCL Reference

VarIsSQLTimeStamp function

See also

Indicates whether a specified Variant represents a TSQLTimeStamp value.

Unit

SqlTimSt

Category

variant support routines

function VarIsSQLTimeStamp(const aValue: Variant): Boolean;

Description

VarIsSQLTimeStamp returns True if the Variant aValue stores its value internally as a TSQLTimeStamp value. VarIsSQLTimeStamp returns False otherwise.


VarSQLTimeStamp function
 VCL Reference

VarSQLTimeStamp function

See also

Returns the TVarType constant that identifies the internal type of a Variant as a TSQLTimeStamp value.

Unit

SqlTimSt

Category

variant support routines

function VarSQLTimeStamp: TVarType;

Description

VarSQLTimeStamp returns the TVarType constant that identifies a TSQLTimeStamp-valued Variant. This is the value that the VarType function returns when the Variant stores its value as a TSQLTimeStamp value.

The Variant type codes for custom Variants are dynamically allocated when the application loads the unit that implements them. VarSQLTimeStamp allows the application to identify the Variant type code that is currently used for custom Variants that represent an SQL time stamp. This value, however, may not match the type code used by another application that uses a different set of custom Variant types.


VarSQLTimeStampCreate function
 VCL Reference

VarSQLTimeStampCreate function

See also

Creates a new Variant that stores its value internally as a TSQLTimeStamp value.

Unit

SqlTimSt

Category

variant support routines

procedure VarSQLTimeStampCreate(var aDest: Variant; const ASQLTimeStamp: TSQLTimeStamp); overload;

function VarSQLTimeStampCreate: Variant; overload;

function VarSQLTimeStampCreate(const ASQLTimeStamp: TSQLTimeStamp): Variant; overload;

function VarSQLTimeStampCreate(const AValue: TDateTime): Variant; overload;

function VarSQLTimeStampCreate(const AValue: string): Variant; overload;

Description

Call VarSQLTimeStampCreate to obtain a Variant that stores its value as a TSQLTimeStamp value.

Using the first syntax, the Variant returned as aDest has the same value as ASQLTimeStamp.

Using the second syntax (passing no arguments), the returned Variant has a value of NullSQLTimeStamp.

Using the third syntax, the returned Variant has the same value as ASQLTimeStamp.

Using the fourth syntax, the returned Variant represents the same date and time as the TDateTime value AValue.

Using the fifth syntax, the string passed as AValue is parsed into a date-and-time value and assigned as the value of the returned Variant. If AValue does not represent a date-and-time value, the resulting Variant has a value of NullSQLTimeStamp.


VarToSQLTimeStamp function
 VCL Reference

VarToSQLTimeStamp function

See also

Converts a Variant that represents a TSQLTimeStamp value to the corresponding TSQLTimeStamp.

Unit

SqlTimSt

Category

variant support routines

function VarToSQLTimeStamp(const aValue: Variant): TSQLTimeStamp;

Description

Use VarToSQLTimeStamp to obtain a TSQLTimeStamp from a variant whose value represents a date-and-time value. If the Variant is a Null Variant, VarToSQLTimeStamp returns NullSQLTimeStamp.


TServiceThread
 VCL Reference

TServiceThread

Hierarchy	Properties	Methods	Events	Using TServiceThread	See also

TServiceThread represents the thread associated with a specific service (TService object).

Unit

SvcMgr

Description

TServiceThread is the thread associated with a service. Each service application has one or more service objects, each of which has its own dedicated thread. TServiceThread instances represent those threads.

Note: TServiceThread has an Execute method that contains a loop so that service requests do not get locked out. The default procedure calls ProcessRequests after a service request has finished executing. For more information about optimizing service execution by spawning individual threads for each service request, see Service threads.


 VCL Reference

TServiceThread properties

TServiceThread	Alphabetically	Legend

Derived from TThread

FreeOnTerminate

Handle

Priority

Suspended

ThreadID


 VCL Reference

TServiceThread properties

TServiceThread	By object	Legend

FreeOnTerminate

Handle

Priority

Suspended

ThreadID


 VCL Reference

TServiceThread events

TServiceThread	Alphabetically	Legend

Derived from TThread

OnTerminate


 VCL Reference

TServiceThread events

TServiceThread	By object	Legend

OnTerminate


 VCL Reference

TServiceThread methods

TServiceThread	Alphabetically	Legend

In TServiceThread

Create

ProcessRequests

Derived from TThread

Destroy

Resume

Suspend

Terminate

WaitFor

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServiceThread methods

TServiceThread	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ProcessRequests

Resume

SafeCallException

Suspend

Terminate

WaitFor


TServiceThread.Create
 VCL Reference

TServiceThread.Create

TServiceThread	Methods	See also

Instantiates and initializes a TServiceThread object.

constructor Create(Service: TService);

Description

Applications do not need to call the constructor directly. Instances of TService create the TServiceThread object on startup. The Service parameter is the TService instance for which the TServiceThread is the dedicated thread.

The constructor sets the FreeOnTerminate property to True and then calls the base class constructor so that the thread object is created with its Suspended property set to False.


TServiceThread.ProcessRequests
 VCL Reference

TServiceThread.ProcessRequests

TServiceThread	Methods	See also

Allows clients to invoke the service associated with the service thread.

procedure ProcessRequests(WaitForMessage: Boolean);

Description

TServiceThread’s ProcessRequests is called in the Execute method after any associated service’s OnExecute event handler has finished executing. For more information about optimizing service execution by spawning individual threads for each service request, see the Developer’s Guide.


Hierarchy

TObject

TThread

TServiceThread


TSessionList
 VCL Reference

TSessionList

Hierarchy	Properties	Methods 	Using TSessionList	See also

TSessionList manages one or more Borland Database Engine (BDE) sessions in a database application.

Unit

DBTables

Description

Use TSessionList to manage session components in applications that provide multiple sessions. Delphi automatically creates a globally accessible default session list component named Sessions for all database applications. In a multi-session application there can be more than one active session, but only one session can be current at a time. TSessionList enables an application to switch current sessions.

Note:	Applications should not instantiate additional session list components.


 VCL Reference

TSessionList properties

TSessionList	Alphabetically	Legend

In TSessionList

Count

CurrentSession

List

Sessions


 VCL Reference

TSessionList properties

TSessionList	By object	Legend

Count

CurrentSession

List

Sessions


TSessionList.Count
 VCL Reference

TSessionList.Count

TSessionList	See also	Example

Indicates the number of available sessions for the application.

property Count: Integer;

Description

Read Count to determine the current number of available sessions. Count is typically used to iterate through the list of available sessions to perform some universal action on all sessions. Used with the Sessions property, which enables an application to access a session by index number, Count specifies the maximum number of index entries for Sessions (Count - 1).


TSessionList.CurrentSession
 VCL Reference

TSessionList.CurrentSession

TSessionList	See also

Returns a pointer to the current session component

property CurrentSession: TSession

Description

Use CurrentSession to determine or specify which session in a database application is the current session. By default the current session is a pointer to the default session component, Session, that is created automatically by Delphi for all database applications. Setting CurrentSession makes the specified session component the current one. While any number of sessions may be active, only one session can be current at a time.


TSessionList.List
 VCL Reference

TSessionList.List

TSessionList	See also

Returns a specified session component.

property List[const SessionName: String]: TSession;

Description

Use List to return a pointer to a specific session component managed by the session list. List does not change which session is current. SessionName specifies the session component to return, and must match the SessionName property of an existing session component. If no such session exists, List raises an EDatabaseError exception with a message specifying the invalid session name.

Note:	To prevent raising an exception, call the FindSession method instead of using the List property.


TSessionList.Sessions
 VCL Reference

TSessionList.Sessions

TSessionList	See also	Example

Lists all active session components in the session list.

property Sessions[Index: Integer]: TSession;

Description

Use Sessions to access available session components. Index specifies the session to access. Index must be in the range of zero to the current value of the Count property minus one, or an EListError exception is raised describing the out of bounds condition.

For example, an application might iterate through all available sessions in the list to perform a global action on them.


 VCL Reference

TSessionList methods

TSessionList	Alphabetically	Legend

In TSessionList

Create

Destroy

FindSession

GetSessionNames

OpenSession

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSessionList methods

TSessionList	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FindSession

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetSessionNames

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

OpenSession

SafeCallException


TSessionList.Create
 VCL Reference

TSessionList.Create

TSessionList	See also

Creates an instance of a TSessionList component.

constructor Create;

Description

Do not create instances of TSessionList. A default session list component, Sessions, is automatically created for all database applications. Secondary session lists are not necessary.

Create calls its inherited constructor, creates an empty list object to keep track of session components, and both creates and initializes a critical section for opening databases.


TSessionList.Destroy
 VCL Reference

TSessionList.Destroy

TSessionList	See also

Destroys the instance of a session list component.

destructor Destroy;

Description

Do not call Destroy. Delphi automatically handles the destruction of the default session list component, Sessions, when an application closes.

Destroy closes all session components, deletes the BDE critical section, and calls its inherited destructor.


TSessionList.FindSession
 VCL Reference

TSessionList.FindSession

TSessionList	See also

Searches the list of sessions for a specified session.

function FindSession(const SessionName: String): TSession;

Description

Call FindSession to determine whether or not a specified session exists. SessionName specifies the session to search for.

FindSession compares the SessionName parameter to the SessionName property for each session component in the session list. If a match is found, FindSession returns a pointer to the session component. If an application passes an empty string in SessionName, FindSession returns the default session, Session. If a match is not found, FindSession returns nil.


TSessionList.GetSessionNames
 VCL Reference

TSessionList.GetSessionNames

TSessionList	See also	Example

Populates a string list with the names of all available sessions.

procedure GetSessionNames(List: TStrings);

Description

Call GetSessionNames to retrieve a list of all available sessions. List is a string list object, created and maintained by the application, into which to store session names. Names returned by GetSessionNames correspond to the SessionName properties of all available sessions.


TSessionList.OpenSession
 VCL Reference

TSessionList.OpenSession

TSessionList	See also

Makes an existing session active, or creates a new session component and makes it active.

function OpenSession(const SessionName: String): TSession;

Description

Call OpenSession to make an existing session active, or to create a new session and make it active. SessionName specifies the name of the session to open.

OpenSession calls FindSession to see if the session specified in the SessionName parameter already exists. If it finds a match, it starts that session if necessary, and makes the session active. If OpenSession does not find an existing session, it creates a new session using the name specified in the SessionName parameter, starts the session, and makes it active.

In either case, OpenSession returns a session object.


Hierarchy

TObject

TSessionList


TSession
 VCL Reference

 TSession

Hierarchy	Properties	Methods	Events	Using TSession	See also

TSession provides global management of a group of database connections in an application.

Unit

DBTables

Description

Use TSession to manage a group of database connections within an application. There are three uses for TSession: standard, multiple net files for Paradox, and multi-threaded database applications.

Delphi automatically creates a globally accessible default TSession component named Session for all database applications. The default session component handles standard database connections. An application can control the default session by accessing its properties, events, and methods at runtime.

Database applications that must simultaneously access Paradox tables located in different network locations can establish multiple sessions, one for each network location.

Finally, database applications that must establish multiple, concurrent connections to the same database, such as performing two queries against the same data at once, are multi-threaded applications. Multi-threaded applications must create and maintain one additional session component for each simultaneous connection to a single database server.

Note:	Applications that maintain multiple sessions can manage them through the TSessionList component. A default session list component, called Sessions—note the plural which distinguishes it from the default session component, Session—is automatically created for all database applications.

Note:	TSession implements the IDBSession interface, which allows the global PasswordDialog function to supply passwords to the component.


 VCL Reference

TSession properties

TSession	Alphabetically	Legend

In TSession

Active

AutoSessionName

ConfigMode

DatabaseCount

Databases

Handle

KeepConnections

Locale

NetFileDir

PrivateDir

SessionName

SQLHourGlass

TraceFlags

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSession properties

TSession	By object	Legend

Active

AutoSessionName

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConfigMode

DatabaseCount

Databases

DesignInfo

Handle

KeepConnections

Locale

Name

NetFileDir

Owner

PrivateDir

SessionName

SQLHourGlass

Tag

TraceFlags

VCLComObject


TSession.Active
 VCL Reference

TSession.Active

TSession	See also

Specifies whether or not a session is active.

property Active: Boolean;

Description

Examine Active at runtime for the default session, Session, to determine if it is active or not. Active is False by default, meaning there are no open database connections or datasets associated with the session. If Active is True, the session is active even if there are currently no active database connections.

Set the Active property at design time or runtime for additional session components in a database application. Setting Active to True starts the session and makes it the current session. Setting Active to True triggers an OnStartup event handler for the session and initializes the NetFileDir, PrivateDir, and ConfigMode properties.

Setting Active to False (the default), closes any open datasets, and disconnects from attached database servers.

Note:	An application can close the default session by setting Active to False, but this is not recommended.


TSession.AutoSessionName
 VCL Reference

TSession.AutoSessionName

TSession	See also

Indicates whether or not a unique session name is automatically generated for a session.

property AutoSessionName: Boolean;

Description

Set AutoSessionName to control whether or not a unique session name is automatically generated. AutoSessionName is intended to guarantee developers of multi-threaded applications that sessions spawned for each thread are unique at runtime.

When AutoSessionName is False (the default), the application must set the SessionName property for a session component. When AutoSessionName is True, TSession assigns the SessionName property automatically and replicates the session name across the SessionName properties of all dataset components in the data module or form where the session component appears. This allows applications to use sessions in data modules that are replicated over multiple threads. TSession constructs a session name by taking the current value of the Name property and appending an underscore (_) followed by a numeric value. For example, if Name is CustomerSession, then the AutoSessionName might be CustomerSession_2.

Note:	The following restrictions apply to AutoSessionName:

•	You cannot set AutoSessionName for a session in a data module or form that contains more than one session component.

•	You cannot add a session component to a data module or form that already contains a session component with AutoSessionName set to True.

•	You cannot directly set the SessionName property of a session when AutoSessionName is True.


TSession.ConfigMode
 VCL Reference

TSession.ConfigMode

TSession	See also 	Example

Specifies how the Borland Database Engine (BDE) should handle aliases for the session.

const

cmVirtual = [cfmVirtual];

  cmPersistent = [cfmPersistent];

  cmSession = [cfmSession];

  cmAll = [cfmVirtual, cfmPersistent, cfmSession];

type

  TConfigModes = (cfmVirtual, cfmPersistent, cfmSession);

  TConfigMode = set of TConfigModes;

property ConfigMode: TConfigMode;

Description

Set ConfigMode to specify how the BDE should handle aliases created using the AddAlias or AddStandardAlias methods within the context of a session. ConfigMode also determines which BDE aliases are reported to a session when an application calls the GetAliasNames method.

The default setting for ConfigMode is cmAll, which is a constant that includes all possible set items defined in TConfigModes. The following table summarizes the possible BDE configuration modes that can be set for aliases:

Mode	Meaning

cfmVirtual	All aliases in the BDE configuration file, the BDE persistent store, and aliases local to the session are available to the session.

cfmPersistent	Only aliases in the BDE configuration file, or that are added to the persistent store are available to the session.

cfmSession	Only aliases created within this session are available to the session.

The main purpose of ConfigMode is to enable an application to specify and restrict aliases at the session level.

For backward compatibility with the older TConfigMode, use the constants cmVirtual, cmPersistent, cmSession, and cmAll. The first three correspond to the three TConfigModes values of the same names. The constant cmAll represents a ConfigMode setting of all three. The two command lines below, the first using TConfigModes values and the second using the corresponding constant, are functionally the same.

Session.ConfigMode := [cfmSession];

Session.ConfigMode := cmSession;

Note:	Aliases created within a session are not automatically saved to the BDE configuration file. To save an alias to the configuration file, call the SaveConfigFile method.


TSession.DatabaseCount
 VCL Reference

TSession.DatabaseCount

TSession	See also	Example

Indicates the number of active database components currently associated with the session.

property DatabaseCount: Integer;

Description

Examine DatabaseCount to determine the number of active database components associated with a session. As database connections are opened or closed during a session’s life-span, this number can change. If DatabaseCount is zero, there are currently no active database components for the session.

DatabaseCount is typically used with the Databases property to iterate through the current set of active databases in a session.


TSession.Databases
 VCL Reference

TSession.Databases

TSession	See also	Example

Provides an indexed array of all active database component names for a session.

property Databases[Index: Integer]: TDatabase;

Description

Use Databases to access active database components associated with a session. An active database is one that is currently connected to a database server.

Databases is typically used with the DatabaseCount property to iterate through the current set of active databases in a session.


TSession.Handle
 VCL Reference

TSession.Handle

TSession	See also

Specifies the Borland Database Engine (BDE) handle for the session.

type HDBISES: Longint;

property Handle: HDBISES;

Description

Use Handle only to bypass TSession methods and write directly to the BDE API. Many BDE function calls require a handle parameter. Handle is assigned an initial value when a session is activated.

Note:	Do not use this property unless an application requires BDE functionality not available through standard Delphi components.


TSession.KeepConnections
 VCL Reference

TSession.KeepConnections

TSession	See also

Specifies whether or not a temporary database component created in the context of a session maintains a database server connection even if there are no active datasets associated with the database component.

property KeepConnections: Boolean;

Description

Use KeepConnections to specify whether or not temporary database components created at runtime maintain server connections even when they have no active datasets. If KeepConnections is True (the default), the application maintains database connections until the application exits or calls the DropConnections method. For connections to remote database servers, or for applications that frequently open and close datasets, KeepConnections should remain True to reduce network traffic and speed up processing.

When KeepConnections is False, an application disconnects from a database when all datasets associated with a database component are closed. Dropping a connection releases system resources allocated to the connection, but if a dataset is later reopened that uses the same database, the connection must be reestablished and initialized.

Note:	Duration of server connection for a persistent database component is determined by the database component’s KeepConnection property instead of the session’s KeepConnections property.


TSession.Locale
 VCL Reference

TSession.Locale

TSession	See also

Identifies the Borland Database Engine (BDE) language driver for the session component.

type TLocale: Pointer;

property Locale: TLocale;

Description

Examine Locale to determine the BDE language driver used by the session component. Applications that make direct calls to the BDE may need to pass Locale information as an API function parameter.

Note:	Do not use this property unless an application requires BDE functionality not available through standard data access components.


TSession.NetFileDir
 VCL Reference

TSession.NetFileDir

TSession	See also

Specifies the directory that contains the Borland Database Engine (BDE) network control file, PDOXUSRS.NET.

property NetFileDir: String;

Description

Use NetFileDir to specify the directory that contains the BDE network control file, PDOXUSRS.NET. This file governs the sharing of Paradox tables on network drives. All applications that share Paradox tables on a network directory must specify the same value for this property, and must have read, write, and create rights for the directory.

Delphi derives an initial value for NetFileDir from the BDE configuration file for the Paradox driver. Any value assigned to NetFileDir at design time or runtime overrides the BDE configuration setting.

Note:	Any value you assign to NetFileDir is not saved to the BDE configuration file. (Even if you call the SaveConfigFile method.)


TSession.PrivateDir
 VCL Reference

TSession.PrivateDir

TSession	See also

Specifies the directory in which to store temporary table processing files generated by the Borland Database Engine (BDE) for database components associated with a session.

property PrivateDir: String;

Description

Use PrivateDir to set the directory in which to store temporary table processing files for all database connections, such as those generated by the BDE to handle local SQL statements. Ordinarily this value is only set at runtime, so that a user’s local hard disk is used to store temporary files. Local storage of these files improves performance. If no value is specified for PrivateDir, the BDE automatically stores temporary files in the directory current at the time the BDE was initialized.

Note:	For applications that run directly from a networked file server, the application should set PrivateDir to a user’s local drive to improve performance and to prevent temporary files from being created on the server where they might conflict with temporary files created by other instances of the application.


TSession.SessionName
 VCL Reference

TSession.SessionName

TSession	See also

Specifies a unique session name that can be used by database and dataset components to link to this session.

property SessionName: String;

Description

Set SessionName to a unique and meaningful name that can be used to link database and dataset components to the session. Database and dataset components each have corresponding SessionName properties that must either match the SessionName property of an active session or that be blank, indicating that they should be associated with the default session, Session.

Note:	If the AutoSessionName property is True, an application cannot set SessionName directly.


TSession.SQLHourGlass
 VCL Reference

TSession.SQLHourGlass

TSession

Indicates whether or not the mouse cursor changes to an hourglass during BDE operations.

property SQLHourGlass: Boolean;

Description

Set SQLHourGlass to False if you do not want the mouse cursor to change to an hourglass while the BDE is waiting for an SQL server to perform an operation. This property must be set before the session is opened.


TSession.TraceFlags
 VCL Reference

TSession.TraceFlags

TSession	See also

Specifies the database operations to track with the SQL Monitor at runtime.

type

  TTraceFlag = (tfQPrepare, tfQExecute, tfError, tfStmt, tfConnect, tfTransact, tfBlob, tfMisc, tfVendor, tfDataIn, tfDataOut);

TTraceFlags = set of TTraceFlag;

property TraceFlags: TTraceFlags;

Description

Use TraceFlags to specify which database operations the SQL Monitor should track in an application at runtime. TraceFlags is only meaningful for the SQL Monitor, which is provided to enable performance tuning and SQL debugging when working with remote SQL database servers.

Note:	Normally trace options are set from the SQL Monitor rather than setting TraceFlags in application code.

The value of a session component’s TraceFlags property determines the initial settings of the TraceFlags property for database components associated with the session.

The TTraceFlags type defines the individual values that can be included in the TraceFlags property. The following table summarizes those values:

Values	Meaning

tfQPrepare	Monitor Prepare statements.

tfQExecute	Monitor ExecSQL statements.

tfError	Monitor server error messages. Such messages may include an error code.

tfStmt	Monitor all SQL statements.

tfConnect	Monitor database connect and disconnect operations, including allocation of connection handles, and freeing connection handles.

tfTransact	Monitor transaction statements, such as StartTransaction, Commit, and Rollback.

tfBlob	Monitor operations on blob data types.

tfMisc	Monitor any statements not covered by other flag options.

tfVendor	Monitor direct API function calls to the database server.

tfDataIn	Monitor data received from a server.

tfDataOut	Monitor data sent to a server.

Because TraceFlags is a set property, an application can specify different combinations of flags to monitor different combinations of statements. For example, the following statement limits monitoring to database connections and SQL statement preparation:

TraceFlags := [tfConnect, tfQPrepare];


 VCL Reference

TSession events

TSession	Alphabetically	Legend

In TSession

OnPassword

OnStartup


 VCL Reference

TSession events

TSession	By object	Legend

OnPassword

OnStartup


TSession.OnPassword
 VCL Reference

TSession.OnPassword

TSession	See also	Example

Occurs when an application attempts to open a Paradox table for the first time and the Borland Database Engine (BDE) reports insufficient access rights.

type TPasswordEvent = procedure(Sender: TObject; var Continue: Boolean) of object;

property OnPassword: TPasswordEvent;

Description

Write an OnPassword event handler to take specific action when an application attempts to open a password-protected Paradox table for the first time. To gain access to the Paradox table, the event handler must pass a valid password to the BDE. The event handler should call the AddPassword method to make the password available to the session.

Use Continue to conditionally finalize adding the password. If Continue is set to True, the password addition is attempted. If set to False, the attempt to add the password is abandoned.

Note:	If an OnPassword event does not exist, but the BDE reports insufficient access rights, Delphi displays a default dialog box that prompts for a password.


TSession.OnStartup
 VCL Reference

TSession.OnStartup

TSession	See also

Occurs when an application activates a session.

property OnStartup: TNotifyEvent;

Description

Write an OnStartup event handler to take specific actions when an application activates a session. A session is activated by setting its Active property to True, or by opening a database or dataset associated with the session (both of which set Active to True).


 VCL Reference

TSession methods

TSession	Alphabetically	Legend

In TSession

AddAlias

AddDriver

AddPassword

AddStandardAlias

Close

CloseDatabase

Create

DeleteAlias

DeleteDriver

Destroy

DropConnections

FindDatabase

GetAliasDriverName

GetAliasNames

GetAliasParams

GetConfigParams

GetDatabaseNames

GetDriverNames

GetDriverParams

GetFieldNames

GetPassword

GetStoredProcNames

GetTableNames

IsAlias

ModifyAlias

ModifyDriver

Open

OpenDatabase

RemoveAllPasswords

RemovePassword

SaveConfigFile

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSession methods

TSession	By object	Legend

AddAlias

AddDriver

AddPassword

AddStandardAlias

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

CloseDatabase

Create

DefaultHandler

DeleteAlias

DeleteDriver

Destroy

DestroyComponents

Destroying

Dispatch

DropConnections

ExecuteAction

FieldAddress

FindComponent

FindDatabase

Free

FreeInstance

FreeNotification

FreeOnRelease

GetAliasDriverName

GetAliasNames

GetAliasParams

GetConfigParams

GetDatabaseNames

GetDriverNames

GetDriverParams

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetPassword

GetStoredProcNames

GetTableNames

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsAlias

IsImplementorOf

MethodAddress

MethodName

ModifyAlias

ModifyDriver

NewInstance

Open

OpenDatabase

ReferenceInterface

RemoveAllPasswords

RemoveComponent

RemoveFreeNotification

RemovePassword

SafeCallException

SaveConfigFile

SetSubComponent

UpdateAction


TSession.AddAlias
 VCL Reference

TSession.AddAlias

TSession	See also	Example

Adds a specified Borland Database Engine (BDE) alias to the session for an SQL database server.

procedure AddAlias(const Name, Driver: String; List: TStrings);

Description

Call AddAlias at runtime to create a session-specific BDE alias for an SQL database server. Name is the unique name to assign to the alias. Driver is the name of the SQL Links database driver to use for the alias. List is a string list containing parameters for the alias.

A session’s ConfigMode property determines whether an alias is local to the session, or is available to all applications in the BDE persistent store as long as any BDE clients are active. To save an alias permanently, call the SaveConfigFile method before ending the session.

Note:	Although AddAlias can be used to create a Paradox or dBASE alias, AddStandardAlias provides a simpler method for Paradox and dBASE alias creation.


TSession.AddDriver
 VCL Reference

TSession.AddDriver

TSession	See also

Adds a specified Borland Database Engine (BDE) driver to the session for an SQL database server.

procedure AddDriver(const Name: string; List: TStrings);

Description

Call AddDriver at runtime to create a BDE driver for an SQL database server. AddDriver can also be used to create ODBC driver entries. Name is the unique name to assign to the driver. List is a string list containing parameters for the alias.

A session’s ConfigMode property determines whether a driver is local to the session, or is available to all applications in the BDE persistent store as long as any BDE clients are active. To save a driver permanently, call the SaveConfigFile method before ending the session.


TSession.AddPassword
 VCL Reference

TSession.AddPassword

TSession	See also

Adds a password to the current session for accessing encrypted Paradox or dBase tables.

procedure AddPassword(const Password: String);

Description

Call AddPassword to provide a password for a session prior to opening an encrypted Paradox or dBase table that requires a password. If an application opens a table that requires a password for access, the session does not have a password assigned to it, and the application does not provide its own OnPassword event handler, Delphi displays a dialog box prompting the user for a valid password before allowing table access.

For example, to provide the String literal “secret” as a password for the session:

Session.AddPassword('secret');

Note:	If an application defines its own OnPassword event handler, the handler should call this method to add passwords for the session. All passwords assigned by AddPassword should be deleted with RemoveAllPasswords or RemovePassword before an application closes.


TSession.AddStandardAlias
 VCL Reference

TSession.AddStandardAlias

TSession	See also	Example

Adds a standard Borland Database Engine (BDE) alias to the session for Paradox, dBASE, or ASCII tables.

procedure AddStandardAlias(const Name, Path, DefaultDriver: String);

Description

Call AddStandardAlias at runtime to create a session-specific BDE alias for Paradox, dBASE or ASCII tables. Name is the unique name to assign to the alias. Path specifies the directory where the database is located. DefaultDriver is the name of the standard BDE driver to use for the alias. If set, DefaultDriver must be one of “Paradox,” “DBASE,” or “ASCIIDRV”. If left blank DefaultDriver defaults to “Paradox”. DefaultDriver is used when attempting to open a table that both does not have an extension and is defined as a table of type ttDefault.

A session’s ConfigMode property determines whether an alias is local to the session, or is available to all applications in the BDE persistent store as long as any BDE clients are active. the lifetime of the session. To save an alias permanently, call the SaveConfigFile method before ending the session.

Note:	To create an alias for an SQL database, call AddAlias instead of AddStandardAlias.


TSession.Close
 VCL Reference

TSession.Close

TSession	See also

Disconnects from all databases, and closes the session.

procedure Close;

Description

Call Close to end a session. Close disconnects from all active databases by freeing temporary database components, and calling the Close methods persistent database components, and then sets its own session handle to nil.

Note:	Setting the Active property to False also closes a session.


TSession.CloseDatabase
 VCL Reference

TSession.CloseDatabase

TSession	See also

Closes a database connection associated with the current session.

procedure CloseDatabase(Database: TDatabase);

Description

Call CloseDatabase to close a persistent database connection, or to close and free a temporary database connection. Database specifies the name of the database component for which to close the connection.

CloseDatabase decrements the specified database component’s reference count, and then, if the reference count is zero and the database component’s KeepConnection property is False, CloseDatabase either frees a temporary database component or closes the connection for a persistent database component.

Note:	Calling CloseDatabase for a persistent database component does not close the connection. To close a connection for a persistent database component, call the database component’s Close method directly.

Temporary database components are closed automatically when the last dataset associated with the database component is closed, but an application can call CloseDatabase prior to that time to force closure. Closing a connection established by a temporary database component does not free the component if the session’s KeepConnections property is True (the default). To free temporary database components after closing their connections call DropConnections.


TSession.Create
 VCL Reference

TSession.Create

TSession	See also

Creates an instance of a TSession component.

constructor Create(AOwner: TComponent);

Description

Do not call Create directly. The default session component, Session, is created automatically for all database applications. To create additional sessions for a multi-threaded database application at runtime call Sessions.OpenSession instead of Create. OpenSession calls Create only if the session does not already exist. (At design time, create additional sessions by dropping them on a data module.)

Create calls its inherited constructor and ensures that the session component cannot be inherited should the data module or form on which it is placed be stored in the Object Repository. Create also:

Creates an empty list of database components for the session.

Sets the KeepConnections property to True.

Adds the session to the session list.

Sets the Handle property to nil.


TSession.DeleteAlias
 VCL Reference

TSession.DeleteAlias

TSession	See also

Removes a specified Borland Database Engine (BDE) alias from the session.

procedure DeleteAlias(const Name: String);

Description

Call DeleteAlias to remove a BDE alias from a session. Removing an alias makes the alias unavailable to the session, but does not remove it from the BDE configuration file if the alias was stored there when it was created. To remove an alias from the BDE configuration file follow the call to DeleteAlias with a call to SaveConfigFile.


TSession.DeleteDriver
 VCL Reference

TSession.DeleteDriver

TSession	See also

Removes a specified Borland Database Engine (BDE) driver from the session.

procedure DeleteDriver(const Name: String);

Description

Call DeleteDriver to remove a BDE driver from a session. Removing a driver makes the driver unavailable to the session, but does not remove it from the BDE configuration file if the driver was stored there when it was created. To remove a driver from the BDE configuration file follow the call to DeleteDriver with a call to SaveConfigFile.


TSession.Destroy
 VCL Reference

TSession.Destroy

TSession	See also

Destroys the instance of a session component.

destructor Destroy;

Description

Do not call Destroy directly. For session components other than the default session, an application should call Free, which verifies that the session component is not nil before calling Destroy.

Warning: Never destroy the default session. Freeing of the default session is handled automatically when an application terminates.

Destroy performs the following actions before calling its inherited destructor:

Makes the session inactive, which closes all database connections.

Removes the session from the session list.

Resets database session references, if necessary.

Frees the list of database components associated with the session.


TSession.DropConnections
 VCL Reference

TSession.DropConnections

TSession	See also

Frees all temporary database components associated with a session if they are inactive.

procedure DropConnections;

Description

Use DropConnections to free all temporary database components that are currently inactive. If the KeepConnections property of the session is True (the default), then temporary database components created as needed for the session by Delphi at runtime are not automatically freed when their database connections are closed. DropConnections enables an application to free these components when they are no longer needed.


TSession.FindDatabase
 VCL Reference

TSession.FindDatabase

TSession	See also

Searches a session’s list of database components for a specified database.

function FindDatabase(const DatabaseName: String): TDatabase;

Description

Call FindDatabase to determine whether or not a specified database is associated with a session. DatabaseName specifies the name of the database component for which to search.

FindDatabase compares DatabaseName to the DatabaseName property for each database component in a session’s list. If a match is found, FindDatabase returns a pointer to the database component. Otherwise FindDatabase returns nil.

An application can call FindDatabase to see if a database component already exists before creating a new database component for a session.

var

  DB: TDatabase;

begin

  DB := Session.FindDatabase('DBDEMOS');

  if (DB = nil) then { database doesn't exist for session so,}

    DB := Session.OpenDatabase('DBDEMOS'); { create and open it}

  if Assigned(DB) and DB.Active then begin

    DB.StartTransaction;

...

  end;

end;


TSession.GetAliasDriverName
 VCL Reference

TSession.GetAliasDriverName

TSession	See also

Provides the name of the database driver used by a specified Borland Database Engine (BDE) alias associated with the session.

function GetAliasDriverName(const AliasName: String): String;

Description

Call GetAliasDriverName to determine the BDE database driver used by a specific alias. AliasName is the name of the alias for which to return driver information.

For aliases corresponding to Paradox and dBASE tables, GetAliasDriverName returns “STANDARD”. For ASCII tables the return value is “ASCIIDRV”. For SQL databases, the driver name depends on the database server.


TSession.GetAliasNames
 VCL Reference

TSession.GetAliasNames

TSession	See also	Example

Populates a string list with the names of persistent Borland Database Engine (BDE) aliases.

procedure GetAliasNames(List: TStrings);

Description

Call GetAliasNames to retrieve a list of persistent BDE aliases—those aliases that exist in persistent storage or in the BDE configuration file. List is a string list object, created and maintained by the application, into which to store the alias names.

A session’s ConfigMode property determines whether an alias created in the context of this session is reported by GetAliasNames. If ConfigMode is cmAll, aliases created within the session are reported.


TSession.GetAliasParams
 VCL Reference

TSession.GetAliasParams

TSession	See also	Example

Retrieves the parameters associated with a specified Borland Database Engine (BDE) alias.

procedure GetAliasParams(const AliasName: String; List: TStrings);

Description

Call GetAliasParams to retrieve the BDE configuration parameters for a specified alias. AliasName is the name of the alias for which to retrieve parameters. List is a string list object, created and maintained by the application, into which to store the parameters.


TSession.GetConfigParams
 VCL Reference

TSession.GetConfigParams

TSession	See also

Retrieves Borland Database Engine (BDE) configuration information.

procedure GetConfigParams(const Path, Section: String; List: TStrings);

Description

Call GetConfigParams to retrieve specific types of configuration information from the BDE configuration file used to initialize the application.

Path represents the internal node structure of the BDE configuration file, and must always start at the root, denoted by a backslash. Each node must be separated from others by a backslash, and no node may be empty. For example, a Path of \SYSTEM\FORMATS\TIME, returns the time format used by the BDE configuration file.

Path can contain a replaceable string formatting symbol (%s) in one of its node designations. If it does, Section must contain the missing node information. In this case, GetConfigParams inserts the contents of Section into Path before calling the BDE for the requested information.

List is a string list object, created and maintained by the application, into which to store the configuration information. For example, if Path is \DATABASES\%s\DB INFO, and Section is an alias name, then GetConfigParams returns the parameters for the alias in List.

For more information about the BDE Configuration File, see the online BDE help.


TSession.GetDatabaseNames
 VCL Reference

TSession.GetDatabaseNames

TSession	See also	Example

Populates a string list with the names of persistent Borland Database Engine (BDE) aliases and the names of all databases components known to the session.

procedure GetDatabaseNames(List: TStrings);

Description

Call GetDatabaseNames to retrieve a sorted, combined list of persistent BDE aliases—those aliases that exist in persistent storage or in the BDE configuration file—and the names of all database components known to the session. List is a string list object, created and maintained by the application, into which to store the database and alias names.


TSession.GetDriverNames
 VCL Reference

TSession.GetDriverNames

TSession	See also	Example

Populates a string list with the names of all Borland Database Engine (BDE) drivers available to the session.

procedure GetDriverNames(List: TStrings);

Description

Call GetDriverNames to retrieve the names of all BDE drivers that can be used by a session. List is a string list object, created and maintained by the application, into which to store the driver names.


TSession.GetDriverParams
 VCL Reference

TSession.GetDriverParams

TSession	See also	Example

Populates a string list with the parameters for a specified Borland Database Engine (BDE) driver.

procedure GetDriverParams(const DriverName: String; List: TStrings);

Description

Call GetDriverParams to retrieve a list of parameters associated with a specified BDE driver. DriverName is the BDE driver for which to return a parameter list. List is a string list object, created and maintained by the application, into which to store the driver parameters.

The actual number of parameters returned by GetDriverParams depends on the specified driver. For example, for the STANDARD driver used by Paradox and dBASE, returns only a few parameters. For SQL Links drivers multiple parameters are returned.


TSession.GetFieldNames
 VCL Reference

TSession.GetFieldNames

TSession	See also

Populates a string list with the names of all fields in a specified table.

procedure GetFieldNames(const DatabaseName, TableName: string; List: TStrings);

Description

Call GetFieldNames to retrieve a list of all the columns (fields) in a specified table.

DatabaseName is the name of the database that contains the table. It can be the name of an existing Borland Database Engine (BDE) alias, the name of a TDatabase component’s DatabaseName property, or a fully qualified path name for the location of a Paradox or dBASE table.

TableName is the name of the table for which you want to list the fields.

List is a string list object, created and maintained by the application, into which GetFieldNames adds the names of all fields in the table specified by TableName.


TSession.GetPassword
 VCL Reference

TSession.GetPassword

TSession	See also

Invokes the OnPassword event handler for the session or displays the default password dialog box.

function GetPassword: Boolean;

Description

Call GetPassword to invoke the OnPassword event handler for the session and handle response logic when an application is working with password-protected Paradox files. If an OnPassword event handler is not defined, GetPassword displays the default password dialog box.

An application can use the return value of GetPassword to control program logic. GetPassword returns True if a user chooses OK, or False if the user chooses Cancel.

var

  rslt: Boolean;

begin

  rslt := Session.GetPassword;

  try

    if rslt then

      Table1.Open

    else

      ShowMessage('No password given');

  except

    ShowMessage('Could not open table!');

  end;

  ifnot Table1.Active then

    Application.Terminate;

end;


TSession.GetStoredProcNames
 VCL Reference

TSession.GetStoredProcNames

TSession	See also	Example

Populates a string list with the names of all stored procedures associated with a specified database component that is connected to an SQL database server.

procedure GetStoredProcNames(const DatabaseName: String; List: TStrings);

Description

Call GetStoredProcNames to retrieve a list of all stored procedures for a database component that is attached to an SQL database server. DatabaseName specifies the name of the database for which to retrieve stored procedure names. List is a string list object, created and maintained by the application, into which to return the stored procedure names.

Note:	GetStoredProcNames raises an exception if called on Paradox or dBASE databases.


TSession.GetTableNames
 VCL Reference

TSession.GetTableNames

TSession	See also	Example

Populates a string list with the names of tables associated with a specified database component.

procedure GetTableNames(const DatabaseName, Pattern: String; Extensions, SystemTables: Boolean; List: TStrings);

Description

Call GetTableNames to retrieve a list of the tables associated with a given database. DatabaseName specifies the name of the database from which to retrieve table names.

Pattern specifies a delimiter string that restricts the tables returned to those that match the string. Pattern can include wildcard symbols. Pass an empty Pattern string to match all files not restricted by other criteria.

For searches on Paradox and dBASE, set Extensions to True to include filename extensions as part of the table name. For SQL-based databases, set Extension to False.

Set SystemTables to True for SQL-based databases to return both data tables and the system tables that define the database structure. Set SystemTables to False for Paradox and dBASE tables.

List is a string list object, created and maintained by the application, into which to return the table names.


TSession.IsAlias
 VCL Reference

TSession.IsAlias

TSession	See also	Example

Determines whether or not a string value corresponds to an existing Borland Database Engine (BDE) database alias known to the session.

function IsAlias(const Name: String): Boolean;

Description

Call IsAlias to determine if a string corresponds to the name of an existing BDE alias that can be used by the session. Name is the string to test.

If IsAlias returns True, Name is a valid alias.

Note:	The aliases known to IsAlias depend on the session’s ConfigMode property. If ConfigMode is cmAll, then all aliases are available to the session.


TSession.ModifyAlias
 VCL Reference

TSession.ModifyAlias

TSession	See also	Example

Adds or changes parameters for a Borland Database Engine (BDE) alias.

procedure ModifyAlias(Name: String; List: TStrings);

Description

Call ModifyAlias to change the parameters for a specified BDE alias. Name is the name of the alias to modify. List is a string list object previously populated with parameter values to add or change. An application must create and maintain List.

Populate List with parameter strings before calling ModifyAlias. List need only contain the parameters to change. If ModifyAlias passes a parameter for which a value already exists, the new parameter replaces the existing one. New parameters that are not yet defined for the alias are added to the existing parameters. If List is empty, ModifyAlias does not change any existing parameters.

ModifyAlias changes the alias parameters for the session, but does not change them in the BDE configuration file. To modify a driver in the BDE configuration file, follow the call to ModifyAlias with a call to SaveConfigFile.


TSession.ModifyDriver
 VCL Reference

TSession.ModifyDriver

TSession	See also

Adds or changes parameters for a Borland Database Engine (BDE) driver.

procedure ModifyDriver(Name: String; List: TStrings);

Description

Call ModifyDriver to change the parameters for a specified BDE database driver. Name is the name of the driver to modify. List is a string list object previously populated with parameter values to add or change. An application must create and maintain List.

Populate List with parameter strings before calling ModifyDriver. List need only contain the parameters to change. If ModifyDriver passes a parameter for which a value already exists, the new parameter replaces the existing one. New parameters that are not yet defined for the driver are added to the existing parameters. If List is empty, ModifyDriver does not change any existing parameters.

A session’s ConfigMode property determines whether a driver is local to the session, or is available to all applications in the BDE persistent store as long as any BDE clients are active. To save a driver permanently, call the SaveConfigFile method before ending the session.


TSession.Open
 VCL Reference

TSession.Open

TSession	See also

Starts a session and makes it the current session.

procedure Open;

Description

Call Open to start a session other than the default session in a database application. Open sets Active to True, triggers an OnStartup event handler for the session and initializes the NetFileDir, PrivateDir, and ConfigMode properties.


TSession.OpenDatabase
 VCL Reference

TSession.OpenDatabase

TSession	See also

Opens an existing database, or creates a temporary database component and opens it.

function OpenDatabase(const DatabaseName: String): TDatabase;

Description

Call OpenDatabase to connect to a database for which a persistent database component already exists, or to create a temporary database component and connect to a database. DatabaseName specifies the database to open.

OpenDatabase makes the current session active, then calls FindDatabase to determine if the DatabaseName parameter corresponds to the DatabaseName property of an existing database component. If it does not, OpenDatabase creates a temporary database component, assigning the DatabaseName parameter to the DatabaseName property. Finally, OpenDatabase calls the Open method of the database to connect to a database server, then increments the session’s database reference count by one.


TSession.RemoveAllPasswords
 VCL Reference

TSession.RemoveAllPasswords

TSession	See also

Deletes all passwords previously added to the current session for accessing encrypted Paradox tables.

procedure RemoveAllPasswords;

Description

Call RemoveAllPasswords to delete all current Paradox table passwords associated with the current session. Subsequent attempts to access encrypted Paradox tables fail unless an application first calls AddPassword to reestablish a password.

Note:	Ordinarily an application should call RemoveAllPasswords to remove all session-specific passwords it creates from the Borland Database Engine (BDE) persistent store before terminating.


TSession.RemovePassword
 VCL Reference

TSession.RemovePassword

TSession	See also

Deletes a single password previously added to the current session for accessing an encrypted Paradox table.

procedure RemovePassword(const Password: String);

Description

Call RemovePassword to delete a single Paradox table password associated with the current session from the Borland Database Engine (BDE) persistent store. Subsequent attempts to access the encrypted Paradox table fails unless an application first calls AddPassword to reestablish a password.

Session.AddPassword('secret');

Session.RemovePassword('secret');


TSession.SaveConfigFile
 VCL Reference

TSession.SaveConfigFile

TSession	See also	Example

Writes the current information in the Borland Database Engine (BDE) persistent store from memory to the BDE configuration file on disk.

procedure SaveConfigFile;

Description

Call SaveConfigFile to write any BDE configuration changes currently in memory to the BDE configuration file on disk. When the BDE is first initialized, the current BDE configuration file is read into persistent storage in memory. Applications can read or modify the configuration file in memory, but modification exist only in memory, not on disk.

For example, if an application defines a new BDE alias with AddAlias, the alias exists in memory only for as long as the BDE resides in memory. To store the new alias for later use by all applications that use the BDE, call SaveConfigFile. SaveConfigFile overwrites the disk image of the configuration file with the in-memory image of the persistent configuration file.

Note:	If a session’s ConfigMode property is cmSession, added aliases cannot be saved to the BDE configuration file.


Hierarchy

TObject

TPersistent

TComponent

TSession


TSmallintField
 VCL Reference

TSmallintField

Hierarchy	Properties	Methods	Events 	Using TSmallintField	See also

TSmallintField represents a signed 16-bit integer field in a dataset.

Unit

DB

Description

TSmallintField encapsulates the fundamental behavior common to small-integer fields. Small-integer fields can hold values in the range -32768 to 32767, and are used to hold values that are signed 16-bit whole numbers.

If you use the Fields editor at design time to create a persistent field component for the small integer field, you can access it by name at runtime. When using dynamic field components, you can access the TSmallintField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TSmallintField properties

TSmallintField	Alphabetically	Legend

In TSmallintField

DataSize

Derived from TIntegerField

AsFloat

AsInteger

AsString

AsVariant

MaxValue

MinValue

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSmallintField properties

TSmallintField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TSmallintField.DataSize
 VCL Reference

TSmallintField.DataSize

TSmallintField	See also 	Example

Indicates the amount of memory needed to store the value of a small integer field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a small integer field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For small integer fields, DataSize is always 2. This is the size of 16-bit integer values in the database tables, not the size of the (32-bit) data type used to store and manipulate integer values by TSmallintField.


 VCL Reference

TSmallintField events

TSmallintField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TSmallintField events

TSmallintField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TSmallintField methods

TSmallintField	Alphabetically	Legend

In TSmallintField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSmallintField methods

TSmallintField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TSmallintField.Create
 VCL Reference

TSmallintField.Create

TSmallintField	See also

Creates an instance of a TSmallintField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TSmallintField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftSmallint, MinValue to -32768, and MaxValue to 32767. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TSmallintField. After instantiating a TSmallintField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TSmallintField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TSmallintField with a dataset component by setting its DataSet property.

The example below creates a TSmallintField object for a field named Children accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TSmallintField;

begin

  SQLDataSet1.Close;

  T := TSmallintField.Create(SQLDataSet1);

  T.FieldName := 'Children';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TIntegerField

TSmallintField


TSQLBlobStream
 VCL Reference

TSQLBlobStream

Hierarchy	Properties	Methods 	See also

TSQLBlobStream lets applications read from or write to BLOB fields in a client dataset.

Unit

SqlExpr

Description

Use TSQLBlobStream to read the value of a Binary Large Object (BLOB) field in a dbExpress dataset (TSQLLDataSet, TSQLTable, TSQLQuery, or TSQLStoredProc). BLOB fields are TBlobField objects and descendants of TBlobField such as TGraphicField and TMemoField. BLOB fields in client datasets use client BLOB streams to implement many of their data access properties and methods.

TSQLBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field to read such data by employing the uniform stream interface.

To use an SQL BLOB stream, create an instance of TSQLBlobStream, use the methods of the stream to read the data, and then free the BLOB stream. If you use the same instance of TSQLBlobStream to access data from more than one record, you must call the ReadBlobData method to update the stream when the current record changes.

Warning:	Although TSQLBlobStream inherits several write methods from TMemoryStream, it can’t be used to write data back to the dataset because dbExpress datasets are read-only. Writing to TSQLBlobStream simply alters the in-memory buffer that contains a BLOB field’s data.


 VCL Reference

TSQLBlobStream properties

TSQLBlobStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TSQLBlobStream properties

TSQLBlobStream	By object	Legend

Memory

Position

Size


 VCL Reference

TSQLBlobStream methods

TSQLBlobStream	Alphabetically	Legend

In TSQLBlobStream

Create

Destroy

ReadBlobData

Derived from TMemoryStream

Clear

LoadFromFile

LoadFromStream

SetSize

Write

Derived from TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSQLBlobStream methods

TSQLBlobStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

Read

ReadBlobData

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

SetSize

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TSQLBlobStream.Create
 VCL Reference

TSQLBlobStream.Create

TSQLBlobStream	See also

Creates and initializes an instance of TSQLBlobStream.

constructor Create(Field: TBlobField; Mode: TBlobStreamMode = bmRead);

Description

Call Create to obtain an instance of TSQLBlobStream for reading from a specific TBlobField object in a TCustomSQLDataSet descendant.

Field specifies the BLOB field from which to read data.

The Mode parameter is provided for compatibility with other BLOB stream constructors. However, in TSQLBlobStream, the Mode parameter is ignored because dbExpress datasets are read-only. SQL Blob streams can only be used to read BLOB data.

Create links the TSQLBlobStream to the field object specified by the Field parameter. It then calls ReadBlobData to read the information from the BLOB field into a memory buffer, where it is available for reading.

Warning:	If you write to the SQLBlobStream using inherited methods, you are overwriting the in-memory buffer that is filled by the constructor. This will cause subsequent read operations to provide inaccurate information, because the BLOB stream no longer accurately reflects the contents of the BLOB field.

Instead of calling the TSQLBlobStream constructor, you can also use the dataset’s CreateBlobStream method.


TSQLBlobStream.Destroy
 VCL Reference

TSQLBlobStream.Destroy

TSQLBlobStream	See also

Frees an instance of TSQLBlobStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead call Free. Free verifies that the TBlobStream object is not nil and only then calls Destroy.

Destroy the TSQLBlobStream object by calling Free when it is no longer needed for reading from the BLOB field. BLOB streams should be destroyed when the dataset changes the current record.


TSQLBlobStream.ReadBlobData
 VCL Reference

TSQLBlobStream.ReadBlobData

TSQLBlobStream	See also

Fills the BLOB stream’s memory buffer with the contents of the associated BLOB field.

procedure ReadBlobData;

Description

Call ReadBlobData to refresh the contents of the BLOB stream when the current record in the dataset changes. ReadBlobData reads the contents of a BLOB field into the SQL BLOB stream’s in-memory buffer and sets the Size property to the number of bytes of BLOB data. It then sets Position to 0 so that the stream is ready for you to read the BLOB data.

Note:	It is not necessary to call ReadBlobData when you first create a SQL BLOB stream, because the constructor already performs this task. You need only call ReadBlobData when the current record changes, so that the stream reflects the BLOB data for the new record.


Hierarchy

TObject

TStream

TCustomMemoryStream

TMemoryStream

TSQLBlobStream


TSQLClientDataSet
 VCL Reference

 TSQLClientDataSet

Hierarchy	Properties	Methods	Events	Using TSQLClientDataSet	See also

TSQLClientDataSet uses dbExpress to fetch data that it caches internally in memory.

Unit

DBLocalS

Description

TSQLClientDataSet is a client dataset that uses an internal TSQLDataSet and TDataSetProvider for fetching data and applying updates. It combines the fast access and easy deployment of a unidirectional dataset with a client dataset’s ability to edit and navigate data.

Because it has an internal TSQLDataSet, TSQLClientDataSet uses dbExpress for fast access to database information. Because it is a client dataset, it caches that information in memory and saves any updates made by the application. Because it has an internal dataset provider, it can apply those updates back to the database server. Thus, TSQLClientDataSet works like TClientDataSet when it is connected to a local TSQLDataSet via a provider, except that the source dataset and provider are internal.

TSQLClientDataSet surfaces some of the properties and events of TSQLDataSet and TDataSetProvider so that you can specify the database server from which to fetch data, indicate what data to fetch from that server, influence what information is included in data packets, and provide input on the updating process.

In addition to using the source TSQLDataSet, TSQLClientDataSet can read from and write to a dedicated file on disk. The internal provider and source dataset are not needed for working with file-based data, making TClientDataSet a more suitable choice if you are writing a purely file-based application. However, the ability to work with a file on disk makes TSQLClientDataSet well-suited to “briefcase model” applications.

Note:	TSQLClientDataSet is not recommended for use in master/detail relationships. It can’t optimize the queries it uses for this purpose, resulting in very slow performance.


 VCL Reference

TSQLClientDataSet properties

TSQLClientDataSet	Alphabetically	Legend

In TSQLClientDataSet

CommandText

CommandType

ConnectionName

DBConnection

MasterFields

Derived from TCustomCachedDataSet

Active

Options

UpdateMode

Derived from TCustomClientDataSet

ActiveAggs

Aggregates

AggregatesActive

AppServer

CanModify

ChangeCount

CloneSource

Data

DataSetField

DataSize

DataSource

Delta

DisableStringTrim

FetchOnDemand

FileName

Filter

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterSource

PacketRecords

Params

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

StatusFilter

XMLData

Derived from TDataSet

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

Constraints

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSQLClientDataSet properties

TSQLClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectionName

Constraints

Data

DataSetField

DataSize

DataSource

DBConnection

DefaultFields

Delta

Designer

DesignInfo

DisableStringTrim

Eof

FetchOnDemand

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FileName

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

Modified

Name

ObjectView

Options

Owner

PacketRecords

Params

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

SparseArrays

State

StatusFilter

Tag

UpdateMode

VCLComObject

XMLData


TSQLClientDataSet.CommandText
 VCL Reference

TSQLClientDataSet.CommandText

TSQLClientDataSet	See also

Specifies what data to fetch from the database server.

property CommandText: string;

Description

CommandText is used to get or set the CommandText property of the internal TSQLDataSet. It specifies what data the client dataset wants to receive from the server. Its meaning is determined by the CommandType property:

If CommandType is ctQuery, CommandText is an SQL statement (query) for the database server to execute.

If CommandType is ctTable, CommandText is the name of a table on the database server.

If CommandType is ctStoredProc, CommandText is the name of a stored procedure on the database server.

If CommandText is an SQL statement that includes parameters or the name of a stored procedure that has parameters, use the Params property to supply parameter values. When you set the CommandText property, Params is initialized to reflect the parameters in the query or, if available, the parameters of the stored procedure.

Note:	If the FileName property is set, CommandText is ignored and the data is fetched from the specified file.

Warning:	Do not remove poAllowCommandText from the Options property. If you do, the value of CommandText will be ignored.


TSQLClientDataSet.CommandType
 VCL Reference

TSQLClientDataSet.CommandType

TSQLClientDataSet	See also

Indicates the meaning of the CommandText property.

property CommandType: TSQLCommandType;

Description

CommandType indicates the type of command that is contained in the CommandText property. The following table lists the possible values:

CommandType	Corresponding CommandText

ctQuery	An SQL statement that the internal dataset executes.

ctStoredProc	The name of a stored procedure.

ctTable	The name of a table on the database server. The internal SQL dataset automatically generates a SELECT statement to fetch all the records on all the fields in this table, sorting by the fields listed in the SortFieldNames property.


TSQLClientDataSet.ConnectionName
 VCL Reference

TSQLClientDataSet.ConnectionName

TSQLClientDataSet	See also

Specifies a named connection configuration to use for connecting to the database server.

property ConnectionName: string;

Description

Use ConnectionName to specify a named connection configuration when you are not using an external SQLConnection component. Setting ConnectionName causes TSQLClientDataSet to replace the component specified by the DBConnection property with an internally-created TSQLConnection whose ConnectionName property is the same as this value.

Note:	Using ConnectionName is less efficient than using an external SQLConnection component because you can’t share a single connection among multiple datasets.

The value of ConnectionName must be one of the values listed in the connections.ini file. When you use the ConnectionName property, you must deploy the connections.ini file with your application.


TSQLClientDataSet.DBConnection
 VCL Reference

TSQLClientDataSet.DBConnection

TSQLClientDataSet	See also

Identifies the TSQLConnection component that connects the dataset to a database server.

property DBConnection: TSQLConnection;

Description

Use DBConnection to specify the component that connects this dataset to a database server. TSQLClientDataSet can use either an external TSQLConnection component or, if you set the ConnectionName property instead, an internally-created component. By using an external TSQLConnection component, you can let multiple datasets share a single database connection.


TSQLClientDataSet.MasterFields
 VCL Reference

TSQLClientDataSet.MasterFields

TSQLClientDataSet	See also

Names one or more fields in a master table to link with corresponding fields in this dataset in order to establish a master-detail relationship.

property MasterFields: string;

Description

Use MasterFields, after setting the MasterSource property, to specify the names of one or more fields that establish a detail-master relationship between this dataset and the one specified in MasterSource.

MasterFields is a string containing one or more field names in the master table. Separate field names with semicolons.

Each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this dataset for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two datasets.


 VCL Reference

TSQLClientDataSet events

TSQLClientDataSet	Alphabetically	Legend

Derived from TCustomCachedDataSet

AfterUpdateRecord

BeforeUpdateRecord

OnGetTableName

OnUpdateData

OnUpdateError

Derived from TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLClientDataSet events

TSQLClientDataSet	By object	Legend

AfterApplyUpdates

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterExecute

AfterGetParams

AfterGetRecords

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterRowRequest

AfterScroll

AfterUpdateRecord

BeforeApplyUpdates

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeRowRequest

BeforeScroll

BeforeUpdateRecord

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnGetTableName

OnNewRecord

OnPostError

OnReconcileError

OnUpdateData

OnUpdateError


 VCL Reference

TSQLClientDataSet methods

TSQLClientDataSet	Alphabetically	Legend

In TSQLClientDataSet

CloneCursor

Create

Destroy

GetQuoteChar

Derived from TCustomCachedDataSet

LoadFromFile

Derived from TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CompareBookmarks

ConstraintsDisabled

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromStream

Locate

Lookup

MergeChangeLog

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLClientDataSet methods

TSQLClientDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GetQuoteChar

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TSQLClientDataSet.Create
 VCL Reference

TSQLClientDataSet.Create

TSQLClientDataSet	See also

Creates and initializes an instance of TSQLClientDataSet.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create TSQLClientDataSet at runtime. Datasets added to forms or data modules at design time are created automatically.

AOwner is the component that is responsible for freeing the TSQLClientDataSet instance. If AOwner is nil, the application must explicitly free the dataset.

Create creates the internal source dataset and provider that fetch data from the database server and apply updates back to the database server.


TSQLClientDataSet.Destroy
 VCL Reference

TSQLClientDataSet.Destroy

TSQLClientDataSet	See also

Destroys the instance of TSQLClientDataSet.

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically. If an application creates its own instances of a dataset without assigning an Owner, however, it should call Free, which verifies that the dataset component is not nil before calling Destroy.


TSQLClientDataSet.CloneCursor
 VCL Reference

TSQLClientDataSet.CloneCursor

TCustomClientDataSet	See also

Shares the data belonging to another client dataset.

procedure CloneCursor(Source :TCustomClientDataSet; Reset: Boolean; KeepSettings: Boolean = False); override;

Description

Call CloneCursor to share the data belonging to another SQL client dataset.

Source indicates another client dataset whose data is to be shared. If Source is not another TSQLClientDataSet, CloneCursor raises an exception.

Reset and KeepSettings determine how to set the values of the following properties and events:

Filter, Filtered, FilterOptions, and OnFilterRecord

IndexName

MasterSource and MasterFields

ReadOnly

If Reset and KeepSettings are both False, the values of the properties listed above are all set to match the source dataset.

If Reset is True, the properties listed above are all cleared.

If Reset is False and KeepSettings is True, the properties listed above are not changed. In this case, the application must ensure that existing indexes, providers, and so on are compatible with the cloned data.

After calling CloneCursor, the data for the client dataset is the same as the data for Source. Edits performed by either client dataset are reflected in the data of both datasets.

Note:	Because cloned cursors are shared, changing properties that affect the cursor affect both datasets. For example, setting the ReadOnly property of either dataset will make both datasets read-only.


TSQLClientDataSet.GetQuoteChar
 VCL Reference

TSQLClientDataSet.GetQuoteChar

TCustomSQLDataSet	See also

Returns the character or characters to use in generated SQL statements to enclose quoted strings.

function GetQuoteChar: string;

Description

GetQuoteChar returns the character or characters that delimit quoted strings in SQL statements. This string appears both before and after quoted strings.

This string is used for the automatically-generated statements that apply updates or, when CommanType is ctTable, that fetch data. Use this string in the SQL statements you create for the CommandText property.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet

TCustomCachedDataSet

TSQLClientDataSet


TSQLConnection
 VCL Reference

 TSQLConnection

Hierarchy	Properties	Methods	Events	Using TSQLConnection	See also

TSQLConnection encapsulates a dbExpress connection to a database server.

Unit

SqlExpr

Description

Use TSQLConnection to represent a dbExpress database connection. The connection provided by a single TSQLConnection component can be shared by multiple SQL dataset components through their SQLConnection properties.

TSQLConnection interacts with a dbExpress driver and two .ini files (dbxdrivers.ini and dbxconnections.ini). The first, dbxdrivers.ini, lists the installed driver types (Interbase, Oracle, and so on) and, for each driver, lists the libraries (DLLs) it requires as well as the default settings for all connection parameters. The second file, dbxconnections.ini, lists named sets of connection configurations. Each configuration represents a set of settings for TSQLConnection and describes a particular database connection.

You can use TSQLConnection to choose one of the named configurations in dbxconnections.ini and use it to connect to a database or to define new configurations and add them to dbxconnections.ini. To perform either of these tasks, double-click on a TSQLConnection component and use the Connection Builder.

In addition to describing and establishing database connections, TSQLConnection surfaces properties, methods, and events for controlling server login, managing transactions, and fetching metadata from the server.


 VCL Reference

TSQLConnection properties

TSQLConnection	Alphabetically	Legend

In TSQLConnection

ActiveStatements

AutoClone

Connected

ConnectionName

ConnectionState

DataSets

DriverName

GetDriverFunc

InTransaction

KeepConnection

LibraryName

LoadParamsOnConnect

LocaleCode

MaxStmtsPerConn

MetaData

Params

ParamsLoaded

SQLConnection

SQLHourGlass

TableScope

TraceCallbackEvent

TransactionsSupported

VendorLib

Derived from TCustomConnection

DataSetCount

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLConnection properties

TSQLConnection	By object	Legend

ActiveStatements

AutoClone

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

ConnectionName

ConnectionState

DataSetCount

DataSets

DesignInfo

DriverName

GetDriverFunc

InTransaction

KeepConnection

LibraryName

LoadParamsOnConnect

LocaleCode

LoginPrompt

MaxStmtsPerConn

MetaData

Name

Owner

Params

ParamsLoaded

SQLConnection

SQLHourGlass

TableScope

Tag

TraceCallbackEvent

TransactionsSupported

VCLComObject

VendorLib


TSQLConnection.ActiveStatements
 VCL Reference

TSQLConnection.ActiveStatements

TSQLConnection	See also

Indicates the number of statements currently active with the database server.

property ActiveStatements: LongWord;

Description

Read ActiveStatements to determine how many statements are currently executing using the database connection. While a dataset is prepared, it creates an active statement that lasts until the dataset is unprepared. When you set a dataset’s Prepared property to True, the statement remains active until you change the Prepared property to False. When the Prepared property is False, the dataset implicitly prepares its statement when you open the dataset, and the statement remains active until you close the dataset. In addition, executing an SQL statement (for example, using the Execute method) creates an active statement temporarily, until the statement finishes executing.

Use ActiveStatements to check whether an application has reached the server-imposed limit on the number of active statements allowed to a connection (the MaxStmtsPerConn property). This is especially important if AutoClone is False, because if you exceed MaxStmtsPerConn when AutoClone is False, the SQL connection raises an exception. To avoid exceeding the server-imposed limit, do not open any datasets or execute SQL statements when ActiveStatements is the same as MaxStmtsPerConn (unless MaxStmtsPerConn is 0).


TSQLConnection.AutoClone
 VCL Reference

TSQLConnection.AutoClone

TSQLConnection	See also

Specifies whether the SQL connection automatically clones database connections when they are needed.

property AutoClone: Boolean;

Description

AutoClone controls whether the TSQLConnection component automatically creates duplicate database connections when the number of statements allowed by the database server is exceeded. By default, AutoClone is True, meaning that when the ActiveStatements property is the same as MaxStmtsPerConn, trying to execute another statement (open another dataset or call the Execute method) causes TSQLConnection to open a secondary (cloned) connection. The result behaves just like a connection to a server that does not limit the number of statements, except that it consumes more resources (for the additional, cloned connections).

Change AutoClone to False to prevent TSQLConnection from cloning the database connection when the application attempts to exceed the maximum number of statements. When AutoClone is False, attempts to exceed MaxStmtsPerConn result in an exception.

Tip:	When AutoClone is False, you can check the ActiveStatements property to ensure that you do not exceed the server-imposed limit on the number of statements. If you are about to exceed that limit, you can explicitly call CloneConnection to clone the connection yourself.


TSQLConnection.Connected
 VCL Reference

TSQLConnection.Connected

TSQLConnection	See also	Example

Specifies whether the connection is active.

property Connected: Boolean;

Description

Set Connected to True to establish a connection to the database server. When a dataset that uses the TSQLConnection object is activated, it automatically sets Connected to True. Set Connected to False to close a connection.

Setting Connected to True generates a BeforeConnect event, establishes the connection, and generates an AfterConnect event. In addition, when setting Connected to True, TSQLConnection may display a login dialog, depending on the value of LoginPrompt.

Setting Connected to False generates a BeforeDisconnect event, drops the connection, and generates an AfterDisconnect event.


TSQLConnection.ConnectionName
 VCL Reference

TSQLConnection.ConnectionName

TSQLConnection	See also	Example

Names the connection configuration.

property ConnectionName: string;

Description

Set ConnectionName to use a named connection configuration. Setting ConnectionName automatically sets the DriverName and Params properties to reflect the driver and connection parameters stored under that name in the dbxconnections.ini file.

Tip:	You can define new connection configurations using the Connection Editor. To launch the Connection Editor, double-click on the TSQLConnection component.

If you are using a different dbxconnections.ini file at design time than the one used at runtime, you can force the configuration to reload at runtime by setting the LoadParamsOnConnect property or calling LoadParamsFromIniFile. In most cases, however, this is unnecessary, because the DriverName and Params property settings that are loaded when you set ConnectionName are saved in the form file. In fact, unless you set LoadParamsOnConnect or call LoadParamsFromIniFile, you do not need to deploy the dbxconnections.ini file with your application even if you are using named connections.


TSQLConnection.ConnectionState
 VCL Reference

TSQLConnection.ConnectionState

TSQLConnection	See also

Indicates the current state of the TSQLConnection object.

type

  TConnectionState = (csStateClosed, csStateOpen, csStateConnecting, csStateExecuting, csStateFetching, csStateDisconnecting);

property ConnectionState: TConnectionState;

Description

Read ConnectionState at runtime to determine the activity being performed, if any, by the connection at a specific point in time. Use ConnectionState to coordinate the activities of the connection component, so that you do not start one activity while it is currently engaged in another.

ConnectionState can have any of the following values:

Value	Meaning

csStateClosed	The connection is closed. (The Connected property is False)

csStateOpen	The connection is open. (The Connected property is True)

csStateConnecting	The component is establishing a connection but has not completed the process.

csStateExecuting	The component has passed an SQL command to the server and it is currently executing.

csStateFetching	The component is fetching database information from the server.

csStateDisconnecting	The component is terminating a connection but has not completed the process.


TSQLConnection.DataSets
 VCL Reference

TSQLConnection.DataSets

TSQLConnection	See also	Example

Lists all active datasets for the connection component.

property DataSets[Index: Integer]: TCustomSQLDataSet;

Description

Use DataSets to access active datasets associated with a connection component. An active dataset is one that is currently open.

The Index parameter ranges between 0 and DataSetCount.

The value of DataSets changes as the datasets that use this TSQLConnection component open and close.

Note:	If a TSQLClientDataSet uses the connection component to connect to a database server, DataSets lists the internal dataset that the client dataset creates to access data, not the client dataset itself.


TSQLConnection.DriverName
 VCL Reference

TSQLConnection.DriverName

TSQLConnection	See also

Specifies the database driver associated with the SQL connection.

property DriverName: string;

Description

If you are not using named connections, set DriverName to the name of an installed dbExpress driver such as INTERBASE, MYSQL, ORACLE, or DB2. Installed drivers are listed in the dbxdrivers.ini file, and their names can be retrieved using the GetDriverNames function.

If you are using named connections, the DriverName property is automatically set when you set the ConnectionName property.

When you set DriverName, TSQLConnection automatically sets the LibraryName and VendorLib properties to the names of the libraries (DLLs) that implement the specified driver.


TSQLConnection.GetDriverFunc
 VCL Reference

TSQLConnection.GetDriverFunc

TSQLConnection	See also

Specifies the function that returns the top-level dbExpress driver.

property GetDriverFunc: string;

Description

GetDriverFunc is the name of a function in the dbExpress driver specified by the LibraryName property. The specified function returns the top-level dbExpress interface. Typically, this property is set to the function name that is stored in the dbxdrivers.ini file.

Note:	The GetDriverFunc, LibraryName, and VenderLib properties all reflect the values in the dbxdrivers.ini file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers.ini file.


TSQLConnection.InTransaction
 VCL Reference

TSQLConnection.InTransaction

TSQLConnection	See also	Example

Indicates whether a transaction is in progress.

property InTransaction: Boolean;

Description

Read InTransaction at runtime to ascertain whether a transaction is currently active for the SQL connection component. If the connection component is currently in a transaction, all communication with the server that passes through the connection is enlisted in that transaction.

InTransaction is True if there is an active transaction. If no transaction is active, InTransaction is False.

A transaction begins when the application calls StartTransaction and lasts until the application calls Commit or Rollback. If there are multiple transactions, InTransaction remains True until all transactions are either committed or rolled back.


TSQLConnection.KeepConnection
 VCL Reference

TSQLConnection.KeepConnection

TSQLConnection	See also

Specifies whether the connection stays active when no datasets are open.

property KeepConnection: Boolean;

Description

Use KeepConnection to specify whether TSQLConnection maintains an open database connection even if no associated dataset components are currently active. When KeepConnection is True (the default) the connection is maintained. For connections to remote database servers, or in applications that frequently open and close datasets, set KeepConnection to True to reduce network traffic, speed up applications, and avoid logging in to the server each time the connection is reestablished.

When KeepConnection is False a connection is dropped when there are no open datasets. Dropping a connection releases system resources allocated to the connection, but if a dataset is later opened that uses the database, the connection must be reestablished and initialized.


TSQLConnection.LibraryName
 VCL Reference

TSQLConnection.LibraryName

TSQLConnection	See also

Specifies the dbExpress driver that TSQLConnection uses to establish a connection.

property LibraryName: string;

Description

LibraryName is the dbExpress library associated with the driver specified by DriverName. Most applications do not need to use LibraryName directly, because this property is set automatically when the DriverName property is set.

Note:	The association between a dbExpress library and a driver name is stored in the dbxdrivers.ini file when you install the dbExpress driver.

The file named by this property is the only dbExpress file that must be deployed with your application.

Note:	The LibraryName, GetDriverFunc, and VenderLib properties all reflect the values in the dbxdrivers.ini file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers.ini file.


TSQLConnection.LoadParamsOnConnect
 VCL Reference

TSQLConnection.LoadParamsOnConnect

TSQLConnection	See also

Specifies whether the TSQLConnection component loads the configuration named by ConnectionName immediately before connecting to the server.

property LoadParamsOnConnect: Boolean;

Description

Set LoadParamsOnConnect to True if you want the TSQLConnection object to load the connection configuration (DriverName and Params properties) associated with ConnectionName at runtime. Typically, this is unnecessary because when you set ConnectionName at design time, the DriverName and Params properties are automatically set as well. However, if you use a different dbxconnections.ini file at runtime, or if you temporarily override the DriverName or any connection parameter values at design time, setting LoadParamsOnConnect to True ensures that at runtime the connection is established using the configuration associated with ConnectionName in the dbxconnections.ini file.

Note:	If you set LoadParamsOnConnect to True, you must be sure to deploy the dbxconnections.ini file with your application. When you rely on the design-time associations, dbxconnections.ini is not needed at runtime.

Warning:	If you set LoadParamsOnConnect to True, you must specify a valid connection name as the value for ConnectionName.


TSQLConnection.LocaleCode
 VCL Reference

TSQLConnection.LocaleCode

TSQLConnection	See also

Identifies the locale that is used for sorting items from datasets that use this connection.

property LocaleCode: TLocaleCode;

Description

LocaleCode represents the locale that client datasets use to sort strings when they are provided in fields from a dataset associated with this connection. By default, this value is 0, which signals that strings should be sorted without regard to a locale. Changing LocaleCode can affect performance, because sorting is slower when it must take locale into account. Therefore, it is recommended that you only change LocaleCode if the data is known to contain extended characters that will affect the sort order.

Note:	Locale codes are treated as connection parameters: they are stored in the dbxconnections.ini file along with the other parameters, and appear in the Params property list. Changes to this property change the entry in the Params property list.


TSQLConnection.MaxStmtsPerConn
 VCL Reference

TSQLConnection.MaxStmtsPerConn

TSQLConnection	See also

Indicates the server limit on the number of statements supported by a single database connection.

property MaxStmtsPerConn: LongWord;

Description

Read MaxStmtsPerConn when a connection is active to determine whether the database server imposes a limit on the number of statements that can be executed using the current connection. When MaxStmtsPerConn is 0, the server imposes no restrictions: a single database connection can be used to fetch multiple datasets and execute statements while there are active datasets. When MaxStmtsPerConn is greater than 0, the database server limits the number of statements that can execute. The server allows only MaxStmtsPerConn datasets to be opened using a single connection, and when that number of datasets are open, no more statements can be executed (for example, using the Execute method).

By default, when MaxStmtsPerConn is greater than 0, TSQLConnection clones the database connection when this server-imposed limit is reached. For example, if MaxStmtsPerConn is 1, then trying to open a second dataset using the same TSQLConnection component causes TSQLConnection to establish a second database connection for the second dataset. If AutoClone is False, however, TSQLConnection does not clone connections, but rather generates an exception when the application tries to exceed MaxStmtsPerConn.

Note:	The value of MaxStmtsPerConn is only valid when the Connected property is True.


TSQLConnection.MetaData
 VCL Reference

TSQLConnection.MetaData

TSQLConnection	See also

Provides an interface to the dbExpress object that supplies server metadata.

property MetaData: ISQLMetaData;

Description

Typically, applications do not use the MetaData property to work directly with the dbExpress MetaData interface. Instead, they use one of methods that assembles schema information into a list (GetFieldNames, GetIndexNames, GetProcedureNames, GetProcedureParams, or GetTableNames). When more detailed metadata is required, you can also use the SQL dataset’s SetSchemaInfo method to populate an SQL dataset with metadata.


TSQLConnection.Params
 VCL Reference

TSQLConnection.Params

TSQLConnection	See also	Example

Lists the connection parameters.

property Params: TStrings;

Description

Params is a TStrings object listing the connection parameters. Each entry in the string list has the form

Name=Value

where Name is the name of the parameter and Value is its value. If you are using named connection configurations (the ConnectionName property), the values for each parameter are loaded from the dbxconnections.ini file when you set ConnectName.

At design time, you can set parameter values using the string list editor by double clicking on the Params property in the Object Inspector. Any new values you set override the values loaded when you set ConnectionName unless you load the connection configuration at runtime using LoadParamsFromIniFile or LoadParamsOnConnect.

The particular parameters that appear depend on the database server. The Params property is initialized to include a string for each parameter when you set the DriverName property. One particular parameter, Database, is required for all servers. Its value depends on the server you are using. For example, with InterBase, Database is the name of the .gdb file, while with MySQL, it is the database name that was assigned by the CREATE DATABASE command.

Other typical parameters include HostName (the machine name or IP address of where the server is located), and TransIsolation (the degree to which transactions are isolated from changes made by other users of the database).


TSQLConnection.ParamsLoaded
 VCL Reference

TSQLConnection.ParamsLoaded

TSQLConnection	See also

Indicates when parameter values have been loaded from dbxconnections.ini.

property ParamsLoaded: Boolean;

Description

Do not use the ParamsLoaded property. It is used internally by the Connections Editor to keep track of when parameter values have been loaded from the dbxconnections.ini file.


TSQLConnection.SQLConnection
 VCL Reference

TSQLConnection.SQLConnection

TSQLConnection

Provides an interface to the dbExpress object that represents a connection.

property SQLConnection: ISQLConnection;

Description

SQLConnection is an interface to the underlying dbExpress object for a database connection. Typically, you would not need to interact directly with this dbExpress object because all of its methods are surfaced, directly or indirectly, in the implementation of TSQLConnection.


TSQLConnection.SQLHourGlass
 VCL Reference

TSQLConnection.SQLHourGlass

TSQLConnection	See also

Specifies whether the cursor should change to crSQLWait during lengthy operations.

property SQLHourGlass: Boolean;

Description

Set SQLHourGlass to true to specify that the cursor should indicate when the connection is performing a potentially lengthy operation. Such operations include

Establishing a connection to the database server.

Fetching metadata from the database server.

Executing a statement using the Execute method.

When SQLHourGlass is false, the cursor is not changed when the SQL connection performs such operations.


TSQLConnection.TableScope
 VCL Reference

TSQLConnection.TableScope

TSQLConnection	See also

Indicates what type of tables are returned when fetching schema information about tables.

type

  TTableScope = (tsSynonym, tsSysTable, tsTable, tsView);

  TTableScopes = set of TTableScope;

property TableScope: TTableScopes;

  TTableScope = (tsSynonym, tsSysTable, tsTable, tsView);

  TTableScopes = set of TTableScope;

Description

Set TableScope to determine the type of tables listed by the GetTableNames method or that populate an SQL dataset after calling its SetSchemaInfo method with a parameter of stTables. TableScope lets you request information about a combination of table types. By default, TableScope requests only ordinary tables and views (tsTable and tsView).

The following table lists the values that can be included in TableScope:

Value	Meaning

tsSynonym	synonyms

tsSysTable	system tables

tsTable	ordinary tables

tsView	views

Note:	TableScope only affects GetTableNames when the SystemTables parameter is False and only affects SetSchemaInfo when the SchemaType parameter is stTables. If an application calls GetTablesNames with SystemTables set to True, or calls SetSchemaInfo with SchemaType set to stSysTables, system tables, and only system tables are returned, regardless of the value of TableScope.


TSQLConnection.TraceCallbackEvent
 VCL Reference

TSQLConnection.TraceCallbackEvent

TSQLConnection	See also

Provides access to the callback function that executes for every SQL command passed to or from the server.

property TraceCallbackEvent: TSQLCallbackEvent;

Description

Read TraceCallbackEvent to determine whether the SQL connection is monitoring communication between the application and the SQL server to which it connects. For example, if the application uses a TSQLMonitor component, that component assigns a value to TraceCallbackEvent, which it uses to monitor SQL commands. Changing the value of the callback would then interfere with the operation of the TSQLMonitor component.

TraceCallbackEvent is a read-only property. To assign a callback for monitoring SQL commands, use the SetTraceCallbackEvent method.


TSQLConnection.TransactionsSupported
 VCL Reference

TSQLConnection.TransactionsSupported

TSQLConnection	See also

Indicates whether the database server supports transactions.

property TransactionsSupported: LongBool;

Description

Read TransactionsSupported at runtime to ascertain whether the database server supports transactions. If TransactionsSupported is False, then the StartTransaction, Commit, and Rollback methods do nothing. If TransactionsSupported is True, you can use the SQL connection component to manage transactions.


TSQLConnection.VendorLib
 VCL Reference

TSQLConnection.VendorLib

TSQLConnection	See also

Specifies the client software library (DLL) supplied by the database vendor.

property VendorLib: string;

Description

VendorLib is the library supplied by the database vendor to support client-side use of the database. Most applications do not need to use VendorLib directly, because this property is set automatically when the DriverName property is set.

Note:	The association between a vendor library and a driver name is stored in the dbxdrivers.ini file when you install the associated dbExpress driver.

The file named by this property must be running on the same system as your application when it is deployed. Typically, it is installed when the database is installed rather than with your application.

Note:	The VendorLib, LibraryName, and GetDriverFunc properties all reflect the values in the dbxdrivers.ini file. Because these property values are published (stored with the connection component), it is possible to deploy an application without deploying the dbxdrivers.ini file.


 VCL Reference

TSQLConnection events

TSQLConnection	Alphabetically	Legend

In TSQLConnection

OnLogin

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect


 VCL Reference

TSQLConnection events

TSQLConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


TSQLConnection.OnLogin
 VCL Reference

TSQLConnection.OnLogin

TSQLConnection	See also

Occurs after the BeforeConnect event and before a connection is established.

type TSQLConnectionLoginEvent = procedure(Database: TSQLConnection; LoginParams: TStrings) of object;

property OnLogin: TSQLConnectionLoginEvent;

Description

Use the OnLogin event to assign values to the User_Name, Password, and Database parameters immediately before TSQLConnection attempts to connect to the database server. OnLogin only occurs if the LoginPrompt property is True. If LoginPrompt is True but there is no OnLogin event handler, a default login dialog appears in which the user can enter a user name and password. If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails.

Database is the TSQLConnection component that is about to connect to the server.

LoginParams is a subset of the Params property that contains parameters for user name, password, and Database.


 VCL Reference

TSQLConnection methods

TSQLConnection	Alphabetically	Legend

In TSQLConnection

CloneConnection

CloseDataSets

Commit

Create

Destroy

Execute

ExecuteDirect

GetFieldNames

GetIndexNames

GetProcedureNames

GetProcedureParams

GetTableNames

LoadParamsFromIniFile

Rollback

SetTraceCallbackEvent

StartTransaction

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLConnection methods

TSQLConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloneConnection

Close

CloseDataSets

Commit

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

ExecuteDirect

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetFieldNames

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetProcedureNames

GetProcedureParams

GetTableNames

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LoadParamsFromIniFile

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Rollback

SafeCallException

SetSubComponent

SetTraceCallbackEvent

StartTransaction

UpdateAction


TSQLConnection.CloneConnection
 VCL Reference

TSQLConnection.CloneConnection

TSQLConnection	See also

Returns a copy of the SQL connection object.

function CloneConnection: TSQLConnection;

Description

Call CloneConnection to create a duplicate of this SQLConnection object. CloneConnection instantiates a new TSQLConnection object and assigns its properties to match those of this SQLConnection object.

The returned SQLConnection is owned by this TSQLConnection. That is, this SQL connection component frees the clone from its own destructor.


TSQLConnection.CloseDataSets
 VCL Reference

TSQLConnection.CloseDataSets

TSQLConnection	See also

Closes all datasets associated with the SQL connection object component without disconnecting from the database.

procedure CloseDataSets;

Description

Call CloseDataSets to close all active datasets without disconnecting from the database server. Ordinarily, when an application calls Close, all datasets are closed, and the connection to the database server is dropped. Calling CloseDataSets instead of Close ensures that an application can close all active datasets without having to reconnect to the database server at a later time.


TSQLConnection.Commit
 VCL Reference

TSQLConnection.Commit

TSQLConnection	See also	Example

Commits an open transaction.

procedure Commit(TransDesc: TTransactionDesc);

Description

Call Commit to save any changes made during the transaction described by TransDesc and to end that transaction.

TransDesc is the transaction descriptor supplied to the StartTransaction method when starting the transaction.

If the specified transaction is the only current transaction, Commit sets the InTransaction property to False after committing the transaction.


TSQLConnection.Create
 VCL Reference

TSQLConnection.Create

TSQLConnection	See also

Creates and initializes an instance TSQLConnection.

constructor Create(AOwner: TComponent); override;

Description

Use Create to instantiate TSQLConnection at runtime. SQL connections added to forms or data modules at design time are created automatically.

The AOwner parameter is the component, typically a form or data module, that is responsible for freeing the SQL connection.


TSQLConnection.Destroy
 VCL Reference

TSQLConnection.Destroy

TSQLConnection	See also

Destroys the SQL connection object.

destructor Destroy; override;

Description

To free a TSQLConnection instance, do not call Destroy. Instead, call Free. Free verifies that the ADO connection is not nil, and only then calls Destroy.

There is no need to explicitly free instances of TSQLConnection that were created with an Owner.


TSQLConnection.Execute
 VCL Reference

TSQLConnection.Execute

TSQLConnection	See also	Example

Executes an SQL command on the server.

function Execute(const SQL: string; Params: TParams; ResultSet:Pointer=nil): Integer;

Description

Call Execute to execute a single command on the server without the overhead of using an SQL dataset. Execute is especially useful for statements that do not return a result set such as data definition language (DDL) statements.

SQL is the command to execute.

Params is a TParams object that contains any parameters used by the SQL statement. Parameter binding is by index only (not by name), so the order of parameters is important and the order of the TParam objects in Params corresponds to the order of the parameters in the SQL statement. Use properties and methods of TParams to create a TParams object, add TParam objects for each parameter, and assign parameter properties such as datatype and value. If the SQL statement does not include any parameters, pass a nil value for Params.

ResultSet is a pointer to a variable of type TCustomSQLDataSet. If the SQL statement returns a cursor, Execute creates a new TCustomSQLDataSet instance and populates it with the result set. The new TCustomSQLDataSet reference is returned as the value to which ResultSet points. If the SQL statement does not return a result set, pass a nil value for ResultSet.

Execute returns the number of records affected by executing the SQL statement.

Tip:	If the SQL statement does not include any parameters, you can use the ExecuteDirect method instead.


TSQLConnection.ExecuteDirect
 VCL Reference

TSQLConnection.ExecuteDirect

TSQLConnection	See also

Executes an SQL command that does not include parameters.

function ExecuteDirect(const SQL: string ): LongWord;

Description

Call ExecuteDirect to execute a single parameterless command on the server without the overhead of using an SQL dataset or preparing the statement before it executes. If the statement ordinarily returns a cursor, ExecuteDirect executes the statement, but does not return a cursor.

SQL is the command to execute.

ExecuteDirect returns 0 if the command was successfully executed. Otherwise, it returns a dbExpress error code.

Note:	To execute an SQL statement that includes parameters or that returns a cursor, use the Execute method instead.


TSQLConnection.GetFieldNames
 VCL Reference

TSQLConnection.GetFieldNames

TSQLConnection	See also

Populates a string list with the names of fields in a table.

procedure GetFieldNames(const TableName: String; List: TStrings);

Description

Call GetFieldNames to retrieve a list of fields in a table.

TableName names the table whose field names you want added to the list.

List is a TStrings descendant that receives the field names. Any existing strings are deleted from the list before GetFieldNames adds the names of all the fields in TableName.

For example, the following line fills a list box with the names of all fields in the Employee table:

SQLConnection1.GetFieldNames('Employee', ListBox1.Items);


TSQLConnection.GetIndexNames
 VCL Reference

TSQLConnection.GetIndexNames

TSQLConnection	See also

Populates a string list with the names of indexes on a table.

procedure GetIndexNames(const TableName: string; List: TStrings);

Description

Call GetIndexNames to retrieve a list of the indexes defined for a table.

List is a TStrings descendant that receives the index names. Any existing strings are deleted from the list before GetIndexNames adds the names of all the indexes on TableName.

TableName names the table whose indexes you want added to the list.

For example, the following line fills a list box with the names of all indexes on the Employee table:

SQLConnection1.GetIndexNames('Employee', ListBox1.Items);


TSQLConnection.GetProcedureNames
 VCL Reference

TSQLConnection.GetProcedureNames

TSQLConnection	See also

Populates a string list with the names of stored procedures in the database.

procedure GetProcedureNames(List: TStrings);

Description

Call GetProcedureNames to retrieve a list of stored procedures in the associated database. List is a TStrings descendant that receives the stored procedure names. Any existing strings are deleted from the list before GetProcedureNames adds the names of all stored procedures in the database.

For example, the following line fills a list box with the names of all stored procedures in the database:

SQLConnection1.GetProcedureNames(ListBox1.Items);


TSQLConnection.GetProcedureParams
 VCL Reference

TSQLConnection.GetProcedureParams

TSQLConnection	See also	Example

Populates a list with parameter descriptors for the parameters in a stored procedure.

procedure GetProcedureParams(ProcedureName: String; List: TList);

Description

Call GetProcedureParams to retrieve information about the parameters of a specified stored procedure.

ProcedureName is the name of the stored procedure for whose parameters you want descriptions.

List is a TList object that receives the parameter descriptions. It should be an empty list on entry. For each parameter, GetProcedureParams adds a pointer to an SPParamDescrecord. Each SPParamDesc record describes a parameter of a specified stored procedure, including its name, index, parameter type, field type, and so on. You are responsible for freeing the individual records that GetProcedureParams dynamically allocates. (You can use FreeProcParams to free all the entries and the list object as well).

Note:	You can convert the list of SPParamDesc structures to the more familiar TParams object by calling the global LoadParamListItems procedure.


TSQLConnection.GetTableNames
 VCL Reference

TSQLConnection.GetTableNames

TSQLConnection	See also

Populates a string list with the names of tables in the database.

procedure GetTableNames(List: TStrings; SystemTables: Boolean = False);

Description

Call GetTableNames to retrieve a list of tables in the associated database.

List is a TStrings descendant that receives the table names. Any existing strings are deleted from the list before GetTableNames adds the names of all tables in the database.

SystemTables specifies whether the list of table names should include only the database’s system tables. If SystemTables is True, only the system tables are added to List. If SystemTables is False, the list is filled with any tables that match the criteria specified by the TableScope property.

For example, the following line fills a list box with the names of all data tables in the database:

SQLConnection1.GetTableNames(ListBox1.Items, False);


TSQLConnection.LoadParamsFromIniFile
 VCL Reference

TSQLConnection.LoadParamsFromIniFile

TSQLConnection	See also

Sets the DriverName and Params properties to the values associated with the ConnectionName property.

procedure LoadParamsFromIniFile( AFileName : String = '' );

Description

Call LoadParamsFromIniFile to ensure that the DriverName and Params properties accurately reflect the connection configuration for the ConnectionName property that is stored in the file specified by the AFileName parameter. If the AFileName parameter is omitted, LoadParamsFromIniFile uses the dbxconnections.ini file. Otherwise, it is a fully-qualified path name to a file that has the same format as the dbxconnections.ini file. Typically, this file is created by making a copy of the dbxconnections.ini file under a different name.

In most cases, it is unnecessary to load connection configurations at runtime because when you set ConnectionName at design time, the DriverName and Params properties are automatically set as well. However, LoadParamsFromIniFile lets you use a customized set of connection configurations at runtime that differ from those stored in the dbxconnections.ini file, or to temporarily override the DriverName or connection parameter values at design time and then reestablish the defaults at runtime.

Note:	Do not set the LoadParamsOnConnect property to True if your application calls LoadParamsFromIniFile and specifies an alternate connections file. When LoadParamsOnConnect is True, it loads the connection configuration from the dbxconnections.ini file immediately before opening a connection, overriding any values loaded by this method.


TSQLConnection.Rollback
 VCL Reference

TSQLConnection.Rollback

TSQLConnection	See also	Example

Cancels all updates, insertions, and deletions for a specified transaction and ends the transaction.

procedure Rollback(TransDesc: TTransactionDesc);

Description

Call Rollback to cancel any changes made during the transaction described by TransDesc and to end it.

TransDesc is the transaction descriptor supplied to the StartTransaction method when starting the transaction.

If the specified transaction is the only current transaction, Rollback sets the InTransaction property to False after canceling the transaction.


TSQLConnection.SetTraceCallbackEvent
 VCL Reference

TSQLConnection.SetTraceCallbackEvent

TSQLConnection	See also

Associates the SQL connection with a callback function that executes for every SQL command passed to or from the server.

procedure SetTraceCallbackEvent(Event: TSQLCallbackEvent; IClientInfo: Integer);

Description

Call SetTraceCallbackEvent to assign a callback that responds every time an SQL command passes between the associated dbExpress driver and the database server. The callback function becomes the value of the TraceCallbackEvent property.

Event is the callback function that is called for every message that passes between the dbExpress driver and the SQL server.

IClientInfo is a user-defined value that is passed as part of the SQLTraceDesc record that is the value of the callback’s CBInfo parameter.

Tip:	Read the TraceCallbackEvent property to determine whether a callback is already assigned before calling the SetTraceCallbackEvent method. That way, you can avoid interfering with an existing callback when assigning a new one.


TSQLConnection.StartTransaction
 VCL Reference

TSQLConnection.StartTransaction

TSQLConnection	See also	Example

Initiates a new transaction in the associated database.

procedure StartTransaction(TransDesc: TTransactionDesc);

Description

Call StartTransaction to start a new transaction against a database server that supports transactions. (MySQL servers do not support transactions.) You can check the TransactionsSupported property to determine whether the server supports transactions. If the server does not support transactions, StartTransaction does nothing.

TransDesc describes the transaction you are starting. It lets you specify

A user-defined transaction identifier. If the server supports nested or overlapped transactions, you can initiate multiple transactions by calling StartTransaction and providing each transaction with its own unique identifier.

The transaction isolation level. This indicates the degree to which this transaction can “see” changes made by other transactions.

If the transaction is successfully started, StartTransaction sets the InTransaction property to True.

Updates, insertions, and deletions that take place after a call to StartTransaction are enlisted in that transaction until another overlapping transaction is started or until the application calls Commit to save the changes or Rollback to cancel them.

Tip:	If the server does not support multiple transactions, check the status of the InTransaction property to be sure that another transaction is not already in progress.

Tip:	When working with overlapped transactions, you can indicate the transaction to which a dataset belongs by setting its TransactionLevel property to the transaction identifier you assign in this method.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TSQLConnection


TSQLDataLink
 VCL Reference

TSQLDataLink

Hierarchy	Properties	Methods	See also

TSQLDataLink allows a unidirectional dataset act as the detail in a master/detail relationship.

Unit

SqlExpr

Description

SQL datasets use TSQLDataLink to coordinate with another (master) dataset when they represent the detail records for that other dataset. TSQLDataLink passes on data events to the data source that owns it. It is also used to implement the DataSource or MasterSource property of the dataset that owns it.

Do not confuse the dataset that is the value of the TSQLDataLink object’s DataSet property with the dataset that uses TSQLDataLink to link to a master dataset. The DataSet property is the master dataset, while the dataset that owns the TSQLDataLink object is the detail set.


 VCL Reference

TSQLDataLink properties

TSQLDataLink	Alphabetically	Legend

In TSQLDataLink

DetailDataSet

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TSQLDataLink properties

TSQLDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

ReadOnly

RecordCount


TSQLDataLink.DetailDataSet
 VCL Reference

TSQLDataLink.DetailDataSet

TSQLDataLink

Indicates the detail dataset in the master/detail relationship.

property DetailDataSet: TDataSet;

Description

Read DetailDataSet to access the detail dataset. This is the SQL dataset that includes the SQL data link as a member to connect it to a master dataset.


 VCL Reference

TSQLDataLink methods

TSQLDataLink	Alphabetically	Legend

In TSQLDataLink

ActiveChanged

CheckBrowseMode

Create

DataSetChanged

GetDetailDataSet

RecordChanged

Derived from TDataLink

Destroy

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSQLDataLink methods

TSQLDataLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataSetChanged

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

Free

FreeInstance

GetDetailDataSet

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RecordChanged

SafeCallException

UpdateAction

UpdateRecord


TSQLDataLink.ActiveChanged
 VCL Reference

TSQLDataLink.ActiveChanged

TSQLDataLink	See also

Refreshes the parameter values of the detail dataset and re-executes it.

procedure ActiveChanged; override;

Description

SQL datasets establish master/detail relationships by supplying parameter values from the master dataset. ActiveChanged updates these parameter values on the detail dataset to reflect the current values of the master dataset and then refreshes the dataset so that it is populated with the new detail set.


TSQLDataLink.CheckBrowseMode
 VCL Reference

TSQLDataLink.CheckBrowseMode

TSQLDataLink	See also

Informs the dataset that owns the TSQLDataLink object when the current record in the source dataset is about to change.

procedure CheckBrowseMode; override;

Description

Applications can not call the protected CheckBrowseMode procedure. CheckBrowseMode is called immediately before the current record in the source dataset changes. It calls the CheckBrowseMode method of the dataset that owns the TSQLDataLink object.


TSQLDataLink.Create
 VCL Reference

TSQLDataLink.Create

TSQLDataLink	See also

Creates an instance of TSQLDataLink.

constructor Create(ADataSet: TCustomSQLDataSet);

Description

Do not create instances of TSQLDataLink. It is instantiated by the SQL dataset that uses it to link to a master dataset. The ADataSet parameter is the dataset that creates and owns this SQL datalink. It becomes the value of the DetailDataSet property.


TSQLDataLink.DataSetChanged
 VCL Reference

TSQLDataLink.DataSetChanged

TSQLDataLink	See also

Responds to changes in the dataset.

procedure DataSetChanged; override;

Description

DataSetChanged responds to changes to the contents of the dataset by updating the DetailDataSet property of the dataset that this TSQLDataLink represents.


TSQLDataLink.GetDetailDataSet
 VCL Reference

TSQLDataLink.GetDetailDataSet

TSQLDataLink	See also

Returns the value of the DetailDataSet property.

function GetDetailDataSet: TDataSet; override;

Description

GetDetailDataSet is the protected read implementation of the DetailDataSet property.


TSQLDataLink.RecordChanged
 VCL Reference

TSQLDataLink.RecordChanged

TSQLDataLink	See also

Refreshes the parameter values of the detail dataset and re-executes it.

procedure RecordChanged(Field: TField); override;

Description

Applications can not call the protected RecordChanged method. It is called automatically when the contents of the current record change. The Field parameter indicates which field in the current record has changed. If Field is nil, the entire record has changed.

SQL datasets establish master/detail relationships by supplying parameter values from the master dataset. RecordChanged updates these parameter values on the detail dataset to reflect the current values of the master dataset and then refreshes the dataset so that it is populated with the new detail set.


Hierarchy

TObject

TPersistent

TDataLink

TDetailDataLink

TSQLDataLink


TSQLDataSet
 VCL Reference

 TSQLDataSet

Hierarchy	Properties	Methods	Events	Using TSQLDataSet	See also

TSQLDataSet represents data retrieved using dbExpress.

Unit

SqlExpr

Description

TSQLDataSet is a general-purpose unidirectional dataset for accessing database information using dbExpress. You can add a TSQLDataSet component to a form or data module at design time, or create one dynamically at runtime.

Use TSQLDataSet to

Represent the records in a database table, the result set of a SELECT query, or the result set returned by a stored procedure.

Execute a query or stored procedure that does not return a result set.

Represent metadata that describes what is available on the database server (tables, stored procedures, fields in a table, and so on).

TSQLDataSet is a unidirectional dataset. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory. Because of this, you can only navigate using the First and Next methods. There is no built-in editing support: you can only edit the data in an SQL dataset by explicitly creating an SQL UPDATE command or by connecting the dataset to a client dataset using a provider. Features that require buffering multiple records, such as filters or lookup fields, are not available.

Before you can use a TSQLDataSet component, it must be connected to the database server. Therefore, the first step to take when working with TSQLDataSet is to set the SQLConnection property.

Once the dataset is connected to a server, you can use the Command Text editor to set the CommandText property if you are using the dataset to execute a query. To execute a stored procedure or represent a single database table, set the CommandType property and then choose the table or stored procedure name from a drop-down list on the CommandText property. If you want to access metadata with the SQL dataset, you must specify the metadata you want at runtime by calling the SetSchemaInfo method.


 VCL Reference

TSQLDataSet properties

TSQLDataSet	Alphabetically	Legend

Derived from TCustomSQLDataSet

CommandText

CommandType

DataSource

DesignerData

IndexDefs

MaxBlobSize

NoMetadata

ParamCheck

Params

Prepared

RecordCount

SortFieldNames

SQLConnection

TransactionLevel

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSQLDataSet properties

TSQLDataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

CommandText

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IndexDefs

IsUniDirectional

MaxBlobSize

Modified

Name

NoMetadata

ObjectView

Owner

ParamCheck

Params

Prepared

RecNo

RecordCount

RecordSize

SortFieldNames

SparseArrays

SQLConnection

State

Tag

TransactionLevel

VCLComObject


 VCL Reference

TSQLDataSet events

TSQLDataSet	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLDataSet events

TSQLDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLDataSet methods

TSQLDataSet	Alphabetically	Legend

In TSQLDataSet

Create

ExecSQL

Derived from TCustomSQLDataSet

CreateBlobStream

Destroy

GetBlobFieldData

GetDetailLinkFields

GetFieldData

GetKeyFieldNames

GetQuoteChar

IsSequenced

ParamByName

SetSchemaInfo

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLDataSet methods

TSQLDataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecSQL

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyFieldNames

GetNamePath

GetParentComponent

GetQuoteChar

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

ParamByName

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSchemaInfo

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TSQLDataSet.Create
 VCL Reference

TSQLDataSet.Create

TSQLDataSet	See also

Creates an instance of a TSQLDataSet component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an SQL dataset component at runtime. SQL datasets placed in forms or data modules at design time are created automatically.

In addition to allocating the memory and structures it needs, Create initializes the following properties:

Sets the CommandType property to ctQuery.

Sets the ParamCheck property to True.

Sets the MaxBlobSize property to 0.

Sets the SchemaInfo to specify no schema information (use CommandText instead).

Sets the Prepared property to False.


TSQLDataSet.ExecSQL
 VCL Reference

TSQLDataSet.ExecSQL

TSQLDataSet	See also	Example

Executes a query or stored procedure that does not return a set of records.

function ExecSQL(ExecDirect: Boolean = False): Integer; override;

Description

Call ExecSQL to execute an SQL command that does not return a set of records. This command is a query other than a SELECT query, such as an INSERT, UPDATE, DELETE, or CREATE TABLE query.

ExecDirect indicates that the query does not need to be prepared before it is executed. This parameter can be set to True if the query does not include any parameters. When ExecDirect is False, the query will be prepared before it is executed. Even when ExecDirect is False, you can avoid preparing the query every time ExecSQL is called by setting the Prepared property to True before calling ExecSQL the first time.

ExecSQL returns the number of rows affected by the executed command. This becomes the value of the RowsAffected property.

Note:	Do not use ExecSQL for commands that return data. These include any use of the ctTable command type, SELECT queries, and stored procedures that return a cursor. When the command returns data, use the Open method or set the Active property to True.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomSQLDataSet

TSQLDataSet


TSQLStoredProc
 VCL Reference

 TSQLStoredProc

Hierarchy	Properties	Methods	Events	Using TSQLStoredProc	See also

TSQLStoredProc represents a stored procedure that is executed using dbExpress.

Unit

SqlExpr

Description

Use TSQLStoredProc to execute a stored procedure on a database server that is accessed via TSQLConnection.  TSQLStoredProc can represent the result set if the stored procedure returns a cursor. You can add a TSQLStoredProc component to a form or data module at design time, or create one dynamically at runtime.

TSQLStoredProc is a unidirectional dataset. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory. Because of this, you can only navigate using the First and Next methods. There is no built-in editing support: you can only edit the data in an SQL stored procedure by explicitly creating an SQL UPDATE command or by connecting the dataset to a client dataset using a provider. Features that require buffering multiple records, such as filters or lookup fields, are not available.

Before you can use a TSQLStoredProc component, it must be connected to the database server. Therefore, the first step to take when working with TSQLStoredProc is to set the SQLConnection property. Once the dataset is connected to a server, use the StoredProcName property to specify the stored procedure to execute.


 VCL Reference

TSQLStoredProc properties

TSQLStoredProc	Alphabetically	Legend

In TSQLStoredProc

StoredProcName

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

NoMetadata

ParamCheck

Params

Prepared

RecordCount

SQLConnection

TransactionLevel

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

NoMetadata

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

TransactionLevel

VCLComObject


 VCL Reference

TSQLStoredProc properties

TSQLStoredProc	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IndexDefs

IsUniDirectional

MaxBlobSize

Modified

Name

ObjectView

Owner

ParamCheck

Params

Prepared

RecNo

RecordCount

RecordSize

SparseArrays

SQLConnection

State

StoredProcName

Tag

VCLComObject


TSQLStoredProc.StoredProcName
 VCL Reference

TSQLStoredProc.StoredProcName

TSQLStoredProc	See also

Specifies the SQL statement to execute on the database server.

property StoredProcName: string;

Description

Set StoredProcName to specify the name of the stored procedure to call on the server. If StoredProcName does not match the name of an existing stored procedure on the server, an exception is raised.

When you set the StoredProcName property, TSQLStoredProc queries the database server to ascertain the parameters of the specified stored procedure. It uses this information to initialize the Params property. You can subsequently use the Params property to adjust the properties of any parameters and supply values for the parameters. Some servers do not supply information about stored procedure parameters. In those cases, you must explicitly add the parameters.


 VCL Reference

TSQLStoredProc events

TSQLStoredProc	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLStoredProc events

TSQLStoredProc	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLStoredProc methods

TSQLStoredProc	Alphabetically	Legend

In TSQLStoredProc

Create

ExecProc

NextRecordSet

PrepareStatement

Derived from TCustomSQLDataSet

CreateBlobStream

Destroy

GetBlobFieldData

GetDetailLinkFields

GetFieldData

GetKeyFieldNames

GetQuoteChar

IsSequenced

ParamByName

SetSchemaInfo

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLStoredProc methods

TSQLStoredProc	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecProc

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyFieldNames

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

NextRecordSet

Open

ParamByName

Post

PrepareStatement

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSchemaInfo

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TSQLStoredProc.Create
 VCL Reference

TSQLStoredProc.Create

TSQLStoredProc	See also

Creates an instance of a TSQLStoredProc component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an SQL stored procedure component at runtime. SQL stored procedures placed in forms or data modules at design time are created automatically.


TSQLStoredProc.ExecProc
 VCL Reference

TSQLStoredProc.ExecProc

TSQLStoredProc	See also

Executes the stored procedure when it does not return a cursor.

function ExecProc: Integer; virtual;;

Description

Call ExecProc to execute the stored procedure specified by StoredProcName if it does not return a cursor. ExecProc returns the number of rows affected by the stored procedure. This becomes the value of the RowsAffected property.

To speed performance, an application should ordinarily prepare the stored procedure by setting the Prepared property to True before calling ExecProc the first time.

Note:	Do not use ExecProc for stored procedures that return a cursor. When the stored procedure returns data, use the Open method or set the Active property to True.


TSQLStoredProc.NextRecordSet
 VCL Reference

TSQLStoredProc.NextRecordSet

TSQLStoredProc	Example

Provides access to a secondary recordset.

function NextRecordSet: TCustomSQLDataSet;

Description

Call NextRecordSet to obtain secondary datasets when accessing the results of a stored procedure that returns multiple sets of records. Opening the dataset fetches the first set of records. NextRecordSet provides access to the subsequent sets.

NextRecordSet returns a newly created TCustomSQLDataSet component that provides access to the next set of records. The first time you call NextRecordSet, it returns a dataset for the second set of records. The next call returns a third dataset, and so on, until there are no more sets of records. When there are no additional datasets, NextRecordSet returns nil.


TSQLStoredProc.PrepareStatement
 VCL Reference

TSQLStoredProc.PrepareStatement

TSQLStoredProc	See also

Prepares the stored procedure for execution.

function PrepareStatement(var RecordsAffected: Integer): TCustomSQLDataSet;

Description

PrepareStatement performs most of the necessary tasks for preparing a stored procedure to be executed on the server. It ensures that dbExpress and the database server have allocated any resources they need for executing the stored procedure and binding its parameters.

Do not call PrepareStatement when preparing a stored procedure for execution. Instead, set the Prepared property to True. When you use the Prepared property instead, the stored procedure component keeps track of the fact that it has already been prepared and need not repeat the process every time it executes. In addition, when you set the Prepared property, the component initializes internal properties that keep track of the number of rows affected by the stored procedure.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomSQLDataSet

TSQLStoredProc


TSQLTable
 VCL Reference

 TSQLTable

Hierarchy	Properties	Methods	Events	Using TSQLTablet	See also

TSQLTable represents a database table that is accessed using dbExpress.

Unit

SqlExpr

Description

Use TSQLTable to represent a table on a database server that is accessed via TSQLConnection.  TSQLTable generates a query to fetch all of the rows and columns in a table you specify. You can add a TSQLTable component to a form or data module at design time, or create one dynamically at runtime.

TSQLTable is a unidirectional dataset. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory. Because of this, you can only navigate using the First and Next methods. There is no built-in editing support: you can only edit the data in an SQL table by explicitly creating an SQL UPDATE command or by connecting the table to a client dataset using a provider. Features that require buffering multiple records, such as filters or lookup fields, are not available.

Before you can use a TSQLTable component, it must be connected to the database server. Therefore, the first step to take when working with TSQLTable is to set the SQLConnection property. Once the dataset is connected to a server, use the TableName property to specify the table this component represents.


 VCL Reference

TSQLTable properties

TSQLTable	Alphabetically	Legend

In TSQLTable

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

MasterFields

MasterSource

TableName

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

NoMetadata

Prepared

RecordCount

SQLConnection

TransactionLevel

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSQLTable properties

TSQLTable	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

MasterFields

MasterSource

MaxBlobSize

Modified

NoMetadata

Name

ObjectView

Owner

Prepared

RecNo

RecordCount

RecordSize

SparseArrays

SQLConnection

State

TableName

Tag

TransactionLevel

VCLComObject


TSQLTable.IndexFieldCount
 VCL Reference

TSQLTable.IndexFieldCount

TSQLTable	See also

Indicates the number of fields that make up the current index.

property IndexFieldCount: Integer;

Description

Check IndexFieldCount to determine how many fields are in the current index. If the IndexName property is not set, IndexFieldCount is 0.


TSQLTable.IndexFieldNames
 VCL Reference

TSQLTable.IndexFieldNames

TSQLTable	See also

Lists the fields to use for sorting records and for linking in master/detail relationships.

property IndexFieldNames: string;

Description

IndexFieldNames is a semicolon-delimited set of field names, where each name specifies a field in the table.

Use IndexFieldNames to identify the fields in the SQL table that are used to sort records in the table. IndexFieldNames are used to generate the ORDER BY clause of the SQL statement automatically generated to fetch records for the dataset.

IndexFieldNames is also used to link this table as the detail in a master/detail relationship. Each of these fields must be matched to a corresponding field from the MasterFields property.

Instead of explicitly setting the sorting and linking fields using IndexFieldNames, you can indicate them using an existing index. To specify the sorting and linking fields implicitly through an index, use the IndexName property instead.

Note:	The IndexName and IndexFieldNames properties are mutually exclusive. Setting one automatically clears the other.


TSQLTable.IndexFields
 VCL Reference

TSQLTable.IndexFields

TSQLTable	See also

Specifies the fields associated with the current index.

property IndexFields[Index: Integer]: TField;

Description

IndexFields is a zero-based array of field objects, each of which corresponds to a field in the current index. Index is an ordinal value indicating the position of a field in the index. The first field in the index is IndexFields[0], the second is IndexFields[1], and so on.

Note:	Do not set IndexFields directly. Instead use the IndexFieldNames property to specify the sort order for records in the table.


TSQLTable.IndexName
 VCL Reference

TSQLTable.IndexName

TSQLTable	See also

Identifies an index to use for sorting records and for linking the table as the detail of a master/detail relationship.

property IndexName: string;

Description

Use IndexName to specify an existing index that is defined for the underlying database table.

IndexName is used to sort records in the table by appearing in the ORDER BY clause of the SQL statement automatically generated to fetch records for the dataset.

IndexName is also used to link this table as the detail in a master/detail relationship. Each of the fields in the index must be matched to a corresponding field from the MasterFields property.

Note:	The IndexName and IndexFieldNames properties are mutually exclusive. Setting one automatically clears the other.


TSQLTable.MasterFields
 VCL Reference

TSQLTable.MasterFields

TSQLTable	See also

Identifies the fields from the master dataset to use for linking this table as the detail of a master/detail relationship.

property MasterFields: string;

Description

Use MasterFields to identify the fields in another (master) dataset that can be used as link fields in a master/detail relationship. MasterFields is a semicolon-delimited set of field names, where each name identifies a field in the master dataset. The master dataset is the dataset associated with the datasource specified by MasterSource. Each of the fields in MasterFields must be matched to a corresponding field from the IndexFieldNames property.

At design-time, double-click on the MasterFields property in the Object Inspector to use the Field Link designer to help you define the master/detail relationship. You can only use the Field Link designer if you have already specified the IndexName or IndexFieldNames property and the MasterSource property.


TSQLTable.MasterSource
 VCL Reference

TSQLTable.MasterSource

TSQLTable	See also

Identifies the master dataset to use when linking this table as the detail of a master/detail relationship.

property MasterSource: TDataSource;

Description

Use MasterSource to indicate the dataset that serves as a master table when establishing a master/detail relationship. Specify a TDataSource component whose DataSet property identifies the desired master dataset.

A master/detail relationship is established when you set the MasterSource property to identify a master dataset, the MasterFields property to identify the fields in that master dataset whose values must be matched by linking fields in this (detail) SQL table, and the IndexName or IndexFieldNames property to identify the linking fields in this SQL table.

Note:	MasterSource is the same as the DataSource property, except that it is published.


TSQLTable.TableName
 VCL Reference

TSQLTable.TableName

TSQLTable	See also

Specifies the table on the database server represented by this component.

property TableName: string;

Description

Set TableName to the name of a table on the database server. TSQLTable automatically generates an SQL query to fetch all of the records and all of the fields in that table.

Note:	In the automatically generated SQL query, the ORDER BY clause is determined by the IndexName or IndexFieldNames property.


 VCL Reference

TSQLTable events

TSQLTable	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLTable events

TSQLTable	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLTable methods

TSQLTable	Alphabetically	Legend

In TSQLTable

Create

DeleteRecords

Destroy

GetIndexNames

PrepareStatement

Derived from TCustomSQLDataSet

CreateBlobStream

GetBlobFieldData

GetDetailLinkFields

GetFieldData

GetKeyFieldNames

GetQuoteChar

IsSequenced

ParamByName

SetSchemaInfo

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLTable methods

TSQLTable	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DeleteRecords

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyFieldNames

GetNamePath

GetParentComponent

GetQuoteChar

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

ParamByName

Post

PrepareStatement

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSchemaInfo

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TSQLTable.Create
 VCL Reference

TSQLTable.Create

TSQLTable	See also

Creates an instance of a TSQLTable component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an SQL table at runtime. SQL tables placed in forms or data modules at design time are created automatically.


TSQLTable.DeleteRecords
 VCL Reference

TSQLTable.DeleteRecords

TSQLTable	See also

Empties the underlying database table.

procedure DeleteRecords;

Description

Call DeleteRecords to delete all the records in the underlying database table.


TSQLTable.Destroy
 VCL Reference

TSQLTable.Destroy

TSQLTable	See also

Destroys the TSQLTable instance.

destructor Destroy; override;

Description

Usually destruction of datasets is handled automatically by Delphi. If an application creates its own instances of a dataset, however, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which verifies that the dataset reference is not nil before calling Destroy.


TSQLTable.GetIndexNames
 VCL Reference

TSQLTable.GetIndexNames

TSQLTable	See also

Retrieves a list of available indexes defined for the table.

procedure GetIndexNames(List: TStrings);

Description

Call GetIndexNames to retrieve a list of all indexes on the server defined for the table. List is a string list object, created and maintained by the application, into which to retrieve the index names.


TSQLTable.PrepareStatement
 VCL Reference

TSQLTable.PrepareStatement

TSQLTable	See also

Generates the query that TSQLTable uses to fetch data from the database server.

procedure PrepareStatement; override;

Description

PrepareStatement generates a SELECT query to fetch the records from the table specified by TableName, ordering by the fields in IndexFieldNames or the index in IndexName. If you have specified a master/detail relationship, PrepareStatement sets that up as well.

Do not call PrepareStatement in your applications. Instead, set the Prepared property to True. When you use the Prepared property instead, the SQL table keeps track of the fact that it has already been prepared and need not repeat the process every time it executes.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomSQLDataSet

TSQLTable


TSQLTimeStampField
 VCL Reference

TSQLTimeStampField

Hierarchy	Properties	Methods	Events 	Using TSQLTimeStampField	See also

TSQLTimeStampField represents a date-time field in a DBExpress dataset.

Unit

DB

Description

TSQLTimeStampField encapsulates the fundamental behavior common to Date-time fields. Date-time fields contain combined date and time information, sometimes called timestamps. TSQLTimeStampField uses the TSQLTimeStamp type to work with date-time values internally. This is the type used by DBExpress drivers for representing date and time values.

If you use the Fields editor at design time to create a persistent field component for the SQL timestamp field, you can access it by name at runtime. When using dynamic field components, you can access the TSQLTimeStampField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TSQLTimeStampField properties

TSQLTimeStampField	Alphabetically	Legend

In TSQLTimeStampField

AsDateTime

AsFloat

AsSQLTimeStamp

AsString

AsVariant

DataSize

DisplayFormat

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsInteger

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLTimeStampField properties

TSQLTimeStampField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TSQLTimeStampField.AsDateTime
 VCL Reference

TSQLTimeStampField.AsDateTime

TSQLTimeStampField	See also

Represents the value of the SQL timestamp field as a TDateTime value.

property AsDateTime: TDateTime;

Description

Use AsDateTime to

Assign a TDateTime value to a SQL timestamp field.

Assign the SQL timestamp field value to a TDateTime variable.

AsDateTime represents date-time values using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24 hour day that has elapsed.

Although TSQLTimeStampField stores date and time values in the TSQLTimeStamp type, you may want to convert values to a TDateTime time if you are performing many calculations on the values or if you are using a method that expects a TDateTime value.


TSQLTimeStampField.AsFloat
 VCL Reference

TSQLTimeStampField.AsFloat

TSQLTimeStampField	See also

Represents the value of the SQL timestamp field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign a floating-point value to a SQL timestamp field.

Assign the SQL timestamp field value to a floating-point variable.

TSQLTimeStampField converts the date portion of its TSQLTimeStamp record to the number of days that have passed since Dec. 30 1899. The Time portion is converted to the fraction of a 24-hour day that has elapsed. The floating-point value for a SQL timestamp quantity is the sum of the date and time values.

For example, this code assigns a floating-point value to SQL timestamp field:

MySQLTimeStampField.AsFloat := 35065.75; { Jan 1, 1996 6:00 p.m. }

To assign date-time field value to a floating-point value, use code similar to this:

FloatVariable := MySQLTimeStampField.AsFloat;


TSQLTimeStampField.AsSQLTimeStamp
 VCL Reference

TSQLTimeStampField.AsSQLTimeStamp

TSQLTimeStampField	See also

Represents the value of the SQL timestamp field as a TSQLTimeStamp record.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Use AsSQLTimeStamp to

Assign a TSQLTimeStamp value to a SQL timestamp field.

Assign the SQL timestamp field value to a TSQLTimeStamp variable.

Because TSQLTimeStampField stores date and time values using the TSQLTimeStamp type, AsSQLTimeStamp is the same as Value for SQL timestamp fields. Use AsSQLTimeStamp when working with field components where the actual class of the object is not known.

Note:	It is easier to extract time information (such as the year, month, second, and so on) from a TSQLTimeStamp record than from the more common TDateTime type. However, if you intend to perform many calculations with the timestamp value, you may want to use the AsDateTime property instead because the TDateTime type is more efficient.


TSQLTimeStampField.AsString
 VCL Reference

TSQLTimeStampField.AsString

TSQLTimeStampField	See also

Represents the value of the SQL timestamp field as a string.

property AsString: String;

Description

Use AsString to

Assign a string to a date-time field.

Assign the date-time field value to a string.

For example, this code assigns a string to a SQL timestamp field value:

MySQLTimeStampField.AsString := '1/1/1997 8:00:00 AM';

To assign SQL timestamp field value to a string, use code similar to this:

Edit1.Text := MySQLTimeStampField.AsString;

AsString converts between TSQLTimeStamp values and strings using the date and time format specified by the Windows Control Panel. This formats the date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the time part is 0.

Note:	The format of the date (such as MM/DD/YY versus DD/MM/YY) depends on the current Windows settings. These settings can be overridden for the scope of the application only using the ShortDateFormat setting.)


TSQLTimeStampField.AsVariant
 VCL Reference

TSQLTimeStampField.AsVariant

TSQLTimeStampField	See also

Represents the value of a SQL timestamp field as a Variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the SQL timestamp field value to Variant variable.

Assign a Variant value to the SQL timestamp field.

Using Variants is useful when the actual field type and the data type are unknown.


TSQLTimeStampField.DataSize
 VCL Reference

TSQLTimeStampField.DataSize

TSQLTimeStampField	See also	Example

Specifies the amount of memory needed to store the value of a SQL timestamp field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a SQL timestamp field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For SQL timestamp fields, DataSize is the size of the TSQLTimestamprecord.


TSQLTimeStampField.DisplayFormat
 VCL Reference

TSQLTimeStampField.DisplayFormat

TSQLTimeStampField	See also

Controls the formatting of the SQL timestamp field for display purposes.

property DisplayFormat: String;

Description

Use DisplayFormat to specify the formatting string to use for formatting the value in a SQL timestamp field when the field’s value appears as a string. If DisplayFormat is not assigned a string, the value is formatted according to the default date-time format specified by the Windows Control Panel.

Note:	DisplayFormat does not affect the value of the AsString property.

Construct a DisplayFormat string using these format specifiers:

Specifier	Displays

c	The date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

d	The day as a number without a leading zero (1-31).

dd	The day as a number with a leading zero (01-31).

ddd	The day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.

dddd	The day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.

ddddd	The date using the format given by the ShortDateFormat global variable.

dddddd	The date using the format given by the LongDateFormat global variable.

m	The month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm	The month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm	The month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.

mmmm	The month as a full name (January-December) using the strings given by the LongMonthNames global variable.

yy	The year as a two-digit number (00-99).

yyyy	The year as a four-digit number (0000-9999).

h	The hour without a leading zero (0-23).

hh	The hour with a leading zero (00-23).

n	The minute without a leading zero (0-59).

nn	The minute with a leading zero (00-59).

s	The second without a leading zero (0-59).

ss	The second with a leading zero (00-59).

t	The time using the format given by the ShortTimeFormat global variable.

tt	The time using the format given by the LongTimeFormat global variable.

am/pm	The time using the 12-hour clock for the preceding h or hh specifier, followed by "am" for any hour before noon, or "pm" for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p	The time using the 12-hour clock for the preceding h or hh specifier, followed by "a" for any hour before noon, or "p" for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm	The time using the 12-hour clock for the preceding h or hh specifier, followed by the contents of the TimeAMString global variable for any hour before noon, or the contents of the TimePMString global variable for any hour after noon.

/	The date separator character given by the DateSeparator global variable.

:	The time separator character given by the TimeSeparator global variable.

'xx'/"xx"	Characters enclosed in single or double quotes are displayed as-is, with no formatting changes.

Format specifiers may be written in uppercase or lowercase letters; both produce the same result.

If the string given by the Format parameter is empty, the date and time value is formatted as if a c format specifier had been given.


TSQLTimeStampField.Value
 VCL Reference

TSQLTimeStampField.Value

TSQLTimeStampField	See also

Represents the value of the data in the SQL timestamp field.

property Value: TDateTime;

Description

Use Value to read data directly from and write data directly to a SQL timestamp field component at runtime. TSQLTimeStampField components store and manipulate their data as TSQLTimeStamp values. Thus, for SQL timestamp fields, the Value property is the same as the AsSQLTimeStamp property.


 VCL Reference

TSQLTimeStampField events

TSQLTimeStampField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TSQLTimeStampField events

TSQLTimeStampField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TSQLTimeStampField methods

TSQLTimeStampField	Alphabetically	Legend

In TSQLTimeStampField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLTimeStampField methods

TSQLTimeStampField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TSQLTimeStampField.Create
 VCL Reference

TSQLTimeStampField.Create

TSQLTimeStampField	See also

Creates and initializes a TSQLTimeStampField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TSQLTimeStampField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftTimeStamp. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TSQLTimeStampField. After instantiating a TSQLTimeStampField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TSQLTimeStampField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TSQLTimeStampField with a dataset component by setting its DataSet property to the name of the dataset component. Optionally set the DisplayFormat property to the desired date and time format.

The example below creates a TSQLTimeStampField object for a field named CheckOut accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TSQLTimeStampField;

begin

  SQLDataSet1.Close;

  T := TSQLTimeStampField.Create(SQLDataSet1);

  T.FieldName := 'CheckOut';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  T.DisplayFormat := 'mm/dd/yyyy hh:nn:ss ampm';

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TSQLTimeStampField


TSQLUpdateObject
 VCL Reference

TSQLUpdateObject

Hierarchy	Properties	Methods	See also

TSQLUpdateObject is the base class for classes that use an SQL command to apply cached updates on behalf of queries or stored procedures that can’t post updates directly.

Unit

DBTables

Description

Use TSQLUpdateObject as a base class when creating customized update objects that can update BDE datasets.  TSQLUpdateObject adds support for accessing a SQL statement that applies an update to the properties and methods introduced by TDataSetUpdateObject.

Do not create instances of TSQLUpdateObject. Most of this class’s methods are abstract, so that trying to use an instance of TSQLUpdateObject merely generates an EAbstractError exception. To add a component that applies updates on behalf of a query or stored procedure, use a descendant such as TUpdateSQL instead.


 VCL Reference

TSQLUpdateObject properties

TSQLUpdateObject	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLUpdateObject properties

TSQLUpdateObject	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLUpdateObject methods

TSQLUpdateObject	Alphabetically	Legend

In TSQLUpdateObject

GetSQL

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLUpdateObject methods

TSQLUpdateObject	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSQL

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSQLUpdateObject.GetSQL
 VCL Reference

TSQLUpdateObject.GetSQL

TSQLUpdateObject	See also

Returns the SQL statement that performs a specified update operation.

function GetSQL(UpdateKind: TUpdateKind): TStrings; virtual; abstract;

Description

Override GetSQL to allow the update object to access an SQL statement that applies an update of the type specified by UpdateKind. TSQLUpdateObject introduces this method as an abstract method, which is used internally to obtain an SQL command for applying updates.

GetSQL provides the underlying implementation for the SQL property in the descendant class TUpdateSQL.


Hierarchy

TObject

TPersistent

TComponent

TDataSetUpdateObject

TSQLUpdateObject


TServerClientThread
 VCL Reference

TServerClientThread

Hierarchy	Properties	Methods	Events	Using TServerClientThread	See also

TServerClientThread is an execution thread used for a single connection to a client socket accepted by a Windows server socket.

Unit

ScktComp

Description

TServerWinSocket objects spawn TServerClientThread objects to handle separate client connections in separate execution threads. This allows server sockets to perform slow reading and writing operations with client sockets without adversely affecting the performance on other connections.

TServerClientThread introduces new properties to

Access the TServerWinSocket object that spawned the thread and the TServerClientWinSocket that is connected to the client socket.

Store and access thread-specific data.

Determine if the thread is stored in a thread cache maintained by the TServerWinSocket.

Applications that receive frequent client requests will want to derive a descendant class from TServerClientThread to handle reading and writing to separate clients. This is because TServerClientThread objects use the OnClientRead and OnClientWrite events of the associated server socket. These events are not thread-local.


 VCL Reference

TServerClientThread properties

TServerClientThread	Alphabetically	Legend

In TServerClientThread

ClientSocket

Data

KeepInCache

ServerSocket

Derived from TThread

FatalException

FreeOnTerminate

Handle

Priority

Suspended

ThreadID


 VCL Reference

TServerClientThread properties

TServerClientThread	By object	Legend

ClientSocket

Data

FatalException

FreeOnTerminate

Handle

KeepInCache

Priority

ServerSocket

Suspended

ThreadID


TServerClientThread.ClientSocket
 VCL Reference

TServerClientThread.ClientSocket

TServerClientThread	See also	Example

Specifies the TServerClientWinSocket object that uses the thread for all reading and writing over the socket connection.

property ClientSocket: TServerClientWinSocket;

Description

Use ClientSocket to gain direct access to the Windows socket component that uses the thread. If ClientSocket is nil, the thread is idle and available for reuse by another TServerClientWinSocket object. TServerClientThread uses ClientSocket to read from or write to the socket connection.


TServerClientThread.Data
 VCL Reference

TServerClientThread.Data

TServerClientThread	See also

Points to application-specific data associated with the thread.

property Data: Pointer;

Description

Use Data to associate information with the thread object. Data can store information in a thread-safe manner that would otherwise require the use of global variables.


TServerClientThread.KeepInCache
 VCL Reference

TServerClientThread.KeepInCache

TServerClientThread	See also

Determines whether the thread should be kept in the thread cache maintained by ServerSocket.

property KeepInCache: Boolean;

Description

The TServerWinSocket that spawns server client threads for its connections to client sockets maintains a cache of server client threads for reuse. As server client threads are activated, the TServerWinSocket object sets the KeepInCache property to indicate whether the thread will fit in the thread cache.

When KeepInCache is True, FreeOnTerminate is set to False before the thread terminates, and the thread is left in the thread cache. When KeepInCache is False, the thread is freed when execution terminates.


TServerClientThread.ServerSocket
 VCL Reference

TServerClientThread.ServerSocket

TServerClientThread	See also

Specifies the TServerWinSocket object that manages all the TServerClientThread objects for its client connections.

property ServerSocket: TServerWinSocket;

Description

Use ServerSocket to get direct access to the listening Windows socket object that spawned the thread for a client connection it accepted. TServerClientThread passes events and errors to the appropriate event handlers assigned to ServerSocket. TServerClientThread adds itself to the cache of threads maintained by ServerSocket from its constructor, and removes itself when the thread terminates.


 VCL Reference

TServerClientThread events

TServerClientThread	Alphabetically	Legend

Derived from TThread

OnTerminate


 VCL Reference

TServerClientThread events

TServerClientThread	By object	Legend

OnTerminate


 VCL Reference

TServerClientThread methods

TServerClientThread	Alphabetically 	Legend

In TServerClientThread

ClientExecute

Create

Destroy

DoTerminate

EndConnect

Error

Event

Execute

HandleException

Reactivate

StartConnect

Derived from TThread

AfterConstruction

Resume

Suspend

Terminate

WaitFor

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerClientThread methods

TServerClientThread	By object 	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientExecute

Create

DefaultHandler

Destroy

Dispatch

DoTerminate

EndConnect

Error

Event

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

HandleException

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Reactivate

Resume

SafeCallException

StartConnect

Suspend

Terminate

WaitFor


TServerClientThread.ClientExecute
 VCL Reference

 TServerClientThread.ClientExecute

TServerClientThread	See also 	Example

Simulates OnClientRead and OnClientWrite events for the associated server socket.

procedure ClientExecute; virtual;

Description

TServerClientThread calls ClientExecute from its Execute method. ClientExecute checks whether there is any information to read from the associated socket connection, and if so, simulates an OnClientRead event on the associated server socket. If there is no information sent from the client, ClientExecute simulates an OnClientWrite event.

Because the server socket that receives these events is not local to the thread, the events occur within the main VCL thread using the Synchronize method. This method can be too slow if the server socket has many client connections, because each thread must wait for any other thread to finish reading or writing. When a server socket receives many client connection requests, override ClientExecute to handle the reading or writing using a thread-local instance of TWinSocketStream. In the ClientExecute method, be sure to check the Terminated property periodically.

Note:	Do not use the properties and methods of global objects directly in the ClientExecute method.  Instead, separate the use of objects that are not thread-local into a separate procedure call, and call that procedure by passing it as a parameter to the Synchronize method.


TServerClientThread.Create
 VCL Reference

TServerClientThread.Create

TServerClientThread	See also

Creates an instance of TServerClientThread.

constructor Create(CreateSuspended: Boolean; ASocket: TServerClientWinSocket);

Description

Use Create to create an instance of TServerClientThread for a connection to a client socket, and add the thread to the cache maintained by the associated listening socket.

Initializes FreeOnTerminate to True.

Initializes Priority to tpHigher.

Initializes ClientSocket to the ASocket parameter and ServerSocket to ASocket.ServerWinSocket.

Starts the thread executing.

Adds the thread to the cache maintained by ServerSocket.

Sets the OnErrorEvent and OnSocketEvent event handlers of ClientSocket so that events are sent to ServerSocket.

Signals when initialization is complete and the thread is ready for reading from or writing to the client connection.


TServerClientThread.Destroy
 VCL Reference

TServerClientThread.Destroy

TServerClientThread	See also

Destroys the server client thread object and releases the memory allocated to it.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. ServerClientThread objects are freed by the TServerWinSocket object that manages them.

Destroy frees the TServerClientWinSocket object that encapsulates the connection to the client socket before calling the inherited destructor.


TServerClientThread.DoTerminate
 VCL Reference

TServerClientThread.DoTerminate

TThread	See also

Removes the thread from the list of active threads maintained by the associated server socket.

procedure DoTerminate; override;

Description

DoTerminate overrides the inherited method to suppress the OnTerminate event. Instead, it removes the thread from the Connections property of the associated TServerWinSocket. The thread is then either added to the server socket’s thread cache or destroyed.


TServerClientThread.EndConnect
 VCL Reference

TServerClientThread.EndConnect

TThread	See also

Indicates whether the thread should execute again for another client.

function EndConnect: Boolean;

Description

The Execute method calls EndConnect when the ClientExecute method finishes. It frees all memory associated with the current client connection and checks whether the Thread is being reused for another client connection. If the thread should be reused, EndConnect returns True to indicate that the ClientExecute method should be called again.


TServerClientThread.Error
 VCL Reference

TServerClientThread.Error

TThread	See also

Generates an OnClientError event for the associated server socket.

TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept);

procedure Error(ErrorEvent: TErrorEvent; var ErrorCode: Integer); virtual;

Description

TServerClientThread assigns the Error method as an event handler for the OnErrorEvent method of the associated TClientWinSocket object. This allows errors received from the client to generate OnClientError events on the server socket.

Warning:	Error is not thread-safe. It should not be called from the server client thread. It is only intended for use by the associated client socket, which is not local to the server client thread.


TServerClientThread.Event
 VCL Reference

TServerClientThread.Event

TThread	See also

Generates an OnClientEvent event for the associated server socket.

procedure Event(SocketEvent: TSocketEvent); virtual;

Description

TServerClientThread assigns the Event method as an event handler for the OnSocketEvent method of the associated TClientWinSocket object. This allows events generated by the client to trigger client events on the server socket.

Warning:	Event is not thread-safe. It should not be called from the server client thread. It is only intended for use by the associated client socket, which is not local to the server client thread.


TServerClientThread.Execute
 VCL Reference

TServerClientThread.Execute

TServerClientThread	See also

Manages the caching of server client threads and calls the ClientExecute method to run the thread for individual client connections.

procedure Execute; override;

Description

Execute is called automatically when the thread runs. A thread runs when Create is called if CreateSuspended set to False, or when Resume is first called after the thread is created if CreateSuspended set to True.

Do not override the Execute method to implement the thread function of a TServerClientThread descendant. Instead, override the ClientExecute method, which is run after the thread is initialized for a particular client connection.


TServerClientThread.HandleException
 VCL Reference

TServerClientThread.HandleException

TServerClientThread	See also 	Example

Displays an error message using the main VCL thread.

procedure HandleException; virtual;

Description

HandleException obtains the current exception object and calls TApplication.ShowException (for descendants of Exception) or the global ShowException procedure (for other objects) to display an error message. HandleException wraps the call to ShowException in the Synchronize method to ensure that the call is thread-safe.


TServerClientThread.Reactivate
 VCL Reference

TServerClientThread.Reactivate

TServerClientThread	See also

Initializes the thread for a particular client connection.

procedure ReActivate(ASocket: TServerClientWinSocket);

Description

Reactivate is called when the thread is created or reactivated from the server socket’s cache of threads. It assigns the Error and Event methods as event handlers for the associated TServerWinSocket, and informs the server socket that the thread is now active.


TServerClientThread.StartConnect
 VCL Reference

TServerClientThread.StartConnect

TServerClientThread	See also

Indicates when the thread is ready to execute.

function StartConnect: Boolean;

Description

The Execute method calls StartConnect to determine when to call ClientExecute. StartConnect waits until the Reactivate method has signaled that the thread is properly initialized, and then returns True if the thread is ready to run. If the thread is terminated for any reason before it is fully initialized, StartConnect returns False.


Hierarchy

TObject

TThread

TServerClientThread


TServerClientWinSocket
 VCL Reference

TServerClientWinSocket

Hierarchy	Properties	Methods	Events	Using TServerClientWinSocket	See also

TServerClientWinSocket describes the server endpoint of a socket connection to a client socket.

Unit

ScktComp

Description

TServerClientWinSocket is used by server socket components to manage the Windows socket API calls for the socket connection to an individual client socket. TServerClientWinSocket objects are created when a client socket connection is accepted by a listening server socket.

Applications can create and customize the properties of a TServerClientWinSocket object in an OnGetSocket event handler for a server socket component. Component writers can create descendants of TServerClientWinSocket that may be substituted for TServerClientWinSocket in the OnGetSocket event handler.


 VCL Reference

TServerClientWinSocket properties

TServerClientWinSocket	Alphabetically	Legend

In TServerClientWinSocket

ServerWinSocket

Derived from TCustomWinSocket

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


 VCL Reference

TServerClientWinSocket properties

TServerClientWinSocket	By object	Legend

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

ServerWinSocket

SocketHandle


TServerClientWinSocket.ServerWinSocket
 VCL Reference

TServerClientWinSocket.ServerWinSocket

TServerClientWinSocket	See also

Describes the endpoint of the listening connection that accepted the connection to the client socket which is managed by this TServerClientWinSocket.

property ServerWinSocket: TServerWinSocket;

Description

Use ServerWinSocket to gain access to the Windows socket object for the listening connection that spawned this TServerClientWinSocket. Use the ServerWinSocket to trigger events that can be handled by the event handlers of the server socket, to get execution threads from the cache maintained by the Windows server socket, or to get information about the other active connections accepted by the server socket.


 VCL Reference

TServerClientWinSocket events

TServerClientWinSocket	Alphabetically	Legend

Derived from TCustomWinSocket

OnErrorEvent

OnSocketEvent


 VCL Reference

TServerClientWinSocket events

TServerClientWinSocket	By object	Legend

OnErrorEvent

OnSocketEvent


 VCL Reference

TServerClientWinSocket methods

TServerClientWinSocket	Alphabetically	Legend

In TServerClientWinSocket

Create

Destroy

Derived from TCustomWinSocket

Accept

Close

Connect

DefaultHandler

Disconnect

Listen

Lock

LookupName

LookupService

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerClientWinSocket methods

TServerClientWinSocket	By object	Legend

Accept

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

Disconnect

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

Listen

Lock

LookupName

LookupService

MethodAddress

MethodName

NewInstance

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SafeCallException

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write


TServerClientWinSocket.Create
 VCL Reference

TServerClientWinSocket.Create

TServerClientWinSocket	See also

Creates and initializes an instance of TServerClientWinSocket.

constructor Create(Socket: TSocket; ServerWinSocket: TServerWinSocket);

Description

Use Create to create an instance of TServerClientWinSocket in the OnGetSocket event handler of a server socket component. The Socket parameter is the Windows socket handle for the accepted socket connection to a client socket. The ServerWinSocket parameter is the Windows socket object for the listening connection that accepted the connection to the client socket.

Create adds the new TServerClientWinSocket object to the list of connections maintained by the listening server socket. It then sets the OnSocketEvent event handler so that notifications from the connection to the client can be passed on to the server socket. After setting up the connection to the server socket, Create calls the inherited constructor.


TServerClientWinSocket.Destroy
 VCL Reference

TServerClientWinSocket.Destroy

TServerClientWinSocket	See also

Destroys an instance of TServerClientWinSocket.

destructor Destroy; override

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TServerClientWinSocket reference is not nil, and only then calls Destroy. Instances of TServerClientWinSocket are freed automatically when the connection is closed.

Destroy removes the TServerClientWinSocket from the list of connections maintained by the listening windows socket.


Hierarchy

TObject

TCustomWinSocket

TServerClientWinSocket


TServerSocketThread
 VCL Reference

TServerSocketThread

Hierarchy	Properties	Methods	Events	Using TServerSocketThread	See also

TServerSocketThread enables creation of separate threads of execution for the server socket in an application.

Unit

Sockets

Description

Create TServerSocketThread (or a descendant of the class) to represent an execution thread for the server socket in a multi-threaded application.  Each new instance of a TServerSocketThread, a TThread descendant, is a new thread of execution. Using a separate TServerSocketThread allows the server socket to block without blocking the whole application.


 VCL Reference

TServerSocketThread properties

TServerSocketThread	Alphabetically	Legend

In TServerSocketThread

ServerSocket

ThreadCacheSize

ThreadPool

Derived from TThread

FatalException

FreeOnTerminate

Handle

Priority

Suspended

ThreadID


 VCL Reference

TServerSocketThread properties

TServerSocketThread	By object	Legend

FatalException

FreeOnTerminate

Handle

Priority

ServerSocket

Suspended

ThreadCacheSize

ThreadID

ThreadPool


TServerSocketThread.ServerSocket
 VCL Reference

TServerSocketThread.ServerSocket

TServerSocketThread	See also

Specifies the TCustomTcpServer object that manages all the TClientSocketThread objects for its client connections.

property ServerSocket: TCustomTcpServer;

Description

Use ServerSocket to get direct access to the listening socket object that spawned the thread for a client connection it accepted. TServerSocketThread passes events and errors to the appropriate event handlers assigned to ServerSocket. TServerSocketThread adds itself to the cache of threads maintained by ServerSocket from its constructor, and removes itself when the thread terminates.


TServerSocketThread.ThreadCacheSize
 VCL Reference

TServerSocketThread.ThreadCacheSize

TServerSocketThread

Indicates the number of TServerSocketThread objects cached for reuse by new connections to client sockets.

property ThreadCacheSize: Integer;

Description

Set ThreadCacheSize to specify the number of threads that are cached for reuse. The ideal value for ThreadCacheSize depends on the number and frequency of client socket requests received by the server socket. If ThreadCacheSize is too low, the server socket will spend more time freeing and creating threads when client connections are accepted. If ThreadCacheSize is too high, the server socket may unnecessarily lock up the memory for threads that are never reused.


TServerSocketThread.ThreadPool
 VCL Reference

TServerSocketThread.ThreadPool

TServerSocketThread	See also

A list of all the client socket threads created by the TServerSocketThread object.

property ThreadPool: TList;

Description

TServerSocketThread objects listen for requests on the network and delegate them to client socket threads. Each client socket thread is added to the list ThreadPool after it is created. Creating and destroying client socket threads can be quite time consuming, so whenever one completes its work on a given connection it becomes dormant. When a new connection request is received, the ThreadPool is checked for dormant client socket threads. If one is available, it is assigned the connection. If not, a new client socket thread created. By reusing previously-created threads, the application's performance is improved.


 VCL Reference

TServerSocketThread events

TServerSocketThread	Alphabetically	Legend

In TServerSocketThread

OnGetThread

Derived from TThread

OnTerminate


 VCL Reference

TServerSocketThread events

TServerSocketThread	By object	Legend

OnGetThread

OnTerminate


TServerSocketThread.OnGetThread
 VCL Reference

TServerSocketThread.OnGetThread

TServerSocketThread

Creates and initializes a client socket thread when a connection is requested.

type TGetThreadEvent = procedure (Sender: TObject; var ClientSocketThread: TClientSocketThread) of object;

property OnGetThread: TGetThreadEvent read FOnGetThread write FOnGetThread;

Description

An OnGetThread event occurs when a connection is requested. The event handler creates an instance of TClientSocketThread and initializes it. Write an event handler on TCustomTcpServer to create and initialize instances of your own client socket thread class.


 VCL Reference

TServerSocketThread methods

TServerSocketThread	Alphabetically	Legend

In TServerSocketThread

ClearThreadPool

Create

Destroy

Execute

Derived from TThread

AfterConstruction

Resume

Suspend

Synchronize

Terminate

WaitFor

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerSocketThread methods

TServerSocketThread	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearThreadPool

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Resume

SafeCallException

Suspend

Synchronize

Terminate

WaitFor


TServerSocketThread.ClearThreadPool
 VCL Reference

TServerSocketThread.ClearThreadPool

TServerSocketThread	See also

Terminates all of the threads in the thread pool.

procedure ClearThreadPool;

Description

The thread pool is a list of client socket threads which are available to handle connection requests. This list is kept to allow reuse of old threads and improve performance. It is sometimes useful to destroy all of the thread object instances in this list.

Use ClearThreadPool to terminate all of the threads in the thread pool list. Any suspended thread in the pool will be resumed so that termination can proceed.


TServerSocketThread.Create
 VCL Reference

TServerSocketThread.Create

TServerSocketThread	See also

Creates an instance of a TServerSocketThread object.

constructor Create(ServerSocketThread: TServerSocketThread; ClientSocket: TCustomIpClient);

Description

Call Create to create an instance of a TServerSocketThread object.


TServerSocketThread.Destroy
 VCL Reference

TServerSocketThread.Destroy

TServerSocketThread	See also

Destroys the TServerSocketThread object and releases the memory allocated to it.

destructor Destroy; override;

Description

Do not call Destroy in an application. Instead, use Free to destroy a thread when FreeOnTerminate is False.

Destroy signals the thread to terminate and then waits for the thread to return before calling the inherited Destroy method.


TServerSocketThread.Execute
 VCL Reference

TServerSocketThread.Execute

TServerSocketThread	See also

Provides the code which executes when the thread is run.

procedure Execute; override;

Description

Use Execute to execute the code that should be executed when the thread runs. Execute is responsible for checking the value of the Terminated property to determine if the thread needs to exit.

Note:	Do not use the properties and methods of other objects directly in the Execute method of a thread.  Instead, separate the use of other objects into a separate procedure call, and call that procedure by passing it as a parameter to the Synchronize method.


Hierarchy

TObject

TThread

TServerSocketThread


TServerSocket
 VCL Reference

 TServerSocket

Hierarchy	Properties	Methods	Events	Using TServerSocket	See also

TServerSocket manages server socket connections for a TCP/IP server.

Unit

ScktComp

Description

Add a TServerSocket object to a form or data module to turn an application into a TCP/IP server. TServerSocket listens for requests for TCP/IP connections from other machines, and establishes connections when requests are received.


 VCL Reference

TServerSocket properties

TServerSocket	Alphabetically	Legend

In TServerSocket

Socket

Derived from TCustomServerSocket

ServerType

ThreadCacheSize

Derived from TAbstractSocket

Active

Port

Service

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TServerSocket properties

TServerSocket	By object	Legend

Active

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Port

ServerType

Service

Socket

Tag

ThreadCacheSize

VCLComObject


TServerSocket.Socket
 VCL Reference

TServerSocket.Socket

TServerSocket	See also	Example

Specifies the TServerWinSocket object that describes the endpoint of the listening connection.

property Socket: TServerWinSocket;

Description

Use Socket to obtain

Information about the connections currently active on the server socket.

Information about the connection threads that are cached for use by the server socket.

Access to the Windows socket handle for the listening connection that is needed for Windows socket API calls.


 VCL Reference

TServerSocket events

TServerSocket	Alphabetically	Legend

Derived from TCustomServerSocket

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnGetSocket

OnGetThread

OnThreadEnd

OnThreadStart

Derived from TCustomSocket

OnAccept

OnListen


 VCL Reference

TServerSocket events

TServerSocket	By object	Legend

OnAccept

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnGetSocket

OnGetThread

OnListen

OnThreadEnd

OnThreadStart


 VCL Reference

TServerSocket methods

TServerSocket	Alphabetically	Legend

In TServerSocket

Create

Derived from TCustomServerSocket

Destroy

Derived from TAbstractSocket

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TServerSocket methods

TServerSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TServerSocket.Create
 VCL Reference

TServerSocket.Create

TServerSocket	See also

Creates an instance of TServerSocket.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize a server socket component at runtime. TServerSocket objects placed at design time are created automatically.

After calling the inherited constructor, Create

Allocates the TServerWinSocket object that encapsulates the Windows socket connection for the server socket.

Initializes the event and error dispatchers for the server socket.

Initializes ThreadCacheSize to 10.


Hierarchy

TObject

TPersistent

TComponent

TAbstractSocket

TCustomSocket

TCustomServerSocket

TServerSocket


TServerWinSocket
 VCL Reference

TServerWinSocket

Hierarchy	Properties	Methods	Events	Using TServerWinSocket	See also

TServerWinSocket describes the endpoint of a listening server socket connection.

Unit

ScktComp

Description

TServerWinSocket is used by server socket components to manage the Windows socket API calls for a TCP/IP listening connection. TServerWinSocket introduces new properties, events, and methods to manage multiple socket connections to different client sockets, and to generate or reuse TServerClientThread objects that allow each client connection to have its own execution thread.


 VCL Reference

TServerWinSocket properties

TServerWinSocket	Alphabetically	Legend

In TServerWinSocket

ActiveConnections

ActiveThreads

Connections

IdleThreads

ServerType

ThreadCacheSize

Derived from TCustomWinSocket

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


 VCL Reference

TServerWinSocket properties

TServerWinSocket	By object	Legend

ActiveConnections

ActiveThreads

Addr

ASyncStyles

Connected

Connections

Data

Handle

IdleThreads

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

ServerType

SocketHandle

ThreadCacheSize


TServerWinSocket.ActiveConnections
 VCL Reference

TServerWinSocket.ActiveConnections

TServerWinSocket	See also

Indicates the number of connections to client sockets accepted by this listening socket that are currently open.

property ActiveConnections: Integer;

Description

Use ActiveConnections to monitor the use of the server socket. ActiveConnections is the number of entries in the Connections array.


TServerWinSocket.ActiveThreads
 VCL Reference

TServerWinSocket.ActiveThreads

TServerWinSocket	See also

Indicates the number of TServerClientThread objects currently in use by the socket connections listed in the Connections array.

property ActiveThreads: Integer;

Description

Use ActiveThreads to monitor thread usage by the listening socket. If ActiveThreads is usually much higher than ThreadCacheSize, increasing ThreadCacheSize should improve performance. To determine whether ThreadCacheSize is too high, use the IdleThreads property.

When the ServerType property is stThreadBlocking, each client connection automatically spawns a thread which is added to the cache and counted by ActiveThreads.


TServerWinSocket.Connections
 VCL Reference

TServerWinSocket.Connections

TServerWinSocket	See also	Example

Lists all TServerClientWinSocket objects that represent open socket connections to client sockets that were accepted by this listening socket.

property Connections[Index: Integer]: TCustomWinSocket;

Description

Use Connections with the ActiveConnections property to iterate over all open socket connections accepted by the listening socket. Each entry in the Connections array is a TServerClientWinSocket object, where an Index of 0 gives the first TServerClientWinSocket, an Index of 1 returns the second TServerClientWinSocket, and so on.

If ServerType is stThreadBlocking, the thread associated with each of the TServerClientWinSocket objects in the Connections array can be obtained using the GetClientThread method.


TServerWinSocket.IdleThreads
 VCL Reference

TServerWinSocket.IdleThreads

TServerWinSocket	See also

Indicates the number of unused TServerClientThread objects available in the cache.

property IdleThreads: Integer;

Description

Use IdleThreads to monitor thread cache usage by the listening socket. If IdleThreads often very high, the thread cache is tying up a lot of unused memory storing extra threads. Monitor the ActiveThreads property to determine an appropriate value for ThreadCacheSize.

When the ServerType property is stThreadBlocking, each client connection automatically spawns a thread which is added to the cache. As the threads in the cache complete their execution, they become available for reuse, and are counted by IdleThreads. When there are more active threads than ThreadCacheSize, the extra threads are freed when they finish execution instead.


TServerWinSocket.ServerType
 VCL Reference

TServerWinSocket.ServerType

TServerWinSocket	See also

Specifies whether each connection accepted by the server socket is non-blocking, or if it is automatically given a separate execution thread.

type TServerType = (stNonBlocking, stThreadBlocking);

property ServerType: TServerType;

Description

Set ServerType to stThreadBlocking to automatically spawn a new thread for each socket connection accepted by the listening socket connection. When ServerType is stThreadBlocking, the TServerClientThread object for a connection generates OnClientRead or OnClientWrite events when the server socket needs to read or write.

Set ServerType to stNonBlocking to handle all reading and writing over socket connections accepted by the listening socket asynchronously. When ServerType is stNonBlocking, all client connections are handled in a single execution thread by default. OnClientRead or OnClientWrite events occur when the server socket needs to attend to I/O over one of the connections.

Use a non-blocking socket when reading and writing must be synchronized with client sockets.

Note:	When ServerType is stThreadBlocking, it is important that the OnClient... event handlers contain thread-safe code.


TServerWinSocket.ThreadCacheSize
 VCL Reference

TServerWinSocket.ThreadCacheSize

TServerWinSocket	See also

Indicates the number of TServerClientThread objects cached for reuse by new connections to client sockets.

property ThreadCacheSize: Integer;

Description

When ServerType is stThreadBlocking, each new connection that is accepted by the server socket is given a separate execution thread. In order to improve performance, server sockets store these threads in a cache rather than freeing them when the connection is closed. New connections can then reuse threads from the cache, rather than requiring the socket server to create a new thread every time a connection is accepted.

Set ThreadCacheSize to specify the number of threads that are cached for reuse. The ideal value for ThreadCacheSize depends on the number and frequency of client socket requests received by the server socket. If ThreadCacheSize is too low, the server socket will spend more time freeing and creating threads when client connections are accepted. If ThreadCacheSize is too high, the server socket may unnecessarily lock up the memory for threads that are never reused.


 VCL Reference

TServerWinSocket events

TServerWinSocket	Alphabetically	Legend

In TServerWinSocket

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnGetSocket

OnGetThread

OnThreadEnd

OnThreadStart

Derived from TCustomWinSocket

OnErrorEvent

OnSocketEvent


 VCL Reference

TServerWinSocket events

TServerWinSocket	By object	Legend

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnErrorEvent

OnGetSocket

OnGetThread

OnSocketEvent

OnThreadEnd

OnThreadStart


TServerWinSocket.OnClientConnect
 VCL Reference

TServerWinSocket.OnClientConnect

TServerWinSocket	See also

Occurs when a client socket completes a connection accepted by the listening socket.

property OnClientConnect: TSocketNotifyEvent;

Description

Write an OnClientConnect event handler to take specific action when a client socket completes the socket connection to a TServerClientWinSocket object. Depending on the service, this is the point when the socket should begin reading or writing.

The order of Windows server socket events leading up to OnClientConnect is as follows:

1	An OnSocketEvent event of type seListen occurs just before the Windows socket is opened for listening.

2	The listening Windows socket receives client requests in a listening queue. The listening socket accepts one of those requests, and receives a Windows socket handle for the new socket connection.

3	The listening socket generates an OnGetSocket event, passing in the Windows socket handle. If a TServerClientWinSocket object for the Windows socket handle was not created in the OnGetSocket event handler, the Windows socket creates one. The Windows socket continues to listen for other clients.

4	An OnSocketEvent event of type seAccept occurs, using the new TServerClientWinSocket object.

5	If ServerType is stThreadBlocking and no thread is available in the cache, an OnGetThread event occurs. If the OnGetThread event handler does not create a thread, the Windows socket object creates a TServerClientThread.

6	If ServerType is stThreadBlocking, an OnThreadStart event occurs as the thread begins execution.

7	The client completes the connection to the TServerClientWinSocket object and an OnClientConnect event occurs.

The Sender parameter is the TServerWinClient object that listens for client requests. The Socket parameter is the TServerClientWinSocket object that forms a connection to the client socket.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientConnect event handler is thread-safe. Use the GetClientThread method to access thread-specific information.

Note:	The OnClientConnect event handler for TServerWinSocket is also set when setting the OnClientConnect event handler of the associated TServerSocket.


TServerWinSocket.OnClientDisconnect
 VCL Reference

TServerWinSocket.OnClientDisconnect

TServerWinSocket	See also

Occurs when one of the connections to a client socket is closed.

property OnClientDisconnect: TSocketNotifyEvent;

Description

Write an OnClientDisconnect event handler to take specific action when the connection to a client socket is ending. The termination of a client request does not close the listening socket. The listening connection remains open for accepting new client connection requests.

The TServerClientWinSocket object associated with the client connection is freed after OnClientDisconnect. If ServerType is stThreadBlocking, OnThreadEnd occurs after OnClientDisconnect.

The Sender parameter is the TServerWinClient object that received the client request. The Socket parameter is the TServerClientWinSocket object that is ending a connection with the client socket.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientDisconnect event handler is thread-safe.Use the GetClientThread method to access thread-specific information.

Note:	The OnClientDisconnect event handler for TServerWinSocket is also set when setting the OnClientDisconnect event handler of the associated TServerSocket.


TServerWinSocket.OnClientError
 VCL Reference

TServerWinSocket.OnClientError

TServerWinSocket	See also

Occurs when a failure is encountered when establishing, using, or terminating the socket connection to an individual client socket.

property OnClientError: TSocketErrorEvent;

Description

Write an OnClientError event handler to respond to errors that arise with the connection to a client socket. Set the ErrorCode parameter to 0 if the OnClientError event handler successfully deals with the error condition, to prevent an ESocketError from being raised.

The Sender parameter is the TServerWinClient object that received the client request. The Socket parameter is the TServerClientWinSocket object that manages the connection to the client. The ErrorEvent parameter indicates what Socket was attempting to do when the error occurred. The ErrorCode parameter is the error code returned by the Windows socket API call.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientError event handler is thread-safe. Use the GetClientThread method to access thread-specific information.

Note:	The OnClientError event handler for TServerWinSocket is also set when setting the OnClientError event handler of the associated TServerSocket.


TServerWinSocket.OnClientRead
 VCL Reference

TServerWinSocket.OnClientRead

TServerWinSocket	See also

Occurs when the server socket should read information from a client socket.

property OnClientRead: TSocketNotifyEvent;

Description

Write an OnClientRead event handler to read from the socket connection. Use a TWinSocketStream object or the methods of the Socket parameter to do the reading.

The Sender parameter is the TServerWinClient object that received the client request. The Socket parameter is the TServerClientWinSocket object that encapsulates the Windows socket connection.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientRead event handler is thread-safe. Use the GetClientThread method to access thread-specific information.

Note:	The OnClientRead event handler for TServerWinSocket is also set when setting the OnClientRead event handler of the associated TServerSocket.


TServerWinSocket.OnClientWrite
 VCL Reference

TServerWinSocket.OnClientWrite

TServerWinSocket	See also

Occurs when the server socket should write information to a client socket.

property OnClientWrite: TSocketNotifyEvent;

Description

Write an OnClientWrite event handler to write to the socket connection. Use a TWinSocketStream object or the methods of the Socket parameter to do the actual writing.

The Sender parameter is the TServerWinClient object that received the client request. The Socket parameter is the TServerClientWinSocket object that encapsulates the Windows socket connection.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientWrite event handler is thread-safe. Use the GetClientThread method to access thread-specific information.

Note:	The OnClientWrite event handler for TServerWinSocket is also set when setting the OnClientWrite event handler of the associated TServerSocket.


TServerWinSocket.OnGetSocket
 VCL Reference

TServerWinSocket.OnGetSocket

TServerWinSocket	See also

Occurs when the server socket needs to create a new TServerClientWinSocket object to form the connection to a client socket.

type

TGetSocketEvent = procedure (Sender: TObject; Socket: TSocket; var ClientSocket: TServerClientWinSocket) of object;

property OnGetSocket: TGetSocketEvent;

Description

Write an OnGetSocket event handler to create a specialized TServerClientWinSocket object to use in the connection represented by the Socket parameter. Return the new TServerClientWinSocket object in the ClientSocket parameter.

The Sender parameter is the TServerWinSocket object that received the client request. The Socket parameter is the Windows socket handle for the socket connection to the client socket.

Note:	The OnGetSocket event handler for TServerWinSocket is also set when setting the OnGetSocket event handler of the associated TServerSocket.


TServerWinSocket.OnGetThread
 VCL Reference

TServerWinSocket.OnGetThread

TServerWinSocket	See also

Occurs when the server socket needs to create a new execution thread for a connection to a client socket.

type

TGetThreadEvent = procedure (Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread) of object;

property OnGetThread: TGetThreadEvent;

Description

Write an OnGetThread event handler to create a specialized descendant of TServerClientThread for the connection to the client socket. Create the new thread with the CreateSuspended parameter set to False, and return it in the SocketThread parameter. OnGetThread only occurs if there are no idle threads in the cache.

Most applications that use thread-blocking connections will want to create a new descendant of TServerClientThread in an OnGetThread event handler. This is because the default behavior of TServerClientThread uses the OnClientRead and OnClientWrite event handlers for reading and writing. These events occur on the server socket, which is not thread-local.

The Sender parameter is the TServerWinSocket object that received the client request. The ClientSocket parameter is the TServerClientWinSocket object that will communicate with the client socket.

Note:	The OnGetThread event handler for TServerWinSocket is also set when setting the OnGetThread event handler of the associated TServerSocket.


TServerWinSocket.OnThreadEnd
 VCL Reference

TServerWinSocket.OnThreadEnd

TServerWinSocket	See also

Occurs when a client socket connection is terminated and the associated thread finishes execution.

type

TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

property OnThreadEnd: TThreadNotifyEvent;

Description

Write an OnThreadEnd to take specific action when the thread for a client connection finishes execution. OnThreadEnd occurs after the OnClientDisconnect event.

The Sender parameter is the TServerWinSocket that received the client request. The Thread parameter is the thread that is finishing up.

Note:	The OnThreadEnd event handler for TServerWinSocket is also set when setting the OnThreadEnd event handler of the associated TServerSocket.


TServerWinSocket.OnThreadStart
 VCL Reference

TServerWinSocket.OnThreadStart

TServerWinSocket	See also

Occurs when the execution thread for a connection to a client socket starts up.

type TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

property OnThreadStart: TThreadNotifyEvent;

Description

Write an OnThreadStart to initialize the TServerClientThread for the connection to a single client socket. The Sender parameter is the TServerWinSocket that received the client request. The Thread parameter is the thread that is about to start execution.

Note:	The OnThreadStart event handler for TServerWinSocket is also set when setting the OnThreadStart event handler of the associated TServerSocket.


 VCL Reference

TServerWinSocket methods

TServerWinSocket	Alphabetically	Legend

In TServerWinSocket

Accept

Create

Destroy

Disconnect

GetClientThread

Listen

Derived from TCustomWinSocket

Close

Connect

Lock

LookupName

LookupService

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TServerWinSocket methods

TServerWinSocket	By object	Legend

Accept

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

Disconnect

Dispatch

FieldAddress

Free

FreeInstance

GetClientThread

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

Listen

Lock

LookupName

LookupService

MethodAddress

MethodName

NewInstance

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SafeCallException

SendBuf

SendStream

SendStreamThenDrop

SendText

Unlock

Write


TServerWinSocket.Accept
 VCL Reference

TServerWinSocket.Accept

TServerWinSocket	See also

Accepts a connection to a client socket.

procedure Accept(Socket: TSocket); override;

Description

Accept is called automatically in response to notifications that a client socket is requesting a connection. The Socket parameter is the Windows socket handle for the listening connection.

Accept accepts the client connection request, obtaining the Windows socket handle for the client connection. It then generates an OnGetSocket event, passing this socket handle as an argument to any event handler. If a TServerClientWinSocket is not created by an OnGetSocket event handler, Accept creates a TServerClientWinSocket to represent the server endpoint of the accepted connection. Next, Accept obtains a running TServerClientThread, either by restarting a thread in the cache, obtaining one from an OnGetThread event, or creating a new TServerClientThread object. This new thread handles the connection to the client socket.

Accept is only called if the ASyncStyles property includes asAccept.


TServerWinSocket.Create
 VCL Reference

TServerWinSocket.Create

TServerWinSocket	See also

Creates an instance of TServerWinSocket from a Windows socket handle.

constructor Create(ASocket: TSocket);

Description

Call Create to create a Windows listening socket object. Windows listening socket objects are created automatically by the server socket component that uses them.

Create allocates the helper objects that manage the list of active client connections and the thread cache before calling the inherited constructor. Create also initializes the ASyncStyles property to [asAccept].


TServerWinSocket.Destroy
 VCL Reference

TServerWinSocket.Destroy

TServerWinSocket	See also

Destroys an instance of TServerWinSocket.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the Windows listening socket object is not nil, and only then calls Destroy. Unless the Windows socket object is not used by a server socket component, it is freed automatically by the socket component.

Destroy frees the helper objects that manage the list of active client connections and the thread cache.


TServerWinSocket.Disconnect
 VCL Reference

TServerWinSocket.Disconnect

TServerWinSocket	See also

Shuts down the socket connection represented by a Windows socket handle.

procedure Disconnect(Socket: TSocket);

Description

Disconnect is called by the Close method to terminate the socket connection.

Disconnect calls the Lock method to make sure the method is thread-safe. Then, it terminates all open connections to client sockets. Next it generates an OnSocketEvent of type seDisconnect. Finally, it closes the listening connection and calls Unlock to end the critical section started by Lock.


TServerWinSocket.GetClientThread
 VCL Reference

TServerWinSocket.GetClientThread

TServerWinSocket	See also

Returns the execution thread used by the client connection managed by the ClientSocket parameter.

function GetClientThread(ClientSocket: TServerClientWinSocket): TServerClientThread;

Description

Use GetClientThread to obtain access to the TServerClientThread for a particular client connection. GetClientThread allows an OnClient... event handler to access thread-global information saved in the Data property of the thread.


TServerWinSocket.Listen
 VCL Reference

TServerWinSocket.Listen

TServerWinSocket	See also

Opens a listening connection for a server socket.

procedure Listen(const Name, Address, Service: string; Port: Word;

Description

Server socket components call Listen to open a listening connection.

Listen creates the Windows socket that will make the listening connection, and binds the Windows Internet socket address derived from the parameters to the socket. Listen then generates an OnSocketEvent of type seListen. Finally, Listen opens the socket as a listening connection with a queue that can hold QueueSize client requests, setting the Connected property to True.

The Name, Address, Service, and Port parameters are taken from the Host, Address, Service and Port properties of the server socket component. The QueueSize is set to 5 by TServerSocket.


Hierarchy

TObject

TCustomWinSocket

TServerWinSocket


THTMLTableCellAttributes
 VCL Reference

THTMLTableCellAttributes

Hierarchy	Properties	Methods	Events	See also

THTMLTableCellAttributes represents the display attributes of an HTML table cell tag.

Unit

HTTPProd

Description

Use THTMLTableCellAttributes to describe the desired appearance of a cell in an HTML table. The properties of the THTMLTableCellAttributes object correspond to the options that can be added to the HTML table data tag (TD). When the attributes of all the parts of the HTML table have been specified, an HTML producer object creates the HTML commands to specify the table as described.


 VCL Reference

THTMLTableCellAttributes properties

THTMLTableCellAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTableCellAttributes properties

THTMLTableCellAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


 VCL Reference

THTMLTableCellAttributes events

THTMLTableCellAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 VCL Reference

THTMLTableCellAttributes events

THTMLTableCellAttributes	By object	Legend

OnChange


 VCL Reference

THTMLTableCellAttributes methods

THTMLTableCellAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

RestoreDefaults

Derived from THTMLTagAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableCellAttributes methods

THTMLTableCellAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


Hierarchy

TObject

TPersistent

THTMLTagAttributes

THTMLTableElementAttributes

THTMLTableCellAttributes


THTMLTableHeaderAttributes
 VCL Reference

THTMLTableHeaderAttributes

Hierarchy	Properties	Methods	Events	See also

THTMLTableHeaderAttributes represents the display attributes of the header tag in an HTML table.

Unit

HTTPProd

Description

Use THTMLTableHeaderAttributes to describe the desired appearance of a header cell in an HTML table. The properties of the THTMLTableHeaderAttributes object correspond to the options that can be added to the HTML header tag (TH). When the attributes of all the parts of the HTML table have been specified, the HTML content producer creates the HTML commands to specify the table as described.


 VCL Reference

THTMLTableHeaderAttributes properties

THTMLTableHeaderAttributes	Alphabetically	Legend

In THTMLTableHeaderAttributes

Caption

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTableHeaderAttributes properties

THTMLTableHeaderAttributes	By object	Legend

Align

BgColor

Caption

Custom

Producer

VAlign


THTMLTableHeaderAttributes.Caption
 VCL Reference

 THTMLTableHeaderAttributes.Caption

THTMLTableHeaderAttributes	See also

Represents the text that appears in the header cell.

property Caption: string;

Description

Set the Caption property to provide a caption for the column that contains the header cell. If the header cell is used by a dataset table producer or a query table producer, the Caption property overrides the field name that would label the column by default.


 VCL Reference

THTMLTableHeaderAttributes events

THTMLTableHeaderAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 VCL Reference

THTMLTableHeaderAttributes events

THTMLTableHeaderAttributes	By object	Legend

OnChange


 VCL Reference

THTMLTableHeaderAttributes methods

THTMLTableHeaderAttributes	Alphabetically	Legend

In THTMLTableHeaderAttributes

RestoreDefaults

Derived from THTMLTagAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableHeaderAttributes methods

THTMLTableHeaderAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


THTMLTableHeaderAttributes.RestoreDefaults
 VCL Reference

 THTMLTableHeaderAttributes.RestoreDefaults

THTMLTableHeaderAttributes	See also

Changes all properties of the attributes object back to their initial settings.

procedure RestoreDefaults; override;

Description

Call RestoreDefaults to undo any changes that were made to the table element attributes either programmatically, or using the Object Inspector at design time. RestoreAttributes sets

Align to haDefault, and VAlign to haVDefault.

BgColor to an empty string.

Caption to an empty string.

Custom to an empty string.


Hierarchy

TObject

TPersistent

THTMLTagAttributes

THTMLTableElementAttributes

THTMLTableHeaderAttributes


THTMLTableColumn
 VCL Reference

THTMLTableColumn

Hierarchy	Properties	Methods	See also

THTMLTableColumn represents the display attributes and field binding of a column in the HTML representation of a dataset.

Unit

DBWeb

Description

Use THTMLTableColumn to specify the appearance or value of a column in a table produced by TDSTableProducer. Applications can set the properties of the columns programmatically at runtime, or use the Columns editor at design time.


 VCL Reference

THTMLTableColumn properties

THTMLTableColumn	Alphabetically	Legend

In THTMLTableColumn

Align

BgColor

Custom

DSTableProducer

Field

FieldName

Title

VAlign

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

THTMLTableColumn properties

THTMLTableColumn	By object	Legend

Align

BgColor

Collection

Custom

DSTableProducer

Field

FieldName

ID

Index

Title

VAlign


THTMLTableColumn.Align
 VCL Reference

THTMLTableColumn.Align

THTMLTableColumn	See also

Specifies the horizontal alignment of the contents of the cells in the column.

property Align: THTMLAlign;

Description

Set Align to indicate the desired horizontal alignment of text in the cells of the column. Align indicates the desired value of the Align option of the HTML TD tag.

The default value of Align is haDefault, which means the web browser that reads the HTML document horizontally positions the contents of cells wherever it wishes.


THTMLTableColumn.BgColor
 VCL Reference

THTMLTableColumn.BgColor

THTMLTableColumn	See also 	Example

Specifies the background color of the cells in the column.

property BgColor: THTMLBgColor;

Description

Use BgColor to indicate a value for the BgColor option of the HTML TD tag. The value of BgColor is the name of color. This can be one of the following strings:

Aqua	Black	Blue

Fuschia	Gray	Green

Lime	Maroon	Navy

Olive	Purple	Red

Silver	Teal	White

Yellow

Use the BgColor property of the THTMLTableAttributes object to set a background color for the entire table. Use the BgColor property of THTMLTableColumn to make a column stand out from the rest of the table.


THTMLTableColumn.Custom
 VCL Reference

THTMLTableColumn.Custom

THTMLTableColumn	See also

Specifies a tag option and its value in the HTML TD tags for the cells in the column.

property Custom: string;

Description

Use Custom to represent one or more options to be added to an HTML tag. Each option and its value should have the form

OPTIONNAME=Value

If Custom specifies more than one option, each object should be separated from the others by spaces.


THTMLTableColumn.DSTableProducer
 VCL Reference

THTMLTableColumn.DSTableProducer

THTMLTableColumn 	See also

Indicates the table producer component that uses this column.

property DSTableProducer: TDSTableProducer;

Description

Read DSTableProducer to obtain information about the component that uses this object to represent the attributes of a column in the HTML table it produces. For example, to access the dataset which contains the field for this column, use the Dataset property of DSTableProducer.


THTMLTableColumn.Field
 VCL Reference

THTMLTableColumn.Field

THTMLTableColumn	See also

Indicates the field component associated with the field binding of the column.

property Field: TField;

Description

Read Field to get direct access to the field component for the column. Usually, Field is a field component maintained by the dataset. In some cases, however, Field is maintained directly by THTMLTableColumn, such as when the column represents a calculated field. Do not set the Field property unless the TField object is obtained from the dataset of the TDSTableProducer that uses this THTMLTableColumn object, or is a calculated field based on that dataset.

Setting Field automatically updates the FieldName property.


THTMLTableColumn.FieldName
 VCL Reference

THTMLTableColumn.FieldName

THTMLTableColumn	See also

Specifies the name of the field to which the column is bound.

property FieldName: string;

Description

Set FieldName to specify the field binding for the column in the HTML table. FieldName identifies a particular field component in the dataset of the TDSTableProducer object that uses this THTMLTableColumn object.

Setting FieldName automatically updates the Field property.


THTMLTableColumn.Title
 VCL Reference

THTMLTableColumn.Title

THTMLTableColumn	See also

Specifies the display attributes to be added to the header cell that appears at the top of the column.

property Title: THTMLTableHeaderAttributes;

Description

Set Title to a THTMLTableHeaderAttributes object that describes the display attributes for the HTML TH tag for the header cell at the top of the column. Setting Title calls the Assign method of the THTMLTableHeaderAttributes object stored internally by THTMLTableColumn. Thus, the memory for any table header attributes object assigned to the Title property is never owned or freed by the HTML table column.

Note:	Not all the properties of the table header attributes object are copied when one table attributes object is assigned to another. To ensure that all the attributes represented by Title are set appropriately, read Title and set the individual properties of the THTMLTableHeaderAttributes object.


THTMLTableColumn.VAlign
 VCL Reference

THTMLTableColumn.VAlign

THTMLTableColumn	See also

Specifies the vertical alignment of the contents of the cells in the column.

property VAlign: THTMLVAlign;

Description

Set VAlign to indicate the desired vertical alignment of text in the cells of the column. VAlign indicates the desired value of the VAlign option of the HTML <TD> tag.

The default value of VAlign is haVDefault, which means the web browser that reads the HTML document vertically positions the contents of cells wherever it wishes.


 VCL Reference

THTMLTableColumn methods

THTMLTableColumn	Alphabetically	Legend

In THTMLTableColumn

AssignTo

Create

Destroy

RestoreDefaults

Update

Derived from TCollectionItem

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableColumn methods

THTMLTableColumn	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException

Update


THTMLTableColumn.AssignTo
 VCL Reference

THTMLTableColumn.AssignTo

THTMLTableColumn	See also

Copies the properties of a THTMLTableColumn object to another THTMLTableColumn object.

procedure AssignTo(Dest: TPersistent); override;

Description

Applications cannot call the AssignTo method. To assign the properties of a THTMLTableColumn object to another object, use the Assign method of the destination object.

When the Assign method of another object specifies a THTMLTableColumn object as the source of the assignment, the AssignTo method of the THTMLTableColumn object is called. AssignTo checks whether the Dest parameter is another THTMLTableColumn object, and if so, copies the values of all properties except Custom and DisplayName. If Dest is any other class of object, the inherited method is called.


THTMLTableColumn.Create
 VCL Reference

THTMLTableColumn.Create

THTMLTableColumn	See also

Creates an instance of THTMLTableColumn.

constructor Create(Collection: TCollection); override;

Description

Do not call Create to create and initialize a THTMLTableColumn object. Columns created using the Columns editor at design time are created automatically. At runtime, create THTMLTableColumn objects using the Add or Insert methods of the THTMLTableColumns object that manages them.

After allocating the THTMLTableColumn object, Create tells the associated TDSTableProducer object to update its layout.


THTMLTableColumn.Destroy
 VCL Reference

THTMLTableColumn.Destroy

THTMLTableColumn	See also

Destroys an instance of THTMLTableColumn.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the THTMLTableColumn reference is not nil, and only then calls Destroy. Do not explicitly free a THTMLTableColumn that is included in a THTMLTableColumns object. THTMLTableColumns frees the individual column objects it manages.


THTMLTableColumn.RestoreDefaults
 VCL Reference

THTMLTableColumn.RestoreDefaults

THTMLTableColumn	See also

Changes all properties of the attributes object back to their initial settings.

procedure RestoreDefaults; override;

Description

Call RestoreDefaults to undo any changes that were made to the table element attributes either programmatically, or using the Columns editor at design time. RestoreAttributes sets

Align to haDefault, and VAlign to haVDefault.

BgColor to an empty string.

Custom to an empty string.

It also restores the default settings for the THTMLTableHeaderAttributes object that represents the title of the column.


THTMLTableColumn.Update
 VCL Reference

THTMLTableColumn.Update

THTMLTableColumn 	See also

Ensures that the Field property reflects the underlying dataset.

procedure Update;

Description

Call Update to ensure that the Field property reflects any changes to the fields in the underlying dataset.


Hierarchy

TObject

TPersistent

TCollectionItem

THTMLTableColumn


TTypedComObjectFactory
 VCL Reference

TTypedComObjectFactory

Hierarchy	Properties	Methods

TTypedComObjectFactory is the type of the class factory object used to instantiate a TypedComObject class.

Unit

ComObj

Description

TTypedComObjectFactory inherits support for the IUnknown, IClassFactory, and IClassFactory2 interfaces. TTypedComObjectFactory is used to instantiate the TTypedComObject class.


 VCL Reference

TTypedComObjectFactory properties

TTypedComObjectFactory	Alphabetically	Legend

In TTypedComObjectFactory

ClassInfo

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TTypedComObjectFactory properties

TTypedComObjectFactory	By object	Legend

ClassID

ClassInfo

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


TTypedComObjectFactory.ClassInfo
 VCL Reference

TTypedComObjectFactory.ClassInfo

TTypedComObjectFactory

Specifies an interface reference that provides type information without having to load a type library.

property ClassInfo: ITypeInfo;

Description

ClassInfo is of type ITypeInfo, which is an interface usually used for reading information about objects. Use ITypeInfo to extract information about the characteristics and capabilities of objects from type libraries.

Type information interfaces are intended to describe the parts of the application that can be called by outside clients, rather than those that might be used internally to build an application.

The ITypeInfo interface provides access to the following:

The set of function descriptions associated with the type; for interfaces, this contains the set of member functions in the interface.

The set of data member descriptions associated with the type; for structures, this contains the set of fields of the type.

The general attributes of the type, such as whether it describes a structure, an interface, and so on.

An ITypeInfo instance provides various information about a type, and is used in different ways. A compiler can use an ITypeInfo to compile references to members of the type. A type interface browser can use it to find information about each member of the type.

Note:	An IDispatch implementer can use it to provide automatic delegation of IDispatch calls to an interface.

Note:	A type library is a container for type descriptions. A type library contains descriptions of one or more objects, and is accessed through the ITypeLib interface. The ITypeLib interface provides access to information about the type description in a type library. The descriptions of individual objects are accessed through the ITypeInfo interface.


 VCL Reference

TTypedComObjectFactory methods

TTypedComObjectFactory	Alphabetically	Legend

In TTypedComObjectFactory

Create

GetInterfaceTypeInfo

UpdateRegistry

Derived from TComObjectFactory

CreateComObject

Destroy

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TTypedComObjectFactory methods

TTypedComObjectFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterfaceTypeInfo

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TTypedComObjectFactory.Create
 VCL Reference

TTypedComObjectFactory.Create

TTypedComObjectFactory	See also

Instantiates a TTypedComObjectFactory object.

constructor Create(ComServer: TComServerObject; TypedComClass: TTypedComClass; const ClassID: TGUID; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);

Description

Create is used to instantiate a TTypedComObjectFactory. Create is automatically called when the COM server that contains the class definition for a TTypedComObject is loaded. Class factories should be instantiated in the initialization section of the unit that includes their associated server.

Create allocates memory for a TTypedComObjectFactory, and verifies that a type library exists and is available, before calling the inherited Create. If the type library is not available, an EOleSysError exception is raised.


TTypedComObjectFactory.GetInterfaceTypeInfo
 VCL Reference

TTypedComObjectFactory.GetInterfaceTypeInfo

TTypedComObjectFactory

Retrieves the type information for the typed COM object created by the factory.

function GetInterfaceTypeInfo(TypeFlags: Integer): ITypeInfo;

Description

GetInterfaceTypeInfo is called to retrieve type information on the TTypedComObject instances that are created by the factory.


TTypedComObjectFactory.UpdateRegistry
 VCL Reference

TTypedComObjectFactory.UpdateRegistry

TTypedComObjectFactory	See also

Registers the typed COM object class.

procedure UpdateRegistry(Register: Boolean); override;

Description

UpdateRegistry is called for EXEs when the EXE is run, and for DLLs or EXEs when the routines are called to specifically register or unregister the server.


Hierarchy

TObject

TComObjectFactory

TTypedComObjectFactory


TUpdateSQL
 VCL Reference

 TUpdateSQL

Hierarchy	Properties	Methods 	Using TUpdateSQL	See also	Example

TUpdateSQL applies cached updates on behalf of queries or stored procedures that can’t post updates directly.

Unit

DBTables

Description

Use a TUpdateSQL object to provide SQL statements used to update read-only datasets represented by TQuery or TStoredProc components when cached updates are enabled. A dataset is read-only either by design or circumstance. If a dataset is read-only by design, the application itself does not provide a user interface for updating data, but may institute a programmatic scheme behind the scenes. If a dataset is read-only by circumstance, it indicates that the Borland Database Engine (BDE) returned a read-only result set. This usually happens for queries made against multiple tables. Such queries are, by SQL-92 definitions, read-only.

TUpdateSQL provides a mechanism for circumventing what some developers consider an SQL-92 limitation. It enables a developer to provide INSERT, UPDATE, and DELETE statements for performing separate update queries on otherwise read-only result sets in such a manner that the separate update queries are transparent to the end user.

In practical application, a TUpdateSQL object is placed on a data module or form, and linked to a TQuery or TStoredProc component through that component’s UpdateObject property. If the UpdateObject property points to a valid TUpdateSQL object, the SQL statements belonging to the update object are automatically applied when cached updates are applied.


 VCL Reference

TUpdateSQL properties

TUpdateSQL	Alphabetically	Legend

In TUpdateSQL

DatabaseName

DataSet

DeleteSQL

InsertSQL

ModifySQL

Query

SessionName

SQL

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TUpdateSQL properties

TUpdateSQL	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DatabaseName

DataSet

DeleteSQL

DesignInfo

InsertSQL

ModifySQL

Name

Owner

Query

SessionName

SQL

Tag

VCLComObject


TUpdateSQL.DatabaseName
 VCL Reference

TUpdateSQL.DatabaseName

TUpdateSQL	See also

Identifies the database to which updates are applied.

property DatabaseName: string;

Description

When the DataSet property is not a BDE-enabled dataset, you must set DatabaseName to identify the database to which updates are applied. DatabaseName should be the same as the DatabaseName property of the source dataset (the dataset that fetches data from the database server). This property is used to set the DatabaseName property of the internal queries that apply the updates.


TUpdateSQL.DataSet
 VCL Reference

TUpdateSQL.DataSet

TUpdateSQL	See also	Example

Identifies the dataset that holds the updated data that the update object applies.

property DataSet: TDataSet;

Description

TUpdateSQL uses the DataSet property for two purposes:

It fetches the original and updated field values from this dataset when performing parameter substitution.

If this dataset is a TDBDataSet descendant, it uses its DatabaseName and SessionName properties to identify the database and session that it uses when performing its update queries.

If you are using a single update object, then the DataSet property is set automatically when you set the source dataset’s UpdateObject property.

If you are using multiple update objects, you must set the DataSet property at runtime in a BeforeUpdateRecord or OnUpdateRecord event handler. If you are using the source dataset to cache its own updates, set DataSet to the source dataset in an OnUpdateRecord event handler. If you are using a client dataset to cache updates, set DataSet to the DeltaDS parameter of the BeforeUpdateRecord event handler.


TUpdateSQL.DeleteSQL
 VCL Reference

TUpdateSQL.DeleteSQL

TUpdateSQL	See also

Specifies the SQL DELETE statement to use when applying a cached deletion of a record.

property DeleteSQL: TStrings;

Description

Set DeleteSQL to the SQL DELETE statement to use when applying a deletion to a record. Statements can be parameterized queries. To create a DELETE statement at design time, use the UpdateSQL editor to create statements, such as:

DELETE FROM "Country.db"

WHERE Name = :OLD_Name

At run time, an application can write a statement directly to this property to set or change the DELETE statement.

Note:	As the example illustrates, DeleteSQL supports an extension to normal parameter binding. To retrieve the value of a field as it exists prior to application of cached updates, the field name with ‘OLD_’. This is especially useful when doing field comparisons in the WHERE clause of the statement.


TUpdateSQL.InsertSQL
 VCL Reference

TUpdateSQL.InsertSQL

TUpdateSQL	See also

Specifies the SQL INSERT statement to use when applying a cached insertion of a record.

property InsertSQL: TStrings;

Description

Set InsertSQL to the SQL INSERT statement to use when applying an insertion to a dataset. Statements can be parameterized queries. To create a INSERT statement at design time, use the UpdateSQL editor to create statements, such as:

INSERT INTO "Country.db"

(Name, Capital, Continent)

VALUES (:Name, :Capital, :Continent)

WHERE :OLD_Name = "Rangoon"

At run time, an application can write a statement directly to this property to set or change the INSERT statement.

Note:	As the example illustrates, InsertSQL supports an extension to normal parameter binding. To retrieve the value of a field as it exists prior to application of cached updates, the field name with ‘OLD_’. This is especially useful when doing field comparisons in the WHERE clause of the statement.


TUpdateSQL.ModifySQL
 VCL Reference

TUpdateSQL.ModifySQL

TUpdateSQL	See also

Specifies the SQL UPDATE statement to use when applying an update to a record and cached updates is enabled.

property ModifySQL: TStrings;

Description

Set ModifySQL to the SQL UPDATE statement to use when applying an updated record to a dataset. Statements can be parameterized queries. To create a UPDATE statement at design time, use the UpdateSQL editor to create statements, such as:

UPDATE "Country.db"

SET Name = :Name, Capital = :Capital, Continent = :Continent

WHERE Name = :OLD_Name

At run time, an application can write a statement directly to this property to set or change the UPDATE statement.

Note:	As the example illustrates, ModifySQL supports an extension to normal parameter binding. To retrieve the value of a field as it exists prior to application of cached updates, the field name with ‘OLD_’. This is especially useful when doing field comparisons in the WHERE clause of the statement.


TUpdateSQL.Query
 VCL Reference

TUpdateSQL.Query

TUpdateSQL	See also	Example

Returns the query object used to perform a specified kind of update.

property Query[UpdateKind: TUpdateKind]: TQuery;

Description

Query is a read-only property that provides a reference to the internal TQuery that executes the SQL that applies the cached data updates. Use properties and methods of TQuery to work with this reference.

Using one of the TUpdateKind constants as an index for the Query property, the internal TQuery object will have the SQL specified in the corresponding update SQL property: DeleteSQL, InsertSQL, or ModifySQL. UpdateKind can be one of the following:

Value	Meaning

ukDelete	Return the query object used to execute DELETE statements (DeleteSQL).

ukInsert	Return the query object used to execute INSERT statements (InsertSQL).

ukModify	Return the query object used to execute UPDATE statements (ModifySQL).

Each query object executes a particular kind of SQL statement. The contents of the SQL statements executed by these objects can be accessed directly using the ModifySQL, InsertSQL, and DeleteSQL properties.

The main purpose of Query is to provide a a way for an application to set the properties for an update query object or to call the query object’s methods.

Note:	If a particular kind of update statement is not provided, then its corresponding query object is nil. For example, if an application does not provide an SQL statement for the DeleteSQL property, then setting Query[ukDelete] returns nil.


TUpdateSQL.SessionName
 VCL Reference

TUpdateSQL.SessionName

TUpdateSQL	See also

Identifies the session under which updates are applied.

property SessionName: string;

Description

When the DataSet property is not a BDE-enabled dataset, you must set SessionName to identify the session under which updates are applied. SessionName should be the same as the SessionName property of the source dataset (the dataset that fetches data from the database server). This property is used to set the SessionName property of the internal queries that apply the updates.


TUpdateSQL.SQL
 VCL Reference

TUpdateSQL.SQL

TUpdateSQL	See also

Returns a specified SQL statement used when applying cached updates.

property SQL[UpdateKind: TUpdateKind]: TStrings;

Description

Returns the SQL statement in the ModifySQL, InsertSQL, or DeleteSQL property, depending on the setting of the UpdateKind index. UpdateKind can be any of the following:

Value	Meaning

ukDelete	Return the query object used to execute DELETE statements (DeleteSQL).

ukInsert	Return the query object used to execute INSERT statements (InsertSQL).

ukModify	Return the query object used to execute UPDATE statements (ModifySQL).


 VCL Reference

TUpdateSQL methods

TUpdateSQL	Alphabetically	Legend

In TUpdateSQL

Apply

Create

Destroy

ExecSQL

SetParams

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TUpdateSQL methods

TUpdateSQL	By object	Legend

AfterConstruction

Apply

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecSQL

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetParams

SetSubComponent

UpdateAction


TUpdateSQL.Apply
 VCL Reference

TUpdateSQL.Apply

TUpdateSQL	See also	Example

Sets the parameters for a specified SQL statement type, and executes the resulting statement.

procedure Apply(UpdateKind: TUpdateKind);

Description

Call Apply to set parameters for an SQL statement and execute it to update a record. UpdateKind indicates which SQL statement to bind and execute, and can be one of the following values:

Value	Meaning

ukDelete	Bind and execute the SQL statement in the DeleteSQL property

ukInsert	Bind and execute the SQL statement in the InsertSQL property

ukModify	Bind and execute the SQL statement in the ModifySQL property

Apply is primarily intended for manually executing update statements from an OnUpdateRecord event handler.

Note:	If an SQL statement does not contain parameters, it is more efficient to call ExecSQL instead of Apply.


TUpdateSQL.Create
 VCL Reference

TUpdateSQL.CreateTUpdateSQL

TUpdateSQL	See also

Creates an instance of an update object.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate an update object at run time. You do not need to call Create for update objects placed in a data module or form at design time. Delphi automatically handles these objects.


TUpdateSQL.Destroy
 VCL Reference

TUpdateSQL.Destroy

TUpdateSQL	See also

Frees an instance of an update object.

constructor Destroy;

Description

Do not call Destroy directly in an application. Usually destruction of update objects is handled automatically by Delphi. If an application creates its own instance of an update object, however, the application should call Free, which verifies that the update object is not nil before calling Destroy


TUpdateSQL.ExecSQL
 VCL Reference

TUpdateSQL.ExecSQL

TUpdateSQL	See also

Executes a specified type of SQL statement to perform an update for an otherwise read-only results set when cached updates is enabled.

procedure ExecSQL(UpdateKind: TUpdateKind); virtual;

Description

Call ExecSQL to execute the SQL statement necessary for updating the records belonging to a read-only result set when cached updates is enabled. UpdateKind specifies the statement to execute, and can be one of the following values:

Value	Meaning

ukDelete	Execute the SQL statement used to delete records in the dataset (DeleteSQL).

ukInsert	Execute the SQL statement used to insert new records into the dataset (InsertSQL).

ukModify	Execute the SQL statement used to update records in the dataset (ModifySQL).

If the statement to execute contains any parameters, an application must call SetParams to bind the parameters before calling ExecSQL. To determine if a statement contains parameters, examine the appropriate ModifySQL, InsertSQL, or DeleteSQL property, depending on the statement type intended for execution.

Note:	To both bind parameters and execute a statement, call Apply.


TUpdateSQL.SetParams
 VCL Reference

TUpdateSQL.SetParams

TUpdateSQL	See also

Binds parameters in an SQL statement prior to statement execution.

procedure SetParams(UpdateKind: TUpdateKind); virtual;

Description

Call SetParams to bind parameters in an SQL statement associated with the update object prior to executing the statement. UpdateKind indicates the type of statement for which to bind parameters, and can be one of the following values:

Value	Meaning

ukDelete	Bind parameters for the SQL statement used to delete records (DeleteSQL).

ukInsert	Bind parameters for the SQL statement used to insert new records (InsertSQL).

ukModify	Bind parameters for SQL statement used to update records (ModifySQL).

Parameters are indicated in an SQL statement by a colon. Except for the leading colon in the parameter name, the parameter name must exactly match the name of an existing field name for the dataset.

Note:	Parameter names can be prefaced by the ‘OLD_’ indicator. If so, the old value of the field is used to perform the update instead of any updates in the cache.


Hierarchy

TObject

TPersistent

TComponent

TDataSetUpdateObject

TSQLUpdateObject

TUpdateSQL


TVarBytesField
 VCL Reference

TVarBytesField

Hierarchy	Properties	Methods	Events 	Using TVarBytesField	See also

TVarBytesField represents a variable-length untyped binary field in a dataset.

Unit

DB

Description

A variable bytes field value is a set of bytes of variable size, with the actual length of the value stored in the first two bytes.

If you use the Fields editor at design time to create a persistent field component for the variable bytes field, you can access it by name at runtime. When using dynamic field components, you can access the TVarBytesField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TVarBytesField properties

TVarBytesField	Alphabetically	Legend

In TVarBytesField

DataSize

Derived from TBinaryField

AsString

AsVariant

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TVarBytesField properties

TVarBytesField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TVarBytesField.DataSize
 VCL Reference

TVarBytesField.DataSize

TVarBytesField	See also	Example

Indicates the amount of memory needed to store the value of a variable bytes field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a variable bytes field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For variable bytes fields, DataSize is Size + 2. The unformatted data can take up to Size bytes, and the extra 2 bytes store the length of the unformatted data.


 VCL Reference

TVarBytesField events

TVarBytesField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TVarBytesField events

TVarBytesField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TVarBytesField methods

TVarBytesField	Alphabetically	Legend

In TVarBytesField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TVarBytesField methods

TVarBytesField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TVarBytesField.Create
 VCL Reference

TVarBytesField.Create

TVarBytesField	See also

Creates an instance of TVarBytesField.

constructor Create(AOwner: TComponent); override;

Description

It is seldom necessary to call Create directly, because a VarBytes field object is instantiated automatically for all variable bytes fields in a dataset.

Create sets the DataType to ftVarBytes and initializes the Size property to 16.


Hierarchy

TObject

TPersistent

TComponent

TField

TBinaryField

TBytesField

TVarBytesField


EWebBrokerException
 VCL Reference

EWebBrokerException

Hierarchy	Properties 	Methods 	See also

EWebBrokerException is an exception raised by WebBroker objects.

Unit

HTTPApp

Description

EWebBrokerException is raised when a WebBroker object encounters a problem. It functions identically to its parent class, TException.


 VCL Reference

EWebBrokerException properties

EWebBrokerException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EWebBrokerException properties

EWebBrokerException	By object	Legend

HelpContext

Message


 VCL Reference

EWebBrokerException methods

EWebBrokerException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EWebBrokerException methods

EWebBrokerException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EWebBrokerException


TWebBrowser
 VCL Reference

TWebBrowser

Hierarchy	Properties	Methods	Events

TWebBrowser provides access to the Web browser functionality of Microsoft’s Shell Doc Object and Control Library (SHDOCVW.DLL).

Unit

ShDocVw

Description

TWebBrowser wraps the IWebBrowser2 interface from Microsoft’s Shell Doc Object and Control Library (SHDOCVW.DLL) to allow you to create a customized Web browsing application or to add Internet, file and network browsing, document viewing, and data downloading capabilities to your Delphi applications.

Note:	Because TWebBrowser wraps the SHDOCVW.DLL, you must have SHDOCVW.DLL installed to use this component. This DLL ships with InternetExplorer 4 and later.


 VCL Reference

TWebBrowser properties

TWebBrowser	Alphabetically	Legend

In TWebBrowser

AddressBar

Application

Busy

Container

ControlInterface

DefaultInterface

Document

FullName

FullScreen

HWND

LocationName

LocationURL

MenuBar

Name

Offline

Parent

Path

ReadyState

RegisterAsBrowser

RegisterAsDropTarget

Resizable

Silent

StatusBar

StatusText

TheaterMode

ToolBar

TopLevelContainer

Type_

Visible

Derived from TOLEControl

DefaultDispatch

OleObject

PerPropBrowsing

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWebBrowser properties

TWebBrowser	By object	Legend

Action

AddressBar

Align

AlignDisabled

Anchors

Application

BiDiMode

BoundsRect

Brush

Busy

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Container

ControlCount

ControlInterface

Controls

ControlState

ControlStyle

Cursor

DefaultDispatch

DefaultInterface

DesignInfo

DockClientCount

DockClients

DockOrientation

Document

DoubleBuffered

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

FullName

FullScreen

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HWND

Left

LocationName

LocationURL

LRDockWidth

MenuBar

Name

Offline

OleObject

Owner

Parent

ParentShowHint

ParentWindow

Path

PerPropBrowsing

PopupMenu

ReadyState

RegisterAsBrowser

RegisterAsDropTarget

Resizable

ShowHint

Showing

Silent

StatusBar

StatusText

TabOrder

TabStop

Tag

TBDockHeight

TheaterMode

ToolBar

Top

TopLevelContainer

Type_

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TWebBrowser.AddressBar
 VCL Reference

TWebBrowser.AddressBar

TWebBrowser

Not used in TWebBrowser.

property AddressBar: WordBool;

Description

Do not use AddressBar. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. AddressBar shows or hides the URL address bar on Internet Explorer. TWebBrowser does not have an address bar.


TWebBrowser.Application
 VCL Reference

TWebBrowser.Application

TWebBrowser	See also

Provides access to the Automation interface for the application that contains the WebBrowser control, or, if that is unavailable, the interface for the WebBrowser control.

property Application: IDispatch;

Description

Use Application to access the interface for the application containing the WebBrowser control. If the application does not have an Automation interface, or if the interface is not accessible, Application provides access to the Automation interface of the Web browser control.


TWebBrowser.Busy
 VCL Reference

TWebBrowser.Busy

TWebBrowser	See also	Example

Indicates whether the WebBrowser control is in the middle of a navigation or downloading operation.

property Busy: WordBool;

Description

Read Busy to determine whether the Web browser component is currently navigating to a new URL or downloading a document. If Busy is True, you can interrupt the current operation using the Stop method before starting a new operation.

Note:	The Web browser receives events at the beginning and end of each operation, as well as at discrete points during a download operation.


TWebBrowser.Container
 VCL Reference

TWebBrowser.Container

TWebBrowser	See also

Provides access to the automation interface of the Web browser’s container.

property Container: IDispatch;

Description

Use Container to access the interface for the Web browser’s parent or container. If the Web browser does not have a container with an Automation interface, Container is nil.


TWebBrowser.ControlInterface
 VCL Reference

TWebBrowser.ControlInterface

TWebBrowser	See also

Provides access to the interface for this Web browser component.

property  ControlInterface: IWebBrowser2;

Description

Use ControlInterface to access the interface for the WebBrowser component. This interface lets an Automation controller access the properties, methods, and events of the Web browser.


TWebBrowser.DefaultInterface
 VCL Reference

TWebBrowser.DefaultInterface

TWebBrowser	See also

Provides access to the default interface for the component.

property  DefaultInterface: IWebBrowser2;

Description

Use DefaultInterface to access the default interface for the component. As implemented in TWebBrowser, this is the same as the ControlInterface property.


TWebBrowser.Document
 VCL Reference

TWebBrowser.Document

TWebBrowser	See also

Provides access to the Automation interface of the active document.

property Document: IDispatch;

Description

Use Document to access an IDispatch interface for manipulating the contents of the HTML document through the COM object model. If there is no active document, Document is nil. That is, you must first load a document using the Navigate or Navigate2 method before you can manipulate it using the Document interface.

For more information about this interface, see the document object section of Microsoft’s Dynamic HTML reference.


TWebBrowser.FullName
 VCL Reference

TWebBrowser.FullName

TWebBrowser	See also

Indicates the fully qualified path name for the executable that hosts the Web Browser component.

property FullName: WideString;

Description

Read FullName to obtain the name of the executable as a WideString. Unlike the Name property, FullName specifies a fully qualified path name.


TWebBrowser.FullScreen
 VCL Reference

TWebBrowser.FullScreen

TWebBrowser

Not used in TWebBrowser.

property FullScreen: WordBool;

Description

Do not use FullScreen. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. FullScreen determines whether Internet Explorer is maximized.


TWebBrowser.HWND
 VCL Reference

TWebBrowser.HWND

TWebBrowser	See also

Provides access to the Window handle for the Web browser.

property HWND: Integer;

Description

Use HWND for Windows API calls that require a window handle. Use HWND instead of the Handle property when working with TWebBrowser controls.


TWebBrowser.LocationName
 VCL Reference

TWebBrowser.LocationName

TWebBrowser	See also

Identifies the short (UI-friendly) name of the URL or file currently displayed.

property LocationName: WideString;

Description

Read LocationName to get the name of the resource currently displayed in the Web browser control. If the resource is an HTML page from the Web, LocationName is the title of that page. If the resource is a folder or file on the local network or on a disk, LocationName is the full UNC name of the folder or file.


TWebBrowser.LocationURL
 VCL Reference

TWebBrowser.LocationURL

TWebBrowser	See also

Identifies the URL or path of the document or folder currently displayed.

property LocationURL: WideString;

Description

Read LocationURL to get the name of the resource currently displayed in the Web browser control. If the resource is an HTML page from the Web, LocationName is its URL. If the resource is a folder or file on the local network or on a disk, LocationName is the full UNC name of the folder or file.

Note:	LocationURL is a read-only property. To direct the Web browser to display the resource at a specific URL, folder, or file, use the Navigate or Navigate2 method.


TWebBrowser.MenuBar
 VCL Reference

TWebBrowser.MenuBar

TWebBrowser

Not used in TWebBrowser.

property MenuBar: WordBool;

Description

Do not use MenuBar. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. MenuBar shows or hides the menu bar in Internet Explorer. TWebBrowser does not have a menu bar.


TWebBrowser.Name
 VCL Reference

TWebBrowser.Name

TWebBrowser	See also

Indicates the name for the executable that hosts the Web Browser component.

property Name: WideString;

Description

Read Name to obtain the name of the executable that hosts the Web browser. Unlike the FullName property, Name does not include the path.


TWebBrowser.Offline
 VCL Reference

TWebBrowser.Offline

TWebBrowser	See also

Indicates whether the Web browser gets its document from the local cache.

property Offline: WordBool;

Description

Set Offline to True to work offline with the Web browser. When the Web browser is offline, it can’t read HTML pages using an Internet connection. Instead, you must specify a source document as a UNC filename.

Note:	You can use Internet Explorer to save HTML pages to a local cache so that they are available for offline work.


TWebBrowser.Parent
 VCL Reference

TWebBrowser.Parent

TWebBrowser	See also

Provides access to the Automation interface of the Web browser’s container.

property Parent: IDispatch;

Description

Use Parent to access the interface for the Web browser’s parent or container. If the Web browser does not have a container with an Automation interface, the value of Parent is the same as ControlInterface.

Use the TopLevelContainer property to determine which interface is the value of Parent.


TWebBrowser.Path
 VCL Reference

TWebBrowser.Path

TWebBrowser	See also

Indicates the name for the executable that hosts the Web Browser component.

property Path: WideString;

Description

Read Path to obtain the path of the executable that hosts the Web browser.


TWebBrowser.ReadyState
 VCL Reference

TWebBrowser.ReadyState

TWebBrowser	See also

Indicates the state of the Web browser component.

property ReadyState: TOleEnum;

Description

Read ReadyState to obtain state information specific to the Web browser control. Use this information to avoid attempting to use the Web browser control when it is not ready to perform an action.

The following table lists the possible values:

Constant	Value	Meaning

READYSTATE_UNINITIALIZED	0	Default initialization state. The Control has not begun loading any properties.

READYSTATE_LOADING	1	The control is loading its properties.

READYSTATE_LOADED	2	The control has initialized its properties but is not yet interactive.

READYSTATE_INTERACTIVE	3	The control is interactive, but not all of its data is available. (It is downloading a document or frame).

READYSTATE_COMPLETE	4	The control is interactive and all of its data is available. (The current document is fully downloaded).


TWebBrowser.RegisterAsBrowser
 VCL Reference

TWebBrowser.RegisterAsBrowser

TWebBrowser

Registers the control as a top-level browser for target name resolution.

property RegisterAsBrowser: WordBool;

Description

Set RegisterAsBrowser to True when using the Web browser control to implement a top-level browser.


TWebBrowser.RegisterAsDropTarget
 VCL Reference

TWebBrowser.RegisterAsDropTarget

TWebBrowser	See also

Specifies whether users can load a document using drag-and-drop.

property RegisterAsDropTarget: WordBool;

Description

Set RegisterAsDropTarget to True to allow users to drop HTML documents onto the Web browser. When RegisterAsDropTarget is True, users can load a document by dragging it onto the Web browser. When RegisterAsDropTarget is False, dragging a document onto the Web browser has no effect.


TWebBrowser.Resizable
 VCL Reference

TWebBrowser.Resizable

TWebBrowser

Not used in TWebBrowser.

property Resizable: WordBool;

Description

Do not use Resizable. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Resizable determines whether the Internet Explorer window can be resized.


TWebBrowser.Silent
 VCL Reference

TWebBrowser.Silent

TWebBrowser

Specifies whether the Web browser can display dialog boxes.

property Silent: WordBool;

Description

Set Silent to True to prevent the Web browser control from displaying dialog boxes.


TWebBrowser.StatusBar
 VCL Reference

TWebBrowser.StatusBar

TWebBrowser

Not used in TWebBrowser.

property StatusBar: WordBool;

Description

Do not use StatusBar. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. StatusBar shows or hides the status bar in Internet Explorer. TWebBrowser does not have a status bar.


TWebBrowser.StatusText
 VCL Reference

TWebBrowser.StatusText

TWebBrowser

Not used in TWebBrowser.

property StatusText: WideString;

Description

Do not use StatusText. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. StatusText specifies the text that appears on the status bar in Internet Explorer. TWebBrowser does not have a status bar.


TWebBrowser.TheaterMode
 VCL Reference

TWebBrowser.TheaterMode

TWebBrowser

Not used in TWebBrowser.

property TheaterMode: WordBool;

Description

Do not use TheaterMode. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. TheaterMode changes the display of Internet Explorer to use theater or normal mode.


TWebBrowser.ToolBar
 VCL Reference

TWebBrowser.ToolBar

TWebBrowser

Not used in TWebBrowser.

property ToolBar: Integer;

Description

Do not use ToolBar. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. ToolBar determines which toolbar is displayed in Internet Explorer. TWebBrowser does not have any tool bars.


TWebBrowser.TopLevelContainer
 VCL Reference

TWebBrowser.TopLevelContainer

TWebBrowser	See also

Indicates whether the Web browser is a top-level Automation object.

property TopLevelContainer: WordBool;

Description

Read TopLevelContainer to determine whether the Web browser has a parent with an Automation interface. When TopLevelContainer is False, the Container and Parent properties provide access to the parent’s interface. When ToplevelContainer is True, the value of Container is nil and the value of Parent is the Web browser’s own interface.


TWebBrowser.Type_
 VCL Reference

TWebBrowser.Type_

TWebBrowser	See also

Indicates the type name of the contained document object.

property Type_: WideString;

Description

Read Type_ to determine the type of the Automation object whose interface is represented by the Document property.


TWebBrowser.Visible
 VCL Reference

TWebBrowser.Visible

TWebBrowser	See also

Specifies whether the Web browser component appears onscreen.

property Visible: WordBool;

Description

Use Visible to show or hide the Web browser control.


 VCL Reference

TWebBrowser events

TWebBrowser	Alphabetically	Legend

In TWebBrowser

OnBeforeNavigate2

OnCommandStateChange

OnDocumentComplete

OnDownloadBegin

OnDownloadComplete

OnFullScreen

OnMenuBar

OnNavigateComplete2

OnNewWindow2

OnProgressChange

OnPropertyChange

OnQuit

OnStatusBar

OnStatusTextChange

OnTheaterMode

OnTitleChange

OnToolBar

OnVisible

In TWinControl

OnEnter

OnExit

In TControl

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 VCL Reference

TWebBrowser events

TWebBrowser	By object	Legend

OnBeforeNavigate2

OnCommandStateChange

OnDocumentComplete

OnDownloadBegin

OnDownloadComplete

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnFullScreen

OnMenuBar

OnNavigateComplete2

OnNewWindow2

OnProgressChange

OnPropertyChange

OnQuit

OnStartDrag

OnStatusBar

OnStatusTextChange

OnTheaterMode

OnTitleChange

OnToolBar

OnVisible


TWebBrowser.OnBeforeNavigate2
 VCL Reference

TWebBrowser.OnBeforeNavigate2

TWebBrowser	See also

Occurs immediately before the Web browser navigates to a new resource.

type TWebBrowserBeforeNavigate2 = procedure(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant; var Cancel: WordBool) of object;

property OnBeforeNavigate2: TWebBrowserBeforeNavigate2;

Description

Write an OnBeforeNavigate2 event handler to redirect or cancel a change to a different URL. This event may occur as the result of a call to the Navigate or Navigate2 method, or the user clicking a link.

Sender is the Web browser control that is about to look up a new URL.

pDisp is the Automation interface of the Web browser control specified by Sender.

URL is the Uniform Resource Locator of the resource the Web browser is looking up. Change this value to redirect the navigation operation to a different resource.

Flags is not currently used.

TargetFrameName is the name of the frame in which the resource will be displayed, or NULL if the resource should not be displayed in a named frame. Change this value to change where the resource is displayed. See the Navigate method for a list of possible values.

PostData contains the data sent to the server when the underlying operation is an HTTP post message. The event handler can change this value before it is sent to the target URL.

Headers contains any headers sent to the servers when the URL represents an HTTP message. HTTP headers specify such things as the intended action required of the server, the type of data, and so on. (See TWebRequest object, whose properties represent many of the more common headers). The event handler can change this value before it is sent to the target URL.

Cancel determines whether the Web browser looks up the specified resource after the event handler exits. Change Cancel to True to cancel the navigation operation.


TWebBrowser.OnCommandStateChange
 VCL Reference

TWebBrowser.OnCommandStateChange

TWebBrowser	See also	Example

Occurs when the ability to execute certain TWebBrowser methods changes.

type TWebBrowserCommandStateChange = procedure(Sender: TObject; Command: Integer; Enable: WordBool) of object;

property OnCommandStateChange: TWebBrowserCommandStateChange;

Description

Write an OnCommandStateChange to update any controls in the application whose state depends on the ability to execute the Web browser’s methods.

Sender is the Web browser control whose capabilities have changed.

Command indicates what has changed. The following table lists the possible values:

Constant	Value	Meaning

CSC_UPDATECOMMANDS	-1	Any change not covered by the other constants. The application must check the properties of the Web browser to update its controls. For example, the event handler might check the Busy property to update a Stop button.

CSC_NAVIGATEFORWARD	1	The history list changed the ability of the GoForward method to navigate to a new URL. The Enable parameter indicates whether GoForward now navigates to a new URL (True), or not (False).

CSC_NAVIGATEBACK	2	The history list changed the ability of the GoBack method to navigate to a new URL. The Enable parameter indicates whether GoBack now navigates to a new URL (True), or not (False).

Enable indicates whether the CSC_NAVIGATEFORWARD or CSC_NAVIGATEBACK commands should now be enabled (True), or not (False).


TWebBrowser.OnDocumentComplete
 VCL Reference

TWebBrowser.OnDocumentComplete

TWebBrowser	See also	Example

Occurs when the document being navigated to reaches ReadyState_Complete.

type TWebBrowserDocumentComplete = procedure(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant) of object;

property OnDocumentComplete: TWebBrowserDocumentComplete;

Description

Write an OnDocumentComplete event handler to take specific action when a frame or document is fully loaded into the Web browser .For a document without frames, this event occurs once when the document finishes loading. On a document containing multiple frames, this event occurs once for each frame. When the multiple-frame document finishes loading, the Web browser fires the event one final time.

Sender is the Web browser that is loading the document.

pDisp is the Automation interface of the top-level frame or browser. When loading a document without frames, pDisp is the interface of the Web browser. When loading a document with multiple frames, this is the interface of the containing frame, except for the very last time the event occurs, when it is the interface of the Web browser.

URL is the URL, UNC file name, or PIDL that to which the Web browser navigated. This URL can be different from the URL to which the browser was told to navigate. For example, the browser may have been redirected by the target resource or by an OnBeforeNavigate2 event handler. In addition, the value of URL is the canonicalized and qualified URL: for example, if an application specified a URL of "www.borland.com" in a call to the Navigate or Navigate2 method, the URL in the OnDocumentComplete event handler is  "http://www.borland.com/".


TWebBrowser.OnDownloadBegin
 VCL Reference

TWebBrowser.OnDownloadBegin

TWebBrowser	See also

Occurs when the Web browser starts downloading a document.

property OnDownloadBegin: TNotifyEvent;

Description

Write an OnDownloadBegin event handler to take specific action after the Web browser has located a document and immediately before it starts downloading the document. For example, use the OnDownloadBegin event to launch an animation control the represents downloading or a progress bar that is updated by an OnProgressChange event handler. The control can then be stopped in an OnDownloadComplete event handler.

Note:	To take specific action when the Web browser looks up the resource, rather than when it begins downloading, use the OnBeforeNavigate2 event. OnDownloadBegin occurs shortly after OnBeforeNavigate2.


TWebBrowser.OnDownloadComplete
 VCL Reference

TWebBrowser.OnDownloadComplete

TWebBrowser	See also

Occurs when a navigation operation finishes, is halted, or fails.

property OnDownloadComplete: TNotifyEvent;

Description

Write an OnDownLoadComplete event handler to take specific action after the Web browser stops a downloading operation. For example, use the OnDownloadComplete event to stop an download indication that is started in an OnDownloadBegin event handler.

Note:	Unlike the OnNavigateComplete2 event, OnDownloadComplete occurs even if the Web browser does not successfully navigate to an URL.


TWebBrowser.OnFullScreen
 VCL Reference

TWebBrowser.OnFullScreen

TWebBrowser

Not used in TWebBrowser.

property OnFullScreen: TWebBrowserOnFullScreen;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnFullScreen occurs with Internet Explorer when the application is maximized or restored from a maximized state.


TWebBrowser.OnMenuBar
 VCL Reference

TWebBrowser.OnMenuBar

TWebBrowser

Not used in TWebBrowser.

property OnMenuBar: TWebBrowserOnMenuBar;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnMenuBar occurs with Internet Explorer when the menu bar is hidden or shown.


TWebBrowser.OnNavigateComplete2
 VCL Reference

TWebBrowser.OnNavigateComplete2

TWebBrowser	See also	Example

Occurs immediately after the Web browser successfully navigates to a new location.

type TWebBrowserNavigateComplete2 = procedure(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant) of object;

property OnNavigateComplete2: TWebBrowserNavigateComplete2;

Description

Write an OnNavigateComplete2 event handler to take specific action when the Web browser successfully navigates to a new resource. The event can occur before the document is fully downloaded, but when it occurs at least part of the document must be received and a viewer for the document created.

Sender is the Web browser that navigated to the new resource.

pDisp is the Automation interface of the browser.

URL is the URL, UNC file name, or PIDL that to which the Web browser navigated. This URL can be different from the URL to which the browser was told to navigate. For example, the browser may have been redirected by the target resource or by an OnBeforeNavigate2 event handler. In addition, the value of URL is the canonicalized and qualified URL: for example, if an application specified a URL of "www.borland.com" in a call to the Navigate or Navigate2 method, the URL in the OnDocumentComplete event handler is  "http://www.borland.com/".

Note:	Unlike the OnDownloadComplete event, OnNavigateComplete2 does not occur if the operation is not successful.


TWebBrowser.OnNewWindow2
 VCL Reference

TWebBrowser.OnNewWindow2

TWebBrowser	See also

Occurs when a new, hidden, non-navigated Web browser window is needed.

type TWebBrowserNewWindow2 = procedure(Sender: TObject; var ppDisp: IDispatch; var Cancel: WordBool) of object;

property OnNewWindow2: TWebBrowserNewWindow2;

Description

Write an OnNewWindow2 to take specific action immediately before the Web browser creates a new window for displaying a resource. This window may be needed because the user shift-clicked on a link, the user right-clicked on a link and chose "open in new window", the frame for the target URL does not yet exist, or the Navigate or Navigate2 requested that the target document appear in a new window.

Sender is the WebBrowser that needs a new window to display its target resource.

ppDisp optionally returns the interface for a newly created, hidden, TWebBrowser component that can act as the new window. The Web browser configures this component and navigates to the target URL, starting with an OnBeforeNavigate2 event. If the event handler does not create a component and return its interface as the ppDisp parameter, the Web browser generates a top-level window as a separate, nonhosted process.

Cancel allows the event handler to block the creation of a new window. When the event handler sets Cancel to True, the Web browser tries to display the target resource in its current window, starting with an OnBeforeNavigate2 event.

Note:	The event handler should not return a value for ppDisp when setting Cancel to True.


TWebBrowser.OnProgressChange
 VCL Reference

TWebBrowser.OnProgressChange

TWebBrowser	See also

Occurs when the progress of a download operation is updated.

type TWebBrowserProgressChange = procedure(Sender: TObject; Progress: Integer; ProgressMax: Integer) of object;

property OnProgressChange: TWebBrowserProgressChange;

Description

Write an OnProgressChange event handler to provide visual feedback about the download process. For example, an OnProgressChange event handler can update a TProgressBar component or display the number of bytes downloaded so far.

Sender is the Web browser control that is in the process of downloading a document.

Progress indicates how much of the document has already been downloaded, on a scale of 0 to ProgressMax. When Progress is –1, the operation is finished.

ProgressMax indicates the total size of the download operation.

Tip:	To calculate the percentage of progress to show in a progress indicator (when Progress is not –1), multiply the value of Progress by 100 and divide by the value of ProgressMax.


TWebBrowser.OnPropertyChange
 VCL Reference

TWebBrowser.OnPropertyChange

TWebBrowser

Not used in TWebBrowser.

property OnPropertyChange: TWebBrowserPropertyChange;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnPropertyChange occurs with Internet Explorer when a property is modified using the PutProperty method.


TWebBrowser.OnQuit
 VCL Reference

TWebBrowser.OnQuit

TWebBrowser

Not used in TWebBrowser.

property OnQuit: TNotifyEvent;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnQuit occurs when the Internet Explorer is about to shut down.


TWebBrowser.OnStatusBar
 VCL Reference

TWebBrowser.OnStatusBar

TWebBrowser

Not used in TWebBrowser.

property OnStatusBar: TWebBrowserOnStatusBar;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnStatusBar occurs when the Internet Explorer first shows or hides its status bar.


TWebBrowser.OnStatusTextChange
 VCL Reference

TWebBrowser.OnStatusTextChange

TWebBrowser

Not used in TWebBrowser.

property OnStatusTextChange: TWebBrowserStatusTextChange;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnStatusTextChange occurs when the text displayed in the Internet Explorer’s status bar changes.


TWebBrowser.OnTheaterMode
 VCL Reference

TWebBrowser.OnTheaterMode

TWebBrowser

Not used in TWebBrowser.

property OnTheaterMode: TWebBrowserOnTheaterMode;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnTheaterMode occurs when the Internet Explorer changes into or out of theater mode.


TWebBrowser.OnTitleChange
 VCL Reference

TWebBrowser.OnTitleChange

TWebBrowser	See also

Occurs when the title of a document in the WebBrowser control becomes available or changes.

type TWebBrowserTitleChange = procedure(Sender: TObject; const Text: WideString) of object;

property OnTitleChange: TWebBrowserTitleChange;

Description

Write an OnTitleChange event handler to respond when the Web browser obtains information about the document title. Because the title can change while an HTML page is downloading, LocationName is originally set to the URL of the document. After the title specified in the HTML page, if any, becomes available, LocationName is changed to reflect the actual title.

The Sender parameter is the Web browser that is unloading a document.

Text is the newly-available title of the document.


TWebBrowser.OnToolBar
 VCL Reference

TWebBrowser.OnToolBar

TWebBrowser

Not used in TWebBrowser.

property OnToolBar: TWebBrowserOnToolBar;

Description

Do not use this event. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. OnToolBar occurs when the Internet Explorer changes which tool bars are visible.


TWebBrowser.OnVisible
 VCL Reference

TWebBrowser.OnVisible

TWebBrowser	See also

Occurs when the Web browser window is about to be shown or hidden.

type TWebBrowserOnVisible = procedure(Sender: TObject; Visible: WordBool) of object;

property OnVisible: TWebBrowserOnVisible;

Description

Write an OnVisible event handler to make adjustments to compensate for the appearance or disappearance of the Web browser window.

The Sender parameter is the Web browser whose Visible property is changing.

Visible is True if the Web browser is about to appear, False if the Web browser is about to be hidden.


 VCL Reference

TWebBrowser methods

TWebBrowser	Alphabetically	Legend

In TWebBrowser

ClientToWindow

ExecWB

GetProperty

GoBack

GoForward

GoHome

GoSearch

Navigate

Navigate2

PutProperty

QueryStatusWB

Quit

Refresh

Refresh2

ShowBrowserBar

Stop

Derived from TOLEControl

BrowseProperties

Create

DefaultHandler

Destroy

DoObjectVerb

GetEnumPropDesc

GetHelpContext

GetObjectVerbs

GetPropDisplayString

GetPropDisplayStrings

IsCustomProperty

IsPropPageProperty

SetBounds

SetPropDisplayString

ShowAboutBox

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebBrowser methods

TWebBrowser	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

BrowseProperties

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ClientToWindow

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoObjectVerb

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

ExecWB

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetEnumPropDesc

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetObjectVerbs

GetParentComponent

GetPropDisplayString

GetPropDisplayStrings

GetProperty

GetTabOrderList

GetTextBuf

GetTextLen

GoBack

GoForward

GoHome

GoSearch

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsCustomProperty

IsImplementorOf

IsPropPageProperty

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

Navigate

Navigate2

NewInstance

PaintTo

ParentToClient

Perform

PutProperty

QueryStatusWB

Quit

Realign

ReferenceInterface

Refresh

Refresh2

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetPropDisplayString

SetSubComponent

SetTextBuf

Show

ShowAboutBox

ShowBrowserBar

Stop

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TWebBrowser.ClientToWindow
 VCL Reference

TWebBrowser.ClientToWindow

TWebBrowser

Not used in TWebBrowser.

procedure ClientToWindow(var pcx: SYSINT; var pcy: SYSINT);

Description

Do not use this method. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer uses ClientToWindow to convert between client coordinates and window coordinates.


TWebBrowser.ExecWB
 VCL Reference

TWebBrowser.ExecWB

TWebBrowser	See also

Executes a command.

type

  OLECMDID = TOleEnum;

  OLECMDEXECOPT = TOleEnum;

procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT); overload;

procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn: OleVariant); overload;

procedure ExecWB(cmdID: OLECMDID; cmdexecopt: OLECMDEXECOPT; var pvaIn: OleVariant; var pvaOut: OleVariant); overload;

Description

ExecWB lets you use the IOleCommandTarget interface to pass a command to the Web browser control. For more information, see the Microsoft documentation of IOleCommandTarget.

cmdID specifies the command to execute. Microsoft provides the following constants. However, the Web Browser does not support all of these commands. Use the QueryStatusWB method to determine what commands can be used.

OLECMDID_OPEN	OLECMDID_NEW	OLECMDID_SAVE

OLECMDID_SAVEAS	OLECMDID_SAVECOPYAS	OLECMDID_PRINT

OLECMDID_PRINTPREVIEW 	OLECMDID_PAGESETUP	OLECMDID_SPELL

OLECMDID_PROPERTIES	OLECMDID_CUT	OLECMDID_COPY

OLECMDID_PASTE	OLECMDID_PASTESPECIAL	OLECMDID_UNDO

OLECMDID_REDO	OLECMDID_SELECTALL	OLECMDID_CLEARSELECTION

OLECMDID_ZOOM 	OLECMDID_GETZOOMRANGE	OLECMDID_UPDATECOMMANDS

OLECMDID_REFRESH	OLECMDID_STOP	OLECMDID_HIDETOOLBARS

OLECMDID_SETPROGRESSMAX	OLECMDID_SETPROGRESSPOS	OLECMDID_SETPROGRESSTEXT

OLECMDID_SETTITLE	OLECMDID_SETDOWNLOADSTATE 	OLECMDID_STOPDOWNLOAD

OLECMDID_FIND	OLECMDID_ONTOOLBARACTIVATED	OLECMDID_DELETE

OLECMDID_HTTPEQUIV	OLECMDID_ENABLE_INTERACTION	OLECMDID_HTTPEQUIV_DONE

OLECMDID_ONUNLOAD	OLECMDID_PROPERTYBAG2	OLECMDID_PREREFRESH

cmdexecopt modifies how the command is executed. The following table lists the possible values:

Constant	Value	Meaning

OLECMDEXECOPT_DODEFAULT	0	Use the default behavior, whether prompting the user for input or not.

OLECMDEXECOPT_PROMPTUSER	1	Execute the command after obtaining user input.

OLECMDEXECOPT_DONTPROMPTUSER	2	Execute the command without prompting the user.

OLECMDEXECOPT_SHOWHELP	3	Show help for the command, but do not execute it.

pvaIn specifies a Variant array that contains any input arguments. This value can be omitted if there are not input arguments.

pvaOut	specifies a Variant that receives the results of the command, if any. This value can be omitted if there are no results.


TWebBrowser.GetProperty
 VCL Reference

TWebBrowser.GetProperty

TWebBrowser

Not used in TWebBrowser.

function  GetProperty(const Property_: WideString): OleVariant;

Description

Do not use this method. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer uses GetProperty to return a property value.


TWebBrowser.GoBack
 VCL Reference

TWebBrowser.GoBack

TWebBrowser	See also

Navigates to the previous item in the history list.

procedure GoBack;

Description

Call GoBack to return to the last document in the history list. GoBack has no effect unless the history list contains additional documents.

Note:	The Navigate or Navigate2 command can change the history list, depending on the specified flags.


TWebBrowser.GoForward
 VCL Reference

TWebBrowser.GoForward

TWebBrowser	See also

Navigates to the next item in the history list.

procedure GoForward;

Description

Call GoForward to return to the next document in the history list. GoForward reverses the effect of the last GoBack command.


TWebBrowser.GoHome
 VCL Reference

TWebBrowser.GoHome

TWebBrowser	See also

Navigates to the current start page.

procedure GoHome;

Description

Call GoHome to navigate to the registered home or start page. The URL for this page is specified in the Registry at

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

under the name Startpage. You can change this value using the TRegistry or TRegistryIniFile object, or using Navigation tab of the Internet Explorer’s Options dialog.


TWebBrowser.GoSearch
 VCL Reference

TWebBrowser.GoSearch

TWebBrowser	See also

Navigates to the current search page.

procedure GoSearch;

Description

Call GoSearch to navigate to the registered search page. The URL for this page is specified in the Registry at

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

under the name SearchPage. You can change this value using the TRegistry or TRegistryIniFile object, or using Navigation tab of the Internet Explorer’s Options dialog.


TWebBrowser.Navigate
 VCL Reference

TWebBrowser.Navigate

TWebBrowser	See also

Navigates to a resource identified by a path name or URL.

procedure Navigate(const URL: WideString); overload;

procedure Navigate(const URL: WideString; var Flags: OleVariant); overload;

procedure Navigate(const URL: WideString; var Flags: OleVariant; var TargetFrameName: OleVariant); overload;

procedure Navigate(const URL: WideString; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant); overload;

procedure Navigate(const URL: WideString; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant); overload;

Description

Use Navigate to locate and download a specific resource. Navigate can send an HTTP message to a specified URL and display the results or simply display the results of a specified file.

URL specifies the UNC path name of a file or the Uniform Resource Locator of an Internet resource that the Web browser should display.

Flags is a set of values that specify whether to add the resource to the history list, whether to read from or write to the cache, and whether to display the resource in a new window. It can be a sum of zero or more of the following:

Constant	Value	Meaning

navOpenInNewWindow	1	Open the resource or file in a new window.

navNoHistory	2	Do not add the resource or file to the history list. The new page replaces the current page in the list.

navNoReadFromCache	4	Do not read from the disk cache for this navigation.

navNoWriteToCache	8	Do not write the results of this navigation to the disk cache.

navAllowAutosearch	16	If the navigation fails, the Web browser attempts to navigate common root domains (.com, .edu, and so on). If this still fails, the URL is passed to a search engine.

TargetFrameName is the name of the frame in which the resource will be displayed, or NULL if the resource should not be displayed in a named frame.

PostData contains the data sent to the server when using Navigate to generate an HTTP POST message. If PostData is NULL, Navigate generates an HTTP GET message. PostData is ignored if URL does not specify an HTTP URL.

Headers contains any headers sent to the servers when the URL represents an HTTP URL. HTTP headers specify such things as the intended action required of the server, the type of data, and so on. (See TWebRequest object, whose properties represent many of the more common headers).

Note:	To navigate to a location that can’t be expressed as an URL (for example, to an item identifier list), use the Navigate2 method instead.


TWebBrowser.Navigate2
 VCL Reference

TWebBrowser.Navigate2

TWebBrowser	See also

Navigates to a specified resource.

procedure Navigate2(var URL: OleVariant); overload;

procedure Navigate2(var URL: OleVariant; var Flags: OleVariant); overload;

procedure Navigate2(var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant); overload;

procedure Navigate2(var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant); overload;

procedure Navigate2(var URL: OleVariant; var Flags: OleVariant; var TargetFrameName: OleVariant; var PostData: OleVariant; var Headers: OleVariant); overload;

Description

Use Navigate2 to locate and download a specific resource. Navigate can send an HTTP message to a specified URL and display the results, display the results of a specified file, or navigate to a resource that can’t be expressed as an URL such as an item identifier list.

URL specifies the UNC path name of a file, the Uniform Resource Locator of an Internet resource, or a pointer to an item identifier list (PIDL).

Flags is a set of values that specify whether to add the resource to the history list, whether to read from or write to the cache, and whether to display the resource in a new window. It can be a sum of zero or more of the following:

Constant	Value	Meaning

navOpenInNewWindow	1	Open the resource or file in a new window.

navNoHistory	2	Do not add the resource or file to the history list. The new page replaces the current page in the list.

navNoReadFromCache	4	Do not read from the disk cache for this navigation.

navNoWriteToCache	8	Do not write the results of this navigation to the disk cache.

navAllowAutosearch	16	If the navigation fails, the Web browser attempts to navigate common root domains (.com, .edu, and so on). If this still fails, the URL is passed to a search engine.

TargetFrameName is the name of the frame in which the resource will be displayed, or NULL if the resource should not be displayed in a named frame.

PostData contains the data sent to the server when using Navigate to generate an HTTP POST message. If PostData is NULL, Navigate generates an HTTP GET message. PostData is ignored if URL does not specify an HTTP URL.

Headers contains any headers sent to the servers when the URL represents an HTTP URL. HTTP headers specify such things as the intended action required of the server, the type of data, and so on. (See TWebRequest object, whose properties represent many of the more common headers).


TWebBrowser.PutProperty
 VCL Reference

TWebBrowser.PutProperty

TWebBrowser

Not used in TWebBrowser.

procedure PutProperty(const Property_: WideString; vtValue: OleVariant);

Description

Do not use this method. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer uses PutProperty to set a property value.


TWebBrowser.QueryStatusWB
 VCL Reference

TWebBrowser.QueryStatusWB

TWebBrowser	See also

Returns information about what commands the Web browser supports.

type

  OLECMDID = TOleEnum;

  OLECMDF = TOleEnum;

function  QueryStatusWB(cmdID: OLECMDID): OLECMDF;

Description

Use QueryStatusWB to determine what commands can be executed using the ExecWB method. QueryStatusWB uses the QueryStatus method of the IOleCommandTarget interface to obtain information about the status of commands. For more information, see the Microsoft documentation of IOleCommandTarget.

cmdID specifies the command about which you want information. See the ExecWB method for a list of possible cmdID values.

QueryStatusWB returns a value made by adding together zero of more of the following:

Constant	Value	Meaning

OLECMDF_SUPPORTED	1	The Web browser control supports the command (but it may not be enabled).

OLECMDF_ENABLED	2	The command is currently enabled.

OLECMDF_LATCHED	4	The command is an on/off toggle that is currently on.

OLECMDF_NINCHED	8	Not currently used.

OLECMDF_INVISIBLE	16	Not currently used.

OLECMDF_DEFHIDEONCTXTMENU	32	Not currently used.


TWebBrowser.Quit
 VCL Reference

TWebBrowser.Quit

TWebBrowser

Not used in TWebBrowser.

procedure Quit;

Description

Do not use this method. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer responds to Quit by shutting down.


TWebBrowser.Refresh
 VCL Reference

TWebBrowser.Refresh

TWebBrowser	See also

Reloads the current document.

procedure Refresh;

Description

Call Refresh to reload the current document. This is useful when the Web browser is displaying the resource at an URL that may have changed.

Refresh always sends a pragma:nocache header, telling the server not to return a cached copy. This can cause problems with some servers. To prevent the pragma:nocache header, or to refresh only expired pages, use the Refresh2 method instead.


TWebBrowser.Refresh2
 VCL Reference

TWebBrowser.Refresh2

TWebBrowser	See also

Reloads the current document if necessary.

procedure Refresh2; overload;

procedure Refresh2(var Level: OleVariant); overload;

Description

Call Refresh2 to reload the current document. Unlike the Refresh method, Refresh2 lets you specify what level of refresh to perform.

Level indicates what type of information is refreshed. The following table lists the possible values:

Constant	Value	Meaning

REFRESH_NORMAL	0	Perform a lightweight refresh that does not include the pragma:nocache header. The pragma:nocache header tells the server not to return a cached copy. This can cause problems with some servers.

REFRESH_IFEXPIRED	1	Only refresh if the page has expired. Do not include the pragma:nocache header.

REFRESH_CONTINUE	2	For internal use only.

REFRESH_COMPLETELY	3	Perform a full refresh, including the pragma:nocache header. Using this option is the same as calling the Refresh method.

When Level is omitted, a value of REFRESH_COMPLETELY is assumed.


TWebBrowser.ShowBrowserBar
 VCL Reference

TWebBrowser.ShowBrowserBar

TWebBrowser

Not used in TWebBrowser

procedure ShowBrowserBar(var pvaClsid: OleVariant);

procedure ShowBrowserBar(var pvaClsid: OleVariant; var pvarShow: OleVariant);

procedure ShowBrowserBar(var pvaClsid: OleVariant; var pvarShow: OleVariant; var pvarSize: OleVariant);

Description

Do not use this method. It is included in the TWebBrowser interface because the IWebBrowser2 interface is shared with Internet Explorer. Internet Explorer uses ShowBrowserBar to show or hide a specified browser bar.


TWebBrowser.Stop
 VCL Reference

TWebBrowser.Stop

TWebBrowser	See also

Stops the current operation.

procedure Stop;

Description

Stop cancels any pending navigation or download operation and terminates any dynamic page elements, such as background sounds and animations.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TOleControl

TWebBrowser


TWebDispatch
 VCL Reference

TWebDispatch

Hierarchy	Properties	Methods	See also

TWebDispatch describes the HTTP messages to which an auto-dispatching component responds.

Unit

AutoDisp

Description

TWebDispatch implements the WebDispatch property of an auto-dispatching component such as TXMLBroker, THTTPSoapDispatcher, or TWSDLHTMLPublish. It specifies the path info portion of the URL for messages directed at the component, the type of messages to which the component can respond, and allows an application to disable the auto-dispatching so that it does not respond directly to HTTP messages from a Web browser.


 VCL Reference

TWebDispatch properties

TWebDispatch	Alphabetically	Legend

In TWebDispatch

Enabled

Mask

MethodType

PathInfo


 VCL Reference

TWebDispatch properties

TWebDispatch	By object	Legend

Enabled

Mask

MethodType

PathInfo


TWebDispatch.Enabled
 VCL Reference

TWebDispatch.Enabled

TWebDispatch	See also

Indicates whether the Web dispatcher passes requests to the object using the TWebDispatch object.

property Enabled: Boolean;

Description

Set Enabled to indicate whether the object using the Web dispatcher responds directly to HTTP request messages. By default, Enabled is True, but an application may disable the auto-dispatching of a component because

The application responds to request messages using an action item on the Web dispatcher rather than using the auto-dispatch feature of the component that uses TWebDispatch as its WebDispatch property. Action items give you greater control over the order in which the dispatcher passes a request message on for handling, and let you embed the default action of the auto-dispatching component with other actions performed by the action item.

The application uses other features of the auto-dispatching component but does not want it to respond to HTTP request messages. For example, a Web client may include an XML broker to provide data packets that appear in the generated HTML pages, but not allow Web browsers to apply updates. When Enabled is False, the Web dispatcher does not pass update messages on to the XML broker.


TWebDispatch.Mask
 VCL Reference

TWebDispatch.Mask

TWebDispatch	See also

Provides a mask object for comparing the PathInfo property with another path.

property Mask: TMask;

Description

Use Mask to compare the PathInfo property with the path portion of a URL. Mask is a TMask object that represents the string specified by PathInfo.


TWebDispatch.MethodType
 VCL Reference

TWebDispatch.MethodType

TWebDispatch	See also

Specifies the type of HTTP request methods the auto-dispatching object knows how to service.

property MethodType: TMethodType;

Description

Set MethodType to indicate the types of requests that are serviced by the auto-dispatching component. The Web dispatcher forwards an HTTP request message to the auto-dispatching component when MethodType matches the MethodType of the request message. (The PathInfo properties must also match).


TWebDispatch.PathInfo
 VCL Reference

TWebDispatch.PathInfo

TWebDispatch	See also

Indicates the path portion of the Uniform Resource Identifier (URI) for which the auto-dispatching component handles requests.

property PathInfo: string;

Description

Set PathInfo to the path portion of the URI for the target of any request messages serviced by the auto-dispatching component that uses TWebDispatch. The Web dispatcher matches components to request messages by comparing PathInfo with the path portion of the URI specified as the target of the request. If the PathInfo properties match, and the MethodType matches, the Web dispatcher invokes the auto-dispatching object so that it can respond to the message.


 VCL Reference

TWebDispatch methods

TWebDispatch	Alphabetically	Legend

In TWebDispatch

Create

Destroy

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebDispatch methods

TWebDispatch	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TWebDispatch.Create
 VCL Reference

TWebDispatch.Create

TWebDispatch

Creates and initializes an instance of TWebDispatch.

constructor Create(AComponent: TComponent);

Description

The TWebDispatch constructor is called from the constructor of the auto-dispatching component that uses it to implement its WebDispatch property. The AComponent parameter specifies the auto-dispatching component that uses the TWebDispatch instance.


TWebDispatch.Destroy
 VCL Reference

TWebDispatch.Destroy

TWebDispatch

Destroys an instance of TWebDispatch.

destructor Destroy; override;

Description

Do not call Destroy. The TWebDispatch instance is freed by the auto-dispatching component that uses it.


Hierarchy

TObject

TPersistent

TWebDispatch


TWebRequestHandler
 VCL Reference

TWebRequestHandler

Hierarchy	Properties	Methods	See also

TWebRequestHandler assigns request objects to web modules

Unit

WebReq

Description

TWebRequestHandler keeps a pool of active web modules.  In response to a request from the application, TWebRequestHandler creates a request object and assigns it to one of the active web modules.

Do not create instances of TWebRequestHandler. Use TWebRequestHandler as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TWebRequestHandler provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TWebRequestHandler properties

TWebRequestHandler	Alphabetically	Legend

In TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebRequestHandler properties

TWebRequestHandler	By object	Legend

ActiveCount

CacheConnections

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

VCLComObject

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


TWebRequestHandler.ActiveCount
 VCL Reference

TWebRequestHandler.ActiveCount

TWebRequestHandler	See also

Indicates the number of active connections currently being serviced by the application.

property ActiveCount: Integer;

Description

Use ActiveCount to monitor the number of HTTP request messages the application is servicing at any one time. Over time, this value provides an indication of the optimal value for the MaxConnections property.

Each time an ISAPI application receives an HTTP request message, it generates a new instance of the Web module. After the response is returned to the Web client, the Web module is either destroyed or deactivated and cached for later reuse. Each active Web module resides in a separate execution thread.

ActiveCount is the number of Web modules currently in use. InactiveCount is the number of deactivated Web modules cached for later reuse. MaxConnections is the maximum number of Web modules that can be active at any time. ActiveCount can never exceed MaxConnections.

Note:	ActiveCount is only meaningful for ISAPI applications. Each CGI application handles only a single request message.


TWebRequestHandler.CacheConnections
 VCL Reference

TWebRequestHandler.CacheConnections

TWebRequestHandler	See also

Determines whether the Web modules used by the application are cached for re-use.

property CacheConnections: Boolean;

Description

Each time an ISAPI or NSAPI application receives an HTTP request message, it spawns a thread to handle the request and creates a new Web module that contains instances of all the objects used in the Web application. To improve performance, these Web modules can be saved in a cache when the thread associated with the HTTP request message finishes executing.

Set CacheConnections to True to have the Web application save inactive Web modules in a cache. Caching the Web modules speeds performance as new instances of the Web module and its contents do not need to be created every time a request message is received. Set CacheConnections to False to have the Web application create a new Web module for every request thread. Recreating the Web module ensures that changes made to the module or its contents when servicing the last request do not cause unexpected behavior the next time the module is activated.

Note:	CacheConnections is only relevant to ISAPI and NSAPI Web applications.


TWebRequestHandler.InactiveCount
 VCL Reference

TWebRequestHandler.InactiveCount

TWebRequestHandler	See also

Indicates the number of Web modules cached for later reuse.

property InactiveCount: Integer;

Description

Use InactiveCount to monitor the number of unused Web modules. Over time, this value provides an indication of the optimal value for the MaxConnections property.

When CacheConnections is True, each time an ISAPI application receives an HTTP request message, it reactivates one of the inactive Web modules. The application generates a new instance of the Web module if InactiveCount is 0. After the response is returned to the Web client, the Web module is deactivated again, and counted by the InactiveCount property.

When CacheConnections is False, a new Web module is created for each HTTP request message and destroyed when the response is returned. InactiveCount is always 0 when CacheConnections is False.

Note:	InactiveCount is only meaningful for ISAPI applications. Each CGI application handles only a single request message, so there is no need to cache unused data modules.


TWebRequestHandler.MaxConnections
 VCL Reference

TWebRequestHandler.MaxConnections

TWebRequestHandler	See also

Sets or returns the MaxConnections used by the socket.

property MaxConnections: Integer;

Description

Set MaxConnections to adjust the number of HTTP request messages the application can handle simultaneously. Use the ActiveCount and InactiveCount properties to get a sense of the frequency and duration of request messages. Then set MaxConnections so that it is high enough to avoid exceptions when the application runs out of Web modules, but low enough not to degrade performance too severely by running too many simultaneous threads.

If a request message is received when ActiveCount is already at MaxConnections, the application raises an exception.

Note:	InactiveCount is only meaningful for ISAPI applications. Each CGI application handles only a single request message, so there is no need to cache unused data modules.


TWebRequestHandler.WebModuleClass
 VCL Reference

TWebRequestHandler.WebModuleClass

TWebRequestHandler	See also

Contains a reference to a web module.

property WebModuleClass: TComponentClass;

Description

WebModuleClass is a reference to a web module, and is for internal use only. When ActivateWebModules is called, it is used in that method to help generate infrastructure for a web module.


TWebRequestHandler.WebModuleFactory
 VCL Reference

TWebRequestHandler.WebModuleFactory

TWebRequestHandler	See also

A list of web module factory objects.

property WebModuleFactory[I: Integer]: TAbstractWebModuleFactory;

Description

This is a list of web module factory objects, which are intended for internal use.


TWebRequestHandler.WebModuleFactoryCount
 VCL Reference

TWebRequestHandler.WebModuleFactoryCount

TWebRequestHandler	See also

The number of web module factories in use by the request handler.

property WebModuleFactoryCount: Integer;

Description

WebModuleFactoryCount is the number of web module factories in use by the request handler. This property is intended for internal use.


 VCL Reference

TWebRequestHandler methods

TWebRequestHandler	Alphabetically 	Legend

In TWebRequestHandler

ActivateWebModules

AddWebModuleFactory

Create

DeactivateWebModules

Destroy

HandleRequest

HandleException

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebRequestHandler methods

TWebRequestHandler	By object 	Legend

(bmc protectd.bmp}	ActivateWebModules

AddWebModuleFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

(bmc protectd.bmp}	DeactivateWebModules

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleRequest

HandleException

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebRequestHandler.Create
 VCL Reference

TWebRequestHandler.Create

TWebRequestHandler	See also

Creates an instance of TWebRequestHandler.

constructor Create(AOwner: TComponent) override;

Description

Call Create to instantiate a TWebRequestHandler object.


TWebRequestHandler.Destroy
 VCL Reference

TWebRequestHandler.Destroy

TWebRequestHandler	See also

Destroys the TWebRequestHandler instance and frees its memory.

procedure Destroy; override;

Description

Destroy cleans up references in the global fix-up list for form linking. It then calls the inherited destructor.

Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.


TWebRequestHandler.ActivateWebModules
 VCL Reference

TWebRequestHandler.ActivateWebModules

TWebRequestHandler	See also

Activates a Web module for the application and returns it.

function ActivateWebModules: TWebModuleList;

Description

ActivateWebModules is called internally when the application receives an HTTP request message. If the InactiveCount property is greater than zero, a cached Web module is reactivated. Otherwise, a new instance of the Web module is created.

Before ActivateWebModules is called, the CreateForm method must be called to register the data module.


TWebRequestHandler.AddWebModuleFactory
 VCL Reference

TWebRequestHandler.AddWebModuleFactory

TWebRequestHandler

Adds a web module factory to the request handler.

procedure AddWebModuleFactory(AFactory: TAbstractWebModuleFactory);

Description

AddWebModuleFactory is used to add a web module factory to the web request handler. Web module factories are for internal use, and should not require any attention from Delphi developers.


TWebRequestHandler.DeactivateWebModules
 VCL Reference

TWebRequestHandler.DeactivateWebModule

TWebRequestHandler	See also

Deactivates the Web module of the application.

procedure DeactivateWebModule(WebModules: TWebModuleList);

Description

Do not call DeactivateWebModules directly. The Web application calls DeactivateWebModules internally after handling an HTTP request message. When CacheConnections is True, the Web module remains inactive until the next request message is received. When CacheConnections is False, the runtime instance of the Web module is destroyed.


TWebRequestHandler.HandleRequest
 VCL Reference

TWebRequestHandler.HandleRequest

TWebRequestHandler	See also

Responds to an HTTP request message received by the server.

function HandleRequest(Request: TWebRequest; Response: TWebResponse): Boolean;

Description

When a descendant of TWebApplication receives an HTTP request message, it creates a TWebRequest object to represent the message, and a TWebResponse message to match the request. It then calls HandleRequest, passing those objects as the Request and Response parameters.

HandleRequest activates the Web module associated with the Web application. It then passes the request and response objects to the dispatcher, so that it can dispatch the request to the appropriate action items. When the dispatcher returns, HandleRequest checks whether the response was handled but not sent, and if not, sends it. Finally, HandleRequest deactivates the data module.

HandleRequest returns a Boolean value indicating whether the request message was handled and sent.


TWebRequestHandler.HandleException
 VCL Reference

TWebRequestHandler.HandleException

TWebRequestHandler

Responds to exceptions related to TWebRequestHandler objects.

procedure HandleException(Sender: TObject;

Description

When exceptions occur in TWebRequestHandler and descendant objects, HandleException will attempt to deal with it. If it cannot do so, it will show an error message to the user.


Hierarchy

TObject

TPersistent

TComponent

TWebRequestHandler


TAbstractSocket
 VCL Reference

TAbstractSocket

Hierarchy	Properties	Methods	See also

TAbstractSocket is the abstract base class for all socket components.

Unit

ScktComp

Description

TAbstractSocket introduces properties and methods to enable an application to work with Windows sockets. A Windows socket encapsulates a set of communication protocols to allow the application to connect to other machines for reading or writing information. Windows sockets provide connections based on the TCP/IP protocol. They also allow connections that use the Xerox Network System (XNS), Digital’s DECnet protocol, or Novell’s IPX/SPX family. Sockets allow an application to form connections to other machines without being concerned with the details of the actual networking software.

The properties of TAbstractSocket describe the IP address of the socket and service it provides or seeks. Not all descendants of TAbstractSocket use all of these properties. For example, server sockets do not surface the IP address because it is read implicitly from the system running the application.

Do not create instances of TAbstractSocket. Use a descendant of TAbstractSocket to add the ability to communicate with other machines to an application. To create a socket that initiates the connection with another machine, use TClientSocket. To create a socket that responds to requests for connections from other machines, use TServerSocket.


 VCL Reference

TAbstractSocket properties

TAbstractSocket	Alphabetically	Legend

In TAbstractSocket

Active

Address

Host

Port

Service

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TAbstractSocket properties

TAbstractSocket	By object	Legend

Active

Address

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Host

Name

Owner

Port

Service

Tag

VCLComObject


TAbstractSocket.Active
 VCL Reference

TAbstractSocket.Active

TAbstractSocket	See also	Example

Indicates whether the socket connection is open and available for communication with other machines.

property Active: Boolean;

Description

Before attempting to use or change the socket connection, read Active to determine whether the connection is open and ready. For client sockets, setting Active opens or shuts down a socket connection to another machine. For server sockets, setting Active opens or shuts down a listening connection that makes the socket available for client requests.

At design time, set Active to True to make the socket open a connection when the application starts running. At runtime, use the Open or Close method to open or close the connection.


TAbstractSocket.Address
 VCL Reference

TAbstractSocket.Address

TAbstractSocket	See also

Specifies the IP address of the server system.

property Address: string;

Description

Address is a string of four numeric (byte) values in the standard Internet dot notation, such as

123.197.1.2

For client sockets, set Address to the IP address of the server to which the socket should connect. When the connection is opened, the value of Address is bound to the connection.

If the socket specifies the Host property, the address for the connection is taken from the IP address associated with Host, rather than the value of Address. Specifying the server system by giving the IP address is faster, because the socket doesn’t need to search for the IP address associated with the host name before it can locate the server system.

A single system may support more than one IP address.

Note:	Trying to change Address when the connection is open will raise an ESocketError exception.


TAbstractSocket.Host
 VCL Reference

TAbstractSocket.Host

TAbstractSocket	See also

Specifies an alias for the IP address of the server system.

property Host: string;

Description

Host is a string containing the domain name and service of a particular system, such as

http://www.wSite.Com

For client sockets, set Host to the system with which the client socket should form a connection. When the socket opens a connection, it looks up the IP address for the server socket using the value of Host.

Some servers change the system or IP address that is associated with a particular host name. Using a host name allows the client socket to find the abstract site represented by the host name, even when it has moved to a new IP address.

If Host is set, it takes precedence over the Address property when looking up the address of the server.

Note:	Trying to change Host when the connection is open will raise an ESocketError exception.


TAbstractSocket.Port
 VCL Reference

TAbstractSocket.Port

TAbstractSocket	See also

Specifies the ID number that identifies the server socket connection.

property Port: Integer;

Description

Port numbers allow a single system, identified by the Host or Address property, to host multiple connections simultaneously. Many values of Port are associated by convention with a particular service such as ftp or http.

For server sockets, Port is the ID of the connection on which the server socket listens for client requests. Server sockets generally set Port to a predefined value which clients can use to initiate connections.

For client sockets, Port is the ID of the desired server connection. The value of Port is usually associated with the service the client wishes to use on the server application.

Note:	Trying to change Port when the connection is open will raise an ESocketError exception.


TAbstractSocket.Service
 VCL Reference

TAbstractSocket.Service

TAbstractSocket	See also

Specifies the name of the service for which the socket connection is used.

property Service: string;

Description

Use Service to identify the use of the connection. Windows provides a number of standard service names such as ftp, http, finger, and time. Servers can specify additional services and their associated ports in a SERVICES file. For more information, see the Microsoft documentation for Windows sockets.

Certain port numbers are reserved for specific values of service. Thus, Service provides a more meaningful way to specify the server Port to use for the socket connection. For server sockets, using Service rather than Port ensures that the server will listen for TCP/IP requests on the appropriate port.

Note:	Trying to change Service when the connection is open will raise an ESocketError exception.


 VCL Reference

TAbstractSocket methods

TAbstractSocket	Alphabetically	Legend

In TAbstractSocket

Close

DoActivate

Error

Event

InitSocket

Loaded

Open

SetActive

SetAddress

SetHost

SetPort

SetService

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAbstractSocket methods

TAbstractSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoActivate

Error

Event

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InitSocket

InsertComponent

InstanceSize

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetActive

SetAddress

SetHost

SetPort

SetService

SetSubComponent

UpdateAction


TAbstractSocket.Close
 VCL Reference

TAbstractSocket.Close

TAbstractSocket	See also

Shuts down the socket connection.

procedure Close;

Description

Call Close to shut down the socket connection. Close sets the Active property to False.

For client sockets, Close terminates the connection to the server. For server sockets, Close shuts down the connection so that the server socket is no longer listening for client requests.


TAbstractSocket.DoActivate
 VCL Reference

TAbstractSocket.DoActivate

TAbstractSocket	See also

Provides the abstract prototype of a method to open or close the socket connection.

procedure DoActivate(Value: Boolean); virtual; abstract;

Description

Descendants of TAbstractSocket override DoActivate to provide a method that initiates or terminates the socket connection. The steps that need to be taken to open or close a connection depend on whether the socket is a client socket or a server socket.


TAbstractSocket.Error
 VCL Reference

TAbstractSocket.Error

TAbstractSocket	See also

Provides the abstract prototype of a method that responds to error conditions.

type TErrorEvent = {eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept)};

procedure Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer); virtual; abstract;

Description

Descendants of TAbstractSocket must override the abstract Error method to provide a response when socket errors occur. Applications cannot call Error. The Windows socket object that encounters the error condition calls Error automatically.

The Socket parameter indicates the Windows socket object that encounters the error condition.

The ErrorEvent parameter indicates what the socket was trying to do when the error occurred. It has one of the following values:

Value	Meaning

eeGeneral	The socket received an error message that does not fit into any of the following categories.

eeSend	An error occurred when trying to write to the socket connection.

eeReceive	An error occurred when trying to read from the socket connection.

eeConnect	For client sockets, this indicates that the client socket can’t locate the server, or that a problem on the server prevents the opening of a connection. For server sockets, this indicates that a client connection request that has already been accepted could not be completed.

eeDisconnect	An error occurred when trying to close a connection.

eeAccept	For server sockets only, this indicates that a problem occurred when trying to accept a client connection request.

The ErrorCode parameter is the error code received by the Windows socket object. Setting this value to 0 in the Error method prevents the socket from raising an exception. For information on possible error codes, see the Microsoft documentation on Windows sockets.


TAbstractSocket.Event
 VCL Reference

TAbstractSocket.Event

TAbstractSocket	See also

Provides the abstract prototype of a method that responds when specific socket events occur.

procedure Event(Socket: TCustomWinSocket; SocketEvent: TSocketEvent); virtual; abstract;

Description

Descendants of TAbstractSocket must override the abstract Event method to provide a response to calls that arise during the normal functioning of the socket. Applications cannot call Event. The Windows socket object calls Event at appropriate times.

The Socket parameter indicates the Windows socket object that calls Event to indicate when specific events occur.

The SocketEvent parameter indicates the event that occurred. It has one of the following values:

Value	Meaning

seLookup	(client sockets only) The Windows socket object is about to locate the server socket. Changing the properties of the client socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will affect the attempted connection.

seConnecting	(client sockets only) The server socket has been located but the connection isn’t completed. This is the first opportunity to obtain the actual server port and IP address used for the connection, which may differ from those of the listening socket contacted initially.

seConnect	The socket connection has just been established. This is the point when a socket starts reading or writing over the connection.

seListen	(server sockets only) The Windows socket object has been initialized and is about to open a listening connection. Changing the properties of the server socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will the listening connection.

seAccept	(server sockets only) A client connection request has just been accepted. This is the first opportunity to obtain the port and IP address of the individual client connection.

seWrite	The socket is ready for information to be written.

seRead	The socket is receiving information from a socket on the other end of the connection.


TAbstractSocket.InitSocket
 VCL Reference

TAbstractSocket.InitSocket

TAbstractSocket	See also

Tells a Windows socket object to call the Error and Event methods.

procedure InitSocket(Socket: TCustomWinSocket);

Description

Applications cannot call this protected method. InitSocket is called automatically by the socket’s constructor, immediately after the Windows socket object is created. It allows the socket component to respond to events on the Windows socket object by assigning an OnErrorEvent handler that calls Error and an OnSocketEvent handler that calls Event.

The Socket parameter specifies the Windows socket object that passes events on to the socket component.


TAbstractSocket.Loaded
 VCL Reference

TAbstractSocket.Loaded

TAbstractSocket	See also

Opens or closes the socket connection when the socket is loaded from a file, depending on the saved value of the Active property.

procedure Loaded; override;

Description

Applications cannot call this protected method. Loaded is called automatically after the socket component has been loaded from a stream. Loaded overrides the default method to implement the value of the Active property that was saved with the socket component.


TAbstractSocket.Open
 VCL Reference

TAbstractSocket.Open

TAbstractSocket	See also

Opens the socket connection.

procedure Open;

Description

Call Open to initiate the socket connection. Open sets the Active property to True.

For client sockets, Open locates and connects to a server. For server sockets, Open opens the socket connection in a listening mode, but does not complete the connection to a client socket.


TAbstractSocket.SetActive
 VCL Reference

TAbstractSocket.SetActive

TAbstractSocket	See also

Sets the Active property.

procedure SetActive(Value: Boolean);

Description

SetActive is the protected implementation of the Active property. SetActive calls the DoActivate method to open or close the socket connection.


TAbstractSocket.SetAddress
 VCL Reference

TAbstractSocket.SetAddress

TAbstractSocket	See also

Sets the Address property.

procedure SetAddress(Value: string);

Description

SetAddress is the protected implementation of the Address property. SetAddress raises an ESocketError exception if an attempt is made to set the Address property when the socket connection is open.


TAbstractSocket.SetHost
 VCL Reference

TAbstractSocket.SetHost

TAbstractSocket	See also

Sets the Host property.

procedure SetHost(Value: string);

Description

SetHost is the protected implementation of the Host property. SetHost raises an ESocketError exception if an attempt is made to set the Host property when the socket connection is open.


TAbstractSocket.SetPort
 VCL Reference

TAbstractSocket.SetPort

TAbstractSocket	See also

Sets the Port property.

procedure SetPort(Value: Integer);

Description

SetPort is the protected implementation of the Port property. SetPort raises an ESocketError exception if an attempt is made to set the Port property when the socket connection is open.


TAbstractSocket.SetService
 VCL Reference

TAbstractSocket.SetService

TAbstractSocket	See also

Sets the Service property.

procedure SetService(Value: string);

Description

SetService is the protected implementation of the Service property. SetService raises an ESocketError exception if an attempt is made to set the Service property when the socket connection is open.


Hierarchy

TObject

TPersistent

TComponent

TAbstractSocket


TActionMainMenuBar
 VCL Reference

 TActionMainMenuBar

Hierarchy	Properties	Methods 	Events 	Using TActionMainMenuBar	See also

TActionMainMenuBar is a rendering engine that renders action client items as menu items.

Unit

ActnMenus

Description

TActionMainMenuBar is a specialized container (like TPanel) that renders a group of items on screen in the order specified in the Action Manager. All of the items are created dynamically when the TActionMainMenuBar component is connected to an item from the Action Manager.

The items themselves are internal components (similar to TMenuItem) created by the TActionMainMenuBar and appear consistent with the look and function of a main menu. The layout of the items on the TActionMainMenuBar is managed automatically and specified by the Action Manager.


 VCL Reference

TActionMainMenuBar properties

TActionMainMenuBar	Alphabetically	Legend

Derived from TCustomActionMainMenuBar

Inactive

Derived from TCustomActionMenuBar

AnimationStyle

ExpandDelay

InMenuLoop

ParentControl

RootMenu

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TActionMainMenuBar properties

TActionMainMenuBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

AnimationStyle

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

ExpandDelay

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

Inactive

InMenuLoop

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentControl

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

RootMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TActionMainMenuBar Events

TActionMainMenuBar	Alphabetically	Legend

Derived from TCustomActionMenuBar

OnGetPopupClass

OnPopup

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TActionMainMenuBar Events

TActionMainMenuBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetPopupClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnPopup

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TActionMainMenuBar methods

TActionMainMenuBar	Alphabetically	Legend

In TCustomActionMainMenuBar

Create

CloseMenu

Derived from TCustomActionMenuBar

Destroy

TrackMenu

Derived from TCustomActionDockBar

Dock

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActionMainMenuBar methods

TActionMainMenuBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseMenu

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar

TCustomActionMenuBar

TCustomActionMainMenuBar

TActionMainMenuBar


TActiveForm
 VCL Reference

TActiveForm

Hierarchy	Properties	Methods	Events	Using TActiveForm	See also

TActiveForm is the base class for a VCL Form exposed as an ActiveX control. TActiveForm represents a form that is created via a class factory and used as an ActiveX control in ActiveX host applications.

Unit

AxCtrls

Description

A TActiveForm object is used to create a form ActiveX control that can be displayed and run from within Web browsers. This object is created by TActiveFormControl. It is a descendant of this class that you design in the Form Designer when you create an ActiveForm.


 VCL Reference

TActiveForm properties

TActiveForm	Alphabetically	Legend

In TActiveForm

ActiveFormControl

Derived from TCustomActiveForm

AxBorderStyle

Derived from TCustomForm

Active

ActiveControl

ActiveOleControl

BorderStyle

Canvas

ClientRect

Designer

DropTarget

Floating

FormState

HelpFile

KeyPreview

Menu

ModalResult

Monitor

OldCreateOrder

OleFormObject

Parent

PixelsPerInch

PrintScale

Scaled

Visible

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

Hint

HostDockSite

Left

LRDockWidth

Name

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TActiveForm properties

TActiveForm	By object	Legend

Action

Active

ActiveControl

ActiveFormControl

ActiveOleControl

Align

AlignDisabled

Anchors

AutoScroll

AutoSize

AxBorderStyle

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

Handle

Height

HelpContext

HelpFile

HelpKeyword

Hint

HorzScrollBar

HostDockSite

KeyPreview

Left

LRDockWidth

Menu

ModalResult

Monitor

Name

OldCreateOrder

OleFormObject

Owner

Parent

ParentWindow

PixelsPerInch

PopupMenu

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc

WindowState


TActiveForm.ActiveFormControl
 VCL Reference

TActiveForm.::ActiveFormControl

TActiveForm

Pointer to the ActiveFormControl object.

property ActiveFormControl: TActiveFormControl;

Description

Use ActiveFormControl to access the object that implements all the ActiveX interfaces for this ActiveForm. ActiveFormControl creates the TActiveForm object.


 VCL Reference

TActiveForm events

TActiveForm	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnCreate

OnDeactivate

OnDestroy

OnPaint

Derived from TWinControl

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TActiveForm events

TActiveForm	By object	Legend

OnActivate

OnClick

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDragDrop

OnDragOver

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint


 VCL Reference

TActiveForm methods

TActiveForm	Alphabetically	Legend

Derived from TCustomActiveForm

Create

WantChildKey

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

CreateNew

DefaultHandler

DefocusControl

Destroy

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollbar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActiveForm methods

TActiveForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollbar

WantChildKey


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TCustomActiveForm

TActiveForm


TActionListCollection
 VCL Reference

TActionListCollection

Hierarchy	Properties	Methods	See also

TActionListCollection is a collection that maintains information about action lists and their captions.

Unit

ActnMan

Description

ActionBand components, unlike other menu bar and tool bar components, do not use a single action list object. Instead, they have access to multiple lists through their action manager object. Those lists are contained in a TActionListCollection object, which is mostly just an array of action lists and their corresponding captions. Each list/caption pair is encapsulated by a TActionListItem object in the list.

You probably won't need to create your own instances or subclasses of TActionListCollection. Your TActionManager object will handle them for you.


 VCL Reference

TActionListCollection properties

TActionListCollection	Alphabetically	Legend

In TActionListCollection

ActionManager

ListItems

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TActionListCollection properties

TActionListCollection	By object	Legend

ActionManager

Count

ItemClass

Items

ListItems


TActionListCollection.ActionManager
 VCL Reference

TActionListCollection.ActionManager

TActionListCollection	See also

Refers to the action manager associated with the collection.

property ActionManager: TCustomActionManager

Description

Use ActionManager to refer to the action list collection's action manager object.


TActionListCollection.ListItems
 VCL Reference

TActionListCollection.ListItems

TActionListCollection	See also

A list of action lists and their associated captions.

property ListItems[Index: Integer]: TActionListItem

Description

ListItems is a list of TActionListItem objects, which each contain an action list and the associated caption.


 VCL Reference

TActionListCollection methods

TActionListCollection	Alphabetically	Legend

Derived from TOwnedCollection

Create

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionListCollection methods

TActionListCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TActionListCollection


TActionListItem
 VCL Reference

TActionListItem

Hierarchy	Properties	Methods	See also

TActionListItem represents an item in a action list collection.

Unit

ActnMan

Description

A TActionListItem is an element of an action list collection. It consists of two parts: an action list and a caption associated with that list. Because the caption is not part of the list itself, it is possible to have the list appear in two different places with different names.

TActionListItem objects are created through an action manager object; you do not need to create them yourself.


 VCL Reference

TActionListItem properties

TActionListItem	Alphabetically	Legend

In TActionListItem

ActionList

Caption

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TActionListItem properties

TActionListItem	By object	Legend

ActionList

Caption

Collection

DisplayName

ID

Index


TActionListItem.ActionList
 VCL Reference

TActionListItem.ActionList

TActionListItem	See also

Specifies an action list.

property ActionList: TCustomActionList;

Description

ActionList is a reference to the TActionList item's action list, which is the primary reason for the TActionListItem's existence.


TActionListItem.Caption
 VCL Reference

TActionListItem.Caption

TActionListItem	See also

The name displayed in the ActionBand components containing the action list.

property Caption: string;

Description

The Caption string is the name displayed by the action band components when referring to ActionList. Visibility of the caption is controlled by the CaptionOptions property of the associatedTActionClients object and the ShowCaption field of the associated TActionClientItem object. Refer to the documentation for these properties for more information.


 VCL Reference

TActionListItem methods

TActionListItem	Alphabetically	Legend

In TCollectionItem

Assign

In TCollectionItem

Changed

Create

Destroy

GetDisplayName

GetNamePath

GetOwner

SetDisplayName

SetIndex

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionListItem methods

TActionListItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetDisplayName

SetIndex


TActionListItem.Assign
 VCL Reference

TActionListItem.Assign

TActionListItem	See also

A method for copying the contents of one TActionListItem to another.

procedure Assign(Source: TPersistent override;

Description

Use Assign to copy the contents from one TActionListItem to another. See the documentation for the inherited method for more information.


TActionListItem.Create
 VCL Reference

TActionListItem.Create

TActionListItem	See also

Creates and initializes a TActionListItem instance.

constructor Create(Collection: TCollection); virtual;

Description

The Create method takes as a parameter the name of a TCollection instance. Create is called by TCollection’s Add method.


TActionListItem.Destroy
 VCL Reference

TActionListItem.Destroy

TActionListItem	See also

Destroys the TActionListItem instance and frees its memory.

destructor Destroy; override;

Description

Destroy is called indirectly by TCollection’s Clear method.


Hierarchy

TObject

TPersistent

TCollectionItem

TActionListItem


TActionManager
 VCL Reference

 TActionManager

Hierarchy	Properties	Methods	Events	Using TActionManager	See also

TActionManager provides a mechanism to manage and display all actions contained in an application.

Unit

ActnMan

Description

The Action Manager component allows you to specify layout information for custom user-defined actions and standard actions that are contained in an application and a set of controls which can "render" this information as UI elements.

The Action Manager allows you to add any of the VCL standard actions to your application and drag and drop any action in your application on to an action band, where it will automatically rendered as a UI element.

The Action Manager contains all of the layout information necessary to create menus, toolbars and Navigation bars (Outlook bars) automatically from this information. The layout information includes:

Order of appearance

Reference to an action which includes the action's Caption, ShortCut, Visible etc.

Color

Background

The Action manager stores this information in an streamable object (TActionClientItem) that can be written to disk, as a text or binary file. The Action Manager then uses this information to reconstruct the UI elements when the application is started again and display them on an action band component. Because the Action Manager is able to maintain state information, it is also adds the ability to allow the user of the application to customize the UI elements that are displayed on the action bands. This is easily done by dragging the standard action, TCustomizeBandAction, from the action manager editor and dropping it on an action band.

Additionally, the Action Manager maintains usage data about the items. This allows you to automatically hide infrequently used items in the UI (User Interface), making for a cleaner more effective UI.


 VCL Reference

TActionManager properties

TActionManager	Alphabetically	Legend

Derived from TCustomActionManager

ActionBars

FileName

LinkedActionLists

PrioritySchedule

Derived from TCustomActionList

ActionCount

Actions

Images

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TActionManager properties

TActionManager	By object	Legend

ActionBars

ActionCount

Actions

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DefaultActionBars

DesignInfo

FileName

Images

LinkedActionLists

Name

Owner

PrioritySchedule

State

Tag

VCLComObject


 VCL Reference

TActionManager events

TActionManager	Alphabetically	Legend

Derived from TCustomActionList

OnChange

OnExecute

OnUpdate


 VCL Reference

TActionManager events

TActionManager	By object	Legend

OnChange

OnExecute

OnUpdate


 VCL Reference

TActionManager methods

TActionManager	Alphabetically	Legend

Derived from TCustomActionManager

Assign

Create

Destroy

LoadFromFile

LoadFromStream

ResetActionBar

ResetUsageData

SaveToFile

SaveToStream

Derived from TCustomActionList

ExecuteAction

IsShortCut

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActionManager methods

TActionManager	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

ResetActionBar

ResetUsageData

SafeCallException

SaveToFile

SaveToStream

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomActionList

TCustomActionManager

TActionManager


TActionBars
 VCL Reference

TActionBars

Hierarchy	Properties	Methods	See also

TActionBars is a collection of TActionBarItem objects used internally by the action manager to represent all of the action bars connected to the action manager in an application.

Unit

ActnMan

Description

TActionBars is used by the action manager to maintain current layout information about all the action bars connected to the action manager in an application. TActionBars allows the action manager to write this information to disk in a file or to a stream. TActionBars also allows the action manager to reconstruct the all of the action bars based on information contained in a specified file or a stream.


 VCL Reference

TActionBars properties

TActionBars	Alphabetically	Legend

In TActionBars

ActionBars

HintShortCuts

SessionCount

ShowHints

Derived from TActionClientsCollection

ActionManager

Customizable

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TActionBars properties

TActionBars	By object	Legend

ActionBars

ActionManager

Count

Customizable

HintShortCuts

ItemClass

Items

SessionCount

ShowHints


TActionBars.ActionBars
 VCL Reference

TActionBars.ActionBars

TActionBars	See also

Contains a collection of all of the action bars connected to the action manager.

property ActionBars[const Index: Integer]: TActionBarItem;

Description

The ActionBars property contains a collection of all of the action bands connected to the action manager. When an action is dropped on an action band or the ActionManager property of an action band is set to the action manager component, the action band (in the form of a TActionBarItem) is automatically added to this collection.


TActionBars.HintShortCuts
 VCL Reference

TActionBars.HintShortCuts

TActionBars	See also

A forward to the application object's property of the same name.

property HintShortCuts: Boolean;

Description

The application object contains a property called HintShortCuts which determines whether or not the application's popup hint windows display shortcut information. The HintShortCuts property in TActionBars is simply another way to access the application's HintShortCuts property.


TActionBars.SessionCount
 VCL Reference

TActionBars.SessionCount

TActionBars	See also

Returns the number of times the application has been run.

property SessionCount: Integer;

Description

The SessionCount property stores the number of times the application has been run. SessionCount is used internally, by the action manager, in the calculation to determine whether a TActionClientItem is hidden or displayed on an action bar.


TActionBars.ShowHints
 VCL Reference

TActionBars.ShowHints

TActionBars	See also

Indicates whether hints should be shown for items in the collection.

property ShowHints: Boolean;

Description

Set ShowHints to False if you don't want hints shown for objects in the collection. The default value is True.


 VCL Reference

TActionBars methods

TActionBars	Alphabetically	Legend

In TActionBars

Add

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionBars methods

TActionBars	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TActionBars.Add
 VCL Reference

TActionBars.Add

TActionBars

Creates a new TActionBarItem instance and adds it to the Items array.

function Add: TActionBarItem;

Description

Add is called automatically when an action band is connected to an action manager component.


TActionBars.Create
 VCL Reference

TActionBars.Create

TActionBars

Creates and initializes a TActionBars object.

type TCollectionItemClass = class of TCollectionItem;

constructor Create(AOwner: TPersistent); ItemClass: TCollectionItemClass);

Description

The Create method takes as parameters, the owner and the name of a TCollectionItemClass instance. Create is called automatically by action manager when an instance of a TActionBars is required.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TActionClientsCollection

TActionBars


TAdapterNotifier
 VCL Reference

TAdapterNotifier

Hierarchy	Properties	Methods	See also

TAdapterNotifier provides the binding between a Delphi type object and comparable OLE type object.

Unit

AxCtrls

Description

Descendants of TCustomAdapter use TAdapterNotifier to bindDelphi objects with corresponding OLE objects. For example, TFontAdapter uses TAdapterNotifier to bind a TFont object with an OLE font object.


 VCL Reference

TAdapterNotifier properties

TAdapterNotifier	Alphabetically	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TAdapterNotifier properties

TAdapterNotifier	By object	Legend

RefCount


 VCL Reference

TAdapterNotifier methods

TAdapterNotifier	Alphabetically	Legend

In TAdapterNotifier

Create

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TAdapterNotifier methods

TAdapterNotifier	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TAdapterNotifier.Create
 VCL Reference

TAdapterNotifier.Create

TAdapterNotifier	See also

Creates an instance of a TAdapterNotifier object.

constructor Create(Adapter: TCustomAdapter);

Description

You would normally never create an object of this class.  TAdapterNotifier objects are created by and bound to a descendant of TCustomAdapter.


Hierarchy

TObject

TInterfacedObject

TAdapterNotifier


TADTField
 VCL Reference

TADTField

Hierarchy	Properties	Methods	Events 	Using TADTField	See also

A TADTField object represents an ADT (Abstract Data Type) field in a dataset.

Unit

DB

Description

ADT fields are database fields that contain Abstract Data Type (ADT) values. ADTs are user defined types created on the server, and are similar to records.  An ADT can contain most scalar field types, including array fields, reference fields, nested dataset fields, or nested ADTs.


 VCL Reference

TADTField properties

TADTField	Alphabetically	Legend

In TADTField

Size

Derived from TObjectField

AsString

AsVariant

DataSet

FieldCount

FieldKind

Fields

FieldValues

HasConstraints

ObjectType

UnNamed

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldName

FieldNo

FullName

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TADTField properties

TADTField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldCount

FieldKind

FieldName

FieldNo

Fields

FieldValues

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

ObjectType

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

UnNamed

ValidChars

Value

VCLComObject

Visible


TADTField.Size
 VCL Reference

TADTField.Size

TADTField

Size is the total number of fields of the ADT field.

property Size: Word;

Description

Size is the total number of subfields contained in the ADT field. These subfields may, in turn, be ADT fields, array fields, or nested dataset fields that have their own subfields.


 VCL Reference

TADTField events

TADTField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TADTField events

TADTField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TADTField methods

TADTField	Alphabetically	Legend

In TADTField

Create

Derived from TObjectField

Destroy

Derived from TField

Assign

AssignValue

Clear

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TADTField methods

TADTField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TADTField.Create
 VCL Reference

TADTField.Create

TADTField	See also

Creates an instance of TADTField.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TADTField. Create calls the inherited constructor and then sets the DataType to ftADT.


Hierarchy

TObject

TPersistent

TComponent

TField

TObjectField

TADTField


TAggregateField
 VCL Reference

TAggregateField

Hierarchy	Properties	Methods	Events 	Using TAggregateField	See also

TAggregate field represents a maintained aggregate in a client dataset.

Unit

DB

Description

TAggregateField represents an aggregate value from a client dataset in a form that can be used by data-aware controls. Use the Fields Editor on a ClientDataSet to create a persistent aggregate field to which a TDBText control can bind.

As with TAggregate, TAggregateField has an Expression property that represents a calculation summarizing the data in a set of records. When using aggregate fields, you do not need to explicitly create the corresponding aggregate object in the client dataset: the Fields editor creates that object when you create a persistent aggregate field.


 VCL Reference

TAggregateField properties

TAggregateField	Alphabetically	Legend

In TAggregateField

Active

AsString

AsVariant

Currency

DisplayFormat

DisplayName

Expression

GroupingLevel

Handle

IndexName

Precision

ResultType

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Value

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TAggregateField properties

TAggregateField	By object	Legend

Active

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

Currency

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

Expression

FieldKind

FieldName

FieldNo

FullName

GroupingLevel

Handle

HasConstraints

ImportedConstraint

Index

IndexName

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

Precision

ProviderFlags

ReadOnly

Required

ResultType

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TAggregateField.Active
 VCL Reference

TAggregateField.Active

TAggregateField	See also

Indicates whether the aggregate should be calculated.

property Active: Boolean;

Description

Use the Active property to indicate that the aggregate field’s value should be maintained when possible. If Active is False, the value of the aggregate is never calculated.

If Active is True, the aggregate field’s value is calculated unless

It summarizes records over a group not defined by the current index.

The client dataset’s AggregatesActive property is False.

Note:	To determine whether the aggregate that corresponds to the field is currently maintained, read its InUse property.


TAggregateField.AsString
 VCL Reference

TAggregateField.AsString

TAggregateField	See also

Represents the value of the aggregate field as a string.

property AsString: string;

Description

Use AsString to assign an aggregate field value to a string variable:

NewString := MyAggregateField.AsString;

Trying to set the AsString property causes TAggregateField to raise an exception because you can’t set aggregate field values (they are calculated from the data).


TAggregateField.AsVariant
 VCL Reference

TAggregateField.AsVariant

TAggregateField	See also

Represents the value of the aggregate field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to assign an aggregate field value to a variant variable,

NewVariant := MyAggregateField.AsVariant;

Trying to set the AsVariant property causes TAggregateField to raise an exception because you can’t set aggregate field values (they are calculated from the data).


TAggregateField.Currency
 VCL Reference

TAggregateField.Currency

TAggregateField	See also

Determines whether the value in the field should be formatted as a currency value.

property Currency: Boolean;

Description

Use the Currency property to specify the formatting of the field if its ResultType is a floating-point type (ftFloat or ftCurrency).

Floating-point values are formatted for display using the DisplayFormat property if it is assigned. If DisplayFormat is not assigned, Currency determines how the field is formatted for display. If Currency is True the value is formatted for display using the FloatToText function with the ffCurrency formatting code. If Currency is False, the value is formatted with the ffGeneral format.


TAggregateField.DisplayFormat
 VCL Reference

TAggregateField.DisplayFormat

TAggregateField	See also

Determines how numeric and time values are formatted for display in a data-aware control.

property DisplayFormat: String;

Description

Use the DisplayFormat property to override automatic formatting of a field for display purposes when ResultType is ftFloat, ftCurrency, ftDate, ftTime, or ftDateTime.

When ResultType is ftFloat or ftCurrency, the value of DisplayFormat is a string that encodes the formatting of data using the specifiers in the following table:

Specifier	Represents

0	Digit placeholder. If the value being formatted has a digit in the position where the "0" appears in the format string, then that digit is copied to the output string. Otherwise, a "0" is stored in that position in the output string.

#	Digit placeholder. If the value being formatted has a digit in the position where the "#" appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.

.	Decimal point. The first "." character in the format string determines the location of the decimal separator in the formatted value; any additional "." characters are ignored. The actual character used as a the decimal separator in the output string is determined by the DecimalSeparator global variable. The default value of DecimalSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

,	Thousand separator. If the format string contains one or more "," characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of "," characters in the format string does not affect the output, except to indicate that thousand separators are wanted. The actual character used as a the thousand separator in the output is determined by the ThousandSeparator global variable. The default value of ThousandSeparator is specified in the Number Format of the Regional Settings section in the Windows Control Panel.

E+	Scientific notation. If any of the strings "E+", "E-", "e+", or "e-" are contained in the format string, the number is formatted using scientific notation. A group of up to four "0" characters can immediately follow the "E+", "E-", "e+", or "e-" to determine the minimum number of digits in the exponent. The "E+" and "e+" formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The "E-" and "e-" formats output a sign character only for negative exponents.

'xx'/"xx"	Characters enclosed in single or double quotes are output as-is, and do not affect formatting.

;	Separates sections for positive, negative, and zero numbers in the format string.

The locations of the leftmost "0" before the decimal point in the format string and the rightmost "0" after the decimal point in the format string determine the range of digits that are always present in the output string.

The number being formatted is always rounded to as many decimal places as there are digit placeholders ("0" or "#") to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number.

If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the "." character in the format string, the extra digits are output before the first digit placeholder.

To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons.

One section: The format string applies to all values.

Two sections: The first section applies to positive values and zeros, and the second section applies to negative values.

Three sections: The first section applies to positive values, the second applies to negative values, and the third applies to zeros.

If the section for negative values or the section for zero values is empty, that is, if there is nothing between the semicolons that delimit the section, the section for positive values is used instead.

If the section for positive values is empty, or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.

When ResultType is ftDate, ftTime, or ftDateTime, the value of DisplayFormat is a string that encodes the formatting of data using the specifiers in the following table:

Specifier	Displays

c	The date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

d	The day as a number without a leading zero (1-31).

dd	The day as a number with a leading zero (01-31).

ddd	The day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.

dddd	The day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.

ddddd	The date using the format given by the ShortDateFormat global variable.

dddddd	The date using the format given by the LongDateFormat global variable.

m	The month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mm	The month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.

mmm	The month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.

mmmm	The month as a full name (January-December) using the strings given by the LongMonthNames global variable.

yy	The year as a two-digit number (00-99).

yyyy	The year as a four-digit number (0000-9999).

h	The hour without a leading zero (0-23).

hh	The hour with a leading zero (00-23).

n	The minute without a leading zero (0-59).

nn	The minute with a leading zero (00-59).

s	The second without a leading zero (0-59).

ss	The second with a leading zero (00-59).

t	The time using the format given by the ShortTimeFormat global variable.

tt	The time using the format given by the LongTimeFormat global variable.

am/pm	The time using the 12-hour clock for the preceding h or hh specifier, followed by "am" for any hour before noon, or "pm" for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

a/p	The time using the 12-hour clock for the preceding h or hh specifier, followed by "a" for any hour before noon, or "p" for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.

ampm	The time using the 12-hour clock for the preceding h or hh specifier, followed by the contents of the TimeAMString global variable for any hour before noon, or the contents of the TimePMString global variable for any hour after noon.

/	The date separator character given by the DateSeparator global variable.

:	The time separator character given by the TimeSeparator global variable.

'xx'/"xx"	Characters enclosed in single or double quotes are displayed as-is, with no formatting changes.


TAggregateField.DisplayName
 VCL Reference

TAggregateField.DisplayName

TAggregateField	See also

Represents the name of the field for display purposes.

property DisplayName: string;

Description

Set DisplayName to give the aggregate a name that can be used to label values displayed to the user.

Note:	When you create an aggregate field in the Fields editor, DisplayName is the same as the AggregateName property of the corresponding TAggregate object. However, if you change DisplayName, the aggregate’s AggregateName is not updated as well.


TAggregateField.Expression
 VCL Reference

TAggregateField.Expression

TAggregateField	See also

Specifies the formula used to calculate the aggregate value.

property Expression: string;

Description

Set Expression to indicate how aggregate values should be calculated. Expression contains an expression that includes one or more of the summary operators in the following table:

Operator	Use

Sum	Totals the values for a numeric field or expression.

Avg	Computes the average value for a numeric or date-time field or expression.

Count	Specifies the number of non-blank values for a field or expression. Use count(*) to count the number of records in a dataset or subgroup.

Min	Indicates the minimum value for a string, numeric, or date-time field or expression.

Max	Indicates the maximum value for a string, numeric, or date-time field or expression.

The summary operators act on field values or on expressions built from field values using the same operators you use to create filters. (You can’t nest summary operators, however.) You can create expressions by using operators on summarized values with other summarized values, or on summarized values and constants. However, you can’t combine summarized values with field values, because such expressions are ambiguous (there is no indication of which record should supply the field value.) These rules are illustrated in the following expressions:

Sum(Qty * Price)	{legal -- summary of an expression on fields }

Max(Field1) - Max(Field2)	{legal -- expression on summaries }

Avg(DiscountRate) * 100	{ legal -- expression of summary and constant }

Min(Sum(Field1))	{ illegal -- nested summaries }

Count(Field1) - Field2	{ illegal -- expression of summary and field }

Note:	To specify the set of records summarized by this expression, use the GroupingLevel property.


TAggregateField.GroupingLevel
 VCL Reference

TAggregateField.GroupingLevel

TAggregateField	See also

Specifies the set of records summarized by this aggregate field.

property GroupingLevel: Integer;

Description

Use GroupingLevel to indicate the groups of records over which the field’s aggregate is calculated. When GroupingLevel is 0 (the default), the aggregate summarizes all the records in the client dataset. When GroupingLevel is greater than 0, the aggregate summarizes each group of records that has the same values on the first GroupingLevel fields of the index.

GroupingLevel can be any value from 0 to the number of fields in the index specified by IndexName.


TAggregateField.Handle
 VCL Reference

TAggregateField.Handle

TAggregateField	See also

Points to the aggregate handle.

property Handle: Pointer;

Description

TAggregateField uses Handle internally to obtain its aggregated values. Most applications do not need to use this value.

Component writers can use Handle, if necessary, with the routines declared in the dsintf unit.


TAggregateField.IndexName
 VCL Reference

TAggregateField.IndexName

TAggregateField	See also

Specifies the index that is used to define subgroups of records.

property IndexName: String;

Description

Set IndexName to specify an index that sorts the records of the client dataset into subgroups. Each subgroup is defined as a set of records that all have the same values on a set of fields. This defining set of fields is the first GroupingLevel fields of the index.

IndexName is required for any aggregate that does not summarize all the records in the client dataset (GroupingLevel = 0). When the index associated with an aggregate is not the current index of the client dataset, its value is unavailable.


TAggregateField.Precision
 VCL Reference

TAggregateField.Precision

TAggregateField	See also

Determines the precision used in formatting floating-point values.

property Precision: Integer;

Description

When the aggregate field represents a floating-point value (ResultType is ftFloat or ftCurrency), use Precision to set the number of digits beyond the decimal point that appear before rounding begins. Precision affects the format of the floating-point value when it is displayed as a text string, not the actual value that is stored in the field.

The default value of Precision is 15 decimal places.

Note:	Precision must be greater than or equal to 2. Trying to set Precision to a value less than 2 changes the value of Precision to 2.


TAggregateField.ResultType
 VCL Reference

TAggregateField.ResultType

TAggregateField	See also

Indicates the data type of the aggregate field.

property ResultType: TFieldType;

Description

Read ResultType to determine the type of data that the aggregate produces.


 VCL Reference

TAggregateField events

TAggregateField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TAggregateField events

TAggregateField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TAggregateField methods

TAggregateField	Alphabetically	Legend

In TAggregateField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAggregateField methods

TAggregateField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TAggregateField.Create
 VCL Reference

TAggregateField.Create

TAggregateField	See also

Creates an instance of TAggregateField.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TAggregateField at runtime.

It is seldom necessary to call Create directly, because an aggregate field component is instantiated automatically when an aggregate field is added through the Fields Editor of a client dataset.

Create initializes DataType to ftUnknown, FieldKind to fkAggregate, Precision to 15, and Visible to False.


Hierarchy

TObject

TPersistent

TComponent

TField

TAggregateField


TAggregate
 VCL Reference

TAggregate

Hierarchy	Properties 	Methods	Events	Using TAggregate	See also

TAggregate represents a maintained aggregate in a client dataset.

Unit

DBClient

Description

Use TAggregate to specify the formula for an aggregate that can be used by a client dataset. Each aggregate object describes a calculation that summarizes the data in a set of records. The group of records that is summarized is part of the aggregate object. Thus, if a client dataset is performing the same summary calculation over subgroups of records and over the entire dataset, it must use two separate TAggregate objects.

When aggregates summarize data over a group of records (rather than the entire client dataset), they must be associated with an index. The fields in the index define the possible groups of records. When a client dataset changes its index, any aggregate not associated with the new index becomes unavailable, and any active aggregate associated with the new index becomes available.

Aggregate objects can be created and used directly in code at runtime. At design time, you can use the Fields editor to add aggregate fields to a client dataset. When you define aggregate fields at design time, the Fields editor automatically creates the TAggregate objects for them.


 VCL Reference

TAggregate properties

TAggregate	Alphabetically	Legend

In TAggregate

Active

AggHandle

AggregateName

DataSet

DataSize

DataType

Expression

GroupingLevel

IndexName

InUse

Visible

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TAggregate properties

TAggregate	By object	Legend

Active

AggHandle

AggregateName

Collection

DataSet

DataSize

DataType

DisplayName

Expression

GroupingLevel

ID

Index

IndexName

InUse

Visible


TAggregate.Active
 VCL Reference

TAggregate.Active

TAggregate	See also

Indicates whether the aggregate should be calculated.

property Active: Boolean;

Description

Use the Active property to indicate that the aggregate value should be maintained. If Active is False, the value of the aggregate is never calculated.

If Active is True, the aggregate value is calculated unless

It summarizes records over a group not defined by the current index.

The client dataset’s AggregatesActive property is False.

Note:	To determine whether the aggregate is currently maintained, read the InUse property.


TAggregate.AggHandle
 VCL Reference

TAggregate.AggHandle

TAggregate	See also

Provides access to the aggregate handle.

type

  hDSAggregate = type Integer;

property AggHandle: hDSAggregate;

Description

AggHandle is the handle for the aggregate instance that is used by the utilities that implement the aggregate object’s behavior. Most applications do not need to use this value.

Component writers can use AggHandle, if necessary, with the routines declared in the DSIntf unit.


TAggregate.AggregateName
 VCL Reference

TAggregate.AggregateName

TAggregate	See also

Specifies the name user interface components use when describing the aggregate.

property AggregateName: string;

Description

Set AggregateName to provide a name that can be used to label values displayed to the user. When displaying aggregates, read AggregateName to obtain a label for the value.


TAggregate.DataSet
 VCL Reference

TAggregate.DataSet

TAggregate	See also

Indicates the client dataset whose records are summarized by this aggregate.

property DataSet: TCustomClientDataSet;

Description

Read DataSet to access the client dataset that uses this aggregate.


TAggregate.DataSize
 VCL Reference

TAggregate.DataSize

TAggregate	See also

Indicates the number of bytes needed to store the aggregate’s value.

property DataSize: Integer;

Description

Read DataSize to determine how much memory is required to store the aggregate’s value. This is useful when defining objects that store aggregate values. For example, the Fields editor uses DataSize when defining aggregate fields.


TAggregate.DataType
 VCL Reference

TAggregate.DataType

TAggregate	See also

Indicates the data type of the calculated value.

property DataType: TFieldType;

Description

Read DataType to determine the data type of the value calculated by the aggregate. This may differ from the data type of the fields that are summarized. For example, an aggregate that counts non-null fields will return an integer (ftInteger), even if the records themselves are some other type.


TAggregate.Expression
 VCL Reference

TAggregate.Expression

TAggregate	See also

Specifies the formula used to calculate the aggregate value.

property Expression: String;

Description

Set Expression to indicate how aggregate values should be calculated. Expression is an expression that includes one or more of the summary operators in the following table:

Operator	Use

Sum	Totals the values for a numeric field or expression

Avg	Computes the average value for a numeric or date-time field or expression

Count	Specifies the number of non-blank values for a field or expression

Min	Indicates the minimum value for a string, numeric, or date-time field or expression

Max	Indicates the maximum value for a string, numeric, or date-time field or expression

The summary operators act on field values or on expressions built from field values using the same operators you use to create filters. (You can’t nest summary operators, however.) You can create expressions by using operators on summarized values with other summarized values, or on summarized values and constants. However, you can’t combine summarized values with field values, because such expressions are ambiguous (there is no indication of which record should supply the field value.) These rules are illustrated in the following expressions:

Sum(Qty * Price)	{legal -- summary of an expression on fields }

Max(Field1) - Max(Field2)	{legal -- expression on summaries }

Avg(DiscountRate) * 100	{legal -- expression of summary and constant }

Min(Sum(Field1))	{illegal -- nested summaries }

Count(Field1) - Field2	{illegal -- expression of summary and field }

Note:	To specify the set of records summarized by this expression, use the GroupingLevel property.


TAggregate.GroupingLevel
 VCL Reference

TAggregate.GroupingLevel

TAggregate	See also

Specifies the set of records summarized by this aggregate.

property GroupingLevel: Integer;

Description

Use GroupingLevel to indicate the groups of records over which this aggregate is calculated. When GroupingLevel is 0 (the default), the aggregate summarizes all the records in the client dataset. When GroupingLevel is greater than 0, the aggregate summarizes each group of records that has the same values on the first GroupingLevel fields of the index.

GroupingLevel can be any value from 0 to the number of fields in the index specified by IndexName.


TAggregate.IndexName
 VCL Reference

TAggregate.IndexName

TAggregate 	See also

Specifies the index that is used to define subgroups of records.

property IndexName: String;

Description

Set IndexName to specify an index that sorts the records of DataSet into subgroups. Each subgroup is defined as a set of records which all have the same values on a set of fields. This defining set of fields is the first GroupingLevel fields of the index.

IndexName is required for any aggregate that does not summarize all the records in the client dataset (GroupingLevel > 0). When the index associated with an aggregate is not the current index of the client dataset, its value is unavailable.


TAggregate.InUse
 VCL Reference

TAggregate.InUse

TAggregate	See also

Indicates whether the aggregate value is currently available.

property InUse: Boolean;

Description

Read InUse to determine whether the Value method returns a summarized value. When InUse is False, Value returns Null. When InUse is True, the aggregate is maintained so that it calculates the formula specified by Expression for the current set of records, including any edits to records in the current group.


TAggregate.Visible
 VCL Reference

TAggregate.Visible

TAggregate	See also

Indicates whether controls should display the aggregated value.

property Visible: Boolean;

Description

Set Visible to indicate to controls that the aggregate value should be hidden. When Visible is False, its value is still calculated.

To prevent the aggregate from being calculated, use the Active property instead.


 VCL Reference

TAggregate events

TAggregate	Alphabetically 	Legend

In TAggregate

OnUpdate


 VCL Reference

TAggregate events

TAggregate	By object 	Legend

OnUpdate


TAggregate.OnUpdate
 VCL Reference

TAggregate.OnUpdate

TAggregate	See also

Occurs when the value of the aggregate is recalculated.

type TAggUpdateEvent = procedure(Agg: TAggregate) of object;

property OnUpdate: TAggUpdateEvent

Description

Write an OnUpdate event handler to respond when the aggregate value is recomputed. For example, write code in an OnUpdate event handler to invalidate any controls that display the value of the aggregate so that they can repaint with the new value.

The Agg parameter specifies the aggregate whose value has just been recomputed.


 VCL Reference

TAggregate methods

TAggregate	Alphabetically	Legend

In TAggregate

Assign

Create

Destroy

GetDisplayName

Value

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TAggregate methods

TAggregate	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Value


TAggregate.Assign
 VCL Reference

TAggregate.Assign

TAggregate	See also

Copies the properties of another TAggregate object.

procedure Assign (Source: TPersistent); override;

Description

Call Assign to copy the properties of another object to the aggregate. If the Source object is another TAggregate object, Assign copies the values of its Expression, Active, IndexName, and GroupingLevel properties. Otherwise, Assign calls the inherited method, which copies the properties of any object that can copy to a TAggregate from its AssignTo method.


TAggregate.Create
 VCL Reference

 TAggregate.Create

TAggregate	See also

Creates and initializes an instance of TAggregate.

constructor Create(Aggregates: TAggregates; ADataSet: TCustomClientDataSet); reintroduce; overload;

constructor Create(Collection: TCollection); virtual;

Description

Most applications do not call Create to create an aggregate object. Instead, they call the Add method of the TAggregates collection to which the aggregate should belong.

The Aggregates or Collection parameter specifies the TAggregates collection to which the TAggregate instance should belong.

The ADataSet parameter specifies the client dataset whose data the aggregate summarizes.


TAggregate.Destroy
 VCL Reference

TAggregate.Destroy

TAggregate	See also

Destroys an instance of TAggregate.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TAggregate reference is not nil before calling Destroy.

Destroy frees the internal buffer that is used for calculating values.


TAggregate.GetDisplayName
 VCL Reference

TAggregate.GetDisplayName

TAggregate	See also

Specifies the name of the aggregate object as it appears in the Object Inspector.

function  GetDisplayName: string; override;

Description

GetDisplayName overrides the inherited method to provide more meaningful names for the aggregate when it appears in the object inspector. If the AggregateName property is set, GetDisplayName returns that. Otherwise, if the Expression property is set, it returns that. If all else fails, it calls the inherited method, which returns the class name with a number suffixed to ensure uniqueness.


TAggregate.Value
 VCL Reference

TAggregate.Value

TAggregate	See also

Returns the calculated value of the aggregate.

function Value: Variant;

Description

Call Value to obtain the evaluation of Expression over the group of records specified by GroupingLevel. If GroupingLevel is nonzero (that is, if the aggregate summarizes a subgroup of the records in the client dataset), Value summarizes the data for the group which contains the current record in the client dataset.

If the aggregate is not currently maintained, Value returns Null. An aggregate is not currently maintained when

The Active property is False.

The DataSet property is nil.

The aggregate summarizes a subgroup and the IndexName property does not match the current index of the client dataset.


Hierarchy

TObject

TPersistent

TCollectionItem

TAggregate


TAggregates
 VCL Reference

TAggregates

Hierarchy	Properties	Methods	Using TAggregates	See also

TAggregates is a collection of TAggregate objects.

Unit

DBClient

Description

TAggregates is the type of the Aggregates property, which represents all the maintained aggregates for a client dataset.  A single TAggregate object represents each maintained aggregate. Maintained aggregates summarize data over the records in the client dataset.

TAggregates can include a mix of active and inactive aggregate objects. Active aggregates are updated dynamically as the data in the client dataset is edited. Inactive aggregates define a formula for summarizing data and a group of records to summarize, but these formulas are not evaluated. Aggregates can be inactive because they are not currently needed, or because the index that defines the group of records they summarize is inactive.


 VCL Reference

TAggregates properties

TAggregates	Alphabetically	Legend

In TAggregates

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TAggregates properties

TAggregates	By object	Legend

Count

ItemClass

Items


TAggregates.Items
 VCL Reference

TAggregates.Items

TAggregates	See also

Provides indexed access to the TAggregate objects in the collection.

property Items[Index: Integer]:TAggregate; default;

Description

Use Items to access individual TAggregate objects maintained by TAggregates.

Items is the default property of TAggregates, so the name of the Items property can be left off when using this property. Thus the line

FirstAggregate := TClientDataSet1.Aggregates.Items[0];

can be written

FirstAggregate := TClientDataSet1.Aggregates[0];


 VCL Reference

TAggregates methods

TAggregates	Alphabetically	Legend

In TAggregates

Add

Clear

Create

Find

IndexOf

Derived from TCollection

Assign

BeginUpdate

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TAggregates methods

TAggregates	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Find

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TAggregates.Add
 VCL Reference

TAggregates.Add

TAggregates	See also

Creates a new TAggregate object and adds it to the end of the Items property array.

function Add: TAggregate;

Description

Call Add to add a new aggregate to the set of aggregates that can be used with a client dataset. Once the aggregate is created and added using Add, its properties can be set to indicate how it is used.


TAggregates.Clear
 VCL Reference

TAggregates.Clear

TAggregates	See also

Removes all aggregates from the Items property array.

procedure Clear; override;

Description

Call Clear to empty the Items property array. After Clear frees each aggregate in the Items array, it informs the associated client dataset so that it can update it’s ActiveAggs property.


TAggregates.Create
 VCL Reference

TAggregates.Create

TAggregates

Creates and initializes a TAggregates object.

constructor Create(Owner: TPersistent;

Description

Applications should not need to call the Create method directly.  The client dataset that uses TAggregates to represent its maintained aggregates creates this object from its own constructor.


TAggregates.Find
 VCL Reference

TAggregates.Find

TAggregates	See also

Returns the TAggregate object with a specified name.

function Find(const DisplayName: string): TAggregate;

Description

Call Find to obtain a specified TAggregate object from the Items property array. The DisplayName parameter specifies the value of the aggregate’s AggregateName property. If there is no aggregate with the specified name in the Items property array, Find returns nil.


TAggregates.IndexOf
 VCL Reference

TAggregates.IndexOf

TAggregates	See also

Returns the index of the TAggregate object with a specified name.

function IndexOf(const DisplayName: string): Integer;

Description

Call IndexOf to obtain the index of a specified TAggregate object in the Items property array. The DisplayName parameter specifies the value of the aggregate’s AggregateName property. If there is no aggregate with the specified name in the Items property array, IndexOf returns -1.


Hierarchy

TObject

TPersistent

TCollection

TAggregates


TAggregatedObject
 VCL Reference

TAggregatedObject

Hierarchy	Properties	Methods	See also

TAggregatedObject provides the functionality for an inner object of an aggregate by implementing the IInterface methods to delegate to the controlling IInterface.

Unit

System

Description

An aggregated object is an object composed of several interfaced objects. Each object implements its own behavior and interfaces, but all of the objects share the same reference count, which is that of the controller object. In the container pattern, the controller is the container object.

TAggregatedObject does not itself support any interfaces. However, as is typical of an aggregate, it does implement the methods of IInterface, which are used by the objects that descend from it. TAggregatedObject, therefore, serves as a base for classes that implement interfaces for creating objects that are part of an aggregate.

TAggregatedObject is used as a base for classes that create contained objects and connecting objects. Using TAggregatedObject ensures that calls to the IInterface methods delegate to the controlling IInterface of the aggregate.

The controlling IInterface is specified in the constructor for TAggregatedObject and is indicated by the Controller property.

For more information about aggregation, controlling objects, and interfaces, see the Inside OLE, second edition, by Kraig Brockschmidt, the Microsoft Web site, or the Windows SDK Help.


 VCL Reference

TAggregatedObject properties

TAggregatedObject	Alphabetically	Legend

In TAggregatedObject

Controller


 VCL Reference

TAggregatedObject properties

TAggregatedObject	By object	Legend

Controller


TAggregatedObject.Controller
 VCL Reference

TAggregatedObject.Controller

TAggregatedObject	See also

Provides access to the controlling interface of the aggregate.

property Controller: IInterface;

Description

Controller is the interface reference of the aggregate. TAggregatedObject is used as part of an aggregate that has a single controlling IInterface. The IInterface methods that are implemented in aggregated objects are delegated to the Controller.

When the aggregated object is created, its constructor is passed a controlling IInterface. Controller is initialized to this IInterface in the constructor.


 VCL Reference

TAggregatedObject methods

TAggregatedObject	Alphabetically	Legend

In TAggregatedObject

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TAggregatedObject methods

TAggregatedObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TAggregatedObject.Create
 VCL Reference

TAggregatedObject.Create

TAggregatedObject	See also

Instantiates an aggregated object.

constructor Create(const Controller: IInterface);

Description

Call Create to instantiate an aggregated object at runtime.

Create allocates memory for an aggregated object and sets the Controller property to the Controller parameter passed to it. The Controller is the controlling interface of the aggregate. All other interfaces implemented in the aggregate delegate IInterface method calls to this Controller.


Hierarchy

TObject

TAggregatedObject


TWebActionItem
 VCL Reference

TWebActionItem

Hierarchy	Properties	Methods	Events	Using TWebActionItem	See also

TWebActionItem allows a Web server application to create and send responses to HTTP request messages.

Unit

HTTPApp

Description

Use TWebActionItem to assemble the response to a particular type of HTTP request message in a Web server application. Each action item is specific to a particular URI path and HTTP request method.

The web dispatcher chooses an appropriate action item to handle an HTTP request message by

matching the path portion of the URI requested by the Web client with the PathInfo property in the TWebActionItem object

matching the method requested by the Web client with the method type the action item knows how to handle.

An action item handles an HTTP request message automatically using an associated content producer or using its OnAction event handler. The OnAction event handler can read the request message and assemble a response by setting the properties of a TWebResponse object. It can tell the TWebResponse object to send the response message back to the Web client, or allow the TWebApplication object to send the message after other action items have had a chance to add to the response.


 VCL Reference

TWebActionItem properties

TWebActionItem	Alphabetically	Legend

In TWebActionItem

Default

DisplayName

Enabled

MethodType

Name

PathInfo

Producer

ProducerContent

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TWebActionItem properties

TWebActionItem	By object	Legend

Collection

Default

DisplayName

Enabled

ID

Index

MethodType

Name

PathInfo

Producer

ProducerContent


TWebActionItem.Default
 VCL Reference

TWebActionItem.Default

TWebActionItem	See also

Indicates whether the action item should handle any request that is not handled by another available action item.

property Default: Boolean;

Description

Set Default to True to make this action item the default action in the list of action items maintained by the TWebDispatcher object. TWebDispatcher attempts to match HTTP request messages to action items by matching the MethodType and PathInfo of the target URI. If no match can be found, the TWebDispatcher invokes the default action item, regardless of its MethodType or PathInfo properties.

When an action item is chosen as the default action item, the value of its Enabled property is ignored. Thus, if an action item sets Enabled to False and Default to True, TWebDispatcher will first look for a match with any other action item, even if the PathInfo and MethodType of the default action item match the request perfectly. Then, only after all other action items have been rejected, TWebDispatcher selects the default action item. If the default action item is enabled, it may be selected before all other action items have been considered because the MethodType and PathInfo match the request.

The default action item must be prepared to generate a response to any HTTP request, for any MethodType and PathInfo. This may consist of simply setting a response status code of 404 (the URI could not be matched) or 405 (the requested method is not supported).

Setting Default to True sets the Default property of the previous default action item to False.


TWebActionItem.DisplayName
 VCL Reference

TWebActionItem.DisplayName

TWebActionItem	See also

Names an individual action item within a collection of action items.

property DisplayName: string;

Description

Use DisplayName to specify a particular action item in the list of action items maintained by the TCustomWebDispatcher object. When setting the DisplayName property, the new value must not match the DisplayName of any other action item in the list maintained by the TCustomWebDispatcher object. Trying to set the DisplayName to a DisplayName that is already in use raises an exception.


TWebActionItem.Enabled
 VCL Reference

TWebActionItem.Enabled

TWebActionItem	See also

Indicates whether the action item can respond to HTTP request messages that match its MethodType and PathInfo properties.

property Enabled: Boolean;

Description

Set Enabled to False to disable an action item. TWebDispatcher will ignore disabled action items when it looks for an action item to handle a request.

When an action item is chosen as the default action item, the value of its Enabled property is ignored. Thus, if an action item sets Enabled to False and Default to True, TWebDispatcher will first look for a match with any other action item, even if the PathInfo and MethodType of the default action item match the request perfectly. Then, only after all other action items have been rejected, the TWebDispatcher selects the default action item. If the default action item is enabled, it may be selected before all other action items have been considered because the MethodType and PathInfo match the request.


TWebActionItem.MethodType
 VCL Reference

TWebActionItem.MethodType

TWebActionItem	See also

Specifies the type of HTTP request methods the action item knows how to service.

property MethodType: TMethodType;

Description

Set MethodType to indicate the types of requests that are serviced by the action item. TWebDispatcher chooses an action item to handle an HTTP request message when the MethodType of the action item matches the MethodType of the request message. (The PathInfo properties must also match).

Add action items with MethodType set to mtAny to the end of the Actions list of the TWebDispatcher object. That way, any action item that exactly matches a request with a MethodType of mtGet, mtHead, mtPost, or mtPut will be chosen before the mtAny value is matched to the request.


TWebActionItem.Name
 VCL Reference

TWebActionItem.Name

TWebActionItem	See also

Identifies an individual action item when it is referenced from other objects.

property Name: string;

Description

Use Name to uniquely specify an individual action item in code anywhere in the application. For action items, Name is equivalent to the DisplayName property. Therefore, when setting the Name property, the new value must not match the DisplayName of any other action item in the list maintained by TCustomWebDispatcher. Trying to set the Name to a DisplayName that is already in use raises an exception.


TWebActionItem.PathInfo
 VCL Reference

TWebActionItem.PathInfo

TWebActionItem	See also

Indicates the path portion of the Uniform Resource Identifier (URI) for which the action item handles requests.

property PathInfo: string;

Description

Set PathInfo to the path portion of the URI for the target of any request messages serviced by the action item. TWebDispatcher matches action items to request messages by comparing PathInfo with the path portion of the URI specified as the target of the request. If the PathInfo properties match, and the MethodType matches, TWebDispatcher invokes the action item to respond to the request message.

If the action item has an associated content producer, the value of PathInfo is the name of the producer unless it is explicitly changed.


TWebActionItem.Producer
 VCL Reference

TWebActionItem.Producer

TWebActionItem	See also

Specifies a content producer that generates the content of response messages when the action item executes.

property Producer: TCustomContentProducer;

Description

Set Producer to associate the action item with a content producer of the type TCustomContentProducer. (If a content producer of type IProduceContent is used instead of TCustomContentProducer, then the property ProducerContent should be set instead.) If Producer is not nil, then when the web dispatcher passes a request message to the action item, the action item sets the Content property of the response message to the value returned by the producer’s Content method. After the content producer has assigned the response’s Content property, the action item receives an OnAction event, where it can optionally set other response properties or send the response message.

If Producer is nil, the action item must use the OnAction event handler to influence the response message.

The properties Producer and ProducerContent are mutually exclusive. If one is set, the other must not be.

Note:	Each content producer can be associated with only one action item at a time. Setting the Producer property of one action item causes the Web dispatcher that manages that item to check whether any other action item has its Producer property set to the same component. If another action item was associated with the same producer, its Producer property is changed to nil.


TWebActionItem.ProducerContent
 VCL Reference

TWebActionItem.ProducerContent

TWebActionItem	See also

Specifies a content producer that generates the content of response messages when the action item executes.

property ProducerContent: TComponent;

Description

This property is identical to Producer except for the type of content producer. ProducerContent is used when the producer is of type IProduceContent instead of TCustomContentProducer. In the latter case, the property Producer is set instead. Note that Producer and ProducerContent are mutually exclusive; if one is set, the other must not be.


 VCL Reference

TWebActionItem events

TWebActionItem	Alphabetically	Legend

In TWebActionItem

OnAction


 VCL Reference

TWebActionItem events

TWebActionItem	By object	Legend

OnAction


TWebActionItem.OnAction
 VCL Reference

TWebActionItem.OnAction

TWebActionItem	See also 	Example

Occurs when TWebDispatcher matches the action item to a newly-arrived HTTP request message.

property OnAction: THTTPMethodEvent;

Description

Write an OnAction event handler to respond to HTTP request messages that match the MethodType and PathInfo properties. OnAction occurs immediately after the response message’s Content property has been initialized by the action item’s Producer property (if Producer is set).

In an OnAction event handler, read Request and perform the requested Method if possible. Set the properties of the Response parameter as appropriate. If the OnAction event handler does not service the response, or if it only partially handles the request and must let another action item finish the response, set the Handled parameter to False.

An OnAction event handler can call the SendRedirect or SendResponse method of Response to send the HTTP response message to the Web client. If the OnAction event handler does not send the response, the Web application will send it after all action items have finished filling in the Response.

Tip:	The OnAction event handler can use descendants of TCustomContentProducer to help assemble the contents of the response message.


 VCL Reference

TWebActionItem methods

TWebActionItem	Alphabetically	Legend

In TWebActionItem

AssignTo

Create

Destroy

Derived from TCollectionItem

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebActionItem methods

TWebActionItem	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TWebActionItem.AssignTo
 VCL Reference

TWebActionItem.AssignTo

TWebActionItem	See also

Copies the properties of the action item to another action item.

procedure AssignTo(Dest: TPersistent); override;

Description

To assign the value of one action item to another, use the Assign method of the target action item.

AssignTo enables the Assign method of a target action item to copy the properties of a source action item. AssignTo copies the values of the Default, Enabled, MethodType and PathInfo properties to the Dest parameter if it is an action item. If Dest is not an action item, AssignTo calls the inherited method.


TWebActionItem.Create
 VCL Reference

TWebActionItem.Create

TWebActionItem	See also

Creates an instance of TWebActionItem.

constructor Create(Collection: TCollection); override;

Description

Call Create to create a TWebActionItem object at runtime. Action items created in the action editor at design time are instantiated automatically.

After calling the inherited constructor, Create initializes the Enabled property to True, and sets the action item so that it will match any HTTP request targeted to a URI with an empty PathInfo.


TWebActionItem.Destroy::
 VCL Reference

TWebActionItem.Destroy

TWebActionItem	See also

Destroys an instance of TWebActionItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Action items are destroyed when the TWebActionItems object that manages them calls the Free method.


Hierarchy

TObject

TPersistent

TCollectionItem

TWebActionItem


TWebActionItems
 VCL Reference

TWebActionItems

Hierarchy	Properties	Methods	Using TWebActionItems	See also

TWebActionItems is a collection of TWebActionItem objects.

Unit

HTTPApp

Description

TCustomWebDispatcher uses TWebActionItems to store and manipulate the individual action items it manages. TWebActionItems provides properties and events to

Add new action items to the collection.

Copy the list of action items from another TWebActionItems.

Get the attributes of specified action items in the collection.

Empty the collection of action items.


 VCL Reference

TWebActionItems properties

TWebActionItems	Alphabetically	Legend

In TWebActionItems

Items

WebDispatcher

Derived from TCollection

Count

ItemClass


 VCL Reference

TWebActionItems properties

TWebActionItems	By object	Legend

Count

ItemClass

Items

WebDispatcher


TWebActionItems.Items
 VCL Reference

TWebActionItems.Items

TWebActionItems	See also

Lists the TWebActionItem objects stored by this TWebActionItems object.

property Items[Index: Integer]: TWebActionItem; default;

Description

Use Items to get access to the individual action items stored by the TWebActionItems object. Items is an indexed array, where the first action item has index 0, the second action item has index 1, and so on. Use Items with the Count property to iterate over all the action items in the collection.


TWebActionItems.WebDispatcher
 VCL Reference

TWebActionItems.WebDispatcher

TWebActionItems

Provides access to the dispatcher that uses TWebActionItems to store and manipulate its action items.

property WebDispatcher: TCustomWebDispatcher;

Description

Read WebDispatcher to get access to the dispatcher object that uses the collection of action items to respond to HTTP request messages.


 VCL Reference

TWebActionItems methods

TWebActionItems	Alphabetically	Legend

In TWebActionItems

Add

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebActionItems methods

TWebActionItems	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TWebActionItems.Add
 VCL Reference

TWebActionItems.Add

TWebActionItems	See also

Adds a new action item to the end of the collection.

function Add: TWebActionItem;

Description

Call Add to add an action item to the collection of action items managed by the dispatcher. The new item is added to the end of the Items array. Add returns the action item so that its properties can be set to specify its use.

Because the dispatcher looks through the action items in order when it tries to find an action item to handle an HTTP request message, add any action items that preprocess HTTP requests first. Then add the most specific action items. This way, more general action items will not be matched to request messages before a closer match can be found.


TWebActionItems.Create
 VCL Reference

TWebActionItems.Create

TWebActionItems	See also

Creates an instance of TWebActionItems.

type TCollectionItemClass = class ofTCollectionItem;

constructor Create(WebDispatcher: TCustomWebDispatcher; ItemClass: TCollectionItemClass);

Description

Do not call the constructor for TWebActionItems. TWebActionItems is tailored to work with TCustomWebDispatcher. The TCustomWebDispatcher object creates TWebActionItems in its own constructor.


Hierarchy

TObject

TPersistent

TCollection

TWebActionItems


TApacheApplication
 VCL Reference

TApacheApplication

Hierarchy	Properties	Methods	Using TApacheApplication	See also

TApacheApplication encapsulates an Apache server application.

Unit

ApacheApp

Description

TApacheApplication provides the fundamental behavior of an Apache server application. TApacheApplication starts running when the Apache server receives an HTTP request message. It creates TApacheRequest and TApacheResponse objects to represent the request message and any response that should be sent in return, passes these to the dispatcher so that the response can be filled in, and sends the response if it was not already sent by a TWebActionItem.

Each Apache server project automatically declares an Application variable of type TApacheApplication as the instance of the application. This declaration overrides the Application variable declared in the Forms unit if the ApacheApp unit is declared last in the uses list of the project file. Every Apache server application must include the ApacheApp unit.

To work with a CGI server, use the TCGIApplication object instead. To work with an ISAPI server, use the TISAPIApplication object.


 VCL Reference

TApacheApplication properties

TApacheApplication	Alphabetically	Legend

Derived from TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TApacheApplication properties

TApacheApplication	By object	Legend

ActiveCount

CacheConnections

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

VCLComObject

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


 VCL Reference

TApacheApplication methods

TApacheApplication	Alphabetically	Legend

In TApacheApplication

Create

Destroy

Initialize

ProcessRequest

Derived from TWebApplication

CreateForm

Run

Derived from TWebRequestHandler

AddWebModuleFactory

HandleException

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TApacheApplication methods

TApacheApplication	By object	Legend

AddWebModuleFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ProcessRequest

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

UpdateAction


TApacheApplication.Initialize
 VCL Reference

TApacheApplication.Initialize

TApacheApplication	See also

Initializes the application.

procedure Initialize; override;

Description

Use Initialize to initialize the Apache application before it starts running.  Initialize is the first method called for every Delphi project.

Note:	Although Initialize is the first method called in the project source code, it is not the first code that is executed in an application.


TApacheApplication.ProcessRequest
 VCL Reference

TApacheApplication.ProcessRequest

TApacheApplication	See also

Points to the Apache request record.

function ProcessRequest(var r: request_rec): ap_int;

Description

ProcessRequest is called by the Apache request handler.  When a request comes through, ProcessRequest points to the standard Apache request structure, Prequest_rec.


TApacheApplication.Create
 VCL Reference

TApacheApplication.Create

TApacheApplication	See also

Creates an instance of TApacheApplication.

constructor Create(AOwner: TComponent); override;

Description

Do not call Create. The single Web application object named Application is instantiated automatically when the ApacheApp unit is included in the uses list of the project.

Create allocates the helper objects used by TApacheApplication.


TApacheApplication.Destroy
 VCL Reference

TApacheApplication.Destroy

TApacheApplication	See also

Destroys an instance of TApacheApplication.

destructor Destroy; override;

Description

Never call the Destroy or Free method. The application is freed automatically when the application stops running.

Destroy frees the helper objects that were created at startup, as well as all Web modules created by the application.


Hierarchy

TObject

TPersistent

TComponent

TWebRequestHandler

TWebApplication

TApacheApplication


TApacheRequest
 VCL Reference

TApacheRequest

Hierarchy	Properties	Methods	Using TApacheRequest	See also

TApacheRequest represents client request information that is passed to an Apache server application.

Unit

ApacheHTTP

Description

Use TApacheRequest to interpret an HTTP request to an Apache server application.

Apache application objects create TApacheRequest objects to capture client requests. The properties of TApacheRequest are obtained from the Web server. The Apache application uses TApacheRequest objects to create corresponding TCGIResponse objects. The TWebDispatcher for the application then invokes the TWebActionItem that is associated with the path portion of the URL of the TApacheRequest object.


 VCL Reference

TApacheRequest properties

TApacheRequest	Alphabetically	Legend

Derived from TWebRequest

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TApacheRequest properties

TApacheRequest	By object	Legend

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TApacheRequest methods

TApacheRequest	Alphabetically	Legend

In TApacheRequest

Create

GetFieldByName

ReadClient

ReadString

TranslateURI

WriteClient

WriteHeaders

WriteString

Derived from TWebRequest

Destroy

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TApacheRequest methods

TApacheRequest	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

FieldAddress

Free

FreeInstance

GetFieldByName

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadClient

ReadString

SafeCallException

TranslateURI

WriteClient

WriteHeaders

WriteString


TApacheRequest.Create
 VCL Reference

TApacheRequest.Create

TApacheRequest	See also

Creates an instance of TApacheRequest.

constructor Create(var r: request_rec);

Description

Applications shouldn’t need to directly instantiate an Apache request object. The TApacheApplication object creates a TApacheRequest object whenever it receives a client request.


TApacheRequest.GetFieldByName
 VCL Reference

TApacheRequest.GetFieldByName

TApacheRequest

Returns the value of the HTTP header variable specified by the Name parameter.

function GetFieldByName(const Name: string): string;

Description

Use GetFieldByName to read the value of an HTTP header variable that is not surfaced as one of the properties of TApacheRequest. For information on possible HTTP request header variables, see the current Internet standards documents.


TApacheRequest.ReadClient
 VCL Reference

TApacheRequest.ReadClient

TApacheRequest	See also

Reads from the HTTP request into a buffer.

function ReadClient(var Buffer; Count: Integer): Integer;

Description

Use ReadClient to get the next chunk of information when the content of the request message is too large for the Content property.

Use Buffer to provide a buffer to contain the content information. Use Count to specify the number of bytes to read. ReadClient returns the number of bytes actually read.


TApacheRequest.ReadString
 VCL Reference

TApacheRequest.ReadString

TApacheRequest	See also

Reads Count bytes from the HTTP request into a string.

function ReadString(Count: Integer): string;

Description

Use ReadString to get the next chunk of information when the content of the request message is too large for the Content property.


TApacheRequest.TranslateURI
 VCL Reference

TApacheRequest.TranslateURI

TApacheRequest	See also

Translates a Uniform Resource Identifier (URI) into an internal representation of a location on the server.

function TranslateURI(const URI: string): string;

Description

Use TranslateURI to translate the URI specified in a client request into a format that can be used by the server application. The internal format varies, depending on whether the server application is an ISAPI or NSAPI application. TranslateURI is not relevant to CGI applications.


TApacheRequest.WriteClient
 VCL Reference

TApacheRequest.WriteClient

TApacheRequest	See also

Writes Count bytes from Buffer back to the HTTP client.

function WriteClient(var Buffer; Count: Integer): Integer;

Description

WriteClient is used by TApacheResponse to send the contents of a response to the Apache client.


TApacheRequest.WriteHeaders
 VCL Reference

TApacheRequest.WriteHeaders

TApacheRequest	See also

Provides a method for writing an HTTP header string.

function WriteHeaders(StatusCode: Integer; const StatusString, Headers: string): Boolean; override;

Description

Use WriteHeaders to write an HTTP header string.


TApacheRequest.WriteString
 VCL Reference

TApacheRequest.WriteString

TApacheRequest	See also

Writes the string AString back to the HTTP client.

function WriteString(const AString: string): Boolean;

Description

WriteString is used by TApacheResponse to send the contents of a response to the Apache client.


Hierarchy

TObject

TWebRequest

TApacheRequest


TApacheResponse
 VCL Reference

TApacheResponse

Hierarchy	Properties	Methods	Using TApacheResponse	See also

TApacheResponse represents HTTP messages sent by an Apache application in response to an HTTP request message.

Unit

ApacheHTTP

Description

Use TApacheResponse to specify the response to an HTTP request message in an Apache application.

The Apache application creates a TApacheResponse object based on the TApacheRequest object for an incoming web client request message. The TWebDispatcher for the application then passes the TApacheResponse object to the TWebActionItem associated with the TApacheRequest object. The TWebActionItem sets the properties of the TApacheResponse object.


 VCL Reference

TApacheResponse properties

TApacheResponse	Alphabetically	Legend

In TApacheResponse

ReturnCode

Derived from TWebResponse

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TApacheResponse properties

TApacheResponse	By object	Legend

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

ReturnCode

Server

StatusCode

Title

Version

WWWAuthenticate


TApacheResponse.ReturnCode
 VCL Reference

TApacheResponse.ReturnCode

TApacheResponse	See also

Sets or returns the Apache request code.

property ReturnCode: Integer;

Description

Use ReturnCode to set or return the Apache request code.  The Apache request code can be one of:

The following tables lists the standard status codes and their corresponding reason strings.

Request Code	Meaning

 0	The web module handled a stage of the request (AP_OK)

-1	The web module declined the request (AP_DECLINED)

-2	The web module completed the request (AP_DONE)


 VCL Reference

TApacheResponse methods

TApacheResponse	Alphabetically	Legend

In TApacheResponse

Create

SendRedirect

SendResponse

SendStream

Sent

Derived from TWebResponse

Destroy

GetCustomHeader

SetCookieField

SetCustomHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TApacheResponse methods

TApacheResponse	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetCustomHeader

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SendRedirect

SendResponse

SendStream

Sent

SetCookieField

SetCustomHeader

TApacheResponseTApacheResponse_Create>main


TApacheResponse.Create
 VCL Reference

TApacheResponse.Create

TApacheResponse	See also

Creates an instance of TApacheResponse to represent the response to the HTTPRequest parameter.

constructor Create(HTTPRequest: TWebRequest);

Description

Applications shouldn’t need to call Create to instantiate an Apache response object. The TApacheApplication object creates a TApacheResponse for each TApacheRequest it creates.


TApacheResponse.SendRedirect
 VCL Reference

TApacheResponse.SendRedirect

TApacheResponse	See also

Sends the response with a StatusCode of 301 (Moved Permanently) and a Location of URI.

procedure SendRedirect(const URI: string);

Description

Call SendRedirect to redirect the web client request to another URI that is the proper target of the request. SendRedirect does the same thing as setting the StatusCode to 301, the Location to URI, and calling SendResponse.


TApacheResponse.SendResponse
 VCL Reference

TApacheResponse.SendResponse

TApacheResponse	See also

Sends the HTTP response message to the web client.

procedure SendResponse;

Description

Call SendResponse after setting the properties of the HTTP response object to specify the response that should be made to the web client. If the request should be redirected to another URI, it is more efficient to call SendRedirect instead.


TApacheResponse.SendStream
 VCL Reference

TApacheResponse.SendStream

TApacheResponse	See also

Sends the HTTP response message with the contents set to the contents of AStream.

procedure SendStream(AStream: TStream);

Description

Only call SendStream after first calling SendResponse. Unlike SendStream, SendResponse fills the header of the HTTP response message, based on the properties of the TApacheResponse object. If SendResponse has not been called first to set the header of the HTTP response message, set the ContentStream property to AStream, and call SendResponse.


TApacheResponse.Sent
 VCL Reference

TApacheResponse.Sent

TApacheResponse	See also

Indicates whether the HTTP response message has already been sent.

function Sent: Boolean;

Description

TApacheResponse checks whether the message was sent and returns True or False as appropriate.

TApacheApplication objects read Sent and send unsent responses to the web client.


Hierarchy

TObject

TWebResponse

TApacheResponse


TArrayField
 VCL Reference

TArrayField

Hierarchy	Properties	Methods	Events 	Using TArrayField	See also

TArrayField represents an Array field in a dataset.

Unit

DB

Description

Array fields consist of a set of subfields of the same type. The field type of all subfields can be scalar (e.g. float, string), or non-scalar (an ADT), but an array field of arrays is not permitted. The SparseArrays property of TDataSet determines whether a unique TField object is created for each element of the array field.


 VCL Reference

TArrayField properties

TArrayField	Alphabetically	Legend

In TArrayField

Size

Derived from TObjectField

AsString

AsVariant

DataSet

FieldCount

FieldKind

Fields

FieldValues

HasConstraints

ObjectType

UnNamed

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldName

FieldNo

FullName

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TArrayField properties

TArrayField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldCount

FieldKind

FieldName

FieldNo

Fields

FieldValues

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

ObjectType

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

UnNamed

ValidChars

Value

VCLComObject

Visible


TArrayField.Size
 VCL Reference

TArrayField.Size

TArrayField

The number of elements in the array field.

property Size: Word;

Description

Use Size property to get or set the number of elements in the array field.


 VCL Reference

TArrayField events

TArrayField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TArrayField events

TArrayField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TArrayField methods

TArrayField	Alphabetically	Legend

In TArrayField

Create

Derived from TObjectField

Destroy

Derived from TField

Assign

AssignValue

Clear

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TArrayField methods

TArrayField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TArrayField.Create
 VCL Reference

TArrayField.Create

TArrayField	See also

Creates an instance of TArrayField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to explicitly create TArrayField instances. These are created automatically by the dataset.

Create calls the inherited TField constructor, sets the DataType to ftArray, and sets the Size to 10. The AOwner parameter specifies the owner of the field (typically, the dataset). The owner is responsible for freeing the field component.


Hierarchy

TObject

TPersistent

TComponent

TField

TObjectField

TArrayField


TActionClientsCollection
 VCL Reference

TActionClientsCollection

Hierarchy	Properties	Methods	See also

TActionClientsCollection is a collection that maintains information about the action manager that owns the collection.

Unit

ActnMan

Description

By maintaining information about the action manager that owns the collection, TActionClientsCollection lets the Object Inspector display the collection's name at design time.


 VCL Reference

TActionClientsCollection properties

TActionClientsCollection	Alphabetically	Legend

In TActionClientsCollection

ActionManager

Customizable

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TActionClientsCollection properties

TActionClientsCollection	By object	Legend

ActionManager

Count

Customizable

ItemClass

Items


TActionClientsCollection.ActionManager
 VCL Reference

TActionClientsCollection.ActionManager

TActionClientsCollection	See also

Returns the action manager that owns the TActionClientsCollection object.

property ActionManager: TCustomActionManager;

Description

ActionManager contains a reference to the action manager that owns the TActionClientsCollection object.


TActionClientsCollection.Customizable
 VCL Reference

TActionClientsCollection.Customizable

TActionClientsCollection

Indicates whether the action clients collection is customizable or not.

property Customizable: Boolean;

Description

The default setting for Customizable is True, which indicates that the collection can be customized. Set Customizable to False if you don't want it to be customizable. Collections marked that way will appear greyed out in the customize dialog.


 VCL Reference

TActionClientsCollection methods

TActionClientsCollection	Alphabetically	Legend

In TActionClientsCollection

AfterConstruction

Derived from TOwnedCollection

Create

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionClientsCollection methods

TActionClientsCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TActionClientsCollection.AfterConstruction
 VCL Reference

TActionClientsCollection.AfterConstruction

TActionClientsCollection	See also

Performs actions after the constructor is finished.

procedure AfterConstruction; override;

Description

AfterConstruction is called immediately after the constructor is finished. After calling the inherited routine, it sets the Customizable property to True.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TActionClientsCollection


TActionClientItem
 VCL Reference

TActionClientItem

Hierarchy	Properties	Methods	See also

TActionClientItem is a streamable wrapper that represents an action or category of actions in the action manager.

Unit

ActnMan

Description

TActionClientItem is used internally to wrap a category of actions, standard action, or a user defined custom action into a streamable format that is managed by an action manager. TActionClientItem is used as a mechanism to store layout (ordering) information for an action. This layout information contained by the action client item is used by the action manager to render the action onto an action band as a visual representation of the action.

Instances of TActionClientItem are created automatically by the TActionManager component when an action or category of actions is added to an action band.

Note: Do not create or destroy instances of TActionClientItem directly, always allow the action manager to handle this for you.


 VCL Reference

TActionClientItem properties

TActionClientItem	Alphabetically	Legend

In TActionClientItem

Action

ActionClients

ActionLink

Caption

CheckUnused

Control

ImageIndex

LastSession

MergeIndex

ParentItem

Separator

ShortCut

ShortCutText

ShowCaption

ShowGlyph

ShowShortCut

UsageCount

In TActionClient

ActionBar

Background

BackgroundLayout

ChangesAllowed

ChildActionBar

Color

ContextItems

HasItems

Items

Visible

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TActionClientItem properties

TActionClientItem	By object	Legend

Action

ActionBar

ActionClients

ActionLink

Background

BackgroundLayout

Caption

ChangesAllowed

CheckUnused

ChildActionBar

Collection

Color

ContextItems

Control

DisplayName

HasItems

ID

ImageIndex

Index

Items

LastSession

MergeIndex

ParentItem

Separator

ShortCut

ShortCutText

ShowCaption

ShowGlyph

ShowShortCut

UsageCount

Visible


TActionClientItem.Action
 VCL Reference

TActionClientItem.Action

TActionClientItem	See also

Specifies the action category or action that the TActionClientItem represents.

property Action: TBasicAction;

Description

When an action category or action is added to an action band, the specified action is automatically assigned to the Action property of the TActionClientItem object by the action manager.

Note: If the TActionClientItem represents an action band separator control, the Action property is nil.


TActionClientItem.ActionClients
 VCL Reference

TActionClientItem.ActionClients

TActionClientItem	See also

Returns the TActionClients object that contains the TActionClientItem.

property ActionClients: TActionClients;

Description

The ActionClients property is used internally to return the TActionClients object that contains the TActionClientItem.


TActionClientItem.ActionLink
 VCL Reference

TActionClientItem.ActionLink

TActionClientItem	See also

Refers to the action client item's action link.

property ActionLink: TActionClientLink;

Description

Objects do not generally deal with actions directly. Instead, there is an action link object (subclassed from TActionClientLink and, less directly, TActionLink) which is responsible for managing the connection between the action and the object. ActionLink is a reference to that object. For more information about action links, see the help topic for TActionLink referenced in the "See also" field above.


TActionClientItem.Caption
 VCL Reference

TActionClientItem.Caption

TActionClientItem

Specifies the caption the action manager uses when the TActionClientItem is rendered on an action band.

property Caption: String;

Description

Use Caption to specify the caption that is displayed for the UI element that is rendered on an action band. By default, the Caption is blank and the action manager uses the caption of the underlying action that the TActionClientItem represents. Changing the Caption property of the TActionClientItem does not change the caption of the underlying action. If an action band contains a TCustomizeBandAction standard action, the user of the application can change this property. Because the caption can be changed at runtime, the default caption that will be used, should be set in the action itself and not in the TActionClientItem object.

Note: Setting the Caption property to a dash character causes the TActionClientItem to be rendered as a separator control, such as a menu item separator, by the action band.


TActionClientItem.CheckUnused
 VCL Reference

TActionClientItem.CheckUnused

TActionClientItem	See also

Indicates whether the TActionClientItem object should be checked to see if it is unused and, if so, hidden from view.

property CheckUnused: Boolean;

Description

Unused contents of ActionBands can be hidden from the user. Use CheckUnused to determine whether a particular action client item goes through this kind of checking. The default value is True, which means that the item can be hidden. Note that CheckUnused is merely an indicator, not a control. If you want the object to be visible regardless of how much it is used, do not change CheckUnused. Instead, set UsageCount to -1.


TActionClientItem.Control
 VCL Reference

TActionClientItem.Control

TActionClientItem

Specifies the action band control that is rendered on an action band for the TActionClientItem object.

property Control: TCustomActionControl;

Description

The Control property is used internally to specify the specific action band control that is rendered on an action band for the TActionClientItem.


TActionClientItem.ImageIndex
 VCL Reference

TActionClientItem.ImageIndex

TActionClientItem	See also

Contains the ImageIndex property for the client action item.

property ImageIndex: Integer;

Description

ImageIndex is an index into the Images property of the action manager that contains the action client item. It identifies an image that is associated with controls and menu items that is drawn when this client action item is rendered on an action band by the action manager.


TActionClientItem.LastSession
 VCL Reference

TActionClientItem.LastSession

TActionClientItem	See also

Specifies the date an action client was last used.

property LastSession: Integer;

Description

LastSession is used internally to specify the session number that the TActionClientItem was last used in the application. The action manager uses LastSession to in its calculations  to determine whether or not to hide or display the TActionClientItem on an action band.


TActionClientItem.MergeIndex
 VCL Reference

TActionClientItem.MergeIndex

TActionClientItem

Used to help merge action lists.

type TMergeRange = 0..High(Integer);

property MergeIndex: TMergeRange;

Description

MergeIndex is intended to help merge existing lists of action items with those of the TActionManager object without redundancy. At present, this feature is not yet fully implemented, but it may become useful in a future release.


TActionClientItem.ParentItem
 VCL Reference

TActionClientItem.ParentItem

TActionClientItem

Refers to the parent item of the action client item.

property ParentItem: TActionClient;

Description

Use ParentItem to refer to the parent item of the TActionClientItem object.


TActionClientItem.Separator
 VCL Reference

TActionClientItem.Separator

TActionClientItem	See also

Returns whether the TActionClientItem is rendered as a separator control on an action band.

property Separator: Boolean;

Description

If the Caption property is set to a dash character, Separator is automatically set to True . Separator is called internally by the action manager to determine whether the TActionClientItem is rendered as a separator control on an action band.


TActionClientItem.ShortCut
 VCL Reference

TActionClientItem.ShortCut

TActionClientItem	See also

Contains the ShortCut property for the action client item.

property ShortCut: TShortCut;

Description

Use ShortCut to specify the ShortCut that is displayed in the caption for the UI element that is rendered on an action band. By default, the ShortCut is blank and the action manager uses the ShortCut of the underlying action that the TActionClientItem represents. Changing the ShortCut property of the TActionClientItem does not change the ShortCut of the underlying action. If an action band contains a TCustomizeBandAction standard action, the user of the application can change this property. Because the shortcut key can be changed at runtime, the default shortcut key that will be used, should be set in the action itself and not in the TActionClientItem object.


TActionClientItem.ShortCutText
 VCL Reference

TActionClientItem.ShortCutText

TActionClientItem	See also

Contains the text label (like "Ctrl+S") for the shortcut.

property ShortCutText: string;

Description

ShortCutText contains a text description of the shortcut is activated. For example, the ShortCutText property for a save action might read "Ctrl+S". Note that this property is read-only; it is set automatically elsewhere.


TActionClientItem.ShowCaption
 VCL Reference

TActionClientItem.ShowCaption

TActionClientItem	See also

Determines whether the caption for the TActionClientItem is drawn.

property ShowCaption: Boolean;

Description

ShowCaption determines whether the caption of the TActionClient is displayed on an action band's UI element. Set ShowCaption to False to hide the item's caption when the item is rendered on an action band. Note that the CaptionOptions property of TActionClients objects takes precedence over ShowCaption. See the documentation for TActionClients' CaptionOptions for more details.


TActionClientItem.ShowGlyph
 VCL Reference

TActionClientItem.ShowGlyph

TActionClientItem	See also

Indicates whether an image should be shown for the action.

property ShowGlyph: Boolean;

Description

An item on an action band may have an image associated with it. ShowGlyph determines whether or not that image should be shown when the item is drawn.


TActionClientItem.ShowShortCut
 VCL Reference

TActionClientItem.ShowShortCut

TActionClientItem	See also

Determines whether the underbar character underneath the shortcut character is displayed.

property ShowShortCut: Boolean;

Description

ShowShortCut is set and used internally to determine whether the underbar character underneath the shortcut character is displayed. The value of ShowShortCut is determined by the value set in the PersistentHotKeys property of the action band that will render the TActionClientItem.


TActionClientItem.UsageCount
 VCL Reference

TActionClientItem.UsageCount

TActionClientItem	See also

Specifies the total number of times an item has been used.

property UsageCount: Integer

Description

UsageCount is used internally to specify the total number of times that the TActionClientItem has been used in the application. The action manager maintains this value and uses UsageCount to in its calculations to determine whether or not to hide or display the TActionClientItem on an action band.


 VCL Reference

TActionClientItem methods

TActionClientItem	Alphabetically	Legend

In TActionClientItem

Assign

Create

Destroy

HasGlyph

InitiateAction

Refresh

Unused

Derived from TActionClient

HasBackground

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

HasGlyph

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionClientItem methods

TActionClientItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HasBackground

HasGlyph

InheritsFrom

InitiateAction

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException

Unused


TActionClientItem.Create
 VCL Reference

TActionClientItem.Create

TActionClientItem

Creates and initializes a TActionClientItem object.

constructor Create(Collection: TCollection); override;

Description

The Create method takes as a parameter the name of a TCollection instance. Create is called automatically by action manager when a new instance of a TActionClientItem is required.


TActionClientItem.Assign
 VCL Reference

TActionClientItem.Assign

TActionClientItem

Copies the contents of another TActionClientItem to the object where the method is executed.

procedure Assign(Source: TPersistent);

Description

Use Assign to copy the contents of one TActionClientItem instance to another.


TActionClientItem.Destroy
 VCL Reference

TActionClientItem.Destroy

TActionClientItem

Destroys the action client and frees its memory.

destructor Destroy; override;

Description

Destroy eliminates the TActionClientItem instance. Destroyis called automattically when the action manager needs to destroy the instance of a TActionClientItem object.


TActionClientItem.HasGlyph
 VCL Reference

TActionClientItem.HasGlyph

TActionClientItem

Indicates whether or not there is a glyph (small icon) associated with an action on the action band.

function HasGlyph: Boolean;

Description

Use HasGlyph to determine whether the action associated with the TActionClientItem has a glyph or not. A glyph is a symbol that represents the action, and is often placed next to the action's caption. One common example in applications is a small pair of scissors, which is frequently used to represent the Cut action.


TActionClientItem.InitiateAction
 VCL Reference

TActionClientItem.InitiateAction

TActionClientItem	See also

Updates the action associated with the action client item.

procedure InitiateAction; virtual;

Description

InitiateAction is used by the application to update the action periodically, so that the visible button or menu item accurately reflects the internal state of the program. To learn more about what happens when InitiateAction is called, see the documentation for TControl's InitiateAction method, which is a very similar method.


TActionClientItem.Refresh
 VCL Reference

TActionClientItem.Refresh

TActionClientItem	See also

Causes the size of the action client item's control (if any) to be recalculated.

procedure Refresh; override;

Description

Use Refresh to cause the size of the action client item's control, if there is one, to be recalculated. In general, the intent of Refresh methods is to cause the control to be redrawn.


TActionClientItem.Unused
 VCL Reference

TActionClientItem.Unused

TActionClientItem

Determines whether a TActionClientItem is unused and should be hidden on an action band.

function Unused: Boolean;

Description

Unused is called internally to specify whether a TActionClientItem is unused and should be hidden or can be displayed on an action band.


Hierarchy

TObject

TPersistent

TCollectionItem

TActionClient

TActionClientItem


TActionClient
 VCL Reference

TActionClient

Hierarchy	Properties	Methods	See also

TActionClient is the ancestor for TActionBartItem and TActionClientItem classes.

Unit

ActnMan

Description

TActionClient is the ancestor for the TActionBartItem and TActionClientItem classes.


 VCL Reference

TActionClient properties

TActionClient	Alphabetically	Legend

In TActionClient

ActionBar

Background

BackgroundLayout

ChangesAllowed

ChildActionBar

Color

ContextItems

HasItems

Items

Visible

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TActionClient properties

TActionClient	By object	Legend

ActionBar

Background

BackgroundLayout

ChangesAllowed

ChildActionBar

Collection

Color

ContextItems

DisplayName

HasItems

ID

Index

Items

Visible


TActionClient.ActionBar
 VCL Reference

TActionClient.ActionBar

TActionClient

Specifies the action band the action client is rendered on.

type

property ActionBar: TCustomActionBar;

Description

ActionBar is used internally to specify the action band that the action client is rendered on.


TActionClient.Background
 VCL Reference

TActionClient.Background

TActionClient	See also

Specifies the image that is drawn on the action client's action band for the action client.

property Background: TPicture;

Description

Use Background to specify the image that is drawn on the action client's action band for the action client object itself.


TActionClient.BackgroundLayout
 VCL Reference

TActionClient.BackgroundLayout

TActionClient	See also

Specifies how the image specified in the Background property is rendered on the action band used by the action client to render any sub-items that are contained by the action client.

type

TBackgroundLayout = (blNormal, blStretch, blTile, blLeftBanner, blRightBanner);

property BackgroundLayout: TBackgroundLayout;

Description

The values of BackgroundLayout are as follows:.

blNormal	Image is drawn normally, starting at coordinate 0,0 of the action band and the sub-item captions are rendered with a transparent background.
blStretch	Image is stretch drawn to fit the client area of the action band, starting at coordinate 0,0 of the action band and sub-item captions are rendered with a transparent background.
blTile	Image is tiled to fill the action band, sub-items are rendered with a transparent background
blLeftBanner	Image is appended to the left side of the action band.
blRightBanner	Image is appended to the right side of the action band.


TActionClient.ChangesAllowed
 VCL Reference

TActionClient.ChangesAllowed

TActionClient

Indicates which kinds of changes to the action client are permissible.

type

TChangesAllowed = (caModify, caMove, caDelete);

TChangesAllowedSet = set of TChangesAllowed;

property ChangesAllowed: TChangesAllowedSet;

Description

Although action clients are part of a customizable user interface, allowing all changes may not necessarily be desirable. Use the ChangesAllowed property to indicate which changes to the action client are allowable. Possible values in the set are:

Value	Description

caModify	The item can be modified internally. For example, the visible caption can be changed.

caMove	The item can be relocated on the action band.

caDelete	The item can be removed from the action band.

Note	The property is a set, and can have multiple values at the same time. In fact, the default is to allow all three values (all changes are possible).


TActionClient.ChildActionBar
 VCL Reference

TActionClient.ChildActionBar

TActionClient	See also

Specifies the action band that is used to render the TActionClients object specified in the Items property.

property ChildActionBar: TCustomActionBar;

Description

ChildActionBar is used internally by the action manager and is automatically assigned when a TActionClient contains a nested TActionClients object. An example of this would, be when the action client is a menu item that contains sub-menu items. The action band used to render the sub-items is automatically created for the sub-menu items and its reference is assigned to the ChildActionBar property.


TActionClient.Color
 VCL Reference

TActionClient.Color

TActionClient

Specifies the background color for TClientAction when it is rendered on a action band.

property Color: TColor;

Description

The Color property determines the background color. You can set Color to one of the constants defined in the Graphics unit (such as clBlue), or to an explicit RGB integer value.


TActionClient.ContextItems
 VCL Reference

TActionClient.ContextItems

TActionClient

Specifies the TActionClients object that is rendered as a popup menu when a item is right clicked.

property ContextItems: TActionClients;

Description

Use ContextItems to specify the TActionClients object that is rendered as a popup menu when a item is right clicked.


TActionClient.DisplayName
 VCL Reference

TActionClient.DisplayName

TActionClient

The name displayed in the Collection editor.

property DisplayName: string;

Description

DisplayName is the string that represents the action client in the Collection editor.


TActionClient.HasItems
 VCL Reference

TActionClient.HasItems

TActionClient	See also

Specifies whether the action client has sub-items associated with the action client.

property HasItems: Boolean;

Description

HasItems is used internally to determine if the action client has a TActionClients object assigned to the Items property.


TActionClient.Items
 VCL Reference

TActionClient.Items

TActionClient	See also

Specifies the TActionClients object that contains the sub-items of the action client.

property Items: TActionClients;

Description

If a TActionClientItem is used to represent a category of actions and not just a single action, the Items property is automatically set to the TActionClients object that contains the sub-items by the action manager. An example of this would be when an action category such as the standard actions "Edit" category is placed on a main menu action band. The Items property would contain the standard actions such as TEditCopy, TEditPaste, and TEditCut in a TActionClients object.


TActionClient.Visible
 VCL Reference

TActionClient.Visible

TActionClient

Determines whether the action client is visible.

property Visible: Boolean;

Description

Visible specifies the visible state for the action client.


 VCL Reference

TActionClient methods

TActionClient	Alphabetically	Legend

In TActionClient

Assign

Create

Destroy

HasBackground

Refresh

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

HasBackground

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionClient methods

TActionClient	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HasBackground

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException


TActionClient.Create
 VCL Reference

TActionClient.Create

TActionClient

Creates and initializes an action client object.

constructor Create(Collection: TCollection); override;

Description

The Create method takes as a parameter the name of a TCollection instance. Create is called automatically by action manager when a new instance of a TActionClient is required.


TActionClient.Destroy
 VCL Reference

TActionClient.Destroy

TActionClient	See also

Destroys the action client and frees its memory.

destructor Destroy; override;

Description

Destroy eliminates the TActionClient instance.


TActionClient.Assign
 VCL Reference

TActionClient.Assign

TActionClient	See also

Copies the contents of another object to the current one.

procedure Assign(Source: TPersistent); override;

Description

Use the Assign procedure to copy the contents of the Source object to the current one. This procedure is an override of the inherited TPersistent method, and is designed to accurately copy the properties of one TActionClient to another if both objects are TActionClients. If not, the inherited method is called. See the documentation for the inherited method for more details about the Assign method.


TActionClient.HasBackground
 VCL Reference

TActionClient.HasBackground

TActionClient

Indicates whether a background image exists.

function HasBackground: Boolean;

Description

Use the HasBackground method to determine whether or not a TActionClient has a background image.


TActionClient.Refresh
 VCL Reference

TActionClient.Refresh

TActionClient

Causes the action client to be redrawn.

procedure Refresh; virtual;

Description

Use Refresh to redraw the action client immediately.


Hierarchy

TObject

TPersistent

TCollectionItem

TActionClient


TActionClients
 VCL Reference

TActionClients

Hierarchy	Properties	Methods	See also

TActionClients is a container for TActionClient objects.

Unit

ActnMan

Description

Each TActionClients object holds a collection of TClientAction objects. The TActionClients object is used internally by the TActionManager component to maintain information about the action clients managed by the an action manager. Instances of the TActionClients object should never be created directly or the methods contained in TActionClients called directly.


 VCL Reference

TActionClients properties

TActionClients	Alphabetically	Legend

In TActionClients

ActionClients

ActionManager

AutoHotKeys

CaptionOptions

HideUnused

SmallIcons

Derived from TActionClientsCollection

Customizable

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TActionClients properties

TActionClients	By object	Legend

ActionClients

ActionManager

AutoHotKeys

CaptionOptions

Count

Customizable

HideUnused

ItemClass

Items

SmallIcons


TActionClients.ActionClients
 VCL Reference

TActionClients.ActionClients

TActionClients	See also

Provides indexed access to the TActionClient objects in the collection.

property  ActionClients: TActionClient;

Description

The ActionClients property is used internally by the action manager to provide access to the individual TClientAction objects managed by the action manager. The TActionClients property should never be accessed directly.


TActionClients.ActionManager
 VCL Reference

TActionClients.ActionManager

TActionClients	See also

Contains a reference to the TActionManager component that maintains the TActionClients collection.

type

property  ActionManager: TCustomActionManager;

Description

ActionManager is automatically set to the TActionManager component that created the TActionClients object.


TActionClients.AutoHotKeys
 VCL Reference

TActionClients.AutoHotKeys

TActionClients

Specifies whether hot key for items, that do not have them assigned, are auto-generated.

type

property  AutoHotKeys: Boolean;

Description

Use AutoHotKeys to specify whether hot key for items, that do not have them assigned, are auto-generated. If AutoHotKeys is set to True hot keys are automatically assigned to all action client items that do not have one assigned.


TActionClients.CaptionOptions
 VCL Reference

TActionClients.CaptionOptions

TActionClients	See also

Contains options for how captions should be displayed.

type TCaptionOptions = (coNone, coSelective, coAll);

property  CaptionOptions: TCaptionOptions;

Description

CaptionOptions contains the rules for displaying captions on action client items in the collection. If CaptionOptions is set to coNone, no captions will be displayed for any item. If it is set to coSelective, a determination will be made separately for each item based on the value of its ShowCaption property. A value of coAll will cause all items to display captions. Note that this property takes precedence over the ShowCaption property of individual TActionClientItem objects.


TActionClients.HideUnused
 VCL Reference

TActionClients.HideUnused

TActionClients

Determines whether unused TClientAction objects are displayed in an action band.

property  HideUnused: Boolean;

Description

HideUnused is used internally to determine whether unused or less frequently used TClientAction objects contained by the TActionClient object are displayed in an action band by the action manager component.


TActionClients.SmallIcons
 VCL Reference

TActionClients.SmallIcons

TActionClients

Determines whether the small icons associated with the TActionClient objects contained by the TClientActions object are displayed in an action band.

property  SmallIcons: Boolean;

Description

Use SmallIcons to specify whether small icons are used in place of large icons when an action band renders a UI element. Setting SmallIcons to True causes the small version of the icon to be displayed.


 VCL Reference

TActionClients methods

TActionClients	Alphabetically	Legend

In TActionClients

Add

Assign

Create

VisibleCount

Derived from TCollection

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionClients methods

TActionClients	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

VisibleCount


TActionClients.Add
 VCL Reference

TActionClients.Add

TActionClients	See also

Creates a new TActionClient instance and adds it to the Items array.

function Add: TActionClient;

Description

Add is used internally to create a TActionClient object in the TActionClients collection. The new TActionClient object is placed at the end of the Items array.


TActionClients.Assign
 VCL Reference

TActionClients.Assign

TActionClients	See also

Copies the contents of one TActionClients object to another.

procedure Assign(Source: TPersistent); override;

Description

This is simply an implementation of Assign (which copies information between objects) specifically for TActionClients objects. See the documentation for the inherited methods for more information.


TActionClients.Create
 VCL Reference

TActionClients.Create

TActionClientItem

Creates and initializes a TActionClients object.

constructor Create(AOwner: TPersistent;

  ItemClass: TCollectionItemClass);); override;

Description

The Create method takes as a parameter the name of a TPersistent instance. Create is called automatically by the action manager when a new instance of a TActionClientItem is required.


TActionClients.Destroy
 VCL Reference

TActionClients.Destroy

TActionClientItem

Destroys the TActionClients object and frees its memory.

destructor Destroy; override;

Description

Destroy eliminates the TActionClientItem instance. Destroy is called automattically when the action manager needs to destroy the instance of a TActionClientItem object.


TActionClients.VisibleCount
 VCL Reference

TActionClients.VisibleCount

TActionClients

Returns the number of visible TActionClient objects.

procedure VisibleCount(S: string);

Description

VisibleCount is used internally to return the number of visible TActionClient objects that can be rendered on an action band.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TActionClientsCollection

TActionClients


TAutoObject
 VCL Reference

TAutoObject

Hierarchy	Properties	Methods	Using TComObject	See also

TAutoObject is a CoClass that supports the IDispatch interface, and that can be used as a base class for ActiveX Automation servers.

Unit

ComObj

Description

TAutoObject is used as a base class for VCL ActiveX control classes and provides support for ActiveX Automation objects.

To create a new Automation object, use the Automation wizard. The steps for creating an Automation object are covered in depth in the Developer’s Guide or in the online document, Developing COM-based applications.

By implementing the IDispatch interface, TAutoObject encapsulates the following functionality:

Provides access to properties and methods exposed by an object by calling a method or by accessing a property of a specified dispatch interface (dispinterface), given any necessary parameters.

Converts text names of properties and methods (including their arguments) to their corresponding DISPIDs which identify them.

Determines whether there is type information available for this dispatch interface.

Retrieves the type information for a specified dispatch interface.

TAutoObject requires a type library because it supports dual interfaces, and because it inherits the IProvideClassInfo interface support which requires a type library. TAutoObject has a class factory. For creating automation objects that are used internally and do not need a class factory, use TAutoIntfObject as a base class.

Implemented methods of IDispatch

GetIDsOfNames, GetTypeInfo, GetTypeInfoCount, and Invoke.


 VCL Reference

TAutoObject properties

TAutoObject	Alphabetically	Legend

In TAutoObject

AutoFactory

EventSink

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TAutoObject properties

TAutoObject	By object	Legend

AutoFactory

Controller

EventSink

Factory

RefCount

ServerExceptionHandler


TAutoObject.AutoFactory
 VCL Reference

TAutoObject.AutoFactory

TAutoObject

The class factory that created this TAutoObject.

property AutoFactory: TAutoObjectFactory;

Description

Factory is the class factory that is used to instantiate a TAutoObject instance.


TAutoObject.EventSink
 VCL Reference

TAutoObject.EventSink

TAutoObject

The client’s event sink interface through which the client receives events from a server.

property EventSink: IUnknown;

Description

An EventSink is the mechanism through which a client listens for events from an Automation server.

Not all Automation interfaces expose events. The Automation wizard exposes the interface’s events when you set the option, Generate Event Support Code. Event sets are defined as a dispinterface. This allows a container to implement, at compile time, a sink object whose IDispatch can handle any arbitrary dispinterface at run time. The container uses the object's type information to display a list of events to the user or developer, allowing that person to assign actions to those events. The sink maps an event dispID to some action to execute—it does not need to know the semantics of the event itself.


 VCL Reference

TAutoObject methods

TAutoObject	Alphabetically	Legend

In TAutoObject

EventConnect

EventSinkChanged

GetIDsOfNames

GetTypeInfo

GetTypeInfoCount

Initialize

Invoke

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAutoObject methods

TAutoObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

EventConnect

EventSinkChanged

FieldAddress

Free

FreeInstance

GetIDsOfNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetTypeInfo

GetTypeInfoCount

InheritsFrom

Initialize

InitInstance

InstanceSize

Invoke

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException


TAutoObject.EventConnect
 VCL Reference

TAutoObject.EventConnect

TAutoObject	See also

Queries the interface Sink parameter and saves the EventSink.

procedure EventConnect(const Sink: IUnknown; Connecting: Boolean);

Description

EventConnect sets the EventSink property by querying the interface Sink parameter that is passed in for events. This method is called only if you set the Generate Event Support Code option of the Automation wizard.


TAutoObject.EventSinkChanged
 VCL Reference

TAutoObject.EventSinkChanged

TAutoObject	See also

Responds when the EventConnect method sets or unsets an EventSink.

procedure EventSinkChanged(const EventSink: IUnknown); virtual;

Description

Do not call EventSinkChanged. This method is called by the EventConnectMethod to respond when an Event Sink is added to or removed from the TAutoObject instance.

As implemented in TAutoObject, EventSinkChanged does nothing. When you set Generate Event Support Code in the Automation Object Wizard, the generated TAutoObject descendant overrides this method to initialize internal fields for handling new Event Sinks.


TAutoObject.GetIDsOfNames
 VCL Reference

TAutoObject.GetIDsOfNames

TAutoObject	See also

Maps a single member and an optional set of argument names to a corresponding set of integer dispatch identifiers (dispIDs).

type HResult = Longint;

function GetIDsOfNames(const IID: TGUID; Names: Pointer; NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;

Description

GetIDsOfNames implements the IDispatch interface GetIDsOfNames method. GetIDsOfNames calls this method for the interface represented by the TAutoObject, passing the specified parameters. The returned value can be used on subsequent calls to the Invoke method.


TAutoObject.GetTypeInfo
 VCL Reference

TAutoObject.GetTypeInfo

TAutoObject	See also

Retrieves the type information for an object.

type HResult = Longint;

function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall;

Description

GetTypeInfo implements the IDispatch interface GetTypeInfo method. GetTypeInfo calls the GetTypeInfo method for the interface for the interface represented by the TAutoObject, passing it the specified parameters.  Use the returned value to get the type information for an interface implemented by the component.


TAutoObject.GetTypeInfoCount
 VCL Reference

TAutoObject.GetTypeInfoCount

TAutoObject	See also

Returns the number of type information interfaces that an object provides (either 0 or 1).

type HResult = Longint;

function GetTypeInfoCount(out Count: Integer): HResult; stdcall;

Description

GetTypeInfoCount implements the IDispatch interface GetTypeInfoCount method. GetTypeInfoCount calls this method for the interface represented by the TAutoObject. The out parameter points to a location that receives the number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0.


TAutoObject.Initialize
 VCL Reference

TAutoObject.Initialize

TAutoObject

Provides an interface to a method that initializes the Automation object.

procedure Initialize; override;

Description

Initialize currently does nothing. Descendant Automation objects can override Initialize to provide some post-creation initialization of the object.


TAutoObject.Invoke
 VCL Reference

TAutoObject.Invoke

TAutoObject	See also

Provides access to Automation properties and methods exposed by an object that supports the IDispatch interface.

type HResult = Longint;

function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;

Description

Invoke implements the IDispatch interface Invoke method. Invoke is the standard mechanism for accessing the exposed properties and methods of an Automation object. Invoke calls the Invoke method for the interface represented by the TAutoObject, passing it the parameters specified by the function.


Hierarchy

TObject

TComObject

TTypedComObject

TAutoObject


TAutoObjectFactory
 VCL Reference

TAutoObjectFactory

Hierarchy	Properties	Methods	See also

TAutoObjectFactory is the class factory for TAutoObject.

Unit

ComObj

Description

TAutoObjectFactory creates instances of the TAutoObject class, and has methods that manage the functionality of all of the instances of the automation objects it creates.

An Automation object is a COM object, which means that the module in which it is implemented must provide a factory object so that the system can create the Automation object.

TAutoObjectFactory inherits support for the IClassFactory and IClassFactory2 interfaces.

For more information about COM factories, see TComObjectFactory.

To add an Automation object factory to your program, create the factory object in the initialization section of the unit that defines the Automation object.


 VCL Reference

TAutoObjectFactory properties

TAutoObjectFactory	Alphabetically	Legend

In TAutoObjectFactory

DispIntfEntry

DispTypeInfo

EventIID

EventTypeInfo

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TAutoObjectFactory properties

TAutoObjectFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

DispIntfEntry

DispTypeInfo

ErrorIID

EventIID

EventTypeInfo

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


TAutoObjectFactory.DispIntfEntry
 VCL Reference

TAutoObjectFactory.DispIntfEntry

TAutoObjectFactory	See also

Contains the entry for the dispatch interface implemented by the OLE Automation object created by the factory.

property DispIntfEntry: PInterfaceEntry;

Description

DispIntfEntry is initialized in the constructor. It indicates the entry for a dispatch interface.


TAutoObjectFactory.DispTypeInfo
 VCL Reference

TAutoObjectFactory.DispTypeInfo

TAutoObjectFactory

Returns an ITypeInfo interface reference to the type information for the dispinterface implemented by the OLE Automation object.

property DispTypeInfo: ITypeInfo;

Description

DispTypeInfo is used to provide type information on the OLE Automation object created by the factory.


TAutoObjectFactory.EventIID
 VCL Reference

TAutoObjectFactory.EventIID

TAutoObjectFactory	See also

Specifies the GUID for the control’s events interface.

property EventIID: TGUID;

Description

EventIID is used internally to create a connection between the control and the events interface.


TAutoObjectFactory.EventTypeInfo
 VCL Reference

TAutoObjectFactory.EventTypeInfo

TAutoObjectFactory	See also

Provides an interface to the type information object for the object’s events interface.

property EventTypeInfo: ITypeInfo;

Description

Use this property to obtain type information for the object’s events interface.


 VCL Reference

TAutoObjectFactory methods

TAutoObjectFactory	Alphabetically	Legend

In TAutoObjectFactory

Create

GetIntfEntry

Derived from TTypedComObjectFactory

ClassInfo

GetInterfaceTypeInfo

UpdateRegistry

Derived from TComObjectFactory

CreateComObject

Destroy

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TAutoObjectFactory methods

TAutoObjectFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterfaceTypeInfo

GetIntfEntry

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TAutoObjectFactory.Create
 VCL Reference

TAutoObjectFactory.Create

TAutoObjectFactory	See also

Instantiates a TAutoObjectFactory object.

constructor Create(ComServer: TComServerObject; AutoClass: TAutoClass; const ClassID: TGUID; Instancing: TClassInstancing;
ThreadingModel: TThreadingModel = tmSingle);

Description

Create allocates memory for a TAutoObjectFactory object and calls the inherited Create, passing it the same parameters. Then it initializes the DispIntfEntry and DispTypeInfo properties, raising an EOleError exception on error. The Create sets the ErrorIID property to point to DispIntfEntry.

Class factories should be instantiated in the initialization section of the unit that includes the code for the CoClass they instantiate. Factories are automatically available when the server is loaded.


TAutoObjectFactory.GetIntfEntry
 VCL Reference

TAutoObjectFactory.GetIntfEntry

TAutoObjectFactory	See also

Returns the entry for a specific interface implemented in a class.

function GetIntfEntry(Guid: TGUID): PInterfaceEntry; virtual;

Description

GetIntfEntry calls the GetInterfaceEntry method for the CoClass associated with the class factory.

GetIntfEntry returns the entry for the interface, specified by the IID parameter, in the class. GetIntfEntry is used internally. It is rarely called directly.

One use for this method is to describe to OLE how to automatically dispatch calls to a dual-IDispatch interface. An interface type name, such as IUnknown, can be supplied as the IID parameter since the compiler will replace the interface with the associated GUID.


Hierarchy

TObject

TComObjectFactory

TTypedComObjectFactory

TAutoObjectFactory


TAutoIncField
 VCL Reference

TAutoIncField

Hierarchy	Properties	Methods	Events 	Using TAutoIncField	See also

TAutoIncField is a persistent field object for an autoincrement field in a dataset.

Unit

DB

Description

TAutoIncField provides access to an autoincrement field in a table. Autoincrement fields can hold values in the range -2,147,483,648 to 2,147,483,647, and are used as a counter for the records in the dataset. Each record is given a unique value in an autoincrement field, with each record receiving the next highest integer from that of the previously inserted record. Autoincrement fields are commonly used to provide a unique primary key value for a record.

Note:	Auto-incrementing fields are a function of the database back-end, an application should not attempt to set a field value for an autoincrement field (with or without a TAutoIncField object).

If you use the Fields editor at design time to create a persistent field component for the auto-incrementing field, you can access it by name at runtime. When using dynamic field components, you can access the TAutoIncField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TAutoIncField properties

TAutoIncField	Alphabetically	Legend

Derived from TIntegerField

AsFloat

AsInteger

AsString

AsVariant

DataSize

MaxValue

MinValue

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TAutoIncField properties

TAutoIncField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


 VCL Reference

TAutoIncField events

TAutoIncField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TAutoIncField events

TAutoIncField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TAutoIncField methods

TAutoIncField	Alphabetically	Legend

In TAutoIncField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAutoIncField methods

TAutoIncField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TAutoIncField.Create
 VCL Reference

TAutoIncField.Create

TAutoIncField	See also

Creates an instance of TAutoIncField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TAutoIncField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

After calling the inherited constructor, Create sets the DataType property to ftAutoInc. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TAutoIncField. After instantiating a TAutoIncField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TAutoIncField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TAutoIncField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TAutoIncField object for a field named ID accessed through a TSQLQuery named SQLQuery1.

var

  T: TAutoIncField;

begin

  SQLQuery1.Close;

  T := TAutoIncField.Create(SQLQuery1);

  T.FieldName := 'ID';

  T.Name := SQLQuery1.Name + T.FieldName;

  T.Index := SQLQuery1.FieldCount;

  T.DataSet := SQLQuery1;

  SQLQuery1.FieldDefs.UpDate;

  SQLQuery1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TIntegerField

TAutoIncField


TAutoIntfObject
 VCL Reference

TAutoIntfObject

Hierarchy	Properties	Methods	See also

TAutoIntfObject implements the IDispatch and ISupportErrorInfo interfaces.

Unit

ComObj

Description

TAutoIntfObject is used internally by objects that support dispatch interfaces. By implementing the IDispatch interface, TAutoIntfObject encapsulates the functionality of an Automation object.

TAutoIntfObject does not have a class factory, so it can only be instantiated by calling the constructor. Objects that are externally instantiated typically have a class factory so that they can be instantiated in a standard way.

TAutoIntfObject supports OLE exception handling through its implementation of the ISupportErrorInfo interface.

TAutoIntfObject is similar to TAutoObject in that both classes implement the IDispatch and (directly or indirectly) ISupportErrorInfo interfaces and both require a type library to support dual interfaces. TAutoIntfObject differs from TAutoObject in that it does not have a class factory.

Implemented methods of IDispatch

GetIDsOfNames, GetTypeInfo, GetTypeInfoCount, Invoke.


 VCL Reference

TAutoIntfObject properties

TAutoIntfObject	Alphabetically	Legend

In TAutoIntfObject

DispIID

DispIntfEntry

DispTypeInfo

Derived from TInterfacedObject

RefCount


 VCL Reference

TAutoIntfObject properties

TAutoIntfObject	By object	Legend

DispIID

DispIntfEntry

DispTypeInfo

RefCount


TAutoIntfObject.DispIID
 VCL Reference

TAutoIntfObject.DispIID

TAutoIntfObject

DispIID is the dispatch identifier.

property DispIID: TGUID;

Description

DispIID is used for exception handling.


TAutoIntfObject.DispIntfEntry
 VCL Reference

TAutoIntfObject.DispIntfEntry

TAutoIntfObject	See also

DispIntfEntry contains the entry for the dispatch interface implemented by the automation object.

property DispIntfEntry: PInterfaceEntry;

Description

DispIntfEntry is initialized in the constructor. DispIntfEntry returns the entry for a dispatch interface.


TAutoIntfObject.DispTypeInfo
 VCL Reference

TAutoIntfObject.DispTypeInfo

TAutoIntfObject

DispTypeInfo returns an ITypeInfo interface reference to the type information for the dispinterface implemented by the automation object.

property DispTypeInfo: ITypeInfo;

Description

DispTypeInfo is used to provide type information on the automation object.


 VCL Reference

TAutoIntfObject methods

TAutoIntfObject	Alphabetically	Legend

In TAutoIntfObject

Create

SafeCallException

Derived from TInterfacedObject

BeforeDestruction

AfterConstruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TAutoIntfObject methods

TAutoIntfObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TAutoIntfObject.Create
 VCL Reference

TAutoIntfObject.Create

TAutoIntfObject

Create instantiates an automation interface object.

constructor Create(const TypeLib: ITypeLib; const DispIntf: TGUID);

Description

You must use the constructor to instantiate TAutoIntfObject descendants because there is no built-in class factory support.

TypeLib is an ITypeLib interface that can return the type information for DispIntf.

DispIntf is the GUID for the object you are creating.

Create allocates memory for an automation interface object, uses TypeLib to access the type information for DispIntf, and initializes the DispIntfEntry property.


TAutoIntfObject.SafeCallException
 VCL Reference

TAutoIntfObject.SafeCallException

TAutoIntfObject

SafeCallException is used for OLE exception handling.

function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;

Description

SafeCallException prevents an exception from escaping its scope. Any exceptions raised must also be handled within the method.

The implementation of a safecall method guarantees that no exceptions escape by enclosing the body of the method in an implied try...except block.

Note:	SafeCallException calls the global routine HandleSafeCallException, which provides a standard way of handling this behavior. Methods of a CoClass that supports OLE exception handling (that implements the ISupportErrorInfo interface) are affected by this function. If those CoClass methods use the safecall calling convention, they are modified to return an HRESULT. Procedures will return an HRESULT, and functions will pass their usual result value as the last (out) parameter, and will return an HRESULT instead. The method is enclosed in a try...finally block, after which the HRESULT is returned, and the environment is set up so that the ISupportErrorInfo implementation will work correctly.


Hierarchy

TObject

TInterfacedObject

TAutoIntfObject


TActiveXControl
 VCL Reference

TActiveXControl

Hierarchy	Properties	Methods	Using TActiveXControl	See also

TActiveXControl is an abstract class that provides the functionality to embed a VCL control into an ActiveX Container window.

Unit

AxCtrls

Description

TActiveXControl defines the core behavior and interfaces required of an ActiveX control and connects that behavior to any VCL control derived from TWinControl.  This allows the control to be embedded in any ActiveX container, including Internet Explorer, Visual Basic, PowerBuilder, Paradox, Borland C++, IntraBuilder and, of course, Delphi.

To create a new ActiveX control class, use the ActiveX control wizard.  The steps for building an ActiveX control are covered in the Developer’s Guide or in the online help document, Developing COM-based applications.

The TActiveXControl class is derived from TAutoObject, therefore the object resulting is a COM object that supports COM-based Automation, a type library, and has a factory.  In addition, TActiveXControl implements the following behaviors:

embedding in a container (site)

in-place activation

persistence

events

property pages

property browsing

TActiveXControl is an abstract class, and so cannot be instantiated.  Instead, you must derive a new class from TActiveXControl to implement an ActiveX control. This derived class is called an implementation class.  An implementation class derived from TActiveXControl normally implements an automation interface as well, to specify the object’s properties and methods.

Ordinarily, you do not create an instance of an implementation class directly.  Instead, you create a factory object in the initialization section of the unit that contains the class declaration.  The factory object will then create the ActiveX control object when asked to by the system.

Interfaces

In addition to the interfaces inherited from TAutoObject, TActiveXControl implements the following interfaces:

IPersistStreamInit	IPersistPropertyBag	IOleInPlaceActiveObject

IPersistStorage	IViewObject	IObjectSafety

IOleObject	IViewObject2	ISimpleFrameSite

IOleControl	IPerPropertyBrowsing

IOleInPlaceObject	ISpecifyPropertyPages

Note:	See the DelCtrls demo in ..\ActiveX\Delctrls for an example of using VCL components as ActiveX controls.


 VCL Reference

TActiveXControl properties

TActiveXControl	Alphabetically	Legend

In TActiveXControl

ClientSite

Control

InPlaceSite

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TActiveXControl properties

TActiveXControl	By object	Legend

ClientSite

Control

Controller

Factory

InPlaceSite

RefCount

ServerExceptionHandler


TActiveXControl.ClientSite
 VCL Reference

TActiveXControl.ClientSite

TActiveXControl	See also

Contains a pointer to the client site for the container on which the ActiveX control resides.

property ClientSite: IOleClientSite;

Description

ClientSite contains an interface pointer to the object’s client site. Within a compound document, each embedded object has its own client site. The client site is the place where it is displayed and through which it retrieves information about its storage, user interface, and other resources.

Use this property when you need to get client site information from the container.


TActiveXControl.Control
 VCL Reference

TActiveXControl.Control

TActiveXControl

Indicates the VCL implementation of the ActiveX control.

property Control: TWinControl;

Description

Control is the VCL control derived from TWinControl that implements the ActiveX control.


TActiveXControl.InPlaceSite
 VCL Reference

TActiveXControl.InPlaceSite

TActiveXControl	See also

Contains a pointer to the site interface for the container on which the ActiveX control resides.

property InPlaceSite: IOleInPlaceSite;

Description

InPlaceSite contains an interface pointer to the container’s IOleInPlaceSite interface when the container supports embedding and in-place activation.  Use this interface to access the windows that contain the activeX object (both the Frame window and the immediate container, or site, window).


 VCL Reference

TActiveXControl methods

TActiveXControl	Alphabetically	Legend

In TActiveXControl

Destroy

Initialize

ObjQueryInterface

PropChanged

PropRequestEdit

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

ObjAddRef

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActiveXControl methods

TActiveXControl	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

PropChanged

PropRequestEdit

SafeCallException


TActiveXControl.Destroy
 VCL Reference

TActiveXControl.Destroy

TActiveXControl	See also

Destroys an instance of TActiveXControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the ActiveX control reference is not nil before calling Destroy. Destroy frees the resources used to turn the Control into an active X control. It does not destroy the object referenced by the Control property.


TActiveXControl.Initialize
 VCL Reference

TActiveXControl.Initialize

TActiveXControl	See also

Creates the class factory and connection object for the TActiveXControl.

procedure Initialize; override;

Description

The Initialize method creates the class factory object and creates and encapsulates the VCL control.


TActiveXControl.ObjQueryInterface
 VCL Reference

TActiveXControl.ObjQueryInterface

TActiveXControl	See also

Returns a requested COM interface on the object.

function ObjQueryInterface(const IID: TGUID; out Obj): HResult; override;

Description

ObjQueryInterface attempts to locate the interface specified by the IID parameter, and returns it in the Obj parameter. If the requested interface is found and returned, ObjQueryInterface returns S_OK.


TActiveXControl.PropChanged
 VCL Reference

TActiveXControl.PropChanged

TActiveXControl

Generates an OnChanged event.

procedure PropChanged(const PropertyName: WideString); overload;

procedure PropChanged(DispID: TDispID); overload;

Description

Call PropChanged when the property specified by the DispID (or PropertyName) parameter changes. PropChanged generates an OnChanged event using the IPropertyNotifySink interface.

When possible, call this procedure with the DispID rather than the PropertyName because it is more efficient. Calling PropChanged with the PropertyName first looks up the DispID from the given PropertyName before generating the event.


TActiveXControl.PropRequestEdit
 VCL Reference

TActiveXControl.PropRequestEdit

TActiveXControl

Indicates whether a specified property can be changed.

function PropRequestEdit(const PropertyName: WideString): Boolean; overload;

function PropRequestEdit(DispID: TDispID): Boolean; overload;

Description

Call PropRequestEdit to determine whether the property specified by the DispID (or PropertyName) parameter can be edited. PropRequestEdit uses the IPropertyNotifySink interface to determine whether the property can be changed, and returns True if it can.

When possible, call this function with the DispID rather than the PropertyName because it is more efficient. Calling PropRequestEdit with the PropertyName first looks up the DispID from the given PropertyName before generating the event.


Hierarchy

TObject

TComObject

TTypedComObject

TAutoObject

TActiveXControl


TActiveXControlFactory
 VCL Reference

TActiveXControlFactory

Hierarchy	Properties	Methods	See also

TActiveXControlFactory is the factory class for ActiveX control objects.

Unit

AxCtrls

Description

The TActiveXControlFactory class is a factory for ActiveX controls, which are implemented using the TActiveXControl abstract class.

The ActiveX Control wizard adds an ActiveX control factory object in the initialization section of the unit that defines the TActiveXControl object.


 VCL Reference

TActiveXControlFactory properties

TActiveXControlFactory	Alphabetically	Legend

In TActiveXControlFactory

MiscStatus

ToolboxBitmapID

WinControlClass

Derived from TAutoObjectFactory

DispIntfEntry

DispTypeInfo

EventIID

EventTypeInfo

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TActiveXControlFactory properties

TActiveXControlFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

DispIntfEntry

DispTypeInfo

ErrorIID

EventIID

EventTypeInfo

Instancing

LicString

MiscStatus

ProgID

ShowErrors

SupportsLicensing

ThreadingModel

ToolboxBitmapID

WinControlClass


TActiveXControlFactory.MiscStatus
 VCL Reference

TActiveXControlFactory.MiscStatus

TActiveXControlFactory

Represents a set of status bits that are stored in the registry.

property MiscStatus: Integer;

Description

MiscStatus is stored in a registry entry under the CLSID entry for the class. This entry provides information about the ActiveX server to a container. The entry contains a set of binary flags for which ActiveX defines specific meanings. This entry is not required.

The following table lists the status bits that ActiveX control containers must recognize and support. For each status bit, it indicates whether container support is required for the feature and includes a brief description.

Status bit	Container support	Description

ACTIVATEWHENVISIBLE	yes	Indicates that the object should be activated when it becomes visible, even if it isn’t UI-active.

IGNOREACTIVATEWHENVISIBLE	no	Needed for inactive and windowless control support.

INSIDEOUT	no	Indicates that the object should be activated inside-out (it can be in-place active as well as UI-active.) Usually used with embedded compound documents rather than with controls.

INVISIBLEATRUNTIME	yes	Designates a control that should be visible at design-time, but not at run-time.

ALWAYSRUN	yes	Indicates that the object should always be in the running state and that the default handler should not delay the loading of the object until the last possible moment.

ACTSLIKEBUTTON	no	Indicates that the object has button-like behavior. This allows the container to ask the control to draw itself as the default button or as a normal button.

ACTSLIKELABEL	no	Indicates that the object behaves like a label. This allows the container to handle the control properly when its label gets focus.

NOUIACTIVATE	yes	Indicates that the control has no user interface to activate.

ALIGNABLE	no	Indicates that the control can be aligned by the user.

SIMPLEFRAME	no	Indicates that the control is a simple holder for other controls.

SETCLIENTSITEFIRST	no	Indicates that the control needs to access the client site very early in its creation.

IMEMODE	no	Indicates that the control supports an Input Method Editor (IME) for entering extended characters. Typically, a container that supports IME provides the control with an extended IMEMode property.


TActiveXControlFactory.ToolboxBitmapID
 VCL Reference

TActiveXControlFactory.ToolboxBitmapID

TActiveXControlFactory	See also

Designates the resource identifier of the ActiveX control.

property ToolboxBitmapID: Integer;

Description

Use ToolboxBitmapID to obtain the resource ID of the bitmap that is used to represent the control on a design palette.


TActiveXControlFactory.WinControlClass
 VCL Reference

TActiveXControlFactory.WinControlClass

TActiveXControlFactory	See also

WinControlClass is the class of the VCL control that implements the Windows behavior for the ActiveX control.

type TWinControlClass = class of TWinControl;

property WinControlClass: TWinControlClass;

Description

The factory object keeps a reference to the VCL control’s class information so that it can ask the class object to manufacture a VCL control when the ActiveX control is created.


 VCL Reference

TActiveXControlFactory methods

TActiveXControlFactory	Alphabetically	Legend

In TActiveXControlFactory

AddVerb

Create

Destroy

UpdateRegistry

Derived from TAutoObjectFactory

GetIntfEntry

Derived from TTypedComObjectFactory

ClassInfo

GetInterfaceTypeInfo

Derived from TComObjectFactory

CreateComObject

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActiveXControlFactory methods

TActiveXControlFactory	By object	Legend

AddVerb

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterfaceTypeInfo

GetIntfEntry

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TActiveXControlFactory.AddVerb
 VCL Reference

TActiveXControlFactory.AddVerb

TActiveXControlFactory	See also

AddVerb adds a verb to the object’s list of supported verbs.

procedure AddVerb(Verb: Integer; const VerbName: string);

Description

Use AddVerb to add a verb that host applications can apply to the ActiveX control.  In the Verb parameter, pass a number to identify the verb.  User-defined verbs are normally small positive numbers.

In the VerbName parameter, pass the text to display when presenting the user with a choice of verbs.  In some ActiveX (formerly called OLE) containers, the verb text is displayed in a popup menu when the user right-clicks on a control.

Placing an ampersand (&) before a character in this string causes the character to be displayed underlined in a pop-up menu.

ActiveX defines the following commonly used verbs:

VerbName	Verb

OLEIVERB_PRIMARY	0

OLEIVERB_SHOW	–1

OLEIVERB_OPEN	–2

OLEIVERB_HIDE	–3

OLEIVERB_UIACTIVATE	–4

OLEIVERB_INPLACEACTIVATE	–5

OLEIVERB_DISCARDUNDOSTATE	–6

OLEIVERB_PROPERTIES	–7


TActiveXControlFactory.Create
 VCL Reference

TActiveXControlFactory.Create

TActiveXControlFactory	See also

Creates and initializes a new TActiveXControlFactory object.

constructor Create(ComServer: TComServerObject; ActiveXControlClass: TActiveXControlClass; WinControlClass: TWinControlClass; const ClassID: TGUID; ToolboxBitmapID: Integer; const LicStr: string; MiscStatus: Integer); ThreadingModel: TThreadingModel;

Description

The ComServer parameter is a pointer to the COM server object for the module containing the property page factory. This is normally a global variable, ComServer, declared in the ComServ unit.

The ActiveXControlClass parameter is the class object for the controller object that implements the ActiveX control. This object should be derived from TActiveXControl.

The WinControlClass parameter is the class object for the VCL control class that implements the Windows behavior of the control. This object should be derived from TWinControl.

The ClassID parameter is the GUID of the ActiveX control. Each COM object should have a unique GUID.

LicStr is the license string for controls created with this factory. LicStr is empty if controls created with this factory are unlicensed. MiscStatus are the status bits that are stored in the registry.

ThreadingModel specifies how calls to the created ActiveX control are serialized. This determines the value of the ThreadingModel property.


TActiveXControlFactory.Destroy
 VCL Reference

TActiveXControlFactory.Destroy

TActiveXControlFactory	See also

Frees the instance of the TActiveXControlFactory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Factory objects are destroyed automatically when the server shuts down.


TActiveXControlFactory.UpdateRegistry
 VCL Reference

TActiveXControlFactory.UpdateRegistry

TActiveXControlFactory	See also

UpdateRegistry adds or removes registry entries for the object.

procedure UpdateRegistry(Register: Boolean); override;

Description

This method is called to add or remove the control from the system registry.  The default behavior of this method is to add normal ActiveX control registry keys, server file information, and type library information to the registry.  It also adds the verbs added with the AddVerb method.

If the Register parameter is True, the control should add its keys to the system registry.  If it is False, the control should remove its keys from the registry.

Override this method if you want your control to store more information in the registry than the base implementation stores.  If you override this method, be sure to call the inherited implementation in the correct order.  When adding registry entries (that is, Register is True), call the inherited method before adding custom entries.  When removing registry entries (that is, Register is False), call the inherited method after removing the custom entries.


Hierarchy

TObject

TComObjectFactory

TTypedComObjectFactory

TAutoObjectFactory

TActiveXControlFactory


TActiveXPropertyPageFactory
 VCL Reference

TActiveXPropertyPageFactory

Hierarchy	Properties	Methods	See also

TActiveXPropertyPageFactory implements a COM factory for an ActiveX property page.

Unit

AxCtrls

Description

A property page is a COM object, which means the module it is implemented in must provide a factory so that the system can create the object. TActiveXPropertyPageFactory is a factory for ActiveX property pages, which are implemented by subclassing TPropertyPage.

For more information about COM factories, see TComObjectFactory.

To add a property page factory to a program, create the factory object in the initialization section of the unit that defines the property page form.


 VCL Reference

TActiveXPropertyPageFactory properties

TActiveXPropertyPageFactory	Alphabetically	Legend

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TActiveXPropertyPageFactory properties

TActiveXPropertyPageFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TActiveXPropertyPageFactory methods

TActiveXPropertyPageFactory	Alphabetically	Legend

In TActiveXPropertyPageFactory

Create

Derived from TComObjectFactory

CreateComObject

Destroy

RegisterClassObject

UpdateRegistry

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActiveXPropertyPageFactory methods

TActiveXPropertyPageFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TActiveXPropertyPageFactory.Create
 VCL Reference

TActiveXPropertyPageFactory.Create

TActiveXPropertyPageFactory	See also

Creates a property page factory and binds that factory to property page class.

constructor Create(ComServer: TComServerObject;ActiveXControlClass: TActiveXControlClass; WinControlClass: TWinControlClass; const ClassID: TGUID; ToolboxBitmapID: Integer);

Description

The ComServer parameter is a pointer to the COM server object for the ActiveX library.  This is normally the global variable, ComServer, declared in the ComServ unit.

The PropertyPageClass parameter is the class object of the property page’s implementing class.  The implementing class must be derived form TPropertyPage.  This class implements the form that is to appear in the property dialog.

The ClassID parameter is a GUID that identifies the property page’s class.  Each property page should have its own GUID.  See the Developer’s Guide for information on how to create a GUID.


Hierarchy

TObject

TComObjectFactory


 VCL Reference


TActiveXPropertyPage
 VCL Reference

TActiveXPropertyPage

Hierarchy	Properties	Methods	See also

TActiveXPropertyPage represents a COM object that provides the interfaces for supporting an ActiveX property page.

Unit

AxCtrls

Description

This class is used internally by the TPropertyPage control to provide a bridge between a Delphi form and the ActiveX property page API.


 VCL Reference

TActiveXPropertyPage properties

TActiveXPropertyPage	Alphabetically	Legend

InTActiveXPropertyPage

PropertyPageImpl

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TActiveXPropertyPage properties

TActiveXPropertyPage	By object	Legend

Controller

Factory

PropertyPageImpl

RefCount

ServerExceptionHandler


TActiveXPropertyPage.PropertyPageImpl
 VCL Reference

 TActiveXPropertyPage.PropertyPageImpl

TActiveXPropertyPage

The implementation of the COM server portion of the COM object.

property PropertyPageImpl: TPropertyPageImpl;

Description

PropertyPageImpl is the COM server portion of the implementation of the IPropertyPage interface. Applications do not create the TPropertyPageImpl objects; they are created automatically when the user creates an ActiveX control object by using the ActiveX control or ActiveForms wizard.

TActiveXPropertyPage implements the COM server portion of the COM object while TPropertyPageImpl implements the  property page portion.


 VCL Reference

TActiveXPropertyPage methods

TActiveXPropertyPage	Alphabetically	Legend

In TActiveXPropertyPage

Destroy

Initialize

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassName

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActiveXPropertyPage methods

TActiveXPropertyPage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException


TActiveXPropertyPage.Destroy
 VCL Reference

 TActiveXPropertyPage.Destroy

TActiveXPropertyPage	See also

Frees the instance of the TActiveXPropertyPage.

destructor Destroy; override;

Description

Do not call Destroy directly in an application.  Instead, call Free. Free checks that the TPropertyPage reference is not nil before calling Destroy.


TActiveXPropertyPage.Initialize
 VCL Reference

 TActiveXPropertyPage.Initialize

TActiveXPropertyPage 	See also

Initializes the instance of a TActiveXPropertyPage descendant.

procedure Initialize; override;

Description

Override the Initialize method to initialize an instance of a TPropertyPage descendant before it is used.


Hierarchy

TObject

TComObject

TActiveXPropertyPage


TBasePageProducer
 VCL Reference

TBasePageProducer

Hierarchy	Properties	Methods	Events	See also

TBasePageProducer is a base class for objects that produce a string of HTML commands based on an input template.

Unit

HTTPProd

Description

Do not create instances of TBasePageProducer. Instead, use TBasePageProducer as a base class when defining a page producer. TBasePageProducer has two descendants,

TCustomPageProducer, which is the base class for page producers that produce content based primarily on the content of HTTP messages and an OnHTML event handler. Examples include TPageProducer and TDataSetPageProducer.

TComponentsPageProducer, which is the base class for page producers that assemble content from components that generate HTML. Examples include TInetXPageProducer and TPageItemsProducer.

A page producer is an object that converts an HTML template into a string of HTML commands which can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the page producer.


 VCL Reference

TBasePageProducer properties

TBasePageProducer	Alphabetically	Legend

In TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBasePageProducer properties

TBasePageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext


TBasePageProducer.ScriptEngine
 VCL Reference

TBasePageProducer.ScriptEngine

TBasePageProducer	See also

Names the script engine that generates or interprets script embedded in the documents that this producer creates.

property ScriptEngine: string;

Description

ScriptEngine indicates the scripting language that the producer uses in its generated documents. For example, if the producer generates code that includes jscript, the value of ScriptEngine is ‘JSCRIPT’.

When ScriptEngine is defined, the page producer generates its content using a special script-producer component. When ScriptEngine is not defined, the page producer uses only the OnHTMLTag event, plus any other built-in translations provided by a descendant class.


TBasePageProducer.StripParamQuotes
 VCL Reference

TBasePageProducer.StripParamQuotes

TBasePageProducer

Specifies whether to strip quotation marks when extracting the parameters from an HTML-transparent tag.

property StripParamQuotes: Boolean;

Description

Set StripParamQuotes to indicate whether the page producer should strip quotation marks from the parameters of HTML-transparent tags before handling the tags. By setting StripParamQuotes to True, the page producer compensates for HTML editors that automatically insert quotation marks around the values of tag options.


TBasePageProducer.WebModuleContext
 VCL Reference

TBasePageProducer.WebModuleContext

TBasePageProducer	See also

Provides access to the Web module context object.

type TWebModuleContext = TObject;

property WebModuleContext: TWebModuleContext;

Description

Use WebModuleContext to get access to the TWebModuleContext object. The TWebModuleContext object maintains a list of named variables that the producer uses when translating HTML-transparent tags.


 VCL Reference

TBasePageProducer events

TBasePageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TBasePageProducer events

TBasePageProducer	By object	Legend

OnHTMLTag


TBasePageProducer.OnHTMLTag
 VCL Reference

TBasePageProducer.OnHTMLTag

TBasePageProducer	See also 	Example

Occurs when the page producer needs to interpret the value of an HTML-transparent tag in the HTML template.

type

  TTag = (tgCustom, tgLink, tgImage, tgTable, tgImageMap, tgObject, tgEmbed);

  THTMLTagEvent = procedure (Sender: TObject; Tag: TTag; const TagString: string; TagParams: TStrings; var ReplaceText: string) of object;

Description

Write an OnHTMLTag event handler to convert an HTML-transparent tag into the corresponding HTML commands that can be interpreted by a Web browser. If an OnHTMLTag event is not supplied, the HTML-transparent tags in the HTML template will be replaced by empty strings.

The Tag parameter indicates the type of HTML-transparent tag that was encountered in the HTML template. It can have one of the following values

Value	Meaning

tgLink	The TagString parameter is LINK. The TagParams describe a hypertext link. The event handler should return a sequence of HTML commands beginning with an <A> tag and ending with an </A> tag.

tgImage	The TagString parameter is IMAGE. The TagParams describe a graphic image. The event handler should return an HTML <IMG> tag.

tgTable	The TagString parameter is TABLE. The TagParams describe a desired tabular image. The event handler should return a sequence of HTML commands beginning with a <TABLE> tag and ending with a </TABLE> tag.

tgImageMap	The TagString parameter is IMAGEMAP. The TagParams describe a graphic image with associated hot zones. The event handler should return a sequence of HTML commands beginning with a <MAP> tag and ending with a </MAP> tag.

tgObject	The TagString parameter is OBJECT. The TagParams contain a reference to an ActiveX control. The event handler should return a sequence of HTML commands beginning with an <OBJECT> tag and ending with an </OBJECT> tag.

tgEmbed	The TagString parameter is EMBED. The TagParams contain a reference to a Netscape-compliant add-in DLL. The event handler should return a sequence of HTML commands beginning with an <EMBED> tag and ending with an </EMBED> tag.

tgCustom	The TagString parameter is an application-defined string. The event handler can convert the HTML-transparent tag in an application-specific manner.

The TagString parameter is the tag name of the HTML-transparent tag. If the Tag parameter is tgCustom, TagString should be used to determine what conversion to perform. The TagParams parameter gives the parameter portion of the HTML-transparent tag. Each string in the TStrings object has the form ParamName=Value. Use the Names and Values properties of the TStrings object to parse these parameters.

The OnHTMLTag event handler should return the converted HTML commands in the ReplaceText parameter. The returned value can contain HTML-transparent tags for another page producer to convert. For example, one page producer might have a template that represents the format of the final HTTP response. It could read the HTTP request and for each section in the request assemble a set of HTML-transparent tags with parameters based on the request. Another page producer might take the content of the first page producer, and interpret those parameters.


 VCL Reference

TBasePageProducer methods

TBasePageProducer	Alphabetically	Legend

In TBasePageProducer

Content

ContentFromStream

ContentFromString

Create

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBasePageProducer methods

TBasePageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TBasePageProducer.Content
 VCL Reference

TBasePageProducer.Content

TBasePageProducer	See also

Returns the content produced by the content producer.

function Content: string; override;

Description

Call Content to retrieve the content for using in an HTTP response message. TBasePageProducer attempts to locate a default template and uses that to generate the resulting content.


TBasePageProducer.ContentFromStream
 VCL Reference

TBasePageProducer.ContentFromStream

TBasePageProducer	See also

Returns the content produced in response to input read from a stream.

function ContentFromStream(Stream: TStream): string; override;

Description

Call ContentFromStream to retrieve the content produced by the content producer based on the information provided by the Stream parameter.

When the ScriptEngine property is assigned, the page producer generates its content using a special script-producer component. When ScriptEngine is not assigned, the page producer uses only the OnHTMLTag event, plus any other built-in translations provided by a descendant class.


TBasePageProducer.ContentFromString
 VCL Reference

TBasePageProducer.ContentFromString

TBasePageProducer	See also

Returns the content produced in response to an input string.

function ContentFromString(const S: string): string; override;

Description

Call ContentFromString to retrieve the content produced by the content producer based on the information provided by the S parameter.

When the ScriptEngine property is assigned, the page producer generates its content using a special script-producer component. When ScriptEngine is not assigned, the page producer uses only the OnHTMLTag event, plus any other built-in translations provided by a descendant class.


TBasePageProducer.Create
 VCL Reference

TBasePageProducer.Create

TBasePageProducer	See also

Creates an instance of TBasePageProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TBasePageProducer.

AOwner is a component, typically a Web module, that is responsible for freeing the page producer.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer


TBaseProvider
 VCL Reference

TBaseProvider

Hierarchy	Properties 	Methods 	Events	Using TBaseProvider	See also

TBaseProvider is a base class for all providers that represent the data in a dataset.

Unit

Provider

Description

TBaseProvider is the immediate ancestor of TDataSetProvider, which provides data from any dataset and applies updates back to that dataset or directly to an SQL server. Use TBaseProvider to derive other customized data provider objects, such as providers that apply updates directly to a database without using SQL.

Unlike its immediate ancestor (TCustomProvider) TBaseProvider includes no abstract methods. However, applications should not create instances of TBaseProvider, as many of the methods are merely stubs that provide a backstop for specialized descendants that do not implement all the provider methods. To add a provider component to a form or data module, use TDataSetProvider (or TXMLTransformProvider).

A provider derived from TBaseProvider is an intermediate link between a TClientDataSet or TXMLBroker object and a source dataset. The source dataset can reside in the same application as the client dataset or XML broker, or it can be part of a separate application server. The provider packages data from the source dataset and passes it in one or more transportable data packets to the client dataset or XML broker.

When the provider supplies data to a client dataset, the client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the database or source dataset.

When the provider supplies data to an XML broker, the XML broker adds the data packet, in XML format, to an HTML document that is downloaded by a Web client. When the XML broker receives updates from the Web client, it sends the updates to the provider, which applies them to the database or source dataset.

Client datasets and XML brokers communicate with a provider through the IAppServer interface. In multi-tiered applications, this is the interface of the remote data module that contains the provider. To enable the remote data module to pass calls to the provider, the provider’s Exported property must be True, and its Owner property must specify the remote data module.


 VCL Reference

TBaseProvider properties

TBaseProvider	Alphabetically	Legend

In TBaseProvider

Options

Resolver

UpdateMode

Derived from TCustomProvider

Data

Exported

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBaseProvider properties

TBaseProvider	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Data

DesignInfo

Exported

Name

Options

Owner

Resolver

Tag

UpdateMode

VCLComObject


TBaseProvider.Options
 VCL Reference

TBaseProvider.Options

TBaseProvider 	See also

Influences what is included in data packets and how the information in data packets is used.

property Options: TProviderOptions;

Description

Set Options to customize how the provider communicates with client datasets. Options is a set that specifies

Whether nested detail sets and BLOB data are included in data packets or fetched separately.

Whether data packets include field component properties such as formats, display names, and maximum & minimum values.

Whether data packets are provided on a read-only basis, and whether specific types of changes (insertions, edits, or deletions) are disabled.

Whether changes to master table fields should cause corresponding updates to detail tables.

Whether a single update can affect multiple server records.

Whether the client’s records are refreshed when it applies updates.

Whether the client can send SQL statements that override the provider’s dataset.

Note:	Not all options are supported by an InternetExpress client. Specifically, InternetExpress clients don’t support poFetchBlobsOnDemand, poFetchDetailsOnDemand, poDisableInserts, poDisableEdits, psDisableDeletes, poPropogateChanges, and poAllowCommandText.


TBaseProvider.Resolver
 VCL Reference

TBaseProvider.Resolver

TBaseProvider	See also

Provides access to the resolver component that applies updates and resolves update errors.

property Resolver: TCustomResolver;

Description

Provider components use a resolver to handle the details of applying updates and resolving update errors. Most applications do not need to use the resolver directly.

When any method that uses a resolver is called, the provider automatically creates a resolver component (using the CreateResolver method) if the value of Resolver is nil. Thus, this property is nil until the first method that requires a resolver is called.


TBaseProvider.UpdateMode
 VCL Reference

TBaseProvider.UpdateMode

TBaseProvider	See also	Example

Controls how the provider locates records when applying updates.

property UpdateMode: TUpdateMode;

Description

Use UpdateMode to specify the criteria for locating a record in the dataset when applying updates. UpdateMode specifies whether modified records are located based on all columns (fields), on only the key fields, or on the key fields plus the original values of fields that have been modified.

Note:	To control how the provider locates records by specifying individual fields, use the field components’ ProviderFlags property.


 VCL Reference

TBaseProvider events

TBaseProvider	Alphabetically	Legend

In TBaseProvider

AfterUpdateRecord

BeforeUpdateRecord

OnGetData

OnUpdateData

OnUpdateError

Derived from TCustomProvider

OnDataRequest


 VCL Reference

TBaseProvider events

TBaseProvider	By object	Legend

AfterUpdateRecord

BeforeUpdateRecord

OnDataRequest

OnGetData

OnUpdateData

OnUpdateError


TBaseProvider.AfterUpdateRecord
 VCL Reference

TBaseProvider.AfterUpdateRecord

TBaseProvider	See also 	Example

Occurs when the associated resolver has just updated a record.

property AfterUpdateRecord: TAfterUpdateRecordEvent;

Description

Write an AfterUpdateRecord event handler to provide special processing immediately after a record has been successfully updated. For example, use AfterUpdateRecord to maintain a log of successful updates.


TBaseProvider.BeforeUpdateRecord
 VCL Reference

TBaseProvider.BeforeUpdateRecord

TBaseProvider	See also 	Example

Occurs immediately before each record is applied to the remote dataset.

property BeforeUpdateRecord: TBeforeUpdateRecordEvent;

Description

Write a BeforeUpdateRecord event handler to

Prepare individual record updates before they are applied to the source dataset or the database server. For example, you can insert additional changes into a record before it is updated or set the ProviderFlags property of the fields in the DeltaDS parameter to indicate how the provider should identify the records that are to be updated or changed and which fields should be updated.

Manually apply updates that the provider can’t handle. For example, the provider can’t generate the appropriate SQL when the data results from a multi-table join and more than one table must be updated. Write code in the event handler to apply the update and then set the Applied parameter to True so that the provider does not generate an error.

Selectively prevent certain updates from occurring. By setting the Applied parameter to True, the default update does not occur. When you prevent updates in this way, the provider does not generate an update error.


TBaseProvider.OnGetData
 VCL Reference

TBaseProvider.OnGetData

TBaseProvider	See also 	Example

Occurs after a provider retrieves data but before it is sent to the client.

property OnGetData: TProviderDataEvent;

Description

Write an OnGetData event handler to perform any custom data processing the provider should handle before returning data to a client. The OnGetData event occurs after a provider fetches data from its dataset but before the data is sent on to the client. Using the methods of the DataSet parameter, data can be edited in the OnGetData event handler before sending it to the client dataset or XML broker.

Note:	OnGetData occurs when the Data property is read, as well as when the GetRecords method is called.


TBaseProvider.OnUpdateData
 VCL Reference

TBaseProvider.OnUpdateData

TBaseProvider	See also 	Example

Occurs when a provider begins to apply updates.

property OnUpdateData: TProviderDataEvent;

Description

Write an OnUpdateData event to handle special processing before the provider begins applying updates received from the client dataset or XML broker. Using the methods belonging to the DataSet parameter, an application can

Examine data (for example, for values or data changes that should not permitted), and raise exceptions that cancel applying of updates before they occur.

Change data (for example encrypting or decrypting values) before it is sent on to the source dataset or database server.


TBaseProvider.OnUpdateError
 VCL Reference

TBaseProvider.OnUpdateError

TBaseProvider	See also	Example

Occurs when a provider can’t update a record because of an error condition.

property OnUpdateError: TResolverErrorEvent;

Description

Write an OnUpdateError event handler to respond to error conditions that arise when the provider applies a client dataset’s updates. The OnUpdateError event handler is called for each record that can’t be updated.

Warning:	The provider can’t detect when an update conflicts with another user’s changes to a memo field. This situation will not generate an OnUpdateError event.


 VCL Reference

TBaseProvider methods

TBaseProvider	Alphabetically	Legend

In TBaseProvider

CheckResolver

Create

CreateDataPacket

CreateResolver

Destroy

DoOnGetData

DoOnUpdateData

FetchDetails

FreeResolver

InternalApplyUpdates

InternalGetRecords

InternalRowRequest

LocateRecord

UpdateRecord

Derived from TCustomProvider

ApplyUpdates

DataRequest

Execute

GetParams

GetRecords

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBaseProvider methods

TBaseProvider	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

CheckResolver

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateDataPacket

CreateResolver

DataRequest

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoOnGetData

DoOnUpdateData

Execute

ExecuteAction

FetchDetails

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

FreeResolver

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParams

GetParentComponent

GetRecords

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InternalApplyUpdates

InternalGetRecords

InternalRowRequest

IsImplementorOf

LocateRecord

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction

UpdateRecord


TBaseProvider.CheckResolver
 VCL Reference

TBaseProvider.CheckResolver

TBaseProvider	See also

Instantiates a resolver for the Resolver property if it does not already exist.

procedure CheckResolver;

Description

CheckResolver is called internally when the provider needs to use its resolver component. It checks whether Resolver is nil, and if so, calls CreateResolver to assign a value.


TBaseProvider.Create
 VCL Reference

TBaseProvider.Create

TBaseProvider	See also

Creates and initializes a TBaseProvider object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a provider at runtime. Providers placed in forms or data modules at design time are created automatically.

AOwner specifies the component, typically a form or data module, that is responsible for freeing the provider.


TBaseProvider.CreateDataPacket
 VCL Reference

TBaseProvider.CreateDataPacket

TBaseProvider	See also

Generates a data packet for the data associated with the provider.

procedure CreateDataPacket(PacketOpts: TGetRecordOptions; ProvOpts: TProviderOptions; var RecsOut: Integer; var Data: OleVariant); virtual;

Description

CreateDataPacket is used internally to generate data packets. As implemented in TBaseProvider, CreateDataPacket sets RecsOut to 0 and Data to NULL. Descendants override this method to create the data packets that are returned by GetRecords.

The PacketOpts parameter indicates what information (other than record values) is included in the data packet. It reflects the Options passed to the GetRecords method.

The ProvOpts parameter reflects the current value of the Options property.

The RecsOut parameter specifies the number of records desired in the packet and returns the actual number of records in the generated data packet.

The Data parameter returns the generated data packet.


TBaseProvider.CreateResolver
 VCL Reference

TBaseProvider.CreateResolver

TBaseProvider	See also

Creates a resolver component for handling the application of updates.

function CreateResolver: TCustomResolver; virtual;

Description

CreateResolver is called automatically when a resolver is needed to implement one of TBaseProvider’s methods. As implemented in TBaseProvider, CreateResolver always returns nil. Descendants of TBaseProvider override this method to create a TCustomResolver descendant that applies updates in the desired manner.


TBaseProvider.Destroy
 VCL Reference

TBaseProvider.Destroy

TBaseProvider	See also

Frees an instance of a provider object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the provider is not nil before calling the Destroy method.


TBaseProvider.DoOnGetData
 VCL Reference

TBaseProvider.DoOnGetData

TBaseProvider	See also

Generates an OnGetData event.

procedure DoOnGetData(var Data: OleVariant);

Description

DoOnGetData is the protected implementation of the OnGetData event. Override this method to perform class-specific actions in response to data requests.


TBaseProvider.DoOnUpdateData
 VCL Reference

TBaseProvider.DoOnUpdateData

TBaseProvider	See also

Generates an OnUpdateData event.

procedure DoOnUpdateData(Delta: TPacketDataSet);

Description

DoOnUpdateData is the protected implementation of the OnUpdateData event. The Delta property contains the delta packet of records to update. It is passed to the OnUpdateData event handler as a client dataset.

Override this method to perform class-specific actions in response to update requests.


TBaseProvider.FetchDetails
 VCL Reference

TBaseProvider.FetchDetails

TBaseProvider	See also

Fills a delta dataset with all nested dataset field values.

procedure FetchDetails(Source, Delta: TDataSet); virtual;

Description

FetchDetails is used internally to fetch the current values of any nested datasets when the provider is executing its RowRequest method. As implemented in TBaseProvider, FetchDetails does nothing. Descendants override this method to add nested detail datasets to the delta packet specified by Delta.

Source is a source dataset that has the current values for all fields. Delta is a delta dataset that must be updated so that its nested detail fields match the values in Source.


TBaseProvider.FreeResolver
 VCL Reference

TBaseProvider.FreeResolver

TBaseProvider	See also

Frees the resolver specified by the Resolver property.

procedure FreeResolver;

voidDescription

Call FreeResolver to safely dispose of the component specified by the Resolver property. FreeResolver sets the Resolver property to nil after calling the resolver’s Free method.


TBaseProvider.InternalApplyUpdates
 VCL Reference

TBaseProvider.InternalApplyUpdates

TBaseProvider 	See also

Provides the underlying implementation of the ApplyUpdates method.

function InternalApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer): OleVariant; override;

Description

The ApplyUpdates method calls InternalApplyUpdates to apply the updates contained in a delta packet after generating the BeforeApplyUpdates event and before generating the AfterApplyUpdates event.

If the Options property includes poReadOnly, InternalApplyUpdates raises an exception. Otherwise, it calls the ApplyUpdates method of its Resolver component to handle the actual update and resolving process. If the Resolver property is nil, ApplyUpdates calls the CreateResolver method and assigns the resulting resolver to the Resolver property.

Delta is the delta packet containing insertions, deletions, and modifications to be applied.

MaxErrors indicates the maximum number of errors that can be applied before stopping the update operation. If MaxErrors is –1, the provider tries to apply all updates.

ErrorCount returns the number of errors encountered during the update operation.

InternalApplyUpdates returns a data packet of updates that could not be applied to the database as an OleVariant.


TBaseProvider.InternalGetRecords
 VCL Reference

TBaseProvider.InternalGetRecords

TBaseProvider	See also

Provides the underlying implementation of the GetRecords method.

function InternalGetRecords(Count: Integer; out RecsOut: Integer; Options: TGetRecordOptions; const CommandText: WideString; var Params: OleVariant); OleVariant; override;

Description

The GetRecords method calls InternalGetRecords to assemble a data packet after calling DoBeforeGetRecords to apply the CommandText and Params and generate a BeforeGetRecords event. InternalGetRecords calls CreateDataPacket to create a data packet that reflects the current property settings of the provider. It then generates an OnGetData event.

Count indicates the number of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only the specified number of records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It can include grMetaData (include metadata), grReset (start providing records with the first one in the dataset), and grXML (encode the datapacket in XML rather than as an OleVariant) or grXMLUTF8 (same as grXML except extended characters are encoded using UTF8).

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

Params specifies any parameter values that should be applied to CommandText or to an associated query or stored procedure. If the provider is associated with a table, Params specifies field values that filter the result set. On exit from GetRecords, Params returns any output parameters.

Records are returned as a data packet in a Variant.


TBaseProvider.InternalRowRequest
 VCL Reference

TBaseProvider.InternalRowRequest

TBaseProvider	See also

Provides the underlying implementation of the RowRequest method.

function InternalRowRequest(const Row: OleVariant; RequestType: TFetchOptions): OleVariant; override;

Description

The RowRequest method calls InternalRowRequest to assemble the specified information after generating a BeforeRowRequest event and before generating an AfterRowRequest event. InternalRowRequest passes this request on to its associated Resolver.

The Row parameter is an OleVariant that describes the record for which information is requested. The provider uses Row to locate the record before assembling the requested information.

The RequestType parameter indicates the type of information required.

InternalRowRequest returns the requested information in a delta packet.


TBaseProvider.LocateRecord
 VCL Reference

TBaseProvider.LocateRecord

TBaseProvider 	See also

Positions a data set on the record that corresponds to the current update in a specified delta packet.

procedure LocateRecord(Source, Delta: TDataSet; virtual;

Description

LocateRecord is called indirectly by the RowRequest method to locate a record before fetching information about a specified record. The Source parameter is the dataset containing current record values. The Delta parameter is a delta packet that identifies the desired type of information and information identifying the desired record.

As implemented in TBaseProvider, LocateRecord does nothing. Descendants override this method to locate the specified record in Source and navigate to it.


TBaseProvider.UpdateRecord
 VCL Reference

TBaseProvider.UpdateRecord

TBaseProvider 	See also

Retrieves specified data from a source dataset into a delta packet.

procedure UpdateRecord(Source, Delta: TDataSet; BlobsOnly: Boolean); virtual;

Description

UpdateRecord is called indirectly by the RowRequest method to fetch BLOB fields or nested detail sets. The Source parameter is the dataset containing the BLOB fields or the detail dataset. The Delta parameter is a delta packet that returns the requested data. BlobsOnly indicates whether all field values should be provided (BlobsOnly =False) or only Blob field values (BlobsOnly =True).

As implemented in TBaseProvider, UpdateRecord does nothing. Descendants override this method to fill the Delta parameter with the requested information.


Hierarchy

TObject

TPersistent

TComponent

TCustomProvider

TBaseProvider


TBaseSocket
 VCL Reference

TBaseSocket

Hierarchy	Properties	Methods 	Events	See also

TBaseSocket encapsulates local operations on file descriptors

Unit

Sockets

Description

The TBaseSocket component encapsulates local operations on files descriptors, which are objects that a program uses to read from or write to an open file, or open a network socket or a variety of other devices.

Do not create instances of TBaseSocket. Use TBaseSocket as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TBaseSocket provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TBaseSocket properties

TBaseSocket	Alphabetically	Legend

In TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBaseSocket properties

TBaseSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Name

Owner

Protocol

SockType

Tag

VCLComObject


TBaseSocket.Active
 VCL Reference

TBaseSocket.Active

TBaseSocket	See also

Indicates whether the socket connection is open and available for communication with other machines.

property Active: Boolean;

Description

Before attempting to use or change the socket connection, read Active to determine whether the connection is open and ready. For client sockets, setting Active opens or shuts down a socket connection to another machine. For server sockets, setting Active opens or shuts down a listening connection that makes the socket available for client requests.

At design time, set Active to True to make the socket open a connection when the application starts running (the default value is False). At runtime, use the Open or Close method to open or close the connection.


TBaseSocket.BlockMode
 VCL Reference

TBaseSocket.BlockMode

TBaseSocket	See also

Sets or returns the blocking mode of the socket.

type TSocketBlockMode = (bmBlocking, bmNonBlocking);

property BlockMode: TSocketBlockMode;

Description

Use BlockMode to set or return the blocking mode for the socket.  By default, the socket is set to bmBlocking.

The TSocketBlockMode type defines the set of possible socket flags for the BlockMode property. The following table lists the possible values for the TSocketBlockMode type and the meaning corresponding to each value:

Value	Socket state

bmBlocking	The socket is set to block mode.

bmNonBlocking	The socket is set to non-blocking mode.


TBaseSocket.BytesReceived
 VCL Reference

TBaseSocket.BytesReceived

TBaseSocket	See also

Returns the number of bytes received by the socket.

property BytesReceived: cardinal;

Description

BytesReceived returns the number of bytes received by the socket.


TBaseSocket.BytesSent
 VCL Reference

TBaseSocket.BytesSent

TBaseSocket	See also

Returns the number of bytes sent from the socket.

property BytesSent: cardinal;

Description

BytesSent returns the number of bytes sent from the socket.


TBaseSocket.Domain
 VCL Reference

TBaseSocket.Domain

TBaseSocket	See also

Sets or returns the protocol family used by the socket.

type TSocketDomain = (pfUnspec, pfUnix, pfInet, pfImpLink, pfPup, pfChaos, pfIpx, pfNs, pfIso, pfOsi, pfEcma, pfDataKit, pfCcitt, pfSna, pfDecNet, pfDli, pfLat, pfHylink, pfAppleTalk, pfVoiceView, pfFireFox, pfUnknown1, pfBan, pfMax);

property Domain: TSocketDomain;

Description

Use Domain to set or return the protocol family used by the socket.

The TSocketDomain type defines the set of possible protocol family types for the Domain property. The following table lists the possible values for the TSocketDomain type and the meaning corresponding to each value: The default value of this property is pfUnspec.

Value	Protocol family

pfAppleTalk	AppleTalk DDP

pfBan	Banyan Vines

pfCcitt	CCIT (International Telegraph and Telephone Consultative)

pfChaos	??

pfDataKit	DataKit

pfDecNet	Reserved for DECnet project

pfDli	??

pfEcma	EcmaScript?

pfFireFox	FireFox

pfHylink	Hyperlink

pfImpLink	Imported link

pfInet	IP protocol family

pfIpx	Novell Interner Protocol

pfIso	International Standards Organization (ISO)

pfLat	??

pfMax	Maximum protocol family number

pfNs	Network Services Protocol (used with DECnet)

pfOsi	Open Systems Interconnection (OSI)

pfPup	PUP protocol

pfSna	Linux SNA project

pfUnix	Local to host (old BSD name for local)

pfUnknown1	Unknown

pfUnspec	Unspecified

pfVoiceView	VoiceView


TBaseSocket.Handle
 VCL Reference

TBaseSocket.Handle

TBaseSocket

Provides access to the unique-4 byte identifier that represents the instance of the socket object.

property Handle: TSocket;

Description

Use Handle to return a typed pointer to the instance of the socket class. This Handle can be used when making lowlevel function calls into the QT shared libraries, where the function call requires an instance pointer to the object.


TBaseSocket.Protocol
 VCL Reference

TBaseSocket.Protocol

TBaseSocket	See also

Sets or returns the protocol used by the socket.

type TSocketProtocol = word;

property Protocol: TSocketProtocol;

Description

Protocol sets or returns the protocol used by the socket.  The socket protocol can be IP, TCP, UDP, or other network protocols.


TBaseSocket.SockType
 VCL Reference

TBaseSocket.SockType

TBaseSocket

Sets or returns the socket type.

type TSocketType = (stStream, stDgram, stRaw, stRdm, stSeqPacket);

property SockType: TSocketType;

Description

SockType sets or returns the type of socket connection.

The TSocketType type defines the set of possible socket types for the SockType property. The following table lists the possible values for the TSocketType type and the meaning corresponding to each value:

Value	Socket type

stDgram	Single datagram packets, not used by IP.  Not terribly reliable.

stRaw	The socket sends and receives raw datagram packets. Used by IP.

stRdm	Reliably delivered message

stSeqPacket	Sequenced packet stream sends and receives any type of IP packet.

stStream	Reliable streaming data packets.  Used by TCP.


 VCL Reference

TBaseSocket events

TBaseSocket	By object	Legend

In TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TBaseSocket events

TBaseSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


TBaseSocket.OnCreateHandle
 VCL Reference

TBaseSocket.OnCreateHandle

TBaseSocket	See also

Occurs when the handle to a socket becomes active.

type

TSocketNotifyEvent = procedure (sender: TObject) of object;

property OnCreateHandle: TSocketNotifyEvent read FOnCreateHandle write FOnCreateHandle;

Description

Write an OnCreateHandle event handler to take specific action when the handle to a socket becomes active.


TBaseSocket.OnDestroyHandle
 VCL Reference

TBaseSocket.OnDestroyHandle

TBaseSocket

Occurs when a socket is deactivated.

type

TSocketNotifyEvent = procedure (sender: TObject) of object;

property OnDestroyHandle: TSocketNotifyEvent read FOnDestroyHandle write FOnDestroyHandle;

Description

Write an OnDestroyHandle event handler to take specific action when the socket is deactivated.


TBaseSocket.OnError
 VCL Reference

TBaseSocket.OnError

TBaseSocket	See also

Occurs when the socket fails in making, using, or shutting down a connection.

property OnError: TSocketErrorEvent;

Description

Write an OnError event handler to respond to errors that arise with the socket connection. Set the ErrorCode parameter to 0 if the OnError event handler successfully deals with the error condition, to prevent an ESocketError from being raised.


TBaseSocket.OnReceive
 VCL Reference

 KTBaseSocket.OnReceive

TBaseSocket	See also

Occurs after a socket receives data, but before it passes the data to the application.

type

TSocketDataEvent = procedure (Sender: TObject; buf: pchar; var datalen: integer) of object;

property OnReceive: TSocketDataEvent;

Description

Write an OnReceive event handler to read from the socket connection. Use the OnReceive event to filter data before passing it back to the client application.  If the socket is a blocking socket, use a TWinSocketStream object to read from the connection. Otherwise, use the methods of the Socket parameter to perform the actual reading.


TBaseSocket.OnSend
 VCL Reference

TBaseSocket.OnSend

TBaseSocket	 See also

Occurs just before a client socket writes information to the socket connection.

type

TSocketDataEvent = procedure (Sender: TObject; buf: pchar; var datalen: integer) of object;

property OnSend: TSocketDataEvent;

Description

Write an OnSend event handler to perform actions just prior to sending data. Use OnSend to monitor the data stream and change it (for example, by removing linefeeds). If the socket is a blocking socket, use a TWinSocketStream object to write to the connection. Otherwise, use the methods of the Socket parameter to perform the actual writing.


 VCL Reference

TBaseSocket methods

TBaseSocket	Alphabetically	Legend

In TBaseSocket

Close

Create

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBaseSocket methods

TBaseSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SetSubComponent

UpdateAction

WaitForData


TBaseSocket.Create
 VCL Reference

TBaseSocket.Create

TBaseSocket	See also

Creates an instance of TBaseSocket.

constructor Create(AOwner: TComponent) override;

Description

Call Create to instantiate a TBaseSocket object.


TBaseSocket.Destroy
 VCL Reference

TBaseSocket.Destroy

TBaseSocket	See also

Destroys the TBaseSocket instance and frees its memory.

procedure Destroy; override;

Description

Destroy cleans up references in the global fix-up list for form linking. It then calls the inherited destructor.

Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.


TBaseSocket.Close
 VCL Reference

TBaseSocket.Close

TBaseSocket	See also

Shuts down the socket connection.

procedure Close; virtual;

Description

Call Close to shut down the socket connection. Close sets the Active property to False.

For client sockets, Close terminates the connection to the server. For server sockets, Close shuts down the connection so that the server socket is no longer listening for client requests.


TBaseSocket.MapDomain
 VCL Reference

TBaseSocket.MapDomain

TBaseSocket	See also

Maps the domain.

type TSocketDomain = (pfUnspec, pfUnix, pfInet, pfImpLink, pfPup, pfChaos, pfIpx, pfNs, pfIso, pfOsi, pfEcma, pfDataKit, pfCcitt, pfSna, pfDecNet, pfDli, pfLat, pfHylink, pfAppleTalk, pfVoiceView, pfFireFox, pfUnknown1, pfBan, pfMax);

function MapDomain(sd: TSocketDomain): integer;

Description

MapDomain maps the socket domain to an integer based on the value supplied by the Domain property.


TBaseSocket.MapSockType
 VCL Reference

TBaseSocket.MapSockType

TBaseSocket	See also

Maps the socket type.

type TSocketType = (stStream, stDgram, stRaw, stRdm, stSeqPacket);

function MapSockType(st: TSocketType): integer;

Description

MapSockType maps the socket type to an integer based on the value supplied by the SockType property.


TBaseSocket.Open
 VCL Reference

TBaseSocket.Open

TBaseSocket	See also

Creates the socket connection.

procedure Open; virtual;

Description

Call Open to create the socket connection.  Descendents of TBaseSocket use Open to initiate the socket connection.

For client sockets, Open locates and connects to a server. For server sockets, Open opens the socket connection in a listening mode, but does not complete the connection to a client socket.


TBaseSocket.PeekBuf
 VCL Reference

TBaseSocket.PeekBuf

TBaseSocket	See also

Reads the buffer.

function PeekBuf(var buf; bufsize: integer): integer; dynamic;

Description

Use PeekBuf to make a copy of data waiting in the socket buffer.  Use buf to assign a variable to the buffer, and use bufsize to set the size of the buffer to be copied.  PeekBuf only copies, but does not otherwise affect the contents of the buffer.


TBaseSocket.ReceiveBuf
 VCL Reference

TBaseSocket.ReceiveBuf

TBaseSocket	See also

Reads data buffers of size bufsize to the socket.

function ReceiveBuf(var buf; bufsize: integer; flags: integer = 0): integer; dynamic;

Description

ReceiveBuf reads data buffers of size bufsize to the socket. Use buf to assign a variable to the buffer, and use bufsize to set the size of the buffer to be read. The flags argument can be any of the flags used by the Linux recv function. Refer to recv(2) in the Linux manual pages for more information.


TBaseSocket.Receiveln
 VCL Reference

TBaseSocket.Receiveln

TBaseSocket	See also

Reads delimited lines of data from the socket.

function Receiveln(eol: string = #10): string;

Description

Receiveln reads a delimited chunk of data from the socket.  The delimeter cannot be part of the character set.  Receiveln fills the buffer until it reaches the delimeter.


TBaseSocket.Select
 VCL Reference

TBaseSocket.Select

TBaseSocket	See also

Tests for socket activity.

function Select(ReadReady, WriteReady, ExceptFlag: PBoolean; TimeOut: Integer): boolean;

Description

Use Select to test for socket activity. Select indicates whether there is any data on the socket waiting to be sent or whether an error condition exists.

The parameter TimeOut is the timeout value. The socket will wait for activity up to TimeOut milliseconds before returning. If t is not explicitly specified, the default value is zero. If t is any negative number the socket will be blocked. It will wait for activity indefinitely, which can be useful for servers.


TBaseSocket.SendBuf
 VCL Reference

TBaseSocket.SendBuf

TBaseSocket	See also

Writes data buffers of size bufsize from the socket.

function SendBuf(var buf; bufsize: integer; flags: integer = 0): integer; dynamic;

Description

SendBuf sends data buffers of size bufsize to the socket. Use buf to assign a variable to the buffer, and use bufsize to set the size of the buffer to be sent. The flags argument can be any of the flags used by the Linux send function. Refer to the send Linux manual page for more information.


TBaseSocket.Sendln
 VCL Reference

TBaseSocket.Sendln

TBaseSocket	See also

Writes delimited lines of data to the socket.

function Sendln(s: string; const eol: string = #10): integer;

Description

Sendln sends a delimited chunk of data to the socket.  The delimeter cannot be part of the character set.  Sendln fills the buffer until it reaches the delimeter.


TBaseSocket.SendStream
 VCL Reference

TBaseSocket.SendStream

TBaseSocket	See also

Writes a stream of data to the socket.

function  SendStream(AStream: TStream): Integer;

Description

SendStream sends a stream of data to the socket.


TBaseSocket.WaitForData
 VCL Reference

TBaseSocket.WaitForData

TBaseSocket	See also

Waits up to TimeOut milliseconds for the socket connection to be ready to transfer data.

function WaitForData(TimeOut: Integer): boolean;

Description

Call WaitForData to ensure that the socket connection is ready to read or write information. WaitForData returns True if the socket connection is ready. WaitForData returns False if the socket connection is not ready after t (timeout) milliseconds elapse.

Call WaitForData before reading or writing information over the socket connection. Otherwise, ReceiveBuf, Receiveln, SendBuf, and Sendln method calls may time out before any data is transferred.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket


TBatchMove
 VCL Reference

 TBatchMove

Hierarchy	Properties	Methods 	Using TBatchmove	See also	Example

TBatchMove performs database operations on groups of records or entire tables.

Unit

DBTables

Description

Use a TBatchMove object to

Add the records in a dataset to a database table.

Delete the records in a dataset from a database table.

Copy a dataset to create a new database table or overwrite an existing table.

Set the Mode property to specify the desired operation. The Source and Destination properties indicate the datasets whose records are added, deleted, or copied. Other properties further specify how to perform the operation and how to handle problems that TBatchMove encounters when performing its operation. Once you have set properties to indicate what you want to do, call the Execute method to perform the actual operation.

Note:	TTable objects can also perform the same batch operations, but only using the options specified by the default TBatchMove property values.

Tip:	Applications can use a TBDECallback object to further refine the response to problems that arise.


 VCL Reference

TBatchMove properties

TBatchMove	Alphabetically	Legend

In TBatchMove

AbortOnKeyViol

AbortOnProblem

ChangedCount

ChangedTableName

CommitCount

Destination

KeyViolCount

KeyViolTableName

Mappings

Mode

MovedCount

ProblemCount

ProblemTableName

RecordCount

Source

Transliterate

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBatchMove properties

TBatchMove	By object	Legend

AbortOnKeyViol

AbortOnProblem

ChangedCount

ChangedTableName

CommitCount

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Destination

KeyViolCount

KeyViolTableName

Mappings

Mode

MovedCount

Name

Owner

ProblemCount

ProblemTableName

RecordCount

Source

Tag

Transliterate

VCLComObject


TBatchMove.AbortOnKeyViol
 VCL Reference

TBatchMove.AbortOnKeyViol

TBatchMove	See also	Example

Specifies whether the batch operation is terminated immediately when integrity or key violations occur.

property AbortOnKeyViol: Boolean;

Description

Set AbortOnKeyViol to True to cancel the batch operation when it causes integrity or key violations in the destination table. Set AbortOnKeyViol to False to cause records that would cause integrity or key violations to be posted to a key violations table instead. Provide a KeyViolTableName when setting AbortOnKeyViol to False. If there is no KeyViolTableName, AbortOnKeyViol may still be set to False, in which case problem records are counted but not saved in a table.

Key violations occur when appending records to a table that has a primary key. On a table with a primary key, no two records may have the same values on all of the key fields. If a record that is being appended has the same values on all the key fields as a record in the destination table, it cannot be appended.

Integrity violations occur when deleting, appending or updating records to a table that has a referential integrity specification. A referential integrity specification requires that certain fields in one table must have values that exist in a particular field of another table. If a record that is being added does not match the restrictions imposed by referential integrity, it cannot be added. If deleting record would cause tighter referential integrity restrictions that another table cannot meet, it cannot be deleted.


TBatchMove.AbortOnProblem
 VCL Reference

TBatchMove.::AbortOnProblem

TBatchMove	See also

Specifies whether the batch operation is terminated immediately when it is necessary to truncate data to make it fit in the specified Destination.

property AbortOnProblem: Boolean;

Description

Set AbortOnProblem to True to cancel the batch operation when types of the fields in the Source table records do not match the types of the fields in the Destination table records. Set AbortOnProblem to False to cause the mismatched fields to be “trimmed”. When AbortOnProblem is False, set the ProblemTableName to have all the untrimmed versions of records that were trimmed saved to a separate table.

Trimming a field means converting its value to a value compatible with the destination field type. For example, if a field in the destination table holds a string of size 10 characters, and the corresponding field in the source table holds a string of size 15 characters, any values from the source table longer than 10 characters must be truncated. Values that cannot be converted will cause TBatchMove to raise an exception.

Trimming does not occur when the Mode property is set to batCopy. Trimming fields on a delete operation means that records in the destination table may be deleted that do not exactly match the values from the source table.

Note:	To allow trimming on a field by field basis, use a TBDECallback object.


TBatchMove.ChangedCount
 VCL Reference

TBatchMove.ChangedCount

TBatchMove	See also

Indicates the number of records from the Destination table that are altered as a result of the batch operation.

property ChangedCount: Integer;

Description

Use ChangedCount to learn the number of records in the Destination table that are updated if the Mode is batUpdate or batAppendUpdate, or to learn the number that are deleted if the Mode is batDelete.

Set the ChangedTableName property to save the unchanged versions of the altered records to a separate table. ChangedCount is then the number of records in that separate table.


TBatchMove.ChangedTableName
 VCL Reference

TBatchMove.ChangedTableName

TBatchMove	See also

Specifies the name of a local Paradox table that is created to hold copies of all records from the destination table changed by the batch operation.

property ChangedTableName: TFileName

Description

Set ChangedTableName to create a table that saves all unchanged versions of records that are changed by the batch operation. ChangedTableName must specify the name of a Paradox table. Setting ChangedTableName ensures that no information in the Destination table gets lost when the records are altered or deleted.

When the Mode property is batUpdate or batAppendUpdate, the new table will hold all records that were updated. When the Mode property is batDelete, the new table will hold all records that were deleted.

The ChangedCount property specifies the number of records in the new table.


TBatchMove.CommitCount
 VCL Reference

TBatchMove.CommitCount

TBatchMove	See also

Specifies how many records are batch moved before a commit occurs.

property CommitCount: Integer;

Description

Use CommitCount to chunk batch operations into smaller operations. CommitCount allows an application to accommodate server transaction logs that are not big enough to handle the entire batch. Setting CommitCount to 0 will cause chunking into the number of records that will fit in 32Kb.

Note:	If the Execute method is called within an explicit transaction on the database containing the tables, CommitCount is ignored.


TBatchMove.Destination
 VCL Reference

TBatchMove.Destination

TBatchMove	See also	Example

Specifies the TTable object for the database table that is the destination of the batch operation.

property Destination: TTable;

Description

Use Destination to indicate the database table that will be created or altered by the batch operation. The batch operation affects the Destination differently depending on the Mode:

Mode	Effect on Destination

batAppend	Records are added to the destination table. No pre-existing records are altered. Destination table must already exist.

batUpdate	Records in the destination table with key fields matching the corresponding fields in the source are changed to match the source records. No new records are added. Destination table must already exist and must have an index defined.

batAppendUpdate	Records in the destination table with key fields matching the corresponding fields in the source are changed to match the source. Source records that do not match key fields are added to the destination table. Destination table must already exist and must have an index defined.

batDelete	Records in the destination table that match the records in the source are deleted. Destination table must already exist and must have an index defined.

batCopy	Destination table is created to match the records in the source. If Destination already exists, it is replaced by the copy of the source.


TBatchMove.KeyViolCount
 VCL Reference

TBatchMove.KeyViolCount

TBatchMove	See also 	Example

Reports the number of records which could not be replaced, added, or deleted from Destination because of integrity or key violations.

property KeyViolCount: Longint;

Description

Use KeyViolCount to learn the number of records form the Source table that could not be applied to the Destination table because of integrity or key violations. To obtain a table of the offending records from the Source table, specify a KeyViolTableName.

Key violations occur when appending records to a table that has a primary key. On a table with a primary key, no two records may have the same values on all of the key fields. If a record that is being appended has the same values on all the key fields as a record in the destination table, it cannot be appended.

Integrity violations occur when deleting, appending or updating records to a table that has a referential integrity specification. A referential integrity specification requires that certain fields in one table must have values that exist in a particular field of another table. If a record that is being added does not match the restrictions imposed by referential integrity, it cannot be added. If deleting record would cause tighter referential integrity restrictions that another table cannot meet, it cannot be deleted.

Note:	If AbortOnKeyViol is True, KeyViolCount will never be greater than one, because the first violation will cause the batch operation to terminate.


TBatchMove.KeyViolTableName
 VCL Reference

TBatchMove.KeyViolTableName

TBatchMove	See also

Specifies the name of a Paradox table that will be created to contain all records from the Source that cannot participate in the batch operation because of integrity or key violations.

property KeyViolTableName: TFileName;

Description

Use KeyViolTableName to obtain a table of records that could not be applied to the Destination table because of integrity or key violations. KeyViolCount has the number of records in the table that is created.

Key violations occur when appending records to a table that has a primary key. On a table with a primary key, no two records may have the same values on all of the key fields. If a record that is being appended has the same values on all the key fields as a record in the destination table, it cannot be appended.

Integrity violations occur when deleting, appending or updating records to a table that has a referential integrity specification. A referential integrity specification requires that certain fields in one table must have values that exist in a particular field of another table. If a record that is being added does not match the restrictions imposed by referential integrity, it cannot be added. If deleting record would cause tighter referential integrity restrictions that another table cannot meet, it cannot be deleted.

Note:	If AbortOnKeyViol is True, then there will be at most one record in this table because the operation aborts with that first record.


TBatchMove.Mappings
 VCL Reference

TBatchMove.Mappings

TBatchMove	See also 	Example

Specifies the column mappings for a batch operation.

property Mappings: TStrings;

Description

Set Mappings to specify the correspondence between fields in the Source and fields in the Destination. By default TBatchMove matches fields based on their position in the source and destination tables. That is, the first column in the source is matched with the first column in the destination, and so on. Mappings enables an application to override this default.

Mappings is a list of column mappings (one per line) in one of two forms. To map the column ColName in the source table to the column of the same name in the destination table, use:

ColName

To map the column named SourceColName in the source table to the column named DestColName in the destination table, use:

DestColName=SourceColName

When adding or appending records, fields in Destination which have no entry in Mappings will be set to NULL. When copying a dataset, fields in Destination which have no entry in Mappings will not appear as columns in the copy of the table.

If source and destination column data types are not the same, TBatchMove can either cancel the batch operation or perform a “best fit”. If AbortOnProblem is True, type mismatches will terminate the batch move. Otherwise, the field values from the Source will be converted, if possible, to be compatible with the Destination.


TBatchMove.Mode
 VCL Reference

TBatchMove.Mode

TBatchMove	See also 	Example

Specifies what the TBatchMove object does when the Execute method is called.

property Mode: TBatchMode;

Description

Use Mode to indicate whether the TBatchMove object should add records, replace records, delete records, or copy the Source. These are the possible values for Mode:

Value	Meaning

batAppend	Append the records in the source to the destination table. The destination table must already exist, and the two tables must not have records with duplicate keys. This is the default mode.

batUpdate	Replace records in the destination table with matching records from the source table. The destination table must exist and must have an index defined to match records.

batAppendUpdate	If a matching record exists in the destination table, replace it. Otherwise, append records to the destination table. The destination table must exist and must have an index defined to match records.

batCopy	Create the destination table based on the structure of the source table. If the destination already exists, the operation will delete it, and replace it with the new copy of the source.

batDelete	Delete records in the destination table that match records in the source table. The destination table must already exist and must have an index defined.


TBatchMove.MovedCount
 VCL Reference

TBatchMove.MovedCount

TBatchMove	See also 	Example

Reports the number of records form the Source which were applied to the destination.

property MovedCount: Longint;

Description

Read MovedCount to learn the number of records from the Source that were read during the Execute method. The MovedCount value includes any records which caused key or integrity violations, or which were trimmed.


TBatchMove.ProblemCount
 VCL Reference

TBatchMove.ProblemCount

TBatchMove	See also

Indicates the number of records which could not be added to Destination without loss of data due to a field type mismatch.

property ProblemCount: Longint;

Description

Read ProblemCount to learn the number of records from the Source that had field values which could not be mapped to destination fields without being “trimmed”. If a ProblemTableName is specified, ProblemCount is the number of records in that table.

Trimming a field means converting its value to a value compatible with the destination field type. For example, if a field in the destination table holds a string of size 10 characters, and the corresponding field in the source table holds a string of size 15 characters, any values from the source table longer than 10 characters must be truncated. Values that cannot be converted will cause TBatchMove to raise an exception.

Trimming does not occur when the Mode property is set to batCopy. Trimming fields on a delete operation means that records in the destination table may be deleted that do not exactly match the values from the source table.

Note:	If AbortOnProblem is True, then ProblemCount will be at most one, because the operation aborts when the problem occurs.


TBatchMove.ProblemTableName
 VCL Reference

TBatchMove.ProblemTableName

TBatchMove	See also

Specifies the name of a Paradox table that will be created to contain all records from the Source that contain fields which were trimmed to match the corresponding field type in the Destination table.

property ProblemTableName: TFileName;

Description

Set ProblemTableName to create a table that holds records from the Source that contain fields that had to be trimmed to be applied to the Destination. ProblemCount will have the number of records placed in the new table. If ProblemTableName is not specified, the data in the record is still trimmed when applied to the destination table, but there will be no easy way to tell which fields were trimmed.

Trimming a field means converting its value to a value compatible with the destination field type. For example, if a field in the destination table holds a string of size 10 characters, and the corresponding field in the source table holds a string of size 15 characters, any values from the source table longer than 10 characters must be truncated. Values that cannot be converted will cause TBatchMove to raise an exception.

Trimming does not occur when the Mode property is set to batCopy. Trimming fields on a delete operation means that records in the destination table may be deleted that do not exactly match the values from the source table.

Note:	If AbortOnProblem is True, then there will be at most one record in this table because the operation aborts with the first record that has a problem.


TBatchMove.RecordCount
 VCL Reference

TBatchMove.RecordCount

TBatchMove	See also

Specifies the maximum number of records that are applied to the Destination when Execute is called.

property RecordCount: Longint;

Description

Use RecordCount to limit the number of Source records that are applied to the Destination. If zero, all records are added, subtracted, or copied, beginning with the first record in Source. If RecordCount is greater than zero, up to RecordCount records are applied to the Destination, starting with the current record in the dataset. If RecordCount exceeds the number of records remaining in Source, no wraparound occurs; the operation is terminated.


TBatchMove.Source
 VCL Reference

TBatchMove.Source

TBatchMove	See also	Example

Specifies the dataset that is the source of the batch operation.

property Source: TBDEDataSet;

Description

Use Source to indicate the dataset that contains the records that will be added to, subtracted from, or copied to the Destination. If Source is a TQuery component, the query is executed before the move is executed. If a filter is currently in effect on Source, the filter conditions are respected when the batch move executes. The Mode property indicates how the Source records are applied to the Destination:

Mode	Effect on Destination

batAppend	Records are added to the destination table.

batUpdate	Records in the destination table with key fields matching the corresponding fields in the source are changed to match the source records.

batAppendUpdate	Records in the destination table with key fields matching the corresponding fields in the source are changed to match the source. Source records that do not match key fields are added to the destination table.

batDelete	Records in the destination table that match the records in the source are deleted.

batCopy	Destination table is created to match the records in the source.


TBatchMove.Transliterate
 VCL Reference

TBatchMove.Transliterate

TBatchMove	See also

Specifies whether the data in the Source records should be converted form the locale of the Source to the locale of the Destination when the Execute method is called.

property Transliterate: Boolean;

Description

Set Transliterate to True when the Source dataset and the Destination table use different language drivers and the data may contain extended ascii characters. Set Transliterate to False to avoid the overhead of the character set conversion when both the Source and the Destination use the same language driver or the data does not contain extended ascii characters.


 VCL Reference

TBatchMove methods

TBatchMove	Alphabetically	Legend

In TBatchMove

Create

Destroy

Execute

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBatchMove methods

TBatchMove	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TBatchMove.Create
 VCL Reference

TBatchMove.Create

TBatchMove	See also

Creates an instance of TBatchMove.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TBatchMove for performing a batch operation. Create allocates the memory for the TBatchMove object and

Sets AbortOnKeyViol to True.

Sets AbortOnProblem to True.

Sets Transliterate to True.

Creates a TStringList object to hold the Mappings.

The property settings made by Create are the values used when a TTable object performs batch operations using its BatchMove method.


TBatchMove.Destroy
 VCL Reference

TBatchMove.Destroy

TBatchMove	See also

Destroys an instance of TBatchMove.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TBatchMove object is not nil before calling Destroy.Before calling the inherited destructor, Destroy frees the TStringList object that implements the Mappings property.


TBatchMove.Execute
 VCL Reference

TBatchMove.Execute

TBatchMove	See also	Example

Performs the batch operation specified by Mode.

procedure Execute;

Description

After setting properties to indicate what batch operation should be performed and how, call Execute to perform the operation. As a minimum, the Mode, Source, and Destination properties must be set.

After calling Execute, the values of the ChangedCount, KeyViolCount, MovedCount, ProblemCount, and RecordCount properties will become available. These properties will give an indication of what happened as a result of the call to Execute. Additional information about the batch operation will be available through the creation of a changed table, a keyviol table, and/or a problems table if it was requested.


Hierarchy

TObject

TPersistent

TComponent

TBatchMove


TBCDField
 VCL Reference

TBCDField

Hierarchy	Properties	Methods	Events 	Using TBCDField	See also

TBCDField represents a binary-coded decimal (BCD) field in a dataset.

Unit

DB

Description

TBCDField encapsulates the fundamental behavior common to binary-coded decimal (BCD) fields. BCD values provide greater precision and accuracy than floating-point numbers. BCD fields are often used for storing and manipulating monetary values.

Delphi uses two different field types for representing BCD fields: TBCDField and TFMTBCDField. TBCDField uses the Currency type to manipulate BCD values. This is faster than storing and manipulating the value using a true BCD type, but limits the precision of the BCD values it can support to 4 decimal places and 20 significant digits.

TBCDField converts the data from a BCD value to a Currency value when it fetches the data from the database table, and converts it from a Currency value to a binary-coded decimal value when it posts the data. If the underlying database table contains a value that requires greater precision, TBCDField raises an exception. If your application requires BCD values with more than 4 decimal places or 20 significant digits, you should use TFMTBCDField instead. TFMTBCDField is a true BCD, with the precision of the binary-coded decimal type (TBCD) but with somewhat slower performance.

If you use the Fields editor at design time to create a persistent field component for the BCD field, you can access it by name at runtime. When using dynamic field components, you can access the TBCDField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TBCDField properties

TBCDField	Alphabetically	Legend

In TBCDField

AsBCD

AsCurrency

AsFloat

AsInteger

AsString

AsVariant

Currency

DataSize

MaxValue

MinValue

Precision

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBoolean

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBCDField properties

TBCDField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

Currency

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

Precision

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TBCDField.AsBCD
 VCL Reference

TBCDField.AsBCD

TBCDField	See also

Represents the value of the field as a TBcd value.

property AsBCD: TBcd;

Description

Use AsBCD to

Assign the binary-coded decimal (BCD) field value to a TBcd value.

Assign a TBcd value to the BCD field.

For example, this code assigns a TBcd value to a BCD field value:

MyBCDField.AsBCD := BCDValue;

To assign a binary-coded decimal field value to a TBcd value, use code similar to this:

BCDVariable := MyBCDField.AsBCD;

For BCD fields, the AsBCD property does not represent the internal format of the field value. Instead, TBCDField uses the Currency type internally, which results in better performance. However, this means that the AsBCD property results in a BCD that can’t exceed 4 decimal places or 20 significant digits.

If you use AsBCD to assign a value that is not within the range established by the MinValue and the MaxValue properties, AsBCD raises an EDatabaseError exception.


TBCDField.AsCurrency
 VCL Reference

TBCDField.AsCurrency

TBCDField	See also

Represents the value of the field as a Currency value.

property AsCurrency: Currency;

Description

Use AsCurrency to

Assign the binary-coded decimal (BCD) field value to a Currency value.

Assign a Currency value to the BCD field.

For example, this code assigns a Currency value to a BCD field value:

MyBCDField.AsCurrency := CurrencyValue;

To assign a binary-coded decimal field value to a currency value, use code similar to this:

CurrencyVariable := MyBCDField.AsCurrency;

For BCD fields, the AsCurrency property is equivalent to the Value property. Use AsCurrency when you do not know whether the field component is a BCD field.

If you use AsCurrency to assign a value that is not within the range established by the MinValue and the MaxValue properties, AsCurrency raises an EDatabaseError exception.

Note:	Do not confuse the AsCurrency property, which converts the type of the data, with the Currency property, which indicates how the data should be formatted.


TBCDField.AsFloat
 VCL Reference

TBCDField.AsFloat

TBCDField	See also

Represents the value of the field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign the binary-coded decimal (BCD) field value to a floating-point value.

Assign a floating-point value to the BCD field.

For example, this code assigns a floating-point value to a BCD field value:

MyBCDField.AsFloat := FloatVariable;

To assign a BCD field value to a floating-point value, use code similar to this:

FloatVariable := MyBCDField.AsFloat;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsFloat raises an EDatabaseError exception.


TBCDField.AsInteger
 VCL Reference

TBCDField.AsInteger

TBCDField	See also 	Example

Represents the value of the field as an integer.

property AsInteger: Longint;

Description

Use AsInteger to

Assign the binary-coded decimal field (BCD) value to an integer variable.

Assign an integer value to the BCD field.

For example, this code assigns integer value to a BCD field value:

MyBCDField.AsInteger := IntegerVariable;

To assign a BCD field value to an integer value, use code similar to this:

IntegerVariable := MyBCDField.AsInteger;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsInteger raises an EDatabaseError exception


TBCDField.AsString
 VCL Reference

TBCDField.AsString

TBCDField	See also

Represents the value of the field as a string.

property AsString: String;

Description

Use AsString to

Assign the binary-coded decimal (BCD) field value to string variable.

Assign a string value to the BCD field.

For example, this code assigns a string value to a BCD field value:

MyBCDField.AsString := '12.32';

To assign a BCD field value to a string value, use code similar to this:

Edit1.Text := MyBCDField.AsString;

If the string assigned to the field does not represent a valid BCD value within the range specified by the MinValue and MaxValue properties, AsString raises an EDatabaseError exception.


TBCDField.AsVariant
 VCL Reference

TBCDField.AsVariant

TBCDField	See also

Represents the value of a binary-coded decimal field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the binary-coded decimal (BCD) field value to Variant value.

Assign a Variant value to the BCD field.

For example, this code assigns a Variant value to a BCD field value:

MyBCDField.AsVariant := VariantVariable;

To assign a BCD field value to a variant value, use code similar to this:

VariantVariable := MyBCDField.AsVariant;

Using variants is useful when both the actual field type and the type of the data are unknown.

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsVariant raises an EDatabaseError exception.


TBCDField.Currency
 VCL Reference

TBCDField.Currency

TBCDField	See also

Determines whether the value in the field should be formatted as a currency value.

property Currency: Boolean;

Description

Use the Currency property to influence how the value in the field should be formatted for viewing and editing in a data-aware control.

For display purposes, the field is formatted using the DisplayFormat property if it is assigned. If DisplayFormat is not assigned, Currency determines how the field is formatted for display. If Currency is True, the value is formatted for display using the FloatToText function with the ffCurrency formatting code. If Currency is False, the value is formatted with the ffGeneral format.

For editing purposes, the field is formatted using the EditFormat (or DisplayFormat) property if it is assigned. If neither EditFormat nor DisplayFormat is assigned, Currency determines how to format the field for editing. If Currency is True, the value is formatted for editing using the FloatToText function with the ffFixed formatting code. If Currency is False, the value is formatted with the ffGeneral format.


TBCDField.DataSize
 VCL Reference

TBCDField.DataSize

TBCDField	See also	Example

Indicates the amount of memory needed to store the value of a BCD field in its native binary-coded decimal format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a binary-coded decimal (BCD) field’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods. GetData and SetData work with the field’s value in native BCD format rather than the Currency type used by the BCD field object.

For BCD fields, DataSize is always 34. BCD fields are a native type to Paradox tables that take up 34 bytes in a database record.


TBCDField.MaxValue
 VCL Reference

TBCDField.MaxValue

TBCDField	See also

Limits the maximum value in the binary-coded decimal field.

property MaxValue: Currency;

Description

Use MaxValue to get or set the maximum value that can be entered into the field. If a value greater than MaxValue is entered, TBCDField raises an EDatabaseError exception

Newly created binary-coded decimal (BCD) fields set MaxValue to the maximum value that can be expressed by the Currency data type.


TBCDField.MinValue
 VCL Reference

TBCDField.MinValue

TBCDField	See also

Limits the minimum value in the binary-coded decimal field.

property MinValue: Currency;

Description

Use MinValue to get or set the minimum value that can be entered into the field. If a value smaller than MinValue is entered, TBCDField raises an EDatabaseError exception.

Newly created integer fields set MinValue to the minimum value that can be expressed by the Currency data type.


TBCDField.Precision
 VCL Reference

TBCDField.Precision

TBCDField	See also

Specifies the number of digits of accuracy used to store the field value.

property Precision: Integer;

Description

Precision can be a value between 0 and 32. However, because TBCDField uses the Currency type to work with data from BCD fields, TBCDField limits the precision of the BCD values it can support to 4 decimal places and 20 significant digits. The underlying database table may include values that require greater precision, and setting precision to a value greater than 20 allows you to create a table with higher precision.


TBCDField.Value
 VCL Reference

TBCDField.Value

TBCDField	See also

Represents the value of the BCD field as a Currency value.

property Value: Currency;

Description

Unlike other field types, the Value of a binary-coded decimal (BCD) field does not correspond to the physical format of the data that is stored in the underlying database table. Delphi does not have a native type for BCD. Therefore, TBCDField converts the data from a BCD value to a Currency value when it fetches the data from the database table, and converts it from a Currency value to a BCD value when it posts the data. For BCD fields, Value is the same as the AsCurrency property.

Note:	Because TBCDField works with its data as a Currency value, simply getting the value of the field and posting that value back to the database table can alter the contents of the field. That is, the line below can alter the contents of the field in the database table.

MyBCDField.Value := MyBCDField.Value;


 VCL Reference

TBCDField events

TBCDField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBCDField events

TBCDField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBCDField methods

TBCDField	Alphabetically	Legend

In TBCDField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBCDField methods

TBCDField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TBCDField.Create
 VCL Reference

TBCDField.Create

TBCDField	See also

Create creates an instance of TBCDField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TBCDField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

After calling the inherited constructor, Create sets the DataType property to ftBCD and initializes Size to 4. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TBCDField. After instantiating a TBCDField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TBCDField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TBCDField with a dataset component by setting its DataSet property to the name of the dataset component. Specify the precision of the TBCDField by setting the Precision property.

The example below creates a TBCDField object for a field named Amount accessed through a TSQLQuery named SQLQuery1.

var

  T: TBCDField;

begin

  SQLQuery1.Close;

  T := TBCDField.Create(SQLQuery1);

  T.FieldName := 'Amount';

  T.Name := SQLQuery1.Name + T.FieldName;

  T.Index := SQLQuery1.FieldCount;

  T.DataSet := SQLQuery1;

  T.Precision := 2;

  SQLQuery1.FieldDefs.UpDate;

  SQLQuery1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TBCDField


TBDECallback
 VCL Reference

TBDECallback

Hierarchy	Methods	See also

TBDECallback is a wrapper for a Borland Database Engine (BDE) callback function.

Unit

DBTables

Description

Use a TBDECallback object to register a callback function with the BDE. Callbacks allow an application to instruct the BDE to take specific actions in response to events that occur during a BDE function call.

For example, the TBatchMove object may encounter problems when executing the corresponding BDE batch operation. A callback function can respond to those problems by instructing the BDE to generate a problems table or to trim the data so that the operation succeeds.

To use a TBDECallback object, take the following steps:

1	Create an instance of TBDECallback to register the callback with the BDE.

2	Call the BDE function in which the pertinent events take place. For example, create an instance of TBatchMove, and call its Execute method.

3	When the BDE function returns, destroy the TBDECallback object to unregister the callback function.


 VCL Reference

TBDECallback methods

TBDECallback	Alphabetically	Legend

In TBDECallback

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBDECallback methods

TBDECallback	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TBDECallback.Create
 VCL Reference

TBDECallback.Create

TBDECallback	See also

Creates an instance of TBDECallback and registers the specified callback with the Borland Database Engine (BDE).

type TBDECallbackEvent = function(CBInfo: Pointer): CBRType ofobject;

constructor Create(AOwner: TObject; Handle: hDBICur; CBType: CBType; CBBuf: Pointer; CBBufSize: Integer; CallbackEvent: TBDECallbackEvent; Chain: Boolean);

Description

Call Create to register a callback with the BDE. Create a TBDECallback object before calling any BDE function that should use the callback to respond to events.

When the BDE encounters the type of event indicated by the CBType parameter, the function specified by the CallbackEvent parameter is called. The CallbackEvent function receives a pointer to a callback descriptor. The type of the callback descriptor varies depending on the CBType. The Delphi application must allocate the memory for the callback descriptor. A pointer to this memory is passed in as the CBBuf parameter, and its size is given by the CBBufSize parameter.

The Chain parameter indicates whether this callback function should replace any other callbacks of this CBType. When Chain is False, the CallbackEvent function replaces any callbacks registered for the CBType. When Chain is True, the CallbackEvent function is called in addition to other registered callbacks.

The Handle parameter is an optional parameter indicating the database cursor associated with the BDE function that may generate the callback. Provide a Handle to make the callback specific to function calls for that cursor.

The types of callback descriptors associated with each CBType are given in the following table. For more information, see the BDE documentation.

CBType	Usage	callback descriptor
cbGENPROGRESS	Respond to information about progress during large batch operations. For example, implement a progress bar or cancel button.  Return cbrABORT to cancel, cbrCONTINUE to continue.	CBPROGRESSDesc
cbRESTRUCTURE	Instruct BDE on how to proceed with situations encountered during a table restructure.  Return cbrYES, to proceed with the default handling, cbrNO to proceed without the default behavior, cbrABORT to cancel the restructure.	RESTCbDesc
cbBATCHRESULT	Instruct BDE on how to proceed with situations encountered during a batch operation.  Return cbrYES, to proceed with the default handling, cbrNO to proceed without the default behavior, cbrABORT to cancel the batch operation.	RESTCbDesc
cbTABLECHANGED	Respond to notifications that a table has changed. The return value is ignored.	not used
cbCANCELQRY	Return cbrABORT to cancel a long running query, or cbrCONTINUE to keep going. The callback is called periodically during the execution of the query.	not used
cbINPUTREQ	Instruct BDE on how to respond when a file (such as a lookup table) is missing.  Indicate the chosen behavior in the CBInputDesc and return cbrCONTINUE.	CBInputDesc
cbDBASELOGIN	Enter a password for an encrypted dBASE table and return cbrCONTINUE.	CBLoginDesc
cbFIELDRECALC	Respond to notifications that fields need to be recalculated. The return value is ignored.	not used
cbTRACE	Respond to trace information about the actions taken by the BDE. The return value is ignored.	TRACEDesc
cbDBLOGIN	Log in to a database server. Return cbrCONTINUE.	not used.
cbDELAYEDUPD	Respond to the notification when cached updates fail to write a modified record to the database.  Return cbrABORT to cancel all cached updates, cbrSKIP or cbrCONTINUE to discard the failed update and continue posting records, cbrRETRY to try the failed commit again.	DELAYUPDCbDesc
Note:	The VCL uses many BDE callback functions. Calling Create with Chain set to False may disable the expected behavior of some objects.


TBDECallback.Destroy
 VCL Reference

TBDECallback.Destroy

TBDECallback	See also

Unregisters the callback and destroys an instance of TBDECallback.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TBDECallback object is not nil and only then calls Destroy.

Destroy unregisters the callback before freeing the memory associated with the TBDECallback object. After unregistering the callback, any previous callback of the same type will be reinstated.


Hierarchy

TObject

TBDECallback


TBDEClientDataSet
 VCL Reference

 TBDEClientDataSet

Hierarchy	Properties	Methods	Events	Using TBDEClientDataSet	See also

TBDEClientDataSet caches updates for data fetched using the BDE.

Unit

DBLocalB

Description

TBDEClientDataSet is a client dataset that uses an internal TQuery and TDataSetProvider for fetching data and applying updates. It provides an alternate mechanism for caching updates to the one available using a BDE-enabled dataset’s CachedUpdates property.

TBDEClientDataSet (or TClientDataSet with an external provider and source dataset) is the recommended approach for caching updates when using the BDE to fetch data. In addition, TBDEClientDataSet offers the following advantages:

You can use TBDEClientDataSet to work with data stored in files on disk as well as with data fetched from a database server. This allows you to implement a “briefcase model” style application.

You can take advantage of features unique to client datasets such as maintained aggregates and expanded filter support.

Your application can be converted more easily to or from one that uses a different data access mechanism, by leveraging the similarities between TBDEClientDataSet and other client datasets such as TSQLClientDataSet and TIBClientDataSet.

TBDEClientDataSet works like TClientDataSet when it is connected to a local TQuery via a provider, except that the source dataset and provider are internal. It surfaces some of the properties and events of TQuery and TDataSetProvider so that you can specify the database server from which to fetch data, indicate what data to fetch from that server, influence what information is included in data packets, and provide input on the updating process.


 VCL Reference

TBDEClientDataSet properties

TBDEClientDataSet	Alphabetically	Legend

In TBDEClientDataSet

CommandText

DBConnection

Derived from TCustomCachedDataSet

Active

Options

UpdateMode

Derived from TCustomClientDataSet

ActiveAggs

Aggregates

AggregatesActive

AppServer

CanModify

ChangeCount

CloneSource

Data

DataSetField

DataSize

DataSource

Delta

DisableStringTrim

FetchOnDemand

FileName

Filter

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

PacketRecords

Params

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

StatusFilter

XMLData

Derived from TDataSet

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

Constraints

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBDEClientDataSet properties

TBDEClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Data

DataSetField

DataSize

DataSource

DBConnection

DefaultFields

Delta

Designer

DesignInfo

DisableStringTrim

Eof

FetchOnDemand

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FileName

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

Modified

Name

ObjectView

Options

Owner

PacketRecords

Params

ReadOnly

RecNo

RecordCount

RecordSize

SavePoint

SparseArrays

State

StatusFilter

Tag

UpdateMode

VCLComObject

XMLData


TBDEClientDataSet.CommandText
 VCL Reference

TBDEClientDataSet.CommandText

TBDEClientDataSet	See also

Specifies what data to fetch from the database server.

property CommandText: string;

Description

CommandText is used to get or set the SQL property of the internal TQuery. It is an SQL statement that executes when you open the client dataset.

If CommandText is an SQL statement that includes parameters, use the Params property to supply parameter values.

Note:	If the FileName property is set, CommandText is ignored and the data is fetched from the specified file.

Warning:	Do not remove poAllowCommandText from the Options property. If you do, the value of CommandText will be ignored.


TBDEClientDataSet.DBConnection
 VCL Reference

TBDEClientDataSet.DBConnection

TBDEClientDataSet

Identifies the TDatabase component that connects the dataset to a database server.

property DBConnection: TDatabase;

Description

Use DBConnection to specify the component that connects this dataset to a database server.


 VCL Reference

TBDEClientDataSet events

TBDEClientDataSet	Alphabetically	Legend

Derived from TCustomCachedDataSet

AfterUpdateRecord

BeforeUpdateRecord

OnGetTableName

OnUpdateData

OnUpdateError

Derived from TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TBDEClientDataSet events

TBDEClientDataSet	By object	Legend

AfterApplyUpdates

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterExecute

AfterGetParams

AfterGetRecords

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterRowRequest

AfterScroll

AfterUpdateRecord

BeforeApplyUpdates

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeRowRequest

BeforeScroll

BeforeUpdateRecord

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnGetTableName

OnNewRecord

OnPostError

OnReconcileError

OnUpdateData

OnUpdateError


 VCL Reference

TBDEClientDataSet methods

TBDEClientDataSet	Alphabetically	Legend

In TBDEClientDataSet

Create

CloneCursor

Destroy

GetQuoteChar

Derived from TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CompareBookmarks

ConstraintsDisabled

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBDEClientDataSet methods

TBDEClientDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GetQuoteChar

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TBDEClientDataSet.Create
 VCL Reference

TBDEClientDataSet.Create

TBDEClientDataSet	See also

Creates and initializes an instance of TBDEClientDataSet.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create TBDEClientDataSet at runtime. Datasets added to forms or data modules at design time are created automatically.

AOwner is the component that is responsible for freeing the TBDEClientDataSet instance. If AOwner is nil, the application must explicitly free the dataset.

Create creates the internal source dataset and provider that fetch data from the database server and apply updates back to the database server.


TBDEClientDataSet.Destroy
 VCL Reference

TBDEClientDataSet.Destroy

TBDEClientDataSet	See also

Destroys the instance of TBDEClientDataSet.

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically. If an application creates its own instances of a dataset without assigning an Owner, however, it should call Free, which verifies that the dataset component is not nil before calling Destroy.


TBDEClientDataSet.CloneCursor
 VCL Reference

TBDEClientDataSet.CloneCursor

TBDEClientDataSet	See also

Shares the data belonging to another client dataset.

procedure CloneCursor(Source :TCustomClientDataSet; Reset: Boolean; KeepSettings: Boolean = False); virtual;

Description

Call CloneCursor to share the data belonging to another client dataset.

Source indicates another BDE client dataset whose data is to be shared. If Source is not a TBDEClientDataSet instance, CloneCursor raises an exception.

Reset and KeepSettings determine how to set the values of the following properties and events:

Filter, Filtered, FilterOptions, and OnFilterRecord

IndexName

MasterSource and MasterFields

ReadOnly

If Reset and KeepSettings are both False, the values of the properties listed above are all set to match the source dataset.

If Reset is True, the properties listed above are all cleared.

If Reset is False and KeepSettings is True, the properties listed above are not changed. In this case, the application must ensure that existing indexes, providers, and so on are compatible with the cloned data.

After calling CloneCursor, the data for the client dataset is the same as the data for Source. Edits performed by either client dataset are reflected in the data of both datasets.

Note:	Because cloned cursors are shared, changing properties that affect the cursor affect both datasets. For example, setting the ReadOnly property of either dataset will make both datasets read-only.


TBDEClientDataSet.GetQuoteChar
 VCL Reference

TBDEClientDataSet.GetQuoteChar

TCustomSQLDataSet	See also

Returns the character or characters to use in generated SQL statements to enclose quoted strings.

function GetQuoteChar: string;

Description

GetQuoteChar returns the character or characters that delimit quoted strings in SQL statements. This string appears both before and after quoted strings.

This string is used for the automatically-generated statements that apply updates. Use this string in the SQL statements you create for the CommandText property.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet

TCustomCachedDataSet

TBDEClientDataSet


TBDEDataSet
 VCL Reference

 TBDEDataSet

Hierarchy	Properties	Methods	Events 	Using TBDEDataSet	See also

Encapsulates Borland Database Engine (BDE) functionality for descendant dataset objects.

Unit

DBTables

Description

TBDEDataSet is a dataset object that defines BDE functionality for a dataset. Applications never use TBDEDataSet objects directly. Instead they use the descendants of TBDEDataSet and TDBDataSet, such as TQuery, TStoredProc, and TTable, which inherit its database-related properties and methods.

Developers who create custom dataset components that work through the BDE may want to derive them directly from TBDEDataSet to inherit all the functionality of TDataSet and the BDE-related properties and methods of TBDEDataSet. To inherit control over Delphi database objects, however, most developers should derive custom dataset components that use the BDE from the immediate descendant of TBDEDataSet, TDBDataSet.


 VCL Reference

TBDEDataSet properties

TBDEDataSet	Alphabetically	Legend

In TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

Handle

KeySize

Locale

RecNo

RecordCount

RecordSize

StmtHandle

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBDEDataSet properties

TBDEDataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Locale

Modified

Name

ObjectView

Owner

RecNo

RecordCount

RecordSize

SparseArrays

State

StmtHandle

Tag

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


TBDEDataSet.BlockReadSize
 VCL Reference

TBDEDataSet.BlockReadSize

TBDEDataSet	See also

Determines how many record buffers are read in each block.

property BlockReadSize: Integer;

Description

Set BlockReadSize when you need to scan through the entire dataset quickly. When BlockReadSize is greater than zero, and Next is called, data-aware controls are not updated, and data events are not triggered. Set BlockReadSize to zero to disable block read mode. The dataset State is dsBlockRead when BlockReadSize is greater than zero.


TBDEDataSet.CacheBlobs
 VCL Reference

TBDEDataSet.CacheBlobs

TBDEDataSet	See also

Determines whether BLOB fields are cached in memory.

property CacheBlobs: Boolean;

Description

Use CacheBlobs to specify whether to store BLOB images in memory to improve performance when scrolling through records that display BLOB images. CacheBlobs is True by default, meaning that BLOBs are cached in memory. If an application does not need to display the BLOBs associated with records, then set CacheBlobs to False to conserve system resources.


TBDEDataSet.CachedUpdates
 VCL Reference

TBDEDataSet.CachedUpdates

TBDEDataSet	See also

Specifies whether cached updates are enabled for a dataset.

property CachedUpdates: Boolean;

Description

CachedUpdates enables or disables the use of cached updates for a dataset. If CachedUpdates is True, cached updates are enabled. If CachedUpdates is False, cached updates are disabled.

When cached updates are enabled, updates to a dataset (such as posting changes, inserting new records, or deleting records), are stored in an internal cache on the client machine instead of being written directly to the dataset’s underlying database tables. When changes are complete, an application writes all cached changes to the database in the context of a single transaction.

Cached updates are most useful to client applications in two-tiered applications. The main benefits of enabling cached updates are:

Fewer transactions and shorter transaction times.

Minimization of network traffic.

The potential drawbacks of enabling cached updates are:

Other applications can access and change the actual data on the server while users are editing local copies of the data, resulting in an update conflict when cached updates are applied to the database.

Other applications cannot access data changes made by an application until its cached updates are applied to the database.

Note:	Instead of using cached updates, applications can obtain the same benefits with greater control by using a client dataset and a provider component.

Note:	When cached updates are enabled, data changes are stored in local memory. The storage medium is a Paradox format in-memory table. This has implications for applications run in a network environment in that the NET DIR parameter for the Borland Database Engine (BDE) driver for Paradox needs to be set -- even though the application may be designed to use other database types. Failure to properly set this parameter can result in an EDBEngineError exception. There are two ways to set NET DIR. One is through the BDE configuration utility BDE Administrator (described in the BDE Administrator online help). The other way is through the TSession.NetFileDir property.


TBDEDataSet.CanModify
 VCL Reference

TBDEDataSet.CanModify

TBDEDataSet	See also

Indicates whether the database underlying a dataset permits write access to data.

property CanModify: Boolean;

Description

Examine CanModify to determine if the database underlying a dataset permits write access to data. When a database connection is established, a dataset typically requests write access. CanModify indicates whether write access is granted. If CanModify is True, data can be modified and written to the database server. If CanModify is False, data can be viewed, but not modified.

Note:	Restrictions on write access for a given user may still prevent writing to an SQL database server even if CanModify is True.


TBDEDataSet.ExpIndex
 VCL Reference

TBDEDataSet.ExpIndex

TBDEDataSet

Indicates whether a dataset is using a dBASE expression index.

property ExpIndex: Boolean;

Description

Read ExpIndex to determine if a dataset is using a dBASE expression index. If ExpIndex is True, an expression index is in use; otherwise ExpIndex is False.


TBDEDataSet.Filter
 VCL Reference

TBDEDataSet.Filter

TBDEDataSet	See also

Specifies the text of the current filter for a dataset.

property Filter: String;

Description

Use Filter to specify a dataset filter. When filtering is applied to a dataset, only those records that meet a filter’s conditions are available to an application. Filter describes the filter condition. For example, the following filter displays only those records where the State field is 'CA' or 'MA':

State = 'CA' or State = 'MA'

Tip:	When building a filter string programmatically, use the QuotedStr function to ease expressing the embedded spaces of the filter value:

Table1.Filter := 'State = ' + QuotedStr('M*');

To filter strings bases on partial comparisons, use an asterisk as a wildcard. For example:

State = 'M*'

When dealing with fields that have nonstandard or non-compliant names (such as those with spaces embedded in the names), enclosed the field name in square brackets.

[Species Name] = 'Gymnothorax mordax'

For a complete list of operators you can use in filter strings, see SettingTheFilterProperty.

Note:	You can set Filter at runtime to change a dataset’s filtering condition (for example, in response to user input).


TBDEDataSet.Filtered
 VCL Reference

TBDEDataSet.Filtered

TBDEDataSet	See also

Specifies whether filtering is active for a dataset.

property Filtered: Boolean;

Description

Check Filtered to determine whether dataset filtering is in effect. If Filtered is True, then filtering is active. Otherwise Filtered is False. To apply filter conditions specified in the Filter property or the OnFilterRecord event handler, set Filtered to True.

Note:	When filtering is enabled, user edits to a record may mean that the record no longer meets a filter’s test condition. The next time the record is retrieved from the dataset while the filter is in effect, the record may seem to disappear. If that happens, the next record that passes the filter condition becomes the current record.


TBDEDataSet.FilterOptions
 VCL Reference

TBDEDataSet.FilterOptions

TBDEDataSet	See also

Specifies whether filtering is case insensitive, and whether partial comparisons are permitted when filtering records.

property FilterOptions: TFilterOptions;

Description

Set FilterOptions to specify whether filtering is case insensitive when filtering on string or character fields, and whether partial comparisons for matching filter conditions is allowed.

By default, FilterOptions is set to an empty set. For filters based on string fields, include foCaseInsensitive in FilterOptions to catch all variations on a string regardless of capitalization.

To prevent partial string comparisons, include foNoPartialCompare in FilterOptions.

Note:	To filter strings bases on partial comparisons, exclude foNoPartialCompare from FilterOptions and use an asterisk as a wildcard. For example:

State = 'M*'


TBDEDataSet.Handle
 VCL Reference

TBDEDataSet.Handle

TBDEDataSet	See also

Specifies the Borland Database Engine (BDE) cursor handle for the dataset.

type HDBICur: Longint;

property Handle: HDBICur;

Description

Use Handle only to bypass TDataSet methods and call directly into the BDE. Many BDE function calls require a cursor handle parameter. Handle is assigned an initial value when a dataset is opened. If used with a BDE call that changes the current record position, call Resync immediately after returning from the BDE call.

Note:	Do not use this property unless an application requires BDE functionality not available through built-in components.


TBDEDataSet.KeySize
 VCL Reference

TBDEDataSet.KeySize

TBDEDataSet	See also

Specifies the size of the key for the current index of the dataset.

property KeySize: Word;

Description

Check KeySize to determine the size, in bytes, of the key for the current index. KeySize varies depending on the number and type of fields that make up the current index.


TBDEDataSet.Locale
 VCL Reference

TBDEDataSet.Locale

TBDEDataSet	See also

Identifies the Borland Database Engine (BDE) language driver for the dataset.

property Locale: TLocale;

Description

Examine Locale to determine the BDE language driver for the dataset. Applications that make direct calls to the BDE API may need to pass Locale information as a function parameter.

Language driver information may also be available as one of the values in the Params property of the database component that owns the dataset.

Note:	Do not use this property unless an application requires BDE functionality not available through built-in components.


TBDEDataSet.RecNo
 VCL Reference

TBDEDataSet.RecNo

TBDEDataSet	See also

Indicates the current record in the dataset.

property RecNo: Longint;

Description

Examine RecNo to determine the record number of the current record in the dataset. Applications might use this property with RecordCount to iterate through all the records in a dataset, though typically record iteration is handled with calls to First, Last, MoveBy, Next, and Prior.

Note:	If accessing Paradox tables, RecNo can be set to a specific record number to position the cursor on that record.


TBDEDataSet.RecordCount
 VCL Reference

TBDEDataSet.RecordCount

TBDEDataSet	See also	Example

Indicates the total number of records associated with the dataset.

property RecordCount: Longint;

Description

Examine RecordCount to determine the total number of records in the dataset. Applications might use this property with RecNo to iterate through all the records in a dataset, though typically record iteration is handled with calls to First, Last, MoveBy, and Prior.

Note:	Use RecordCount with care, because record counting can be a costly operation, especially for SQL queries that return large result sets. Generally, an application should only use RecordCount with Paradox and dBASE tables.


TBDEDataSet.RecordSize
 VCL Reference

TBDEDataSet.RecordSize

TBDEDataSet	See also

Indicates the size of a record in the dataset.

property RecordSize: Word;

Description

Examine RecordSize to determine the physical size, in bytes, of the buffer Delphi allocates to hold a record in the dataset. When a dataset is opened, the Open procedure requests record-buffer size information from the Borland Database Engine (BDE) and stores the returned information in RecordSize. Delphi uses this information internally. Applications seldom, if ever, require this information.


TBDEDataSet.StmtHandle
 VCL Reference

TBDEDataSet.StmtHandle

TBDEDataSet	See also

Specifies the Borland Database Engine (BDE) statement handle for the dataset.

type HDBIStmt: Longint;

property StmtHandle: HDBIStmt;

Description

Use StmtHandle for direct calls to the BDE that bypass the methods of this dataset. Some BDE API calls require a statement handle as a parameter. For example, TBDEDataSet descendants use StmtHandle when preparing a query or binding parameters.

Typically, applications do not need to access this property. In TBDEDataSet, StmtHandle is protected, and so unavailable to applications. Some descendants make this property public so that you can bypass the dataset methods and make direct calls to the BDE.


TBDEDataSet.UpdateObject
 VCL Reference

TBDEDataSet.UpdateObject

TBDEDataSet	See also

Specifies the update object component used to update a read-only result set when cached updates are enabled.

property UpdateObject: TDataSetUpdateObject;

Description

Use UpdateObject to specify the TUpdateObject component to use in an application that must be able to update a read-only result set returned by the Borland Database Engine (BDE).

The BDE always attempts to provide an updateable, or “live” query result unless an application specifically requests a read-only view of data. In some cases, such as a query made against multiple tables, a live result set cannot be returned. In these cases, UpdateObject can be used to specify a TUpdateSQL component that performs updates as a separate transaction that is transparent to the application.


TBDEDataSet.UpdateRecordTypes
 VCL Reference

TBDEDataSet.UpdateRecordTypes

TBDEDataSet	See also	Example

Specifies the type of records visible in a dataset when cached updates are enabled.

type TUpdateRecordTypes= set of (rtModified, rtInserted, rtDeleted, rtUnmodified);

property UpdateRecordTypes: TUpdateRecordTypes;

Description

Use UpdateRecordTypes to specify the records that are visible in a dataset when cached updates are enabled. UpdateRecordTypes is a set that can have the following values:

Value	Meaning

rtModified	Modified records are visible.

rtInserted	Inserted records are visible.

rtDeleted	Deleted records are visible.

rtUnmodified	Unmodified records are visible.

By default, a dataset is created with an UpdateRecordTypes set of [rtModified, rtInserted, rtUnmodified], meaning that all existing, edited, or inserted records are visible to the user.

An application that must cycle through a dataset to undelete records may change UpdateRecordTypes as part of an undelete method, so that deleted records are “visible” long enough to restore them to their previously undeleted conditions.

An application might also use UpdateRecordTypes like a filter to temporarily limit visible records to those added or inserted by the user during the current session.


TBDEDataSet.UpdatesPending
 VCL Reference

TBDEDataSet.UpdatesPending

TBDEDataSet	See also	Example

Indicates whether the cached updates buffer contains records that are not yet applied.

property UpdatesPending: Boolean;

Description

Examine UpdatesPending to check the status of the cached updates buffer. If UpdatesPending is True, then there are edited, deleted, or inserted records to apply to the database. If UpdatesPending is False, there are no records in the cache.


 VCL Reference

TBDEDataSet events

TBDEDataSet	Alphabetically	Legend

In TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TBDEDataSet events

TBDEDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


TBDEDataSet.OnUpdateError
 VCL Reference

TBDEDataSet.OnUpdateError

TBDEDataSet	See also

Occurs if an exception is generated when cached updates are applied to a database.

TUpdateErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError; UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction) of object;

property OnUpdateError: TUpdateErrorEvent;

Description

Write an OnUpdateError event handler to respond to exceptions generated while applying cached updates to a database.

Because there is a delay between the time a record is first cached and the time cached updates are applied, there is a possibility that another application may change one or more of the same records in the database before the cached changes can be applied. The Borland Database Engine (BDE) checks for this condition and raises an exception. TBDEDataSet responds by calling the OnUpdateError event handler if it exists.

DataSet is the name of the dataset to which updates are applied.

E is a pointer to a EDBEngineError object from which an application can extract an error message and the actual cause of the error condition. The OnUpdateError handler can use this information to determine how to respond to the error condition.

UpdateKind indicates whether the error occurred while inserting, deleting, or modifying a record.

UpdateAction indicates the action to take when the OnUpdateError handler exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateError can handle or correct the error, set UpdateAction to uaRetry before exiting the error handler.

The error handler can use the TField.OldValue and TField.NewValue properties to evaluate error conditions and set TField.NewValue to a new value to reapply. In this case, set UpdateAction to uaRetry before exiting.

Note:	If a call to ApplyUpdates raises an exception and ApplyUpdates is not called within the context of a try...except block, an error message is displayed. If an OnUpdateError handler cannot correct the error condition and leaves UpdateAction set to uaFail, the error message is displayed twice. To prevent redisplay, set UpdateAction to uaAbort in the error handler.

Important:	The code in an OnUpdateError handler must not call any methods that make a different record the current one.


TBDEDataSet.OnUpdateRecord
 VCL Reference

TBDEDataSet.OnUpdateRecord

TBDEDataSet	See also

Occurs when cached updates are applied to a record.

type TUpdateRecordEvent = procedure(DataSet: TDataSet; UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction) of object;

property OnUpdateRecord: TUpdateRecordEvent;

Description

Write an OnUpdateRecord event handler to process updates that cannot be handled by a single update component, such as implementation of cascading updates, insertions, or deletions. This handler is also useful for applications that require additional control over parameter substitution in update components.

DataSet is the name of the dataset to which updates are applied.

UpdateKind indicates whether the current update is the insertion of a record, the deletion of a record, or the modification of a record.

UpdateAction indicates the action taken by the OnUpdateRecord handler before it exits. On entry into the handler, UpdateAction is always set to uaFail. If OnUpdateRecord is successful, it should set UpdateAction to uaApplied before exiting.

The code in an OnUpdateRecord handler must not call any methods that make a different record the current one.

Note:	As an alternate approach, application can use a client dataset and a provider component to handle cached updates. This alternative provides more support and greater control.


 VCL Reference

TBDEDataSet methods

TBDEDataSet	Alphabetically	Legend

In TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

Create

CreateBlobStream

Destroy

DisableConstraints

EnableConstraints

FetchAll

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBDEDataSet methods

TBDEDataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TBDEDataSet.ApplyUpdates
 VCL Reference

TBDEDataSet.ApplyUpdates

TBDEDataSet	See also	Example

Writes a dataset’s pending cached updates to the database.

procedure ApplyUpdates;

Description

Call ApplyUpdates to write a dataset’s pending cached updates to a database. This method passes cached data to the database for storage, but the changes are not committed to the database. An application must explicitly call the database component’s Commit method to commit the changes to the database if the write is successful, or call the database’s Rollback method to undo the changes if there is an error.

Following a successful write to the database, and following a successful call to the database’s Commit method, an application should call the CommitUpdates method to clear the cached update buffer.

Note:	The preferred method for updating datasets is to call a database component’s ApplyUpdates method rather than to call each individual dataset’s ApplyUpdates method. The database component’s ApplyUpdates method takes care of committing and rolling back transactions and clearing the cache when the operation is successful.


TBDEDataSet.BookmarkValid
 VCL Reference

TBDEDataSet.BookmarkValid

TBDEDataSet	See also

Tests the validity of a specified bookmark.

function BookmarkValid(Bookmark: TBookmark): Boolean; override;

Description

Call BookmarkValid to determine if a specified bookmark is currently assigned a value. Bookmark specifies the bookmark to test.

BookmarkValid returns True if a bookmark is valid. Otherwise, it returns False.


TBDEDataSet.Cancel
 VCL Reference

TBDEDataSet.Cancel

TBDEDataSet	See also 	Example

Cancels modifications to the current record if those changes are not yet posted.

procedure Cancel;

Description

Call Cancel to undo modifications made to one or more fields belonging to the current record. As long as those changes are not already posted to the database, Cancel returns the record to its previous state, and sets the dataset state to dsBrowse.

Typically Cancel is used to back out of changes in response to user request, or in field validation routines that back out illegal field values. The TDBNavigator object contains a Cancel button that triggers a call to Cancel.


TBDEDataSet.CancelUpdates
 VCL Reference

TBDEDataSet.CancelUpdates

TBDEDataSet	See also

Clears all pending cached updates from the cache and restores the dataset its prior state.

procedure CancelUpdates;

Description

Call CancelUpdates to clear all pending cached updates from the cache and restore the dataset to the state it was in when the table was opened, cached updates were last enabled, or updates were last successfully applied to the database.

When a dataset is closed, or the CachedUpdates property is set to False, CancelUpdates is called automatically.

Note:	To undo changes to a single record, call RevertRecord.


TBDEDataSet.CommitUpdates
 VCL Reference

TBDEDataSet.CommitUpdates

TBDEDataSet	See also	Example

Clears the cached updates buffer.

procedure CommitUpdates;

Description

Call CommitUpdates to clear the cached updates buffer after both a successful call to ApplyUpdates and a database component’s Commit method. Clearing the cache after applying updates ensures that the cache is empty except for records that could not be processed and were skipped by the OnUpdateRecord or OnUpdateError event handlers. An application can attempt to modify the records still in the cache.

Record modifications made after a call to CommitUpdates repopulate the cached update buffer and require a subsequent call to ApplyUpdates to move them to the database.

Note:	Applications that use a database component’s ApplyUpdates method to apply and commit pending updates for all datasets associated with the database component do not need to call CommitUpdates.


TBDEDataSet.CompareBookmarks
 VCL Reference

TBDEDataSet.CompareBookmarks

TBDEDataSet	See also

Indicates the relationship between two bookmarks.

function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer;

Description

Call CompareBookmarks to determine if two bookmarks are identical. Bookmark1 and Bookmark2 are the bookmarks to compare. CompareBookmarks returns -1 if Bookmark1 is less than Bookmark2, 1 if Bookmark1 is greater than Bookmark2, and 0 if the bookmarks are identical or nil.


TBDEDataSet.ConstraintCallBack
 VCL Reference

TBDEDataSet.ConstraintCallBack

TBDEDataSet	See also

Specifies the callback function that allows the dataset to communicate with the BDE constraint layer.

function ConstraintCallBack(Req: DsInfoReq; var ADataSources: DataSources): DBIResult; stdcall;

Description

Use the address of ConstraintCallBack as a parameter when making direct API calls to Borland Database Engine (BDE) functions that require a callback to provide information about the constraints on the dataset or its fields.


TBDEDataSet.ConstraintsDisabled
 VCL Reference

TBDEDataSet.ConstraintsDisabled

TBDEDataSet	See also

Indicates whether constraints are enabled for a dataset.

function ConstraintsDisabled: Boolean;

Description

Call ConstraintsDisabled to determine if constraints are currently disabled for a dataset. If ConstraintsDisabled returns True, constraints are currently disabled. If False, constraints are currently enabled.


TBDEDataSet.Create
 VCL Reference

TBDEDataSet.Create

TBDEDataSet	See also

Creates an instance of a TBDEDataSet component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a dataset component at runtime. Ordinarily applications instantiate TBDEDataSet descendants, such as TTable, TQuery, or TStoredProc.

Create

•	Calls its inherited Create method.

•	Set the Locale property of the dataset to the locale of the default session.

•	Sets the CacheBlobs property to True.


TBDEDataSet.CreateBlobStream
 VCL Reference

TBDEDataSet.CreateBlobStream

TBDEDataSet	See also 	Example

Returns a TBlobStream object for reading or writing the data in a specified blob field.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Description

Call CreateBlobStream to obtain a stream for reading data from or writing data to a binary large object (BLOB) field. The Field parameter must specify a TBlobField component from the Fields property array. The Mode parameter specifies whether the stream will be used for reading, writing, or updating the contents of the field.

Blob streams are created in a specific mode for a specific field on a specific record. Applications should create a new blob stream every time the record in the dataset changes rather than reusing an existing blob stream.


TBDEDataSet.Destroy
 VCL Reference

TBDEDataSet.Destroy

TBDEDataSet	See also

Destroys the instance of a dataset component.

destructor Destroy;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically If an application creates its own instances of a dataset, however, the application should call Free, which checks that the dataset component is not nil before calling Destroy.

Destroy calls its inherited destructor if necessary, frees the resources allocated for the BDE asynchronous callback, and sets the UpdateObject property for the dataset to nil.


TBDEDataSet.DisableConstraints
 VCL Reference

TBDEDataSet.DisableConstraints

TBDEDataSet	See also

Disables application of server constraints on the dataset.

procedure DisableConstraints;

Description

Call DisableConstraints to prevent, on a temporary basis, application of server constraints replicated to the dataset. For example, when an application iterates through a dataset, it may improve performance to disable constraints temporarily.

Note:	Calling DisableConstraints increments a reference count. As long as this reference count is greater than zero, constraints are disabled for the dataset. To prevent accidental disabling of constraints, always group a call to DisableConstraints with a call to EnableConstraints.


TBDEDataSet.EnableConstraints
 VCL Reference

TBDEDataSet.EnableConstraints

TBDEDataSet	See also

Enables application of server constraints against dataset entries.

procedure EnableConstraints;

Description

Call EnableConstraints to turn on application server constraints previously disabled by a call to DisableConstraints.

Note:	Calling EnableConstraints decrements a reference count. When this reference count is zero constraints are enabled for the dataset. To prevent accidental disabling of constraints, always follow a call to DisableConstraints with a matching call to EnableConstraints.


TBDEDataSet.FetchAll
 VCL Reference

TBDEDataSet.FetchAll

TBDEDataSet	See also

Retrieves all records from the current cursor position to the end of the file and stores them locally.

procedure FetchAll;

Description

Call FetchAll to reduce network traffic when using cached updates. FetchAll calls CheckBrowseMode to post any pending changes, and then retrieves all records from the current cursor position to the end of the file, and store them locally.

Ordinarily when cached updates are enabled, a transaction retrieves only as much data as it needs for display purposes. Each new fetch starts a new, read-only transaction. To consolidate transactions and reduce network traffic, an application can call FetchAll to retrieve all data in a single transaction.

Note:	Using FetchAll is not always appropriate. For example, when an application accesses a database used by many simultaneous clients and there is a high degree of contention for updating the same records, fetching all records at once may not be advantageous because some fetched records may be changed by other applications. Always weigh the advantages of reduced network traffic against the need for reduced record contention.


TBDEDataSet.FlushBuffers
 VCL Reference

TBDEDataSet.FlushBuffers

TBDEDataSet	See also

Posts all changes that have been written to the record buffer.

procedure FlushBuffers;

Description

Call FlushBuffers to cause the dataset to post all pending changes to the database, including any cached updates. Use FlushBuffers instead of CheckBrowseMode if it is important that cached record buffers are posted.


TBDEDataSet.GetBlobFieldData
 VCL Reference

TBDEDataSet.GetBlobFieldData

TBDEDataSet	See also

Reads BLOB data into a buffer.

function GetBlobFieldData(FieldNo: Integer; var Buffer: TBlobByteData): Integer; override;

Description

GetBlobFieldData reads blob data from the field specified by FieldNo into a Buffer. The buffer is a dynamic array of bytes, so that it can grow to accommodate the size of the BLOB data. GetBlobFieldData returns the size of the buffer.


TBDEDataSet.GetCurrentRecord
 VCL Reference

TBDEDataSet.GetCurrentRecord

TBDEDataSet	See also

Retrieves the current record into a buffer.

function GetCurrentRecord(Buffer: PChar): Boolean;

Description

Most applications should not need to call GetCurrentRecord. TDataSet automatically allocates a buffer for the active record.

Call GetCurrentRecord to copy the current record into a buffer allocated by the application. Buffer must be at least as big as the record size indicated by the RecordSize property.


TBDEDataSet.GetFieldData
 VCL Reference

TBDEDataSet.GetFieldData

TBDEDataSet	See also

Retrieves the current value of a field into a buffer.

function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; overload; override;

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; override;

function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: Boolean): Boolean; overload; virtual;

Description

Most applications do not need to call GetFieldData. TField objects call this method to implement their GetData method.

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number. The Buffer parameter is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). NativeFormat indicates whether the dataset fetches the field in Delphi’s native format for the field type. When NativeFormat is False, the dataset must convert the field value to the native type. This allows the field to handle data from different types of datasets (ADO-based, BDE-based, and so on) in a uniform manner.

GetFieldData returns a value that indicates whether the data was successfully fetched.

GetFieldData returns True if the buffer is successfully filled with the field’s data, and False if the data could not be fetched.


TBDEDataSet.GetIndexInfo
 VCL Reference

TBDEDataSet.GetIndexInfo

TBDEDataSet	See also

Retrieves information about the current index into the index data fields of the dataset.

procedure GetIndexInfo;

Description

Call GetIndexInfo to update information about the current index. Ordinarily an application does not need to call GetIndexInfo because this routine is used internally to retrieve index information as needed. Some applications, however, may want to ensure that the index information used by the dataset is up-to-date.

GetIndexInfo queries the BDE for index information, including:

Whether the current index is a dBASE expression index.

Whether the index is case insensitive.

The number of fields that make up the key for the index.

The field map for the index.

The size of the index key.

Number of fields and field map are not retrieved if the index is a dBASE expression index.


TBDEDataSet.IsSequenced
 VCL Reference

TBDEDataSet.IsSequenced

TBDEDataSet	See also

IsSequenced indicates whether sequence numbers are available for database records.

function IsSequenced: Boolean; override;

Description

Call IsSequenced to determine whether database records can be located by sequence numbers. When IsSequenced is True, the dataset can navigate directly to a specific record by setting the RecNo property. If IsSequenced is False, the only way to navigate to a specific record is to start at the beginning and count records.


TBDEDataSet.Locate
 VCL Reference

TBDEDataSet.Locate

TBDEDataSet	See also

Searches the dataset for a specified record and makes that record the current record.

function Locate(const KeyFields: String; const KeyValues: Variant; Options: TLocateOptions): Boolean;

Description

Call Locate to search a dataset for a specific record and position the cursor on it.

KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a variant array containing the values to match in the key fields. If KeyFields lists a single field, KeyValues specifies the value for that field on the desired record. To specify multiple search values, pass a variant array as KeyValues, or construct a variant array on the fly using the VarArrayOf routine. For example:

with CustTable do

  Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P', '408-431-1000']), [loPartialKey]);

Options is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then Locate allows partial-string matching on strings in KeyValues. If Options is an empty set, or if the KeyFields property does not include any string fields, Options is ignored.

Locate returns True if it finds a matching record, and makes that record the current one. Otherwise Locate returns False.

Locate uses the fastest possible method to locate matching records. If the search fields in KeyFields are indexed and the index is compatible with the specified search options, Locate uses the index. Otherwise Locate creates a filter for the search.


TBDEDataSet.Lookup
 VCL Reference

TBDEDataSet.Lookup

TBDEDataSet	See also

Retrieves field values from a record that matches specified search values.

function Lookup(const KeyFields: String; const KeyValues: Variant; const ResultFields: String): Variant;

Description

Call Lookup to search for a record in the dataset in which specified fields contain specified values and return other field values from the found record. Unlike other dataset search methods, Lookup performs its search without moving the record pointer of the dataset. This is useful when doing data validation on a record’s data while the record is still in edit or insert mode.

KeyFields is a string containing the names of the field or fields on which the search is predicated. If the search is based on more than one field, KeyFields is a list of field names delimited with semicolons.

KeyValues is a variant array containing the values to find in the fields specified in KeyFields. To specify multiple search values, pass KeyValues as a variant array as an argument, or construct a variant array on the fly using the VarArrayOf routine. These search values must be specified in the order of the fields in KeyFields to which each corresponds. For instance, the first value is used for the first field in KeyFields, the second value for the second field, and so on.

ResultFields is a string containing the names of the field or fields from which to return values. If values are to be returned from more than one field, ResultFields is a list of field names delimited with semicolons.

Lookup returns a variant array containing the values from the fields specified in ResultFields.

Lookup uses the fastest possible method to locate matching records. If the search fields in KeyFields are indexed, Lookup uses the index. Otherwise Lookup creates a filter for the search.

The example below uses the Lookup method to search the sample Paradox table Customer. The search is based on two fields: Company and State. The search is also based on the following two values in these two fields: "Blue Sports" and "OR". For the search to be successful, there must be a record where the Company field contains the value "Blue Sports" AND the field State contains "OR". If either criteria is not met, the search is unsuccessful (such a record does exist in this table, so the search will be successful). The values of the CustNo and Addr1 fields are returned by the execution of the Lookup method. If the search is unsuccessful, the VarType function applied to the returned variant array returns varNull.

procedure TForm1.Button1Click(Sender: TObject);

var

  V: Variant;

  C: Integer;

  A: String;

begin

  V := Table1.Lookup('Company;State',

    VarArrayOf(['Blue Sports', 'OR']),

    'CustNo;Addr1');

  if not (VarType(V) in [varNull]) then begin

    C := V[0];

    A := V[1];

    ShowMessage(IntToStr(C) + #10 + A);

  end

  else

    ShowMessage('Search unsuccessful!');

end;


TBDEDataSet.Post
 VCL Reference

TBDEDataSet.Post

TBDEDataSet	See also	Example

Writes a modified record to the database.

procedure Post; override;

Description

Call Post to write a modified record to the database. Dataset methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, such as First, Last, Next, and Prior automatically call Post.


TBDEDataSet.RevertRecord
 VCL Reference

TBDEDataSet.RevertRecord

TBDEDataSet	See also	Example

Restores the current record in the dataset to an unmodified state when cached updates are enabled.

procedure RevertRecord;

Description

Call RevertRecord to undo changes made to the current record when cached updates are enabled.

Note:	To undo all changes to all pending updates in the cache, call CancelUpdates.


TBDEDataSet.Translate
 VCL Reference

TBDEDataSet.Translate

TBDEDataSet

Converts a data string between the ANSI character set used by Delphi (and Windows), and the local code page (OEM character set).

procedure Translate(Src, Dest: PChar; ToOem: Boolean); override;

Description

When the ToOem parameter is True, Translate converts the source string from the ANSI character set to the OEM character set.  If ToOem is False, Translate converts the source string from the OEM character set to the ANSI character set.  By default, BDE datasets work with strings in the OEM character set.  Delphi uses the ANSI character set (which is used by Windows).  Use the Translate method to convert between these two.


TBDEDataSet.UpdateStatus
 VCL Reference

TBDEDataSet.UpdateStatus

TBDEDataSet	See also	Example

Reports the update status for the current record.

function UpdateStatus: TUpdateStatus;

Description

Call UpdateStatus to determine the update status for the current record in a dataset when cached updates are enabled. Update status can change frequently as records are edited, inserted, or deleted. UpdateStatus offers a convenient method for applications to assess the current status before undertaking or completing operations that depend on the update status of individual records in the dataset.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet


TBinaryField
 VCL Reference

TBinaryField

Hierarchy	Properties	Methods	Events 	Using TBinaryField	See also

TBinaryField represents an untyped binary field in a dataset.

Unit

DB

Description

TBinaryField encapsulates the fundamental behavior common to untyped binary fields. In addition to the properties, methods, and events common to all fields that are introduced by the TField class, TBinaryField reimplements the properties that are used to read and write binary data from or to the underlying database table.

If you use the Fields editor at design time to create a persistent field component for the binary field, you can access it by name at runtime. When using dynamic field components, you can access the TBinaryField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TBinaryField properties

TBinaryField	Alphabetically	Legend

In TBinaryField

AsString

AsVariant

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBinaryField properties

TBinaryField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TBinaryField.AsString
 VCL Reference

 TBinaryField.AsString

TBinaryField	See also

Represents the value of a binary field as a string.

property AsString: string;

Description

Use AsString to read or write the value of the field as a string. Delphi strings are not limited to text, so the value represented by AsString is the same as the unformatted binary value of the field. When setting the value of AsString, if the assigned value is longer than the DataSize of the field, it will be truncated to include only DataSize bytes.

Note: Reading the Text property of a binary field gives the field name of the field, not the value of AsString.


TBinaryField.AsVariant
 VCL Reference

TBinaryField.AsVariant

TBinaryField	See also

Represents the value of a binary field as a variant array of Byte values.

property AsVariant: Variant;

Description

Use AsVariant to read or write the value of the field as a variant array of byte values. For example, this code assigns a variant array of bytes to a binary field value:

var

  V: Variant;

begin

  V := VarArrayCreate([0, BinaryField.DataSize - 1], VarByte);

  V[i] := 1;

  ...

  BinaryField.AsVariant := V;

end;

To assign a binary field value to a variant variable, use code similar to this:

VariantVariable := MyBinaryField.AsVariant;

Because binary fields are stored in their database tables as unformatted arrays of bytes, the AsVariant property for a binary field is the same as the Value property.


TBinaryField.Value
 VCL Reference

 TBinaryField.Value

TBinaryField	See also

Represents the data in the binary field.

property Value: variant;

Description

Use Value to read data from and write data to a binary field component at runtime. For binary fields, the Value property is equivalent to the AsVariant property.


 VCL Reference

TBinaryField events

TBinaryField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBinaryField events

TBinaryField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBinaryField methods

TBinaryField	Alphabetically	Legend

In TBinaryField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBinaryField methods

TBinaryField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TBinaryField.Create
 VCL Reference

 TBinaryField.Create

TBinaryField	See also

Creates an instance of TBinaryField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TBinaryField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TBinaryField. After instantiating a TBinaryField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TBinaryField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TBinaryField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TBinaryField object for a field named RawData accessed through a TSQLQuery named SQLQuery1.

var

  T: TBinaryField;

begin

  SQLQuery1.Close;

  T := TBinaryField.Create(SQLQuery1);

  T.FieldName := 'RawData';

  T.Name := SQLQuery1.Name + T.FieldName;

  T.Index := SQLQuery1.FieldCount;

  T.DataSet := SQLQuery1;

  SQLQuery1.FieldDefs.UpDate;

  SQLQuery1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TBinaryField


TBookmarkList
 VCL Reference

TBookmarkList

Hierarchy	Properties	Methods	See also

TBookmarkList is a collection of bookmarks that identify a set of records in a dataset.

Unit

DBGrids

Description

Use TBookmarkList to manage a set of bookmarks when working with the records in a dataset. Each bookmark identifies a particular record in the dataset, and can be identified by a string.


 VCL Reference

TBookmarkList properties

TBookmarkList	Alphabetically	Legend

In TBookmarkList

Count

CurrentRowSelected

Items


 VCL Reference

TBookmarkList properties

TBookmarkList	By object	Legend

Count

CurrentRowSelected

Items


TBookmarkList.Count
 VCL Reference

TBookmarkList.Count

TBookmarkList	See also	Example

Indicates the number of bookmarks in the bookmark list.

property Count: Integer;

Description

Read Count to determine the number of entries in the Items array.  Use Count as an upper limit when iterating over the strings in the Items array.


TBookmarkList.CurrentRowSelected
 VCL Reference

TBookmarkList.CurrentRowSelected

TBookmarkList	See also

Indicates whether the Bookmark property of the associated DBGrid’s dataset is in the Items array.

property CurrentRowSelected: Boolean;

Description

Read CurrentRowSelected to determine whether the Bookmark property of the associated DBGrid’s dataset specifies a bookmark string in the Items property array. CurrentRowSelected is True when the bookmark string is included, False when it is not. The Bookmark property of the dataset indicates the current record in the dataset.

Set CurrentRowSelected to specify whether the Bookmark string of the associated DBGrid’s dataset should be included in the bookmark list.  Setting CurrentRowSelected to True adds the Bookmark property of the dataset to the Items array if it is not already there.  Setting CurrentRowSelected to False removes the Bookmark of the dataset from the Items array if it is there.  If the Bookmark property of the dataset is an empty string (no bookmark), setting CurrentRowSelected does nothing.

Note:	Trying to read or write CurrentRowSelected when the dataset is not active will raise an EInvalidGridOperation exception.


TBookmarkList.Items
 VCL Reference

TBookmarkList.Items

TBookmarkList	See also	Example

Provides indexed access to the bookmarks for marked records in the dataset.

type TBookmarkStr: string;

property Items[Index: Integer]: TBookmarkStr; default;

Description

Use Items to obtain a bookmark string from the set maintained by the TBookmarkList object.  Each bookmark string represents a single record in the dataset of the associated DBGrid. Bookmark strings can be compared with other bookmark strings to determine relative position within the database, and used to position the dataset on an arbitrary record. The Index parameter indicates the index of the bookmark, where 0 is the index of the first bookmark, 1 is the index of the second bookmark, and so on.

Use Items with the Count property to iterate through all of the bookmarks in the list.

Note:	Bookmarks in the bookmark list are not automatically deleted when records in the dataset are deleted.  As a result, some bookmarks in the Items array may become invalid. Call the Refresh method to delete invalid bookmarks from the Items array.


 VCL Reference

TBookmarkList methods

TBookmarkList	Alphabetically	Legend

In TBookmarkList

Clear

Create

Delete

Destroy

Find

IndexOf

Refresh

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBookmarkList methods

TBookmarkList	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Refresh

SafeCallException


TBookmarkList.Clear
 VCL Reference

TBookmarkList.Clear

TBookmarkList	See also

Deletes all bookmarks from the list.

procedure Clear;

Description

Call Clear to empty the Items array and set the Count property to 0 when all rows of the associated DBGrid are deselected. Calling Clear invalidates the associated DBGrid so that the selected rows that were referenced by the bookmarks in the bookmark list can be repainted.

Note:	Clear removes the bookmarks from the bookmark list to reflect the fact that the corresponding rows are not selected. To delete the rows from the dataset rather than just deselecting them, call the Delete method instead.


TBookmarkList.Create
 VCL Reference

TBookmarkList.Create

TBookmarkList	See also

Creates an instance of TBookmarkList and associates it with a DBGrid.

constructor Create(AGrid: TCustomDBGrid);

Description

Applications do not need to call create to instantiate the bookmark list used by DBGrids to implement their SelectedRows property.  DBGrids call Create from their constructor to create this bookmark list.  Component writers that implement additional properties for descendants of TCustomDBGrid can create additional bookmark list objects to represent other sets of records in the dataset.


TBookmarkList.Delete
 VCL Reference

TBookmarkList.Delete

TBookmarkList	See also

Deletes all the records specified by the bookmarks in the list from the dataset of the associated DBGrid.

procedure Delete;

Description

Call Delete to delete the set of records represented by the bookmark list from the dataset of the associated DBGrid.  To remove all the bookmarks from the list without changing the dataset, use the Clear method instead.


TBookmarkList.Destroy
 VCL Reference

TBookmarkList.Destroy

TBookmarkList	See also

Destroys an instance of TBookmarkList.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TBookmarkList object is not nil, and only then calls Destroy.

Destroy frees the memory used to store the Items property array.


TBookmarkList.Find
 VCL Reference

TBookmarkList.Find

TBookmarkList	See also

Indicates whether a specified bookmark string is contained in the bookmark list.

type TBookmarkStr: string;

function Find(const Item: TBookmarkStr; var Index: Integer): Boolean;

Description

Call Find to determine whether the string specified by the Item parameter is one of the bookmark strings in the Items property array.  Find returns True if the bookmark list contains the bookmark string, False otherwise.  If Find returns True, the index of the bookmark string is returned as the value of the Index parameter.

Note:	The index of a specific bookmark string can also be obtained by using the IndexOf method.  Unlike the IndexOf method, which returns a value of -1 if the bookmark string is not in the Items array, Find does not change the value of the Index parameter if the bookmark string can’t be found.  Use Find when a default value should be changed only if the bookmark is not in the list.


TBookmarkList.IndexOf
 VCL Reference

TBookmarkList.IndexOf

TBookmarkList	See also

Returns the index of a bookmark string in the Items property array.

type TBookmarkStr: string;

function IndexOf(const Item: TBookmarkStr): Integer;

Description

Call IndexOf to get the index for a bookmark string in the Items array. The first item in the array has index 0, the second item has index 1, and so on. If an item is not in the list, IndexOf returns -1.


TBookmarkList.Refresh
 VCL Reference

TBookmarkList.Refresh

TBookmarkList	See also

Removes all invalid bookmarks from the Items property array.

function Refresh: Boolean;

Description

Bookmarks in the bookmark list are not automatically deleted when records in the dataset are deleted.  As a result, some bookmarks in the Items array may become invalid. Call Refresh to ensure that every bookmark in the bookmark list is valid.  Refresh attempts to locate every record in the dataset that corresponds to a bookmark in the Items property array. All bookmarks that do not correspond to records in the dataset are removed.

If any of the bookmarks in the list are invalid, Refresh returns True, and invalidates the DBGrid so that it will repaint, reflecting the removal of all invalid records.  If all bookmarks in the list are still valid,  Refresh returns False.


Hierarchy

TObject

TBookmarkList


TBlobField
 VCL Reference

TBlobField

Hierarchy	Properties	Methods	Events 	Using TBlobField	See also

TBlobField represents a field in a dataset that holds a reference to a binary large object (BLOB).

Unit

DB

Description

TBlobField encapsulates the fundamental behavior common to binary large object (BLOB) fields. BLOB fields are database fields that contain raw binary data of arbitrary length. BLOB fields can represent different arbitrarily large data types. These data types are distinguished in the header of the binary data.

In addition to the field types supported directly, TBlobField is the direct ancestor of two BLOB field components: TMemoField (ftMemo) and TGraphicField (ftGraphic). These descendants represent BLOB fields that have headers peculiar to memos or graphic data, respectively.

TBlobField introduces new methods to support streaming data to and from the BLOB field and to support copying raw binary data between the BLOB field and a binary file. You can also use the stream returned by a dataset’s CreateBlobStream method to read or write the data managed by a BLOB field.

If you use the Fields editor at design time to create a persistent field component for the BLOB field, you can access it by name at runtime. When using dynamic field components, you can access the TBlobField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TBlobField properties

TBlobField	Alphabetically	Legend

In TBlobField

AsString

AsVariant

BlobSize

BlobType

GraphicHeader

IsNull

Modified

Transliterate

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBlobField properties

TBlobField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

GraphicHeader

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Modified

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


TBlobField.AsString
 VCL Reference

TBlobField.AsString

TBlobField	See also

Represents the value of the BLOB field as a string value.

property AsString: String;

Description

Use AsString to assign the BLOB field value to a string or to assign a string value to the BLOB field.

For example, this code assigns a string value to a BLOB field value:

MyBLOBField.AsString := 'Assign the string to a BLOB field';

To assign a BLOB field value to a string value, use code similar to this:

Memo1.Lines.Text := MyBLOBField.AsString;

Typically, using AsString makes sense only if the BLOB contains text, such as that in a memo field. The string data type can, however, store binary data as well. Thus, even BLOB fields for nontextual BLOB types such as ftGraphic or ftTypedBinary can use the AsString property.

Use the AsString property rather than the Text property to set the BLOB field’s value to textual data. Trying to set the Text property will raise an exception.


TBlobField.AsVariant
 VCL Reference

TBlobField.AsVariant

TBlobField	See also

Represents the value of the BLOB field as a Variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the BLOB field value to a Variant variable.

Assign a Variant value to the BLOB field.

Using variants is useful when you do not know the actual field type and do not want to use one of the other As* properties to convert the field value to another type.


TBlobField.BlobSize
 VCL Reference

TBlobField.BlobSize

TBlobField	See also

Indicates the number of bytes of data contained in the blob field on the current record.

property BlobSize: Integer;

Description

Read BlobSize to determine the amount of memory required to store the contents of the BLOB field. Use BlobSize instead of the DataSize property, which always returns 0 for BLOB fields.

Note:	Unlike the DataSize property, which specifies the size for field data on any record, BlobSize gives the size of the BLOB data for the current record only.

In the example below, a handler for the AfterScroll event of a TQuery, the value of the BlobSize property is displayed in the Caption of a form.

procedure TForm1.Query1AfterScroll(DataSet: TDataSet);

begin

  Caption := 'BLOB size: ' +

    IntToStr(TBlobField(Query1.FieldByName('BITMAP')).BlobSize);

end;


TBlobField.BlobType
 VCL Reference

TBlobField.BlobType

TBlobField	See also

Identifies the type of the BLOB field associated with a BLOB field object.

property BlobType: TBlobType;

Description

Use BlobType to set or read the data type for the BLOB data associated with the field component.

Specify BlobType when using a TBlobField object to represent a BLOB field type that isn’t directly supported (such as a formatted memo BLOB). BlobType ensures that the BLOB type in the dataset matches the expected field type.


TBlobField.GraphicHeader
 VCL Reference

TBlobField.GraphicHeader

TBlobField	See also

Indicates whether the field’s value includes a Paradox graphic BLOB header.

property GraphicHeader: Boolean;

Description

Use GraphicHeader to specify whether the BLOB field represents a Paradox graphic field. TBlobField checks GraphicHeader to determine whether it must write out a Paradox graphic BLOB header when writing the field’s data to the dataset.

GraphicHeader is ignored unless the DataType property is ftGraphic or ftTypedBinary.


TBlobField.IsNull
 VCL Reference

TBlobField.IsNull

TBlobField	See also

Indicates whether the BLOB field contains any data.

property IsNull: Boolean;

Description

Read IsNull to determine whether the BLOB field is blank. IsNull is True if the BLOB field is empty. IsNull is False if the BLOB field contains any data.

if Query1Images.IsNull then

  ShowMessage('You forgot the BLOB data!');


TBlobField.Modified
 VCL Reference

TBlobField.Modified

TBlobField	See also

Indicates whether a the value for the BLOB field was changed since it was last read from the underlying database.

property Modified: Boolean;

Description

If the value of the BLOB field is set by using the properties or methods of TBlobField, the BLOB stream returned by a dataset’s CreateBlobStream method, or a data-aware control, Modified is automatically set to True. Set Modified to True when changing the value of a BLOB field using direct Borland Database Engine (BDE) API calls.

BLOB fields use the Modified property to trigger data events and to indicate when the BDE needs to clean up any buffers used to store BLOB data.


TBlobField.Transliterate
 VCL Reference

TBlobField.Transliterate

TBlobField	See also

Determines whether any text in the BLOB field should be converted to and from the character set identified by the dataset.

property Transliterate: Boolean;

Description

Use Transliterate when the physical database table identified by the dataset does not use an ANSI language driver and the data may contain extended ASCII characters.

When Transliterate is True BLOB fields call the dataset’s Translate method to translate ANSI characters to the character set used by the dataset when the value is changed using the Value property, the AsString property, or the AsVariant property. When these properties are read to obtain the value of the BLOB field, the Translate method translates the characters in the database table to the ANSIcharacter set.

Note:	BLOB streams (returned by the dataset’s CreateBlobStream method) also check the Transliterate property when reading from or writing to a BLOB field.


TBlobField.Value
 VCL Reference

TBlobField.Value

TBlobField	See also

Represents the data in the BLOB field.

property Value: String;

Description

Use Value to read data directly from and write data directly to a BLOB field component at runtime. For BLOB fields, the Value property is equivalent to the AsString property.

Note:	The string data type can store binary data as well as text. Thus, even BLOB fields for nontextual BLOB types such as ftGraphic or ftTypedBinary can get or set their data using a string.


 VCL Reference

TBlobField events

TBlobField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBlobField events

TBlobField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBlobField methods

TBlobField	Alphabetically	Legend

In TBlobField

Assign

Clear

Create

IsBlob

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SetFieldType

Derived from TField

AssignValue

Destroy

FocusControl

GetData

IsValidChar

RefreshLookupList

SetData

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBlobField methods

TBlobField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToFile

SaveToStream

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TBlobField.Assign
 VCL Reference

TBlobField.Assign

TBlobField	See also

Copies a value to the BLOB field.

procedure Assign(Source: TPersistent);

Description

Use Assign to copy data to the BLOB field. Assign copies the Value of a BLOB field from

Another BLOB field

A TStrings object

A TPicture or TBitmap object, if the BlobType is ftGraphic or ftTypedBinary

Any object that supports TBlobField in its AssignTo method

In the example below, the Assign method is used to copy the bitmap from a TImage component into a BLOB field through its TBlobField field object:

if not (ClientDataSet1.State in [dsInsert, dsEdit]) then

  ClientDataSet1.Insert;

ClientDataSet1Images.Assign(Image1.Picture);

ClientDataSet1.Post;


TBlobField.Clear
 VCL Reference

TBlobField.Clear

TBlobField	See also

Clears the current value in the BLOB field.

procedure Clear;

Description

Use Clear to delete the current value in the field and leave the field without a value.

Query1Images.Clear;


TBlobField.Create
 VCL Reference

TBlobField.Create

TBlobField	See also

Creates an instance of a BLOB field component.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TBlobField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create initializes the DataType property to ftBlob. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TBlobField. After instantiating a TBlobField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TBlobField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TBlobField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TBlobField object for a field named Images accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TBlobField;

begin

  SQLDataSet1.Close;

  T := TBlobField.Create(SQLDataSet1);

  T.FieldName := 'Images';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


TBlobField.IsBlob
 VCL Reference

TBlobField.IsBlob

TBlobField	See also	Example

Indicates that this is a BLOB field.

classfunction IsBlob: Boolean; override;

Description

Use IsBlob when working with a TField object to determine whether it represents BLOB data. For example, before using the GetData or SetData method (which does not work with BLOB fields), call IsBlob to determine whether the method can be used. The IsBlob method for TBlobField always returns True.


TBlobField.LoadFromFile
 VCL Reference

TBlobField.LoadFromFile

TBlobField	See also

Loads BLOB data from a file into the field.

procedure LoadFromFile(const FileName: string);

Description

Use LoadFromFile to load the contents of a file into a BLOB field. Specify the name of the file to load into the field as the value of the FileName parameter.

if not (Query.State in [dsInsert, dsEdit]) then Query1.Insert;

Query1Images.LoadFromFile('c:\Windows\Waves.bmp');

Query1.Post;


TBlobField.LoadFromStream
 VCL Reference

TBlobField.LoadFromStream

TBlobField	See also

Loads BLOB data from a stream into the field.

procedure LoadFromStream(Stream: TStream);

Description

Use LoadFromStream to copy the contents of a stream into the BLOB field. Specify the stream from which the field’s value is copied as the value of the Stream parameter.

Note:	The Stream parameter is typically not a BLOB stream. BLOB streams (returned by the dataset’s CreateBlobStream method) provide a completely separate mechanism for streaming data into a BLOB field.

var

  MS: TMemoryStream;

begin

  if not (ClientDataSet1.State in [dsInsert, dsEdit]) then

    ClientDataSet1.Insert;

  MS := TMemoryStream.Create();

  try

    Image1.Picture.Bitmap.SaveToStream(MS);

    ClientDataSet1Images.LoadFromStream(MS);

  finally

    MS.Free;

  end;

  ClientDataSet1.Post;

end;


TBlobField.SaveToFile
 VCL Reference

TBlobField.SaveToFile

TBlobField	See also

Saves the contents of the BLOB field to a file.

procedure SaveToFile(const FileName: string);

Description

Use SaveToFile to save the contents of the BLOB field to a file. Specify the name of the file as the value of the FileName parameter.

Query1Files.SaveToFile('c:\Data\' + Query1FileName.AsString);


TBlobField.SaveToStream
 VCL Reference

TBlobField.SaveToStream

TBlobField	See also

Saves the contents of the BLOB field to a stream.

procedure SaveToStream(Stream: TStream);

Description

Use SaveToStream to copy the contents of a BLOB field to a stream. Specify the name of the stream to which the field’s value is saved as the value of the Stream parameter.

Note:	The Stream parameter is typically not a BLOB stream. BLOB streams (returned by the dataset’s CreateBlobStream method) provide a completely separate mechanism for streaming data from a BLOB field.

var

  MS: TMemoryStream;

begin

  MS := TMemoryStream.Create;

  try

    SQLDataSet1Images.SaveToStream(MS);

    Image1.Picture.Bitmap.LoadFromStream(MS);

  finally

    MS.Free;

  end;

end;


TBlobField.SetFieldType
 VCL Reference

TBlobField.SetFieldType

TBlobField	See also

Specifies the type of the BLOB field.

procedure SetFieldType(Value: TFieldType); override;

Description

Use SetFieldType to change the field type of a BLOB field, overriding the default type.

Normally, the type of the physical database field is checked and a TFieldType is selected that matches most closely. BLOB fields can indicate more explicitly what kind of BLOB is in the database. Specify the BLOB type as the value of the Value parameter.

The following table contains the possible values for BLOB fields. Calling SetFieldType with any other data type does nothing.

Value	Description

ftBlob	Binary Large Object field

ftMemo	Text memo field

ftGraphic	Bitmap field

ftFmtMemo	Formatted text memo field

ftParadoxOle	Paradox OLE field

ftDBaseOle	dBASE OLE field

ftTypedBinary	Typed binary field

ftOraBlob	BLOB fields in Oracle 8 tables

ftOraClob	CLOB fields in Oracle 8 tables

Note:	Calling SetFieldType does the same thing as setting the BlobType property.


Hierarchy

TObject

TPersistent

TComponent

TField

TBlobField


TBlobStream
 VCL Reference

TBlobStream

Hierarchy	Properties	Methods	See also

TBlobStream is a stream object that provides services which allow applications to read from or write to field objects that represent Binary large object (BLOB) fields.

Unit

DBTables

Description

Use TBlobStream to access or modify the value of a BLOB field in a BDE-enabled dataset. TBlob stream works with persistent TBlobField objects (including descendants of TBlobField such as TGraphicField and TMemoField). BLOB fields use BLOB streams to read data from and write data to the dataset.

TBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field to read or write such data by employing the uniform stream mechanism.

To use a BLOB stream, create an instance of TBlobStream, use the methods of the stream to read or write the data, and then free the BLOB stream. Do not use the same instance of TBlobStream to access data from more than one record. Instead, create a new TBlobStream object every time you need to read or write BLOB data on a new record.


 VCL Reference

TBlobStream properties

TBlobStream	Alphabetically	Legend

Derived from TStream

Position

Size


 VCL Reference

TBlobStream properties

TBlobStream	By object	Legend

Position

Size


 VCL Reference

TBlobStream methods

TBlobStream	Alphabetically	Legend

In TBlobStream

Create

Destroy

Read

Seek

Truncate

Write

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBlobStream methods

TBlobStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

Truncate

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TBlobStream.Create
 VCL Reference

TBlobStream.Create

TBlobStream	See also 	Example

Creates an instance of TBlobStream.

constructor Create(Field: TBlobField; Mode: TBlobStreamMode);

Description

Call Create to obtain an instance of TBlobStream for reading from or writing to a specific TBlobField object.

Tip:	Different types of dataset use different classes of BLOB streams. It is usually a better idea to call the dataset’s CreateBlobStream method than to call the BLOB stream constructor.

Create links the TBlobStream to the field object specified by the Field parameter. Mode specifies whether the BLOB stream will be used to read data (bmRead), write data (bmWrite) or modify data (bmReadWrite). Mode must be one of the following values:

Value	Meaning

bmRead	The BLOB stream can read data from the field.

bmWrite	The BLOB stream can replace the data in the field.

bmReadWrite	The BLOB stream can modify the data in the field.

Note: A TBlobStream object should always be destroyed before navigating to a new record. Create a new instance of TBlobStream for the new record.


TBlobStream.Destroy
 VCL Reference

TBlobStream.Destroy

TBlobStream	See also

Destroys an instance of TBlobStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead call Free. Free verifies that the TBlobStream object is not nil and only then calls Destroy. Destroy the TBlobStream object when it is no longer needed for reading from or writing to the BLOB field.

Destroy triggers an OnDataChange event if the BLOB stream was used to overwrite or modify the data in the field. Destroy then frees any buffers that were allocated to handle the data.

Note: A TBlobStream object should always be destroyed before navigating to a new record. Create a new instance of TBlobStream for the new record.


TBlobStream.Read
 VCL Reference

TBlobStream.Read

TBlobStream	See also	Example

Reads up to Count bytes from the current position in the field’s data into Buffer.

function Read(var Buffer; Count: Longint): Longint;

Description

Call Read to read data from the BLOB field when the number of bytes in the field’s data is not known.

Buffer is the target container for Read and must be of type PChar (or equivalent). Buffer must have at least Count bytes allocated to hold the data that was read from the field. Read transfers up to Count bytes from the BLOB data into Buffer, starting in the current position, and then advances the current position by the number of bytes actually transferred. Read returns the number of bytes actually transferred (which may be less than the number requested in Count).

Read checks the Transliterate property of the field, and converts the data into ANSI from the character set specified by the dataset if Transliterate is True.

All the other data-reading methods of a BLOB stream (ReadBuffer, ReadComponent) call Read to do their actual reading.

Note:	Do not call Read when the TBlobStream was created in bmWrite mode.


TBlobStream.Seek
 VCL Reference

TBlobStream.Seek

TBlobStream	See also 	Example

Resets the current position of the TBlobStream object.

function Seek(Offset: Longint; Origin: Word): Longint;

Description

Use Seek to move the current position within the BLOB data by the indicated offset. Seek allows an application to read from or write to a particular location within the BLOB data.

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:

Value	Meaning

soFromBeginning	Offset is from the beginning of the BLOB data. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position in the BLOB data. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of the BLOB data. Offset must be <= 0 to indicate a number of bytes before the end of the BLOB.

Seek returns the new value of the Position property, the new current position in the BLOB data.


TBlobStream.Truncate
 VCL Reference

TBlobStream.Truncate

TBlobStream	See also 	Example

Discards all data in the BLOB field from the current position on.

procedure Truncate;

Description

Use Truncate to limit the size of the BLOB data. Calling Truncate when the current position is 0 will clear the contents of the BLOB field.

Note:	Do not call Truncate when the TBlobStream was created in bmRead mode.


TBlobStream.Write
 VCL Reference

TBlobStream.Write

TBlobStream	See also 	Example

Writes Count bytes from Buffer to the current position in the field and updates the current position by Count bytes.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to write Count bytes to the BLOB field, starting at the current position. The Write method for TBlobStream always writes the entire Count bytes, as BLOB data does not necessarily include a termination character. Thus, Write is equivalent to the WriteBuffer method.

Buffer is the source container for Write and must be of type PChar (or equivalent). Write transfers up to Count bytes from Buffer into the BLOB field, starting in the current position, and then advances the current position by the number of bytes actually transferred. Write returns the number of bytes actually transferred (which may be less than the number requested in Count).

Write checks the Transliterate property of the field, and converts the data from ANSI into the character set of the dataset if Transliterate is True.

All the other data-writing methods of a BLOB stream (WriteBuffer, WriteComponent) call Write to do their actual writing.

Note:	Do not call Write when the TBlobStream was created in bmRead mode.


Hierarchy

TObject

TStream

TBlobStream


TBooleanField
 VCL Reference

TBooleanField

Hierarchy	Properties	Methods	Events 	Using TBooleanField	See also

TBooleanField represents a field containing Boolean values.

Unit

DB

Description

TBooleanField encapsulates the fundamental behavior common to Boolean data. Boolean fields can hold values of True or False.

In addition to the properties, methods, and events common to all fields that are introduced by the TField class, TBooleanField introduces new properties to convert between boolean values and other data types, and to provide display strings that represent various interpretations of the data.

If you use the Fields editor at design time to create a persistent field component for the boolean field, you can access it by name at runtime. When using dynamic field components, you can access the TBooleanField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TBooleanField properties

TBooleanField	Alphabetically	Legend

In TBooleanField

AsBoolean

AsString

AsVariant

DataSize

DisplayValues

Value

Derived from TField

Alignment

AsBCD

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBooleanField properties

TBooleanField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayValues

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TBooleanField.AsBoolean
 VCL Reference

TBooleanField.AsBoolean

TBooleanField	See also

Represents the value of a Boolean field as a Boolean value.

property AsBoolean: Boolean;

Description

Use AsBoolean to set or get the value of a Boolean field using the Boolean type. Physical Boolean database fields store boolean values as WordBool values. AsBoolean converts between the WordBool value and the Boolean type.

var

  CanBillCustomer: Boolean;

begin

  CanBillCustomer := Table1Billable.AsBoolean;

  …

end;


TBooleanField.AsString
 VCL Reference

TBooleanField.AsString

TBooleanField	See also

Represents the value of a Boolean field as a string value.

property AsString: String;

Description

Use AsString to

Assign the Boolean field value to string variable.

Assign a string value to the Boolean field.

For example, this code assigns a string value to an Boolean field value:

MyBoolField.AsString := 'TRUE';

To assign a Boolean field value to a string variable, use code similar to this:

StringVar := MyBoolField.AsString;

If the DisplayValues property has not been set, when a Boolean value is inserted or updated using the AsString property, the value is set to True if the string is ‘True’, and False if the string is ‘False’. Any other string raises an EDatabaseError exception.

The DisplayValues property specifies the strings associated with the values of True or False. Change the DisplayValues property to change the strings that must be assigned to set the value of the Boolean field to True or False.

Reading the AsString property returns the string that corresponds to the value of the field. If DisplayValues has not been set, this is ‘True’ or ‘False’.


TBooleanField.AsVariant
 VCL Reference

TBooleanField.AsVariant

TBooleanField	See also

Represents the value of a Boolean field as a Variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the Boolean field value to Variant variable.

Assign a Variant value to the Boolean field.

Using variants is useful when both the actual field type and the type of the data is unknown.

var

  CanBillCustomer: Variant;

begin

  CanBillCustomer := Table1Billable.AsVariant;

  …

end;


TBooleanField.DataSize
 VCL Reference

TBooleanField.DataSize

TBooleanField	See also	Example

Indicates the amount of memory needed to store the value of a Boolean field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a Boolean field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods. GetData and SetData work with the field’s value in native database format.

For Boolean fields, DataSize is always 2, because TBoolean works with database fields that use the WordBool type to store boolean values. This type is not the same as the Boolean type used by TBooleanField to store and manipulate boolean values.


TBooleanField.DisplayValues
 VCL Reference

TBooleanField.DisplayValues

TBooleanField	See also

Controls how the Boolean field is translated to and from display format.

property DisplayValues: string;

Description

Use DisplayValues to specify strings the field uses to represent Boolean values. Use any pair of phrases, separated by a semicolon. For example, to have the True and False values correspond to the letters T and F, respectively, set DisplayValues as follows:

Table1LogicalField.DisplayValues := 'T;F';

Similarly, to set the values of True and False to the strings Yes and No, set DisplayValues to

Table1LogicalField.DisplayValues := 'Yes;No';

The string associated with True or False can be an empty string. To set the value for True to an empty string, set DisplayValues to a string that begins with a semicolon. For example, to associate False with the string Fail, and True with an empty string, set DisplayValues to

Table1LogicalField.DisplayValues := ';Fail';

To associate False with an empty string, set DisplayValues to the string for True, with no semicolon at all.

The strings associated with True and False by DisplayValues appear in data-aware controls when they display the data for a Boolean field. If one of the strings is an empty string, Boolean values associated with that string appear blank in data-aware controls.

These strings are also used when getting or setting the Boolean field’s AsString property.


TBooleanField.Value
 VCL Reference

TBooleanField.Value

TBooleanField	See also

Represents the value of the data in the Boolean field.

property Value: Boolean;

Description

Use Value to read data from and write data to a Boolean field object at runtime. Using Value is the same as using the AsBoolean property. Use Value when you know the field component is a Boolean field. Use AsBoolean when working with a generic field component.


 VCL Reference

TBooleanField events

TBooleanField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBooleanField events

TBooleanField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBooleanField methods

TBooleanField	Alphabetically	Legend

In TBooleanField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBooleanField methods

TBooleanField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TBooleanField.Create
 VCL Reference

TBooleanField.Create

TBooleanField	See also

Instantiates a Boolean field object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TBooleanField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftBoolean and initializes the strings associated with Boolean values to ‘True’ and ‘False’. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TBooleanField. After instantiating a TBooleanField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TBooleanField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TBooleanField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TBooleanField object for a field named PaidInFull accessed through a TClientDataSet named ClientDataSet1.

var

  T: TBooleanField;

begin

  ClientDataSet1.Close;

  T := TBooleanField.Create(ClientDataSet1);

  T.FieldName := 'PaidInFull';

  T.Name := ClientDataSet1.Name + T.FieldName;

  T.Index := ClientDataSet1.FieldCount;

  T.DataSet := ClientDataSet1;

  ClientDataSet1.FieldDefs.UpDate;

  ClientDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TBooleanField


TBrowseURL
 VCL Reference

TBrowseURL

Hierarchy	Properties	Methods	Events	Using TBrowseURL	See also

TBrowseURL is the standard action for launching the default browser to display a specified URL.

Unit

ExtActns

Description

Add TBrowseURL to an action manager or action list to let your application launch a browser to display a specific Web page in response to user actions. Controls linked to this action cause the application to launch the default browser, as specified in the system registry, and display the Web page specified by the URL property. You should assign a value to the URL property before the user invokes this action.


 VCL Reference

TBrowseURL properties

TBrowseURL	Alphabetically	Legend

Derived from TURLAction

URL

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBrowseURL properties

TBrowseURL	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

URL

VCLComObject

Visible


 VCL Reference

TBrowseURL events

TBrowseURL	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TBrowseURL events

TBrowseURL	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TBrowseURL methods

TBrowseURL	Alphabetically	Legend

In TBrowseURL

ExecuteTarget

Derived from TURLAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBrowseURL methods

TBrowseURL	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TBrowseURL.ExecuteTarget
 VCL Reference

TBrowseURL.ExecuteTarget

TBrowseURL 	See also

Launches the default Web browser to display the Web page specified by URL.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and launches the default Web browser, passing in the URL specified by the URL property so that the browser displays the associated Web page.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TURLAction

TBrowseURL


TBytesField
 VCL Reference

TBytesField

Hierarchy	Properties	Methods	Events 	Using TBytesField	See also

TBytesField represents a bytes field in a dataset.

Unit

DB

Description

TBytesField encapsulates the fundamental behavior common to bytes fields. A bytes field value is a set of unformatted bytes of fixed size.

If you use the Fields editor at design time to create a persistent field component for the bytes field, you can access it by name at runtime. When using dynamic field components, you can access the TBytesField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TBytesField properties

TBytesField	Alphabetically	Legend

In TBytesField

DataSize

Derived from TBinaryField

AsString

AsVariant

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBytesField properties

TBytesField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TBytesField.DataSize
 VCL Reference

TBytesField.DataSize

TBytesField	See also	Example

Indicates the amount of memory needed to store the value of a Bytes field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a Bytes field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For Bytes fields, DataSize is the same as the Size property.


 VCL Reference

TBytesField events

TBytesField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBytesField events

TBytesField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TBytesField methods

TBytesField	Alphabetically	Legend

In TBytesField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBytesField methods

TBytesField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TBytesField.Create
 VCL Reference

TBytesField.Create

TBytesField	See also

Creates an instance of TBytesField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TBytesField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftBytes. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TBytesField. After instantiating a TBytesField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TBytesField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TBytesField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TBytesField object for a field named BytesField accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TBytesField;

begin

  SQLDataSet1.Close;

  T := TBytesField.Create(SQLDataSet1);

  T.FieldName := 'BytesField';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TBinaryField

TBytesField


TClientBlobStream
 VCL Reference

TClientBlobStream

Hierarchy	Properties	Methods 	See also

TClientBlobStream lets applications read from or write to BLOB fields in a client dataset.

Unit

DBClient

Description

Use TClientBlobStream to access or modify the value of a Binary Large Object (BLOB) field in a client dataset. BLOB fields are TBlobField objects and descendants of TBlobField such as TGraphicField and TMemoField. BLOB fields in client datasets use client BLOB streams to implement many of their data access properties and methods.

TClientBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field to read or write such data by employing the uniform stream interface.

To use a client BLOB stream, create an instance of TClientBlobStream, use the methods of the stream to read or write the data, and then free the BLOB stream. Do not use the same instance of TClientBlobStream to access data from more than one record. Instead, create a new TClientBlobStream object every time you need to read or write BLOB data on a new record.

Note:	Explicitly creating a TClientBlobStream instance does not ensure that the current record has fetched its BLOB data. To ensure that the BLOB field contains its data before reading from the BLOB stream, call the client dataset’s FetchBlobs method before creating the BLOB stream or use the client dataset’s CreateBlobStream method to create the BLOB stream indirectly.


 VCL Reference

TClientBlobStream properties

TClientBlobStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TClientBlobStream properties

TClientBlobStream	By object	Legend

Memory

Position

Size


 VCL Reference

TClientBlobStream methods

TClientBlobStream	Alphabetically	Legend

In TClientBlobStream

Create

Destroy

Truncate

Write

Derived from TMemoryStream

Clear

LoadFromFile

LoadFromStream

SetSize

Derived from TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TClientBlobStream methods

TClientBlobStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

SetSize

Truncate

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TClientBlobStream.Create
 VCL Reference

TClientBlobStream.Create

TClientBlobStream	See also

Creates and initializes an instance of TClientBlobStream.

constructor Create(Field: TBlobField; Mode: TBlobStreamMode);

Description

Call Create to obtain an instance of TClientBlobStream for reading from or writing to a specific TBlobField object in a client dataset.

Create links the TClientBlobStream to the field object specified by the Field parameter. Mode specifies whether the BLOB stream will be used to read data (bmRead), write data (bmWrite) or modify data (bmReadWrite).

Tip:	Because Client datasets sometimes fetch BLOB data on demand, it is a good idea to use the Client dataset’s CreateBlobStream method rather than calling the Client BLOB stream’s constructor. CreateBlobStream ensures that BLOB data is fetched for the current record unless the FetchOnDemand property is False.


TClientBlobStream.Destroy
 VCL Reference

TClientBlobStream.Destroy

TClientBlobStream	See also

Frees an instance of TClientBlobStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead call Free. Free verifies that the TBlobStream object is not nil and only then calls Destroy.

Destroy the TClientBlobStream object by calling Free when it is no longer needed for reading from or writing to the BLOB field. Client blob streams should be destroyed when the client dataset changes the current record

Destroy triggers an OnDataChange event if the BLOB stream was used to overwrite or modify the data in the field. Destroy then frees any buffers that were allocated to handle the data.


TClientBlobStream.Truncate
 VCL Reference

TClientBlobStream.Truncate

TClientBlobStream	See also

Discards all data in the BLOB field from the current position on.

procedure Truncate;

Description

Use Truncate to limit the size of the BLOB data. Calling Truncate does the same thing as setting the Size property to the value of the Position property. Calling Truncate when the current position is 0 clears the contents of the BLOB field.

Note:	Do not call Truncate when the TBlobStream was created in bmRead mode.


TClientBlobStream.Write
 VCL Reference

TClientBlobStream.Write

TClientBlobStream	See also

Writes Count bytes from Buffer to the current position in the field and updates the current position by Count bytes.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to write Count bytes to the BLOB field, starting at the current position. The Write method for TClientBlobStream always writes the entire Count bytes, as BLOB data does not necessarily include a termination character. Thus, Write is equivalent to the WriteBuffer method.

All the other data-writing methods of a BLOB stream (WriteBuffer, WriteComponent) call Write to do their actual writing.

Note:	Do not call Write when the TClientBlobStream was created in bmRead mode.


Hierarchy

TObject

TStream

TCustomMemoryStream

TMemoryStream

TClientBlobStream


TCGIApplication
 VCL Reference

TCGIApplication

Hierarchy	Properties	Methods	Using TCGIApplication	See also

TCGIApplication encapsulates a CGI server application.

Unit

CGIApp

Description

TCGIApplication provides the fundamental behavior of a CGI server application. TCGIApplication starts running when the CGI server receives an HTTP request message. It creates TCGIRequest and TCGIResponse objects to represent the request message and any response that should be sent in return, passes these to the dispatcher so that the response can be filled in, and sends the response if it was not already sent by a TWebActionItem.

Each CGI server project automatically declares an Application variable of type TCGIApplication as the instance of the application. This declaration overrides the Application variable declared in the Forms unit if the CGIApp unit is declared last in the uses list of the project file. Every CGI server application must include the CGIApp unit.

To work with an Apache server, use the TApacheApplication object.  To work with an ISAPI or NSAPI server, use the TISAPIApplication object instead.


 VCL Reference

TCGIApplication properties

TCGIApplication	Alphabetically	Legend

Derived from TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCGIApplication properties

TCGIApplication	By object	Legend

ActiveCount

CacheConnections

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

VCLComObject

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


 VCL Reference

TCGIApplication methods

TCGIApplication	Alphabetically	Legend

In TCGIApplication

Destroy

Run

Derived from TWebApplication

Create

CreateForm

Initialize

Derived from TWebRequestHandler

AddWebModuleFactory

HandleException

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCGIApplication methods

TCGIApplication	By object	Legend

AddWebModuleFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

UpdateAction


TCGIApplication.Destroy
 VCL Reference

TCGIApplication.Destroy

TCGIApplication

Frees the memory associated with the TCGIApplication object.

destructor Destroy; override;

Description

Do not call Destroy. The global Application variable is freed when the application shuts down.


TCGIApplication.Run
 VCL Reference

TCGIApplication.Run

TCGIApplication	See also

Run executes the CGI application in response to an HTTP request message.

procedure Run; override;

Description

When creating a new project, Delphi automatically creates a main program block in the project file that calls the Run method. When the application is started in response to an HTTP request message, the CGI application’s Run method is called.

After calling the inherited Run method to set up the default error handler and shut down sequence for the application, TCGIApplication.Run creates the appropriate request and response objects for the HTTP request message that started the CGI application. Run calls the HandleRequest method to pass the request and response on to the dispatcher where the response is filled out and sent. Finally, Run frees the request and response objects.


Hierarchy

TObject

TPersistent

TComponent

TWebApplication

TCGIApplication


TCGIRequest
 VCL Reference

TCGIRequest

Hierarchy	Properties	Methods	Using TCGIRequest	See also

TCGIRequest represents client request information that is passed to a CGI Web server application.

Unit

CGIHTTP

Description

Use TCGIRequest to interpret an HTTP request to a CGI server application.

CGI application objects create TCGIRequest objects to capture client requests. The properties of TCGIRequest are obtained from the Web server. The CGI application uses TCGIRequest objects to create corresponding TCGIResponse objects. The TWebDispatcher for the application then invokes the TWebActionItem that is associated with the path portion of the URL of the TCGIRequest object.


 VCL Reference

TCGIRequest properties

TCGIRequest	Alphabetically	Legend

Derived from TWebRequest

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TCGIRequest properties

TCGIRequest	By object	Legend

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TCGIRequest methods

TCGIRequest	Alphabetically	Legend

In TCGIRequest

Create

GetFieldByName

ReadClient

ReadString

TranslateURI

WriteClient

WriteHeaders

WriteString

Derived from TWebRequest

Destroy

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCGIRequest methods

TCGIRequest	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

FieldAddress

Free

FreeInstance

GetFieldByName

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadClient

ReadString

SafeCallException

TranslateURI

WriteClient

WriteHeaders

WriteString


TCGIRequest.Create
 VCL Reference

TCGIRequest.Create

TCGIRequest	See also

Creates an instance of TCGIRequest.

constructor Create;

Description

Applications shouldn’t need to directly instantiate a CGI request object. The TCGIApplication object creates a TCGIRequest object whenever it receives a client request.


TCGIRequest.GetFieldByName
 VCL Reference

TCGIRequest.GetFieldByName

TCGIRequest	See also

Provides a method that returns the value of the HTTP header variable specified by the Name parameter.

function GetFieldByName(const Name: string): string; override;

Description

Use GetFieldByName to read the value of an HTTP header variable that is not surfaced as one of the properties of TCGIRequest. For information on possible HTTP request header variables, see the current Internet standards documents.


TCGIRequest.ReadClient
 VCL Reference

TCGIRequest.ReadClient

TCGIRequest	See also

Provides a method to read from the HTTP request into a buffer.

function ReadClient(var Buffer; Count: Integer): Integer; override;

Description

Use ReadClient to get the next chunk of information when the content of the request message is too large for the Content property.

Use Buffer to provide a buffer to contain the content information. Use Count to specify the number of bytes to read. ReadClient returns the number of bytes actually read.


TCGIRequest.ReadString
 VCL Reference

TCGIRequest.ReadString

TCGIRequest	See also

Provides the method to read Count bytes from the HTTP request into a string.

function ReadString(Count: Integer): string; override;

Description

ReadString is used to load content information from the HTTP request into a string. Use ReadString to get the next chunk of information when the content of the request message is too large for the Content property.


TCGIRequest.TranslateURI
 VCL Reference

TCGIRequest.TranslateURI

TCGIRequest	See also

Provides a method to translate a Uniform Resource Identifier (URI) into an internal representation of a location on the server.

function TranslateURI(const URI: string): string; override;

Description

Descendants of TCGIRequest implement TranslateURI. TranslateURI is used to translate the URI specified in a client request into a format that can be used by the server application. TranslateURI is not relevant to CGI applications.


TCGIRequest.WriteClient
 VCL Reference

TCGIRequest.WriteClient

TCGIRequest	See also

Provides a method to write Count bytes from Buffer back to the HTTP client.

function WriteClient(var Buffer; Count: Integer): Integer; override;

Description

WriteClient is used by TCGIResponse to send the contents of a response to the CGI client.


TCGIRequest.WriteHeaders
 VCL Reference

TCGIRequest.WriteHeaders

TCGIRequest	See also

Provides a method for writing an HTTP header string.

function WriteHeaders(StatusCode: Integer; const StatusString, Headers: string): Boolean; override;

Description

Use WriteHeaders to write an HTTP header string.


TCGIRequest.WriteString
 VCL Reference

TCGIRequest.WriteString

TCGIRequest	See also

Provides a method for writingthe string AString back to the HTTP client.

function WriteString(const AString: string): Boolean; override;

Description

WriteString is used by TCGIResponse to send the contents of a response to the CGI client.


Hierarchy

TObject

TWebRequest

TCGIRequest


TCGIResponse
 VCL Reference

TCGIResponse

Hierarchy	Properties	Methods	Using TCGIResponse	See also

TCGIResponse represents HTTP messages sent by a CGI application in response to an HTTP request message.

Unit

CGIHTTP

Description

Use TCGIResponse to specify the response to an HTTP request message in a CGI application.

The CGI application creates a TCGIResponse object based on the TCGIRequest object for an incoming web client request message. The TWebDispatcher for the application then passes the TCGIResponse object to the TWebActionItem associated with the TCGIRequest object. The TWebActionItem sets the properties of the TCGIResponse object.


 VCL Reference

TCGIResponse properties

TCGIResponse	Alphabetically	Legend

Derived from TWebResponse

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TCGIResponse properties

TCGIResponse	By object	Legend

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TCGIResponse methods

TCGIResponse	Alphabetically	Legend

In TCGIResponse

Create

SendRedirect

SendResponse

SendStream

Sent

Derived from TWebResponse

Destroy

GetCustomHeader

SetCookieField

SetCustomHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCGIResponse methods

TCGIResponse	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetCustomHeader

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SendRedirect

SendResponse

SendStream

Sent

SetCookieField

SetCustomHeader


TCGIResponse.Create
 VCL Reference

TCGIResponse.Create

TCGIResponse	See also

Creates an instance of TCGIResponse to represent the response to the HTTPRequest parameter.

constructor Create(HTTPRequest: TWebRequest);

Description

Applications shouldn’t need to call Create to instantiate a CGI response object. The TCGIApplication object creates a TCGIResponse for each TCGIRequest it creates.


TCGIResponse.SendRedirect
 VCL Reference

TCGIResponse.SendRedirect

TCGIResponse	See also

Sends the response with a StatusCode of 301 (Moved Permanently) and a Location of URI.

procedure SendRedirect(const URI: string);

Description

Call SendRedirect to redirect the web client request to another URI that is the proper target of the request. SendRedirect does the same thing as setting the StatusCode to 301, the Location to URI, and calling SendResponse.


TCGIResponse.SendResponse
 VCL Reference

TCGIResponse.SendResponse

TCGIResponse	See also

Sends the HTTP response message to the web client.

procedure SendResponse;

Description

Call SendResponse after setting the properties of the HTTP response object to specify the response that should be made to the web client. If the request should be redirected to another URI, it is more efficient to call SendRedirect instead.


TCGIResponse.SendStream
 VCL Reference

TCGIResponse.SendStream

TCGIResponse	See also

Sends the HTTP response message with the contents set to the contents of AStream.

procedure SendStream(AStream: TStream);

Description

Only call SendStream after first calling SendResponse. Unlike SendStream, SendResponse fills the header of the HTTP response message, based on the properties of the TCGIResponse object. If SendResponse has not been called first to set the header of the HTTP response message, set the ContentStream property to AStream, and call SendResponse.


TCGIResponse.Sent
 VCL Reference

TCGIResponse.Sent

TCGIResponse	See also

Indicates whether the HTTP response message has already been sent.

function Sent: Boolean;

Description

TCGIResponse checks whether the message was sent and returns True or False as appropriate.

TCGIApplication objects read Sent and send unsent responses to the web client.


Hierarchy

TObject

TWebResponse

TCGIResponse


TWinCGIRequest
 VCL Reference

TWinCGIRequest

Hierarchy	Properties	Methods	Using TWinCGIRequest	See also

TWinCGIRequest represents client request information that is passed to a Windows hosted CGI Web server application.

Unit

CGIHTTP

Description

Use TWinCGIRequest to interpret a client request to a Windows hosted CGI Web server application.

CGI application objects create TWinCGIRequest objects to capture client requests. The properties of the TWinCGIRequest objects are obtained from the Web server. The CGI application uses TWinCGIRequest objects to create corresponding TWinCGIResponse objects. The TWebDispatcher object for the application then invokes the TWebActionItem that is associated with the path portion of the URL of the TWinCGIRequest object.


 VCL Reference

TWinCGIRequest properties

TWinCGIRequest	Alphabetically	Legend

Derived from TWebRequest

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TWinCGIRequest properties

TWinCGIRequest	By object	Legend

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TWinCGIRequest methods

TWinCGIRequest	Alphabetically	Legend

In TWinCGIRequest

Create

Destroy

GetFieldByName

ReadClient

ReadString

WriteClient

WriteString

Derived from TWebRequest

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

GetDateVariable

GetFieldByName

GetIntegerVariable

GetStringVariable

TranslateURI

WriteClient

WriteHeaders

WriteString

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWinCGIRequest methods

TWinCGIRequest	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

FieldAddress

Free

FreeInstance

GetFieldByName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetStringVariable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadClient

ReadString

SafeCallException

TranslateURI

WriteClient

WriteHeaders

WriteStringTRequest_WriteString>main


TWinCGIRequest.Create
 VCL Reference

TWinCGIRequest.Create

TWinCGIRequest	See also

Creates an instance of TWinCGIRequest.

constructor Create(IniFileName, ContentFile, OutputFile: string);

Description

Applications shouldn’t need to call Create to instantiate a CGI request object. The TCGIApplication object creates a TWinCGIRequest object whenever it receives a client request.


TWinCGIRequest.Destroy
 VCL Reference

TWinCGIRequest.Destroy

TWinCGIRequest	See also

Destroys an instance of TWinCGIRequest.

destructor Destroy; override;

Description

Do not call Destroy. TCGIApplication destroys the TWinCGIRequest object after it is processed by calling the Free method.

Destroy frees the internal structures used to manage the HTTP header variables.


TWinCGIRequest.GetFieldByName
 VCL Reference

TWinCGIRequest.GetFieldByName

TWebRequest	See also

A specific GetFieldByName method for the TWinCGIRequest object.

function GetFieldByName(const Name: string): string; virtual; abstract;

Description

GetFieldByName returns the Name field found in the Extra Headers section of the initialization file specified by the application.


TWinCGIRequest.ReadClient
 VCL Reference

TWinCGIRequest.ReadClient

TWinCGIRequest	See also

A specific method for reading from the HTTP request into a buffer.

function ReadClient(var Buffer; Count: Integer): Integer; virtual; abstract;

Description

ReadClient is a specific instance of the method ReadClient (inherited from TWebRequest) for the class TWinCGIRequest. See the documentation for the inherited method for more information.


TWinCGIRequest.ReadString
 VCL Reference

TWinCGIRequest.ReadString

TWinCGIRequest	See also

A specific method for reading Count bytes from the HTTP request into a string.

function ReadString(Count: Integer): string; virtual; abstract;

Description

ReadString is a specific instance of the method ReadString (inherited from TWebRequest) for the class TWinCGIRequest. See the documentation for the inherited method for more information.


TWinCGIRequest.WriteClient
 VCL Reference

TWinCGIRequest.WriteClient

TWinCGIRequest	See also

A specific method for writing Count bytes from Buffer back to the HTTP client.

function WriteClient(var Buffer; Count: Integer): Integer; virtual; abstract;

Description

WriteClient is a specific instance of the method WriteClient (inherited from TWebRequest) for the class TWinCGIRequest. See the documentation for the inherited method for more information.


TWinCGIRequest.WriteString
 VCL Reference

TWinCGIRequest.WriteString

TWinCGIRequest	See also

A specific method for writing the string AString back to the HTTP client.

function WriteString(const AString: string): Boolean; virtual; abstract;

Description

WriteString is a specific instance of the method WriteString (inherited from TWebRequest) for the class TWinCGIRequest. See the documentation for the inherited method for more information.


Hierarchy

TObject

TWebRequest

TCGIRequest

TWinCGIRequest


TWinCGIResponse
 VCL Reference

TWinCGIResponse

Hierarchy	Properties	Methods	Using TWinCGIResponse	See also

TWinCGIResponse represents HTTP messages sent by a Windows hosted CGI application in response to an HTTP request message.

Unit

CGIHTTP

Description

Use TWinCGIResponse to specify the response to an HTTP request message.

A CGI application creates a TWinCGIResponse object based on the TWinCGIRequest object for an incoming web client request message. The Web dispatcher for the application then passes the TWinCGIResponse object to the TWebActionItem associated with the TWinCGIRequest object. The TWebActionItem sets the properties of the TWinCGIResponse object.


 VCL Reference

TWinCGIResponse properties

TWinCGIResponse	Alphabetically	Legend

Derived from TWebResponse

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TWinCGIResponse properties

TWinCGIResponse	By object	Legend

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TWinCGIResponse methods

TWinCGIResponse	Alphabetically	Legend

Derived from TWebResponse

Destroy

GetCustomHeader

SetCookieField

SetCustomHeader

Create

SendRedirect

SendResponse

SendStream

Sent

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWinCGIResponse methods

TWinCGIResponse	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetCustomHeader

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SendRedirect

SendResponse

SendStream

Sent

SetCookieField

SetCustomHeader


Hierarchy

TObject

TWebResponse

TCGIResponse

TWinCGIResponse


TCheckConstraints
 VCL Reference

TCheckConstraints

Hierarchy	Properties	Methods	See also

TCheckConstraints contains a collection of check constraints for a dataset component.

Unit

DB

Description

BDE-enabled and client dataset components support check constraints that define the values that can be entered into a single record. The TCheckConstraints object maintains the collection of check constraints that apply to a given dataset.


 VCL Reference

TCheckConstraints properties

TCheckConstraints	Alphabetically	Legend

In TCheckConstraints

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TCheckConstraints properties

TCheckConstraints	By object	Legend

Count

ItemClass

Items


TCheckConstraints.Items
 VCL Reference

TCheckConstraints.Items

TCheckConstraints	See also

Maintains an indexed array of check constraints.

property Items[Index: Integer]: TCheckConstraint;

Description

Use Items to access individual check constraints that apply to the dataset component that owns this check constraint collection.


 VCL Reference

TCheckConstraints methods

TCheckConstraints	Alphabetically	Legend

In TCheckConstraints

Add

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCheckConstraints methods

TCheckConstraints	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCheckConstraints.Add
 VCL Reference

TCheckConstraints.Add

TCheckConstraints	See also

Adds a check constraint to the list maintained by this collection object.

function Add: TCheckConstraint;

Description

Call Add to add another check constraint to those known to the dataset component that owns this check constraint object. After adding a check constraint, set its properties to provide the SQL that defines the constraint.


TCheckConstraints.Create
 VCL Reference

TCheckConstraints.Create

TCheckConstraints	See also

Instantiates an instance of a check constraint collection object.

constructor Create(Owner: TPersistent);

Description

Most applications do not need to instantiate TCheckConstraints. This object is created by the dataset that uses it to implement its Constraints property.

Call Create to instantiate a check constraint collection at runtime when you need a collection object and it has not been created automatically for you. Create calls its inherited constructor, and sets the collection’s owner object to Owner.


Hierarchy

TObject

TPersistent

TCollection

TCheckConstraints


TCookieCollection
 VCL Reference

TCookieCollection

Hierarchy	Properties	Methods	See also

TCookieCollection is a collection of TCookie objects.

Unit

HTTPApp

Description

Use TCookieCollection to represent all the Cookie headers of an HTTP response message.  Each Cookie header is represented by a single TCookie object.  A Cookie header includes a named field with an associated value, of the form Name=Value, plus a number of other, standard fields that specify the destination of the cookie, when the cookie is valid, and so on.  Web clients pass Cookie headers on to the destinations specified by the fields of the Cookie header.


 VCL Reference

TCookieCollection properties

TCookieCollection	Alphabetically	Legend

In TCookieCollection

Items

WebResponse

Derived from TCollection

Count

ItemClass


 VCL Reference

TCookieCollection properties

TCookieCollection	By object	Legend

Count

ItemClass

Items

WebResponse


TCookieCollection.Items
 VCL Reference

TCookieCollection.Items

TCookieCollection	See also

Provides indexed access to the TCookie objects in the collection.

property Items[Index: Integer]:TCookie; default;

Description

Use Items to access the properties of the TCookie objects maintained by TCookieCollection. Items is the default property of TCookieCollection, so the name of the Items property can be left off when using this property. Thus the line

FirstCookie := TApacheResponse1.Cookies.Items[0];

can be written

FirstCookie := TApacheResponse1.Cookies[0];


TCookieCollection.WebResponse
 VCL Reference

TCookieCollection.WebResponse

TCookieCollection

Indicates the TWebResponse object that uses the cookie collection to represent all of its Cookie headers.

property WebResponse: TWebResponse;

Description

Read WebResponse to access the response object that is using the cookie collection.  The response object is a descendant of TWebResponse, either TISAPIResponse,TWinCGIResponse,TCGIResponse, or TApacheResponse, depending on the type of Web server application.

Use the properties of the response object to obtain information about the other headers in the response message or the content of the response message.  Many applications use this information to determine what field values to specify as Cookie headers.


 VCL Reference

TCookieCollection methods

TCookieCollection	Alphabetically	Legend

In TCookieCollection

Add

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCookieCollection methods

TCookieCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TCookieCollection.Add
 VCL Reference

TCookieCollection.Add

TCookieCollection	See also	Example

Creates a new TCookie object and adds it to the end of the Items property array.

function Add: TCookie;

Description

Call Add to add a new Cookie header to the set of cookie headers sent with the Web response message.  Use Add when adding a Cookie header whose fields will be set at a later time. If the values of the TCookie properties are known at the time of creation, use the SetCookieField method of the Web response object instead.


TCookieCollection.Create
 VCL Reference

TCookieCollection.Create

TCookieCollection

Creates and initializes a TCookieCollection object.

constructor Create(WebResponse: TWebResponse; ItemClass: TCollectionItemClass);

Description

Applications should not need to call the Create method directly.  The Web response object that uses the cookie collection to represent its Cookie headers creates the TCookieCollection object from its own constructor.


Hierarchy

TObject

TPersistent

TCollection

TCookieCollection


TClientDataSet
 VCL Reference

 TClientDataSet

Hierarchy	Properties	Methods	Events	Using TClientDataSet	See also

TClientDataSet implements a database-independent dataset.

Unit

DBClient

Description

TClientDataSet represents an in-memory dataset. A client dataset can be used as

A fully-functional, standalone, file-based dataset for single-tiered database applications. When used in this manner, the client dataset represents the data stored in a dedicated file on the user’s hard disk.

A local in-memory buffer of the records from another dataset. The other (source) dataset can reside in the same form or data module as the client dataset (for example, when the client dataset provides navigation and editing support for the data from a unidirectional dataset). The source dataset can also reside on a separate system when the client dataset supports the client portion of a multi-tiered database application.

Note:	The two functions described above are not mutually exclusive. An application can be designed to support the option of working with data off-line, using the “briefcase” model. On site, the application uses TClientDataSet to communicate with the database server associated with a source dataset. When a user works off site, the client dataset writes a snapshot of the data to the hard disk.  The application works with this snapshot off site, with the client dataset acting as a file-based dataset in a single-tiered application.

When a client dataset represents the data from another dataset, it communicates with that dataset through a dataset provider. The client dataset communicates with this provider through the IAppServer interface. When the provider is in the same form or data module as the client dataset, the IAppServer interface is implemented by a hidden object that is created for you. When used in a client application as part of a multi-tiered application, the client dataset passes all calls to the provider through a remote data module’s IAppServer interface.


 VCL Reference

TClientDataSet properties

TClientDataSet	Alphabetically	Legend

Derived from TCustomClientDataSet

Active

ActiveAggs

Aggregates

AggregatesActive

AppServer

CanModify

ChangeCount

CloneSource

CommandText

ConnectionBroker

Data

DataSetField

DataSize

DataSource

Delta

DisableStringTrim

FetchOnDemand

FileName

Filter

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

PacketRecords

Params

ProviderName

ReadOnly

RecNo

RecordCount

RecordSize

RemoteServer

SavePoint

StatusFilter

StoreDefs

XMLData

Derived from TDataSet

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

Constraints

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TClientDataSet properties

TClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectionBroker

Constraints

Data

DataSetField

DataSize

DataSource

DefaultFields

Delta

Designer

DesignInfo

DisableStringTrim

Eof

FetchOnDemand

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FileName

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

Modified

Name

ObjectView

Owner

PacketRecords

Params

ProviderName

ReadOnly

RecNo

RecordCount

RecordSize

RemoteServer

SavePoint

SparseArrays

State

StatusFilter

StoreDefs

Tag

VCLComObject

XMLData


 VCL Reference

TClientDataSet events

TClientDataSet	Alphabetically	Legend

Derived from TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TClientDataSet events

TClientDataSet	By object	Legend

AfterApplyUpdates

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterExecute

AfterGetParams

AfterGetRecords

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterRowRequest

AfterScroll

BeforeApplyUpdates

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeRowRequest

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnReconcileError


 VCL Reference

TClientDataSet methods

TClientDataSet	Alphabetically	Legend

Derived from TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CloneCursor

CompareBookmarks

ConstraintsDisabled

Create

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

Destroy

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetFieldData

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

Post

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TClientDataSet methods

TClientDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet

TClientDataSet


TColumn
 VCL Reference

TColumn

Hierarchy	Properties	Methods	See also

TColumn represents a column in a data grid (TDBGrid).

Unit

DBGrids

Description

Each TDBGrid uses a TDBGridColumns to maintain a collection of TColumn objects. Each TColumn object represents the visual characteristics and data binding of a column in the grid.


 VCL Reference

TColumn properties

TColumn	Alphabetically	Legend

In TColumn

Alignment

AssignedValues

ButtonStyle

Color

DisplayName

DropDownRows

Expandable

Expanded

Field

FieldName

Font

Grid

ImeMode

ImeName

ParentColumn

PickList

PopupMenu

ReadOnly

Showing

Title

Visible

Width

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TColumn properties

TColumn	By object	Legend

Alignment

AssignedValues

ButtonStyle

Collection

Color

DisplayName

DropDownRows

Expandable

Expanded

Field

FieldName

Font

Grid

ID

ImeMode

ImeName

Index

ParentColumn

PickList

PopupMenu

ReadOnly

Showing

Title

Visible

Width


TColumn.Alignment
 VCL Reference

TColumn.Alignment

TColumn	See also

Specifies how text is aligned within the column.

property Alignment: TAlignment;

Description

Use Alignment to specify whether values should be left-justified, right-justified, or centered in the column.

These are the possible values of Alignment:

Value	Meaning

taLeftJustify	Align text on the left side of the column.

taCenter	Center text in the column.


TColumn.AssignedValues
 VCL Reference

TColumn.AssignedValues

TColumn	See also

Indicates which TColumn and TColumnTitle properties have been set.

type

TColumnValue = (cvColor, cvWidth, cvFont, cvAlignment, cvReadOnly, cvTitleColor, cvTitleCaption, cvTitleAlignment, cvTitleFont, cvImeMode, cvImeName);

TColumnValues = set of TColumnValue;

property  AssignedValues: TColumnValues;

Description

The read-only AssignedValues lists properties of the column and its title (TColumnTitle) which have been set or whose default values have been changed. AssignedValues is a set of zero or more of the following:

Value	Indicates changes to

cvColor	The column’s Color property.

cvWidth	The column’s Width property.

cvFont	The column’s Font property.

cvAlignment	The column’s Alignment property.

cvReadOnly	The column’s ReadOnly property.

cvTitleColor	The column title’s Color property.

cvTitleCaption	The column title’s Caption property.

cvTitleAlignment	The column title’s Alignment property.

cvTitleFont	The column title’s Font property.

cvImeMode	The column’s ImeMode property.

cvImeName	The column’s ImeName property.

For example, if AssignedValues returns [cvColor, cvTitleCaption], then the column’s font and title caption have been changed and no longer track with changes made to their default source.

Many column properties obtain their values from external sources, such as properties of the associated TField objects. Until a value is assigned to a column property, changes made to the property’s default source will be reflected by the column. After assignment, the column property is independent of its default source.


TColumn.ButtonStyle
 VCL Reference

TColumn.ButtonStyle

TColumn	See also

Determines whether and how the user can select values for the column from a list.

type TColumnButtonStyle = (cbsAuto, cbsEllipsis, cbsNone);

property ButtonStyle: TColumnButtonStyle;

Description

The ButtonStyle property determines how users can edit the data of a data-grid column. These are the possible values of ButtonStyle:

Value	Meaning

cbsAuto	If the column is associated with a lookup field or has a value assigned to its PickList property, the grid displays a combo box in the column. The user can choose a value from the drop-down list.

cbsEllipsis	The column displays an ellipsis button that the user can click to choose a value. Clicking the ellipsis button triggers an OnEditButtonClick event.

cbsNone	No combo box or ellipsis button is provided. The user cannot select the column’s content from a list.


TColumn.Color
 VCL Reference

TColumn.Color

TColumn

Specifies the background color for the column.

property Color: TColor;

Description

The Color property determines the background color of the data-grid column. You can set Color to one of the constants defined in the Graphics unit (such as clBlue), or to an explicit RGB integer value.


TColumn.DisplayName
 VCL Reference

TColumn.DisplayName

TColumn	See also

Indicates the name of the column as it appears in the Collection editor.

property DisplayName: String;

Description

Set DisplayName to provide the column with a logical name. If DisplayName is not set explicitly, it has the same value as the FieldName property. If FieldName is also not set, DisplayName is a unique string based on the object’s class name (TColumn).


TColumn.DropDownRows
 VCL Reference

TColumn.DropDownRows

TColumn	See also

Specifies the number of lines displayed in the column’s drop-down list.

property DropDownRows: Cardinal;

Description

DropDownRows determines the number of lines of text displayed in the drop-down list associated with the column. This property is used only if ButtonStyle is set to cbsAuto and the column has a lookup field or pick list associated with it.


TColumn.Expandable
 VCL Reference

TColumn.Expandable

TColumn	See also

Specifies whether the column can be expanded to show any child field columns.

property Expandable: Boolean;

Description

Expandable will be False if the represented field is not an ADT, array, or reference field.


TColumn.Expanded
 VCL Reference

TColumn.Expanded

TColumn	See also

Specifies whether the column is expanded.

property Expanded: Boolean;

Description

Expanded only applies to columns that represent fields that are TObjectField descendants. When a column is expanded, a column appears for each child field of the object field. These child field columns each have a column title and appear under the column title of the parent object field. When Expanded is False, child field values are summarized in a comma-delimited string in the object field’s column, and cannot be edited.

Object fields can also be expanded and contracted at runtime through the UI by clicking on the triangle that appears next to its name in the column title.


TColumn.Field
 VCL Reference

TColumn.Field

TColumn	See also

Indicates the TField instance represented by the column.

property Field: TField;

Description

Field points to the TField object that corresponds to the dataset field displayed in the column. If the column does not correspond to a field in the dataset (for example, a calculated field), the value of Field can be nil.


TColumn.FieldName
 VCL Reference

TColumn.FieldName

TColumn	See also

Indicates the name of the field represented by the column.

property FieldName: String;

Description

Setting FieldName changes the Field property so that it points to the dataset field with the same name. If the dataset does not have a field with the same name, Field is set to nil.


TColumn.Font
 VCL Reference

TColumn.Font

TColumn	See also

Controls the font in which the column displays its data.

property Font: TFont;

Description

The Font property points to a TFont object that determines typographic attributes of text displayed in the column.


TColumn.Grid
 VCL Reference

TColumn.Grid

TColumn	See also

Indicates the grid that contains the column.

property Grid: TCustomDBGrid;

Description

Use the Grid property to access the grid that contains the column.


TColumn.ImeMode
 VCL Reference

TColumn.ImeMode

TColumn	See also

Determines the behavior of the input method editor (IME) when the column is edited.

property ImeMode: TImeMode;

Description

Set ImeMode to configure the way an IME processes user keystrokes when the user is editing the column. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application.

ImeMode allows the type of conversion performed by the IME to be tailored to the input expected for the column. For example, a column that only accepts numeric input might specify an ImeMode of imClose, as no conversion is necessary for numeric input.


TColumn.ImeName
 VCL Reference

TColumn.ImeName

TColumn	See also

Specifies the input method editor (IME) to use for converting keyboard input to Asian language characters.

type TImeName = typestring;

property ImeName: TImeName;

Description

Set ImeName to specify which IME to use for converting keystrokes when the user is editing the column. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application.

ImeName must specify one of the IMEs that has been installed through the Windows control panel. The property inspector provides a drop-down list of all currently installed IMEs on the system. At runtime, applications can obtain a list of currently installed IMEs from the global Screen variable.

If ImeName specifies an unavailable IME, the IME that was active when the application started is used instead. No exception is generated.


TColumn.ParentColumn
 VCL Reference

TColumn.ParentColumn

TColumn	See also

Refers to the TColumn object that owns the column.

property ParentColumn: TColumn;

Description

If the column represents a child field, ParentColumn refers to the column of the object field that parents the child field.


TColumn.PickList
 VCL Reference

TColumn.PickList

TColumn	See also

Lists values that the user can select for the column.

property PickList: TStrings;

Description

The PickList property points to a TStrings object. If ButtonStyle is cbsAuto, these strings appear in the drop-down list associated with the column.


TColumn.PopupMenu
 VCL Reference

TColumn.PopupMenu

TColumn	See also

Identifies the pop-up menu associated with the column.

property PopupMenu: TPopupMenu;

Description

Assign a value to PopupMenu to make a pop-up menu appear when the user clicks the right mouse button on the column. If the TPopupMenu’s AutoPopup property is True, the pop-up menu appears automatically. If the menu’s AutoPopup property is False, display the menu with a call to its Popup method.


TColumn.ReadOnly
 VCL Reference

TColumn.ReadOnly

TColumn	See also

Determines whether data displayed in the column is editable.

property ReadOnly: Boolean;

Description

If ReadOnly is set to True, data displayed in the column cannot be changed by the user at runtime. If ReadOnly is set to False (and the data grid’s Options property includes the dgEditing flag), users can edit data directly from the grid.


TColumn.Showing
 VCL Reference

TColumn.Showing

TColumn	See also

Indicates whether the column is showing.

property Showing: Boolean!ALink(boolean_type, 1,TopicNotFound,main);

Description

Showing will return True if Visible is True and Expanded is False, and if the field represented is the child of an object field, if the parent column is expanded.


TColumn.Title
 VCL Reference

TColumn.Title

TColumn	See also

Indicates the TColumnTitle that represents the column’s title.

property Title: TColumnTitle;

Description

The Title property points to a TColumnTitle object that determines attributes of the column’s title. If FieldName is set, the value of FieldName becomes the default column title (TColumnTitle.Caption).

The title (TColumnTitle.Caption) appears at runtime only if the dgTitles flag is set in the data grid’s Options property.


TColumn.Visible
 VCL Reference

TColumn.Visible

TColumn	See also

Specifies whether the column is visible in the grid.

property Visible: Boolean;

Description

To hide a column in the grid, set Visible to False. If Visible is True, and the field’s Visible property is True, the column will appear in the grid. This property only determines whether the column is allowed to be drawn/shown. The Showing property reflects the actual displayability of the column based on additional factors.


TColumn.Width
 VCL Reference

TColumn.Width

TColumn	See also

The width of the column.

property Width: Integer;

Description

The Width property determines the width of the column, in pixels. If the dgColumnResize flag is set in the data grid’s Options property, users can resize the column at runtime.


 VCL Reference

TColumn methods

TColumn	Alphabetically	Legend

In TColumn

Assign

Create

DefaultAlignment

DefaultColor

DefaultFont

DefaultImeMode

DefaultImeName

DefaultReadOnly

DefaultWidth

Depth

Destroy

RestoreDefaults

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TColumn methods

TColumn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultAlignment

DefaultColor

DefaultFont

DefaultHandler

DefaultImeMode

DefaultImeName

DefaultReadOnly

DefaultWidth

Depth

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


TColumn.Assign
 VCL Reference

TColumn.Assign

TColumn	See also

Copies the contents of the source column to a new column.

procedure Assign(Source: TPersistent); override;

Description

Assign creates a new column with the same FieldName, Title, DropDownRows, ButtonStyle, and PickList values as the source object. Color, Width, Font, Alignment, and ReadOnly are also copied if AssignedValues indicates that they have been changed.


TColumn.Create
 VCL Reference

TColumn.Create

TColumn	See also

Creates and initializes a data-grid column.

constructor Create(Collection: TCollection); override;

Description

Call Create to instantiate a TColumn object. Create should take a TDBGridColumns instance as its argument. It creates a data-grid column along with its title (TColumnTitle) and font (TFont).


TColumn.DefaultAlignment
 VCL Reference

TColumn.DefaultAlignment

TColumn	See also

Returns the default alignment for the column.

function DefaultAlignment: TAlignment;

Description

Use DefaultAlignment to determine the alignment of the data in the column when the Alignment property has not been explicitly set. DefaultAlignment returns the Alignment property of the TField associated with the column. If the column has no dataset field associated with it, DefaultAlignment returns taLeftJustify.


TColumn.DefaultColor
 VCL Reference

TColumn.DefaultColor

TColumn	See also

Returns the default background color for the column.

function DefaultColor: TColor;

Description

Use Default color to determine the color of the column when the Color property is not explicitly set. DefaultColor returns the Color of the data grid to which the column belongs. If the column has no associated data grid, DefaultColor returns clWindow.


TColumn.DefaultFont
 VCL Reference

TColumn.DefaultFont

TColumn	See also

Returns the default font for data displayed in the column.

function DefaultFont: TFont;

Description

DefaultFont returns the Font of the data grid to which the column belongs. If the column has no associated data grid, DefaultFont returns the current value of the column’s Font property.


TColumn.DefaultImeMode
 VCL Reference

TColumn.DefaultImeMode

TColumn	See also

Describes the default behavior of the Input Method Editor (IME).

function  DefaultImeMode: TImeMode;

Description

DefaultImeMode returns the ImeMode property of the data grid to which the column belongs. If the column has no associated data grid, DefaultImeMode returns the current value of the column’s ImeMode property.


TColumn.DefaultImeName
 VCL Reference

TColumn.DefaultImeName

TColumn	See also

Returns the name of the default Input Method Editor (IME).

type

  TImeName = typeString;

function  DefaultImeName: TImeName;

Description

DefaultImeName returns the ImeName property of the data grid to which the column belongs. If the column has no associated data grid, DefaultImeName returns the current value of the column’s ImeName property.


TColumn.DefaultReadOnly
 VCL Reference

TColumn.DefaultReadOnly

TColumn	See also

Returns the default ReadOnly setting for the column.

function DefaultReadOnly: Boolean;

Description

Reflects the ReadOnly state of the grid and the grid’s dataset and field.


TColumn.DefaultWidth
 VCL Reference

TColumn.DefaultWidth

TColumn	See also

Returns the default width for the column.

function  DefaultWidth: Integer;

Description

The value of DefaultWidth is determined as follows:

If the column has no data grid associated with it, DefaultWidth returns 64.

If the column has an associated data grid but the Field property is empty, DefaultWidth returns data grid’s protected DefaultColWidth property. Usually, this value is 64.

If the column has an associated data field, DefaultWidth is calculated from the TField object’s DisplayWidth property using the column’s font.

If the dgTitles flag is set in the data grid’s Options property, DefaultWidth is increased (as necessary) to accommodate the column’s title caption.


TColumn.Depth
 VCL Reference

TColumn.Depth

TColumn	See also

Returns the position of the column in relation to any parent columns. A column with no parent column returns 0.

function Depth: Integer;

Description

If a column does not have any parent columns, Depth returns 0.  Columns with parent columns return a number equal to the number of parents it has. For example, a parentless ADT field called Date has a Depth of 0.  Its three child fields, Month, Day, and Year, each have a Depth of 1.


TColumn.Destroy
 VCL Reference

TColumn.Destroy

TColumn	See also

Destroys the column and frees its memory.

destructor Destroy; override;

Description

Destroy eliminates the TColumn instance along with its title (TColumnTitle), font (TFont), and pick list (TStrings).


TColumn.RestoreDefaults
 VCL Reference

TColumn.RestoreDefaults

TColumn	See also

Restores the column’s default settings.

procedure RestoreDefaults; virtual;

Description

RestoreDefaults reinitializes the AssignedValues, ButtonStyle, Font, and PickList properties, freeing the pick list (TStrings) object if there is one. It also calls the RestoreDefaults method in the column’s title (TColumnTitle) to restore the default properties of the column title.


Hierarchy

TObject

TPersistent

TCollectionItem

TColumn


TCOMAdminCatalog
 VCL Reference

TCOMAdminCatalog

Hierarchy	Properties	Methods	See also

TCOMAdminCatalog allows an application to act as an Automation controller for the COM+ administration tool.

Unit

CmAdmCtl

Description

Use TCOMAdminCatalog to automate the administration of COM+ applications and services. TCOMAdminCatalog lets you read and write information that is stored on the COM+ catalog, which holds all COM+ configuration data. TCOMAdminCatalog implements the ICOMAdminCatalog interface, to let you

Access collections on the catalog.

Install COM+ applications and components.

Start and stop services.

Connect to and administer remote servers.

Use the Connect method to access the COMAdminCatalog server. You can then use the methods of TCOMAdminCatalog to send commands that administer COM+ applications on this or another machine.


 VCL Reference

TCOMAdminCatalog properties

TCOMAdminCatalog	Alphabetically	Legend

In TCOMAdminCatalog

DefaultInterface

MajorVersion

MinorVersion

Derived from TOleServer

AutoConnect

ConnectKind

RemoteMachineName

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCOMAdminCatalog properties

TCOMAdminCatalog	By object	Legend

AutoConnect

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectKind

DefaultInterface

DesignInfo

MajorVersion

MinorVersion

Owner

RemoteMachineName

Tag

VCLComObject


TCOMAdminCatalog.DefaultInterface
 VCL Reference

TCOMAdminCatalog.DefaultInterface

TCOMAdminCatalog

Provides access to the default interface for the component.

property DefaultInterface: ICOMAdminCatalog;

Description

Use DefaultInterface to access the default interface for TCOMAdminCatalog. This is the ICOMAdminCatalog interface, whose properties and methods are surfaced as properties and methods of TCOMAdminCatalog.


TCOMAdminCatalog.MajorVersion
 VCL Reference

TCOMAdminCatalog.MajorVersion

TCOMAdminCatalog	See also

Indicates the major version number of the COMAdmin Library

property MajorVersion: Integer;

Description

Use MajorVersion to determine the major version number of the COMAdmin Library, which TCOMAdminCatalog uses to administer COM+ applications.


TCOMAdminCatalog.MinorVersion
 VCL Reference

TCOMAdminCatalog.MinorVersion

TCOMAdminCatalog	See also

Indicates the minor version number of the COMAdmin Library

property MinorVersion: Integer;

Description

Use MinorVersion to determine the minor version number of the COMAdmin Library, which TCOMAdminCatalog uses to administer COM+ applications.


 VCL Reference

TCOMAdminCatalog methods

TCOMAdminCatalog	Alphabetically	Legend

In TCOMAdminCatalog

BackupREGDB

Connect

ConnectTo

Create

Destroy

Disconnect

ExportApplication

GetCollection

GetCollectionByQuery

GetEventClassesForIID

GetMultipleComponentsInfo

Get_MajorVersion

Get_MinorVersion

ICOMAdminCatalog_Connect

ImportComponent

InstallApplication

InstallComponent

InstallEventClass

InstallMultipleComponents

InstallMultipleEventClasses

QueryApplicationFile

RefreshComponents

RefreshRouter

RestoreREGDB

ServiceCheck

ShutdownApplication

StartApplication

StartRouter

StopRouter

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCOMAdminCatalog methods

TCOMAdminCatalog	By object	Legend

AfterConstruction

Assign

BackupREGDB

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Connect

ConnectTo

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

ExportApplication

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

Get_MajorVersion

Get_MinorVersion

GetCollection

GetCollectionByQuery

GetEventClassesForIID

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMultipleComponentsInfo

GetNamePath

GetParentComponent

HasParent

ICOMAdminCatalog_Connect

ImportComponent

InheritsFrom

InitInstance

InsertComponent

InstallApplication

InstallComponent

InstallEventClass

InstallMultipleComponents

InstallMultipleEventClasses

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

QueryApplicationFile

ReferenceInterface

RefreshComponents

RefreshRouter

RemoveComponent

RemoveFreeNotification

RestoreREGDB

SafeCallException

ServiceCheck

SetSubComponent

ShutdownApplication

StartApplication

StartRouter

StopRouter

UpdateAction


TCOMAdminCatalog.Destroy
 VCL Reference

TCOMAdminCatalog.Destroy

TCOMAdminCatalog	See also

Frees an instance of TCOMAdminCatalog

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TCOMAdminCatalog component reference is not nil before calling Destroy. Destroy disconnects from the server, if necessary, before freeing the component.


TCOMAdminCatalog.Create
 VCL Reference

TCOMAdminCatalog.Create

TCOMAdminCatalog	See also

Creates a new instance of TCOMAdminCatalog.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCOMAdminCatalog at runtime. TCOMAdminCatalog objects added at design time are instantiated automatically.

Owner specifies the component (typically a form or data module) that is responsible for freeing the TCOMAdminCatalog instance.


TCOMAdminCatalog.BackupREGDB
 VCL Reference

TCOMAdminCatalog.BackupREGDB

TCOMAdminCatalog	See also

Backs up the COM+ class registration database to a specified file.

procedure BackupREGDB(const bstrBackupFilePath: WideString);

Description

Call BackupREGDB to back up the COM+ class registration database (RegDB). The database can be restored at a later date using the RestoreREGDB method.

bstrBackupFilePath specifies the fully-qualified name of the file to which RegDB will be backed up.


TCOMAdminCatalog.Connect
 VCL Reference

TCOMAdminCatalog.Connect

TCOMAdminCatalog	See also

Establishes a connection to the COM server that implements the COM+ administration catalog.

procedure Connect; override;

Description

Call Connect to connect the TCOMAdminCatalog component to the COM server it uses to administer the COM+ catalog data store. If the AutoConnect property is True, the TCOMAdminCatalog component automatically calls Connect when the application is first run.

Do not use Connect if the value of ConnectKind is ckAttachToInterface. When attaching to an interface, use the ConnectTo method instead.

If the value of ConnectKind is ckRemote, the RemoteMachineName property must be set before calling Connect.

Note:	Do not confuse Connect with the ICOMAdminCatalog_Connect method. Connect establishes a connection to the server that TCOMAdminCatalog represents, while ICOMAdminCatalog_Connect connects to a remote machine on which you want to administer COM+ applications and services.


TCOMAdminCatalog.ConnectTo
 VCL Reference

TCOMAdminCatalog.ConnectTo

TCOMAdminCatalog	See also

Connects the TCOMAdminCatalog component to an existing ICOMAdminCatalog interface.

procedure ConnectTo(svrIntf: ICOMAdminCatalog);

Description

Use ConnectTo when the ConnectKind property is ckAttachToInterface. ConnectTo allows the TCOMAdminCatalog to use an existing ICOMAdminCatalog interface rather than establishing a new connection to the server and obtaining a new interface.

If the ConnectKind property is not ckAttachToInterface, use the Connect method instead.


TCOMAdminCatalog.Disconnect
 VCL Reference

TCOMAdminCatalog.Disconnect

TCOMAdminCatalog	See also

Terminates the connection to the COM server.

procedure Disconnect; override;;

Description

Call Disconnect to release a connection formed using the Connect or ConnectTo method.


TCOMAdminCatalog.ExportApplication
 VCL Reference

TCOMAdminCatalog.ExportApplication

TCOMAdminCatalog	See also

Exports a COM+ application or application proxy to a file for installation on other machines.

procedure ExportApplication(const bstrApplIdOrName: WideString; const bstrApplicationFile: WideString; lOptions: Integer);

Description

Use ExportApplication to create a file that the InstallApplication method can use to install a COM+ application or application proxy on other machines.

bstrApplIdOrName is the name or GUID that identifies the application to be exported.

bstrApplicationFile is the name of the file to which ExportApplication exports bstrApplIDOrName. This file name should include the file path. If you do not provide a file name, ExportApplication creates a file with the same name as the application in the default directory.

lOptions indicate how the application should be exported. The value of lOptions is a sum that represents a set of the following flags.

Flag	Meaning

0	Do not export users with roles.

1	Export users with roles.

2	Export application as an application proxy.

4	Overwrite files.

If no option flags are provided, ExportApplication exports the specified COM+ application to an MSI file, without the users assigned to application roles.


TCOMAdminCatalog.GetCollection
 VCL Reference

TCOMAdminCatalog.GetCollection

TCOMAdminCatalog	See also

Returns a TCOMAdminCatalogCollection object for a specified collection.

function GetCollection(const bstrCollName: WideString): TCOMAdminCatalogCollection;

Description

GetCollection retrieves a top-level collection from the COM+ catalog, such as Applications. Subcollections (collections that are not top-level collections, such as Components) must be fetched using the GetCollection method of their parent collection or using the GetCollectionByQuery method.

bstrCollName is the name of the desired collection. The available collections depend on your version of the COMAdmin Library. See the Microsoft documentation for a list of the available collections in your version of the COMAdmin Library.

Note:	The TCOMAdminCatalogCollection object that GetCollection returns does not contain data from the catalog for items contained in the collection. Use the Populate method to read in data for items in the collection.


TCOMAdminCatalog.GetCollectionByQuery
 VCL Reference

TCOMAdminCatalog.GetCollectionByQuery

TCOMAdminCatalog	See also

Retrieves a collection from the COM+ catalog given all of its parent items.

function GetCollectionByQuery(const bstrCollName: WideString; var aQuery: PSafeArray): TCOMAdminCatalogCollection;

Description

Call GetCollectionByQuery to obtain a collection on the catalog given the Key property of each of its parent items. The Key property for each parent item is a GUID that uniquely identifies it on the COM+ catalog.

bstrCollName is the name of the desired collection. The available collections depend on your version of the COMAdmin Library. See the Microsoft documentation for a list of the available collections in your version of the COMAdmin Library.

aQuery is a safe array of containing the Key property for each parent item of the desired collection.

Note:	If bstrCollName is ‘ErrorInfo’, ‘RelatedCollectionInfo’, or ‘PropertyInfo’, GetCollectionByQuery ignores the aQuery parameter and returns the named collection immediately relative to the Root collection. To obtain these collections relative to an arbitrary collection in the catalog, use the GetCollection method of the parent collection.

Note:	The TCOMAdminCatalogCollection object that GetCollectionByQuery returns does not contain data from the catalog for items contained in the collection. Use the Populate method to read in data for items in the collection.


TCOMAdminCatalog.GetEventClassesForIID
 VCL Reference

TCOMAdminCatalog.GetEventClassesForIID

TCOMAdminCatalog	See also

Retrieves a list of event classes that implement a specified interface.

procedure GetEventClassesForIID(const bstrIID: WideString; out varCLSIDS: PSafeArray; out varProgIDs: PSafeArray; out varDescriptions: PSafeArray);

Description

Call GetEventClassesForIID to determine the available COM+ event objects that implement a specified interface.

bstrIID is the GUID for the interface that you want the event classes to implement. If bstrIID is nil, GetEventClassesForIID returns all event classes registered on the machine.

varCLSIDS returns an array of CLSIDs for the event classes that implement bstrIID.

varProgIDS returns an array of ProgIDs for the event classes that implement bstrIID.

varDescriptions returns an array of description strings for the event classes that implement bstrIID.


TCOMAdminCatalog.GetMultipleComponentsInfo
 VCL Reference

TCOMAdminCatalog.GetMultipleComponentsInfo

TCOMAdminCatalog	See also

Returns information about COM+ components found in specified .dll files.

procedure GetMultipleComponentsInfo(const bstrApplIdOrName: WideString; var varFileNames: PSafeArray; out varCLSIDS: PSafeArray; out varClassNames: PSafeArray; out varFileFlags: PSafeArray; out varComponentFlags: PSafeArray);

Description

Call GetMultipleComponentsInfo to obtain information on the objects that a specified set of .dll files make available.

bstrApplIdOrName specifes the name or GUID of the application to which the .dll files belong.

varFileNames is an array of WideString values, each of which is the name of a .dll.

varCLSIDS returns an array of CLSIDs for the COM+ components in the specified .dll files.

varClassNames returns an array of class names for the component classes in the specified .dll files.

varFileFlags returns an array of file flags that return information about the specified files. Each entry in the array is built from the following flags:

Flag	Value
ComAdminFileFlagLoadable	1
ComAdminFileFlagCOM	2
COMAdminFileFlagContainsRS	4
COMAdminFileFlagContainsComp	8
COMAdminFileFlagContainsTLB	16
COMAdminFileFlagSelfReg	32
COMAdminFileFlagSelfUnReg	64
COMAdminFileFlagUnloadableDLL	128
COMAdminFileFlagDoesNotExist	256
COMAdminFileFlagAlreadyInstalled	512
COMAdminFileFlagBadTLB	1024
COMAdminFileFlagGetClassObjFailed	2048
COMAdminFileFlagClassNotAvailable	4096
COMAdminFileFlagRegistrar	8192
COMAdminFileFlagNoRegistrar	16384
COMAdminFileFlagDLLRegsvrFailed	32768
COMAdminFileFlagRegTLBFailed	65536
COMAdminFileFlagRegistrarFailed	131072
COMAdminFileFlagError	262144
varComponentFlags returns an array of file flags that return information about the components in the specified files. Each entry in the array is built from the following flags:

Flag	Value
COMAdminComponentFlagTypeInfoFound	1
COMAdminComponentCOMPlusPropertiesFound	2
COMAdminComponentProxyFound	4
COMAdminComponentInterfacesFound	8
COMAdminComponentAlreadyInstalled	16
COMAdminComponentNotInApplication	32


TCOMAdminCatalog.Get_MajorVersion
 VCL Reference

TCOMAdminCatalog.Get_MajorVersion

TCOMAdminCatalog	See also

Returns the value of the MajorVersion property.

function Get_MajorVersion: Integer;

Description

Get_MajorVersion is the read implementation of the MajorVersion property.


TCOMAdminCatalog.Get_MinorVersion
 VCL Reference

TCOMAdminCatalog.Get_MinorVersion

TCOMAdminCatalog	See also

Returns the value of the MinorVersion property.

function Get_MinorVersion: Integer;

Description

Get_MinorVersion is the read implementation of the MinorVersion property.


TCOMAdminCatalog.ICOMAdminCatalog_Connect
 VCL Reference

TCOMAdminCatalog.ICOMAdminCatalog_Connect

TCOMAdminCatalog	See also

Connects to a remote computer so that you can administer the collections on that machine.

function ICOMAdminCatalog_Connect(const bstrConnectString: WideString): TCOMAdminCatalogCollection;

Description

Call ICOMAdminCatalog_Connect to administer the COM+ components and services on a remote machine.

bstrConnectString is the name of the remote computer whose COM+ components and services you want to administer.

ICOMAdminCatalog_Connect returns the root collection on the remote computer. The root collection contains the top-level collections on the catalog of the remote machine. It does not contain any TCOMAdminCatalogObject objects or support any properties. You can’t use the Add or Remove methods of this TCOMAdminCatalogCollection object.


TCOMAdminCatalog.ImportComponent
 VCL Reference

TCOMAdminCatalog.ImportComponent

TCOMAdminCatalog	See also

Imports a registered in-process component to a COM+ application.

procedure ImportComponent(const bstrApplIdOrName: WideString; const bstrCLSIDOrProgId: WideString);

Description

Do not use ImportComponent. Use the InstallComponent method instead. InstallComponent fully registers the component in the COM+ class registration database (RegDB), whereas ImportComponent does not bring any interface, method, or type library information for the component into the COM+ class registration database. This restricts how the component can be configured. When you export a COM+ application that has an imported component to an application proxy, the proxy will contain no interface or type library information for the component, and marshalling for that component will fail.

bstrApplIdOrName is the name or GUID that represents the application into which to import the component.

bstrCLSIDOrProgID is the CLSID or ProgID that identifies the component to import.


TCOMAdminCatalog.InstallApplication
 VCL Reference

TCOMAdminCatalog.InstallApplication

TCOMAdminCatalog	See also

Installs a COM+ application or application proxy from a file.

procedure InstallApplication(const bstrApplicationFile: WideString; const bstrDestinationDirectory: WideString; lOptions: Integer; const bstrUserId: WideString; const bstrPassword: WideString; const bstrRSN: WideString);

Description

Use InstallApplication to install an application or application proxy that was previously saved by a call to the ExportApplication method.

bstrApplicationFile is the name of the file created by ExportApplication.

bstrDestinationDirectory is the directory where the components in the application should be installed. If this parameter is nil, InstallApplication uses the default directory.

lOptions is a set of flags that modify how the application is installed. It is a sum of 0 or more of the following flags:

Flag	Meaning

0	Don’t install any users saved in the application file.

1	Install all users that are saved in the application file.

2	Overwrite any files that already exist in the target directory.

bstrUserId specifies the user ID under which to run the application. This value can be nil.

bstrPassword specifies the password under which to run the application. This value can be nil.

bstrRSN specifies the remote server name when bstrApplicationFile is an application proxy.


TCOMAdminCatalog.InstallComponent
 VCL Reference

TCOMAdminCatalog.InstallComponent

TCOMAdminCatalog	See also

Installs a component into a COM+ application, and provides default configuration in the COM+ class registration database (RegDB).

procedure InstallComponent(const bstrApplIdOrName: WideString; const bstrDLL: WideString; const bstrTLB: WideString; const bstrPSDLL: WideString);

Description

InstallComponent installs all components (COM classes) in a .dll file into a COM+ application, and registers the components in the COM+ class registration database (RegDB) as configured components, providing a default configuration.

bstrApplIdOrName is the name or GUID that represents the application into which to install the components.

bstrDLL is the name of the .dll file that implements the component or components.

bstrTLB is the name of the external type library file for the .dll. If the type library is embedded in the .dll, the parameter should be an empty string.

bstrPSDLL is the name of the proxy-stub .dll file. If there is no proxy-stub .dll associated with the component, set this parameter to an empty string.


TCOMAdminCatalog.InstallEventClass
 VCL Reference

TCOMAdminCatalog.InstallEventClass

TCOMAdminCatalog	See also

Installs a COM+ event class into an application.

procedure InstallEventClass(const bstrApplIdOrName: WideString; const bstrDLL: WideString; const bstrTLB: WideString; const bstrPSDLL: WideString);

Description

Use InstallEventClass to install event classes from a .dll that holds dummy implementations of the event classes. The .dll must be self-registering, there must be a type library to describe the interfaces that the event classes implement, and each event class must have a CLSID and a ProgID.

The dummy implementation of the event class is never actually run. It exists only to register the event class. When the publisher creates the event class, the Events system provides an implementation to send the event to subscribers.

bstrApplIdOrName is the name or GUID that represents the application into which to install the event classes.

bstrDLL is the name of the self-registering .dll file that contains the event classes.

bstrTLB is the name of the external type library file for the .dll. If the type library is embedded in the .dll, set this parameter to an empty string.

bstrPSDLL is the name of the proxy-stub .dll file. If there is no proxy-stub .dll associated with the event class, set this parameter to an empty string.


TCOMAdminCatalog.InstallMultipleComponents
 VCL Reference

TCOMAdminCatalog.InstallMultipleComponents

TCOMAdminCatalog	See also

Installs components from multiple files into a COM+ application.

procedure InstallMultipleComponents(const bstrApplIdOrName: WideString; var varFileNames: PSafeArray; var varCLSIDS: PSafeArray);

Description

InstallMultipleComponents installs the components in the specified files into the specified COM+ application.

bstrApplIdOrName is the name or GUID that represents the application into which to install the components.

varFileNames is an array of strings, where each string is the name of a .dll file that implements the components to install.

varCLSIDS is an array of Variants holding CLSIDs for the components to install.


TCOMAdminCatalog.InstallMultipleEventClasses
 VCL Reference

TCOMAdminCatalog.InstallMultipleEventClasses

TCOMAdminCatalog	See also

Installs event classes from multiple files into a COM+ application.

procedure InstallMultipleEventClasses(const bstrApplIdOrName: WideString; var varFileNames: PSafeArray; var varCLSIDS: PSafeArray);

Description

Use InstallMultipleEventClasses to install event classes from multiple self-registering .dll files, each of which holds the dummy implementation of one or more COM+ event classes. There must be a type library to describe the interfaces that the event classes implement, and each event class must have a CLSID and a ProgID.

The dummy implementation of the event class is never actually run. It exists only to register the event class. When the publisher creates the event class, the Events system provides an implementation to send the event to subscribers.

bstrApplIdOrName is the name or GUID that represents the application into which to install the event classes.

varFileNames is an array of strings, where each string is the name of a self-registering .dll file that contains the event classes to install.

varCLSIDS is an array of Variants holding CLSIDs for the event classes to install.


TCOMAdminCatalog.QueryApplicationFile
 VCL Reference

TCOMAdminCatalog.QueryApplicationFile

TCOMAdminCatalog	See also

Retrieves information about a COM+ application from a COM+ application file.

procedure QueryApplicationFile(const bstrApplicationFile: WideString; out bstrApplicationName: WideString; out bstrApplicationDescription: WideString; out bHasUsers: WordBool; out bIsProxy: WordBool; out varFileNames: PSafeArray);

Description

Call QueryApplicationFile to obtain information about a COM+ application from its application file. An application file is created by the ExportApplication method.

bstrApplicationFile is the name of the ApplicationFile from which to retrieve information.

bstrApplicationName returns the name of the application.

bstrApplicationDescription returns a brief description of the application.

bHasUsers returns True if the application file includes user information associated with its roles, False otherwise.

bIsProxy returns True if the application file contains an application proxy, False otherwise.

varFileNames returns an array of all .dll files containing components that are installed in the application.


TCOMAdminCatalog.RefreshComponents
 VCL Reference

TCOMAdminCatalog.RefreshComponents

TCOMAdminCatalog	See also

Refreshes component registration information from the Registry.

procedure RefreshComponents;

Description

RefreshComponents compares CLSIDs and ProgIDs between the COM+ class registration database (RegDB) and the Registry for mismatches. When it detects a mismatch in CLSIDs and ProgIDs, RefreshComponents updates the COM+ class registration database (RegDB).

RefreshComponents only updates CLSID information. It does not update interface or method information. Components that are refreshed using RefreshComponents can not be configured or secured at the interface or method levels in COM+ applications.

Note:	You generally should not use RefreshComponents. The recommended way to update components in COM+ applications is to remove and reinstall the components using InstallComponent, so that complete registration information is updated in RegDB.


TCOMAdminCatalog.RefreshRouter
 VCL Reference

TCOMAdminCatalog.RefreshRouter

TCOMAdminCatalog	See also

Refreshes the data being used by the component load balancing service on a CLB server.

procedure RefreshRouter;

Description

Do not use the RefreshRouter method. It is deprecated.


TCOMAdminCatalog.RestoreREGDB
 VCL Reference

TCOMAdminCatalog.RestoreREGDB

TCOMAdminCatalog	See also

Restores the COM+ class registration database (RegDB) from a specified file.

procedure RestoreREGDB(const bstrBackupFilePath: WideString);

Description

Call RestoreREGDB to restore the COM+ class registration database (RegDB) from a file that was previously created by the BackupREGDB method This requires a system reboot in order to take effect.

bstrBackupFilePath is the file previously created by the BackupREGDB method.


TCOMAdminCatalog.ServiceCheck
 VCL Reference

TCOMAdminCatalog.ServiceCheck

TCOMAdminCatalog

Checks the status of a COM+ service.

function  ServiceCheck(lService: Integer): Integer;

Description

Call ServiceCheck to check the status of the service specified by lService. A value of 1 specifies the Component Load Balancing service. At present, TCOMAdminCatalog does not support any other services.

SericeCheck returns one of the following values:

Value	Meaning

0	Service is currently stopped.

1	Service is due to start up.

2	Service is due to stop.

3	Service is running normally.

4	Service is due to continue.

5	Service is due to pause.

6	Service is currently paused.

7	Service status is unknown.


TCOMAdminCatalog.ShutdownApplication
 VCL Reference

TCOMAdminCatalog.ShutdownApplication

TCOMAdminCatalog	See also

Initiates shutdown of a COM+ application server process.

procedure ShutdownApplication(const bstrApplIdOrName: WideString);

Description

Call ShutdownApplication to shut down a COM+ application process.

bstrApplIdOrName is the GUID or name that identifies the application to shut down.


TCOMAdminCatalog.StartApplication
 VCL Reference

TCOMAdminCatalog.StartApplication

TCOMAdminCatalog	See also

Launches a COM+ server application in a dedicated process.

procedure StartApplication(const bstrApplIdOrName: WideString);

Description

Call StartApplication to start up a COM+ server application. The components in the application are launched in a new dedicated process.

bstrApplIdOrName is the GUID or name that identifies the application to start.


TCOMAdminCatalog.StartRouter
 VCL Reference

TCOMAdminCatalog.StartRouter

TCOMAdminCatalog	See also

Starts the component load balancing service on a CLB server.

procedure StartRouter;

Description

StartRouter starts the component load balancing service if it is installed. Subsequent component activation requests are then routed across the application cluster that the router defines.

StartRouter does nothing if called on a machine that does not act as the component load balancing (CLB) server.


TCOMAdminCatalog.StopRouter
 VCL Reference

TCOMAdminCatalog.StopRouter

TCOMAdminCatalog	See also

Stops the component load balancing service on a CLB server.

procedure StopRouter;

Description

When called on a machine acting as the component load balancing (CLB) server, StopRouter stops the server from routing component activation requests to other servers in the application cluster.


Hierarchy

TObject

TPersistent

TComponent

TOleServer

TCOMAdminCatalog


TCOMAdminCatalogCollection
 VCL Reference

TCOMAdminCatalogCollection

Hierarchy	Properties	Methods	See also

TCOMAdminCatalogCollection represents a collection from the COM+ catalog.

Unit

CmAdmCtl

Description

Use TCOMAdminCatalogCollection to work with one of the collections in the COM+ catalog. Use the GetCollection method of TCOMAdminCatlog to obtain a TCOMAdminCatalogCollection object for a specific collection. Each collection corresponds to a folder that appears in the Component Services administration tool.

TCOMAdminCatalogCollection implements the ICatalogCollection interface, to let you enumerate, add, remove, and retrieve items in a collection, and to access related collections. Each item is represented by a TCOMAdminCatalogObject instance.

Note:	Typically, when you first obtain a TCOMAdminCatalogCollection object, it does not contain data from the catalog for items in the collection. Use the Populate method to read in data for items in the collection before using the other properties and methods.


 VCL Reference

TCOMAdminCatalogCollection properties

TCOMAdminCatalogCollection	Alphabetically	Legend

In TCOMAdminCatalogCollection

AddEnabled

Count

DataStoreMajorVersion

DataStoreMinorVersion

DefaultInterface

Name

RemoveEnabled

Derived from TOleServer

AutoConnect

ConnectKind

RemoteMachineName

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCOMAdminCatalogCollection properties

TCOMAdminCatalogCollection	By object	Legend

AddEnabled

AutoConnect

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectKind

Count

DataStoreMajorVersion

DataStoreMinorVersion

DefaultInterface

DesignInfo

Name

Owner

RemoteMachineName

RemoveEnabled

Tag

VCLComObject


TCOMAdminCatalogCollection.AddEnabled
 VCL Reference

TCOMAdminCatalogCollection.AddEnabled

TCOMAdminCatalogCollection	See also

Indicates whether the Add method can add items to the collection.

property AddEnabled: WordBool;

Description

Read AddEnabled to determine whether your application can add items to this collection. When AddEnabled is False, the Add method fails.


TCOMAdminCatalogCollection.Count
 VCL Reference

TCOMAdminCatalogCollection.Count

TCOMAdminCatalogCollection	See also

Indicates the number of items in the collection.

property Count: Integer;

Description

Use Count to determine the number of items in the collection. Count acts as an upper bound for the index to the Get_Item method.

When you first obtain a TCOMAdminCatalogCollection object, the value of Count is 0. Call the Populate method to fill the collection with its items to determine the actual number of items in this collection of the COM+ catalog.

To change the value of Count, add items using the Add method or delete them using the Remove method.


TCOMAdminCatalogCollection.DataStoreMajorVersion
 VCL Reference

TCOMAdminCatalogCollection.DataStoreMajorVersion

TCOMAdminCatalogCollection	See also

Indicates the major version number of the COMAdmin Library

property DataStoreMajorVersion: Integer;

Description

Use DataStoreMajorVersion to determine the major version number of the COMAdmin Library. This is the same as the MajorVersion property of the TCOMAdminCatalog object that contains this collection.


TCOMAdminCatalogCollection.DataStoreMinorVersion
 VCL Reference

TCOMAdminCatalogCollection.DataStoreMinorVersion

TCOMAdminCatalogCollection	See also

Indicates the minor version number of the COMAdmin Library

property DataStoreMinorVersion: Integer;

Description

Use DataStoreMinorVersion to determine the minor version number of the COMAdmin Library. This is the same as the MinorVersion property of the TCOMAdminCatalog object that contains this collection.


TCOMAdminCatalogCollection.DefaultInterface
 VCL Reference

TCOMAdminCatalogCollection.DefaultInterface

TCOMAdminCatalogCollection

Provides access to the default interface for the component.

property DefaultInterface: ICatalogCollection;

Description

Use DefaultInterface to access the default interface for TCOMAdminCatalogCollection. This is the ICatalogCollection interface, whose properties and methods are surfaced as properties and methods of TCOMAdminCatalogCollection.


TCOMAdminCatalogCollection.Name
 VCL Reference

TCOMAdminCatalogCollection.Name

TCOMAdminCatalogCollection	See also

Indicates the Name of the collection.

property Name: OleVariant;

Description

Use Name to determine the name of the collection. This is the name by which you can identify the collection, for example, when calling the GetCollection method to obtain a TCOMAdminCatalogCollection instance.


TCOMAdminCatalogCollection.RemoveEnabled
 VCL Reference

TCOMAdminCatalogCollection.RemoveEnabled

TCOMAdminCatalogCollection	See also

Indicates whether the Remove method can remove items from the collection.

property RemoveEnabled: WordBool;

Description

Read RemoveEnabled to determine whether your application can remove items from this collection. When RemoveEnabled is False, the Remove method fails.


 VCL Reference

TCOMAdminCatalogCollection methods

TCOMAdminCatalogCollection	Alphabetically	Legend

In TCOMAdminCatalogCollection

Add

Connect

ConnectTo

Create

Destroy

Disconnect

GetCollection

GetUtilInterface

Get_AddEnabled

Get_Count

Get_DataStoreMajorVersion

Get_DataStoreMinorVersion

Get_Item

Get_Name

Get_RemoveEnabled

Populate

PopulateByKey

PopulateByQuery

Remove

SaveChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCOMAdminCatalogCollection methods

TCOMAdminCatalogCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Connect

ConnectTo

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

Get_AddEnabled

Get_Count

Get_DataStoreMajorVersion

Get_DataStoreMinorVersion

Get_Item

Get_Name

Get_RemoveEnabled

GetCollection

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetUtilInterface

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Populate

PopulateByKey

PopulateByQuery

ReferenceInterface

Remove

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveChanges

SetSubComponent

UpdateAction


TCOMAdminCatalogCollection.Destroy
 VCL Reference

TCOMAdminCatalogCollection.Destroy

TCOMAdminCatalogCollection	See also

Frees an instance of TCOMAdminCatalogCollection

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TCOMAdminCatalogCollection component reference is not nil before calling Destroy.

Note that freeing the TCOMAdminCatalogCollection object does not remove the collection from the COM+ catalog, it merely deletes the object that lets you work with that collection.


TCOMAdminCatalogCollection.Create
 VCL Reference

TCOMAdminCatalogCollection.Create

TCOMAdminCatalogCollection	See also

Creates a new instance of TCOMAdminCatalogCollection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCOMAdminCatalogCollection at runtime. Once you have created a TCOMAdminCatalogCollection object, you must bind it to an ICatalogCollection interface before you can use it. Use the ConnectTo method to bind a TCOMAdminCatalogCollection object to an ICatalogCollection interface.

Note:	When you obtain a TCOMAdminCatalogCollection instance from a method on the TCOMAdminCatalog object or from another collection, it is already bound to an ICatalogCollection interface.

Owner specifies the component (typically a form or data module) that is responsible for freeing the TCOMAdminCatalogCollection instance.


TCOMAdminCatalogCollection.Add
 VCL Reference

TCOMAdminCatalogCollection.Add

TCOMAdminCatalogCollection	See also

Adds a new item to the end of the collection.

function Add: TCOMAdminCatalogObject;

Description

Call the Add method to create a new object in a collection. Add returns the TCOMAdminCatalogObject that represents the new item.

Not all collections allow you to add items. Check the AddEnabled property before trying to call Add. To install or create objects in collections where AddEnabled is False, use the catalog utility interfaces.

Note:	Add does not commit the change to the catalog data store. To cause the new item to be written to the data store, call the SaveChanges method.


TCOMAdminCatalogCollection.Connect
 VCL Reference

TCOMAdminCatalogCollection.Connect

TCOMAdminCatalogCollection	See also

Not used in TCOMAdminCatalogCollection.

procedure Connect; override;

Description

Do not use the Connect method. TCOMAdminCatalogCollection objects never directly launch the COM server. Rather, obtain a TCOMAdminCatalogCollection object that is already bound to an ICatalogCollection interface from a method such as the parent collection’s GetCollection method.


TCOMAdminCatalogCollection.ConnectTo
 VCL Reference

TCOMAdminCatalogCollection.ConnectTo

TCOMAdminCatalogCollection	See also

Connects the TCOMAdminCatalogCollection component to an existing ICatalogCollection interface.

procedure ConnectTo(svrIntf: ICOMAdminCatalog);

Description

Use ConnectTo when the ConnectKind property is ckAttachToInterface. ConnectTo allows the TCOMAdminCatalogCollection to use an existing ICatalogCollection interface.

Typically, applications do not need to use the ConnectTo method. Rather, they obtain a TCOMAdminCatalogCollection object that is already bound to an ICatalogCollection object by calling a method such as GetCollection.


TCOMAdminCatalogCollection.Disconnect
 VCL Reference

TCOMAdminCatalogCollection.Disconnect

TCOMAdminCatalogCollection	See also

Terminates the connection to the COM server.

procedure Disconnect; override;;

Description

Disconnect releases the ICatalogCollection interface that TCOMAdminCatalogCollection uses to implement its properties and methods. Once you have called Disconnect, you can no longer use the TCOMAdminCatalogCollection instance, unless you rebind it to another interface using the ConnectTo method.


TCOMAdminCatalogCollection.GetCollection
 VCL Reference

TCOMAdminCatalogCollection.GetCollection

TCOMAdminCatalogCollection	See also

Returns a TCOMAdminCatalogCollectionCollection object for a specified collection.

function GetCollection(const bstrCollName: WideString; varObjectKey: OleVariant): TCOMAdminCatalogCollection;

Description

GetCollection retrieves a sub-collection that is contained in this collection.

bstrCollName is the name of the desired collection. The available collections depend on your version of the COMAdmin Library. See the Microsoft documentation for a list of the available collections in your version of the COMAdmin Library.

Key is the Key property of the item to which the collection belongs.

Note:	The TCOMAdminCatalogCollectionCollection object that GetCollection returns does not contain data from the catalog for items contained in the collection. Use its Populate method to read in data for items in the collection.


TCOMAdminCatalogCollection.GetUtilInterface
 VCL Reference

TCOMAdminCatalogCollection.GetUtilInterface

TCOMAdminCatalogCollection

Returns the utility interface associated with this collection.

function GetUtilInterface: IDispatch

Description

Call the GetUtilInterface method to obtain an interface to the utility object associated with the collection. Not every collection has an associated utility object. The following table lists the collections for which GetUtilInterface returns an interface, along with the name of the associated utility object:

Collection name	Utility object
Packages	PackageUtil
ComponentsInPackage	ComponentUtil
RemoteComponents	RemoteComponentUtil
RolesForPackageComponent	RoleAssociationUtil
RolesForPackageComponentInterface	RoleAssociationUtil


TCOMAdminCatalogCollection.Get_AddEnabled
 VCL Reference

TCOMAdminCatalogCollection.Get_AddEnabled

TCOMAdminCatalogCollection	See also

Returns the value of the AddEnabled property.

function Get_AddEnabled: WordBool;

Description

Get_AddEnabled is the read implementation of the AddEnabled property.


TCOMAdminCatalogCollection.Get_Count
 VCL Reference

TCOMAdminCatalogCollection.Get_Count

TCOMAdminCatalogCollection	See also

Returns the number of items in the collection.

function Get_Count: Integer;

Description

Get_Count is the read implementation of the Count property.


TCOMAdminCatalogCollection.Get_DataStoreMajorVersion
 VCL Reference

TCOMAdminCatalogCollection.Get_DataStoreMajorVersion

TCOMAdminCatalogCollection	See also

Returns the value of the DataStoreMajorVersion property.

function Get_DataStoreMajorVersion: Integer;

Description

Get_DataStoreMajorVersion is the read implementation of the DataStoreMajorVersion property.


TCOMAdminCatalogCollection.Get_DataStoreMinorVersion
 VCL Reference

TCOMAdminCatalogCollection.Get_DataStoreMinorVersion

TCOMAdminCatalogCollection	See also

Returns the value of the DataStoreMinorVersion property.

function Get_DataStoreMinorVersion: Integer;

Description

Get_DataStoreMinorVersion is the read implementation of the DataStoreMinorVersion property.


TCOMAdminCatalogCollection.Get_Item
 VCL Reference

TCOMAdminCatalogCollection.Get_Item

TCOMAdminCatalogCollection	See also

Returns a specified item from the collection.

function Get_Item(lIndex: Integer): TCOMAdminCatalogObject;

Description

Call Get_Item to access an item in the collection

lIndex is the index of the item. It can have any value from 0 to one less than the value of the Count property.


TCOMAdminCatalogCollection.Get_Name
 VCL Reference

TCOMAdminCatalogCollection.Get_Name

TCOMAdminCatalogCollection	See also

Returns the value of the Name property

function Get_Name: OleVariant;

Description

GetName is the read implementation of the Name property.


TCOMAdminCatalogCollection.Get_RemoveEnabled
 VCL Reference

TCOMAdminCatalogCollection.Get_RemoveEnabled

TCOMAdminCatalogCollection	See also

Returns the value of the RemoveEnabled property.

function Get_RemoveEnabled: WordBool;

Description

Get_RemoveEnabled is the read implementation of the RemoveEnabled property.


TCOMAdminCatalogCollection.Populate
 VCL Reference

TCOMAdminCatalogCollection.Populate

TCOMAdminCatalogCollection	See also

Fills the collection object with items from the catalog.

procedure Populate;

Description

Call Populate to set the items of the collection to those currently saved for this collection in the COM+ catalog. When you first obtain an instance of TCOMAdminCatalogCollection, it does not yet contain any items, and you must call Populate to fill it with the associated items.

After making changes to the collection (such as adding or removing objects or changing object properties) are not saved to the COM+ catalog until you call the SaveChanges method. Thus, if you call Populate after making changes but before calling SaveChanges, all your changes are rolled back and the collection is restored to the state that is saved in the COM+ catalog.


TCOMAdminCatalogCollection.PopulateByKey
 VCL Reference

TCOMAdminCatalogCollection.PopulateByKey

TCOMAdminCatalogCollection	See also

Populates the collection with information for the specified objects.

procedure PopulateByKey(aKeys: PSafeArray);

Description

Use PopulateByKey to refresh the items in the collection that have a specified key. PopulateByKey reloads all items from the COM+ catalog that have the specified keys.

aKeys is an array of Key values that represent the Key property for each item to be loaded from the COM+ catalog.


TCOMAdminCatalogCollection.PopulateByQuery
 VCL Reference

TCOMAdminCatalogCollection.PopulateByQuery

TCOMAdminCatalogCollection	See also

Reserved for future use.

procedure PopulateByQuery(const bstrQueryString: WideString; lQueryType: Integer);

Description

PopulateByQuery is not currently implemented.


TCOMAdminCatalogCollection.Remove
 VCL Reference

TCOMAdminCatalogCollection.Remove

TCOMAdminCatalogCollection	See also

Removes an item from the collection

procedure Remove(lIndex: Integer);

Description

Remove deletes an item from the collection given its index, and re-indexes the items with higher indices. These changes are not reflected on the COM+ catalog data store until you call SaveChanges.


TCOMAdminCatalogCollection.SaveChanges
 VCL Reference

TCOMAdminCatalogCollection.SaveChanges

TCOMAdminCatalogCollection	See also

Commits any changes to the collection by writing them to the COM+ catalog.

function SaveChanges: Integer;

Description

Call SaveChanges to save all pending changes made to the collection and the items it contains to the COM+ catalog data store. SaveChanges returns the number of changes written to the COM+ catalog.


Hierarchy

TObject

TPersistent

TComponent

TOleServer

TCOMAdminCatalogCollection


TCOMAdminCatalogObject
 VCL Reference

TCOMAdminCatalogObject

Hierarchy	Properties	Methods	See also

TCOMAdminCatalogObject represents an item in a collection from the COM+ catalog.

Unit

CmAdmCtl

Description

Use TCOMAdminCatalogObject to work with one of the items in a COM+ catalog collection. Use the Get_Item method of TCOMAdminCatlogCollection to obtain a TCOMAdminCatalogObject instance for a specific item. Each item corresponds to one of the items in a folder that appears in the Component Services administration tool.

TCOMAdminCatalogObject implements the ICatalogObject interface, to let you get and set properties on the items in a catalog collection. Any changes you make to the item are not reflected on the catalog data store until you call SaveChanges for the collection that contains the item.


 VCL Reference

TCOMAdminCatalogObject properties

TCOMAdminCatalogObject	Alphabetically	Legend

In TCOMAdminCatalogObject

DefaultInterface

Key

Name

Valid

Value

Derived from TOleServer

AutoConnect

ConnectKind

RemoteMachineName

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCOMAdminCatalogObject properties

TCOMAdminCatalogObject	By object	Legend

AutoConnect

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectKind

DefaultInterface

DesignInfo

Key

Name

Owner

RemoteMachineName

Tag

Valid

Value

VCLComObject


TCOMAdminCatalogObject.DefaultInterface
 VCL Reference

TCOMAdminCatalogObject.DefaultInterface

TCOMAdminCatalogObject

Provides access to the default interface for the component.

property DefaultInterface: ICatalogObject;

Description

Use DefaultInterface to access the default interface for TCOMAdminCatalogObject. This is the ICatalogObject interface, whose properties and methods are surfaced as properties and methods of TCOMAdminCatalogObject.


TCOMAdminCatalogObject.Key
 VCL Reference

TCOMAdminCatalogObject.Key

TCOMAdminCatalogObject	See also

Uniquely identifes the catalog item.

property Key: OleVariant;

Description

The Key property serves as the primary identifier for an object. In some cases, Key is a GUID, such as CLSID for a component; in some cases it is the item name, as with roles. To determine the meaning of the Key property, check the Microsoft documentation for the specific collection to which this item belongs.

Note:	If you add a new object to a collection and save it with the Key property of an existing object, you overwrite the existing object.


TCOMAdminCatalogObject.Name
 VCL Reference

TCOMAdminCatalogObject.Name

TCOMAdminCatalogObject	See also

Indicates the Name of the object.

property Name: OleVariant;

Description

Use Name to determine the name of the item.

Note:	Although every item has a name, the primary identifier for collection items is the Key property.


TCOMAdminCatalogObject.Valid
 VCL Reference

TCOMAdminCatalogObject.Valid

TCOMAdminCatalogObject	See also

Indicates whether all properties of the object have been successfully read from the catalog data store.

property Valid: WordBool;

Description

Read Valid to determine whether the object has been initialized to reflect the properties stored in the COM+ catalog for this item. Valid is True if the properties were successfully read from the catalog, False if they could not be read from the catalog. For example, Valid is False for a new item that has never been written to the COM+ catalog.


TCOMAdminCatalogObject.Value
 VCL Reference

TCOMAdminCatalogObject.Value

TCOMAdminCatalogObject	See also

Represents a the value of a named property of the catalog object.

property Value[const bstrPropName: WideString]: OleVariant;

Description

Use Value to get or set a named property of this item.

bstrPropName is the name of the property to get or set. Valid property names depend on the type of the item (the collection to which the item belongs). To determine the available properties for this object, check the Microsoft documentation for the specific collection to which this item belongs.

Tip:	Use the IsPropertyReadOnly and IsPropertyWriteOnly methods to determine whether you can get or set a specific property.


 VCL Reference

TCOMAdminCatalogObject methods

TCOMAdminCatalogObject	Alphabetically	Legend

In TCOMAdminCatalogObject

Connect

ConnectTo

Create

Destroy

Disconnect

Get_Key

Get_Name

Get_Valid

Get_Value

IsPropertyReadOnly

IsPropertyWriteOnly

Set_Value

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCOMAdminCatalogObject methods

TCOMAdminCatalogObject	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Connect

ConnectTo

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

Get_Key

Get_Name

Get_Valid

Get_Value

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsPropertyReadOnly

IsPropertyWriteOnly

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Set_Value

SetSubComponent

UpdateAction


TCOMAdminCatalogObject.Destroy
 VCL Reference

TCOMAdminCatalogObject.Destroy

TCOMAdminCatalogObject	See also

Frees an instance of TCOMAdminCatalogObject

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TCOMAdminCatalogObject component reference is not nil before calling Destroy.

Note that freeing a TCOMAdminCatalogObject instance does not delete the item from its collection. It merely frees the object that lets you work with the item.


TCOMAdminCatalogObject.Create
 VCL Reference

TCOMAdminCatalogObject.Create

TCOMAdminCatalogObject	See also

Creates a new instance of TCOMAdminCatalogObject.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCOMAdminCatalogObject at runtime. Once you create a TCOMAdminCatalogObject, you must bind it to an ICatalogObject interface before you can use it. Use the ConnectTo method to bind a TCOMAdminCatalogObject instance to an ICatalogObject interface.

Note:	The TCOMAdminCatalogObject instance that the catalog object returns from its Get_Item method is already bound to an ICatalogObject interface.

Owner specifies the component (typically a form or data module) that is responsible for freeing the TCOMAdminCatalogObject instance.


TCOMAdminCatalogObject.Connect
 VCL Reference

TCOMAdminCatalogObject.Connect

TCOMAdminCatalogObject	See also

Not used in TCOMAdminCatalogObject.

procedure Connect; override;

Description

Do not use the Connect method. TCOMAdminCatalogObject objects never directly launch the COM server. Rather, obtain a TCOMAdminCatalogObject object that is already bound to an ICatalogCollection interface from the parent collection’s Get_Item method.


TCOMAdminCatalogObject.ConnectTo
 VCL Reference

TCOMAdminCatalogObject.ConnectTo

TCOMAdminCatalogObject	See also

Connects the TCOMAdminCatalogObject component to an existing ICatalogObject interface.

procedure ConnectTo(svrIntf: ICOMAdminCatalog);

Description

Use ConnectTo when the ConnectKind property is ckAttachToInterface. ConnectTo allows the TCOMAdminCatalogObject to use an existing ICatalogCollection interface.

Typically, applications do not need to use the ConnectTo method. Rather, they obtain a TCOMAdminCatalogObject object that is already bound to an ICatalogCollection object by calling the collection object’s Get_Item method.


TCOMAdminCatalogObject.Disconnect
 VCL Reference

TCOMAdminCatalogObject.Disconnect

TCOMAdminCatalogObject	See also

Terminates the connection to the COM server.

procedure Disconnect; override;;

Description

Disconnect releases the ICatalogObject interface that TCOMAdminCatalogObject uses to implement its properties and methods. Once you have called Disconnect, you can no longer use the TCOMAdminCatalogObject instance, unless you rebind it to another interface using the ConnectTo method.


TCOMAdminCatalogObject.Get_Key
 VCL Reference

TCOMAdminCatalogObject.Get_Key

TCOMAdminCatalogObject	See also

Returns the value of the Key property.

function Get_Key: OleVariant;

Description

Get_Key is the read implementation of the Key property.


TCOMAdminCatalogObject.Get_Name
 VCL Reference

TCOMAdminCatalogObject.Get_Name

TCOMAdminCatalogObject	See also

Returns the value of the Name property.

function Get_Name: OleVariant;

Description

Get_Name is the read implementation of the Name property.


TCOMAdminCatalogObject.Get_Valid
 VCL Reference

TCOMAdminCatalogObject.Get_Valid

TCOMAdminCatalogObject	See also

Returns the value of the Valid property.

function Get_Valid: WordBool;

Description

Get_Valid is the read implementation of the Valid property.


TCOMAdminCatalogObject.Get_Value
 VCL Reference

TCOMAdminCatalogObject.Get_Value

TCOMAdminCatalogObject	See also

Returns the value of the Value property.

function Get_Value(const bstrPropName: WideString): OleVariant;

Description

Get_Value is the read implementation of the Value property.

bstrPropName is the name of the property whose value you want to read.


TCOMAdminCatalogObject.IsPropertyReadOnly
 VCL Reference

TCOMAdminCatalogObject.IsPropertyReadOnly

TCOMAdminCatalogObject	See also

Indicates whether a specified property is read-only.

function  IsPropertyReadOnly(const bstrPropName: WideString): WordBool;

Description

Call IsPropertyReadOnly to determine whether you can use the Value property to set a specific property. If IsPropertyReadOnly returns True, you can use Value to read the property’s value but not set it. If IsPropertyReadOnly returns False, you can use Value to set the property’s value as well.

bstrPropName is the name of the property.


TCOMAdminCatalogObject.IsPropertyWriteOnly
 VCL Reference

TCOMAdminCatalogObject.IsPropertyWriteOnly

TCOMAdminCatalogObject	See also

Indicates whether a specified property is write-only.

function IsPropertyWriteOnly(const bstrPropName: WideString): WordBool;

Description

Call IsPropertyWriteOnly to determine whether you can read the value of a specific property using the Value property. If IsPropertyWriteOnly returns True, you can use Value to set the property’s value but not read it. If IsPropertyWriteOnly returns False, you can use Value to read the property’s value as well.

bstrPropName is the name of the property.


TCOMAdminCatalogObject.Set_Value
 VCL Reference

TCOMAdminCatalogObject.Set_Value

TCOMAdminCatalogObject	See also

Sets the value of the Value property.

procedure Set_Value(const bstrPropName: WideString; retval: OleVariant);

Description

Set_Value is the write implementation of the Value property.

bstrPropName is the name of the property to set.

retVal is the new value for that property.


Hierarchy

TObject

TPersistent

TComponent

TOleServer

TCOMAdminCatalogObject


TComClassManager
 VCL Reference

TComClassManager

Hierarchy	Methods	See also

TComClassManager is the class type of the ComClassManager variable in the ComObj unit.

Unit

ComObj

Description

An instance of TComClassManager is returned by the ComClassManager function in the ComObj unit. This instance of TComClassManager manages the class factory objects owned by COM servers.

TComClassManager is a class designed for internal use to keep track of class factories.

For all servers linked to the module containing this unit, the manager returned by ComClassManager maintains a list of pointers to the class factory objects. This list is updated by the individual COM servers, which add class factories objects when they are created and delete them when they are destroyed. The ComClass manager has methods that are used to manipulate class factories based upon their associated servers. These methods process iterative actions on factories or return factories based upon the class object type they create.


 VCL Reference

TComClassManager methods

TComClassManager	Alphabetically	Legend

In TComClassManager

Create

Destroy

ForEachFactory

GetFactoryFromClass

GetFactoryFromClassID

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComClassManager methods

TComClassManager	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

ForEachFactory

Free

FreeInstance

GetFactoryFromClass

GetFactoryFromClassID

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TComClassManager.Create
 VCL Reference

TComClassManager.Create

TComClassManager	See also

Creates an instance of the TcomClassManager class.

constructor Create;

Description

Do not create instances of TComClassManager. Instead, use the ComClassManager function to obtain a reference to the global COM class manager.


TComClassManager.Destroy
 VCL Reference

TComClassManager.Destroy

TComClassManagerl	See also

Destroys an instance of TComClassManager.

destructor Destroy; override;

Description

Do not destroy the COM class manager. This is a global instance that is managed by Delphi.


TComClassManager.ForEachFactory
 VCL Reference

TComClassManager.ForEachFactory

TComClassManager	See also

Processes iterative actions on factories associated with a given server.

type TFactoryProc = procedure(Factory: TComObjectFactory) of object;

procedure ForEachFactory(ComServer: TComServerObject; FactoryProc: TFactoryProc;

Description

ForEachFactory is used to process an action, specified by the FactoryProc parameter, on all class factories in the factory list that are owned by the ComServer specified by the ComServer parameter.

ForEachFactory is used internally by the COM server to:

Destroy factories when the associated COM server unloads.

Have factories register their class objects in the system registry, when the associated COM server initializes.

Have the factories update the system registry when necessary.

TFactoryProc is the method-pointer type of the FactoryProc parameter of ForEachProperty. TFactoryProc defines a method that takes a class factory as a parameter.


TComClassManager.GetFactoryFromClass
 VCL Reference

TComClassManager.GetFactoryFromClass

TComClassManager	See also

Returns the class factory for a given COM class.

function GetFactoryFromClass(ComClass: TClass): TComObjectFactory;

Description

GetFactoryFromClass is used internally by Delphi to obtain the correct class factory in order to create instances of a specified COM object.

GetFactoryFromClass returns the class factory associated with the COM class specified by the ComClass parameter. If no such class factory is found in the list maintained by the ComClass manager, an EOleError exception is raised indicating that the class factory for the specifed COM class is not in the current list.


TComClassManager.GetFactoryFromClassID
 VCL Reference

TComClassManager.GetFactoryFromClassID

TComClassManager	See also

Returns the class factory for a given COM class identifier.

function GetFactoryFromClassID(const ClassID: TGUID): TComObjectFactory;

Description

GetFactoryFromClassID is used internally by DllGetClassObject to obtain a reference to the IClassFactory interface of the corresponding class factory object for a given class object specified by the ClassID parameter.

GetFactoryFromClassID returns the class factory associated with the COM class specified by the ClassID parameter. If the class cannot be found, GetFactoryFromClassID returns nil.


Hierarchy

TObject

TComClassManager


TComObjectFactory
 VCL Reference

TComObjectFactory

Hierarchy	Properties	Methods	See also

TComObjectFactory is the type of the class factory object used to instantiate a TComObject class.

Unit

ComObj

Description

TComObjectFactory supports the IUnknown, IClassFactory, and IClassFactory2 interfaces. The IClassFactory interface is implemented by class objects associated with class identifiers (CLSIDs) for the classes that they instantiate. IClassFactory must be implemented for every object definition, so that objects of that type can be created. The IClassFactory2 interface is implemented by class factories for classes that need support for licensing.

Class factories instantiate the COM classes specified by a registered class identifier (CLSID). Class factory objects are created automatically by the COM servers that contain the code for the class objects and their associated classes. When a class factory is created, the CLSID is specified in a parameter to the constructor of the class factory object. This CLSID indicates the type of object for which the class factory creates instances.

Class factory objects can also be externally instantiated by directly calling the Windows API function CoCreateClassObject. The functions CreateComObject or CreateOleObject can also be called to instantiate a COM class. These functions indirectly use class factories to instantiate the classes. When creating multiple instances of a class that has a CLSID, however, it is more efficient to instantiate a class factory, obtain a pointer to its IClassFactory interface, and use its methods as needed.

Class factories are managed on the server by a global class manager accessed using the ComClassManager function. This class manager maintains a list of class factories through which the factories are manipulated, usually according to the COM server that owns them.

Interfaces implemented

IUnknown, IClassFactory, IClassFactory2


 VCL Reference

TComObjectFactory properties

TComObjectFactory	Alphabetically	Legend

In TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TComObjectFactory properties

TComObjectFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


TComObjectFactory.ClassID
 VCL Reference

TComObjectFactory.ClassID

TComObjectFactory	See also

Specifies the class identifier (CLSID) for the COM class that the particular instance of the factory can instantiate.

property ClassID: TGUID;

Description

ClassID is used to identify the COM class that the factory can instantiate for this factory instance. It is as a used by other methods to identify this class.

ClassID is initialized, in the class factory constructor, to the CLSID that is passed to the constructor. ClassID is also used in the UpdateRegistry method when the COM server’s initialize is called.


TComObjectFactory.ClassName
 VCL Reference

TComObjectFactory.ClassName

TComObjectFactory	See also

Specifies the name of the class that the class factory instantiates.

property ClassName: string;

Description

ClassName is the name identifying the COM class that the class factory instantiates.

ClassName is initialized, in the class factory constructor, to the class name that is passed to the constructor.


TComObjectFactory.ComClass
 VCL Reference

TComObjectFactory.ComClass

TComObjectFactory	See also

Specifies the class type that the factory instantiates.

property ComClass: TClass;

Description

ComClass is used by the class manager’s GetFactoryFromClass method. This method checks the ComClass of each class factory on the server, against the class passed to it, in order to return the class factory that creates objects of that type. It is also used by the CreateComObject method to create the correct COM class.

ComClass is initialized, in the class factory constructor, to the COM class type that is passed to the constructor.


TComObjectFactory.ComServer
 VCL Reference

TComObjectFactory.ComServer

TComObjectFactory	See also

Specifies the COM server that owns the class factory.

property ComServer: TComServerObject;

Description

ComServer indicates the COM server that contains the class factory object. It is used by the class manager methods to process actions on specific factories based upon which server owns them.

The class manager’s ForEachFactory is a general purpose method that uses ComServer to check the server ComServer of each factory in the class manager’s factory list. ForEachFactory then calls the factory procedure passed as a parameter to it, for each of the factories of that particular COM server.

ComServer is also used in the COM class’s CreateFromFactory constructor to call the COM server’s CountObject method. This increments the object count on the server when the class factory instantitates its class type.

ComServer is initialized in the class factory constructor to the server that is passed to its constructor.


TComObjectFactory.Description
 VCL Reference

TComObjectFactory.Description

TComObjectFactory	See also

Describes the class object.

property Description: string;

Description

Description is used in the registration database, when the class factory is registered, to describe the class object.

Description is initialized, in the class factory constructor, to the Description parameter that is passed to the constructor. This description is retrieved from the type library.


TComObjectFactory.ErrorIID
 VCL Reference

TComObjectFactory.ErrorIID

TComObjectFactory	See also

Indicates the interface of the CoClass in which an error occurred.

property ErrorIID: TGUID;

Description

Use ErrorIID to determine the interface in which an error occurred.  For most CoClasses, this is the primary interface for that CoClass, as indicated in the type library.


TComObjectFactory.Instancing
 VCL Reference

TComObjectFactory.Instancing

TComObjectFactory	See also

Indicates the process space of COM object instances.

property Instancing: TClassInstancing;

Description

Instancing determines the process space in which the factory can create COM objects and whether the factory can create multiple instances within a single process space. Instancing is initialized in the class factory constructor to the Instancing parameter that is passed to the constructor.


TComObjectFactory.LicString
 VCL Reference

TComObjectFactory.LicString

TComObjectFactory

Contains licensing information about the object.

property LicString: WideString;

Description

LicString is used to validate whether the user has valid access to the object for development. LicString can be any string defined by the developer who is optionally licensing the object.


TComObjectFactory.ProgID
 VCL Reference

TComObjectFactory.ProgID

TComObjectFactory	See also

Specifies the name of the class factory.

property ProgID: string;

Description

ProgID is the programmatic identifier that specifies the vendor, component, and version of the class factory object.

Every object class that can be inserted into an OLE container has ProgID.


TComObjectFactory.ShowErrors
 VCL Reference

TComObjectFactory.ShowErrors

TComObjectFactory

Indicates whether the COM object factory displays a message box when exceptions are raised.

property ShowErrors: Boolean;

Description

When ShowErrors is True, exceptions that are raised when trying to create a COM object are caught and a message box appears to describe the error. When ShowErrors is False, the exception is not caught by the COM object factory.


TComObjectFactory.SupportsLicensing
 VCL Reference

TComObjectFactory.SupportsLicensing

TComObjectFactory

Indicates whether the object being instantiated supports licensing.

property SupportsLicensing: Boolean;

Description

SupportsLicensing is used to determine whether a user has valid access to the object.


TComObjectFactory.ThreadingModel
 VCL Reference

TComObjectFactory.ThreadingModel

TComObjectFactory	See also

Indicates the type of thread support provided by objects that the factory creates.

property ThreadingModel: TThreadingModel;

Description

The threading model of a factory is initialized in the constructor. The factory uses this value to indicate how COM should serialize calls to the objects that it creates. Use this value to determine the type of thread support you must provide in the implementation of the associated COM object.


 VCL Reference

TComObjectFactory methods

TComObjectFactory	Alphabetically	Legend

In TComObjectFactory

Create

CreateComObject

Destroy

RegisterClassObject

UpdateRegistry

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComObjectFactory methods

TComObjectFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateComObject

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TComObjectFactory.Create
 VCL Reference

TComObjectFactory.Create

TComObjectFactory	See also

Instantiates a class factory object.

constructor Create(ComServer: TComServerObject; ComClass: TComClass; const ClassID: TGUID; const ClassName, Description: string; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);

Description

Create instantiates a class factory, usually when the server is loaded. Class factories should be instantiated in the initialization section of the unit that includes their associated server, so that they are automatically available when the server is loaded.

Create allocates memory for a class factory object, and adds the object to the class factory list managed by the ComClassManager. Then Create initializes the following properties with values passed to it:

Sets ComServer to the ComServer parameter.

Sets ComClass to the ComClass parameter.

Sets ClassID to the ClassID parameter.

Sets ClassName to the ClassName parameter.

Sets Description to the Description parameter.

Sets Instancing to the Instancing parameter.

Sets ThreadingModel to the ThreadingModel parameter.

Sets ErrorIID to IUnknown.


TComObjectFactory.CreateComObject
 VCL Reference

TComObjectFactory.CreateComObject

TComObjectFactory	See also

Instantiates a TComObject object.

Function CreateComObject(const Controller: IUnknown): TComObject; virtual

Description

CreateComObject is the method that instantiates the class type for which TComObjectFactory is the class factory. CreateComObject calls the CreateFromFactory constructor of the TComObject class to create a COM object. CreateComObject passes itself as the Factory parameter to CreateFromFactory.

CreateComClass creates a COM object based upon the value of the ComClass property. ComClass is the class identifier (CLSID) used by other applications to identify the COM class for which they request an object instance.


TComObjectFactory.Destroy
 VCL Reference

TComObjectFactory.Destroy

TComObjectFactory	See also

Disposes of an instance of a class factory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Class factories are automatically destroyed when their corresponding servers are unloaded.


TComObjectFactory.RegisterClassObject
 VCL Reference

TComObjectFactory.RegisterClassObject

TComObjectFactory	See also

Registers the COM class associated with the factory object.

procedure RegisterClassObject;

Description

RegisterClassObject registers an EXE class object with OLE so other applications can connect to it. EXE object applications should call RegisterClassObject on startup. It can also be used to register internal objects for use by the same EXE or other code (such as DLLs) that the EXE uses.

If RegisterClassObject is not successful, an EOleSysError is raised with the following error code possibilities:

Value	Meaning

E_INVALIDARG	One or more the arguments are invalid.

E_OUTOFMEMORY	Not enough memory.

E_UNEXPECTED	An unexpected error occurred.

CO_E_OBJISREG 	The class was already registered in the class object table.

Only EXE object applications call RegisterClassObject. Object handlers or DLL object applications do not call this function. Instead, they must implement and export the DllGetClassObject function.

At startup, a multiple-use EXE object application must create a class object (with the IClassFactory interface on it), and call RegisterClassObject to register the class object. Object applications that support several different classes (such as multiple types of embeddable objects) must allocate and register a different class object for each.

Multiple registrations of the same class object are independent and do not produce an error. Each subsequent registration yields a unique key.


TComObjectFactory.UpdateRegistry
 VCL Reference

TComObjectFactory.UpdateRegistry

TComObjectFactory	See also

Registers COM objects created by the factory.

procedure UpdateRegistry(Register: Boolean); virtual;

Description

UpdateRegistry is called for EXEs when the EXE is run, and for DLLs or EXEs when the routines are called to specifically register or unregister the server.


Hierarchy

TObject

TComObjectFactory


TComObject
 VCL Reference

TComObject

Hierarchy	Properties	Methods	Using TComObject	See also

TComObject is the base class for creating simple COM classes, such as those used for creating Shell extensions.

Unit

ComObj

Description

TComObject is a COM object that supports the IUnknown and ISupportErrorInfo interfaces. TComObject provides the implementation for simple COM objects that have:

A class identifier (CLSID) for external instantiation using a class factory.

Optional support for aggregation implemented through the IUnknown methods.

Support for the SafeCall calling convention and OLE exception-handling by implementing IProvideErrorInfo.

Support for the the IErrorInfo mechanism.

TComObject can be used as a base class for creating classes for COM objects that must have a class identifier (CLSID). CLSIDs are used to register the class in the database registry and to externally instantiate the class using a class factory. The class factory for TComObject is TComObjectFactory. The class factory properties provide information about TComObject class, such as its name, description, CLSID, and so on. The TComObjectFactory methods are used to register the TComObject class in the registry and to instantiate it.

TComObject can be instantiated either as a single COM object, or as part of an aggregate. The IUnknown methods are implemented in TComObject to support aggregation by appropriately delegating to the controlling IUnknown interface when the instantiated COM object is the inner object of an aggregate. Consequently, for all interfaces that are implemented by the inner COM object, its reference count will not be directly affected when an interface reference is created.

TComObject supports the ISupportErrorInfo interface which allows OLE Automation controllers to query whether an error object will be available, and ensures that error information can be propagated correctly up the call chain. By implementing the ISupportErrorInfo interface method, InterfaceSupportsErrorInfo, TComObject supports the IErrorInfo mechanism, thereby providing support for OLE exception-handling and the safecall calling convention. The information available through the IErrorInfo interface is used for SafeCall error handling.

Using TComObject will not require the instantiated object to have a type library.

Implemented methods of ISupportErrorInfo

InterfaceSupportsErrorInfo method


 VCL Reference

TComObject properties

TComObject	Alphabetically	Legend

In TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TComObject properties

TComObject	By object	Legend

Controller

Factory

RefCount

ServerExceptionHandler


TComObject.Controller
 VCL Reference

TComObject.Controller

TComObject	See also

Specifies the controlling IUnknown interface that controls interfaces within an aggregate object.

property Controller: IUnknown;

Description

Controller is the controlling IUnknown interface for the inner object in an aggregate. The QueryInterface, AddRef, and Release methods of all other interfaces of the inner object (except IUnknown) must delegate to the controlling IUnknown. Because of this delegation, the inner object’s reference count is not affected when these methods are called.

Controller is nil if the object is not part of an aggregate. If Controller is non-nil, the object is part of an aggregate, and Controller is the controlling interface.


TComObject.Factory
 VCL Reference

TComObject.Factory

TComObject	See also

Specifies the class factory object for the TComObject class.

property Factory: TComObjectFactory;

Description

Factory is the class factory which is used to instantiate a TComObject.


TComObject.RefCount
 VCL Reference

TComObject.RefCount

TComObject	See also

Indicates the number of references to the COM object that are currently in use.

property RefCount: Integer;

Description

RefCount is used to determine when the object can be destroyed. RefCount is the number of references to interfaces implemented by the COM object. When RefCount is zero, the object can be is destroyed.

RefCount is automatically incremented when references to interfaces implemented by the COM object are created, and is automatically decremented when those references are destroyed. RefCount is usually incremented by the IUnknown AddRef method and decremented by the IUnknown method, Release.

RefCount can be artificially incremented when a new object is created which may be passed as a function parameter. In this case, RefCount should not be zero, and should be incremented prior to the function call and decremented when the function returns. The CreateFromFactory method artificially increments and decrements RefCount for this reason.


TComObject.ServerExceptionHandler
 VCL Reference

TComObject.ServerExceptionHandler

TComObject	See also	Example

Provides access to the SafeCall exception notification process.

property ServerExceptionHandler: IServerExceptionHandler;

Description

The ServerExceptionHandler property provides a way for you to access the SafeCall exception notification process so that you can log or reroute those notifications to an external monitor. The monitor can be another object within the same COM server module, or it could be on a different machine entirely.

For example, server exception handlers could be implemented to:

Log COM server exceptions to the NT system event log

Write exceptions to a text file

Send email to an administrator

Alert support personnel through a pager

The ServerExceptionHandler property is useful for administering remote servers, particularly if a server is physically unreachable. For example, when an exception is raised in a COM object, if the server application is a VCL forms-based application (not just a DLL), then the VCL default exception handler may show a message box on the server. No client requests on that COM object instance can be serviced until the message box is closed. By reporting the exception to an event log, others can see the information from any remote location, as long as the remote users have access rights on the server.

Tip: 	The ServerExceptionHandler property would be particularly useful for COM objects (either stand-alone or those running in the MTS environment), that are used in active server pages. You can use the ServerExceptionHandler property to write exception information in HTML or in any other format you desire.


 VCL Reference

TComObject methods

TComObject	Alphabetically	Legend

In TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

Initialize

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TComObject methods

TComObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException


TComObject.Create
 VCL Reference

TComObject.Create

TComObject	See also

Instantiates a COM object that is not part of an aggregate.

constructor Create;

Description

Call Create to instantiate a COM object that is not part of an aggregate, at runtime.

Create allocates memory for a COM object, and then directly calls the CreateFromFactory constructor, passing it nil as the Controller parameter to indicate that the COM object is not being created as part of an aggregate.


TComObject.CreateAggregated
 VCL Reference

TComObject.CreateAggregated

TComObject	See also

Instantiates a COM object that is part of an aggregate.

constructor CreateAggregated(const Controller: IUnknown);

Description

Call CreateAggregated to instantiate a COM object that is part of an aggregate by passing it the IUnknown control object as the Controller parameter.

CreateAggregated allocates memory for a COM object and then calls the CreateFromFactory constructor. Because the newly instantiated COM object is part of an aggregate, CreateAggregated passes Controller to CreateFromFactory as its Controller parameter. Controller also becomes the value of the Controller property of the COM object.


TComObject.CreateFromFactory
 VCL Reference

TComObject.CreateFromFactory

TComObject	See also

Instantiates a COM object and initializes its values.

constructor CreateFromFactory(Factory: TComObjectFactory; const Controller: IUnknown);

Description

Call Create to instantiate a COM object that is not part of an aggregate, at runtime.

Create allocates memory for a COM object, and then initializes the following properties:

Sets RefCount to 1, as a means of artificial reference counting in the case that the newly created object has a zero reference count and is passed as a parameter.

Sets Factory to the Factory parameter, which is the instance of the class factory responsible for creating the object.

Sets Controller to the Controller parameter, which is either a control object, if the object is part of an aggregate, or nil if it is not.

Calls on the COM server to increment the reference count of objects dependent on it.

Calls Initialize.

Decrements the RefCount that was artificially incremented.


TComObject.Destroy
 VCL Reference

TComObject.Destroy

TComObject	See also

Disposes of an instance of a COM object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the COM object is not nil before it calls Destroy.

Destroy checks to see if the Factory property is nil. If it is nil, then Destroy passes False to the CountObject method of the Factory object’s ComServer, allowing the DLL (server) to be unloaded if no more objects are dependent upon the server.


TComObject.Initialize
 VCL Reference

TComObject.Initialize

TComObject	See also

Provides an interface to a method that initializes the COM object.

procedure Initialize; virtual;

Description

Initialize currently does nothing. Descendant COM objects can override Initialize to provide some post-creation initialization of the object.


TComObject.ObjAddRef
 VCL Reference

TComObject.ObjAddRef

TComObject

Implements the AddRef method of the IUnknown interface.

function ObjAddRef: Integer; virtual; stdcall;

Description

ObjAddRef is used as the implementation of the IUnknown AddRef method, incrementing the reference count for the object.


TComObject.ObjQueryInterface
 VCL Reference

TComObject.ObjQueryInterface

TComObject

Implements the QueryInterface method of the IUnknown interface.

Function ObjQueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;

Description

QueryInterface queries whether the COM object supports a given interface specified by the IID parameter. QueryInterface is used as the implementation of the IUnknown QueryInterface method when the COM object (TComObject) is not part of an aggregate.


TComObject.ObjRelease
 VCL Reference

TComObject.ObjRelease

TComObject

Implements the Release method of the IUnknown interface.

function ObjRelease: Integer; virtual; stdcall;

Description

ObjRelease is used as the implementation of the IUnknown Release method. It decrements the reference count for the object. If the reference count reaches 0, it automatically frees the object.


TComObject.SafeCallException
 VCL Reference

TComObject.SafeCallException

TComObject

Handles OLE exceptions.

function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;

Description

SafeCallException prevents an exception from being raised to escape its scope. Any exceptions raised must also be handled within the method.

The implementation of a safecall method guarantees that no exceptions are raised by enclosing the statement part of the method in an implied try...except block.

Note:	SafeCallException calls the global routine HandleSafeCallException, which provides a standard way of handling this behavior. Methods of a CoClass that supports OLE exception handling (that implements the ISupportErrorInfo interface) are affected by this function. If those CoClass methods use the safecall calling convention, they are modified to return an HRESULT. Procedures will return an HRESULT, and functions will pass their usual result value as the last (out) parameter, and will return an HRESULT instead. The method is enclosed in a try...finally block, after which the HRESULT is returned, and the environment is set up so that the ISupportErrorInfo implementation will work correctly.


Hierarchy

TObject

TComObject


TComponentFactory
 VCL Reference

TComponentFactory

Hierarchy	Properties	Methods

TComponentFactory is the class factory for creating instances of Delphi components that support interfaces.

Unit

VCLCom

Description

TComponentFactory creates instances of component classes that implement interfaces. TComponentFactory supports the IClassFactory interface and inherits support for the IClassFactory2 interface.

Note:	These components are actually created as contained objects of an automation object (aggregate).


 VCL Reference

TComponentFactory properties

TComponentFactory	Alphabetically	Legend

Derived from TAutoObjectFactory

DispIntfEntry

DispTypeInfo

Derived from TComObjectFactory

ClassID

ClassName

ComClass

ComServer

Description

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TComponentFactory properties

TComponentFactory	By object	Legend

ClassID

ClassName

ComClass

ComServer

Description

DispIntfEntry

DispTypeInfo

ErrorIID

Instancing

LicString

ProgID

ShowErrors

SupportsLicensing

ThreadingModel


 VCL Reference

TComponentFactory methods

TComponentFactory	Alphabetically	Legend

In TComponentFactory

Create

Derived from TAutoObjectFactory

GetIntfEntry

Derived from TTypedComObjectFactory

ClassInfo

GetInterfaceTypeInfo

UpdateRegistry

Derived from TComObjectFactory

CreateComObject

Destroy

RegisterClassObject

Derived from TObject

AfterConstruction

BeforeDestruction

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComponentFactory methods

TComponentFactory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassParent

ClassType

CleanupInstance

CreateComObject

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetInterfaceTypeInfo

GetIntfEntry

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RegisterClassObject

SafeCallException

UpdateRegistry


TComponentFactory.Create
 VCL Reference

TComponentFactory.Create

TComponentFactory	See also

Instantiates an instance of a TComponentFactory object.

constructor Create(ComServer: TComServerObject; ComponentClass: TComponentClass; const ClassID: TGUID; Instancing: TClassInstancing; ThreadingModel: TThreadingModel = tmSingle);

Description

Create allocates memory for a TComponentFactory object, and calls the inherited Create, passing its parameters in the same order. The ComponentClass parameter is passed cast as a TAutoClass and passed to the AutoClass parameter.


Hierarchy

TObject

TComObjectFactory

TTypedComObjectFactory

TAutoObjectFactory

TComponentFactory


TComServer
 VCL Reference

TComServer

Hierarchy	Properties	Methods	Events	See also

TComServer is the class type of the ComServ variable that is declared and instantiated in the ComServ unit.

Unit

ComServ

Description

TComServer is the class type used for a COM server, which is a module that contains COM or OLE class definitions. That module can be either an in-process server (DLL) or a local server (EXE).

TComServer properties contain all necessary information about the server, such as its type library, name, Help file, and so on. They also indicate when and how the server should be loaded and unloaded.

TComServer methods are used

To access TComServer properties.

To create associated class factories to instantiate the COM and OLE classes based upon their class identifier (CLSID).

To update the registry database with information about the COM and OLE classes.

TComServer is the type of ComServ variable that is automatically instantiated in the ComServ unit. Each module that is created as a server for COM objects has its own instance of ComServ.

To manage its class factories, the ComServer uses a TComClassManager object, which is accessed using the ComClassManager function in the ComObj unit. The class factories are used primarily by calls to TComClassManager methods.

Note:	The ComServ unit declares and implements global routines that must be exported by each in-process server. These routines automatically handle the registering, unregistering, and unloading of the COM server.


 VCL Reference

TComServer properties

TComServer	Alphabetically	Legend

In TComServer

HelpFileName

IsInprocServer

ObjectCount

ServerFileName

ServerKey

ServerName

StartMode

StartSuspended

TypeLib

UIInteractive


 VCL Reference

TComServer properties

TComServer	By object	Legend

HelpFileName

IsInprocServer

ObjectCount

ServerFileName

ServerKey

ServerName

StartMode

StartSuspended

TypeLib

UIInteractive


TComServer.HelpFileName
 VCL Reference

TComServer.HelpFileName

TComServer

Specifies the name of the Help file associated with the module.

property HelpFileName: string;

Description

Use HelpFileName to find the name of the Help file used for the COM server.


TComServer.IsInprocServer
 VCL Reference

TComServer.IsInprocServer

TComServer	See also

Indicates whether the COM server is an in-process server.

property IsInprocServer: Boolean;

Description

InProcServer indicates whether the COM server is an in-process server, meaning that it is running the same process space as the object’s container. The value of this property is set in the COM server’s constructor and is determined by the IsLibrary variable.

Delphi assumes that all OLE automation servers in DLLs are in-process servers, and that those in applications are not.


TComServer::ObjectCount
 VCL Reference

TComServer.ObjectCount

TComServer	See also

Indicates how many objects are currently dependent upon the server.

property ObjectCount: Integer;

Description

ObjectCount indicates when the server can be unloaded. ObjectCount contains the number of objects that are currently dependent upon the server.

ObjectCount is incremented when new objects are created from class factories, and is decremented when objects are destroyed.

When ObjectCount is zero the server can be unloaded. At this time, code written for the OnLastRelease event handler can process special actions after the last object is released and before the server shuts down.


TComServer.ServerFileName
 VCL Reference

TComServer.ServerFileName

TComServer	See also

Specifies the complete path and file name of the COM server.

property ServerFileName: string;

Description

ServerFileName contains the module name of the COM server. This name includes the path and extension of the file name for the module.


TComServer.ServerKey
 VCL Reference

TComServer.ServerKey

TComServer

Indicates whether the COM server is an in-process server (DLL) or whether it is a local server (EXE).

property ServerKey: string;

Description

ServerKey contains the string 'InprocServer32' if the server is a DLL and 'LocalServer32' if the server is an EXE.


TComServer::ServerName
 VCL Reference

TComServer.ServerName

TComServer	See also

Specifies the name of the file for the server.

property ServerName: string;

Description

ServerName contains the file name, excluding the path and extension, of the COM server.


TComServer.StartMode
 VCL Reference

TComServer.StartMode

TComServer	See also

Indicates why the COM server was started.

type TStartMode = (smStandalone, smAutomation, smRegServer, smUnregServer);

property StartMode: TStartMode;

Description

StartMode indicates the reason a COM server was started: as a stand-alone, as an interactive application, as an embedded object, or for registration or unregistration with the system Registry.

TStartMode is the type of the StartMode property, indicating the different reasons why an OLE automation server can be started.

The following table explains each of the possible start-mode values and the command-line switch that corresponds to each.

Start mode	Switch	Meaning

smAutomation	embedding	The application was started by Windows in response to a request from an automation controller.

smRegServer	regserver	The application was started only to add the server to the system registry.

smStandalone	---	The user started the application as a stand-alone, interactive application.

smUnregServer	unregserver	The application was started only to remove the server from the system registry.


TComServer.StartSuspended
 VCL Reference

TComServer.StartSuspended

TComServer	See also

Indicates whether the COM server should register the class factory in a suspended state.

property StartSuspended: Boolean;

Description

StartSuspended is a Boolean property that indicates whether the COM server should register the class factory in a suspended state to prevent COM from trying to create an instance of a COM object while the server application is still loading.

This is primarily for internal use.


TComServer.TypeLib
 VCL Reference

TComServer.TypeLib

TComServer

Provides access to the type library associated with the COM server.

property TypeLib: ITypeLib;

Description

Use TypeLib to access the type library for the COM server. TypeLib is a reference to an ITypeLib interface.


TComServer.UIInteractive
 VCL Reference

TComServer.UIInteractive

TComServer

Controls whether the server displays error messages to the user.

propertyUIInteractive: Boolean;

Description

Use UIInteractive to determine whether the server has a user interface. Set UIInteractive to False to suppress error messages that appear when there are server errors. For example, UIInteractive should be False for COM servers running as a service


 VCL Reference

TComServer events

TComServer	Alphabetically	Legend

In TComServer

OnLastRelease


 VCL Reference

TComServer events

TComServer	By object	Legend

OnLastRelease


TComServer.OnLastRelease
 VCL Reference

TComServer.OnLastRelease

TComServer	See also

Occurs when the last object using the server is released.

type TLastReleaseEvent = procedure(var Shutdown: Boolean) of object;

property OnLastRelease: TLastReleaseEvent;

Description

Use OnLastRelease to write a handler to process some action after the last object using the server is released, and just before the server shuts down. ShutDown indicates whether the server should be unloaded.

TLastReleaseEvent is the type of the OnLastRelease event. Shutdown indicates whether the server will shut down after processing the OnLastRelease event.


 VCL Reference

TComServer methods

TComServer	Alphabetically	Legend

In TComServer

Create

Destroy

Initialize

LoadTypeLib

SetServerName

UpdateRegistry

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComServer methods

TComServer	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

LoadTypeLib

MethodAddress

MethodName

NewInstance

SafeCallException

SetServerName

UpdateRegistry


TComServer.Create
 VCL Reference

TComServer.Create

TComServer	See also

Creates a COM server object.

constructor Create;

Description

Applications do not need to call the constructor for TComServer.  An instance of TComServer is automatically created as the ComServ variable in modules that are servers for COM objects.

Create allocates memory for a COM server object, and initializes its IsInprocServer and StartMode properties. It is not necessary to directly call the constructor to create a COM server object. A global ComServer variable is declared in the ComServ unit and is instantiated in the initialization section.


TComServer.Destroy
 VCL Reference

TComServer.Destroy

TComServer	See also

Destroys an instance of a COM server object.

destructor Destroy; override;

Description

It is not necessary to directly call Free (or Destroy) to destroy a COM server object. The global ComServ variable, declared in the ComServ unit, is automatically created and destroyed in the initialization and finalization sections.

Destroy destroys the COM server object and calls the ComClassManager to free, from the list it maintains, each of the class factories that the server owns.


TComServer.Initialize
 VCL Reference

TComServer.Initialize

TComServer	See also

Updates the registry and registers the class objects.

procedure Initialize;

Description

Initialize updates the registry if the server was not started only to remove the server from the system registry. Then, if the server was started as an interactive stand-alone application, or in response to a request from an automation controller, Initialize calls on each class factory owned by the server, to register its class object in the system registry.


TComServer.LoadTypeLib
 VCL Reference

TComServer.LoadTypeLib

TComServer	See also

Loads the type library for the server.

procedure LoadTypeLib;

Description

LoadTypeLib loads the type library for the server. If the type library is not already loaded when LoadTypeLib is called, it also registers the type library.

If LoadTypeLib is not successful, it raises an EOleSysError indicating the error code. The possible error codes are as follows:

Error code	Meaning

E_OUTOFMEMORY	Out of memory.

E_INVALIDARG	One or more of the arguments is invalid.

TYPE_E_IOERROR	The function could not write to the file.

TYPE_E_INVALIDSTATE	The type library could not be opened.

TYPE_E_INVDATAREAD	The function could not read from the file.

TYPE_E_UNSUPFORMAT	The type library has an older format.

TYPE_E_UNKNOWNLCID	The LCID could not be found in the OLE support DLLs.

TYPE_E_CANTLOADLIBRARY	The type library or DLL could not be loaded.

Other return codes	All FACILITY_STORAGE errors may be returned.


TComServer::SetServerName
 VCL Reference

TComServer.SetServerName

TComServer	See also

Sets the ServerName property.

procedure SetServerName(const Name: string);

Description

Call SetServerName to provide a name for the server. If the server has an associated type library (the TypeLib property is nil), SetServerName does nothing, because the name for the server must match the name specified in the type library.


TComServer.UpdateRegistry
 VCL Reference

TComServer.UpdateRegistry

TComServer	See also

Registers information on classes implemented in the COM server.

procedure UpdateRegistry(Register: Boolean);

Description

UpdateRegistry updates the registry to reflect the current status of the COM server. Accordingly, UpdateRegistry either registers or unregisters the type library information and the CLSIDs associated with the class factories instantiated by the COM server.

The global functions that register and unregister the server call UpdateRegistry. UpdateRegistry is also called by the Initialize method.


Hierarchy

TObject

TComServerObject

TComServer


TComServerObject
 VCL Reference

TComServerObject

Hierarchy	Properties	Methods	See also

TComServerObject is the abstract base class for TComServer.

Unit

ComObj

Description

TComServerObject is used as a base class for the TComServer class. All of its methods are abstract and protected. The TComServerObject introduces protected abstract methods that are overridden in descendant classes as accessor functions for its properties. These methods are implemented in the TComServer class. All of the properties of TComServerObject are read-only.

To use a COM server object, include the ComServ unit in the project. This unit automatically instantiates the descendant TComServer class and assigns that object to the ComServ variable in the ComServ unit.


 VCL Reference

TComServerObject properties

TComServerObject	Alphabetically	Legend

In TComServerObject

HelpFileName

ServerFileName

ServerKey

ServerName

StartSuspended

TypeLib


 VCL Reference

TComServerObject properties

TComServerObject	By object	Legend

HelpFileName

ServerFileName

ServerKey

ServerName

StartSuspended

TypeLib


TComServerObject.HelpFileName
 VCL Reference

TComServerObject.HelpFileName

TComServerObject

Specifies the name of the Help file associated with the module.

property HelpFileName: string;

Description

The abstract accessor methods for HelpFileName are overridden in descendant classes.


TComServerObject.ServerFileName
 VCL Reference

TComServerObject.ServerFileName

TComServerObject	See also

Specifies the complete path and filename of the COM server.

property ServerFileName: string;

Description

The abstract accessor methods for ServerFileName are overridden in descendant classes.


TComServerObject.ServerKey
 VCL Reference

TComServerObject.ServerKey

TComServerObject

Indicates whether the COM server is an in-process server or whether it is a local server.

property ServerKey: string;

Description

The abstract accessor methods for ServerKey are overridden in descendant classes.


TComServerObject.ServerName
 VCL Reference

TComServerObject.ServerName

TComServerObject	See also

Specifies the name of the executable file for the server.

property ServerName: string;

Description

The abstract accessor methods for ServerName are overridden in descendant classes.


TComServerObject.StartSuspended
 VCL Reference

TComServerObject.StartSuspended

TComServerObject	See also

Specifies whether the server started in a suspended state.

property StartSuspended: Boolean;

Description

StartSuspended specifies whether the server started in a suspended state.


TComServerObject.TypeLib
 VCL Reference

TComServerObject.TypeLib

TComServerObject

Provides access to the type library associated with the COM server.

property TypeLib: ITypeLib;

Description

The abstract accessor methods for TypeLib are overridden in descendant classes.


 VCL Reference

TComServerObject methods

TComServerObject	Alphabetically	Legend

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComServerObject methods

TComServerObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TComServerObject


TConnectionPoints
 VCL Reference

TConnectionPoints

Hierarchy	Properties	Methods	See also

TConnectionPoints implements the IConnectionPointContainer interface for a COM object that generates events on clients.

Unit

AxCtrls

Description

TConnectionPoints lets an object indicate the existence of outgoing interfaces (event interfaces). TConnectionPoints implements the IConnectionPointContainer interface, which clients use to register an interest in event notifications. COM wizards add a TConnectionPoints object as a class member to automatically generated classes that fire events on clients.

The IConnectionPoint interface provides access to an enumerator sub-object with the IEnumConnectionPoints interface. It also provides access to all the connection point sub-objects, each of which implements the IConnectionPoint interface. The IConnectionPoint interface provides access to an enumerator sub-object with the IEnumConnections interface.

TConnectionPoints objects are used to obtain access to:

An enumerator sub-object with the IEnumConnectionPoints interface. The IEnumConnectionPoints interface can be used to enumerate connection points for each outgoing IID.

Connection point sub-objects with the IConnectionPoint interface for each outgoing IID. Through the IConnectionPoint interface, a client starts or terminates an advisory loop with the connectable object and the client's own sink. The client can also use the IConnectionPoint interface to obtain an enumerator object with the IEnumConnections interface to enumerate the connections that it knows about.

Because the ActiveX wizard automatically sets up events for a control, users only need to use these interfaces directly when they wish to modify the standard VCL implementation or to add events to a non-ActiveX control automation server.

Interface implemented

IConnectionPointContainer


 VCL Reference

TConnectionPoints properties

TConnectionPoints	Alphabetically	Legend

In TConnectionPoints

Controller


 VCL Reference

TConnectionPoints properties

TConnectionPoints	By object	Legend

Controller


TConnectionPoints.Controller
 VCL Reference

TConnectionPoints.Controller

TConnectionPoints	See also

Provides access to the IUnknown of the connection points.

property Controller: IUnknown;

Description

Controller is the IUnknown interface reference of the connection points object. TConnectionPoints aggregates several sub-objects that share this interface as a single controlling IUnknown. The IUnknown methods implemented in the sub-objects delegate to this Controller.

When the TConnectionPoints object is created, its constructor is passed a controlling IUnknown. Controller is initialized to this IUnknown in the constructor.


 VCL Reference

TConnectionPoints methods

TConnectionPoints	Alphabetically	Legend

In TConnectionPoints

Create

CreateConnectionPoint

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConnectionPoints methods

TConnectionPoints	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateConnectionPoint

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TConnectionPoints.Create
 VCL Reference

TConnectionPoints.Create

TConnectionPoints	See also

Instantiates a connection points object.

constructor Create(const AController: IUnknown);

Description

It is not necessary to call Create directly. It is used internally by other objects to create the connection points object.

Create allocates memory for a connection points object and initializes the Controller property using the AController parameter.  Then it creates a list for the individual connection point objects that it will contain.


TConnectionPoints.CreateConnectionPoint
 VCL Reference

TConnectionPoints.CreateConnectionPoint

TConnectionPoints	See also

Instantiates a connection point object.

type

  TConnectionKind = (ckSingle, ckMulti);

  TConnectEvent = procedure(const Sink: Iunknown; Connecting: Boolean) of object;

function CreateConnectionPoint(const IID: TGUID; Kind: TConnectionKind; OnConnect: TConnectEvent): ConnectionPoint;

Description

CreateConnectionPoint is automatically called when an ActiveX control is initialized. CreateConnectionPoint creates and returns a connection point object. It passes to the connection point constructor:

Itself as the connection point container.

IID as the GUID or interface identifier of the outgoing interface managed by this connection point.

OnConnect as the connection event used in the IConnectionPoint Advise method.

TConnectEvent is a pointer to a procedure for the OnConnect event of the connection point object being created.  TConnectionKind is a type indicating whether there are multiple connections to that connection point.


TConnectionPoints.Destroy
 VCL Reference

TConnectionPoints.Destroy

TConnectionPointsSee also

Destroys an instance of a connection points object.

destructor Destroy; override;

Description

Destroy is called automatically. It is not necessary for the user to dispose of the connection points object. Destroy frees the list of connection point objects that was created in the constructor.


Hierarchy

TObject

TConnectionPoints


TConnectionBroker
 VCL Reference

 TConnectionBroker

Hierarchy	Properties	Methods	Events	Using TConnectionBroker	See also

TConnectionBroker centralizes the connection to an application server for a set of client datasets that all use the same connection.

Unit

DBClient

Description

Use a connection broker when your application has several client datasets that all use the same connection component to establish a connection to an application server. If you set the ConnectionBroker property of all your client datasets to a single connection broker, then you can change the connection component that handles the connection to an application server for all of them by changing the connection broker’s Connection property. That is, instead of changing the RemoteServer property of every client dataset, you can change a single property on the connection broker.

Similarly, the connection broker centralizes the use of the application server’s interface and events that occur when you open or close a connection to the application server. Thus, if you need to change the connection component (for example, to use a different protocol), you do need to rewrite your event handlers for the BeforeConnect, AfterConnect, OnGetUserName, OnLogin, BeforeDisconnect, or AfterDisconnect events or any calls that use the connection broker’s AppServer property. The AppServer property and the event handlers can reside on the protocol-neutral connection broker rather than on the connection component, and so will not disappear when you switch to a different connection component.


 VCL Reference

TConnectionBroker properties

TConnectionBroker	Alphabetically	Legend

In TConnectionBroker

Connection

Derived from TCustomRemoteServer

AppServer

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TConnectionBroker properties

TConnectionBroker	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

Connection

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

Tag

VCLComObject


TConnectionBroker.Connection
 VCL Reference

TConnectionBroker.Connection

TConnectionBroker	See also

Specifies the connection component that actually forms the connection to the application server.

property Connection: TCustomRemoteServer;

Description

Set Connection to the connection component that establishes a connection to the application server for all the client datasets listed in the DataSets property. For each client dataset listed in DataSets, the connection broker assigns Connection to its RemoteServer property. This connection locates the application server and obtains its IAppServer interface, which the client datasets then use for communicating with remote providers.


 VCL Reference

TConnectionBroker events

TConnectionBroker	Alphabetically	Legend

Derived from TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TConnectionBroker events

TConnectionBroker	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


 VCL Reference

TConnectionBroker methods

TConnectionBroker	Alphabetically	Legend

In TConnectionBroker

GetServer

Derived from TCustomRemoteServer

Create

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TConnectionBroker methods

TConnectionBroker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TConnectionBroker.GetServer
 VCL Reference

TConnectionBroker.GetServer

TConnectionBroker	See also

Returns the IAppServer interface of the application server.

function GetServer: IAppServer; override;

Description

Call GetServer to obtain the interface of the application server. GetServer calls the GetServer method of the component that the Connection property identifies, centralizing access to the application server’s interface.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TConnectionBroker


TConnectionPoint
 VCL Reference

TConnectionPoint

Hierarchy	Properties	Methods	See also

TConnectionPoint implements the IConnectionPoint interface for a single outgoing interface.

Unit

AxCtrls

Description

TConnectionPoint implements the IConnectionPoint interface, which client applications call to register an interest in a specific outgoing interface. The corresponding outgoing interface defines event handlers that the client implements. The client uses IConnectionPoint to supply its implementation of this interface (called an event sink), so that it can be called when events occur.

Wizards that generate event support code automatically create a class member of type TConnectionPoint, which maintains a list of event sinks supplied by clients.

TConnectionPoint objects support the following features:

Outgoing interfaces, such as event sets.

The ability to enumerate the IIDs of the outgoing interfaces.

The ability to connect and disconnect sinks to the object for those outgoing IIDs.

The ability to enumerate the connections that exist to a particular outgoing interface.

The IConnectionPoint and IConnectionPointContainer interfaces are used for OLE event handling. Because the wizard automatically sets up events for a control, users only need to use these interfaces directly when they wish to modify the standard VCL implementation or to add events to a COM server whose wizard does not generate event support code.

Implemented methods of IConnectionPoint

GetConnectionInterface, GetConnectionPointContainer, Advise, Unadvise, EnumConnections


 VCL Reference

TConnectionPoint properties

TConnectionPoint	Alphabetically	Legend

In TConnectionPoint

SinkList

Derived from TAggregatedObject

Controller


 VCL Reference

TConnectionPoint properties

TConnectionPoint	By object	Legend

Controller

SinkList


TConnectionPoint.SinkList
 VCL Reference

TConnectionPoint.SinkList

TConnectionPoint	See also

Lists the sinks for the outgoing interfaces maintained by the connection point.

property SinkList: TList;

Description

SinkList lists the sinks managed by the connection point. These are the interfaces that clients implement for responding to server events. When a client registers an interest in the connection point, it supplies an interface pointer that is added to this list.

Each item in the list can be cast to an IUnknown and used to access the outgoing interface.


 VCL Reference

TConnectionPoint methods

TConnectionPoint	Alphabetically	Legend

In TConnectionPoint

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConnectionPoint methods

TConnectionPoint	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TConnectionPoint.Create
 VCL Reference

TConnectionPoint.Create

TConnectionPoint	See also

Instantiates a connection point object.

type

  TConnectionKind = (dkSingle, dkMulti);

  TConnectEvent = procedure(const Sink: Iunknown; Connecting: Boolean) of object;

constructor Create(Container: TConnectionPoints; const IID: TGUID; OnConnect: TConnectEvent);

Description

Create is called automatically by the connection point container’s CreateConnectionPoint method, to instantiate a connection point object. This occurs when an ActiveX control is initialized.

Create allocates memory for a connection point object and calls the inherited Create, passing it the Container’s controlling IUnknown. Container is a connection point container object. Create adds the connection point object to the Container. Then it sets the

IID as the GUID or interface identifier of the outgoing interface managed by this connection point.

IKind, indicating whether it is a single or multiple connection to that point.

OnConnect as the connection event used in the IConnectionPoint Advise method.

TConnectEvent points to a procedure for the OnConnect event of the connection point. TConnectionKind is a type indicating whether there are multiple connections to the connection point.


TConnectionPoint.Destroy
 VCL Reference

TConnectionPoint.Destroy

TConnectionPoint	See also

Destroys the instance of a connection point object.

destructor Destroy; override;

Description

It is not necessary to explicitly free the connection point object. Connection point objects are automatically destroyed. If the connection point container object is not nil, Destroy calls on it to remove the connection point object from it.


Hierarchy

TObject

TAggregatedObject

TContainedObject

TConnectionPoint


TCookie
 VCL Reference

TCookie

Hierarchy	Properties	Methods	See also

TCookie represents a Cookie header in an HTTP response message.

Unit

HTTPApp

Description

Use TCookie to specify the cookie header that should be sent with a response message when responding to an HTTP request message. Cookie headers contain state information that the Web client passes on to other locations on the Internet or Intranet.


 VCL Reference

TCookie properties

TCookie	Alphabetically	Legend

In TCookie

Domain

Expires

HeaderValue

Name

Path

Secure

Value

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TCookie properties

TCookie	By object	Legend

Collection

DisplayName

Domain

Expires

HeaderValue

ID

Index

Name

Path

Secure

Value


TCookie.Domain
 VCL Reference

TCookie.Domain

TCookie	See also

Specifies the Domain field of the cookie header.

property Domain: string;

inDescription

Use Domain to limit the recipients of the cookie header to certain domains. The Web client will only send this cookie on to URIs in the specified domain.  To limit the recipients to certain paths within the specified domain, use the Path property.


TCookie.Expires
 VCL Reference

TCookie.Expires

TCookie	See also	Example

Specifies when the cookie is no longer valid.

property Expires: TDateTime;

Description

Set Expires to the date and time after which the Web client should not send the cookie on with HTTP messages.


TCookie.HeaderValue
 VCL Reference

TCookie.HeaderValue

TCookie	See also

Specifies the Cookie header string that represents this TCookie object.

property HeaderValue: string;

Description

Read HeaderValue to determine the Cookie header that is added to the HTTP response message for this TCookie object. HeaderValue combines the information specified by the Name and Value properties into a single Name=Value field, and then adds the Domain, Path, Expires, and Secure fields based on the values of the properties with the corresponding names.


TCookie.Name
 VCL Reference

TCookie.Name

TCookie	See also	Example

Specifies the name of the custom field represented by this Cookie header.

property Name: string;

}Description

Set Name to the name that identifies the use of the Value property in the Cookie header. The Value property is combined with the Name property into a string of the form Name=Value.  This string appears as one of the fields in the Cookie header represented by the HeaderValue property.


TCookie.Path
 VCL Reference

TCookie.Path

TCookie	See also

Identifies the paths of URLs to which the Cookie should be sent.

property StartValue: string;

Description

Use Path to limit the recipients of the cookie header to certain paths. The Web client will only send this cookie header on to URLs with the specified path.  To limit the recipients to certain domains, use the Domain property.


TCookie.Secure
 VCL Reference

TCookie.Secure

TCookie	Example

Determines whether the Web client must use a secure connection to pass on the Cookie header.

property Secure: Boolean;

Description

Set Secure to True if the Web client must use a secure connection when sending the Cookie header.  Secure connections are connections where messages may not be stored on any permanent medium such as a back-up tape. If the message is stored temporarily in a file, the file must be deleted.

Set Secure to False if it does not matter whether the Cookie header is sent using a secure connection.


TCookie.Value
 VCL Reference

TCookie.Value

TCookie	See also	Example

Specifies the value of the Cookie header field named by the Name property.

property Value: string;

Description

Set Value to the value associated with the field named by the Name property. The Value property is combined with the Name property into a string of the form Name=Value.  This string appears as one of the fields in the Cookie header represented by the HeaderValue property.


 VCL Reference

TCookie methods

TCookie	Alphabetically	Legend

In TCookie

AssignTo

Create

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCookie methods

TCookie	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCookie.AssignTo
 VCL Reference

TCookie.AssignTo

TCookie	See also

Copies the properties of the TCookie object to another TCookie object.

procedure AssignTo(Dest: TPersistent); override;

Description

Do not call the AssignTo method for TCookie.  Instead, call the Assign method of the destination object.  The Assign method of the destination object calls the AssignTo method if it does not contain code for copying the properties of a TCookie object.  If the destination object is a TCookie object, AssignTo copies the Name, Value, Domain, Path, Expires, and Secure properties so the destination cookie generates the same Cookie header string.


TCookie.Create
 VCL Reference

TCookie.Create

TCookie	See also

Creates an instance of TCookie.

constructor Create(Collection: TCollection); override;

Description

It is seldom necessary to call the constructor for TCookie directly.  Instead, create TCookie objects indirectly by calling the Add method of TCookieCollection.

After calling the inherited constructor, Create initializes the Expires property to indicate no expiration date.


Hierarchy

TObject

TPersistent

TCollectionItem

TCookie


TCustomPageProducer
 VCL Reference

TCustomPageProducer

Hierarchy	Properties	Methods	See also

TCustomPageProducer is the base class for objects that produce a string of HTML commands based on an input template.

Unit

HTTPProd

Description

Use TCustomPageProducer as a base class when defining an object that converts an HTML template into a string of HTML commands which can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the page producer.


 VCL Reference

TCustomPageProducer properties

TCustomPageProducer	Alphabetically	Legend

In TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomPageProducer properties

TCustomPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

StripParamQuotes

Tag

VCLComObject

WebModuleContext


TCustomPageProducer.HTMLDoc
 VCL Reference

TCustomPageProducer.HTMLDoc

TCustomPageProducer	See also

Specifies the HTML template used to generate the value returned by the Content method.

property HTMLDoc: TStrings;

Description

Set HTMLDoc to a set of strings that make up the HTML template. Each string is a sequence of one or more HTML commands or HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

Note:	Setting HTMLDoc clears the HTMLFile property.


TCustomPageProducer.HTMLFile
 VCL Reference

TCustomPageProducer.HTMLFile

TCustomPageProducer	See also

Specifies the name of a file that contains the HTML template used to generate the value returned by the Content method.

property HTMLFile: TFileName;

Description

Set HTMLFile to the name of the file that contains an HTML template. The HTML template is a sequence of HTML commands and HTML-transparent tags. An HTML-transparent tag has the form

<#TagName Param1=Value1 Param2=Value2 ...>

A pound sign (#) immediately follows the opening angle bracket (<) with no spaces separating it from the angle bracket. The pound sign identifies the string to the page producer as an HTML-transparent tag. The tag name immediately follows the pound sign with no spaces separating it from the pound sign. The page producer converts the entire HTML-transparent tag into true HTML commands based on the value of the tag name. Following the tag name, the HTML-transparent tag can optionally include parameters that specify details of the conversion to be performed. Each parameter is of the form ParamName=Value, where there is no space between the parameter name, the equals symbol (=) and the value. Each parameter is delimited by white space.

The angle brackets (< >) make the tag transparent to HTML browsers that do not recognize the #TagName construct.

Note:	Setting HTMLFile clears the HTMLDoc property.

Note:	When distributing applications that contain page producers which use the HTMLFile property, be sure to distribute the file along with the application. Also, be sure that the value of HTMLFile does not include a hard-coded path name that will not be available on the user’s disk.


 VCL Reference

TCustomPageProducer methods

TCustomPageProducer	Alphabetically	Legend

In TCustomPageProducer

Create

Destroy

Derived from TBasePageProducer

Content

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeOnRelease

FreeNotification

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomPageProducer methods

TCustomPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeOnRelease

FreeNotification

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomPageProducer.Create
 VCL Reference

TCustomPageProducer.Create

TCustomPageProducer	See also

Creates an instance of TCustomPageProducer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TCustomPageProducer.

After calling the inherited constructor, Create allocates the TStrings object that implements the HTMLDoc property.


TCustomPageProducer.Destroy
 VCL Reference

TCustomPageProducer.Destroy

TCustomPageProducer	See also

Destroys an instance of TCustomPageProducer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the page producer reference is not nil, and only then calls Destroy.

Destroy frees the TStrings object implements the HTMLDoc property before calling the inherited destructor.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TCustomPageProducer


TCriticalSection
 VCL Reference

TCriticalSection

Hierarchy	Methods	Using TCriticalSection	See also

TCriticalSection allows a thread in a multi-threaded application to temporarily block other threads from accessing a block of code.

Unit

SyncObjs

Description

Use TCriticalSection to safeguard operations that may be disrupted if another thread executes certain sections of code before the operation is completed. Critical sections work like gates that allow only a single thread to enter at a time. Because they block the execution of other threads, overusing critical sections can seriously interfere with performance.

Critical sections must be global in scope so that they are available to all threads. In every thread, any action that could interfere with the operations safeguarded by the critical section should only take place after calling the Acquire or Enter method.  Threads that do not use the critical section for relevant operations can introduce bugs.


 VCL Reference

TCriticalSection methods

TCriticalSection	Alphabetically	Legend

In TCriticalSection

Acquire

Create

Destroy

Enter

Leave

Release

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCriticalSection methods

TCriticalSection	By object	Legend

Acquire

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Enter

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

Leave

MethodAddress

MethodName

NewInstance

Release

SafeCallException


TCriticalSection.Acquire
 VCL Reference

TCriticalSection.Acquire

TCriticalSection	See also

Binds the critical section to the calling thread.

procedure Acquire; override;

Description

Call Acquire to block all other threads from acquiring this critical section until the Release or Leave method is called. Acquire does the same thing as the Enter method.


TCriticalSection.Create
 VCL Reference

TCriticalSection.Create

TCriticalSection	See also

Creates an instance of TCriticalSection.

constructor Create;

Description

Call Create to create and initialize an instance of TCriticalSection. A TCriticalSection object can be created for a single object that contains thread-sensitive code, or as a global object to be shared by several threads.


TCriticalSection.Destroy
 VCL Reference

TCriticalSection.Destroy

TCriticalSection	See also

Destroys an instance of TCriticalSection.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCriticalSection object is not nil, and only then calls Destroy.


TCriticalSection.Enter
 VCL Reference

TCriticalSection.Enter

TCriticalSection	See also

Blocks other threads when the calling thread enters a thread-sensitive section.

procedure Enter;

Description

Call Enter to block all other threads from entering code protected by this critical section until the Leave or Release method is called. Enter calls the Acquire method to bind the critical section to the calling thread.


TCriticalSection.Leave
 VCL Reference

TCriticalSection.Leave

TCriticalSection	See also

Allows other threads to use the critical section.

procedure Leave;

Description

Call Leave at the end of a thread-sensitive section of code. Each call to Leave should be balanced by a call to Enter or Acquire at the beginning of the thread-sensitive section. Leave calls Release to allow other threads to acquire the critical section.


TCriticalSection.Release
 VCL Reference

TCriticalSection.Release

TCriticalSection	See also

Allows other threads to use the critical section.

procedure Release; override;

Description

Call Release when the thread no longer needs to block other threads from executing code that is protected by this critical section. Each call to Release should be balance by an earlier call to Acquire or Enter that blocked other threads from executing. Release does the same thing as the Leave method.


Hierarchy

TObject

TSynchroObject

TCriticalSection


TCurrencyField
 VCL Reference

TCurrencyField

Hierarchy	Properties	Methods	Events 	Using TCurrencyField	See also

TCurrencyField represents a field that contains currency values in a dataset.

Unit

DB

Description

TCurrencyField encapsulates the fundamental behavior common to currency fields. TCurrencyField differs from its immediate ancestor TFloatField only in having a DataType of ftCurrency, and in formatting the value using a currency format (one that represents monetary values) by default. Currency fields can hold values in the range from (positive or negative) 5.0 * 10^-324 to 1.7 * 10^308 with an accuracy of 15 digits.

Do not confuse TCurrencyField with the Currency data type. Currency fields use the Double data type to store and manipulate their values. This data type is the format used by the physical database tables for currency fields. The TBCDField class uses the Currency data type to store and manipulate its value.

If you use the Fields editor at design time to create a persistent field component for the currency field, you can access it by name at runtime. When using dynamic field components, you can access the TCurrencyField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TCurrencyField properties

TCurrencyField	Alphabetically	Legend

Derived from TFloatField

AsFloat

AsInteger

AsString

AsVariant

Currency

DataSize

MaxValue

MinValue

Precision

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCurrencyField properties

TCurrencyField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

Currency

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

Precision

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


 VCL Reference

TCurrencyField events

TCurrencyField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TCurrencyField events

TCurrencyField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TCurrencyField methods

TCurrencyField	Alphabetically	Legend

In TCurrencyField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCurrencyField methods

TCurrencyField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TCurrencyField.Create
 VCL Reference

TCurrencyField.Create

TCurrencyField	See also

Creates an instance of TCurrencyField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TCurrencyField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftCurrency and the Currency property to True. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TCurrencyField. After instantiating a TCurrencyField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TCurrencyField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TCurrencyField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TCurrencyField object for a field named Amount accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TCurrencyField;

begin

  SQLDataSet1.Close;

  T := TCurrencyField.Create(SQLDataSet1);

  T.FieldName := 'Amount';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TFloatField

TCurrencyField


TCustomActionControl
 VCL Reference

TCustomActionControl

Hierarchy	Properties	Methods	See also

TCustomActionControl is the base class for ActionBand custom controls.

Unit

ActnMan

Description

TCustomActionControl is a base class for several ActionBand components. Most notably, the standard menu item (TStandardMenuItem) and menu button (TStandardMenuButton) derive from this class.

Do not create instances of TCustomActionControl. If you would like to replace the standard menu item and/or menu button behaviors, use the classes TCustomMenuItem and/or TCustomMenuButton as parent classes for your replacement classes.


 VCL Reference

TCustomActionControl properties

TCustomActionControl	Alphabetically	Legend

In TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionControl properties

TCustomActionControl	By object	Legend

Action

ActionBar

ActionClient

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Enabled

Floating

FloatingDockSiteClass

GlyphLayout

Height

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

Tag

TextBounds

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TCustomActionControl.ActionBar
 VCL Reference

TCustomActionControl.ActionBar

TCustomActionControl	See also

The ActionBand object which contains the custom action control

property ActionBar: TCustomActionBar;

Description

Custom action controls are objects on an ActionBand user interface object, such as a TActionMainMenuBar. Use ActionBar to refer to that object.


TCustomActionControl.ActionClient
 VCL Reference

TCustomActionControl.ActionClient

TCustomActionControl	See also

Refers to the control's action client

property ActionClient: TActionClientItem;

Description

Use ActionClient to obtain a reference to a TCustomActionControl's action client item. The action client item serves as an intermediary between the visible control and the action initiated by that control. See the documentation for the TActionClientItem object (referenced above) for more information.


TCustomActionControl.GlyphLayout
 VCL Reference

TCustomActionControl.GlyphLayout

TCustomActionControl	See also

Describes where the image should be on the control

property GlyphLayout: TButtonLayout;

Description

GlyphLayout describes where the image should be placed on the control. The description is in terms of a TButtonLayout value; see the documentation for that type (referenced above) for more information.


TCustomActionControl.Margins
 VCL Reference

TCustomActionControl.Margins

TCustomActionControl

Describes the boundaries of the control for drawing purposes.

property Margins: TRect;

Description

Margins is a TRect which describes the area of the control which can contain writing and/or drawings. The units of the TRect are pixels.


TCustomActionControl.Selected
 VCL Reference

TCustomActionControl.Selected

TCustomActionControl

Indicates whether the control is currently selected.

property Selected: Boolean;

Description

If a control is selected (by mouse click, keyboard or other action) Selected is True; otherwise it is False. One example of a situation where Selected is useful is when the control is to be redrawn, because generally the control should be drawn differently if it is selected.


TCustomActionControl.Separator
 VCL Reference

TCustomActionControl.Separator

TCustomActionControl

Indicates whether the control is a separator.

property Separator: Boolean;

Description

Menus and toolbars may include separators, which often appear as vertical or horizonal bars. Separators are also instances of TCustomActionControl or one of its descendants. Use Separator to see if the current control is a separator.


TCustomActionControl.ShowCaption
 VCL Reference

TCustomActionControl.ShowCaption

TCustomActionControl

Indicates whether the control's caption should be shown.

property ShowCaption: Boolean;

Description

Read ShowCaption to determine whether or not the custom action control's caption, a text description of the control's function, should be shown.


TCustomActionControl.ShowShortCut
 VCL Reference

TCustomActionControl.ShowShortCut

TCustomActionControl

Indicates whether the control's short cut should be shown.

property ShowShortCut: Boolean;

Description

Read ShowShortCut to determine whether or not the custom action control's short cut keystrokes should be shown.


TCustomActionControl.SmallIcon
 VCL Reference

TCustomActionControl.SmallIcon

TCustomActionControl

Indicates whether the control's small icon should be shown.

property SmallIcon: Boolean;

Description

Set SmallIcon to True if you want the small icon associated with the control to be shown. Otherwise, set it to False.


TCustomActionControl.Spacing
 VCL Reference

TCustomActionControl.Spacing

TCustomActionControl

Controls the separation between the control's icon and caption.

property Spacing: Integer;

Description

The value stored in Spacing is the number of pixels between the control's icon and caption. If either is absent from the control, the value of Spacing becomes irrelevant. When the control is drawn, the value used in calculations will be zero.


TCustomActionControl.TextBounds
 VCL Reference

TCustomActionControl.TextBounds

TCustomActionControl

A bounding rectangle for the control caption.

property TextBounds: TRect;

Description

TextBounds is a bounding rectangle for the control's caption.


TCustomActionControl.Transparent
 VCL Reference

TCustomActionControl.Transparent

TCustomActionControl	See also

Shows whether the control is transparent or not.

property Transparent: Boolean;

Description

If the action client has a background image to display, the control becomes transparent so that background will display properly. Use Transparent to see if the control is transparent and, therefore, if its action client has a custom background.


 VCL Reference

TCustomActionControl Events

TCustomActionControl	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionControl Events

TCustomActionControl	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionControl methods

TCustomActionControl	Alphabetically	Legend

In TCustomActionControl

CalcBounds

Click

Create

Destroy

DragDrop

DrawBackground

DrawGlyph

DrawText

InitiateAction

Keyed

Derived from TControl

BeginDrag

BringToFront

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

IsRightToLeft

ManualDock

ManualFloat

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionControl methods

TCustomActionControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

NewInstance

Perform

Refresh

RemoveComponent

RemoveFreeNotification

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionControl.Create
 VCL Reference

TCustomActionControl.Create

TCustomActionControl	See also

Creates an instance of TCustomActionControl.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomActionControl. However, you should never attempt to instantiate a TCustomActionControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomActionControl.Destroy
 VCL Reference

TCustomActionControl.Destroy

TCustomActionControl	See also

Destroys an instance of TCustomActionControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomActionControl.CalcBounds
 VCL Reference

TCustomActionControl.CalcBounds

TCustomActionControl	See also

Calculates the size of the control.

procedure TCustomActionControl.CalcBounds;

Description

The size of the control depends on many factors, such as the presence of an icon, caption, and shortcuts. CalcBounds computes the boundaries of the control considering these kinds of factors. At the end, it calls SetBounds and other routines to ensure that the values are set properly.


TCustomActionControl.Click
 VCL Reference

TCustomActionControl.Click

TCustomActionControl	See also

Executes the control's function in response to a mouse click.

procedure TCustomActionControl.Click;

Description

This override of the method inherited from TControl executes the control's function in response to a user's mouse click. Usage data, which is used to determine whether a control is used frequently enough to be shown by default, is updated as well.


TCustomActionControl.DrawBackground
 VCL Reference

TCustomActionControl.DrawBackground

TCustomActionControl	See also

Draws a background image on the control.

procedure TCustomActionControl.DrawBackground(var PaintRect: TRect);

Description

Use DrawBackground to draw a background image on the control within the area specified by PaintRect.


TCustomActionControl.DrawGlyph
 VCL Reference

TCustomActionControl.DrawGlyph

TCustomActionControl	See also

Draws a symbol on the control.

procedure TCustomActionControl.DrawGlyph(const Location: TPoint);

Description

Use DrawGlyph to draw a symbol on the control at the specified location.


TCustomActionControl.DrawText
 VCL Reference

TCustomActionControl.DrawText

TCustomActionControl	See also

Draws text on the control.

procedure TCustomActionControl.DrawText(var ARect: TRect; var Flags: Cardinal; Text: String);

Description

Use DrawText to draw the text specified by Text on the control within the area specified by ARect.


TCustomActionControl.DragDrop
 VCL Reference

TCustomActionControl.DragDrop

TCustomActionControl	See also

Performs actions and generates an OnDragDrop event.

procedure TCustomActionControl.DragDrop(Source: TObject; X, Y: Integer);

Description

This override of the method inherited from TControl executes instructions and generates an OnDragDrop event. The method is called when a user drags and drops an item (Source) onto the custom action control at coordinates (X,Y).


TCustomActionControl.InitiateAction
 VCL Reference

TCustomActionControl.InitiateAction

TCustomActionControl	See also

Calls the action client's Update method if the control is associated with an action client.

procedure TCustomActionControl.InitiateAction; override;

Description

This method performs the same function as TControl's InitiateAction method. See the documentation for that method for more details.


TCustomActionControl.Keyed
 VCL Reference

TCustomActionControl.Keyed

TCustomActionControl	See also

Execute's the control's function in response to a keyboard action.

procedure TCustomActionControl.Keyed;

Description

Use Keyed to execute the control's function in response to a user request from the keyboard, as opposed to a mouse click. Usage data, which is used to determine whether a control is used frequently enough to be shown by default, is updated as well.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl


TCustomActionDockBar
 VCL Reference

TCustomActionDockBar

Hierarchy	Properties	Methods 	Events	See also

TCustomActionDockBar is the ancestor for action bands that require the ability to dock.

Unit

ActnCtrls

Description

TCustomActionDockBar is the ancestor for all action bands that require the ability to dock.


 VCL Reference

TCustomActionDockBar properties

TCustomActionDockBar	Alphabetically	Legend

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionDockBar properties

TCustomActionDockBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TCustomActionDockBar events

TCustomActionDockBar	Alphabetically	Legend

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint


 VCL Reference

TCustomActionDockBar events

TCustomActionDockBar	By Object	Legend

OnControlCreated

OnGetControlClass

OnPaint


 VCL Reference

TCustomActionDockBar methods

TCustomActionDockBar	Alphabetically	Legend

In TCustomActionDockBar

Create

Dock

Derived from TCustomActionBar

Destroy

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionDockBar methods

TCustomActionDockBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionDockBar.Create
 VCL Reference

TCustomActionDockBar.Create

TCustomActionDockBar

Creates and initializes a TCustomActionDockBar instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionDockBar and initializes its properties.


TCustomActionDockBar.Dock
 VCL Reference

TCustomActionDockBar.Dock

TCustomActionDockBar	See also

Used internally to dock the action band.

procedure Dock (NewDockSite: TWinControl; ARect: TRect); override;

Description

Do not call Dock. It is called automatically to implement many of the details of docking the action band to a dock site.

To dock the action band programmatically, use ManualDock instead.

The NewDockSite parameter specifies the docking site to which the action band is being docked. The ARect parameter indicates the new dimensions of the action band when it is docked to NewDockSite.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar


TCustomActionMainMenuBar
 VCL Reference

TCustomActionMainMenuBar

Hierarchy	Properties	Methods 	Events	See also

TCustomActionMainMenuBar is the ancestor for the TActionMainMenuBar component.

Unit

ActnMenus

Description

TCustomActionMainMenuBar is the ancestor for the TActionMainMenuBar component.


 VCL Reference

TCustomActionMainMenuBar properties

TCustomActionMainMenuBar	Alphabetically	Legend

In TCustomActionMainMenuBar

Inactive

Derived from TCustomActionMenuBar

AnimationStyle

ExpandDelay

InMenuLoop

ParentControl

RootMenu

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionMainMenuBar properties

TCustomActionMainMenuBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

AnimationStyle

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

ExpandDelay

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

Inactive

InMenuLoop

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentControl

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

RootMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


TCustomActionMainMenuBar.Inactive
 VCL Reference

TCustomActionMainMenuBar.Inactive

TCustomActionMainMenuBar

Specifies whether the action band is disabled or enabled.

property Inactive: Boolean;

Description

Inactive is used internally to determine whether the action band is enabled or disabled. When the state changes, Inactive calls Invalidate to force a repaint of the action band


 VCL Reference

TCustomActionMainMenuBar events

TCustomActionMainMenuBar	Alphabetically	Legend

Derived from TCustomActionMenuBar

OnGetPopupClass

OnPopup

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionMainMenuBar events

TCustomActionMainMenuBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetPopupClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnPopup

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TCustomActionMainMenuBar methods

TCustomActionMainMenuBar	Alphabetically	Legend

In TCustomActionMainMenuBar

Create

CloseMenu

Derived from TCustomActionMenuBar

Destroy

TrackMenu

Derived from TCustomActionDockBar

Dock

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionMainMenuBar methods

TCustomActionMainMenuBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseMenu

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionMainMenuBar.Create
 VCL Reference

TCustomActionMainMenuBar.Create

TCustomActionMainMenuBar

Creates and initializes a TCustomActionMainMenuBar instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionMainMenuBar and initializes its properties.


TCustomActionMainMenuBar.CloseMenu
 VCL Reference

TCustomActionMainMenuBar.CloseMenu

TCustomActionMainMenuBar

Closes the menu currently being displayed.

procedure CloseMenu; override;

Description

CloseMenu is called to close the menu currently being displayed, including any submenus that may be open.


TCustomActionMainMenuBar.Destroy
 VCL Reference

TCustomActionMainMenuBar.Destroy

TCustomActionMainMenuBar	See also

Destroys an instance of TCustomActionMainMenuBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionMainMenuBar reference is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar

TCustomActionMenuBar

TCustomActionMainMenuBar


TCustomActionMenuBar
 VCL Reference

TCustomActionMenuBar

Hierarchy	Properties	Methods 	Events	See also

TCustomActionMenuBar is the ancestor for action bands that render actions as menu item UI elements.

Unit

ActnMenus

Description

TCustomActionMenuBar is the ancestor for all action bands that render actions as menu item UI elements.


 VCL Reference

TCustomActionMenuBar properties

TCustomActionMenuBar	Alphabetically	Legend

In TCustomActionMenuBar

AnimationStyle

ExpandDelay

InMenuLoop

ParentControl

RootMenu

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionMenuBar properties

TCustomActionMenuBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

AnimationStyle

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

ExpandDelay

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

InMenuLoop

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentControl

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

RootMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


TCustomActionMenuBar.AnimationStyle
 VCL Reference

TCustomActionMenuBar.AnimationStyle

TCustomActionMenuBar

Specifies the type of animation the menu bar will display as it opens.

type

TAnimationStyle = (asNone, asDefault, asUnFold, asSlide, asFade);

property AnimationStyle: TAnimationStyle;

Description

Use AnimationStyle to change the style of animation used by the items in the menu bar as they open. The options are:.

Value	Animation description

asNone	No animation is used; the menu appears fully formed.

asDefault	The operating system default animation style is used.

asUnfold	The menu unfolds diagonally down from the upper left corner.

asSlide	The menu slides from the top down.

asFade	The menu fades in from invisible to visible.


TCustomActionMenuBar. ExpandDelay
 VCL Reference

TCustomActionMenuBar.ExpandDelay

TCustomActionMenuBar

Specifies, in milliseconds, the delay period that a menu action band uses before showing hidden or unused items.

property ExpandDelay: Integer;

Description

Use ExpandDelay to specify, in milliseconds, the delay period that a menu action band uses before showing hidden or unused items. The default is 4000 milliseconds.


TCustomActionMenuBar.InMenuLoop
 VCL Reference

TCustomActionMenuBar.InMenuLoop

TCustomActionMenuBar

Indicates whether items in the menu can be selected.

property InMenuLoop: Boolean;

Description

Use InMenuLoop to determine if the menu bar has focus or not, which would allow items on the menu bar to be selected.


TCustomActionMenuBar.ParentControl
 VCL Reference

TCustomActionMenuBar.ParentControl

TCustomActionMenuBar

Refers to the parent object of the TCustomActionBarControl.

property ParentControl: TCustomActionControl;

Description

Use ParentControl to obtain a reference to the parent object which created the TCustomActionMenuBar object. This property is used mostly for popup menus, where the content of the menu depends upon the object in which the menu is appearing (the parent object). ParentControl is simply a reference to that object.


TCustomActionMenuBar.RootMenu
 VCL Reference

TCustomActionMenuBar.RootMenu

TCustomActionMenuBar

Refers to the root menu of the ActionBand menu.

property RootMenu: TCustomActionMenuBar;

Description

Application menus frequently contain submenus. It is sometimes important to know what the root menu is of any given menu; for example, selecting an item on a submenu may require that some change be made to the root menu object. Use RootMenu to determine the root menu of any TCustomActionMenuBar object.


 VCL Reference

TCustomActionMenuBar Events

TCustomActionMenuBar	Alphabetically	Legend

In TCustomActionMenuBar

OnGetPopupClass

OnPopup

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionMenuBar Events

TCustomActionMenuBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetPopupClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnPopup

OnResize

OnStartDock

OnStartDrag

OnUnDock


TCustomActionMenuBar.OnGetPopupClass
 VCL Reference

TCustomActionMenuBar.OnGetPopupClass

TCustomActionMenuBar

Occurs when a popup class is added to a menu action band.

TGetPopupClassEvent = procedure(Sender: TObject; var PopupClass: TCustomPopupClass);

property OnGetPopupClass: TGetPopupClassEvent;

Description

Write an OnGetPopupClass event handler to add your own custom popup class to a menu action band.


TCustomActionMenuBar.OnPopup
 VCL Reference

TCustomActionMenuBar.OnPopup

TCustomActionMenuBar

Occurs just before the pop-up menu appears.

TMenuPopupEvent = procedure(Sender: TObject; Item: TCustomActionBarControl) ofobject;

property OnPopup: TMenuPopupEvent;

Description

Write an OnPopup event handler to take specific action just before the pop-up menu appears.


 VCL Reference

TCustomActionMenuBar methods

TCustomActionMenuBar	Alphabetically	Legend

In TCustomActionMenuBar

CloseMenu

Create

Destroy

Expand

TrackMenu

Derived from TCustomActionDockBar

Dock

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionMenuBar methods

TCustomActionMenuBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseMenu

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionMenuBar.CloseMenu
 VCL Reference

TCustomActionMenuBar.CloseMenu

TCustomActionMenuBar

Closes the menu currently being displayed.

procedure CloseMenu;

Description

CloseMenu is called to close the menu currently being displayed.


TCustomActionMenuBar.Create
 VCL Reference

TCustomActionMenuBar.Create

TCustomActionMenuBar

Creates and initializes a TCustomActionMenuBar instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionMenuBar and initializes its properties.


TCustomActionMenuBar.Destroy
 VCL Reference

TCustomActionMenuBar.Destroy

TCustomActionMenuBar	See also

Destroys an instance of TCustomActionMenuBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionMenuBar reference is not nil, and only then calls Destroy.


TCustomActionMenuBar.Expand
 VCL Reference

TCustomActionMenuBar.Expand

TCustomActionMenuBar

Causes the menu bar to show all items, including the hidden ones.

procedure Expand(Full: Boolean);

Description

Use Expand to show all of the items in a menu, even if they are marked as hidden. The Full parameter is used to indicate whether or not submenus should display all items as well.


TCustomActionMenuBar.TrackMenu
 VCL Reference

TCustomActionMenuBar.TrackMenu

TCustomActionMenuBar

Executes the action associated with the menu item.

procedure TrackMenu;

Description

TrackMenu is called internally to execute the action associated with the selected menu item.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar

TCustomActionMenuBar


TCustomActionPopupMenu
 VCL Reference

TCustomActionPopupMenu

Hierarchy	Properties	Methods 	Events	See also

TCustomActionPopupMenu is the ancestor for popup action bands that render actions as popup menu item UI elements.

Unit

ActnMenus

Description

TCustomActionPopupMenu is the ancestor for all popup action bands that render actions as popup menu item UI elements, including the standard form, TStandardMenuPopup. If you would like to replace TStandardMenuPopup with a style of your own, subclass TCustomActionPopupMenu to provide your own behaviors. To make the change for your application, set the value of MenuPopupClass (a global variable) to your own subclass of TCustomActionPopupMenu instead of TStandardMenuPopup.


 VCL Reference

TCustomActionPopupMenu properties

TCustomActionPopupMenu	Alphabetically	Legend

In TCustomActionPopupMenu

ExpandBtn

Derived from TCustomActionMenuBar

AnimationStyle

ExpandDelay

InMenuLoop

ParentControl

RootMenu

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionPopupMenu properties

TCustomActionPopupMenu	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

AnimationStyle

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

ExpandBtn

ExpandDelay

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

InMenuLoop

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentControl

ParentWindow

PersistentHotKeys

RootMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


TCustomActionPopupMenu.ExpandBtn
 VCL Reference

TCustomActionPopupMenu.ExpandBtn

TCustomActionMenuBar

Refers to the popup menu's expand button.

property ExpandBtn: TCustomScrollButton;

Description

An action band may have hidden items. For example, items which are used infrequently may be hidden to make the menus appear less cluttered. Still, the user may wish to use hidden items from time to time. They become visible again when the user hits the expand bar. Use ExpandBtn to access the popup menu action band's expand button object.


 VCL Reference

TCustomActionPopupMenu Events

TCustomActionPopupMenu	Alphabetically	Legend

Derived from TCustomActionMenuBar

OnGetPopupClass

OnPopup

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint


 VCL Reference

TCustomActionPopupMenu Events

TCustomActionPopupMenu	By Object	Legend

OnControlCreated

OnGetControlClass

OnGetPopupClass

OnPaint

OnPopup


 VCL Reference

TCustomActionPopupMenu methods

TCustomActionPopupMenu	Alphabetically	Legend

In TCustomActionPopupMenu

CloseMenu

Create

Destroy

Expand

Popup

SetBounds

Derived from TCustomActionMenuBar

TrackMenu

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionPopupMenu methods

TCustomActionPopupMenu	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseMenu

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Popup

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionPopupMenu.Create
 VCL Reference

TCustomActionPopupMenu.Create

TCustomActionPopupMenu

Creates and initializes a TCustomActionPopupMenu instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionPopupMenu and initializes its properties.


TCustomActionPopupMenu.Destroy
 VCL Reference

TCustomActionPopupMenu.Destroy

TCustomActionPopupMenu	See also

Destroys an instance of TCustomActionMenuBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionMenuBar reference is not nil, and only then calls Destroy.


TCustomActionPopupMenu.CloseMenu
 VCL Reference

TCustomActionPopupMenu.CloseMenu

TCustomActionPopupMenu	See also

Closes the menu currently being displayed.

procedure CloseMenu; override;

Description

CloseMenu is called to close the menu currently being displayed. The only difference between this routine and the inherited one is that the Visible property is set to False.


TCustomActionPopupMenu.Expand
 VCL Reference

TCustomActionPopupMenu.Expand

TCustomActionMenuBar	See also

Performs the same kinds of functions as the inherited method.

procedure Expand(Full: Boolean); override;

Description

This implementation of Expand serves the same purpose as the inherited method. It performs actions specific to popup menus. For more information, see the documentation for the inherited method.


TCustomActionPopupMenu.Popup
 VCL Reference

TCustomActionPopupMenu.Popup

TCustomActionPopupMenu	See also

Causes the popup menu to pop up.

procedure TCustomActionPopupMenu.Popup(X, Y: Integer);

Description

Call Popup to display the popup menu at the specified coordinates (in pixels) on screen. This method is meant to behave the same as the procedure of the same name in TPopupMenu.


TCustomActionPopupMenu.SetBounds
 VCL Reference

TCustomActionPopupMenu.SetBounds

TCustomActionPopupMenu	See also

Sets the bounds based on whether the popup is expanded or not

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

SetBounds calls the inherited method after altering the AWidth and AHeight parameters (if necessary) to include the width and height of the expanded popup menu. For more information about SetBounds, see the documentation for the inherited method.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar

TCustomActionMenuBar

TCustomActionPopupMenu


TCustomActionToolBar
 VCL Reference

TCustomActionToolBar

Hierarchy	Properties	Methods 	Events	Using TCustomActionToolBar	See also

TCustomActionToolBar is the ancestor class for the TToolActionBar component.

Unit

ActnCtrls

Description

TCustomActionToolBar is the ancestor class for the TToolActionBar component.


 VCL Reference

TCustomActionToolBar properties

TCustomActionToolBar	Alphabetically	Legend

In TCustomActionToolBar

HiddenCount

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Floating

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionToolBar properties

TCustomActionToolBar	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HiddenCount

Hint

HorzMargin

HorzSeparator

HostDockSite

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PersistentHotKeys

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


TCustomActionToolBar.HiddenCount
 VCL Reference

TCustomActionToolBar.HiddenCount

TCustomActionToolBar

Contains the number of hidden items on the tool action band.

property HiddenCount: Integer;

Description

Access HiddenCount to determine how many items there are on the tool action band that are hidden.


 VCL Reference

TCustomActionToolBar events

TCustomActionToolBar	Alphabetically	Legend

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomActionToolBar events

TCustomActionToolBar	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TCustomActionToolBar methods

TCustomActionToolBar	Alphabetically	Legend

In TCustomActionToolBar

Create

Destroy

SetBounds

Derived from TCustomActionDockBar

Dock

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionToolBar methods

TCustomActionToolBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomActionToolBar.Create
 VCL Reference

TCustomActionToolBar.Create

TCustomActionToolBar

Creates and initializes a TCustomActionToolBar instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TCustomActionToolBar and initializes its properties.


TCustomActionToolBar.SetBounds
 VCL Reference

TCustomActionToolBar.SetBounds

TCustomActionToolBar	See also

An override of the TWinControl procedure for TCustomActionToolBar objects.

procedure TCustomActionToolBar.SetBounds(ALeft, ATop, AWidth,

  AHeight: Integer) override;

Description

SetBounds is largely the same as the inherited TWinControl method, with one exception. If AutoSize is not True, unused items are hidden before the inherited routine is called. For more details, see the documentation for the inherited procedure.


TCustomActionToolBar.Destroy
 VCL Reference

TCustomActionToolBar.Destroy

TCustomActionToolBar	See also

Destroys an instance of TCustomActionToolBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionToolBar reference is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomActionBar

TCustomActionDockBar

TCustomActionToolBar


TCustomActionManager
 VCL Reference

 TCustomActionManager

Hierarchy	Properties	Methods	Events	Using TActionManager	See also

TCustomActionManager is the base class for the TActionManager component.

Unit

ActnMan

Description

TActionManager is a component that allows you to manage actions and categories of actions as UI elements at design-time and runtime. The action manager editor is the user interface for working with actions and categories of actions. You can visually add, delete, regroup these UI elements on the action band components by dragging and dropping them from the action manager editor or by moving them around after they have been dropped on an action band.


 VCL Reference

TCustomActionManager properties

TCustomActionManager	Alphabetically	Legend

In TCustomActionManager

ActionBars

DefaultActionBars

FileName

LinkedActionLists

PrioritySchedule

Derived from TCustomActionList

ActionCount

Actions

Images

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionManager properties

TCustomActionManager	By object	Legend

ActionBars

ActionCount

Actions

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DefaultActionBars

DesignInfo

FileName

Images

LinkedActionLists

Name

Owner

PrioritySchedule

State

Tag

VCLComObject


TCustomActionManager.ActionBars
 VCL Reference

TCustomActionManager.ActionBars

TCustomActionManager	See also

Contains a collection of all the action bands in the application.

property  ActionBars: TActionBars;

Description

ActionBars is used internally by the action manager component to maintain a collection of all the action bands connected to the action manager in the application. An action band is automatically added to the collection when an action or category of actions is dropped on an action band or the ActionManager property in an action band component is set in the Object Inspector.


TCustomActionManager.DefaultActionBars
 VCL Reference

TCustomActionManager.DefaultActionBars

TCustomActionManager	See also

Contains a collection of the application default action bands.

property DefaultActionBars: TActionBars;

Description

DefaultActionBars is a collection of action bands similar to ActionBars. These bands are the default action bands, and are not user interface elements in the application. Instead, they are used by the method ResetActionBar to restore the user's action bands to their default values.


TCustomActionManager.FileName
 VCL Reference

TCustomActionManager.FileName

TCustomActionManager

Specifies the name of the file that the action manager component uses to read and write layout information for the action bands that are connected to the action manager.

property FileName: TFileName;

Description

Use FileName to specify the name of the file that the action manager will use to read and write layout information for the action bands that are connected to the action manager. The action manager uses this file to store the current state of the action bands that are connected to the action manager when the application is closed. When an application is started, the action manager uses the layout information contained in this file to reconstruct the action bands back to the state when the application last closed. All customizations made to the action bands are saved in this file.


TCustomActionManager.LinkedActionLists
 VCL Reference

TCustomActionManager.LinkedActionLists

TCustomActionManager	See also

A collection of action lists available from action bands and menus.

property  LinkedActionLists: TActionListCollection;

Description

LinkedActionLists is a linked list of TActionListCollection objects, which can be thought of as simple data structures with two fields. One field is a TCustomActionList object, which is essentially a list of possible actions. The other field is a caption, which dictates how the action list will be described on the action band or menu.

Use LinkedActionLists to merge in action lists from other sources outside the action manager. Those action lists will become accessible from action bands and menus. Application users can exploit this feature, for example, to reorganize items from a traditional main menu bar in a way that better suits their needs than the original menu bar did.


TCustomActionManager.PrioritySchedule
 VCL Reference

TCustomActionManager.PrioritySchedule

TCustomActionManager	See also

Specifies a schedule which indicates how long it takes before an item is marked as unused.

property  PrioritySchedule: TStringList;

Description

The action manager uses PrioritySchedule to determine when a UI element, that represents a TActionClientItem, is hidden or displayed on an action band based on usage statistics and layout space. (This is not the same as the TActionClientItem's visibility, as set by the TActionClientItem's Visible property.)

To determine when to display or hide a UI element, that is rendered by the action band for a specific TActionClientItem, the action manager maintains a total count for each item of the total number of sessions, the session number it was used in, and the current session number. The number of sessions is defined as the number of times the application has been launched.

To determine if an item should be displayed, the program looks up the value of UsageCount in the left hand column in PrioritySchedule. If UsageCount is greater than the maximum tabulated value, that maximum is used for calculational purposes. The corresponding value in the right hand column is the number of sessions an item can be unused before it becomes hidden. Let us call that value x. If the item has not been used in the last x sessions, it becomes hidden.

An action band will always show as many controls as it has space to show; the action band will wrap rows or columns, if necessary. TActionClientItems with their UsageCount property set to negative one (-1), will always be shown You can use the UsageCount property to ensure that specific action band controls are always shown.

The default PrioritySchedule is as follows:

Number of sessions in which the action band item was used	Number of sessions the item will remain unhidden after its last use
0, 1	3
2	6
3	9
4, 5	12
6 – 8	17
9 – 13	23
14 – 24	29
25 or more	31


 VCL Reference

TCustomActionManager events

TCustomActionManager	Alphabetically	Legend

Derived from TCustomActionList

OnChange

OnExecute

OnUpdate


 VCL Reference

TCustomActionManager events

TCustomActionManager	By object	Legend

OnChange

OnExecute

OnUpdate


 VCL Reference

TCustomActionManager methods

TCustomActionManager	Alphabetically	Legend

In TCustomActionManager

Assign

Create

Destroy

LoadFromFile

LoadFromStream

ResetActionBar

ResetUsageData

SaveToFile

SaveToStream

Derived from TCustomActionList

ExecuteAction

IsShortCut

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionManager methods

TCustomActionManager	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

ResetActionBar

ResetUsageData

SafeCallException

SaveToFile

SaveToStream

SetSubComponent

UpdateAction


TCustomActionManager.Create
 VCL Reference

TCustomActionManager.Create

TCustomActionManager	See also

Instantiates and initializes a TCustomActionManager object.

constructor Create(AOwner: TComponent); override;

Description

When using the form designer, action manager instances are created automatically when you drop an action manager component on your form. The AOwner parameter is the owner of the action manager, typically this is the form.

You should never attempt to instantiate a TCustomActionManager object in an application. Instead, instantiate and use the descendant class, TActionManager.


TCustomActionManager.Destroy
 VCL Reference

TCustomActionManager.Destroy

TCustomActionManager	See also

Disposes of the instance of an action manager object.

destructor Destroy; override;

Description

You normally do not need to call the destructor for an action manager if it has an owner. The action manager is destroyed automatically by its owner that was passed to its constructor when it was created. In situations where the custom action manager object needs to be manually destroyed, do so by calling its Free method, not this destructor.


TCustomActionManager.Assign
 VCL Reference

TCustomActionManager.Assign

TCustomActionManager 	See also

A custom Assign procedure for TCustomActionManager objects.

procedure Assign(Source: TPersistent); override;

Description

Use this override of the inherited TPersistent procedure to assign the properties of one TCustomActionManager object to another. The ActionBars, Images, PrioritySchedule and LinkedActionLists items of the current TCustomActionManager will all refer to the same objects as in the Source. In the case of the FileName property, it will become a copy of the Source property of the same name. If Source is not an action manager, the inherited procedure is called.


TCustomActionManager.LoadFromFile
 VCL Reference

TCustomActionManager.LoadFromFile

TCustomActionManager 	See also

Loads the layout information needed to reconstruct the action bands by the action manager from a file.

procedure LoadFromFile(const FileName: string);

Description

LoadFromFile reads the file specified in the FileName property of the action manager component and loads the layout information needed to reconstruct the action bands connected to the action manager.


TCustomActionManager.LoadFromStream
 VCL Reference

TCustomActionManager.LoadFromStream

TCustomActionManager 	See also

Loads the layout information needed to reconstruct the action bands by the action manager from a stream.

procedure LoadFromStream(Stream: TStream);;

Description

LoadFromStream reads the stream specified in the Stream parameter and loads the layout information needed to reconstruct the action bands connected to the action manager contained in the stream.


TCustomActionManager.ResetActionBar
 VCL Reference

TCustomActionManager.ResetActionBar

TCustomActionManager	See also

Resets the action bands to their default state.

procedure ResetActionBar(Index: Integer);

Description

Use ResetActionBar to return the action bands to their default state, which is stored in the property DefaultActionBars.


TCustomActionManager.ResetUsageData
 VCL Reference

TCustomActionManager.ResetUsageData

TCustomActionManager

Resets the useage data of the action bands.

procedure ResetUseageData;

Description

TCustomActionManager may keep a file of usage data whose name is FileName. Usage data may be used to determine which items on the ActionBars are displayed at any given time. Call ResetUsageData to delete that file. The user interface will appear in the same state it was in when the program was run for the first time.


TCustomActionManager.SaveToFile
 VCL Reference

TCustomActionManager.SaveToFile

TCustomActionManager

Saves layout information needed to reconstruct the action bands by the action manager to a file.

procedure SaveToFile(const FileName: string);

Description

SaveToFile saves the layout information needed to reconstruct the action bands by the action manager to the specified in the FileName property of the action manager component.


TCustomActionManager.SaveToStream
 VCL Reference

TCustomActionManager.SaveToStream

TCustomActionManager

Saves layout information needed to reconstruct the action bands by the action manager to a stream.

procedure SaveToStream(Stream: TStream);

Description

SaveToStream saves layout information needed to reconstruct the action bands by the action manager to a stream specified in the Stream parameter.


Hierarchy

TObject

TPersistent

TComponent

TCustomActionList

TCustomActionManager


TCustomAddRemoveItem
 VCL Reference

TCustomAddRemoveItem

Hierarchy	Properties	Methods	See also

TCustomAddRemoveItem is the base class for the ActionBand menus for customizing action bands.

Unit

ActnMenus

Description

TCustomAddRemoveItem is a base class for TStandardAddRemoveItem, the standard ActionBand menu for customizing action bands at runtime.

Do not create instances of TCustomAddRemoveItem. If you would like to replace the standard customization menu, use the class TCustomAddRemoveItem as a parent class for your replacement class. To make the change for your application, set the value of MenuAddRemoveItemClass (a global variable) to your own subclass of TCustomAddRemoveItem instead of TStandardAddRemoveItem.


 VCL Reference

TCustomAddRemoveItem properties

TCustomAddRemoveItem	Alphabetically	Legend

Derived from TCustomMenuItem

Edges

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomAddRemoveItem properties

TCustomAddRemoveItem	By object	Legend

Action

ActionBar

ActionClient

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Edges

Enabled

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

Tag

TBDockHeight

TextBounds

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TCustomAddRemoveItem Events

TCustomAddRemoveItem	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomAddRemoveItem Events

TCustomAddRemoveItem	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomAddRemoveItem methods

TCustomAddRemoveItem	Alphabetically	Legend

In TCustomAddRemoveItem

CalcBounds

Derived from TCustomMenuItem

Click

Create

Destroy

DragDrop

Keyed

Derived from TCustomActionControl

DrawBackground

DrawGlyph

DrawText

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomAddRemoveItem methods

TCustomAddRemoveItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomAddRemoveItem.Create
 VCL Reference

TCustomAddRemoveItem.Create

TCustomAddRemoveItem	See also

Creates an instance of TCustomAddRemoveItem.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomAddRemoveItem. However, you should never attempt to instantiate a TCustomAddRemoveItem. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomAddRemoveItem.Destroy
 VCL Reference

TCustomAddRemoveItem.Destroy

TCustomAddRemoveItem	See also

Destroys an instance of TCustomAddRemoveItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomAddRemoveItem.CalcBounds
 VCL Reference

TCustomAddRemoveItem.CalcBounds

TCustomMenuItem	See also

Calculates the size of the add/remove menu item.

procedure CalcBounds; override;

Description


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomMenuItem

TCustomAddRemoveItem


TCustomButtonControl
 VCL Reference

TCustomButtonControl

Hierarchy	Properties	Methods	See also

TCustomButtonControl is the base class for ActionBand button controls.

Unit

ActnCtrls

Description

TCustomButtonControl is a base class for several ActionBand components. Most notably, the standard menu button (TStandardMenuButton) derives from this class.

Do not create instances of TCustomButtonControl. If you would like to replace the standard menu button behaviors, use the class TCustomMenuButton as a parent class for your replacement class.


 VCL Reference

TCustomButtonControl properties

TCustomButtonControl	Alphabetically	Legend

In TCustomButtonControl

AllowAllUp

Down

Flat

State

TrackButton

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomButtonControl properties

TCustomButtonControl	By object	Legend

Action

ActionBar

ActionClient

Align

AllowAllUp

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Down

Enabled

Flat

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

State

Tag

TBDockHeight

TextBounds

Top

TrackButton

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TCustomButtonControl.AllowAllUp
 VCL Reference

TCustomButtonControl.AllowAllUp

TCustomButtonControl	See also

Indicates whether all the buttons in a given group can be up at the same time.

property AllowAllUp: Boolean;

Description

Set AllowAllUp to True to allow all buttons in a given group to be deselected simultaneously. If AllowAllUp is False, then the button group in question must have exactly one button selected at any given time. Groups of buttons designed this way are sometimes called "radio buttons."


TCustomButtonControl.Down
 VCL Reference

TCustomButtonControl.Down

TCustomButtonControl	See also

Tells whether the button is down (selected) or up (unselected).

property Down: Boolean;

Description

Use Down to determine if the button is down or not. This property can also be used to change the state of the button by changing its value. This property works the same as the Down properties in TSpeedButton and TToolButton.


TCustomButtonControl.Flat
 VCL Reference

TCustomButtonControl.Flat

TCustomButtonControl	See also

Dictates whether the button should have a 2D look instead of the usual 3D look.

property Flat: Boolean;

Description

Set Flat to True if you want the button to display the button without the edge bevel that gives buttons a 3D look. This property's behavior should be identical to that of TSpeedButton.Flat.


TCustomButtonControl.State
 VCL Reference

TCustomButtonControl.State

TCustomButtonControl

Describes the current state of the button.

type

TButtonState = (bsUp, bsDisabled, bsDown, bsExclusive);

property State: TButtonState;

Description

Use State as an indicator of the state of the button control. The possible values are as follows:

Value	State description

bsUp	The button control is up, or unselected.

bsDisabled	The button is not enabled, which generally means it is greyed out. It cannot be selected by the user.

bsDown	The button control is down, or selected.

bsExclusive	The button is a "radio button." It is one of a group of buttons, exactly one of which must be selected at any given time. Selecting another button will cause the previously selected button to become deselected.


TCustomButtonControl.TrackButton
 VCL Reference

TCustomButtonControl.TrackButton

TCustomButtonControl	See also

Specifies which mouse button activates the button control.

property TrackButton: TMouseButton;

Description

Use TrackButton to specify which mouse button activates the button control.


 VCL Reference

TCustomButtonControl Events

TCustomButtonControl	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomButtonControl Events

TCustomButtonControl	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomButtonControl methods

TCustomButtonControl	Alphabetically	Legend

In TCustomButtonControl

CalcBounds

Click

Create

SetBounds

Derived from TCustomActionControl

Destroy

DragDrop

DrawBackground

DrawGlyph

DrawText

InitiateAction

Keyed

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

RemoveComponent

ReferenceInterface

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomButtonControl methods

TCustomButtonControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomButtonControl.Create
 VCL Reference

TCustomButtonControl.Create

TCustomButtonControl	See also

Creates an instance of TCustomButtonControl.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomButtonControl. However, you should never attempt to instantiate a TCustomButtonControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomButtonControl.Destroy
 VCL Reference

TCustomButtonControl.Destroy

TCustomButtonControl	See also

Destroys an instance of TCustomButtonControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomButtonControl.CalcBounds
 VCL Reference

TCustomButtonControl.CalcBounds

TCustomButtonControl	See also

Calculates the size of the control.

procedure TCustomButtonControl.CalcBounds; override;

Description

This method is largely the same as TCustomActionControl.CalcBounds, with one minor exception. The width of the control is set to be one pixel wider. For more information, see the documentation for the inherited method.


TCustomButtonControl.Click
 VCL Reference

TCustomButtonControl.Click

TCustomButtonControl	See also

Executes the control's function.

procedure TCustomButtonControl.Click; override;

Description

This override of the method inherited from TCustomActionControl is almost identical to the inherited method. The only difference is that if the button control is being manipulated at design time, extra actions are taken to ensure that the control is properly selected.


TCustomButtonControl.SetBounds
 VCL Reference

TCustomButtonControl.SetBounds

TCustomButtonControl	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure TCustomButtonControl.SetBounds(ALeft, ATop, AWidth,

  AHeight: Integer); override;

Description

This override of the method inherited from TControl simultaneously sets all boundary properties at once, and thus avoiding the possibility of a control redraw between the time one value sets and another. In addition, some layout calculations are also performed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomButtonControl


TClientSocketThread
 VCL Reference

TClientSocketThread

Hierarchy	Properties	Methods	Events	Using TClientSocketThread	See also

TClientSocketThread enables creation of separate threads of execution for the client socket in an application.

Unit

Sockets

Description

Create a TClientSocketThread (or a descendant of the class) to represent an execution thread for the client socket in a multi-threaded application. Each new instance of TClientSocketThread, a TThread descendant, is a new thread of execution. Using a separate TClientSocketThread allows the client socket to block without blocking the whole application.


 VCL Reference

TClientSocketThread properties

TClientSocketThread	Alphabetically	Legend

In TClientSocketThread

ClientSocket

ServerSocketThread

Derived from TThread

FatalException

FreeOnTerminate

Handle

Priority

Suspended

ThreadID


 VCL Reference

TClientSocketThread properties

TClientSocketThread	By object	Legend

ClientSocket

FatalException

FreeOnTerminate

Handle

Priority

ServerSocketThread

Suspended

ThreadID


TClientSocketThread.ClientSocket
 VCL Reference

TIpSocket.ClientSocket

TServerSocketThread	See also

Refers to the client socket handling the connection in that thread.

property ClientSocket: TCustomIpClient read FClientSocket;

Description

Use ClientSocket to obtain access to the client socket object handling the connection in the current thread of execution.


TClientSocketThread.ServerSocketThread
 VCL Reference

TIpSocket.ServerSocketThread

TServerSocketThread	See also

Specifies the server socket's thread.

property ServerSocketThread: TServerSocketThread;

Description

Use ServerSocketThread get access to the thread object of the server socket.


 VCL Reference

TClientSocketThread events

TClientSocketThread	Alphabetically	Legend

Derived from TThread

OnTerminate


 VCL Reference

TClientSocketThread events

TClientSocketThread	By object	Legend

OnTerminate


 VCL Reference

TClientSocketThread methods

TClientSocketThread	Alphabetically	Legend

In TClientSocketThread

Create

Destroy

Execute

ExecuteSyncProc

SyncProc

Derived from TThread

AfterConstruction

Resume

Suspend

Synchronize

Terminate

WaitFor

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TClientSocketThread methods

TClientSocketThread	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

ExecuteSyncProc

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Resume

SafeCallException

Suspend

Synchronize

SyncProc

Terminate

WaitFor


TClientSocketThread.Create
 VCL Reference

TClientSocketThread.Create

TClientSocketThread

Creates an instance of a TClientSocketThread object.

constructor Create (ServerSocketThread: TServerSocketThread; ClientSocket: TCustomIpClient);

Description

Call Create to create an instance of a TClientSocketThread object.


TClientSocketThread.Destroy
 VCL Reference

TClientSocketThread.Destroy

TClientSocketThread	See also

Destroys the TClientSocketThread object and releases the memory allocated to it.

destructor Destroy; override;

Description

Do not call Destroy in an application. Instead, use Free to destroy a thread when FreeOnTerminate is False.

Destroy signals the thread to terminate and then waits for the thread to return before calling the inherited Destroy method.


TClientSocketThread.Execute
 VCL Reference

TClientSocketThread.Execute

TClientSocketThread

Provides the code which executes when the thread is run.

procedure Execute; override;

Description

Use Execute to execute the code that should be executed when the thread runs. Execute is responsible for checking the value of the Terminated property to determine if the thread needs to exit.

Note:	Do not use the properties and methods of other objects directly in the Execute method of a thread.  Instead, separate the use of other objects into a separate procedure call, and call that procedure by passing it as a parameter to the Synchronize method.


TClientSocketThread.ExecuteSyncProc
 VCL Reference

TClientSocketThread.ExecuteSyncProc

TClientSocketThread	See also	Example

Synchronizes data between threads.

procedure ExecuteSyncProc;

Description

Objects in the client socket thread should not directly manipulate data in the main CLX thread. Attempting to do so will cause synchronization problems and, most likely, the application will crash. To avoid synchronization errors, override the SyncProc method to include instructions which must be executed by the main thread.


TClientSocketThread.SyncProc
 VCL Reference

TClientSocketThread.SyncProc

TClientSocketThreadTClientSocketThread>main	See also	Example

Method where data synchronization is actually performed.

procedure SyncProc;

Description

In subclasses of TClientSocketThread, override SyncProc to perform synchronization between threads. Put code in it to be executed by the main thread. Do not call this protected method directly; instead, call ExecuteSyncProc.


Hierarchy

TObject

TThread

TClientSocketThread


OnGetDataSetProperties, GetOptionalParam Example
 VCL Reference

OnGetDataSetProperties, GetOptionalParam Example

The following OnGetDataSetProperties event handler adds information to data packets that specifies when the data packet was created and the total number of records in the dataset used to generate the data packet. Only the time the data packet was created is included in delta packets when the client applies updates.

procedure TAppServerModule.Provider1GetDataSetProperties(Sender: TObject; DataSet: TDataSet; out Properties: OleVariant);

begin

  Properties := VarArrayCreate([0,1], varVariant);

  Properties[0] := VarArrayOf(['TimeProvided', Now, True]);

  Properties[1] := VarArrayOf(['TableSize', DataSet.RecordCount, False]);

end;

Later, when the client applies updates, the time the original records were provided can be read in the provider’s OnUpdateData event handler:

procedure TAppServerModule.Provider1UpdateData(Sender: TObject; DataSet: TClientDataSet);

var

  WhenProvided: TDateTime;

begin

  WhenProvided := DataSet.GetOptionalParam('TimeProvided');

  ...

end;

Note that the TableSize values can’t be obtained from the delta packet because its third array element was False.


Data, DataRequest, OnDataRequest Example
 VCL Reference

Data, DataRequest, OnDataRequest Example

This example shows how to use the OnDataRequest event to allow a client application to pass a filter expression to the provider and then receive only the records matching the filter.

The OnDataRequest event handler of the provider looks like the following:

function TForm1.Provider1DataRequest(Sender: TObject; Input: OleVariant): OleVariant;

begin

  with (Sender as TDataSetProvider) do

  begin

    DataSet.Filter := Input;

    DataSet.Filtered := True;

    DataSet.First;

    Result := Data;

  end;

end;

On the client side, the DataRequest method can be used to fetch the data.  The DataRequest method triggers an OnDataRequest event in the Provider component and returns the result of the event handler:

procedure TForm1.Button1Click(Sender: TObject);

begin

  ClientDataSet1.Data := ClientDataSet1.DataRequest(FilterEdit.Text);

end;


DataSet, OnGetData Example
 VCL Reference

DataSet, OnGetData Example

This example shows how to use a provider to encrypt the contents of a field containing sensitive data before it is sent on to the client. The client application must decrypt the data in the OnGetText routine of the SensitiveData field or some other appropriate place.

procedure TDBClientTest.ProviderGetData(Sender: TObject; DataSet: TCustomClientDataSet);

begin

  with DataSet do

  begin

    whilenot EOF do

    begin

      Edit;

      SensitiveData.AsString := DoEncrypt(SensitiveData.AsString);

      Post;

      Next;

    end;

  end;

end;


UpdateStatus, OnUpdateData Example
 VCL Reference

UpdateStatus, OnUpdateData Example

This example shows an OnUpdateData event handler that scans for deleted records and saves them to a log. LogDelete is a helper function which copies the data from the deleted record into the log.

procedure TDBClientTest.ProviderUpdateData(Sender: TObject; DataSet: TCustomClientDataSet);

begin

  with DataSet do

    whilenot EOF do

    begin

      if UpdateStatus = usDeleted then

        LogDelete(DataSet, UserName, Date, Time);

      Next;

    end;

end;


OnUpdateError Example
 VCL Reference

OnUpdateError Example

When a user deletes a record that has already been deleted by another user, this error is reported back to the client.  The following example shows how to suppress this client-side error in an OnUpdateError event handler.

procedure TDBClientTest.ProviderUpdateError(Sender: TObject, DataSet: TCustomClientDataSet; E: EUpdateError; UpdateKind: TUpdateKind; var Response: TResolverResponse);

begin

  if (UpdateKind = ukDelete) and

    (E.ErrorCode = DBIERR_OPTRECLOCKFAILED) then

    Response := rrIgnore else

    Response := rrSkip;

end;


CloneCursor, GotoCurrent, FindKey, CompareBookmarks, SetRange Example
 VCL Reference

CloneCursor, GotoCurrent, FindKey, CompareBookmarks, SetRange Example

The following example uses a cloned cursor to determine whether the current record is within a specified range, and if so, applies the range to a client dataset.  The use of the cloned cursor allows the application to test a new range without changing the current range until it is determined that the new range is valid.

var

  TempDataSet: TClientDataSet;

  CurRec, RangeRec: TBookmark;

begin

  { create a second client dataset for checking the range }

  TempDataSet = TClientDataSet.Create(nil);

  try

    with TempDataSet do

    begin

      { clone the real dataset with Reset set to True }

      { so that the current range is not cloned }

      CloneCursor(ClientDataSet1, True);

      { but we DO want the filters, if any, so apply them to the new client dataset }

      if ClientDataSet1.Filtered then

      begin

        FilterOptions := ClientDataSet1.FilterOptions;

        Filter := ClientDataSet1.Filter;

        OnFilterRecord := ClientDataSet1.OnFilterRecord;

        Filtered := True;

      end;

      { now move to the same record, and get a bookmark for it }

      GotoCurrent(ClientDataSet1);

      CurRec := GetBookmark;

      try

        if FindKey([Edit1.Text]) then { go to the new start of range }

        begin

          RangeRec := GetBookmark;

          try

          { check if start range is before current record }

            if CompareBookmarks(RangeRec, CurRec) <= 0 then

            begin

              { now try the end of the range }

              if FindKey([Edit2.Text]) then

              begin

                FreeBookmark(RangeRec); { free old bookmark at range start }

                RangeRec := GetBookmark; { replace it with bookmark at range end }

                { check if the range end is after current record }

                if CompareBookmarks(CurRec, RangeRec) <= 0 then

                  { the new range is good – apply it! }

                  TClientDataSet1.SetRange([Edit1.Text],[Edit2.Text]);

              end; { end of range was found }

            end; { start of range before current record }

          finally

            FreeBookmark(RangeRec);

          end;

        end; { start of range was found }

      finally

        FreeBookmark(CurRec);

      end;

    end; { end of with TempDataSet }

  finally

    TempDataSet.Free; { free the temporary data set }

 end;

end;


OnReconcileError Example
 VCL Reference

OnReconcileError Example

The following code shows an OnReconcileError event handler that uses the reconcile error dialog from the RecError unit which ships in the object repository directory. (To use this dialog, add RecError to your uses clause.)

procedure TForm1.ClientDataSetReconcileError(DataSet: TCustomClientDataSet; E: EReconcileError; UpdateKind: TUpdateKind; var Action TReconcileAction);

begin

  Action := HandleReconcileError(DataSet, UpdateKind, E);

end;


CreateDataSet Example
 VCL Reference

CreateDataSet Example

The following code creates and activates a client dataset in the form’s OnCreate event handler:

procedure TForm1.FormCreate(Sender: TObject);

begin

  with ClientDataSet1 do

  begin

    with FieldDefs.AddFieldDef do

    begin

      DataType := ftInteger;

      Name := 'Field1';

    end;

    with FieldDefs.AddFieldDef do

    begin

      DataType := ftString;

      Size := 10;

      Name := 'Field2';

    end;

    with IndexDefs.AddIndexDef do

    begin

      Fields := 'Field1';

      Name := 'IntIndex';

    end;

    CreateDataSet;

  end;

end;


AfterUpdateRecord Example
 VCL Reference

AfterUpdateRecord Example

This AfterUpdateRecord event handler keeps a log file of successful record postings, including the username, date, time, and client dataset name.

procedure TMyRDM.Provider1AfterUpdateRecord(Sender: TObject; SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind);

const

  SP = '  ';

var

  logfile: TextFile;

begin

  AssignFile(logfile,'log.txt');

  if not(FileExists('log.txt')) then ReWrite(logfile)

  else Append(logfile);

  writeln(logfile,(UserName+SP+DateToStr(Date)+SP+TimeToStr(Time)+SP+

        DeltaDS.Name));

end;


AddIndex Example
 VCL Reference

AddIndex Example

The code below creates a new case-insensitive index at runtime and then sorts the client dataset using that index. The user specifies the field on which to sort the client dataset in an edit control.

procedure TForm1.QuickIndexClick(Sender: TObject);

begin

  if Edit1.Text <> '' and

     ClientDataSet1.Fields.FindField(Edit1.Text) then

  begin

    ClientDataSet1.AddIndex(Edit1.Text + 'Index', Edit1.Text, [ixCaseInsensitive],'','',0);

    ClientDataSet1.IndexName := Edit1.Text + 'Index';

  end;

end;


UpdateMode Example
 VCL Reference

UpdateMode Example

This OnUpdateError event handler checks whether a record update failed because the record could not be located. If so, it sets the UpdateMode property to locate the record based only on key values and retries the update by setting the Response parameter to rrApply.

Note:	Be sure to add BDE to the uses clause to use this example.

procedure TMyRDM.Provider1UpdateError(Sender: TObject; DataSet: TCustomClientDataSet; E: EUpdateError; UpdateKind: TUpdateKind;  var Response: TResolverResponse);

begin

  with Sender as TDataSetProvider do

  begin

    if (ErrCat(E.ErrorCode) = ERRCAT_NOTFOUND) and

       (UpdateMode <> upWhereKeyOnly) then

    begin

      UpdateMode := upWhereKeyOnly;

      Response := rrApply;

    end;

  end;

end;


BeforeUpdateRecord, DataSet, Query, Apply example
 VCL Reference

BeforeUpdateRecord, DataSet, Query, Apply example

This BeforeUpdateRecord event handler illustrates how to provide custom parameter values to the parameters of an update object’s internal queries.

procedure TRemoteDataModule1.Provider1BeforeUpdateRecord(Sender: TObject; SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind; var Applied Boolean);

begin

  UpdateSQL1.DataSet := DeltaDS; { required for the automatic parameter substitution }

  with UpdateSQL1.Query[UpdateKind] do

  begin

    { Make sure the query has the correct DatabaseName and SessionName }

    DatabaseName := (SourceDS as TDBDataSet).DatabaseName;

    SessionName := (SourceDS as TDBDataSet).SessionName;

    ParamByName('TimeOfUpdate').Value = Now;

  end;

  UpdateSQL1.Apply(UpdateKind); { now perform automatic substitutions }

  Applied := True;

end;


CommandText Example
 VCL Reference

CommandText Example

This example shows how to use the CommandText property to send an SQL command to a provider’s query.

procedure TForm1.RunButtonClick(Sender: TObject);

begin

  { Send the query string to the server and open the client dataset }

  ClientData.Close;

  ClientData.CommandText := Memo1.Lines.Text;

  ClientData.Open;

end;


BeforeGetRecords, Active, CloneCursor, FetchOnDemand Example
 VCL Reference

BeforeGetRecords, Active, CloneCursor, FetchOnDemand Example

This example shows how to use the BeforeGetRecords event handler (a TRemoteEventType value) to send the provider information it needs for incremental data fetching. Before fetching the next data packet, the client dataset packages up the key value of the last record so that the provider knows where to begin the next data packet. It also sends some application-specific information, which is stored in Memo1.

procedure TForm1.ClientDataSet1BeforeGetRecords(Sender: TObject; var OwnerData: OleVariant);

var

  LastValue: OleVariant;

  CDSClone:ClientDataSet;

begin

  if ClientDataSet1.Active then

  begin

    CDSClone := ClientDataSet.Create(Form1);

    try

      CDSClone.CloneCursor(ClientDataSet1, True);

      { turn off FetchOnDemand so that the clone only fetches

        the last LOCAL record }

      CDSClone.FetchOnDemand := False;

      CDSClone.Last;

      LastValue := CDSClone.Fields[0].AsString;

      CDSClone.Close;

    finally

      CDSClone.Free;

    end;

  endelse

    LastValue := NULL;

  OwnerData := VarArrayOf([Memo1.Lines.Text, LastValue]);

end;


TCustomMenuButton
 VCL Reference

TCustomMenuButton

Hierarchy	Properties	Methods	See also

TCustomMenuButton is the base class for ActionBand button controls.

Unit

ActnMenus

Description

TCustomMenuButton is a base class for the standard menu button class TStandardMenuButton. Do not create instances of TCustomMenuButton. If you would like to replace the standard menu button behaviors, use the class TCustomMenuButton as a parent class for your replacement class. To make the change for your application, set the value of MenuButtonControlClass (a global variable) to your own subclass of TCustomMenuButton instead of TStandardMenuButton.


 VCL Reference

TCustomMenuButton properties

TCustomMenuButton	Alphabetically	Legend

Derived from TCustomButtonControl

AllowAllUp

Down

Flat

State

TrackButton

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomMenuButton properties

TCustomMenuButton	By object	Legend

Action

ActionBar

ActionClient

Align

AllowAllUp

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Down

Enabled

Flat

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

State

Tag

TBDockHeight

TextBounds

Top

TrackButton

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TCustomMenuButton Events

TCustomMenuButton	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomMenuButton Events

TCustomMenuButton	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomMenuButton methods

TCustomMenuButton	Alphabetically	Legend

In TCustomMenuButton

Click

Destroy

Keyed

Derived from TCustomButtonControl

CalcBounds

Create

SetBounds

Derived from TCustomActionControl

DragDrop

DrawBackground

DrawGlyph

DrawText

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomMenuButton methods

TCustomMenuButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomMenuButton.Create
 VCL Reference

TCustomMenuButton.Create

TCustomMenuButton	See also

Creates an instance of TCustomMenuButton.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomMenuButton. However, you should never attempt to instantiate a TCustomMenuButton. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomMenuButton.Destroy
 VCL Reference

TCustomMenuButton.Destroy

TCustomMenuButton	See also

Destroys an instance of TCustomMenuButton.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomMenuButton.Click
 VCL Reference

TCustomMenuButton.Click

TCustomMenuButton	See also

Executes the control's function.

procedure TCustomMenuButton.Click; override;

Description

This override of the method inherited from TCustomButtonControl is essentially identical to the inherited method, with the exception of a few internal calls which need not be discussed here.


TCustomMenuButton.Keyed
 VCL Reference

TCustomMenuButton.Keyed

TCustomMenuButtonl	See also

Executes the button's function in response to a keyboard command.

procedure TCustomMenuButton.Keyed; override;

Description

This method is mostly the same as the inherited method. The only difference is that the button becomes selected.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomButtonControl

TCustomMenuButton


TCustomMenuItem
 VCL Reference

TCustomMenuItem

Hierarchy	Properties	Methods	See also

TCustomMenuItem is the base class for the ActionBand custom control TStandardMenuItem.

Unit

ActnMenus

Description

TCustomMenuItem is a base class for TStandardMenuItem, the standard ActionBand menu item class.

Do not create instances of TCustomMenuItem. If you would like to replace the standard menu item, use the class TCustomMenuItem as a parent class for your replacement class. To make the change for your application, set the value of MenuItemControlClass (a global variable) to your own subclass of TCustomMenuItem instead of TStandardMenuItem.


 VCL Reference

TCustomMenuItem properties

TCustomMenuItem	Alphabetically	Legend

In TCustomMenuItem

Edges

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomMenuItem properties

TCustomMenuItem	By object	Legend

Action

ActionBar

ActionClient

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Edges

Enabled

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

Tag

TBDockHeight

TextBounds

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TCustomMenuItem.Edges
 VCL Reference

TCustomMenuItem.Edges

TCustomMenuItem

Dictates which edges are drawn when the menu item is drawn.

type

TEdgeBorder = (ebLeft, ebTop, ebRight, ebBottom);

TMenuEdges = set of TEdgeBorder;

property Edges: TMenuEdges;

Description

Use Edges to dictate which edges of the menu item should be drawn when the menu item is drawn. The values ebLeft, ebTop, ebRight, and ebBottom indicate that the left, top, right, and bottom edges (respectively) should be drawn.


 VCL Reference

TCustomMenuItem Events

TCustomMenuItem	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomMenuItem Events

TCustomMenuItem	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCustomMenuItem methods

TCustomMenuItem	Alphabetically	Legend

In TCustomMenuItem

CalcBounds

Click

Create

Destroy

DragDrop

Keyed

Derived from TCustomActionControl

DrawBackground

DrawGlyph

DrawText

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomMenuItem methods

TCustomMenuItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomMenuItem.Create
 VCL Reference

TCustomMenuItem.Create

TCustomMenuItem	See also

Creates an instance of TCustomMenuItem.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomMenuItem. However, you should never attempt to instantiate a TCustomMenuItem. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomMenuItem.Destroy
 VCL Reference

TCustomMenuItem.Destroy

TCustomMenuItem	See also

Destroys an instance of TCustomMenuItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomMenuItem.CalcBounds
 VCL Reference

TCustomMenuItem.CalcBounds

TCustomMenuItem	See also

Calculates the size of the menu item.

procedure TCustomMenuItem.CalcBounds; override;

Description

The size of the control depends on many factors, such as whether or not the menu item is a separator or not. CalcBounds computes the boundaries of the menu item considering these kinds of factors. At the end, it calls SetBounds and other routines to ensure that the values are set properly.


TCustomMenuItem.Click
 VCL Reference

TCustomMenuItem.Click

TCustomMenuItem	See also

Executes the control's function.

procedure TCustomMenuItem.Click; override;

Description

This override of the method inherited from TCustomActionControl does little except bring the form containing the item into focus, and prevent the inherited method from being called. The reason for this lack of action is that at runtime, no action should be taken until the primary mouse button is pressed and released, which makes the OnClick event handler responsible for taking action. Click takes place only when the mouse button is first pressed, prior to release.


TCustomMenuItem.DragDrop
 VCL Reference

TCustomMenuItem.DragDrop

TCustomMenuItem	See also

Performs actions and generates an OnDragDrop event.

procedure TCustomMenuItem.DragDrop(Source: TObject; X, Y: Integer); override;

Description

This override of the method inherited from TCustomActionControl calls the inherited routine and performs other actions to ensure that the focus is correct.


TCustomMenuItem.Keyed
 VCL Reference

TCustomMenuItem.Keyed

TCustomMenuItem	See also

Executes the menu item's function in response to a user's keyboard command.

procedure TCustomMenuItem.Keyed; override;

Description

This method is largely identical to the inherited method in TCustomActionControl. Additional actions are taken specifically for TCustomMenuItem objects.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomMenuItem


TCustomServerSocket
 VCL Reference

TCustomServerSocket

Hierarchy	Properties	Methods	Events	See also

TCustomServerSocket is the base class for all server socket components.

Unit

ScktComp

Description

TCustomServerSocket introduces new properties and events specific to the functions of a TCP/IP server.

Do not create instances of TCustomServerSocket. Use TCustomServerSocket as a base class when declaring server socket objects that listen for connection requests from other machines.


 VCL Reference

TCustomServerSocket properties

TCustomServerSocket	Alphabetically	Legend

In TCustomServerSocket

ServerType

ThreadCacheSize

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomServerSocket properties

TCustomServerSocket	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

ServerType

Tag

ThreadCacheSize

VCLComObject


TCustomServerSocket.ServerType
 VCL Reference

TCustomServerSocket.ServerType

TCustomServerSocket	See also

Specifies whether each connection accepted by the server socket is non-blocking, or if it is automatically given a separate execution thread.

type TServerType = (stNonBlocking, stThreadBlocking);

property ServerType: TServerType;

Description

Set ServerType to stThreadBlocking to automatically spawn a new thread for each socket connection accepted by the server socket. When ServerType is stThreadBlocking, the execution of the connection thread is suspended while reading or writing until all information has been transferred over the connection. The thread for each connection generates OnClientRead or OnClientWrite events when the server socket needs to read or write.

Set ServerType to stNonBlocking to handle all reading and writing over the socket connections asynchronously. When ServerType is stNonBlocking, all client connections are handled in a single execution thread by default. OnClientRead or OnClientWrite events occur when the client socket on the other end of one of the connections tries to send or receive information over the connection.

Use a non-blocking socket when the socket needs to synchronize reading and writing with client sockets.

Note:	When ServerType is stThreadBlocking, it is important that the OnClient... event handlers contain thread-safe code.


TCustomServerSocket.ThreadCacheSize
 VCL Reference

TCustomServerSocket.ThreadCacheSize

TCustomServerSocket	See also

Specifies the maximum number of threads that can be reused for new client connections.

property ThreadCacheSize: Integer;

Description

When ServerType is stThreadBlocking, each new connection that is accepted by the server socket is given a separate execution thread. In order to improve performance, server sockets store these threads in a cache rather than freeing them when the connection is closed. New connections can then reuse threads from the cache, rather than requiring the socket server to create a new thread every time a connection is accepted.

Set ThreadCacheSize to specify the number of threads that are cached for reuse. The ideal value for ThreadCacheSize depends on the number and frequency of client socket requests received by the server socket. If ThreadCacheSize is too low, the server socket will spend more time freeing and creating threads when client connections are accepted. If ThreadCacheSize is too high, the server socket may unnecessarily lock up the memory for threads that are never reused.


 VCL Reference

TCustomServerSocket events

TCustomServerSocket	Alphabetically	Legend

In TCustomServerSocket

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnGetSocket

OnGetThread

OnThreadEnd

OnThreadStart


 VCL Reference

TCustomServerSocket events

TCustomServerSocket	By object	Legend

OnClientConnect

OnClientDisconnect

OnClientError

OnClientRead

OnClientWrite

OnGetSocket

OnGetThread

OnThreadEnd

OnThreadStart


TCustomServerSocket.OnClientConnect
 VCL Reference

TCustomServerSocket.OnClientConnect

TCustomServerSocket	See also

Occurs when a client socket completes a connection accepted by the server socket.

property OnClientConnect: TSocketNotifyEvent;

Description

Write an OnClientConnect event handler to take specific action when a client socket completes the socket connection to the server socket. For example, the socket may start reading or writing over the connection in an OnClientConnect event handler.

The order of server socket events leading up to OnClientConnect is as follows:

1	An OnListen event occurs just before the server socket is opened for listening.

2	The server socket receives client requests in a listening queue. The server socket accepts one of those requests, and receives a Windows socket handle for the new socket connection.

3	The server socket generates an OnGetSocket event, passing in the Windows socket handle. If a TServerClientWinSocket object for the server endpoint of the new connection is not created in an OnGetSocket event handler, the server socket creates one. The TServerWinSocket object continues to listen for other clients.

4	An OnAccept event occurs, using the new TServerClientWinSocket object.

5	If ServerType is stThreadBlocking and no thread is available in the cache, an OnGetThread event occurs. If the OnGetThread event handler does not create a thread, the server socket creates a TServerClientThread.

6	If ServerType is stThreadBlocking, an OnThreadStart event occurs as the thread begins execution.

7	The client completes the connection to the TServerClientWinSocket object and an OnClientConnect event occurs.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientConnect event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.

Note:	The OnClientConnect event handler for TServerSocket is also set when setting the OnClientConnect event handler of the associated TServerWinSocket.


TCustomServerSocket.OnClientDisconnect
 VCL Reference

TCustomServerSocket.OnClientDisconnect

TCustomServerSocket	See also

Occurs when one of the connections to a client socket is closed.

property OnClientDisconnect: TSocketNotifyEvent;

Description

Write an OnClientDisconnect event handler to take specific action when the connection to a client socket is ending. The termination of a client connection does not close the server socket. The server socket remains open and listening for client requests on its listening connection.

The TServerClientWinSocket that describes the server endpoint of the client connection is freed after OnClientDisconnect. If ServerType is stThreadBlocking, OnThreadEnd occurs after OnClientDisconnect.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientDisconnect event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.

Note:	The OnClientDisconnect event handler for TServerSocket is also set when setting the OnClientDisconnect event handler of the associated TServerWinSocket.


TCustomServerSocket.OnClientError
 VCL Reference

TCustomServerSocket.OnClientError

TCustomServerSocket	See also

Occurs when there is a failure in establishing, using, or terminating the socket connection to an individual client socket.

property OnClientError: TSocketErrorEvent;

Description

Write an OnClientError event handler to respond to errors that arise with a connection to an individual client. Set the ErrorCode parameter to 0 if the OnClientError event handler successfully deals with the error condition to prevent an ESocketError from being raised.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientError event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.

Note:	The OnClientError event handler for TServerSocket is also set when setting the OnClientError event handler of the associated TServerWinSocket.


TCustomServerSocket.OnClientRead
 VCL Reference

TCustomServerSocket.OnClientRead

TCustomServerSocket	See also

Occurs when the server socket should read information from a client socket.

property OnClientRead: TSocketNotifyEvent;

Description

Write an OnClientWrite event handler to write to the socket connection. If the ServerType property is stThreadBlocking, use a TWinSocketStream object to prevent problems that arise while writing from causing the execution thread to hang indefinitely. Otherwise, use the methods of the Socket parameter to perform the actual writing.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientRead event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.


TCustomServerSocket.OnClientWrite
 VCL Reference

TCustomServerSocket.OnClientWrite

TCustomServerSocket	See also

Occurs when the server socket should write information to a client socket.

property OnClientWrite: TSocketNotifyEvent;

Description

Write an OnClientWrite event handler to write to the socket connection. If the ServerType property is stThreadBlocking, use a TWinSocketStream object to prevent problems that arise while writing from causing the execution thread to hang indefinitely. Otherwise, use the methods of the Socket parameter to perform the actual writing.

Note:	If ServerType is stThreadBlocking, make sure that all code in an OnClientWrite event handler is thread-safe. Use the GetClientThread method of the Sender parameter to access thread-specific information.


TCustomServerSocket.OnGetSocket
 VCL Reference

TCustomServerSocket.::OnGetSocket

TCustomServerSocket	See also

Occurs when the server socket needs to create a new TServerClientWinSocket object to represent the server endpoint of a connection to a client socket.

type

  TGetSocketEvent = procedure (Sender: TObject; Socket: TSocket; var ClientSocket: TServerClientWinSocket) of object;

property OnGetSocket: TGetSocketEvent;

Description

Write an OnGetSocket event handler to create a specialized descendant of TServerClientWinSocket for the server socket component to use. Return the new TServerClientWinSocket object in the ClientSocket parameter. The Sender parameter is the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.OnGetThread
 VCL Reference

TCustomServerSocket.::OnGetThread

TCustomServerSocket	See also

Occurs when the server socket needs to create a new execution thread for a connection to a client socket.

type TGetThreadEvent = procedure (Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread) of object;

property OnGetThread: TGetThreadEvent;

__property TGetThreadEvent OnGetThread = {read=FOnGetThread, write=FOnGetThread};

Description

Write an OnGetThread event handler to create a specialized descendant of TServerClientThread for the connection to the client socket. Return the new TServerClientThread object in the SocketThread parameter.

Most applications that use thread-blocking server components will want to provide an OnGetThread event handler and implement a TServerClientThread that handles its own reading and writing in a thread-safe manner rather than relying on the default TServerClientThread which triggers OnClientRead and OnClientWrite events. This is because the OnClientRead and OnClientWrite event handlers reside on the server socket, which is in global memory.

The Sender parameter is the TServerWinSocket object that describes the server endpoint of the listening connection. The ClientSocket parameter is the TServerClientWinSocket object that describes the server endpoint of the connection to the client socket that is about to be formed.


TCustomServerSocket.OnThreadEnd
 VCL Reference

TCustomServerSocket.OnThreadEnd

TCustomServerSocket	See also

Occurs when a client socket connection is terminated and the associated thread finishes execution.

type TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

property OnThreadEnd: TThreadNotifyEvent;

Description

Write an OnThreadEnd to take specific action when the thread for a client connection finishes execution. OnThreadEnd occurs after the OnClientDisconnect event.

The Sender parameter is the TServerWinSocket that describes the server endpoint of the listening connection. The Thread parameter is the thread that is finishing up.


TCustomServerSocket.OnThreadStart
 VCL Reference

TCustomServerSocket.OnThreadStart

TCustomServerSocket	See also

Occurs when the execution thread for a connection to a client socket starts up.

type TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

property OnThreadStart: TThreadNotifyEvent;

Description

Write an OnThreadStart to initialize the TServerClientThread for the connection to a single client socket. The Sender parameter is the TServerWinSocket that describes the server endpoint of the listening connection. The Thread parameter is the thread that is about to start execution.


 VCL Reference

TCustomServerSocket methods

TCustomServerSocket	Alphabetically	Legend

In TCustomServerSocket

Destroy

DoActivate

GetGetSocketEvent

GetGetThreadEvent

GetOnClientError

GetOnClientEvent

GetOnThreadEnd

GetOnThreadStart

GetServerType

GetThreadCacheSize

SetGetSocketEvent

SetGetThreadEvent

SetOnClientError

SetOnClientEvent

SetOnThreadEnd

SetOnThreadStart

SetServerType

SetThreadCacheSize

Derived from TAbstractSocket

Close

Open

Derived from TComponent

BeforeDestruction

Create

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomServerSocket methods

TCustomServerSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoActivate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetGetSocketEvent

GetGetThreadEvent

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOnClientError

GetOnClientEvent

GetOnThreadEnd

GetOnThreadStart

GetParentComponent

GetServerType

GetThreadCacheSize

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

RemoveComponent

RemoveFreeNotification

ReferenceInterface

SafeCallException

SetGetSocketEvent

SetGetThreadEvent

SetOnClientError

SetOnClientEvent

SetOnThreadEnd

SetOnThreadStart

SetServerType

SetThreadCacheSize

SetSubComponent

UpdateAction


TCustomServerSocket.Destroy
 VCL Reference

TCustomServerSocket.Destroy

TCustomServerSocket	See also

Destroys an instance of TCustomServerSocket.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the server socket is not nil, and only then calls Destroy.

Destroy frees the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.DoActivate
 VCL Reference

TCustomServerSocket.DoActivate

TCustomServerSocket	See also

Opens or Closes the socket connection.

procedure DoActivate(Value: Boolean); override;

Description

DoActivate provides the underlying implementation of the Open and Close methods. When Value is True, DoActivate opens a listening connection to accept connection requests. When Value is False, DoActivate terminates the current listening connection and any connections to client sockets.


TCustomServerSocket.GetGetSocketEvent
 VCL Reference

TCustomServerSocket.GetGetSocketEvent

TCustomServerSocket	See also

Returns the OnGetSocket event handler.

type TGetSocketEvent = procedure (Sender: TObject; Socket: TSocket; var ClientSocket: TServerClientWinSocket) of object;

function GetGetSocketEvent: TGetSocketEvent;

Description

Applications cannot call this protected method. GetGetSocketEvent returns the OnGetSocket event handler of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetGetThreadEvent
 VCL Reference

TCustomServerSocket.GetGetThreadEvent

TCustomServerSocket	See also

Returns the OnGetThread event handler.

type TGetThreadEvent = procedure (Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread) of object;

function GetGetThreadEvent: TGetThreadEvent;

Description

Applications cannot call this protected method. GetGetThreadEvent returns the OnGetThread event handler of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetOnClientError
 VCL Reference

TCustomServerSocket.GetOnClientError

TCustomServerSocket	See also

Returns the OnClientError event handler.

function GetOnClientError: TSocketErrorEvent;

Description

Applications cannot call this protected method. GetOnClientError returns the OnClientError event handler of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetOnClientEvent
 VCL Reference

TCustomServerSocket.GetOnClientEvent

TCustomServerSocket	See also

Provides indexed access to the various event handlers that respond to client events.

function GetOnClientEvent(Index: Integer): TSocketNotifyEvent;

Description

Applications can’t call this protected method. It is used internally to implement the event handlers that respond to client events.


TCustomServerSocket.GetOnThreadEnd
 VCL Reference

TCustomServerSocket.GetOnThreadEnd

TCustomServerSocket	See also

Returns the OnThreadEnd event handler.

typedef void __fastcall (__closure *TThreadNotifyEvent)(System::TObject* Sender, TServerClientThread* Thread);

TThreadNotifyEvent __fastcall GetOnThreadEnd();

Description

Applications cannot call this protected method. GetOnThreadEnd returns the OnThreadEnd event handler of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetOnThreadStart
 VCL Reference

TCustomServerSocket.GetOnThreadStart

TCustomServerSocket	See also

Returns the OnThreadStart event handler.

typedef void __fastcall (__closure *TThreadNotifyEvent)(System::TObject* Sender, TServerClientThread* Thread);

TThreadNotifyEvent __fastcall GetOnThreadStart();

Description

Applications cannot call this protected method. GetOnThreadStart returns the OnThreadStart event handler of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetServerType
 VCL Reference

TCustomServerSocket.GetServerType

TCustomServerSocket	See also

Returns the ServerType property.

type TServerType = (stNonBlocking, stThreadBlocking);

function GetServerType: TServerType;

Description

Applications cannot call this protected method. GetServerType returns the value of the ServerType property of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.GetThreadCacheSize
 VCL Reference

TCustomServerSocket.GetThreadCacheSize

TCustomServerSocket	See also

Returns the value of the ThreadCacheSize property.

function GetThreadCacheSize: Integer;

Description

Applications cannot call this protected method. GetThreadCacheSize returns the value of the ThreadCacheSize property of the TServerWinSocket object that describes the server endpoint of the listening connection.


TCustomServerSocket.SetGetSocketEvent
 VCL Reference

TCustomServerSocket.SetGetSocketEvent

TCustomServerSocket	See also

Sets the OnGetSocket event handler.

type TGetSocketEvent = procedure (Sender: TObject; Socket: TSocket; var ClientSocket: TServerClientWinSocket) of object;

procedure SetGetSocketEvent(Value: TGetSocketEvent);

Description

Applications cannot call this protected method. SetGetSocketEvent sets the OnGetSocket event handler of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their OnGetSocket event.


TCustomServerSocket.SetGetThreadEvent
 VCL Reference

TCustomServerSocket.SetGetThreadEvent

TCustomServerSocket	See also

Sets the OnGetThread event handler.

type TGetThreadEvent = procedure (Sender: TObject; ClientSocket: TServerClientWinSocket; var SocketThread: TServerClientThread) of object;

procedure SetGetThreadEvent(Value: TGetThreadEvent);

Description

Applications cannot call this protected method. SetGetThreadEvent sets the OnGetThread event handler of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their OnGetThread event.


TCustomServerSocket.SetOnClientError
 VCL Reference

TCustomServerSocket.SetOnClientError

TCustomServerSocket	See also

Sets the OnClientError event handler.

procedure SetOnClientError(Value: TSocketErrorEvent);

Description

Applications cannot call this protected method. SetOnClientError sets the OnClientError event handler of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their OnClientError event.


TCustomServerSocket.SetOnClientEvent
 VCL Reference

TCustomServerSocket.SetOnClientEvent

TCustomServerSocket	See also

Sets the client event handlers of the associated TServerWinSocket object.

procedure SetOnClientEvent(Index: Integer; Value: TSocketNotifyEvent);

Description

Applications cannot call this protected method. SetOnClientEvent sets the various event handlers that respond to events from the server endpoint of a client connection. Server socket components use TServerWinSocket to implement these events.


TCustomServerSocket.SetOnThreadEnd
 VCL Reference

TCustomServerSocketSetOnThreadEnd

TCustomServerSocket	See also

Sets the OnThreadEnd event handler.

type TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

procedure SetOnThreadEnd(Value: TThreadNotifyEvent);

Description

Applications cannot call this protected method. SetOnThreadEnd sets the OnThreadEnd event handler of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their OnThreadEnd event.


TCustomServerSocket.SetOnThreadStart
 VCL Reference

TCustomServerSocket.SetOnThreadStart

TCustomServerSocket	See also

Sets the OnThreadStart event handler.

type TThreadNotifyEvent = procedure (Sender: TObject; Thread: TServerClientThread) of object;

procedure SetOnThreadStart(Value: TThreadNotifyEvent);

Description

Applications cannot call this protected method. SetOnThreadStart sets the OnThreadEnd event handler of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their OnThreadEnd event.


TCustomServerSocket.SetServerType
 VCL Reference

TCustomServerSocket.SetServerType

TCustomServerSocket	See also

Sets the ServerType property.

type TServerType = (stNonBlocking, stThreadBlocking);

procedure SetServerType(Value: TServerType);

Description

Applications cannot call this protected method. SetServerType sets the ServerType property of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their ServerType property.


TCustomServerSocket.SetThreadCacheSize
 VCL Reference

TCustomServerSocket.SetThreadCacheSize

TCustomServerSocket	See also

Sets the ThreadCacheSize property.

procedure SetThreadCacheSize(Value: Integer);

Description

Applications cannot call this protected method. SetThreadCacheSize sets the ThreadCacheSize property of the TServerWinSocket object that describes the server endpoint of the listening connection. Server socket objects use TServerWinSocket to implement their ThreadCacheSize property.


Hierarchy

TObject

TPersistent

TComponent

TAbstractSocket

TCustomSocket

TCustomServerSocket


TCustomIpClient
 VCL Reference

TCustomIpClient

Hierarchy	Properties	Methods 	Events	See also

TCustomIpClient encapsulates the client network functions

Unit

Sockets

Description

TCustomIpClient encapsulates the client network functions, linking sockets to network protocols such as TCP/IP and UDP, as well as raw sockets and custom protocols.

Do not create instances of TCustomIpClient. Use TCustomIpClient as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TCustomIpClient provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomIpClient properties

TCustomIpClient	Alphabetically	Legend

In TCustomIpClient

Connected

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomIpClient properties

TCustomIpClient	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag

VCLComObject


TCustomIpClient.Connected
 VCL Reference

TCustomIpClient.Connected

TCustomIpClient	See also

Indicates whether the socket connection is open and available for communication with other machines.

property Connected: Boolean;

Description

Read Connected before trying to use or change the socket connection. Connected indicates whether the socket connection has been established. When Connected is True, the socket is open and available for use. When Connected is False, the socket is closed and can be changed.

To open a socket, use the Open method. To close a socket, use the Close method.


 VCL Reference

TCustomIpClient events

TCustomIpClient	Alphabetically	Legend

In TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TCustomIpClient events

TCustomIpClient	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


TCustomIpClient.OnConnect
 VCL Reference

TCustomIpClient.OnConnect

TCustomIpClient	See also

Occurs on client sockets just after the connection to the server is opened.

type TSocketNotifyEvent = procedure (sender: TObject) of object;

property OnConnect: TSocketNotifyEvent read FOnConnect write FOnConnect;

Description

Write an OnConnect event handler for a client socket to take specific action after the connection to a server socket has been established. Depending on the service, this may be the point when the socket should start reading or writing over the connection.


TCustomIpClient.OnDisconnect
 VCL Reference

TCustomIpClient.OnDisconnect

TCustomIpClient	See also

Occurs on client sockets just after the connection to the server is closed.

type TSocketNotifyEvent = procedure (sender: TObject) of object;

property OnDisconnect: TSocketNotifyEvent read FOnDisconnect write FOnDisconnect;

Description

Write an OnDisconnect event handler for a client socket to take specific action just after the connection to a server socket is terminated.


 VCL Reference

TCustomIpClient methods

TCustomIpClient	Alphabetically	Legend

In TCustomIpClient

Close

Connect

Create

Disconnect

GetThreadObject

Open

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomIpClient methods

TCustomIpClient	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

GetThreadObject

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForData


TCustomIpClient.Create
 VCL Reference

TCustomIpClient.Create

TCustomIpClient	See also

Creates an instance of TCustomIpClient.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a TCustomIpClient object.


TCustomIpClient.Close
 VCL Reference

TCustomIpClient.Close

TCustomIpClient	See also

Shuts down the socket connection.

procedure Close; override;

Description

Call Close to shut down the socket connection. This method performs the same functions as Disconnect.


TCustomIpClient.Connect
 VCL Reference

TCustomIpClient.Connect

TIpSocket	See also

Connects the local socket to the remote socket.

function Connect: Boolean;

Description

Set Connect to True to connect the local socket to the remote socket.


TCustomIpClient.Disconnect
 VCL Reference

TCustomIpClient.Disconnect

TIpSocket	See also

Disconnects the local socket from the remote socket.

procedure Disconnect;

Description

Call Disconnect to break the connection between the local and remote sockets. This method performs the same function as Close.


TCustomIpClient.GetThreadObject
 VCL Reference

TCustomIpClient.GetThreadObject

TIpSocket	See also

Returns a reference to the TThread object for the currently executing thread.

procedure GetThreadObject: TClientSocketThread;

Description

Call GetThreadObject to obtain a reference to the currently executing thread. GetThreadObject is only useful when BlockMode is set to bmBlockingMode, which means that the client is executing in its own thread. If this method is called from the main application thread, the value nil is returned.


TCustomIpClient.Open
 VCL Reference

TCustomIpClient.Open

TCustomIpClient	See also

Creates the socket connection.

procedure Open; override;

Description

Call Open to create and initiate the socket connection.

For client sockets, Open locates and connects to a server. For server sockets, Open opens the socket connection in a listening mode, but does not complete the connection to a client socket.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TCustomIpClient


TCustomAdapter
 VCL Reference

TCustomAdapter

Hierarchy	Properties	Methods	See also

TCustomAdapter is a base class for objects that bind VCL objects to COM interfaces.

Unit

AxCtrls

Description

Do not create objects of this class.  Instead, call the GetOleFont procedure to create the binding between a TFont and an OLE font object or GetOlePicture to create the binding between a TPicture and an OLE picture object.


 VCL Reference

TCustomAdapter properties

TCustomAdapter	Alphabetically	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TCustomAdapter properties

TCustomAdapter	By object	Legend

RefCount


 VCL Reference

TCustomAdapter methods

TCustomAdapter	Alphabetically	Legend

In TCustomAdapter

Changed

ConnectOleObject

Create

Destroy

ReleaseOleObject

Update

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TCustomAdapter methods

TCustomAdapter	By object	Legend

AfterConstruction

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ConnectOleObject

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReleaseOleObject

SafeCallException

Update


TCustomAdapter.Changed
 VCL Reference

TCustomAdapter.Changed

TCustomAdapter	See also

Responds when the VCL representation of the OLE object changes.

procedure Changed; virtual;

Description

Changed is called automatically so that the associated OLE object can be updated to reflect changes made to the corresponding VCL object. In TCustomAdapter, Changed calls ReleaseOleObject so that the OLE object can be reacquired to reflect the changes in the VCL object. Descendants of TCustomAdapter override Changed to use the OLE interface to make appropriate changes.


TCustomAdapter.ConnectOleObject
 VCL Reference

TCustomAdapter.ConnectOleObject

TCustomAdapter	See also

Associates the adapter with an OLE interface.

procedure ConnectOleObject(OleObject: IUnknown);

Description

ConnectOleObject is used internally to associate the adapter with the OLE object it represents.


TCustomAdapter.Create
 VCL Reference

TCustomAdapter.Create

TCustomAdapter	See also

Constructs an instance of the custom adapter control.

constructor Create;

Description

Never create an object of this class, only its descendants, such as TFontAdapter or TPictureAdapter.


TCustomAdapter.Destroy
 VCL Reference

TCustomAdapter.Destroy

TCustomAdapter	See also

Destroys the custom adapter object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use the Free method, which checks that the adapter is not nil before calling Destroy.

Destroy frees and disconnects the VCL object from an OLE object.


TCustomAdapter.ReleaseOleObject
 VCL Reference

TCustomAdapter.ReleaseOleObject

TCustomAdapter	See also

Releases the associated OLE interface, allowing it to decrease its reference count.

procedure ReleaseOleObject;

Description

When implementing a descendant of TCustomAdapter, call ReleaseOleObject when the adapter no longer needs the OLE object.


TCustomAdapter.Update
 VCL Reference

TCustomAdapter.Update

TCustomAdapter	See also

Provides the interface for a method that responds to changes in the OLE object.

procedure Update; virtual; abstract;

Description

Descendants of TCustomAdapter override Update to modify the associated VCL object so that it reflects changes in the corresponding OLE object. It is the converse of the Changed method.


Hierarchy

TObject

TInterfacedObject

TCustomAdapter


TCustomTcpServer
 VCL Reference

TCustomTcpServer

Hierarchy	Properties	Methods 	Events	See also

TCustomTcpServer is the ancestor object of all the server socket descendants

Unit

Sockets

Description

Do not create instances of TCustomTcpServer. Use TCustomTcpServer as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TCustomTcpServer provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomTcpServer properties

TCustomTcpServer	Alphabetically	Legend

In TCustomTcpServer

BlockMode

Listening

ServerSocketThread

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomTcpServer properties

TCustomTcpServer	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Listening

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

ServerSocketThread

SockType

Tag

VCLComObject


TCustomTcpServer.BlockMode
 VCL Reference

TCustomTcpServer.BlockMode

TCustomTcpServer	See also

Sets or returns the blocking mode of the socket.

TServerSocketBlockMode = (bmBlocking, bmNonBlocking, bmThreadBlocking);

property BlockMode: TServerSocketBlockMode;

Description

Use BlockMode to set or return the blocking mode for the socket. By default, the socket is set to bmThreadBlocking.

The TServerSocketBlockMode type defines the set of possible socket flags for the BlockMode property. The following table lists the possible values for the TServerSocketBlockMode type and the meaning corresponding to each value:

Value	Socket state

bmBlocking	The socket is set to block mode.

bmNonBlocking	The socket is set to non-blocking mode.

bmThreadBlocking	A separate thread is created so that listening can be performed in the background without blocking the entire server application.


TCustomTcpServer.Listening
 VCL Reference

TCustomTcpServer.Listening

TCustomTcpServer	See also

Sets the server application to listen for client requests.

property Listening: Boolean;

Description

Listening sets the server application to listen for client requests.


TCustomTcpServer.ServerSocketThread
 VCL Reference

TCustomTcpServer.ServerSocketThread

TCustomTcpServer	See also

Specifies the TServerSocketThread in use.

property ServerSocketThread: TServerSocketThread;

Description

ServerSocketThread is a reference to the server socket thread object.


 VCL Reference

TCustomTcpServer events

TCustomTcpServer	Alphabetically	Legend

In TCustomTcpServer

OnAccept

OnGetThread

OnListening

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TCustomTcpServer events

TCustomTcpServer	By object	Legend

OnAccept

OnCreateHandle

OnDestroyHandle

OnError

OnGetThread

OnListening

OnReceive

OnSend


TCustomTcpServer.OnAccept
 VCL Reference

TCustomTcpServer.OnAccept

TCustomTcpServer	 See also

Occurs on server sockets just after the connection to a client socket is accepted.

TSocketAcceptEvent = procedure (sender: TObject; ClientSocket: TCustomIpClient) of object;

property OnAccept: TSocketAcceptEvent;

Description

Write an OnAccept event handler for a server socket to take specific action after the connection to a client socket has been accepted. This is the first point when information is available about the local port and IP address that will be used in the server endpoint of the connection. The port number, and possibly the IP address, will differ from those of the listening socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. After a request from the queue is accepted by the server socket, an OnAccept event occurs. After the server socket accepts the connection, the client socket completes the connection, and an OnConnect event occurs for the client socket.


TCustomTcpServer.OnGetThread
 VCL Reference

TCustomTcpServer.OnGetThread

TCustomTcpServer	See also

A wrapper for the TServerSocketThread event of the same name.

type TGetThreadEvent = procedure (Sender: TObject; var ClientSocketThread: TClientSocketThread) of object;

property OnGetThread: TGetThreadEvent;

Description

This event is exactly the same as the OnGetThread event of the TServerSocketThread object referenced in ServerSocketThread.


TCustomTcpServer.OnListening
 VCL Reference

TCustomTcpServer.OnListening

TCustomTcpServer	 See also

Occurs when a server socket begins listening for connections.

property OnListening: TNotifyEvent;

Description

Write an OnListening event to take specific action when a server begins listening for a connection.


 VCL Reference

TCustomTcpServer methods

TCustomTcpServer	Alphabetically	Legend

In TCustomTcpServer

Accept

Close

Create

Open

WaitForConnection

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Destroy

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomTcpServer methods

TCustomTcpServer	By object	Legend

Accept

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForConnection

WaitForData


TCustomTcpServer.Create
 VCL Reference

TCustomTcpServer.Create

TCustomTcpServer	See also

Creates an instance of TCustomTcpServer.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a TCustomTcpServer object.


TCustomTcpServer.Accept
 VCL Reference

TCustomTcpServer.Accept

TCustomTcpServer	See also

Accepts a connection to a client socket.

function Accept: boolean;

function Accept(var ClientSocket: TCustomIpClient): boolean;

Description

Accept is called automatically in response to notifications that a client socket is requesting a connection.

The Accept method for TCustomTcpServer does nothing with the notification. Descendants of TCustomTcpServer that represent listening server sockets override this method to accept the connection to the client socket. In the second declaration of the method, a TCustomIpClient object is created (as ClientSocket) to handle the connection.


TCustomTcpServer.Close
 VCL Reference

TCustomTcpServer.Close

TCustomTcpServer	See also

Shuts down the socket connection.

procedure Close; override;

Description

Call Close to shut down the socket connection. Close sets the Active property to False.

For client sockets, Close terminates the connection to the server. For server sockets, Close shuts down the connection so that the server socket is no longer listening for client requests.


TCustomTcpServer.Open
 VCL Reference

TCustomTcpServer.Open

TCustomTcpServer	See also

Opens the socket connection.

procedure Open; override;

Description

Call Open to initiate the socket connection. Open sets the Active property to True.

For client sockets, Open locates and connects to a server. For server sockets, Open opens the socket connection in a listening mode, but does not complete the connection to a client socket.


TCustomTcpServer.WaitForConnection
 VCL Reference

TCustomTcpServer.WaitForConnection

TCustomTcpServer	See also

Listens for TCP connections.

function WaitForConnection: boolean

Description

Call WaitForConnection to listen for TCP connections on the port specified by the Port property. The thread will block until a connection request is received.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TCustomTcpServer


TCustomizeDlg
 VCL Reference

TCustomizeDlg

Hierarchy	Properties	Methods

TCustomizeDlg is the ActionBands customization dialog

Unit

CustomizeDlg

Description

TCustomizeDlg is the customization dialog for action bands. This dialog appears when the users indicate, using a control provided by the application developer, that they wish to customize their user interface elements. The dialog is also used in Delphi itself, when action bands for an application are first being created.


 VCL Reference

TCustomizeDlg properties

TCustomizeDlg	Alphabetically	Legend

In TCustomizeDlg

ActionManager

StayOnTop

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomizeDlg properties

TCustomizeDlg	By object	Legend

ActionManager

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

StayOnTop

Tag

VCLComObject


TCustomizeDlg.ActionManager
 VCL Reference

TCustomizeDlg.ActionManager

TCustomizeDlg	See also

Indicates the action manager associated with the customization dialog.

property ActionManager: TCustomActionManager;

Description

At design time, set ActionManager to refer to your application's action manager object (usually an instance of TActionManager, which derives from TCustomActionManager).


TCustomizeDlg.StayOnTop
 VCL Reference

TCustomizeDlg.StayOnTop

TCustomizeDlg

Dictates whether the customization dialog can be placed behind other windows.

property StayOnTop: Boolean;

Description

If you want the customization dialog to stay on top of all windows while it is visible, set StayOnTop to True. Otherwise, it should be set to False.


 VCL Reference

TCustomizeDlg events

TCustomizeDlg	Alphabetically	Legend

In TCustomizeDlg

OnClose

OnShow


 VCL Reference

TCustomizeDlg events

TCustomizeDlg	By object	Legend

OnClose

OnShow


TCustomizeDlg.OnClose
 VCL Reference

TCustomizeDlg.OnClose

TCustomizeDlg

Event which occurs when the dialog closes.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler if you want special actions taken when the customization dialog closes.


TCustomizeDlg.OnShow
 VCL Reference

TCustomizeDlg.OnShow

TCustomizeDlg

Event which occurs when the dialog opens.

property OnShow: TNotifyEvent;

Description

Write an OnShow event handler if you want special actions taken when the customization dialog opens.


 VCL Reference

TCustomizeDlg methods

TCustomizeDlg	Alphabetically	Legend

In TCustomizeDlg

Show

Derived from TComponent

_AddRef

_Release

BeforeDestruction

ChangeName

Create

DefineProperties

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetChildOwner

GetChildParent

GetChildren

GetIDsOfNames

GetNamePath

GetOwner

GetParentComponent

GetTypeInfo

GetTypeInfoCount

HasParent

InsertComponent

Invoke

IsImplementorOf

Loaded

Notification

PaletteCreated

QueryInterface

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAncestor

SetChildOrder

SetDesigning

SetDesignInstance

SetInline

SetName

SetParentComponent

SetSubComponent

UpdateAction

Updated

UpdateRegistry

Updating

ValidateContainer

ValidateInsert

ValidateRename

WriteState

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomizeDlg methods

TCustomizeDlg	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ChangeName

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineProperties

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildOwner

GetChildParent

GetChildren

GetIDsOfNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

GetParentComponent

GetTypeInfo

GetTypeInfoCount

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

Invoke

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Notification

PaletteCreated

QueryInterface

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAncestor

SetChildOrder

SetDesigning

SetDesignInstance

SetInline

SetName

SetParentComponent

SetSubComponent

Show

UpdateAction

Updated

UpdateRegistry

Updating

ValidateContainer

ValidateInsert

ValidateRename

WriteState


TCustomizeDlg.Show
 VCL Reference

TCustomizeDlg.Show

TComponent

Causes the customization dialog to be shown.

procedure TCustomizeDlg.Show;

Description

When the method Show is called, it causes the customization dialog to become visible.


 VCL Reference

Scope

Published

Protected

Accessibility

Read-only


Hierarchy

TObject

TPersistent

TComponent

TCustomizeDlg


TCustomWebDispatcher
 VCL Reference

TCustomWebDispatcher

Hierarchy	Properties	Methods	Events	See also

TCustomWebDispatcher is the abstract base class for Web dispatcher objects.

Unit

HTTPApp

Description

Add a descendant of TCustomWebDispatcher to a Web application to enable it to respond to HTTP request messages. When a Web application is created, it automatically includes a TWebModule object, which is a descendant of TCustomWebDispatcher. Keep the default Web module, or replace it with another data module that contains a descendant of TCustomWebDispatcher, such as TWebDispatcher.

TCustomWebDispatcher manages the action items that assemble responses to HTTP request messages. When the TWebApplication object receives an HTTP request message, TCustomWebDispatcher passes the request on to the appropriate action item or action items to service the message.

TCustomWebDispatcher also keeps track of information about the current HTTP message for the benefit of TCustomContentProducer objects.


 VCL Reference

TCustomWebDispatcher properties

TCustomWebDispatcher	Alphabetically	Legend

In TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomWebDispatcher properties

TCustomWebDispatcher	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag

VCLComObject


TCustomWebDispatcher.Action
 VCL Reference

TCustomWebDispatcher.Action

TCustomWebDispatcher	See also

Provides indexed access to the action items managed by the TCustomWebDispatcher object.

property Action[Index: Integer]: TWebActionItem;

Description

Use Action to iterate over all of the actions in the Actions collection. Zero is the index of the first action item, one is the index of the second action item, and so on. To access individual actions by name, use the ActionByName method.


TCustomWebDispatcher.Actions
 VCL Reference

TCustomWebDispatcher.Actions

TCustomWebDispatcher	See also

Represents the collection of action items managed by the TCustomWebDispatcher object.

property Actions: TWebActionItems;

Description

Use the methods of Actions to add action items for use by the dispatcher, to clear the set of action items managed by the dispatcher, or to access the attributes of the action items.


TCustomWebDispatcher.AfterDispatch
 VCL Reference

TCustomWebDispatcher.AfterDispatch

TCustomWebDispatcher	See also

Occurs after the HTTP response message has been successfully filled out by the action items but not yet sent.

property AfterDispatch: THTTPMethodEvent;

Description

Write an AfterDispatch event handler to provide a final check of the HTTP response message before it is sent to the Web client. An AfterDispatch event handler can let a response stand as is, change the response, send the response, or change the Handled parameter to False to prevent the Web application from sending the response.

The AfterDispatch event does not occur if all of the action items indicate that the response was not handled, or if the response is sent by any of the action items.


TCustomWebDispatcher.BeforeDispatch
 VCL Reference

TCustomWebDispatcher.BeforeDispatch

TCustomWebDispatcher	See also

Occurs before the dispatcher tries to match the HTTP request message with any of its action items.

property BeforeDispatch: THTTPMethodEvent;

Description

Write a BeforeDispatch event handler to preprocess all HTTP request messages. A BeforeDispatch event handler can enable or disable the action items appropriate to the response, begin filling out the response object, or provide any other necessary preprocessing.

If the BeforeDispatch event handler finishes filling out the response object, it should change the Handled parameter to True so the dispatcher will not send the request on to any of the action items. If the BeforeDispatch event handler sends the response message, the dispatcher will not pass the request on to any of the action items, even if the Handled parameter is left as False.

If the BeforeDispatch event handler sets the Handled parameter to True but does not send the response, the Web dispatcher will generate an AfterDispatch event.


TCustomWebDispatcher.Request
 VCL Reference

TCustomWebDispatcher.Request

TCustomWebDispatcher	See also

Provides access to the TWebRequest object that the dispatcher is currently handling.

property Request: TWebRequest;

Description

Use Request to obtain information about the current HTTP request message. The dispatcher matches this TWebRequest object to an action item, and invokes the OnAction event handler of the action item to generate and send a response to the HTTP request message. OnAction event handlers often use descendants of TCustomContentProducer to help generate the response to the request message. These content producers can use the Request property to correctly produce the content of the HTTP response.


TCustomWebDispatcher.Response
 VCL Reference

TCustomWebDispatcher.Response

TCustomWebDispatcher	See also

Provides access to the TWebResponse object for the message the dispatcher is currently handling.

property Response: TWebResponse;

Description

Use Response to obtain information about the emerging response to the current HTTP request message. The dispatcher matches the request object specified by the Request property to an action item. It then invokes the OnAction event handler of the action item to fill in the TWebResponse object specified by the Response property. OnAction event handlers often use descendants of TCustomContentProducer to help generate the response. These content producers can use Response to determine the state of the emerging response that is being produced.


 VCL Reference

TCustomWebDispatcher events

TCustomWebDispatcher	Alphabetically	Legend

In TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TCustomWebDispatcher events

TCustomWebDispatcher	By object	Legend

OnCreate

OnDestroy

OnException


TCustomWebDispatcher.OnException
 VCL Reference

TCustomWebDispatcher.OnException

TCustomWebDispatcher	See also

Occurs when an unhandled exception occurs in the application.

type TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;

property OnException: TExceptionEvent read FOnException write FOnException;

Description

Use OnException to change the default behavior that occurs when an exception is not handled by application code. The OnException event handler is called automatically in the HandleException method.

OnException only handles exceptions that occur during message processing. Exceptions that occur before or after the execution of the application’s Run method do not generate OnException events.

If an exception passes through the try blocks in the application code, the application automatically calls the HandleException method. Unless the exception object is EAbort, HandleException calls the OnException handler, if one exists. Otherwise, it calls ShowException to display a message box indicating an error occurred.

TExceptionEvent is the type of the OnException event. It points to a method that handles exceptions in the application. The Sender parameter is the object that threw the exception, and E is the exception object.


 VCL Reference

TCustomWebDispatcher methods

TCustomWebDispatcher	Alphabetically	Legend

In TCustomWebDispatcher

ActionByName

Create

Destroy

DispatchAction

DoAfterDispatch

DoBeforeDispatch

HandleException

Notification

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomWebDispatcher methods

TCustomWebDispatcher	By object	Legend

ActionByName

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchAction

DoAfterDispatch

DoBeforeDispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomWebDispatcher.ActionByName
 VCL Reference

TCustomWebDispatcher.ActionByName

TCustomWebDispatcher	See also

Returns the action item identified by the AName parameter.

function ActionByName(const AName: string): TWebActionItem;

Description

Call ActionByName to gain access to an individual action item when its name is known. Change the properties of the action item so that it handles different HTTP request messages, or invoke its OnAction event handler to respond to an HTTP request message.


TCustomWebDispatcher.Create
 VCL Reference

TCustomWebDispatcher.Create

TCustomWebDispatcher	See also

Creates an instance of TCustomWebDispatcher.

constructor Create(AOwner: TComponent); override;

Description

Do not call the constructor for TCustomWebDispatcher. Web applications automatically include a Web module. If the Web module is replaced by another data model, the Web dispatcher should be added to the new data module at design time. Objects placed at design time are created automatically. If an application tries to create a dispatcher object in a Web module, or in a data module that already has a Web dispatcher, an exception is raised.

Create creates the TWebActionItems object that holds the action items managed by the dispatcher. If the Web dispatcher is included in another data module, it adds a reference to itself to any content producer in that data module.

After the Web dispatcher is created automatically at runtime, an OnCreate event occurs.


TCustomWebDispatcher.Destroy
 VCL Reference

TCustomWebDispatcher.Destroy

TCustomWebDispatcher	See also

Frees an instance of TCustomWebDispatcher.

destructor Destroy; override;

Description

Do not destroy the TCustomWebDispatcher directly in an application. The dispatcher is freed automatically when the server application shuts down.

Destroy frees the TWebActionItems object used to hold the collection of action items.


TCustomWebDispatcher.DispatchAction
 VCL Reference

TCustomWebDispatcher.DispatchAction

TCustomWebDispatcher	See also

Passes an HTTP request message to the action items in Actions until it is handled.

function DispatchAction(Request: TWebRequest; Response: TWebResponse): Boolean;

Description

The Web application calls DispatchAction when it receives an HTTP request message so that the dispatcher can dispatch the request to any action items that can generate the response.

Before DispatchAction looks for action items to handle the HTTP request message represented by the Request parameter, it generates a BeforeDispatch event. If the BeforeDispatch event handler handles the action, the dispatcher does not pass the request message to any of the action items.

If there is no BeforeDispatch event handler, or of the BeforeDispatch event handler does not handle the request, DispatchAction attempts to match the MethodType and PathInfo of the request with the MethodType and PathInfo properties of each action item in the Actions property. When an action item matches the MethodType and PathInfo of the request, DispatchAction calls its OnAction event handler.

The OnAction event handler can complete the response to the request, or indicate that the request is not fully handled and allow another action item to finish processing the request. If the OnAction event handler does not complete the request, DispatchAction continues checking the action items in the Actions property and calling the OnAction event handler when a match is found.

If all of the action items are checked, and the request is still not fully handled, DispatchAction calls the OnAction event handler of the default action item.

Finally, if the request has been handled by the BeforeDispatch event handler or any of the action items, DispatchAction generates an AfterDispatch event. The AfterDispatch event does not occur if the BeforeDispatch event or any of the action items has already sent the response.

DispatchAction returns a Boolean value indicating whether the Web application should send the response message if it is not already sent. DispatchAction returns True if the action was handled by the action items and the AfterDispatch event handler did not change its Handled parameter to False.


TCustomWebDispatcher.DoAfterDispatch
 VCL Reference

TCustomWebDispatcher.DoAfterDispatch

TCustomWebDispatcher	See also

Generates an AfterDispatch event and returns a value that indicates whether the Web application can send the response.

function DoAfterDispatch(Request: TWebRequest; Response: TWebResponse): Boolean;

Description

Applications cannot call DoAfterDispatch. The DispatchAction method calls DoAfterDispatch after sending the HTTP request message to any matching action items. The DispatchAction method does not call DoAfterDispatch if the HTTP request message was not handled by the action items or by a BeforeDispatch event handler. DoAfterDispatch is also not called if the message was already sent back to the Web client.

If the AfterDispatch event handler indicates that the response should not be sent, DoAfterDispatch returns False, and the Web application drops the connection without sending the response message. Otherwise, DoAfterDispatch returns True, and the Web application sends the response message if it was not sent from within the AfterDispatch event handler.


TCustomWebDispatcher.DoBeforeDispatch
 VCL Reference

TCustomWebDispatcher.DoBeforeDispatch

TCustomWebDispatcher	See also

Generates a BeforeDispatch event and returns a value that indicates whether the dispatcher should look for action items to handle the request.

function DoBeforeDispatch(Request: TWebRequest; Response: TWebResponse): Boolean;

Description

Applications cannot call DoBeforeDispatch. The DispatchAction method calls DoBeforeDispatch before trying to match the HTTP request message with any of its action items.

If the BeforeDispatch event handler indicates that it has handled the request message, DoBeforeDispatch returns True, and the DispatchAction method does not try to pass the request message to any of the action items. Otherwise, DoBeforeDispatch returns False, and unless the response message was sent from within the BeforeDispatch event handler, the DispatchAction method proceeds with looking for action items to handle the request message.

If DoBeforeDispatch returns True but the response has not been sent, DispatchAction generates an AfterDispatch event.


TCustomWebDispatcher.HandleException
 VCL Reference

TCustomWebDispatcher.HandleException

TCustomWebDispatcher	See also

Provides default handling of exceptions for the web application.

procedure HandleException(E: Exception; var Handled: Boolean);

Description

If an exception passes through all the try blocks in the web application code, the application automatically calls HandleException, which displays a dialog box indicating an error occurred. Unless the exception object is EAbort, HandleException calls the OnException event handler.

To assign other exception handling code for the web application, use the OnException event handler.


TCustomWebDispatcher.Notification
 VCL Reference

TCustomWebDispatcher.Notification

TCustomWebDispatcher	See also

Responds to notifications when objects are added to the module.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification ensures that all TCustomContentProducer objects have access to the dispatcher, by setting their Dispatcher property as they are added to the application.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TCustomWebDispatcher


TCustomDataSetPageProducer
 VCL Reference

 TCustomDataSetPageProducer

Hierarchy	Properties	Methods	Events	See also

TCustomDataSetPageProducer is the ancestor of the data set page producer classes.

Unit

DSProd

Description

Do not create instances of TCustomDataSetPageProducer. Use TCustomDataSetPageProducer as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TCustomDataSetPageProducer provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomDataSetPageProducer properties

TCustomDataSetPageProducer	Alphabetically	Legend

In TCustomDataSetPageProducer

DataSet

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomDataSetPageProducer properties

TCustomDataSetPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext


TCustomDataSetPageProducer.DataSet
 VCL Reference

TCustomDataSetPageProducer.DataSet

TCustomDataSetPageProducer	See also

Refers to the page producer's DataSet object.

property DataSet: TDataSet;

Description

DataSet is a reference to the page producer's data set. Use this property to directly access the data set object, which is derived from TDataSet.


 VCL Reference

TCustomDataSetPageProducer events

TCustomDataSetPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TCustomDataSetPageProducer events

TCustomDataSetPageProducer	By object	Legend

OnHTMLTag


 VCL Reference

TCustomDataSetPageProducer methods

TCustomDataSetPageProducer	Alphabetically	Legend

In TCustomDataSetPageProducer

Content

Derived from TCustomPageProducer

Create

Destroy

Derived from TBasePageProducer

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDataSetPageProducer methods

TCustomDataSetPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomDataSetPageProducer.Content
 VCL Reference

TCustomDataSetPageProducer.Content

TCustomDataSetPageProducer	See also

Returns the translated HTML template.

function Content: string; override;

Description

Call Content to get the HTML commands that result from converting the HTML template. Content reads the template from HTMLDoc or HTMLFile, depending on which property is set. Content replaces each tag in the template that has the form <#Fieldname> with the value of the field in DataSet that has the specified name. Any HTML-transparent tags in the template that do not have tag names which match a field in DataSet are passed on to the OnHTMLTag event handler.

The string returned by Content can be used as the Content property of the response to an HTTP request message.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TCustomPageProducer

TCustomDataSetPageProducer


TCustomContentProducer
 VCL Reference

TCustomContentProducer

Hierarchy	Properties	Methods	See also

TCustomContentProducer is the base class for all objects that produce the string that is sent as the contents of an HTTP response message.

Unit

HTTPApp

Description

Use TCustomContentProducer as a base class when defining a class to produce the contents of an HTTP response message. In most cases, the content producer will assemble a string of HTML commands. However, descendants of TCustomContentProducer can be defined to produce any valid MIME type.


 VCL Reference

TCustomContentProducer properties

TCustomContentProducer	Alphabetically	Legend

In TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomContentProducer properties

TCustomContentProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dispatcher

DispatcherComponent

Name

Owner

Tag

VCLComObject


TCustomContentProducer.Dispatcher
 VCL Reference

TCustomContentProducer.Dispatcher

TCustomContentProducer	See also

Provides access to the dispatcher for the Web server application that includes the TCustomContentProducer object.

property Dispatcher: IWebDispatcherAccess;

Description

Use Dispatcher to get access to the dispatcher. The properties of the dispatcher interface give access to the TWebRequest and TWebResponse objects for the HTTP message that is currently being serviced. The content producer uses these objects to obtain detailed information about the message for which it is generating a response string.


TCustomContentProducer.DispatcherComponent
 VCL Reference

TCustomContentProducer.DispatcherComponent

TCustomContentProducer	See also

Provides access to the dispatcher component.

property DispatcherComponent: TComponent;

Description

Dispatcher component is the component that implements the interface that is the value of the Dispatcher property. The content producer uses this property so that it can respond to notifications when the component is freed. To use the dispatcher, use the Dispatcher property instead.


 VCL Reference

TCustomContentProducer methods

TCustomContentProducer	Alphabetically	Legend

In TCustomContentProducer

Content

ContentFromStream

ContentFromString

Notification

Derived from TComponent

BeforeDestruction

Create

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomContentProducer methods

TCustomContentProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomContentProducer.Content
 VCL Reference

TCustomContentProducer.Content

TCustomContentProducer	See also

Returns the content produced by the content producer.

function Content: string; virtual;

Description

Call Content to retrieve the content for using in an HTTP response message. TCustomContentProducer returns an empty string. Descendants of TCustomContentProducer return the value of the content that they produce. In most cases, this content is a string of HTML commands, although it can be any valid MIME type.


TCustomContentProducer.ContentFromStream
 VCL Reference

TCustomContentProducer.ContentFromStream

TCustomContentProducer	See also

Returns the content produced in response to input read from a stream.

function ContentFromStream(Stream: TStream): string; virtual;

Description

Call ContentFromStream to retrieve the content produced by the content producer based on the information provided by the Stream parameter. TCustomContentProducer ignores the Stream parameter and returns the value created by the Content method.

Descendants of TCustomContentProducer override this method to interpret streamed input in their own way.


TCustomContentProducer.ContentFromString
 VCL Reference

TCustomContentProducer.ContentFromString

TCustomContentProducer	See also

Returns the content produced in response to an input string.

function ContentFromString(const S: string): string; virtual;

Description

Call ContentFromString to retrieve the content produced by the content producer based on the information provided by the S parameter. TCustomContentProducer ignores the string and returns the value created by the Content method.

Descendants of TCustomContentProducer override this method to interpret the input string in their own way.


TCustomContentProducer.Notification
 VCL Reference

TCustomContentProducer.Notification

TCustomContentProducer	See also

Overrides the inherited method to respond to messages that the dispatcher is going away.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether this call was triggered by the removal of the dispatcher. If so, the Dispatcher property is set to nil.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer


TCustomSQLDataSet
 VCL Reference

TCustomSQLDataSet

Hierarchy	Properties	Methods	Events	See also

TCustomSQLDataSet is the base class for all dbExpress dataset components.

Unit

SqlExpr

Description

TCustomSQLDataSet encapsulates the properties, events, and methods for working with data accessed through dbExpress. Applications should not instantiate TCustomSQLDataSet objects. Instead, instantiate one of the descendant classes: TSQLDataSet, TSQLTable, TSQLQuery, or TSQLStoredProc.

TCustomSQLDataSet and its descendants represent unidirectional datasets. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory. Because of this, they have the following limitations:

There is no searching or navigation support except for moving to the first record or moving to the next record.

There is no built-in editing support. The data underlying an SQL dataset can only be edited by explicitly creating an SQL UPDATE command or by connecting the SQL dataset to a client dataset using a provider.

There is no support for filtering records or for lookup fields.


 VCL Reference

TCustomSQLDataSet properties

TCustomSQLDataSet	Alphabetically	Legend

In TCustomSQLDataSet

BlobBuffer

CommandText

CommandType

CurrentBlobSize

DataLink

DataSource

DesignerData

DetailDataSet

IndexDefs

InternalConnection

LastError

MaxBlobSize

NativeCommand

NoMetadata

ParamCheck

ParamCount

Params

Prepared

ProcParams

RecordCount

RowsAffected

SchemaInfo

SortFieldNames

SQLConnection

TransactionLevel

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomSQLDataSet properties

TCustomSQLDataSet	By object	Legend

Active

AggFields

AutoCalcFields

BlobBuffer

BlockReadSize

Bof

Bookmark

CanModify

CommandText

CommandType

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CurrentBlobSize

DataLink

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

DetailDataSet

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IndexDefs

InternalConnection

IsUniDirectional

LastError

MaxBlobSize

Modified

Name

NativeCommand

NoMetadata

ObjectView

Owner

ParamCheck

ParamCount

Params

Prepared

ProcParams

RecNo

RecordCount

RecordSize

RowsAffected

SchemaInfo

SortFieldNames

SparseArrays

SQLConnection

State

Tag

TransactionLevel

VCLComObject


TCustomSQLDataSet.BlobBuffer
 VCL Reference

TCustomSQLDataSet.BlobBuffer

TCustomSQLDataSet	See also

Reserves a buffer for storing BLOB values.

property BlobBuffer: TBlobByteData;

Description

SQL datasets use the BlobBuffer property to allocate a special buffer for holding BLOB data. Applications do not access this protected property.


TCustomSQLDataSet.CommandText
 VCL Reference

TCustomSQLDataSet.CommandText

TCustomSQLDataSet	See also 	Example

Specifies the command the dataset executes.

property CommandText: string;

Description

The value of CommandText depends on the CommandType property:

When CommandType is ctQuery, CommandText is an SQL statement that the dataset executes. If the statement is a SELECT statement, the SQL dataset executes the statement when it is opened. If the statement does not return a result set, the SQL dataset executes the statement when the ExecSQL method is called.

When CommandType is ctStoredProc, CommandText is the name of a stored procedure. The SQL dataset executes the stored procedure when it is opened or when the ExecSQL method is called, depending on whether the stored procedure returns a set of records.

When CommandType is ctTable, CommandText is the name of a table on the database server. The SQL dataset automatically generates a SELECT statement to fetch all the records on all the fields in this table, sorting by the fields listed in the SortFieldNames property. The generated statement is executed when the dataset is opened.

If CommandText is an SQL statement that includes parameters or the name of a stored procedure that has parameters, use the Params property to supply parameter values.


TCustomSQLDataSet.CommandType
 VCL Reference

TCustomSQLDataSet.CommandType

TCustomSQLDataSet	See also

Indicates the meaning of the CommandText property.

property CommandType: TSQLCommandType;

Description

CommandType indicates the type of command that is contained in the CommandText property. TCustomSQLDataSet descendants set this value to the way in which they specify a query or stored procedure.

The following table lists the possible values:

CommandType	Corresponding CommandText

ctQuery	An SQL statement that the dataset executes.

ctStoredProc	The name of a stored procedure.

ctTable	The name of a table on the database server. The SQL dataset automatically generates a SELECT statement to fetch all the records on all the fields in this table.


TCustomSQLDataSet.CurrentBlobSize
 VCL Reference

TCustomSQLDataSet.CurrentBlobSize

TCustomSQLDataSet	See also

Indicates the size of the most recently read BLOB field.

property CurrentBlobSize: LongWord;

Description

Applications can’t use this protected property. TCustomSQLDataSet uses CurrentBlobSize internally to determine the size needed for BlobBuffer. When the dataset reads a BLOB field, it sets CurrentBlobSize to the number of bytes in the BLOB field, as reported by the database driver.


TCustomSQLDataSet.DataLink
 VCL Reference

TCustomSQLDataSet.DataLink

TCustomSQLDataSet	See also

Identifies the datalink that manages communication between the SQL dataset and another, master dataset.

property DataLink: TDataLink;

Description

The protected DataLink property is used internally when the SQL dataset acts as the detail dataset in a master/detail relationship that is not based on nested datasets. The datalink object manages communication between another (master) dataset and this SQL dataset. For example, it is the datalink that tells this SQL dataset to refresh its data when the active record of the master dataset changes.

Do not use DataLink to establish the relationship between an SQL dataset and another (master) dataset from which it obtains parameter values. Instead, use the DataSource property, or, if the dataset is TSQLTable, the MasterSource property.


TCustomSQLDataSet.DataSource
 VCL Reference

TCustomSQLDataSet.DataSource

TCustomSQLDataSet	See also

Links the SQL dataset to another (master) dataset.

property DataSource: TDataSource;

Description

DataSource links this SQL dataset to another (master) dataset that supplies values for this dataset’s parameters.

When the SQL dataset’s CommandText (or SQL) property specifies a parameterized query but the application does not provide values for the corresponding parameters in the Params property, the SQL dataset fetches parameter values from the dataset identified with the specified data source. When the current record in the dataset associated with DataSource changes, the SQL dataset refreshes its data to reflect the new parameter values.


TCustomSQLDataSet.DesignerData
 VCL Reference

TCustomSQLDataSet.DesignerData

TCustomSQLDataSet	See also

Stores custom data.

property DesignerData: string

Description

DesignerData has no predefined meaning. Application developers can use the DesignerData property to associate application-specific information with an SQL dataset instance.


TCustomSQLDataSet.DetailDataSet
 VCL Reference

TCustomSQLDataSet.DetailDataSet

TCustomSQLDataSet

Points to a dataset that holds the detail set in a master/detail relationship.

property DetailDataSet: TCustomSQLDataSet;

Description

DetailDataSet is used internally to manage the detail set when this dataset is the master of a master/detail relationship.


TCustomSQLDataSet.IndexDefs
 VCL Reference

TCustomSQLDataSet.IndexDefs

TCustomSQLDataSet	See also

Contains the definitions of all indexes defined on the server for the dataset.

property IndexDefs: TIndexDefs;

Description

Read IndexDefs to obtain information about what indexes are available on the database server for this dataset.

TCustomSQLDataSet does not explicitly use the information in IndexDefs. The order of its records is determined by the ORDER BY clause of its SQL statement.

If the SQL dataset is an instance of TSQLTable, you can use IndexDefs to identify the index to use for the IndexName property. Even with other TCustomSQLDataSet descendants, IndexDefs can be useful for composing SQL commands dynamically that need to use an index on the server. For example, provider components use the index information to uniquely identify records when composing update commands.


TCustomSQLDataSet.InternalConnection
 VCL Reference

TCustomSQLDataSet.InternalConnection

TCustomSQLDataSet	See also

Indicates the component that connects the dataset to its database server, taking into account whether the connection was cloned.

property InternalConnection: TSQLConnection;

Description

Applications can’t use this protected property. Instead, SQL datasets use InternalConnection internally when they need to access the dbExpress interfaces for the connection to the database server. Unlike the published SQLConnection property, InternalConnection handles the case when the dataset must use a clone of the primary connection because the server limits the number of active statements that the connection supports.

It is not necessary to use InternalConnection except when using the connection component to reference its dbExpress interfaces.


TCustomSQLDataSet.LastError
 VCL Reference

TCustomSQLDataSet.LastError

TCustomSQLDataSet

Saves the error message for the last error returned by dbExpress.

property LastError: string;

Description

When the SQL dataset encounters an error in a call to dbExpress, it caches the error message. This allows it to continue until it is in an appropriate state to raise the associated exception. The message is used to raise an exception with the error message when it is safe to do so.


TCustomSQLDataSet.MaxBlobSize
 VCL Reference

TCustomSQLDataSet.MaxBlobSize

TCustomSQLDataSet	See also

Indicates the maximum number of bytes fetched for any BLOB field in the dataset.

property MaxBlobSize: Integer;

Description

MaxBlobSize limits the amount of data that can be fetched from Binary Large Object (BLOB) fields. BLOB fields can hold an indefinite amount of data. However, SQL datasets read that data into a memory buffer. By limiting the amount of data that can be fetched from a BLOB field, you limit the size of the buffer.

If MaxBlobSize is –1, the dataset imposes no maximum BLOB size. If MaxBlobSize is 0, the dataset uses the parameters of the associated SQL connection, if any, to determine the maximum BLOB size.

Note:	MaxBlobSize should agree with any parameters on the associated SQL connection component that limit the size of BLOB data.


TCustomSQLDataSet.NativeCommand
 VCL Reference

TCustomSQLDataSet.NativeCommand

TCustomSQLDataSet	See also

Represents the SQL command that is sent to the server.

property NativeCommand: string;

Description

SQL datasets sometimes need to alter a query before it can be sent to the dbExpress driver. For example, dbExpress does not support named parameters, so the SQL dataset converts named parameters to unnamed parameters before sending off a command.

NativeCommand is the adjusted command that is sent to the dbExpress driver. It is based on the value of CommandText.


TCustomSQLDataSet.NoMetadata
 VCL Reference

TCustomSQLDataSet.NoMetadata

TCustomSQLDataSet	See also

Specifies whether the SQL dataset fetches metadata information along with the data.

property NoMetadata: Boolean;

Description

Use NoMetadata to turn off the fetching of metadata when it is not needed. Setting NoMetadata to True can improve performance if the dataset has a lot of indexes, because they do not need to be fetched from the server. However, it will also slow any attempts to update data using a client dataset that is linked via a dataset provider. NoMetadata is intended primarily for datasets that are used in a read-only manner.

NoMetadata must be False to perform any operations that require an index. These include setting up master/detail relationships, updating data from a client dataset when the provider’s UpdateMode is not upWhereAll, and delayed fetching of BLOB data.


TCustomSQLDataSet.ParamCheck
 VCL Reference

TCustomSQLDataSet.ParamCheck

TCustomSQLDataSet	See also

Specifies whether the parameter list for an SQL dataset is regenerated when the SQL command changes.

property ParamCheck: Boolean;

Description

By default, the Params property is updated automatically to reflect any parameters that appear in the query specified by the CommandText property (or the SQL property for TSQLQuery). That is, whenever the CommandText property changes, the Params property is regenerated to reflect the new set of parameters.

There are times when you want to override this default behavior. For example, when specifying a data definition language (DDL) statement that defines a stored procedure, the resulting SQL command may include parameters. These parameters, however, should not be used as parameters of the SQL dataset, because they are not parameters of the DDL command, but rather, they are parameters of the stored procedure that the command creates.

In order to override the default generation of the Params property in response to changes in CommandText, set ParamCheck to False.


TCustomSQLDataSet.ParamCount
 VCL Reference

TCustomSQLDataSet.ParamCount

TCustomSQLDataSet	See also

Indicates the number of parameters listed by the Params property.

property ParamCount: Integer;

Description

ParamCount is the number of parameters listed in the Params property. Applications can’t use this protected property. It is used internally when preparing SQL statements for execution.


TCustomSQLDataSet.Params
 VCL Reference

TCustomSQLDataSet.Params

TCustomSQLDataSet	See also	Example

Represents the parameters for a query or stored procedure.

property Params: TParams;

Description

Params is a collection of TParam objects that represent the parameters of a query or stored procedure specified by the SQL dataset. When you specify a query by setting the CommandText property (or the SQL property in TSQLQuery), the SQL dataset automatically parse the query and fills Params with a TParam object for every parameter in the query. Similarly, when you specify a stored procedure by setting the CommandText property (or the StoredProcName property in TSQLStoredProc), the SQL dataset automatically asks the server for a list of stored procedure parameters and fills Params with a TParam object for every parameter of the stored procedure.

At design-time, use the Params property editor to access the individual TParam objects. For queries, use this property editor to check the DataType property of each parameter and to assign values to the parameters. For stored procedures, you may need to do more, changing the type or number of parameters if the server does not supply complete information about stored procedure parameters.

You can also use Params to assign parameter properties in code at runtime.

Note:	If you do not assign values to input parameters before opening the dataset, it fetches values from the dataset identified by the DataSource property. However, this only works if the individual TParam objects have the same names as fields in the master dataset.


TCustomSQLDataSet.Prepared
 VCL Reference

TCustomSQLDataSet.Prepared

TCustomSQLDataSet	See also	Example

Specifies whether the command is prepared before execution.

property Prepared: Boolean;

Description

SQL datasets are automatically prepared when you call Open or ExecSQL (or ExecProc). When a SQL dataset is prepared, dbExpress and the server allocate resources for the SQL statement and its parameters. If CommandType is ctTable, the dataset generates its SELECT query when it is prepared. Any parameters that are not bound by the server are folded into a query when it is prepared.

If you execute the query or stored procedure more than once, you can improve performance by setting Prepared to True before opening the dataset. Setting Prepared to True prepares the dataset at once, rather than waiting until the dataset is opened.

Conversely, set Prepared to False if you want to ensure that the dataset is re-prepared before it executes (for example, if you change a parameter value or the SortFieldNames property).


TCustomSQLDataSet.ProcParams
 VCL Reference

TCustomSQLDataSet.ProcParams

TCustomSQLDataSet	See also

ProcParams lists the parameter descriptors obtained from the server for any stored procedure parameters.

property ProcParams: TList;

Description

When the SQL dataset represents a stored procedure, it fetches information about stored procedure parameters from the server as a list of parameter descriptors. It stores this list as the value of ProcParams.

Applications never use the protected ProcParams directly. Instead, the information from the list is used to initialize the Params property.


TCustomSQLDataSet.RecordCount
 VCL Reference

TCustomSQLDataSet.RecordCount

TCustomSQLDataSet	See also

Indicates the total number of records associated with the dataset.

property RecordCount: Integer;

Description

Read RecordCount to determine the total number of records in the dataset. An application can read RecordCount even if the dataset is not active.

Reading RecordCount will generate an exception if the dataset can’t determine the number of records. Do not read RecordCount if

The dataset represents stored procedure.

The dataset represents a query that contains parameters.

The dataset represents a multi-table join.


TCustomSQLDataSet.RowsAffected
 VCL Reference

TCustomSQLDataSet.RowsAffected

TCustomSQLDataSet	See also

Indicates the number of rows operated on by the latest query execution.

property RowsAffected: Integer;

Description

When the SQL dataset represents a query that does not return a result set, you can’t use the RecordCount property to ascertain the number of records affected by the query. In such cases, read RowsAffected to determine how many rows were updated or deleted by the query when it executed. If no rows were updated or deleted, RowsAffected is zero. RowsAffected is –1 if the SQL statement could not be executed due to an error condition. (This latter situation typically follows the throwing of an exception.)


TCustomSQLDataSet.SchemaInfo
 VCL Reference

TCustomSQLDataSet.SchemaInfo

TCustomSQLDataSet	See also

Identifies the metadata with which to populate the dataset.

property SchemaInfo: TSQLSchemaInfo;

Description

SQL datasets can be used to represent metadata from the database server rather than the results of a query or stored procedure. SchemaInfo controls whether the dataset represents metadata, and if so, what kind.

When SchemaInfo specifies that the dataset represents schema information, the dataset is populated with that information when it is opened. Each record in the resulting dataset represents a single entity (a single table, stored procedure, field, parameter, or index).

Each type of schema information results in a different set of columns (fields), so it is not advisable to use persistent fields when accessing metadata through an SQL dataset.

Applications do not work directly with the protected SchemaInfo property. Instead, they specify the desired schema information by calling the SetSchemaInfo method.


TCustomSQLDataSet.SortFieldNames
 VCL Reference

TCustomSQLDataSet.SortFieldNames

TCustomSQLDataSet	See also

Indicates the sort order when CommandType is ctTable.

property SortFieldNames: string;

Description

Use SortFieldNames to specify the fields that should be used to order the records in the dataset. SortFieldNames is only used when CommandType is ctTable.

SortFieldNames is a semicolon-delimited list of field names. These names are used to generate the ORDER BY clause of the SQL statement the dataset creates to fetch data from a server table. Records are sorted by the first named field, and within that sort order, by the second named field, and so on.


TCustomSQLDataSet.SQLConnection
 VCL Reference

TCustomSQLDataSet.SQLConnection

TCustomSQLDataSet	See also	Example

Specifies the SQL connection component that connects the dataset to a database server.

property SQLConnection: TSQLConnection;

Description

Use SQLConnection to specify an SQL connection object that connects the dataset to a database server.

At design-time, select from the list of available TSQLConnection components in the Object Inspector. At runtime, set SQLConnection to reference an existing TSQLConnection object.

SQLConnection should be the first property you set on the dataset. Only after the SQLConnection property is set can you use the Command Text editor to specify a query for the CommandText property or populate the dataset with data by setting Active to True. Similarly, SQLConnection must be set before the dataset can initialize the Params property when you set CommandText.


TCustomSQLDataSet.TransactionLevel
 VCL Reference

TCustomSQLDataSet.TransactionLevel

TCustomSQLDataSet	See also

Indicates the transaction to which this dataset belongs.

property TransactionLevel: SmallInt;

Description

Use TransactionLevel to indicate the active transaction to use when opening this dataset or using it to execute commands. TransactionLevel is the same as the transaction identifier that is supplied to the connection’s StartTransaction method. If TransactionLevel is unspecified (0), the dataset fetches its records or executes commands in the context of the most recently started transaction.

Note:	Most applications do not need to use TransactionLevel because most database servers require that SQL commands belong to the most recently started transaction. However, the InterBase server allows multiple overlapping transactions to be active simultaneously.


 VCL Reference

TCustomSQLDataSet events

TCustomSQLDataSet	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TCustomSQLDataSet events

TCustomSQLDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TCustomSQLDataSet methods

TCustomSQLDataSet	Alphabetically	Legend

In TCustomSQLDataSet

Create

CreateBlobStream

Destroy

GetBlobFieldData

GetDetailLinkFields

GetFieldData

GetKeyFieldNames

GetQuoteChar

IsSequenced

ParamByName

SetSchemaInfo

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomSQLDataSet methods

TCustomSQLDataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyFieldNames

GetNamePath

GetParentComponent

GetQuoteChar

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

ParamByName

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSchemaInfo

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TCustomSQLDataSet.Create
 VCL Reference

TCustomSQLDataSet.Create

TCustomSQLDataSet	See also

Creates an instance of a TCustomSQLDataSet component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an SQL dataset component at runtime. SQL datasets placed in forms or data modules at design time are created automatically.

TCustomSQLDataSet is rarely used directly in applications because many of its properties are protected. Instead, applications instantiate TCustomSQLDataSet descendants such as TSQLDataSet, TSQLTable, TSQLQuery, or TSQLStoredProc.

In addition to allocating the memory and structures it needs, Create initializes the following properties:

Sets the ParamCheck property to True.

Sets the MaxBlobSize property to 0.

Sets the SchemaInfo to specify no schema information (use CommandText instead).

Sets the Prepared property to False.


TCustomSQLDataSet.CreateBlobStream
 VCL Reference

TCustomSQLDataSet.CreateBlobStream

TCustomSQLDataSet	See also

Creates a blob stream for a Binary large object (BLOB) field in the dataset.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Description

Call CreateBlobStream to obtain a stream for reading and writing the value of the field specified by the Field parameter.

Field is a string containing the name of the BLOB field in the dataset. It must be an instance of TBlobField or one of its descendants.

Mode indicates whether the stream will be used for reading the field’s value (bmRead), writing the field’s value (bmWrite), or both (bmReadWrite).

CreateBlobStream returns the stream you can use for reading or writing data.


TCustomSQLDataSet.Destroy
 VCL Reference

TCustomSQLDataSet.Destroy

TCustomSQLDataSet	See also

Destroys the TCustomSQLDataSet instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically by Delphi. If an application creates its own instances of a dataset, however, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which verifies that the dataset reference is not nil before calling Destroy.


TCustomSQLDataSet.GetBlobFieldData
 VCL Reference

TCustomSQLDataSet.GetBlobFieldData

TCustomSQLDataSet	See also

Retrieves the current value of a BLOB field into a buffer.

function GetBlobFieldData(FieldNo: Integer; var Buffer: TBlobByteData): Integer; override;

Description

This method is used internally to read BLOB data from the field specified by FieldNo into a Buffer. The buffer is a dynamic array of bytes, so that it can grow to accommodate the size of the BLOB data. GetBlobFieldData returns the size of the buffer.

GetBlobFieldData is intended primarily for internal use. Applications should use the BLOB stream returned by the CreateBlobStream method to access BLOB data.


TCustomSQLDataSet.GetDetailLinkFields
 VCL Reference

TCustomSQLDataSet.GetDetailLinkFields

TCustomSQLDataSet	See also

Lists the field components that link this dataset as a detail of a master dataset.

procedure GetDetailLinkFields(MasterFields, DetailFields: TList); override;

Description

GetDetailLInkFIelds fills the two lists with field components that define a master-detail relationship between this dataset and another (master) dataset. The MasterFields list is filled with fields from the master table whose values must equal the values of the fields in the DetailFields list. The DetailFields list is filled with fields from this dataset.

Applications seldom call GetDetailLinkFields. It is used internally by the Field Link designer when setting up master/detail relationships.


TCustomSQLDataSet.GetFieldData
 VCL Reference

TCustomSQLDataSet.GetFieldData

TCustomSQLDataSet	See also

Retrieves the current value of a field into a buffer.

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; override;

function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: Boolean): Boolean; overload; virtual;

function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; overload; override;

Description

Most applications do not need to call GetFieldData. TField objects call this method to implement their GetData method.

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number.

Buffer is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). GetFieldData returns a value that indicates whether the data was successfully fetched.

NativeFormat indicates whether the dataset fetches the field in Delphi’s native format for the field type. When NativeFormat is False, the dataset must convert the field value to the native type. This allows the field to handle data from different types of datasets (ADO-based, BDE-based, dbExpress, and so on) in a uniform manner.

GetFieldData returns a value that indicates whether the data was successfully fetched.


TCustomSQLDataSet.GetKeyFieldNames
 VCL Reference

TCustomSQLDataSet.GetKeyFieldNames

TCustomSQLDataSet	See also

Fills a list with the names of all fields in all indexes defined for the dataset.

function GetKeyFieldNames(List: TStrings ): Integer;

Description

Call GetKeyFieldNames to fill a string list with information about the indexes that are available on the database server for this dataset.

For every index defined on the server for the dataset, GetKeyFieldNames adds a string to the string list specified by List. Each string is a semicolon-delimited set of field names that lists the fields in a single index.

TCustomSQLDataSet does not explicitly use these indexes. GetKeyFieldNames can be useful for composing SQL commands dynamically that need to use an index to access fields.


TCustomSQLDataSet.GetQuoteChar
 VCL Reference

TCustomSQLDataSet.GetQuoteChar

TCustomSQLDataSet

Returns the character or characters to use in generated SQL statements to enclose quoted strings.

function GetQuoteChar: string; virtual;

Description

GetQuoteChar returns the character or characters that delimit quoted strings in automatically-generated SQL statements. This string appears both before and after quoted strings.


TCustomSQLDataSet.IsSequenced
 VCL Reference

TCustomSQLDataSet.IsSequenced

TCustomSQLDataSet	See also

Indicates whether the dataset can use record numbers to indicate the order of records.

function IsSequenced: Boolean; override;

Description

Datasets use IsSequenced to indicate whether the RecNo property corresponds to the order of records.  When IsSequenced returns True, applications can safely use the RecNo property to navigate to records in the dataset.

For TCustomSQLDataSet, IsSequenced always returns False because TCustomSQLDataSet descendants do not support record numbers at all.


TCustomSQLDataSet.ParamByName
 VCL Reference

TCustomSQLDataSet.ParamByName

TCustomSQLDataSet	See also	Example

Locates a parameter in the Params property collection.

function ParamByName(const Value: string): TParam;

Description

Call ParamByName to access a specific parameter object, given its name. Value is the name of the parameter.

ParamByName is primarily used to set a parameter’s value at runtime.


TCustomSQLDataSet.SetSchemaInfo
 VCL Reference

TCustomSQLDataSet.SetSchemaInfo

TCustomSQLDataSet	See also

Indicates whether the dataset represents metadata from the server, and if so, what kind.

procedure SetSchemaInfo( SchemaType: TSchemaType; SchemaObjectName, SchemaPattern: string );

Description

Call SetSchemaInfo to indicate whether the SQL dataset represents the results of an SQL command (specified by CommandText) or whether it represents a table of schema information (metadata).

The SchemaType parameter identifies the type of information you want. It can have any of the following values:

Value	Description

stNoSchema	No schema information. The SQL dataset is populated with the results of its query or stored procedure rather than metadata from the server.

stTables	Information about all the data tables on the database server that match the criteria specified by the SQL connection’s TableScope property.

stSysTables	Information about all of the system tables on the database server. Not all servers use system tables to store metadata. Requesting a list of system tables from a server that does not use them results in an empty dataset.

stProcedures	Information about all of the stored procedures on the database server.

stColumns	Information about all of the columns (fields) in a specified table.

stProcedureParams	Information about all of the parameters of a specified stored procedure.

stIndexes	Information about all of the indexes defined for a specified table.

SchemaObjectName is the name of the table or stored procedure about whose columns, indexes, or parameters you want information. When SchemaType is stColumns or stIndexes, SchemaObjectName is the name of a table. When SchemaType is stProcedureParams, SchemaObjectName is the name of a stored procedure. When SchemaType is stNoSchema, stTables, stSysTables, or stProcedures, SchemaObjectName is ignored.

SchemaPattern is an SQL pattern mask that filters the resulting dataset. The name of each item (table, stored procedure, field, parameter, or index) must match this pattern mask or it does not appear as a record when the SQL dataset is opened. SchemaPattern uses the wildcards ‘%’ (to match a string of arbitrary characters of any length) and ‘_’ (to match a single arbitrary character). To use a literal percent or underscore in a pattern, the character is doubled (%% or __). If you do not want to use a pattern, set Pattern to nil.

After a call to SetSchemaInfo, opening the dataset results in a dataset populated with the specified information. If SchemaType is stNoSchema, the dataset reverts to the command specified by CommandText.

Note:	When you change the CommandText property, the dataset automatically reverts to a SchemaType of stNoSchema.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomSQLDataSet


TCustomClientDataSet
 VCL Reference

 TCustomClientDataSet

Hierarchy	Properties	Methods	Events	Using TCustomClientDataSet	See also

TCustomClientDataSet is the base class for datasets that cache their data in memory.

Unit

DBClient

Description

TCustomClientDataSet represents an in-memory dataset that stores its data in transportable data packets. It relies on Midas.dll or Midaslib.dcu to provide the underlying support for managing database operations such as navigating records, posting records to a change log, filtering records, and so on.

There are two basic ways a client dataset can obtain its data and apply its updates:

It can read from and write to a dedicated file on disk, acting as a file-based dataset.

It can obtain records from another dataset and post updates to that dataset or its database server. When working with another dataset, the client dataset communicates with that source dataset using a dataset provider. Depending on the TCustomClientDataSet descendant, the provider and the source dataset can be external to the client dataset, or they can be internal, owned objects.

Client datasets are used primarily for caching updates or to represent the dataset in the client portion of a multi-tiered database application.

Do not create instances of TCustomClientDataSet. TCustomClientDataSet is intended only as a base class for datasets that store data in memory as data packets. To add this functionality to a database application, use a TCustomClientDataSet descendant such as TClientDataSet, TBDEClientDataSet, or TSQLClientDataSet.


 VCL Reference

TCustomClientDataSet properties

TCustomClientDataSet	Alphabetically	Legend

In TCustomClientDataSet

Active

ActiveAggs

Aggregates

AggregatesActive

AppServer

CanModify

ChangeCount

CloneSource

CommandText

ConnectionBroker

Data

DataSetField

DataSize

DataSource

Delta

DisableStringTrim

DSBase

DSCursor

FetchOnDemand

FileName

Filter

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

PacketRecords

Params

ProviderEOF

ProviderName

ReadOnly

RecNo

RecordCount

RecordSize

RemoteServer

SavePoint

StatusFilter

StoreDefs

XMLData

Derived from TDataSet

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomClientDataSet properties

TCustomClientDataSet	By object	Legend

Active

ActiveAggs

AggFields

Aggregates

AggregatesActive

AppServer

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ChangeCount

CloneSource

CommandText

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectionBroker

Data

DataSetField

DataSize

DataSource

DefaultFields

Delta

Designer

DesignInfo

DisableStringTrim

DSBase

DSCursor

Eof

FetchOnDemand

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

FileName

Filter

Filtered

FilterOptions

Found

GroupingLevel

HasAppServer

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

LogChanges

MasterFields

MasterSource

Modified

Name

ObjectView

Owner

PacketRecords

Params

ProviderEOF

ProviderName

ReadOnly

RecNo

RecordCount

RecordSize

RemoteServer

SavePoint

SparseArrays

State

StatusFilter

StoreDefs

Tag

VCLComObject

XMLData


TCustomClientDataSet.Active
 VCL Reference

TCustomClientDataSet.Active

TCustomClientDataSet	See also	Example

Specifies whether the client dataset contains data.

property Active: Boolean;

Description

Use Active to determine whether the client dataset makes its data available. When Active is False, the client dataset is closed; It can’t manipulate the data it represents. When Active is True, data can be read or edited using the client dataset.

Setting Active to True:

1	Fills the client dataset with data. Depending on the other properties of the client dataset, this data comes from:

The file specified by the FileName property.

The provider specified by the ProviderName property or SetProvider method. (For some TCustomClientDataSet descendants, this is an internal provider component)

The data that was active when the client dataset was deactivated (only if the application has run continuously since the dataset was deactivated).

2	Triggers a BeforeOpen event.

3	Sets the State property to dsBrowse.

4	Opens a cursor into the dataset.

5	Triggers an After Open event.

If the client dataset has never been active previously, setting Active to True defines the structure (metadata) of the client dataset. This structure is retrieved with the data packet from the provider or stored on disk, or, if there is no data packet, it is built using the current value of the FieldDefs property or from the persistent field components listed by the Fields property.

If an error occurs during the dataset open, the dataset state is set to dsInactive, and the cursor is closed.

Setting Active to False:

1	Triggers a BeforeClose event.

2	Sets the State property to dsInactive.

3	Closes the cursor, saving the current data to disk if the FileName property is set, and saving the current data packet to a cache so that it can be restored when the client dataset is reopened.

4	Triggers an AfterClose event.

Note:	Calling the Open method sets Active to True; calling the Close method sets Active to False.


TCustomClientDataSet.ActiveAggs
 VCL Reference

TCustomClientDataSet.ActiveAggs

TCustomClientDataSet	See also

Lists the maintained aggregates supported by the current index.

property ActiveAggs[Index: Integer] : TList;

Description

Read ActiveAggs to obtain a list of currently maintained aggregates for a specified grouping level. The Index parameter specifies whether the aggregates summarize data over the entire client dataset (Index = 0), over the current value of the first grouping level (Index = 1), over the current value of the second grouping level (Index = 2), and so on.

ActiveAggs is a List object (TList) whose items are a subset of the possible aggregates maintained by the Aggregates property. If there are no aggregates maintained for the specified grouping level, the value of ActiveAggs is either an empty list or nil.

Note:	Each grouping level is determined by the current index. Grouping level 1 is the set of records with the same value on the first field in the index. Grouping level 2 is the set of records with the same values on the first two fields in the index, and so on.


TCustomClientDataSet.Aggregates
 VCL Reference

TCustomClientDataSet.Aggregates

TCustomClientDataSet	See also

Lists all aggregates that apply to the client dataset.

property Aggregates: TAggregates;

Description

Use Aggregates to define aggregates that summarize the data in the client dataset. Aggregates is a collection of TAggregate objects, each of which defines a formula for calculating an aggregate value from a group of records in the client dataset. The individual aggregates can summarize all the records in the client dataset or subgroups of records that have the same value on a set of fields. Aggregates that summarize a subgroup of records are associated with indexes, and can only be used when the associated index is current.

Do not use Aggregates to obtain summarized values maintained by the client dataset. Aggregates can contain TAggregate objects that are not currently active. Instead, use the ActiveAggs property, which represents only those TAggregate objects that are currently active.

Note:	You do not need to add a TAggregate object to the Aggregates collection when you add an aggregate field using the Fields editor. The Fields editor automatically adds TAggregate objects to Aggregates for every aggregate field you define.


TCustomClientDataSet.AggregatesActive
 VCL Reference

TCustomClientDataSet.AggregatesActive

TCustomClientDataSet	See also

Specifies whether the client dataset calculates and maintains aggregate values.

property AggregatesActive: Boolean;

Description

Use AggregatesActive to indicate whether the client dataset should maintain aggregate values. When AggregatesActive is False (the default), the client dataset does not support maintained aggregates. This allows the client dataset to avoid the overhead of calculating values that the application is not using. When AggregatesActive is True, the client dataset calculates and maintains all aggregate values specified by the Aggregates property that are compatible with the current index.

When aggregates are maintained, the Value method of every active aggregate object returns a value that reflects the current data in the client dataset. When users edit the data in the dataset, these values are recalculated to reflect the user’s changes.

Note:	To selectively enable and disable aggregates rather than turning them all on or off at once, use the Active property of individual TAggregate objects. These objects are available through the Aggregates property.


TCustomClientDataSet.AppServer
 VCL Reference

TCustomClientDataSet.AppServer

TCustomClientDataSet	See also

Provides access to the interface the client dataset uses to communicate with a provider.

property AppServer: IAppServer;

Description

Use AppServer to communicate with the provider that supplies data to and resolves updates for the client dataset. If the client dataset uses a provider in the same process space, AppServer is the interface to an internally created object that dispatches IAppServer calls to the local or internal provider. If the provider is on a remote application server, AppServer has the same value as the AppServer property of the connection component.

Applications don’t need to work directly with the IAppServer interface. The properties and methods of the client dataset are automatically translated into IAppServer calls as needed.


TCustomClientDataSet.CanModify
 VCL Reference

TCustomClientDataSet.CanModify

TCustomClientDataSet	See also

Indicates whether an application can insert, edit, or delete data in the client dataset.

property CanModify: Boolean;

Description

Check the status of CanModify to determine if an application can modify the client dataset’s data in any way. If CanModify is True, the data can be modified. If CanModify is False, the dataset is read-only.

If the ReadOnly property of the client dataset component is True, then CanModify is False.

Tip:	Client datasets that fetch data from a provider can support a more granular model that enables and disables only certain types of edits. What type of modifications are allowed (insertions, deletions, or edits to existing records) can be controlled by setting the provider options. If the provider is internal, you can access the options using the client dataset’s Options property. If the provider is external, use the provider’s Options property.


TCustomClientDataSet.ChangeCount
 VCL Reference

TCustomClientDataSet.ChangeCount

TCustomClientDataSet	See also	Example

Indicates the number of changes in the change log.

property ChangeCount: Integer;

Description

Check ChangeCount to determine how many modifications are pending for the dataset. ChangeCount increases when the data is edited. It is reset when updates are applied or merged and any differences are reconciled by the client dataset.


TCustomClientDataSet.CloneSource
 VCL Reference

TCustomClientDataSet.CloneSource

TCustomClientDataSet	See also

Indicates the client dataset (if any) with which this client dataset shares data.

property CloneSource: TCustomClientDataSet;

Description

Read CloneSource to access another client dataset that shares its data cursor with this one. CloneSource is set by the CloneCursor method when the datasets are linked.

If the client dataset has not called CloneCursor to share the data cursor of another client dataset, CloneSource is nil.


TCustomClientDataSet.CommandText
 VCL Reference

TCustomClientDataSet.CommandText

TCustomClientDataSet	See also	Example

Specifies an SQL command to be executed by the database server.

property CommandText: string;

Description

CommandText specifies what data the client dataset wants to receive from its (internal or external) provider. It is either

An SQL statement (query) for the database server to execute.

The name of a table or stored procedure.

If the client dataset uses an internal provider, CommandText is required. Whether it represents a query, table name, or stored procedure name is determined by the CommandType property.

If the client dataset uses an external provider component, CommandText represents a replacement for the property that the source dataset uses to identify its data (the SQL of a query, or the name of a table or stored procedure). If the provider’s Options property does not include poAllowCommandText (which, by default, it does not), then CommandText has no effect.

When CommandText is a non-empty string, its value is sent to the provider when the client dataset opens or when you call the Execute method. The specified SQL command, table, or stored procedure overrides the current value of the provider’s associated dataset.

If the SQL statement takes parameters, be sure that they are in the correct order, as the provider performs parameter binding on CommandText statements by index only.


TCustomClientDataSet.ConnectionBroker
 VCL Reference

TCustomClientDataSet.ConnectionBroker

TCustomClientDataSet	See also

Specifies a connection broker that handles the connection to an application server.

property ConnectionBroker: TConnectionBroker;

Description

Use ConnectionBroker to let a connection broker handle the connection to the server that supplies the client dataset with data. The connection broker specified by ConnectionBroker simply sets the RemoteServer property to the value of its Connection property.

ConnectionBroker adds an extra layer of indirection to the specification of a connection component. This can make it easier to change the component you use to connect to an application server. If you have several client datasets in an application that all use the same connection broker, then you can change the component that connects them all to the application server by changing a single property (the Connection property of the connection broker) rather than having to change the RemoteServer property for every client dataset in the application.


TCustomClientDataSet.Data
 VCL Reference

TCustomClientDataSet.Data

TCustomClientDataSet	See also	Example

Represents the data of the client dataset in a transportable format.

property Data: OleVariant;

Description

Data represents the client dataset’s local, in-memory copy of its data, encoded as a data packet. This is the data in the binary format used internally by the client dataset.

This data packet can originate from a provider, a file on disk, or the Data property of another client data set.

Note:	To obtain a copy of the client dataset’s data as an XML data packet instead of in a binary format, use the XMLData property.


TCustomClientDataSet.DataSetField
 VCL Reference

TCustomClientDataSet.DataSetField

TCustomClientDataSet	See also

Indicates the TDataSetField component that represents this client dataset.

property DataSetField: TDataSetField;

Description

Use DataSetField when the client dataset is the nested detail set of another (master) client dataset. Read DataSetField to access the data set field component in the master dataset that comprises this client dataset. Set DataSetField to a field component in the master dataset to assign this client dataset as the value of that field component.

When setting DataSetField, the ProviderName, RemoteServer, and FileName properties of the client dataset are cleared. This is because the client dataset’s data is now maintained by the master table in which it is nested.

Note:	The master dataset that includes the TDataSetField component must be another client dataset. Otherwise, setting DataSetField raises an exception. Further, setting DataSetField to a TDataSetField that is contained in the same client dataset leads to an exception (A dataset can’t be nested in itself).


TCustomClientDataSet.DataSize
 VCL Reference

TCustomClientDataSet.DataSize

TCustomClientDataSet	See also

Indicates the number of bytes required to represent the Data property.

property DataSize: Integer;

Description

Read DataSize to determine the number of bytes required for storing the client dataset’s data. For example, before streaming the Data property to a fixed size buffer using the SaveToStream method, read DataSize to determine the necessary size of that buffer.


TCustomClientDataSet.DataSource
 VCL Reference

TCustomClientDataSet.DataSource

TCustomClientDataSet	See also

Indicates the data source when the client dataset is the detail table in a master/detail relationship.

property DataSource: TDataSource;

Description

DataSource is a read-only version of the MasterSource property.

Note:	DataSource (or MasterSource) are used when creating traditional linked master/detail relationships. To use the client dataset as a nested detail set instead of a separate linked detail, use the DataSetField property instead.


TCustomClientDataSet.Delta
 VCL Reference

TCustomClientDataSet.Delta

TCustomClientDataSet	See also

Represents a packet of change log data

property Delta: OleVariant;

Description

Use Delta to pass a packet of change log data from the client dataset to a provider. Delta contains only information about those records inserted, modified, or deleted through the client.

When the client dataset is linked to a provider, Delta is passed as an argument to the ApplyUpdates and Reconcile methods, which use the information in the change log to update the database. On return from successful application of updates, Delta is cleared. If update errors occur, the value of Delta after applying updates depends on the error tolerance allowed by the client dataset. This value is

All change log data when the maximum number of tolerated errors is encountered and all changes are rolled back.

Only those changes that could not be applied when fewer errors occurred than the maximum specified as a tolerance level.

In file-based applications, Delta is cleared when the changes are merged into the Data property using the MergeChangeLog method.


TCustomClientDataSet.DisableStringTrim
 VCL Reference

TCustomClientDataSet.DisableStringTrim

TCustomClientDataSet

Specifies whether trailing spaces are trimmed from field values when records are posted.

property DisableStringTrim: Boolean;

Description

When DisableStringTrim is False, trailing spaces are trimmed from field values when records are posted. When DisableStringTrim is True, field values are posted exactly as typed, including any trailing spaces.


TCustomClientDataSet.DSBase
 VCL Reference

TCustomClientDataSet.DSBase

TCustomClientDataSet	See also

Specifies the interface the client dataset uses to communicate with classes in Midas.dll or Midaslib.dcu.

property DSBase: IDSBase;

Description

Applications do not use the protected DSBase property. Client datasets use this interface internally to implement database operations.


TCustomClientDataSet.DSCursor
 VCL Reference

TCustomClientDataSet.DSCursor

TCustomClientDataSet	See also

Provides access to the interface for the client dataset’s data cursor.

property DSCursor: IDSCursor;

Description

Applications do not use the protected DSCursor property. Client datasets obtain this interface when the Active property is set to True. They use the interface for navigating, posting edits, filtering records, and so on.


TCustomClientDataSet.FetchOnDemand
 VCL Reference

TCustomClientDataSet.FetchOnDemand

TCustomClientDataSet	See also	Example

Indicates whether to fetch data packets from the provider on an as-needed basis.

property FetchOnDemand: Boolean;

Description

By default FetchOnDemand is True, meaning that the client dataset fetches additional packets of data as needed (for example, as a user scrolls through data, or conducts a search). If the provider does not automatically include BLOB fields or nested detail sets in data packets, setting FetchOnDemand to True causes the client dataset to fetch these values when needed as well.

Set FetchOnDemand to False only if your application contains code that explicitly fetches data packets as needed using the GetNextPacket method. Similarly, if FetchOnDemand is False and the provider does not include BLOB data by default (Options includes poFetchBlobsOnDemand), the application must fetch BLOB fields explicitly using the FetchBlobs method. If the provider does not include nested detail sets (Options includes poFetchDetailsOnDemand) and FetchOnDemand is False, the application must fetch nested details explicitly using the FetchDetails method.


TCustomClientDataSet.FileName
 VCL Reference

TCustomClientDataSet.FileName

TCustomClientDataSet	See also

Specifies a file that stores the data of the client dataset.

property FileName: string;

Description

Set FileName if the client dataset always reads its data from and writes its data to a single file. When FileName represents a valid file name, the client dataset automatically writes its data to that file when it is closed. When FileName specifies the name of an existing file, the client dataset automatically reads its data from that file when it is opened.

Changes are not merged into the data when it is saved to the file. This allows an application that employs the “briefcase” model to set FileName without losing updates that are destined for a database server. Single-tiered applications should explicitly merge changes before closing the dataset and saving the data to disk.

Note:	When client datasets write their data to a file, they overwrite the contents of the file. Any previous contents of the file are lost.

To read from or write to a different file, use the LoadFromFile and SaveToFile methods instead. These methods can also be used to load and save data at times other than when the Active property changes.


TCustomClientDataSet.Filter
 VCL Reference

TCustomClientDataSet.Filter

TCustomClientDataSet	See also

Specifies the text of the current filter.

property Filter: string;

Description

Use Filter to specify a dataset filter. When filtering is applied to a client dataset, only those records that meet a filter’s conditions are available to an application. Filter contains the string that describes the filter condition. See Limiting what records appear for a complete list of available filter operations.


TCustomClientDataSet.GroupingLevel
 VCL Reference

TCustomClientDataSet.GroupingLevel

TCustomClientDataSet	See also

Indicates the depth of grouping support provided by the current index.

property GroupingLevel: Integer;

Description

Read GroupingLevel to determine the maximum level group for which grouping support is available. Client datasets provide grouping support in two ways:

The GetGroupState method indicates where the current record falls within a group.

The ActiveAggs property provides summary information over all the records in a group.

A group is defined as the set of records that have the same value on each of a set of fields. A level 0 group is the set of all records in the client dataset. A level 1 group is the set of records with the same value on the first field of the index. A level 2 group is the set of records with the same values on each of the first two fields of the index. A level n group is the set of records with the same values on each of the first n fields of the index.

By default, GroupingLevel is the default grouping level of the current index or the maximum grouping level of a maintained aggregate on the current index, whichever is greater. GroupingLevel can never be greater than IndexFieldCount.


TCustomClientDataSet.HasAppServer
 VCL Reference

TCustomClientDataSet.HasAppServer

TCustomClientDataSet	See also

Indicates whether the client dataset is connected to a provider.

property HasAppServer: Boolean;

Description

Read HasAppServer to determine whether the client dataset gets its data from an IAppServer interface. When HasAppServer is True, the client can interact with an internal provider, a local provider in the same process space, or a provider on a remote application server using the IAppServer interface.

Use HasAppServer to check whether the client dataset is connected rather than reading the AppServer property. Reading AppServer causes the client dataset to establish a connection and obtain an IAppServer interface if it does not already have one.


TCustomClientDataSet.IndexDefs
 VCL Reference

TCustomClientDataSet.IndexDefs

TCustomClientDataSet	See also 	Example

Contains information about the indexes for a client dataset.

property IndexDefs: TIndexDefs;

Description

Examine IndexDefs for index information. IndexDefs maintains an array of TIndexDef items, each of which describes an available index for the dataset. Set the value of IndexDefs before calling CreateDataSet to create a set of indexes with the client dataset.

Note:	The index items in IndexDefs may not always reflect the current indexes available for a dataset. Before examining IndexDefs, call the IndexDefs.Update method to refresh the item list.


TCustomClientDataSet.IndexFieldCount
 VCL Reference

TCustomClientDataSet.IndexFieldCount

TCustomClientDataSet	See also 	Example

Indicates the number of fields that make up the current index.

property IndexFieldCount: Integer;

Description

Check IndexFieldCount to determine how many fields are used by the current index for the dataset.


TCustomClientDataSet.IndexFieldNames
 VCL Reference

TCustomClientDataSet.IndexFieldNames

TCustomClientDataSet	See also

Lists the fields to use as an index.

property IndexFieldNames: string;

Description

Use IndexFieldNames as an alternative method of specifying the index to use for a client dataset. Specify the name of each field on which to index the dataset, separating names with semicolons. Ordering of field names is significant.

Indexes added using IndexFieldNames do not support grouping or maintained aggregates.

Tip:	Use IndexFieldNames to create sort orders on the fly at runtime.

Note:	The IndexFieldNames and IndexName properties are mutually exclusive. Setting one clears the other.


TCustomClientDataSet.IndexFields
 VCL Reference

TCustomClientDataSet.IndexFields

TCustomClientDataSet	See also 	Example

Specifies the fields associated with the current index.

property IndexFields[Index: Integer]: TField;

Description

IndexFields is a zero-based array of field objects, each of which corresponds to a field in the current index. Index is an ordinal value indicating the position of a field in the index. The first field in the index is IndexFields[0], the second is IndexFields[1], and so on.

Note:	Do not set IndexField directly. Instead use the IndexFieldNames property to order datasets on the fly at runtime.


TCustomClientDataSet.IndexName
 VCL Reference

TCustomClientDataSet.IndexName

TCustomClientDataSet	See also 	Example

Identifies an index for the client dataset.

property IndexName: string;

Description

Use IndexName to specify an alternative index for a client dataset.If IndexName is empty, the dataset’s sort order is based on the IndexFieldNames property or on its default ordering in the data packet. Default ordering is determined by the predefined index, DEFAULT_ORDER.

If IndexName contains a valid index name, then that index is used to determine sort order of records.

Note:	IndexFieldNames and IndexName are mutually exclusive. Setting one clears the other.


TCustomClientDataSet.KeyExclusive
 VCL Reference

TCustomClientDataSet.KeyExclusive

TCustomClientDataSet	See also

Specifies the upper and lower boundaries for a range.

property KeyExclusive: Boolean;

Description

Use KeyExclusive to specify whether a range includes or excludes the records that match its specified starting and ending values. By default, KeyExclusive is False, meaning that matching values are included.

To restrict a range to those records that are greater than the specified starting value and less than the specified ending value, set KeyExclusive to True.


TCustomClientDataSet.KeyFieldCount
 VCL Reference

TCustomClientDataSet.KeyFieldCount

TCustomClientDataSet	See also

Specifies the number of fields to use when conducting a partial key search on a multi-field key.

property KeyFieldCount: Integer;

Description

Use KeyFieldCount to limit a search based on a multi-field key to a consecutive subset of the fields in that key. For example, if the primary key for a dataset consists of three-fields, a partial-key search can be conducted using only the first field in the key by setting KeyFieldCount to 1. Setting KeyFieldCount to 0 allows the client dataset to search on all key fields.

Note:	Searches are only conducted based on consecutive key fields beginning with the first field in the key. For example if a key consists of three fields, an application can set KeyFieldCount to 1 to search on the first field, 2 to search on the first and second fields, or 3 to search on all fields. By default KeyFieldCount is initially set to include all fields in a search.


TCustomClientDataSet.KeySize
 VCL Reference

TCustomClientDataSet.KeySize

TCustomClientDataSet	See also

Indicates the size of the current key used for the dataset.

property KeySize: Word;

Description

Examine KeySize to determine the size of the current key used for the client dataset. KeySize corresponds to the size of the key fields in the primary index for the dataset.


TCustomClientDataSet.LogChanges
 VCL Reference

TCustomClientDataSet.LogChanges

TCustomClientDataSet	See also

Indicates whether to maintain a change log separate from the data.

property LogChanges: Boolean;

Description

Use LogChanges to control whether changes made to the data in a client dataset are recorded. When LogChanges is True (the default), all changes are recorded in the Delta property. They can later be applied to a database or source dataset, backed out, or merged into the Data property. When LogChanges is False, data changes are made directly to the Data property and cannot be applied to a database or source dataset via a provider.

Warning:	Never set LogChanges to False if the client dataset uses an internal provider unless the data is read-only. Setting LogChanges to False results in a client dataset that can’t apply updates.

Tip:	When using a client dataset in a file-based application where data changes made by the application are never applied to another dataset, set LogChanges to False to conserve system resources.


TCustomClientDataSet.MasterFields
 VCL Reference

TCustomClientDataSet.MasterFields

TCustomClientDataSet	See also

Names one or more fields in a master table to link with corresponding fields in this dataset in order to establish a master-detail relationship.

property MasterFields: string;

Description

Use MasterFields after setting the MasterSource property to specify the names of one or more fields to use in establishing a detail-master relationship between this dataset and the one specified in MasterSource.

MasterFields is a string containing one or more field names in the master table. Separate field names with semicolons.

Each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this dataset for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two datasets.


TCustomClientDataSet.MasterSource
 VCL Reference

TCustomClientDataSet.MasterSource

TCustomClientDataSet	See also

Specifies a data source component for the master dataset when establishing a detail-master relationship between this dataset and another one.

property MasterSource: TDataSource;

Description

Use MasterSource to specify the name of the data source component whose DataSet property identifies a dataset to use as a master table in establishing a detail-master relationship between this dataset and another one.

At design time choose an available data source from the MasterSource property’s drop-down list in the Object Inspector.

After setting the MasterSource property, specify which fields to use in the master table by setting the MasterFields property. At runtime each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this dataset for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two datasets.

Tip:	MasterSource establishes a master/detail relationship using the traditional linked cursor approach. Alternately, client datasets can participate in master/detail relationships using nested datasets, where the detail dataset is stored with the master table’s data. To assign a client dataset’s data as the value of a nested detail, use the DataSetField property.


TCustomClientDataSet.PacketRecords
 VCL Reference

TCustomClientDataSet.PacketRecords

TCustomClientDataSet	See also

Indicates the number or type of records in a single data packet.

property PacketRecords: Integer;

Description

Use PacketRecords to specify how many records should be contained in a single packet fetched from a provider, or to indicate that the packet returned should contain only metadata.

When a client dataset is instantiated, PacketRecords is automatically set to -1, meaning that a single packet should contain all records in the dataset.

If PacketRecords is greater than zero, then it specifies the number of records to return in a packet.

To retrieve the metadata for a dataset, set PacketRecords to 0. When PacketRecords is zero, the provider returns only information from its dataset that defines the database’s structure, such as table, column, constraint, and domain definitions.

Warning:	When PacketRecords is greater than 0, the client dataset must fetch its data incrementally. If the provider is on a stateless application server, the client dataset must inform the provider where to start fetching data. This communication can occur using a BeforeGetRecords event handler.


TCustomClientDataSet.Params
 VCL Reference

TCustomClientDataSet.Params

TCustomClientDataSet	See also

Contains parameter values that are sent to the provider.

property Params: TParams;

Description

Use Params to specify parameter values that the provider should pass to a source dataset. If the client dataset uses an internal provider, Params represents the values for any parameters used by the SQL statement specified by the CommandText property. If the client dataset uses an external provider that is associated with a dataset that represents a query or stored procedure, these parameter values supply input parameter values for that query or stored procedure and return any output parameters of a stored procedure. If the provider is associated with a TTable or TSQLTable component, Params limits  the records that are sent in data packets. After specifying the parameters (at design time or runtime), they are sent to the provider automatically when the client dataset fetches data or executes a query or stored procedure using its Execute method.

To send parameter values to a query or stored procedure, for every parameter on the query or stored procedure for which the client dataset should send a value, add a parameter object (TParam) to Params. Assign each parameter object the same Name, DataType, and ParamType as the corresponding parameter on the query or stored procedure. These values are automatically encoded and sent to the provider when the client dataset fetches data.

To send parameter values to a TTable or TSQLTable, add a parameter object for each field in the table that is used to limit the values sent in data packets. Assign each parameter object the same Name and DataType as the corresponding field component on the table. These parameter values are automatically sent when the client dataset fetches data, and the records returned in data packets from the provider only contain records that match the assigned value on the corresponding fields. You can achieve the same affect by applying a filter to the field, but using Params is more efficient because the data need not be included in data packets.

Note:	To initialize Params so that it reflects the parameters of a provider’s associated query or stored procedure, call the FetchParams method.

Warning:	The parameters are only applied to the provider when a query or stored procedure is run the first time the client dataset fetches records. To change parameter values and force a query or stored procedure to be rerun with new values, use the Execute method.


TCustomClientDataSet.ProviderEOF
 VCL Reference

TCustomClientDataSet.ProviderEOF

TCustomClientDataSet	See also

Indicates whether the client dataset has all of its data.

property ProviderEOF: Boolean;

Description

ProviderEOF is used internally to check whether an associated provider has supplied the client dataset with its last record. If the client dataset fetches its data from a file or represents a nested detail datset, ProviderEOF is always True. If the client dataset fetches its data from a provider, it sets ProviderEOF to True when it is certain that it has fetched the last data packet from the provider.

Note:	When ProviderEOF is False, it is possible that the provider has supplied the last record but the client dataset has not yet tried to obtain the next record. That is, when ProviderEOF is True, there is definitely no need to fetch more records, but when ProviderEOF is False, it is uncertain.


TCustomClientDataSet.ProviderName
 VCL Reference

TCustomClientDataSet.ProviderName

TCustomClientDataSet	See also

Specifies the name of a provider component that supplies data to and applies updates from the client dataset..

property ProviderName: string;

Description

Use ProviderName to specify an external provider object that links the client dataset to another (source) dataset or to an XML document. This property is passed as a parameter to IAppServer interface calls when the client fetches data from or applies updates to the source dataset, its database server, or the source XML document.

The provider specified by ProviderName can reside in the same application as the client dataset or in an application server running on another system.

If the provider is in the same application as the client dataset, it must have the same Owner as the client dataset. To use a local provider that has a different Owner, use the SetProvider method instead.

If the provider is on a remote application server, it must be exported by that application server. If the application server contains multiple provider objects, you can set ProviderName to any of them once the client dataset establishes an initial connection to the application server through its RemoteServer property. If the connection component is a Web connection or socket connection, or if the application server is registered on the client system (using TRegsvr.exe), ProviderName can be set from a drop-down in the Object Inspector once the RemoteServer property is set.


TCustomClientDataSet.ReadOnly
 VCL Reference

TCustomClientDataSet.ReadOnly

TCustomClientDataSet	See also

Specifies whether the client dataset is read-only for this application.

property ReadOnly: Boolean;

Description

Use the ReadOnly property to prevent users from updating, inserting, or deleting data in the dataset. By default, ReadOnly is False, meaning users can potentially alter the dataset’s data.

To guarantee that users cannot modify or add data to a dataset, set ReadOnly to True.

When ReadOnly is True, the dataset’s CanModify property is False.

Note:	Even if ReadOnly is False, users may not be able to modify or add data to a client dataset if it gets its data from a provider. The provider’s Options property can limit whether data can be edited, and if so, what types of edits are allowed.


TCustomClientDataSet.RecNo
 VCL Reference

TCustomClientDataSet.RecNo

TCustomClientDataSet	See also

Indicates the current record in the dataset.

property RecNo: Integer;

Description

Examine RecNo to determine the record number of the current record in the dataset. Set RecNo to change the current record to a record specified by its sequential position.


TCustomClientDataSet.RecordCount
 VCL Reference

TCustomClientDataSet.RecordCount

TCustomClientDataSet	See also

Indicates the total number of records in the dataset.

property RecordCount: Integer;

Description

Examine RecordCount to determine the total number of records currently in the dataset. If the PacketRecords property is greater than 0, the value for RecordCount may change as a user scrolls through the data and additional data packets are fetched from the provider.

Applications can use this property with RecNo to iterate through all the records in a dataset, though typically record iteration is handled with calls to First, Last, MoveBy, and Prior.


TCustomClientDataSet.RecordSize
 VCL Reference

TCustomClientDataSet.RecordSize

TCustomClientDataSet	See also

Indicates the size of a record in the dataset.

property RecordSize: Word;

Description

Examine RecordSize to determine the physical size, in bytes, of the buffer allocated to hold a record in the dataset. When a dataset is opened, the Open procedure requests record-buffer size information and stores the returned information in RecordSize. Client datasets use this information internally. Applications seldom, if ever, require this information.


TCustomClientDataSet.RemoteServer
 VCL Reference

TCustomClientDataSet.RemoteServer

TCustomClientDataSet	See also

Specifies the connection component that this client dataset uses to connect to an application server.

property RemoteServer: TCustomRemoteServer;

Description

If the client dataset is in the client portion of a multi-tiered application, use RemoteServer to specify the connection component that connects to the application server. The connection component locates the application server and obtains its IAppServer interface, which the client dataset can use for communicating with a remote provider.

Although it is not required, you can also set RemoteServer to a TLocalConnection component when working with a provider that resides in the same application.

If a client application uses more than connection component, the application can change which connection a client dataset uses by changing the value for this property.

Tip:	If you have several client datasets that all use the same connection component and you think you may change the connection component later (for example, to change the protocol), you can use the ConnectionBroker property to centralize the connection.


TCustomClientDataSet.SavePoint
 VCL Reference

TCustomClientDataSet.SavePoint

TCustomClientDataSet	See also

Represents the current state of edits when logging changes.

property SavePoint: Integer;

Description

Use SavePoint to save and later revert to an editing state. SavePoint is an integer that represents the current state of the change log. To use SavePoint to roll back the changes in the change log to an earlier state, set SavePoint to the value it had before the changes that should be rolled back.

Thus, when the client dataset is in a state you may want to return to, assign SavePoint to a variable:

BeforeChanges := ClientDataSet1.SavePoint;

Later, to roll back all edits that were made since that point, assign the variable to SavePoint:

ClientDataSet1.SavePoint := BeforeChanges;

Warning:	Client datasets can’t return to a SavePoint once the change log has been backed out to a prior state. This includes undoing changes by setting SavePoint to a previously saved value, backing out too many changes using the RevertRecord method, or clearing the change log using CancelUpdates. Trying to set SavePoint to a state that is no longer available in the change log raises an exception.


TCustomClientDataSet.StatusFilter
 VCL Reference

TCustomClientDataSet.StatusFilter

TCustomClientDataSet	See also

Filters the client dataset so that it exposes only those records with a specific update status.

TUpdateStatusSet = set ofTUpdateStatus;

property StatusFilter: TUpdateStatusSet;

Description

Use StatusFilter to limit the client dataset to records that represent a specific update status. This can be useful when processing updates in a provider’s event handlers (or, if the client dataset has an internal provider, in its own BeforeUpdateRecord event handler).

StatusFilter is a set of TUpdateStatus values. It can indicate more than one type of update. If StatusFilter is an empty set (the default), the client dataset appears as if all updates in the change log have been incorporated.

Note:	 Including usUnmodified in StatusFilter has no effect.


TCustomClientDataSet.StoreDefs
 VCL Reference

TCustomClientDataSet.StoreDefs

TCustomClientDataSet	See also

Indicates whether field and index definitions are saved with the client dataset.

property StoreDefs: Boolean;

Description

If StoreDefs is True, the client dataset’s index and field definitions are stored with the client dataset when the form or data module that contains it is saved. Setting StoreDefs to True makes the CreateDataSet method into a one-step procedure that creates fields and indexes at runtime.


TCustomClientDataSet.XMLData
 VCL Reference

TCustomClientDataSet.XMLData

TCustomClientDataSet	See also

Represents the data of the client dataset in XML.

property XMLData: OleVariant;

Description

XMLData represents the client dataset’s local, in-memory copy of its data, encoded as an XML data packet. This is the same as the Data property, except that the data is represented in XML rather than the binary format used internally by the client dataset.


 VCL Reference

TCustomClientDataSet events

TCustomClientDataSet	Alphabetically	Legend

In TCustomClientDataSet

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError


 VCL Reference

TCustomClientDataSet events

TCustomClientDataSet	By object	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnReconcileError


TCustomClientDataSet.AfterApplyUpdates
 VCL Reference

TCustomClientDataSet.AfterApplyUpdates

TCustomClientDataSet	See also

Occurs after the client dataset applies updates to the provider but before it attempts to reconcile update errors.

property AfterApplyUpdates: TRemoteEvent;

Description

Write an AfterApplyUpdates event handler to respond to custom information returned to the client dataset from a provider’s AfterApplyUpdates event handler. AfterApplyUpdates is part of the mechanism by which a client dataset and a provider communicate information about updates. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s ApplyUpdates method, the following events occur:

1.	The client dataset receives a BeforeApplyUpdates event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeApplyUpdates event, where it can respond to or change that information before it applies the updates.

3.	The provider applies the updates, and receives an OnUpdateError event for any problem records.

4.	The provider receives an AfterApplyUpdates event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeApplyUpdates event handler.

5.	The client dataset receives an AfterApplyUpdates event, where it can respond to the custom information returned by the provider in its AfterApplyUpdates event handler.

6.	The client dataset generates an OnReconcileError for every record that could not be applied by the provider.


TCustomClientDataSet.AfterExecute
 VCL Reference

TCustomClientDataSet.AfterExecute

TCustomClientDataSet	See also

Occurs after the client dataset receives the results from an execute command.

property AfterExecute: TRemoteEvent;

Description

Write an AfterExecute event handler to respond to custom information returned to the client dataset from a provider’s AfterExecute event handler. AfterExecute is part of the mechanism by which a client dataset and a provider communicate information when executing an SQL command from the client. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s Execute method, the following events occur:

1.	The client dataset receives a BeforeExecute event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeExecute event, where it can respond to or change that information before it executes the query or stored procedure.

3.	The provider executes the appropriate command (either the command supplied by the CommandText property, or the command associated with a dataset such as a query or stored procedure).

4.	The provider receives an AfterExecute event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeExecute event handler.

5.	The client dataset unpacks any output parameters from the provider into the Params property and then receives an AfterExecute event, where it can respond to the custom information returned by the provider’s AfterExecute event handler.


TCustomClientDataSet.AfterGetParams
 VCL Reference

TCustomClientDataSet.AfterGetParams

TCustomClientDataSet	See also

Occurs after the client dataset receives parameter values from the provider.

property AfterGetParams: TRemoteEvent;

Description

Write an AfterGetParams event handler to respond to custom information returned to the client dataset from a provider’s AfterGetParams event handler. AfterGetParams is part of the mechanism by which a client dataset and a provider communicate information when the client application calls FetchParams. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s FetchParams method, the following events occur:

1.	The client dataset receives a BeforeGetParams event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeGetParams event, where it can respond to or change that information before it retrieves parameter values.

3.	The provider encodes all of its dataset’s current parameter values into an OleVariant.

4.	The provider receives an AfterGetParams event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetParams event handler.

5.	The client dataset unpacks the parameters from the provider into the Params property and then receives an AfterGetParams event, where it can respond to the custom information returned by the provider’s AfterGetParams event handler.


TCustomClientDataSet.AfterGetRecords
 VCL Reference

TCustomClientDataSet.AfterGetRecords

TCustomClientDataSet	See also

Occurs after the client dataset fetches a data packet from the provider.

property AfterGetRecords: TRemoteEvent;

Description

Write an AfterGetRecords event handler to respond to custom information returned to the client dataset from a provider’s AfterGetRecords event handler. AfterGetRecords is part of the mechanism by which a client dataset and a provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the client dataset fetches data from the application server, the following events occur:

1.	The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeGetRecords event, where it can respond to or change that information before it creates a data packet.

3.	The provider generates an OnGetData event where it can edit the data before creating a data packet, and then generates the data packet.

4.	The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.

5.	The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider’s AfterGetRecords event handler.


TCustomClientDataSet.AfterRowRequest
 VCL Reference

TCustomClientDataSet.AfterRowRequest

TCustomClientDataSet	See also

Occurs after the client dataset fetches new information about the current record.

property AfterRowRequest: TRemoteEvent;

Description

Write an AfterRowRequest event handler to respond to custom information returned to the client dataset from a provider’s AfterRowRequest event handler. AfterRowRequest is part of the mechanism by which a client dataset and a provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the client dataset fetches detail information about the current record or refreshes the current record, the following events occur:

1.	The client dataset receives a BeforeRowRequest event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeRowRequest event, where it can respond to or change that information before it looks up the requested information.

3.	The provider creates a delta packet that contains the requested information.

4.	The provider receives an AfterRowRequest event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeRowRequest event handler.

5.	The client dataset receives an AfterRowRequest event, where it can respond to the custom information returned by the provider’s AfterRowRequest event handler.


TCustomClientDataSet.BeforeApplyUpdates
 VCL Reference

TCustomClientDataSet.BeforeApplyUpdates

TCustomClientDataSet	See also

Occurs before the client dataset applies updates to the remote server.

property BeforeApplyUpdates: TRemoteEvent;

Description

Write a BeforeApplyUpdates event handler to send custom information to the client dataset’s provider. BeforeApplyUpdates is part of the mechanism by which a client dataset and a provider communicate information about updates. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s ApplyUpdates method, the following events occur:

1.	The client dataset receives a BeforeApplyUpdates event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeApplyUpdates event, where it can respond to or change that information before it applies the updates.

3.	The provider applies the updates and receives an OnUpdateError event for any problem records.

4.	The provider receives an AfterApplyUpdates event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeApplyUpdates event handler.

5.	The client dataset receives an AfterApplyUpdates event, where it can respond to the custom information returned by the provider’s AfterApplyUpdates event handler.


TCustomClientDataSet.BeforeExecute
 VCL Reference

TCustomClientDataSet.BeforeExecute

TCustomClientDataSet	See also

Occurs before the client dataset executes the provider’s query or stored procedure.

property BeforeExecute: TRemoteEvent;

Description

Write a BeforeExecute event handler to send custom information to the client dataset’s provider. BeforeExecute is part of the mechanism by which a client dataset and a provider communicate information when explicitly executing an SQL command by the provider’s dataset. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s Execute method, the following events occur:

1.	The client dataset receives a BeforeExecute event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeExecute event, where it can respond to or change that information before it executes the query or stored procedure.

3.	The provider executes the appropriate command (either the command supplied by the CommandText property, or the command associated with a dataset such as a query or stored procedure).

4.	The provider receives an AfterExecute event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeExecute event handler.

5.	The client dataset unpacks any output parameters from the provider into the Params property and then receives an AfterExecute event, where it can respond to the custom information returned by the provider’s AfterExecute event handler.


TCustomClientDataSet.BeforeGetParams
 VCL Reference

TCustomClientDataSet.BeforeGetParams

TCustomClientDataSet	See also

Occurs before the client dataset fetches parameter values from the provider.

property BeforeGetParams: TRemoteEvent;

Description

Write a BeforeGetParams event handler to send custom information to the client dataset’s provider. BeforeGetparams is part of the mechanism by which a client dataset and a provider communicate information when passing parameter values from the provider’s dataset. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the application calls the client dataset’s FetchParams method, the following events occur:

1.	The client dataset receives a BeforeGetParams event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeGetParams event, where it can respond to or change that information before it retrieves parameter values.

3.	The provider encodes all of its dataset’s current parameter values into an OleVariant.

4.	The provider receives an AfterGetParams event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetParams event handler.

5.	The client dataset unpacks the parameters from the provider into the Params property and then receives an AfterGetParams event, where it can respond to the custom information returned by the provider’s AfterGetParams event handler.


TCustomClientDataSet.BeforeGetRecords
 VCL Reference

TCustomClientDataSet.BeforeGetRecords

TCustomClientDataSet	See also	Example

Occurs before the client dataset fetches a data packet from the provider.

property BeforeGetRecords: TRemoteEvent;

Description

Write a BeforeGetRecords event handler to send custom information to the client dataset’s provider. BeforeGetRecords is part of the mechanism by which a client dataset and a provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the client dataset fetches data from the application server, the following events occur:

1.	The client dataset receives a BeforeGetRecords event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider receives a BeforeGetRecords event, where it can respond to or change that information before it creates a data packet.

3.	The provider generates the data packet.

4.	The provider receives an AfterGetRecords event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeGetRecords event handler.

5.	The client dataset receives an AfterGetRecords event, where it can respond to the custom information returned by the provider’s AfterGetRecords event handler.


TCustomClientDataSet.BeforeRowRequest
 VCL Reference

TCustomClientDataSet.BeforeRowRequest

TCustomClientDataSet	See also

Occurs before the client dataset fetches new information about the current record.

property BeforeRowRequest: TRemoteEvent;

Description

Write a BeforeRowRequest event handler to send custom information to the client dataset’s provider. BeforeRowRequest is part of the mechanism by which a client dataset and a provider communicate information about data fetching. When working with a provider on a stateless application server, this mechanism allows the client dataset and the provider to communicate persistent state information.

When the client dataset fetches detail information about the current record or refreshes the current record, the following events occur:

1.	The client dataset receives a BeforeRowRequest event, where it can encode custom information into an OleVariant that is passed to the provider as the OwnerData parameter.

2.	The provider on the application server receives a BeforeRowRequest event, where it can respond to or change that information before it looks up the requested information.

3.	The provider creates a delta packet that contains the requested information.

4.	The provider receives an AfterRowRequest event, where it can encode custom information into its OwnerData parameter or respond to information from the BeforeRowRequest event handler.

5.	The client dataset receives an AfterRowRequest event, where it can respond to the custom information returned by the provider’s AfterRowRequest event handler.


TCustomClientDataSet.OnReconcileError
 VCL Reference

TCustomClientDataSet.OnReconcileError

TCustomClientDataSet	See also	Example

Occurs when a client dataset needs to reconcile an update to a record that could not be applied.

type

  TReconcileErrorEvent = procedure(DataSet: TCustomClientDataSet; E: EReconcileError; UpdateKind: TUpdateKind; var Action: TReconcileAction) of object;

property OnReconcileError: TReconcileErrorEvent;

Description

Write an OnReconcileError event handler to respond to error conditions that arise when the Reconcile method cycles through records that could not be applied to the database. This event handles only those update errors that were not handled in an OnUpdateError event handler.

The OnReconcileError event handler is called once for each record that could not be applied to the dataset or handled by the provider.

Warning:	A provider can’t detect when an update conflicts with another user’s changes to a memo field. This situation does not generate an OnReconcileError event.

DataSet is a client dataset that contains the record that generated an update error. If the error occurred while updating a nested detail dataset in a master/detail relationship, DataSet represents the detail dataset although the event occurs on the master dataset. Do not use any methods that change the current record of DataSet (such as Next or Prior). You can, however, use the NewValue, OldValue, and CurValue properties of DataSet’s fields to obtain more information about the update error.

E is a pointer to an EReconcileError object from which you can extract an error message and the cause of the error condition. An OnReconcileError handler can use this information to determine how to respond to the error condition.

UpdateKind describes the type of update (insertion, deletion, or modification) that generated the error.

Action indicates the action to take when the OnReconcileError handler exits. If OnReconcileError can handle or correct the error, set Action to raCorrect before exiting the error handler.


 VCL Reference

TCustomClientDataSet methods

TCustomClientDataSet	Alphabetically	Legend

In TCustomClientDataSet

AddIndex

AppendData

ApplyRange

ApplyUpdates

BookmarkValid

Cancel

CancelRange

CancelUpdates

CloneCursor

CompareBookmarks

ConstraintsDisabled

Create

CreateBlobStream

CreateDataSet

DataRequest

DeleteIndex

Destroy

DisableConstraints

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

Execute

FetchBlobs

FetchDetails

FetchParams

FindKey

FindNearest

GetCurrentRecord

GetFieldData

GetGroupState

GetIndexInfo

GetIndexNames

GetNextPacket

GetOptionalParam

GotoCurrent

GotoKey

GotoNearest

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

Post

Reconcile

RefreshRecord

RevertRecord

SaveToFile

SaveToStream

SetAltRecBuffers

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

UndoLastChange

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomClientDataSet methods

TCustomClientDataSet	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendData

AppendRecord

ApplyRange

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

CloneCursor

Close

CompareBookmarks

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateDataSet

CursorPosChanged

DataRequest

DefaultHandler

Delete

DeleteIndex

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyDataSet

EnableConstraints

EnableControls

Execute

ExecuteAction

FetchBlobs

FetchDetails

FetchParams

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetGroupState

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNextPacket

GetOptionalParam

GetParentComponent

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

LoadFromFile

LoadFromStream

Locate

Lookup

MergeChangeLog

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

Reconcile

ReferenceInterface

Refresh

RefreshRecord

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SaveToFile

SaveToStream

SetAltRecBuffers

SetFields

SetKey

SetOptionalParam

SetProvider

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UndoLastChange

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TCustomClientDataSet.AddIndex
 VCL Reference

TCustomClientDataSet.AddIndex

TCustomClientDataSet	See also	Example

Creates a new index for the client dataset.

procedure AddIndex(const Name, Fields: string; Options: TIndexOptions; const DescFields: string = ''; const CaseInsFields: string = ''; const GroupingLevel: Integer = 0 );

Description

Call AddIndex to create a new index for the client dataset.

Name is the name of the new index.

Fields is a semicolon-delimited list of the fields to include in the index.Options is a (potentially empty) set that can include up to two TIndexOptions values. The valid members for that set include ixDescending (specifying that the index sorts in descending alphanumeric order) and ixCaseInsensitive (specifying that the index should ignore case when sorting).

Warning:	AddIndex raises an exception if you attempt to create an index that includes any other TIndexOptions values .

DescFields is a semicolon-delimited list of field names. Use DescFields instead of an Options value that includes ixDescending to create an index that is in ascending order on some fields and descending order on others. All fields named in DescFields are sorted in descending order.

CaseInsFields is a semicolon-delimited list of field names. Use CaseInsFields instead of an Options value that includes ixCaseInsensitive to create an index that is case-insensitive on some fields and case-sensitive on others. All fields named in CaseInsFields are sorted without regard to case.

GroupingLevel is the default grouping level supported by the index. When the client dataset uses this index, grouping information is automatically available for subgroups defined by up to GroupingLevel fields in the index. (If the client dataset uses maintained aggregates, information about more deeply nested groups can become available when the aggregates are defined on a grouping level greater than the default value of the index). GroupingLevel can be any value from 0 to the number of fields in the index.

Note:	Indexes added by AddIndex are not saved with data when using SaveToFile. They do not persist when the client dataset is closed. (That is, they are lost when you reopen the client dataset). You can't call AddIndex when the dataset is closed.

Tip:	You can support maintained aggregates using an index added with AddIndex.


TCustomClientDataSet.AppendData
 VCL Reference

TCustomClientDataSet.AppendData

TCustomClientDataSet	See also

Adds a newly fetched packet of records to those already stored in the client dataset.

procedure AppendData(const Data: OleVariant; HitEOF: Boolean);

Description

Use AppendData to add a newly fetched packet of records from a provider to the client dataset. Data indicates the packet of records to add. HitEOF indicates whether the provider encountered the end of the dataset when it fetched the records from the database server.

Most applications call GetNextPacket instead to fetch a packet of records and automatically add them to those already available. Use AppendData when fetching data packets directly from the provider rather than letting the client dataset fetch data.


TCustomClientDataSet.ApplyRange
 VCL Reference

TCustomClientDataSet.ApplyRange

TCustomClientDataSet	See also 	Example

Applies a range to the dataset.

procedure ApplyRange;

Description

Call ApplyRange to cause a range established with SetRangeStart and SetRangeEnd, or EditRangeStart and EditRangeEnd, to take effect. When a range is in effect, only those records that fall within the range are available to the application for viewing and editing.

After a call to ApplyRange, the cursor is left on the first record in the range.


TCustomClientDataSet.ApplyUpdates
 VCL Reference

TCustomClientDataSet.ApplyUpdates

TCustomClientDataSet	See also	Example

Sends all updated, inserted, and deleted records from the client dataset to the provider for writing to the database.

function ApplyUpdates(MaxErrors: Integer); Integer; virtual;

Description

Call ApplyUpdates to write all updated, inserted, and deleted records from the client dataset to the database or source dataset. MaxErrors indicates the maximum number of errors that the provider should allow before prematurely stopping the update operation. Set MaxErrors to –1 to indicate that there is no limit to the number of errors.

ApplyUpdates

1.	Generates a BeforeApplyUpdates event. (This event may not be public on some TCustomClientDataSet descendants.)

2.	Calls the provider to apply the updates in the Delta property and receives any records returned by the provider because they generated errors when it attempted to apply them to the database.

3.	Generates an AfterApplyUpdates event. (This event may not be public on some TCustomClientDataSet descendants.)

4.	Calls the client dataset’s Reconcile method to reconcile any records that are returned in step 2.

Warning:	The provider can’t detect when an update conflicts with another user’s changes to a memo field. The server will not detect and return these conflicts as errors.

ApplyUpdates returns the number of errors it encountered. Based on this return value and the setting of MaxErrors, successfully applied records are removed from the client dataset’s change log. If the update process is aborted before all updates are applied, any unapplied updates remain in the change log.


TCustomClientDataSet.BookmarkValid
 VCL Reference

TCustomClientDataSet.BookmarkValid

TCustomClientDataSet	See also

Tests the validity of a specified bookmark.

function BookmarkValid(Bookmark: TBookmark): Boolean;

Description

Call BookmarkValid to determine if a bookmark is valid. Bookmark is the bookmark pointer to test. If the bookmark is valid, BookmarkValid returns True. Otherwise it returns False.


TCustomClientDataSet.Cancel
 VCL Reference

TCustomClientDataSet.Cancel

TCustomClientDataSet	See also

Cancels unposted changes to the current record.

procedure Cancel; override;

Description

Call Cancel to undo modifications made to one or more fields belonging to the current record. As long as those changes are not already posted to the change log, Cancel returns the record to its previous state, and sets the dataset state to dsBrowse.

Note:	Do not confuse Cancel with the RevertRecord method, which also backs out changes to the current record. Cancel backs out unposted changes while RevertRecord removes changes that have already been posted to the change log.


TCustomClientDataSet.CancelRange
 VCL Reference

TCustomClientDataSet.CancelRange

TCustomClientDataSet	See also

Removes any ranges currently in effect for the client dataset.

procedure CancelRange;

Description

Call CancelRange to remove a range currently applied to a client dataset. Canceling a range reenables access to all records in the dataset.


TCustomClientDataSet.CancelUpdates
 VCL Reference

TCustomClientDataSet.CancelUpdates

TCustomClientDataSet	See also

Clears all pending edits and clears the change log.

procedure CancelUpdates;

Description

Call CancelUpdates to back out all pending updates from the Delta property. Delta is a Variant maintained by the client dataset to record updates, inserts, and deletes.


TCustomClientDataSet.CloneCursor
 VCL Reference

TCustomClientDataSet.CloneCursor

TCustomClientDataSet	See also	Example

Shares the data belonging to another client dataset.

procedure CloneCursor(Source :TCustomClientDataSet; Reset: Boolean; KeepSettings: Boolean = False); virtual;

Description

Call CloneCursor to share the data belonging to another client dataset. Source indicates another client dataset whose data is to be shared.

Reset and KeepSettings determine how to set the values of the following properties and events:

Filter, Filtered, FilterOptions, and OnFilterRecord

IndexName

MasterSource and MasterFields

ReadOnly

RemoteServer and ProviderName

If Reset and KeepSettings are both False, the values of the properties listed above are all set to match the source dataset.

If Reset is True, the properties listed above are all cleared.

If Reset is False and KeepSettings is True, the properties listed above are not changed. In this case, the application must ensure that existing indexes, providers, and so on are compatible with the cloned data.

After calling CloneCursor, the data for the client dataset is the same as the data for Source. Edits performed by either client dataset are reflected in the data of both datasets.

Note:	Because cloned cursors are shared, changing properties that affect the cursor affect both datasets. For example, setting the ReadOnly property of either dataset will make both datasets read-only.


TCustomClientDataSet.CompareBookmarks
 VCL Reference

TCustomClientDataSet.CompareBookmarks

TCustomClientDataSet	See also 	Example

Compares two bookmarks.

function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer;

Description

Call CompareBookmarks to determine if two bookmarks are identical. Bookmark1 and Bookmark2 are the bookmarks to compare. CompareBookmarks returns -1 if Bookmark1 is less than Bookmark2, 1 if Bookmark1 is greater than Bookmark2, and 0 if the bookmarks are identical or nil.


TCustomClientDataSet.ConstraintsDisabled
 VCL Reference

TCustomClientDataSet.ConstraintsDisabled

TCustomClientDataSet	See also

Indicates whether constraints are enabled for a client dataset.

function ConstraintsDisabled: Boolean;

Description

Call ConstraintsDisabled to determine if constraints are currently disabled for a client dataset. If ConstraintsDisabled returns True, constraints are not enforced when edits are posted. If False, constraints are enforced when records are posted.


TCustomClientDataSet.Create
 VCL Reference

TCustomClientDataSet.Create

TCustomClientDataSet	See also

Creates and initializes instance of TCustomClientDataSet.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a client dataset component at runtime. Client datasets added to forms or data modules at design time are created automatically.

AOwner is a component, typically a form or data module, that is responsible for freeing the client dataset.


TCustomClientDataSet.CreateBlobStream
 VCL Reference

TCustomClientDataSet.CreateBlobStream

TCustomClientDataSet	See also 	Example

Returns a TClientBlobStream object for reading or writing the data in a specified blob field.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; override;

Description

Call CreateBlobStream to obtain a stream for reading data from or writing data to a binary large object (BLOB) field. The Field parameter must specify a TBlobField component from the Fields property array. The Mode parameter specifies whether the stream will be used for reading, writing, or updating the contents of the field.

Note:	Calling CreateBlobStream ensures that the current record has fetched its BLOB data if the FetchOnDemand property is True. If FetchOnDemand is False and the provider does not include BLOB data in data packets by default, call FetchBlobs before calling CreateBlobStream.


TCustomClientDataSet.CreateDataSet
 VCL Reference

TCustomClientDataSet.CreateDataSet

TCustomClientDataSet	See also	Example

Creates a new, empty client dataset.

procedure CreateDataSet;

Description

Call CreateDataSet at runtime to create a new, empty client dataset that can then be edited and saved.

If the FieldDefs property contains values, these values are used to create field definitions. Otherwise the Fields property is used. One or both of these properties must contain values in order to create a dataset. If neither property is set, CreateDataSet raises an exception.

If the IndexDefs property contains values, these values are used to create indexes for the dataset. Indexes created from the IndexDefs property are saved with the client dataset when it is saved to a file.

Note:	You can create a dataset at design time as well: Create persistent field components or field definitions. Then right-click the client dataset and select Create Data Set.


TCustomClientDataSet.DataRequest
 VCL Reference

TCustomClientDataSet.DataRequest

TCustomClientDataSet	See also	Example

Generates an OnDataRequest event on the associated provider

function DataRequest(Data: OleVariant): OleVariant; virtual;

Description

Call DataRequest to invoke an OnDataRequest event handler. This method is provided to allow application developers to customize the communication between a client application and an external provider component.

There is no predefined meaning for the Input parameter or the returned value. Instead, the Data parameter provides the input parameter to an OnDataRequest event handler and DataRequest returns the value that that event handler returns.


TCustomClientDataSet.DeleteIndex
 VCL Reference

TCustomClientDataSet.DeleteIndex

TCustomClientDataSet	See also

Deletes an index for the client dataset.

procedure DeleteIndex(const Name: string);

Description

Call DeleteIndex to remove an index for a client dataset. Name is the name of the index to delete.

Note:	You cannot delete the reserved indexes, DEFAULT_ORDER and CHANGEINDEX.


TCustomClientDataSet.Destroy
 VCL Reference

TCustomClientDataSet.Destroy

TCustomClientDataSet	See also

Destroys the instance of a client dataset component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically. If an application creates its own instances of a dataset without assigning an Owner, however, it should call Free, which verifies that the dataset component is not nil before calling Destroy.


TCustomClientDataSet.DisableConstraints
 VCL Reference

TCustomClientDataSet.DisableConstraints

TCustomClientDataSet	See also

Disables the enforcement of constraints.

procedure DisableConstraints;

Description

Call DisableConstraints to prevent, on a temporary basis, enforcement of constraints that have been assigned to the dataset or its fields. For example, when an application iterates through a client dataset, it may improve performance to disable constraints temporarily.

Note:	Calling DisableConstraints increments a reference count. As long as this reference count is greater than zero, constraints are disabled for the dataset. To prevent accidental disabling of constraints, always group a call to DisableConstraints with a call to EnableConstraints.


TCustomClientDataSet.EditKey
 VCL Reference

TCustomClientDataSet.EditKey

TCustomClientDataSet	See also 	Example

Enables modification of the search key buffer.

procedure EditKey;

Description

Call EditKey to put the client dataset in dsSetKey state while preserving the current contents of the current search key buffer. To determine current search keys, you can use the IndexFields property to iterate over the fields used by the current index.

EditKey is especially useful when performing multiple searches where only one or two field values among many change between each search.


TCustomClientDataSet.EditRangeEnd
 VCL Reference

TCustomClientDataSet.EditRangeEnd

TCustomClientDataSet	See also 	Example

Enables changing the ending value for an existing range.

procedure EditRangeEnd;

Description

Call EditRangeEnd to change the ending value for an existing range. To specify an end range value, call FieldByName after calling EditRangeEnd. After assigning a new ending value, call ApplyRange to activate the modified range.


TCustomClientDataSet.EditRangeStart
 VCL Reference

TCustomClientDataSet.EditRangeStart

TCustomClientDataSet	See also 	Example

Enables changing the starting value for an existing range.

procedure EditRangeStart;

Description

Call EditRangeStart to change the starting value for an existing range. To specify a start range value, call FieldByName after calling EditRangeStart. After assigning a new ending value, call ApplyRange to activate the modified range.


TCustomClientDataSet.EmptyDataSet
 VCL Reference

TCustomClientDataSet.EmptyDataSet

TCustomClientDataSet	See also

Removes all records from the dataset.

procedure EmptyDataSet;

Description

Call EmptyDataSet to empty the client dataset.


TCustomClientDataSet.EnableConstraints
 VCL Reference

TCustomClientDataSet.EnableConstraints

TCustomClientDataSet	See also

Reenables enforcement of constraints when records are posted.

procedure EnableConstraints;

Description

Call EnableConstraints to turn on constraints previously disabled by a call to DisableConstraints.

Note:	Calling EnableConstraints decrements a reference count. When this reference count is zero constraints are enabled for the dataset. To prevent accidental disabling of constraints, always follow a call to DisableConstraints with a matching call to EnableConstraints.


TCustomClientDataSet.Execute
 VCL Reference

TCustomClientDataSet.Execute

TCustomClientDataSet	See also

Executes an SQL command by the provider’s dataset.

procedure Execute; virtual;

Description

Execute allows the client dataset to interact with a query or stored procedure that does not generate a result set. Call Execute to execute the command specified by CommandText or the provider’s query or stored procedure. If CommandText is not an empty string and the provider Options allow clients to supply a CommandText value, then Execute passes CommandText to the provider along with the Params property (to supply parameters for the statement). Otherwise, Execute tells the provider to apply any Params and execute its associated query or stored procedure. After executing the appropriate statement, the provider returns any output parameters and Execute updates the Params property to reflect them.

When the application calls Execute, the client dataset receives a BeforeExecute event before the request is passed to the provider component. After the provider executes the query or stored procedure, it returns any output parameters, which are used to update the Params property. Finally, the client dataset receives an AfterExecute event.

Note:	Do not use Execute to execute a query or stored procedure that returns a cursor. Most datasets use separate commands to execute queries or stored procedures when they do or don’t return data. When a provider passes the Execute command on to its dataset, the dataset uses the command for executing queries or stored procedures that don’t return a cursor.


TCustomClientDataSet.FetchBlobs
 VCL Reference

TCustomClientDataSet.FetchBlobs

TCustomClientDataSet	See also

Retrieves BLOB field values from the provider.

procedure FetchBlobs;

Description

Call FetchBlobs to retrieve BLOB field values from a provider when this information is not provided automatically. BLOB field values are automatically included in data packets unless the provider includes poFetchBlobsOnDemand in its Options property. (If the client dataset uses an internal provider, that provider’s Options property is available as the client dataset’s Options property)

There is no need to call FetchBlobs if the provider automatically includes BLOB data or if the client dataset’s FetchOnDemand property is True.


TCustomClientDataSet.FetchDetails
 VCL Reference

TCustomClientDataSet.FetchDetails

TCustomClientDataSet	See also

Retrieves nested detail datasets from the provider.

procedure FetchDetails;

Description

Call FetchDetails to retrieve nested detail sets from a provider when this information is not provided automatically. Nested details are automatically included in data packets unless the provider includes poFetchDetailsOnDemand in its Options property. (If the client dataset uses an internal provider, that provider’s Options property is available as the client dataset’s Options property)

FetchDetails updates the current record to include the missing detail data sets.

There is no need to call FetchDetails if the provider automatically includes nested detail sets or if the client dataset’s FetchOnDemand property is True.


TCustomClientDataSet.FetchParams
 VCL Reference

TCustomClientDataSet.FetchParams

TCustomClientDataSet	See also

Retrieves parameter values from the provider.

function FetchParams;

Description

Call FetchParams to initialize the Params property with the current parameter values on the provider’s dataset. FetchParams does nothing unless the provider’s dataset can supply parameter values.

Note:	At design time, you can fetch parameter values by right-clicking the client dataset and choosing Fetch Params.

Warning:	If the provider is on a stateless application server, the values returned by FetchParams can be changed at any time by other clients. To obtain output parameters from a stateless application server, use the Execute method instead.


TCustomClientDataSet.FindKey
 VCL Reference

TCustomClientDataSet.FindKey

TCustomClientDataSet	See also 	Example

Searches for a record containing specified field values.

function FindKey(const KeyValues: array of const): Boolean; virtual;

Description

Call FindKey to search for a specific record in a dataset. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, a NULL, or nil. If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be NULL

If a search is successful, FindKey positions the cursor on the matching record and returns True. Otherwise the cursor is not moved, and FindKey returns False.


TCustomClientDataSet.FindNearest
 VCL Reference

TCustomClientDataSet.FindNearest

TCustomClientDataSet	See also 	Example

Moves the cursor to the record that most closely matches a specified set of key values.

procedure FindNearest(const KeyValues: array of const);

Description

Call FindNearest to move the cursor to a specific record in a dataset or to the first record in the dataset that matches or is greater than the values specified in the KeyValues parameter.  If there are no records that match or exceed the specified criteria, FindNearest positions the cursor on the last record in the table. The KeyExclusive property controls whether matching values are considered.

KeyValues contains a comma-delimited array of field values, called a key. If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be NULL.

Note:	FindNearest works only with string data types.


TCustomClientDataSet.GetCurrentRecord
 VCL Reference

TCustomClientDataSet.GetCurrentRecord

TCustomClientDataSet	See also

Retrieves the current record into a buffer.

function GetCurrentRecord(Buffer: PChar): Boolean; override;

Description

Most applications should not need to call GetCurrentRecord. TCustomClientDataSet automatically allocates a buffer for the active record.

Call GetCurrentRecord to copy the current record into a buffer allocated by the application. Buffer must be at least as big as the number of bytes indicated by the RecordSize property.


TCustomClientDataSet.GetFieldData
 VCL Reference

TCustomClientDataSet.GetFieldData

TCustomClientDataSet	See also

Retrieves the current value of a field.

function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; overload; override;

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; override;

function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: Boolean): Boolean; overload; virtual;

Description

Call GetFieldData to obtain the value of a field component as it is stored in the record buffer. TField objects call GetFieldData to implement their GetData method.

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number. The Buffer parameter is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). NativeFormat indicates whether the dataset fetches the field in Delphi’s native format for the field type. When NativeFormat is False, the dataset must convert the field value to the native type using its Translate method. This allows the field to handle data from different types of datasets (ADO-based, BDE-based, and so on) in a uniform manner.

GetFieldData returns a value that indicates whether the data was successfully fetched.


TCustomClientDataSet.GetGroupState
 VCL Reference

TCustomClientDataSet.GetGroupState

TCustomClientDataSet	See also

Indicates where the current record sits within a specified group of records.

type

  TGroupPosInd = (gbFirst, gbMiddle, gbLast);

  TGroupPosInds = set of TGroupPosInd;

function GetGroupState(Level: Integer): TGroupPosInds;

Description

Call GetGroupState to determine where the current record falls in the group of records specified by the Level parameter.

Level identifies a group by its grouping level on the current index. Grouping level 1 is the set of records with the same value on the first field in the index. Grouping level 2 is the set of records with the same values on the first two fields in the index, and so on. If Level specifies a grouping level greater than the GroupingLevel property, GetGroupState raises an exception.

GetGroupState returns a set that indicates where the current record falls in the current grouping level. It has one of the following values:

Value	Meaning

[gbMiddle]	The current record is neither the first nor the last in the group.

[gbFirst]	The current record is the first in the group, which contains at least two records.

[gbLast]	The current record is the last in the group, which contains at least two records.

[gbFirst,gbLast]	The current record is the only record in the group.

Note:	If AggregatesActive is False or the current index does not support grouping, GetGroupState returns an empty set.


TCustomClientDataSet.GetIndexInfo
 VCL Reference

TCustomClientDataSet.GetIndexInfo

TCustomClientDataSet	See also

Retrieves information about the current index.

procedure GetIndexInfo(IndexName: String);

Description

Call GetIndexInfo to populate a dataset’s internal index fields with information about the current index, including its field count, map, and key size.

Pass the name of the current index as the IndexName to retrieve the default grouping level of the index as well. If an empty string is supplied for IndexName, no grouping level information is retrieved.

Warning:	Do not pass GetIndexInfo the name of any index other than the current index.


TCustomClientDataSet.GetIndexNames
 VCL Reference

TCustomClientDataSet.GetIndexNames

TCustomClientDataSet	See also

Retrieves a list of available indexes for a client dataset.

procedure GetIndexNames(List: TStrings);

Description

Call GetIndexNames to retrieve a list of all available indexes for a client dataset. List is a string list object, created and maintained by the application, into which to retrieve the index names.

Note:	Two indexes are automatically generated for all client datasets:

DEFAULT_ORDER, which describes the order of data when it is put into the data packet.

CHANGEINDEX, which orders the data as it would if it were a delta assigned to another dataset.


TCustomClientDataSet.GetNextPacket
 VCL Reference

TCustomClientDataSet.GetNextPacket

TCustomClientDataSet	See also

Retrieves the next block of records from the provider.

function GetNextPacket: Integer;

Description

Call GetNextPacket to retrieve the next sequential block of records from a provider. To specify the maximum number of records to return in a packet, set the PacketRecords property before calling GetNextPacket. A packet is appended to those records already stored in the Data property.

GetNextPacket returns the number of records added to Data. If the return value is 0, the client dataset has already received all available records from the provider.

Warning:	If the provider is in a stateless application server, you must use a BeforeGetRecords event handler to ensure that the data packet returns the correct set of records.


TCustomClientDataSet.GetOptionalParam
 VCL Reference

TCustomClientDataSet.GetOptionalParam

TCustomClientDataSet	See also 	Example

Retrieves a custom parameter from the data packet.

function GetOptionalParam(const ParamName: string): OleVariant;

Description

Application developers can add custom information to the data packet using the client dataset’s SetOptionalParam method or a provider’s OnGetDataSetProperties event. This information is saved with the data packet when it is saved to a file or stream, and copied with the value of the Data property. Call GetOptionalParam to retrieve this custom information from the data packet.

The ParamName parameter specifies the name under which the custom information was stored.

Note:	Do not confuse the optional data retrieved by this method with the Params property.


TCustomClientDataSet.GotoCurrent
 VCL Reference

TCustomClientDataSet.GotoCurrent

TCustomClientDataSet	See also 	Example

Sets the current record in this dataset the same as the current record in another, cloned dataset.

procedure GotoCurrent(DataSet: TCustomClientDataSet);

Description

Call GotoCurrent to position the cursor on the same record that is current in the specified dataset. DataSet is the cloned dataset whose cursor position is to be matched in this dataset.

GotoCurrent is only useful for synchronizing two client datasets that use separate data sources to view and edit the same data.


TCustomClientDataSet.GotoKey
 VCL Reference

TCustomClientDataSet.GotoKey

TCustomClientDataSet	See also 	Example

Moves the cursor to a record specified by the current key.

function GotoKey: Boolean;

Description

Use GotoKey to move to a record specified by key values assigned with previous calls to SetKey or EditKey and actual search values indicated in the search key buffer.

If GotoKey finds a matching record, it positions the cursor on the record and returns True. Otherwise the current cursor position remains unchanged, and GotoKey returns False.


TCustomClientDataSet.GotoNearest
 VCL Reference

TCustomClientDataSet.GotoNearest

TCustomClientDataSet	See also 	Example

Moves the cursor to the record that most closely matches the current key.

procedure GotoNearest;

Description

Call GotoNearest to position the cursor on the record that is either the exact record specified by the current key values in the key buffer, or on the first record whose values exceed those specified. If there is no record that matches or exceeds the specified criteria, GotoNearest positions the cursor on the last record in the dataset.

Note:	KeyExclusive determines which records are considered part of a search range.

Before calling GotoNearest, an application must specify key values by calling SetKey or EditKey to put the dataset is dsSetKey state, and then use FieldByName to populate the buffer with search values.


TCustomClientDataSet.LoadFromFile
 VCL Reference

TCustomClientDataSet.LoadFromFile

TCustomClientDataSet	See also

Loads a client dataset’s data from a file.

procedure LoadFromFile(const FileName: string = '');

Description

Call LoadFromFile to populate the Data property of the client dataset with data stored in an external file. FileName is the name of the file containing the data to load. If the FileName parameter is an empty string, or if this parameter is omitted, LoadFromFile reads from the file specified by the FileName property.

To load data from a file at design time, right-click on the client dataset and choose Load from File.

Note:	FileName must contain data saved to a file by a previous call to this or another client dataset’s SaveToFile method, or by a TXMLTransform component.


TCustomClientDataSet.LoadFromStream
 VCL Reference

TCustomClientDataSet.LoadFromStream

TCustomClientDataSet	See also

Loads a client dataset’s data from a stream.

procedure LoadFromStream(Stream: TStream);

Description

Call LoadFromStream to populate the Data property of the client dataset with data from a stream. Stream is the name of the stream from which to read data.

Note:	Stream must contain data in a client dataset’s internal format (for example, data written to a stream by another client dataset using the SaveToStream method.


TCustomClientDataSet.Locate
 VCL Reference

TCustomClientDataSet.Locate

TCustomClientDataSet	See also

Searches the dataset for a specified record and makes that record current.

function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; override;

Description

Call Locate to search a dataset for a specific record and position the cursor on it. KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a Variant containing the values to match in the key fields. If KeyFields lists a single field, KeyValues represents the search value for that field. If KeyFields lists multiple fields, pass a Variant array as the KeyValues parameter. You can construct a variant array on the fly using the VarArrayOf routine. For example:

with CustTable do

  Locate('Company;Contact;Phone', VarArrayOf(['Sight Diver', 'P', '831-431-1000']), [loPartialKey]);

Options is a set that optionally specifies additional search latitude when searching on string fields. If Options contains the loCaseInsensitive setting, then Locate ignores case when matching fields. If Options contains the loPartialKey setting, then the KeyValues parameter can specify incomplete strings for field values. (For example, in the previous statement, the Contact field would match any record where Contact begins with ‘P’). If Options is an empty set, or if the KeyFields are not string fields, Options is ignored.

Locate returns True if it finds a matching record, and makes that record the current one. Otherwise Locate returns False.


TCustomClientDataSet.Lookup
 VCL Reference

TCustomClientDataSet.Lookup

TCustomClientDataSet	See also

Retrieves field values from a record that matches specified search values.

function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; override;

Description

Call Lookup to retrieve values for specified fields from a record that matches search criteria. KeyFields is a string containing a semicolon-delimited list of field names on which to search.

KeyValues is a Variant containing the values to match in the key fields. To specify multiple search values, pass KeyValues as a variant array as an argument, or construct a variant array on the fly using the VarArrayOf routine.

ResultFields is a string containing a semicolon-delimited list of field names whose values should be returned from the matching record.

Lookup returns a variant array containing the values from the fields specified in ResultFields.


TCustomClientDataSet.MergeChangeLog
 VCL Reference

TCustomClientDataSet.MergeChangeLog

TCustomClientDataSet	See also

Merges any data changes in the change log into the client dataset, overwriting existing values.

procedure MergeChangeLog;

Description

Call MergeChangeLog to merge changes in the change log into the actual data for the dataset, effectively creating a new data baseline. Existing values for which changes exist are overwritten.

Note:	This method is seldom called explicitly when using a provider because is called automatically by ApplyUpdates as part of the updating process. In file-based applications, MergeChangeLog must be called explicitly if LogChanges is True.


TCustomClientDataSet.Post
 VCL Reference

TCustomClientDataSet.Post

TCustomClientDataSet	See also

Writes a modified record to the Data property or the change log.

procedure Post; override;

Description

Call Post to commit changes to the current record. Methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, such as First, Last, Next, and Prior automatically call Post.

Note:	If the LogChanges property is True, Post updates the change log specified by the Delta property. If LogChanges is False, Post writes the changes directly to the Data property.


TCustomClientDataSet.Reconcile
 VCL Reference

TCustomClientDataSet.Reconcile

TCustomClientDataSet	See also

Clears successfully updated records from the client dataset’s cache of changes.

function Reconcile(const Results: OleVariant): Boolean;

Description

Reconcile is called by the ApplyUpdates method to update the client dataset so that it reflects the result of an update. Reconcile is called after the provider has attempted to apply all updates in the client dataset’s Delta property. (The provider may be internal to the client dataset, an external component in the same application as the client dataset, or on a separate application server.)

Results is a Variant, returned by the ApplyUpdates method of a provider, that contains error information and record information for each record that could not be applied. Reconcile generates an OnReconcileError event for every record in Results (every record that was not successfully applied by the provider). Finally, Reconcile adjusts the Delta property so that it includes only those records that were not successfully applied. Any changes made in the OnReconcileError event are reflected in the new value of Delta.

Reconcile returns a value that indicates whether reconciling is successful. If True, Reconcile succeeded without error. If False, one or more errors could not be reconciled.


TCustomClientDataSet.RefreshRecord
 VCL Reference

TCustomClientDataSet.RefreshRecord

TCustomClientDataSet	See also	Example

Updates the base values of the current record to match the current values of the provider’s dataset.

procedure RefreshRecord;

Description

Call Refresh to change the base values of the current record to match the current value on the server. Refresh replaces the original values obtained from a provider, but leaves any changes in the change log intact.

Warning:	RefreshRecord should be used with care. If the user has modified the current record, refreshing the original values may mask update conflicts. When the application calls ApplyUpdates, no reconcile error will occur, even where this is appropriate.

Note:	A similar method, Refresh, replaces the entire contents of the client dataset with the current values supplied by the provider. Unlike RefreshRecord, which leaves unapplied changes in the change log, Refresh raises an exception when the change log is not empty.


TCustomClientDataSet.RevertRecord
 VCL Reference

TCustomClientDataSet.RevertRecord

TCustomClientDataSet	See also

Undoes edits to the current record.

procedure RevertRecord;

Description

Call RevertRecord to remove any modifications made to the current record. RevertRecord can only remove modifications to records that are still in the change log. Changes that have been removed because they were applied by a provider or merged into the Data property can’t be undone using RevertRecord.

Note:	To undo the last edit made to a record, call UndoLastChange. To cancel all pending modifications, call CancelUpdates. To undo all edits since an application-defined state, use the SavePoint property.


TCustomClientDataSet.SaveToFile
 VCL Reference

TCustomClientDataSet.SaveToFile

TCustomClientDataSet	See also

Saves a client dataset’s data to an external file.

procedure SaveToFile(const FileName: string = ''; Format TDataPacketFormat=dfBinary);

Description

Call SaveToFile to write a client dataset’s data to an external file for later use by this or other client datasets.

FileName is the name of the external file to use. If the file already exists, its current contents are overwritten. If an empty string is passed for the FileName parameter (or if this parameter is omitted), the data is saved to the file specified by the FileName property.

Format indicates what format to use when saving the data, binary (dfBinary) or XML (dfXML), or UTF8-based XML (dfXMLUTF8).


TCustomClientDataSet.SaveToStream
 VCL Reference

TCustomClientDataSet.SaveToStream

TCustomClientDataSet	See also

Saves a client dataset’s data to a stream.

procedure SaveToStream(Stream: TStream; Format TDataPacketFormat=dfBinary);

Description

Call SaveToStream to write a client dataset’s data to a stream.

Stream is the name of an existing stream to write to.

Format indicates what format to use when saving the data, binary (dfBinary) or XML (dfXML), or UTF8-based XML (dfXMLUTF8).

If the stream requires a buffer, use the DataSize property to determine the required size of the buffer.


TCustomClientDataSet.SetAltRecBuffers
 VCL Reference

TCustomClientDataSet.SetAltRecBuffers

TCustomClientDataSet	See also

Sets record buffers when accessing field values.

procedure SetAltRecBuffers(Old, New, Cur: PChar);

Description

Applications do not normally need to call this method. SetAltRecBuffers sets pointers to records buffers that are used when accessing the OldValue, NewValue, and CurValue properties of a field component belonging to the client dataset. These value are accessed only while processing updates.


TCustomClientDataSet.SetKey
 VCL Reference

TCustomClientDataSet.SetKey

TCustomClientDataSet	See also 	Example

Enables setting of keys and ranges for a dataset prior to a search.

procedure SetKey;

Description

Call SetKey to put the dataset into dsSetKey state and clear the current contents of the search key buffer. Use FieldByName to supply the buffer then with a new set of values prior to conducting a search.

Note:	To modify an existing key or range, call EditKey.


TCustomClientDataSet.SetOptionalParam
 VCL Reference

TCustomClientDataSet.SetOptionalParam

TCustomClientDataSet	See also

Saves a custom parameter with the data packet.

procedure SetOptionalParam(const ParamName: string; const Value: OleVariant; IncludeInDelta: Boolean = False);

Description

You can add custom information to a data packet using the SetOptionalParam method. This information is saved with the data packet when it is saved to a file or stream, and copied with the value of the Data property. For example, by setting a parameter in the OnGetData event of provider, application servers can include custom information with the data that is sent to client applications. Call GetOptionalParam to retrieve the custom information from the data packet.

The ParamName parameter specifies the name under which the custom information is stored. It can be any value except one of the following:

UNIQUE_KEY	DEFAULT_ORDER	CHANGE_LOG	SERVER_COL

CONSTRAINTS	DATASET_CONTEXT	DATASET_DELTA	LCID

BDERECORD_X	TABLE_NAME	MD_FIELDLINKS	UPDATEMODE

The Value parameter is an OleVariant that represents the custom information.

The IncludeInDelta parameter specifies whether the parameter is also stored with the Delta property. By including the parameter in the Delta property, it is sent along with updates to the provider. The provider can then retrieve this information using the GetOptionalParam method of the client dataset passed as a parameter to an OnUpdateData event handler.

Note:	Do not confuse the optional data saved by this method with the Params property.


TCustomClientDataSet.SetProvider
 VCL Reference

TCustomClientDataSet.SetProvider

TCustomClientDataSet	See also

Associates the client dataset with a provider in the same process space.

procedure SetProvider(Provider: TComponent);

Description

Use SetProvider to specify a local provider component that provides data to and applies updates from the client dataset. The client dataset communicates with this provider using the IAppServer interface specified by the AppServer property.

Do not call SetProvider if the client dataset already uses an internal provider component. Also, do not use SetProvider for remote providers on an application server. If the provider is not in the same process space as the client dataset, use the ProviderName property. If the provider has the same Owner as the client dataset, you can also use the ProviderName property.

The Provider parameter must be a descendant of TCustomProvider. Otherwise, SetProvider raises an exception.

Note:	If you close the client dataset after assigning a provider using the SetProvider method, when you reopen the client dataset you must call SetProvider again to reassign that provider.


TCustomClientDataSet.SetRange
 VCL Reference

TCustomClientDataSet.SetRange

TCustomClientDataSet	See also 	Example

Sets the starting and ending values of a range, and applies it.

procedure SetRange(const StartValues, EndValues: array of const);

Description

Call SetRange to specify a range and apply it to the dataset. The new range replaces the currently specified range, if any.

StartValues indicates the field values that designate the first record in the range. .

EndValues indicates the field values that designate the last record in the range.

SetRange combines the functionality of SetRangeStart, SetRangeEnd, and ApplyRange in a single procedure call. SetRange performs the following functions:

1	Puts the dataset into dsSetKey state.

2	Erases any previously specified starting range values and ending range values.

3	Sets the start and end range values.

4	Applies the range to the dataset.

After a call to SetRange, the cursor is left on the first record in the range.

If either StartValues or EndValues has fewer elements than the number of fields in the current index, then the remaining entries are set to NULL.


TCustomClientDataSet.SetRangeEnd
 VCL Reference

TCustomClientDataSet.SetRangeEnd

TCustomClientDataSet	See also 	Example

Indicates that subsequent assignments to field values specify the end of the range of rows to include in the dataset.

procedure SetRangeEnd;

Description

Call SetRangeEnd to put the dataset into dsSetKey state, erase any previous end range values, and set them to NULL. Subsequent field assignments made with FieldByName specify the actual set of ending values for a range.

After assigning end-range values, call ApplyRange to activate the modified range.


TCustomClientDataSet.SetRangeStart
 VCL Reference

TCustomClientDataSet.SetRangeStart

TCustomClientDataSet	See also 	Example

Indicates that subsequent assignments to field values specify the start of the range of rows to include in the dataset.

procedure SetRangeStart;

Description

Call SetRangeStart to put the dataset into dsSetKey state, erase any previous start range values, and set them to NULL. Subsequent field assignments to FieldByName specify the actual set of starting values for a range.

After assigning start-range values, call ApplyRange to activate the modified range.


TCustomClientDataSet.UndoLastChange
 VCL Reference

TCustomClientDataSet.UndoLastChange

TCustomClientDataSet	See also

Undoes the last edit, insert, or delete operation to a record in the client dataset.

function UndoLastChange(FollowChange: Boolean): Boolean;

Description

Call UndoLastChange to undo the last edit, insert, or delete operation to a record in the client dataset. FollowChange indicates whether to reposition the cursor on the restored record. If FollowChange is True, the cursor is positioned on the restored record. If FollowChange is False, the cursor remains on current record.


TCustomClientDataSet.UpdateStatus
 VCL Reference

TCustomClientDataSet.UpdateStatus

TCustomClientDataSet	See also 	Example

Reports the update status for the current record in the dataset.

function UpdateStatus: TUpdateStatus; override;

Description

Call UpdateStatus to determine the update status for the current record in the client dataset. Update status can change frequently as records are edited, inserted, or deleted. UpdateStatus offers a convenient method for applications to assess the current status before undertaking or completing operations that depend on the update status of the current record.

Note:	To determine whether there are updates pending for an entire dataset, check the ChangeCount property.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomClientDataSet


TCustomConnection
 VCL Reference

TCustomConnection

Hierarchy	Properties	Methods	Events	See also

TCustomConnection is the base class for components that connect datasets to a remote source of data.

Unit

DB

Description

Use TCustomConnection as a base class for components that represent a remote source of the data contained in a dataset. This source can be a remote database server, the middle tier of a multi-tiered database application, an interface such as the one used by ActiveX Data Objects (ADO), or any other driver that provides the information represented in a dataset. TCustomConnection introduces:

Methods for connecting to and disconnecting from the source of data.

Login support for providing a user name and password when establishing a connection.

Properties for keeping track of the datasets that use the connection component.

Do not create instances of TCustomConnection. To add a component that represents the connection to a source of data, use a TCustomConnection descendant such as TDatabase, TADOConnection, TSQLConnection, or one of the DataSnap connection components such as TDCOMConnection.


 VCL Reference

TCustomConnection properties

TCustomConnection	Alphabetically	Legend

In TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

StreamedConnected

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomConnection properties

TCustomConnection	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

StreamedConnected

Tag

VCLComObject


TCustomConnection.Connected
 VCL Reference

TCustomConnection.Connected

TCustomConnection	See also	Example

Determines whether a connection has been established to the remote source of data.

property Connected: Boolean;

Description

Set Connected to True to open the connection. Set Connected to False to terminate the connection.

Setting Connected to True generates a BeforeConnect event, calls the protected DoConnect method to establish the connection, and generates an AfterConnect event. In addition, when setting Connected to True, TCustomConnection may display a login dialog, depending on the value of LoginPrompt.

Setting Connected to False generates a BeforeDisconnect event, calls the protected DoConnect method to drop the connection, and generates an AfterDisconnect event.

When deriving custom connection components from TCustomConnection, override GetConnected to return True when a connection is established, and override DoConnect and DoDisconnect to create and drop the connection.


TCustomConnection.DataSetCount
 VCL Reference

TCustomConnection.DataSetCount

TCustomConnection	See also	Example

Indicates the number of datasets associated with the connection component.

property DataSetCount: Integer;

Description

Use DataSetCount to determine the number of datasets listed by the DataSets property. Depending on the TCustomConnection descendant, DataSets may include only the active datasets that use the connection component (as is the case with TDatabase and TSQLConnection), or it may list all datasets, regardless of whether they are active (as is the case with TADODatabase and DataSnap connection components). If DataSets includes only active datasets, the value of DataSetCount changes when datasets are opened and closed.

Use DataSetCount as an upper bound when iterating through the DataSets property.


TCustomConnection.DataSets
 VCL Reference

TCustomConnection.DataSets

TCustomConnection	See also 	Example

Lists the datasets currently using this connection component.

property DataSets[Index: Integer]: TDataSet;

Description

Use DataSets to access the datasets that are currently using the connection component. Depending on the TCustomConnection descendant, DataSets may include only the active datasets that use the connection component (as is the case with TDatabase and TSQLConnection), or it may list all datasets, regardless of whether they are active (as is the case with TADODatabase and DataSnap connection components). If DataSets includes only active datasets, its value changes when datasets are opened and closed.

Note:	If a client dataset with an internal provider (for example TSQLClientDataSet or TBDEClientDataSet) uses the connection component to connect to a database server, DataSets lists the internal dataset that the client dataset creates to access data, not the client dataset itself.


TCustomConnection.LoginPrompt
 VCL Reference

TCustomConnection.LoginPrompt

TCustomConnection	See also	Example

Specifies whether a login dialog appears immediately before opening a new connection.

property LoginPrompt: Boolean;

Description

Set LoginPrompt to True to provide login support when establishing a connection. LoginPrompt controls two things: the occurrence of the OnLogin event, and the appearance of a default login dialog that prompts users for a name and password when you add DBLogDlg to your uses clause. When the OnLogin event occurs and when the default login dialog appears depend on the type of connection component:

 For TDatabase, TIBDatabase, and TSQLConnection, the dialog appears after the BeforeConnect event and before the AfterConnect event, unless you supply an OnLogin event handler. If there is an OnLogin event handler, that event occurs in place of the login dialog, and there is no need to add DBLogDlg to your uses clause. If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails. The OnLogin event does not fire unless LoginPrompt is set to True.

 For TADOConnection components, the dialog appears after the OnWillConnect event and before the BeforeConnect event. If there is an OnLogin event handler, that event occurs after the login dialog. If you do not add DBLogDlg to your uses clause, the OnLogin event occurs but there is no default login dialog. If correct values for the user name and password are not supplied in the dialog or by the OnLogin event handler, the connection fails. The OnLogin event does not fire unless LoginPrompt is set to True.

 For DataSnap connection components, the dialog appears after the OnGetUsername event and before the BeforeConnect, AfterConnect, and OnLogin events. If the user cancels from the login dialog, no attempt is made to open a connection.

When LoginPrompt is False, the application must supply user name and password values programmatically:

For TDatabase, the user name and password can be supplied as USER NAME and PASSWORD parameters in the Params property.

For TADOConnection, the user name and password can be supplied as the ConnectionString property.

For TSQLConnection, the user name, password, and database can be supplied as UserName, Password, and Database parameters in the Params property, or provided as connection parameters associated with the connection name.

For DataSnap connection components, there is no built-in use for the user name and password supplied by the login dialog. (The UserName and Password properties of TWebConnection are unrelated).

Warning:	Storing hard-coded user name and password entries as property values or in code for an OnLogin event handler can compromise server security.


TCustomConnection.StreamedConnected
 VCL Reference

TCustomConnection.StreamedConnected

TCustomConnection	See also

Indicates whether the Connected property was True when the connection component was loaded from a stream.

property StreamedConnected: Boolean;

Description

StreamedConnected is used internally to ensure that the connection component does not open a connection until all objects on the form or data module are loaded into memory. This property is set instead of the Connected property when loading the connection component. In the Loaded method, after all objects in the form or data module have been loaded into memory, the value of StreamedConnected is used to set the Connected property.


 VCL Reference

TCustomConnection events

TCustomConnection	Alphabetically	Legend

In TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TCustomConnection events

TCustomConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


TCustomConnection.AfterConnect
 VCL Reference

TCustomConnection.AfterConnect

TCustomConnection	See also

Occurs after a connection is established.

property AfterConnect: TNotifyEvent;

Description

Write an AfterConnect event handler to take application-specific actions immediately after the connection component opens a connection to the remote source of database information.


TCustomConnection.AfterDisconnect
 VCL Reference

TCustomConnection.AfterDisconnect

TCustomConnection	See also

Occurs after the connection closes.

property AfterDisconnect: TNotifyEvent;

Description

Write an AfterDisconnect event handler to take application-specific actions after the connection component drops a connection.


TCustomConnection.BeforeConnect
 VCL Reference

TCustomConnection.BeforeConnect

TCustomConnection	See also	Example

Occurs immediately before establishing a connection.

property BeforeConnect: TNotifyEvent;

Description

Write a BeforeConnect event handler to take application-specific actions before the connection component opens a connection to the remote source of database information.


TCustomConnection.BeforeDisconnect
 VCL Reference

TCustomConnection.BeforeDisconnect

TCustomConnection	See also	Example

Occurs immediately before the connection closes.

property AfterDisconnect: TNotifyEvent;

Write a BeforeDisconnect event handler to take application-specific actions before dropping a connection.


TCustomConnection.OnLogin
 VCL Reference

TCustomConnection.OnLogin

TCustomConnection	See also	Example

Occurs when a communication channel opens to the server.

type TLoginEvent = procedure(Sender:TObject; Username, Password: string) of object;

property OnLogin: TLoginEvent;

Description

OnLogin occurs when connections are opened if the LoginPrompt property is True.

For DataSnap connection components, the following sequence of events occurs when opening a connection to an application server:

1. An OnGetUsername event occurs, where the application can supply an initial user name for the login dialog.

2. The login dialog appears, where the user can supply a user name and password.

3. A BeforeConnect event occurs, the connection is opened, and an AfterConnect event occurs.

4. The OnLogin event occurs, where you can write code to log in to the application server using the username and password that were provided in the remote login dialog.

Note:	Do not use the OnLogin event if the connection component provides a different scheme for logging in. For example, TWebConnection uses the Username and Password properties instead.

For ADO connection components, the following sequence of events occurs when opening a connection to an application server:

1. A BeforeConnect event occurs.

2. An OnWillConnect event occurs, where the application can supply an initial user name and password for the login dialog, as well as the connection options and status.

2. The login dialog appears, where the user can supply a user name and password.

3. The OnLogin event occurs, where you can write code to respond to the user-supplied values. (For example, you could convert an application-specific user name and password to database user name and password).

4. The connection is opened, and an AfterConnect event occurs.

Note:	Some connection components that do not connect to an application server in a multitiered database application replace the OnLogin event defined in TCustomConnection with a different event that occurs before a connection is established.


 VCL Reference

TCustomConnection methods

TCustomConnection	Alphabetically	Legend

In TCustomConnection

Close

Create

Destroy

DoConnect

DoDisconnect

GetConnected

GetDataSet

GetDataSetCount

Loaded

Open

RegisterClient

SendConnectEvent

SetConnected

UnRegisterClient

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomConnection methods

TCustomConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoConnect

DoDisconnect

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetConnected

GetDataSet

GetDataSetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RegisterClient

RemoveComponent

RemoveFreeNotification

SafeCallException

SendConnectEvent

SetConnected

SetSubComponent

UnRegisterClient

UpdateAction


TCustomConnection.Close
 VCL Reference

TCustomConnection.Close

TCustomConnection	See also

Closes the connection.

procedure Close;

Description

Call Close to disconnect from the remote source of database information. Before the connection component is deactivated, all associated datasets are closed. Calling Close is the same as setting the Connected property to False.

In most cases, closing a connection frees system resources allocated to the connection.

Note:	If a previously active connection is closed and then reopened, any associated datasets must be individually reopened; reopening the connection does not automatically reopen associated datasets.


TCustomConnection.Create
 VCL Reference

TCustomConnection.Create

TCustomConnection	See also

Creates an instance of TCustomConnection.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a connection component at runtime. Connection components added to forms or data modules at design time are created automatically.

The Owner parameter specifies another component (usually a form or data module) that is responsible for freeing the connection component.


TCustomConnection.Destroy
 VCL Reference

TCustomConnection.Destroy

TCustomConnection	See also

Destroys the instance of a connection component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which verifies that the reference to the connection component is not nil before calling Destroy

Destroy closes all active datasets and closes its connection before freeing all internal resources.


TCustomConnection.DoConnect
 VCL Reference

TCustomConnection.DoConnect

TCustomConnection	See also

Provides the interface for a method that opens a connection.

procedure DoConnect; virtual;

Description

The Connected property uses DoConnect to establish a connection. Descendant classes override the DoConnect method to establish their connection as appropriate. As implemented in TCustomConnection, DoConnect does nothing.


TCustomConnection.DoDisconnect
 VCL Reference

TCustomConnection.DoDisconnect

TCustomConnection	See also

Provides the interface for a method that terminates the connection.

procedure DoDisonnect; virtual;

Description

The Connected property uses DoDisconnect to close a connection. Descendant classes override the DoDisconnect method to drop a connection. As implemented in TCustomConnection, DoDisconnect does nothing.


TCustomConnection.GetConnected
 VCL Reference

TCustomConnection.GetConnected

TCustomConnection	See also

Returns the value of the Connected property.

function GetConnected: Boolean; virtual;

Description

GetConnected is the protected read implementation of the Connected property. Descendant classes override this method to return True if a connection is open and False otherwise. As defined in TCustomConnection, GetConnected always returns False.


TCustomConnection.GetDataSet
 VCL Reference

TCustomConnection.GetDataSet

TCustomConnection	See also

Returns a dataset, given its index in the DataSets property array.

function GetDataSet(Index:Integer): TDataSet; virtual;

Description

GetDataSet is the protected read implementation of the DataSets property.


TCustomConnection.GetDataSetCount
 VCL Reference

TCustomConnection.GetDataSetCount

TCustomConnection	See also

Returns the value of the DataSetCount property.

function GetDataSetCount: Integer; virtual;

Description

GetDataSetCount is the protected read implementation of the DataSetCount property.


TCustomConnection.Loaded
 VCL Reference

TCustomConnection.Loaded

TCustomConnection	See also

Initializes the connection component after all objects in the form or data module have been loaded.

procedure Loaded; override;

Description

Do not call the protected Loaded method. It is called automatically after the form or data module that contains the connection component has loaded all its owned objects. TCustomConnection overrides the inherited method to establish a connection if the Connected property is True.


TCustomConnection.Open
 VCL Reference

TCustomConnection.Open

TCustomConnection	See also

Opens the connection.

procedure Open;

Description

Call Open to establish a connection to the remote source of database information. Open sets the Connected property to True.


TCustomConnection.RegisterClient
 VCL Reference

TCustomConnection.RegisterClient

TCustomConnection	See also

Registers an object that uses the connection component.

procedure RegisterClient(Client: TObject, Event:TConnectChangeEvent=nil); virtual;

Description

RegisterClient is used internally to associate objects with the connection component. Registered components can supply an event handler that responds when the connection is created or terminated.

Client is the object to register. If Client is a dataset, it is added to the DataSets property.

Event is an event handler that is called after the connection is established or before it is terminated.

Datasets call this method when they start using the connection component. For BDE-enabled datasets, ADO datasets, and dbExpress datasets, this is when they are activated. For client datasets, this is when the RemoteServer property is assigned.


TCustomConnection.SendConnectEvent
 VCL Reference

TCustomConnection.SendConnectEvent

TCustomConnection	See also

Informs all registered clients that use the connection component when a connection is opened or closed.

procedure SendConnectEvent(Connecting: Boolean);

Description

SendConnectEvent is used internally to ensure that registered clients are informed when their connection is opened or closed. It is called automatically when the Connected property changes.

SendConnectEvent iterates through all registered clients. For each client that supplied an event handler to the RegisterClient method, SendConnectEvent calls that event handler to inform the client that a connection has just been opened (when Connecting is True) or that the connection is about to close (when Connecting is False). If the client is a dataset, it is informed about the change even if it did not supply an event handler to RegisterClient.


TCustomConnection.SetConnected
 VCL Reference

TCustomConnection.SetConnected

TCustomConnection	See also

Changes the value of the Connected property.

procedure SetConnected(Value: Boolean); virtual;

Description

SetConnected is the protected write implementation of the Connected property. Most descendants of TCustomConnection do not override this method to change the implementation of Connected. Instead, they override the DoConnect and DoDisconnect methods to change the way the connection is opened and closed.


TCustomConnection.UnRegisterClient
 VCL Reference

TCustomConnection.UnRegisterClient

TCustomConnection	See also

Removes a registered client so that it is no longer associated with the connection component.

procedure UnRegisterClient(Client: TObject); virtual;

Description

UnRegisterClient is used internally to remove objects from the internal list of objects that are informed when a connection is created or terminated.

Client is the object that is removed from the list. It should be an object that was previously registered by a call to RegisterClient. If Client is a dataset, it is removed from the DataSets property list.

Datasets call this method when they stop using the connection component. For BDE-enabled datasets, ADO datasets, and dbExpress datasets, this is when they are deactivated. For client datasets, this is when the RemoteServer property is changed.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection


TCustomFileRun
 VCL Reference

TCustomFileRun

Hierarchy	Properties	Methods	Events	Using TCustomFileRun	See also

TCustomFileRun is the base class for actions that perform a specified operation on a file.

Unit

ExtActns

Description

Use TCustomFileRun as a base class when defining a pre-defined action that uses ShellExecute to perform an operation on a file. TCustomFileRun implements properties for specifying

A target file or the option of letting the user select one using a browse dialog.

The operation to perform on the target file.

Parameters to supply to an external application that performs the desired operation.

The startup directory for the external application.

The state of the window that appears when performing the specified operation.

When the ExecuteTarget method is called, TCustomFileRun uses these properties to call the Windows API ShellExecute, which performs the specified operation if it is listed as applicable to the target file type in the system registry. Depending on the operation, this may involve launching an external application, calling a dynamic-link library (DLL), or displaying a system dialog (such as the file properties dialog).

Do not add TCustomFileRun to an action list or action manager. To add a generic file run action, use TFileRun instead.


 VCL Reference

TCustomFileRun properties

TCustomFileRun	Alphabetically	Legend

In TCustomFileRun

Browse

BrowseDlg

Directory

FileName

HInst

Operation

Parameters

ParentControl

ShowCmd

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomFileRun properties

TCustomFileRun	By object	Legend

ActionComponent

ActionList

AutoCheck

Browse

BrowseDlg

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Directory

DisableIfNoHandler

Enabled

FileName

GroupIndex

HelpContext

HelpKeyword

HelpType

HInst

Hint

ImageIndex

Index

Name

Operation

Owner

Parameters

ParentControl

SecondaryShortCuts

ShortCut

ShowCmd

Tag

VCLComObject

Visible


TCustomFileRun.Browse
 VCL Reference

TCustomFileRun.Browse

TCustomFileRun 	See also

Controls whether an open dialog automatically appears to let users browse for the target file.

property Browse: Boolean;

Description

Browse controls whether TCustomFileRun displays the dialog specified by BrowseDlg when it fires, letting users select the target file to be launched. When Browse is True, firing TCustomFileRun displays the open dialog specified by BrowseDlg, and then (if the user does not cancel) performs the operation specified by Operation on the chosen file. When Browse is False, your application must specify the target file by explicitly setting the FileName property.

Note:	When Browse is True, TCustomFileRun ignores the FileName property.


TCustomFileRun.BrowseDlg
 VCL Reference

TCustomFileRun.BrowseDlg

TCustomFileRun 	See also

Specifies the dialog that allows users to select the target file to run.

property BrowseDlg: TOpenDialog;

Description

Use BrowseDlg when the Browse property is True to configure the dialog that users use to select a target file. By expanding BrowseDlg in the Object Inspector at design time, or by setting its properties at runtime, you can customize the way the dialog first appears when the action fires.

By default, BrowseDlg is an internally-generated TOpenDialog object. When using the default dialog, there is no need to explicitly add a dialog component to your application. If you want to use a specialized TOpenDialog descendant (such as TOpenPictureDialog), however, set BrowseDlg to an open dialog component you place in the same form or data module as the TCustomFileRun action.


TCustomFileRun.Directory
 VCL Reference

TCustomFileRun.Directory

TCustomFileRun 	See also

Specifies the default directory for the externally-launched application.

property Directory: TFileName;

Description

Set Directory to specify a default (startup) directory for the external application that is launched when the action fires.


TCustomFileRun.FileName
 VCL Reference

TCustomFileRun.FileName

TCustomFileRun 	See also

Specifies the target file to run.

property FileName: TFileName;

Description

Set FileName to specify the file on which TCustomFileRun performs the operation specified by Operation when the action fires. FileName can specify a file that is opened using an external application (such as a .txt file that causes a text editor to launch), or it can specify an executable file for the application itself. When the action fires in response to a user action, TCustomFileRun launches an external application or dll to perform Operation on the file specified by FileName.

Note:	You do not need to specify FileName if the Browse property is True. When Browse is True, TCustomFileRun ignores the value of FileName and instead displays a file open dialog where the user can specify a file name. Note that even if the user cancels from this file open dialog, TCustomFileRun ignores FileName when Browse is True.


TCustomFileRun.HInst
 VCL Reference

TCustomFileRun.HInst

TCustomFileRun

Indicates the Windows error code that is returned when TCustomFileRun launches the external application.

type HINST = type LongWord;

property HInst: HINST;

Description

TCustomFileRun sets HInst to the Windows return value when it launches the external application. If this value is less than 32, it represents an error code that indicates why the application failed to launch. This value is only available after the action has executed.

The following table lists the possible error values (defined in shellapi.pas) that can be the value of HInst when it is less than 32.

Value	Meaning

0	The operating system is out of memory or resources.

ERROR_FILE_NOT_FOUND	The specified file was not found.

ERROR_PATH_NOT_FOUND	The specified path was not found.

ERROR_BAD_FORMAT	The .exe file is invalid (does not have the correct internal format).

SE_ERR_ACCESSDENIED	The operating system denied access to the specified file.

SE_ERR_ASSOCINCOMPLETE	The file name association is incomplete or invalid.

SE_ERR_DDEBUSY	A DDE transaction could not be completed because other DDE transactions were being processed.

SE_ERR_DDEFAIL	A DDE transaction failed.

SE_ERR_DDETIMEOUT	A DDE transaction could not be completed because the request timed out.

SE_ERR_DLLNOTFOUND	A specified dynamic-link library was not found.

SE_ERR_FNF	The specified file was not found.

SE_ERR_NOASSOC	There is no application associated with the given file name extension or TCustomFileRun attempted to print an unprintable file.

SE_ERR_OOM	There was not enough memory to complete the operation.

SE_ERR_PNF	The specified path was not found.

SE_ERR_SHARE	A sharing violation occurred.


TCustomFileRun.Operation
 VCL Reference

TCustomFileRun.Operation

TCustomFileRun 	See also

Indicates what TCustomFileRun should do with the target file.

property Operation: string;

Description

Set Operation to indicate what should be done with the target file when TCustomFileRun fires. The possible values for Operation depend on the particular file or folder specified by FileName or selected by the user when Browse is True. The possible operations for a particular file or folder are listed in the system Registry.

The following strings are usually valid:

Value	Meaning

edit	TCustomFileRun opens an editor. If FileName is not an editable file, the action fails.

explore	TCustomFileRun launches the Windows explorer for the folder specified by FileName.

open	TCustomFileRun opens the file specified by FileName. FileName can be an executable file, a file associated with an application that can open it, or a folder.

print	TCustomFileRun prints the file specified by FileName. If FileName is a binary file (for example, if it is an executable), the action fails.

properties	TCustomFileRun displays the file or folder's properties in a Properties dialog.

Note:	If Operation is an empty string, Windows tries to use the “open” operation. If the specified file does not support the “open” operation, Windows tries to use the default operation. If there is no “open” operation and no default operation, and if the application is running on Windows 2000 or later, Windows uses the first verb listed in the Registry.


TCustomFileRun.Parameters
 VCL Reference

TCustomFileRun.Parameters

TCustomFileRun 	See also

Specifies parameters to be passed to the application when the target file is an executable.

property Parameters: string;

Description

Use Parameters to specify any parameters that should be passed to the external application when it is launched. Only set Parameters if FileName is the name of an Executable file or the user is browsing for an executable file. If the target file holds data associated with the application to launch, Parameters should be an empty string.


TCustomFileRun.ParentControl
 VCL Reference

TCustomFileRun.ParentControl

TCustomFileRun 	See also

Indicates the control that parents any dialogs or windows needed when launching the target file.

property ParentControl: TWinControl;

Description

Set ParentControl to a control that Windows can use as a parent for dialogs and message boxes. For example, if Operation is 'properties', ParentControl is the parent of the resulting properties dialog. If TCustomFileRun fails to launch the target application, ParentControl may be the parent of an error message. Typically, ParentControl is set to the application’s main form.


TCustomFileRun.ShowCmd
 VCL Reference

TCustomFileRun.ShowCmd

TCustomFileRun 	See also

Specifies how the launched application window appears.

type

  TShowCmd = (scHide, scMaximize, scMinimize, scRestore, scShow, scShowDefault, scShowMaximized, scShowMinimized, scShowMinNoActive, scShowNA, scShowNoActivate, scShowNormal);

property ShowCmd: TShowCmd;

Description

Use ShowCmd to indicate how you want the application window to appear when TCustomFileRun performs the specified operation on its target file. ShowCmd can have any of the following values:

Value	Meaning

scHide	The external application window is hidden. If it was active, another window is activated.

scMaximize	The external application window is maximized (but not necessarily activated)

scMinimize	The external application window is minimized (but not necessarily activated).

scRestore	The external application window is activated. If it was minimized or maximized, Windows restores it to its original size and position.

scShow	The external application window is activated in its current size and position.

scShowDefault	The external application window is shown in the default startup state specified by that external application.

scShowMaximized	The external application window is activated and maximized.

scShowMinimized	The external application window is activated and minimized.

scShowMinNoActive	The external application window is minimized. The active window does not change.

scShowNA	The external application window is displayed (after being hidden) but activation does not change.

scShowNoActivate	The external application window is displayed in its most recent size and position, but activation does not change.

scShowNormal	The external application window is activated and restored to its original size and position if it was maximized or minimized.


 VCL Reference

TCustomFileRun events

TCustomFileRun	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TCustomFileRun events

TCustomFileRun	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TCustomFileRun methods

TCustomFileRun	Alphabetically	Legend

In TCustomFileRun

Create

ExecuteTarget

HandlesTarget

SetupBrowseDialog

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomFileRun methods

TCustomFileRun	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

SetupBrowseDialog

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TCustomFileRun.Create
 VCL Reference

TCustomFileRun.Create

TCustomFileRun	See also

Creates an instance of TCustomFileRun.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TCustomFileRun constructor because actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TCustomFileRun instance.

Create initializes the action’s properties and creates a default TOpenDialog instance to act as the value of the BrowseDlg property.


TCustomFileRun.ExecuteTarget
 VCL Reference

TCustomFileRun.ExecuteTarget

TCustomFileRun 	See also

Performs the specified operation on a target file.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and performs the operation specified by the Operation property on the target file specified by the FileName property or chosen by the user if the value of the Browse property is True. The values of Parameters, ShowCmd, and Directory, as well as the window handle for ParentControl are passed to Windows with the request to perform the specified operation.

Note:	If the attempt to perform the operation fails, the HInst property contains an error code that indicates what was wrong. If the attempt succeeds, the HInst property is greater than 32.


TCustomFileRun.HandlesTarget
 VCL Reference

TCustomFileRun.HandlesTarget

TCustomFileRun

Indicates whether the action can execute.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method lets the action object indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

HandlesTarget always returns True, because TCustomFileRun does not use the target object.


TCustomFileRun.SetupBrowseDialog
 VCL Reference

TCustomFileRun.SetupBrowseDialog

TCustomFileRun 	See also

Creates an instance of TOpenDialog and assigns it as the value of the BrowseDlg property.

procedure SetupBrowseDialog;

Description

SetupBrowseDialog generates the default open dialog instance for the dialog that appears when the Browse property is True. It assigns this newly created dialog component as the value of the BrowseDlg property.

Most applications do not need to call SetupBrowseDialog because it is called automatically by the TCustomFileRun constructor.


TCustomFileRun.UpdateTarget
 VCL Reference

TCustomFileRun.UpdateTarget

TCustomFileRun 	See also

Enables or disables the action, depending on current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when application is idle so that the action can update itself to reflect current conditions.

In TCustomFileRun, UpdateTarget checks whether it can obtain a target file. If the FileName property specifies a target file, or if the Browse property is True, indicating that users can select a target file, then UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCustomFileRun


TCustomRemoteServer
 VCL Reference

TCustomRemoteServer

Hierarchy	Properties	Methods	Events	See also

TCustomRemoteServer is the base class for all components that connect to an application server in a multi-tiered database application.

Unit

DBClient

Description

Do not create instances of TCustomRemoteServer. TCustomRemoteServer introduces the properties and methods needed to connect to a remote application server and make its IAppServer interface available to one or more client datasets. Descendant classes, which are often called DataSnap connection components, override many of TCustomRemoteServer’s methods to create or close connections to the application server and to manage the interface communication with the application server.

To enable a client application to connect to an application server, use a descendant of TCustomRemoteServer such as TSOAPConnection, TSocketConnection, TWebConnection, TDCOMConnection, or TCorbaConnection.


 VCL Reference

TCustomRemoteServer properties

TCustomRemoteServer	Alphabetically	Legend

In TCustomRemoteServer

AppServer

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomRemoteServer properties

TCustomRemoteServer	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

Tag

VCLComObject


TCustomRemoteServer.AppServer
 VCL Reference

TCustomRemoteServer.AppServer

TCustomRemoteServer	See also

Contains the interface for communicating with the application server.

property AppServer: Variant;

Description

AppServer provides read-only access to the interface returned by the application server’s remote data module (a descendant of IAppServer). Client applications can communicate directly with the application server through this interface.

When calling methods directly using AppServer, the client application uses late binding. For details on how to improve on this, see Calling server interfaces.

Note:	To use the IAppServer methods of the application server’s interface, obtain an interface using the GetServer method instead.


 VCL Reference

TCustomRemoteServer events

TCustomRemoteServer	Alphabetically	Legend

In TCustomRemoteServer

OnGetUsername

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TCustomRemoteServer events

TCustomRemoteServer	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnGetUsername

OnLogin


TCustomRemoteServer.OnGetUsername
 VCL Reference

TCustomRemoteServer.OnGetUsername

TCustomRemoteServer	See also

Occurs immediately before the remote login dialog.

type TGetUsernameEvent = procedure(Sender: TObject; var Username: string) of object;

property OnGetUsername: TGetUsernameEvent;

Description

Write an OnGetUsername event handler to initialize the user name in the remote login dialog that appears when the LoginPrompt property is True. Set the Username parameter to provide the initial value for the user name. If no OnGetUsername event handler is provided, the user name is initialized to an empty string.

The remote login dialog occurs immediately before a new connection is established to the application server. If the user cancels from that dialog, the connection attempt is aborted.

Note:	The OnGetUsername event does not occur unless the LoginPrompt property is True.


 VCL Reference

TCustomRemoteServer methods

TCustomRemoteServer	Alphabetically	Legend

In TCustomRemoteServer

Create

GetAppServer

GetProviderNames

GetServer

GetServerList

SetAppServer

Derived from TCustomConnection

Close

Destroy

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomRemoteServer methods

TCustomRemoteServer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetAppServer

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetProviderNames

GetServer

GetServerList

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAppServer

SetSubComponent

UpdateAction


TCustomRemoteServer.Create
 VCL Reference

TCustomRemoteServer.Create

TCustomRemoteServer	See also

Creates an instance of a remote server component.

constructor Create(AOwner: TComponent); override;

Description

Create instantiates an instance of a remote server component and initializes its properties.


TCustomRemoteServer.GetAppServer
 VCL Reference

TCustomRemoteServer.GetAppServer

TCustomRemoteServer	See also

Returns the value of the AppServer property.

function GetAppServer: Variant; virtual;

Description

GetAppServer is the protected implementation of the AppServer property. Override GetAppServer to change the way this property is stored or managed.


TCustomRemoteServer.GetProviderNames
 VCL Reference

TCustomRemoteServer.GetProviderNames

TCustomRemoteServer	See also

Executes a callback for all provider objects on the application server.

procedure GetProviderNames(Proc: TGetStrProc); virtual;

Description

Call GetProviderNames to execute the procedure specified by the Proc parameter for every provider exposed by the application server. For every provider listed by the remote data module’s AS_GetProviderNames method, Proc is called with the name of the provider.


TCustomRemoteServer.GetServer
 VCL Reference

TCustomRemoteServer.GetServer

TCustomRemoteServer	See also

Returns the IAppServer interface of the application server.

function GetServer: IAppServer; virtual;

Description

Descendant classes override this function to return the interface of the application server after establishing a connection. As implemented in TCustomRemoteServer, GetServer always returns nil.


TCustomRemoteServer.GetServerList
 VCL Reference

TCustomRemoteServer.GetServerList

TCustomRemoteServer	See also

Returns a list of application servers (remote data modules) to which the component can connect.

function GetServerList: OleVariant; virtual;

Description

Connection components use GetServerList internally to fill the drop down list in the Object Inspector for the ServerName property.

As implemented in TCustomRemoteServer, GetServerList always returns NULL. Descendant classes override this method to return a list of application servers that are on the local machine and registered in the system registry (TDispatchConnection), or fetched from the server machine (TStreamedConnection).


TCustomRemoteServer.SetAppServer
 VCL Reference

TCustomRemoteServer.SetAppServer

TCustomRemoteServer	See also

Sets the AppServer property.

procedure SetAppServer(Value: Variant); virtual;

Description

SetAppServer allows descendants of TCustomRemoteServer to set the read-only AppServer property when they establish a connection to the application server.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer


TCustomWinSocket
 VCL Reference

TCustomWinSocket

Hierarchy	Properties	Methods	Events	See also

TCustomWinSocket is the base class for all Windows socket objects.

Unit

ScktComp

Description

TCustomWinSocket introduces properties, events, and methods to describe an endpoint in a Windows socket connection. Descendants of TCustomWinSocket are used by socket components to manage the Windows socket API calls and to store information about a socket communication link.

A Windows socket encapsulates a set of communication protocols to allow the application to connect to other machines for reading or writing information. Windows sockets provide connections based on the TCP/IP protocol. They also allow connections that use the Xerox Network System (XNS), Digital’s DECnet protocol, or Novell’s IPX/SPX family. Sockets allow an application to form connections to other machines without being concerned with the details of the actual networking software.

Descendants of TCustomWinSocket represent different endpoints in socket connections. TClientWinSocket represents the client endpoint of a socket communication link to a server socket. TServerWinSocket represents the server endpoint of a listening connection. TServerClientWinSocket represents the server endpoint of a socket communication link to a client socket.


 VCL Reference

TCustomWinSocket properties

TCustomWinSocket	Alphabetically	Legend

In TCustomWinSocket

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


 VCL Reference

TCustomWinSocket properties

TCustomWinSocket	By object	Legend

Addr

ASyncStyles

Connected

Data

Handle

LocalAddress

LocalHost

LocalPort

LookupState

RemoteAddr

RemoteAddress

RemoteHost

RemotePort

SocketHandle


TCustomWinSocket.Addr
 VCL Reference

TCustomWinSocket.Addr

TCustomWinSocket	See also

Specifies the Internet socket address structure used in Windows socket API calls to represent the full specification of the local socket port.

property Addr: TSockAddrIn;

Description

Use Addr to represent the port used by the socket on the local system when working directly with Windows socket API calls. The value of Addr is determined by the values of the LocalAddress and LocalPort properties.


TCustomWinSocket:ASyncStyles
 VCL Reference

TCustomWinSocket.ASyncStyles

TCustomWinSocket	See also

Determines which asynchronous events the socket can receive.

type

  TAsyncStyle = (asRead, asWrite, asOOB, asAccept, asConnect, asClose);

  TAsyncStyles = set of TAsyncStyle;

property ASyncStyles: TAsyncStyles;

Description

Use ASyncStyles to determine what sorts of notifications the socket needs to respond to. Set ASyncStyles to change the notifications that the socket receives from the socket connection. ASyncStyles is a set drawn from the following values

Value	Meaning

asRead	The socket receives notification that the connection is ready for reading.

asWrite	The socket receives notification that the connection is ready for writing.

asOOB	The socket receives notification when out-of-band data arrives.

asAccept	The socket receives notification when another socket requests a connection.

asConnect	The socket receives notification when a communication link to another socket is opened.

asClose	The socket receives notification when a communication link to another socket is terminated.

Any notification specified by ASyncStyles arrives as a window message to the Handle property.

Note:	If the socket is a non-blocking socket, then ASyncStyles should include asRead and asWrite so that the socket will be informed of asynchronous reading and writing events.


TCustomWinSocket.Connected
 VCL Reference

TCustomWinSocket.Connected

TCustomWinSocket	See also

Indicates whether the socket connection is open and available for communication with other machines.

property Connected: Boolean;

Description

Read Connected before trying to use or change the Windows socket connection. Connected indicates whether the socket connection has been established. When Connected is True, the Windows socket is open and available for use. When Connected is False, the Windows socket is closed and can be changed.

To open a client Windows socket, use the Open method. To open a server Windows socket, use the Listen method. The Windows socket that represents the server endpoint of a connection to a client socket is opened in its constructor.

To close a Windows socket, use the Close method.


TCustomWinSocket.Data
 VCL Reference

TCustomWinSocket.Data

TCustomWinSocket

Points to application-specific data associated with the socket.

property Data: Pointer;

Description

Use Data to associate information specific to the socket connection with the Windows socket object. For example, Data can be used to store access and authentication information used by a server socket to evaluate client connection requests.

Data can store information in a thread-safe manner that would otherwise require the use of global variables. This is useful given the multi-threaded nature of many client-server applications.


TCustomWinSocket.Handle
 VCL Reference

TCustomWinSocket.Handle

TCustomWinSocket	See also

Specifies the handle of the window that receives notifications from the Windows socket.

property Handle: HWnd;

Description

Use Handle to send messages to the Windows socket or to subclass the Window procedure that receives messages of asynchronous events from the socket connection.


TCustomWinSocket.LocalAddress
 VCL Reference

TCustomWinSocket.LocalAddress

TCustomWinSocket	See also

Specifies the IP address of the local system that was bound to the socket connection.

property LocalAddress: string;

Description

LocalAddress is a string of four numeric (byte) values in the standard Internet dot notation, such as

123.197.1.2

Each address identifies the system and indicates the types of interfaces supported by the socket. A single system (machine) can support multiple addresses. LocalAddress is the address from among the possible addresses supported by the local system that is bound to the socket connection.

A single LocalAddress can be used simultaneously by multiple socket connections. Each of those connections must have a unique LocalPort number to distinguish it from other connections to the same LocalAddress.


TCustomWinSocket.LocalHost
 VCL Reference

TCustomWinSocket.LocalHost

TCustomWinSocket	See also

Specifies the name of the local system.

property LocalHost: string;

Description

Use LocalHost to get the name of the system that is running the application that uses the Windows socket. LocalHost is a string containing the domain name and service of the local socket endpoint, such as

http://www.wSite.Com

LocalHost provides an alias for the local IP address given in the LocalAddress property. Most Intranets provide host names for the IP addresses of systems on the net. On Windows 95 and NT machines, if a host name is not available, create one for the local IP address by entering the name into the HOSTS file. See the Microsoft documentation on Windows sockets for more information on the HOSTS file.


TCustomWinSocket.LocalPort
 VCL Reference

TCustomWinSocket.LocalPort

TCustomWinSocket	See also

Specifies the ID number of the port used by the socket connection.

property LocalPort: Integer;

Description

Use LocalPort to determine the port number that is bound to the socket connection. For server endpoints of listening connections, LocalPort is the ID associated with the service the server socket provides. For client or server endpoints of connections to another socket, LocalPort is usually an arbitrary value picked when the connection was made.

Port numbers allow a single system, identified by the LocalAddress property, to host multiple connections simultaneously. Each combination of LocalPort and LocalAddress can only be bound to a single socket connection. This combination is represented by the Addr property.

Many values of LocalPort are associated by convention with a particular service such as ftp or http. To determine whether the value of LocalPort is associated with a specific service, use the LookupService method.


TCustomWinSocket.LookupState
 VCL Reference

TCustomWinSocket.LookupState

TCustomWinSocket	See also

Indicates any asynchronous activities occurring while opening a connection.

type TLookupState = (lsIdle, lsLookupAddress, lsLookupService);

property LookupState: TLookupState;

Description

LookupState is used internally to coordinate asynchronous activities while opening a connection. The AsyncInitSocket method sets the value of LookupState to indicate when it is looking up various types of information. The following table lists the possible values:

Value	Meaning

lsIdle	The socket is not currently looking up any information asynchronously.

lsLookupAddress	The socket is looking up an IP address asynchronously and has not yet received the result.

lsLookupService	The socket is looking up a Service asynchronously and has not yet received the result.


TCustomWinSocket.RemoteAddr
 VCL Reference

TCustomWinSocket.RemoteAddr

TCustomWinSocket	See also

Specifies the Internet socket address structure used in Windows socket API calls to represent the full specification of the remote socket port.

property RemoteAddr: TSockAddrIn;

Description

When working directly with Windows socket API calls, use RemoteAddr to represent the port used by the socket on the other end of the connection. The value of RemoteAddr is determined by the values of the RemoteAddress and RemotePort properties.


TCustomWinSocket.RemoteAddress
 VCL Reference

TCustomWinSocket.RemoteAddress

TCustomWinSocket	See also

Specifies the IP address of the remote system that was bound to the socket connection.

property RemotelAddress: string;

Description

RemoteAddress is a string of four numeric (byte) values in the standard Internet dot notation, such as

123.197.1.2

Each address identifies the system on the other end of the socket connection and indicates the types of interfaces supported by the remote socket. A single system can support multiple addresses. RemoteAddress is the address from among the possible addresses supported by the remote system that is bound to the socket connection.

A single RemoteAddress may be participating in multiple socket connections. Each of those connections has a unique RemotePort number to distinguish it from other connections to the same RemoteAddress. The RemoteAddr property uniquely identifies the RemoteAddress and RemotePort combination used by the socket connection.


TCustomWinSocket.RemoteHost
 VCL Reference

TCustomWinSocket.RemoteHost

TCustomWinSocket	See also

Specifies the name of the remote system.

property RemoteHost: string;

Description

Use RemoteHost to get the name of the system on the other end of the socket connection. RemoteHost is a string containing the domain name and service of the remote endpoint of the socket connection, such as

http://www.wSite.Com

LocalHost provides an alias for the local IP address given in the RemoteAddress property.


TCustomWinSocket.RemotePort
 VCL Reference

TCustomWinSocket.RemotePort

TCustomWinSocket	See also

Specifies the ID number of the port used by the RemoteHost to form the socket connection.

property RemotePort: Integer;

Description

Use RemotePort to determine the port number used by the socket on the other end of the socket connection.

Port numbers allow a single system, identified by the RemoteAddress or RemoteHost property, to host multiple connections simultaneously. Each combination of RemotePort and RemoteAddress can only be bound to a single socket connection. This combination is represented by the RemoteAddr property.

Many port numbers are associated by convention with a particular service such as ftp or http. To determine whether the value of RemotePort is associated with a specific service, use the LookupService method.

Note:	If a client socket requests a specific port to indicate a desired service, the value of RemotePort for the actual connection may differ from the requested port number. Most server sockets listen on the port associated with a service, but switch to an arbitrary available port number for forming connections.


TCustomWinSocket.SocketHandle
 VCL Reference

TCustomWinSocket.SocketHandle

TCustomWinSocket	See also

Specifies the Windows handle for the socket.

property SocketHandle: TSocket;

Description

Use SocketHandle for Windows socket API calls that require the handle to the socket. When the Connected property is False, SocketHandle is INVALID_SOCKET.

SocketHandle is set to a valid Windows socket handle by the Listen or Open method.


 VCL Reference

TCustomWinSocket events

TCustomWinSocket	Alphabetically	Legend

In TCustomWinSocket

OnErrorEvent

OnSocketEvent


 VCL Reference

TCustomWinSocket events

TCustomWinSocket	By object	Legend

OnErrorEvent

OnSocketEvent


TCustomWinSocket.OnErrorEvent
 VCL Reference

TCustomWinSocket.OnErrorEvent

TCustomWinSocket	See also

Occurs when the socket fails in making, using, or shutting down a connection.

property OnErrorEvent: TSocketErrorEvent;

Description

Socket components provide an OnErrorEvent event handler that converts error notifications into error events on the socket component. Most applications will therefore not provide an event handler for OnErrorEvent.


TCustomWinSocket.OnSocketEvent
 VCL Reference

TCustomWinSocket.OnSocketEvent

TCustomWinSocket	See also

Occurs when the Windows socket receives notification of asynchronous events.

type TSocketEventEvent = procedure (Sender: TObject; Socket: TCustomWinSocket; SocketEvent: TSocketEvent) of object;

property OnSocketEvent: TSocketEventEvent;

Description

Socket components provide an OnSocketEvent event handler that converts Windows socket notifications into events on the socket component. Most applications will therefore not provide an event handler for OnSocketEvent. Replacing this event handler can prevent some expected events from occurring.

The Sender parameter is the Windows socket object that owns the event handler. Usually, this is the same as the Socket parameter.

The Socket parameter indicates the Windows socket that generates or receives notification of the event.

The SocketEvent parameter indicates the event that occurred.


 VCL Reference

TCustomWinSocket methods

TCustomWinSocket	Alphabetically	Legend

In TCustomWinSocket

Accept

AsyncInitSocket

Close

Connect

Create

DefaultHandler

Destroy

Disconnect

DoListen

DoOpen

Error

Event

InitSocket

Listen

Lock

LookupName

LookupService

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SendBuf

SendStream

SendStreamThenDrop

SendText

SetAsyncStyles

Unlock

Write

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomWinSocket methods

TCustomWinSocket	By object	Legend

Accept

AfterConstruction

AsyncInitSocket

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

Disconnect

Dispatch

DoListen

DoOpen

Error

Event

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InitSocket

InstanceSize

Listen

Lock

LookupName

LookupService

MethodAddress

MethodName

NewInstance

Open

Read

ReceiveBuf

ReceiveLength

ReceiveText

SafeCallException

SendBuf

SendStream

SendStreamThenDrop

SendText

SetAsyncStyles

Unlock

Write


TCustomWinSocket.Accept
 VCL Reference

TCustomWinSocket.Accept

TCustomWinSocket	See also

Provides the interface for a method that accepts a connection to a client socket.

procedure Accept(Socket: TSocket); virtual;

Description

Accept is called automatically in response to notifications that a client socket is requesting a connection. The Socket parameter is the Windows socket handle for the socket that receives the notification.

The Accept method for TCustomWinSocket does nothing with the notification. Descendants of TCustomWinSocket that represent listening server sockets override this method to accept the connection to the client socket.

Accept is only called if the ASyncStyles property includes asAccept.


TCustomWinSocket.AsyncInitSocket
 VCL Reference

TCustomWinSocket.AsyncInitSocket

TCustomWinSocket	See also

Looks up information or forms socket connections asynchronously.

procedure AsyncInitSocket(const Name, Address, Service: string; Port: Word; QueueSize: Integer; Client: Boolean);

Description

AsyncInitSocket is used internally to open a socket connection in non-blocking sockets. It is called by the Open or Listen method when that method’s Block parameter is False.

The Name parameter is the host name for the socket. The Address parameter is the IP address. The Service parameter is the service for which the socket is to used. The Port parameter is the port number for the socket. The QueueSize parameter indicates the number of client requests a listening connection can hold while waiting to form connections. The Client parameter indicates whether the socket address structure is to be used by a client socket to describe the destination of a connection or by a server socket to describe the listening connection.


TCustomWinSocket.Close
 VCL Reference

TCustomWinSocket.Close

TCustomWinSocket	See also

Shuts down the socket connection if it is open.

procedure Close;

Description

Call Close to terminate an open socket connection. Close triggers an OnSocketEvent of type seDisconnect before the connection is shut down. If the Windows socket is a listening server socket, Close shuts down all open connections to client sockets before shutting down the listening connection.


TCustomWinSocket.Connect
 VCL Reference

TCustomWinSocket.Connect

TCustomWinSocket	See also

Provides the interface for a method that responds to connection notifications from client sockets.

procedure Connect(Socket: TSocket); virtual;

Description

Connect is called automatically in response to notifications that the client socket has successfully completed a connection to a server socket. The Socket parameter is the Windows socket handle for the socket that receives the notification.

The Connect method for TCustomWinSocket does nothing with the notification. Descendants of TCustomWinSocket that represent client sockets override this method to respond to connection notifications.

Connect is only called if the ASyncStyles property includes asConnect.


TCustomWinSocket.Create
 VCL Reference

TCustomWinSocket.Create

TCustomWinSocket	See also

Creates an instance of TCustomWinSocket from a Windows socket handle.

constructor Create(ASocket: TSocket);

Description

Call Create to create a Windows socket object. Most Windows socket objects are created automatically by the socket component that uses them. Applications may create their own Windows socket objects in an OnGetSocket event handler for a server socket component.

After calling the inherited constructor, Create

Makes sure that Winsock.dll is initialized.

Allocates helper objects to manage multithreading issues.

Initializes ASyncStyles to [asRead, asWrite, asConnect, asClose]

Initializes the SocketHandle property to the ASocket parameter and sets the Connected property to reflect whether ASocket is the handle of a valid open Windows socket.

Initializes the Addr property.


TCustomWinSocket.DefaultHandler
 VCL Reference

TCustomWinSocket.DefaultHandler

TCustomWinSocket	See also

Processes message records.

procedure DefaultHandler(var Message); override;

Description

DefaultHandler overrides the inherited method in order to process all messages that are sent to the Windows socket object. DefaultHandler passes the messages to the Windows CallWindowProc function.


TCustomWinSocket.Destroy
 VCL Reference

TCustomWinSocket.Destroy

TCustomWinSocket	See also

Destroys an instance of TCustomWinSocket.

destructor Destroy; override;

Description

Most applications do not need to explicitly free Windows socket objects.  They are freed by the socket components that use them.


TCustomWinSocket.Disconnect
 VCL Reference

TCustomWinSocket.Disconnect

TCustomWinSocket	See also

Shuts down the socket connection represented by a Windows socket handle.

procedure Disconnect(Socket: TSocket); virtual;

Description

Disconnect is called by the Close method to terminate an individual socket connection.

Disconnect calls the Lock method to make sure the method is thread-safe. Then, it generates an OnSocketEvent of type seDisconnect. After the OnSocketEvent, Disconnect closes the connection. Finally, it calls Unlock to end the critical section started by Lock.


TCustomWinSocket.DoListen
 VCL Reference

TCustomWinSocket.DoListen

TCustomWinSocket	See also

Opens a listening connection.

procedure DoListen(QueueSize: Integer);

Description

The socket uses DoListen internally to open a listening connection with a queue that can hold QueueSize client connection requests. DoListen handles those tasks that are common to opening a listening connection synchronously or asynchronously.

Do not call DoListen to open a listening connection. Instead, call the public Listen method, which orchestrates the opening of a connection either synchronously or asynchronously, depending on the socket type.


TCustomWinSocket.DoOpen
 VCL Reference

TCustomWinSocket.DoOpen

TCustomWinSocket	See also

Opens a connection to a remote socket.

procedure DoOpen;

Description

The socket uses DoOpen internally to open a connection to a remote socket. DoOpen handles those tasks that are common to establishing a connection synchronously or asynchronously.

Do not call DoOpen to open a connection. Instead, call the public Open method, which orchestrates the opening of a connection either synchronously or asynchronously, depending on the socket type.


TCustomWinSocket.Error
 VCL Reference

TCustomWinSocket.Error

TCustomWinSocket	See also

Generates an OnErrorEvent event.

type TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept);

procedure Error(Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer); dynamic;

Description

Error is called automatically when the Windows socket object receives error notifications. It generates the OnErrorEvent event. When overriding this method, be sure to call the inherited method, because socket components rely on the OnErrorEvent event for their own error handling.

The Socket parameter indicates the Windows socket object that encounters the error condition.

The ErrorEvent parameter indicates what the socket was trying to do when the error occurred. It has one of the following values:

Value	Meaning

eeGeneral	The socket received an error message that does not fit into any of the following categories.

eeSend	An error occurred when trying to write to the socket connection.

eeReceive	An error occurred when trying to read from the socket connection.

eeConnect	For client sockets, this indicates that the client socket can’t locate the server, or that a problem on the server prevents the opening of a connection. For server sockets, this indicates that a client connection request that has already been accepted could not be completed.

eeDisconnect	An error occurred when trying to close a connection.

eeAccept	For server sockets only, this indicates that a problem occurred when trying to accept a client connection request.

The ErrorCode parameter is the error code received by the Windows socket object. Changing this value to 0 in the Error method prevents the socket from raising an exception. For information on possible error codes, see the Microsoft documentation on Windows sockets.


TCustomWinSocket.Event
 VCL Reference

TCustomWinSocket.Event

TCustomWinSocket	See also

Generates an OnSocketEvent event.

procedure Event(Socket: TCustomWinSocket; SocketEvent: TSocketEvent); dynamic;

Description

Error is called automatically when the Windows socket object receives notifications or when it performs certain actions. It generates the OnSocketEvent event. When overriding this method, be sure to call the inherited method, because socket components rely on the OnSocketEvent event to generate many of their own events.

The Socket parameter indicates the Windows socket that generates or receives notification of the event.

The SocketEvent parameter indicates the event that occurred.


TCustomWinSocket.InitSocket
 VCL Reference

TCustomWinSocket.InitSocket

TCustomWinSocket	See also

Generates a windows Internet socket address structure from a description of the desired socket port.

function InitSocket(const Name, Address, Service: string; Port: Word; Client: Boolean): TSockAddrIn;

Description

Applications can not call InitSocket. It is called by the Open or Listen method to obtain a Windows Internet socket address structure for the parameters obtained from a socket component.

The Name parameter is the host name for the socket.The Address parameter is the IP address. The Service parameter is the service for which the socket is to used. The Port parameter is the port number for the socket. The Client parameter indicates whether the socket address structure is to be used by a client socket to describe the destination of a connection or by a server socket to describe the listening connection.

The host portion of the Windows Internet socket address is obtained from the host name if it is given. Otherwise the Address parameter is used. If Client is True, either the Name or the Address parameter must be specified. If Client is False, they may both be left blank to specify a server that listens on multiple addresses.

If port number for the Windows Internet socket address is obtained from the Service parameter if it is given. Otherwise, the Port parameter is used. One of these two parameters must be specified.


TCustomWinSocket.Listen
 VCL Reference

TCustomWinSocket.Listen

TCustomWinSocket	See also

Opens a listening connection for a server socket.

procedure Listen(const Name, Address, Service: string; Port: Word; QueueSize: Integer; Block: Boolean=True);

Description

Server socket components call Listen to open a listening connection.

Listen creates the Windows socket that will make the listening connection, and binds the Windows Internet socket address derived from the parameters to the socket. Listen then generates an OnSocketEvent of type seListen. Finally, Listen opens the socket as a listening connection with a queue that can hold QueueSize client requests, setting the Connected property to True.

The Name, Address, Service, and Port parameters are taken from the Host, Address, Service and Port properties of the server socket component.

QueueSize indicates how many client requests the listening connection can hold. TServerSocket sets the QueueSize to 5.

Block indicates whether the socket can look up the information it needs to establish a connection asynchronously. When Block is True, the socket blocks execution for each lookup instead of retrieving information about the connection using asynchronous notifications.


TCustomWinSocket.Lock
 VCL Reference

TCustomWinSocket.Lock

TCustomWinSocket	See also

Starts a critical section, blocking all other execution threads until the Unlock method is called.

procedure Lock;

Description

Call Lock before beginning a section of code that is not thread-safe. Call Unlock when the critical section of code is completed. Unless absolutely necessary, do not use Lock to lock lengthy operations such as reading and writing over a blocking connection. Locking lengthy operations can severely impact performance, because all execution threads in the application that use the Windows socket object must wait until Unlock is called.


TCustomWinSocket.LookupName
 VCL Reference

TCustomWinSocket.LookupName

TCustomWinSocket	See also

Generates the portion of a Windows Internet socket address structure that describes the host.

function LookupName(const name: string): TInAddr;

Description

Call LookupName to obtain the Internet address associated with the system identified by the name parameter. LookupName is used by InitSocket to generate the portion of the Windows Internet socket address structure that identifies the host.


TCustomWinSocket.LookupService
 VCL Reference

TCustomWinSocket.LookupService

TCustomWinSocket	See also

Returns the port number associated with a specific service.

function LookupService(const service: string): Integer;

Description

Call LookupService to obtain the standard port number for the service named by the service parameter. Windows provides a number of standard service names such as ftp, http, finger, or time. Each standard service is associated, by convention, with a specific port number. These standard port numbers allow client sockets to indicate the desired service by requesting a specific port number. They allow server sockets to listen on an expected port number for the service offered. Servers can specify additional services and their associated ports in a SERVICES file. For more information on the SERVICES file, see the Microsoft documentation for Windows sockets.

InitSocket calls LookupService to obtain the port number for the Service specified by a socket component.


TCustomWinSocket.Open
 VCL Reference

TCustomWinSocket.Open

TCustomWinSocket	See also

Opens a connection to a remote socket.

procedure Open(const Name, Address, Service: string; Port: Word; Block: Boolean=True);

Description

Client socket components call Open to open a connection to a server socket.

Open creates the Windows socket that will connect to the server socket, and generates an OnSocketEvent of type seLookup. After the OnSocketEvent, Open binds the Windows Internet socket address derived from the parameters to the socket, locating the server socket. Open then generates an OnSocketEvent of type seConnecting. When the server socket accepts the connection, Open completes the connection to the server socket. Then it generates an OnSocketEvent of type seConnect. After the OnSocketEvent, the Connected property is set to True.

The Name, Address, Service, and Port parameters are taken from the Host, Address, Service and Port properties of the client socket component.

Block indicates whether the socket can look up the information it needs to establish a connection asynchronously. When Block is True, the socket blocks execution for each lookup instead of retrieving information about the connection using asynchronous notifications.


TCustomWinSocket.Read
 VCL Reference

TCustomWinSocket.Read

TCustomWinSocket	See also

Generates an OnSocketEvent of type seRead in response to notifications that the socket connection is ready.

procedure Read(Socket: TSocket); virtual;

Description

Read is called in response to asynchronous notifications that the socket connection is ready for reading. The Windows socket can then read from the connection in the OnSocketEvent event handler or the socket component can read from the connection in an OnRead or OnClientRead event handler. The event handler can use the ReceiveBuf method or the ReceiveText method to read the information from the connection.

Note:	Read is only called for asynchronous read notifications in a non-blocking socket. Blocking sockets must use a TWinSocketStream object for reading. The TWinSocketStream object waits for the remote socket to be ready before transferring information.


TCustomWinSocket.ReceiveBuf
 VCL Reference

TCustomWinSocket.ReceiveBuf

TCustomWinSocket	See also

Reads up to Count bytes from the socket connection into the Buf parameter.

function ReceiveBuf(var Buf; Count: Integer): Integer;

Description

Use ReceiveBuf to read from the socket connection in the OnSocketEvent event handler of a Windows socket object or in the OnRead or OnClientRead event handler of a socket component. ReceiveBuf returns the number of bytes actually read. If no bytes are read, ReceiveBuf returns –1.

ReceiveBuf only works in response to a read notification to a non-blocking windows socket. Blocking sockets must use a TWinSocketStream for reading. The TWinSocketStream object waits for the remote socket to be ready before transferring information.

Note:	While the ReceiveLength method can return an estimate of the size of buffer required to retrieve information from the socket, the number of bytes it returns is not necessarily accurate.


TCustomWinSocket.ReceiveLength
 VCL Reference

TCustomWinSocket.ReceiveLength

TCustomWinSocket	See also

Returns the number of bytes ready to be sent over the socket connection.

function ReceiveLength: Integer;

Description

Call ReceiveLength to determine the amount of information to read over the socket connection in response to an asynchronous read notification.

Note:	ReceiveLength is not guaranteed to be accurate for streaming socket connections.


TCustomWinSocket.ReceiveText
 VCL Reference

TCustomWinSocket.ReceiveText

TCustomWinSocket	See also

Reads a string from the socket connection.

function ReceiveText: string;

Description

Use ReceiveText to read a string from the socket connection in the OnSocketEvent event handler of a Windows socket object or in the OnRead or OnClientRead event handler of a socket component. ReceiveText returns the string that was read.

ReceiveText only works in response to a read notification to a non-blocking windows socket. Blocking sockets must use a TWinSocketStream for reading. The TWinSocketStream object waits for the remote socket to be ready before transferring information.


TCustomWinSocket.SendBuf
 VCL Reference

TCustomWinSocket.SendBuf

TCustomWinSocket	See also

Writes Count bytes to the socket connection from the Buf parameter.

function SendBuf(var Buf; Count: Integer): Integer;

Description

Use SendBuf to write to the socket connection. Call this method from the OnSocketEvent event handler of a Windows socket object or in the OnWrite or OnClientWrite event handler of a socket component. Alternately, Use SendBuf to write when a connection is first formed when the socket does not expect notification that the socket on the other end of the connection is expecting to read.

For non-blocking sockets, the data is sent to the WinSock DLL which has it's own internal buffers. If the WinSock can accept additional data, SendBuf returns immediately with the number of bytes queued. If the WinSock internal buffer space is not able to accept the buffer being sent, SendBuf returns -1 and no data is queued at all. In this case, wait a bit for the WinSock to have a chance to send out already-queued data; then try again.

For blocking sockets, SendBuf returns the number of bytes actually written.

If an error occurs while writing to the connection, SendBuf terminates the connection and raises an ESocketError exception.


TCustomWinSocket.SendStream
 VCL Reference

TCustomWinSocket.SendStream

TCustomWinSocket	See also

Writes all the information that can be read from the AStream parameter to the socket connection.

function SendStream(AStream: TStream): Boolean;

Description

Use SendStream to write to the socket connection. The writing may occur in the OnSocketEvent event handler of a Windows socket object or in the OnWrite or OnClientWrite event handler of a socket component. Alternately, SendStream may write from a socket that is expected to write to the connection without a notification to signal the connection’s readiness to read. SendStream reads information from the stream indicated by AStream and writes it to the socket connection. The value returned by SendStream indicates whether any information was successfully written to the connection.

Note:	The Stream passed as a parameter to SendStream becomes “owned” by the windows socket object.  The Windows socket object frees the stream when it is finished with it.  Do not attempt to free the stream after it has been passed as a parameter.


TCustomWinSocket.SendStreamThenDrop
 VCL Reference

TCustomWinSocket.SendStreamThenDrop

TCustomWinSocket	See also

Writes all the information that can be read from the AStream parameter to the socket connection and then terminates the connection.

function SendStreamThenDrop(AStream: TStream): Boolean;

Description

Use SendStreamThenDrop to write to a socket connection when the connection is no longer needed after the writing is complete. SendStream reads information from the stream indicated by AStream and writes it to the socket connection, shutting down the connection when it is done. The value returned by SendStream indicates whether any information was successfully written to the connection.

Note:	The Stream passed as a parameter to SendStream becomes “owned” by the windows socket object.  The Windows socket object frees the stream when it is finished with it.  Do not attempt to free the stream after it has been passed as a parameter.


TCustomWinSocket.SendText
 VCL Reference

TCustomWinSocket.SendText

TCustomWinSocket	See also	Example

Writes the string S to the socket connection.

function SendText(const S: string): Integer;

Description

Use SendText to write a string to the socket connection. The writing may occur in the OnSocketEvent event handler of a Windows socket object or in the OnWrite or OnClientWrite event handler of a socket component. Alternately, SendText may write from a socket that is expected to write to the connection without a notification to signal the connection’s readiness to read. If an error occurs while writing to the connection, SendText terminates the connection and raises an ESocketError exception.

SendText returns the number of bytes sent. Note that this may be less than the length of the string S if the socket is nonblocking.


TCustomWinSocket.SetAsyncStyles
 VCL Reference

TCustomWinSocket.SetAsyncStyles

TCustomWinSocket	See also

Sets the AsyncStyles property.

type

  TAsyncStyle = (asRead, asWrite, asOOB, asAccept, asConnect, asClose);

  TAsyncStyles = set of TAsyncStyle;

procedure SetAsyncStyles(Value: TASyncStyles);

Description

SetAsyncStyles implements the AsyncStyles property. Override SetAsyncStyles to limit the value of AsyncStyles to notifications that are appropriate to a particular type of Windows socket.


TCustomWinSocket.Unlock
 VCL Reference

TCustomWinSocket.Unlock

TCustomWinSocket	See also

Reenables execution in other threads after a critical section begun by the Lock method.

procedure Unlock;

Description

Call Unlock at the end of a section of code that is not thread-safe. Every call to Unlock should match a call to the Lock method at the beginning of the critical section of code.


TCustomWinSocket.Write
 VCL Reference

TCustomWinSocket.Write

TCustomWinSocket	See also

Generates an OnSocketEvent of type seWrite in response to notifications that the socket connection is ready.

procedure Write(Socket: TSocket); virtual;

Description

Write is called in response to asynchronous notifications that the socket connection is ready for the socket to send information. The Windows socket can write to the connection in the OnSocketEvent event handler or the socket component can write to the connection in an OnWrite or OnClientWrite event handler. The event handler can use the SendBuf method, the SendStream method, or the SendText method to write the information to the connection.

Note:	Write is only called for asynchronous write notifications in a non-blocking socket. Blocking sockets must use their own mechanisms for determining when the connection is ready for the socket to write.


Hierarchy

TObject

TCustomWinSocket


TDatabase
 VCL Reference

 TDatabase

Hierarchy	Properties	Methods	Events	Using TDatabase	See also

TDatabase provides discrete control over a connection to a single database in a BDE-based database application.

Unit

DBTables

Description

Use TDatabase when a BDE-based database application requires any of the following control over a database connection:

Persistent database connections

Customized database server logins

Transaction control

Application-specific BDE aliases

TDatabase is especially important for the control it permits over database transaction processing with the BDE when connected to a remote SQL database server.

Note:	Explicit declaration of a TDatabase component for each database connection in an application is optional if the application does not need to explicitly control that connection. If a TDatabase component is not explicitly declared and instantiated for a database connection, a temporary database component with a default set of properties is created for it at runtime.


 VCL Reference

TDatabase properties

TDatabase	Alphabetically	Legend

In TDatabase

AliasName

Connected

DatabaseName

DataSets

Directory

DriverName

Exclusive

Handle

HandleShared

InTransaction

IsSQLBased

KeepConnection

Locale

Params

Session

SessionAlias

SessionName

ReadOnly

Temporary

TraceFlags

TransIsolation

In TCustomConnection

DataSetCount

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDatabase properties

TDatabase	By object	Legend

AliasName

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DatabaseName

DataSetCount

DataSets

DesignInfo

Directory

DriverName

Exclusive

Handle

HandleShared

InTransaction

IsSQLBased

KeepConnection

Locale

LoginPrompt

Name

Owner

Params

ReadOnly

Session

SessionAlias

SessionName

Tag

Temporary

TraceFlags

TransIsolation

VCLComObject


TDatabase.AliasName
 VCL Reference

TDatabase.AliasName

TDatabase	See also

Specifies the Borland Database Engine (BDE) alias used by this database connection.

property AliasName: String;

Description

Use AliasName to specify the name of an existing BDE alias for the database component. A BDE alias contains database configuration information for connection to a specific kind of database, such as InterBase, dBASE, or Paradox. The configuration information associated with a BDE alias differs by database type.

If an application sets AliasName, any value previously assigned to the DriverName property is cleared because the alias automatically specifies a driver name as one of its parameters. Other alias connection information is stored in the Params property when AliasName is set.

Note:	Attempting to set AliasName when the Connected property is True raises an exception.

Note:	An application can specify the DatabaseName, DriverName, and Params properties rather than setting AliasName if the desired BDE alias configuration does not already exist. An application can also provide an application-specific “alias” name by setting DatabaseName when AliasName is already set.

Tip:	At design time double-click a TDatabase component to invoke the Database editor and set the AliasName.


TDatabase.Connected
 VCL Reference

TDatabase.Connected

TDatabase	See also	Example

Indicates whether a database connection is active.

property Connected: Boolean;

Description

Set Connected to True to establish a database connection without opening a dataset. Set Connected to False to close a database connection. An application can check Connected to determine the current status of a database connection. If Connected is True, the database connection is active; if False, and the KeepConnection property is also False, then the connection is inactive.

Note:	Set KeepConnection to True to avoid having to log in to the server each time a database connection is reopened.


TDatabase.DatabaseName
 VCL Reference

TDatabase.DatabaseName

TDatabase	See also

Specifies the name of the database to associate with this database component.

property DatabaseName: string;

Description

Use DatabaseName to specify the name of the database to use with a database component. If DatabaseName is the same as an existing Borland Database Engine (BDE) alias, then the AliasName and DriverName properties need not be set. If DatabaseName does not match an existing BDE alias, then either the application must also supply a valid alias in the AliasName property in addition to the DatabaseName, or it must supply the DriverName and Params properties.

DatabaseName can be a fully qualified path name when connecting to a Paradox or dBASE database.

Note:	Attempting to set DatabaseName when the Connected property is True raises an exception.

Tip:	At design time double-click a TDatabase component to invoke the Database editor and set the DatabaseName.


TDatabase.DataSets
 VCL Reference

TDatabase.DataSets

TDatabase	See also 	Example

Provides an indexed array of all active datasets for a database component.

property DataSets[Index: Integer]: TDBDataSet;

Description

Use DataSets to access active datasets associated with a database component. An active dataset is one that is currently open.

Note:	If a TBDEClientDataSet uses the connection component to connect to a database server, DataSets lists the internal dataset that the client dataset creates to access data, not the client dataset itself.


TDatabase.Directory
 VCL Reference

TDatabase.Directory

TDatabase	See also

Specifies the working directory for a Paradox or dBASE database.

property Directory: String;

Description

Use Directory at runtime to change or retrieve the working directory for a Paradox or dBASE database. This is the location these databases use to create temporary tables at runtime.

Ordinarily a directory location is specified in the PATH parameter of the database alias (specified by the AliasName property). At runtime, however, some applications may need to change the working directory after a database is opened.

To change the value of Directory at runtime, a database must already be open, or an exception is raised. Clearing the current value of Directory sets its value to the original working directory specified when the database was first opened.

Note:	Do not use Directory when connected to remote databases. An exception is raised in these circumstances. An exception is also raised if an application accesses Directory when the database is closed.


TDatabase.DriverName
 VCL Reference

TDatabase.DriverName

TDatabase	See also

Specifies the name of the BDE driver for the database.

property DriverName: String;

Description

Use DriverName to specify the name of the BDE driver to use for databases connections that do not specify an AliasName, but that do specify a DatabaseName. DriverName must be a valid BDE driver (for instance, STANDARD, ORACLE, SYBASE, or INTERBASE).

Note:	If an application sets DriverName, it must also specify connection parameters in the Params property. Ordinarily the alias specified in the AliasName property supplies connection parameters, but when DriverName is set, the AliasName property is automatically cleared to avoid BDE driver name contention.

Attempting to set DriverName when the Connected property is True raises an exception.

Tip:	At design time double-click a TDatabase component to invoke the Database editor and set the DriverName.


TDatabase.Exclusive
 VCL Reference

TDatabase.Exclusive

TDatabase	See also

Enables an application to gain sole access to a database.

property Exclusive: Boolean;

Description

Use Exclusive to prevent other applications from accessing a Paradox or dBASE database while this application is using it. Before opening the database, set Exclusive to True. The default value for Exclusive is False, allowing other applications to use the opened database.

When Exclusive is True and the application successfully opens the database, no other application can access it. If the database for which the application has requested exclusive access is already in use by another application, an exception is raised. To handle such exceptions, write an exception handler. All tables in the database are effectively opened exclusively, as other applications would be prevented from opening the database and the tables would be inaccessible.

A table database must be closed before changing the setting of the Exclusive property. Do not set Exclusive to True at design time if you also intend to set the Connected property to True at design time. In this case an exception is raised because the database is already in use by the IDE.

Note:	An application can attempt to set Exclusive to True for SQL databases, but some SQL servers do not support exclusive database-locking. Others may grant an exclusive read/write lock, but still permit read-only access to other applications. For more information about exclusive locking of databases for a specific server, see the server’s documentation.


TDatabase.Handle
 VCL Reference

TDatabase.Handle

TDatabase	See also

Specifies the Borland Database Engine (BDE) database handle.

type HDBIDB: Longint;

property Handle: HDBIDB;

Description

Use Handle only to bypass TDatabase methods and make direct calls to the directly to the BDE API. Many BDE function calls require a handle parameter. Handle is assigned an initial value when a database is opened.

Note:	Do not use this property unless an application requires BDE functionality not available through standard Delphi components.


TDatabase.HandleShared
 VCL Reference

TDatabase.HandleShared

TDatabase	See also

Specifies whether to share a database handle.

property HandleShared: Boolean;

Description

Use HandleShared to indicate that a database component can share its BDE handle in a session component. Set HandleShared to True to avoid namespace conflicts for database components that appear in a remote data module, or that appear in data modules you inherit from the Object Repository.


TDatabase.InTransaction
 VCL Reference

TDatabase.InTransaction

TDatabase	See also

Indicates whether a database transaction is in progress or not.

property InTransaction: Boolean

Description

Examine InTransaction at run-time to determine if a database transaction is currently in progress. InTransaction is True if a transaction is in progress, False otherwise.

The value of InTransaction cannot be changed directly. Calling StartTransaction sets InTransaction to True. Calling Commit or Rollback sets InTransaction to False.


TDatabase.IsSQLBased
 VCL Reference

TDatabase.IsSQLBased

TDatabase	See also

Indicates if a database component is using either the Borland Database Engine (BDE) SQL Links driver or the BDE ODBC socket.

property IsSQLBased: Boolean;

Description

Examine IsSQLBased at runtime to determine if a database connection is using a BDE SQL Links driver, the ODBC socket, or the Paradox, dBASE, and ASCII text file STANDARD driver. If IsSQLBased is True, the connection is using an SQL Links driver or is using the ODBC socket to communicate with a third-party ODBC driver. If the connection uses the STANDARD driver, IsSQLBased is False.


TDatabase.KeepConnection
 VCL Reference

TDatabase.KeepConnection

TDatabase	See also

Specifies whether an application remains connected to a database even if no datasets are open.

property KeepConnection: Boolean;

Description

Use KeepConnection to specify whether an application remains connected to a database even if no datasets are currently open. When KeepConnection is True (the default) the connection is maintained. For connections to remote database servers, or for applications that frequently open and close datasets, set KeepConnection to True to reduce network traffic, speed up applications, and avoid logging in to the server each time the connection is reestablished.

When KeepConnection is False a connection is dropped when there are no open datasets. Dropping a connection releases system resources allocated to the connection, but if a dataset is later opened that uses the database, the connection must be reestablished and initialized.

Note:	The KeepConnection setting for temporary database components created automatically as needed is determined by the KeepConnections property of TSession.


TDatabase.Locale
 VCL Reference

TDatabase.Locale

TDatabase	See also

Identifies the Borland Database Engine (BDE) language driver for the database component.

type TLocale: Pointer;

property Locale: TLocale;

Description

Examine Locale to determine the BDE language driver used by the database component. Applications that make direct calls to the BDE may also need to pass Locale information as an API function parameter.

Language driver information may also be available as one of the values in the Params property when a database component is using a BDE alias.

Note:	Do not use this property unless an application requires BDE functionality not available through standard Delphi components.


TDatabase.Params
 VCL Reference

TDatabase.Params

TDatabase	See also

Contains database connection parameters for the Borland Database Engine (BDE) alias associated with the database component.

property Params: TStrings;

Description

Use Params to examine or specify database connection parameters, such as path name, server name, schema-caching size, language driver, user name, and password. Actual parameters in Params differ depending on the current BDE alias and driver for the database component.

Params is a list of string items, each representing a different database connection parameter. If the AliasName property specifies a valid BDE alias, then Params automatically contains the parameters defined for that alias. If, instead of providing an alias, an application uses the DriverName property to provide a local alias, the application must provide Params values directly.

Note:	Applications can use Params to override the default settings supplied by a BDE alias.

Tip:	At design time double-click a TDatabase component to invoke the Database editor and set Params.


TDatabase.ReadOnly
 VCL Reference

TDatabase.ReadOnly

TDatabase	See also

Specifies that the database connection provides read-only access.

property ReadOnly: Boolean;

Description

Use ReadOnly to specify whether the database connection should allow the application to update the tables and other metadata in the database. Set ReadOnly before opening the database.

When ReadOnly is False (the default), the application can modify tables and database metadata (like indexes). When ReadOnly is True, applications can browse tables but cannot update them. The application is also prevented from creating or deleting metadata objects like tables and indexes.

Note:	A ReadOnly property value of True should be used when accessing a dBASE or Paradox database on a read-only storage medium, such as a CD.

Note:	For SQL databases, if ReadOnly is True, you must also explicitly set the ReadOnly property to True for dataset components like TTable and TQuery.


TDatabase.Session
 VCL Reference

TDatabase.Session

TDatabase	See also

Points to the session component with which this database component is associated.

property Session: TSession

Description

Use Session to determine the session component that controls the database component. By default, a database component is associated with the default session component, Session, that is automatically created for all database applications. To assign a database component to a different session in a multi-threaded application, specify the name of a different session component in the SessionName property.


TDatabase.SessionAlias
 VCL Reference

TDatabase.SessionAlias

TDatabase	See also

Specifies whether a database component is using a session alias.

property SessionAlias: Boolean;

Description

Examine SessionAlias to see if a database component is using a session alias. If SessionAlias is True, a session alias is in use. If False, a session alias is not in use.

A session alias is automatically created for a database component if it

Uses the DriverName and Params properties instead of the AliasName property, and the Params property contains any parameters.

Overrides Params values supplied by a BDE alias in AliasName.

A session alias may also be created if an application permits the user to log into a server using a different user name than the one specified in the Params property.

A session alias exists only while the application is running. It is not stored in the BDE configuration file, and cannot be accessed from outside the application.


TDatabase.SessionName
 VCL Reference

TDatabase.SessionName

TDatabase	See also 	Example

Identifies the name of the session used by this database component.

property SessionName: String;

Description

Use SessionName to specify the session with which a database component is associated. If SessionName is blank, a database component is automatically associated with the default session, Session.

To associate a database component with a different session in a database application SessionName must matches the SessionName property of an existing session component.


TDatabase.Temporary
 VCL Reference

TDatabase.Temporary

TDatabase	See also

Indicates whether a database component is a temporary one, created by the system as needed, or a persistent one explicitly created, managed, and freed within the application.

property Temporary: Boolean;

Description

Examine Temporary to determine if a database component is a temporary one, created by the system as needed, or a persistent one explicitly created, managed, and freed within the application. Temporary is True if the system created the component, False otherwise.

A temporary database component is created when a dataset is opened and the dataset is not already associated with an existing database component. If Temporary remains True, then a temporary database component is freed when the dataset is closed. An application can prevent the destruction of a temporary database component by setting Temporary to False while the dataset is active, but the application is then responsible for closing the database when it is no longer needed.


TDatabase.TraceFlags
 VCL Reference

TDatabase.TraceFlags

TDatabase	See also

Specifies the database operations to track with the SQL Monitor at runtime.

type

  TTraceFlag = (tfQPrepare, tfQExecute, tfError, tfStmt, tfConnect, tfTransact, tfBlob, tfMisc, tfVendor, tfDataIn, tfDataOut);

  TTraceFlags = set of TTraceFlag;

property TraceFlags: TTraceFlags;

Description

Use TraceFlags to specify which database operations the SQL Monitor should track in an application at runtime. TraceFlags is only meaningful for the SQL Monitor, which is provided to enable performance tuning and SQL debugging when working with remote SQL database servers.

Note:	Normally trace options are set from the SQL Monitor rather than setting TraceFlags in application code.

The value of a session component’s TraceFlags property determines the initial settings of the TraceFlags property for database components associated with the session.

The TTraceFlags type defines the individual values that can be included in the TraceFlags property. The following table summarizes those values:

Values	Meaning

tfQPrepare	Monitor Prepare statements.

tfQExecute	Monitor ExecSQL statements.

tfError	Monitor server error messages. Such messages may include an error code.

tfStmt	Monitor all SQL statements.

tfConnect	Monitor database connect and disconnect operations, including allocation of connection handles, and freeing connection handles.

tfTransact	Monitor transaction statements, such as StartTransaction, Commit, and Rollback.

tfBlob	Monitor operations on blob data types.

tfMisc	Monitor any statements not covered by other flag options.

tfVendor	Monitor direct API function calls to the database server.

tfDataIn	Monitor data received from a server.

tfDataOut	Monitor data sent to a server.

Because TraceFlags is a set property, an application can specify different combinations of flags to monitor different combinations of statements. For example, the following statement limits monitoring to database connections and SQL statement preparation:

TraceFlags := [tfConnect, tfQPrepare];


TDatabase.TransIsolation
 VCL Reference

TDatabase.TransIsolation

TDatabase	See also

Specifies the transaction isolation level for transactions managed by the Borland Database Engine (BDE).

type TTransIsolation = (tiDirtyRead, tiReadCommitted, tiRepeatableRead);

property TransIsolation: TTransIsolation;

Description

Use TransIsolation to specify the transaction isolation level for database transactions managed by the BDE. Transaction isolation level determines how a transaction interacts with other simultaneous transactions when they work with the same tables, and how much a transaction sees of the work performed by other transactions.

Note:	Applications that use passthrough SQL for handling transactions must pass a transaction isolation level directly to the database server using the appropriate SQL statement.

TransIsolation can be any one of the three values summarized in the following table:

Isolation level	Meaning

tiDirtyRead	Permits reading of uncommitted changes made to the database by other simultaneous transactions. Uncommitted changes are not permanent, and might be rolled back (undone) at any time. At this level a transaction is least isolated from the effects of other transactions.

tiReadCommitted	Permits reading of committed (permanent) changes made to the database by other simultaneous transactions. This is the default TransIsolation property value.

tiRepeatableRead	Permits a single, one-time reading of the database. The transaction cannot see any subsequent changes made by other simultaneous transactions. This isolation level guarantees that once a transaction reads a record, its view of that record does not change unless it makes a modification to the record itself. At this level, a transaction is most isolated from other transactions.

Different database servers support different levels of transaction isolation. If an application sets TransIsolation to an unsupported level for a remote SQL server, the BDE uses the next highest level supported by that server. The following table summarizes the isolation levels supported by the servers recognized by the BDE:

Server	Specified Level	Actual Level
Oracle	tiDirtyRead tiReadCommitted tiRepeatableRead	tiReadCommitted tiReadCommitted tiRepeatableRead (READONLY)
Sybase, MS-SQL	tiDirtyRead tiReadCommitted tiRepeatableRead	tiReadCommitted tiReadCommitted Not supported
DB2	tiDirtyRead tiReadCommitted tiRepeatableRead	tiDirtyRead tiReadCommitted tiRepeatableRead
Informix	tiDirtyRead tiReadCommitted tiRepeatableRead	tiDirtyRead tiReadCommitted tiRepeatableRead
InterBase	tiDirtyRead tiReadCommitted tiRepeatableRead	tiReadCommitted tiReadCommitted tiRepeatableRead
Paradox, dBASE, Access, FoxPro	tiDirtyRead tiReadCommitted tiRepeatableRead	tiDirtyRead Not supported Not supported
Note:	For local transactions against Paradox and dBASE, TransIsolation must be set to tiDirtyRead. Otherwise, an exception is raised.

If an application uses ODBC to interface with a server, the ODBC driver must also support the isolation level. For more information about supported isolation levels, see the documentation for the ODBC driver in question.


 VCL Reference

TDatabase events

TDatabase	Alphabetically	Legend

In TDatabase

OnLogin

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect


 VCL Reference

TDatabase events

TDatabase	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


TDatabase.OnLogin
 VCL Reference

TDatabase.OnLogin

TDatabase	See also

Occurs when an application connects to a database.

type TDatabaseLoginEvent = procedure(Database: TDatabase; LoginParams: TStrings) of object;

property OnLogin: TDatabaseLoginEvent;

Description

Write an OnLogin event handler to take specific actions when an application attempts to connect to a database. When the LoginPrompt property is True, a database login is required.

If there is no OnLogin event handler, the current USERNAME is read from the Params property, and a standard Login dialog box opens. The dialog prompts for a user name and password combination, and then uses the values entered by the user to set the USERNAME and PASSWORD values in the Params property. These values are then passed to the remote server.

Applications that provide alternative OnLogin event handlers must set the USERNAME and PASSWORD values in LoginParams. LoginParams is a temporary string list and is freed automatically when no longer needed.

Note:	The login dialog and OnLogin event only occur when the LoginPrompt property is True.


 VCL Reference

TDatabase methods

TDatabase	Alphabetically	Legend

In TDatabase

ApplyUpdates

CloseDataSets

Commit

Create

Destroy

Execute

FlushSchemaCache

GetFieldNames

GetTableNames

Rollback

StartTransaction

ValidateName

In TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDatabase methods

TDatabase	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

CloseDataSets

Commit

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

FlushSchemaCache

Free

FreeInstance

FreeNotification

FreeOnRelease

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTableNames

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Rollback

SafeCallException

SetSubComponent

StartTransaction

UpdateAction

ValidateName


TDatabase.ApplyUpdates
 VCL Reference

TDatabase.ApplyUpdates

TDatabase	See also	Example

Posts pending cached updates for specified datasets to the database server.

procedure ApplyUpdates(const DataSets: array ofTDBDataSet);

Description

Call ApplyUpdates to post pending cached updates for a specific set of open datasets to the database server. ApplyUpdates is only meaningful if the CachedUpdates property of a specified dataset is True.

DataSets is a list of dataset names specifying the datasets for which to post pending updates. DataSets need not list every currently open dataset. For each listed dataset ApplyUpdates calls the dataset’s ApplyUpdates and CommitUpdates methods to post that dataset’s pending cached updates.

Applying updates is a two-phase process that takes place within the context of the database component’s transaction control. When an application calls ApplyUpdates, the following events take place:

1	A database transaction starts.

2	Cached updates are written to the database (Phase 1).

If the database write is successful:

1  Database changes are committed, ending the transaction.

2  Cached updates are committed, clearing the internal cache buffer (Phase 2).

If the database write fails database changes are rolled back, ending the transaction.

The two-phased approach allows for effective error recovery, especially when updating multiple and interrelated datasets (for example, the datasets associated with a master/detail form).


TDatabase.CloseDataSets
 VCL Reference

TDatabase.CloseDataSets

TDatabase	See also

Closes all datasets associated with the database component without disconnecting from the database server.

procedure CloseDatasets;

Description

Call CloseDataSets to close all active datasets without disconnecting from the database server. Ordinarily, when an application calls Close, all datasets are closed, and the connection to the database server is dropped. Calling CloseDataSets instead of Close ensures that an application can close all active datasets without having to reconnect to the database server at a later time.


TDatabase.Commit
 VCL Reference

TDatabase.Commit

TDatabase	See also 	Example

Permanently stores updates, insertions, and deletions of data associated with the current transaction, and ends the current transactions.

procedure Commit;

Description

Call Commit to permanently store to the database server all updates, insertions, and deletions of data associated with the current transaction and then end the transaction. The current transaction is the last transaction started by calling StartTransaction.

Note:	Before calling Commit, an application may check the status of the InTransaction property. If an application calls Commit and there is no current transaction, an exception is raised.


TDatabase.Create
 VCL Reference

TDatabase.Create

TDatabase	See also

Creates an instance of a TDatabase component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a database component at runtime. An application can create a database component in order to control the component’s existence and set its properties and events, or an application can let Delphi create temporary database components as needed at runtime.

Create instantiates a database component and:

Sets the Session property to the active session.

Sets the SessionName property to the name of the active session component.

Adds this component to the list of database components for the session.

Creates an empty list of dataset components for the DataSets property.

Creates an empty string list for the Params property.

Sets the LoginPrompt property and the KeepConnection property to True.

Sets the Locale property to the locale of the session.

Sets the TransIsolation property to tiReadCommitted.


TDatabase.Destroy
 VCL Reference

TDatabase.Destroy

TDatabase	See also

Destroys the instance of a database component.

destructor Destroy;

Description

Do not call Destroy directly in an application. Instead, call Free, which verifies that the database reference is not nil before calling Destroy

Destroy closes all active datasets and disconnects from the database server, if necessary. It then frees the string resources allocated for the Params and DataSets properties before calling its inherited destructor.


TDatabase.Execute
 VCL Reference

TDatabase.Execute

TDatabase	See also	Example

Executes an SQL statement.

function Execute(const SQL: String; Params: TParams = nil; Cache: Boolean = False; Cursor: phDBICur = nil): Integer;

Description

Use Execute to execute an SQL statement against the database without the overhead of using a TQuery object. Execute supports Data Definition Language (DDL) SQL statements and those Data Manipulation Language (DDL) SQL statements that do not return result sets. Examples of DDL statements include: CREATE INDEX, ALTER TABLE, and DROP DOMAIN. The DML statements that perform an action on data but do not return a result set are: INSERT, DELETE, and UPDATE.

SQL is a String value containing the statement to be executed.

Params is a value of type TParams and lists any parameters used by the SQL statement. Parameter binding is by index only (not by name). The TParam objects in Params must be in the same order as the the parameters in the SQL statement to which each corresponds. Use the TParams.CreateParam method to create one TParams object for each parameter in the SQL statement. Use properties and methods of TParam to configure each Tparam and to give each a value prior to calling Execute. If the SQL statement does not include any parameters, pass a nil value for Params.

Cache specifies whether the prepared SQL statement is cached for reuse within the current transaction. Caching statements can speed their processing if they are used more than once in a transaction.

Cursor allows you to execute a SELECT statement and from it create a Borland Database Engine (BDE) dataset. If SQL is a SELECT statement, Cursor returns the BDE cursor to the result set. Cursor is a pointer to an already existing BDE cursor. There is currently no provision in the VCL to assign the cursor created by this parameter to a dataset component (like TTable). This limits its use to cursors subsequently operated on using BDE API code. The result set returned in Cursor is always read-only. If the SQL statement does not return a result set, pass a nil value for Cursor.

Execute returns the number of records affected by executing the SQL statement.


TDatabase.FlushSchemaCache
 VCL Reference

TDatabase.FlushSchemaCache

TDatabase	See also

Flushes the cached schema information for a table.

procedure FlushSchemaCache(const TableName: String);

Description

Call FlushSchemaCache if the schema information for an SQL table is changed (for example, because a field, index, or table is added to or dropped from a database).

When an application opens an SQL table, schema information that describes the field names, field types, and index information is stored in memory. If an application changes the schema for an SQL table, it should call FlushSchemaCache to update the schema information in memory.


TDatabase.GetFieldNames
 VCL Reference

TDatabase.GetFieldNames

TDatabase	See also

Populates a string list with the names of fields in a table.

procedure GetFieldNames(const TableName: String; List: TStrings);

Description

Call GetFieldNames to retrieve a list of fields in a table.

TableName names the table whose field names you want added to the list.

List is a TStrings descendant that receives the field names. Any existing strings are deleted from the list before GetFieldNames adds the names of all the fields in TableName.

For example, the following line fills a list box with the names of all fields in the Employee table:

Database1.GetFieldNames('Employee', ListBox1.Items);


TDatabase.GetTableNames
 VCL Reference

TDatabase.GetTableNames

TDatabase	See also

Populates a string list with the names of tables in the database.

procedure GetTableNames(List: TStrings; SystemTables: Boolean = False);

Description

Call GetTableNames to retrieve a list of tables in the associated database.

List is a TStrings descendant that receives the table names. Any existing strings are deleted from the list before GetTableNames adds the names of all tables in the database.

SystemTables specifies whether the list of table names should include only the database’s system tables. If SystemTables is True, only the system tables are added to List. If SystemTables is False, the list is filled with ordinary tables.

For example, the following line fills a list box with the names of all tables in the database:

Database1.GetTableNames(ListBox1.Items, False);


TDatabase.Rollback
 VCL Reference

TDatabase.Rollback

TDatabase	See also 	Example

Cancels all updates, insertions, and deletions for the current transaction and ends the transaction.

procedure Rollback;

Description

Call Rollback to cancel all updates, insertions, and deletions for the current transaction and to end the transaction. The current transaction is the last transaction started by calling StartTransaction.

Note:	Before calling Rollback, an application may check the status of the InTransaction property. If an application calls Rollback and there is no current transaction, an exception is raised.


TDatabase.StartTransaction
 VCL Reference

TDatabase.StartTransaction

TDatabase	See also 	Example

Begins a new transaction against the database server.

procedure StartTransaction;

Description

Call StartTransaction to begin a new transaction against the database server. Before calling StartTransaction, an application should check the status of the InTransaction property and adjust the setting of the TransIsolation property as desired. If InTransaction is True, indicating that a transaction is already in progress, a subsequent call to StartTransaction without first calling Commit or Rollback to end the current transaction raises an exception.

Updates, insertions, and deletions that take place after a call to StartTransaction are held by the server until an application calls Commit to save the changes or Rollback is to cancel them.


TDatabase.ValidateName
 VCL Reference

TDatabase.ValidateName

TDatabase	See also 	Example

Raises an exception if a specified database is already open in the active session.

procedure ValidateName(const Name: String);

Description

Call ValidateName to prevent duplicate access to a database from within a single session. Name is a string containing the name of the database to test. If the database is already open, ValidateName raises the EDatabaseError exception. If the database is not open, the procedure returns, and the application continues processing.

Note:	Most applications should not need to call this method directly. It is called automatically each time a database is opened.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TDatabase


THTTPDataLink
 VCL Reference

THTTPDataLink

Hierarchy	Properties	Methods	See also

THTTPDataLink helps TDSTableProducer manage its link to the data source.

Unit

DBWeb

Description

THTTPDataLink is tailored to work with a TDSTableProducer object. It should only be used by the TDSTableProducer class.


 VCL Reference

THTTPDataLink properties

THTTPDataLink	Alphabetically	Legend

In THTTPDataLink

DefaultFields

FieldCount

Fields

SparseMap

Derived from TDataLink

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

EOF

ReadOnly

RecordCount


 VCL Reference

THTTPDataLink properties

THTTPDataLink	By object	Legend

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

DefaultFields

Editing

EOF

FieldCount

Fields

ReadOnly

RecordCount

SparseMap


THTTPDataLink.DefaultFields
 VCL Reference

THTTPDataLink.DefaultFields

THTTPDataLink	See also

Indicates whether the associated table producer uses dynamically generated field components.

property DefaultFields: Boolean;

Description

Read DefaultFields to determine whether the image of the table will display dynamically generated field components or persistent field components. If DefaultFields is True, the fields in the image of the table will represent dynamically allocated field components. If DefaultFields is False, the image will be built from persistent field components.

If the image of the datasource is built from persistent field components, it may not show all of the fields that are present in the underlying database table.


THTTPDataLink.FieldCount
 VCL Reference

THTTPDataLink.FieldCount

THTTPDataLink	See also

Specifies the number of entries in the Fields array.

property FieldCount: Integer;

Description

Use FieldCount when iterating over all the field components in the Fields property. FieldCount is the number of columns shown in the image of the datasource. The Fields array can contain undefined field components, which correspond to field components that are not in the dataset, such as calculated fields.


THTTPDataLink.Fields
 VCL Reference

THTTPDataLink.Fields

THTTPDataLink	See also

Lists all the field components from the dataset that may be shown in the image of the datasource.

property Fields[I: Integer]: TField;

Description

Use Fields to access field components by index. Fields[0] is the first field component, Fields[1] is the second field component, and so on. If the SparseMap property is True, Fields may contain undefined field components. For these entries, Fields returns nil.

TDSTableProducer uses Fields to keep track of all field components that are part of its dataset. Whenever necessary, TDSTableProducer reconciles the field bindings of its columns with the field components in Fields.


THTTPDataLink.SparseMap
 VCL Reference

THTTPDataLink.SparseMap

THTTPDataLink	See also

Indicates whether the associated table producer has customized the number or order of the fields that appear in the table.

property SparseMap: Boolean;

Description

Read SparseMap to determine whether Fields is a simple reflection of the underlying dataset. TDSTableProducer sets SparseMap when it builds the field map. SparseMap is False if TDSTableProducer builds a default field map directly from the dataset. SparseMap is True if the number or order of the fields has been changed from the default. When SparseMap is True, the Fields array may contain undefined fields.


 VCL Reference

THTTPDataLink methods

THTTPDataLink	Alphabetically	Legend

In THTTPDataLink

ActiveChanged

AddMapping

ClearMapping

Create

DataSetChanged

DataSetScrolled

Destroy

EditingChanged

FocusControl

GetMappedIndex

LayoutChanged

Modified

RecordChanged

Reset

UpdateData

Derived from TDataLink

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTTPDataLink methods

THTTPDataLink	By object	Legend

ActiveChanged

AddMapping

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearMapping

Create

DataSetChanged

DataSetScrolled

DefaultHandler

Destroy

Dispatch

Edit

EditingChanged

ExecuteAction

FieldAddress

FocusControl

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMappedIndex

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

Modified

NewInstance

RecordChanged

Reset

SafeCallException

UpdateAction

UpdateData

UpdateRecord


THTTPDataLink.ActiveChanged
 VCL Reference

THTTPDataLink.ActiveChanged

THTTPDataLink	See also

Informs the table producer when the Active property changes.

procedure ActiveChanged; override;

Description

Applications cannot call the ActiveChanged method directly. Changes in the Active property trigger this procedure. ActiveChanged calls the LinkActive method of the TDSTableProducer, which recomputes the layout for the table if the dataset has just become active.


THTTPDataLink.AddMapping
 VCL Reference

THTTPDataLink.AddMapping

THTTPDataLink	See also

Adds a field component to the end of the Fields array.

function AddMapping(const FieldName: string): Boolean;

Description

Applications should not call AddMapping directly, because this would cause the Fields array to become out of sync with the THTMLTableColumns object used by TDSTableProducer. TDSTableProducer calls AddMapping iteratively to set up the Fields array so that it corresponds to the columns in the table image.


THTTPDataLink.ClearMapping
 VCL Reference

THTTPDataLink.ClearMapping

THTTPDataLink	See also

Empties the Fields array and frees any associated memory.

procedure ClearMapping;

Description

Applications should not call ClearMapping directly, because this would cause the Fields array to become out of sync with the THTMLTableColumns object used by TDSTableProducer. TDSTableProducer calls ClearMapping before rebuilding the Fields list, every time the column mapping changes.


THTTPDataLink.Create
 VCL Reference

THTTPDataLink.Create

THTTPDataLink	See also

Creates an instance of THTTPDataLink.

constructor Create(DSTableProducer: TDSTableProducer);

Description

Applications should not create instances of THTTPDataLink. TDSTableProducer instantiates a THTTPDataLink object from its own constructor.


THTTPDataLink.DataSetChanged
 VCL Reference

THTTPDataLink.DataSetChanged

THTTPDataLink	See also

Informs the associated table producer of changes to the dataset.

procedure DataSetChanged; override;

Description

Applications can not call DataSetChanged directly. Changes to the contents of the dataset trigger this method automatically.


THTTPDataLink.DataSetScrolled
 VCL Reference

THTTPDataLink.DataSetScrolled

THTTPDataLink	See also

Ignores scrolling events on the dataset.

procedure DataSetScrolled(Distance: Integer); override;

Description

Applications can not call DataSetScrolled directly. This method overrides the inherited method so that TDSTableProducer can ignore scrolling events that would occur if the TDSTableProducer were a visual control.


THTTPDataLink.Destroy
 VCL Reference

THTTPDataLink.Destroy

THTTPDataLink	See also

Destroys an instance of THTTPDataLink.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The TDSTableProducer object that owns the THTTPDataLink frees the THTTPDataLink from its own destructor.

Destroy frees up the memory used by the Fields array before calling the inherited destructor.


THTTPDataLink.EditingChanged
 VCL Reference

THTTPDataLink.EditingChanged

THTTPDataLink	See also

Ignores changes to the editing state of the dataset.

procedure EditingChanged; override;

Description

Applications can not call EditingChanged directly. This method ignores changes to the editing state of the dataset, which are irrelevant to TDSTableProducer.


THTTPDataLink.FocusControl
 VCL Reference

THTTPDataLink.FocusControl

THTTPDataLink	See also

Discards requests to set focus to the indicated field.

procedure FocusControl(Field: TFieldRef); override;

Description

TDSTableProducer does not support the concept of focus assigned to an individual field. FocusControl discards requests sent through the data source to assign focus to an individual field.


THTTPDataLink.GetMappedIndex
 VCL Reference

THTTPDataLink.GetMappedIndex

THTTPDataLink	See also

Returns the index of the field component in the dataset that corresponds to the index of the field component within the Fields array.

function  GetMappedIndex(ColIndex: Integer): Integer;

Description

Applications can not call GetMappedIndex directly. GetMappedIndex takes ColIndex, the index of a field component in the Fields array, and returns the corresponding index of the field component in the dataset.


THTTPDataLink.LayoutChanged
 VCL Reference

THTTPDataLink.LayoutChanged

THTTPDataLink	See also

Informs TDSTableProducer of changes in the layout of columns at design time.

procedure LayoutChanged; override;

Description

Applications can not call the LayoutChanged method directly. LayoutChanged is triggered automatically by changes to the layout of columns at design time. LayoutChanged instructs the TDSTableProducer object to recompute the layout for the table.


THTTPDataLink.Modified
 VCL Reference

THTTPDataLink.Modified

THTTPDataLink	See also

Tracks changes to the data which have not been written to the current record in the database.

procedure Modified;

Description

Call Modified before changing the value of a field in the current record of the dataset. It is not necessary to call Modified if the changes are written directly to the field components indexed by the Fields property.


THTTPDataLink.RecordChanged
 VCL Reference

THTTPDataLink.RecordChanged

THTTPDataLink	See also

Ignores changes to the contents of the current record or field of the data source.

procedure RecordChanged(Field: TField); override;

Description

Applications can not call RecordChanged directly. This method ignores changes to the contents of the current record in the data source, which are irrelevant to the TDSTableProducer.


THTTPDataLink.Reset
 VCL Reference

THTTPDataLink.Reset

THTTPDataLink	See also

Cancels any pending edits to the dataset that have not been written to the current record in the database.

procedure Reset;

Description

Applications can not call Reset directly. Descendants of TDSTableProducer can implement a method or user interface that triggers the cancellation of pending edits.


THTTPDataLink.UpdateData
 VCL Reference

THTTPDataLink.UpdateData

THTTPDataLink	See also

Discards requests to post changes to the dataset.

procedure UpdateData; override;

Description

TDSTableProducer produces an HTML image of a dataset. It is not a control that can be used to edit the data in the dataset. UpdateData discards requests sent through the data source to post edits to the dataset.


Hierarchy

TObject

TPersistent

TDataLink

THTTPDataLink


TDataLink
 VCL Reference

TDataLink

Hierarchy	Properties	Methods	See also

TDataLink is a helper class used by data-aware objects to coordinate the actions of TDataSource and TDataSet, and to respond to data events.

Unit

DB

Description

Use TDataLink or one of its descendants in any data-aware object that implements a DataSource property to represent its link to a dataset or that needs to respond to data events.

The constructor of the data-aware object should call the constructor of TDataLink, and initialize any relevant properties. The data-aware object can then link to a TDataSource by using the DataSource property of the TDataLink.

Data-aware objects that link to a single field in a dataset should use a TFieldDataLink instead.


 VCL Reference

TDataLink properties

TDataLink	Alphabetically	Legend

In TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount

VisualControl


 VCL Reference

TDataLink properties

TDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount

VisualControl


TDataLink.Active
 VCL Reference

TDataLink.Active

TDataLink	See also

Specifies whether the dataset that TDataLink manages is active.

property Active: Boolean;

Description

Read Active to determine whether the dataset for this TDataLink is Active. When Active is False, the dataset is closed, and the dataset cannot read data from or write data to the database. When Active is True, data can be read from and written to the dataset.


TDataLink.ActiveRecord
 VCL Reference

TDataLink.ActiveRecord

TDataLink	See also

Specifies the index of the current record within the internal record buffer maintained by the dataset for the Owner of the TDataLink object.

property ActiveRecord: Integer;

Description

Use ActiveRecord to discover or set the current record in the set of one or more records managed by the dataset. The set of records managed by the dataset corresponds to the number of records from the dataset visible at one time. For example, when the TDataLink object is owned by a data-aware grid, the set of records managed by the dataset corresponds to the number of rows shown by the grid, and the ActiveRecord represents the current row.

Note:	Unidirectional datasets do not buffer records. When the data link is used with a unidirectional dataset, ActiveRecord is always 0.


TDataLink.Bof
 VCL Reference

TDataLink.Bof

TDataLink	See also

Indicates whether the first record in a dataset is active.

property Bof: Boolean;

Description

Inspect Bof to determine if the dataset component associated with the TDataLink is positioned on its first record. If Bof is True, the active record is unequivocally the first row in the dataset. Bof is also True when:

A dataset is first opened.

A call is made to the dataset’s First method.

A call is made to the dataset’s Prior method, and the method fails  because the first row is already active.

A call is made to the dataset’s SetRange, resulting in an empty result set.

Bof is False in all other cases. An application should assume Bof is False unless one of the conditions above is met and the application tests the property directly.

Tip:	If both Eof and Bof are True, a dataset or range is empty.


TDataLink.BufferCount
 VCL Reference

TDataLink.BufferCount

TDataLink	See also

Specifies the number of records cached by the dataset for the Owner of the TDataLink object.

property BufferCount: Integer;

Description

Set BufferCount to tell the dataset how many records to buffer together to service the owner of the TDataLink object. For example, a data-aware grid sets BufferCount to the number of rows visible in the grid.

Read BufferCount to iterate through all the records buffered by the dataset. For example, a data-aware object can paint itself by cycling through the set of records, moving the ActiveRecord to visit each record in turn.

Note:	Unidirectional datasets do not buffer records. Do not use BufferCount when the datalink is associated with a unidirectional dataset.


TDataLink.DataSet
 VCL Reference

TDataLink.DataSet

TDataLink	See also

Specifies the TDataSet object that represents the data that this TDataLink is tracking.

property DataSet: TDataSet;

Description

Read DataSet to determine the dataset that this TDataLink helps manage. The TDataLink responds to data events that are received by the DataSet, and makes changes to the dataset on behalf of the object that owns the TDataLink object.


TDataLink.DataSource
 VCL Reference

TDataLink.DataSource

TDataLink	See also

Specifies the TDataSource object that the Owner of the TDataLink uses to connect to the dataset.

property DataSource: TDataSource;

Description

Use DataSource to determine or set the TDataSource object that connects to the dataset. TDataLink responds to data events that the DataSource receives.

Note:	To implement the DataSource property of a data-aware object which owns a TDataLink or its descendant, create a method that gets or sets the DataSource property of the TDataLink-derived member.


TDataLink.DataSourceFixed
 VCL Reference

TDataLink.DataSourceFixed

TDataLink	See also

Indicates whether the DataSource property can be set.

property DataSourceFixed: Boolean;

Description

Use DataSourceFixed to determine whether the DataSource property can be changed. By default, DataSourceFixed is False, allowing the DataSource property to be changed.

When there is a chance that an asynchronous event might change the DataSource before an operation completes, set DataSourceFixed to True before performing the operation to ensure that the DataSource is constant throughout the operation. After the data operation is complete, DataSourceFixed can be set back to False.

Set DataSourceFixed to prevent the DataSource of a data-aware object that owns the TDataLink from being changed once it is set.


TDataLink.Editing
 VCL Reference

TDataLink.Editing

TDataLink	See also

Indicates whether the DataSource is in edit mode.

property Editing: Boolean;

Description

Read Editing to determine whether the DataSource is inserting a new record into the dataset, or modifying the current record. To change the dataset into edit mode, and hence the Editing property to True, use the Edit method.


TDataLink.Eof
 VCL Reference

TDataLink.Eof

TDataLink	See also

Indicates whether the last record in a dataset is active.

property Eof: Boolean;

Description

Inspect Eof to determine if the dataset component associated with the TDataLink is positioned on its last record. If Eof is True, the active record is unequivocally the last row in the dataset. Eof is True when:

The associated dataset is empty.

A call is made to the dataset’s Last method and the dataset is not unidirectional.

A call is made to the dataset’s Next method, and the method fails because the last row is already active.

A call to the dataset’s SetRange method is made resulting in an empty result set.

Eof is False in all other cases. An application should assume Eof is False unless one of the conditions above is met and the application tests the property directly.

Tip:	If both Eof and Bof are True, a dataset or range is empty.


TDataLink.ReadOnly
 VCL Reference

TDataLink.ReadOnly

TDataLink	See also

Indicates whether the dataset for this TDataLink can be modified.

property ReadOnly: Boolean;

Description

Use ReadOnly to determine whether the dataset for this TDataLink can be modified. Setting ReadOnly to True causes any subsequent calls to the Edit method to fail, and changes the DataSource out of an editing state if it is in one. Setting ReadOnly to False enables changes to the data in the dataset.


TDataLink.RecordCount
 VCL Reference

TDataLink.RecordCount

TDataLink	See also

Indicates the number of records in the internal record buffer maintained by the dataset.

property RecordCount: Integer;

Description

Read RecordCount to determine the number of actual records in the buffer maintained by the dataset for the Owner of this TDataLink.

In most cases, RecordCount is the same as BufferCount. RecordCount indicates the number of records actually in the record buffer of the dataset, as opposed to the number of records that the dataset can possibly maintain. For example, a data-aware grid with four rows could have one record actually showing data. In this case, BufferCount would be 4, while RecordCount would be 1.


TDataLink.VisualControl
 VCL Reference

TDataLink.VisualControl

TDataLink	See also

Indicates whether a visual control uses the datalink.

property VisualControl: Boolean;

Description

Descendants of TDataLink set VisualControl to indicate whether the control that uses the link is a visual control. A value of True indicates a visual control.


 VCL Reference

TDataLink methods

TDataLink	Alphabetically	Legend

In TDataLink

ActiveChanged

CheckBrowseMode

Create

DataEvent

DataSetChanged

DataSetScrolled

Destroy

Edit

EditingChanged

ExecuteAction

FocusControl

LayoutChanged

MoveBy

RecordChanged

UpdateAction

UpdateData

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataLink methods

TDataLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataEvent

DataSetChanged

DataSetScrolled

DefaultHandler

Destroy

Dispatch

Edit

EditingChanged

ExecuteAction

FieldAddress

FocusControl

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

MoveBy

NewInstance

RecordChanged

SafeCallException

UpdateAction

UpdateData

UpdateRecord


TDataLink.ActiveChanged
 VCL Reference

TDataLink.ActiveChanged

TDataLink	See also

Responds to changes in the Active property.

procedure ActiveChanged;

Description

The ActiveChanged method defined by TDataLink merely provides an interface for a method that can respond to changes in the Active property. Derived objects that do not need to respond to such changes can allow the inherited method to ignore them.


TDataLink.CheckBrowseMode
 VCL Reference

TDataLink.CheckBrowseMode

TDataLink	See also

Allows the data-aware object to respond just before an event that changes the dataset state.

procedure CheckBrowseMode;

Description

The CheckBrowseMode method defined by TDataLink merely provides an interface for a method that can update any state information just before a change to the dataset occurs. Derived objects that do not need to respond to these events can allow the inherited method to ignore them.


TDataLink.Create
 VCL Reference

TDataLink.Create

TDataLink	See also

Creates an instance of TDataLink.

constructor Create;

Description

Create is called from the constructor of any data-aware object that uses a TDataLink to implement its DataSource property.

After calling the inherited constructor, Create initializes the BufferCount property to 1. Data-aware objects that use a TDataLink object to manage their link to a DataSource should change the BufferCount property to the number or records they represent, after calling the inherited constructor.


TDataLink.DataEvent
 VCL Reference

TDataLink.DataEvent

TDataLink	See also

Responds to various events that occur while working with data.

type TDataEvent = (deFieldChange, deRecordChange, deDataSetChange, deDataSetScroll, deLayoutChange, deUpdateRecord, deUpdateState, deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl, deParentScroll, deConnectChange);

procedure DataEvent(Event: TDataEvent; Info: Longint); virtual;

Description

DataSetChanged is called automatically when various data events occur. Event indicates the event that just occurred. Info provides additional context information for some events.

DataSetChanged dispatches these events by calling the appropriate methods, as indicated in the following table.

Data event	Info	Method called
deFieldChange deRecordChange	The field that changed	RecordChanged
deDataSetChange	Current index into the record buffer	DataSetChanged
deDataSetScroll	Current index into the record buffer	DataSetScrolled
deLayoutChange	Current index into the record buffer	LayoutChanged
deUpdateRecord		UpdateRecord
deUpdateState		EditingChanged or ActiveChanged
deCheckBrowseMode		CheckBrowseMode
deFocusControl		FocusControl


TDataLink.DataSetChanged
 VCL Reference

TDataLink.DataSetChanged

TDataLink	See also

Responds to changes in the dataset.

procedure DataSetChanged;

Description

DataSetChanged responds to changes to the contents of the dataset. Anything that changes the contents of the dataset, whether it is editing the data, inserting or deleting records, or changing the key triggers this method. Changes specific to the representation of the data within the data-aware object, such as scrolling the dataset or changing the layout of data elements within the object, also trigger this method. DataSetChanged simply calls RecordChanged. Derived classes can override this procedure to make additional adjustments to changes in the dataset.


TDataLink.DataSetScrolled
 VCL Reference

TDataLink.DataSetScrolled

TDataLink	See also

Allows a response to scrolling the representation of the dataset within the data-aware object.

procedure DataSetScrolled(Distance: Integer);

Description

DataSetScrolled ignores the Distance parameter and calls DataSetChanged. Derived classes can override this procedure to make additional adjustments when the dataset scrolls.


TDataLink.Destroy
 VCL Reference

TDataLink.Destroy

TDataLink	See also

Destroys an instance of TDataLink.

destructor Destroy;

Description

The TDataLink object should be destroyed in the destructor of its Owner, where that Owner calls Create from its constructor.

Do not call Destroy directly in an application. Instead, call the Free method. Free checks that the TDataLink reference is not nil and only then calls Destroy.

Before calling the inherited destructor, Destroy removes any reference to the TDataLink from the data source object.


TDataLink.Edit
 VCL Reference

TDataLink.Edit

TDataLink	See also

Attempts to drive the data source into an editing state if it is not already in one.

function Edit: Boolean;

Description

Use Edit to try to ensure that the current record can be modified. A return value of True indicates that the data source was already in an editing state, or that it was successfully changed to allow editing. A return value of False indicates that the data source could not be changed to allow editing. For example, if the ReadOnly property is True, Edit will not allow editing and will return False.


TDataLink.EditingChanged
 VCL Reference

TDataLink.EditingChanged

TDataLink	See also

Responds to changes in the editing state of the data source.

procedure EditingChanged;

Description

The EditingChanged method defined by TDataLink merely provides an interface for a method that can respond to changes in the editing state of the data source. EditingChanged is called immediately after the Editing property has changed its value. Derived objects that do not need to respond to such changes can allow the inherited method to ignore them.


TDataLink.ExecuteAction
 VCL Reference

TDataLink.ExecuteAction

TDataLink	See also

Invokes an action with the datasource as its target.

function ExecuteAction(Action: TBasicAction): Boolean;

Description

ExecuteAction is called automatically when the user invokes an action with the Owner as a target. The Action parameter specifies the action that was invoked. ExecuteAction checks whether the associated datasource can handle the action, and if so, forwards the action to the datasource.

ExecuteAction returns True if the action was successfully dispatched, and False if the TDataLink could not handle the action.


TDataLink.FocusControl
 VCL Reference

TDataLink.FocusControl

TDataLink	See also

Provides the interface for a method to force focus to the data-aware component associated with the TDataLink.

type TFieldRef = ^TField;

procedure FocusControl(Field: TFieldRef);

Description

The FocusControl method defined by TDataLink merely provides an interface for a method that can force the input focus to a data-aware object associated with the TDataLink. Derived objects that do not need this capability can allow the inherited method to ignore the request.


TDataLink.LayoutChanged
 VCL Reference

TDataLink.LayoutChanged

TDataLink	See also

Responds to changes in the representation of the data by the data-aware object.

procedure LayoutChanged; virtual;

Description

The LayoutChanged method simply calls the DataSetChanged method. LayoutChanged is intended to provide an interface for a method that can respond after changes in the representation of the data by the data-aware object. An example of such a change would be changing the number or order of the columns in a TCustomDBGrid.


TDataLink.MoveBy
 VCL Reference

TDataLink.MoveBy

TDataLink	See also

Repositions the dataset to another record relative to its active record.

function MoveBy(Distance: Integer): Integer; virtual;

Description

The MoveBy record changes the active record in the associated dataset, based on the Distance parameter. If Distance is greater than 0, MoveBy causes the dataset to move forward by that number of records. If Distance is less than 0, MoveBy causes the dataset to move backward. MoveBy returns the number of records actually moved (which may be less than the absolute value of Distance if the dataset encountered the first or last record before moving the indicated number of records).

MoveBy calls the MoveBy method of the associated dataset.


TDataLink.RecordChanged
 VCL Reference

TDataLink.RecordChanged

TDataLink	See also

Responds to changes in the contents of the current record or field of the dataset.

procedure RecordChanged(Field: TField);

Description

The RecordChanged method defined by TDataLink merely provides an interface for a method that can respond to changes to the contents of the current record. RecordChanged is called after changes have been posted to the current record in the dataset, and from DataSetChanged.

The Field parameter indicates which field of the current record has changed in value. If Field is nil, any number of fields within the current record may have changed.

Derived objects that do not need to respond to such changes can allow the inherited method to ignore them.


TDataLink.UpdateAction
 VCL Reference

TDataLink.UpdateAction

TDataLink	See also

Updates an action to reflect the current state of the TDataLink.

function UpdateAction(Action: TBasicAction): Boolean;

Description

UpdateAction is called automatically when the application is idle to give the TDataLink an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDataLink they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDataLink.UpdateData
 VCL Reference

TDataLink.UpdateData

TDataLink	See also

Provides an interface for writing edits to a record in the dataset.

procedure UpdateData;

Description

The UpdateData method defined by TDataLink merely provides an interface for a method that writes updates to the current record in the dataset while avoiding calls to RecordChanged that posting the changes may trigger. Derived objects that do not need to write edits to the dataset can allow the inherited method to do nothing.


TDataLink.UpdateRecord
 VCL Reference

TDataLink.UpdateRecord

TDataLink	See also

Responds to notifications that edits should be posted to the dataset.

procedure UpdateRecord;

Description

UpdateRecord calls UpdateData after guarding against calls to RecordChanged, which may arise while UpdateData is executing.


Hierarchy

TObject

TPersistent

TDataLink


TDataSet
 VCL Reference

TDataSet

Hierarchy	Properties	Methods	Events 	Using TDataSet	See also

TDataSet is the base class for all dataset components that represent data in rows and columns.

Unit

DB

Description

TDataSet introduces the basic properties, events, and methods for working with data.

Many of these properties, events, and methods are abstract in TDataSet. Abstract declarations are declarations without implementations. At the TDataSet level they cannot be used or accessed. Developers must use or derive descendants of TDataSet that redeclare and implement these abstract methods. Many of the other TDataSet methods are declared and implemented in TDataSet as virtual methods, but the implementations are merely stubs that are reimplemented in descendants.

TDataSet has several descendants: TBDEDataSet, TCustomADODataSet, TIBCustomDataSet, TCustomSQLDataSet, and TCustomClientDataSet.

TBDEDataSet is the base class for datasets that access their data using the Borland Database Engine (BDE). TBDEDataSet descendants include TTable, TQuery, and TStoredProc. Developers who create custom dataset components that use the BDE derive them from TBDEDataSet, TDBDataSet, TQuery, TStoredProc, or TTable.

TCustomADODataSet is the base class for datasets that access their data using ActiveX Data Objects (ADO). TCustomADODataSet descendants include TADODataSet, TADOTable, TADOQuery, and TADOStoredProc. Developers who create custom dataset components that use ADO derive them from CustomADODataSet.

TIBCustomDataSet is the base class for datasets that directly access the data in InterBase tables. TIBCustomDataSet descendants include TIBDataSet, TIBTable, TIBQuery, and TIBStoredProc. Developers who create custom dataset components that directly access data in an InterBase database derive from TIBCustomDataSet.

TCustomSQLDataSet is the base class for unidirectional datasets. Unidirectional datasets are read-only datasets that permit only forward navigation. TCustomSQLDataSt descendants include the dbExpress datasets TSQLDataSet, TSQLQuery, TSQLTable, and TSQLStoredProc. Developers who create custom dataset components that use dbExpress to access their data derive from TCustomSQLDataSet.

TCustomClientDataSet is the base class for in-memory datasets. Client datasets can work with data from files on disk or with data provided by another component via a provider. They cache that data in memory, maintain a record of any changes in a change log, and apply cached updates at a later point back to the source of the data. Developers who create custom datasets that store their data in an in-memory cache derive from TCustomClientDataSet.

Developer’s can also derive custom dataset components directly from TDataSet, providing their own mechanisms for accessing and manipulating the data.


 VCL Reference

TDataSet properties

TDataSet	Alphabetically	Legend

In TDataSet

Active

ActiveRecord

AggFields

AutoCalcFields

BlobFieldCount

BlockReadSize

Bof

Bookmark

BookmarkSize

BufferCount

Buffers

CalcBuffer

CalcFieldsSize

CanModify

Constraints

CurrentRecord

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

FieldNoOfs

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

InternalCalcFields

IsUniDirectional

Modified

Name

NestedDataSetClass

NestedDataSets

ObjectView

RecNo

RecordCount

RecordSize

Reserved

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSet properties

TDataSet	By object	Legend

Active

ActiveRecord

AggFields

AutoCalcFields

BlobFieldCount

BlockReadSize

Bof

Bookmark

BookmarkSize

BufferCount

Buffers

CalcBuffer

CalcFieldsSize

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

CurrentRecord

DataSetField

DataSource

DefaultFields

Designer

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

FieldNoOfs

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

InternalCalcFields

IsUniDirectional

Modified

Name

NestedDataSetClass

NestedDataSets

ObjectView

Owner

RecNo

RecordCount

RecordSize

Reserved

SparseArrays

State

Tag

VCLComObject


TDataSet.Active
 VCL Reference

TDataSet.Active

TDataSet	See also 	Example

Specifies whether or not a dataset is open.

property Active: Boolean;

Description

Use Active to determine or set whether a dataset is populated with data. When Active is False, the dataset is closed; the dataset cannot read or write data and data-aware controls can not use it to fetch data or post edits. When Active is True, the dataset can be populated with data. It can read data from a database or other source (such as a provider). Depending on the CanModify property, active datasets can post changes.

Setting Active to True

Generates a BeforeOpen event.

Sets the dataset state to dsBrowse.

Establishes a way to fetch data (typically by opening a cursor).

Generates an AfterOpen event.

If an error occurs while opening the dataset, dataset state is set to dsInactive, and any cursor is closed.

Setting Active to False:

1	Triggers a BeforeClose event.

2	Sets the State property to dsInactive.

3	Closes the cursor.

4	Triggers an AfterClose event.

An application must set Active to False before changing other properties that affect the status of a database or the controls that display data in an application.

Note:	Calling the Open method sets Active to True; calling the Close method sets Active to False.


TDataSet.ActiveRecord
 VCL Reference

TDataSet.ActiveRecord

TDataSet	See also

Indicates the index of the active record in the internal cache of records.

property ActiveRecord: Integer;

Description

Most TDataSet descendants maintain an internal cache of records from the underlying database table. This cache is used, for example, when the dataset is used to populate a data-aware grid, in which case it includes a record for each row in the grid. ActiveRecord indicates the offset in this cache of the record buffer for the active record. This active record is the value returned by the public ActiveBuffer method.

Note:	Unidirectional datasets never cache records. For unidirectional datasets, the ActiveRecord property is meaningless (and always 0).


TDataSet.AggFields
 VCL Reference

TDataSet.AggFields

TDataSet	See also

Contains any aggregate fields.

property AggFields: TFields;

Description

Some TDataSet descendants, such as TClientDataSet, support aggregate fields. Aggregate fields summarize data over groups of records from the dataset (as opposed to calculated fields, which can only summarize data over the fields of a single record). AggFields is a collection of all aggregate fields that are supported by the dataset.

Note:	The Fields property is a collection of all the dataset’s fields that are not aggregate fields. Thus, AggFields and Fields are mutually exclusive collections of the dataset’s fields. These two properties contain all of the dataset’s fields between them.


TDataSet.AutoCalcFields
 VCL Reference

TDataSet.AutoCalcFields

TDataSet	See also

Determines when the OnCalcFields event is triggered and when lookup field values are calculated.

property AutoCalcFields: Boolean;

Description

Set AutoCalcFields to control when the OnCalcFields event is triggered to update calculated fields and when lookup fields are calculated.

A calculated field is one that derives its value from the values of one or more fields in the active record, sometimes with additional processing. Lookup fields are fields whose values come from a secondary dataset or lookup cache.

Note:	 Unidirectional datasets support calculated fields but not unidirectional fields. For unidirectional datasets, OnCalcFields only controls when calculated fields are updated.

When AutoCalcFields is True (the default), Lookup fields are recalculated and OnCalcFields is triggered when:

The dataset is opened.

The dataset is put into dsEdit state.

Focus moves from one visual control to another, or from one column to another in a data-aware grid and modifications have been made to the record.

When AutoCalcFields is False, Lookup fields are recalculated and the OnCalcFields event occurs only when

The dataset is opened.

The dataset is put into dsEdit state.

A record is retrieved from a database.

If an application permits users to change data, OnCalcFields is frequently triggered. In these cases an application may set AutoCalcFields to False to reduce the frequency with which the OnCalcFields event occurs and with which lookup values are fetched.


TDataSet.BlobFieldCount
 VCL Reference

TDataSet.BlobFieldCount

TDataSet

Indicates the number of columns in the dataset that represent Binary large object (BLOB) fields.

property BlobFieldCount: Integer;

Description

Descendants of TDataSet use BlobFieldCount when determining how to handle BLOB information.


TDataSet.BlockReadSize
 VCL Reference

TDataSet.BlockReadSize

TDataSet	See also

Determines how many record buffers are read in each block.

property BlockReadSize: Integer;

Description

Setting BlockReadSize to a value greater than 0 puts the dataset in the dsBlockRead state. It remains in that state until you set BlockReadSize to 0 or change the dataset’s state in some other manner (such as putting it in edit mode).

For all TDataSet descendants, data-award controls are not updated and data events are not triggered when the dataset is in the dsBlockRead state. Thus, you can set BlockReadSize to a positive value to scan through the entire dataset quickly without updating data-aware controls.

For BDE-enabled datasets, setting BlockReadSize also causes the dataset to fetch database information in blocks of BlockReadSize records, which it then buffers. This minimizes traffic between your application and the database server.


TDataSet.Bof
 VCL Reference

TDataSet.Bof

TDataSet	See also 	Example

Indicates whether the first record in the dataset is active.

property Bof: Boolean;

Description

Test Bof (beginning of file) to determine if the dataset is positioned at the first record. If Bof is True, the active record is unequivocally the first row in the dataset. Bof is True when an application

Opens a dataset.

Calls a dataset’s First method.

Call a dataset’s Prior method, and the method fails because the first row is already active.

Calls SetRange on an empty range or dataset.

Bof is False in all other cases.


TDataSet.Bookmark
 VCL Reference

TDataSet.Bookmark

TDataSet	See also

Specifies the current bookmark in the dataset.

type TBookmarkStr: string;

property Bookmark: TBookmarkStr;

Description

Bookmark gets or sets the current bookmark in a dataset. A bookmark marks a location in a dataset so that an application can easily return to that location quickly.

An application can read Bookmark to retrieve the bookmark associated with the current record, and it can change the current record in the dataset by assigning a saved bookmark value to this property.

Note:	Unidirectional datasets do not support bookmarks.


TDataSet.BookmarkSize
 VCL Reference

TDataSet.BookmarkSize

TDataSet	See also

Indicates the number of bytes used to represent a bookmark.

property BookmarkSize: Integer;

Description

Bookmarks mark a location in a dataset so that an application can easily return to that location quickly. Descendants of TDataSet can use different mechanisms for storing enough information to identify records when applications set bookmarks. BookmarkSize indicates the number of bytes required to specify bookmark information for a particular dataset.

Note:	Unidirectional datasets do not support bookmarks.


TDataSet.BufferCount
 VCL Reference

TDataSet.BufferCount

TDataSet	See also

Indicates the number of records in the internal cache.

property BufferCount: Integer;

Description

All TDataSet descendants except for unidirectional datasets maintain an internal cache of records from the underlying database tables. For example, if the dataset is used to populate a data-aware grid, the cache includes a record for each row in the grid. BufferCount indicates the size of this cache.

BufferCount is read-only. An associated TDataLink object determines its value.


TDataSet.Buffers
 VCL Reference

TDataSet.Buffers

TDataSet	See also

Provides indexed access to the record buffers in the internal cache.

property Buffers[Index: Integer]: PChar;

Description

All TDataSet descendants except for unidirectional datasets maintain an internal cache of records from the underlying database table. For example, if the dataset is used to populate a data-aware grid, the cache includes a record for each row in the grid.

For datasets that cache records, each entry in Buffers points to a record buffer in the internal cache. The BufferCount property specifies the total number of record buffers in the cache.


TDataSet.CalcBuffer
 VCL Reference

TDataSet.CalcBuffer

TDataSet	See also

Points to the record buffer used during an OnCalcFields event.

property CalcBuffer: PChar;

Description

Datasets use CalcBuffer to retrieve and store values when in the dsCalcFields state. The values of lookup fields and calculated fields are set in CalcBuffer, based on data field values retrieved from this buffer.

Most applications do not need to explicitly reference CalcBuffer. It is used automatically when the dataset is in the dsCalcFields state.


TDataSet.CalcFieldsSize
 VCL Reference

TDataSet.CalcFieldsSize

TDataSet	See also

Indicates the number of bytes in a record buffer dedicated to storing calculated fields and lookup fields.

property CalcFieldsSize: Integer;

Description

TDataSet uses CalcFieldsSize to determine whether there are any calculated fields or lookup fields to calculate. Descendants of TDataSet use this property when locating fields in a record buffer.


TDataSet.CanModify
 VCL Reference

TDataSet.CanModify

TDataSet	See also

Indicates whether the dataset permits write access to data.

property CanModify: Boolean;

Description

As implemented in TDataSet, this property is False if the dataset is unidirectional, and True otherwise. Descendant classes reimplement this property as follows

For unidirectional datasets, CanModify is always False.

For client datasets, CanModify reflects the value of the ReadOnly property and whether a data provider supplied a read-only data packet.

Other datasets reflect whether the dataset has write access to data.


TDataSet.Constraints
 VCL Reference

TDataSet.Constraints

TDataSet	See also

Specifies record-level constraints that must be met when editing the data.

property Constraints: TCheckConstraints;

Description

Use Constraints to read or add record-level constraints to the dataset. Record-level constraints usually impose relationships between the fields in a single record. Constraints that limit the value of a single field should be added to the individual field components.


TDataSet.CurrentRecord
 VCL Reference

TDataSet.CurrentRecord

TDataSet	See also

Indicates the index of the current record in the internal cache of record buffers.

property CurrentRecord: Integer;

Description

Most TDataSet descendants maintain an internal cache of records from the underlying database table. For example, if the dataset is used to populate a data-aware grid, the cache includes a record for each row in the grid. CurrentRecord indicates the offset in this cache of the record buffer for the current record.

The current record is the record currently in use by the dataset. This can differ from the active record (which the end user sees as active) when the dataset performs operations involving other records. For example, when painting a data-aware grid, CurrentRecord cycles through all the visible records, while ActiveRecord remains constant.

Note:	For unidirectional datasets, CurrentRecord is meaningless.


TDataSet.DataSetField
 VCL Reference

TDataSet.DataSetField

TDataSet	See also

Indicates the persistent TDataSetField object that owns a nested dataset.

property DataSetField: TDataSetField;

Description

Use DataSetField when the dataset is the nested detail set of another dataset, such as an Oracle8 nested dataset. Read DataSetField to access the data set field component in the master dataset that includes this dataset as a detail. Set DataSetField to a field component in the master dataset to assign this dataset as the value of that field.

Note:	When setting the DataSetField property, the dataset must be of (or a descendant of) the class specified by the master dataset’s NestedDataSetClass property. Otherwise, setting DataSetField raises an exception. Further, setting DataSetField to a TDataSetField that is contained in the same dataset raises an exception (A dataset can’t be nested in itself).


TDataSet.DataSource
 VCL Reference

TDataSet.DataSource

TDataSet	See also

Represents the data source of another dataset that supplies values to the dataset.

property DataSource: TDataSource;

Description

As implemented in TDataSet, the DataSource property is always nil.

Descendant dataset classes that support specifying a data source redeclare and implement methods for getting and setting the DataSource property.


TDataSet.DefaultFields
 VCL Reference

TDataSet.DefaultFields

TDataSet	See also

Indicates whether a dataset’s underlying field components are generated dynamically when the dataset is opened.

property DefaultFields Boolean;

Description

Read DefaultFields to determine whether a dataset uses dynamically generated field components or persistent field components. If DefaultFields is True, the dataset uses dynamically allocated field components. If DefaultFields is False, the dataset uses persistent field components.

Unless persistent field components are assigned to a dataset at design time using the Fields editor, the dataset creates dynamic field components based on the structure of its underlying data when it is opened.


TDataSet.Designer
 VCL Reference

TDataSet.Designer

TDataSet	See also

Returns a pointer to the Dataset designer for the dataset.

property Designer: TDataSetDesigner;

Description

Use Designer to determine whether the dataset is currently being designed and, if so, to access the dataset designer. When a dataset designer, such as the Fields editor, is created for a dataset at design time, it sets the Designer property to itself. When the dataset designer is destroyed, the Designer property is set back to nil. A Dataset designer enables a developer to specify the fields that belong to a dataset at design time.


TDataSet.Eof
 VCL Reference

TDataSet.Eof

TDataSet	See also 	Example

Indicates whether a dataset is positioned at the last record.

property Eof: Boolean;

Description

Test Eof (end-of-file) to determine if the active record in a dataset is the last record. If Eof is True, the current record is unequivocally the last row in the dataset. Eof is True when an application:

Opens an empty dataset.

Calls a dataset’s Last method. (Unless it is a unidirectional dataset)

Call a dataset’s Next method, and the method fails because the current record is already the last row in the dataset.

Calls SetRange on an empty range or dataset.

Eof is False in all other cases.

Tip:	If both Eof and Bof are True, the dataset or range is empty.


TDataSet.FieldCount
 VCL Reference

TDataSet.FieldCount

TDataSet	See also 	Example

Indicates the number of field components associated with the dataset.

property FieldCount: Integer;

Description

Examine FieldCount to determine the number of fields listed by the Fields property. For datasets with dynamically created fields, FieldCount may differ each time a dataset is opened. For datasets with persistent fields, FieldCount should be unchanged each time a dataset is open.

Note:	FieldCount includes only the fields listed by the Fields property. Any aggregated fields listed by the AggFields property are not included in the count.


TDataSet.FieldDefList
 VCL Reference

TDataSet.FieldDefList

TDataSet	See also

Points to the list of field definitions for the dataset.

property FieldDefList: TFieldDefList;

Description

FieldDefList points to an internal list of field definitions for the dataset. FieldDefList represents a flattened view of the data, meaning that object fields in the dataset may be represented by several simple field definitions that represent the constituents of the object field. To determine the definitions in a hierarchical view, use FieldDefs instead.

To access fields and field values in a dataset, use the Fields, AggFields, and FieldValues properties, and the FieldByName method.


TDataSet.FieldDefs
 VCL Reference

TDataSet.FieldDefs

TDataSet	See also	Example

Points to the list of field definitions for the dataset.

property FieldDefs: TFieldDefs;

Description

FieldDefs lists the field definitions for a dataset. While an application can examine FieldDefs to explore the field definitions for a dataset, it should not change these definitions unless creating a new table with CreateTable or CreateDataSet.

To access fields and field values in a dataset, use the Fields, AggFields, and FieldValues properties, and the FieldsByName method.

Note:	If the dataset includes object field descendants, FieldDefs represents a hierarchical view of the data, meaning that the definitions include object field definitions. To determine the definitions in a flattened view, use FieldDefList instead.


TDataSet.FieldList
 VCL Reference

TDataSet.FieldList

TDataSet	See also

Lists the field components of a dataset.

property FieldList: TFieldList;

Description

FieldList contains the names of all field components in the dataset. The fields are stored sequentially, or flattened out, meaning any child fields of an object field are stored as siblings in the TFieldList.Fields array.


TDataSet.FieldNoOfs
 VCL Reference

TDataSet.FieldNoOfs

TDataSet	See also

Specifies the offset needed to convert indexes in the Fields property to field numbers.

property FieldNoOfs: Integer;

Description

Add FieldNoOfs to a field index to obtain its FieldNo property.


TDataSet.Fields
 VCL Reference

TDataSet.Fields

TDataSet	See also 	Example

Lists all non-aggregate field components of the dataset.

property Fields: TFields;

Description

Use Fields to access field components. If fields are generated dynamically at runtime, the order of field components in Fields corresponds directly to the order of columns in the table or tables underlying a dataset. If a dataset uses persistent fields, then the order of field components corresponds to the ordering of fields specified in the Fields editor at design time.

When ObjectView is True, the fields are stored hierarchically, meaning any child fields of an object field are referenced by the object field and don’t appear sequentially after the object field in the TFields.Fields array. When ObjectView is False, the fields are stored sequentially, or flattened out, meaning any child fields of an object field are stored sequentially in the TFields.Fields array.

Accessing fields with the Fields property is useful for applications that:

Iterate over some or all fields in a dataset.

Work with underlying tables whose internal data structure is unknown at runtime.

If an application knows the data types of individual fields, then it can read or write individual field values through the Fields property. For example, the following statement assigns a field value to the Text property of an edit box:

Edit1.Text := CustTable.Fields.Fields[6].AsString;

Note:	The preferred method for retrieving and assigning field values is to use persistent fields or the FieldByName method.

Note:	The AggFields property is a collection of all the dataset’s aggregated fields. AggFields and Fields are mutually exclusive collections of the dataset’s fields. These two properties contain all of the dataset’s fields between them.


TDataSet.FieldValues
 VCL Reference

TDataSet.FieldValues

TDataSet	See also 	Example

Provides access to the values for all fields in the active record for the dataset

property FieldValues[const FieldName: string]: Variant; default;

Description

Use FieldValues to read and write values for fields in a dataset. FieldName is the name of a field to read from or write to.

FieldName can represent simple field names, qualified field names for subfields of an object field, or aggregated fields such as can be found in the AggFields property. Because of this flexibility, it is often preferable to use the FieldValues property (or the FieldByName method) rather than the Fields, FieldList, or AggFields properties, all of which present a more limited selection of the dataset’s fields.

FieldValues accepts and returns a Variant, so it can handle and convert fields of any type. Because FieldValues is the default property for TDataSet, you can omit the property name when referencing this property. For example, the following statements are semantically identical and write the value from an edit box into an integer field:

Customers.FieldValues['CustNo'] := Edit1.Text;

Customers['CustNo'] := Edit1.Text;

Note:	Because FieldValues always uses Variants, it may be a somewhat slower method of accessing data, than using a field’s native format (i.e., using a field’s AsXXX property), especially in applications that process large amounts of data.


TDataSet.Filter
 VCL Reference

TDataSet.Filter

TDataSet	See also

Specifies the text of the current filter for a dataset.

property Filter: string;

Description

Use Filter to specify a dataset filter. When filtering is applied to a dataset, only those records that meet a filter’s conditions are available. Filter describes the filter condition. For example, the following filter condition displays only those records where the State field is 'CA' or 'MA':

State = 'CA' or State = 'MA'

When a filter is set, Blank records do not appear unless explicitly included in the filter.  For example:

State <> 'CA' or State = NULL

When a field name contains spaces, you must enclose the field name in brackets. For example:

[Home State] = 'CA' or [Home State] = 'MA'

Filter expressions on remote SQL tables and on client datasets support field comparisons. For example:

Field1 > Field2

Field comparisons are not supported against local tables (Paradox, dBASE, Access, FoxPro).

For a complete list of operators you can use in filter strings, see SettingTheFilterProperty.

Note:	Filters are not supported on unidirectional datasets. If you set the Filter property of a unidirectional dataset, it raises an exception.

The FilterOptions property controls case sensitivity and filtering on partial comparisons.

Tip:	Applications can set Filter at runtime to change the dataset’s filtering condition (for example, in response to user input).


TDataSet.Filtered
 VCL Reference

TDataSet.Filtered

TDataSet	See also

Specifies whether or not filtering is active for a dataset.

property Filtered: Boolean;

Description

Check Filtered to determine whether or not dataset filtering is in effect. If Filtered is True, then filtering is active. To apply filter conditions specified in the Filter property or the OnFilterRecord event handler, set Filtered to True. Because unidirectional datasets do not support filters, when you set Filtered to True on a unidirectional dataset, it raises an exception.

Note:	When filtering is enabled, user edits to a record may mean that the record no longer meets a filter’s test condition. The next time an attempt is made to the read the record from the dataset while the filter is in effect, the record is not visible. If that happens, the next record that passes the filter condition becomes the active record.


TDataSet.FilterOptions
 VCL Reference

TDataSet.FilterOptions

TDataSet	See also

Specifies whether or not filtering is case insensitive, and whether or not partial comparisons are permitted when filtering records.

property FilterOptions: TFilterOptions;

Description

Set FilterOptions to specify whether or not filtering is case insensitive when filtering on string or character fields, and whether or not partial comparisons for matching filter conditions is allowed.

Note:	Because unidirectional datasets do not support filters, when you set the FilterOptions property of a unidirectional dataset, it raises an exception.

By default, FilterOptions is set to an empty set. For filters based on string fields, set FilterOptions to foCaseInsensitive to catch all variations on a string regardless of capitalization.

When a string in a filter ends with an asterisk (*), it can be used to match partial strings. To disable matching of partial strings and to treat the asterisk as a literal character in string comparisons, set FilterOptions to include foNoPartialCompare.


TDataSet.Found
 VCL Reference

TDataSet.Found

TDataSet	See also

Indicates whether or not moving to a different record is successful.

property Found: Boolean;

Description

Check the status of Found to determine if a call to FindFirst, FindLast, FindNext or, FindPrior succeeds. If Found is True, success is indicated. If False, the move to a different record failed.


TDataSet.InternalCalcFields
 VCL Reference

TDataSet.InternalCalcFields

TDataSet	See also

Indicates whether the dataset includes internally calculated fields.

property InternalCalcFields: Boolean;

Description

Read InternalCalcFields to discover if the dataset includes fields whose values are provided by the data source but that are not a fields in the physical database table or query. Internally calculated fields are calculated by SQL servers or the Borland Database Engine in a live query view.

On TClientDataSet, internally calculated fields are stored with the rest of the data, allowing the developer to sort and filter on the calculated fields. However, internally calculated fields on client datasets are not updated when the data they depend on is updated.

Note:	Do not confuse internally calculated fields with calculated fields, which are computed in an OnCalcFields event.


TDataSet.IsUniDirectional
 VCL Reference

TDataSet.IsUniDirectional

TDataSet	See also

Indicates whether the dataset is unidirectional.

property IsUnidirectional: Boolean;

Description

IsUniDirectional indicates whether the dataset is a descendant of TCustomSQLDataSet. Unidirectional datasets raise exceptions on all navigation methods except for First and Next. They do not support filters, bookmarks, lookup fields, or any other features that require an internal record buffer. You can’t use a unidirectional dataset as the source to a data-aware grid.


TDataSet.Modified
 VCL Reference

TDataSet.Modified

TDataSet	See also

Indicates whether the active record is modified.

property Modified: Boolean;

Description

Check Modified to determine if the active record is modified. If Modified is True, the active record is modified. If False, the active record is not modified.

Note:	In general, an application need not check the status of Modified. Properties, events, and methods of TDataSet and its descendants that modify records generally check this status automatically and take appropriate actions based on its value.


TDataSet.Name
 VCL Reference

TDataSet.Name

TDataSet	See also

Designates the name of the dataset as referenced by other components.

property Name: TComponentName;

Description

Use Name to change the name of a dataset to reflect its purpose in the current application. By default, the IDE assigns sequential names based on the type of the component, such as 'Table1', 'Table2', and so on.

When the name of the dataset is changed at design time, any of its field components that use the dataset name as a prefix to the field name are updated as well.


TDataSet.NestedDataSetClass
 VCL Reference

TDataSet.NestedDataSetClass

TDataSet	See also

Indicates the class type to use when creating nested datasets.

property NestedDataSetClass: TClass;

Description

TDataSet descendants use NestedDataSetClass to specify the class that can be used for nested datasets. By default, this value is the same as the class of the dataset instance.

NestedDataSetClass is used to check that nested detail sets are the appropriate type when they are assigned to a data set field (by assigning a value to their DataSetField property).


TDataSet.NestedDataSets
 VCL Reference

TDataSet.NestedDataSets

TDataSet	See also

Lists all nested datasets.

property NestedDataSets: TList;

Description

NestedDataSets is a list of the nested detail sets belonging to the data set. Each entry in the list is a dataset of the type specified by NestedDataSetClass.

Do not use NestedDataSets to assign values to dataset fields. Instead, set the DataSetField property of the detail set to reference the appropriate field component.


TDataSet.ObjectView
 VCL Reference

TDataSet.ObjectView

TDataSet	See also

Specifies whether fields are stored hierarchically or flattened out in the Fields property.

property ObjectView: Boolean;

Description

ObjectView affects the way the Fields property stores object fields and the way data-aware grids display ADT and array fields.

When ObjectView is True, the fields are stored hierarchically in the Fields property, meaning any child fields of an object field are referenced by the object field and don’t appear sequentially after the object field in the TFields.Fields array. When ObjectView is False, the fields are stored sequentially in the Fields property, meaning any child fields of an object field are stored after the object field as siblings in the Fields array.

When ObjectView is False, object field types, such as TADTField, are not created. This switch is provided for increased compatibility with older data-aware controls, which may not handle object field types properly. The default is False for TBDEDataSet, and True for TClientDataSet.

Note:	If the ObjectView property of the dataset provided to a TClientDataSet is False, then the TClientDataSet’s ObjectView property always acts as False, since the data received is already flattened.


TDataSet.RecNo
 VCL Reference

TDataSet.RecNo

TDataSet	See also

Indicates the active record in the dataset.

property RecNo: Integer;

Description

As implemented in TDataSet, the value of RecNo is always -1. Ordinarily an application does not access RecNo at the TDataSet level. Instead a re-implemented RecNo property in a descendant class such as TTable is accessed. RecNo provides a fallback property for derived datasets that do not support record numbers.


TDataSet.RecordCount
 VCL Reference

TDataSet.RecordCount

TDataSet	See also 	Example

Indicates the total number of records associated with the dataset.

property RecordCount: Integer;

Description

As implemented in TDataSet, RecordCount is always -1. Ordinarily an application does not access RecordCount at the TDataSet level. Instead a redeclared and implemented RecordCount property in a descendant class is accessed. RecordCount provides a fallback property for derived dataset classes that do not reimplement the property access method.


TDataSet.RecordSize
 VCL Reference

TDataSet.RecordSize

TDataSet	See also

Indicates the size of a record in the dataset.

property RecordSize: Word;

Description

RecordSize indicates the size needed for internal record buffers. In TDataSet, the value of RecordSize is always 0 because TDataSet does not implement record buffering. Descendant classes that buffer records override the property getter to return the number of bytes in a record buffer.


TDataSet.Reserved
 VCL Reference

TDataSet.Reserved

TDataSet

For internal use only.

property Reserved: Pointer;

Description

Do not use the Reserved property. It is for internal use only.


TDataSet.SparseArrays
 VCL Reference

TDataSet.SparseArrays

TDataSet	See also

Determines whether a unique TField object is created for each element of an array field.

property SparseArrays: Boolean;

Description

When opening a dataset with an array field, SparseArrays determines whether a unique field component is created for each element of the array field. The default is False, where a TField descendant is created for each element of the array field. If you plan to bind data-aware controls to elements of the array field, SparseArrays must be set to False. Setting SparseArrays to True conserves memory, but does not allow applications to reference individual elements of the array field.


TDataSet.State
 VCL Reference

TDataSet.State

TDataSet	See also 	Example

Indicates the current operating mode of the dataset.

property State: TDataSetState;

Description

Examine State to determine the current operating mode of the dataset. State determines what can be done with data in a dataset, such as editing existing records or inserting new ones. The dataset state constantly changes as an application processes data.

Opening a dataset changes State from dsInactive to dsBrowse. An application can call Edit to put a dataset into dsEdit state, or call Insert to put a dataset into dsInsert state. If a dataset is a TTable or TClientDataSet object, an application can call SetKey or SetRange to put the dataset into dsSetKey state.

Posting or canceling edits, insertions, or deletions, changes State from its current state to dsBrowse. Closing a dataset changes its state to dsInactive.

Some states, such as dsCalcFields, dsFilter, dsNewValue, dsOldValue, and dsCurValue cannot be seen or set directly by an application. These states are automatically set when OnCalcFields and OnFilterRecord events occur, or when an application accesses certain field properties.


 VCL Reference

TDataSet events

TDataSet	Alphabetically	Legend

In TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TDataSet events

TDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


TDataSet.AfterCancel
 VCL Reference

TDataSet.AfterCancel

TDataSet	See also	Example

Occurs after an application completes a request to cancel modifications to the active record.

property AfterCancel: TDataSetNotifyEvent;

Description

Write an AfterCancel event handler to take specific action after an application cancels changes to the active record. AfterCancel is called by the Cancel method after it updates the current position, releases the lock on the active record if necessary, and sets the dataset state to dsBrowse. If an application requires additional processing before returning control to a user after a Cancel event, code it in the AfterCancel event.


TDataSet.AfterClose
 VCL Reference

TDataSet.AfterClose

TDataSet	See also

Occurs after an application closes a dataset.

property AfterClose: TDataSetNotifyEvent;

Description

Write an AfterClose event handler to take specific action immediately after an application closes a dataset. For example, as a security measure, an application might clear a PASSWORD entry from the Params property of a database component when the dataset is closed.

AfterClose is called after a dataset is closed and the dataset state is set to dsInactive.


TDataSet.AfterDelete
 VCL Reference

TDataSet.AfterDelete

TDataSet	See also 	Example

Occurs after an application deletes a record.

property AfterDelete: TDataSetNotifyEvent;

Description

Write an AfterDelete event handler to take specific action immediately after an application deletes the active record in a dataset. AfterDelete is called by Delete after it deletes the record, sets the dataset state to dsBrowse, and repositions the current record.


TDataSet.AfterEdit
 VCL Reference

TDataSet.AfterEdit

TDataSet	See also 	Example

Occurs after an application starts editing a record.

property AfterEdit: TDataSetNotifyEvent;

Description

Write an AfterEdit event handler to take specific action immediately after dataset enters edit mode. AfterEdit is called by Edit after it enables editing of a record, recalculates calculated fields, and calls the data event handler to process a record change.


TDataSet.AfterInsert
 VCL Reference

TDataSet.AfterInsert

TDataSet	See also 	Example

Occurs after an application inserts a new record.

property AfterInsert: TDataSetNotifyEvent;

Description

Write an AfterInsert event handler to take specific action immediately after an application inserts a record. The Insert and Append methods generate an AfterInsert event after inserting or appending a new record.


TDataSet.AfterOpen
 VCL Reference

TDataSet.AfterOpen

TDataSet	See also 	Example

Occurs after an application completes opening a dataset and before any data access occurs.

property AfterOpen: TDataSetNotifyEvent;

Description

Write an AfterOpen event handler to take specific action immediately after an application opens the dataset. AfterOpen is called after the dataset establishes access to its data and the dataset is put into dsBrowse state. For example, an AfterOpen event handler might check an ini file to determine the last record touched in the dataset the previous time the application ran, and position the dataset at that record.


TDataSet.AfterPost
 VCL Reference

TDataSet.AfterPost

TDataSet	See also 	Example

Occurs after an application writes the active record to the database or change log and returns to browse state.

property AfterPost: TDataSetNotifyEvent;

Description

Write an AfterPost event handler to take specific action immediately after an application posts a change to the active record. AfterPost is called after a modification, deletion, or insertion is made to a record.


TDataSet.AfterRefresh
 VCL Reference

TDataSet.AfterRefresh

TDataSet	See also

Occurs after an application refreshes the data in the dataset.

property AfterRefresh: TDataSetNotifyEvent;

Description

Write an AfterRefresh event handler to take specific action immediately after an application has updated the records in the dataset. AfterRefresh is generated by calls to the Refresh method.


TDataSet.AfterScroll
 VCL Reference

TDataSet.AfterScroll

TDataSet	See also	Example

Occurs after an application scrolls from one record to another.

property AfterScroll: TDataSetNotifyEvent;

Description

Write an AfterScroll event handler to take specific action immediately after an application scrolls to another record as a result of a call to the First, Last, MoveBy, Next, Prior, FindKey, FindFirst, FindNext, FindLast, FindPrior, and Locate methods. AfterScroll is called after all other events triggered by these methods and any other methods that switch from record to record in the dataset.


TDataSet.BeforeCancel
 VCL Reference

TDataSet.BeforeCancel

TDataSet	See also

Occurs before an application executes a request to cancel changes to the active record.

property BeforeCancel: TDataSetNotifyEvent;

Description

Write a BeforeCancel event to take specific action before an application carries out a request to cancel changes. BeforeCancel is called by the Cancel method before it cancels a dataset operation such as Edit, Insert, or Delete.

An application might use the BeforeCancel event to record a user’s changes in an undo buffer.


TDataSet.BeforeClose
 VCL Reference

TDataSet.BeforeClose

TDataSet	See also	Example

Occurs immediately before the dataset closes.

property BeforeClose: TDataSetNotifyEvent;

Description

Write a BeforeClose event to take specific action before an application closes a dataset. Calling Close or setting the Active property to False results in a call to the BeforeClose event handler.


TDataSet.BeforeDelete
 VCL Reference

TDataSet.BeforeDelete

TDataSet	See also

Occurs before an application attempts to delete the active record.

property BeforeDelete: TDataSetNotifyEvent;

Description

Write a BeforeDelete event handler to take specific action before an application deletes the active record. BeforeDelete is called by Delete before it actually deletes a record.

Making use of this event an application might, for example, display a dialog box asking for confirmation before deleting the record. On denial of confirmation, the application could abort the deletion by calling the Abort procedure.


TDataSet.BeforeEdit
 VCL Reference

TDataSet.BeforeEdit

TDataSet	See also

Occurs before an application enters edit mode for the active record.

property BeforeEdit: TDataSetNotifyEvent;

Description

Write a BeforeEdit event handler to take specific action before an application enables editing of the active record. For example, an application that keeps a log of database edits could use the BeforeEdit event to record the edit request, time, and user before entering edit state.


TDataSet.BeforeInsert
 VCL Reference

TDataSet.BeforeInsert

TDataSet	See also 	Example

Occurs before an application enters insert mode.

property BeforeInsert: TDataSetNotifyEvent;

Description

Write a BeforeInsert event handler to take specific action before an application inserts or appends a new record. The Insert or Append method generates a BeforeInsert method before it sets the dataset into dsInsert state.


TDataSet.BeforeOpen
 VCL Reference

TDataSet.BeforeOpen

TDataSet	See also

Occurs before an application executes a request to open a dataset.

property BeforeOpen: TDataSetNotifyEvent;

propertyreadwrite

Description

Write a BeforeOpen event handler to take specific action before an application opens a dataset for viewing or editing. BeforeOpen is triggered when an application sets the Active property to True for a dataset or an application calls Open.


TDataSet.BeforePost
 VCL Reference

TDataSet.BeforePost

TDataSet	See also 	Example

Occurs before an application posts changes for the active record to the database or change log.

property BeforePost: TDataSetNotifyEvent;

Description

Write a BeforePost event handler to take specific action before an application posts dataset changes. BeforePost is triggered when an application calls the Post method. Post checks to make sure all required fields are present, then calls BeforePost before posting the record.

An application might use BeforePost to perform validity checks on data changes before committing them. If it encountered a validity problem, it could call Abort to cancel the Post operation.


TDataSet.BeforeRefresh
 VCL Reference

TDataSet.BeforeRefresh

TDataSet	See also

Occurs immediately before an application refreshes the data in the dataset.

property BeforeRefresh: TDataSetNotifyEvent;

Description

Write a BeforeRefresh event handler to take specific action immediately before an application updates the records in the dataset. BeforeRefresh is generated by calls to the Refresh method.


TDataSet.BeforeScroll
 VCL Reference

TDataSet.BeforeScroll

TDataSet	See also

Occurs before an application scrolls from one record to another.

property BeforeScroll: TDataSetNotifyEvent;

Description

Write a BeforeScroll event handler to take specific action immediately before an application scrolls to another record as a result of a call to the First, Last, MoveBy, Next, Prior, FindKey, FindFirst, FindNext, FindLast, FindPrior, and Locate methods. BeforeScroll is called before all other events triggered by these methods and any other methods that switch from record to record in the dataset.


TDataSet.OnCalcFields
 VCL Reference

TDataSet.OnCalcFields

TDataSet	See also

Occurs when an application recalculates calculated fields.

property OnCalcFields: TDataSetNotifyEvent;

Description

Write an OnCalcFields event handler to take specific action when an application recalculates calculated fields. A calculated field is one that derives its value from the values in one or more fields in the dataset, sometimes with additional processing.

OnCalcFields is triggered when

A dataset is opened.

A dataset is put into dsEdit state.

A record is retrieved from a database.

When the AutoCalcFields property is True, OnCalcFields is also triggered when:

Focus moves from one visual control to another, or from one column to another is a data-aware grid control and modifications were made to the record.

Note:	When the AutoCalcFields property is True, an OnCalcFields event handler should not modify the dataset (or a linked dataset if it is part of a master-detail relationship), because such modifications retrigger the OnCalcField event, leading to infinite recursion.

If an application permits users to change data, OnCalcFields is frequently triggered. To reduce the frequency with which OnCalcFields occurs, set AutoCalcFields to False.

Warning:	When the dataset is the master table of a master-detail relationship, OnCalcFields occurs before detail sets have been synchronized with the master table.


TDataSet.OnDeleteError
 VCL Reference

TDataSet.OnDeleteError

TDataSet	See also

Occurs when an application attempts to delete a record and an exception is raised.

type TDataSetErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction) of object;

property OnDeleteError: TDataSetErrorEvent;

Description

Write an OnDeleteError event handler to handle exceptions that occur when an attempt to delete a record fails.

DataSet is the dataset that failed to delete a record. E is a pointer to the database error object that contains the exception error message. An error handler can use this object to display an error message. Action indicates how the dataset should respond to the error.

When OnDeleteError is first invoked, Action is always set to daFail. If the error handler corrects the error condition that caused the handler to be invoked, set Action to daRetry before exiting the handler. When Action is daRetry, the delete operation is tried again. If the error condition cannot be corrected, you can suppress the display of an error message, if desired, by setting Action to daAbort instead of daFail.


TDataSet.OnEditError
 VCL Reference

TDataSet.OnEditError

TDataSet	See also

Occurs when an application attempts to modify or insert a record and an exception is raised.

type TDataSetErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction) of object;

property OnEditError: TDataSetErrorEvent;

Description

Write an OnEditError event handler to handle exceptions that occur when an attempt to edit a record fails.

DataSet is the dataset that failed in editing a record. E is a pointer to the database error object that contains the exception error message. An error handler can use this object to display an error message. Action indicates how the dataset should respond to the error.

When the OnEditError event handler is first invoked, Action is always set to daFail. If the error handler corrects the error condition that caused the handler to be invoked, set Action to daRetry before exiting the handler. When Action is daRetry, the edit operation is tried again. If the error condition cannot be corrected, you can suppress the display of an error message, if desired, by setting Action to daAbort instead of daFail.


TDataSet.OnFilterRecord
 VCL Reference

TDataSet.OnFilterRecord

TDataSet	See also 	Example

Occurs each time a different record in the dataset becomes the active record and filtering is enabled.

type TFilterRecordEvent = procedure(DataSet: TDataSet; var Accept: Boolean) of object;

property OnFilterRecord: TFilterRecordEvent;

Description

Write an OnFilterRecord event handler to specify for each record in a dataset whether it should be visible to the application. To indicate that a record passes the filter condition, the OnFilterRecord event handler must set the Accept parameter to True. To exclude a record, set the Accept parameter to False. Most TDataSet descendants (such as ADO datasets or BDE-based datasets) initialize Accept to True before calling the OnFilterRecord event handler.

Warning:	Do not supply an OnFilterRecord event handler to a unidirectional dataset. Unidirectional datasets do not support filters, and assigning an OnFilterRecord event handler causes the dataset to raise an exception.

Filtering is enabled if the Filtered property is True. When an application is processing a filter, the State property for the dataset is dsFilter.

Use an OnFilterRecord event handler to filter records using a criterion that can’t be implemented using the Filter property.  For example, using the Filter property, field comparisons are not supported against local tables (Paradox, dBASE, Access, FoxPro), but an OnFilterRecord event handler can implement any criterion at all.

Tip:	Be sure that any interactions between the Filter property and the OnFilterRecord event handler do not result in an empty filter set when they are used simultaneously in an application.


TDataSet.OnNewRecord
 VCL Reference

TDataSet.OnNewRecord

TDataSet	See also

Occurs when an application inserts or appends a new dataset record.

property OnNewRecord: TDataSetNotifyEvent;

Description

Write an OnNewRecord event handler to take specific actions as an application inserts or appends a new record. OnNewRecord is called as part of the insert or append process. An application might use the OnNewRecord event to set initial values for a record or as a way of implementing cascading insertions in related datasets.


TDataSet.OnPostError
 VCL Reference

TDataSet.OnPostError

TDataSet	See also

Occurs when an application attempts to modify or insert a record and an exception is raised.

type TDataSetErrorEvent = procedure(DataSet: TDataSet; E: EDatabaseError; var Action: TDataAction) of object;

property OnPostError: TDataSetErrorEvent;

Description

Write an OnPostError event handler to handle exceptions that occur when an attempt to post a record fails.

DataSet is the dataset that failed to post a record. E is a pointer to the database error object that contains the exception error message. An error handler can use this object to display an error message. Action indicates how the dataset should respond to the error.

When OnPostError is first invoked, Action is always set to daFail. If the error handler can corrects the error condition that caused the handler to be invoked, set Action to daRetry before exiting the handler. When Action is daRetry, the post operation is tried again. If an error condition cannot be corrected, you can suppress the display of an error message, if desired, by setting Action to daAbort instead of daFail.


 VCL Reference

TDataSet methods

TDataSet	Alphabetically	Legend

In TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

Delete

Destroy

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSet methods

TDataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TDataSet.ActiveBuffer
 VCL Reference

TDataSet.ActiveBuffer

TDataSet	See also

Returns a pointer to the buffer for the active record.

function ActiveBuffer: PChar;

Description

ActiveBuffer is used internally by many dataset methods to ensure that the active buffer points to the buffer for the active record. If an application uses existing dataset methods, the active buffer is always set correctly, so there is usually no need to call ActiveBuffer directly.

Note:	Unidirectional datasets do not buffer records. On Unidirectional datasets, ActiveBuffer returns a meaningless value.

ActiveBuffer is used by bookmarking methods to index into the active record buffer to retrieve bookmark information.

Applications that provide custom dataset routines may need to call ActiveBuffer to access the buffer data.


TDataSet.Append
 VCL Reference

TDataSet.Append

TDataSet	See also 	Example

Adds a new, empty record to the end of the dataset.

procedure Append;

Description

For datasets that permit editing, call Append to:

1	Open a new, empty record at the end of the dataset.

2	Set the active record to the new record.

After a call to Append, an application can enable users to enter data in the fields of the record, and can then post those changes to the database or change log using Post (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly appended record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.

For unindexed Paradox and dBASE tables, the record is added to the end of the dataset.

For SQL databases, the physical location of the appended record is implementation-specific. For indexed tables, the index is updated with the new recordinformation.


TDataSet.AppendRecord
 VCL Reference

TDataSet.AppendRecord

TDataSet	See also 	Example

Adds a new, populated record to the end of the dataset and posts it.

procedure AppendRecord(const Values: array of const);

Description

Call AppendRecord to create a new, empty record at the end of the dataset, populate it with the field values in Values, and post the values to the database or change log.

A newly appended record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.

For unindexed Paradox and dBASE tables, the record is added to the end of the dataset.

For SQL databases, the physical location of the append is implementation-specific. For indexed tables, the index is updated with the new record information.

The newly appended record becomes the active record.


TDataSet.BookmarkValid
 VCL Reference

TDataSet.BookmarkValid

TDataSet	See also

Indicates the validity of a specified bookmark.

function BookmarkValid(Bookmark: TBookmark): Boolean; virtual;

Description

This function returns False in all cases, indicating that any bookmark is invalid because the TDataSet class does not implement support for bookmarks.

Descendant classes that implement bookmark support override BookmarkValid to test bookmarks for validity and indicate when a bookmark is valid by returning True.


TDataSet.Cancel
 VCL Reference

TDataSet.Cancel

TDataSet	See also 	Example

Cancels modifications to the active record if those changes are not yet posted.

procedure Cancel; virtual;

Description

Call Cancel to undo modifications made to one or more fields belonging to the active record. As long as those changes are not already posted, Cancel returns the record to its previous state, and sets the dataset state to dsBrowse.

Typically Cancel is used to back out of changes in response to user request, or in field validation routines that back out illegal field values. The TDBNavigator object contains a Cancel button that calls Cancel.

Note:	If the dataset is not in an editing state (dsEdit or dsInsert), Cancel does nothing.


TDataSet.CheckBrowseMode
 VCL Reference

TDataSet.CheckBrowseMode

TDataSet	See also

Automatically posts or cancels data changes when the active record changes.

procedure CheckBrowseMode;

Description

CheckBrowseMode is used internally by many dataset methods to ensure that modifications to the active record are posted when a dataset’s state is dsEdit, dsInsert, or dsSetKey and a method switches to a different record.

If State is dsEdit or dsInsert, CheckBrowseMode calls UpdateRecord, and, if the Modified property for the dataset is True, calls Post. If Modified is False, CheckBrowseMode calls Cancel.

If State is dsSetKey, CheckBrowseMode calls Post.

If State is dsInactive, CheckBrowseMode raises an exception.

If an application uses existing dataset methods, CheckBrowseMode is always called when necessary, so there is usually no need to call CheckBrowseMode directly.

Applications that provide custom dataset routines may need to call CheckBrowseMode inside those routines to guarantee that changes are posted when switching to a different record.


TDataSet.ClearFields
 VCL Reference

TDataSet.ClearFields

TDataSet	See also

Clears the contents of all fields for the active record.

procedure ClearFields;

Description

Call ClearFields to erase the current contents of all fields in the active record. If the dataset is not in either dsInsert or dsEdit state, ClearFields raises an exception.

If a SetKey operation is not under way, ClearFields recalculates all calculated fields, and generates an OnDataChange event on the data source component associated with the dataset.


TDataSet.Close
 VCL Reference

TDataSet.Close

TDataSet	See also

Closes a dataset.

procedure Close;

Description

Call Close to set the Active property of a dataset to False. When Active is False, the dataset is closed; it cannot read or write data and data-aware controls can’t use it to fetch data or post edits.

An application must close the dataset before changing properties that affect the status of the database or the controls that display data in an application. For example, to change the DataSource property for a dataset, the dataset must be closed. Closing the dataset puts it into the dsInactive state.


TDataSet.CompareBookmarks
 VCL Reference

TDataSet.CompareBookmarks

TDataSet	See also

Implements a virtual function to compare two bookmarks.

function CompareBookmarks(Bookmark1, Bookmark2: TBookmark): Integer; virtual;

Description

As implemented in TDataSet, CompareBookmarks always returns 0, indicating no difference between the bookmarks. This is because TDataSet does not implement support for bookmarks.

Descendant classes that provide bookmark support override this method to return a value less than 0 if Bookmark1 is less than Bookmark2, 0 if the bookmarks are identical, and a value greater than 0 if Bookmark1 is greater than Bookmark2.


TDataSet.ControlsDisabled
 VCL Reference

TDataSet.ControlsDisabled

TDataSet	See also

Indicates whether data-aware controls update their display to reflect changes to the dataset.

function ControlsDisabled: Boolean;

Description

Call ControlsDisabled to ascertain whether the updating of data display in data-aware controls is currently disabled. If ControlsDisabled is True, controls are currently disabled. ControlsDisabled is True as long as the reference count that keeps track of disabling for the dataset is greater than zero. This count is incremented every time the DisableControls method is called and decremented when EnableControls is called. Applications call DisableControls to improve performance and prevent constant updates during automated iterations through records in the dataset.

In complex applications, when controls may be disabled multiple times by different processes, you can use ControlsDisabled as a check in a procedure to reenable controls should each call to DisableControls not be paired with a subsequent call to EnableControls. For example,

procedure ReEnableControls (DataSet: TDataSet);

begin

while DataSet.ControlsDisabled do

  DataSet.EnableControls;

end;


TDataSet.Create
 VCL Reference

TDataSet.Create

TDataSet	See also

Creates an instance of a TDataSet component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a dataset component at runtime. TDataSet contains abstract methods, and is not intended to be used in applications. Instead, applications instantiate dataset descendants such as TClientDataSet, TADODataSet, TTable, TQuery, TStoredProc, or TSQLDataSet.

Create creates the auxiliary objects such as empty field and field definition lists and initializes default property values (such as setting AutoCalcFields to True).


TDataSet.CreateBlobStream
 VCL Reference

TDataSet.CreateBlobStream

TDataSet	See also 	Example

Provides the interface for a method that creates a blob stream for a Binary large object (BLOB) field in the dataset.

function CreateBlobStream(Field: TField; Mode: TBlobStreamMode): TStream; virtual;

Description

Call CreateBlobStream to obtain a stream for reading and writing the value of the field specified by the Field parameter. The Mode parameter indicates whether the stream will be used for reading the field’s value (bmRead), writing the field’s value (bmWrite), or modifying the field’s value (bmReadWrite).

Blob streams are created in a specific mode for a specific field on a specific record. Applications create a new blob stream every time the record in the dataset changes: do not reuse an existing blob stream.

As implemented in TDataSet, CreateBlobStream always returns nil. Descendants of TDataSet override this method to create the TStream descendant that reads and writes BLOB data in the format that dataset type uses to store BLOB fields.

Tip:	It is preferable to call CreateBlobStream rather than creating a blob stream directly in code. This ensures that the stream is appropriate to the dataset, and may also ensure that datasets that do not always store BLOB data in memory fetch the blob data before creating the stream.


TDataSet.CursorPosChanged
 VCL Reference

TDataSet.CursorPosChanged

TDataSet	See also

Marks the internal cursor position as invalid.

procedure CursorPosChanged;

Description

CursorPosChanged is an internal method that invalidates the variable that tracks the physical cursor position relative to the logical cursor position. CurPosChanged is called by the Locate and Lookup methods prior to searching for a requested record. These methods, if successful, reposition the current record at the first matching record found.


TDataSet.Delete
 VCL Reference

TDataSet.Delete

TDataSet	See also

Deletes the active record and positions the dataset on the next record.

procedure Delete;

Description

Call Delete to remove the active record from the database. If the dataset is inactive, Delete raises an exception. Otherwise, Delete:

Verifies that the dataset is not empty (and raises an exception if it is).

Calls CheckBrowseMode to post any pending changes to a prior record if necessary.

Calls the BeforeDelete event handler.

Deletes the record.

Frees any buffers allocated for the record.

Puts the dataset into dsBrowse mode.

Resynchronizes the dataset to make the next undeleted record active.  If the record deleted was the last record in the dataset, then the previous record becomes the current record.

Calls the AfterDelete event handler.


TDataSet.Destroy
 VCL Reference

TDataSet.Destroy

TDataSet	See also

Destroys the TDataSet instance.

destructor Destroy;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically by Delphi. If an application creates its own instances of a dataset, however, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which checks that the dataset reference is not nil before calling Destroy.

Destroy performs the following tasks:

Closes the dataset.

Frees the Dataset Designer for the dataset, if it exists.

Disassociates the dataset from its data source components and frees the memory allocated for them.

Destroys the fields and field definitions associated with the dataset and frees the memory allocated to them.

Calls the inherited destructor.


TDataSet.DisableControls
 VCL Reference

TDataSet.DisableControls

TDataSet	See also 	Example

Disables data display in data-aware controls associated with the dataset.

procedure DisableControls;

Description

Call DisableControls prior to iterating through a large number of records in the dataset to prevent data-aware controls from updating every time the active record changes. Disabling controls prevents flicker and speeds performance because data does not need to be written to the display.

If controls are not already disabled, DisableControls records the current state of the dataset, broadcasts the state change to all associated data-aware controls and detail datasets, and increments the dataset’s disabled count variable. Otherwise, DisableControls just increments the disabled count variable.

The disabled count is used internally to determine whether to display data in data-aware controls. When the disable count variable is greater than zero, data is not updated.

If the dataset is the master of a master/detail relationship, calling DisableControls also disables the master/detail relationship. Setting BlockReadSize instead of calling DisableControls updates the detail datasets as you scroll through the dataset, but does not update data-aware controls.

Note:	Calls to DisableControls can be nested. Only when all calls to DisableControls is matched to a corresponding call to EnableControls does the dataset update data controls and detail datasets.


TDataSet.Edit
 VCL Reference

TDataSet.Edit

TDataSet	See also 	Example

Enables editing of data in the dataset.

procedure Edit;

Description

Call Edit to permit editing of the active record in a dataset. Edit determines the current state of the dataset. If the dataset is empty, Edit calls Insert. Otherwise Edit

Calls CheckBrowseMode to post any pending changes to a prior record if necessary.

Checks the CanModify property and raises an exception if the dataset can’t be edited.

Calls the BeforeEdit event handler.

Retrieves the record.

Puts the dataset into dsEdit state, enabling the application or user to modify fields in the record.

Broadcasts the state change to associated controls.

Calls the AfterEdit event handler.


TDataSet.EnableControls
 VCL Reference

TDataSet.EnableControls

TDataSet	See also 	Example

Re-enables data display in data-aware controls associated with the dataset.

procedure EnableControls;

Description

Call EnableControls to permit data display in data-aware controls after a prior call to DisableControls. EnableControls decrements the disabled count variable for the dataset if it is not already zero. If the disable count variable is zero, EnableControls updates the current state of the dataset, if necessary, and then tells associated controls to re-enable display.


TDataSet.FieldByName
 VCL Reference

TDataSet.FieldByName

TDataSet	See also 	Example

Finds a field based on its name.

function FieldByName(const FieldName: string): TField;

Description

Call FieldByName to retrieve field information for a field given its name. FieldName is the name of an existing field. FieldByName returns the TField component that represents the specified field. If the specified field does not exist, FieldByName raises an EDatabaseError exception.

FieldName can be the name of a simple field, the name of a subfield of an object field that has been qualified by the parent field’s name, or the name of an aggregated field. Because of this flexibility, it is often preferable to use FieldByName rather than the Fields property or the AggFields property.

An application can directly access specific properties and methods of the field returned by FieldByName. For example, the following statement determines if a specified field is a calculated field:

if Customers.FieldByName('FullName').Calculated then

  MessageDlg(Format('%s is a calculated field. ', ['FullName']), mtInformation, [mbOK], 0);

FieldByName is especially useful at design time for developers who are creating database applications, but do not have access to the underlying table and therefore cannot use persistent field components.

Tip:	To retrieve or set the value for a specific field, call the default dataset method FieldValues instead of FieldByName.


TDataSet.FindField
 VCL Reference

TDataSet.FindField

TDataSet	See also 	Example

Searches for a specified field in the dataset.

function FindField(const FieldName: string): TField;

Description

Call FindField to determine if a specified field component exists in a dataset. FieldName is the name of the field for which to search. This name can be the the name of a simple field, the name of a subfield of an object field that has been qualified by the parent field’s name, or the name of an aggregated field.

If FindField finds a field with a matching name, it returns the TField component for the specified field. Otherwise it returns nil.

FindField is the same as the FieldByName method, except that it returns nil rather than raising an exception when the field is not found.


TDataSet.FindFirst
 VCL Reference

TDataSet.FindFirst

TDataSet	See also

Implements a virtual method for positioning the dataset on the first record, respecting any filters.

function FindFirst: Boolean;

Description

This function returns False, indicating that the active record was not successfully changed. Descendant classes override FindFirst to make the first record active, honoring any filters that are in effect. In descendant classes, FindFirst returns True if the active record is successfully changed.


TDataSet.FindLast
 VCL Reference

TDataSet.FindLast

TDataSet	See also

Implements a virtual method for positioning the dataset on the last record, respecting any filters.

function FindLast: Boolean;

Description

This function returns False, indicating that the active record was not successfully changed. Descendant classes override FindLast to make the last record active, honoring any filters that are in effect. In descendants, FindLast returns True if the active record is successfully changed.


TDataSet.FindNext
 VCL Reference

TDataSet.FindNext

TDataSet	See also

Implements a virtual method for positioning the dataset on the next record, respecting any filters.

function FindNext: Boolean;

Description

This function returns False, indicating that the active record was not successfully changed. Descendant classes override FindNext to move to the next record of the dataset, honoring any filters that are in effect. In descendants, FindNext returns True if the active record is successfully changed.


TDataSet.FindPrior
 VCL Reference

TDataSet.FindPrior

TDataSet	See also 	Example

Implements a virtual method for positioning the dataset on the previous record, respecting any filters.

function FindPrior: Boolean;

Description

This function returns False, indicating that the active record was not successfully changed. Descendant classes override FindPrior to move to the previous record of the dataset, honoring any filters that are in effect. In descendants, FindPrior returns True if the active record is successfully changed.


TDataSet.First
 VCL Reference

TDataSet.First

TDataSet	See also 	Example

Moves to the first record in the dataset.

procedure First;

Description

Call First to make the first record in the dataset active. First posts any changes to the active record and:

Clears the record buffers.

Fetches the first record and makes it the active record.

Fetches any additional records required for display, such as those needed to fill out a grid control.

Sets the Bof property to True.

Broadcasts the record change so that data controls and linked detail sets can update.

Note:	TDataSet uses internal, protected methods to reposition the active record and to fetch additional records required for display. In TDataSet, these internal methods are empty stubs. Descendant classes implement these methods to enable the First method to work.


TDataSet.FreeBookmark
 VCL Reference

TDataSet.FreeBookmark

TDataSet	See also 	Example

Frees the resources allocated for a specified bookmark.

procedure FreeBookmark(Bookmark: TBookmark); virtual;

Description

Call FreeBookmark to free an existing bookmark before reassigning it. FreeBookmark releases the memory allocated for a specified bookmark when the bookmark is no longer needed.


TDataSet.GetBlobFieldData
 VCL Reference

TDataSet.GetBlobFieldData

TDataSet	See also

Reads BLOB data into a buffer.

function GetBlobFieldData(FieldNo: Integer; var Buffer: TBlobByteData): Integer; virtual;

Description

GetBlobFieldData reads blob data from the field specified by FieldNo into a Buffer. The buffer is a dynamic array of bytes, so that it can grow to accommodate the size of the BLOB data. GetBlobFieldData returns the size of the buffer.

GetBlobFieldData is intended primarily for internal use. Applications should use the BLOB stream returned by the CreateBlobStream method to access BLOB data.


TDataSet.GetBookmark
 VCL Reference

TDataSet.GetBookmark

TDataSet	See also 	Example

Allocates a bookmark for the active record in the dataset.

function GetBookmark: TBookmark; virtual;

Description

Call GetBookmark to establish a bookmark for the active record in the dataset. Establishing a bookmark for a record enables a dataset to return to that record at any time while the bookmark exists.

GetBookmark requires that a variable of type TBookmark already be declared in the application. Use GetBookmark to assign a value to the variable. This value can then be referenced by subsequent calls to GotoBookmark and FreeBookmark.

Applications that create bookmarks with GetBookmark must subsequently release the system resource allocated to them by calling FreeBookmark when the bookmarks are no longer needed.

Note:	GetBookmark relies on a protected method to obtain the bookmark value. TDataSet descendants implement this method to provide their own type of bookmark support. Unidirectional datasets do not support bookmarks, and so do not return a meaningful value.


TDataSet.GetCurrentRecord
 VCL Reference

TDataSet.GetCurrentRecord

TDataSet	See also

Implements a virtual function to retrieve the current record in a buffer.

function GetCurrentRecord(Buffer: PChar): Boolean; virtual;

Description

This function always returns False, indicating failure. For TDataSet descendants that override this method to retrieve the value of the current record, GetCurrentRecord returns True if Buffer is successfully filled with the value of the current record.


TDataSet.GetDetailDataSets
 VCL Reference

TDataSet.GetDetailDataSets

TDataSet	See also

Fills a list with a dataset for every detail dataset that is not the value of a nested dataset field.

procedure GetDetailDataSets(List: TList); virtual;

Description

Datasets can represent master/detail relationships in two ways: as linked cursors or as nested dataset fields. GetDetailDataSets lists all detail datasets of the active record into List if they are not the value of a nested dataset field. To obtain a list of the detail datasets that are the values of nested dataset fields, use the NestedDataSets property instead.


TDataSet.GetDetailLinkFields
 VCL Reference

TDataSet.GetDetailLinkFields

TDataSet

Introduces a method to list the field components that link this dataset as a detail of a master dataset.

procedure GetDetailLinkFields(MasterFields, DetailFields: TList); virtual;

Description

As implemented in TDataSet, GetDetailLinkFields does nothing. Descendants override this method to fill the two lists with field components that define a master-detail relationship between this dataset and another (master) dataset. The MasterFields list is filled with fields from the master table whose values must equal the values of the fields in the DetailFields list. The DetailFields list is filled with fields from the calling dataset.


TDataSet.GetFieldList
 VCL Reference

TDataSet.GetFieldList

TDataSet	See also

Retrieves a specified set of field objects into a list.

procedure GetFieldList(List: TList; const FieldNames: string);

Description

Call GetFieldList to copy a specified set of field objects into a list object created and maintained by the application.

List is the TList object into which to copy the field objects. FieldNames is a string containing the name of the fields to copy. Each field name in the string must be separated from other field names with a semicolon. GetFieldList builds a list that contains only the field objects for which it finds a matching name in the dataset’s list of field objects.

Note:	Applications do not normally call GetFieldList to copy field objects. Field objects are directly accessible through the dataset itself. In some cases, however, it can be useful to work with a copy of a field object or its data instead of working on the actual object in the dataset.


TDataSet.GetFieldData
 VCL Reference

TDataSet.GetFieldData

TDataSet	See also

Retrieves the current value of a field into a buffer.

function GetFieldData(FieldNo: Integer; Buffer: Pointer): Boolean; overload; virtual;

function GetFieldData(Field: TField; Buffer: Pointer): Boolean; overload; virtual;

function GetFieldData(Field: TField; Buffer: Pointer; NativeFormat: Boolean): Boolean; overload; virtual;

Description

Most applications do not need to call GetFieldData. TField objects call this method to implement their GetData method.

The Field or FieldNo parameter indicates the field whose data should be fetched. Field specifies the component itself, while FieldNo indicates its field number. The Buffer parameter is a memory buffer with sufficient space to accept the value of the field as it exists in the database (unformatted and untranslated). NativeFormat indicates whether the dataset fetches the field in Delphi’s native format for the field type. When NativeFormat is False, the dataset must convert the field value to the native type. This allows the field to handle data from different types of datasets (ADO-based, BDE-based, and so on) in a uniform manner.

GetFieldData returns a value that indicates whether the data was successfully fetched.

As implemented in TDataSet, GetFieldData always returns False, indicating that no data was fetched from the specified field. Descendants override this method to fetch data in whatever way is appropriate to the implementation of the dataset.


TDataSet.GetFieldNames
 VCL Reference

TDataSet.GetFieldNames

TDataSet	See also

Retrieves a list of names for all fields in a dataset.

procedure GetFieldNames(List: TStrings);

Description

Call GetFieldNames to get a list of names for all fields in a dataset. List is a TStrings object created and maintained by the application. For example, to load a list box with the field names of a table,

Table1.GetFieldNames(ListBox1.Items);

Retrieving a list of field names is especially useful for applications that work with datasets whose field objects are created dynamically at runtime. By retrieving a list of field names, the application can be restricted to working only with fields that exist at runtime.

Note:	GetFieldNames does not add the names of any aggregated fields to the list.


TDataSet.GotoBookmark
 VCL Reference

TDataSet.GotoBookmark

TDataSet	See also 	Example

Implements a virtual method to position the dataset on the record to which a specified bookmark points.

procedure GotoBookmark(Bookmark: TBookmark);

Description

GotoBookmark calls an internal method that is an empty stub in TDataSet. Descendants of TDataSet redeclare and implement the internal method so that GotoBookmark makes the record identified by the Bookmark parameter active.

Note:	Unidirectional datasets do not support bookmarks. Calling GotoBookmark on a unidirectional dataset does not change the active record.


TDataSet.Insert
 VCL Reference

TDataSet.Insert

TDataSet	See also 	Example

Inserts a new, empty record in the dataset.

procedure Insert;

Description

Call Insert to:

1	Open a new, empty record in the dataset.

2	Set the active record to the new record.

After a call to Insert, an application can allow users to enter data in the fields of the record, and then post those changes to the database or change log using Post. (Client datasets can subsequently apply updates in the change log back to the database by calling ApplyUpdates.) A newly inserted record is posted in one of three ways:

For Paradox tables with primary indexes, the record is inserted into the dataset in a position based on its index.

For Paradox tables without primary indexes, the record is inserted into the dataset at the current position.

For dBASE, FoxPro, and Access tables, the record is physically appended to the dataset at the end. If an index happens to be active, the new record may appear in a position relative to the index, but the record is still actually stored at the end of the table.

For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.


TDataSet.InsertRecord
 VCL Reference

TDataSet.InsertRecord

TDataSet	See also 	Example

Inserts a new, populated record to the dataset and posts it.

procedure InsertRecord(const Values: array of const);

Description

Call InsertRecord to create a new, empty record in the dataset, populate it with the field values in Values, and post the values to the database or change log.

A newly inserted record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.

For unindexed Paradox tables, the record is inserted into the dataset at the current position.

For unindexed dBASE, FoxPro, and Access tables, the record is inserted into the dataset at the end.

For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.

The newly inserted record becomes the active record.


TDataSet.IsEmpty
 VCL Reference

TDataSet.IsEmpty

TDataSet	See also

Indicates whether the dataset contains no records.

function IsEmpty: Boolean;

Description

Call IsEmpty to determine if a dataset has records. IsEmpty returns True if the dataset does not contain any records. Otherwise it returns False.


TDataSet.IsLinkedTo
 VCL Reference

TDataSet.IsLinkedTo

TDataSet	See also

Indicates whether a dataset is linked to a specified data source.

function IsLinkedTo(DataSource: TDataSource): Boolean;

Description

Call IsLinkedTo to verify that a dataset provides data through a specific data source. DataSource is the data source component to test.

Note:	IsLinkedTo is mainly provided for developers deriving custom components based on TDataSet. It is not intended or needed for general data access.

If the datasource provides data from the dataset or one of its nested dataset fields (or a nested dataset nested in a dataset field...),  IsLinkedTo returns True. If the datasource provides data from some other dataset, or if the data source does not already have a dataset of its own, IsLinkedTo returns False.


TDataSet.IsSequenced
 VCL Reference

TDataSet.IsSequenced

TDataSet	See also

Indicates whether the underlying database table uses record numbers to indicate the order of records.

function IsSequenced: Boolean; virtual;

Description

Use IsSequenced to determine whether the underlying database table supports sequence numbers, or whether these are computed by the dataset component. When IsSequenced returns True, applications can safely use the RecNo property to navigate to records in the dataset.

As implemented in TDataSet, IsSequenced always returns True. Descendants of TDataSet reimplement this method to return a value that depends on the underlying table type.


TDataSet.Last
 VCL Reference

TDataSet.Last

TDataSet	See also

Moves to the last record in the dataset.

procedure Last;

Description

Call Last to make the last record in the dataset active. If the dataset is not unidirectional Last posts any changes to the active record and

Clears the record buffers.

Fetches the last record and makes it the active record.

Fetches any additional records required for display, such as those needed to fill out a grid control.

Sets the Eof property to True.

Broadcasts the record change so that data controls and linked detail sets can update.

For unidirectional datasets, Last raises an EDatabaseError exception.

Note:	TDataSet uses internal, protected methods to reposition the active record and to fetch additional records required for display. In TDataSet, these internal methods are empty stubs. Descendant classes implement these methods to enable the Last method to work.


TDataSet.Locate
 VCL Reference

TDataSet.Locate

TDataSet	See also

Implements a virtual method for searching a dataset for a specified record and making it the active record.

function Locate(const KeyFields: string; const KeyValues: Variant; Options: TLocateOptions): Boolean; virtual;

Description

This function

Checks whether the dataset is unidirectional, and if so, raises an EDatabaseError exception.

Returns False, indicating that a matching record was not found and the active record was not changed.

Descendant classes that are not unidirectional override this method so that it locates the record where the fields identified by the semicolon-separated list of fields in KeyFields have the values specified by the Variant or Variant array KeyValues. Options indicates whether the search is case insensitive and whether partial matches are supported. Locate returns True if a record is found that matches the specified criteria and that record is now active.


TDataSet.Lookup
 VCL Reference

TDataSet.Lookup

TDataSet	See also

Implements a virtual method to retrieve field values from a record that matches specified search values.

function Lookup(const KeyFields: string; const KeyValues: Variant; const ResultFields: string): Variant; virtual;

Description

This function

Checks whether the dataset is unidirectional, and if so, raises an EDatabaseError exception.

Returns a Variant with the value False, indicating that a matching record was not found.

Descendant classes that are not unidirectional override this method so that it locates the record where the fields identified by the comma-delimited string KeyFields have the values specified by the Variant or Variant array KeyValues. In classes that implement Lookup, it returns a Variant or Variant array that contains the value or values of the fields specified by the comma-delimited string ResultFields on the specified record.


TDataSet.MoveBy
 VCL Reference

TDataSet.MoveBy

TDataSet	See also	Example

Moves to another record relative to the active record in the dataset.

function MoveBy(Distance: Integer): Integer;

Description

Call MoveBy to move the active record by the number of records specified by Distance. A positive value for Distance indicates forward progress through the dataset, while a negative value indicates backward progress. For example, the following statement moves backward through the dataset by 10 records:

MoveBy(-10);

MoveBy posts any changes to the active record and

Sets the Bof and Eof properties to False.

If Distance is positive, repeatedly fetches Distance subsequent records (if possible), and makes the last record fetched active. If an attempt is made to move past the end of the file, MoveBy sets Eof to True.

If Distance is negative, repeatedly fetches the appropriate number of previous records (if possible), and makes the last record fetched active. If an attempt is made to move past the start of the file, MoveBy sets Bof to True. If the dataset is unidirectional, the dataset raises an EDatabaseError exception when MoveBy tries to fetch a prior record.

Broadcasts information about the record change so that data-aware controls and linked datasets can update.

Returns the number of records moved. In most cases, Result is the absolute value of Distance, but if MoveBy encounters the beginning-of-file or end-of-file before moving Distance records, Result will be less than the absolute value of Distance.


TDataSet.Next
 VCL Reference

TDataSet.Next

TDataSet	See also 	Example

Moves to the next record in the dataset.

procedure Next;

Description

Call Next to move to the next record in the dataset, making it the active record. Next posts any changes to the active record and

Sets the Bof and Eof properties to False.

Fetches the next record and makes it the active record.

If the dataset is not unidirectional, fetches any additional records required for display, such as those needed to fill out a grid control.

Sets the Eof property to True if the last record in the dataset was already active.

Broadcasts the record change so that data controls and linked detail sets can update.

Note:	TDataSet uses internal, protected methods to move the active record and to fetch additional records required for display. In TDataSet, these internal methods are empty stubs. Descendant classes implement these methods to enable the Next method to work.


TDataSet.Open
 VCL Reference

TDataSet.Open

TDataSet	See also

Opens the dataset.

procedure Open;

Description

Call Open to set the Active property for the dataset to True. When Active is True, data can be populated with data. It can read data from a database or other source (such as a provider). Depending on the CanModify property, active datasets can post changes.

Setting A ctive to True:

Triggers the BeforeOpen event handler if one is defined for the dataset.

Sets the dataset state to dsBrowse.

Establishes a way to fetch data (typically by opening a cursor).

Triggers the After Open event handler if one is defined for the dataset.

If an error occurs during the dataset open, dataset state is set to dsInactive, and any cursor is closed.


TDataSet.Post
 VCL Reference

TDataSet.Post

TDataSet	See also 	Example

Implements a virtual method to write a modified record to the database or change log.

procedure Post; virtual;

Description

TDataSet implements a virtual method to write a modified record to the database or change log. Dataset methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, such as First, Last, Next, and Prior automatically call Post.

Different types of datasets handle posting differently:

BDE-enabled datasets post records directly to the database server unless CachedUpdates is True. When caching updates, BDE-enabled datasets post records to an internal change log until they are applied to the database by calling ApplyUpdates.

ADO and InterBaseExpress datasets post records directly to the database server.

Client datasets post records to an internal change log until they are applied to the database by calling ApplyUpdates or merged with the client dataset’s data by calling MergeChangeLog.

Unidirectional datasets are read-only and do not post records at all.

Designers of custom datasets can choose whether to implement Post by writing records to the database server or to an internal change log.


TDataSet.Prior
 VCL Reference

TDataSet.Prior

TDataSet	See also

Moves to the previous record in the dataset.

procedure Prior;

Description

Call Prior to move to the previous record in the dataset, making it the active record. Prior posts any changes to the active record and

Sets the Bof and Eof properties to False.

Fetches the previous record and makes it the active record. If the dataset is unidirectional, it raises an EDatabaseError exception at this point.

Fetches any additional records required for display, such as those needed to fill out a grid control.

Sets the Bof property to True if the first record in the dataset was already active.

Broadcasts the record change so that data controls and linked detail sets can update.

Note:	TDataSet uses internal, protected methods to move the active record and to fetch additional records required for display. In TDataSet, these internal methods are empty stubs. Descendant classes implement these methods to enable the Prior method to work.


TDataSet.Refresh
 VCL Reference

TDataSet.Refresh

TDataSet	See also	Example

Refetches data from the database to update a dataset’s view of data.

procedure Refresh;

Description

Call Refresh to ensure that an application has the latest data from a database. For example, when an application turns off filtering for a dataset, it should immediately call Refresh to display all records in the dataset, not just those that used to meet the filter condition.

Note:	The Refresh method does not work for all TDataSet descendants. In particular, TQuery components do not support the Refresh method if the query is not “live”. To refresh a static TQuery, close and reopen the dataset.

TDataSet generates a BeforeRefresh event before refreshing the records and an AfterRefresh event afterwards.

Note:	Most datasets try to maintain the current record position when you call refresh. However, this is not always possible. For example, the current record may have been deleted from the server by another user. Unidirectional datasets have no mechanism for locating the current record after a refresh, and always move back to the first record.

Warning:	Unidirectional datasets refresh the data by closing and reopening the cursor. This can have unintended side effects if, for example, you have code in the OnClose or OnOpen event handlers.


TDataSet.Resync
 VCL Reference

TDataSet.Resync

TDataSet	See also

Refetches the active record and the records that precede and follow it.

type TResyncMode = set of (rmExact, rmCenter);

procedure Resync(Mode: TResyncMode); virtual;

Description

Resync is used internally by other dataset methods to resynchronize the dataset with underlying physical data when making calls that may change the internal cursor position. Applications should use the Refresh method instead of calling Resync.

Mode indicates optional processing that Resync should handle. If Mode contains rmExact, Resync raises an exception if Resync is called when the cursor is not positioned on a valid record. If Mode contains rmCenter, Resync positions the active record in the center of all buffered records.

Regardless of Mode, Resync also activates the buffers for the active record, retrieves prior and subsequent records for display purposes, and triggers a dataset change event.


TDataSet.SetFields
 VCL Reference

TDataSet.SetFields

TDataSet	See also

Sets the values for all fields in a record

procedure SetFields(const Values: array of const);

Description

Call SetFields to set values for some or all fields in the active record at the same time.

Values contains the values to insert into each field. Values are assigned to the record based on the order of columns in the table or tables underlying the dataset. These values can be literals, variables, NULL, or nil. If Values contains fewer values than there are fields in the record, all records for which values are not provided are assigned a NULL value. A NULL value overwrites any existing value in such fields.

Before calling SetFields, call Edit to put the dataset into dsEdit state. After calling SetFields, call Post to write the changes to the database or change log.

Note:	To set values for some fields while retaining existing values for others, pass nil for each field that should not change.


TDataSet.Translate
 VCL Reference

TDataSet.Translate

TDataSet

Implements a virtual procedure to copy a data string from a source to a destination, optionally performing character translation during the copy.

function Translate(Src, Dest: PChar; ToOem: Boolean): Integer; virtual;

Description

As implemented by TDataSet, Translate copies a source string to a destination string, and ignores the value passed in ToOem. Translate provides a fallback method for derived dataset objects that do not reimplement Translate.

In BDE-enabled datasets, Translate converts the source string from ANSI (the native character mapping for the VCL) to OEM (the native character mapping for the BDE) when ToOem is True, and reverses that translation when ToOem is False.

Custom datasets can use Translate to convert strings betweenANSI and any character mapping used by the underlying data access mechanism.


TDataSet.UpdateCursorPos
 VCL Reference

TDataSet.UpdateCursorPos

TDataSet	See also

Positions the cursor on the active record.

procedure UpdateCursorPos;

Description

UpdateCursorPos is an internal routine used by many dataset methods to ensure that the physical cursor is positioned on the active record. Normally an application should not need to call UpdateCursorPos. Typically UpdateCursorPos is called to ensure that the physical cursor position matches the logical cursor position.


TDataSet.UpdateRecord
 VCL Reference

TDataSet.UpdateRecord

TDataSet	See also

Ensures that data-aware controls and detail datasets reflect record updates.

procedure UpdateRecord;

Description

UpdateRecord is used internally by some dataset methods to inform data-aware controls of updates and trigger an OnUpdateRecord event if cached updates are enabled. Applications should not need to call UpdateRecord directly unless they provide custom dataset methods that bypass TDataSet methods.


TDataSet.UpdateStatus
 VCL Reference

TDataSet.UpdateStatus

TDataSet

Reports the update status for the active record.

function UpdateStatus: TUpdateStatus; virtual;

Description

As implemented in TDataSet, UpdateStatus always returns usUnmodified. Descendant classes override this method to reflect whether the active record has been modified, and if so, how.


Hierarchy

TObject

TPersistent

TComponent

TDataSet


TDateField
 VCL Reference

Hierarchy	Properties	Methods	Events 	Using TDateField	See also

TDateField represents a date field in a dataset.

Unit

DB

Description

TDateField encapsulates the fundamental behavior common to Date fields. Date fields contain date values (without any time value), which they manage using the TDateTime type.

If you use the Fields editor at design time to create a persistent field component for the date field, you can access it by name at runtime. When using dynamic field components, you can access the TDateField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TDateField properties

TDateField	Alphabetically	Legend

In TDateField

DataSize

Derived from TDateTimeField

AsDateTime

AsFloat

AsSQLTimeStamp

AsString

AsVariant

DisplayFormat

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsInteger

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDateField properties

TDateField	By object	Legend

Alignment

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TDateField.DataSize
 VCL Reference

 TDateField.DataSize

TDateField	Example

Specifies the amount of memory needed to store the value of a date field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a date field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For date fields, DataSize is always 4. This is the number of bytes used to store date values in the database tables, not the size of the TDateTime data type used to store and manipulate date values by TDateField.


 VCL Reference

TDateField events

TDateField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDateField events

TDateField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDateField methods

TDateField	Alphabetically	Legend

In TDateField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDateField methods

TDateField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TDateField.Create
 VCL Reference

TDateField.Create

TDateField	See also

Creates an instance of TDateField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TDateField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftDate. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TDateField. After instantiating a TDateField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TDateField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TDateField with a dataset component by setting its DataSet property.

The example below creates a TDateField object for a field named LastContact accessed through a TClientDataSet named ClientDataSet1.

var

  T: TDateField;

begin

  ClientDataSet1.Close;

  T := TDateField.Create(ClientDataSet1);

  T.FieldName := 'LastContact';

  T.Name := ClientDataSet1.Name + T.FieldName;

  T.Index := ClientDataSet1.FieldCount;

  T.DataSet := ClientDataSet1;

  T.DisplayFormat := 'mm/dd/yyyy';

  ClientDataSet1.FieldDefs.UpDate;

  ClientDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TDateTimeField

TDateField


TDataSetProvider
 VCL Reference

 TDataSetProvider

Hierarchy	Properties	Methods	Events	Using TDataSetProvider	See also

TDataSetProvider provides data from a dataset and resolves updates to that dataset or its database server.

Unit

Provider

Description

Use TDataSetProvider to provide data from a dataset to a client dataset or XML broker and to resolve updates from that client dataset or XML broker back to the dataset or to its underlying database server. TDataSetProvider can be a part of the same application as the client dataset or XML broker, or it can be placed in the application server of a multi-tiered application.  It serves as a data broker between a remote database server and a client dataset.

TDataSetProvider packages data from a dataset and passes it in one or more transportable data packets to the client dataset or XML broker.

When the provider supplies data to a client dataset, the client dataset reconstructs the data in the data packet to create a local, in-memory copy for user access. When user access is complete, the client dataset repackages any changed data and sends the updates back to the provider. The provider applies the updates to the database or source dataset.

When the provider supplies data to an XML broker, the XML broker adds the data packet, in XML format, to an HTML document that is downloaded by a Web client. When the XML broker receives updates from the Web client, it sends the updates to the provider, which applies them to the database or source dataset.

Client datasets and XML brokers communicate with a provider through the IAppServer interface. In multi-tiered applications, this is the interface of the remote data module that contains the provider. To enable the remote data module to pass calls to the provider, the provider’s Exported property must be True, and its Owner property must specify the remote data module.


 VCL Reference

TDataSetProvider properties

TDataSetProvider	Alphabetically	Legend

In TDataSetProvider

Constraints

DataSet

Params

ResolveToDataSet

Derived from TBaseProvider

Options

Resolver

UpdateMode

Derived from TCustomProvider

Data

Exported

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetProvider properties

TDataSetProvider	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Data

DataSet

DesignInfo

Exported

Name

Options

Owner

Params

Resolver

ResolveToDataSet

Tag

UpdateMode

VCLComObject


TDataSetProvider.Constraints
 VCL Reference

TDataSetProvider.Constraints

TCustomProvider 	See also

Controls whether database constraints are passed to the client so that it can check them locally.

property Constraints: Boolean;

Description

Set Constraints to specify whether data constraints defined for the provider’s associated dataset are sent along with the metadata for the dataset. Sending constraints allows client datasets to check for constraint violations locally, so that updates are less likely to fail when sent back to the database server.

When Constraints is True, constraints are sent. To prevent the provider from sending constraint information, set Constraints to False.

Note:	Before constraints can be sent to client applications, they must be imported to the data dictionary on the application server. Use SQL explorer to import constraints to the data dictionary.


TDataSetProvider.DataSet
 VCL Reference

TDataSetProvider.DataSet

TDataSetProvider 	See also	Example

Specifies the dataset from which the provider provides data and to which it applies updates.

property DataSet: TDataSet;

Description

Set DataSet to link the dataset provider to a dataset that it represents. The dataset provider packages the records from (and other information about) DataSet into data packets that can be used by client datasets and XML brokers. DataSet must be defined if the provider is used to create data packets.

If the ResolveToDataSet property is True, the provider applies updates from the application server directly to this dataset. Otherwise, the provider applies updates directly to the underlying database server.

Note:	The provider communicates with DataSet using the IProviderSupport interface. This interface is available in all datasets, although in TDataSet most of the IProviderSupport methods are simple stubs that either do nothing or generate an exception. The dataset classes that ship with Delphi (dbExpress datasets, BDE-enabled datasets, ADO-enabled datasets, InterBase Express datasets, and client datasets) override these protected methods to implement the IProviderSupport interface in a more useful fashion. If you are using custom dataset components, check with the vendor whether they can work with a dataset provider.


TDataSetProvider.Params
 VCL Reference

TDataSetProvider.Params

TDataSetProvider 	See also

Stores the parameter values currently in use.

property Params: TParams;

Description

This protected property acts as a temporary cache for parameter values from clients. It is set to the parameter values supplied by calls to the SetParams, Execute, or GetRecords methods.

Note:	If the dataset provider is responding to multiple client datasets or XML brokers, the value of Params can only be used within the context of a single call to SetParams, Execute, or GetRecords. After that, other client calls can change the value of parameters.


TDataSetProvider.ResolveToDataSet
 VCL Reference

TDataSetProvider.ResolveToDataSet

TDataSetProvider 	See also

Specifies whether updates should be applied to a dataset or directly to the database server.

property ResolveToDataSet: Boolean;

Description

Set ResolveToDataSet to specify how updates are applied. When ResolveToDataSet is True, the Resolver property is set to a TDataSetResolver component, which applies updates directly to the dataset specified by the DataSet property. This can be useful if the application uses the events on the dataset component or if the dataset does not represent the data from a database server (for example, a client dataset).

When ResolveToDataSet is False, the Resolver property is set to a TSQLResolver component, which applies updates directly to the database server associated with DataSet. This can be more efficient, because it skips the intermediate step of using the dataset. It is the only way to resolve updates if the source dataset is read-only (for example, a unidirectional dataset).


 VCL Reference

TDataSetProvider events

TDataSetProvider	Alphabetically 	Legend

In TDataSetProvider

OnGetDataSetProperties

OnGetTableName

Derived from TBaseProvider

AfterUpdateRecord

BeforeUpdateRecord

OnGetData

OnUpdateData

OnUpdateError

Derived from TCustomProvider

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 VCL Reference

TDataSetProvider events

TDataSetProvider	By object 	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

AfterUpdateRecord

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

BeforeUpdateRecord

OnDataRequest

OnGetData

OnGetDataSetProperties

OnGetTableName

OnUpdateData

OnUpdateError


TDataSetProvider.OnGetDataSetProperties
 VCL Reference

TDataSetProvider.OnGetDataSetProperties

TDataSetProvider 	See also 	Example

Occurs when the provider adds additional information to a data packet it is creating.

type TGetDSProps = procedure(Sender: TObject; DataSet: TDataSet; out Properties: OleVariant) of object;

property OnGetDataSetProperties: TGetDSProps;

Description

Write an OnGetDataSetProperties event handler to include application-defined information in the data packets. This information can later be returned using the GetOptionalParam method of the client dataset that represents the data in the packet.

The Sender parameter specifies the provider that is creating the data packet. The DataSet parameter specifies the source dataset that the data packet represents. Return the custom information as the Properties parameter.

The structure of Properties is a Variant array of Variant arrays. Each member of the Properties array represents a single named item that can be retrieved using the client dataset’s GetOptionalParam method. Specify each item as an array of three elements:

A string representing the name used to later retrieve the information.

A Variant representing the value that can be retrieved.

A Boolean that indicates whether the information is sent back to the provider in delta packets.

Note:	The following names are reserved and can’t be used as the name for storing custom information:

UNIQUE_KEY	DEFAULT_ORDER	CHANGE_LOG	SERVER_COL

CONSTRAINTS	DATASET_CONTEXT	DATASET_DELTA	LCID

BDERECORD_X	TABLE_NAME	MD_FIELDLINKS	UPDATEMODE


TDataSetProvider.OnGetTableName
 VCL Reference

TDataSetProvider.OnGetTableName

TDataSetProvider	See also

Occurs when a resolver initializes its information about the table to which it applies updates.

property OnGetTableName: TGetTableNameEvent;

Description

Write an OnGetTableName event handler to enable the provider to apply updates to datasets where the resolver can’t determine the target table from the provider’s dataset. When the resolver component is initialized, it stores the name of the table that is the target of its updates. This table name can be used in generated SQL statements that apply the updates. When the dataset is a TTable, the resolver can use the table’s TableName property. However, if the dataset represents a multi-table query or stored procedure, the resolver has no way to determine the destination of the update without input from an OnGetTableName event handler.

Return the name of the target table as the TableName parameter. The resolver uses this to apply updates.


 VCL Reference

TDataSetProvider methods

TDataSetProvider	Alphabetically	Legend

In TDataSetProvider

Create

CreateDataPacket

CreateResolver

Destroy

DoBeforeExecute

DoBeforeGetRecords

DoGetProviderAttributes

DoGetTableName

FetchDetails

FetchDetailsFromServer

GetDataSetFromDelta

InternalApplyUpdates

InternalExecute

InternalGetParams

InternalGetRecords

InternalRowRequest

LocateRecord

Notification

UpdateRecord

Derived from TCustomProvider

ApplyUpdates

DataRequest

Execute

GetParams

GetRecords

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetProvider methods

TDataSetProvider	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateDataPacket

CreateResolver

DataRequest

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoBeforeExecute

DoBeforeGetRecords

DoGetProviderAttributes

DoGetTableName

Execute

ExecuteAction

FetchDetails

FetchDetailsFromServer

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetDataSetFromDelta

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParams

GetParentComponent

GetRecords

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

InternalApplyUpdates

InternalExecute

InternalGetParams

InternalGetRecords

InternalRowRequest

IsImplementorOf

LocateRecord

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction

UpdateRecord


TDataSetProvider.Create
 VCL Reference

TDataSetProvider.Create

TDataSetProvider	See also

Creates and initializes a TDataSetProvider object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a provider at runtime. Providers placed in forms or data modules at design time are created automatically.


TDataSetProvider.CreateDataPacket
 VCL Reference

TDataSetProvider.CreateDataPacket

TDataSetProvider	See also

Generates a data packet for the data associated with the provider.

procedure CreateDataPacket(PacketOpts: TGetRecordOptions; ProvOpts: TProviderOptions; var RecsOut: Integer; var Data: OleVariant); override;

Description

CreateDataPacket is used internally to generate the data packets that are returned by GetRecords.

The PacketOpts parameter indicates what information (other than record values) is included in the data packet. It reflects any Options passed to the GetRecords method.

The ProvOpts parameter reflects the current value of the Options property.

The RecsOut parameter specifies the number of records desired in the packet and returns the actual number of records in the generated data packet.

The Data parameter returns the generated data packet.


TDataSetProvider.CreateResolver
 VCL Reference

TDataSetProvider.CreateResolver

TDataSetProvider	See also

Creates a resolver component for handling the application of updates.

function CreateResolver: TCustomResolver; override;

Description

CreateResolver is called automatically when a resolver is needed to implement one of the provider’s methods. CreateResolver returns a newly instantiated resolver object, which is assigned to the Resolver property. The type of resolver created depends on the ResolveToDataSet property:

When ResolveToDataSet is True, CreateResolver returns a TDataSetResolver component, which applies updates directly to the dataset specified by the DataSet property.

When ResolveToDataSet is False, CreateResolver returns a TSQLResolver component, which applies updates directly to the database server associated with DataSet.


TDataSetProvider.Destroy
 VCL Reference

TDataSetProvider.Destroy

TDataSetProvider	See also

Frees an instance of a data set provider.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the reference to the provider is not nil before calling its Destroy method. Destroy frees all helper objects, including the resolver component referenced by the Resolver property.


TDataSetProvider.DoBeforeExecute
 VCL Reference

TDataSetProvider.DoBeforeExecute

TDataSetProvider	See also

Generates a BeforeExecute event.

procedure DoBeforeExecute(const CommandText: WideString, var Params, OwnerData: OleVariant); override;

Description

The Execute method calls DoBeforeExecute to generate the BeforeExecute event before it executes CommandText or executes an associated query or stored procedure.

CommandText is either an optional SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. If Options includes poAllowCommandText, DoBeforeExecute sends CommandText to the associated dataset so that it can execute the provided statement instead of its query or stored procedure.

Params contains any parameter values that should be applied to CommandText or to the query or stored procedure before execution. DoBeforeExecute assigns these parameter values to the dataset (if appropriate).

OwnerData supplies custom information to the BeforeExecute event handler. The event handler can change this value. The returned value is then passed to an AfterExecute event handler and then returned to the caller of the Execute method.


TDataSetProvider.DoBeforeGetRecords
 VCL Reference

TDataSetProvider.DoBeforeGetRecords

TDataSetProvider	See also

Generates a BeforeGetRecords event.

procedure DoBeforeGetRecords(Count: Integer; Options: Integer; const CommandText: WideString; var Params, OwnerData: OleVariant); override;

Description

The GetRecords method calls DoBeforeGetRecords to generate the BeforeGetRecords event before it fetches data and assembles it into a data packet.

Count is the number of records requested. TDataSetProvider does not use this parameter.

Options indicates whether the data packet should include metadata, whether it should start with the first record, and whether the data packet should be encoded in XML. In TDataSetProvider, DoBeforeGetRecords ignores this parameter.

CommandText specifies either an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. If Options includes poAllowCommandText, DoBeforeGetRecords sends CommandText to the associated dataset so that it can generate the set of records.

Params contains any parameter values that should be applied to CommandText or to a query or stored procedure before fetching data into a data packet. DoBeforeGetRecords assigns these values to the associated dataset, if appropriate.

OwnerData supplies custom information to the BeforeGetRecords event handler. The event handler can change this value. The returned value is then passed to an AfterGetRecords event handler and then (optionally) returned to the caller of the GetRecords method.


TDataSetProvider.DoGetProviderAttributes
 VCL Reference

TDataSetProvider.DoGetProviderAttributes

TDataSetProvider	See also

Fills a list with information about the dataset that can be used when providing or resolving.

procedure DoGetProviderAttributes(DataSet: TDataSet; List: TList); virtual;

Description

DoGetProviderAttributes is used internally to fetch information about the dataset. This includes both information provided by the dataset (using the IProviderSupport method PSGetAttributes) and custom information supplied by an OnGetDataSetProperties event handler.

The DataSet parameter specifies the dataset that stores the information. The List parameter is the list that is filled by DoGetProviderAttributes. DoGetProviderAttributes adds information to the list in Name/Value pairs.


TDataSetProvider.DoGetTableName
 VCL Reference

TDataSetProvider.DoGetTableName

TDataSetProvider	See also

Generates an OnGetTableName event.

procedure DoGetTableName(DataSet: TDataSet; var TableName: string); virtual;

Description

The resolver calls DoGetTableName when it initializes the information it needs to apply updates. Override this method to provide an alternate mechanism for determining the name of the dataset that is the target of an update operation.

DataSet is the dataset that is the target of the update operation.

The name of the target dataset as it should appear in generated SQL statements is returned as the TableName parameter.


TDataSetProvider.FetchDetails
 VCL Reference

TDataSetProvider.FetchDetails

TDataSetProvider	See also

Fills a delta dataset with all nested dataset field values.

procedure FetchDetails(Source, Delta: TDataSet); override;

Description

FetchDetails is used internally to fetch the current values of any nested datasets when the provider is executing its RowRequest method. Source is a source dataset that has the current values for all fields. Delta is a delta dataset that must be updated so that its nested detail fields match the values in Source.


TDataSetProvider.FetchDetailsFromServer
 VCL Reference

TDataSetProvider.FetchDetailsFromServer

TDataSetProvider	See also

Fills a delta dataset with all nested dataset field values.

procedure FetchDetailsFromServer(Source, Current, Delta: TDataSet; ATree: TUpdateTree);

Description

FetchDetails is used internally to fetch the current values of any nested datasets when the provider is executing its RowRequest method and the source dataset is unidirectional.

Source is a source dataset. Because it is unidirectional, however, it is not necessarily positioned on the correct record.

Current is another unidirectional dataset that contains a single record from Source. This record is the current record according to ATree.

Delta is a delta dataset that must be updated so that its nested detail fields match the values in Current.

ATree is the TUpdateTree object that is managing Delta.


TDataSetProvider.GetDataSetFromDelta
 VCL Reference

TDataSetProvider.GetDataSetFromDelta

TDataSetProvider	See also

Returns a dataset positioned on the record of the source dataset that is currently being fetched or updated.

function GetDataSetFromDelta(ATree: TUpdateTree; Source, Delta: TDataSet; Mode: TUpdateMode): TDataSet;

Description

GetDataSetFromDelta is used internally to fetch a specific record when the source dataset is unidirectional.

ATree is a TUpdateTree object that represents the update or data fetch operation.

Source is a source dataset. Because it is unidirectional, however, it is not necessarily positioned on the correct record.

Delta is a delta dataset that indicates the desired record.

Mode indicates the criteria to use for locating a record on the server from the dataset that Source uses. The values that follow these criteria come from Delta.

GetDataSetFromDelta returns a unidirectional dataset that corresponds to Source but that contains a single record based on the criteria in Delta and Mode.


TDataSetProvider.InternalApplyUpdates
 VCL Reference

TDataSetProvider.InternalApplyUpdates

TDataSetProvider 	See also

Provides the underlying implementation of the ApplyUpdates method.

function InternalApplyUpdates(const Delta: OleVariant; MaxErrors: Integer; out ErrorCount: Integer): OleVariant; override;

Description

The ApplyUpdates method calls InternalApplyUpdates to apply the updates contained in a delta packet after generating the BeforeApplyUpdates event and before generating the AfterApplyUpdates event.

If the Options property includes poReadOnly, InternalApplyUpdates raises an exception. Otherwise, it tells the dataset to start a transaction, calls the ApplyUpdates method of its Resolver component to handle the actual update and resolving process, and tells the dataset to complete the transaction.

Delta is the delta packet containing insertions, deletions, and modifications to be applied.

MaxErrors indicates the maximum number of errors that can be applied before stopping the update operation. If MaxErrors is –1, the provider tries to apply all updates.

ErrorCount returns the number of errors encountered during the update operation.

InternalApplyUpdates returns a data packet of updates that could not be applied to the database as an OleVariant.


TDataSetProvider.InternalExecute
 VCL Reference

TDataSetProvider.InternalExecute

TDataSetProvider	See also

Provides the underlying implementation of the Execute method.

procedure InternalExecute(const CommandText: WideString, var Params: OleVariant); override;

Description

The Execute method calls InternalExecute to execute the appropriate SQL statement after calling DoBeforeExecute to generate a BeforeExecute event and apply the CommandText and Params. InternalExecute passes the execute command on to its associated dataset. Datasets that represent queries or stored procedures that don’t return a cursor execute the appropriate SQL command, while other datasets (such as those that represent a table) ignore the command.

CommandText is an SQL statement that replaces the SQL of an associated query, or the name of a stored procedure that replaces the associated stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

On entry, Params supplies parameter values for the query, stored procedure, or CommandText string. On exit, Params returns any output parameters.


TDataSetProvider.InternalGetParams
 VCL Reference

TDataSetProvider.InternalGetParams

TDataSetProvider	See also

Returns the requested parameter values as a Variant array.

function InternalGetParams(Types: TParamTypes = AllParamTypes): OleVariant; override;

Description

The provider uses InternalGetParams internally whenever it needs to assemble the current parameter values into an OleVariant. This provides the underlying implementation of the GetParams method, as well as assembling parameter values for methods that return output parameters (such as Execute or GetRecords).

The Types parameter limits the parameter values that are returned to a subset of all possible parameter types. If this parameter is omitted, all parameter values are returned.


TDataSetProvider.InternalGetRecords
 VCL Reference

TDataSetProvider.InternalGetRecords

TDataSetProvider	See also

Provides the underlying implementation of the GetRecords method.

function InternalGetRecords(Count: Integer; out RecsOut: Integer; Options: TGetRecordOptions; const CommandText: WideString; var Params: OleVariant); OleVariant; override;

Description

The GetRecords method calls InternalGetRecords to assemble a data packet after calling DoBeforeGetRecords to apply the CommandText and Params and generate a BeforeGetRecords event. InternalGetRecords calls CreateDataPacket to create a data packet that reflects the current property settings of the provider. It then generates an OnGetData event.

Count indicates the number of records to retrieve. If Count is -1, all records are retrieved. If Count is 0, only metadata is retrieved. If Count is greater than 0, only the specified number of records are retrieved.

RecsOut returns the actual number of records retrieved.

Options indicates what information should be added to the data packet in addition to data. It can include grMetaData (include metadata), grReset (start providing records with the first one in the dataset), and grXML (encode the datapacket in XML rather than as an OleVariant) or grXMLUTF8 (same as grXML but use UTF8 to encode extended characters).

CommandText specifies an optional SQL statement that replaces the SQL of an associated query, or the name of a table or stored procedure that replaces the associated table or stored procedure. This parameter is ignored if the Options property does not include poAllowCommandText.

Params specifies any parameter values that should be applied to CommandText or to an associated query or stored procedure. If the provider is associated with a TTable, Params specifies field values that filter the result set. On exit from GetRecords, Params returns any output parameters.

Records are returned as a data packet in a Variant.

Note:	If the DataSet property is not set, InternalGetRecords raises an exception.


TDataSetProvider.InternalRowRequest
 VCL Reference

TDataSetProvider.InternalRowRequest

TDataSetProvider	See also

Provides the underlying implementation of the RowRequest method.

function InternalRowRequest(const Row: OleVariant; RequestType: TFetchOptions): OleVariant; override;

Description

The RowRequest method calls InternalRowRequest to assemble the specified information after generating a BeforeRowRequest event and before generating an AfterRowRequest event. InternalRowRequest passes this request on to its associated Resolver.

The Row parameter is an OleVariant that describes the record about which information is requested.

The RequestType parameter indicates the type of information required.

InternalRowRequest returns the requested information in a delta packet.


TDataSetProvider.LocateRecord
 VCL Reference

TDataSetProvider.LocateRecord

TDataSetProvider 	See also

Positions a data set on the record that corresponds to the current update in a specified delta packet.

procedure LocateRecord(Source, Delta: TDataSet; virtual;

Description

LocateRecord is called indirectly by the RowRequest method to locate a record before fetching information about it. The Source parameter is the dataset containing current record values. The Delta parameter is a delta packet that identifies the desired type of information and information identifying the desired record.

LocateRecord uses the criteria specified by UpdateMode to identify the desired record.


TDataSetProvider.Notification
 VCL Reference

TDataSetProvider.Notification

TDataSetProvider	See also

Responds to notifications that objects are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification overrides the inherited method to add a check that the dataset specified by the DataSet property is not being deleted. If DataSet is about to be destroyed, Notification sets the DataSet property to nil.


TDataSetProvider.UpdateRecord
 VCL Reference

TDataSetProvider.UpdateRecord

TDataSetProvider 	See also

Retrieves specified data from a source dataset into a delta packet.

procedure UpdateRecord(Source, Delta: TDataSet; BlobsOnly: Boolean); override;

Description

UpdateRecord is called indirectly by the RowRequest method to fetch information about a specified record. The Source parameter is the dataset containing indicated record. The Delta parameter is a delta packet that returns the requested data. BlobsOnly indicates whether all field values should be provided (BlobsOnly =False) or only Blob field values (BlobsOnly =True).


Hierarchy

TObject

TPersistent

TComponent

TCustomProvider

TBaseProvider

TDataSetProvider


TDBCheckBox
 VCL Reference

 TDBCheckBox

Hierarchy	Properties	Methods	Events 	Using TDBCheckBox	See also

TDBCheckBox is a data-aware control that allows the user to select or deselect a single value.

Unit

DBCtrls

Description

Use TDBCheckBox to place a data-aware check box on a form. A check box presents an option to the user; the user can check it to select the option or uncheck it to deselect the option. A database check box (TDBCheckBox) is much like an ordinary check box (TCheckBox), except that it is aware of the data in a particular field of a dataset. Because check boxes can represent only two values (checked and unchecked), database check boxes are most appropriate for boolean fields. They can, however, be used to group the values of any field into two sets.

For applications that don’t require the data-aware capabilities of TDBCheckBox, use TCheckBox instead to conserve system resources.


 VCL Reference

TDBCheckBox properties

TDBCheckBox	Alphabetically	Legend

In TDBCheckBox

DataField

DataSource

Field

ReadOnly

ValueChecked

ValueUnchecked

Derived from TCustomCheckBox

Alignment

AllowGrayed

Checked

State

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBCheckBox properties

TDBCheckBox	By object	Legend

Action

Align

AlignDisabled

Alignment

AllowGrayed

Anchors

BiDiMode

BoundsRect

Brush

Caption

Checked

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ShowHint

Showing

State

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

ValueChecked

ValueUnchecked

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBCheckBox.DataField
 VCL Reference

TDBCheckBox.DataField

TDBCheckBox	See also

Identifies the field from which the data-aware control displays data.

property DataField: String;

Description

Set DataField to the field name of the field component that the check box represents. Access by the TDBCheckBox to the dataset in which the field is located is provided by a TDataSource component, specified in the DataSource property.

DBCheckBox1.DataField := 'HasPaid';


TDBCheckBox.DataSource
 VCL Reference

TDBCheckBox.DataSource

TDBCheckBox	See also

Links the check box to a dataset.

property DataSource: TDataSource;

Description

Specify the data source component through which the data from a dataset component is provided to the TDBCheckBox. To allow the check box to represent the data for a field, both the DataSource and the DataField properties must be set.

DBCheckBox1.DataSource := DataSource1;


TDBCheckBox.Field
 VCL Reference

TDBCheckBox.Field

TDBCheckBox	See also

Indicates the TField object whose current value the check box represents.

property Field: TField;

Description

Use the TField reference provided by the Field property when you want to change the value of the data in the field programmatically.

DBCheckBox1.Field.AsBoolean := True;


TDBCheckBox.ReadOnly
 VCL Reference

TDBCheckBox.ReadOnly

TDBCheckBox	See also

Determines whether the user can change the value of the field.

property ReadOnly: Boolean;

Description

Use ReadOnly to specify whether the check box allows the user to change the field value by checking or unchecking the box. When ReadOnly is True, the checkbox can only be used to display the value of the field on the current record. When ReadOnly is False, the user can use the check box to change the field value.


TDBCheckBox.ValueChecked
 VCL Reference

TDBCheckBox.ValueChecked

TDBCheckBox	See also

Specifies the field value that corresponds to the checked state of the checkbox.

property ValueChecked: String;

Description

Use ValueChecked to specify the field value represented by the check box when it is checked. If the value of the ValueChecked property is equal to the data in the field of the current record of the dataset, the database check box appears checked. When the user checks the database check box, the field value is set to ValueChecked.

ValueChecked can represent more than one value in a semicolon-delimited list of items. If any of the items matches the contents of the field of the current record in the dataset, the check box appears checked. For example, set the value of ValueChecked string like this:

DBCheckBox1.ValueChecked := 'True;Yes;On';

If the contents of the associated field is the string True, Yes, or On, the check box is checked. The value of the field is compared to ValueChecked in a case-insensitive comparison. If the user selects a check box where ValueChecked represents more than one value, the first item in the list is assigned to the field.

If the contents of the field of the current record matches a string specified as the value of the ValueUnchecked property, the check box appears unchecked. If the contents of the field matches no string in either ValueChecked or ValueUnchecked, the check box appears gray.

Note:	If the DataField of the database check box is a logical field, the check box is always checked if the contents of the field is True, and it is always unchecked if the contents of the field is False. The values of the ValueChecked and ValueUnchecked properties have no affect on logical fields.


TDBCheckBox.ValueUnchecked
 VCL Reference

TDBCheckBox.ValueUnchecked

TDBCheckBox	See also

Specifies the field value that corresponds to the unchecked state of the checkbox.

property ValueUnchecked: String;

Description

Use ValueUnchecked to specify the field value represented by the check box when it is unchecked. If the value of the ValueUnchecked property is equal to the data in the field of the current record of the dataset, the database check box appears unchecked. When the user unchecks the database check box, the field value is set to ValueUnchecked.

ValueUnchecked can represent more than one value in a semicolon-delimited list of items. If any of the items matches the contents of the field of the current record in the dataset, the check box appears unchecked. For example, set the value of ValueUnchecked string like this:

DBCheckBox1.ValueUnchecked := 'False;No;Off';

If the contents of the associated field is the string False, No, or Off, the check box appears unchecked. The value of the field is compared to ValueUnchecked in a case-insensitive comparison. If the user unchecks a check box where ValueUnchecked represents more than one value, the first item in the list is assigned to the field.

If the contents of the field of the current record matches a string specified as the value of the ValueChecked property, the check box appears checked. If the contents of the field matches no string in either ValueChecked or ValueUnchecked, the check box appears gray.

Note:	If the DataField of the database check box is a logical field, the check box is always unchecked if the contents of the field is False, and it is always checked if the contents of the field is True. The values of the ValueChecked and ValueUnchecked properties have no affect on logical fields.


 VCL Reference

TDBCheckBox events

TDBCheckBox	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBCheckBox events

TDBCheckBox	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBCheckBox methods

TDBCheckBox	Alphabetically	Legend

In TDBCheckBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomCheckBox

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBCheckBox methods

TDBCheckBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBCheckBox.Create
 VCL Reference

TDBCheckBox.Create

TDBCheckBox	See also

Creates an instance of TDBCheckBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBCheckBox object at runtime. For TDBCheckBox objects placed on forms or data modules at design time, Create is called automatically.

Pass a single Component as a parameter to provide the TDBCheckBox object with an Owner that is responsible for freeing it.After calling the inherited constructor to allocate and initialize a generic checkbox, Create

Adds csReplicatable to ControlStyle.

Creates and initializes the helper objects needed to link to a dataset.


TDBCheckBox.Destroy
 VCL Reference

TDBCheckBox.Destroy

TDBCheckBox	See also

Destroys an instance of TDBCheckBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDBCheckBox reference is not nil and only then calls Destroy.

Destroy frees the helper objects of the TDBCheckBox before calling the inherited destructor.


TDBCheckBox.ExecuteAction
 VCL Reference

TDBCheckBox.ExecuteAction

TDBCheckBox	See also

Invokes an action with the TDBCheckBox as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBCheckBox as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBCheckBox could not handle the action.


TDBCheckBox.UpdateAction
 VCL Reference

TDBCheckBox.UpdateAction

TDBCheckBox	See also

Updates an action to reflect the current state of the TDBCheckBox.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBCheckBox an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBCheckBox they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TCustomCheckBox

TDBCheckBox


TDBComboBox
 VCL Reference

 TDBComboBox

Hierarchy	Properties	Methods	Events 	Using TDBComboBox	See also

TDBComboBox represents a data-aware combo box control.

Unit

DBCtrls

Description

Use TDBComboBox to allow users to change the value of a field on the current record in a dataset either by selecting an item from a list or by typing in the edit box part of the control. The selected item or entered text becomes the new value of the field if the database combo box’s ReadOnly property is False. The combo box can be customized to enable or disable typing in the edit region of the control, to display the list as a drop down or as a permanently displayed list, to sort the items in the list, and so on.


 VCL Reference

TDBComboBox properties

TDBComboBox	Alphabetically	Legend

In TDBComboBox

DataField

DataSource

Field

Items

ReadOnly

Style

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

ItemHeight

SelText

Sorted

Derived from TCustomCombo

Canvas

DropDownCount

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBComboBox properties

TDBComboBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropDownCount

DroppedDown

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

ItemHeight

ItemIndex

Items

Items

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBComboBox.DataField
 VCL Reference

TDBComboBox.DataField

TDBComboBox	See also

Identifies the field from which the combo box displays data.

property DataField: String;

Description

Set DataField to specify which field is represented by the combo box. (Note that this is does not refer to the source of the list, but to the field into which the selected value is inserted. The list values must be supplied manually using the Items property.) The combo box displays the current value of this field, and allows the user to set the value of this field on the current record. The dataset the field is located in is specified by the DataSource property.

DBComboBox1.DataField := 'CountryName';

Tip:	For a data-aware combo box component for which the list values are automatically supplied, use a TDBLookupComboBox instead.


TDBComboBox.DataSource
 VCL Reference

TDBComboBox.DataSource

TDBComboBox	See also

Links the combo box to a dataset.

property DataSource: TDataSource;

Description

Specify the data source component that identifies the dataset in which the target field is found. To allow the combo box to represent the data for a field, both the DataSource and the DataField properties must be set.

DBComboBox1.DataSource := DataSource1;


TDBComboBox.Field
 VCL Reference

TDBComboBox.Field

TDBComboBox	See also

Identifies the TField object whose current value the combo box represents.

property Field: TField;

Description

Use the TField reference provided by the Field property when you want to change the value of the data in the field programmatically.

DBComboBox1.Field.AsString := 'Brazil';


TDBComboBox.Items
 VCL Reference

TDBComboBox.Items

TDBComboBox	See also

Contains the strings that appear in the list of the database combo box.

property Items: TStrings;

Description

Use Items to supply the values in the list from which the user can choose. Because Items is an object of type TStrings, you can add, delete, insert, and move items using the Add, Delete, Insert, Exchange, and Move methods of the TStrings object. For example, to add each string to the combo box list, write code such as the following:

while not Table2.Eof do begin

  DBComboBox1.Items.Add(Table2.FieldByName('Country').AsString);

  Table2.Next;

end;

The ItemIndex property determines which item is selected, if any.


TDBComboBox.ReadOnly
 VCL Reference

TDBComboBox.ReadOnly

TDBComboBox	See also

Determines if the user can change the value of the field.

property ReadOnly: Boolean;

Description

Set ReadOnly to specify whether the combo box should be used for display purposes only. If ReadOnly is True, the combo box can only be used to display the value of the field on the current record. If ReadOnly is False, the user can use the combo box to edit the field’s value.


TDBComboBox.Style
 VCL Reference

TDBComboBox.Style

TDBComboBox	See also

Determines how the combo box displays its items.

property Style: TComboBoxStyle;

Description

Use Style to specify whether the user can type values into the edit region as well as select values from the list, whether the list drops down when the user clicks a button or if it is always displayed, whether the list is owner-drawn, and so on. By default, Style is csDropDown, meaning that the combo box displays each item as a string in a drop-down list, and that users can edit the value in the edit region. Style can be any of the values: csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, and csOwnerDrawVariable.

Owner-draw combo boxes can display items other than strings. For example, a combo box could display graphical images along with or instead of its strings. Owner-draw combo boxes require more programming, however, as the application must render the image for each item in the list.

When Style is csOwnerDrawFixed or csOwnerDrawVariable, the OnDrawItem event occurs when the list items need to be drawn. If Style is csOwnerDrawVariable, an OnMeasureItem event occurs as well.


 VCL Reference

TDBComboBox events

TDBComboBox	Alphabetically	Legend

Derived from TCustomComboBox

OnDrawItem

OnMeasureItem

Derived from TCustomCombo

OnChange

OnDropDown

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TDBComboBox events

TDBComboBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnDropDown

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnStartDock

OnStartDrag


 VCL Reference

TDBComboBox methods

TDBComboBox	Alphabetically	Legend

In TDBComboBox

Create

Destroy

ExecuteAction

UpdateAction

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBComboBox methods

TDBComboBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBComboBox.Create
 VCL Reference

TDBComboBox.Create

TDBComboBox	See also

Creates an instance of TDBComboBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBComboBox object at runtime. For TDBComboBox objects placed on forms at design time, Create is called automatically.

Pass a single Component as a parameter to provide the TDBComboBox object with an Owner that is responsible for freeing it.After calling the inherited constructor to allocate and initialize a generic combo box object, Create creates and initializes the helper objects needed to link to a dataset.


TDBComboBox.Destroy
 VCL Reference

TDBComboBox.Destroy

TDBComboBox	See also

Destroys an instance of TDBComboBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDBComboBox reference is not nil and only then calls Destroy.

Destroy frees the helper objects of the TDBComboBox before calling the inherited destructor.


TDBComboBox.ExecuteAction
 VCL Reference

TDBComboBox.ExecuteAction

TDBComboBox	See also

Invokes an action with the TDBComboBox as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBComboBox as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBComboBox could not handle the action.


TDBComboBox.UpdateAction
 VCL Reference

TDBComboBox.UpdateAction

TDBComboBox	See also

Updates an action to reflect the current state of the TDBComboBox.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBComboBox an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBComboBox they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox

TDBComboBox


TDBCtrlPanel
 VCL Reference

TDBCtrlPanel

Hierarchy	Properties	Methods	See also

TDBCtrlPanel represents a panel in a TDBCtrlGrid object.

Unit

DBCGrids

Description

Use TDBCtrlPanel to hold the fields from a single record in a dataset.  TDBCtrlGrid represents the records in a dataset by arranging copies of the same TDBCtrlPanel object in rows or columns, where each panel represents a single record in the dataset.

Lay out a single panel at design time. Add data-aware edit controls or data display objects.  At runtime, TDBCtrlGrid replicates the panel for the records in the dataset.

The appearance of the panel is determined by the properties of the TDBCtrlGrid object that contains the panel. The OnPaintPanel event of TDBCtrlGrid allows customized painting of the panels.


 VCL Reference

TDBCtrlPanel properties

TDBCtrlPanel	Alphabetically	Legend

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBCtrlPanel properties

TDBCtrlPanel	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TDBCtrlPanel methods

TDBCtrlPanel	Alphabetically	Legend

In TDBCtrlPanel

CreateLinked

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBCtrlPanel methods

TDBCtrlPanel	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateLinked

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBCtrlPanel.CreateLinked
 VCL Reference

TDBCtrlPanel.::CreateLinked

TDBCtrlPanel

Creates and initializes an instance of TDBCtrlPanel.

constructor CreateLinked(DBCtrlGrid: TDBCtrlGrid);

Description

Do not call the constructor for TDBCtrlPanel directly. TDBCtrlGrid calls the CreateLinked method for TDBCtrlPanel from its own constructor.

CreateLinked initializes the Parent property to the DBCtrlGrid parameter and initializes the ControlStyle property to include [csAcceptsControls, csCaptureMouse, csClickEvents, csDoubleClicks, csOpaque, csReplicatable].


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TDBCtrlPanel


TDBCtrlGrid
 VCL Reference

 TDBCtrlGrid

Hierarchy	Properties	Methods	Events 	Using TDBCtrlGrid	See also

TDBCtrlGrid displays records from a data source in a free-form layout.

Unit

DBCGrids

Description

Put a TDBCtrlGrid object on a form to display and edit the records from a database table or query. Unlike the TDBGrid object, which displays each record in a single row, TDBCtrlGrid allows a free-form layout for each record in the dataset. Each record is displayed in its own panel; Design one panel at design time and TDBCtrlGrid replicates that panel for each record displayed.

At runtime, users can use the database navigator (TDBNavigator) to move through data in the TDBCtrlGrid object, and to insert, delete, and edit the data. Edits made using the data grid are not posted to the underlying dataset until the user moves to a different record or closes the application.


 VCL Reference

TDBCtrlGrid properties

TDBCtrlGrid	Alphabetically	Legend

In TDBCtrlGrid

AllowDelete

AllowInsert

Canvas

ColCount

DataSource

EditMode

Orientation

PanelBorder

PanelCount

PanelHeight

PanelIndex

PanelWidth

RowCount

SelectedColor

ShowFocus

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DragCursor

DragMode

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBCtrlGrid properties

TDBCtrlGrid	By object	Legend

Action

Align

AlignDisabled

AllowDelete

AllowInsert

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColCount

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

EditMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Orientation

Owner

PanelBorder

PanelCount

PanelHeight

PanelIndex

PanelWidth

Parent

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

RowCount

SelectedColor

ShowFocus

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBCtrlGrid.AllowDelete
 VCL Reference

TDBCtrlGrid.AllowDelete

TDBCtrlGrid	See also

Determines whether the user can delete the current record from the dataset by pressing Ctrl+Delete.

property AllowDelete: Boolean;

Description

Set AllowDelete to False to prevent the TDBCtrlGrid object from deleting records.

When AllowDelete is False, TDBCtrlGrid will not delete records from the dataset when the user presses Ctrl+Delete or the DoKey method is called with the Key parameter set to gkDelete. The TDBCtrlGrid object can still be used to insert records.

When AllowDelete is True (the default), TDBCtrlGrid will delete the current record when the user presses Ctrl+Delete or when the DoKey method is called with the Key parameter set to gkDelete. Even with AllowDelete set to True, records cannot be deleted unless the dataset is in edit mode.


TDBCtrlGrid.AllowInsert
 VCL Reference

TDBCtrlGrid.AllowInsert

TDBCtrlGrid	See also

Determines whether the user can insert new records with the Insert key or append new records with the Ctrl+Insert key combination.

property AllowInsert: Boolean;

Description

Set AllowInsert to False to prevent the TDBCtrlGrid object from inserting records.

If AllowInsert is False, TDBCtrlGrid does not insert records into the dataset when the user presses Insert or Ctrl+Insert or when the DoKey method is called with the Key parameter set to gkInsert or gkAppend. The TDBCtrlGrid object can still be used to delete records.

If AllowInsert is True (the default), TDBCtrlGrid inserts a new record into the dataset before the current record when the user presses Insert or appends a new record to the end of the dataset when the user presses Ctrl+Insert. Even with AllowInsert set to True, records cannot be inserted unless the dataset is in edit mode.


TDBCtrlGrid.Canvas
 VCL Reference

TDBCtrlGrid.Canvas

TDBCtrlGrid	See also

Indicates the drawing surface used to draw the TDBCtrlGridObject.

property Canvas: TCanvas;

Description

Use the properties and methods of Canvas to draw an image of a panel in the TDBCtrlGrid object from an OnPaintPanel event handler.


TDBCtrlGrid.ColCount
 VCL Reference

TDBCtrlGrid.ColCount

TDBCtrlGrid	See also

Specifies the number of columns of panels shown in the grid.

property ColCount: Integer;

Description

Set ColCount to the number of columns of panels that should appear in the TDBCtrlGrid object. Each panel represents a separate record in the dataset.

Setting ColCount causes the TDBCtrlGrid object to resize to accommodate the new number of columns. PanelWidth doesn’t change.


TDBCtrlGrid.DataSource
 VCL Reference

TDBCtrlGrid.DataSource

TDBCtrlGrid

Identifies the link to the dataset where the TDBCtrlGrid object finds its data.

property DataSource: TDataSource;

Description

Set DataSource to the TDataSource object that links to the dataset where the grid should fetch its data. DataSource allows the data-aware grid to read from, write to, and navigate around the dataset.

DBCtrlGrid1.DataSource := DataSource1;


TDBCtrlGrid.EditMode
 VCL Reference

TDBCtrlGrid.EditMode

TDBCtrlGrid	See also

Determines whether the TDBCtrlGrid can be used to insert, delete, or edit records.

property EditMode: Boolean;

Description

Set EditMode to True to allow the user to edit the dataset using the grid. The user can toggle EditMode by pressing F2 or Enter. Inserting or deleting records using the grid will set EditMode to True.


TDBCtrlGrid.Orientation
 VCL Reference

TDBCtrlGrid.Orientation

TDBCtrlGrid	See also

Determines the order in which records from the dataset are displayed in the TDBCtrlGrid.

type

  TDBCtrlGridOrientation = (goVertical, goHorizontal);

property Orientation: TDBCtrlGridOrientation;

Description

Set Orientation to goVertical (the default) to have the panels ordered in rows with a vertical scroll bar. Set Orientation to goHorizontal to arrange panels in columns with a horizontal scroll bar.


TDBCtrlGrid.PanelBorder
 VCL Reference

TDBCtrlGrid.PanelBorder

TDBCtrlGrid	See also

Determines whether each panel is drawn with a raised border around it.

type

  TDBCtrlGridBorder = (gbNone, gbRaised);

property PanelBorder: TDBCtrlGridBorder;

Description

The default value of gbRaised draws a raised border. Set PanelBorder to gbNone to eliminate the border.


TDBCtrlGrid.PanelCount
 VCL Reference

TDBCtrlGrid.PanelCount

TDBCtrlGrid	See also

Specifies the number of records visible in the grid.

property PanelCount: Integer;

Description

TDBCtrlGrid can represent a number of panels equal to the number in ColCount times the number in RowCount. Usually, PanelCount will be the same as this value. PanelCount will be smaller than this if there are not enough records in the dataset to fill the entire grid.


TDBCtrlGrid.PanelHeight
 VCL Reference

TDBCtrlGrid.PanelHeight

TDBCtrlGrid	See also

Specifies the height (in pixels) of each panel.

property PanelHeight: Integer;

Description

Set PanelHeight to the desired size of each panel in the grid. When the PanelHeight property is set, the grid resizes itself to fit the new panel height.


TDBCtrlGrid.PanelIndex
 VCL Reference

TDBCtrlGrid.PanelIndex

TDBCtrlGrid	See also

Specifies the index of the panel in the grid that represents the current record.

property PanelIndex: Integer;

Description

Read PanelIndex to determine which panel represents the current record in the dataset. Set PanelIndex to move in the dataset to the record corresponding to a panel in the grid.

PanelIndex is a number in the range 0.PanelCount - 1, where 0 is the first panel, 1 is the second panel, and so on. The location of the panel with the index PanelIndex depends on the value of the Orientation property. When Orientation is goVertical, the panels are counted by rows. When Orientation is goHorizontal, the panels are counted by columns.


TDBCtrlGrid.PanelWidth
 VCL Reference

TDBCtrlGrid.PanelWidth

TDBCtrlGrid	See also

Specifies the width (in pixels) of each panel.

property PanelWidth: Integer;

Description

Set PanelWidth to the desired size of each panel in the grid. When the PanelWidth property is set, the grid resizes itself to fit the new panel width.


TDBCtrlGrid.RowCount
 VCL Reference

TDBCtrlGrid.RowCount

TDBCtrlGrid	See also

Specifies the number of rows of panels displayed in the grid.

property RowCount: Integer;

Description

Set RowCount to the number of rows of panels that should appear in the TDBCtrlGrid object. Each panel represents a separate record in the dataset.

Setting RowCount causes the TDBCtrlGrid object to resize to accommodate the new number of rows. PanelHeight does not change.


TDBCtrlGrid.ShowFocus
 VCL Reference

TDBCtrlGrid.ShowFocus

TDBCtrlGrid	See also

Indicates whether to draw a focus rectangle around the current record in the TDBCtrlGrid when it has input focus.

property ShowFocus: Boolean;

Description

Set ShowFocus to True to have TDBCtrlGrid draw a focus rectangle around the current record when it has input focus. Set ShowFocus to False when providing visual feedback of focus in some other manner in an OnPaintPanel event handler.


TDBCtrlGrid.SelectedColor
 VCL Reference

TDBCtrlGrid.SelectedColor

TDBCtrlGrid 	See also

Specifies the background color of the panel that represents the current record in the dataset.

property SelectedColor: TColor;

Description

Set SelectedColor to a value other than value of the Color property to make the panel that represents the current record stand out. TDBCtrlGrid draws the selected panel using SelectedColor even when it does not have input focus. All other panels are drawn with the background set to the value of the Color property.


 VCL Reference

TDBCtrlGrid events

TDBCtrlGrid	Alphabetically	Legend

In TDBCtrlGrid

OnPaintPanel

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 VCL Reference

TDBCtrlGrid events

TDBCtrlGrid	By object	Legend

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnPaintPanel

OnStartDrag


TDBCtrlGrid.OnPaintPanel
 VCL Reference

TDBCtrlGrid.OnPaintPanel

TDBCtrlGrid	See also

Occurs when TDBCtrlGrid needs to draw a panel in the grid.

type TPaintPanelEvent = procedure(DBCtrlGrid: TDBCtrlGrid; Index: Integer) of object;

property OnPaintPanel: TPaintPanelEvent;

Description

Write an OnPaintPanel event handler to customize the drawing of a panel in the TDBCtrlGrid object. TDBCtrlGrid paints the background using the Color or SelectedColor property, including the raised border if it is specified by the PanelBorder property. Then the OnPaintPanel event occurs to allow an event handler to add to the image of the panel.

The DBCtrlGrid parameter is the grid that contains the panel. The Index parameter is the index of the panel being painted, where 0 is the first panel, 1 is the second panel, and so on. Use the PanelIndex property to determine whether the panel being drawn is selected.

Use the Canvas property to paint the panel. The point (0,0) on the canvas is the upper left corner of the panel, and the point (PanelWidth, PanelHeight) is the lower right corner.

Controls placed on the panel are drawn separately and do not need to be drawn in an OnPaintPanel event handler.


 VCL Reference

TDBCtrlGrid methods

TDBCtrlGrid	Alphabetically	Legend

In TDBCtrlGrid

Create

Destroy

DoKey

ExecuteAction

GetTabOrderList

KeyDown

UpdateAction

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBCtrlGrid methods

TDBCtrlGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoKey

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBCtrlGrid.Create
 VCL Reference

TDBCtrlGrid.Create

TDBCtrlGrid	See also

Creates and initializes an instance of TDBCtrlGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize a TDBCtrlGrid object at runtime.TDBCtrlGrid objects placed in a form at design time are created automatically.

AOwner is a component that becomes the value of the Owner property. This component, typically the form, is responsible for freeing the TDBCtrlGrid instance.


TDBCtrlGrid.Destroy
 VCL Reference

TDBCtrlGrid.Destroy

TDBCtrlGrid	See also

Destroys an instance of TDBCtrlGrid.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TDBCtrlGrid reference is not nil, and only then calls Destroy.

Destroy frees the helper objects used by TDBCtrlGrid before calling the inherited destructor.


TDBCtrlGrid.DoKey
 VCL Reference

TDBCtrlGrid.DoKey

TDBCtrlGrid 	See also

Implements the responses to a number of standard keystrokes.

type TDBCtrlGridKey = (gkNull, gkEditMode, gkPriorTab, gkNextTab, gkLeft, gkRight, gkUp, gkDown, gkScrollUp, gkScrollDown, gkPageUp, gkPageDown, gkHome, gkEnd, gkInsert, gkAppend, gkDelete, gkCancel);

procedure DoKey(Key: TDBCtrlGridKey);

Description

Call DoKey to perform the operation specified by the Key parameter. For example, use DoKey to remap keystrokes from an OnKeyDown event handler.

The actions performed for the different values of Key are given in the following table

Value	Action

gkNull	Do nothing.

gkEditMode	Toggle the EditMode property.

gkPriorTab	Move to the previous panel.

gkNextTab	Move to the next panel.

gkLeft	Move one panel to the left.

gkRight	Move one panel to the right.

gkUp	Move one panel up.

gkDown	Move one panel down.

gkScrollUp	Move one panel up.

gkScrollDown	Move one panel down.

gkPageUp	Move ColCount * RowCount records up in the dataset.

gkPageDown	Move ColCount * RowCount records down in the dataset.

gkHome	Move to the first record in the dataset.

gkEnd	Move to the last record in the dataset.

gkInsert	Insert a new record prior to the current record in the dataset and set EditMode to True.

gkAppend	Insert a new record at the end of the dataset and set EditMode to True.

gkDelete	Delete the current record from the dataset and set EditMode to False.

gkCancel	Cancel any edits not written to the dataset and set EditMode to False.


TDBCtrlGrid.ExecuteAction
 VCL Reference

TDBCtrlGrid.ExecuteAction

TDBCtrlGrid	See also

Executes an action with the DB control grid as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the DB control grid as its target. The Action parameter specifies the action that was invoked. ExecuteAction returns a boolean value indicating whether the action was successfully executed.

ExecuteAction first calls the inherited method, which checks whether the action knows how to execute with the grid as a target. If this does not successfully dispatch the action, ExecuteAction attempts to invoke the action with the grid’s associated dataset as a target.


TDBCtrlGrid.GetTabOrderList
 VCL Reference

TDBCtrlGrid.GetTabOrderList

TDBCtrlGrid	See also

Overrides the default to remove all child controls from the tab order.

procedure GetTabOrderList(List: TList); override;

Description

GetTabOrderList returns an empty list. TDBCtrlGrid implements its own handling of the tab key to move through the panels in database order.


TDBCtrlGrid.KeyDown
 VCL Reference

TDBCtrlGrid.KeyDown

TDBCtrlGrid 	See also

Performs special processing when a key is pressed.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

After calling the OnKeyDown event handler, KeyDown translates each combination of the Key and Shift parameters into a logical key code and calls the DoKey method to perform the appropriate action.

KeyDown performs the following translations:

Key and Shift values	Key code

LeftArrow	gkLeft

RightArrow	gkRight

UpArrow	gkUp

DownArrow	gkDown

PageUp	gkPageUp

PageDown	gkPageDown

Home	gkHome

End	gkEnd

Return	gkEditMode

F2	gkEditMode

Insert	gkAppend

Ctrl+Insert	gkInsert

Ctrl+Delete	gkDelete

Escape	gkCancel

All other keys	gkNull


TDBCtrlGrid.UpdateAction
 VCL Reference

TDBCtrlGrid.UpdateAction

TDBCtrlGrid	See also

Updates an action to reflect the current state of the grid.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle allow the grid to set action properties to reflect the current state of the grid. The Action parameter is the action to be updated. UpdateAction returns a boolean that indicates whether the action was updated by the grid.

As implemented in TDBCtrlGrid, UpdateAction checks whether the action relies on the state of the associated dataset, and if so, updates the action accordingly.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TDBCtrlGrid


TDBCtrlGridLink
 VCL Reference

TDBCtrlGridLink

Hierarchy	Properties	Methods	See also

TDBCtrlGridLink helps manage data events for a TDBCtrlGrid object.

Unit

DBCGrids

Description

TDBCtrlGridLink is tailored to work with a TDBCtrlGrid. It should only be used by the TDBCtrlGrid class.


 VCL Reference

TDBCtrlGridLink properties

TDBCtrlGridLink	Alphabetically	Legend

Derived from TDataLink

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TDBCtrlGridLink properties

TDBCtrlGridLink	By object	Legend

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TDBCtrlGridLink methods

TDBCtrlGridLink	Alphabetically	Legend

In TDBCtrlGridLink

ActiveChanged

Create

DataSetChanged

Derived from TDataLink

Destroy

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDBCtrlGridLink methods

TDBCtrlGridLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataSetChanged

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

UpdateAction

UpdateRecord


TDBCtrlGridLink.ActiveChanged
 VCL Reference

TDBCtrlGridLink.ActiveChanged

TDBCtrlGridLink	See also

Informs the TDBCtrlGrid object of changes in the Active property.

procedure ActiveChanged; override;

Description

Applications can’t call the ActiveChanged procedure directly. Changes in the Active property trigger this procedure. ActiveChanged causes the TDBCtrlGrid object to update its appearance to reflect the data in the dataset.


TDBCtrlGridLink.Create
 VCL Reference

TDBCtrlGridLink.Create

TDBCtrlGridLink	See also

Creates an instance of TDBCtrlGridLink.

constructor Create(DBCtrlGrid: TDBCtrlGrid);

Description

Applications should not call the Create method for a TDBCtrlGridLink directly. The TDBCtrlGrid that owns a TDBCtrlGridLink calls Create from its own constructor.


TDBCtrlGridLink.DataSetChanged
 VCL Reference

TDBCtrlGridLink.DataSetChanged

TDBCtrlGridLink	See also

Informs the TDBCtrlGrid of changes to the dataset.

procedure DataSetChanged; override;

Description

Applications can’t call the DataSetChanged method directly. DataSetChanged is called automatically when the contents of the dataset change. When the dataset scrolls or when the representation of the dataset by the TDBCtrlGrid changes, DataSetChanged is called indirectly. DataSetChanged causes the TDBCtrlGrid object to update its appearance to reflect the changes to the dataset.


Hierarchy

TObject

TPersistent

TDataLink

TDBCtrlGridLink


TDBDataSet
 VCL Reference

TDBDataSet

Hierarchy	Properties	Methods	Events 	Using TDBDataSet	See also

TDBDataSet encapsulates database connectivity for descendant dataset objects.

Unit

DBTables

Description

TDBDataSet defines database-related connectivity properties and methods for a dataset. Applications never use TDBDataSet objects directly. Instead they use the descendants of TDBDataSet, such as TQuery, TStoredProc, and TTable, which inherit its database-related properties and methods.

Developers who create custom dataset components may want to derive them from TDBDataSet to inherit to the database-specific properties of TDBDataSet in addition to all the functionality of TDataSet and the BDE-related properties and methods of TBDEDataSet. In this case, developers should examine the source code to study the protected methods of TDBDataSet that are not documented for this object.


 VCL Reference

TDBDataSet properties

TDBDataSet	Alphabetically	Legend

In TDBDataSet

AutoRefresh

Database

DatabaseName

DBFlags

DBHandle

DBLocale

DBSession

Handle

SessionName

UpdateMode

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

KeySize

Locale

RecNo

RecordCount

RecordSize

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBDataSet properties

TDBDataSet	By object	Legend

Active

AggFields

AutoCalcFields

AutoRefresh

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Database

DatabaseName

DataSetField

DataSource

DBFlags

DBHandle

DBLocale

DBSession

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Locale

Modified

Name

ObjectView

Owner

RecNo

RecordCount

RecordSize

SessionName

SparseArrays

State

Tag

UpdateMode

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


TDBDataSet.AutoRefresh
 VCL Reference

TDBDataSet.AutoRefresh

TDBDataSet	See also

Specifies whether server-generated field values are refetched automatically.

property AutoRefresh: Boolean;

Description

When AutoRefresh is False (the default), values that the server creates for autoincrement fields and fields with default values when a record is posted are not automatically refetched by the dataset. Instead, the application must call the dataset’s Refresh method to update these field values. When AutoRefresh is True, these field values are automatically refreshed without an explicit call to the Refresh method.

Note:	Some database drivers can’t determine which fields are autoincrement fields or have default values. For these cases, you must provide this information by setting the AutoGenerateValue property of all fields that should be refreshed. Similarly, you must set the field components’ AutoGenerateValue properties when the dataset represents a query or stored procedure.


TDBDataSet.Database
 VCL Reference

TDBDataSet.Database

TDBDataSet	See also 	Example

Identifies the database component for which this dataset represents one or more tables.

property Database: TDatabase;

Description

Use Database to access the properties, events, and methods of the database component associated with this dataset. Database is a read-only property that is automatically set when the database specified by the DatabaseName property is opened.


TDBDataSet.DatabaseName
 VCL Reference

TDBDataSet.DatabaseName

TDBDataSet	See also 	Example

Specifies the name of the database associated with this dataset.

property DatabaseName: String;

Description

Use DatabaseName to specify the name of the database to associate with this dataset component. DatabaseName should match the name of a database component used in the application.

Note:	Attempting to set DatabaseName when a database already associated with this component is open raises an exception.

Tip:	At design time double-click a TDatabase component to invoke the Database editor and set the DatabaseName.


TDBDataSet.DBFlags
 VCL Reference

TDBDataSet.DBFlags

TDBDataSet

Keeps track of the commands this dataset has active with the database.

type TDBFlags = set of 0..15;

property DBFlags: TDBFlags;

Description

Applications can’t use this protected property. TDBDataSet uses this property internally to keep track of the statements it has active with the current database connection. When DBFlags is empty, the dataset is not using the database connection.


TDBDataSet.DBHandle
 VCL Reference

TDBDataSet.DBHandle

TDBDataSet	See also 	Example

Specifies the Borland Database Engine (BDE) database handle for the dataset.

type HDBISES: Longint;

property DBHandle: HDBISES;

Description

Check DBHandle to determine the database handle for the dataset. DBHandle is only useful in applications that bypass database and dataset methods to write directly to the BDE API. Many BDE function calls require a handle parameter. DBHandle is assigned an initial value when a session is activated.

Note:	Do not use this property unless an application requires BDE functionality not available through standard data access components.


TDBDataSet.DBLocale
 VCL Reference

TDBDataSet.DBLocale

TDBDataSet	See also

Identifies the Borland Database Engine (BDE) language driver for the dataset component.

property DBLocale: TLocale;

Description

Examine DBLocale to determine the BDE language driver used by the database component associated with which this dataset is associated. Applications that make direct calls to the BDE may need to pass DBLocale information as an API function parameter.

Note:	Do not use this property unless an application requires BDE functionality not available through standard data access components.


TDBDataSet.DBSession
 VCL Reference

TDBDataSet.DBSession

TDBDataSet	See also

Identifies the database session component associated with this dataset.

property DBSession: TSession

Description

Use DBSession to determine the session component that controls the database component with which this dataset component is associated. By default, a database component is associated with the default session component, Session, that is automatically created for all database applications.


TDBDataSet.Handle
 VCL Reference

TDBDataSet.Handle

TDBDataSet	See also	Example

Specifies the Borland Database Engine (BDE) cursor handle for the dataset.

type HDBICur: Longint;

property Handle: HDBICur;

Description

Use Handle only to bypass TDataSet methods and call directly into the BDE. Many BDE function calls require a cursor handle parameter. Handle is assigned an initial value when a dataset is opened. If used with a BDE call that changes the current record position, call Resync immediately after returning from the BDE call.

TBDEDataSet allows the Handle property to be set to an existing BDE cursor handle. Setting the Handle property is intended primarily for internal use. Descendant classes redeclare the Handle property to re-establish it as a read-only property

Note:	Do not use this property unless an application requires BDE functionality not available through built-in components.


TDBDataSet.SessionName
 VCL Reference

TDBDataSet.SessionName

TDBDataSet	See also

Identifies the name of the session with which this dataset is associated.

property SessionName: String;

Description

Use SessionName to determine the session with which a dataset component is associated. SessionName is automatically set to the name of the SessionName property of the database component with which a dataset component is associated. If SessionName is blank, a dataset component is automatically associated with the default session, Session.

To associate a dataset component with a different session, SessionName must match the SessionName property of an existing session component that is also used by the database component with which this dataset is associated.


TDBDataSet.UpdateMode
 VCL Reference

TDBDataSet.UpdateMode

TDBDataSet	See also

Determines how the Borland Database Engine (BDE) finds records when updating to an SQL database.

property UpdateMode: TUpdateMode;

Description

Use UpdateMode to specify the criteria to use when locating a record in the dataset. UpdateMode specifies whether modified records are located based on all columns (fields), on only the key fields, or on the key fields plus the original values of fields that have been modified.


 VCL Reference

TDBDataSet events

TDBDataSet	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TDBDataSet events

TDBDataSet	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TDBDataSet methods

TDBDataSet	Alphabetically	Legend

In TDBDataSet

CheckOpen

CloseDatabase

Create

OpenDatabase

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallback

ConstraintsDisabled

CreateBlobStream

Destroy

DisableConstraints

EnableConstraints

FetchAll

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetIndexInfo

IsSequenced

Locate

Lookup

RevertRecord

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBDataSet methods

TDBDataSet	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

CheckOpen

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CloseDatabase

CommitUpdates

CompareBookmarks

ConstraintCallback

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

OpenDatabase

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TDBDataSet.CheckOpen
 VCL Reference

TDBDataSet.CheckOpen

TDBDataSet	See also

Checks the result of a call to the Borland Database Engine (BDE).

function CheckOpen(Status: DBIResult): Boolean;

Description

Call CheckOpen to determine if a call to the BDE returns an error when an attempt is made to access a dataset. Status is the return result of a previous call to the BDE.

CheckOpen returns True if access is successful. If Status indicates insufficient table rights when accessing a Paradox or dBASE table, CheckOpen calls the database session’s GetPassword method to prompt the user for a password. If the dialog is successful, CheckOpen returns True.

Otherwise CheckOpen returns False, indicating that dataset access failed.


TDBDataSet.CloseDatabase
 VCL Reference

TDBDataSet.CloseDatabase

TDBDataSet	See also

Closes a database connection associated with the database session.

procedure CloseDatabase(Database: TDatabase);

Description

Call CloseDatabase to close a persistent database connection, or to close and free a temporary database connection. Database specifies the name of the database component for which to close the connection.

CloseDatabase decrements the specified database component’s reference count, and then, if the reference count is zero and the database component’s KeepConnection property is False, CloseDatabase either frees a temporary database component or closes the connection for a persistent database component.

Note:	Calling CloseDatabase for a persistent database component does not close the connection. To close a connection for a persistent database component, call the database component’s Close method directly.

Temporary database components are closed automatically when the last dataset associated with the database component is closed, but an application can call CloseDatabase prior to that time to force closure. Closing a connection established by a temporary database component does not free the component if the session’s KeepConnections property is True (the default). To free temporary database components after closing their connections call DropConnections method of the session.


TDBDataSet.Create
 VCL Reference

TDBDataSet.Create

TDBDataSet	See also

Creates a new TDBDataSet object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a DB dataset at runtime.

Create:

Set the Locale property of the dataset to the locale of the default session.

Sets the CacheBlobs property to True.

Checks if the specified Owner is a database component, and if so, uses it to set the SessionName and DatabaseName properties.


TDBDataSet.OpenDatabase
 VCL Reference

TDBDataSet.OpenDatabase

TDBDataSet	See also

Opens the database that contains the dataset.

function OpenDatabase: TDatabase;

Description

Call OpenDatabase to connect to the database that contains the dataset, or to create a temporary database component and connect to a database. The DatabaseName property specifies the database to open.

OpenDatabase makes the current session active, then determines whether the DatabaseName property corresponds to the DatabaseName property of an existing database component. If it does not, OpenDatabase creates a temporary database component, assigning the DatabaseName parameter to the DatabaseName property. Finally, OpenDatabase calls the Open method of the database to connect to a database server, then increments the session’s database reference count by one.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TDBDataSet


TDBEdit
 VCL Reference

 TDBEdit

Hierarchy	Properties	Methods	Events 	Using TDBEdit	See also

TDBEdit represents a single-line edit control that can display and edit a field in a dataset.

Unit

DBCtrls

Description

Use TDBEdit to enable users to edit a database field. TDBEdit uses the Text property to represent the contents of the field.

TDBEdit permits only a single line of text. If the field may contain lengthy data that would require multiple lines, consider using a TDBMemo object.

If the application does not require the data-aware capabilities of TDBEdit, use an edit control (TEdit) or a masked edit control (TMaskEdit) instead, to conserve system resources.

To provide a mask that restricts input and controls the display format of the data, use mask-related properties of TField and descendants. Such properties include: TField.EditMask, TDateTimeField.DisplayFormat, and TNumericField.DisplayFormat. Which property needs to be used depends on the field’s type and the TField descendant that corresponds to that type.


 VCL Reference

TDBEdit properties

TDBEdit	Alphabetically	Legend

In TDBEdit

DataField

DataSource

Field

ReadOnly

Derived from TCustomMaskEdit

EditText

IsMasked

MaxLength

Text

Derived from TCustomEdit

AutoSelect

AutoSize

BorderStyle

CanUndo

CharCase

Modified

PasswordChar

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBEdit properties

TDBEdit	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoSelect

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditText

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IsMasked

Left

LRDockWidth

MaxLength

Modified

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PasswordChar

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBEdit.DataField
 VCL Reference

TDBEdit.DataField

TDBEdit	See also

Specifies the field from which the edit control displays data.

property DataField: String;

Description

Set DataField to the field name of the field component that the check box represents:

DBEdit1.DataField := 'Company';

Access by the TDBEdit to the dataset in which the field is located is provided by a TDataSource component, specified in the DataSource property.

If the DataField refers to a database field that contains integer or floating-point data, only characters that are valid in such a field can be entered in the edit box. Characters that are not legal are not accepted.


TDBEdit.DataSource
 VCL Reference

TDBEdit.DataSource

TDBEdit	See also

Links the edit control to the dataset that contains the field it represents.

property DataSource: TDataSource;

Description

Use DataSource to specify the data source component through which the data from a dataset component is provided to the TDBEdit:

DBEdit1.DataSource := DataSource1;

To allow the check box to represent the data for a field, both the DataSource and the DataField properties must be set.


TDBEdit.Field
 VCL Reference

TDBEdit.Field

TDBEdit	See also

Specifies the TField object for the database field the edit box represents.

property Field: TField;

Description

Read Field to get direct access to the contents and properties of the database field without going through the edit window. Use Field to change the contents of the database field programmatically:

DBEdit1.Field.AsString := 'San Francisco Baking';

Use the Text property instead if you want to change the contents of the edit window without immediately posting the changes to the dataset. Changing the Text property allows the user to cancel the changes.


TDBEdit.ReadOnly
 VCL Reference

TDBEdit.ReadOnly

TDBEdit	See also

Determines whether the user can use the database edit box to change the value of the field in the current record.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent the user from changing the contents of the database field. When ReadOnly is True, the edit control is used only to display the contents of the field. If ReadOnly is False, the user can change the field's value as long as the dataset is in edit mode.


 VCL Reference

TDBEdit events

TDBEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBEdit events

TDBEdit	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBEdit methods

TDBEdit	Alphabetically	Legend

In TDBEdit

Change

Create

Destroy

EditCanModify

ExecuteAction

KeyDown

KeyPress

Notification

Reset

UpdateAction

UseRightToLeftAlignment

Derived from TCustomMaskEdit

Clear

GetTextLen

ValidateEdit

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

MouseWheelHandler

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBEdit methods

TDBEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EditCanModify

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Reset

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidateEdit


TDBEdit.Change
 VCL Reference

TDBEdit.Change

TDBEdit	See also

Responds when the text is modified.

procedure Change; override;

Description

Applications cannot call this protected method directly: It is triggered automatically by Windows’ events.

Change responds to changes in the text by internally keeping track of the fact that the text has been modified. This information can then be used to know whether there are any changes to post to the dataset or to remove if the user requests a reset.

Additionally, Change calls the inherited method, which generates an OnChange event.


TDBEdit.Create
 VCL Reference

TDBEdit.Create

TDBEdit	See also

Creates an instance of TDBEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TDBEdit object at runtime. TDBEdit objects placed on a form at design time are created automatically.

Create overrides the inherited constructorto initialize the database handling capabilities of the edit control.


TDBEdit.Destroy
 VCL Reference

TDBEdit.Destroy

TDBEdit	See also

Destroys an instance of TDBEdit.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBEdit reference is not nil and only then calls Destroy.

Destroy overrides the inherited destructor to free the helper objects that were allocated to manage display issues and database interactions.


TDBEdit.EditCanModify
 VCL Reference

TDBEdit.EditCanModify

TDBEdit	See also

Allows or disallows editing of the text depending on whether the dataset is in edit mode.

function EditCanModify: Boolean; override;

Description

EditCanModify overrides the inherited method so that the control will only allow edits when the dataset is in edit mode. If the edit control should never allow edits, the ReadOnly property should be set.

Note:	EditCanModify is a protected method. Applications cannot call it directly.


TDBEdit.ExecuteAction
 VCL Reference

TDBEdit.ExecuteAction

TDBEdit	See also

Invokes an action with the TDBEdit as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBEdit as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBEdit could not handle the action.


TDBEdit.KeyDown
 VCL Reference

TDBEdit.KeyDown

TDBEdit	See also

Supplements the inherited method to drive the dataset into edit mode when the user presses Del or Shift+Insert.

type TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

KeyDown first calls the inherited method, which calls the OnKeyDown event handler. KeyDown next attempts to put the dataset into an editing state when the user types Del or Shift+Insert. Derived classes can override KeyDown to handle additional key combinations, but the inherited method should always be called.

Note:	KeyDown is a protected method. Applications cannot call it directly. It is called automatically in response to user actions.


TDBEdit.KeyPress
 VCL Reference

TDBEdit.KeyPress

TDBEdit	See also

Supplements the inherited method to handle any keystrokes that alter the state of the edit control.

procedure KeyPress(var Key: Char); override;

Description

KeyPress first calls the inherited method, which calls the OnKeyPress event handler. Next, KeyPress discards the keystroke if it is not a valid character for the field type, or if there is no link to a database field. Valid characters cause KeyPress to attempt to put the dataset into edit mode.

Pressing the Escape key causes KeyPress to call Reset, throwing away all unposted edits.

Note:	KeyPress is a protected method. Applications cannot call it directly. It is called automatically in response to user actions.


TDBEdit.Notification
 VCL Reference

TDBEdit.Notification

TDBEdit	See also

Overrides the inherited method to respond to opRemove notifications on the DataSource.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the notification indicates the removal of the DataSource. If so, Notification sets the DataSource property to nil.

Derived classes can override Notification method to handle additional notifications, but the inherited method should be always be called.

Note:	Notification is a protected method. Applications can’t call it directly.


TDBEdit.Reset
 VCL Reference

TDBEdit.Reset

TDBEdit	See also

Cancels all unposted edits.

procedure Reset; override;

Description

Reset overrides the default method to cancel all unposted edits to the dataset when the user presses the Escape key.

Note:	Reset is a protected method. Applications cannot call it directly. It is called automatically when the user presses the Escape key.


TDBEdit.UpdateAction
 VCL Reference

TDBEdit.UpdateAction

TDBEdit	See also

Updates an action to reflect the current state of the TDBEdit.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBEdit an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBEdit they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBEdit.UseRightToLeftAlignment
 VCL Reference

TDBEdit.UseRightToLeftAlignment

TDBEdit	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBEdit’s alignment is in a right-to-left mode. This information can be used when painting the TDBEdit data or when responding to mouse events.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMaskEdit

TDBEdit


TDBEngineErrorDlg
 VCL Reference

TDBEngineErrorDlg

Hierarchy	Properties	Methods	Events	See also

TDBEngineErrorDlg replaces the normal message box for EDBEngineError exceptions raised at design time.

Unit

Dbexcept

Description

The standard message box displayed by an unhandled exception shows only the exception's name and description. EDBEngineError exceptions, however, contain additional information that can be useful to application developers. For this reason, exceptions of the EDBEngineError class, when raised at design time, appear in a special dialog box called TDBEngineErrorDlg. The dialog shows the entire stack of BDE errors as represented in the EDBEngineError object.

At runtime, unhandled EDBEngineError exceptions generate the standard message box. But you can use the HookExceptions or ShowException method to display TDBEngineErrorDlg instead. This can be useful for debugging or in cases where you want the end user to have access to BDE error information.


 VCL Reference

TDBEngineErrorDlg properties

TDBEngineErrorDlg	Alphabetically	Legend

In TDBEngineErrorDlg

DbException

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

AlphaBlend

AlphaBlendValue

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DefaultMonitor

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

ObjectMenuItem

OldCreateOrder

OleFormObject

Parent

ParentBiDiMode

PixelsPerInch

Position

PrintScale

Scaled

TileMode

TransparentColor

TransparentColorValue

Visible

WindowMenu

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragKind

DragMode

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBEngineErrorDlg properties

TDBEngineErrorDlg	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

Align

AlignDisabled

AlphaBlend

AlphaBlendValue

Anchors

AutoScroll

AutoSize

BiDiMode

BorderIcons

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DbException

DefaultMonitor

Designer

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

DragKind

DragMode

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Icon

KeyPreview

Left

LRDockWidth

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

Name

ObjectMenuItem

OldCreateOrder

OleFormObject

Owner

Parent

ParentBiDiMode

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

Position

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TileMode

Top

TransparentColor

TransparentColorValue

UndockHeight

UndockWidth

UseDockManager

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowMenu

WindowProc

WindowState


TDBEngineErrorDlg.DbException
 VCL Reference

TDBEngineErrorDlg.DbException

TDBEngineErrorDlg

Holds an instance of EDBEngineError.

property DbException: EDBEngineError;

Description

DBException is the EDBEngineError instance that causes the error dialog to appear.


 VCL Reference

TDBEngineErrorDlg events

TDBEngineErrorDlg	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnPaint

OnShortCut

OnShow

Derived from TWinControl

OnDockDrop

OnDockOver

OnGetSiteInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock


 VCL Reference

TDBEngineErrorDlg events

TDBEngineErrorDlg	By object	Legend

OnActivate

OnCanResize

OnClick

OnClose

OnCloseQuery

OnConstrainedResize

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnGetSiteInfo

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShortCut

OnShow

OnStartDock

OnUnDock


 VCL Reference

TDBEngineErrorDlg methods

TDBEngineErrorDlg	Alphabetically	Legend

In TDBEngineErrorDlg

BackClick

DetailsBtnClick

FormCreate

FormDestroy

FormShow

HookExceptions

NextClick

ShowException

Derived from TForm

ArrangeIcons

Cascade

Next

Previous

Tile

Derived from TCustomForm

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

InitiateAction

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsRightToLeft

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBEngineErrorDlg methods

TDBEngineErrorDlg	By object	Legend

AfterConstruction

ArrangeIcons

Assign

BackClick

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DetailsBtnClick

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

FormCreate

FormDestroy

FormShow

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

HookExceptions

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Next

NextClick

PaintTo

ParentToClient

Perform

Previous

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowException

ShowModal

Tile

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TDBEngineErrorDlg.BackClick
 VCL Reference

TDBEngineErrorDlg.BackClick

TDBEngineErrorDlg	See also

Displays the previous exception.

procedure BackClick(Sender: TObject);

Description

Call BackClick to simulate clicking the Back button in the dialog. BackClick displays information about the previous exception in the stack of exceptions shown in the dialog.


TDBEngineErrorDlg.DetailsBtnClick
 VCL Reference

TDBEngineErrorDlg.DetailsBtnClick

TDBEngineErrorDlg	See also

Displays or hides the detail context information for an exception.

procedure DetailsBtnClick(Sender: TObject);

Description

Call DetailsBtnClick to simulate clicking the Details button in the dialog. If the detail context information is showing, DetailsBtnClick hides it. If the detail information is not showing, DetailsBtnClick displays it..


TDBEngineErrorDlg.FormCreate
 VCL Reference

TDBEngineErrorDlg.FormCreate

TDBEngineErrorDlg	See also

Initializes the dialog when it is first created.

procedure FormCreate(Sender: TObject);

Description

Applications should not call FormCreate. It initializes the detail window so that the Details button works correctly.


TDBEngineErrorDlg.FormDestroy
 VCL Reference

TDBEngineErrorDlg.FormDestroy

TDBEngineErrorDlg	See also

Restores the global Application object’s OnException event handler.

procedure FormDestroy(Sender: TObject);

Description

Applications should not call FormDestroy. It is called automatically when the dialog is destroyed.

While the DbEngineErrorDlg is up, it assigns its own event handler to the Application object’s OnException event. FormDestroy restores this event handler to its previous state.


TDBEngineErrorDlg.FormShow
 VCL Reference

TDBEngineErrorDlg.FormShow

TDBEngineErrorDlg	See also

Displays the text for the current exception and its details.

procedure FormShow(Sender: TObject);

Description

Applications should not call FormShow. It is called automatically when the dialog becomes visible. FormShow sets the text for the current exception and, if detail information is showing, displays its details.


TDBEngineErrorDlg.HookExceptions
 VCL Reference

TDBEngineErrorDlg.HookExceptions

TDBEngineErrorDlg	See also

Enables the TDBEngineErrorDlg instance, replacing the standard exception message at runtime.

procedure HookExceptions;

Description

To display all unhandled EDBEngineError exceptions in a TDBEngineErrorDlg (rather than the standard message box), create a TDBEngineErrorDlg and call HookExceptions to enable it:

TDBEngineErrorDlg.Create(Application).HookExceptions;

If you include this code in an application's project (.DPR) file, or in an OnCreate event handler for the project's main form, the TDBEngineErrorDlg will trap and display unhandled EDBEngineError exceptions at runtime.


TDBEngineErrorDlg.NextClick
 VCL Reference

TDBEngineErrorDlg.NextClick

TDBEngineErrorDlg	See also

Displays the next exception.

procedure NextClick(Sender: TObject);

Description

Call NextClick to simulate clicking the Next button in the dialog. NextClick displays information about the next exception in the stack of exceptions shown in the dialog.


TDBEngineErrorDlg.ShowException
 VCL Reference

TDBEngineErrorDlg.ShowException

TDBEngineErrorDlg	See also

Displays an EDBEngineError exception in the TDBEngineErrorDlg.

function ShowException(Error: EDbEngineError): TModalResult;

Description

Call ShowException in an EDBEngineError exception handler to display the exception in a TDBEngineErrorDlg. You can create the TDBEngineErrorDlg in the exception handler itself, or in the initialization section of your application.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TForm

TDBEngineErrorDlg


TDBError
 VCL Reference

TDBError

Hierarchy	Properties	Methods	See also

TDBError represents Borland Database Engine errors for the EDBEngineError exception class.

Unit

DBTables

Description

The TDBError object is a container for the information pertaining to one database error. One or more TDBError objects are contained in the collection object EDBEngineError.Errors.

An EDBEngineError exception is raised when Borland Database Engine (BDE) or a database back-end accessed via the BDE produces an error condition on execution of a database operation. Information about each error involved in an error condition (such as an error code and error message) is passed by the BDE to the EDBEngineError object. If the error occurs at the level of a database system accessed by the BDE (such as InterBase, Oracle, or Sybase), the error information is passed through the BDE to the application’s exception object. EDBEngineError reads the stack of database engine errors and creates a separate TDBError object to represent each one. These TDBError objects are contained in the Errors property of EDBEngineError.

When an error condition originates with a database system accessed through the BDE, there will typically be two TDBError objects in the EDBEngineError.Errors property. The first will be the BDE version of the error and the second the database system’s version of the same error. In both cases, the Category, ErrorCode, and SubCode properties will contain the same values: the BDE error code for the particular type of error condition. In the TDBError object for the BDE’s version of the error the NativeCode property is empty and the text for the Message property contains the BDE error message the type type of error that occurred. In the TDBError object for the database system’s version of the error, the NativeCode property contains the database systems specific error code and the Message property text provided by the database system (and not the BDE).

For example, when a violation of an InterBase CHECK constraint occurs (an error condition that originates with InterBase and not the BDE), the error message provided by the BDE is the generic "General SQL error," while the error message provided by InterBase is a more explanatory error like "Operation violates CHECK constraint INTEG_30 on view or table EMPLOYEE."

It is also possible to have only BDE type errors in the TDBError objects. This is usually only applicable to use of local table types (dBASE, Paradox, and FoxPro), where the BDE is the database back-end and there is no external database system used.

The categories and subcodes for BDE errors are defined in BDE.INT.. For error information provided by a database system other than the BDE, consult the vendor-supplied documentation for the specific database system for definition or clarification.


 VCL Reference

TDBError properties

TDBError	Alphabetically	Legend

In TDBError

Category

ErrorCode

Message

NativeError

SubCode


 VCL Reference

TDBError properties

TDBError	By object	Legend

Category

ErrorCode

Message

NativeError

SubCode


TDBError.Category
 VCL Reference

TDBError.Category

TDBError 	See also

Indicates the category of error referenced by ErrorCode.

property Category: Byte;

Description

Category contains the high byte of the BDE error code. Combined with the low byte of the BDE error code (in the SubCode property) this produces the whole BDE error code (also contained in the ErrorCode property).

The categories and subcodes for BDE errors are defined in BDE.INT..


TDBError.ErrorCode
 VCL Reference

TDBError.ErrorCode

TDBError	See also

Indicates the error code returned by the BDE.

property ErrorCode: DBIResult;

Description

Use ErrorCode to determine the error code returned by the BDE. The value of ErrorCode is the combination of the high byte of the BDE error code (also in the Category property) and the low byte (in the SubCode property).

The categories and subcodes for BDE errors are defined in BDE.INT..


TDBError.Message
 VCL Reference

TDBError.Message

TDBError 	See also

Specifies the text of the error message.

property Message: String;

Description

Message contains the remote server message for native (server) errors or the BDE message associated with ErrorCode for non-server errors. To determine which type of message is contained in the Message property, inspect the NativeError property. A zero value there indicates a message provided by the BDE. A nonzero value indicates a message provided by the database system (server).


TDBError.NativeError
 VCL Reference

TDBError.NativeErrorTDBError 	See also

Indicates the remote error code returned from the server.

property NativeError: Longint;

Description

Use NativeError to determine whether the error represents a remote error received from the database server. If NativeError is 0, the error is not a server error.

Values in the NativeError property originate with the database system and not the BDE. Because of this they are not documented in the same place the BDE error codes are (in the file BDE.INT.), but in the vendor-supplied documentation for the specific database system used.


TDBError.SubCode
 VCL Reference

TDBError.SubCodeTDBError 	See also

Indicates the subcode of the error referenced by ErrorCode.

property SubCode: Byte;

Description

SubCode contains the low byte of the BDE error code. Combined with the high byte of the BDE error code (in the Category property) this produces the whole BDE error code (also contained in the ErrorCode property).

The categories and subcodes for BDE errors are defined in BDE.INT..


 VCL Reference

TDBError methods

TDBError	Alphabetically	Legend

In TDBError

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDBError methods

TDBError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TDBError.Create
 VCL Reference

TDBError.Create

TDBError	See also

Initializes an instance of TDBError using error information returned by the BDE.

constructor Create(ErrorCode: DBIResult);

Description

TDBError’s Create method is called by the EDBEngineError constructor, just as TDBError objects are freed by the EDBEngineError destructor. Application’s should never have cause for calling Create directly, except in the case of custom exception-handling objects descending from or similar to the EDBEngineError exception object.


Hierarchy

TObject

TDBError


AddIndex example
 VCL Reference

AddIndex example

In the example below, the AddIndex method is used to create an index named NewIndex. This index is based on two fields from the associated table, CustNo and CustName. The index NewIndex incorporates two index options through the TIndexOptions constants ixUnique and ixCaseInsensitive.

Table1.AddIndex('NewIndex', 'CustNo;CustName', [ixUnique, ixCaseInsensitive]);


AddParam, RemoveParam example
 VCL Reference

AddParam, RemoveParam example

{ Move all parameter info from Params2 to Params1 }

while Params2.Count <> 0 do

begin

  { Grab the first parameter from Params2 }

  TempParam := Params2[0];

  { Remove it from Params2 }

  Params2.RemoveParam(TempParam);

  { And add it to Params1 }

  Params1.AddParam(TempParam);

end;


AfterCancel example
 VCL Reference

AfterCancel example

This example updates the form’s status bar with a message when an AfterCancel event occurs.

procedure TForm1.Table1AfterCancel(DataSet: TDataSet);

begin

  with DataSet as TTable do

    StatusBar1.SimpleText := 'Record changes cancelled for ' + TableName;

end;


AfterDelete, Format example
 VCL Reference

AfterDelete, Format example

This example displays a message on the form’s status bar indicating the table’s record count after a record is deleted.

procedure TForm1.Table1AfterDelete(DataSet: TDataSet);

begin

  StatusBar1.SimpleText := Format('There are now %d records in the table', [DataSet.RecordCount]);

end;


AfterEdit example
 VCL Reference

AfterEdit example

This example updates the form’s status bar with a message when an AfterEdit event occurs.

procedure TForm1.Table1AfterEdit(DataSet: TDataSet);

begin

   StatusBar1.SimpleText := 'Editing record' + IntToStr(DataSet.RecNo);

end;


AfterInsert example
 VCL Reference

AfterInsert example

This example updates the form’s status bar with a message when an AfterInsert event occurs.

procedure TForm1.Table1AfterInsert(DataSet: TDataSet);

begin

   StatusBar1.SimpleText := 'Inserting new record';

end;


AfterOpen example
 VCL Reference

AfterOpen example

This example updates the form’s status bar with a message when an AfterOpen event occurs.

procedure TForm1.Table1AfterOpen(DataSet: TDataSet);

begin

  {// now that the dataset is open, record information is available }

  StatusBar1.SimpleText := 'Record ' + IntToStr(Table1.RecNo) + 'of ' + IntToStr(Table1.RecordCount);

end;


AfterPost example
 VCL Reference

AfterPost example

This example updates the form’s status bar with a message when an AfterPost event occurs.

procedure TForm1.Table1AfterPost(DataSet: TDataSet);

begin

  StatusBar1.SimpleText := 'Record changes complete';

end;


AfterScroll, RefreshRecord example
 VCL Reference

AfterScroll, RefreshRecord example

The following AfterScroll event handler refreshes the current record every time the user moves to a new record, ensuring the most up-to-date value. Before refreshing a record, however, it checks the update status to avoid refreshing records that have been edited, which would potentially mask update errors.

procedure TForm1.ClientDataSet1AfterScroll(DataSet: TDataSet);

begin

  if ClientDataSet1.UpdateStatus = usUnModified then

    ClientDataSet1.RefreshRecord;

end;


Append, FieldValues, Post example
 VCL Reference

Append, FieldValues, Post example

This example appends a new record to a table when the user clicks a button. The two fields ALPHANUMERIC and INTEGER are filled from the contents of two edit controls.

procedure TForm1.Button1Click(Sender: TObject);

begin

Table1.Append;

Table1.FieldValues['ALPHANUMERIC'] := Edit1.text;

Table1.FieldValues['INTEGER'] := StrToInt(Edit2.text);

Table1.Post;

end;


AppendRecord example
 VCL Reference

AppendRecord example

This statement appends a record to the Customer table. Note that Nulls are entered for some of the values, but are not required for missing values at the end of the array argument, i.e. after the Discount field.

Customer.AppendRecord([CustNoEdit.Text,CoNameEdit.Text, AddrEdit.Text, Null, Null, Null, Null, Null, Null, DiscountEdit.Text]);


EditRangeStart, EditRangeEnd,FieldByName, ApplyRange example
 VCL Reference

EditRangeStart, EditRangeEnd, FieldByName, ApplyRange example

with Customer do

begin

  EditRangeStart;

  FieldByName('Company').AsString := Edit1.Text;

  {Set start range based on text of Edit1 component}

  EditRangeEnd;

  FieldByName('Company').AsString := Edit2.Text;

  {Set end range based on value of Edit2 component}

  ApplyRange; {Apply the ranges}

end;


AsDateTime example
 VCL Reference

AsDateTime example

The following statement converts a string to a date for insertion into a date field:

Table1.FieldByName('TimeStamp').AsDateTime := StrToDateTime(Now);


Assign example
 VCL Reference

Assign example

{ Copy one date-time field to another }

DateTimeField1.Assign(DateTimeField2);

{ Copy a graphic field to a blob field }

BlobField1.Assign(GraphicField1);

{Copy strings in a TMemo to a TMemoField}

MemoField1.Assign(Memo1.Lines);


Create, Assign, AssignValues Example
 VCL Reference

Create, Assign, AssignValues example

var SavedParams: TParams;

{ Initialize SavedParams }

SavedParams := TParams.Create;

try

  { Save the parameters for Query1 }

  SavedParams.Assign(Query1.Params);

  { Do something with Query1 }

  ...

  { Restore the parameters to Query1 }

  Query1.Params.AssignValues(SavedParams);

finally

  SavedParams.Free;

end;


BeforeInsert, Insert, AsInteger, FieldByName Example
 VCL Reference

BeforeInsert, Insert, AsInteger, FieldByName example

This example uses the BeforeInsert event to do data validation; if the StrToInt function raises an exception, the edit control’s contents are set to a valid value so the assignment to the INTEGER field in the table will succeed.

procedure TForm1.Table1BeforeInsert(DataSet: TDataSet);

begin

  try

  {Make sure edit field can be converted to integer --

   this will raise an exception if it can’t }

    StrToInt(Edit1.Text);

  except

    Edit1.Text := '0';

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Table1.Insert;

  Table1.FieldByName('QUANTITY').AsInteger := StrToInt(Edit1.Text);

  Table1.Post;

end;


BeforePost, Abort Example
 VCL Reference

BeforePost, Abort example

This example checks for a valid entry in a TDBEdit control and calls the Abort procedure if the control is empty; Abort cancels the post before it happens.

procedure TForm1.Table1BeforePost(DataSet: TDataSet);

begin

if DBEdit1.Text = '' then

  Abort;

end;


GetBookmark, GotoBookmark, FreeBookmark, FindPrior, Value, OnDataChange, Bof Example
 VCL Reference

GetBookmark, GotoBookmark, FreeBookmark, FindPrior, Value, OnDataChange, Bof example

This example uses a button to copy the value of a field in the previous record into the corresponding field in the current record.

procedure TForm1.CopyDataClick(Sender: TObject);

var

   SavePlace: TBookmark;

   PrevValue: Variant;

begin

   withTable1 do

   begin

    { get a bookmark so that we can return to the same record }

    SavePlace := GetBookmark;

    try

      { move to prior record}

      FindPrior;

      { get the value }

      PrevValue := Fields[0].Value;

      {Move back to the bookmark

      this may not be the next record anymore

      if something else is changing the dataset asynchronously }

      GotoBookmark(SavePlace);

      { Set the value }

      Fields[0].Value := PrevValue;

      { Free the bookmark }

    finally

      FreeBookmark(SavePlace);

    end;

  end;

end;

To ensure that the button is disabled when there is no previous record, the OnDataChange event of the DataSource detects when the user moves to the beginning of file (BOF property becomes True), and disables the button.

procedure TForm1.Table1DataChange(Sender: TObject; Field: TField);

begin

  if Table1.BOF then

    CopyData.Enabled := False

  else

    CopyData.Enabled := True;

end;


BtnClick Example
 VCL Reference

BtnClick example

This code allows a menu item called Record | Next to simulate clicking the Next button on a database navigator control, making the next record in the dataset the current record:

procedure TForm1.RecordNextClick(Sender: TObject);

begin

  DBNavigator1.BtnClick(nbNext);

end;


Items, Values Example
 VCL Reference

Items, Values Example

This example uses a database radio group box connected to field in a dataset. The field contains the values ‘Y’, ‘N’, or ‘M’. In contrast, the user sees the captions of the radio buttons to be ‘Yes’, ‘No’, or ‘Maybe’.

When the code runs, three radio buttons appear in the group box. If the current record in the dataset contains any of the values contained in the Values property, the appropriate radio button is checked. When the user selects a radio button, the corresponding string in the Values property is entered into the field.

procedure TForm1.FormCreate(Sender: TObject);

begin

  with DBRadioGroup1 do

  begin

    Items.Add('Yes');

    Items.Add('No');

    Items.Add('Maybe');

    Values.Add('Y');

    Values.Add('N');

    Values.Add('M');

  end;

end;


Cancel Example
 VCL Reference

Cancel Example

The following fragment prompts the user to confirm changes to a record; if the user clicks Yes, the record is posted to the table, otherwise the changes are cancelled.

if MessageDlg('Update Record?', mtConfirmation, [mbYes, mbNo], 0) =

              mrYes then

  Table1.Post

else

  Table1.Cancel;


ConfigMode, AddStandardAlias example
 VCL Reference

ConfigMode, AddStandardAlias example

The following example specifically creates a local alias pointing to the application directory.  Note that this alias is automatically deleted when the application terminates and will not be saved to the BDE configuration file.

begin

  with Session do

  begin

    ConfigMode := cmSession;

  try

    AddStandardAlias('TEMPDB', ExtractFilePath(ParamStr(0)), 'PARADOX');

  finally

      ConfigMode := cmAll;

  end;

end;


Count, Items, IsNull Example
 VCL Reference

 Count, Items, IsNull example

{ Assign -1 to any integer parameter which does not have a value }

for I := 0 to Params.Count - 1 do

  if (Params.Items[I].IsNull) and

     (Params.Items[I].DataType = ftInteger) then

    { Items is the default property, so you can omit its name }

    Params[I].AsInteger := -1;


Create, CreateBlobStream, Edit example
 VCL Reference

Create, CreateBlobStream, Edit example

The following example copies the data in the Notes field of Table1 to the Remarks field of ClientDataSet1.

procedure TForm1.Button1Click(Sender: TObject);

var

  Stream1: TBlobStream;

  Stream2: TStream;

begin

  Stream1 := TBlobStream.Create(Table1Notes, bmRead);

  try

    ClientDataSet1.Edit;

    { here’s a different way to create a blob stream }

    Stream2 := ClientDataSet1.CreateBlobStream(ClientDataSet1.FieldByName('Remarks'), bmReadWrite);

    try

      Stream2.CopyFrom(Stream1, Stream1.Size);

      ClientDataSet1.Post;

    finally

      Stream2.Free;

    end;

  finally

    Stream1.Free;

  end;

end;


Table Creation Example
 VCL Reference

Table Creation example

The following example shows how to create a table.

with Table1 do begin

  Active := False;

  DatabaseName := 'DBDEMOS';

  TableType := ttParadox;

  TableName := 'CustInfo';

  { Don't overwrite an existing table }

  if not Table1.Exists then begin

    { The Table component must not be active }

    { First, describe the type of table and give }

    { it a name }

    { Next, describe the fields in the table }

    with FieldDefs do begin

      Clear;

      with AddFieldDef do begin

        Name := 'Field1';

        DataType := ftInteger;

        Required := True;

      end;

      with AddFieldDef do begin

        Name := 'Field2';

        DataType := ftString;

        Size := 30;

      end;

    end;

    { Next, describe any indexes }

    with IndexDefs do begin

      Clear;

      { The 1st index has no name because it is

      { a Paradox primary key }

      with AddIndexDef do begin

        Name := '';

        Fields := 'Field1';

        Options := [ixPrimary];

      end;

      with AddIndexDef do begin

        Name := 'Fld2Indx';

        Fields := 'Field2';

        Options := [ixCaseInsensitive];

      end;

    end;

    { Call the CreateTable method to create the table }

    CreateTable;

  end;

end;


Database Example
 VCL Reference

Database Example

{ Do a transaction }

with Table1.Database do

begin

  StartTransaction;

{ Post some records with Table1 }

  Commit;

end;


Active, SQLConnection example
 VCL Reference

Active, SQLConnection, ConnectionName example

{ The dataset should be closed when changing the SQL connection }

SQLDataSet1.Active := False;

SQLDataSet1.SQLConnection.ConnectionName := 'TestServer';

SQLDataSet1.Active := True;


Active, DatabaseName Example
 VCL Reference

Active, DatabaseName example

{ The table should be closed when changing the database }

Table1.Active := False;

try

{ First try to use an alias }

  Table1.DatabaseName := 'Delphi_Demos';

  Table1.Active := True;

except

  on EDatabaseError do

    { If that fails, try to use the drive and directory }

    Table1.DatabaseName := 'c:\delphi\demos\database';

    Table1.Active := True;

end;


DBHandle Example
 VCL Reference

DBHandle example

This example uses the DBHandle property to make a call to the DbiGetDirectory BDE API function. Because it uses a BDE API function directly, you must add uses BDE; in the implementation section of the unit.

procedure TForm1.Button1Click(Sender: TObject);

var

  Directory: String;

begin

  SetLength(Directory, 250);

  if DbiGetDirectory(Table1.DBHandle, True, PChar(Directory)) <> dbiErr_None then

    MessageDlg('Error getting default directory', mtError, [mbOk], 0)

  else

    ShowMessage('Default directory = ' + Directory);

  if DbiGetDirectory(Table1.DBHandle, False, PChar(Directory)) <> dbiErr_None then

    MessageDlg('Error getting current working directory', mtError, [mbOk], 0)

  else

    ShowMessage('Current working directory = ' + Directory);

end;


DeleteTable Example
 VCL Reference

DeleteTable example

with Table1 do

begin

  Active := False; { can’t delete table if it is active }

  { set properties to identify the table that should be deleted }

  DatabaseName := 'DBDEMOS';

  TableName := 'Customer';

  TableType := ttParadox;

  { finally, delete the table }

  DeleteTable;

end;


DisableControls, EnableControls, Eof Example
 VCL Reference

DisableControls, EnableControls, Eof example

Usually DisableControls is called within the context of a try...finally block that reenables the controls even if an exception occurs. For example:

with CustTable do

begin

  DisableControls;

  try

    First;

    whilenot Eof do

    begin

     { Process each record here }

     Next;

    end;

  finally

    EnableControls;

  end;

end;


DisplayText Example
 VCL Reference

DisplayText example

The following code displays a message that the current value is invalid:

MessageDlg(Field1.DisplayText + ' is invalid', mtWarning, [mbOK], 0);


EditKey, GotoKey example
 VCL Reference

EditKey, GotoKey example

The following code uses the EditKey and GotoKey methods to move to a particular record on Table.  The actual field values are not changed when making the assignments because of the call to EditKey.

with Table1 do

begin

  EditKey;

  FieldByName('State').AsString := 'CA';

  FieldByName('City').AsString := 'Santa Barbara';

  GotoKey;

end;


EmptyTable Example
 VCL Reference

EmptyTable example

The following example uses a table component to empty a database table.  First the properties of the table component are set to specify the table that should be emptied.

with Table1 do

begin

  Active := False;

  DatabaseName := 'Delphi_Demos';

  TableName := 'CustInfo';

  TableType := ttParadox;

  EmptyTable;

end;


Exclusive, MessageBox Example
 VCL Reference

 Exclusive example

{ Try to open Table1 with Exclusive True }

{ First, close Table1 }

Table1.Active := False;

repeat { until successful or Cancel button is pressed }

  try

    Table1.Exclusive := True; { See if it will open }

    Table1.Active := True;

    Break; { If no error, exit the loop }

  except

    on EDatabaseError do

    { Ask if it is OK to retry. If it isn’t, reraise to abort }

      if Application.MessageBox(

        'Could not open Table1 exclusively - Try again?',

        'Open Error',

        MB_OKCANCEL + MB_DEFBUTTON1) <> IDOK then

        raise;

{ Otherwise resume the repeat loop }

  end;

until False;


Prepare, ExecProc Example
 VCL Reference

Prepare, ExecProc example

The following code executes the stored procedure:

StoredProc1.Params[0].AsString := Edit1.Text;

StoredProc1.Prepare;

StoredProc1.ExecProc;


SQL, ExecSQL Example
 VCL Reference

SQL, ExecSQL example

Query1.Close;

Query1.SQL.Clear;

Query1.SQL.Add('Delete from Country where Name = ''Argentina''');

Query1.ExecSQL;


Connected, Execute example
 VCL Reference

Connected, Execute example

The following example executes an INSERT statement that includes a single parameter named :StateParam. A TParams object (called stmtParams) is created to supply a value of “CA” for that parameter.

procedure TForm1.InsertWithParamsButtonClick(Sender: TObject);

var

  SQLstmt: String;

  stmtParams: TParams;

begin

  stmtParams := TParams.Create;

  try

    SQLConnection1.Connected := True;

    stmtParams.CreateParam(ftString, 'StateParam', ptInput);

    stmtParams.ParamByName('StateParam').AsString := 'CA';

    SQLstmt := 'INSERT INTO "Custom.db" '+

      '(CustNo, Company, State) ' +

      'VALUES (7777, "Robin Dabank Consulting", :StateParam)';

    SQLConnection1.Execute(SQLstmt, stmtParams);

  finally

    stmtParams.Free;

  end;

end;


FieldCount, Fields Example
 VCL Reference

FieldCount, Fields example

If an application needs to access all the field components for each column of the TCustomDBGrid in order, Fields can be used with the FieldCount property.

with GridDataLink1 do

  for I := 0 to FieldCount-1 do

    if Fields[I] <>nilthen

    begin

     { Fields[I] is the next column’s field component at runtime }

    end;


FieldCount, Fields, FieldName example
 VCL Reference

FieldCount, Fields, FieldName example

This example displays a message box with the names of all fields in a table.

procedure TForm1.Button2Click(Sender: TObject);

var

   i: Integer;

   Info: String;

begin

   Info := 'The fields of table ' + Table1.TableName +

           ' are:'#13#10#13#10;

   for i := 0 to Table1.FieldCount - 1 do

      Info := Info + Table1.Fields[i].FieldName + #13#10;

  ShowMessage(Info);

end;


FindField, AsString Example
 VCL Reference

FindField, AsString example

withTable1 do

begin

  { This is the safe way to change 'CustNo' field }

  FindField('CustNo').AsString := '1234';

 { This is *not* the safe way to change 'CustNo' field }

  Fields[0].AsString := '1234';

end;


GetProcedureParams, LoadParamListItems, FreeProcParams Example
 VCL Reference

GetProcedureParams, LoadParamListItems, FreeProcParams example

This example shows how to fill a TParams object with information about the parameters of a specified stored procedure.

ParamList := TList.Create; // create list to fetch information

try

  SQLConnection1.GetProcedureParams(StoredProcedureName, ParamList);

  ProcParams := TParams.Create; { create TParams object to hold information }

  try

    LoadParamListItems(ParamList, ProcParams);

    // do something with parameter information

  finally

    ProcParams.Free;

  end;

finally

  FreeProcParams(ParamList);

end;


GetAliasNames, Count Example
 VCL Reference

GetAliasNames, Count Example

MyStringList := TStringList.Create;

try

  Session.GetAliasNames(MyStringList);

  { fill a list box with alias names for the user to select from }

  for I := 0 to MyStringList.Count - 1 do

    ListBox1.Items.Add(MyStringList[I]);

finally

  MyStringList.Free;

end;


GetAliasParams Example
 VCL Reference

GetAliasParams Example

MyStringList := TStringList.Create;

try

  Session.GetAliasParams('DBDEMOS',MyStringList);

  { fill a list box with driver names for the user to select from }

  ListBox1.Items := MyStringList;

finally

  MyStringList.Free;

end;


GetTableNames Example
 VCL Reference

GetTableNames, TableName Example

The example below fetches a list of all tables in an ADO data store. It then traverses this list, making an entry in another table with each table’s name and number of records.

procedure TForm1.Button1Click(Sender: TObject);

var

  SL: TStrings;

  index: Integer;

begin

  SL := TStringList.Create;

  try

    ADOConnection1.GetTableNames(SL, False);

    for index := 0 to (SL.Count - 1) do begin

      Table1.Insert;

      Table1.FieldByName('Name').AsString := SL[index];

      if ADOTable1.Active then ADOTable1.Close;

      ADOTable1.TableName := SL[index];

      ADOTable1.Open;

      Table1.FieldByName('Records').AsInteger := ADOTable1.RecordCount;

      Table1.Post;

    end;

  finally

    SL.Free;

    ADOTable1.Close;

  end;

end;


IsBlob, DataSize, GetData, DisplayName example
 VCL Reference

IsBlob, DataSize, GetData, DisplayName example

{ Retrieve the "raw" data from Field1 }

with Field1 do

begin

  ifnot IsBlob  { this does not work for BLOB fields }

  begin

    { Allocate space }

    GetMem(MyBuffer, DataSize);

    try

      ifnot GetData(MyBuffer) then

         MessageDlg(DisplayName + ' is NULL', mtInformation, [mbOK], 0)

      else

         { Do something with the data };

    finally

      { Free the space }

      FreeMem(MyBuffer, DataSize);

    end;

  end;

end;


ParamByName, GetData, GetDataSize Example
 VCL Reference

ParamByName, GetData, GetDataSize example

var Buffer: Pointer;

begin

  { Allocate enough space to hold the CustNo data }

  GetMem(Buffer, CustQuery.ParamByName('CustNo').GetDataSize);

  try

  { Retrieve the data }

    CustQuery.ParamByName('CustNo').GetData(Buffer);

    {  now do something with the data }

  finally

    FreeMem(MyBuffer);

  end;

end;


GetDatabaseNames Example
 VCL Reference

GetDatabaseNames example

MyStringList := TStringList.Create;

try

  Session.GetDatabaseNames(MyStringList);

  { fill a list box with database names for the user to select from }

  ListBox1.Items := MyStringList;

finally

  MyStringList.Free;

end;


GetDriverNames Example
 VCL Reference

GetDriverNames example

MyStringList := TStringList.Create;

try

  Session.GetDriverNames(MyStringList);

  { fill a list box with driver names for the user to select from }

  ListBox1.Items := MyStringList;

finally

  MyStringList.Free;

end;


GetDriverParams Example
 VCL Reference

GetDriverParams example

MyStringList := TStringList.Create;

try

  Session.GetDriverParams('INTRBASE', MyStringList);

  { fill a list box with parameter names for the user to select from }

  ListBox1.Items := MyStringList;

finally

  MyStringList.Free;

end;


GetResults, ParamByName Example
 VCL Reference

GetResults, ParamByName example

StoredProc1.Open;

whilenot StoredProc1.EOF do

begin

StoredProc1.Next;

{Do Something}

end;

StoredProc1.GetResults;

Edit1.Text := StoredProc1.ParamByName('Output');


GetStoredProcNames Example
 VCL Reference

GetStoredProcNames example

MyStringList := TStringList.Create;

try

  Session.GetStoredProcNames('IB_EMPLOYEE', MyStringList);

  { fill a list box with stored procedure names

   for the user to select from }

  ListBox1.Items := MyStringList;

finally

  MyStringList.Free;

end;


GetTableNames Example
 VCL Reference

GetTableNames example

MyStringList := TStringList.Create;

try

  Session.GetTableNames('DBDEMOS', '*.db',False, False, MyStringList);

  { Add the table names to a list box }

  ListBox1.Items = MyStringList;

finally

  MyStringList.Free;

end;


SetKey, GotoNearest Example
 VCL Reference

SetKey, GotoNearest example

with Table1 do

begin

  SetKey;

  FieldByName('State').AsString := 'CA';

  FieldByName('City').AsString := 'Santa';

  GotoNearest;

end;


SetKey, GotoNearest example
 VCL Reference

SetKey, GotoNearest example

with ClientDataSet1 do

begin

  SetKey;

  FieldByName('State').AsString := 'CA';

  FieldByName('City').AsString := 'Santa';

  GotoNearest;

end;


IndexDefs, Update, Count, Items, IndexName, Fields, Name Example
 VCL Reference

IndexDefs, Update, Count, Items, IndexName, Fields, Name example

This example uses the IndexName property to sort the records in a table on the CustNo and OrderNo fields.

Table1.Active := False;

Table1.Exclusive := True;

{ Get the current available indices }

Table1.IndexDefs.Update;

{ Find one which combines Customer Number ('CustNo') and Order Number ('OrderNo') }

for I := 0 to Table1.IndexDefs.Count - 1 do

  if Table1.IndexDefs.Items[I].Fields = 'CustNo;OrderNo' then

    { set that index as the current index for the table }

    Table1.IndexName := Table1.IndexDefs.Items[I].Name;

Table1.Exclusive := False;

Table1.Active := True;


IndexFields, IndexFieldCount Example
 VCL Reference

IndexFields, IndexFieldCount Example

The following code calculates the total length of the index and assigns it to the variable TotalLen.

TotalLen := 0;

with Table1 do

  for I := 0 to IndexFieldCount - 1 do

    Inc(TotalLen, IndexFields[I].DataSize);


InsertRecord Example
 VCL Reference

InsertRecord example

This statement appends a record to the Customer dataset. Note that Nulls are entered for some of the values, but are not required for missing values at the end of the array argument.

Customer.InsertRecord([CustNoEdit.Text, CoNameEdit.Text, AddrEdit.Text, Null, Null, Null, Null, Null, Null, DiscountEdit.Text]);


KeyExclusive Example
 VCL Reference

KeyExclusive example

{ Limit the range from 1351 to 1356,

  including 1351 but excluding 1356 }

with Table1 do

begin

  { Set the beginning key }

  EditRangeStart;

  IndexFields[0].AsString := '1351';

  { Include 1351 in the range. }

  { Note that KeyExclusive applies to the range start }

  { because of the call to EditRangeStart }

  KeyExclusive := False;

  { Set the ending key }

  EditRangeEnd;

  IndexFields[0].AsString := '1356';

  { Exclude 1356 from the range }

  { Note that KeyExclusive now applies to the range end }

  { because of the call to EditRangeEnd }

  KeyExclusive := True;

  { Tell the table to establish the range }

  ApplyRange;

end;


AutoDisplay, LoadMemo Example
 VCL Reference

AutoDisplay, LoadMemo example

This example uses a database memo that is connected to a BLOB text field in the dataset. The current value of the BLOB field does not appear until the user clicks the memo.

procedure TForm1.FormCreate(Sender: TObject);

begin

  DBMemo1.AutoDisplay := False;

end;

procedure TForm1.DBMemo1Click(Sender: TObject);

begin

  DBMemo1.LoadMemo;

end;


Mappings Example
 VCL Reference

Mappings example

with BatchMove1.Mappings do

begin

  Clear;

  { Map the CustomerNum field to CustNo }

  Add('CustNo=CustomerNum');

  { Leave the SSN field mapped to SSN }

  Add('SSN');

end;


MasterSource, MasterFields Example
 VCL Reference

 MasterSource, MasterFields example

Suppose you have a master table named Customer that contains a CustNo field. You also have a data source component named CustSource whose DataSet property specifies the Customer table. Finally, you have a detail table named Orders that also has a CustNo field. To display only those records in Orders that have the same CustNo value as the current record in Customer, write this code:

Orders.MasterSource := CustSource;

Orders.MasterFields := 'CustNo';

If you want to display only the records in the detail table that match more than one field value in the master table, specify each field and separate them with a semicolon.

Orders.MasterFields := 'CustNo;SaleDate';


Mode, AbortOnKeyViol, Execute, MovedCount, KeyViolCount Example
 VCL Reference

Mode, AbortOnKeyViol, Execute, MovedCount, KeyViolCount example

The following code uses the BatchMove component to add records to a table.  After the records have been added, the number of new records is reported on the status line.

with BatchMove1 do

begin

  Mode := batAppend;

  AbortOnKeyViol := False;

  Execute;

  StatusBar1.SimpleText := IntToStr(MovedCount - KeyViolCount) + ' records added';

end;


NextRecordSet example
 VCL Reference

NextRecordSet example

The following code cycles through the datasets returned by a stored procedure.

var

  TempDataSet: TCustomSQLDataSet;

  nRows: Integer;

begin

  TempDataSet := SQLStoredProc1; // start with 1st record set

  while TempDataSet <> nil do

  begin

    TempDataSet.First;

    while not TempDataSet.Eof do

    begin

      // process each record

      TempDataSet.Next;

    end;

    if TempDataSet <> SQLStoredProc1 then // don’t free the original!

      TempDataSet.Free;

    TempDataSet = SQLStoredProc1.NextRecordSet; // get next set

  end;

end;


OnClick Example
 VCL Reference

OnClick example

The following code determines which database navigator button was clicked and displays a message identifying the name of the button.

procedure TForm1.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);

var

  BtnName: string;

begin

  case Button of

    nbFirst  : BtnName := 'nbFirst';

    nbPrior  : BtnName := 'nbPrior';

    nbNext   : BtnName := 'nbNext';

    nbLast   : BtnName := 'nbLast';

    nbInsert : BtnName := 'nbInsert';

    nbDelete : BtnName := 'nbDelete';

    nbEdit   : BtnName := 'nbEdit';

    nbPost   : BtnName := 'nbPost';

    nbCancel : BtnName := 'nbCancel';

    nbRefresh: BtnName := 'nbRefresh';

  end;

  MessageDlg(BtnName + ' button clicked.', mtInformation, [mbOK], 0);

end;


OnColEnter, OnColExit, SelectedField, DisplayLabel Example
 VCL Reference

OnColEnter, OnColExit, SelectedField, DisplayLabel Example

The following code concatenates an asterisk to the display label of a field when the column is entered, and removes it when another column is selected. StarIsThere is a boolean that prevents deleting characters from the column that is selected at startup (which never receives an OnColEnter event).

var

  StarIsThere: Boolean;

procedure TForm1.DBGrid1ColEnter(Sender: TObject);

begin

  with DBGrid1.SelectedField do

    DisplayLabel := '* ' + DisplayLabel;

  StarIsThere = True;

end;

procedure TForm1.DBGrid1ColExit(Sender: TObject);

var

  TheLabel: string;

begin

  if StarIsThere then

  begin

    with DBGrid1.SelectedField do

    begin

      TheLabel := DisplayLabel;

      Delete(TheLabel, 1, 2);

      DisplayLabel := TheLabel;

    end;

  end;

end;


OnFilterRecord Example
 VCL Reference

OnFilterRecord Example

The following example shows how to use a field comparison when filtering records on a local table, by using the OnFilterRecord event.

procedure TForm1.Table1FilterRecord(DataSet: TDataSet; var Accept: Boolean);

begin

  Accept := DataSet['DateOfPayment'] > DataSet['DateOfPurchase'] + 30;

end;


ParamByName, CreateParam Example
 VCL Reference

ParamByName, CreateParam Example

try

  { Assign a value of 999 to the CustNo parameter }

  Params.ParamByName('CustNo').AsInteger := 999;

except

  { If it doesn’t exist, then }

  on EDatabaseError do

    { Create a new parameter for CustNo

      and assign a value of 999 to it }

    with Params.CreateParam(ftInteger, 'CustNo', ptInput) do

      AsInteger := 999;

end;


ParamCount, DataType, StrToIntDef, AsXXX Example
 VCL Reference

ParamCount, DataType, StrToIntDef, AsXXX example

This example fills in the parameters of a query from the entries of a list box.

var

  I: Integer;

  ListItem: string;

begin

  for I := 0 to Query1.ParamCount - 1 do

  begin

    ListItem := ListBox1.Items[I];

    case Query1.Params[I].DataType of

      ftString:

        Query1.Params[I].AsString := ListItem;

      ftSmallInt:

        Query1.Params[I].AsSmallInt := StrToIntDef(ListItem, 0);

      ftInteger:

        Query1.Params[I].AsInteger := StrToIntDef(ListItem, 0);

      ftWord:

        Query1.Params[I].AsWord := StrToIntDef(ListItem, 0);

      ftBoolean:

        begin

          if ListItem = 'True' then

            Query1.Params[I].AsBoolean := True

          else

            Query1.Params[I].AsBoolean := False;

        end;

      ftFloat:

        Query1.Params[I].AsFloat := StrToFloat(ListItem);

      ftCurrency:

        Query1.Params[I].AsCurrency := StrToFloat(ListItem);

      ftBCD:

        Query1.Params[I].AsBCD := StrToCurr(ListItem);

      ftDate:

        Query1.Params[I].AsDate := StrToDate(ListItem);

      ftTime:

        Query1.Params[I].AsTime := StrToTime(ListItem);

      ftDateTime:

        Query1.Params[I].AsDateTime := StrToDateTime(ListItem);

    end;

  end;

end;


ParamCount, Params, ParamType Example
 VCL Reference

ParamCount, Params, ParamType example

{ Set all input parameters to an empty string }

with StoredProc1 do

  for I := 0 to ParamCount - 1 do

    if (Params[I].ParamType = ptInput) or

       (Params[I].ParamType = ptInputOutput) then

      Params[I].AsString := '';


Params Example
 VCL Reference

Params example

The following code runs an insert query to add a record for Liechtenstein into the country table.

Query2.SQL.Clear;

Query2.SQL.Add('INSERT INTO COUNTRY (NAME, CAPITAL, POPULATION)');

Query2.SQL.Add('VALUES (:Name, :Capital, :Population)');

Query2.Params[0].AsString := 'Liechtenstein';

Query2.Params[1].AsString := 'Vaduz';

Query2.Params[2].AsInteger := 420000;

Query2.ExecSQL;


CommandTYpe, CommandText, Params, ExecSQL example
 VCL Reference

CommandType, CommandText, Params, ExecSQL example

The following code runs an insert query to add a record for Liechtenstein into the country table.

SQLDataSet1.CommandType := ctQuery;

SQLDataSet1.CommandText := 'INSERT INTO COUNTRY (NAME, CAPITAL, POPULATION) VALUES (:Name, :Capital, :Population)';

SQLDataSet1.Params[0].AsString := 'Liechtenstein';

SQLDataSet1.Params[1].AsString := 'Vaduz';

SQLDataSet1.Params[2].AsInteger := 420000;

SQLDataSet1.ExecSQL;


Prepared, Prepare Example
 VCL Reference

Prepared, Prepare example

if not Query1.Prepared then

begin

  Query1.Close;

  Query1.Prepare;

  Query1.Open;

end;


ParamByName, Prepared Example
 VCL Reference

ParamByName, Prepared example

The following example sets Prepared to False after adding a parameter. This ensures that the new parameter is properly prepared with the query

SQLDataSet1.Params.CreateParam(ftString, 'PartNo', ptInput);

SQLDataSet1.ParamByName('PartNo').Value := Edit1.Text;

SQLDataSet1.Prepared := False;

SQLDataSet1.Close;

SQLDataSet1.Open; // dataset is re-prepared when you open it


Read Example
 VCL Reference

Read example

The following example reads the data from a memo field into a blob stream and displays it in a memo control.

procedure TForm1.Button2Click(Sender: TObject);

var

  Buffer: PChar;

  MemSize: Integer;

  Stream: TBlobStream;

begin

  Stream := TBlobStream.Create(query1.FieldByName('Notes') as TBlobField, bmRead);

  try

    MemSize := Stream.Size;

    Inc(MemSize); {Make room for the buffer's null terminator.}

    Buffer := AllocMem(MemSize);     {Allocate the memory.}

    try

      Stream.Read(Buffer^, MemSize); {Read Notes field into buffer.}

      Memo1.SetTextBuf(Buffer);      {Display the buffer's contents.}

    finally

      FreeMem(Buffer, MemSize);

    end;

  finally

    Stream.Free;

  end;

end;


Seek, Truncate Example
 VCL Reference

Seek, Truncate example

The following example deletes the stream from position 60 within the blob stream to the end.

procedure TForm1.Button1Click(Sender: TObject);

var

  Stream1: TBlobStream;

begin

  Table1.Edit;

  if Table1.State = dsEdit then

  begin

    Stream1 := Table1.CreateBlobStream(FieldByName('Notes', bmReadWrite);

    try

      Stream1.Seek(60, 0); { Move to byte 60}

      Stream1.Truncate;  { Delete from current position (60) to end of stream.}

      Table1.Post;

    finally

      Stream1.Free;

    end;

  end;

end;


SetData Example
 VCL Reference

SetData example

var I: Longint;

begin

  I := Customers.FieldByName('CustID').AsInteger;

{ Set the data }

  OrderQuery.ParamByName('CustNo').SetData(@I);

end;


SetData Example
 VCL Reference

SetData example

{ Assign "raw" data to Field1 }

with Field1 do

begin

  { Allocate space }

  GetMem(Buffer, DataSize);

  { Fill Buffer with the desired data }

  ...

  { Do the assignment }

  Field1.SetData(Buffer)

  { Free the space }

  FreeMem(Buffer, DataSize);

end;


SetRangeStart, SetRangeEnd Example
 VCL Reference

SetRangeStart, SetRangeEnd example

with Table1 do

begin

  SetRangeStart; { Set the beginning key }

  FieldByName('City').AsString := 'Felton';

  SetRangeEnd; { Set the ending key }

  FieldByName('City').AsString := 'Scotts Valley';

  ApplyRange; { Tell the dataset to establish the range }

end;


SQL example
 VCL Reference

SQL example

The following code loads an SQL query from a file and executes it.

SQLQuery1.SQL.LoadFromFile('/usr/queries/CustQuery.sql');

SQLQuery1.Prepared := True;

SQLQuery1.Open;


State Example
 VCL Reference

State example

The following code enables a post button only when the data set is edited.

if DataSource1.Dataset <> nilthen

  PostButton.Enabled := DataSource1.State in [dsEdit, dsInsert];


Sessions, GetSessionNames, SessionName, ValidateName Example
 VCL Reference

Sessions, GetSessionNames, SessionName, ValidateName example

The following example searches all sessions for an open session with theDBDEMOS directory.

function TForm1.IsDuplicate(DBName: string): string;

var

  SessionCount: Integer;

  SessionNames: TStrings;

begin

  Result:= '';

  SessionNames:= TStringList.Create;

  try

    Sessions.GetSessionNames(SessionNames);

    for SessionCount:= 0 to (Sessions.Count - 1) do

      with TDatabase.Create(nil) do

      try

        SessionName:= SessionNames[SessionCount];

        try

          ValidateName(DBName);

        except

          on EDatabaseError do

            Result:= SessionNames[SessionCount];

        end;

      finally

        Free;

      end;

  finally

    SessionNames.Free;

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

var

  Duplicate: string;

begin

  Duplicate:=

    IsDuplicate('c:\program files\borland\delphi 4\demos\data');

  if Duplicate <> '' then

    ShowMessage(Format('Duplicate found in %s Session', [Duplicate]))

  else

    ShowMessage('Not A Duplicate');

end;


Sessions, Count Example
 VCL Reference

Sessions, Count example

The following code sets the KeepConnections property of each session to Falsefalse:

var

I: Integer;

begin

  for I := 0 to Sessions.Count - 1 do

    Sessions[I].KeepConnections := False;

end;


Write, State example
 VCL Reference

Write, State example

The following example uses a blob stream to write a string to the end of the Notes field in the Tasks table.

procedure TForm1.AppendNoteClick(Sender: TObject);

var

  Stream: TStream;

  S: string;

begin

  with Tasks do

  begin

    Edit;

    if State = dsEdit then

    begin

      Stream := CreateBlobStream(FieldByName('Notes'), bmReadWrite);

      try

        Stream.Seek(0, 2); {Seek 0 bytes from the stream's end point}

        S := ' This line will be added to the end.';

        Stream.Write(PChar(S)^, Length(S));

        Post;

      finally

        Stream.Free;

      end;

    end;

  end;

end;


IndexDefs, IndexName Example
 VCL Reference

IndexDefs, IndexName example

This example uses the IndexName property to sort the records in a client dataset on the CustNo and OrderNo fields.

{ Get the current available indices }

ClientDataSet1.IndexDefs.Update;

{ Find one which combines Customer Number ('CustNo') and Order Number ('OrderNo') }

for I := 0 to ClientDataSet1.IndexDefs.Count - 1 do

  if ClientDataSet1.IndexDefs.Items[I].Fields = 'CustNo;OrderNo' then

    begin

    { set that index as the current index for the dataset}

    ClientDataSet1.IndexName := ClientDataSet1.IndexDefs.Items[I].Name;

    end;


IndexFields, IndexFieldCount Example
 VCL Reference

IndexFields, IndexFieldCount Example

TotalLen := 0;

with ClientDataSet1 do

{ Calculate the total length of the index }

  for I := 0 to IndexFieldCount - 1 do

    Inc(TotalLen, IndexFields[I].DataSize);


SetRangeStart, SetRangeEnd, ApplyRange Example
 VCL Reference

SetRangeStart, SetRangeEnd, ApplyRange Example

with ClientDataSet1 do

begin

  SetRangeStart; { Set the beginning key }

  FieldByName('City').AsString := 'Felton';

  SetRangeEnd; { Set the ending key }

  FieldByName('City').AsString := 'Scotts Valley';

  ApplyRange; { Tell the dataset to establish the range }

end;


GetFieldProperty Example
 VCL Reference

GetFieldProperty example

The following event handler uses GetFieldProperty to obtain a field component that corresponds to a DBEdit control. The AsString property of this field is assigned to a string variable and displayed.

procedure TForm1.Button1Click(Sender: TObject);

var

  F: string;

begin

  F := GetFieldProperty(DBEdit1.DataSource.DataSet, DBEdit1, DBEdit1.DataField).AsString;

  ShowMessage(F);

end;

Note that this does the same thing as

procedure TForm1.Button1Click(Sender: TObject);

var

  F: string;

begin

  F := DBEdit1.Field.AsString;

  ShowMessage(F);

end;


PasswordDialog Example
 VCL Reference

PasswordDialog Example

procedure TForm1.Button1Click(Sender: TObject);

begin

  with Table1 do

    if PasswordDialog(DBSession) then

      Active := True;

end;


StartTransaction, ApplyUpdates, Commit, Rollback, CommitUpdates Example
 VCL Reference

StartTransaction, ApplyUpdates, Commit, Rollback, CommitUpdates example

The following procedure illustrates how to apply a dataset’s cached updates to a database in response to a button click:

procedure TForm1.ApplyButtonClick(Sender: TObject);

begin

  with CustomerQuery do

  begin

  Database1.StartTransaction;

    try

      ApplyUpdates; {try to write the updates to the database};

      Database1.Commit; {on success, commit the changes};

    except

      Database1.Rollback; {on failure, undo the changes};

    raise; {raise the exception to prevent a call to CommitUpdates!}

    end;

  CommitUpdates; {on success, clear the cache}

  end;

end;


InTransaction, StartTransaction, ParamValues, Commit, Rollback Example
 VCL Reference

InTransaction, StartTransaction, ParamValues, Commit, Rollback example

The following procedure illustrates how to explicitly manage transactions using a TSQLConnection component. It makes use of two TSQLDataSet objects to transfer funds. The first, called Debit, contains a parameterized update query that debits an account. The other, called Credit, contains a parameterized update query that credits a different account.

This example assumes a server that does not permit nested transactions.

procedure TForm1.TransferButtonClick(Sender: TObject);

var

  Amt: Integer;

  TD: TTransactionDesc;

begin

  if not SQLConnection1.InTransaction then

  begin

    TD.TransactionID := 1;

    TD.IsolationLevel := xilREADCOMMITTED;

    SQLConnection1.StartTransaction(TD);

    try

      Amt := StrToInt(AmtEdit.Text);

      Debit.Params.ParamValues['Amount'] := Amt;

      Credit.Params.ParamValues['Amount'] := Amt;

      SQLConnection1.Commit(TD); {on success, commit the changes};

    except

      SQLConnection1.Rollback(TD); {on failure, undo the changes};

    end;

  end;

end;


UpdateRecordTypes, RevertRecord Example
 VCL Reference

UpdateRecordTypes, RevertRecord example

With minor coding, UpdateRecordTypes and RevertRecord can be used to undelete records when cached updates are enabled, as the following procedure demonstrates:

procedure UndeleteAll(DataSet: TBDEDataSet);

begin

  with DataSet do

  begin

  UpdateRecordTypes := [rtDeleted]; {make only deleted records visible}

   try

    First; {move to beginning of dataset}

    whilenot EOF do

      begin

      RevertRecord; {undelete the current record}

      Next; {move to the next record}

      end;

   finally

    UpdateRecordTypes := [rtModified, rtInserted, rtUnmodified];

   end;

  end;

end;


DataSetCount, DataSets Example
 VCL Reference

DataSetCount, DataSets example

The following code fragment illustrates how DataSets and DataSetCount can be used to ensure that an action is taken for every open dataset:

var

  I: Integer;

begin

  with SQLConnection1 do

  begin

    for I := 0 to DataSetCount - 1 do

      DataSets[I].DisableControls;

  end;

end;


DataSetCount, DataSets Example
 VCL Reference

DataSetCount, DataSets example

The following code fragment illustrates how DataSets and DataSetCount can be used to ensure that an action is taken for every open dataset that is a table:

var

  I: Integer;

begin

  with Database1 do

  begin

    if DataSets[I] is TTable then

      DataSets[I].CachedUpdates := True;

  end;

end;


DatabaseCount, Databases Example
 VCL Reference

DatabaseCount, Databases example

The following code sets the KeepConnection property of each active database in the default session to true:

var

MaxDbCount: Integer;

begin

  with Session do

    if DatabaseCount > 0 then

    begin

      for MaxDbCount := 0 to DatabaseCount - 1 do

        Databases[MaxDbCount].KeepConnection := True;

    end;

  end;

end;


AddAlias Example
 VCL Reference

AddAlias example

This example creates an alias for an InterBase database server:

var

  MyList: TStringList;

begin

  MyList := TStringList.Create;

  try

    with MyList do

    begin

      Add('SERVER NAME=IB_SERVER:/PATH/DATABASE.GDB');

      Add('USER NAME=MYNAME');

    end;

    Session1.AddAlias('NewIBAlias', 'INTRBASE', MyList);

  finally

    MyList.Free;

  end;

end;


CompareBookmarks example
 VCL Reference

CompareBookmarks example

function CompareRecordsAtCursor: Boolean;

begin

  if Table1.Bookmark and Table2.Bookmark then

    result := Table1.CompareBookmarks(Table1.Bookmark, Table2.Bookmark);

end;


Items Example
 VCL Reference

Items example

The following example adds the name of each field def of a table to a list box.

procedure TForm1.Button1Click(Sender: TObject);

var i: Integer;

begin

  Table1.Active := True;

  for i:= 1 toTable1.FieldDefs.Count - 1 do

  begin

    ListBox1.Items.Add(Table1.FieldDefs[i].Name);

  end;

  Table1.Active := False;

end;


BeforeConnect, LoginPrompt, Params example
 VCL Reference

BeforeConnect, LoginPrompt, Params example

The following example uses the BeforeConnect event to supply login information before logging into a database server. This application stores an encrypted password in dbxconnections.ini which is decrypted by the event handler. (You must write your own Decrypt routine)

procedure TForm1.SQLConnectionBeforeConnect(Sender: TObject);

begin

  with Sender as TSQLConnection do

  begin

    if LoginPrompt = False then

    begin

      Params.Values['User_Name'] := 'SYSDBA';

      Params.Values['Password'] := Decrypt(Params.Values['Password']);

    end;

  end;

end;


BeforeClose, UpdatesPending, UpdateStatus, ApplyUpdates Example
 VCL Reference

BeforeClose, UpdatesPending, UpdateStatus, ApplyUpdates example

The following example applies cached updates from a master/detail relationship. The updates are applied from the BeforeClose event handler of the detail set. Note that using cached updates in this manner requires that you apply updates any time you change the master record. For more control over cached updates, you must use a client dataset instead.

procedure TForm1.DetailBeforeClose(DataSet: TDataSet);

begin

  if Master.UpdatesPending or Detail.UpdatesPending then

    if Master.UpdateStatus = usInserted then

      Database1.ApplyUpdates([Master, Detail])

    else

      Database1.ApplyUpdates([Detail, Master]);

end;


IsAlias, GetAliasParams, ModifyAlias, SaveConfigFile Example
 VCL Reference

IsAlias, GetAliasParams, ModifyAlias, SaveConfigFile example

The following example changes a parameter of a session’s alias.

procedure TForm1.ChangeAlias;

var

  AParams: TStringList;

  Dir: string;

begin

  ifnot Session.IsAlias('MyAlias') then

    begin

      ShowMessage('Alias MyAlias does not exist');

      Exit;

    end;

  AParams := TStringList.Create;

  try

    // get the current PATH parameter

    Session.GetAliasParams('MyAlias',AParams);

    Dir := Copy(AParams.Strings[0],6,255);

    // get the new PATH parameter

    if InputQuery('MyAlias Alias Path','Path:' ,Dir) then

      begin

        // Update the alias parameters

        AParams.Clear;

        AParams.Add('PATH=' + Dir);

        Session.ModifyAlias('MyAlias',AParams);

        Session.SaveConfigFile;

      end;

    finally

      AParams.Free;

    end;

  end;


Exit, Source, Destination, Mode, Execute Example
 VCL Reference

Exit, Source, Destination, Mode, Execute example

The following example uses a batch move component to move the contents of a query to the table chosen from a save dialog. The Exit procedure allows the event handler to terminate if the query has no answer set.

procedure TForm1.Button1Click(Sender: TObject);

begin

  if Query1.Active = False then

    Exit;

  if SaveDialog1.Execute then

    begin

      Table1.TableName := SaveDialog1.FileName;

      with BatchMove1 do

        begin

          Source := Query1;

          Destination := Table1;

          Mode := batCopy;

          Execute;

          ShowMessage(IntToStr(MovedCount) + ' records copied');

        end;

     end;

  end;


OnDrawDataCell, DefaultDrawDataCell Example
 VCL Reference

OnDrawDataCell, DefaultDrawDataCell example

The following example conditionally changes the font color of rows in a DB Grid. The following code is added to the DB Grid’s OnDrawDataCell event. If the field Size is greater than 10, the row’s font will be red.

procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState);

begin

  if Table1.FieldByName('Size').AsFloat > 10 then

    DBGrid1.Canvas.Font.Color := clRed;

  DBGrid1.DefaultDrawDataCell(Rect, Field, State);

end;


SetRange, CancelRange, Refresh Example
 VCL Reference

SetRange, CancelRange, Refresh example

The following example sets a range for a dataset. The form requires two edit boxes, a data source, a table, a db grid, and a button.

procedure TForm1.FormActivate(Sender: TObject);

begin

  Table1.DatabaseName := 'DBDemos';

  Table1.TableName := 'Customer.db';

  Table1.Active := True;

  Table1.IndexName := 'ByCompany';

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  if Button1.Caption = '&Apply Range' then

    begin

      Table1.SetRange([Edit1.Text],[Edit2.Text]);

      Button1.Caption := '&Drop Range';

    end

  else

    begin

      Table1.CancelRange;

      Table1.Refresh;

      Button1.Caption := '&Apply Range';

    end;

end;


FindNearest Example
 VCL Reference

FindNearest example

The following example performs an incremental search on a table.  The form contains a db grid, an edit box, a data source, and a table. As the user types in the edit box, the cursor of the grid moves to the nearest match in the table.

procedure TForm1.FormActivate(Sender: TObject);

begin

  Table1.DatabaseName := 'DBDemos';

  Table1.TableName := 'Customer.db';

  Table1.Active := True;

  Table1.IndexName := 'ByCompany';

end;

procedure TForm1.Edit1Change(Sender: TObject);

begin

    Table1.FindNearest([Edit1.Text]);

end;


FindNearest example
 VCL Reference

FindNearest example

The following example performs an incremental search on a table.  The form contains a db grid, an edit box, a data source, and a table. As the user types in the edit box, the cursor of the grid moves to the nearest match in the table.

procedure TForm1.FormActivate(Sender: TObject);

begin

  ClientDataSet1.FileName := 'Customer.db';

  ClientDataSet1.Active := True;

  ClientDataSet1.IndexName := 'ByCompany';

end;

procedure TForm1.Edit1Change(Sender: TObject);

begin

  ClientDataSet1.FindNearest([Edit1.Text]);

end;


MoveBy, SelectedIndex, Tag Example
 VCL Reference

MoveBy, SelectedIndex, Tag example

The following example enables the user to move the current selected cell in a db grid.  The Up and Down buttons have their OnClick events assigned to the UpDownClick procedure.  The Left and Right buttons have their OnClick events assigned to the LeftRightClick procedure.  The Up and Left buttons have their Tag property set to –1, while the Down and Right buttons have their Tag property set to 1.

procedure TForm1.UpDownClick(Sender: TObject);

begin

  Table1.MoveBy(TComponent(Sender).Tag);

  DBGrid1.SetFocus;

end;

procedure TForm1.LeftRightClick(Sender: TObject);

begin

  DBGrid1.SelectedIndex := DBGrid1.SelectedIndex + TComponent(Sender).Tag;

  DBGrid1.SetFocus;

end;


Hints Example
 VCL Reference

Hints Example

This example uses a database navigator and a button on a form. When the user clicks the button, the Help Hints for the navigator are modified.

procedure TForm1.Button1Click(Sender: TObject);

var

  NewStrings: TStringList;

begin

  NewStrings := TStringList.Create;

  with NewStrings do

  begin

    Add('Beginning of dataset');

    Add('Previous record');

    Add(''); { do not change the hint for the third button }

    Add('End of dataset');

  end;

  DBNavigator1.Hints := NewStrings;

  DBNavigator1.ShowHint := True;

end;


SelectedRows, Count, Items, DataSource, FieldCount, Fields, GoToBookmark, DataSet Example
 VCL Reference

SelectedRows, Count, Items, DataSource, FieldCount, Fields, GotoBookmark, DataSet example

The following example copies the selected rows in a db grid to a list box.

procedure TForm1.Button1Click(Sender: TObject);

var

  i, j: Integer;

  s: string;

begin

  if DBGrid1.SelectedRows.Count>0 then

    with DBGrid1.DataSource.DataSet do

      for i:=0 to DBGrid1.SelectedRows.Count-1 do

      begin

        GotoBookmark(pointer(DBGrid1.SelectedRows.Items[i]));

        for j := 0 to FieldCount-1 do

        begin

          if (j>0) then s:=s+', ';

          s:=s+Fields[j].AsString;

        end;

        Listbox1.Items.Add(s);

        s:= '';

      end;

end;


Connected, Execute, Handle Example
 VCL Reference

Connected, Execute, Handle example

The example below demonstrates executing an SQL statement from a TDatabase that inserts a row into a table using a value passed as a parameter. The INSERT statement is assigned to the String variable SQLstmt and passed as the SQL parameter of the Execute method. The SQL statement includes one parameter, named StateParam. A TParams object named stmtParams is created to pass parameters to the Execute method. One TParam object is created to represent the SQL parameter StateParam using the TParams.CreateParam method. The TParams object is then passed in the Params parameter of the Execute method. The Execute method is then invoked to execute the INSERT statement.

procedure TDataForm.INSERT_WithParamBtnClick(Sender: TObject);

var

  SQLstmt: String;

  stmtParams: TParams;

begin

  { create the TParams object }

  stmtParams := TParams.Create;

  try

    { activate the TDatabase component }

    Database1.Connected := True;

    { create the TParam object for StateParam }

    stmtParams.CreateParam(ftString, 'StateParam', ptInput);

    { assign the data value for the StateParam parameter }

    stmtParams[0].AsString := 'CA';

    { assign the SQL statement to the String variable }

    SQLstmt := 'INSERT INTO "Customer.db"'+

      '(CustNo, Company, State) ' +

      'VALUES (7777, "Bob Inferapples Towing Service", :StateParam)';

    { call the Execute method }

    Database1.Execute(SQLstmt, stmtParams, False, nil);

finally

    { free the dynamically created TParams object }

    stmtParams.Free;

  end;

end;


OnLogTrace, SaveToFile example
 VCL Reference

OnLogTrace, SaveToFile example

The following example uses the OnLogTrace event to save the messages in the log to a file every time a new message is added to the list. This event handler does the same thing as setting the FileName property to thislog.txt and setting AutoSave to True.

procedure TForm1.SQLMonitor1LogTrace(Sender: TObject; CBInfo: Pointer);

begin

  TSQLMonitor(Sender).SaveToFile('c:\thislog.txt');

end;


ServerExceptionHandler Example
 VCL Reference

ServerExceptionHandler Example

The following code uses the ServerExceptionHandler  to access the SafeCall exception notification process so that you can log or reroute those notifications to an external monitor. The following example uses the event log wrapper class along with the ServerExceptionHandler.

unit Comexcu;

interface

uses

  ComObj, ActiveX, COMExcp_TLB;

type

    TServerExcp = class(TInterfacedObject, IServerExceptionHandler)

        procedure OnException(

            const ServerClass, ExceptionClass, ErrorMessage: WideString;

            ExceptAddr: Integer; const ErrorIID, ProgID: WideString;

            var Handled: Integer; var Result: HResult);

  end;

  TServExcpt = class(TAutoObject, IServExcpt)

  protected

    procedure CallingCOM; safecall;

    { Protected declarations }

  public

   procedure Initialize; override;

  end;

implementation

uses Windows,Sysutils,ComServ,DbTables,SvcMgr;

// Defined in Service manager unit and is used to write information

// to the NT eventlog

var

  EventLogger : TEventLogger = nil;

procedure TServExcpt.Initialize;

begin

inherited Initialize;

 // Create the new COM server safecall exception interceptor object

 ServerExceptionHandler := TServerExcp.Create;

end;

// This method will be called from a remote machine such as an

// active server page.

procedure TServExcpt.CallingCOM;

var

 aTable : TTable;

begin

 aTable := TTable.Create(nil);

 try

   aTable.DataBaseName := 'DBDEMOS';

   aTable.TableName := 'NoExsistenttable.db'; // Force an error

   aTable.Open;

 finally

   aTable.Free;

 end;

end;

procedure TServerExcp.OnException(const ServerClass, ExceptionClass,

  ErrorMessage: WideString; ExceptAddr: Integer; const ErrorIID,

  ProgID: WideString; var Handled: Integer; var Result: HResult);

begin

  // Make use of the Services event logging class to write

  // information into the NT Event log that can be viewed remotely

  if (EventLogger <> nil) then

      EventLogger.LogMessage('The class ' + ClassName + ' caused an '+

      ExceptionClass +' Exception :' + ErrorMessage);

  // Do not pass the message onto the OS's COM subsystem

  Handled := integer(true);

end;

// Small utility function to get the module name of the DLL.

function GetModuleName: string;

var

  ModName: array[0..MAX_PATH] of Char;

begin

  SetString(Result, ModName, Windows.GetModuleFileName(HInstance, ModName, SizeOf(ModName)));

  Result := ExtractFileName(Result);

end;

initialization

  TAutoObjectFactory.Create(ComServer, TServExcpt, Class_ServExcpt,

    ciMultiInstance, tmApartment);

  // Instantiate the event logging mechanism

  EventLogger := TEventLogger.Create(GetModuleName);

finalization

  EventLogger.Free;

end.


TDBGridColumns
 VCL Reference

TDBGridColumns

Hierarchy	Properties	Methods 	Using TDBGridColumns	See also

TDBGridColumns represents a container for TColumn objects.

Unit

DBGrids

Description

Each TDBGridColumns holds a collection of TColumn objects in a data grid (TDBGrid). TDBGridColumns maintains an index of the columns in its Items array. The Count property contains the number of columns in the collection. At design time, use the data grid’s Columns editor to add, remove, or modify columns.


 VCL Reference

TDBGridColumns properties

TDBGridColumns	Alphabetically	Legend

In TDBGridColumns

Grid

Items

State

Derived from TCollection

Count

ItemClass


 VCL Reference

TDBGridColumns properties

TDBGridColumns	By object	Legend

Count

Grid

ItemClass

Items

State


TDBGridColumns.Grid
 VCL Reference

TDBGridColumns.Grid

TDBGridColumns	See also

Indicates the data-grid control to which the TDBGridColumns instance belongs.

property Grid: TCustomDBGrid;

Description

The read-only Grid property indicates which data-grid control (TDBGrid) owns the TDBGridColumns object.


TDBGridColumns.Items
 VCL Reference

TDBGridColumns.Items

TDBGridColumns 	See also

Lists the columns in the collection.

property Items[Index: Integer]: TColumndefault;

Description

Use Items to access individual columns. The value of the Index parameter corresponds to the Index property of TColumn. It represents the position of the column in the data grid.

Items is the default property of TDBGridColumns. This means that the property name, Items, can be omitted when referring to columns of the TDBGridColumns object. Thus, the line

FirstCol := DBGrid1.Columns.Items[0];

can also be written

FirstCol := DBGrid1.Columns[0];


TDBGridColumns.State
 VCL Reference

TDBGridColumns.State

TDBGridColumns	See also

Determines whether the columns in the data grid are dependent on dataset fields.

type TDBGridColumnsState = (csDefault, csCustomized);

property State: TDBGridColumnsState;

Description

If State is set to csDefault, columns in the data grid are generated dynamically from information in the grid’s associated dataset. The appearance, order, and other properties of the columns are determined by the dataset fields. Changes made to the columns are reflected in the dataset fields, and vice versa.

If State is set to csCustomized, many properties of the data-grid columns are independent of the associated dataset. For example, a column’s title caption is, by default, the same as the associated field’s DisplayLabel property; if State is csCustomized, however, the column title’s Caption property and the field’s DisplayLabel property can be changed independently. In fact, a customized (or “persistent”) column need not be associated with a dataset field at all.

Note:	If the Columns editor is used to configure data-grid columns, State is automatically set to csCustomized. Changing the State property at runtime deletes all existing columns.


 VCL Reference

TDBGridColumns methods

TDBGridColumns	Alphabetically	Legend

In TDBGridColumns

Add

Create

LoadFromFile

LoadFromStream

RebuildColumns

RestoreDefaults

SaveToFile

SaveToStream

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDBGridColumns methods

TDBGridColumns	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

Owner

RebuildColumns

RestoreDefaults

SafeCallException

SaveToFile

SaveToStream


TDBGridColumns.Add
 VCL Reference

TDBGridColumns.Add

TDBGridColumns	See also

Creates a new TColumn instance and adds it to the Items array.

function Add: TColumn;

Description

Add returns the new column. At design time, use the data grid’s Columns editor to add columns to the grid.


TDBGridColumns.Create
 VCL Reference

TDBGridColumns.Create

TDBGridColumns	See also

Creates and initializes a TDBGridColumns object.

type TColumnClass = class ofTColumn;

constructor Create(Grid: TCustomDBGrid; ColumnClass: TColumnClass);

Description

The Create method takes two parameters: a data-grid instance object and TColumn (or the name of a class derived from TColumn).

An application should seldom need to call Create directly. Instead, objects that use a TDBGridColumns object instantiate the object as part of their initialization. An example of such an object is the TDBGrid and its Columns property.


TDBGridColumns.LoadFromFile
 VCL Reference

TDBGridColumns.LoadFromFile

TDBGridColumns	See also

Reads the file specified in FileName and loads the data into the TDBGridColumns object.

procedure LoadFromFile(const Filename: string);

Description

Use the LoadFromFile method to retrieve grid columns data from a file and load into a TDBGridColumns object. The file must be created by calling the SaveToFile method of a TDBGridColumns object.


TDBGridColumns.LoadFromStream
 VCL Reference

TDBGridColumns.LoadFromStream

TDBGridColumns	See also

Reads grid columns data from a stream and stores the contents in the TDBGridColumns object.

procedure LoadFromStream(S: TStream);

Description

Use the LoadFromStream method to read Stream and store the contents in the TDBGridColumns object. The stream should contain data previously saved using the SaveToStream method.


TDBGridColumns.RebuildColumns
 VCL Reference

TDBGridColumns.RebuildColumns

TDBGridColumns

Deletes existing columns and generates new columns from the dataset associated with the grid.

procedure RebuildColumns;

Description

RebuildColumns initializes the TDBGridColumns object by deleting all existing columns, then creating new ones from the grid’s associated dataset. If the grid is not connected to a dataset, RebuildColumns simply deletes any existing columns.


TDBGridColumns.RestoreDefaults
 VCL Reference

TDBGridColumns.RestoreDefaults

TDBGridColumns	See also

Restores all columns to their default settings.

procedure RestoreDefaults;

Description

RestoreDefaults iterates through the Items array, calling the RestoreDefaults method for each TColumn object. This method removes all changes made to properties of the TColumn objects and restores the default settings.


TDBGridColumns.SaveToFile
 VCL Reference

TDBGridColumns.SaveToFile

TDBGridColumns	See also

Saves the TDBGridColumns object to the file specified in FileName.

procedure SaveToFile(const Filename: String);

Description

Use the SaveToFile method to store TDBGridColumns data to a file.


TDBGridColumns.SaveToStream
 VCL Reference

TDBGridColumns.SaveToStream

TDBGridColumns	See also

Writes a stream with the name passed in Stream with the contents of the TDBGridColumns object.

procedure SaveToStream(S: TStream);

Description

Use the SaveToStream method to stream out TDBGridColumns data.


Hierarchy

TObject

TPersistent

TCollection

TDBGridColumns


TDBGrid
 VCL Reference

 TDBGrid

Hierarchy	Properties	Methods	Events 	Using TDBGrid	See also

TDBGrid displays and manipulates records from a dataset in a tabular grid.

Unit

DBGrids

Description

Put a TDBGrid object on a form to display and edit the records from a database table or query. Applications can use the data grid to insert, delete, or edit data in the database, or simply to display it.

At runtime, users can use the database navigator (TDBNavigator) to move through data in the grid, and to insert, delete, and edit the data. Edits that are made in the data grid are not posted to the underlying dataset until the user moves to a different record or closes the application.

TDBGrid implements the generic behavior introduced in TCustomDBGrid. TDBGrid publishes many of the properties inherited from TCustomDBGrid, but does not introduce any new behavior.


 VCL Reference

TDBGrid properties

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

Columns

DataSource

DefaultDrawing

FieldCount

Fields

Options

ReadOnly

SelectedField

SelectedIndex

SelectedRows

TitleFont

Derived from TCustomGrid

BorderStyle

EditorMode

FixedColor

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBGrid properties

TDBGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataSource

DefaultDrawing

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditorMode

Enabled

FieldCount

Fields

FixedColor

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

Left

LRDockWidth

Name

Options

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

SelectedField

SelectedIndex

SelectedRows

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TitleFont

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TDBGrid events

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnTitleClick

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBGrid events

TDBGrid	By object	Legend

OnCellClick

OnColEnter

OnColExit

OnColumnMoved

OnDblClick

OnDragDrop

OnDragOver

OnDrawColumnCell

OnDrawDataCell

OnEditButtonClick

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag

OnTitleClick


 VCL Reference

TDBGrid methods

TDBGrid	Alphabetically	Legend

Derived from TCustomDBGrid

Create

DefaultDrawColumnCell

DefaultDrawDataCell

DefaultHandler

Destroy

ExecuteAction

ShowPopupEditor

UpdateAction

ValidFieldIndex

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBGrid methods

TDBGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultDrawColumnCell

DefaultDrawDataCell

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

ShowPopupEditor

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidFieldIndex


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDBGrid

TDBGrid


TDBImage
 VCL Reference

 TDBImage

Hierarchy	Properties	Methods	Events 	Using TDBImage	See also

TDBImage represents a graphic image from a BLOB (binary large object) field of the current record of a dataset.

Unit

DBCtrls

Description

Use TDBImage to represent the value of graphic fields. TDBImage allows a form to display graphical data from a dataset. TDBImage can allow the user to edit graphical data using the clipboard. While the application is running and the database image control has focus, users can cut, copy, and paste using the standard Windows accelerator keys (Ctrl+X, Ctrl+C, and Ctrl+V). Users can return to the original state of the database image control by pressing Esc before moving to another record.

If the application doesn’t require the data-aware capabilities of TDBImage, use an image control (TImage) instead to conserve system resources.


 VCL Reference

TDBImage properties

TDBImage	Alphabetically	Legend

In TDBImage

AutoDisplay

BorderStyle

Center

DataField

DataSource

Field

Picture

QuickDraw

ReadOnly

Stretch

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBImage properties

TDBImage	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoDisplay

BiDiMode

BorderStyle

BoundsRect

Brush

Center

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentFont

ParentCtl3D

ParentShowHint

ParentWindow

Picture

PopupMenu

QuickDraw

ReadOnly

ShowHint

Showing

Stretch

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBImage.AutoDisplay
 VCL Reference

TDBImage.AutoDisplay

TDBImage	See also

Determines whether to automatically display the contents of a graphic BLOB in the database image control.

property AutoDisplay: Boolean;

Description

If AutoDisplay is True (the default value), the image automatically displays new data when the underlying BLOB field changes (such as when moving to a new record).

If AutoDisplay is False, the image clears whenever the underlying BLOB field changes. To display the data, the user can double-click on the control or select it and press Enter. In addition, calling the LoadPicture method ensures that the control is showing data.

Change the value of AutoDisplay to False if the automatic loading of BLOB fields seems to take too long.


TDBImage.BorderStyle
 VCL Reference

TDBImage.BorderStyle

TDBImage	See also

Determines whether the database image control has a border.

property BorderStyle: TBorderStyle;

Description

Set BorderStyle to specify whether a single line border should be drawn around the database image control.


TDBImage.Center
 VCL Reference

TDBImage.Center

TDBImage	See also

Determines whether the image is centered in the image control.

property Center: Boolean;

Description

When the image does not fit perfectly within the image control, use Center to position the image. When Center is True, the image is centered in the control. When Center is False, the upper left corner of the image is positioned at the upper left corner of the control.

Note:	Center has no effect if the Stretch property is True.


TDBImage.DataField
 VCL Reference

TDBImage.DataField

TDBImage	See also

Specifies the field from which the database image displays data.

property DataField: String;

Description

Use DataField to bind the image control to a field in the dataset. To fully specify a database field, both the dataset and the field within that dataset must be defined. The DataSource property of the image control specifies the dataset which contains the DataField. DataField should specify a graphic field.

DBImage1.DataField := 'Portrait';


TDBImage.DataSource
 VCL Reference

TDBImage.DataSource

TDBImage	See also

Links the image control to a dataset.

property DataSource: TDataSource;

Description

Use DataSource to link the image control to a dataset in which the data can be found. To fully specify a database field for the image control, both the dataset and a field within that dataset must be defined. Use the DataField property to specify the particular field within the dataset.

DBImage1.DataSource := DataSource1;


TDBImage.Field
 VCL Reference

TDBImage.Field

TDBImage	See also

Specifies the TField component the database image is linked to.

property Field: TField;

Description

Read Field to get direct access to the contents and properties of the database field without going through the image control’s window. Use Field to change the contents of the database field programmatically. Use the Picture property to set the value of the field and display it in the image control’s window.

(DBEdit1.Field as TBlobField).Assign(Image1.Picture.Bitmap);


TDBImage.Picture
 VCL Reference

TDBImage.Picture

TDBImage	See also

Represents the image that appears on the database image control.

property Picture: TPicture;

Description

Read Picture to obtain the TPicture object that represents the value of the field. Set Picture to programmatically change the value of the graphic field. The property value is a TPicture object which can contain an icon, metafile, bitmap, or other graphic object.

Image1.Picture.Assign(DBImage1.Picture);


TDBImage.QuickDraw
 VCL Reference

TDBImage.QuickDraw

TDBImage	See also

Specifies whether the image is displayed using a palette.

property QuickDraw: Boolean;

Description

Set QuickDraw to specify whether a customized palette should be used when displaying field values. If False, a palette is used, to provide the best possible image quality at the expense of additional processing time. If True, no special palette is used, which is faster, but results in poorer picture quality, especially with 256-color images on a 256-color video driver.


TDBImage.ReadOnly
 VCL Reference

TDBImage.ReadOnly

TDBImage	See also

Determines whether the user can change the contents of the field using the image control.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent the user from changing the contents of the database field. When ReadOnly is True, the image control is used only to display the contents of the field. If ReadOnly is False, the user can change the field's value as long as the dataset is in edit mode.


TDBImage.Stretch
 VCL Reference

TDBImage.Stretch

TDBImage	See also

Determines whether bitmaps and metafiles assume the size and shape of the database image.

property Stretch: Boolean;

Description

Set Stretch to True to cause the picture to assume the size and shape of the image control. When the image control resizes, the picture resizes also. Stretch resizes the height and width of the image independently. Thus, unlike a simple change in magnification, stretch can distort the image if the image control is not the same shape as the image.


 VCL Reference

TDBImage events

TDBImage	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBImage events

TDBImage	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBImage methods

TDBImage	Alphabetically	Legend

In TDBImage

CopyToClipboard

Create

CutToClipboard

Destroy

ExecuteAction

LoadPicture

PasteFromClipboard

UpdateAction

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

MouseWheelHandler

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBImage methods

TDBImage	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

LoadPicture

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBImage.CopyToClipboard
 VCL Reference

TDBImage.CopyToClipboard

TDBImage	See also

Copies the picture in the image control to the Clipboard.

procedure CopyToClipboard;

Description

Use CopyToClipboard to put a copy of the graphic specified by the Picture property in the Clipboard.


TDBImage.Create
 VCL Reference

TDBImage.Create

TDBImage	See also

Creates and initializes an instance of TDBImage.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBImage object at runtime. For TDBImage objects placed on forms or data modules at design time, the constructor is called automatically.

Pass a single Component as a parameter to provide the TDBLookupComboBox object with an Owner that is responsible for freeing it.


TDBImage.CutToClipboard
 VCL Reference

TDBImage.CutToClipboard

TDBImage	See also

Deletes the image in the control and copies it to the Clipboard.

procedure CutToClipboard;

Description

Use the CutToClipboard method to delete the image in the control when copying it to the Clipboard. CutToClipboard gives the associated field a null value.


TDBImage.Destroy
 VCL Reference

TDBImage.Destroy

TDBImage	See also

Destroys an instance of TDBImage.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBImage reference is not nil and only then calls Destroy.


TDBImage.ExecuteAction
 VCL Reference

TDBImage.ExecuteAction

TDBImage	See also

Responds to actions that execute with the TDBImage as target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBImage as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBImage could not handle the action.


TDBImage.LoadPicture
 VCL Reference

TDBImage.LoadPicture

TDBImage	See also

Loads the image stored in the field into the database image control.

procedure LoadPicture;

Description

If the value of the AutoDisplay property is False, the image of a database image control is not automatically loaded. If AutoDisplay is False, control when the image is loaded at runtime by calling LoadPicture when the image should appear in the control.


TDBImage.PasteFromClipboard
 VCL Reference

TDBImage.PasteFromClipboard

TDBImage	See also

Copies the contents of the Clipboard to the control.

procedure PasteFromClipboard;

Description

Use PasteFromClipboard to set the field value to an image stored in the Clipboard.


TDBImage.UpdateAction
 VCL Reference

TDBImage.UpdateAction

TDBImage	See also

Updates an action to reflect the current state of the TDBImage.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBImage an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBImage they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TDBImage


TDBListBox
 VCL Reference

 TDBListBox

Hierarchy	Properties	Methods	Events 	Using TDBListBox	See also

TDBListBox represents a data-aware list box that allows users to change field values by selecting an item from a list.

Unit

DBCtrls

Description

Use TDBListBox to add a list box to a form that permits users to change the value of a field on the current record to one of a fixed set of choices.

If the application doesn’t require the data-aware capabilities of TDBListBox, use a list box (TListBox) instead to conserve system resources.

Component writers wanting to create a customized list box objects should use TCustomListBox as a base class.


 VCL Reference

TDBListBox properties

TDBListBox	Alphabetically	Legend

In TDBListBox

DataField

DataSource

Field

Items

ReadOnly

Derived from TCustomListBox

AutoComplete

BorderStyle

Canvas

Count

IntegralHeight

ItemHeight

ItemIndex

MultiSelect

ScrollWidth

SelCount

Selected

Style

TopIndex

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBListBox properties

TDBListBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IntegralHeight

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ScrollWidth

SelCount

Selected

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBListBox.DataField
 VCL Reference

TDBListBox.DataField

TDBListBox	See also

Identifies the field whose value is displayed by the listbox.

property DataField: String;

Description

Set DataField to specify which field is represented by the listbox. The listbox displays the current value of this field, and lets the user set its value on the current record. The dataset in which the field is located is specified by the DataSource property.

Set DataField to specify which field is represented by the listbox. (Note that this is does not refer to the source of the list, but to the field into which the selected value is inserted. The list values must be supplied manually using the Items property.) The listbox displays the current value of this field as the selected (highlighted) item, and allows the user to set the value of this field on the current record by selecting a value from the list. The dataset the field is located in is specified by the DataSource property.

DBListBox1.DataField := 'CountryName';

Tip:	For a data-aware listbox component for which the list values are automatically supplied, use a TDBLookupListBox instead.


TDBListBox.DataSource
 VCL Reference

TDBListBox.DataSource

TDBListBox	See also

Links the listbox to a dataset.

property DataSource: TDataSource;

Description

Specify the data source component that identifies the dataset the data is found in. To allow the listbox to represent the data for a field, both the DataSource and the DataField properties must be set.

Specify the data source component that identifies the dataset in which the target field is found. To allow the listbox to represent the data for a field, both the DataSource and the DataField properties must be set.

DBListBox1.DataSource := DataSource1;


TDBListBox.Field
 VCL Reference

TDBListBox.Field

TDBListBox	See also

Identifies the TField object the listbox is linked to.

property Field: TField;

Description

Use the Field object when you want to change the value of the data in the field programmatically.

DBListBox1.Field.AsString := 'Lithuania';


TDBListBox.Items
 VCL Reference

TDBListBox.Items

TDBListBox	See also

Contains the strings that appear in the list box.

property Items;

Description

Use Items to specify the values the user can choose from. Because Items is an object of type TStrings, you can add, delete, insert, and move items using the Add, Delete, Insert, Exchange, and Move methods of the TStrings object. For example, to add each string to the listbox, write a line of code such as the following:

while not Table2.Eof do begin

  DBListBox1.Items.Add(Table2.FieldByName('Country').AsString);

  Table2.Next;

end;

The ItemIndex property determines which item is selected, if any.


TDBListBox.ReadOnly
 VCL Reference

TDBListBox.ReadOnly

TDBListBox	See also

Determines if the user can change the field value using the listbox.

property ReadOnly: Boolean;

Description

Set ReadOnly to specify whether the listbox should be used for display purposes only. If ReadOnly is True, the listbox can only be used to display the value of the field on the current record. If ReadOnly is False, the user can use the listbox to change the field’s value to one of the values in the Items list.


 VCL Reference

TDBListBox events

TDBListBox	Alphabetically	Legend

Derived from TCustomListBox

OnDrawItem

OnMeasureItem

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBListBox events

TDBListBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBListBox methods

TDBListBox	Alphabetically	Legend

In TDBListBox

Create

Destroy

ExecuteAction

UpdateAction

UseRightToLeftAlignment

Derived from TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

ItemAtPos

ItemRect

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBListBox methods

TDBListBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBListBox.Create
 VCL Reference

TDBListBox.Create

TDBListBox	See also

Creates and initializes an instance of TDBListBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBListBox object at runtime. For TDBListBox objects placed on forms or data modules at design time, Create is called automatically.

Pass a single Component as a parameter to provide the TDBListBox with an Owner that is responsible for freeing it.

After calling the inherited constructor to allocate and initialize a generic list box object, Create creates and initializes the helper objects needed to link to a dataset.


TDBListBox.Destroy
 VCL Reference

TDBListBox.Destroy

TDBListBox	See also

Destroys an instance of TDBListBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBListBox reference is not nil and only then calls Destroy.

Destroy frees the helper objects of the TDBListBox before calling the inherited destructor.


TDBListBox.ExecuteAction
 VCL Reference

TDBListBox.::ExecuteAction

TDBListBox	See also

Invokes an action with the TDBListBox as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBListBox as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBListBox could not handle the action.


TDBListBox.UpdateAction
 VCL Reference

TDBListBox.UpdateAction

TDBListBox	See also

Updates an action to reflect the current state of the TDBListBox.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBListBox an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBListBox they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBListBox.UseRightToLeftAlignment
 VCL Reference

TDBListBox.UseRightToLeftAlignment

TDBListBox	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBListBox’s alignment is in a right-to-left mode. This information can be used when painting the TDBListBox data or when responding to mouse events.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomListBox

TDBListBox


TDBLookupComboBox
 VCL Reference

 TDBLookupComboBox

Hierarchy	Properties	Methods	Events 	Using TDBLookupComboBox	See also

TDBLookupComboBox represents a combo box that identifies a set of field values in one dataset with a corresponding set of values from another dataset.

Unit

DBCtrls

Description

Use TDBLookupComboBox to provide the user with a convenient drop-down list of lookup items for filling in fields that require data from another dataset.

If TDBLookupComboBox is linked to a lookup field component, it automatically reads the relationship between the field value and the lookup values in the lookup dataset from the field component. The relationship between field values and the corresponding values in the lookup dataset can also be explicitly set using the properties of the lookup combo box when the combo box is not linked to a lookup field component.


 VCL Reference

TDBLookupComboBox properties

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

DropDownAlign

DropDownRows

DropDownWidth

ListVisible

Text

Derived from TDBLookupControl

DataField

DataSource

Field

KeyField

KeyValue

ListField

ListFieldIndex

ListSource

NullValueKey

ReadOnly

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBLookupComboBox properties

TDBLookupComboBox	By object	Legend

Action

Align

AlignDisabled

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropDownAlign

DropDownRows

DropDownWidth

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

KeyField

KeyValue

Left

ListField

ListFieldIndex

ListSource

ListVisible

LRDockWidth

Name

NullValueKey

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBLookupComboBox.DropDownAlign
 VCL Reference

TDBLookupComboBox.DropDownAlign

TDBLookupComboBox	See also

Specifies how the drop-down list is aligned relative to its edit box.

type TDropDownAlign = (daLeft, daRight, daCenter);

property DropDownAlign: TDropDownAlign;

Description

Use DropDownAlign to specify the position of the drop-down list relative to the edit region of the lookup combo box. The drop down list can be aligned to the left or right, or centered with the edit box.


TDBLookupComboBox.DropDownRows
 VCL Reference

TDBLookupComboBox.DropDownRows

TDBLookupComboBox	See also

Specifies the number of items displayed in the drop-down list of the TDBLookupComboBox.

property DropDownRows: Integer;

Description

Use DropDownRows to specify how many rows appear in the drop down list of the combo box. If there are more lookup items than DropDownRows, the lookup list box displays a scroll bar.

The default value for DropDownRows is 7.


TDBLookupComboBox.DropDownWidth
 VCL Reference

TDBLookupComboBox.DropDownWidth

TDBLookupComboBox	See also

Specifies the width, in pixels, of the drop-down list.

property DropDownWidth: Integer;

Description

Use DropDownWidth to customize the width of the drop-down list. If DropDownWidth is 0 (the default), the drop-down list is the same width as the combo box.

DropDownWidth is useful when displaying multiple lookup fields, and therefore, multiple columns in the database lookup combo box.


TDBLookupComboBox.ListVisible
 VCL Reference

TDBLookupComboBox.ListVisible

TDBLookupComboBox	See also

Specifies whether the lookup list is open or “dropped-down”.

property ListVisible: Boolean;

Description

Read ListVisible to determine whether the list of lookup values is currently in the open (dropped-down) position. If ListVisible is True, the list is open; if ListVisible is False, the list is closed.


TDBLookupComboBox.Text
 VCL Reference

TDBLookupComboBox.Text

TDBLookupComboBox	See also

Indicates the lookup value that corresponds to the value of the field on the current record.

property Text: String;

Description

Inspect Text to determine the currently selected lookup value. Text is the value that appears in the edit region of the lookup combo box. The user can change the value of Text by entering a new value if ReadOnly is False and the dataset is in edit mode.


 VCL Reference

TDBLookupComboBox events

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

OnCloseUp

OnDropDown

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBLookupComboBox events

TDBLookupComboBox	By object	Legend

OnClick

OnCloseUp

OnContextPopup

OnDragDrop

OnDragOver

OnDropDown

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


TDBLookupComboBox.OnCloseUp
 VCL Reference

TDBLookupComboBox.OnCloseUp

TDBLookupComboBox	See also

Occurs immediately after an opened or “dropped-down” list is closed.

property OnCloseUp: TNotifyEvent;

Description

Write an OnCloseUp event handler to respond when the combo box list is closed. When the list is closed, the value that corresponds to the selected lookup value is assigned to the field. The list can be closed by the user or by calling the CloseUp method.

procedure TForm1.DBLookupComboBox1CloseUp(Sender: TObject);

begin

  StatusBar1.SimpleText := DBLookupComboBox1.Text;

end;


TDBLookupComboBox.OnDropDown
 VCL Reference

TDBLookupComboBox.OnDropDown

TDBLookupComboBox	See also

Occurs immediately before the lookup list is opened.

property OnDropDown: TNotifyEvent;

Description

Write an OnDropDown event handler to take specific action before the lookup list is displayed to the user. The list can be opened by the user or by calling the DropDown method.

procedure TForm1.DBLookupComboBox1DropDown(Sender: TObject);

begin

  StatusBar1.SimpleText := '';

end;


 VCL Reference

TDBLookupComboBox methods

TDBLookupComboBox	Alphabetically	Legend

In TDBLookupComboBox

CloseUp

Create

DropDown

ExecuteAction

UpdateAction

UseRightToLeftAlignment

Derived from TDBLookupControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBLookupComboBox methods

TDBLookupComboBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseUp

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

DropDown

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBLookupComboBox.CloseUp
 VCL Reference

TDBLookupComboBox.CloseUp

TDBLookupComboBox	See also

Closes an opened or “dropped-down” list.

procedure CloseUp(Accept: Boolean);

Description

Call CloseUp to programmatically close the list of the lookup combo box. The Accept parameter determines whether to modify the field value with the value that corresponds to the selected value in the lookup list.

DBLookupComboBox1.CloseUp(True);


TDBLookupComboBox.Create
 VCL Reference

TDBLookupComboBox.Create

TDBLookupComboBox	See also

Creates and initializes an instance of TDBLookupComboBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a lookup combo box at runtime. TDBLookupComboBox objects placed on forms at design time are created automatically.

Pass a single Component as a parameter to provide the TDBLookupComboBox object with an Owner that is responsible for freeing it.

After calling the inherited constructor to allocate and initialize a generic list box object, Create creates and initializes various helper objects .


TDBLookupComboBox.DropDown
 VCL Reference

TDBLookupComboBox.DropDown

TDBLookupComboBox	See also

Opens or “drops down” the lookup list so that the user can choose a lookup value.

procedure DropDown;

Description

Call DropDown to programmatically open the lookup list. Before the list is displayed, an OnDropDown event is generated.


TDBLookupComboBox.ExecuteAction
 VCL Reference

TDBLookupComboBox.ExecuteAction

TDBLookupComboBox	See also

Invokes an action with the TDBLookupComboBox as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBLookupComboBox as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBLookupComboBox could not handle the action.


TDBLookupComboBox.UpdateAction
 VCL Reference

TDBLookupComboBox.UpdateAction

TDBLookupComboBox	See also

Updates an action to reflect the current state of the TDBLookupComboBox.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBLookupComboBox an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBLookupComboBox they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBLookupComboBox.UseRightToLeftAlignment
 VCL Reference

TDBLookupComboBox.::UseRightToLeftAlignment

TDBLookupComboBox	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBLookupComboBox’s alignment is in a right-to-left mode. This information can be used when painting the TDBLookupComboBox data or when responding to mouse events.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TDBLookupControl

TDBLookupComboBox


TDBLookupControl
 VCL Reference

TDBLookupControl

Hierarchy	Properties	Methods	See also

TDBLookupControl is the base class for controls that provide the user with a list of lookup items for filling in fields that require data from another dataset.

Unit

DBCtrls

Description

Use TDBLookupControl as a base class when defining controls that permit the user to set a field value by selecting a corresponding value from another dataset. The TDBLookupComboBox and TDBLookupListBox controls are both descended from the TDBLookupControl and provide the user with automatic lookup capabilities that are implemented in the TDBLookupControl object.

Do not create instances of TDBLookupControl. Instead, instantiate a descendant of TDBLookupControl to allow the user to set field values from a set of lookup values.


 VCL Reference

TDBLookupControl properties

TDBLookupControl	Alphabetically	Legend

In TDBLookupControl

DataField

DataLink

DataSource

Field

HasFocus

KeyField

KeyValue

ListActive

ListField

ListFieldIndex

ListFields

ListLink

ListSource

NullValueKey

ReadOnly

SearchText

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBLookupControl properties

TDBLookupControl	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataField

DataLink

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Field

Floating

FloatingDockSiteClass

Handle

HasFocus

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

KeyField

KeyValue

Left

ListActive

ListField

ListFieldIndex

ListFields

ListLink

ListSource

LRDockWidth

Name

NullValueKey

Owner

Parent

ParentWindow

ReadOnly

SearchText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBLookupControl.DataField
 VCL Reference

TDBLookupControl.DataField

TDBLookupControl	See also

Identifies the field whose value is represented by the lookup control.

property DataField: String;

Description

Use DataField to bind the lookup control to a field in the dataset specified by the DataSource property. The DataField is the field whose value can be set by the lookup control, not the field which supplies the lookup values that are displayed by the lookup control.

If DataField specifies a lookup field component, there is no need to set the KeyField or ListField properties, as the field component contains all the information about the relationship between the data field value and the lookup value.


TDBLookupControl.DataLink
 VCL Reference

TDBLookupControl.DataLink

TDBLookupControl	See also

Helps the lookup control manage its link to the data source and respond to data events.

property DataLink: TDataSourceLink;

Description

DataLink is used internally to access the TDataSourceLink that coordinates communication between the dataset in which you find the field that this control represents, the data source for that dataset (identified by the DataSource property), and the lookup control.


TDBLookupControl.DataSource
 VCL Reference

TDBLookupControl.DataSource

TDBLookupControl	See also

Links the lookup control to the dataset that contains the DataField.

property DataSource: TDataSource;

Description

Use DataSource to specify the data source component that identifies the dataset the lookup control represents. The lookup control represents a field in one table by displaying the value of a corresponding field in another table. DataSource links to the dataset for the field the control represents, as opposed to the ListSource, which links the lookup control to the lookup table that holds the field that is actually displayed. If the lookup control is used to edit data, the field that actually gets changed is the one in the DataSource.


TDBLookupControl.Field
 VCL Reference

TDBLookupControl.Field

TDBLookupControl	See also

Identifies the TField object the lookup control represents.

property Field: TField;

Description

Use the Field object to directly access the field component for the field the lookup control represents. If Field is a lookup field, the properties of the field component describe the relationship between the field and the lookup dataset. To allow a lookup control to represent a set of lookup values that do not come from another dataset, use the DataField property to bind to a lookup field and use the LookupList property of the TField object to specify a list of lookup values.


TDBLookupControl.HasFocus
 VCL Reference

TDBLookupControl.HasFocus

TDBLookupControl	See also

Indicates whether the lookup control has input focus.

property HasFocus: Boolean;

Description

HasFocus is used internally to determine whether the lookup control has input focus. Applications should use the public Focused method instead.


TDBLookupControl.KeyField
 VCL Reference

TDBLookupControl.KeyField

TDBLookupControl	See also

Identifies the field in the ListSource dataset that must match the value of the DataField field.

property KeyField: String;

Description

Use KeyField to link the ListSource of the lookup control to the DataSource. Although the name of the field specified as the KeyField does not have to be the same as the name of the field specified as the DataField, the two fields must have the same values.

After specifying the ListField, choose which field the lookup control will actually display with the ListField property.

If the DataField field is a lookup field, don't specify anything for KeyField or ListField; lookup controls automatically use the data field's LookupKeyFields property for KeyField.


TDBLookupControl.KeyValue
 VCL Reference

TDBLookupControl.KeyValue

TDBLookupControl	See also

Represents the common value of the KeyField field and the DataField field.

property KeyValue: Variant;

Description

Use KeyField to determine the value represented by the lookup control (not the value displayed by the lookup control). When KeyValue is set, the lookup control attempts to find a record from the ListSource's dataset where the value of KeyField matches KeyValue. If such a match is found, the lookup control displays the value of ListField on that record.


TDBLookupControl.ListActive
 VCL Reference

TDBLookupControl.ListActive

TDBLookupControl	See also

Indicates whether the ListFields property is currently being updated.

property ListActive: Boolean;

Description

ListActive is used internally to prevent the lookup control from attempting to use its data-aware properties while it is in the middle of an update. While refreshing the ListFields cache to reflect the current fields in the dataset, ListActive is False. At all other times, ListActive is True.


TDBLookupControl.ListField
 VCL Reference

TDBLookupControl.ListField

TDBLookupControl	See also

Identifies the field or fields whose values are displayed in the lookup control.

property ListField: String;

Description

The lookup control represents a field in one table by displaying the value of one or more corresponding fields in another table. ListField is the name of the field or fields in the lookup table that are actually displayed, as opposed to the DataField, which is the field in the DataSource that the lookup control actually represents, or the KeyField, which is the field in the lookup table with the same value as the DataField.

To fully specify the list fields, both a dataset for the lookup table and the fields within that dataset must be defined. The ListSource property of the lookup control specifies the dataset for the lookup table.

ListField can represent more than one field. Multiple field names should be separated by semicolons.

Before specifying ListField, specify the link between the two datasets using the KeyField property. If ListField is not set, lookup controls display KeyField field values by default. If the DataField field is a lookup field, don't specify anything for ListField; the data controls automatically use the lookup field's LookupResultField property as ListField.


TDBLookupControl.ListFieldIndex
 VCL Reference

TDBLookupControl.ListFieldIndex

TDBLookupControl	See also

Specifies which field from the ListField property is used for incremental searching.

property ListFieldIndex: Integer;

Description

When the ListField property specifies more than one field, use ListFieldIndex to specify which of those fields is the one to use for incremental searches. For the TDBLookupComboBox object, ListFieldIndex also determines which field appears in the edit region of the combo box.

ListFieldIndex allows the most important value to appear in a position other than the first when all the values of the ListField fields are displayed. The value of ListFieldIndex must be less than the number of fields specified by the ListField property.


TDBLookupControl.ListFields
 VCL Reference

TDBLookupControl.ListFields

TDBLookupControl	See also

Lists the field components whose values are displayed in the lookup control.

property ListFields: TList;

Description

ListFields caches the field components that are named by the ListField property.


TDBLookupControl.ListLink
 VCL Reference

TDBLookupControl.ListLink

TDBLookupControl	See also

Identifies the TListSourceLink object that coordinates data communication with the lookup dataset.

property ListLink: TListSourceLink;

Description

ListLink is used internally to access the TListSourceLink that coordinates communication between the lookup dataset, the lookup data source (identified by the ListSource property), and the lookup control.


TDBLookupControl.ListSource
 VCL Reference

TDBLookupControl.ListSource

TDBLookupControl	See also

Identifies a data source for the data displayed in the lookup control.

property ListSource: TDataSource;

Description

Set LookupSource to the data source that contains the KeyField and ListField fields. If the DataField field is a lookup field, don't specify anything for ListSource; data controls automatically use the lookup field's LookupDataSet property to create a data source.


TDBLookupControl.NullValueKey
 VCL Reference

TDBLookupControl.NullValueKey

TDBLookupControl	See also

Specifies the key combination that assigns a blank value to the associated field.

property NullValueKey: TShortCut;

Description

Set NullValueKey to let users enter a “blank” value into the associated field. When the user types the key combination that this shortcut represents, the associated field is cleared.

Tip:	Use the ShortCut function or the TextToShortCut function to create a value to assign to NullValueKey.


TDBLookupControl.ReadOnly
 VCL Reference

TDBLookupControl.ReadOnly

TDBLookupControl	See also

Determines if the user can use the lookup control to set the value of the DataField field.

property ReadOnly: Boolean;

Description

Use ReadOnly to specify whether the lookup control is used for display purposes only. If ReadOnly is True, the lookup control can only be used to display the lookup values that correspond to the value of the DataField field on the current record. If ReadOnly is False, the user can use the lookup control to change the field’s value.


TDBLookupControl.SearchText
 VCL Reference

TDBLookupControl.SearchText

TDBLookupControl	See also

Specifies the value that the user has typed in so far.

property SearchText: string;

Description

SearchText is used internally to implement incremental searching in the lookup control’s list when the ListField property specifies a string field (or WideString field). Each time the user types a new character, that character is appended to SearchText and the resulting string is used to locate a value in the control’s list that begins with the value of SearchText.


 VCL Reference

TDBLookupControl methods

TDBLookupControl	Alphabetically	Legend

In TDBLookupControl

CanModify

Create

Destroy

ExecuteAction

GetBorderSize

GetTextHeight

KeyValueChanged

ListLinkDataChanged

LocateKey

Notification

ProcessSearchKey

SelectKeyValue

UpdateAction

UpdateDataFields

UpdateListFields

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBLookupControl methods

TDBLookupControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanModify

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetBorderSize

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextHeight

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyValueChanged

ListLinkDataChanged

LocateKey

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

ProcessSearchKey

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectKeyValue

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UpdateDataFields

UpdateListFields

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBLookupControl.Create
 VCL Reference

TDBLookupControl.Create

TDBLookupControl	See also

Creates an instance of TDBLookupControl.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a lookup control at runtime.  For lookup controls placed on forms or data modules at design time, Create is called automatically.


TDBLookupControl.Destroy
 VCL Reference

TDBLookupControl.Destroy

TDBLookupControl	See also

Destroys an instance of TDBLookupControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBLookupControl reference is not nil and only then calls Destroy.


TDBLookupControl.CanModify
 VCL Reference

TDBLookupControl.CanModify

TDBLookupControl	See also

Indicates whether the lookup control has rights to modify data.

function CanModify: Boolean; virtual;

Description

CanModify is used internally to determine whether the lookup control is able to modify the value of the field specified by the DataField property.

CanModify returns True if

The ReadOnly property is False .

The ListActive property is True .

The DataField property refers to a field that can be modified.

Otherwise, CanModify returns False.


TDBLookupControl.ExecuteAction
 VCL Reference

TDBLookupControl.ExecuteAction

TDBLookupControl	See also

Invokes an action with the TDBLookupControl as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBLookupControl as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBLookupControl could not handle the action.


TDBLookupControl.GetBorderSize
 VCL Reference

TDBLookupControl.GetBorderSize

TDBLookupControl	See also

Indicates how many pixels of the control’s height are devoted to the border.

function GetBorderSize: Integer; virtual;

Description

GetBorderSize is used internally to manage the height of the control so that the list does not include partial (clipped) rows. It indicates the number of pixels of the control’s height that are not included in the client height.


TDBLookupControl.GetTextHeight
 VCL Reference

TDBLookupControl.GetTextHeight

TDBLookupControl	See also

Indicates how many pixels are required for one line of text in the list.

function GetTextHeight: Integer; virtual;

Description

GetTextHeight is used internally to manage the height of the control so that the list does not include partial (clipped) rows. It indicates the number of pixels required for a single row of text in the list.


TDBLookupControl.KeyValueChanged
 VCL Reference

TDBLookupControl.KeyValueChanged

TDBLookupControl	See also

Updates the control when the value of the protected KeyValue property changes.

procedure KeyValueChanged: virtual;

Description

KeyValueChanged is called automatically when the value of the KeyValue property changes. It allows the lookup control to make any necessary adjustments to display the new value in the list.

As implemented in TDBLookupControl, KeyValueChanged does nothing. Descendant classes override this method to update the display properties of the control to reflect the new value.


TDBLookupControl.ListLinkDataChanged
 VCL Reference

TDBLookupControl.ListLinkDataChanged

TDBLookupControl	See also

Updates the control when its data binding changes.

procedure ListLinkDataChanged: virtual;

Description

ListLinkDataChanged is called automatically when the data displayed in the lookup list changes for any reason.

As implemented in TDBLookupControl, ListLinkDataChanged does nothing. Descendant classes override this method to update any internal properties that depend on the current list.


TDBLookupControl.LocateKey
 VCL Reference

TDBLookupControl.LocateKey

TDBLookupControl	See also

Locates the value specified by KeyValue in the lookup dataset.

function LocateKey: Boolean virtual;

Description

LocateKey is used internally to look up key values in the lookup dataset so that the control can find the appropriate display values.

LocateKey calls the lookup dataset’s Locate method, passing in the current values of KeyField and KeyValue. If the key value is found, LocateKey positions the lookup dataset on the record with the matching value and returns True. Otherwise, it returns False.


TDBLookupControl.Notification
 VCL Reference

TDBLookupControl.Notification

TDBLookupControl	See also

Responds to notifications that components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the notification indicates the removal of DataSource or ListSource. If so, Notification sets the property to nil.

Derived classes can override Notification method to handle additional notifications, but the inherited method should be always be called.


TDBLookupControl.ProcessSearchKey
 VCL Reference

TDBLookupControl.ProcessSearchKey

TDBLookupControl	See also

Adds a character to the protected SearchText property and updates the selection to the first matching list value.

procedure ProcessSearchKey(Key: Char); virtual;

Description

ProcessSearchKey is called automatically when the user types a key into the lookup control. It forms the basis of the control’s incremental searching, updating the list to the string that begins with the characters typed in thus far.


TDBLookupControl.SelectKeyValue
 VCL Reference

TDBLookupControl.SelectKeyValue

TDBLookupControl	See also

Updates the value of the control so that it reflects a new key field value.

procedure SelectKeyValue(const Value: Variant); virtual;

Description

SelectKeyValue is used internally to set the value of the control to reflect the specified value on its KeyField.

Value is the new value for the KeyValue property.


TDBLookupControl.UpdateAction
 VCL Reference

TDBLookupControl.UpdateAction

TDBLookupControl	See also

Updates an action to reflect the current state of the TDBLookupControl.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBLookupControl an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBLookupControl they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBLookupControl.UpdateDataFields
 VCL Reference

TDBLookupControl.UpdateDataFields

TDBLookupControl	See also

Updates the control when the DataField property changes.

procedure UpdateDataFields; virtual;

Description

UpdateDataFields is called automatically when the DataField property changes. It updates the internal properties that keep track of the field that the lookup control represents.


TDBLookupControl.UpdateListFields
 VCL Reference

TDBLookupControl.UpdateListFields

TDBLookupControl	See also

Updates the control when the list of lookup values changes.

procedure UpdateListFields; virtual;

Description

UpdateListFields is called automatically when the list of lookup values changes. It synchronizes all the properties of the control so that they reflect the new list of values.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TDBLookupControl


TDBLookupListBox
 VCL Reference

 TDBLookupListBox

Hierarchy	Properties	Methods	Events 	Using TDBLookupListBox	See also

TDBLookupListBox provides a list of lookup items for filling in fields that require data from another dataset.

Unit

DBCtrls

Description

Use TDBLookupListBox to provide users with a convenient list of lookup items to set a field value using the values of a field in another dataset. Lookup list boxes usually display values that are a represent a more meaningful description of the actual field value.

If TDBLookupListBox is linked to a lookup field component, it automatically reads the relationship between the field value and the lookup values in the lookup dataset from the field component. The relationship between field values and the corresponding values in the lookup dataset can also be explicitly set using the properties of the lookup list box when the list box is not linked to a lookup field component.


 VCL Reference

TDBLookupListBox properties

TDBLookupListBox	Alphabetically	Legend

In TDBLookupListBox

BorderStyle

RowCount

SelectedItem

Derived from TDBLookupControl

DataField

DataSource

Field

KeyField

KeyValue

ListField

ListFieldIndex

ListSource

NullValueKey

ReadOnly

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBLookupListBox properties

TDBLookupListBox	By object	Legend

Action

Align

AlignDisabled

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

KeyField

KeyValue

Left

ListField

ListFieldIndex

ListSource

LRDockWidth

Name

NullValueKey

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

RowCount

SelectedItem

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBLookupListBox.BorderStyle
 VCL Reference

TDBLookupListBox.BorderStyle

TDBLookupListBox	See also

Determines whether the lookup list box has a border.

property BorderStyle: TBorderStyle;

Description

Set BorderStyle to specify whether a border should be drawn around the lookup list box. These are the possible values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border


TDBLookupListBox.RowCount
 VCL Reference

TDBLookupListBox.RowCount

TDBLookupListBox	See also

Specifies how many rows are visible in the list box.

property RowCount: Integer;

Description

Set RowCount to the number of rows displayed in the lookup list box. The list box is resized to match the specified number of rows. Resizing the list box (such as by changing its Height property) automatically changes the value of RowCount to match the new height.


TDBLookupListBox.SelectedItem
 VCL Reference

TDBLookupListBox.SelectedItem

TDBLookupListBox	See also

Contains the value displayed in the list box that is currently selected.

property SelectedItem: String;

Description

Read SelectedItem to determine the value the user selected using the lookup list box. If no item is selected, SelectedItem is an empty string.

StrVar := DBLookupListBox1.SelectedItem;


 VCL Reference

TDBLookupListBox events

TDBLookupListBox	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBLookupListBox events

TDBLookupListBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBLookupListBox methods

TDBLookupListBox	Alphabetically	Legend

In TDBLookupListBox

Create

ExecuteAction

UpdateAction

Derived from TDBLookupControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBLookupListBox methods

TDBLookupListBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBLookupListBox.Create
 VCL Reference

TDBLookupListBox.Create

TDBLookupListBox	See also

Creates an instance of TDBLookupListBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBLookupListBox object at runtime. For TDBLookupListBox objects placed on forms or data modules at design time, Create is called automatically.

Pass a single Component as a parameter to provide the TDBLookupListBox object with an Owner that is responsible for freeing it.After calling the inherited constructor to allocate and initialize a generic lookup control, Create creates and initializes the helper objects needed to link to a dataset.


TDBLookupListBox.ExecuteAction
 VCL Reference

TDBLookupListBox.ExecuteAction

TDBLookupListBox	See also

Performs an action directed at the DB lookup list box.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the DB lookup list box as a target. The Action parameter specifies the action component that was invoked.

ExecuteAction first calls the inherited method, which checks whether the action component knows how to perform its function with the DB lookup list box as a target. If the action does not handle the invocation with the list box as a target, ExecuteAction checks whether this is an action that takes a dataset as a target. If so, ExecuteAction invokes the action, using the dataset associated with the DataSource property as a target.


TDBLookupListBox.UpdateAction
 VCL Reference

TDBLookupListBox.UpdateAction

TDBLookupListBox	See also

Updates an action component to reflect the current state of the DB lookup list box.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the CPU is idle to allow the DB lookup list box the opportunity of updating an action. For example, UpdateAction disables actions that require the dataset to be active when the dataset associated with the DataSource property is not active.

The Action parameter specifies the action component that should be updated.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWintControl

TCustomControl

TDBLookupControl

TDBLookupListBox


TLoginDialog
 VCL Reference

TLoginDialog

Hierarchy	Properties	Methods	Events	See also

TLoginDialog is a login dialog box that can be used to provide login security in an application.

Unit

DBLogDlg

Description

Use TLoginDialog to provide login security within an application. Usually a TLoginDialog object is created with the LoginDialogEx or RemoteLoginDialog function and is used to provide secure access to local database tables. However, TLoginDialog can also be used as a base object for other types of login dialog boxes.


 VCL Reference

TLoginDialog properties

TLoginDialog	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

AlphaBlend

AlphaBlendValue

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DefaultMonitor

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

ObjectMenuItem

OldCreateOrder

OleFormObject

Parent

ParentBiDiMode

PixelsPerInch

Position

PrintScale

Scaled

TileMode

TransparentColor

TransparentColorValue

Visible

WindowMenu

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DragKind

DragMode

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TLoginDialog properties

TLoginDialog	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

Align

AlignDisabled

AlphaBlend

AlphaBlendValue

Anchors

AutoScroll

AutoSize

BiDiMode

BorderIcons

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultMonitor

Designer

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

DragKind

DragMode

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Icon

KeyPreview

Left

LRDockWidth

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

Name

ObjectMenuItem

OldCreateOrder

OleFormObject

Owner

Parent

ParentBiDiMode

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

Position

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TileMode

Top

TransparentColor

TransparentColorValue

UndockHeight

UndockWidth

UseDockManager

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowMenu

WindowProc

WindowState


 VCL Reference

TLoginDialog events

TLoginDialog	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnPaint

OnShortCut

OnShow

Derived from TWinControl

OnDockDrop

OnDockOver

OnGetSiteInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock


 VCL Reference

TLoginDialog events

TLoginDialog	By object	Legend

OnActivate

OnCanResize

OnClick

OnClose

OnCloseQuery

OnConstrainedResize

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnGetSiteInfo

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShortCut

OnShow

OnStartDock

OnUnDock


 VCL Reference

TLoginDialog methods

TLoginDialog	Alphabetically	Legend

In TLoginDialog

FormShow

Derived from TForm

ArrangeIcons

Cascade

Next

Previous

Tile

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLoginDialog methods

TLoginDialog	By object	Legend

AfterConstruction

ArrangeIcons

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

FormShow

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Next

PaintTo

ParentToClient

Perform

Previous

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Tile

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TLoginDialog.FormShow
 VCL Reference

TLoginDialog.FormShow

TLoginDialog

Adjusts the contents of the login dialog when it becomes visible.

procedure FormShow(Sender: TObject);

Description

FormShow is called automatically just before the login dialog becomes visible. It fixes up the controls in the login dialog so that the text appears properly formatted.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TForm

TLoginDialog


TDBNavigator
 VCL Reference

 TDBNavigator

Hierarchy	Properties	Methods	Events 	Using TDBNavigator	See also

TDBNavigator (the database navigator) is used to move through the data in a dataset and perform operations on the data, such as inserting a blank record or posting a record.

Unit

DBCtrls

Description

Use the database navigator on forms that contain data-aware controls, such as TDBGrid or TDBEdit. TDBNavigator lets the user control the dataset when editing or viewing the data.

When the user chooses one of the navigator buttons, the appropriate action occurs on the dataset to which the navigator is linked. For example, if the user clicks the Insert button, a blank record is inserted in the dataset.

TDBNavigator can show any or all of the following buttons:

Button	Purpose

First	Sets the current record to the first record in the dataset, disables the First and Prior buttons, and enables the Next and last buttons if they are disabled.

Prior	Sets the current record to the previous record and enables the Last and Next buttons if they are disabled.

Next	Sets the current record to the next record and enables the First and Prior buttons if they are disabled.

Last	Sets the current record to the last record in the dataset, disables the Last and Next buttons, and enables the First and Prior buttons if they are disabled.

Insert	Inserts a new record before the current record, and sets the dataset into Insert and Edit states.

Delete	Deletes the current record and makes the next record the current record.

Edit	Puts the dataset into Edit state so that the current record can be modified.

Post	Writes changes in the current record to the database.

Cancel	Cancels edits to the current record, restores the record display to its condition prior to editing, and turns off Insert and Edit states if they are active.

Refresh	Refreshes the buffered data in the associated dataset. For TQuery components, this button is disabled unless the RequestLive property isTrue.


 VCL Reference

TDBNavigator properties

TDBNavigator	Alphabetically	Legend

In TDBNavigator

ConfirmDelete

DataSource

Flat

Hints

VisibleButtons

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBNavigator properties

TDBNavigator	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConfirmDelete

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Flat

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

Hints

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentCtl3D

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleButtons

VisibleDockClientCount

Width

WindowProc


TDBNavigator.ConfirmDelete
 VCL Reference

TDBNavigator.ConfirmDelete

TDBNavigator	See also

Determines whether a message box appears asking the user to confirm record deletions initiated using the database navigator.

property ConfirmDelete: Boolean;

Description

Use the ConfirmDelete property to help prevent the user from accidentally deleting a record from the dataset.

If ConfirmDelete is True, a message box appears when the user presses the delete button and the record isn't deleted unless the user chooses the OK button. If ConfirmDelete is False, no message box appears and the record is simply deleted.


TDBNavigator.DataSource
 VCL Reference

TDBNavigator.DataSource

TDBNavigator	See also

Links the navigator to the dataset that it controls.

property DataSource: TDataSource;

Description

Use the DataSource property to link the database navigator with a dataset. Specify the data source component that identifies the dataset that the navigator manipulates.


TDBNavigator.Flat
 VCL Reference

TDBNavigator.Flat

TDBNavigator	See also

Determines whether the buttons of the navigator have a three-dimensional (3-D) look with borders or two-dimensional look without borders.

property Flat: Boolean;

Description

When Flat is True, the navigator buttons appear flat and do not have borders separating them. When Flat is False, the buttons are clearly defined.


TDBNavigator.Hints
 VCL Reference

TDBNavigator.Hints

TDBNavigator	See also

Provides a way to customize the Help Hints for the buttons on the database navigator.

property Hints: TStrings;

Description

Use the Hints property to supply Help Hints of your choosing for the individual navigator buttons. Each button has a default Help Hint. Hints allow the values of any or all of these default Help Hints to be replaced by customized hints.

Hints is a string list. Each hint is a string. The first string in the string list becomes the Help Hint for the first button on the navigator (the First button). The seventh hint becomes the Help Hint for the seventh button (the Edit button).

When specifying Hints at runtime, enter an empty string for any Help Hint that should keep the default value. Simply leave the line blank when using the string list property editor of the Object Inspector for the Hints property.

Note:	To have the Help Hints appear at runtime, set the ShowHint property to True.


TDBNavigator.VisibleButtons
 VCL Reference

TDBNavigator.VisibleButtons

TDBNavigator	See also

Determines which buttons appear on the database navigator.

type TButtonSet = set ofTNavigateBtn;

property VisibleButtons: TButtonSet;

Description

Use VisibleButtons to select which buttons appear on the navigator. Leave any of the navigator buttons out of the VisibleButtons set to hide those buttons and thereby prevent the user from performing certain operations. For example, to only allow the user to view the records in the dataset, VisibleButtons should include only the nbFirst, nbPrior, nbNext, and nbLast


 VCL Reference

TDBNavigator events

TDBNavigator	Alphabetically	Legend

In TDBNavigator

BeforeAction

OnClick

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TDBNavigator events

TDBNavigator	By object	Legend

BeforeAction

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnResize

OnStartDock

OnStartDrag


TDBNavigator.BeforeAction
 VCL Reference

TDBNavigator.BeforeAction

TDBNavigator	See also

Occurs when a button on the database navigator is clicked, before the action is executed.

property BeforeAction: ENavClick;

Description

Write a BeforeAction event handler to take specific action before the default response when a user clicks a button in the database navigator.


TDBNavigator.OnClick
 VCL Reference

TDBNavigator.OnClick

TDBNavigator	See also	Example

Occurs when a button on the database navigator is clicked, after the action is executed.

property OnClick: ENavClick;

Description

Use the OnClick event handler to write code that responds to the click event. Because the buttons on the navigator already have default actions that occur when they are clicked, it isn’t necessary to write an OnClick event handler.

The OnClick event occurs when

The user clicks one the buttons on the navigator with the mouse

The user presses Spacebar while the navigator has focus.

The BtnClick method is called.

Note:	The OnClick event occurs after the default action for the clicked button.


 VCL Reference

TDBNavigator methods

TDBNavigator	Alphabetically	Legend

In TDBNavigator

BtnClick

Create

Destroy

SetBounds

Derived from TCustomPanel

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBNavigator methods

TDBNavigator	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

BtnClick

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBNavigator.BtnClick
 VCL Reference

TDBNavigator.BtnClick

TDBNavigator	See also	Example

Simulates a button click on the database navigator, invoking the action of the button.

procedure BtnClick(Index: TNavigateBtn);

Description

Use BtnClick when you want the application, not the user, to control the database navigator. Call BtnClick, specifying a TNavigateBtn type as the value of the Index parameter, to invoke the command associated with the selected button.

Note:	Calling BtnClick triggers the navigator’s OnClick event after the default action of the button.


TDBNavigator.Create
 VCL Reference

TDBNavigator.Create

TDBNavigator	See also

Creates an instance of TDBNavigator.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TDBNavigator at runtime. For TDBNavigator objects placed on a form at design time, the constructor is called automatically.

Pass a single component as a parameter to provide the TDBNavigator object with an owner that is responsible for freeing it.


TDBNavigator.Destroy
 VCL Reference

TDBNavigator.Destroy

TDBNavigator	See also

Destroys an instance of TDBNavigator.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBNavigator reference is not nil and only then calls destroy.


TDBNavigator.SetBounds
 VCL Reference

TDBNavigator.SetBounds

TDBNavigator	See also

Sets the database navigator's boundary properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer);

Description

Call SetBounds when to set more than one of the navigator’s boundary properties at a time. The Left, Top, Width, and Height properties are set to the values passed in the ALeft, ATop, AWidth, and AHeight parameters, respectively. SetBounds arranges the buttons on the navigator to fit within the boundaries.

Although you can always set the individual boundaries, using SetBounds makes several changes at once without rearranging the buttons for each change.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel

TDBNavigator


TDBOleControl
 VCL Reference

TDBOleControl

Hierarchy	Properties	Methods	See also

Supports simple data binding for ActiveX controls.

Unit

DbOleCtl

Description

Use TBDOleControl to import ActiveX controls that contain simple bindable properties. With simple data binding, you can hook up properties of ActiveX controls to a data source.

Applications typically do not use TDBOleControl; it is available through the ActiveX control wizard and the ActiveForm wizard. Once you create an ActiveX control using either wizard, a type library is created. Edit the type library binding properties to add simple data binding to your applications.


 VCL Reference

TDBOleControl properties

TDBOleControl	Alphabetically	Legend

In TDBOleControl

DataBindings

DataSource

Derived from TOleControl

DefaultDispatch

Name

OleObject

Parent

PerPropBrowsing

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBOleControl properties

TDBOleControl	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DataBindings

DataSource

DefaultDispatch

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

OleObject

Owner

Parent

ParentWindow

PerPropBrowsing

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBOleControl.DataBindings
 VCL Reference

TDBOleControl.DataBindings

TDBOleControl	See also

Represents the data bindings between ActiveX control properties and fields in a dataset.

property DataBindings: TDataBindings;

Description

Use DataBindings to read or set the data bindings in a data-aware ActiveX control. DataBindings is a collection of TDataBindItem objects. Use the properties of the TDataBindings object to specify the data bindings of individual properties in the data-aware control.

Data bindings are typically set by editing the ActiveX control’s type library.


TDBOleControl.DataSource
 VCL Reference

TDBOleControl.DataSource

TDBOleControl	See also

Specifies the link to the dataset where the data-aware ActiveX control finds its data.

property DataSource: TDataSource;

Description

Set DataSource to the TDataSource object that links to the dataset where the data-aware object should fetch its data. DataSource allows the data-aware control to read from, write to, and navigate around the dataset.


 VCL Reference

TDBOleControl methods

TDBOleControl	Alphabetically	Legend

In TDBOleControl

Create

Destroy

Derived from TOleControl

BrowseProperties

DefaultHandler

DoObjectVerb

GetEnumPropDesc

GetHelpContext

GetObjectVerbs

GetPropDisplayString

GetPropDisplayStrings

IsCustomProperty

IsPropPageProperty

SetBounds

SetPropDisplayString

ShowAboutBox

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBOleControl methods

TDBOleControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

BrowseProperties

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoObjectVerb

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetEnumPropDesc

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetObjectVerbs

GetParentComponent

GetPropDisplayString

GetPropDisplayStrings

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsCustomProperty

IsImplementorOf

IsPropPageProperty

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetPropDisplayString

SetSubComponent

SetTextBuf

Show

ShowAboutBox

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBOleControl.Create
 VCL Reference

TDBOleControl.Create

TDBOleControl	See also

Creates an instance of TDBOleControl.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create a new instance of TDBOleControl object. Create calls the inherited constructor, then creates and initializes TDataBinding objects.


TDBOleControl.Destroy
 VCL Reference

TDBOleControl.Destroy

TDBOleControl	See also

Destroys an instance of TDBOleControl.

destructor Destroy; override;

Description

Do not call Destroy. Instead call Free, which calls Destroy if this TDBOleControl reference is not nil.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TOleControl

TDBOleControl


TDBRadioGroup
 VCL Reference

 TDBRadioGroup

Hierarchy	Properties	Methods	Events 	Using TDBRadioGroup	See also

TDBRadioGroup represents a group of radio buttons connected to a database.

Unit

DBCtrls

Description

Use TDBRadioGroup to group a set of data-aware radio buttons. Radio buttons that are contained directly in the same control component are said to be “grouped”; when a radio button is checked, all other radio buttons in its group become unchecked. Database radio groups provide an easy way to ensure that the user enters one (or at most one) of the options presented for a field. They are also useful for displaying data from fields that have only a few possible values.

To add radio buttons to a TDBRadioGroup, edit the Items property in the Object Inspector. Each string in Items makes a radio button appear in the group box with the string as its caption.

When the user selects a radio button, the “value” of the selected button becomes the contents of the linked field for the current record in the dataset. Specify values for the buttons by editing the Values property in the Object Inspector; the first string in Values corresponds to the first string in Items, and so forth. If no Values strings are set, each button’s caption serves as its value.


 VCL Reference

TDBRadioGroup properties

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

DataField

DataSource

Field

Items

ReadOnly

Value

Values

Derived from TCustomRadioGroup

Columns

ItemIndex

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBRadioGroup properties

TDBRadioGroup	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Items

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

Value

Values

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDBRadioGroup.DataField
 VCL Reference

TDBRadioGroup.DataField

TDBRadioGroup	See also

Specifies the field from which the radio group displays data.

property DataField: String;

Description

Use DataField to specify the name of the database field that the radio group represents.

DBRadioGroup1.DataField := 'PaymentMethod';


TDBRadioGroup.DataSource
 VCL Reference

TDBRadioGroup.DataSource

TDBRadioGroup	See also

Determines where the database radio group obtains the data to display.

property DataSource: TDataSource;

Description

DataSource holds a TDataSource object that points to a dataset component, such as a table. The dataset component should be linked to the database you want to access.

DBRadioGroup1.DataSource := DataSource1;


TDBRadioGroup.Field
 VCL Reference

TDBRadioGroup.Field

TDBRadioGroup	See also

Identifies the TField component to which the radio group is linked.

property Field: TField;

Description

Field holds the TField object that the linked dataset component creates to access the database.

DBRadioGroup1.Field.AsString := 'Yes';


TDBRadioGroup.Items
 VCL Reference

TDBRadioGroup.Items

TDBRadioGroup	See also	Example

Lists the radio buttons in the radio group.

property Items: TStrings;

Description

Items holds a TStrings object that lists the captions of the radio buttons in the group. (To add or remove radio buttons, edit the Items list from the Object Inspector. These captions become the “values” of the radio buttons, unless you override them in the Values property; when a button is selected, its value becomes the content of the linked field for the current record in the database.


TDBRadioGroup.ReadOnly
 VCL Reference

TDBRadioGroup.ReadOnly

TDBRadioGroup	See also

Determines whether the user can select a different radio button in the group, and hence modify the data in the field.

property ReadOnly: Boolean;

Description

If ReadOnly is True, the radio group displays data from the current record, but cannot be used to change the contents of the field. The default is False.


TDBRadioGroup.Value
 VCL Reference

TDBRadioGroup.Value

TDBRadioGroup

Holds the content of the linked field for the current record in the database.

property Value: String;

Description

Value holds the content of the linked field for the current record. If the user selects a different radio button, the Value property changes.


TDBRadioGroup.Values
 VCL Reference

TDBRadioGroup.Values

TDBRadioGroup	See also 	Example

Determines the values of the radio buttons.

property Values: TStrings;

Description

When the user selects a radio button, the “value” of that button is written to the linked field in the database. By default, the value of a button is simply the caption that appears next to it on the screen, as determined by the Items property.

In some cases, you may want the values of the radio buttons to differ from their captions. For example, if you use radio buttons to represent a database field whose content can be “Y” or “N”, you may want the buttons’ captions to be “Yes” and “No”. In this case, you would enter “Yes” and “No” in the Items list, and enter “Y” and “N” in the Values list.

You can edit the Values list in the Object Inspector, just as you would the Items list. To keep the buttons’ captions as their values, leave the Values property empty.


 VCL Reference

TDBRadioGroup events

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

OnChange

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TDBRadioGroup events

TDBRadioGroup	By object	Legend

OnChange

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnStartDock

OnStartDrag


TDBRadioGroup.OnChange
 VCL Reference

TDBRadioGroup.OnChange

TDBRadioGroup

Occurs when the user changes the data in the linked field.

property OnChange: TNotifyEvent

Description

The OnChange event occurs when a change is made to the contents of the database field accessed by the radio group. Use an OnChange event handler to implement any special processing that should be executed when the radio group is updated.


 VCL Reference

TDBRadioGroup methods

TDBRadioGroup	Alphabetically	Legend

In TDBRadioGroup

Create

Destroy

ExecuteAction

UpdateAction

UseRightToLeftAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBRadioGroup methods

TDBRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBRadioGroup.Create
 VCL Reference

TDBRadioGroup.Create

TDBRadioGroup	See also

Creates and initializes a TDBRadioGroup instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBRadioGroup object at runtime. For radio groups placed on forms at design time, Create is called automatically.

Pass a single Component as a parameter to provide the TDBRadioGroup object with an Owner that is responsible for freeing it.

Create calls the inherited constructor method, then initializes internal objects and variables used to control data access.


TDBRadioGroup.Destroy
 VCL Reference

TDBRadioGroup.Destroy

TDBRadioGroup	See also

Destroys the TDBRadioGroup instance and the radio buttons it contains.

destructor Destroy; override;

Description

Destroy frees internally created objects that control data access, then calls the inherited destructor method.


TDBRadioGroup.ExecuteAction
 VCL Reference

TDBRadioGroup.ExecuteAction

TDBRadioGroup	See also

Invokes an action with the TDBRadioGroup as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBRadioGroup as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBRadioGroup could not handle the action.


TDBRadioGroup.UpdateAction
 VCL Reference

TDBRadioGroup.UpdateAction

TDBRadioGroup	See also

Updates an action to reflect the current state of the TDBRadioGroup.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBRadioGroup an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBRadioGroup they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBRadioGroup.UseRightToLeftAlignment
 VCL Reference

TDBRadioGroup.::UseRightToLeftAlignment

TDBRadioGroup	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBRadioGroup’s alignment is in a right-to-left mode. This information can be used when painting the TDBRadioGroup data or when responding to mouse events.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGroupBox

TCustomRadioGroup

TDBRadioGroup


TDBRichEdit
 VCL Reference

 TDBRichEdit

Hierarchy	Properties	Methods	Events 	Using TDBRichEdit	See also

TDBRichEdit represents a multiline edit control that can display and edit a rich text memo field in a dataset.

Unit

DBCtrls

Description

Use a TDBRichEdit object to enable users to edit a database field in a rich text edit control. TDBRichEdit provides the properties and methods to enter and work with rich text. TDBRichEdit does not provide any user interface components to make these formatting options available to the user. Applications must implement the user interface components to surface the rich text capabilities of a TDBRichEdit object. make this easier, a number of pre-defined standard actions operate on rich edit controls to perform common formatting tasks.

TDBRichEdit uses the Text property to represent the contents of the field.  Like other data-aware controls, TDBRichEdit controls automatically put the data source into edit mode when the value of the Text property is changed.  However, if only the formatting of the text is changed, but not the text itself, the application must explicitly put the data source into edit mode so that the changes will be saved. This should be implemented as part of the user interface for the rich text capabilities.

If the database field does not include text formatting information, consider using a TDBMemo object or a TDBEdit object instead.

If the application doesn’t require the data-aware capabilities of TDBRichEdit, use a rich text edit control (TRichEdit) instead, to conserve system resources.


 VCL Reference

TDBRichEdit properties

TDBRichEdit	Alphabetically	Legend

In TDBRichEdit

AutoDisplay

DataField

DataSource

Field

ReadOnly

Derived from TCustomRichEdit

DefAttributes

DefaultConverter

HideScrollBars

HideSelection

PageRect

Paragraph

PlainText

SelAttributes

SelLength

SelStart

SelText

Derived from TCustomMemo

Alignment

CaretPos

Lines

ScrollBars

WantReturns

WantTabs

WordWrap

Derived from TCustomEdit

BorderStyle

CanUndo

MaxLength

Modified

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBRichEdit properties

TDBRichEdit	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

AutoDisplay

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DataField

DataSource

DefAttributes

DefaultConverter

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideScrollBars

HideSelection

Hint

HostDockSite

ImeMode

ImeName

Left

Lines

LRDockWidth

MaxLength

Modified

Name

Owner

PageRect

Paragraph

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PlainText

PopupMenu

ReadOnly

ScrollBars

SelAttributes

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WantReturns

WantTabs

Width

WindowProc

WordWrap


TDBRichEdit.AutoDisplay
 VCL Reference

TDBRichEdit.AutoDisplay

TDBRichEdit	See also

Determines whether to automatically display the contents of the memo field in the rich edit control.

property AutoDisplay: Boolean;

Description

If AutoDisplay is True, the rich edit control automatically displays new data when the underlying BLOB field changes (such as when moving to a new record).

If AutoDisplay is False, the control shows only the field name whenever the underlying BLOB field changes. To display the data, the user can double-click on the control or select it and press Enter.

The effect of AutoDisplay is not purely cosmetic. The data shown by the TDBRichEdit object is the value of the Text property. When AutoDisplay is False, if the data changes, the value of the Text property changes to the name of the field. Thus, if AutoDisplay is False, applications should be cautious about using the value of the Text property to ascertain the value of the underlying field.

Calling the LoadMemo method causes Text to update to the current value of the BLOB field. This change will also be reflected in the appearance of the control on screen.

Change the value of AutoDisplay to False if the automatic loading of BLOB fields seems to take too long.

Note:	AutoDisplay only applies to BLOB fields. If the control is bound to another type of text field, AutoDisplay has no effect.


TDBRichEdit.DataField
 VCL Reference

TDBRichEdit.DataField

TDBRichEdit	See also

Specifies the field from which the rich edit control displays data.

property DataField: String;

Description

Use DataField to bind the rich edit control to a field in the dataset. To fully specify a database field, both the dataset and the field within that dataset must be defined. The DataSource property of the rich edit control specifies the dataset which contains the DataField.

DBRichEdit1.DataField := 'Document';


TDBRichEdit.DataSource
 VCL Reference

TDBRichEdit.DataSource

TDBRichEdit	See also

Links the rich edit control to the dataset that contains the field it represents.

property DataSource: TDataSource;

Description

Use DataSource to link the rich edit control to a dataset in which the data can be found. To fully specify a database field for the edit control, both the dataset and a field within that dataset must be defined. Use the DataField property to specify the particular field within the dataset.

DBRichEdit1.DataSource := DataSource1;


TDBRichEdit.Field
 VCL Reference

TDBRichEdit.Field

TDBRichEdit	See also

Indicates the TField object for the database field the rich edit control represents.

property Field: TField;

Description

Read Field to get direct access to the contents and properties of the database field without going through the edit window. Use Field to change the contents of the database field programmatically. Use the Text property instead if you want to change the contents of the edit window without immediately posting the changes to the dataset. Changing the Text property allows the user to cancel the changes.

(DBRichEdit1.Field as TMemoField).Assign(RichEdit1.Lines);


TDBRichEdit.ReadOnly
 VCL Reference

TDBRichEdit.ReadOnly

TDBRichEdit	See also

Determines whether the user can use the rich database edit control to change the value of the field in the current record.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent the user from changing the contents of the database field. When ReadOnly is True, the edit control is used only to display the contents of the field. If ReadOnly is False, the user can change the field's value as long as the dataset is in edit mode.


 VCL Reference

TDBRichEdit events

TDBRichEdit	Alphabetically	Legend

Derived from TCustomRichEdit

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBRichEdit events

TDBRichEdit	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange

OnStartDock

OnStartDrag


 VCL Reference

TDBRichEdit methods

TDBRichEdit	Alphabetically	Legend

In TDBRichEdit

Change

Create

Destroy

ExecuteAction

KeyDown

KeyPress

LoadMemo

Notification

UpdateAction

Derived from TCustomRichEdit

Clear

FindText

GetSelTextBuf

Print

RegisterConversionFormat

Derived from TCustomMemo

GetControlsAlignment

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

HasParent

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBRichEdit methods

TDBRichEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindText

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

LoadMemo

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

PasteFromClipboard

Perform

Print

Realign

ReferenceInterface

Refresh

RegisterConversionFormat

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBRichEdit.Change
 VCL Reference

TDBRichEdit.Change

TDBRichEdit	See also

Keeps track of the fact that the text has been modified, before letting the inherited method call the OnChange event handler if it is assigned.

procedure Change; override;

Description

Applications cannot call this protected method directly. It is triggered automatically by Windows’ events. Change responds to these events by internally keeping track of the fact that the text has been modified. This information can then be used to know whether there are any changes to post to the dataset or to remove if the user requests a reset.

Change also calls the inherited method, which calls the OnChange event handler if it is assigned.


TDBRichEdit.Create
 VCL Reference

TDBRichEdit.Create

TDBRichEdit	See also

Creates an instance of TDBRichEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBRichEdit object at runtime. For TDBRichEdit objects placed on forms at design-time, the constructor is called automatically.

Pass a single Component as a parameter to provide the TDBRichEdit object with an Owner that is responsible for freeing it.

After calling the inherited constructor to allocate and initialize a generic rich edit object, Create

Sets ReadOnly to True.

Sets AutoDisplay to True.

Creates and initializes the helper objects needed to link to a dataset.


TDBRichEdit.Destroy
 VCL Reference

TDBRichEdit.Destroy

TDBRichEdit	See also

Destroys an instance of TDBRichEdit.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDBRichEdit reference is not nil and only then calls Destroy.

Destroy frees the helper objects of the TDBRichEdit before calling the inherited destructor.


TDBRichEdit.ExecuteAction
 VCL Reference

TDBRichEdit.ExecuteAction

TDBRichEdit	See also

Invokes an action with the TDBRichEdit as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBRichEdit as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBRichEdit could not handle the action.


TDBRichEdit.KeyDown
 VCL Reference

TDBRichEdit.KeyDown

TDBRichEdit	See also

Supplements the inherited method to drive the dataset into edit mode when the user presses Del or Shift+Insert.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

KeyDown first calls the inherited method, which calls the OnKeyDown event handler. KeyDown next attempts to put the dataset into an editing state when the user types Del or Shift+Insert. Derived classes can override KeyDown to handle additional key combinations, but the inherited method should always be called.

Note:	Applications cannot call this protected method directly. It is called automatically in response to Windows events.


TDBRichEdit.KeyPress
 VCL Reference

TDBRichEdit.KeyPress

TDBRichEdit	See also

Supplements the inherited method to handle any keystrokes that alter the state of the edit control.

procedure KeyPress(var Key: Char); override;

Description

KeyPress first calls the inherited method, which calls the OnKeyPress event handler. Next, KeyPress checks the value of the key, and throws it away if it is not a valid character for the field type, or if there is no link to a database field. Valid characters cause KeyPress to attempt to put the dataset into edit mode.

Pressing the Escape key causes KeyPress to throw away all unposted edits. Pressing the Pause key causes KeyPress to call LoadMemo to load the value of the memo field associated with the rich edit control.

Note:	Applications cannot call this protected method directly. It is called automatically in response to Windows events.


TDBRichEdit.LoadMemo
 VCL Reference

TDBRichEdit.LoadMemo

TDBRichEdit	See also

LoadMemo loads the memo BLOB from the field in the database into the rich edit control.

procedure LoadMemo; virtual;

Description

LoadMemo allows an application to control when the rich edit control displays the contents of the memo field. Use LoadMemo to update the text in the rich edit control to the value of the field in the current record. LoadMemo only works with BLOB fields when the AutoDisplay property is False, so that the value of the field is not loaded automatically.


TDBRichEdit.Notification
 VCL Reference

TDBRichEdit.Notification

TDBRichEdit	See also

Overrides the inherited method to respond to opRemove notifications on the DataSource.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the notification indicates the removal of the DataSource. If so, Notification sets the DataSource property to nil.

Derived classes can override Notification method to handle additional notifications, but the inherited method should be always be called.

Note:	Notification is a protected method. Applications cannot call it directly.


TDBRichEdit.UpdateAction
 VCL Reference

TDBRichEdit.UpdateAction

TDBRichEdit	See also

Updates an action to reflect the current state of the TDBRichEdit.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBRichEdit an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBRichEdit they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBRichEdit.UseRightToLeftAlignment
 VCL Reference

TDBRichEdit.UseRightToLeftAlignment

TDBRichEdit	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBRichEdit’s alignment is in a right-to-left mode. This information can be used when painting the TDBRichEdit data or when responding to mouse events.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo

TCustomRichEdit

TDBRichEdit


TDBText
 VCL Reference

 TDBText

Hierarchy	Properties	Methods	Events 	Using TDBText	See also

TDBText represents a data-aware control that displays the value of a field on a form.

Unit

DBCtrls

Description

Use TDBText to display the contents of a field in the current record of a dataset on a form. Field values displayed by database text controls cannot be modified by the user using the text control. To allow the user to edit the field value, use TDBEdit or TDBMemo instead.

If the application does not require the data-aware capabilities of TDBText, use the label component (TLabel) or the static text component (TStaticText) instead to conserve system resources.


 VCL Reference

TDBText properties

TDBText	Alphabetically	Legend

In TDBText

AutoSize

DataField

DataSource

Field

Derived from TCustomLabel

Alignment

Transparent

WordWrap

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDBText properties

TDBText	By object	Legend

Action

Align

Alignment

Anchors

AutoSize

BiDiMode

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DataField

DataSource

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Field

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

WordWrap


TDBText.AutoSize
 VCL Reference

TDBText.AutoSize

TDBText	See also

Determines whether the database text control automatically resizes to the width and length of the current string.

property AutoSize: Boolean;

Description

Use AutoSize to make the database text control adjust its size automatically so the client area accommodates the height and width of the field value. When AutoSize is False (the default), the control is fixed in size. When AutoSize is True, the size of the control is readjusted whenever its caption changes. The size of the control is also readjusted when the Font property changes.

When WordWrap is True, the width of the database text control is fixed. If AutoSize is also True, changes to the field value cause the control to change in height. When AutoSize is True and WordWrap is False, the height of the control is determined by the font, and changes to the field value cause the control to change in width.


TDBText.DataField
 VCL Reference

TDBText.DataField

TDBText	See also

Specifies the field whose value is displayed by the database text control.

property DataField: String;

Description

Use DataField to bind the database text control to a field in the dataset. To fully specify a database field, both the dataset and the field within that dataset must be defined. The DataSource property of the control specifies the dataset that contains the DataField.

DBText1.DataField := 'Company';


TDBText.DataSource
 VCL Reference

TDBText.DataSource

TDBText	See also

Links the text control to the dataset that contains the field it represents.

property DataSource: TDataSource;

Description

Use DataSource to link the database text control to a dataset in which the data can be found. To fully specify a database field for the control, both the dataset and a field within that dataset must be defined. Use the DataField property to specify the particular field within the dataset.

DBText1.DataSource := DataSource1;


TDBText.Field
 VCL Reference

TDBText.Field

TDBText	See also

Indicates the TField object for the database field the database text control represents.

property Field: TField;

Description

Use the Field object to change the value of the data in the field programmatically.

DBText1.Field.AsString := 'Santa Cruz Wharf';


 VCL Reference

TDBText events

TDBText	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBText events

TDBText	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TDBText methods

TDBText	Alphabetically	Legend

In TDBText

Create

Destroy

ExecuteAction

UpdateAction

UseRightToLeftAlignment

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDBText methods

TDBText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDBText.Create
 VCL Reference

TDBText.Create

TDBText	See also

Creates an instance of TDBText.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDBText object at runtime. For TDBText objects placed on forms or data modules at design time, Create is called automatically.

The AOwner parameter specifies the Owner for the TDBText control. The Owner is responsible for freeing the control. Typically, this is a form.

After calling the inherited constructor to allocate and initialize a generic label object, Create

Adds csReplicatable to ControlStyle.

Sets AutoSize to False.

Creates and initializes the helper objects needed to link to a dataset.


TDBText.Destroy
 VCL Reference

TDBText.Destroy

TDBText	See also

Destroys an instance of TDBText.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDBText reference is not nil and only then calls Destroy.

Destroy frees the helper objects of the TDBText before calling the inherited destructor.


TDBText.ExecuteAction
 VCL Reference

TDBText.ExecuteAction

TDBText	See also

Invokes an action with the TDBText as its target.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

ExecuteAction is called automatically when the user invokes an action with the TDBText as a target. The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the TDBText could not handle the action.


TDBText.UpdateAction
 VCL Reference

TDBText.UpdateAction

TDBText	See also

Updates an action to reflect the current state of the TDBText.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

UpdateAction is called automatically when the application is idle to give the TDBText an opportunity to update associated actions. This allows actions to be grayed, checked, or to otherwise reflect the status of the TDBText they target.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action.


TDBText.UseRightToLeftAlignment
 VCL Reference

TDBText.::UseRightToLeftAlignment

TDBText	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the TDBText’s alignment is in a right-to-left mode. This information can be used when painting the TDBText.

UseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomLabel

TDBText


Data Dictionary ID types
 VCL Reference

Data Dictionary ID types

See also

Identify entries in the Data Dictionary.

Unit

DRIntf

type

  TID = packedrecord Reseved: array[1..6] of Byte; end;

  TDatabaseID = type TID;

  TTableID = type TID;

  TFieldID = type TID;

  TAttrID = type TID;

Description

The data dictionary ID types are all 6-byte arrays that are used internally by the data dictionary as identifiers. Applications do not assign values to these types. Rather, they are returned by functions that look up or create Data Dictionary entries.

The following table lists the different types of Data Dictionary IDs:

Type	Identifies

TID	Nothing. This is the generic type definition for a Data Dictionary identifier.

TDatabaseID	A database. This identifier can be obtained using the FindDatabaseID function.

TTableID	A database table. This identifier can be obtained using the FindTableID function.

TFieldID	A field (column) in a table. This identifier can be obtained using the FindFieldID function.

TAttrID	An attribute set for a field. This identifier can be obtained using the FindAttrID function or the GetAttrID function.


DBIResult type
 VCL Reference

DBIResult type

See also

DBIResult is used to specify a BDE error code .

Unit

(BDE.int)

type DBIResult: Word;

Description

DBIResult is used to specify a Borland Database Engine error code for the DbiError procedure. Use DBIResult to declare the return value when making direct API calls to the BDE.


DBResult type
 VCL Reference

DBResult type

See also

DBResult is used to specify the error code returned by a database function.

Unit

DSIntf

type DBResult = Word;

Description

DBResult is used to specify the error code returned by a function that performs some database action. DBResult is generic: it can represent the result from functions that use different underlying database access methods.


ENavClick type
 VCL Reference

ENavClick type

See also

The type for events that occur when the user clicks a button on a TDBNavigator component.

Unit

DB

type ENavClick = procedure (Sender: TObject; Button: TNavigateBtn) of object;

Description

ENavClick is the type for event handlers that respond when the user clicks a button on a TDBNavigator component.

Sender is the TDBNavigator component that contains the button that the user clicked.

Button identifies which of the navigator buttons was clicked.


SPParamDesc, PSPParamDesc types
 VCL Reference

SPParamDesc, PSPParamDesc types

See also

Unit

DBXpress

type

  PSPParamDesc = ^SPParamDesc;

  SPParamDesc = packed record

    iParamNum       : Word;

    szName          : String;

    iArgType        : TParamType;

    iDataType       : TFieldType;

    iUnits1         : SmallInt;

    iUnits2         : SmallInt;

    iLen            : LongWord;

  end;

Description

PSPParamDesc is a pointer to a parameter descriptor. SPParamDesc is a parameter descriptor that describes a parameter for a stored procedure. SPParamDesc includes the following members:

Member	Meaning

iParamNum	The ordinal position of the parameter.

szName	The name of the parameter

iArgType	The type of the parameter (input, output, and so on)

iDataType	The data type of the parameter

iUnits1	The size for the datatype (number of characters, digits, etc)

iUnits2	Number of decimal places if datatype is BCD

iLen	The number of bytes needed to store a parameter value


SQLTRACEDesc, pSQLTRACEDesc types
 VCL Reference

SQLTRACEDesc, pSQLTraceDesc types

SQLTraceDesc encodes information about a message that passes between a dbExpress driver and a database server.

Unit

SqlExpr

type

  SQLTRACEDesc = packed record

  pszTrace     : array [0..1023] of Char;

  eTraceCat    : TRACECat;

  ClientData   : Integer;

  uTotalMsgLen : Word;

  end;

  pSQLTRACEDesc = ^SQLTRACEDesc;

Description

SQLTRACEDesc describes a message that was just passed between a dbExpress driver and a database server. pSQLTRACEDesc is a pointer to a SQLTRACEDesc record.

pszTrace is the command that was just passed.

eTraceCat is the category of command that was just passed. It is an enumerated value that corresponds to a TSQLTraceFlag value.

ClientData is an application-specific value supplied to the SetTraceCallbackEvent method. When the SQLTraceDesc is accessed from a callback supplied to TSQLConnection, this value can have any application-defined meaning. When the SQLTraceDesc is provided by a TSQLMonitor event, ClientData should not be used.

uTotalMsgLen is the length of the string in pszTrace.


TAfterUpdateRecordEvent type
 VCL Reference

TAfterUpdateRecordEvent type

TAfterUpdateRecordEvent is the type for an AfterUpdateRecord event handler.

Unit

Provider

type TAfterUpdateRecordEvent = procedure(Sender: TObject; SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind) of object;

Description

The Sender parameter identifies the provider that is applying updates.

The SourceDS parameter is the dataset from which the data originated. If there is no source dataset, this value is nil. The source dataset may not be active when the event occurs: you may need to set its Active property to True before accessing its data.

The DeltaDS parameter is a client dataset whose current record is the update that was just applied.

The UpdateKind parameter indicates whether this update was the modification of an existing record (ukModify), a new record that was inserted (ukInsert), or a record that was deleted (ukDelete).


TAutoRefreshFlag type
 VCL Reference

 TAutoRefreshFlag type

See also

Indicates whether the server provides field values, and if so, why.

Unit

DB

type TAutoRefreshFlag = (arNone, arAutoInc, arDefault);

Description

TAutoRefreshFlag is the type of the AutoGenerateValue property of a field component. It indicates whether the server automatically supplies data for a field. TAutoRefreshFlag includes the following values:

Value	Meaning

arNone	The field does not have a default value and is not an autoincrement field. The server does not automatically supply values for this type of field.

arAutoInc	The field is an autoincrement field.

arDefault	The field has a default value maintained by the server.


TBatchMode type
 VCL Reference

TBatchMode type

Indicates the type of batch operation to be performed on a database table.

Unit

DBTables

type TBatchMode = (batAppend, batUpdate, batAppendUpdate, batDelete, batCopy);

Description

TBatchMode can take the following values:

Value	Meaning

batAppend	Append all records from the source table to the end of destination table. The destination and source tables must not have records with duplicate keys.

batAppendUpdate	If a matching record exists in the destination table, replace it with the corresponding record from the source table. Otherwise, append records to the destination table. The destination table must have an index defined for matching records.

batCopy	Copy the structure and records from the source table into the destination table. If the destination table already exists, delete it and replace it with the new copy of the source.

batDelete	Delete all records in the destination table that also appear in the source table.

batUpdate	If a matching record exists in the destination table, replace it with the corresponding record from the source table. The destination table must have an index defined for matching records.


TBcd type
 VCL Reference

TBcd type

The type that stores a binary coded decimal value.

Unit

FmtBcd

type

  TBcd  = packed record

    Precision: Byte;         { 1..64 }

    SignSpecialPlaces: Byte; { Sign:1, Special:1, Places:6 }

    Fraction: packed array [0..31] of Byte; { BCD Nibbles, 00..99 per Byte, high Nibble 1st }

  end;

Description

TBcd represents a binary coded decimal value. It contains the following fields:

Field	Contents

Precision	The number of digits in the decimal version of the value.

SignSpecialPlaces	The sign bit (0 is positive, any other value negative)
the special bit (nonzero indicates that the value is blank)
the number of digits after the decimal (0 to Precision)

Fraction	An array of BCD nibbles, 00 to 99 per byte, high nibble first. Only the first Precision nibbles are used.

You can create a Variant that represents a TBcd value using the VarFMTBcdCreate function. In fact, the easiest way to manipulate TBcd values is to create Variants for them and use the built-in operators provided by the Variant type.


TBeforeUpdateRecordEvent type
 VCL Reference

TBeforeUpdateRecordEvent type

TBeforeUpdateRecordEvent is the type for a BeforeUpdateRecord event handler.

Unit

Provider

type TBeforeUpdateRecordEvent = procedure(Sender: TObject; SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind; var Applied: Boolean) of object;

Description

The Sender parameter identifies the provider that is applying updates.

The SourceDS parameter is the dataset from which the data originated. If there is no source dataset, this value is nil. The source dataset may not be active when the event occurs, so set its Active property to True before trying to access its data.

The DeltaDS parameter is a client dataset containing all the updates that are being applied. The current record represents the update that is about to be applied.

The UpdateKind parameter indicates whether this update is the modification of an existing record (ukModify), a new record to insert (ukInsert), or an existing record to delete (ukDelete).

The Applied parameter controls what happens after exiting the event handler. If the event handler sets Applied to True, the provider ignores the update: it neither tries to apply it, nor does it log an error indicating that the update was not applied. If the event handler leaves Applied as False, the provider tries to apply the update after the event handler exits.


TBlobByteData type
 VCL Reference

TBlobByteData type

Stores the contents of a Binary Large Object (BLOB) field.

Unit

DB

typeTBlobByteData = array of Byte;

Description

TBlobByteData is the type for buffers that store information from a BLOB field.


TBlobStreamMode type
 VCL Reference

TBlobStreamMode type

See also

Indicates how a BLOB stream can be used.

Unit

DB

type TBlobStreamMode = (bmRead, bmWrite, bmReadWrite);

Description

When a BLOB stream is first created, TBlobStreamMode is used to specify how that stream can be used. The following table lists the possible values.

Value	Meaning

bmRead	The stream is used to read from a BLOB field.

bmWrite	The stream is used to write from a BLOB field.

bmReadWrite	The stream is used to modify a BLOB field’s value.


TBlobType type
 VCL Reference

TBlobType type

See also

Indicates the type of a BLOB field.

Unit

DB

type TBlobType = ftBlob..ftOraClob;

Description

TBlobType represents a range of TFieldType values. These are the values of in that range:

Value	Description

ftBlob	Binary Large Object field

ftMemo	Text memo field

ftGraphic	Bitmap field

ftFmtMemo	Formatted text memo field

ftParadoxOle	Paradox OLE field

ftDBaseOle	dBASE OLE field

ftTypedBinary	Typed binary field

ftCursor	Not a valid blob type, don’t use.

ftFixedChar	Not a valid blob type, don’t use.

ftWideString	Not a valid blob type, don’t use.

ftLargeInt	Not a valid blob type, don’t use.

ftADT	Not a valid blob type, don’t use.

ftArray	Not a valid blob type, don’t use.

ftReference	Not a valid blob type, don’t use.

ftDataSet	Not a valid blob type, don’t use.

ftOraBlob	BLOB fields in Oracle 8 tables

ftOraClob	CLOB fields in Oracle 8 tables


TBookmark type
 VCL Reference

TBookmark type

See also

Identifies a record in a dataset for later navigation.

Unit

DB

type TBookmark = Pointer;

Description

TBookmark is the type of the Bookmark parameter in the GetBookmark, GotoBookmark, and FreeBookmark methods of a dataset component.

Note:	Different types of datsets can implement bookmarks differently. Do not use a TBookmark from one type of dataset (for example, a BDE-enabled dataset) with methods on another type of dataset (for example, an ADO-based dataset).


TConnectChangeEvent type
 VCL Reference

TConnectChangeEvent type

See also

The type for a callback method that responds when a database connection is established or terminated.

Unit

DB

type TConnectChangeEvent = procedure(Sender: TObject; Connecting: Boolean) of object;

Description

When an object is registered with a TCustomConnection descendant, it can ask to be notified when the connection is established or terminated. The TCustomConnection component notifies the object by calling a method of type TConnectChangeEvent. In effect, this allows the connection component to generate an event on another object.

Sender is the connection component that has just established a connection or is about to terminate a connection.

Connecting indicates whether the connection has just been created (True), or is about to be terminated (False).


TDataAction type
 VCL Reference

TDataAction type

Used to indicate how an application should respond to a database error condition.

Unit

DB

type TDataAction = (daFail, daAbort, daRetry);

Description

TDataAction is the type of a parameter in certain dataset event handlers that indicates how the dataset should proceed after the event handler exits. The following table summarizes the possible values:

Value	Meaning

daFail	Abort the operation that led to an error and display an error message.

daAbort	Abort the operation that led to an error without displaying a message.

daRetry	Repeat the operation that led to an error. The cause of the error should be corrected within the event handler before returning this value.


TDataSetNotifyEvent type
 VCL Reference

TDataSetNotifyEvent type

TDataSetNotifyEvent is a pointer to a method used to notify a dataset component an event has occurred.

Unit

DB

type TDataSetNotifyEvent = procedure(DataSet: TDataSet) of object;

Description

TDataSetNotifyEvent specifies a method that notifies a dataset component when an event has occurred. It is used by most events on the various dataset components. The DataSet parameter is the dataset component that receives the notification.


TDataSetState type
 VCL Reference

TDataSetState type

See also

Indicates the current operating mode of a dataset component.

Unit

DB

type TDataSetState = (dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsFilter, dsNewValue, dsOldValue, dsCurValue, dsBlockRead, dsInternalCalc, dsOpening);

Description

TDataSetState represents the values that may be in the State property of a dataset component. TDataSetState indicates the current operating mode of that dataset component. The following table lists all possible values in the TDataSetState type and describes what they indicate in the State property:

Value	Meaning

dsInactive	Dataset is closed, so its data is unavailable.

dsBrowse	Data can be viewed, but not changed. This is the default state of an open dataset.

dsEdit	Active record can be modified.

dsInsert	The active record is a newly inserted buffer that has not been posted. This record can be modified and then either posted or discarded.

dsSetKey	TTable and TClientDataSet only. Record searching is enabled, or a SetRange operation is under way. A restricted set of data can be viewed, and no data can be edited or inserted.

dsCalcFields	An OnCalcFields event is in progress. Noncalculated fields cannot be edited, and new records cannot be inserted.

dsFilter	An OnFilterRecord event is in progress. A restricted set of data can be viewed. No data can edited or inserted.

dsNewValue	Temporary state used internally when a field component’s NewValue property is accessed.

dsOldValue	Temporary state used internally when a field component’s OldValue property is accessed.

dsCurValue	Temporary state used internally when a field component’s CurValue property is accessed.

dsBlockRead	Data-aware controls are not updated and events are not triggered when moving to the next record.

dsInternalCalc	Temporary state used internally when values need to be calculated for a field that has a FieldKind of fkInternalCalc.

dsOpening	DataSet is in the process of opening but has not finished. This state occurs when the dataset is opened for asynchronous fetching.


TFieldClass type
 VCL Reference

TFieldClass type

TFieldClass is the class type of a TField descendant.

Unit

DB

type TFieldClass = classofTField;

typedef

Description

Use TFieldClass to specify the type of a TField descendant.


TFieldKind type
 VCL Reference

TFieldKind type

See also

Indicates what type of information a field component represents.

Unit

DB

type TFieldKind = (fkData, fkCalculated, fkLookup, fkInternalCalc, fkAggregate);

Description

TFieldKind can take one of the following values:

Value	Description

fkData	Field represents a physical field in a database table

fkCalculated	Field is calculated in an OnCalcFields event handler

fkLookup	Field is a lookup field. (Not implemented for fields on unidirectional datasets)

fkInternalCalc	Field is calculated but values are stored in the dataset.

fkAggregate	Field represents a maintained aggregate in a client dataset.


TFieldType type
 VCL Reference

TFieldType type

TFieldType is a set of values that parallel the data types of fields in tables.

Unit

DB

type TFieldType = (ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString, ftLargeint, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, ftVariant, ftInterface, ftIDispatch, ftGuid, ftTimeStamp, ftFMTBcd);

Description

TFieldType type is the set of values for the DataType property field objects, field definition objects, and parameter objects. Classes in which TFieldType values are used include TField (and descendants), TFieldDef, TParam, TParameter, and TAggregate. TFieldType values are also used in field-related functions and methods like TFieldDefs.Add. The following table describes each value:

Value	Description

ftUnknown	Unknown or undetermined

ftString	Character or string field

ftSmallint	16-bit integer field

ftInteger	32-bit integer field

ftWord	16-bit unsigned integer field

ftBoolean	Boolean field

ftFloat	Floating-point numeric field

ftCurrency	Money field

ftBCD	Binary-Coded Decimal field that can be converted to Currency type without a loss of precision.

ftDate	Date field

ftTime	Time field

ftDateTime	Date and time field

ftBytes	Fixed number of bytes (binary storage)

ftVarBytes	Variable number of bytes (binary storage)

ftAutoInc	Auto-incrementing 32-bit integer counter field

ftBlob	Binary Large OBject field

ftMemo	Text memo field

ftGraphic	Bitmap field

ftFmtMemo	Formatted text memo field

ftParadoxOle	Paradox OLE field

ftDBaseOle	dBASE OLE field

ftTypedBinary	Typed binary field

ftCursor	Output cursor from an Oracle stored procedure (TParam only)

ftFixedChar	Fixed character field

ftWideString	Wide string field

ftLargeint	Large integer field

ftADT	Abstract Data Type field

ftArray	Array field

ftReference	REF field

ftDataSet	DataSet field

ftOraBlob	BLOB fields in Oracle 8 tables

ftOraClob	CLOB fields in Oracle 8 tables

ftVariant	Data of unknown or undetermined type

ftInterface	References to interfaces (IUnknown)

ftIDispatch	References to IDispatch interfaces

ftGuid	globally unique identifier (GUID) values

ftTimeStamp	Date and time field accessed through dbExpress

ftFMTBcd	Binary-Coded Decimal field that is too large for ftBCD.


TFilterOption, TFilterOptions type
 VCL Reference

TFilterOption, TFilterOptions type

Influences how filter strings are applied.

Unit

DB

type

  TFilterOption = (foCaseInsensitive, foNoPartialCompare);

  TFilterOptions = set of TFilterOption;

Description

TFilterOptions is a set that specifies how filter expressions are applied to string fields. It can contain zero or more of the following values:

Value	Meaning

foCaseInsensitive	Literal strings in the filter are compared to string-valued fields case-insensitively.

foNoPartialCompare	Asterisks (*) in the filter are treated as literal characters rather than as wildcards. When filter options does not include foNoPartialCompare, strings that end in an asterisk signify a partial string match with the asterisk matching any number of characters.


TGetTableNameEvent type
 VCL Reference

TGetTableNameEvent type

TGetTableNameEvent is the type for an OnGetTableName event handler.

Unit

Provider

type TGetTableNameEvent = procedure(Sender: TObject; DataSet: TDataSet; var TableName: string) of object;

Description

The Sender parameter is the provider that needs the table name for applying updates.

The DataSet parameter is the dataset to which updates should be applied. This may be the provider’s source dataset or a nested detail dataset.

The TableName parameter returns the name of the target table. This is the name used in generated SQL statements that insert, delete, or modify records.


TIndexOptions type
 VCL Reference

TIndexOptions type

Describes the attributes of an index.

Unit

DB

type

  TIndexOption = (ixPrimary, ixUnique, ixDescending, ixCaseInsensitive, ixExpression, ixNonMaintained);

  TIndexOptions = set of TIndexOption;

Description

TIndexOptions is a set of attributes that applies to a specific index. A TIndexOptions value can include zero or more of the following values:

Value	Description

ixPrimary	The index is the primary index of the table. (Not applicable to dBASE tables).

ixUnique	Each value in the index is unique; there are no duplicates. (Not applicable to all table types.)

ixDescending	The index imposes a descending sort order. (Not applicable to all table types.)

ixExpression	The index is based on a dBASE key expression. (Only applicable to dBASE tables).

ixCaseInsensitive	The index sorts records case insensitively. (Not applicable to all table types.)

ixNonMaintained	The index is not automatically updated when the data is edited. (Not applicable to all table types.)

Warning:	Attempting to create an index using options that are not applicable to the table type causes AddIndex to raise an exception.

Not all table types support use of all of the above index options. Even within a particular table type, any given option may only be supported in certain versions of a table type. See the BDE Administrator or Database Explorer utility for information on local table levels.

dBASE tables only support primary indexes and true unique indexes when the table level is 7 or higher (concurrent with Visual dBASE 7). dBASE tables do not support case-insensitive or descending indexes at all. Use the ixExpression constant when the index is based on multiple fields or uses dBASE data manipulation language functions (that is, for expression indexes). The ixExpression constant is only applicable to dBASE tables.

Paradox tables support the ixDescending for secondary indexes if the table level is 7 or higher and the ixUnique constant if the table level is 5 or higher. The ixDescending and ixCaseInsensitive constants are not applicable to primary indexes.

For other table types, see the vendor-supplied documentation for the particular database system for details on what index options are applicable.


TLocale type
 VCL Reference

TLocale type

See also

TLocale is the type for the Locale or DBLocale property.

Unit

DBTables

type TLocale = Pointer;

Description

The TLocale type is the type of a Locale or DBLocale property. It is used for direct calls to BDE. These properties are only used or needed when making direct calls to the Borland Database Engine.

Note:	Do not confuse TLocale with the TSysLocale type that represents a Windows locale.  TLocale is specific to the Borland Database Engine.


TLocaleCode type
 VCL Reference

TLocaleCode type

See also

TLocaleCode identifies a locale, which imposes a sort order on data.

Unit

SqlExpr

type TLocaleCode = Integer;

Description

TLocaleCode is an integer that corresponds to a locale. A locale identifies the language of a string, and implies a sort order and character set. The TLocaleCode type corresponds to the WIndows LCID, but omits an explicit sort order.

The following table lists the possible values:

LocaleCode	Sort order
1024	Used to specify locales that do not have a code.
1025	Arabic (Afghanistan) or Pashto
1026	Bulgarian
1027	Catalan
1028	Chinese (Taiwan)
1029	Czech
1030	Danish
1031	German (Germany)
1032	Greek
1033	English (US)
1034	Spanish (Cuba & Andora)
1035	Finnish
1036	French (France)
1037	Hebrew
1038	Hungarian
1039	Icelandic
1040	Italian (Italy)
1041	Japanese
1042	Korean
1043	Dutch (Netherlands)
1044	Norwegian (Norway)
1045	Polish
1046	Portuguese (Brazil)
1047	Rhaeto-Romance
1048	Romanian (Romania)
1049	Russian (Russia & Ukraine)
1050	Serbo-Croatian (Croatia & Slovakia)
1051	Slovak
1052	Albanian
1053	Swedish (Sweden)
1054	Thai
1055	Turkish
1056	Urdu (Pakistan)
1057	Indonesian
1058	Ukrainian
1059	Byelorussian
1060	Slovenian
1061	Estonian
1062	Latvian
1063	Lithuanian
1065	Persian
1066	Vietnamese
1067	Armenian
1068	Azerbaijani
1069	Basque
1071	Macedonian
1073	Tsonga
1074	Setswana
1076	Xhosa
1077	Zulu
1078	Afrikaans
1079	Georgian
1080	Faeroese
1081	Hindi
1082	Maltese
1084	Scots Gaelic
1085	Yiddish
1086	Malay (Malaysia)
1089	Swahili
1091	Uzbek
1092	Tatar
1093	Bengali
1094	Punjabi
1095	Gujarati
1096	Oriya
1097	Tamil
1098	Telugu
1099	Kannada
1100	Malayalam
1101	Assanese
1102	Marathi
1103	Sanskrit
1111	Korean
1113	Sindhi
1120	Kashmiri
1121	Nepali
2049	Arabic (Iraq)
2052	Chinese (China)
2055	German (Switzerland)
2057	English (UK)
2058	Spanish (Mexico)
2060	French (Belgium)
2064	Italian (Switzerland)
2067	Dutch (Belgium)
2068	Nowegian (Norway)
2070	Protuguese (Portugal)
2072	Romanian (Macau)
2073	Russian (Macau)
2074	Serbo-Croatian (Yugoslavia)
2077	Swedish (Finland)
2080	Urdu (India)
2092	Azerbaijani
2110	Malay (Brunei Darussalam)
2115	Uzbek
2144	Kashmiri (India)
2145	Nepali (India)
3073	Arabic (Egypt)
3076	Chinese (Hong Kong)
3079	German (Austria)
3081	English (Australia, Belgium, or Botswana)
3082	Spanish (Spain)
3084	French (Canada)
3098	Serbian (Yugoslavia)
4097	Arabic (Libya)
4100	Chinese (Singapore)
4103	German (Luxembourg)
4105	English (Canada)
4106	Spanish (Guatemala)
4108	French (Switzerland)
5121	Arabic (Algeria)
5124	Chinese (Macau)
5127	German (Liechtenstein)
5129	English (Singapore or New Zealand)
5130	Spanish (Costa Rica)
5132	French (Luxembourg)
6145	Arabic (Morocco)
6153	English (Ireland)
6154	Spanish (Panama)
6156	French (Monaco)
7169	Arabic (Tunisia)
7177	English (South Africa)
7178	Spanish (Dominican Republic)
8193	Arabic (Oman)
8201	English (Jamaica)
8202	Spanish (Venezuela)
9217	Arabic (Yemen)
9225	English (American Samoa)
9226	Spanish (Colombia)
10241	Arabic (Syria)
10249	English (Belize)
10250	Spanish (Peru)
11265	Arabic (Jordan)
11273	English (Trinidad & Tobago)
11274	Spanish (Argentina)
12289	Arabic (Lebanon)
12297	English (Zimbabwe)
12298	Spanish (Ecuador)
13313	Arabic (Kuwait)
13321	English (Philippines)
13322	Spanish (Chile)
14337	Arabic (United Arab Emirates)
14346	Spanish (Uruguay)
15361	Arabic (Bahrain)
15370	Spanish (Paraguay)
16385	Arabic (Qatar)
16394	Spanish (Bolivia)
17418	Spanish (El Salvador)
18442	Spanish (Honduras)
19466	Spanish (Nicaragua)
20490	Spanish (Puerto Rico)


TLocateOptions type
 VCL Reference

TLocateOptions type

TLocateOptions defines the values for the Options parameter of the Locate method of a dataset.

Unit

DB

type
  TLocateOption = (loCaseInsensitive, loPartialKey);
  TLocateOptions = setof TLocateOption;

Description

TLocateOptions is the type of the Options parameter to a dataset’s Locate method. The following table lists the possible values:

Value	Description

loCaseInsensitive	Key fields and key values are matched without regard to case.

loPartialKey	Key values can include only part of the matching key field value; for example, 'HAM' would match both 'HAMM' and 'HAMMER.'


TLockType type
 VCL Reference

TLockType type

Indicates how a Paradox or dBASE table can be locked.

Unit

DBTables

type TLockType = (ltReadLock, ltWriteLock);

Description

TLockType identifies the type of a BDE lock on a Paradox or dBASE table. The following table lists the possible values:

Value	Description

ltReadLock	Other applications (or sessions) can not read from the table.

ltWriteLock	Other applications (or sessions) can not write to the table.'


TNavigateBtn type
 VCL Reference

TNavigateBtn type

TNavigateBtn defines values identifying different possible buttons on a TDBNavigator object.

Unit

DBCtrls

type TNavigateBtn = (nbFirst, nbPrior, nbNext, nbLast, nbInsert, nbDelete, nbEdit, nbPost, nbCancel, nbRefresh);

Description

Each TNavigateBtn value identifies a different button that can appear on a TDBNavigator object. The following table lists all the button types, their corresponding TNavigateBtn values, and the action associated with each button:

Button	Value	Action

First	nbFirst	Go to the first record

Prior	nbPrior	Go to the previous record

Next	nbNext	Go to the next record

Last	nbLast	Go to the last record

Insert	nbInsert	Insert a blank record

Delete	nbDelete	Delete the current record

Edit	nbEdit	Permit users to edit the current record

Post	nbPost	Post the current record

Cancel	nbCancel	Cancel the current edit

Refresh	nbRefresh	Refresh the data in the dataset


TParamType, TParamTypes types
 VCL Reference

TParamType, TParamTypes types

TParamType and TParamTypes represent the use of parameters on datasets that represent queries or stored procedures.

Unit

DB

type

  TParamType = (ptUnknown, ptInput, ptOutput, ptInputOutput, ptResult);

  TParamTypes = set of TParamType;

Description

TParamType indicates how a query or stored procedure parameter is used. TParamTypes is a set of parameter types that can be used to filter parameters so that an application need only work with those parameters that are of interest.

The DbClient unit defines a constant, AllParamTypes, of type TParamTypes that represents any possible parameter type:

const AllParamTypes = [ptUnknown, ptInput, ptOutput, ptInputOutput, ptResult];

TParamType includes the following values:

Value	Description

ptUnknown	Unknown or undetermined. Before executing a stored procedure, the application must set parameters of this type to another kind.

ptInput	Used to input a field value. Identifies a parameter used to pass values to a query or stored procedure for processing.

ptOutput	Used to output a field value. Identifies a parameter used by a stored procedure to return values to an application.

ptInputOutput	Used for both input and output.

ptResult	Used as a return value. Identifies a parameter used by a stored procedure to return an error or status value. A stored procedure can only have one parameter of type ptResult.


TProviderDataEvent type
 VCL Reference

TProviderDataEvent type

TProviderDataEvent is the type for event handlers that let an application process data when it is received from a client or about to be sent to a client.

Unit

Provider

type TProviderDataEvent = procedure(Sender: TObject; DataSet: TCustomClientDataSet) of object;

Description

Use TProviderDataEvent to edit the data in a data packet or update packet.

The Sender parameter identifies the provider that is about to send DataSet to a client or about to apply the updates in DataSet.

The DataSet parameter is a data packet that the provider just received from or is about to send to a client. It can be an update packet containing the updated, deleted, and inserted records from a client, or it can be a data packet of records to be sent to the client.


TResolverErrorEvent type
 VCL Reference

TResolverErrorEvent type

TResolverErrorEvent is the type for OnUpdateError event handlers.

Unit

Provider

type TResolverErrorEvent = procedure(Sender: TObject; DataSet: TCustomClientDataSet; E: EUpdateError; UpdateKind: TUpdateKind; var Response: TResolverResponse) of object;

Description

Sender is the provider that is currently applying updates.

DataSet is a temporary client dataset to use for accessing data during the update process. Use the OldValue, NewValue, and CurValue properties of this dataset’s field components to view the changed fields and determine the cause of the problem.

Warning:	The event handler must not call any methods that make a different record the current one.

E is an EUpdateError object from which the error handler can extract an error message and the actual cause of the error condition. This information can help determine how to respond to the error condition.

UpdateKind describes the type of update that generated the error. It can specify the edit of an existing record (ukModify), the insertion of a new record (ukInsert), or the deletion of an existing record (ukDelete).

Response indicates the action to take when the OnUpdateError handler exits. On entry into the handler, Response is set to either rrAbort or rrSkip, based on the MaxErrors parameter passed to the ApplyUpdates function that triggers this event. If MaxErrors is 0 then Response is rrAbort; otherwise it is rrSkip. If the event handler can handle or correct the error, it should set Response to rrApply before exiting.


TSchemaType, TSQLSchemaInfo types
 VCL Reference

TSchemaType, TSQLSchemaInfo types

TSchemaType and TSchemaInfo describe schema information (metadata) to access using DBXpress.

Unit

SqlExpr

type

  TSchemaType = (stNoSchema, stTables, stSysTables, stProcedures, stColumns, stProcedureParams, stIndexes );

  TSchemaInfo = record

    FType      : TSchemaType;

    ObjectName : String;

    Pattern    : String;

  end;

Description

Use TSchemaInfo to describe the metadata you want to fetch from a database server when you are using an SQL dataset. TSchemaInfo has three members, FType, ObjectName, and Pattern, which are described below.

FType is of type TSchemaType. It identifies the type of information you want. It can have any of the following values:

Value	Description

stNoSchema	No schema information. When FType is stNoSchema, the SQL dataset is populated with the results of its query or stored procedure rather than metadata from the server.

stTables	Information about all the data tables on the database server that match the criteria specified by the SQL connection’s TableScope property.

stSysTables	Information about all of the system tables on the database server. Not all servers use system tables to store metadata. Requesting a list of system tables from a server that does not use them results in an empty dataset.

stProcedures	Information about all of the stored procedures on the database server.

stColumns	Information about all of the columns (fields) in a specified table.

stProcedureParams	Information about all of the parameters of a specified stored procedure.

stIndexes	Information about all of the indexes defined for a specified table.

ObjectName is the name of the table or stored procedure about whose columns, indexes, or parameters you want information. When FType is stColumns or stIndexes, ObjectName is the name of a table. When FType is stProcedureParams, ObjectName is the name of a stored procedure. When FType is stNone, stTables, stSysTables, or stProcedures, ObjectName is ignored.

Pattern is an SQL pattern mask that limits the items returned. The name of each item (table, stored procedure, field, parameter, or index) must match this pattern mask or it does not appear as a record when the SQL dataset is opened. Pattern uses the wildcards ‘%’ (to match a string of arbitrary characters of any length) and ‘_’ (to match a single arbitrary character). To use a literal percent or underscore in a pattern, the character is doubled (%% or __). If you do not want to use a pattern, set Pattern to nil.


TSQLCallbackEvent type
 VCL Reference

TSQLCallbackEvent type

TSQLCallbackEvent is the type for a callback that monitors SQL messages between a TSQLConnection component and a database server.

Unit

DBXpress

type

  TRACECat = TypedEnum;

  TSQLCallbackEvent = function(CallType: TRACECat; CBInfo: Pointer): CBRType; stdcall;

Description

TSQLCallbackEvent is the type of TSQLConnection’s TraceCallbackEvent property.

TSQLCallbackEvent includes the following parameters:

Parameter	Description

CallType	Indicates the type of callback function. Only one value is possible: cbTRACE, which indicates that the callback is executed for every message that passes between the driver and the database server.

CBInfo	A pointer to a SQLTRACEDescrecord. SQLTRACEDesc includes the text of the message just passed, the category of the message, and a user-defined value that was passed to the SetTraceCallbackEvent method.

TSQLCallbackEvent returns a value indicating how monitoring should proceed. Typically, this is cbrUSEDEF. Other possible return values are cbrCONTINUE, cbrABORT, cbrCHKINPUT, cbrYES, cbrNO, cbrPARTIALASSIST, cbrSKIP, and cbrRETRY.


TSqlCommandType type
 VCL Reference

TSQLCommandType type

TSQLCommandType indicates how an SQL dataset specifies the command it executes.

Unit

SqlExpr

type TSQLCommandType = (ctQuery, ctTable, ctStoredProc);

Description

TSQLCommandType describes the way you indicate the query or stored procedure that a dbExpress dataset represents. The following table lists the possible values:

Value	Represent the query or stored procedure as

ctQuery	An SQL statement to execute.

ctTable	The name of a table on the database server. The SQL dataset automatically generates a SELECT statement to fetch all the records on all the fields in this table.

ctStoredProc	The name of a stored procedure.


TSQLExceptionType type
 VCL Reference

TSQLExceptionType type

TSQLExceptionType indicates the type of operation that leads to an ESQLException exception.

Unit

SqlExpr

type TSQLExceptionType = (exceptConnection, exceptCommand, exceptCursor, exceptMetaData, exceptUseLast);

Description

ESQLException objects use TSQLExceptionType to identify the dbExpress object from which an error code originated. By identifying the underlying dbExpress object, ESQLException identifies that object’s interface, which it then uses to obtain an error message.

TSQLExceptionType includes the following values:

Value	Description

exceptConnection	Error arose when establishing a connection to the database server, obtaining an interface for sending a command, fetching server metadata, or controlling a transaction.

exceptCommand	Error occurred while preparing or executing an SQL command.

exceptCursor	Error occurred while fetching data from a dbExpress cursor.

exceptMetaData	Error occurred while trying to fetch metadata (schema information).

exceptUseLast	The error is cached by the TSQLConnection component.


TSQLTimeStamp type
 VCL Reference

TSQLTimeStamp type

See also

TSQLTimeStamp represents time and date values with a high degree of accuracy.

Unit

SqlTimSt

type TSQLTimeStamp = packedrecord

    Year : SmallInt;

    Month : Word;

    Day : Word;

    Hour : Word;

    Minute : Word;

    Second : Word;

    Fractions : LongWord;

  end;

Description

The dbExpress database drivers use TSQLTimeStamp when working with date and time information. Year specifies a year from 1 to 9999. Month specifies a month from 1 to 12. Day specifies a day of the month, from 1 through 28, 29, 30, or 31, depending on the Month value. Hour specifies the hour from 0 to 23. Minute and Second can range from 0 to 59. Fractions specifies milliseconds from 0 to 999.

You can create a Variant that represents a TSQLTimeStamp value using the VarSQLTimeStampCreate function. In fact, the easiest way to manipulate TSQLTimeStamp values is to create such a Variant and use the built-in operators provided by the Variant type.


TSQLTraceFlag, TSQLTraceFlags types
 VCL Reference

TSQLTraceFlag, TSQLTraceFlags types

Indicates the type of an SQL command that is being monitored.

Unit

SQLExpr

type

  TSQLTraceFlag = (traceQPREPARE, traceQEXECUTE, traceERROR, traceSTMT, traceCONNECT, traceTRANSACT, traceBLOB, traceMISC, traceVENDOR, traceDATAIN, traceDATAOUT);

  TSQLTraceFlags = set of TSQLTraceFlag;

Description

TSQLTraceFlags is used by TSQLMonitor to indicate the type of SQL commands it monitors. It is a set of TSQLTraceFlag values.

TSQLTraceFlag is also used as a parameter to a trace callback assigned to TSQLConnection.

TSQLTraceFlag can have the following values:

Value	Type of SQL command

traceQPREPARE	Prepared queries sent to the server

traceQEXECUTE	Queries to be executed by the server. Note that a single statement may be prepared once and executed several times with different parameter bindings.

traceERROR	Error messages returned by the server.  The error message may include an error code, depending on the server.

traceSTMT	Operations to be performed such as ALLOCATE, PREPARE, EXECUTE, and FETCH.

traceCONNECT	Operations associated with connecting and disconnecting to databases, including allocation of connection handles and freeing connection handles, if required by server.

traceTRANSACT	Transaction operations such as BEGIN, COMMIT, and ROLLBACK (ABORT).

traceBLOB	Operations on Binary Large Object (BLOB) data, including STORE BLOB, GET BLOB HANDLE, and so on.

traceMISC	Commands not covered by any other value.

traceVENDOR	API function calls to the server.  For example, ORLON for Oracle, ISC_ATTACH for InterBase.

traceDATAIN	Parameter data sent to servers when doing INSERTs or UPDATEs.

traceDATAOUT	Data retrieved from the server.


TTransactionDesc type
 VCL Reference

TTransactionDesc type

TTransactionDesc describes a transaction.

type

  TTransIsolationLevel = (xilDIRTYREAD, xilREADCOMMITTED, xilREPEATABLEREAD, xilCUSTOM);

  TTransactionDesc = packed record

     TransactionID    : LongWord;

     GlobalID         : LongWord;

     IsolationLevel   : TTransIsolationLevel;

     CustomIsolation  : LongWord;

     end;

Description

TTransactionDesc describes a dbExpress transaction that an application is starting, committing, or rolling back.

TransactionID is a unique identifier for the transaction. The transaction identifier is assigned when you call StartTransaction, and identifies the transaction in subsequent method calls. The value you assign to TransactionID must not match the identifier of any other active transaction.

GlobalID is used for ORACLE transactions.

IsolationLevel indicates the degree to which this transaction is isolated from other transactions. It can be any of the following values:

Value	Meaning

xilDIRTYREAD	Current transaction sees all changes made by other transactions, even if they have not yet been committed. This option is not available for the Oracle driver.

xilREADCOMMITTED	Current transaction sees only changes that have been committed, but can receive an inconsistent view of the data if additional changes are committed before the transaction ends.

xilREPEATABLEREAD	Current transaction is guaranteed a consistent view of the data, which includes only changes committed by other transactions at the start of the transaction.

xilCUSTOM	Current transaction uses a database-specific isolation level. If IsolationLevel is xilCustom, the actual isolation level is given by the CustomIsolation field.  This is not currently supported by any dbExpress drivers.

CustomIsolation identifies a custom isolation level when the IsolationLevel field is xilCUSTOM.


TUpdateAction type
 VCL Reference

TUpdateAction type

Indicates how an a dataset should proceed after an event handler has processed an update.

Unit

DB

type TUpdateAction = (uaFail, uaAbort, uaSkip, uaRetry, uaApplied);

Description

TUpdateAction is the type of a parameter on event handlers that intervene when applying cached updates (without using a client dataset and provider). The following table lists the possible values:

Value	Meaning

uaAbort	Abort the update operation without displaying an error message.

uaApplied	The event handler applied the update (not used in error handling event handlers). Free the current record update from the cache.

uaFail	Abort the update operation and display an error message.

uaRetry	Repeat the update operation that originally raised the error condition (not used in OnUpdateRecord event handlers).

uaSkip	Skip updating the current record and leave the unapplied changes in the cache.


TUpdateKind type
 VCL Reference

TUpdateKind type

TUpdateKind defines the values for the UpdateKind parameter of OnUpdateError and OnUpdateRecord event handlers.

Unit

DB

type TUpdateKind = (ukModify, ukInsert, ukDelete);

Description

The TUpdateKind type defines the possible values for the UpdateKind parameter of OnUpdateError and OnUpdateRecord event handlers, as described in the following table:

Value	Description

ukModify	The cached update to the record is a modification to the record's contents.

ukInsert	The cached update is the insertion of a new record.

ukDelete	The cached update is the deletion of a record.


TUpdateMode type
 VCL Reference

TUpdateMode type

See also

Indicates how to locate records so that they can be updated.

Unit

DB

type TUpdateMode = (upWhereAll, upWhereChanged, upWhereKeyOnly);

Description

TUpdateMode is the type of the UpdateMode property. UpdateMode specifies how the records are located when the ApplyUpdates method is called. TUpdateMode includes the following values:

Value	Meaning

upWhereAll	All columns (fields) are used to locate the record.

upWhereChanged	Only key field values and the original value of fields that have changed are used to find the record.

upWhereKeyOnly	Only key fields are used to find the record.


TUpdateStatus type
 VCL Reference

TUpdateStatus type

See also

Indicates the update status of a record.

Unit

DB

type

  TUpdateStatus = (usUnmodified, usModified, usInserted, usDeleted);

Description

TUpdateStatus is the return type of the UpdateStatus method. UpdateStatus indicates what change, if any, is cached for the current record. TUpdateStatus includes the following values:

Value	Description

usUnmodified	The current record has no unapplied updates.

usModified	The current record has unapplied modifications.

usInserted	The current record has been inserted but the insertion was not applied.

usDeleted	The current record represents a deleted record, where the deletion has not yet been applied.


TDefCollection
 VCL Reference

TDefCollection

Hierarchy	Properties	Methods	See also

TDefCollection holds the definition objects (TNamedItem) that represent the specifications for database entities such as fields or indexes.

Unit

DB

Description

TDefCollection is used as a base class for collections of definition objects such as index or field definitions. TTable objects and TClientDataSet objects use these definition objects to specify the attributes of a database entity before creating the underlying table or dataset.

Use the properties and methods of TDefCollection to:

Access a specific definition object.

Add or delete definition objects from the list.

Find out how many definition objects are defined.

Copy a set of definitions to another dataset.


 VCL Reference

TDefCollection properties

TDefCollection	Alphabetically	Legend

In TDefCollection

Dataset

Updated

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TDefCollection properties

TDefCollection	By object	Legend

Count

Dataset

ItemClass

Items

Updated


TDefCollection.Dataset
 VCL Reference

TDefCollection.Dataset

TDefCollection	See also

Indicates the dataset that uses the TDefCollection object to manage its definition objects.

property Dataset: TDataSet;

Description

Use Dataset to access the dataset that uses the definitions in the Items array.


TDefCollection.Updated
 VCL Reference

TDefCollection.Updated

TDefCollection	See also

Indicates whether the definition objects in the Items array match the corresponding instantiated objects in the dataset.

property Updated: Boolean;

Description

Use Updated to determine whether the definitions managed by the TDefCollection object match the corresponding entities (fields or indexes) of the dataset.  Updated is set to True when the definitions are retrieved from the dataset at design time, or when the definitions are used to create the corresponding entities in the dataset.  Updated is set to False when the properties of the definition objects are changed.


 VCL Reference

TDefCollection methods

TDefCollection	Alphabetically	Legend

In TDefCollection

Create

Find

GetItemNames

IndexOf

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDefCollection methods

TDefCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Find

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemNames

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TDefCollection.Create
 VCL Reference

TDefCollection.Create

TDefCollection	See also

Instantiates a TDefCollection object.

constructor Create(ADataset: TDataSet; AOwner: TPersistent; AClass: TCollectionItemClass);

Description

Do not call the Create method. TDefCollection objects are created by the dataset that uses them to manage definition objects. The ADataset parameter specifies the dataset that creates the TDefCollection object.  It becomes the value of the Dataset property. The AOwner parameter indicates the object on whose behalf the definition is created. The AClass parameter specifies a descendant class of TNamedItem, and indicates the type of definition objects in the Items property array.


TDefCollection.Find
 VCL Reference

TDefCollection.Find

TDefCollection	See also

Locates a definition object in the Items array from its name.

function Find(const AName: string): TNamedItem;

Description

Call Find to obtain information about a particular definition object. Specify the name of the definition object as the value of the Name parameter.


TDefCollection.GetItemNames
 VCL Reference

TDefCollection.GetItemNames

TDefCollection 	See also

Fills a TStrings object with the names of all definitions in the list.

procedure GetItemNames(List: TStrings);

Description

Call GetItemNames to retrieve the names of all definitions managed by the TDefCollection object. Pass an empty string list as the List parameter. GetItemNames fills the string list with the names of all definitions.


TDefCollection.IndexOf
 VCL Reference

TDefCollection.IndexOf

TDefCollection	See also

Finds the index number of a definition in the Items array from its name.

function IndexOf(const AName: string): Integer;

Description

Use the IndexOf method to locate the position of a definition in the Items property array. IndexOf returns a value from zero (the first position) to Count - 1. Specify the name of the definition as the Name parameter.

If Items contains no definition with the specified Name, the return value is -1.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TDefCollection


TDependency
 VCL Reference

TDependency

Hierarchy	Properties	Methods	See also

TDependency object represents a dependent service or load ordering group used by TService objects.

Unit

SvcMgr

Description

A TDependency object represents a new service or load ordering group that must start before the service represented by a TService object. Collections of dependency objects are TDependencies objects. TService has Dependencies and LoadGroup properties that use dependency collections. Each dependency has a Name property that identifies the service or load ordering group, and a boolean IsGroup property to indicate whether the dependency represents a load ordering group.


 VCL Reference

TDependency properties

TDependency	Alphabetically	Legend

In TDependency

DisplayName

IsGroup

Name

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TDependency properties

TDependency	By object	Legend

Collection

DisplayName

ID

Index

IsGroup

Name


TDependency.DisplayName
 VCL Reference

TDependency.DisplayName

TDependency	Properties 	See also

Represents the name of the dependent service as displayed in the property editor window.

property DisplayName: string;

Description

DisplayName is the string that represents the Dependency service as displayed in the Dependencies property editor window for the TService component. By default, DisplayName is the same as the Name property, unless Name is an empty string. In that case, DisplayName is the same as ClassName.

Note: A dependency can be a service. If this is true, do not confuse the various name-related properties of dependency and service objects. For more information, see Service name properties.


TDependency.IsGroup
 VCL Reference

TDependency.IsGroup

TDependency	Properties	See also

Indicates whether the dependency represents a load ordering group for a service (TService object).

property IsGroup: Boolean;

Description

IsGroup indicates whether the dependency represents a load ordering group.

Note: Because services and service groups share the same name space, group names must be prefixed by the SC_GROUP_IDENTIFIER character to distinguish them from service names. If IsGroup is set to true, SC_GROUP_IDENTIFIER will automatically be prefixed to the Dependency name (Name property). DisplayName is not modified.


TDependency.Name
 VCL Reference

TDependency.Name

TDependency	Properties 	See also

Identifies the dependent service or load ordering group used by a TService object.

property Name: String;

Description

Name is the name identifying the service or load ordering group. If Name is the name of a service, Name reflects the actual ServiceStartName of a TService instance.

The property editor for the Dependencies property of TService technically uses the dependency’s DisplayName to identify the dependency service in its collection list. However, Name and DisplayName are nearly always the same.

Dependency objects that are load ordering groups are prefixed by SC_GROUP_IDENTIFIER. Setting the IsGroup property handles prefixing the Name automatically.

Note: A dependency can be a service. If this is true, do not confuse the various name-related properties of dependency and service objects. For more information, see Service name properties.


 VCL Reference

TDependency methods

TDependency	Alphabetically	Legend

Derived from TCollectionItem

Create

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDependency methods

TDependency	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TPersistent

TCollectionItem

TDependency


TDetailDataLink
 VCL Reference

TDetailDataLink

Hierarchy	Properties	Methods 	See also

TDetailDataLink is the ancestor to datalink classes that manage the relationships between datasets that are linked in master/detail relationships.

Unit

DB

Description

TDetailDataLink descendants are used to create master/detail relationships. They underlie the DataSource property of dataset components.

TDetailDataLink has two descendants,

TMasterDataLink, which is used by BDE-enabled datasets, ADO-based datasets, and client datasets.

TSQLDataLink, which is used by unidirectional datasets.


 VCL Reference

TDetailDataLink properties

TDetailDataLink	Alphabetically	Legend

In TDetailDataLink

DetailDataSet

Derived from TDataLink

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TDetailDataLink properties

TDetailDataLink	By object	Legend

Active

ActiveRecord

BOF

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

ReadOnly

RecordCount


TDetailDataLink.DetailDataSet
 VCL Reference

TDetailDataLink.DetailDataSet

TDetailDataLink 	See also

Indicates the detail dataset in the master/detail relationship.

property DetailDataSet: TDataSet;

Description

Read DetailDataSet to access the detail dataset. This is the dataset that uses a DetailDataLink to access its master dataset. The detail dataset is the detail datalink’s owner, and uses the datalink to implement its DataSource property.

Note:	Do not confuse the DetailDataSet property with the DataSet property. The DataSet property is the dataset whose data events the detail datalink tracks. That is, DataSet is the master dataset while DetailDataSet is the detail set.


 VCL Reference

TDetailDataLink methods

TDetailDataLink	Alphabetically	Legend

In TDetailDataLink

GetDetailDataSet

Derived from TDataLink

Create

Destroy

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDetailDataLink methods

TDetailDataLink	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

FreeInstance

Free

GetDetailDataSet

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

UpdateAction

UpdateRecord


TDetailDataLink.GetDetailDataSet
 VCL Reference

TDetailDataLink.GetDetailDataSet

TDetailDataLink	See also

Returns the value of the DetailDataSet property.

function GetDetailDataSet: TDataSet; virtual;

Description

GetDetailDataSet is the protected read implementation of the DetailDataSet property. As implemented in TDetailDataLink, GetDetailDataSet always returns nil. Descendants override this method to return the dataset that uses the data link to link to a master dataset.


Hierarchy

TObject

TPersistent

TDataLink

TDetailDataLink


TWebDispatcher
 VCL Reference

 TWebDispatcher

Hierarchy	Properties	Methods	Events	Using TWebDispatcher	See also

TWebDispatcher passes HTTP request message on to the appropriate action items that assemble a response.

Unit

HTTPApp

Description

Use TWebDispatcher to convert an ordinary data module to a Web module. Add a TWebDispatcher object to an existing data module that contains other non-visual components and business rules for the Web application. Then delete the automatically generated Web module from the Web application and replace it with the data module that now contains the Web dispatcher.

TWebDispatcher enables the Web server application to respond to HTTP request messages. Only one Web dispatcher can be added to an application. This is why the automatically generated Web module, which is a type of Web dispatcher, must be deleted from the Web application before the data module containing TWebDispatcher can be added.

The TWebDispatcher object manages a collection of action items which know how to respond to HTTP request messages. View, add and delete the action items managed by the dispatcher using the Action editor which is opened by double clicking on the TWebDispatcher icon.

TWebDispatcher publishes some of the properties and events introduced by TCustomWebDispatcher, but introduces no new properties, events, or methods of its own.


 VCL Reference

TWebDispatcher properties

TWebDispatcher	Alphabetically	Legend

Derived from TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebDispatcher properties

TWebDispatcher	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag

VCLComObject


 VCL Reference

TWebDispatcher events

TWebDispatcher	Alphabetically	Legend

Derived from TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TWebDispatcher events

TWebDispatcher	By object	Legend

OnCreate

OnDestroy

OnException


 VCL Reference

TWebDispatcher methods

TWebDispatcher	Alphabetically	Legend

Derived from TCustomWebDispatcher

ActionByName

Create

Destroy

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebDispatcher methods

TWebDispatcher	By object	Legend

ActionByName

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TCustomWebDispatcher

TWebDispatcher


TDependencies
 VCL Reference

TDependencies

Hierarchy	Properties	Methods	See also

TDependencies is a container for TDependency objects.

Unit

SvcMgr

Description

TDependencies is a collection of TDependency objects, each of which represents a dependent service or load ordering group for a service (TService instance). TDependencies objects are the implementation of the Dependencies property of TService.


 VCL Reference

TDependencies properties

TDependencies	Alphabetically	Legend

In TDependencies

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TDependencies properties

TDependencies	By object	Legend

Count

ItemClass

Items


TDependencies.Items
 VCL Reference

TDependencies.Items

TDependencies	See also

Lists the dependency objects in the dependencies collection.

property Items[Index: Integer]: TDependency;

Description

The value of the Index parameter corresponds to the Index property of each TDependency object in the collection. It represents the position of the dependency object in the dependencies collection.


 VCL Reference

TDependencies methods

TDependencies	Alphabetically	Legend

In TDependencies

Create

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDependencies methods

TDependencies	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TDependencies.Create
 VCL Reference

TDependencies.Create

TDependencies	See also

Creates an instance of a TDependencies object.

constructor Create(Owner: TPersistent);

Description

Applications should not need to call the constructor directly. Instances of TService create the TDependencies object from their own constructors. The Owner parameter is the TService instance that uses the TDependencies object to implement its Dependencies property.

Create sets the TDependency owner to the Owner parameter and calls the inherited Create.


Hierarchy

TObject

TPersistent

TCollection

TDependencies


TDataSetAction
 VCL Reference

TDataSetAction

Hierarchy	Properties	Methods	Events	Using TDataSetAction	See also

TDataSetAction is the base class for action objects that act on dataset components.

Unit

DBActns

Description

TDataSetAction implements the common behavior for actions that work with datasets. Each descendant class performs a specific database function. Do not use TDataSetAction directly in an application. Instead, use a TDataSetAction descendant such as TDataSetCancel, TDataSetDelete, TDataSetEdit, TDataSetFirst, TDataSetInsert, TDataSetLast, TDataSetNext, TDataSetPost, TDataSetPrior, or TDataSetRefresh.

TDataSetAction ensures that the action is only enabled to work with a TDataSource component as its target. This TDataSource is first located as the data source that connects an active data-aware control to its source dataset. TDataSetAction saves this data source as the DataSource property, which descendants then use to perform their specific database functions.


 VCL Reference

TDataSetAction properties

TDataSetAction	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetAction properties

TDataSetAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TDataSetAction.DataSource
 VCL Reference

TDataSetAction.DataSource

TDataSetAction 	See also

Provides access to the target of the action.

property DataSource: TDataSource;

Description

DataSource is the data source that represents the dataset on which the action performs its function. You can set this property to indicate the dataset that is the target of the action.

If you do not explicitly set the DataSource property, it is obtained from an active data-aware control when the action fires.


 VCL Reference

TDataSetAction events

TDataSetAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetAction events

TDataSetAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetAction methods

TDataSetAction	Alphabetically	Legend

In TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetAction methods

TDataSetAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetAction.HandlesTarget
 VCL Reference

TDataSetAction.HandlesTarget

TDataSetAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the current target object.

HandlesTarget checks that the target of is a TDataSource component with a DataSet property that is not nil. If so, it returns True. If not, it returns False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction


TDataSetCancel
 VCL Reference

TDataSetCancel

Hierarchy	Properties	Methods	Events	Using TDataSetCancel	See also

TDataSetCancel cancels the edits to the current record, restores record display to its condition prior to editing, and takes the dataset out of edit mode.

Unit

DBActns

Description

Add TDataSetCancel to an action list to allow users to cancel edits made to a dataset in the application. Controls such as menu items and tool buttons linked to this action cause the application to cancel edits, restore record display, and take the associated dataset out of edit mode.

TDataSetCancel is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetCancel automatically disables itself if it does not have a target data source attached to an active dataset that is in edit mode.


 VCL Reference

TDataSetCancel properties

TDataSetCancel	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetCancel properties

TDataSetCancel	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetCancel events

TDataSetCancel	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetCancel events

TDataSetCancel	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetCancel methods

TDataSetCancel	Alphabetically	Legend

In TDataSetCancel

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetCancel methods

TDataSetCancel	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetCancel.ExecuteTarget
 VCL Reference

TDataSetCancel.ExecuteTarget

TDataSetCancel 	See also

Cancels unposted edits and takes the dataset out of edit mode.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Cancel method to back out any unposted edits and take the dataset out of edit mode.


TDataSetCancel.UpdateTarget
 VCL Reference

TDataSetCancel.UpdateTarget

TDataSetCancel 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetCancel, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is in edit mode. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetCancel


TDataSetDesigner
 VCL Reference

TDataSetDesigner

Hierarchy	Properties	Methods	See also

TDataSetDesigner is the base class for all dataset designers.

Unit

DB

Description

Use TDataSetDesigner when defining a design-time editor, such as the Fields editor, that enables a developer to specify the fields that belong to a dataset at design time. The dataset designer is specified as the designer property of a dataset that uses it to enable design-time specification of its structure.


 VCL Reference

TDataSetDesigner properties

TDataSetDesigner	Alphabetically 	Legend

In TDataSetDesigner

DataSet


 VCL Reference

TDataSetDesigner properties

TDataSetDesigner	By object 	Legend

DataSet


TDataSetDesigner.DataSet
 VCL Reference

TDataSetDesigner.DataSet

TDataSetDesigner 	See also

Provides a reference to the dataset currently being designed.

property DataSet: TDataSet;

Description

Use DataSet to access the dataset, if any, that is being designed. When the user specifies changes in the dataset designer, the changes can be made to the dataset specified by the DataSet property.


 VCL Reference

TDataSetDesigner methods

TDataSetDesigner	Alphabetically	Legend

In TDataSetDesigner

BeginDesign

Create

DataEvent

Destroy

EndDesign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataSetDesigner methods

TDataSetDesigner	By object	Legend

AfterConstruction

BeforeDestruction

BeginDesign

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataEvent

DefaultHandler

Destroy

Dispatch

EndDesign

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TDataSetDesigner.BeginDesign
 VCL Reference

TDataSetDesigner.BeginDesign

TDataSetDesigner 	See also

Ensures that the dataset is not active while design changes are made.

procedure BeginDesign;

Description

BeginDesign is called before changing the structure of the associated dataset. BeginDesign deactivates the dataset and disables any associated controls until the EndDesign method is called.


TDataSetDesigner.Create
 VCL Reference

TDataSetDesigner.Create

TDataSetDesigner	See also

Creates and initializes an instance of TDataSetDesigner.

constructor Create(DataSet: TDataSet);

Description

Call Create from the component editor of a specialized dataset to create an instance of the dataset designer. Create initializes the DataSet property of the dataset designer and the Designer property of the dataset.


TDataSetDesigner.DataEvent
 VCL Reference

 TDataSetDesigner.DataEvent

TDataSetDesigner

Provides the interface for a method that can respond to data events.

type TDataEvent = (deFieldChange, deRecordChange, deDataSetChange, deDataSetScroll, deLayoutChange, deUpdateRecord, deUpdateState, deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl, deConnectChange);

procedure DataEvent(Event: TDataEvent; Info: Longint); virtual;

Description

Call DataEvent to pass information about data events to the dataset designer. The Event parameter specifies the type of event that is occurring. Use the Info parameter to specify additional information about the event. The value of the Info parameter depends on the type of data event.

The DataEvent method for TDataSetDesigner does nothing when informed of a data event. Override this method to allow the data set designer to respond to different types of events.


TDataSetDesigner.Destroy
 VCL Reference

TDataSetDesigner.Destroy

TDataSetDesigner	See also

Disposes of an instance of TDataSetDesigner.

destructor Destroy; override;

Description

Do not call the Destroy method directly.  Instead, when freeing the dataset designer from a component editor, use the Free method.  Free checks that the dataset designer reference is not nil, and only then calls Destroy.

Destroy sets the Designer property of the associated dataset to nil before destroying the instance of TDataSetDesigner.


TDataSetDesigner.EndDesign
 VCL Reference

TDataSetDesigner.EndDesign

TDataSetDesigner 	See also

Reactivates the dataset if it was active when designing began.

procedure EndDesign;

Description

Call EndDesign when changes to the dataset are complete. EndDesign re-enables all controls that use the dataset and resets the Active property of the dataset to the value it help when BeginDesign was called.


Hierarchy

TObject

TDataSetDesigner


TDataSetEdit
 VCL Reference

TDataSetEdit

Hierarchy	Properties	Methods	Events	Using TDataSetEdit	See also

TDataSetEdit puts a target dataset into edit mode.

Unit

DBActns

Description

Add TDataSetEdit to an action list to allow users to put a dataset into edit mode. Controls such as menu items and tool buttons linked to this action cause the application to put a dataset into edit mode if it can.

TDataSetEdit is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetEdit automatically disables itself if it does not have a target data source attached to a dataset that permits edits.


 VCL Reference

TDataSetEdit properties

TDataSetEdit	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetEdit properties

TDataSetEdit	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetEdit events

TDataSetEdit	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetEdit events

TDataSetEdit	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetEdit methods

TDataSetEdit	Alphabetically	Legend

In TDataSetEdit

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetEdit methods

TDataSetEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetEdit.ExecuteTarget
 VCL Reference

TDataSetEdit.ExecuteTarget

TDataSetEdit 	See also

Puts the target dataset into edit mode.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Edit method to put the dataset into edit mode.


TDataSetEdit.UpdateTarget
 VCL Reference

TDataSetEdit.UpdateTarget

TDataSetEdit 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetEdit, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is permits edits and which is not already in edit mode. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetEdit


TDataSetLast
 VCL Reference

TDataSetLast

Hierarchy	Properties	Methods	Events	Using TDataSetLast	See also

TDataSetLast moves a target dataset to its last record.

Unit

DBActns

Description

Add TDataSetLast to an action list to allow users to navigate to the last record in a dataset. Controls such as menu items and tool buttons linked to this action cause the target dataset to move to the last record.

TDataSetLast is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. If you set DataSource, do not set it to a data source whose dataset is unidirectional. TDataSetLast automatically disables itself if it does not have a target data source attached to an active dataset that is not already on the last record.


 VCL Reference

TDataSetLast properties

TDataSetLast	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetLast properties

TDataSetLast	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetLast events

TDataSetLast	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetLast events

TDataSetLast	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetLast methods

TDataSetLast	Alphabetically	Legend

In TDataSetLast

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetLast methods

TDataSetLast	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetLast.ExecuteTarget
 VCL Reference

TDataSetLast.ExecuteTarget

TDataSetLast 	See also

Navigates to the last record of the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Last method to move to the last record.


TDataSetLast.UpdateTarget
 VCL Reference

TDataSetLast.UpdateTarget

TDataSetLast 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetLast, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and which is not already on the last record. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetLast


TDataSetField
 VCL Reference

TDataSetField

Hierarchy	Properties	Methods	Events 	Using TBytesField	See also

TDataSetField provides access to nested datasets.

Unit

DB

Description

TDataSetField represents a nested dataset field in a database. This nested dataset can result from an object relational database (such as the nested datasets in Oracle 8 databases) or from a provider that packages data for the master table of a master/detail relationship.

TDataSetField introduces a new property NestedDataSet for referencing nested datasets. It also introduces the Fields property for accessing the fields in the nested dataset. When assigning data to a data set field, use the DataSetField property of a dataset component that is assigned as the value of the dataset field.


 VCL Reference

TDataSetField properties

TDataSetField	Alphabetically	Legend

In TDataSetField

CanModify

Fields

IncludeObjectField

NestedDataSet

Derived from TObjectField

AsString

AsVariant

DataSet

FieldCount

FieldKind

FieldValues

HasConstraints

ObjectType

UnNamed

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

ConstraintErrorMessage

CurValue

CustomConstraint

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldName

FieldNo

FullName

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetField properties

TDataSetField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldCount

FieldKind

FieldName

FieldNo

Fields

FieldValues

FullName

HasConstraints

ImportedConstraint

IncludeObjectField

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NestedDataSet

NewValue

ObjectType

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

UnNamed

ValidChars

Value

VCLComObject

Visible


TDataSetField.CanModify
 VCL Reference

TDataSetField.CanModify

TDataSetField	See also

Indicates whether the data in the nested dataset can be modified.

property Fields: TFields;

Description

Check CanModify to determine if the field’s data can be edited. CanModify is True only if

The ReadOnly property is False.

The dataset for this field component allows write access to the corresponding nested dataset field.

The NestedDataSet property is assigned to an active dataset.


TDataSetField.Fields
 VCL Reference

TDataSetField.Fields

TDataSetField	See also

Lists the fields in the dataset that is nested with the dataset field.

property Fields: TFields;

Description

Read Fields to access the fields that make up the nested dataset.


TDataSetField.IncludeObjectField
 VCL Reference

TDataSetField.IncludeObjectField

TDataSetField	See also

Indicates whether this field can be represented as a persistent field in the nested dataset.

property IncludeObjectField: Boolean;

Description

In BDE-enabled datasets, set this property to True to allow the nested dataset that is the value of this field to access this parent dataset field.  When this property is True, a persistent field can be created for this dataset field in the detail dataset using the Fields editor. The name of this dataset field is then displayed above the child fields in a grid associated with the nested dataset.

The default value is False.


TDataSetField.NestedDataSet
 VCL Reference

TDataSetField.NestedDataSet

TDataSetField	See also

Indicates the dataset that is nested in the dataset field.

property NestedDataSet: TDataSet;

Description

Read NestedDataSet to access the nested dataset of the dataset field.


 VCL Reference

TDataSetField events

TDataSetField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDataSetField events

TDataSetField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TDataSetField methods

TDataSetField	Alphabetically	Legend

In TDataSetField

Create

Derived from TObjectField

Destroy

Derived from TField

Assign

AssignValue

Clear

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetField methods

TDataSetField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TDataSetField.Create
 VCL Reference

TDataSetField.Create

TDataSetField	see also

Creates and initializes a TDataSetField instance.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TDataSetField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftDataSet. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TDataSetField. After instantiating a TDataSetField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TDataSetField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Specify the dataset that contains the dataset field by setting its DataSet property.


Hierarchy

TObject

TPersistent

TComponent

TField

TObjectField

TDataSetField


TDataSetInsert
 VCL Reference

TDataSetInsert

Hierarchy	Properties	Methods	Events	Using TDataSetInsert	See also

TDataSetInsert inserts a new record into a target dataset.

Unit

DBActns

Description

Add TDataSetInsert to an action list to allow users to insert new records in a dataset. Controls such as menu items and tool buttons linked to this action cause the target dataset to insert a new record above the current one and go into edit mode.

TDataSetInsert is designed to work with a TDataSource component as its target. You can explicitly provide this target by setting the DataSource property, or you can allow the action to infer the data source from an active data-aware control. TDataSetInsert automatically disables itself if it does not have a target data source attached to an active dataset that permits edits.


 VCL Reference

TDataSetInsert properties

TDataSetInsert	Alphabetically	Legend

In TDataSetAction

DataSource

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDataSetInsert properties

TDataSetInsert	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSource

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TDataSetInsert events

TDataSetInsert	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDataSetInsert events

TDataSetInsert	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TDataSetInsert methods

TDataSetInsert	Alphabetically	Legend

In TDataSetInsert

ExecuteTarget

UpdateTarget

Derived from TDataSetAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetInsert methods

TDataSetInsert	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDataSetInsert.ExecuteTarget
 VCL Reference

TDataSetInsert.ExecuteTarget

TDataSetInsert 	See also

Inserts a new record above the current one in the target dataset.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

ExecuteTarget checks that Target is a data source component that has an associated dataset. If the DataSource property is set, Target must be the same data source.

If Target is a valid data source, ExecuteTarget calls the associated dataset’s Insert method to insert a new, empty, record above the current record and put the dataset in edit mode.


TDataSetInsert.UpdateTarget
 VCL Reference

TDataSetInsert.UpdateTarget

TDataSetInsert 	See also

Enables or disables the action, depending on the state of the target dataset.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TDataSetInsert, UpdateTarget checks whether the current target object (specified by the Target parameter) is a data source whose dataset is active and which permits edits. If so, it sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TDataSetAction

TDataSetInsert


TDataSetPageProducer
 VCL Reference

 TDataSetPageProducer

Hierarchy	Properties	Methods	Events	Using TDataSetPageProducer	See also

TDataSetPageProducer produces a string of HTML commands based on an input template.

Unit

DSProd

Description

Use TDataSetPageProducer to convert an HTML template that includes field data into a string of HTML commands that can be interpreted by a client application such as a Web browser. HTML templates include HTML commands and HTML-transparent tags that are replaced with customized content by the dataset page producer in an OnHTMLTag event handler.

Dataset page producers differ from other page producer components in that they replace HTML-transparent tags that match fields in a dataset with the current value of those fields.


 VCL Reference

TDataSetPageProducer properties

TDataSetPageProducer	Alphabetically	Legend

Derived from TCustomDataSetPageProducer

DataSet

Derived from TCustomPageProducer

HTMLDoc

HTMLFile

Derived from TBasePageProducer

ScriptEngine

StripParamQuotes

WebModuleContext

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataSetPageProducer properties

TDataSetPageProducer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

HTMLDoc

HTMLFile

Name

Owner

ScriptEngine

StripParamQuotes

Tag

VCLComObject

WebModuleContext


 VCL Reference

TDataSetPageProducer events

TDataSetPageProducer	Alphabetically	Legend

Derived from TBasePageProducer

OnHTMLTag


 VCL Reference

TDataSetPageProducer events

TDataSetPageProducer	By object	Legend

OnHTMLTag


 VCL Reference

TDataSetPageProducer methods

TDataSetPageProducer	Alphabetically	Legend

Derived from TCustomDataSetPageProducer

Content

Derived from TCustomPageProducer

Create

Destroy

Derived from TBasePageProducer

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataSetPageProducer methods

TDataSetPageProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TBasePageProducer

TCustomPageProducer

TCustomDataSetPageProducer

TDataSetPageProducer


TDataBindings
 VCL Reference

TDataBindings

Hierarchy	Properties	Methods

TDataBindings holds a group of TDataBindItem objects.

Unit

DbOleCtl

Description

Use TDataBindings to connect the properties of a data-aware ActiveX control to the fields in a dataset. TDataBindings maintains an index of data bindings (TDataBindItem objects) in its Items array. The Count property of its ancestor TCollection, contains the number of items in the collection. Use the Add method to add items to the collection.

Typically, this object is for internal use. Instead, you access an object’s data bindings through the DataBindings property of the DBOleControl object.


 VCL Reference

TDataBindings properties

TDataBindings	Alphabetically	Legend

In TDataBindings

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TDataBindings properties

TDataBindings	By object	Legend

Count

ItemClass

Items


TDataBindings.Items
 VCL Reference

TDataBindings.Items

TDataBindings	See also

Provides indexed access to the TDataBindItem objects in the collection.

property Items[Index: Integer]: TDataBindItem;

Description

Use Items to access the properties of TDataBindItem objects maintained by TDataBindings. Items is the default property of TDataBindings, so the name of the property can be left off when using this property. Thus, the line:

FirstDataBinding := DBOleCtl1.DataBindings.Items[0];

can be written as:

FirstDataBinding := DBOleCtl1.DataBindings[0];


 VCL Reference

TDataBindings methods

TDataBindings	Alphabetically	Legend

In TDataBindings

Add

Create

GetItemByDispID

GetOwner

Update

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDataBindings methods

TDataBindings	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemByDispID

GetNamePath

GetOwner

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TDataBindings.Add
 VCL Reference

TDataBindings.Add

TDataBindings	See also

Creates a new TDataBindItem object and adds it to the end of the Items property array.

function Add: TDataBindItem;

Description

Call Add to add a new TDataBindItem to the set of data bindings associated with the specified data-aware control. With this method, you must also set the fields within the TDataBindItem at the same time. These data bindings can be modified programmatically at a later time.


TDataBindings.Create
 VCL Reference

TDataBindings.Create

TDataBindings

Creates an instance of TDataBindings.

constructor Create(DBOleControl: TDBOleControl);

Description

Applications should not need to call Create directly. The data-aware control object that uses the TDataBindings collection to represent its data bindings creates the TDataBindings object from its own constructor.


TDataBindings.GetItemByDispID
 VCL Reference

TDataBindings.GetItemByDispID

TDataBindings

Returns the associated TDataBindItem property for the specified DispID.

function GetItemByDispID(ADispID: TDispID): TDataBindItem;

Description

GetItemByDispID returns the TDataBindItem property for the specified DispID. It returns nil if no TDataBindItem property exists for the specified DispID.


TDataBindings.GetOwner
 VCL Reference

TDataBindings.GetOwner

TDataBindings	See also

Returns the owner of an object.

function GetOwner: TPersistent; override;

Description

GetOwner is used to find the owner of a data binding, that is, the data-aware control.


TDataBindings.Update
 VCL Reference

TDataBindings.Update

TDataBindings

For internal use.

procedure Update(Item: TCollectionItem); override;

Description

Update refreshes the field definitions in the Items property array to reflect the current state of the physical fields in the underlying dataset. This is typically for internal use.


Hierarchy

TObject

TPersistent

TCollection

TDataBindings


TDownLoadURL
 VCL Reference

TDownLoadURL

Hierarchy	Properties	Methods	Events	Using TDownLoadURL	See also

TDownLoadURL is the standard action for saving the contents of a specified URL to a file.

Unit

ExtActns

Description

Add TDownLoadURL to an action manager or action list to let your application save the contents of a specified URL to a file. Controls linked to this action cause the application to lookup the resource specified by the URL property and save it to the file specified by the Filename property. While TDownLoadURL is writing to the specified file, it periodically generates an OnDownloadProgress event, so that you can provide users with feedback about the process.

You should assign a value to the URL property and to the FileName property before the user invokes this action.


 VCL Reference

TDownLoadURL properties

TDownLoadURL	Alphabetically	Legend

In TDownLoadURL

Filename

Derived from TURLAction

URL

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDownLoadURL properties

TDownLoadURL	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Filename

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

URL

VCLComObject

Visible


TDownLoadURL.Filename
 VCL Reference

TDownLoadURL.Filename

TDownLoadURL	See also

Specifies the file to which this action copies the resource identified by the URL property.

property Filename: TFileName;

Description

Filename is the name of the file that TDownLoadURL creates to hold the contents of the URL specified by the URL property. When the user triggers this action, TDownLoadURL looks up URL on the internet, creates the file specified by Filename, and writes the bits it finds at URL to this file.

This value is not assigned automatically: it is the responsibility of the application to supply a value for Filename.


 VCL Reference

TDownLoadURL events

TDownLoadURL	Alphabetically	Legend

In TDownLoadURL

OnDownloadProgress

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TDownLoadURL events

TDownLoadURL	By object	Legend

OnDownloadProgress

OnExecute

OnHint

OnUpdate


TDownLoadURL.OnDownloadProgress
 VCL Reference

TDownLoadURL.OnDownloadProgress

TDownLoadURL	See also

Occurs periodically while TDownLoadURL is downloading the specified resource and writing it to a file.

type

  TURLDownloadStatus = (dsFindingResource, dsConnecting, dsRedirecting, dsBeginDownloadData, dsDownloadingData, dsEndDownloadData, dsBeginDownloadComponents, dsInstallingComponents, dsEndDownloadComponents, dsUsingCachedCopy, dsSendingRequest, dsClassIDAvailable, dsMIMETypeAvailable, dsCacheFileNameAvailable, dsBeginSyncOperation, dsEndSyncOperation, dsBeginUploadData, dsUploadingData, dsEndUploadData, dsProtocolClassID, dsEncoding, dsVerifiedMIMETypeAvailable, dsClassInstallLocation, dsDecoding, dsLoadingMIMIHandler);

  TDownloadProgressEvent = procedure(Sender: TDownLoadURL; Progress, ProgressMax: Cardinal; StatusCode: TURLDownloadStatus; StatusText: String; var Cancel: Boolean) of object;

property OnDownloadProgress: TDownloadProgressEvent;

Description

OnDownloadProgress occurs periodically while the contents of the specified URL are downloaded to a file.

Sender is the action that is copying the contents of an URL to a file.

Progress indicates the current progress of the download operation relative to the expected maximum indicated in the ProgressMax parameter.

ProgressMax indicates the expected maximum value of the Progress parameter. This value can change during the download operation as more information becomes available. A value of zero means that the maximum value is unknown.

StatusCode indicates the current stage of the download process or other information about the download process.

StatusText is a string that corresponds to StatusCode. It can be used for displaying the status of the download to users.

Cancel allows the event handler to cancel the download operation. On entry to the event handler, Cancel is False. If the event handler changes Cancel to True, the download operation is aborted.


 VCL Reference

TDownLoadURL methods

TDownLoadURL	Alphabetically	Legend

In TDownLoadURL

ExecuteTarget

Derived from TURLAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDownLoadURL methods

TDownLoadURL	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TDownLoadURL.ExecuteTarget
 VCL Reference

TDownLoadURL.ExecuteTarget

TDownLoadURL 	See also

Creates the file specified by the Filename property and downloads the contents of URL to it.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and looks up (on the internet) the URL specified by the URL property, creates the file specified by the Filename property, and writes the bits found at the specified URL to the file.

Periodically throughout this download process, TDownLoadURL generates an OnDownloadProgress event.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TURLAction

TDownLoadURL


EAppletException
 VCL Reference

EAppletException

Hierarchy	Properties	Methods	See also

EAppletException is the exception class for errors that occur in a Control Panel Application.

Unit

CtlPanel

Description

EAppletException is the exception for errors specific to applications created by the control panel wizard.


 VCL Reference

EAppletException properties

EAppletException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EAppletException properties

EAppletException	By object	Legend

HelpContext

Message


 VCL Reference

EAppletException methods

EAppletException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EAppletException methods

EAppletException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EAppletException


EBcdException
 VCL Reference

EBcdException

Hierarchy	Properties	Methods	See also

EBcdException is the exception class for errors that occur when working with BCD values.

Unit

FMTBcd

Description

EBcdException is raised when

An attempt to convert a Variant or string to a BCD value is unsuccessful.

An application tries to create a Variant that represents a BCD value, starting with a value that can’t be successfully converted.

An application tries to divide by a BCD type whose value is 0.


 VCL Reference

EBcdException properties

EBcdException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EBcdException properties

EBcdException	By object	Legend

HelpContext

Message


 VCL Reference

EBcdException methods

EBcdException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EBcdException methods

EBcdException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EBcdException


EBcdOverflowException
 VCL Reference

EBcdOverflowException

Hierarchy	Properties	Methods	See also

EBcdOverflowException is the exception class for errors that occur when a Variant can’t create a BCD value due to the requested precision and number of decimals.

Unit

FMTBcd

Description

EBcdOverflowException is raised when

A call to VarFMTBcdCreate tries to create a BCD value with a precision and number of decimals that can’t be supported.

An application tries to cast a Variant to a BCD value but it can’t be expressed using the default precision and number of decimals.


 VCL Reference

EBcdOverflowException properties

EBcdOverflowException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EBcdOverflowException properties

EBcdOverflowException	By object	Legend

HelpContext

Message


 VCL Reference

EBcdOverflowException methods

EBcdOverflowException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EBcdOverflowException methods

EBcdOverflowException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EBcdException

EBcdOverflowException


EDatabaseError
 VCL Reference

EDatabaseError

Hierarchy	Properties	Methods	See also

EDatabaseError is the exception class for database errors.

Unit

DB

Description

EDatabaseError is raised when a component detects a database error. Use EDatabaseError in an exception handling block or to create a database exception.


 VCL Reference

EDatabaseError properties

EDatabaseError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDatabaseError properties

EDatabaseError	By object	Legend

HelpContext

Message


 VCL Reference

EDatabaseError methods

EDatabaseError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp>main

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDatabaseError methods

EDatabaseError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDatabaseError


EDBClient
 VCL Reference

EDBClient

Hierarchy	Properties	Methods	See also

EDBClient is the exception class for client dataset errors.

Unit

DBClient

Description

EDBClient is raised if a client dataset encounters a problem in its normal functioning.


 VCL Reference

EDBClient properties

EDBClient	Alphabetically	Legend

In EDBClient

ErrorCode

Derived from Exception

HelpContext

Message


 VCL Reference

EDBClient properties

EDBClient	By object	Legend

ErrorCode

HelpContext

Message


EDBClient.ErrorCode
 VCL Reference

EDBClient.ErrorCode

EDBClient	See also

The error code returned by the BDE.

property ErrorCode: DBResult;

Description

ErrorCode is the error code returned by the BDE, ADO, dbExpress, or other underlying database access mechanism.


 VCL Reference

EDBClient methods

EDBClient	Alphabetically	Legend

In EDBClient

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDBClient methods

EDBClient	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EDBClient.Create
 VCL Reference

EDBClient.Create

EDBClient

Creates and initializes an instance of EDBClient.

constructor Create(Message: string; ErrorCode: DBResult);

Description

Create generates an EDBClient object. Message is the error message for the exception. ErrorCode is the error code returned from the data access mechanism that led to this exception.


Hierarchy

TObject

Exception

EDatabaseError

EDBClient


EDBEditError
 VCL Reference

EDBEditError

Hierarchy	Properties	Methods	See also

EDBEditError is the exception class for data that are incompatible with a specified mask.

Unit

Mask

Description

EDBEditError is raised when an application attempts to use data that are incompatible with the mask specified for a field.

A mask restricts the data that can be put into an edit box or data field. Use the EditMask property to specify a mask.


 VCL Reference

EDBEditError properties

EDBEditError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDBEditError properties

EDBEditError	By object	Legend

Message

HelpContext


 VCL Reference

EDBEditError methods

EDBEditError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDBEditError methods

EDBEditError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDBEditError


ENoResultSet
 VCL Reference

ENoResultSet

Hierarchy	Properties	Methods	See also

ENoResultSet is the exception class for unsuccessful attempts to open a dataset query.

Unit

DBTables

Description

ENoResultSet is raised by TQuery when an attempt is made to open the query without a SELECT statement.


 VCL Reference

ENoResultSet properties

ENoResultSet	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ENoResultSet properties

ENoResultSet	By object	Legend

HelpContext

Message


 VCL Reference

ENoResultSet methods

ENoResultSet	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ENoResultSet methods

ENoResultSet	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EDatabaseError

ENoResultSet


EOleException
 VCL Reference

EOleException

Hierarchy	Properties	Methods	See also

EOleException is the exception class for OLE automation errors that occur in methods or properties of an object.

Unit

ComObj

Description

EOleException is the exception class for errors specific to the OLE IDispatch interface. EOleException is raised when an error occurs in the middle of a method call from IDispatch. EOleException is generated when a Delphi server receives a failure return value from a property or method that was called with the IDispatch interface Invoke method.

When an error occurs, objects invoked through IDispatch can return essential information about the exception, including the source of the error, error code, description, help file, and ID number for context-sensitive help. EOleException captures this information, and the error description and ID number (if available) are included in a message generated by CreateHelp; the other information is stored in the Source and HelpFile properties defined for EOleException and the ErrorCode property inherited from EOleSysError.


 VCL Reference

EOleException properties

EOleException	Alphabetically	Legend

In EOleException

HelpFile

Source

Derived from EOleSysError

ErrorCode

Derived from Exception

HelpContext

Message


 VCL Reference

EOleException properties

EOleException	By object	Legend

ErrorCode

HelpContext

HelpFile

Message

Source


EOleException.HelpFile
 VCL Reference

EOleException.HelpFile

EOleException

Specifies the name and location of the help file that contains information about the error that occurred.

property HelpFile: string;

Description

HelpFile lists the name and complete directory path of the help file that contains information about the error.


EOleException.Source
 VCL Reference

EOleException.Source

EOleException

Designates the application program in which the exception occurred.

property Source: string;

Description

Source gives the source of the exception. Usually, this is the name of an application program.


 VCL Reference

EOleException methods

EOleException	Alphabetically	Legend

In EOleException

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOleException methods

EOleException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EOleException.Create
 VCL Reference

EOleException.Create

EOleException	See also

Creates an ole exception object.

constructor Create(const Message: string; ErrorCode: HRESULT; const Source, HelpFile: string; HelpContext: Integer);

Description

Create instantiates an EOleException object.

Create allocates memory for the exception and initializes the ErrorCode, HelpFile, and Source properties using information passed in the OLE EXCEPINFO structure. It then calls the inherited CreateHelp method to display the error description and ID number from EXCEPINFO.


Hierarchy

TObject

Exception

EOleError

EOleSysError

EOleException


EOleSysError
 VCL Reference

EOleSysError

Hierarchy	Properties	Methods

EOleSysError is the exception class for errors specific to the OLE IDispatch interface.

Unit

ComObj

Description

EOleSysError is the exception class for errors that occur during an attempt to invoke a method or property of an OLE automation object. When the IDispatch Invoke method fails, EOleSysError is raised. Objects invoked through IDispatch can return the error code—an OLE status code or SCODE—indicating the reason for the error.


 VCL Reference

EOleSysError properties

EOleSysError	Alphabetically	Legend

In EOleSysError

ErrorCode

Derived from Exception

HelpContext

Message


 VCL Reference

EOleSysError properties

EOleSysError	By object	Legend

ErrorCode

HelpContext

Message


EOleSysError.ErrorCode
 VCL Reference

EOleSysError.ErrorCode

EOleSysError	See also

The status code returned by the failed method call, indicating the reason for the failure.

property ErrorCode: HRESULT;

Description

ErrorCode is the numerical error code returned by a failed call to an OLE automation object’s method or property.

ErrorCode is initialized in the constructor.


 VCL Reference

EOleSysError methods

EOleSysError	Alphabetically	Legend

In EOleSysError

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOleSysError methods

EOleSysError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EOleSysError.Create
 VCL Reference

EOleSysError.Create

EOleSysError	See also

Creates an EOleSysError object.

constructor Create(const Message: string; ErrorCode: HRESULT; HelpContext: Integer);

Description

Create calls SysErrorMessage to turn the OLE error code, ErrorCode, into a message string that it passes to the inherited constructor. EOleSysError initializes the ErrorCode property to the ErrorCode string.


Hierarchy

TObject

Exception

EOleError

EOleSysError


EReconcileError
 VCL Reference

EReconcileError

Hierarchy	Properties	Methods	See also

EReconcileError is the exception class for client dataset update errors.

Unit

DBClient

Description

EReconcileError is raised if an error occurs when updates are being applied from a TClientDataSet.


 VCL Reference

EReconcileError properties

EReconcileError	Alphabetically	Legend

In EReconcileError

Context

PreviousError

Derived from EDBClient

ErrorCode

Derived from Exception

HelpContext

Message


 VCL Reference

EReconcileError properties

EReconcileError	By object	Legend

Context

ErrorCode

HelpContext

Message

PreviousError


EReconcileError.Context
 VCL Reference

EReconcileError.Context

EReconcileError	See also

Contains context information from the error stack.

property Context: string;

Description

Context contains any additional information returned with the error message. If no additional context information is available, Context is nil.


EReconcileError.PreviousError
 VCL Reference

EReconcileError.PreviousError

EReconcileError	See also

Indicates the previous error in the reconcile process.

property PreviousError: DBResult;

Description

PreviousError is the error code of the last update error in this update operation. If the last update error did not have an error code, PreviousError is 0.


 VCL Reference

EReconcileError methods

EReconcileError	Alphabetically	Legend

In EReconcileError

Create

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EReconcileError methods

EReconcileError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EReconcileError.Create
 VCL Reference

EReconcileError.Create

EReconcileError

Creates and initializes an instance of EReconcileError.

constructor Create(NativeError, Context: string; ErrorCode, PreviousError: DBResult);

Description

Create generates an EReconcileError object.

NativeError is the runtime error message to display in the exception dialog box.

Context provides context information about the error that occurred. If no context information is available, Context is nil. Context initializes the Context property.

ErrorCode is the error code returned by the underlying database access mechanism (ADO, BDE, or dbExpress). Not all exceptions are associated with an error code. If there is no error code, ErrorCode is 0.

PreviousError is the error code of the last error in this reconciliation process. If the last exception did not have an error code, PreviousError is 0.


Hierarchy

TObject

Exception

EDatabaseError

EDBClient

EReconcileError


ESocketError
 VCL Reference

ESocketError

Hierarchy	Properties 	Methods 	See also

ESocketError is the exception class for failures that occur when trying to create, use, or shut down Windows socket objects.

Unit

ScktComp

or Sockets

Description

ESocketError is raised if

A socket cannot be created.

A socket cannot be initialized.

A socket cannot be opened.

An application tries to change the properties of an already open socket.

A failure occurs when reading from or writing to a socket.

A socket cannot be properly closed.

There are two ESocketError classes defined in Delphi, one in the ScktComp unit and one in the Sockets unit. The two exception classes are identically defined and serve the same function for Delphi's different categories of socket objects. The two definitions occur simply to ensure that ESocketError is defined for all socket objects.


 VCL Reference

ESocketError properties

ESocketError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ESocketError properties

ESocketError	By object	Legend

HelpContext

Message


 VCL Reference

ESocketError methods

ESocketError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ESocketError methods

ESocketError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ESocketError


EUpdateError
 VCL Reference

EUpdateError

Hierarchy	Properties 	Methods 	See also

EUpdateError is the exception class for dataset provider update errors.

Unit

DB

Description

EUpdateError is raised if an error occurs when updates are applied by a provider component. Raise this exception class for update errors when implementing the IProviderSupport interface in a custom dataset.


 VCL Reference

EUpdateError properties

EUpdateError	Alphabetically	Legend

In EUpdateError

Context

ErrorCode

OriginalException

PreviousError

Derived from Exception

HelpContext

Message


 VCL Reference

EUpdateError properties

EUpdateError	By object	Legend

Context

ErrorCode

HelpContext

Message

OriginalException

PreviousError


EUpdateError.Context
 VCL Reference

EUpdateError.Context

EUpdateError	See also

Contains context information from the error stack.

property Context: string;

Description

Context contains additional information returned with the error message. If there is no additional context information, Context is an empty string.


EUpdateError.ErrorCode
 VCL Reference

EUpdateError.ErrorCode

EUpdateError	See also

Indicates the error code that this exception represents.

property ErrorCode: Integer;

Description

EUpdateError objects represent exceptions that occur when updating records. These exceptions can be generated in response to error codes from the data access mechanism (such as the BDE or ADO) or by other exceptions that are caught by resolver components. If the update error represents an error code returned by the data access mechanism, ErrorCode is that error code. Otherwise, ErrorCode is 0.

Note:	If ErrorCode is 0, use the OriginalException property, which provides access to the exception that was caught.


EUpdateError.OriginalException
 VCL Reference

EUpdateError.OriginalException

EUpdateError	See also

Indicates the exception object that this update error represents.

property OriginalException: Exception;

Description

EUpdateError objects represent exceptions that occur when updating records. OriginalException is the exception object that is caught during the update process. Use this value to obtain more information about the problem that occurred.

Note:	If the EUpdateError object represents an EDBEngineError, the ErrorCode property provides immediate access to its BDE error code without going through the OriginalException property.


EUpdateError.PreviousError
 VCL Reference

EUpdateError.PreviousError

EUpdateError	See also

Indicates the previous error code for this update process.

property PreviousError: Integer;

Description

PreviousError is the error code of the last update error in this update operation. If the last update error did not have an error code, PreviousError is 0.


 VCL Reference

EUpdateError methods

EUpdateError	Alphabetically	Legend

In EUpdateError

Create

Destroy

Derived from Exception

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EUpdateError methods

EUpdateError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EUpdateError.Create
 VCL Reference

EUpdateError.Create

EUpdateError	See also

Creates and initializes an instance of EUpdateError.

constructor Create(NativeError, Context: string; ErrCode, PrevError: Integer; E: Exception);

Description

Create generates an EUpdateError object to represent another error that is caught while applying updates.

NativeError specifies the error message for the exception.

Context is a string providing additional context information. It becomes the value of the Context property.

ErrCode and PrevError specify error codes for this exception or the previous exception in this update operation. If the current exception or previous exception does not have an error code, the corresponding argument is 0. The ErrCode and PrevError parameters initialize the ErrorCode and PreviousError properties.

Exception specifies the exception that was caught (which this EUpdateError represents). It becomes the value of the OriginalException property.


EUpdateError.Destroy
 VCL Reference

EUpdateError.Destroy

EUpdateError	See also

Destroys an instance of EUpdateError.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the EUpdateError reference is not nil before calling Destroy.


Hierarchy

TObject

Exception

EDatabaseError

EUpdateError


TEvent
 VCL Reference

TEvent

Hierarchy	Properties	Methods	Using TEvent	See also

TEvent represents an external event.

Unit

SyncObjs

Description

Use TEvent to signal that an event has occurred or a state has been reached.

In a multi-threaded application, use TEvent to allow one thread to signal to other threads that an event has occurred.

The handle of a TEvent object can also be used to communicate with other processes, so that an application can coordinate the timing of events with other applications. For example, use the handle of a TEvent object to wait until another process is ready to transfer information.

In a single-threaded application, use TEvent to coordinate between sections of code that respond to asynchronous events such as system events.


 VCL Reference

TEvent properties

TEvent	Alphabetically	Legend

Derived from THandleObject

Handle

LastError


 VCL Reference

TEvent properties

TEvent	By object	Legend

Handle

LastError


 VCL Reference

TEvent methods

TEvent	By Object	Legend

In TEvent

Create

ResetEvent

SetEvent

WaitFor

Derived from THandleObject

Destroy

Derived from TSynchroObject

Acquire

Release

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TEvent methods

TEvent	By Object	Legend

Acquire

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Release

ResetEvent

SafeCallException

SetEvent

WaitFor


TEvent.Create
 VCL Reference

TEvent.Create

TEvent	See also

Instantiates a TEvent object to represent an event object.

type

  PSecurityAttributes = ^TSecurityAttributes;

  TSecurityAttributes = record

    nLength: DWORD;

    lpSecurityDescriptor: Pointer;

    bInheritHandle: BOOL;

  end;

constructor Create(EventAttributes: PSecurityAttributes; ManualReset, InitialState: Boolean; const Name: string);

Description

Call Create to create a TEvent object. Create can generate a new event object or can provide access to an existing named event object.

Set the EventAttributes parameter to specify the access rights and inheritance capabilities of the new event object. Calling Create with EventAttributes set to nil creates an event object with a default set of security attributes. If the TEvent object is created to access an existing named event object, only the bInheritHandle field of EventAttributes is used, as the access rights were determined when the event object was created.

Set ManualReset to specify whether the signal of the TEvent object can only be turned off by a call to the ResetEvent method, or whether it is automatically reset when a single waiting thread is released. When ManualReset is True, the TEvent signal stays set until the ResetEvent method turns it off. When ManualReset is False, the signal is automatically turned off when only a single thread waits on the signal and that thread is released. If the TEvent object is created to access an existing named event object, the ManualReset parameter is ignored.

Set InitialState to indicate whether the TEvent object should be created with the signal set, or turned off. When InitialState is True, the TEvent object is created with the signal set. If the TEvent object is created to access an existing named event object, the InitialState parameter is ignored.

Set Name to provide a name for a new event object or to specify an existing named event object. If no other thread or process will need to access the event object to wait for its signal, Name can be left blank. Name can be a string of up to 260 characters, not including the backslash character (\). If Name is used to specify an existing event object, the value must match the name of the existing event in a case-sensitive comparison. If Name matches the name of an existing semaphore, mutex, or file-mapping object, the TEvent object will be created with Handle set to 0 and all method calls will fail.


TEvent.ResetEvent
 VCL Reference

TEvent.ResetEvent

TEvent	See also

Turns off the signal of the event object.

procedure ResetEvent;

Description

Call ResetEvent to signal that the event has not occurred or the desired state was not achieved. Other threads or processes that wait for the event will wait until the signal is turned on again by the SetEvent method, the event object is destroyed, or the waiting process times out.


TEvent.SetEvent
 VCL Reference

TEvent.SetEvent

TEvent	See also

Turns on the signal of the event object.

procedure SetEvent;

Description

Call SetEvent to signal that the event has occurred or the desired state was achieved. Other threads or processes that wait for the event will resume execution with a return value indicating that the signal was set.


TEvent.WaitFor
 VCL Reference

TEvent.WaitFor

TEvent	See also

Waits until another thread or process turns on the signal of the event object.

type TWaitResult = (wrSignaled, wrTimeout, wrAbandoned, wrError);

function WaitFor(Timeout: DWORD): TWaitResult;

Description

Call WaitFor to wait until the signal of the event object is turned on. If the signal is not set after Timeout milliseconds, WaitFor returns anyway. WaitFor returns one of the following values:

Value	Meaning

wrSignaled	The signal of the event object was set.

wrTimeout	The time specified by the Timeout parameter elapsed without the signal being set.

wrAbandoned	The event object was destroyed before the Timeout period elapsed.

wrError	An error occurred while waiting. Check the LastError property for an error code giving more information.


Hierarchy

TObject

TSynchroObject

THandleObject

TEvent


TField
 VCL Reference

TField

Hierarchy	Properties	Methods	Events 	Using TField	See also

TField is the common ancestor of all the field components.

Unit

DB

Description

TField encapsulates the fundamental behavior common to all field components. It introduces the properties, events, and methods that are used to:

Change the value of a field in a dataset.

Convert the value of a field from one data type to another.

Validate data that the user enters for a field.

Define how the data in the field appears as it is displayed or edited.

Calculate the value of a field from code written in the OnCalcFields event of the dataset.

Look up the field’s value from another dataset.

Do not create instances of TField. TField descendants are created automatically each time a dataset is activated. These descendants can be dynamic (the default) or persistent. Dynamic field components reflect the columns in the underlying metadata at the time a dataset is opened. Persistent field components are created at design time using the Fields editor, which specifies the fields in the dataset, their properties, and their ordering.

Creating persistent field components guarantees that each time an application runs, it uses and displays the same columns, in the same order, even if the physical structure of the underlying database changes. If a column on which a persistent field component is based is deleted or changed, Delphi generates an exception rather than opening the dataset against a nonexistent column or mismatched data. If this happens, remove the field component for the nonexistent field using the Fields editor.

A field in a dataset is always treated as one of the following TField descendant classes below:

TADTField	TDateField	TReferenceField
TAggregateField	TDateTimeField	TSmallIntField
TArrayField	TFloatField	TSQLTimeStampField
TAutoIncField	TFMTBCDField	TStringField
TBCDField	TGraphicField	TTimeField
TBinaryField	TGuidField	TVarBytesField
TBlobField	TIDispatchField	TVariantField
TBooleanField	TIntegerField	TWideStringField
TBytesField	TInterfaceField	TWordField
TCurrencyField	TLargeintField
TDataSetField	TMemoField


 VCL Reference

TField properties

TField	Alphabetically	Legend

In TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Value

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TField properties

TField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TField.Alignment
 VCL Reference

TField.Alignment

TField	See also

Determines how the field’s data is displayed within a data-aware control.

property Alignment: TAlignment;

Description

Use Alignment to specify the position of the field’s data within data-aware controls. These are the possible values:

Value	Meaning

taLeftJustify	Align data to the left side of the control

taCenter	Center data horizontally in the control

taRightJustify	Align data to the right side of the control


TField.AsBCD
 VCL Reference

TField.AsBCD

TField	See also

Represents the field’s value as a TBcd value.

property AsBCD: TBcd;

Description

Use AsBCD to read the value of the field’s data into a TBcd or assign a TBcd value to the contents of the field.

As implemented by TField, reading AsBCD returns the value of AsCurrency converted to a TBcd value, and setting AsBCD sets the AsCurrency property after converting a supplied TBcd value to the Currency type. Some TField descendants override AsBCD to perform a more direct conversion.

Note:	If the field does not support Currency values, the field component raises an exception when an attempt is made to get or set the AsBCD or AsCurrency property.


TField.AsBoolean
 VCL Reference

TField.AsBoolean

TField	See also

Represents the field’s value as a Boolean value.

property AsBoolean: Boolean;

Description

Use AsBoolean to read the value of the field’s data into a Boolean or assign a Boolean value to the contents of the field. TField does not support Boolean values, and raises an exception when an attempt is made to get or set the AsBoolean property.

Descendants of TField that represent Boolean fields or that support conversions between the field’s Value property and a Boolean value, override AsBoolean to read and write the value of the field as a Boolean value.


TField.AsCurrency
 VCL Reference

TField.AsCurrency

TField	See also

Represents the field’s value as a Currency value.

property AsCurrency: Currency;

Description

Use AsCurrency to read the value of the field’s data into an object or variable of type Currency or to assign a Currency value to the contents of the field.

As implemented by TField, reading AsCurrency returns the value of AsFloat converted to a Currency value, and setting AsCurrency sets the AsFloat property after converting a supplied Currency value to a Double. Some TField descendants override AsCurrency to work directly with Currency values rather than implicitly converting between the Currency type and Doubles.

Note:	If the field does not support Double values, the field component raises an exception when an attempt is made to get or set the AsFloat or AsCurrency property.


TField.AsDateTime
 VCL Reference

TField.AsDateTime

TField	See also 	Example

Represents the field’s value as a TDateTime value.

property AsDateTime: TDateTime;

Description

Use AsDateTime to read the value of the field’s data into an object or variable of type TDateTime, or to assign a TDateTime value to the contents of the field. TField does not support TDateTime values, and raises an exception when an attempt is made to get or set the AsDateTime property.

Descendants of TField that represent datetime (timestamp) fields or that support conversions between the field’s Value property and a TDateTime value, override AsDateTime to read and write the value of the field as a TDateTime value.


TField.AsFloat
 VCL Reference

TField.AsFloat

TField	See also

Represents the field’s value as a Double value.

property AsFloat: Double;

Description

Use AsFloat to read the value of the field’s data into a Double, or to assign a Double value to the contents of the field. TField does not support floating point values, and raises an exception when an attempt is made to get or set the AsFloat property.

Descendants of TField that represent floating point numeric fields or that support conversions between the field’s Value property and a Double value, override AsFloat to read and write the value of the field as a Double.


TField.AsInteger
 VCL Reference

TField.AsInteger

TField	See also 	Example

Represents the field’s value as a 32-bit integer.

property AsInteger: Integer;

Description

Use AsInteger to read the value of the field’s data into an integer, or to assign an integer value to the contents of the field. TField does not support integer values, and raises an exception when an attempt is made to get or set the AsInteger property.

Descendants of TField that represent integer fields or that support conversions between the field’s Value property and an integer value, override AsInteger to read and write the value of the field as an integer value.


TField.AsSQLTimeStamp
 VCL Reference

TField.AsSQLTimeStamp

TField	See also

Represents the field’s value as a TSQLTimeStamp.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Use AsSQLTimeStamp to read the value of the field’s data into a TSQLTimeStamp record, or to assign a TSQLTimeStamp value to the contents of the field. TField does not support TSQLTimeStamp values, and raises an exception when an attempt is made to get or set the AsSQLTimeStamp property.

Descendants of TField that represent SQL timestamp fields or that support conversions between the field’s Value property and TSQLTimeStamp, override AsSQLTimeStamp to read and write the value of the field as a TSQLTimeStamp record.


TField.AsString
 VCL Reference

TField.AsString

TField	See also 	Example

Represents the field’s value as a string.

property AsString: String;

Description

Reading the AsString property returns the abbreviated class name of the field component enclosed in parentheses. The abbreviated class name is built by stripping the leading ‘T’ from the class name and removing the trailing word ‘FIELD’, except in the case of TField where that would leave an empty string. Thus, the abbreviated class name of TField is “FIELD”, the abbreviated class name of TVarBytesField is “VarBytes”, and so on.

Trying to set the AsString property raises an exception.

Descendants of TField that represent string fields or that support conversions between the field’s Value property and a string override AsString to read and write the value of the field as a different, more meaningful, string.


TField.AsVariant
 VCL Reference

TField.AsVariant

TField	See also

Represents the Value of the field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to read the value of the field’s data into a Variant, or to assign a Variant value to the contents of the field. TField does not support Variant values, and raises an exception when an attempt is made to read the AsVariant property. TField also raises an exception when an attempt is made to set the AsVariant property, unless the Variant is of type varNull, in which case TField calls the Clear method.

Descendants of TField implement the AsVariant method to get or set the value of the field as a Variant.


TField.AttributeSet
 VCL Reference

TField.AttributeSet

TField	See also

Specifies the name of an attribute set in the data dictionary to apply to the field component.

property AttributeSet: String;

Description

An attribute set defines the display and format properties of a field component that are displayed in a data-aware control at design time. It also defines any constraint and default properties of the field component.

Attribute sets are stored in the data dictionary by name so that at design time developers can create and apply the same set of attributes to different field components in one or more datasets. When an attribute set is assigned to a field component at design time and that field component is owned by a TQuery or TStoredProc dataset, AttributeSet contains the name of the assigned attribute set.


TField.AutoGenerateValue
 VCL Reference

TField.AutoGenerateValue

TField	See also

Indicates whether the field values can be generated by the server rather than entered by the user.

property AutoGenerateValue: TAutoRefreshFlag;

Description

Use AutoGenerateValue to indicate when field values can be generated by the database. Such fields include autoincrement fields and fields with default values.

Some database drivers can’t determine which fields can have values supplied automatically by the server. This can lead to problems when posting edits. For these cases, applications can provide this information by setting the AutoGenerateValue property. Use this property to indicate whether the field is an autoincrement field (arAutoInc), a field with a default value (arDefault), or a field whose value is not automatically generated (arNone).

AutoGenerateValue is not always required. Fields with an AutoGenerateValue property of arNone may still be updated if the driver supplies metadata that indicates it has a default value or an autoincrement value. However, it is good practice to supply this information because not all drivers supply this metadata.

If you do use AutoGenerateValue for any fields that have values generated by the database, you must set AutoGenerateValue to arAutoInc or arDefault on every field whose value is automatically generated by the database. This is because when records are posted, the application immediately executes a query to fetch the automatically-generated values. If you leave an automatically-generated field with AutoGenerateValue set to arNone, this query looks for a record with a blank value on that field, which will fail to locate the correct record.

Warning:	AutoGenerateValue can fail in some cases when the automatically-generated field value is on a key field. This is because the query that refetches the new field value can’t always uniquely locate the record that was just posted.

Note:	Trying to change the AutoGenerateValue property when the field’s dataset is open generates an exception. Thus, AutoGenerateValue only works with persistent field components, which remain when the dataset is closed.


TField.Calculated
 VCL Reference

TField.Calculated

TField	See also

Determines whether the value of the field is calculated by the OnCalcFields event handler of its dataset.

property Calculated: Boolean;

Description

Use Calculated to determine if the field is a calculated field. When Calculated is True and the OnCalcFields event occurs, the OnCalcFields event handler updates the value of the field. The default value is False.

The value of a Calculated field is not stored in or retrieved from the physical tables underlying a dataset. Instead, calculated fields are calculated for each record in the table by the dataset's OnCalcFields event handler, which typically uses expressions involving values from other fields in the record to generate a value for each calculated field.

For example, a dataset might have non-calculated fields for Quantity and UnitPrice, and a calculated field for ExtendedPrice, which would be calculated by multiplying the values of the Quantity and UnitPrice fields in an OnCalcFields event handler.

Note:	Do not change the setting of Calculated in application code. Calculated is automatically set to True by the Fields editor at design time if a field’s value is specified as calculated.

Note:	Do not confuse the Calculated property with the InternalCalcField property of a field definition. The value of a calculated field is computed in the OnCalcFields event handler. The value of an internally calculated field is computed by the SQL server or the Borland Database Engine.


TField.CanModify
 VCL Reference

TField.CanModify

TField	See also

Specifies whether a field can be modified.

property CanModify: Boolean;

Description

Check CanModify to determine if a field’s data can be edited. CanModify is True only if the ReadOnly property is False, and the dataset for this field component allows write access to the corresponding database field.


TField.ConstraintErrorMessage
 VCL Reference

TField.ConstraintErrorMessage

TField	See also

Specifies a customized error message that appears when the user tries to set a value that violates the data constraints of the field.

property ConstraintErrorMessage: String;

Description

Set ConstraintErrorMessage to specify the message that appears when the user-supplied value for the field does not meet the constraints imposed by the server or specified in the CustomConstraint property.


TField.CurValue
 VCL Reference

TField.CurValue

TField	See also

Represents the current value of the field component including changes made by other users of the database.

property CurValue: Variant;

Description

Use CurValue to examine the value of a field when a problem occurs while posting a value to the database using a provider. If the current field value causes a problem, such as a key violation, when posting the value, an event is generated to allow applications to respond to the problem. Provider components generate an OnUpdateError event. If a provider returns problem records to the client datset, the client dataset generates an OnReconcileError event. In the OnUpdateError or OnReconcileError event handler, NewValue is the unposted value that caused the problem, OldValue is the value that was originally assigned to the field before any edits were made, and CurValue is the value that is currently assigned to the field. CurValue may differ from OldValue if another user changed the value of the field after OldValue was read.

Note:	CurValue is only supported when the dataset is a TClientDataSet. In the provider’s OnUpdateError event, a temporary client dataset containing fields with a CurValue property is passed to the event handler.


TField.CustomConstraint
 VCL Reference

TField.CustomConstraint

TField	See also

Specifies an SQL string the enforces any application-specific constraints on the field’s value.

property CustomConstraint: String;

Description

Set CustomConstraint to limit the values that the user can enter into a field. CustomConstraint must be a valid SQL search expression such as

x > 0 and x < 100

The name used to refer to the field’s value can be any string that is not a reserved SQL keyword, as long as it is used consistently throughout the constraint expression.

Custom constraints are imposed in addition to any constraints to the field’s value that come from the server. To see the constraints imposed by the server, read the ImportedConstraint property.

Note:	When setting the CustomConstraint property, be sure to set the ConstraintErrorMessage property as well, so that a message can appear when the user enters a value that violates the custom constraint.

Note:	Custom constraints are SQL expressions. Because of this, always use a period (.) as a floating-point separator.  This may be inconsistent with international Windows settings.


TField.DataSet
 VCL Reference

TField.DataSet

TField	See also

Identifies the dataset to which a field component belongs.

property DataSet: TDataSet;

Description

Check the value of DataSet to determine the dataset that uses the field component to represent one of its fields. Applications should not directly assign the DataSet property of a field. It is assigned automatically when the field is created from a TFieldDef object.


TField.DataSize
 VCL Reference

TField.DataSize

TField	See also 	Example

Indicates the amount of memory needed to store a field component’s value.

property DataSize: Integer;

Description

Check DataSize to determine the number of bytes required to store a field component’s value. Use DataSize to determine the required size of a buffer for working with the field’s value in native format. For example, use DataSize to determine the buffer size needed by the GetData and SetData methods.

The value of DataSize for TField is 0. Most descendants of TField override this property to specify the size required by the specific field type they represent. BLOB fields, however, represent data of indeterminate size. They do not override the inherited method, so the value of DataSize for BLOB fields is 0. A value of zero should not be interpreted as meaning the field value requires no memory. A value of zero indicates that the memory required for the field is indeterminate.


TField.DataType
 VCL Reference

TField.DataType

TField	See also

Identifies the data type of the field component.

property DataType: TFieldType;

Description

Read the DataType property to learn the type of the data the field contains.


TField.DefaultExpression
 VCL Reference

TField.DefaultExpression

TField	See also

Specifies an SQL expression that is assigned to the field if the user does not provide a value.

property DefaultExpression: String;

Description

Set DefaultExpression to provide a default value for a field. DefaultExpression can be any valid SQL value expression that does not refer to field values. If the expression contains literals other than numeric values, they must appear in quotes. For example, a default value of noon for a time field is

'12:00:00'

including the quotes around the literal value.

Note:	If you supply a value for DefaultExpression, this value takes precedence over any default values for the field implemented on the database server. This is because DefaultExpression is applied to the field in your application before any edits are sent to the server.


TField.DisplayLabel
 VCL Reference

TField.DisplayLabel

TField	See also 	Example

Contains the text to display in the corresponding column heading of a data grid.

property DisplayLabel: String;

Description

Use DisplayLabel to assign column headings to a data grid. The column headings of the data grid use the DisplayName property of the field whose value they represent. Setting DisplayLabel changes the read-only DisplayName property from FieldName to the string specified as DisplayLabel.


TField.DisplayName
 VCL Reference

TField.DisplayName

TField	See also	Example

Represents the name of the field for display purposes.

property DisplayName: String;

Description

Use DisplayName when displaying a string that represents the field to the user. For example, when raising an exception concerning the field, format an error string that includes the DisplayName to refer to the field. DisplayName is a read-only property. To change the value of DisplayName, use the DisplayLabel property.

If DisplayLabel is defined, DisplayName is the same as DisplayLabel. Otherwise, DisplayName is the same as the FieldName property.


TField.DisplayText
 VCL Reference

TField.DisplayText

TField	See also 	Example

Represents the field’s value as it is displayed in a data-aware control.

property DisplayText: String;

Description

DisplayText is a read-only string representation of a field’s value for displaying in data-aware controls. It represents the field’s value when it is not being edited. When the field is being edited, use the Text property.

If the field has an OnGetText event handler, DisplayText is the value returned in the Text parameter of the OnGetText event handler when its DisplayText parameter is True. Otherwise, DisplayText is the value of the AsString property.


TField.DisplayWidth
 VCL Reference

TField.DisplayWidth

TField	See also

Specifies the number of characters that should be used to display a field’s value by a cooperating data-aware control.

property DisplayWidth: Integer;

Description

Set DisplayWidth to control how many characters are used to calculate the column width for the field when it is displayed by a TDBLookupListBox object or a descendant of TCustomDBGrid. The width of columns is determined by the average character width. If the data-aware control that displays the field is not using a fixed pitch font, DisplayWidth may indicate more or fewer characters than will fit in the column for any given string.

Note:	The DisplayWidth property has no effect if there is an explicit Columns value for the field in a TDBGrid object.


TField.EditMask
 VCL Reference

TField.EditMask

TField	See also

Contains a mask that restricts the data that can be entered into a data field.

property EditMask: TEditMask;

Description

Use EditMask to restrict the characters a user can enter. If the user attempts to enter a character that is not valid, the character is not accepted. Validation using the EditMask property is performed on a character-by-character basis. Use the OnValidate event instead to validate the entire input, just before it is posted.

Setting EditMask to an empty string removes the mask.


TField.EditMaskPtr
 VCL Reference

TField.EditMaskPtr

TField	See also

Provides read-only access to the EditMask property.

property EditMaskPtr: TEditMask;

Description

Use EditMaskPtr when reading the EditMask property. Because EditMaskPtr is a read-only property, EditMaskPtr guards against accidentally changing the value of the mask in code that should only read it.


TField.FieldKind
 VCL Reference

TField.FieldKind

TField	See also

Indicates whether a field represents a column in a dataset, a calculated field, or a lookup field.

property FieldKind: TFieldKind;

Description

Use FieldKind to determine if a field is a data field, a calculated field, a lookup field, or an aggregate field. The value of FieldKind can be changed programmatically, but in practice FieldKind is set at design time when creating Field components with the Fields editor.

The FieldKind property can take one of the following values:

Value	Description

fkData	Field represents a physical field in a database table

fkCalculated	Field is calculated in an OnCalcFields event handler

fkLookup	Field is a lookup field. (Not implemented for fields on unidirectional datasets)

fkInternalCalc	Field is calculated but values are stored in the dataset.

fkAggregate	Field represents a maintained aggregate in a client dataset.

Note:	Fields calculated by SQL servers or the Borland Database Engine to display the results of a query that returns a live dataset have a FieldKind of fkInternalCalc, not fkCalculated. This is because the field values are stored in the dataset. Calculated fields in a client dataset that are calculated in an OnCalcFields event handler but stored in the dataset also have a FieldKind of fkInternalCalc instead of fkCalculated. Unlike regular calculated fields, internally calculated fields can be used in filter expressions. They can be edited, but the changes are discarded. To prevent editing, set the ReadOnly property to True.

Note:	The FieldKind property of a field is only stored with the field object if the value is fkInternalCalc.


TField.FieldName
 VCL Reference

TField.FieldName

TField	See also 	Example

Indicates the name of the physical column in the underlying table or query result to which a field component is bound.

property FieldName: String;

Description

When creating a field component, the TFieldDef object uses FieldName to specify which field in the underlying dataset the field component represents. FieldName is used when displaying references to the field to users, unless a DisplayLabel has been set. For calculated fields, supply a FieldName when defining the field. For non-calculated fields, an EDatabaseError exception is raised if FieldName is not a column name in the underlying table.


TField.FieldNo
 VCL Reference

TField.FieldNo

TField	See also

Indicates the ordinal position of the field’s column in the underlying table or query result.

property FieldNo: Integer;

Description

Read FieldNo to learn a field component’s ordinal position in the table underlying the dataset, where 1 is the first field. Use the FieldNo property to specify the field only in direct API calls to the Borland Database Engine.

Note:	Do not confuse FieldNo, which is the field component’s ordinal position in the physical database table, with Index, the field component’s position in the dataset’s Fields property.


TField.FullName
 VCL Reference

TField.FullName

TField	See also

Indicates the field name qualified by the full name of the parent field, if any.

property FullName: string;

Description

Inspect FullName to determine the field’s name when it may be a subfield in the flattened version of a more complex object field. FullName prefixes the FieldName property with the full name of the more complex object field of which it is a part.


TField.HasConstraints
 VCL Reference

TField.HasConstraints

TField	See also

Indicates whether field values are constrained.

property HasConstraints: Boolean;

Description

Read HasConstraints to determine whether the field component imposes custom constraints, imported constraints, or a default expression. HasConstraints is True if the CustomConstraint, DefaultExpression, or ImportedConstraint property is set. Otherwise, HasConstraints is False, indicating that no constraints on field values are implemented.

Field values can still be limited when HasConstraints is False. For example, an edit mask or OnValidate event handler can constrain field values.


TField.ImportedConstraint
 VCL Reference

TField.ImportedConstraint

TField	See also

Represents an SQL clause that enforces constraints stored on the server.

property ImportedConstraint: String;

Description

Read ImportedConstraint to determine the limits imposed by the server on what values are valid for the field. ImportedConstraint is an SQL search expression such as

Value > 0 and Value < 100

Do not change the value of ImportedConstraint. To add additional constraints on the field value, use the CustomConstraint property instead. Custom constraints are imposed in addition to the imported constraints. If the server constraints change, the value of ImportedConstraint will be changed but constraints introduced in the CustomConstraint property will persist.

Removing constraints from the ImportedConstraint property will not change the validity of field values that violate those constraints. Removing constraints results in the constraints being checked by the server instead of locally. When constraints are checked locally, the error message supplied as the ConstraintErrorMessage property is displayed when violations are posted, instead of an error message from the server.

Note:	ImportedConstraint is only set for fields of datasets that import constraints. These include client datasets (when they receive imported constraints in data packets) and BDE-based datasets.


TField.Index
 VCL Reference

TField.Index

TField	See also

Specifies the field component’s index in the Fields property of the dataset.

property Index: Integer;

Description

Use the Index property to:

Find the position of the field in the dataset.

Change the order of a field's position in the dataset by changing the value of Index. Changing the Index value affects the order in which fields are displayed in data grids, but not the position of the fields in physical database tables.

Note:	The field order can also be changed by dragging and dropping fields in the Fields editor at design time.


TField.IsIndexField
 VCL Reference

TField.IsIndexField

TField	See also

Indicates whether a field is an index field.

property IsIndexField: Boolean;

Description

Inspect the IsIndexField to determine if a field is used in the dataset’s current index. If IsIndexField is True, the field is one of the fields that makes up the dataset’s current index. If IsIndexField is False, the field is not an index field. A field component must be an index field to serve as one of the fields in the LookupKeyFields property of another field component.


TField.IsNull
 VCL Reference

TField.IsNull

TField	See also

Indicates whether the field has a value assigned to it.

property IsNull: Boolean;

Description

Inspect IsNull to ascertain whether the field contains a value. If IsNull is True, the field is blank. If IsNull is False, the field has a value.


TField.KeyFields
 VCL Reference

TField.KeyFields

TField	See also

Identifies the field or fields in the dataset that must be matched in a lookup dataset when doing a lookup.

property KeyFields: String;

Description

Set KeyFields only on lookup fields (fields where FieldKind is fkLookup and Lookup is True). KeyFields specifies the field or fields to match when a lookup occurs. To use more than one field, separate each field name with a semicolon. The specified fields must be of the same types as the corresponding fields in LookupKeyFields, or the lookup fails.

The values of the KeyFields in the DataSet are matched with the values of the LookupKeyFields in the LookupDataSet to determine a particular record of the lookup table. The value of the LookupResultField on that record becomes the Value property for the field component.


TField.Lookup
 VCL Reference

TField.Lookup

TField	See also

Determines whether the field is specified as a lookup field.

property Lookup: Boolean;

Description

Lookup is provided for backward compatibility. To determine if a field is a lookup field, use the FieldKind property insteadWhen FieldKind is fkLookup, Lookup is True. When FieldKind is any other value, Lookup is False. Changing Lookup to False implicitly sets FieldKind to fkData.

If the field is a lookup field, the KeyFields property indicates which fields in the dataset must match the LookupKeyFields in the LookupDataSet, to identify a record in the LookupDataSet. The value of the LookupResultField for that record becomes the Value of the field component.


TField.LookupCache
 VCL Reference

TField.LookupCache

TField	See also

Determines whether the values of a lookup field are cached or looked up dynamically every time the current record in the dataset changes.

property LookupCache: Boolean;

Description

Set LookupCache to True to cache the values of a lookup field when the LookupDataSet is unlikely to change and the number of distinct lookup values is small. Caching lookup values can speed performance, because the lookup values for every set of LookupKeyFields values are preloaded when the DataSet is opened. When the current record in the DataSet changes, the field object can locate its Value in the cache, rather than accessing the LookupDataSet. This performance improvement is especially dramatic if the LookupDataSet is on a network where access is slow.

If every record of DataSet has different values for KeyFields, the overhead of locating values in the cache can be greater than any performance benefit provided by the cache. The overhead of locating values in the cache increases with the number of distinct values that can be taken by KeyFields.

If LookupDataSet is volatile, caching lookup values can lead to inaccurate results. Call RefreshLookupList to update the values in the lookup cache. RefreshLookupList regenerates the LookupList property, which contains the value of the LookupResultField for every set of LookupKeyFields values.

When setting LookupCache at runtime, call RefreshLookupList to initialize the cache.

Note:	LookupCache is only meaningful if the value of FieldKind is fkLookup.


TField.LookupDataSet
 VCL Reference

TField.LookupDataSet

TField	See also

Identifies the dataset used to look up field values.

property LookupDataSet: TDataSet;

Description

Use LookupDataSet to specify the dataset to use for looking up field values in a field with a FieldKind of fkLookup.

Note:	LookupDataSet can’t refer to a unidirectional dataset.

When a field component is a lookup field, the Value of the field component is the value of the LookupResultField in the LookupDataSet. The record in the LookupDataSet that contains the correct value is found by matching the LookupKeyFields in the LookupDataSet with the current values of the KeyFields in the DataSet.


TField.LookupKeyFields
 VCL Reference

TField.LookupKeyFields

TField	See also

Identifies the field or fields in the lookup dataset to match when doing a lookup.

property LookupKeyFields: String;

Description

Only use LookupKeyFields on field components with a FieldKind of fkLookup. LookupKeyFields are the fields in the index of the LookupDataSet whose values must match the KeyFields in the field component’s DataSet.

To specify more than one field, separate each field name with a semicolon. The fields specified in LookupKeyFields must be of the same types as the corresponding fields in KeyFields, or the lookup can't work.

Matching the values of the LookupKeyFields in the LookupDataSet with the values of the KeyFields in the DataSet determines a specific record in the LookupDataSet. The Value of the field component is the value of the LookupResultField in the indicated record.


TField.LookupList
 VCL Reference

TField.LookupList

TField	See also

Indicates a cache of values from the LookupDataSet indexed by a set of values from the KeyFields property.

property LookupList: TLookupList;

Description

Inspect LookupList to find the cached value assigned to the field for a given set of values on the fields specified by KeyFields. The value of LookupList is set when the dataset is open or the RefreshLookupList method is called.

Tip:	Applications can also fill LookupList programmatically to provide lookup values as long as the LookupDataSet property is not set.

The ValueOfKey method of the LookupList returns the value of the LookupResultField for a set of values on the LookupKeyFields. This allows the value of the lookup field object to be computed as follows:

Value := LookupList.ValueOfKey(DataSet.FieldValues[KeyFields]);

Note:	LookupList is only meaningful when the value of FieldKind is fklookup and the LookupCache property is True.


TField.LookupResultField
 VCL Reference

TField.LookupResultField

TField	See also

Identifies the field from the lookup dataset whose value becomes the Value property of the field component.

property LookupResultField: String;

Description

Use LookupResultField to specify a single field in the LookupDataSet whose value becomes the value of the field component. The field component must have a FieldKind of fkLookup, and the DataType of the field component must be the same as the data type of LookupResultField.

When a field component is a lookup field, the Value of the field component is the value of the LookupResultField in the LookupDataSet. The record in the LookupDataSet that contains the correct value is found by matching the LookupKeyFields in the LookupDataSet with the current values of the KeyFields in the DataSet.


TField.NewValue
 VCL Reference

TField.NewValue

TField	See also

Represents the current value of the field component including pending cached updates.

property NewValue: Variant;

Description

Use NewValue to examine or change the current value of a field when in the process of applying multiple updates. If the current field value is causing a problem, such as a key violation, when applying updates, datasets generate an OnUpdateError event. Similarly, provider components generate an OnUpdateError event when problems occur posting records from a client, and client datasets generate an OnReconcileError event when informed of problems by the provider. In the event handler, assign a new value to NewValue to correct the problem.

NewValue is the same as Value, except when errors are encountered while posting records. Setting NewValue in an OnUpdateError event handler, an OnUpdateRecord event handler, or an OnReconcileError event handler causes NewValue to differ from Value until the records have finished being applied to the underlying database table.

Note:	The NewValue property is only usable when the data is accessed using a TClientDataSet component or cached updates is enabled.


TField.Offset
 VCL Reference

TField.Offset

TField	See also

Indicates the number of bytes added to the end of the current record buffer in the dataset for storing cached values (for calculated fields or BLOB fields).

property Offset: Integer;

Description

Read Offset to determine the extra space in the record buffer of a TClientDataSet object allocated for cached information on calculated fields or BLOB fields. Offset should only be used by component writers when developing new descendants of TClientDataSet.


TField.OldValue
 VCL Reference

TField.OldValue

TField	See also

Represents the original value of the field (as a Variant).

property OldValue: Variant;

Description

Read the OldValue property to examine or retrieve the original value of the field that was obtained from the dataset before any edits were posted. For example, the following line replaces current pending changes with a field’s original value:

NewValue := OldValue;

Once records are applied successfully to the database, the old field value cannot be retrieved.

Note:	the OldValue property is only usable when the data is accessed using a TClientDataSet component or cached updates is enabled.


TField.Origin
 VCL Reference

TField.Origin

TField	See also

Indicates the name of the field in its original database table.

property Origin: String;

Description

Origin is only assigned at design time by the Fields editor, and only when the field component is used by a TQuery object. The Origin property distinguishes the name of the field as it appears in its dataset from the name of the field in the base table on which it is based. For example, in a query that uses the following SQL statement, the value of Origin is CUSTOMER.CUSTNO.

SELECT CUSTNO AS ID FROM CUSTOMER

In this case, the FieldName property is ID.


TField.ParentField
 VCL Reference

TField.ParentField

TField 	See also

Specifies the TObjectField object from which this field is derived.

property ParentField: TObjectField;

Description

Use ParentField when the field represents a subfield in the flattened version of a more complex object field. ParentField represents the object field (an Oracle8 array field or ADT).

When ParentField is nil, the field does not represent part of a composite field.


TField.ProviderFlags
 VCL Reference

TField.ProviderFlags

TField 	See also

Specifies how a provider uses the field value when applying updates.

type

  TProviderFlag = (pfInUpdate, pfInWhere, pfInKey, pfHidden);

  TProviderFlags = set of TProviderFlag;

property ProviderFlags: TProviderFlags;

Description

ProviderFlags is only relevant for fields that appear in the data packets supplied to a provider component’s event handlers. This property is a set of flags that determine how the field is used when applying updates or resolving update errors. ProviderFlags includes any of the following values:

Value	Meaning

pfInUpdate	The field can be included in UPDATE statements. (That is, it can be modified)

pfInWhere	The field is included in the WHERE clause when the provider’s UpdateMode is upWhereAll or upWhereChanged.

pfInKey	The field is included in the WHERE clause when the provider’s UpdateMode is upWhereKeyOnly.

pfHidden	The field is included in data packets to ensure the uniqueness of records so that they can be correctly updated. It can’t be seen or used by the receiving client dataset.


TField.ReadOnly
 VCL Reference

TField.ReadOnly

TField	See also

Determines whether the field can be modified.

property ReadOnly: Boolean;

Description

Set ReadOnly to True to prevent a field from being modified. In a data grid, tabbing from field to field skips over ReadOnly fields.

To learn whether a field can be modified, use the CanModify property instead. CanModify reflects not only the value of the ReadOnly property, but also any restrictions imposed by the underlying dataset.


TField.Required
 VCL Reference

TField.Required

TField	See also

Specifies whether a nonblank value for a field is required.

property Required: Boolean;

Description

Use Required to find out if a field requires a value or if the field can be blank.

If a field is created with the Fields editor, this property is set based on the underlying table. Applications that set Required to True for fields that must have values (for example, a password or part number), but for which the underlying table does not require the field, must write an OnValidate event handler to enforce the property.

When the Required property reflects a property of the underlying database table, trying to post a null value causes an exception to be raised. Applications that set the Required property to True when the underlying table does not require the field, should raise an EDatabaseError exception on null values in the OnValidate event handler in order to achieve the same result.


TField.Size
 VCL Reference

TField.Size

TField	See also

Indicates the size used in the definition of the physical database field for data types that support different sizes.

property Size: Integer;

Description

The interpretation of Size depends on the data type. The meaning of Size for data types that use it is given in the following table. For all other data types, Size is not used and its value is always 0.

DataType	Meaning of Size

ftBCD	Size is the number of digits after the decimal place.

ftString	Size is the maximum number of characters in the string.

ftVarBytes	Size is the maximum number of bytes of data, not counting the first two bytes which indicate the actual number of bytes of data that were used.

ftBytes	Size is the maximum number of bytes of data.

ftBlob	Size is the number of bytes from the BLOB that are stored in the record buffer.

ftDBaseOle	Size is the number of bytes from the dBASE OLE BLOB that are stored in the record buffer.

ftFMTBCD	Size is the number of digits after the decimal place.

ftFmtMemo	Size is the number of bytes from the memo that are stored in the record buffer.

ftGraphic	Size is the number of bytes from the image that are stored in the record buffer.

ftMemo	Size is the number of characters from the memo that are stored in the record buffer.

ftParadoxOle	Size is the number of bytes from the Paradox OLE BLOB that are stored in the record buffer.

ftTypedBinary	Size is the number of bytes from the BLOB that are stored in the record buffer.

ftADT	Size is the total number of fields contained in the ADT field, including the fields of child fields that are of type ADT.

ftArray	Size is the number of elements in the array.


TField.Text
 VCL Reference

TField.Text

TField	See also

Contains the string to display in a data-aware control when the field is in edit mode.

property Text: String;

Description

Data-aware controls rely on the Text property to provide the editing format for each field. For example, by default the Text property of a currency field omits the thousands separators and currency symbol.

Text can differ from the DisplayText property if the field uses a different string representation when the value is being edited. To implement two different string representations of a field’s value, use the OnGetText event handler. If an OnGetText event handler is assigned, Text is the value returned in the Text parameter of the event handler when the DisplayText parameter is False. If there is no OnGetText event handler, Text is the value of the AsString property.


TField.ValidChars
 VCL Reference

TField.ValidChars

TField	See also

Specifies the characters that can be included in the text representation of the field’s value.

type TFieldChars = set of Char;

property ValidChars: TFieldChars;

Description

Set ValidChars to restrict the characters that can be validly entered as part of the text representation of the field’s value. ValidChars is used by the IsValidChar method to determine whether a character typed into a data-aware edit control can make up part of the field’s value. Unlike the EditMask property which specifies which characters can appear in specific positions, ValidChars limits the characters that can appear anywhere in the field’s value.

TField initializes ValidChars to include all characters. Numeric descendants of TField change the default value to include only the characters that can make up a numeric value. Applications can change this value to restrict the character set for a field in other ways or to allow characters that are not permitted by default.


TField.Value
 VCL Reference

TField.Value

TField	See also 	Example

Represents the data in a field component.

property Value: Variant

Description

Use Value to read data directly from and write data directly to a field component at runtime. For example, use the Value property to affect the contents of a field that is not Visible.


TField.Visible
 VCL Reference

TField.Visible

TField	See also

Determines whether the field appears in a data grid.

property Visible: Boolean;

Description

To hide a field in a data grid, set Visible to False. If Visible is True, the field appears in the grid.

Note:	The Visible property has no effect if the grid has an explicit Columns value for the field. It also has no effect on controls other than TDBGrid, such as TDBEdit.


 VCL Reference

TField events

TField	Alphabetically	Legend

In TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TField events

TField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


TField.OnChange
 VCL Reference

TField.OnChange

TField	See also

Occurs immediately after the data in the field is written to the record buffer.

type TFieldNotifyEvent = procedure(Sender: TField) of object;

property OnChange: TFieldNotifyEvent;

Description

Write an OnChange event handler to respond to any changes in the field’s data. OnChange allows a response once the data has been successfully written to the record buffer.

When writing the value of a field to the current record buffer, the following steps occur:

1	The OnValidate event handler is called to validate the data.

2	If the OnValidate event handler accepts the current Value, the data is written to the record buffer.

3	If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.


TField.OnGetText
 VCL Reference

TField.OnGetText

TField	See also

Occurs when the DisplayText or Text properties of the field are referenced.

type TFieldGetTextEvent = procedure(Sender: TField; var Text: String; DisplayText: Boolean) of object;

property OnGetText: TFieldGetTextEvent;

Description

Write an OnGetText handler to perform custom processing for the DisplayText and Text properties. Use OnGetText to format the Value of the field differently when it must be edited from the format used when simply displaying the value, or use OnGetText to display something other than the field’s value when it is displayed.

The Sender parameter is the field component. The Text parameter returns the formatted text that is used by the DisplayText or Text property. The DisplayText parameter indicates whether the text will be used for display purposes only, or whether the string will be used for editing.

If there is no OnGetText handler, the value of the DisplayText and Text properties is simply the value of the AsString property.


TField.OnSetText
 VCL Reference

TField.OnSetText

TField	See also

Occurs when the Text property is assigned a value.

type TFieldSetTextEvent = procedure(Sender: TField; const Text: String) of object;

property OnSetText: TFieldSetTextEvent;

Description

Write an OnSetText event handler to specify processing that occurs whenever Text receives a new value. If there is an OnGetText event handler that formats the Value of the field in some special way for editing purposes, OnSetText should reverse the process when parsing the edited string.

If there is no OnSetText handler, the Text property is set by setting the AsString property.


TField.OnValidate
 VCL Reference

TField.OnValidate

TField	See also

Occurs just before the data is written to the record buffer.

type TFieldNotifyEvent = procedure(Sender: TField) of object;

property OnValidate: TFieldNotifyEvent;

Description

Write an OnValidate event handler to validate changes made to the data in the field, just before the data is written to the current record buffer. The EditMask property allows validation of the data on a character by character basis while it is being entered by the user. OnValidate allows an application to validate the data as a whole.

When the value of a field component is assigned programmatically, validation by the EditMask is bypassed, since there is no data-aware control to enforce adherence to the mask. OnValidate allows an application to validate such data before it is posted to the database table.

To reject the current value of the field from the OnValidate event handler, raise an exception.

When writing the value of a field to the current record buffer, the following steps occur:

1	The OnValidate event handler is called to validate the data.

2	If the OnValidate event handler does not raise an exception, the data is written to the current record buffer.

3	If writing the data does not raise an exception, the OnChange event handler is called to allow a response to the change.


 VCL Reference

TField methods

TField	Alphabetically	Legend

In TField

Assign

AssignValue

Clear

Create

Destroy

FocusControl

GetData

GetParentComponent

HasParent

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TField methods

TField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

ReferenceInterface

UpdateAction

Validate


TField.Assign
 VCL Reference

TField.Assign

TField	See also 	Example

Copies the Value property from another field component or assigns another object to the field component.

procedure Assign(Source: TPersistent);

Description

Use Assign to copy the Value property from one field to another. The fields must have compatible data types.

When Source is another field object, Assign calls the AssignValue method, using the Source field’s Value property. Calling Assign with the Source parameter set to nil assigns a blank value to the field component. Calling Assign with any other object type calls the inherited method, which allows assignment from objects that implement a TField object in their AssignTo method.


TField.AssignValue
 VCL Reference

TField.AssignValue

TField	See also

Sets the field value using one of the AsInteger, AsBoolean, AsString or AsFloat properties.

procedure AssignValue(const Value: TVarRec);

Description

Use AssignValue to assign a value to a field that comes from an array of const. AssignValue uses an As… property for the assignment based on the type of the Value parameter:

Value	As... property used

vtInteger	AsInteger

vtBoolean	AsBoolean

vtChar	AsString

vtExtended	AsFloat

vtString	AsString

vtPChar	AsString

vtAnsiString	AsString

vtCurrency	AsCurrency

vtVariant	AsVariant

If Value is not one of the types in the table, but is of type TObject or a TObject descendant, AssignValue uses the Assign method to assign the value to the field.

AssignValue exists primarily for internal use. In most situations, you should use the data type-specific assignment properties like AsString and AsInteger. In cases where a component or an application must be able to make field assignments from untyped arrays, the syntax for AssignValue looks like that below. In this example, a custom data class uses AssignValue in a member method named SetFieldValues to assign values to multiple fields. The values for the field assignments come from an untyped array.

procedure TCustomDataClass.SetFieldValues(Values: array of const);

var

  i: Integer;

begin

  for i := 0 to High(Values) do

    Fields[i].AssignValue(Values[i]);

end;


TField.Clear
 VCL Reference

TField.Clear

TField	See also

Sets the value of the field to NULL.

procedure Clear;

Description

Call the Clear method to give the field a blank value (a NULL value in SQL terms).


TField.Create
 VCL Reference

TField.Create

TField	See also

Creates and initializes a field component.

constructor Create(AOwner: TComponent); override;

Description

Do not create TField instances. TField is intended only as a base class, and should not be directly instantiated. The constructor for descendant classes is usually called by the dataset when it is opened.

After calling the inherited constructor, TField initializes the Visible property to True.


TField.Destroy
 VCL Reference

TField.Destroy

TField	See also

Destroys an instance of TField.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Destroy is called automatically by the dataset that owns the field component, and applications never need to call it explicitly. If an application creates a descendant of TField without an owner, it should call Free instead of Destroy, to guard against nil values.

Destroy closes the dataset, deletes the instance of TField from the dataset, and calls the inherited destructor.


TField.FocusControl
 VCL Reference

TField.FocusControl

TField	See also

Forces a form’s focus to the first data-aware component associated with the field object.

function FocusControl;

Description

Call FocusControl to switch the focus of the form to a data-aware control associated with the field. Because it is possible that the field’s value can change even if its associated data-aware control does not have the focus, calling FocusControl can aid in drawing attention to a new value when it fails to be validated.


TField.GetData
 VCL Reference

TField.GetData

TField	See also	Example

Returns the unformatted data for the field.

function GetData(Buffer: Pointer; NativeFormat:Boolean=True): Boolean;

Description

Call GetData to return the data in a field to a buffer. GetData is intended primarily for internal use.

Buffer must have sufficient space allocated for the data. Use the DataSize property to determine the space required.

Unlike the DisplayText, Text, or AsXXX properties, GetData does not translate the data into a specific type. Instead, it uses a type that reflects the underlying database information unless you set NativeFormat to False. NativeFormat indicates whether the raw database information must be translated into the underlying type associated with the specific type of database field. When NativeFormat is True, the dataset does not translate the raw database information. When NativeFormat is False, the dataset must translate the field value into the type associated with the field.

If the data is NULL, GetData returns False and no data is transferred to Buffer. Otherwise, GetData returns True.

Note:	GetData cannot be used to read data from BLOB or memo fields. To read BLOB data, use the stream returned by the dataset’s CreateBlobStream method or the BLOB field’s SaveToStream method.


TField.GetParentComponent
 VCL Reference

TField.GetParentComponent

TField	See also

Returns the component which directs the loading and saving of the field.

function GetParentComponent: TComponent; override;

Description

The streaming system that loads and saves components calls GetParentComponent to identify the component that uses this field to represent one of its parts. If the field represents a subfield in an object field, GetParentComponent returns the value of ParentField. Otherwise, GetParentComponent returns the value of DataSet.


TField.HasParent
 VCL Reference

TField.HasParent

TField	See also

Returns True, indicating that field components act as part of a larger composite.

function HasParent: Boolean; override;

Description

The streaming system that loads and saves components calls HasParent to determine when a component acts as part of a composite. The component that represents the entire composite is returned by the GetParentComponent method. The parent component is responsible for directing the loading and saving of its subcomponents.


TField.IsBlob
 VCL Reference

TField.IsBlob

TField	See also 	Example

Indicates whether the field represents the data in a binary large object (BLOB) field.

class function IsBlob: Boolean; virtual;

Description

Call IsBlob to determine whether the field represents BLOB data. For example, before using the GetData or SetData method, call IsBlob to determine whether the method can be used. The IsBlob method for TField always returns False. Descendants of TField that implement blob fields override this method to indicate that they represent BLOB data.


TField.IsValidChar
 VCL Reference

TField.IsValidChar

TField	See also

Indicates whether a particular character is valid for the field.

function IsValidChar(InputChar: Char): Boolean; virtual;

Description

Call IsValidChar to determine if the character specified by InputChar can appear in the text representation of the field’s value. Many data-aware controls use IsValidChar to check characters entered by the user to determine if they are valid. IsValidChar returns True if InputChar can appear in the field. IsValidChar returns False if InputChar is not a valid character for the field type.

The valid characters for a field object are given by the ValidChars property. By default, field objects accept all characters as valid. For each DataType that restricts the set of valid characters, the default valid characters are listed below:

DataType	Valid characters

ftSmallint	Digits 0 to 9, plus sign (+), and minus sign (-).

ftWord	Digits 0 to 9, plus sign (+), and minus sign (-)

ftAutoInc	Digits 0 to 9, plus sign (+), and minus sign (-)

ftInteger	Digits 0 to 9, plus sign (+), and minus sign (-)

ftLargeInt	Digits 0 to 9, plus sign (+), and minus sign (-)

ftCurrency	Digits 0 to 9, plus sign (+), minus sign (-), the letter E (E or e) and the decimal separator from the regional settings in the Windows control panel.

ftFloat	Digits 0 to 9, plus sign (+), minus sign (-), the letter E (E or e) and the decimal separator from the regional settings in the Windows control panel

ftBCD	Digits 0 to 9, plus sign (+), minus sign (-), and the decimal separator from the regional settings in the Windows control panel.

Note:	For some datatypes, such as ftGraphic, IsValidChar returns True for all characters although not every character is valid for the field. IsValidChar provides only a rough validation of input characters. More refined character-by-character validation can be provided by an edit mask. Also, the value for a field is validated as a whole when it is written to the database record.


TField.RefreshLookupList
 VCL Reference

TField.RefreshLookupList

TField	See also

Loads LookupList with all the values for LookupResultField that match distinct values of LookupKeyFields.

procedure RefreshLookupList;

Description

Call RefreshLookupList to load the lookup cache when setting the LookupCache property at runtime or when the values of the LookupResultField or the LookupKeyFields in the LookupDataSet may have changed.


TField.SetData
 VCL Reference

TField.SetData

TField	See also	Example

Assigns unformatted data to the field.

procedure SetData(Buffer: Pointer, NativeFormat: Boolean=True);

Description

Use SetData to assign data to a field in the format that is used by the underlying database table. Ultimately, any method of setting the data for the field component calls SetData, once the data has been parsed into the format expected by the database table.

SetData calls the OnValidate event handler before writing the data to the current record buffer. If the data is successfully written, SetData calls the OnChange event handler.

Buffer contains the field value in the field components underlying type. NativeFormat indicates whether the value in Buffer must be translated before the dataset assigns its value to its internal record.

Note:	SetData cannot be used to assign data to BLOB or memo fields. To write BLOB data, use the stream returned by the dataset’s CreateBlobStream method or the BLOB field’s LoadFromStream method.


TField.SetFieldType
 VCL Reference

TField.SetFieldType

TField	See also

Provides the interface for a method that can set the DataType for the field.

procedure SetFieldType(Value: TFieldType);

Description

As implemented in TField, SetFieldType does nothing. Descendant classes override SetFieldType to set the DataType for the field component. SetFieldType is useful for derived classes that can support more than one underlying data type. For example, a TBlobField may support ftBlob, ftFmtMemo, ftParadoxOle, ftDBaseOle, or ftTypedBinary.


TField.Validate
 VCL Reference

TField.Validate

TField	See also

Generates an OnValidate event.

procedure Validate(Buffer: Pointer);

Description

Call Validate to validate the unformatted data pointed to by the Buffer parameter. Validate is called by the dataset when writing new values to the current record.

The value of Buffer does not affect the value of the field outside the OnValidate event handler.


Hierarchy

TObject

TPersistent

TComponent

TField


TFieldDef
 VCL Reference

TFieldDef

Hierarchy	Properties	Methods	See also

TFieldDef is a field definition that corresponds to a physical field of a record in a table underlying a dataset.

Unit

DB

Description

A TFieldDef object contains the definition of one field in a table. The definition for a field includes such attributes as the field’s name, data type, and size. TFieldDef objects are typically used in collections of such objects, such as the FieldDefs property of the TDataSet component.

There are two primary reasons for working with TFieldDef objects:

To obtain information about field types in a dataset without opening the dataset.

To specify field definitions for a new table.

When using an existing table, a field definition is automatically created for each field in the dataset that comes from the underlying database. Inspect the properties of TFieldDef to retrieve information about specific fields in the dataset.

When creating new tables, such as with the TTable.CreateTable method or the TClientDataSet.CreateDataSet method, TFieldDef objects supply the definitions for the new fields that will comprise the new table.

A field definition has a corresponding TField object, but not all TField objects have a corresponding field definition. For example, calculated fields do not have field definition objects.


 VCL Reference

TFieldDef properties

TFieldDef	Alphabetically	Legend

In TFieldDef

Attributes

ChildDefs

DataType

FieldClass

FieldNo

InternalCalcField

ParentDef

Precision

Required

Size

Derived from TNamedItem

DisplayName

Name

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TFieldDef properties

TFieldDef	By object	Legend

Attributes

ChildDefs

Collection

DataType

DisplayName

FieldClass

FieldNo

ID

Index

InternalCalcField

Name

ParentDef

Precision

Required

Size


TFieldDef.Attributes
 VCL Reference

TFieldDef.Attributes

TFieldDef	See also

Identifies attributes of the field associated with the field def.

type

  TFieldAttribute = (faHiddenCol, faReadonly, faRequired, faLink, faUnNamed, faFixed);

  TFieldAttributes = set of TFieldAttribute;

property Attributes: TFieldAttributes;

Description

The following table lists the attributes for the field that the TFieldDef object defines.

Value	Meaning

faHiddenCol	Internal flag for hidden columns returned by live queries.

faReadonly	Indicates whether the physical field in the underlying table is read-only.

faRequired	Indicates whether a value for the physical field in the underlying table is required.

faLink	Internal flag for nested datasets.

faUnNamed	Internal use only. Indicates a TObjectField in a nested table that has no name associated with it.

faFixed	Indicates that the field has a fixed size.

Note:	The faReadonly value has the same name as a constant is in the SysUtils unit. If both the SysUtils and the Db units are used in your source files, you must disambiguate by specifying the unit to qualify the use of faReadonly. That is, write Db.faReadonly.


TFieldDef.ChildDefs
 VCL Reference

TFieldDef.ChildDefs

TFieldDef	See also

Specifies the TFieldDefs object that contains an array of child fields.

property ChildDefs: TFieldDefs;

Description

If the field that the TFieldDef object represents is an object field such as TADTField or TArrayField, child fields of the object field are stored in the TFieldDefs array referenced by the ChildDefs property.

Note:	You can’t create tables that contain object fields. ChildDefs is only used in field definitions that reflect an existing dataset, not field definitions that are used to create a new dataset.


TFieldDef.DataType
 VCL Reference

TFieldDef.DataType

TFieldDef	See also

Determines the type of a physical field.

property DataType: TFieldType;

Description

Use DataType to find out what type of data the field contains. When adding field definitions to a dataset, set DataType to specify what type of field is being defined.


TFieldDef.FieldClass
 VCL Reference

TFieldDef.FieldClass

TFieldDef	See also

Determines the class of the field object that corresponds to this field definition object.

type TFieldClass = class ofTField;

property FieldClass: TFieldClass;

Description

Inspect the read-only FieldClass property to find out the class of field object to which this field definition corresponds. The FieldClass is determined by the DataType of the field. For example, if the DataType is ftString, the FieldClass is TStringField.

The field object created from a field definition by the CreateField method is an instance of the FieldClass.


TFieldDef.FieldNo
 VCL Reference

TFieldDef.FieldNo

TFieldDef	See also

Identifies the physical field number used to reference the field.

property FieldNo: Integer;

Description

Use FieldNo to find out where the physical field the field definition references is in the set of fields in the table. For example, if the value of FieldNo is 2, then the field is the second field in the underlying database table.

When adding field definitions to a dataset, set FieldNo to specify the location at which to create the field.


TFieldDef.InternalCalcField
 VCL Reference

TFieldDef.InternalCalcField

TFieldDef	See also

Determines if the field is calculated by the underlying database.

property InternalCalcField: Boolean;

Description

Read InternalCalcField to find out if the field represents a value provided by the underlying database but is not a field in the physical database table. Internally calculated fields are calculated by SQL servers or the Borland Database Engine in a live query view and stored in the dataset like data fields.

For example, in the following SQL statement, the dataset includes a field for the calculated value ONHAND * COST.

SELECT PartNo, Description, OnHand, Cost, (OnHand * Cost)

FROM PARTS

When the TQuery object has its RequestLive property set to True, the field definition for that calculated value will have InternalCalcField set to True.

InternalCalcField is a read-only property.


TFieldDef.ParentDef
 VCL Reference

TFieldDef.ParentDef

TFieldDef	See also

The ParentDef property references the parent field definition for the field definition, if it exists.

property ParentDef: TFieldDef;

Description

If the TFieldDef object is the field definition of the child field of an object field, such as an ADT field or an array field, then ParentDef references the parent object’s field definition. If the TFieldDef object does not define the child field of an object field, ParentDef is nil..

Note:	You can’t create tables that contain object fields. ParentDef is only used in field definitions that reflect an existing dataset, not field definitions that are used to create a new dataset.


TFieldDef.Precision
 VCL Reference

TFieldDef.Precision

TFieldDef	See also

Specifies the number of digits of accuracy used to store the field value.

property Precision: Integer;

Description

When defining a BCD field, set Precision to the total number of digits stored for each field value. The value of Precision is ignored unless DataType is ftBCD.


TFieldDef.Required
 VCL Reference

TFieldDef.Required

TFieldDef	See also

Indicates whether a value for the physical field in the underlying table is required.

property Required: Boolean;

Description

Use Required to find out if a field in a dataset must have a value. If Required is True, the field must have a value. If Required is False, the field can be left blank.

When adding field definitions to a dataset, set Required to specify whether blank values for the new field should be prohibited.


TFieldDef.Size
 VCL Reference

TFieldDef.Size

TFieldDef	See also

Reports the size associated with the field in the physical database table.

property Size: Integer;

Description

Use Size to determine the size associated with the corresponding physical field.

Size is meaningful only for a field definition object with one of the following TFieldType values: ftString, ftBCD, ftBytes, ftVarBytes, ftBlob, ftMemo or ftGraphic. For string and byte fields, Size is the number of bytes reserved in the table for the field. For a BCD field, Size is the number of digits following the decimal point. For a BLOB, memo, or graphic field, Size is the number of bytes from the field’s value that are stored in the actual database table.


 VCL Reference

TFieldDef methods

TFieldDef	Alphabetically	Legend

In TFieldDef

AddChild

Assign

Create

CreateField

Destroy

HasChildDefs

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFieldDef methods

TFieldDef	By object	Legend

AddChild

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateField

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HasChildDefs

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TFieldDef.AddChild
 VCL Reference

TFieldDef.AddChild

TFieldDef	See also

Adds a new TFieldDef object to the ChildDefs array.

function AddChild: TFieldDef;

Description

Use AddChild to add a new field definition for a child field of the TFieldDef object’s field. AddChild returns the new field definition for the subfield.

Typically, applications never need to call AddChild because you can’t create tables that include object fields.


TFieldDef.Assign
 VCL Reference

TFieldDef.Assign

TFieldDef	See also

Copies the properties of one field definition to another.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to copy a field definition. Assign checks whether the Source parameter specifies another field definition, and if so, copies the values of the Name, DataType, Size, Precision, and InternalCalcField properties. Note that the value of FieldNo is not changed.

If the source is not a field definition, Assign calls the inherited method, which assigns properties from any object that specifies how to copy to a field definition in its AssignTo method.


TFieldDef.Create
 VCL Reference

TFieldDef.Create

TFieldDef	See also

Creates and initializes a TFieldDef instance.

constructor Create(Owner: TFieldDefs; const Name: String; DataType: TFieldType; Size: Integer; Required: Boolean; FieldNo: Integer); reintroduce; overload;

Description

Applications should not call Create directly. A TFieldDef is created automatically by the dataset for each field in an already existing table. When composing field definitions preparatory to creating a new table, the TFieldDefs.AddFieldDef method (or the older TFieldDefs.Add method) creates the needed instance of TFieldDef.


TFieldDef.CreateField
 VCL Reference

TFieldDef.CreateField

TFieldDef	See also

Creates a TField component that matches the specifications of the TFieldDef object.

function CreateField(Owner: TComponent; ParentField: TObjectField= nil; const FieldName: String= ''; CreateChildren: Boolean= True): TField;

Description

A dataset object calls CreateField to create the field components from the field definition objects. Applications need never call CreateField directly.


TFieldDef.Destroy
 VCL Reference

TFieldDef.Destroy

TFieldDef	See also

Destroys the TFieldDef instance and frees its memory.

destructor Destroy; override;

Description

Destroy calls the inherited Destroy method, and then frees and child field definition objects.

An application will seldom need to destroy a TFieldDef object using this method. Instead, call the Free method, inherited from TObject.


TFieldDef.HasChildDefs
 VCL Reference

TFieldDef.HasChildDefs

TFieldDef	See also

Indicates whether the field of the TFieldDef object has any child field definitions.

function HasChildDefs: Boolean;

Description

If the TFieldDef object defines an object field, such as TADTField or TArrayField, HasChildDefs returns True.


Hierarchy

TObject

TPersistent

TCollectionItem

TNamedItem

TFieldDef


TFieldDefList
 VCL Reference

TFieldDefList

Hierarchy	Properties	Methods	Events 	See also

TFieldDefList lists the field definition (TFieldDef) objects of a dataset in a flattened form.

Unit

DB

Description

TFieldDefList is used by a dataset to implement its FieldDefList property. This object lists field definitions in a flattened format.

With object field types, such as TADTField and TArrayField, there are two ways to represent the field definitions: hierarchically or flattened. When represented hierarchically, object field definitions contain a set of child definitions for the constituent subfields. When represented as a flattened set, child field definitions appear as siblings sequentially after the parent field definition.

TFieldDefList stores the flattened field definitions of a dataset. This is a linear representation of the data, and is in contrast to TFieldDefs which has a hierarchical representation of the data.

TFieldDefList is a descendant of TStringList. The strings in this string list are the names of fields. The objects that correspond to those strings are the TFieldDef objects.


 VCL Reference

TFieldDefList properties

TFieldDefList	Alphabetically	Legend

In TFieldDefList

FieldDefs

Updated

Derived from TFlatList

DataSet

Count

Derived from TStringList

Capacity

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

Names

StringsAdapter

Text

Values


 VCL Reference

TFieldDefList properties

TFieldDefList	By object	Legend

Capacity

CommaText

Count

DataSet

Duplicates

FieldDefs

Names

Objects

Sorted

StringsAdapter

Strings

Text

Updated

Values


TFieldDefList.FieldDefs
 VCL Reference

TFieldDefList.FieldDefs

TFieldDefList	See also

Lists the field definitions for the dataset associated with the TFieldDefList object.

property FieldDefs[Index: Integer]: TFieldDef;

Description

FieldDefs points to a internal list of field definitions for a dataset. A TFieldDefList with object field types, such as TADTField and TArrayField, lists child TFieldDef objects sequentially after the parent TFieldDef.


TFieldDefList.Updated
 VCL Reference

TFieldDefList.Updated

TFieldDefList	See also

Indicates whether the definitions listed by the FieldDefs property match the corresponding objects in the dataset’s FieldDefs property.

property Updated: Boolean;

Description

Use Updated to determine whether the definitions managed by the TFieldDefList object match the corresponding objects in the dataset’s FieldDefs property.  Updated is set to True when the dataset is opened. Updated is set to False when the dataset’s FieldDefs are changed.


 VCL Reference

TFieldDefList events

TFieldDefList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 VCL Reference

TFieldDefList events

TFieldDefList	By object	Legend

OnChange

OnChanging


 VCL Reference

TFieldDefList methods

TFieldDefList	Alphabetically	Legend

In TFieldDefList

FieldByName

Find

Derived from TFlatList

Create

Update

Derived from TStringList

Add

Clear

Delete

Destroy

Exchange

IndexOf

Insert

Sort

Derived from TStrings

AddObject

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfName

IndexOfObject

InsertObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFieldDefList methods

TFieldDefList	By object	Legend

AddObject

AddStrings

Add

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

FieldByName

Find

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

GetNamePath

GetText

IndexOfName

IndexOfObject

IndexOf

InheritsFrom

InitInstance

InsertObject

Insert

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort

Update


TFieldDefList.Find
 VCL Reference

TFieldDefList.Find

TFieldDefList	See also

Returns a field definition object given its field name.

function Find(const Name: String): TFieldDef; reintroduce;

Description

Call Find to obtain information about a particular field definition object. Specify the name of the field as the value of the Name parameter. If Find finds a field with a matching name, it returns the TFieldDef component for the specified Name. Otherwise it returns nil.

Note:	Find differs from the FieldByName method only when the named field definition is not in the list. When the field definition is not found, Find returns nil, while FieldByName raises an exception.


TFieldDefList.FieldByName
 VCL Reference

TFieldDefList.FieldByName

TFieldDefList	See also

Returns a field definition object given its field name.

function FieldByName(const Name: String): TFieldDef;

Description

Call FieldByName to obtain information about a particular field definition object. Specify the name of the field as the value of the Name parameter. If Name is not found, FieldByName raises an EDatabaseError exception with the error message “Field not found”.

Note:	FieldByName differs from the Find method only when the named field definition is not in the list. When the field definition is not found, FieldByName raises an exception, while Find returns nil.


Hierarchy

TObject

TPersistent

TStrings

TStringList

TFlatList

TFieldDefList


TFloatField
 VCL Reference

TFloatField

Hierarchy	Properties	Methods	Events 	Using TFloatField	See also

TFloatField represents a field that contains floating-point values in a dataset.

Unit

DB

Description

TFloatField encapsulates the fundamental behavior common to numeric data. Floating-point fields can hold values in the range from (positive or negative) 5.0 * 10^-324 to 1.7 * 10^308 with an accuracy of 15 digits. TFloatField introduces new properties to convert between integer values and other data types, to control the precision of numbers that the field will permit, and to format the value for display purposes.

If you use the Fields editor at design time to create a persistent field component for the float field, you can access it by name at runtime. When using dynamic field components, you can access the TFloatField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TFloatField properties

TFloatField	Alphabetically	Legend

In TFloatField

AsFloat

AsInteger

AsString

AsVariant

Currency

DataSize

MaxValue

MinValue

Precision

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFloatField properties

TFloatField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

Currency

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

Precision

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TFloatField.AsFloat
 VCL Reference

TFloatField.AsFloat

TFloatField	See also

Represents the value of the floating-point field.

property AsFloat: Double;

Description

Floating-point values need no conversion, because the native storage format of a floating-point field is a Double. AsFloat provides a uniform interface that allows applications to get or set floating-point values with generic field components when the internal storage format of the data is not known.

If the value assigned to the field does not fall within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TFloatField.AsInteger
 VCL Reference

TFloatField.AsInteger

TFloatField	See also	Example

Represents the value of the floating-point field as an integer value.

property AsInteger: Longint;

Description

Use AsInteger to

Assign an integer value to the floating-point field.

Assign the floating-point field value to an integer.

AsInteger converts floating point values to integers by truncating the decimal portion. If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


TFloatField.AsString
 VCL Reference

TFloatField.AsString

TFloatField	See also

Represents the value of a floating-point field as a string value.

property AsString: String;

Description

Use AsString to

Assign the floating-point field value to string value.

Assign a string value to the floating-point field.

For example, this code assigns a string value to floating-point field value:

MyFloatField.AsString := '13.5';

To assign floating-point field value to a string, use code similar to this:

Edit1.Text := MyFloatField.AsString;

If the string assigned to the field does not represent a valid floating-point value within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TFloatField.AsVariant
 VCL Reference

TFloatField.AsVariant

TFloatField	See also

Represents the value of a floating-point field as a variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the floating-point field value to a variant variable.

Assign a variant value to the floating-point field.

Using variants is useful when the actual field type and the format of the data are unknown.

If the value assigned to the field does not fall within the range specified with MinValue and MaxValue properties, an EDatabaseError exception is raised.


TFloatField.Currency
 VCL Reference

TFloatField.Currency

TFloatField	See also

Determines whether the value in the field should be formatted as a currency value.

property Currency: Boolean;

Description

Use the Currency property to specify the formatting of the field for viewing and editing in a data-aware control.

The field is formatted for display using the DisplayFormat property if it is assigned. If DisplayFormat is not assigned, Currency determines how the field is formatted for display. If Currency is True the value is formatted for display using the FloatToText function with the ffCurrency formatting code. If Currency is False, the value is formatted with the ffGeneral format.

The field is formatted for editing purposes using the EditFormat (or DisplayFormat) property if it is assigned. If neither EditFormat nor DisplayFormat is assigned, Currency determines how the field is formatted for editing. If Currency is True, the value is formatted for editing using the FloatToText function with the ffFixed formatting code. If Currency is False, the value is formatted with the ffGeneral format.


TFloatField.DataSize
 VCL Reference

TFloatField.DataSize

TFloatField	See also	Example

Specifies the amount of memory needed to store the value of a float field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a float field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For float fields, DataSize is always 8. Database tables store float fields as a Double, which is the same as the type used by TFloatField.


TFloatField.MaxValue
 VCL Reference

TFloatField.MaxValue

TFloatField	See also

Limits the maximum value in the floating-point field.

property MaxValue: Double;

Description

Use MaxValue to get or set the maximum value that can be entered into the field. If a value greater than MaxValue is entered, an EDatabaseError exception is raised.


TFloatField.MinValue
 VCL Reference

TFloatField.MinValue

TFloatField	See also

Limits the minimum value in the floating-point field.

property MinValue: Double;

Description

Use MinValue to get or set the minimum value that can be entered into the field. If a value smaller than MinValue is entered, an EDatabaseError exception is raised.


TFloatField.Precision
 VCL Reference

TFloatField.Precision

TFloatField	See also

Determines the precision used in formatting the value in a floating-point field.

property Precision: Integer;

Description

Use Precision to set the number of digits beyond the decimal point that the value should be formatted to before rounding begins. Precision affects the format of the floating-point value when it is displayed as a text string, not the actual floating-point value that is stored in the field.

The default value of Precision is 15 decimal places.

Note:	Precision must be greater than or equal to 2. Trying to set Precision to a value less than 2 changes the value of Precision to 2.


TFloatField.Value
 VCL Reference

TFloatField.Value

TFloatField	See also

Specifies the value of the floating-point field.

property Value: Double;

Description

Use Value to read data from and write data to a floating-point component at runtime. Using the Value property is the same as using the AsFloat property. Use Value when you know the field component is a floating-point field. Use AsFloat when working with a generic field component.


 VCL Reference

TFloatField events

TFloatField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TFloatField events

TFloatField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TFloatField methods

TFloatField	Alphabetically	Legend

In TFloatField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFloatField methods

TFloatField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TFloatField.Create
 VCL Reference

TFloatField.Create

TFloatField	See also

Creates an instance of TFloatField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TFloatField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftFloat and Precision to 15. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TFloatField. After instantiating a TFloatField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TFloatField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TFloatField with a dataset component by setting its DataSet property to the name of the dataset component. Optionally set the Precision property to the desired degree of precision.

The example below creates a TFloatField object for a field named Amount accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TFloatField;

begin

  SQLDataSet1.Close;

  T := TFloatField.Create(SQLDataSet1);

  T.Precision := 2;

  T.FieldName := 'Amount';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TFloatField


TFMTBCDField
 VCL Reference

TFMTBCDField

Hierarchy	Properties	Methods	Events 	Using TFMTBCDField	See also

TFMTBCDField represents a binary-coded decimal (BCD) field in a dataset.

Unit

DB

Description

TFMTBCDField encapsulates the fundamental behavior common to binary-coded decimal (BCD) fields. BCD values provide greater precision and accuracy than floating-point numbers. BCD fields are often used for storing and manipulating monetary values.

Delphi uses two different field types for representing BCD fields: TFMTBCDField and TBCDField. TFMTBCDField uses a true BCD value (TBCD) to store and manipulate BCD values. This gives greater precision and accuracy than the Currency type used by TBCDField objects, but results in somewhat slower performance. If your application does not require more than 4 decimal places or 20 significant digits, you may want to use TBCDField instead to take advantage of its better performance.

If you use the Fields editor at design time to create a persistent field component for the BCD field, you can access it by name at runtime. When using dynamic field components, you can access the TFMTBCDField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TFMTBCDField properties

TFMTBCDField	Alphabetically	Legend

In TFMTBCDField

AsBCD

AsCurrency

AsFloat

AsInteger

AsString

AsVariant

Currency

DataSize

MaxValue

MinValue

Precision

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBoolean

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFMTBCDField properties

TFMTBCDField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

Currency

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

Precision

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TFMTBCDField.AsBCD
 VCL Reference

TFMTBCDField.AsBCD

TFMTBCDField	See also

Represents the value of the field as a TBcd value.

property AsBCD: TBcd;

Description

Use AsBCD to

Assign the binary-coded decimal (BCD) field value to a TBcd value.

Assign a TBcd value to the BCD field.

For example, this code assigns a TBcd value to a BCD field value:

MyFMTBCDField.AsBCD := BCDValue;

To assign a binary-coded decimal field value to a currency value, use code similar to this:

BCDVariable := MyFMTBCDField.AsBCD;

If you use AsBCD to assign a value that is not within the range established by the MinValue and the MaxValue properties, AsBCD raises an EDatabaseError exception.


TFMTBCDField.AsCurrency
 VCL Reference

TFMTBCDField.AsCurrency

TFMTBCDField	See also

Represents the value of the field as a Currency value.

property AsCurrency: Currency;

Description

Use AsCurrency to

Assign the binary-coded decimal (BCD) field value to a Currency value.

Assign a Currency value to the BCD field.

For example, this code assigns a Currency value to a BCD field value:

MyFMTBCDField.AsCurrency := CurrencyValue;

To assign a binary-coded decimal field value to a currency value, use code similar to this:

CurrencyVariable := MyFMTBCDField.AsCurrency;

If you use AsCurrency to assign a value that is not within the range established by the MinValue and the MaxValue properties, AsCurrency raises an EDatabaseError exception.

Note:	Do not confuse the AsCurrency property, which converts the type of the data, with the Currency property, which indicates how the data should be formatted.


TFMTBCDField.AsFloat
 VCL Reference

TFMTBCDField.AsFloat

TFMTBCDField	See also

Represents the value of the field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign the binary-coded decimal (BCD) field value to a floating-point value.

Assign a floating-point value to the BCD field.

For example, this code assigns a floating-point value to a BCD field value:

MyFMTBCDField.AsFloat := FloatVariable;

To assign a BCD field value to a floating-point value, use code similar to this:

FloatVariable := MyFMTBCDField.AsFloat;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsFloat raises an EDatabaseError exception.


TFMTBCDField.AsInteger
 VCL Reference

TFMTBCDField.AsInteger

TFMTBCDField	See also 	Example

Represents the value of the field as an integer.

property AsInteger: Longint;

Description

Use AsInteger to

Assign the binary-coded decimal field (BCD) value to an integer variable.

Assign an integer value to the BCD field.

For example, this code assigns integer value to a BCD field value:

MyFMTBCDField.AsInteger := IntegerVariable;

To assign a BCD field value to an integer value, use code similar to this:

IntegerVariable := MyFMTCDField.AsInteger;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsInteger raises an EDatabaseError exception


TFMTBCDField.AsString
 VCL Reference

TFMTBCDField.AsString

TFMTBCDField	See also

Represents the value of the field as a string.

property AsString: string;

Description

Use AsString to

Assign the binary-coded decimal (BCD) field value to string variable.

Assign a string value to the BCD field.

For example, this code assigns a string value to a BCD field value:

MyFMTBCDField.AsString := '12.32';

To assign a BCD field value to a string value, use code similar to this:

Edit1.Text := MyFMTBCDField.AsString;

If the string assigned to the field does not represent a valid BCD value within the range specified by the MinValue and MaxValue properties, AsString raises an EDatabaseError exception.


TFMTBCDField.AsVariant
 VCL Reference

TFMTBCDField.AsVariant

TFMTBCDField	See also

Represents the value of a binary-coded decimal field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the binary-coded decimal (BCD) field value to Variant value.

Assign a Variant value to the BCD field.

For example, this code assigns a Variant value to a BCD field value:

MyFMTBCDField.AsVariant := VariantVariable;

To assign a BCD field value to a variant value, use code similar to this:

VariantVariable := MyFMTBCDField.AsVariant;

Using variants is useful when both the actual field type and the type of the data are unknown.

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, AsVariant raises an EDatabaseError exception.


TFMTBCDField.Currency
 VCL Reference

TFMTBCDField.Currency

TFMTBCDField	See also

Determines whether the value in the field should be formatted as a currency value.

property Currency: Boolean;

Description

Use the Currency property to influence how the value in the field should be formatted for viewing and editing in a data-aware control.

For display purposes, the field is formatted using the DisplayFormat property if it is assigned. Similarly, for editing purposes, the field is formatted using the EditFormat (or DisplayFormat) property if it is assigned.

If DisplayFormat or EditFormat is not assigned, Currency determines how the field is formatted. If Currency is True, the value is formatted to represent a monetary value. If Currency is False, it is formatted to reflect the precision and decimal places of the BCD type.


TFMTBCDField.DataSize
 VCL Reference

TFMTBCDField.DataSize

TFMTBCDField	See also	Example

Indicates the amount of memory needed to store the value of a BCD field in its native binary-coded decimal format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a binary-coded decimal (BCD) field’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For BCD fields, DataSize is always the size of the TBcd type.


TFMTBCDField.MaxValue
 VCL Reference

TFMTBCDField.MaxValue

TFMTBCDField	See also

Limits the maximum value in the binary-coded decimal field.

property MaxValue: string;

Description

Use MaxValue to get or set the maximum value that can be entered into the field. MaxValue is the string representation of the maximum value.

If a value greater than MaxValue is entered, TFMTBCDField raises an EDatabaseError exception


TFMTBCDField.MinValue
 VCL Reference

TFMTBCDField.MinValue

TFMTBCDField	See also

Limits the minimum value in the binary-coded decimal field.

property MinValue: string;

Description

Use MinValue to get or set the minimum value that can be entered into the field. MinValue is the string representation of the minimum value.

If a value smaller than MinValue is entered, TFMTBCDField raises an EDatabaseError exception.


TFMTBCDField.Precision
 VCL Reference

TFMTBCDField.Precision

TFMTBCDField	See also

Specifies the number of digits of accuracy used to store the field value.

property Precision: Integer;

Description

Precision can be a value between 0 and 32. Some database servers support more digits than 32, but these can’t be handled by client datasets, and so TFMTBCDField limits the value of Precision to be no greater than 32.


TFMTBCDField.Value
 VCL Reference

TFMTBCDField.Value

TFMTBCDField	See also

Represents the value of the BCD field as a TBcd value.

property Value: TBcd;

Description

Use Value to read data from and write data to a BCD field. Using the Value property is the same as using the AsBCD property.

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


 VCL Reference

TFMTBCDField events

TFMTBCDField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TFMTBCDField events

TFMTBCDField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TFMTBCDField methods

TFMTBCDField	Alphabetically	Legend

In TFMTBCDField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFMTBCDField methods

TFMTBCDField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TFMTBCDField.Create
 VCL Reference

TFMTBCDField.Create

TFMTBCDField	See also

Create creates an instance of TFMTBCDField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TFMTBCDField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TFMTBCDField. After instantiating a TFMTBCDField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TFMTBCDField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TFMTBCDField with a dataset component by setting its DataSet property to the name of the dataset component. Specify the precision of the TFMTBCDField by setting the Precision property.

The example below creates a TFMTBCDField object for a field named Amount accessed through a TSQLQuery named SQLQuery1.

var

  T: TFMTBCDField;

begin

  SQLQuery1.Close;

  T := TFMTBCDField.Create(SQLQuery1);

  T.FieldName := 'Amount';

  T.Name := SQLQuery1.Name + T.FieldName;

  T.Index := SQLQuery1.FieldCount;

  T.DataSet := SQLQuery1;

  T.Precision := 20;

  SQLQuery1.FieldDefs.UpDate;

  SQLQuery1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TFMTBCDField


TFontAdapter
 VCL Reference

TFontAdapter

Hierarchy	Properties	Methods	See also

TFontAdapter is a helper class used to connect a TFont object to an OLE font object.

Unit

AxCtrls

Description

To create an instance of a TFontAdapter, call the global GetOleFont procedure.  GetOleFont creates the binding between a TFont object and an OLE font interface.


 VCL Reference

TFontAdapter properties

TFontAdapter	Alphabetically	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TFontAdapter properties

TFontAdapter	By object	Legend

RefCount


 VCL Reference

TFontAdapter methods

TFontAdapter	Alphabetically	Legend

In TFontAdapter

Changed

Create

GetOleFont

SetOleFont

Update

Derived from TCustomAdapter

Destroy

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TFontAdapter methods

TFontAdapter	By object	Legend

AfterConstruction

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetOleFont

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetOleFont

Update


TFontAdapter.Changed
 VCL Reference

TFontAdapter.Changed

TFontAdapter	See also

Updates the associated IFont interface with the new properties of the font object.

procedure Changed; override;

Description

Changed is called automatically when the TFont object changes.  It ensures that the associated OLE interface is updated.


TFontAdapter.GetOleFont
 VCL Reference

TFontAdapter.GetOleFont

TFontAdapter	See also

Obtains the IFontDisp interface from the associated OLE object.

procedure TFontAdapter.GetOleFont(var OleFont: IFontDisp);

Description

ActiveX controls that use TFontAdapter call GetOleFont to obtain the interface that corresponds to the adapter’s TFont object. If the OLE object for the font does not exist, GetOleFont creates it.

The IFontDisp interface is returned as the OleFont parameter.


TFontAdapter.SetOleFont
 VCL Reference

TFontAdapter.SetOleFont

TFontAdapter	See also

Associates the adapter with the OLE object represented by a specified interface.

procedure TFontAdapter.SetOleFont(const OleFont: IFontDisp);

Description

ActiveX controls that use TFontAdapter call SetOleFont to associate the adapter with the interface passed as the OleFont parameter.


TFontAdapter.Update
 VCL Reference

TFontAdapter.Update

TFontAdapter	See also

Updates the associated TFont object to reflect changes in the associated OLE font.

procedure TFontAdapter.Update;

Description

Update is called automatically when the associated OLE object changes. It ensures that the corresponding TFont object reflects those changes.


TFontAdapter.Create
 VCL Reference

TFontAdapter.Create

TFontAdapter	See also

Creates an instance of the font adapter control.

constructor Create(Font: TFont);

Description

Applications do not normally create objects of this class. Instead, they call the GetOleFont procedure, which creates the binding between a TFont and an OLE font object.


Hierarchy

TObject

TInterfacedObject

TCustomAdapter

TFontAdapter


TGraphicField
 VCL Reference

TGraphicField

Hierarchy	Properties	Methods	Events 	Using TGraphicField	See also

TGraphicField represents a graphics field in a dataset.

Unit

DB

Description

TGraphicField encapsulates the fundamental behavior common to fields that hold graphic data. Graphics fields are a form of binary large object (BLOB) field where the data includes a BLOB header describing the encoding of the graphical value.

If you use the Fields editor at design time to create a persistent field component for the graphics field, you can access it by name at runtime. When using dynamic field components, you can access the TGraphicField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TGraphicField properties

TGraphicField	Alphabetically	Legend

Derived from TBlobField

AsString

AsVariant

BlobSize

BlobType

GraphicHeader

IsNull

Modified

Transliterate

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TGraphicField properties

TGraphicField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

BlobSize

BlobType

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

GraphicHeader

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Modified

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


 VCL Reference

TGraphicField events

TGraphicField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TGraphicField events

TGraphicField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TGraphicField methods

TGraphicField	Alphabetically	Legend

In TGraphicField

Create

Derived from TBlobField

Assign

Clear

IsBlob

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SetFieldType

Derived from TField

AssignValue

Destroy

FocusControl

GetData

IsValidChar

RefreshLookupList

SetData

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TGraphicField methods

TGraphicField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToFile

SaveToStream

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TGraphicField.Create
 VCL Reference

TGraphicField.Create

TGraphicField	See also

Creates an instance of TGraphicField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TGraphicField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftGraphic. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TGraphicField. After instantiating a TGraphicField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TGraphicField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TGraphicField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TGraphicField object for a field named Pics accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TGraphicField;

begin

  SQLDataSet1.Close;

  T := TGraphicField.Create(SQLDataSet1);

  T.FieldName := 'Pics';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TBlobField

TGraphicField


TGridDataLink
 VCL Reference

TGridDataLink

Hierarchy	Properties	Methods	See also

TGridDataLink helps manage the link to a data source and maintain the field mapping for a TCustomDBGrid object.

Unit

DBGrids

Description

TGridDataLink is tailored to work with a TCustomDBGrid. It should only be used by the TCustomDBGrid class.


 VCL Reference

TGridDataLink properties

TGridDataLink	Alphabetically	Legend

In TGridDataLink

DefaultFields

FieldCount

Fields

Grid

SparseMap

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TGridDataLink properties

TGridDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DefaultFields

Editing

Eof

FieldCount

Fields

Grid

ReadOnly

RecordCount

SparseMap


TGridDataLink.DefaultFields
 VCL Reference

TGridDataLink.DefaultFields

TGridDataLink	See also

Indicates whether the dataset’s underlying field components are generated dynamically when the dataset is opened.

property DefaultFields: Boolean;

Description

Read DefaultFields to determine whether or not a dataset uses dynamically generated field components or persistent field components. If DefaultFields is True, the dataset uses dynamically allocated field components. If DefaultFields is False, the dataset uses persistent field components or the custom field mapping contains unmapped fields.

If DefaultFields is False, the TCustomDBGrid may not show all the fields that are present in the underlying database table.


TGridDataLink.FieldCount
 VCL Reference

TGridDataLink.FieldCount

TGridDataLink	See also 	Example

Indicates the number of entries in the field map.

property FieldCount: Integer;

Description

Read FieldCount to determine the number of entries in the field map. Used with the Fields property, this is useful for applications that need to iterate over all of the mapped fields.

FieldCount is the same as the number of columns in the TCustomDBGrid. The field map can contain undefined fields, which do not appear in the dataset. Undefined fields in the field map stand in for fields in the columns of the grid that are not in the dataset, such as calculated fields.


TGridDataLink.Fields
 VCL Reference

TGridDataLink.Fields

TGridDataLink	See also	Example

Lists all the field components contained in the field map.

property Fields[I: Integer]: TField;

Description

Use Fields to access field components by index number. Fields is a zero-based array. If the SparseMap property is True, the field map may contain undefined fields. For these entries, Fields returns nil.


TGridDataLink.Grid
 VCL Reference

TGridDataLink.Grid

TGridDataLink	See also

Identifies the Grid component that uses this data link to manage its data.

property Grid: TCustomDBGrid;

Description

Use Grid to access the data-aware grid that owns this data link. The value of Grid is assigned by the TGridDataLink constructor.


TGridDataLink.SparseMap
 VCL Reference

TGridDataLink.SparseMap

TGridDataLink	See also

Indicates whether the associated grid has customized the field map (which means it may contain undefined fields).

property SparseMap: Boolean

Description

Read SparseMap to determine whether the field map is not a simple reflection of the underlying dataset. The TCustomDBGrid sets SparseMap when it builds the field map. SparseMap is False if the TCustomDBGrid builds a default field map directly from the dataset. Any changes to the field components associated with each column cause TCustomDBGrid to change SparseMap to True. When SparseMap is True, the field map may contain undefined fields if the column attributes indicate an invalid field name or an unassigned field component.


 VCL Reference

TGridDataLink methods

TGridDataLink	Alphabetically	Legend

In TGridDataLink

ActiveChanged

AddMapping

BuildAggMap

ClearMapping

Create

DataSetChanged

DataSetScrolled

Destroy

EditingChanged

FocusControl

GetMappedIndex

IsAggRow

LayoutChanged

Modified

RecordChanged

Reset

UpdateData

Derived from TDataLink

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TGridDataLink methods

TGridDataLink	By object	Legend

ActiveChanged

AddMapping

AfterConstruction

Assign

BeforeDestruction

BuildAggMap

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearMapping

Create

DataSetChanged

DataSetScrolled

DefaultHandler

Destroy

Dispatch

Edit

EditingChanged

ExecuteAction

FieldAddress

FocusControl

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMappedIndex

GetNamePath

InheritsFrom

InitInstance

InstanceSize

IsAggRow

LayoutChanged

MethodAddress

MethodName

Modified

NewInstance

RecordChanged

Reset

SafeCallException

UpdateAction

UpdateData

UpdateRecord


TGridDataLink.ActiveChanged
 VCL Reference

TGridDataLink.ActiveChanged

TGridDataLink	See also

Informs the TCustomDBGrid of changes in the Active property.

procedure ActiveChanged; override;

Description

Applications can not call the ActiveChanged procedure directly. Changes in the Active property trigger this procedure. When the dataset becomes inactive, ActiveChanged makes sure that the grid is not in edit mode. When the dataset becomes active, ActiveChanged makes sure that the grid does not contain references to fields that are no longer in the dataset, and that the grid does is not scrolled inappropriately.


TGridDataLink.AddMapping
 VCL Reference

TGridDataLink.AddMapping

TGridDataLink	See also

Adds a field component to the end of the field map.

function AddMapping(const FieldName: String): Boolean;

Description

Applications should not call AddMapping directly, because this would cause the field map to become out of sync with the columns in TCustomDBGrid. TCustomDBGrid calls AddMapping iteratively to build a field map that corresponds to its columns.


TGridDataLink.BuildAggMap
 VCL Reference

TGridDataLink.BuildAggMap

TGridDataLink	See also

Reserved for future use.

procedure BuildAggMap;

Description

BuildAggMap is not currently used. It is reserved for future support of aggregates in data-aware grids.


TGridDataLink.ClearMapping
 VCL Reference

TGridDataLink.ClearMapping

TGridDataLink	See also

Empties the field map and frees any associated memory.

procedure ClearMapping;

Description

Applications should not call ClearMapping directly, because this would cause the field map to become out of sync with the columns of the TCustomDBGrid. The TCustomDBGrid calls ClearMapping first, every time it regenerates the field map.


TGridDataLink.Create
 VCL Reference

TGridDataLink.Create

TGridDataLink	See also

Creates an instance of TGridDataLink.

constructor Create(AGrid: TCustomDBGrid);

Description

Applications should not call the Create method for a TGridDataLink directly. The TCustomDBGrid object that owns a TGridDataLink calls Create from its own constructor.


TGridDataLink.DataSetChanged
 VCL Reference

TGridDataLink.DataSetChanged

TGridDataLink	See also

Informs TCustomDBGrid of changes to the dataset.

procedure DataSetChanged; override;

Description

Applications can not call DataSetChanged directly. Changes to the contents of the dataset trigger this method automatically. DataSetChanged allows the TCustomDBGrid to keep track of when the contents of the dataset change.


TGridDataLink.DataSetScrolled
 VCL Reference

TGridDataLink.DataSetScrolled

TGridDataLink	See also

Informs the TCustomDBGrid when the dataset has finished scrolling.

procedure DataSetScrolled(Distance: Integer); override;

Description

Applications can not call the DataSetScrolled procedure directly. This procedure is called automatically after the dataset for the TCustomDBGrid scrolls. TGridDataLink informs the TCustomDBGrid that a scroll of the dataset has just occurred by calling its Scroll method.


TGridDataLink.Destroy
 VCL Reference

TGridDataLink.Destroy

TGridDataLink	See also

Destroys an instance of TGridDataLink.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The TCustomDBGrid that owns a TGridDataLink calls Free from its own destructor to destroy the TGridDataLink object.

Destroy frees up the memory used by the field map before calling the inherited destructor.


TGridDataLink.EditingChanged
 VCL Reference

TGridDataLink.EditingChanged

TGridDataLink	See also

Informs the TCustomDBGrid of changes in the editing state of the dataset.

procedure EditingChanged; override;

Description

Applications can not call the EditingChanged procedure directly. Changes in the Editing property trigger this procedure. EditingChanged allows the TCustomDBGrid to provide visual feedback to the user about the editing state of the dataset.


TGridDataLink.FocusControl
 VCL Reference

TGridDataLink.FocusControl

TGridDataLink	See also

Displays the editor and gives focus to a field control in the TCustomDBGrid object.

procedure FocusControl(Field: TFieldRef); override;

Description

Call the FocusControl procedure to bring up the editor for the representation of Field in the TCustomDBGrid. FocusControl selects Field in the TCustomDBGrid, and then tells the TCustomDBGrid object to bring up the editor.


TGridDataLink.GetMappedIndex
 VCL Reference

TGridDataLink.GetMappedIndex

TGridDataLink	See also

GetMappedIndex provides the index of a field component in the dataset that corresponds to an index within the field map.

function GetMappedIndex(ColIndex: Integer): Integer;

Description

Use GetMappedIndex on an index into the field map to get an index into the dataset for the same field component. Both the field map and the dataset are zero-based arrays. If an entry in the field map is an undefined field, GetMappedIndex returns -1.


TGridDataLink.IsAggRow
 VCL Reference

TGridDataLink.IsAggRow

TGridDataLink	See also

Reserved for future use.

function IsAggRow(Value: Integer): Boolean; virtual;

Description

IsAggRow indicates whether the row specified by Value contains aggregate values rather than data. Value is the index of a row in the cache of rows currently displayed.

IsAggRow always returns False because data-aware grids do not currently display aggregate values. This method is reserved for future support of aggregates in data-aware grids.


TGridDataLink.LayoutChanged
 VCL Reference

TGridDataLink.LayoutChanged

TGridDataLink	See also

Informs the grid after the layout of the TCustomDBGrid has changed in a way that affects the representation of the dataset.

procedure LayoutChanged; override;

Description

Applications can not call the LayoutChanged method directly. The TCustomDBGrid that owns the TGridDataLink calls this method automatically when layout changes affect the representation of the dataset. LayoutChanged allows the TCustomDBGrid to regenerate its layout by calling its LayoutChanged method.


TGridDataLink.Modified
 VCL Reference

TGridDataLink.Modified

TGridDataLink	See also

Tracks changes to the data which have not been written to the current record in the database.

procedure Modified;

Description

Applications should not call Modified directly. Modified is called automatically whenever the TCustomDBGrid starts editing one of its fields. Modified allows the TGridDataLink to keep track of whether there are any edits that have not been posted.


TGridDataLink.RecordChanged
 VCL Reference

TGridDataLink.RecordChanged

TGridDataLink	See also

Informs the grid of changes in the current record or field of the DataSource.

procedure RecordChanged(Field: TField);

Description

Applications can not call RecordChanged directly. It is called automatically when the contents of the current record change. The Field parameter indicates which field in the current record has changed. If Field is nil, the entire record has changed.

RecordChanged informs TCustomDBGrid of these changes so that it can update the display of the affected column or columns.


TGridDataLink.Reset
 VCL Reference

TGridDataLink.Reset

TGridDataLink	See also

Cancels any pending edits to the dataset that have not been written to the current record in the database.

procedure Reset;

Description

Reset is triggered by user actions that cancel any pending edits to the dataset.


TGridDataLink.UpdateData
 VCL Reference

TGridDataLink.UpdateData

TGridDataLink	See also

Allows the grid to post changes to the dataset.

procedure UpdateData;

Description

Applications can not call the UpdateData procedure directly. It is called automatically when pending changes need to be posted to the dataset. UpdateData tells the TCustomDBGrid to write any unposted changes to the current field to the underlying Field component.


Hierarchy

TObject

TPersistent

TDataLink

TGridDataLink


TGuidField
 VCL Reference

TGuidField

Hierarchy	Properties	Methods	Events 	Using TGuidField	See also

TGuidField represents a guid field in a dataset.

Unit

DB

Description

TGuidField encapsulates the fundamental behavior common to fields storing Globally Unique Identifiers (GUIDs). In addition to the properties, methods, and events common to all fields that are introduced by the TField class, TGuidField introduces the AsGuid property for setting and getting the field's value as a TGUID data type.

If you use the Fields editor at design time to create a persistent field component for the guid field, you can access it by name at runtime. When using dynamic field components, you can access the TGuidField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TGuidField properties

TGuidField	Alphabetically	Legend

In TGuidField

AsGuid

Derived from TStringField

AsBCD

AsBoolean

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

DataSize

FixedChar

Transliterate

Value

Derived from TField

Alignment

AsCurrency

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TGuidField properties

TGuidField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsGuid

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FixedChar

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


TGuidField.AsGuid
 VCL Reference

TGuidField.AsGuid

TGuidField	See also

Represents the value of the field as a Globally Unique Identifier (GUID).

property AsGuid: TGUID;

Description

Use AsGuid to

Assign the GUID field value to a TGUID variable.

Assign a TGUID as the value of the field.

AsGuid uses the StringToGUID and GUIDToString functions internally to convert between the internal representation of the GUID as a string and a TGUID type.


 VCL Reference

TStringField events

TStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TStringField events

TStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TStringField methods

TStringField	Alphabetically	Legend

In TGuidField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStringField methods

TStringField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TGuidField.Create
 VCL Reference

TGuidField.Create

TGuidField	See also

Creates an instance of a TGuidField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TGuidField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftGuid. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TGuidField. After instantiating a TGuidField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TGuidField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TGuidField with a dataset component by setting its DataSet property.

The example below creates a TGuidField object for a field named Guid accessed through a TQuery named Query1.

var

  T: TGuidField;

begin

  Query1.Close;

  T := TGuidField.Create(Query1);

  T.FieldName := 'Guid';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TStringField

TGuidField


THandleObject
 VCL Reference

THandleObject

Hierarchy	Properties	Methods	See also

THandleObject is the base class for all thread synchronization objects that use a handle.

Unit

SyncObjs

Description

Use THandleObject as a base class when defining an object that uses a handle when coordinating the execution of different threads in a multi-threaded application. Handled synchronization objects include event objects that allow threads to signal when critical events have occurred.

Do not create instances of THandleObject. THandleObject is a base class that introduces properties for managing the handle of a synchronization object but does not provide a mechanism for acquiring that handle. Descendants of THandleObject must acquire the appropriate type of handle.


 VCL Reference

THandleObject properties

THandleObject	Alphabetically	Legend

In THandleObject

Handle

LastError


 VCL Reference

THandleObject properties

THandleObject	By object	Legend

Handle

LastError


THandleObject.Handle
 VCL Reference

THandleObject.Handle

THandleObject	See also

Specifies the handle of the Windows object used by THandleObject.

type THandle = Integer;

property Handle: THandle;

Description

Read Handle to obtain the Windows handle for the synchronization object. Use Handle when making Windows API calls that require a handle to the synchronization object.

THandleObject provides no mechanism for setting the Handle property. Descendants of THandleObject set the Handle property to the handle for whatever Windows synchronization object they represent.


THandleObject.LastError
 VCL Reference

THandleObject.LastError

THandleObject	See also

Indicates the Windows error code obtained from Handle.

property LastError: Integer;

Description

Read LastError when an operation of the THandleObject fails. LastError returns the Windows error code that represents the reason for the failure. If no operation failed, LastError is 0.


 VCL Reference

THandleObject Methods

THandleObject	By Object	Legend

In THandleObject

Destroy

Derived from TSynchroObject

Acquire

Release

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THandleObject Methods

THandleObject	By Object	Legend

Acquire

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Release

SafeCallException


THandleObject.Destroy
 VCL Reference

THandleObject.Destroy

THandleObject	See also

Destroys an instance of THandleObject.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the THandleObject reference is not nil and only then calls Destroy.

Destroy releases the handle before calling the inherited destructor.


Hierarchy

TObject

TSynchroObject

THandleObject


IDBSession
 VCL Reference

IDBSession

Hierarchy	Methods 	See also

IDBSession is the interface for database sessions.

Unit

DB

Description

IDBSession is a generic interface for logging into a database session. Components that allow an application to provide a password for opening password-protected tables or databases implement IDBSession. This allows the global PasswordDialog function to work with any component that implements IDBSession to add or remove passwords.


 VCL Reference

IDBSession methods

IDBSession	Alphabetically	Legend

In IDBSession

AddPassword

RemoveAllPasswords

RemovePassword

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDBSession methods

IDBSession	By object	Legend

_AddRef

_Release

AddPassword

QueryInterface

RemoveAllPasswords

RemovePassword


IDBSession.AddPassword
 VCL Reference

IDBSession.AddPassword

IDBSession	See also

Logs in to the session using a specified password.

procedure AddPassword(const APassword: string);

Description

Call AddPassword to supply a password to a session. After calling AddPassword, the application can open any tables or databases protected by that password from within the session until the RemovePassword or RemoveAllPasswords method retracts the password. If the password-protected table is closed, it can be reopened without resupplying the password.

APassword is the password to supply.


IDBSession.RemoveAllPasswords
 VCL Reference

IDBSession.RemoveAllPasswords

IDBSession	See also

Removes all passwords from the session.

procedure RemoveAllPasswords;

Description

Use RemoveAllPasswords to delete all passwords that were previously supplied by a call to AddPassword. After a call to RemoveAllPasswords, no password-protected tables or databases can be reopened without resupplying a password using the AddPassword method.


IDBSession.RemovePassword
 VCL Reference

IDBSession.RemovePassword

IDBSession	See also

Removes a specified password from the session.

procedure RemovePassword(const APassword: string);

Description

Use RemovePassword delete a specified password from the session. After a call to RemovePassword, any password-protected tables or databases that require the specified password can’t be reopened until the password is supplied again by a call to the AddPassword method.

APassword is the password to remove. It is a string that was previously supplied by the AddPassword method.


Hierarchy

IInterface

IDBSession


TIDispatchField
 VCL Reference

TIDispatchField

Hierarchy	Properties	Methods	Events 	Using TIDispatchField	See also

TIDispatchField represents an IDispatch field in a dataset.

Unit

DB

Description

TIDispatchField encapsulates the fundamental behavior common to fields that contain pointers to IDispatch interfaces as data.

If you use the Fields editor at design time to create a persistent field component for the IDispatch field, you can access it by name at runtime. When using dynamic field components, you can access the TIDispatchField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TIDispatchField properties

TIDispatchField	Alphabetically	Legend

In TIDispatchField

Value

Derived from TInterfaceField

AsVariant

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TInterfaceField properties

TInterfaceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TIDispatchField.Value
 VCL Reference

TIDispatchField.Value

TIDispatchField	See also

Represents the data in an IDispatch field component.

property Value: IDispatch;

Description

Use Value to read data directly from and write data directly to a field component at runtime. The Value property can affect the contents of a field that is not Visible.


 VCL Reference

TIDispatchField events

TIDispatchField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TIDispatchField events

TIDispatchField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TIDispatchField methods

TIDispatchField	Alphabetically	Legend

In TIDispatchField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

GetParentComponent

HasParent

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TIDispatchField methods

TIDispatchField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TIDispatchField.Create
 VCL Reference

TIDispatchField.Create

TIDispatchField	See also

Creates and initializes an IDispatch field component.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TIDispatchField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftIDispatch. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TIDispatchField. After instantiating a TIDispatchField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TIDispatchField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TIDispatchField with a dataset component by setting its DataSet property.

The example below creates a TIDispatchField object for a field named IDispatch accessed through a TQuery named Query1.

var

  T: TIDispatchField;

begin

  Query1.Close;

  T := TIDispatchField.Create(Query1);

  T.FieldName := 'IDispatch';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TInterfaceField

TIDispatchField


IDOMNode
 VCL Reference

IDOMNode

Hierarchy	Properties	Methods	See also

IDOMNode is the DOM interface for a node in an XML document.

Unit

XMLDOM

Description

IDOMNode is a vendor-neutral version of the DOM interface for a node in an XML document. It conforms to the W3CXML DOM level 2 specification. Use IDOMNode to work with a node in an XML document when you are using standard DOM interfaces rather than the IXMLNode interface. (IXMLNode is the node interface used by TXMLDocument document.)

IDOMNode represents an element in an XML document that has been parsed by a DOM parser. It includes properties and methods for navigating the node hierarchy of an XML document, for accessing the attributes of a node, and for drilling down to obtain the node’s value.

For more information about IDOMNode and the other standard DOM interfaces, see the DOM specification on the W3 website or the documentation provided by your DOM vendor.


 VCL Reference

IDOMNode properties

IDOMNode	Alphabetically 	Legend

In IDOMNode

attributes

childNodes

firstChild

lastChild

localName

namespaceURI

nextSibling

nodeName

nodeType

nodeValue

ownerDocument

parentNode

prefix

previousSibling


 VCL Reference

IDOMNode properties

IDOMNode	By object 	Legend

attributes

childNodes

firstChild

lastChild

localName

namespaceURI

nextSibling

nodeName

nodeType

nodeValue

ownerDocument

parentNode

prefix

previousSibling


IDOMNode.attributes
 VCL Reference

IDOMNode.attributes

IDOMNode 	See also

Represents the attributes of an element node.

property Attributes: IDOMNamedNodeMap;

Description

Use attributes to access the attribute nodes for this node. The IDOMNamedNodeMap interface provides access to a collection of DOM nodes that can be identified by name.

Attributes modify a node in an XML document. For example, given the node for

<Movie genre=scifi title="Star Wars">

both genre and title are attributes of the node, with values of “scifi” and “Star Wars”, respectively.

DOM parsers represent each attribute as a separate node, which is listed by IDOMNamedNodeMap.

Only element nodes have attributes, and not every element node has them. If the node does not have any attributes, the value of attributes is nil.

Note:	Attributes are not considered child nodes of a node and can’t be accessed using the childNodes property.


IDOMNode.childNodes
 VCL Reference

IDOMNode.childNodes

IDOMNode 	See also

Represents the child nodes of the node.

property childNodes: IDOMNodeList;

Description

The childNodes property lists the nodes that are children of this DOM node. If this node has no child nodes, childNodes is the interface of an empty list.

You can use ChildNodes to iterate through a node’s children, or you can the firstChild and lastChild properties along with the nextSibling method on each child node.

Note:	Attributes are not considered child nodes of a node. To get the values of this node’s attributes, use the attributes property instead.

Note:	IDOMNode identifies child nodes slightly differently than does the IXMLNode interface. When using the DOM, the values of many nodes are treated as separate child nodes, where the two are merged when using IXMLNode. For example, given the following fragment from an XML document:

<Time>8:00 pm est</Time>

The DOM parses this string into two nodes: the <Time> node (an element node), and a single child node of the <Time> node (an text node with the value ‘8:00 pm est’). IXMLNode treats this as a single node with the name ‘Time’ and the value ‘8:00 pm est’.


IDOMNode.firstChild
 VCL Reference

IDOMNode.firstChild

IDOMNode	See also

Represents the first child node of this node.

property firstChild: IDOMNode;

Description

Use firstChild to obtain the IDOMNode interface of this node’s first child node. If the node does not have any children, the value of firstChild is nil.

The firstChild property is useful for iterating through all the children of a node.


IDOMNode.lastChild
 VCL Reference

IDOMNode.lastChild

IDOMNode	See also

Represents the last child node of this node.

property lastChild: IDOMNode;

Description

Use lastChild to obtain the IDOMNode interface of this node’s last child node. If there are no child nodes, the value of lastChild is nil.

The lastChild property is useful when iterating through all the children of a node.


IDOMNode.localName
 VCL Reference

IDOMNode.localName

IDOMNode 	See also

Indicates the name of the node without any namespace prefix.

property localName: DOMString;

Description

Read localName to determine the name of the DOM node with any namespace prefix stripped away.

The localName property is only defined for element nodes and attribute nodes (nodes with nodeType ELEMENT_NODE and ATTRIBUTE_NODE).

For element nodes, the local name is derived from the name that appears in the XML tag. For example, the local name for <xsi:Name First=John Last=Doe> is ‘Name’.

For attribute nodes, the local name is derived from the string that appears to the left of the equals sign in the attribute declaration. For example, the element <Name First=John Last=Doe> results in two attribute nodes, with the local names ‘First’ and ‘Last’.

For any other node types, localName is nil.

Note:	If the prefix and localName properties are defined for a node, nodeName is the combination of those two values.

Note:	localName is nil for nodes created with a DOM level 1 interface such as the document’s createElement method, even if they are element or attribute nodes.


IDOMNode.namespaceURI
 VCL Reference

IDOMNode.namespaceURI

IDOMNode 	See also

Indicates the URI for the namespace used in the qualified node name.

property namespaceURI: DOMString;

Description

Read namespaceURI to determine the URI for the namespace assigned to the node when it is created. If a namespace URI was not given when the node was created, namespaceURI is nil. That is, namespaceURI does not supply a value if the namespace URI must be computed from namespace declarations in scope.

Only element and attribute nodes can have a namespaceURI value. For any other node types, namespaceURI is always nil. Attribute nodes do not inherit a namespace from the element node to which they are attached. If an attribute is not explicitly given a namespace, its namespaceURI is nil.

Note:	namespaceURI is nil for nodes created with a DOM level 1 interface such as the document’s createElement method, even if they are element or attribute nodes.


IDOMNode.nextSibling
 VCL Reference

IDOMNode.nextSibling

IDOMNode	See also

Represents the next child of this node’s parent.

property nextSibling: IDOMNode;

Description

Use nextSibling to obtain the IDOMNode interface of the node that immediately follows this node. If the node’s parent does not have any more child nodes after this one, the value of nextSibling is nil.

The nextSibling property is useful for iterating through all the children of a node.


IDOMNode.nodeName
 VCL Reference

IDOMNode.nodeName

IDOMNode 	See also

Indicates the name of the node.

property nodeName: DOMString;

Description

Read nodeName to determine the name of the DOM node. The value of nodeName depends on the type of the node, as indicated in the following table:

nodeType	nodeName
ATTRIBUTE_NODE	The name of the attribute.
ELEMENT_NODE	The tag name for the node.
TEXT_NODE	#text
CDATA_SECTION_NODE	#cdata-section
ENTITY_REFERENCE_NODE	The name of the entity reference.
ENTITY_NODE	The entity name.
PROCESSING_INSTRUCTION_NODE	The target of the processing instruction.
COMMENT_NODE	#comment
DOCUMENT_NODE	#document
DOCUMENT_TYPE_NODE	The document type name.
DOCUMENT_FRAGMENT_NODE	#document-fragment
NOTATION_NODE	The notation name.
Note:	If the prefix and localName properties are defined for a node, nodeName is the combination of those two values.


IDOMNode.NodeType
 VCL Reference

IDOMNode.nodeType

IDOMNode 	See also

Indicates the type of the node.

type DOMNodeType = Word;

property NodeType: DOMNodeType;

Description

Read NodeType to determine the type of the node. The type reflects the way the node is used in the XML document. The following table lists the possible values:

nodeType	meaning
ATTRIBUTE_NODE	The node represents an attribute of an element. It is not the child of another node, but its value can be accessed using the attributes property of the element node’s interface. An attribute node can have child nodes of type TEXT_NODE and ENTITY_REFERENCE_NODE.
ELEMENT_NODE	The node represents a tagged element. The child nodes of an element node can be of types: ELEMENT_NODE, TEXT_NODE, COMMENT_NODE, CDATA_SECTION_NODE, ENTITY_REFERENCE_NODE, and PROCESSING_INSTRUCTION_NODE. Element nodes can also have attributes (ATTRIBUTE_NODE). Element nodes can be the child of a node of type DOCUMENT_FRAGMENT_NODE, ELEMENT_NODE, DOCUMENT_NODE, and ENTITY_REFERENCE_NODE.
TEXT_NODE	The node represents the text value associated with another node. A text node cannot have any child nodes, but can appear as the child node of a node of type ATTRIBUTE_NODE, ELEMENT_NODE, DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE.
CDATA_SECTION_NODE	The node represents a CDATA section in the XML source. CDATA sections identify blocks of text that would otherwise be interpreted as markup. A CDATA_SECTION_NODE node can’t have any child nodes. They can appear as the child of an ELEMENT_NODE,  DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE node.
ENTITY_REFERENCE_NODE	The node represents a reference to an entity in the XML document. This can be any type of entity, including character entity references. The children of an entity reference node can be of the following types: ELEMENT_NODE, COMMENT_NODE, CDATA_SECTION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, and ENTITY_REFERENCE_NODE. The entity reference node can appear as the child of a DOCUMENT_FRAGMENT_NODE, ATTRIBUTE_NODE, ELEMENT_NODE, or ENTITY_REFERENCE_NODE node.
ENTITY_NODE	The node represents an expanded entity. Entity nodes can have child nodes that represent the expanded entity (for example, TEXT_NODE and ENTITY_REFERENCE_NODE nodes). Entity nodes only appear as the child of a DOCUMENT_TYPE_NODE node.
PROCESSING_INSTRUCTION_NODE	The node represents a processing instruction (PI) from the XML document. A PI node cannot have any child nodes, but can appear as the child node of a node of type DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE, ELEMENT_NODE, or ENTITY_REFERENCE_NODE.
COMMENT_NODE	The node represents a comment in the XML document. Comment nodes do not have child nodes. They appear as the child of an ELEMENT_NODE, DOCUMENT_NODE, DOCUMENT_FRAGMENT_NODE, or ENTITY_REFERENCE_NODE node.
DOCUMENT_NODE	The node represents a document object, which is the root of the entire XML document. Document nodes have a single ELEMENT_NODE node as a child (the documentElement). In addition, they can have child nodes of type COMMENT_NODE, DOCUMENT_TYPE_NODE, and PROCESSING_INSTRUCTION_NODE. Because the document is the root of the XML document, it never appears as a child node.
DOCUMENT_TYPE_NODE	The node represents the document type declaration, indicated by the <!DOCTYPE > tag. The document type node can child nodes of type NOTATION_NODE and ENTITY_NODE. It is appears the child of the document node.
DOCUMENT_FRAGMENT_NODE	The node represents a document fragment. A document fragment node associates a node or subtree with a document without actually being contained in the document. Document fragment nodes can have child nodes of type ELEMENT_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE, CDATA_SECTION_NODE, TEXT_NODE, and ENTITY_REFERENCE_NODE. It never appears as the child of another node.
NOTATION_NODE	The node represents a notation in the document type declaration. It always appears as the child of a DOCUMENT_TYPE_NODE node and never has any child nodes.


IDOMNode.nodeValue
 VCL Reference

IDOMNode.nodeValue

IDOMNode 	See also

Indicates the value of the node.

property nodeValue: DOMString;

Description

Read nodeValue to determine the value of the DOM node. Set nodeValue to change the value of a node.

Note:	You can’t set the value of a node whose value is listed as nil in the following table.

The value of nodeValue depends on the type of the node, as indicated in the following table:

nodeType	nodeValue
ATTRIBUTE_NODE	The value of the attribute.
ELEMENT_NODE	nil.
TEXT_NODE	The content of the text node.
CDATA_SECTION_NODE	The content of the CDATA section.
ENTITY_REFERENCE_NODE	nil.
ENTITY_NODE	nil.
PROCESSING_INSTRUCTION_NODE	The content of the processing instruction except for the target.
COMMENT_NODE	The content of the comment.
DOCUMENT_NODE	nil.
DOCUMENT_TYPE_NODE	nil.
DOCUMENT_FRAGMENT_NODE	nil.
NOTATION_NODE	nil.


IDOMNode.ownerDocument
 VCL Reference

IDOMNode.ownerDocument

IDOMNode	See also

Represents the interface for the document that contains this node.

property ownerDocument: IDOMDocument;

Description

Use ownerDocument to obtain the interface of the document that contains this node. The IDOMDocument interface can be used to create new nodes.

If this node has nodeType of DOCUMENT_NODE or DOCUMENT_TYPE_NODE, the value of ownerDocument is nil.


IDOMNode.parentNode
 VCL Reference

IDOMNode.parentNode

IDOMNode 	See also

Provides access to the interface of the node’s parent node.

property parentNode: IDOMNode;

Description

Read ParentNode to access the node’s parent node, if it exists. If the node does not have a parent node, the value of parentNode is nil.

Nodes of type ATTRIBUTE_NODE, DOCUMENT_NODE, and DOCUMENT_FRAGMENT_NODE never have parents. Nodes of type ENTITY_NODE and NOTATION_NODE may not have a parent. Nodes of other types have a parent unless they have just been created but not yet added to the hierarchy, or if they have just been removed from the hierarchy.


IDOMNode.prefix
 VCL Reference

IDOMNode.prefix

IDOMNode 	See also

Indicates the namespace prefix for the node.

property prefix: DOMString;

Description

Read prefix to determine the namespace prefix for an element or attribute node.

For element nodes, prefix is derived from the name that appears in the XML tag. For example, the prefix for <xsi:Name First=John Last=Doe> is ‘xsi’.

For attribute nodes, prefix is derived from the string that appears to the left of the equals sign in the attribute declaration. For example, with the element <xsi:Name xsi:First=John xsi:Last=Doe>, both attribute nodes have the prefix of ‘xsi’. Attribute nodes do not inherit a prefix value from the element node to which they are attached. For example, with the element <xsi:Name First=John Last=Doe>, both attributes have a prefix of nil.

For any other node types, prefix is nil.

Note:	If the prefix and localName properties are defined for a node, nodeName is the combination of those two values.

Note:	prefix is nil for nodes created with a DOM level 1 interface such as the document’s createElement method, even if they are element or attribute nodes.


IDOMNode.previousSibling
 VCL Reference

IDOMNode.previousSibling

IDOMNode	See also

Represents the preceding child of this node’s parent.

property previousSibling: IDOMNode;

Description

Use previousSibling to obtain the IDOMNode interface of the node that immediately precedes this node. If the node’s parent does not have any more child nodes before this one, the value of previousSibling is nil.


 VCL Reference

IDOMNode methods

IDOMNode	Alphabetically	Legend

In IDOMNode

appendChild

cloneNode

get_attributes

get_childNodes

get_firstChild

get_lastChild

get_localName

get_namespaceURI

get_nextSibling

get_nodeName

get_nodeType

get_nodeValue

get_ownerDocument

get_parentNode

get_prefix

get_previousSibling

hasChildNodes

insertBefore

normalize

removeChild

replaceChild

set_nodeValue

supports

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDOMNode methods

IDOMNode	By object	Legend

_AddRef

_Release

appendChild

cloneNode

get_attributes

get_childNodes

get_firstChild

get_lastChild

get_localName

get_namespaceURI

get_nextSibling

get_nodeName

get_nodeType

get_nodeValue

get_ownerDocument

get_parentNode

get_prefix

get_previousSibling

hasChildNodes

insertBefore

normalize

QueryInterface

removeChild

replaceChild

set_nodeValue

supports


IDOMNode.appendChild
 VCL Reference

IDOMNode.appendChild

IDOMNode	See also

Adds a new child node to this node.

function appendChild(const newChild: IDOMNode): IDOMNode; safecall;

Description

Use appendChild to add a child node to the end of this node’s list of children. If the new node is already in the document’s node hierarchy, it is first removed from its parent node. If this node is read-only, newChild was created using a different document, or if newChild is of a nodeType that is not permitted as a child of this node, appendChild raises an exception.

newChild is the child node to add. It can be a node that currently has another parent node, or a new node created using the methods of the document interface. If it is of nodeType DOCUMENT_FRAGMENT_NODE, the entire contents of the document fragment are moved into this node’s childNodes property list.

appendChild returns the interface for the newly added child node.


IDOMNode.cloneNode
 VCL Reference

IDOMNode.cloneNode

IDOMNode	See also

Returns a duplicate of this node.

function cloneNode(deep: WordBool): IDOMNode; safecall;

Description

Use cloneNode to obtain a copy of this node. The cloneNode method returns a copy of this node that has no parent. Any attributes are copied as well, including any attribute nodes that represent default values.

deep indicates whether the child nodes of this node should be cloned as well. For example, if an element node contains any text, cloneNode only copies then text when deep is True, because the text is contained in a child node of type TEXT_NODE.

Note:	When cloning an attribute node directly (as opposed to copying the attributes when cloning an element node), the returned node’s specified property is always True, even if this node does not represent a specified attribute.

Note:	Coning an immutable subtree produces a mutable copy, but the children of an entity-reference node are read-only.

Note:	DOM implementations may differ in the way they clone nodes of type DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ENTITY_NODE, and NOTATION_NODE.


IDOMNode.get_attributes
 VCL Reference

IDOMNode.get_attributes

IDOMNode	See also

Returns the value of the attributes property.

function get_attributes: IDOMNamedNodeMap; safecall;

Description

get_attributes is the read implementation of the attributes property.


IDOMNode.get_childNodes
 VCL Reference

IDOMNode.get_childNodes

IDOMNode	See also

Returns the value of the childNodes property.

function get_childNodes: IDOMNodeList; safecall;

Description

get_childNodes is the read implementation of the childNodes property.


IDOMNode.get_firstChild
 VCL Reference

IDOMNode.get_firstChild

IDOMNode	See also

Returns the value of the firstChild property.

function get_firstChild: IDOMNode; safecall;

Description

get_firstChild is the read implementation of the firstChild property.


IDOMNode.get_lastChild
 VCL Reference

IDOMNode.get_lastChild

IDOMNode	See also

Returns the value of the lastChild property.

function get_lastChild: IDOMNode; safecall;

Description

get_lastChild is the read implementation of the lastChild property.


IDOMNode.get_localName
 VCL Reference

IDOMNode.get_localName

IDOMNode	See also

Returns the value of the localName property.

function get_localName: DOMString; safecall;

Description

get_localName is the read implementation of the localName property.


IDOMNode.get_namespaceURI
 VCL Reference

IDOMNode.get_namespaceURI

IDOMNode	See also

Returns the value of the namespaceURI property.

function get_namespaceURI: DOMString; safecall;

Description

get_namespaceURI is the read implementation of the namespaceURI property.


IDOMNode.get_nextSibling
 VCL Reference

IDOMNode.get_nextSibling

IDOMNode	See also

Returns the value of the nextSibling property.

function get_nextSibling: IDOMNode; safecall;

Description

get_nextSibling is the read implementation of the nextSibling property.


IDOMNode.get_nodeName
 VCL Reference

IDOMNode.get_nodeName

IDOMNode	See also

Returns the value of the nodeName property.

function get_nodeName: DOMString; safecall;

Description

get_nodeName is the read implementation of the nodeName property.


IDOMNode.get_nodeType
 VCL Reference

IDOMNode.get_nodeType

IDOMNode	See also

Returns the value of the nodeType property.

type DOMNodeType = Word;

function get_nodeType: DOMNodeType; safecall;

Description

get_nodeType is the read implementation of the nodeType property.


IDOMNode.get_nodeValue
 VCL Reference

IDOMNode.get_nodeValue

IDOMNode	See also

Returns the value of the nodeValue property.

function get_nodeValue: DOMString; safecall;

Description

get_nodeValue is the read implementation of the nodeValue property.


IDOMNode.get_ownerDocument
 VCL Reference

IDOMNode.get_ownerDocument

IDOMNode	See also

Returns the value of the ownerDocument property.

function get_ownerDocument: IDOMDocument; safecall;

Description

get_ownerDocument is the read implementation of the ownerDocument property.


IDOMNode.get_parentNode
 VCL Reference

IDOMNode.get_parentNode

IDOMNode	See also

Returns the value of the parentNode property.

function get_parentNode: IDOMNode; safecall;

Description

get_parentNode is the read implementation of the parentNode property.


IDOMNode.get_prefix
 VCL Reference

IDOMNode.get_prefix

IDOMNode	See also

Returns the value of the prefix property.

function get_prefix: DOMString; safecall;

Description

get_prefix is the read implementation of the prefix property.


IDOMNode.get_previousSibling
 VCL Reference

IDOMNode.get_previousSibling

IDOMNode	See also

Returns the value of the previousSibling property.

function get_previousSibling: IDOMNode; safecall;

Description

get_previousSibling is the read implementation of the previousSibling property.


IDOMNode.hasChildNodes
 VCL Reference

IDOMNode.hasChildNodes

IDOMNode	See also

Indicates whether the node has any child nodes.

function hasChildNodes: WordBool; safecall;

Description

hasChildNodes returns True if this node has any child nodes, False if it has no children.


IDOMNode.insertBefore
 VCL Reference

IDOMNode.insertBefore

IDOMNode	See also

Inserts a new child node before a specified child of the node.

function insertBefore(const newChild, refChild: IDOMNode): IDOMNode; safecall;

Description

Use insertBefore to add a child node at a specified position in this node’s list of children. If the new node is already in the document’s node hierarchy, it is first removed from its parent node. If this node is read-only, refChild is a node that is not in this node’s child list, newChild was created using a different document, or if newChild is of a nodeType that is not permitted as a child of this node, insertBefore raises an exception.

newChild is the child node to add. It can be a node that currently has another parent node, or a new node created using the methods of the document interface. If it is of nodeType DOCUMENT_FRAGMENT_NODE, the entire contents of the document fragment are moved into this node’s childNodes property list.

refChild is a child of this node before which to insert the new node. If refChild is nil, the new node is added to the end of this node’s child list.

insertBefore returns the interface for the newly added child node.


IDOMNode.normalize
 VCL Reference

IDOMNode.normalize

IDOMNode	See also

Converts the subtree beneath this node to the structure it would have if it were just loaded from a document.

procedure normalize;

Description

Call normalize to consolidate adjacent text nodes and remove any empty text nodes in the subtree beneath this node. This method ensures that for all child nodes of this node and of its attributes, only structure nodes (element nodes, comments, processing instructions, CDATA sections, and entity references) separate text nodes and that there are no empty text nodes. This is useful for operations (such as XPointer lookups) that depend on a particular structure in the node hierarchy.


IDOMNode.removeChild
 VCL Reference

IDOMNode.removeChild

IDOMNode	See also

Removes a child node from this node.

function removeChild(const childNode: IDOMNode): IDOMNode; safecall;

Description

removeChild removes a specified child node from this node, and returns its interface. If this node is read-only, or if the specified child node is not a child of this node, removeChild raises an exception.

childNode the node to remove.


IDOMNode.replaceChild
 VCL Reference

IDOMNode.replaceChild

IDOMNode	See also

Replaces one of this node’s children with a specified node.

function replaceChild(const newChild, oldChild: IDOMNode): IDOMNode; safecall;

Description

Use replaceChild to remove a child of this node and replace it with the node specified by newChild. If the new node is already in the document’s node hierarchy, it is first removed from its parent node.

If this node is read-only, refChild is a node that is not in this node’s child list, newChild was created using a different document, or if newChild is of a nodeType that is not permitted as a child of this node, replaceChild raises an exception.

newChild is the child node that replaces oldChild. It can be a node that currently has another parent node, or a new node created using the methods of the document interface. If it is of nodeType DOCUMENT_FRAGMENT_NODE, the entire contents of the document fragment are moved into this node’s childNodes property list.

refChild is a child that newChild replaces. If refChild is nil, the new node is added to the end of this node’s child list.

replaceChild returns the interface for refChild (the replaced node).


IDOMNode.set_nodeValue
 VCL Reference

IDOMNode.set_nodeValue

IDOMNode	See also

Sets the value of the node.

procedure set_nodeValue(value: DOMString);

Description

set_nodeValue is the write implementation of the nodeValue property.

value is the new value for the node.


IDOMNode.supports
 VCL Reference

IDOMNode.supports

IDOMNode

Indicates whether the node supports a specified feature.

function supports(const feature, version: DOMString): WordBool; safecall;

Description

supports returns True if the DOM implementation implements the specified feature and this node supports that feature. Otherwise, supports returns False.

feature is the name of the feature in question.

version is the version of the feature. If no version is specified, supports returns True if any version of the feature is supported.


Hierarchy

IInterface

IUnknown

IDOMNode


TInterfaceField
 VCL Reference

TInterfaceField

Hierarchy	Properties	Methods	Events 	Using TInterfaceField	See also

TInterfaceField represents an interface field in a dataset.

Unit

DB

Description

TInterfaceField encapsulates the fundamental behavior common to fields that contain pointers to interfaces (IUnknown) as data. TInterfaceField reimplements the Value and AsVariant properties to adapt them to accessing fields containing interfaces.

If you use the Fields editor at design time to create a persistent field component for the interface field, you can access it by name at runtime. When using dynamic field components, you can access the TInterfaceField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TInterfaceField properties

TInterfaceField	Alphabetically	Legend

In TInterfaceField

AsVariant

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TInterfaceField properties

TInterfaceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TInterfaceField.AsVariant
 VCL Reference

TInterfaceField.AsVariant

TInterfaceField	See also

Represents the Value of the interface field as type Variant.

property AsVariant: Variant;

Description

Use AsVariant to read the value of the field’s data into a Variant, or to assign a Variant value to the contents of the field.


TInterfaceField.Value
 VCL Reference

TInterfaceField.Value

TInterfaceField	See also

Represents the data in an interface field component.

property Value: IUnknown;

Description

Use Value to read data directly from and write data directly to a field component at runtime. The Value property can affect the contents of a field even if it is not Visible.


 VCL Reference

TInterfaceField events

TInterfaceField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TInterfaceField events

TInterfaceField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TInterfaceField methods

TInterfaceField	Alphabetically	Legend

In TInterfaceField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

GetParentComponent

HasParent

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TInterfaceField methods

TInterfaceField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TInterfaceField.Create
 VCL Reference

TInterfaceField.Create

TInterfaceField	See also

Creates and initializes an interface field component.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TInterfaceField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftInterface. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TIntegerField. After instantiating a TInterfaceField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TInterfaceField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TInterfaceField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TInterfaceField object for a field named Interface accessed through a TQuery named Query1.

var

  T: TInterfaceField;

begin

  Query1.Close;

  T := TInterfaceField.Create(Query1);

  T.FieldName := 'Interface';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TInterfaceField


TIndexDef
 VCL Reference

TIndexDef

Hierarchy	Properties	Methods	See also

TIndexDef describes an index in a database table.

Unit

DB

Description

Use the properties and methods of an index definition to:

Set the attributes of a new index in a table created with TTable.CreateTable or TClientDataSet.CreateDataSet.

Determine the name of an index.

Identify the fields that make up the index, or the dBASE expression that orders the index.

Determine the characteristics of the index.

Note:	you cannot use TIndexDef objects in a dataset component’s IndexDefs property to add indexes to already existing tables. To do that, use methods such as TTable.AddIndex and TClientDataSet.AddIndex.


 VCL Reference

TIndexDef properties

TIndexDef	Alphabetically	Legend

In TIndexDef

CaseInsFields

DescFields

Expression

FieldExpression

Fields

GroupingLevel

Options

Source

Derived from TNamedItem

DisplayName

Name

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TIndexDef properties

TIndexDef	By object	Legend

CaseInsFields

Collection

DescFields

DisplayName

Expression

FieldExpression

Fields

GroupingLevel

ID

Index

Name

Options

Source


TIndexDef.CaseInsFields
 VCL Reference

TIndexDef.CaseInsFields

TIndexDef 	See also

Specifies which fields of the index are case-insensitive.

property CaseInsFields: String;

Description

Set CaseInsFields to a string that lists the names of fields in the index, separated by semicolons. The ordering imposed by the index on the fields specified in CaseInsFields is case-insensitive. Fields in the index definition but not in the CaseInsFields list use case sensitive ordering (the default for the database type). It is possible that a single index can have fields using both case-insensitive and case-sensitive ordering.

For a field to be included in CaseInsFields, the field must be included in the fields on which the index is based. These fields are specified in the Fields property of the TIndexDef object.

Note:	Not all database servers support both case-insensitive and case-sensitive field orderings in the same index. Consult the documentation for the particular database server used to determine whether this is actually supported. Some database systems require an index be designated case-insensitive as a whole (all of its base fields).

In the example below, the CaseInsFields property is given a list of two table fields for the index being created: LastName and Company.

with Table1 do begin

  …

  with IndexDefs do begin

    with AddIndexDef do begin

      Name := 'MultiIndex'

      Fields := 'LastName;Company;State'

      Options := [ixUnique];

    end;

    Items[IndexDefs.Count – 1].CaseInFields := 'LastName;Company';

  end;

  …

  CreateTable;

end;


TIndexDef.DescFields
 VCL Reference

TIndexDef.DescFields

TIndexDef 	See also

Specifies the fields of the index that are sorted in descending order.

property DescFields: String;

Description

Set DescFields to a string that lists the names of fields in the index, separated by semicolons. The ordering imposed by the index on the fields specified in DescFields is descending. Fields in the index definition but not in the DescFields list use the default ascending order. It is possible for a single index to have fields using both ascending and descending ordering.

For a field to be included in DescFields, the field must be included in the fields on which the index is based. These fields are specified in the Fields property of the TIndexDef object.

Note:	Not all database servers support both ascending and descending field orderings in the same index. Consult the documentation for the particular database server to determine whether this is actually supported.

In the example below, the DescFields property is given a list of two table fields for the index being created: TransDate and Company.

with Table1 do begin

  …

  with IndexDefs do begin

    with AddIndexDef do begin

      Name := 'MultiIndex'

      Fields := 'TransDate;Company;State'

      Options := [ixUnique];

    end;

    Items[IndexDefs.Count – 1].DescInFields := 'TransDate;Company';

  end;

  …

  CreateTable;

end;


TIndexDef.Expression
 VCL Reference

TIndexDef.Expression

TIndexDef	See also

Contains a dBASE key expression.

property Expression: String;

Description

Read Expression to learn the key expression of a dBASE expression index.

A key expression for a dBASE table is a field name, or a combination of field names, functions, and operators that specifies how the index orders records in the table. If the table is not a dBASE table or the index is not an expression index, Expression is an empty string and the Fields property contains the field(s) for the index. When the index is a dBASE expression index, Expression contains a value and the Fields property contains an empty string.

Note:	For more information about key expressions, see your dBASE documentation.


TIndexDef.Expression
 VCL Reference

TIndexDef.FieldExpression

TIndexDef 	See also

Provides access to either a list of field names or an index expression.

property FieldExpression: String;

Description

FieldExpression provides access to the private data member on TIndexDef which contains either a list of field names or an index expression. This data member is used to return the value for the Fields property or the Expression property depending on whether ixExpression is in Options.

This property is used by TBDEDataSet but normally developers should use the Fields or Expression properties instead.


TIndexDef.Fields
 VCL Reference

TIndexDef.Fields

TIndexDef	See also	Example

Identifies the fields that comprise the index.

property Fields: String;

Description

When creating an index, set Fields to a list of fields separated by semicolons (no semicolon is required if there is only one field in the index). The order of field names in the string determines the order of fields in the index.

When inspecting already-existing indexes, read Fields to determine the fields that make up the index. The string returned can be either the names of the fields, or the numbers of the field. When numbers are used, the numbers correspond to the physical field numbers in the table. Multiple fields in the string are separated by semicolons (;).

Note: When creating dBASE expression indexes, do not use a list of fields separated by semicolons. Instead, set Fields to a dBASE Data Manipulation Language (DML) expression concatenating multiple fields, converting field data types, or using field substrings. You must include the TIndexOption value ixExpression in the Options parameter of such functions as TIndexDefs.Add or in the Options property of a TIndexDef object. When inspecting existing dBASE expression indexes, use the Expression property instead of the Fields property.


TIndexDef.GroupingLevel
 VCL Reference

TIndexDef.GroupingLevel

TIndexDef 	See also

Indicates the depth of grouping provided by the index.

property GroupingLevel: Integer;

Description

Grouping level specifies the level of grouping information maintained by the index. Grouping is only supported on client datasets.


TIndexDef.Options
 VCL Reference

TIndexDef.Options

TIndexDef	See also	Example

Describes the characteristics of the index.

property Options: TIndexOptions;

Description

When creating a new index, use Options to specify the attributes of the index. Options can contain zero or more of the TIndexOption constants ixPrimary, ixUnique, ixDescending, ixCaseInsensitive, and ixExpression.

When inspecting the definitions of existing indexes, read Options to determine the option(s) used to create the index.

Note:	Different database drivers may support only a subset of these options. For example, with dBASE tables, ixCaseInsensitive is not supported. Including an option that is not valid for a table will raise an exception.

Note:	Primary indexes are, by definition unique. If setting the Options value ixPrimary, you need not also use ixUnique.


TIndexDef.Source
 VCL Reference

TIndexDef.Source

TIndexDef	See also

Contains the name of a dBASE maintained index.

property Source: String;

Description

When the table uses dBASE .MDX indexes, Name indicates the index tag name and Source is the name of the index file. Source is applicable to dBASE table indexes only.


 VCL Reference

TIndexDef methods

TIndexDef	Alphabetically	Legend

In TIndexDef

Assign

Create

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIndexDef methods

TIndexDef	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TIndexDef.Assign
 VCL Reference

TIndexDef.Assign

TIndexDef	See also

Copies the properties of one index definition to another.

procedure Assign(ASource: TPersistent); override;

Description

Call Assign to copy another index definition. Assign checks whether the ASource parameter is another index definition, and, if so, copies the values of the Options, Name, Source, Expression, and Fields properties.

If the source is not an index definition, Assign calls the inherited method, which assigns properties from any object that specifies how to copy to an index definition in its AssignTo method.


TIndexDef.Create
 VCL Reference

TIndexDef.Create

TIndexDef	See also

Creates an instance of TIndexDef.

constructor Create(Owner: TIndexDefs; const Name, Fields: String; Options: TIndexOptions); reintroduce; overload;

Description

Do not explicitly create index definition objects. A TIndexDef is created automatically by the dataset for each existing index of the table. When creating new indexes, use the TIndexDefs.AddIndexDef method.


Hierarchy

TObject

TPersistent

TCollectionItem

TNamedItem

TIndexDef


TIndexDefs
 VCL Reference

TIndexDefs

Hierarchy	Properties	Methods	See also

TIndexDefs holds the list of available index definitions for a table.

Unit

DB

Description

TTable and TClientDataSet components use TIndexDefs to implement their IndexDefs property. These index definitions can be used to obtain information about the indexes defined for the underlying data or, when the component is used to create a table, to create the indexes of that table.

Use the properties and methods of TIndexDefs to:

Access a specific index definition.

Determine how many index definitions this TIndexDefs object contains.

Add or delete index definitions.

Copy all index definitions from one TIndexDefs to another.

Note:	you cannot use TIndexDef objects in a dataset component’s IndexDefs property to add indexes to already existing tables. To do that, use methods such as AddIndex.


 VCL Reference

TIndexDefs properties

TIndexDefs	Alphabetically	Legend

In TIndexDefs

Items

Derived from TDefCollection

DataSet

Updated

Derived from TCollection

Count

ItemClass


 VCL Reference

TIndexDefs properties

TIndexDefs	By object	Legend

Count

DataSet

ItemClass

Items

Updated


TIndexDefs.Items
 VCL Reference

TIndexDefs.Items

TIndexDefs	See also 	Example

Lists the index definitions that describe each index of a dataset.

property Items[Index: Integer]: TIndexDef; default;

Description

Use Items to access a particular index definition. Specify the index definition to access with the Index parameter. Index identifies the index definition’s position in the list of index definitions, in the range 0 to Count - 1.

IdxFldsVar := Table1.IndexDefs.Items[i].Fields;


 VCL Reference

TIndexDefs methods

TIndexDefs	Alphabetically	Legend

In TIndexDefs

Add

AddIndexDef

Create

Find

FindIndexForFields

GetIndexForFields

Update

Derived from TDefCollection

GetItemNames

IndexOf

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIndexDefs methods

TIndexDefs	By object	Legend

Add

AddIndexDef

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Find

FindIndexForFields

FindItemID

Free

FreeInstance

GetIndexForFields

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemNames

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TIndexDefs.Add
 VCL Reference

TIndexDefs.Add

TIndexDefs	See also

Creates a new index definition and adds it to the Items property.

procedure Add(const Name, Fields: String; Options: TIndexOptions);

Description

Add is provided for backward compatibility. The recommended way to add new index definitions before creating a table is to use the AddIndexDef method. To add an index to an existing table, use the AddIndex method of the dataset instead. To change the array of indexes when a new index has been added to the dataset, use the Update method instead.

Add creates an index definition and assigns the values passed in the Name, Fields, and Options parameters to the TIndexDef properties of the same names. If an index definition with same name already exists, Add raises an EDatabaseError exception.


TIndexDefs.AddIndexDef
 VCL Reference

TIndexDefs.AddIndexDef

TIndexDefs	See also	Example

Creates a new index definition object and adds it to the Items property.

function AddIndexDef: TIndexDef;

Description

Call AddIndexDef to add index definitions when creating a database table. AddIndexDef returns the new TIndexDef object that was added to the IndexDefs collection of index definitions. After calling AddIndexDef, set the properties of the newly added TIndexDef object to specify the name, type, and options of index that will be created.

Note:	AddIndexDef is only valid in the context of creating index definitions for a table to be created with a subsequent call to the CreateTable or CreateDataSet method. It cannot be used to add indexes to an already-existing table.


TIndexDefs.Create
 VCL Reference

TIndexDefs.Create

TIndexDefs	See also

Creates an instance of TIndexDefs.

constructor Create(ADataSet: TDataSet);

Description

Applications should not instantiate TIndexDefs. TIndexDefs objects are created automatically by the dataset that uses them (even if the dataset currently has no indexes).


TIndexDefs.Find
 VCL Reference

TIndexDefs.Find

TIndexDefs	See also

Returns the TIndexDef object for the index definition with a specified name.

function Find(const Name: String): TIndexDef;

Description

Call Find to obtain information about a particular index definition. Specify the name of the index as the value of the Name parameter.

Find raises an EDatabaseError exception if there is no index definition with the given name.

Note:	To locate an index definition based on the indexed fields rather than the name of the index, use the FindIndexForFields method.


TIndexDefs.FindIndexForFields
 VCL Reference

TIndexDefs.FindIndexForFields

TIndexDefs	See also

Locates an index definition in the Items array.

function FindIndexForFields(const Fields: String): TIndexDef;

Description

Use FindIndexForFields to search for the index that starts with the fields specified in the Fields parameter. If the index is constructed using more than one field, separate the fields with semicolons.

FindIndexForFields returns the index definition that exactly matches the fields specified (in the order specified), if one exists. If no exact match is found, FindIndexForFields returns the first index that begins with the indicated fields. If no match is found, FindIndexForFields raises an EDatabaseError exception.

Note:	 FindIndexForFields can only locate ascending indexes. To include descending indexes in the search, use GetIndexForFields.

Note:	To restrict the search to case-insensitive indexes, use the GetIndexForFields method.


TIndexDefs.GetIndexForFields
 VCL Reference

TIndexDefs.GetIndexForFields

TIndexDefs	See also

Locates an index definition in the Items array.

function GetIndexForFields(const Fields: String; CaseInsensitive: Boolean): TIndexDef;

Description

Use GetIndexForFields to search for the index that starts with the fields specified in the Fields parameter. If more than one field comprises the index, separate the fields with semicolons. Set the CaseInsensitive parameter to True to restrict the search to only the case insensitive indexes in the Items array.

GetIndexForFields returns the index definition that exactly matches the specified fields in the order specified, if it exists. If no exact match is found, GetIndexForFields returns the first index that begins with the indicated fields. If no match can be found, GetIndexForFields returns nil.

Note:	When CaseInsensitive is True, descending indexes are considered even if they are case-sensitive.


TIndexDefs.Update
 VCL Reference

TIndexDefs.Update

TIndexDefs	See also 	Example

Refreshes index definitions in Items to reflect the current state of the dataset.

procedure Update; reintroduce;

Description

Call Update when the set of indexes for the dataset may have changed. Update refreshes the index definitions without opening the dataset.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TDefCollection

TIndexDefs


TIntegerField
 VCL Reference

TIntegerField

Hierarchy	Properties	Methods	Events 	Using TIntegerField	See also

TIntegerField represents a signed 32-bit integer field in a dataset.

Unit

DB

Description

TIntegerField encapsulates the fundamental behavior common to fields that contain integer data. Integer fields can hold values in the range -2,147,483,648 to 2,147,483,647, and are frequently used to hold values that are large, signed whole numbers. In addition to the properties, methods, and events common to all fields that are introduced by the TField class, TIntegerField introduces new properties to convert between integer values and other data types, and to limit the range of valid integers that the field will permit.

If you use the Fields editor at design time to create a persistent field component for the integer field, you can access it by name at runtime. When using dynamic field components, you can access the TIntegerField instance using the dataset’s Fields property or FieldByName method.

TIntegerField is the direct ancestor of three other field types that represent whole numbers: TAutoIncField, TSmallintField, and TWordField.


 VCL Reference

TIntegerField properties

TIntegerField	Alphabetically	Legend

In TIntegerField

AsFloat

AsInteger

AsString

AsVariant

DataSize

MaxValue

MinValue

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TIntegerField properties

TIntegerField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TIntegerField.AsFloat
 VCL Reference

TIntegerField.AsFloat

TIntegerField	See also

Represents the value of the integer field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign the integer field value to a floating-point variable.

Round a floating-point value to an integer value and assign it to an integer field.

For example, this code assigns a floating-point value to an integer field value, rounding the value to 12:

MyIntegerField.AsFloat := 12.23;

To assign an integer field value to a floating-point value, use code similar to this:

FloatVariable := MyIntegerField.AsFloat;

If the value assigned to the field does not fall within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TIntegerField.AsInteger
 VCL Reference

TIntegerField.AsInteger

TIntegerField	See also	Example

Represents the value of an integer field as a 32-bit integer.

property AsInteger: Longint;

Description

Use AsInteger to work with the value of an integer field as a 32-bit integer. Integer field components store and manipulate their values as 32-bit integers, so AsInteger is the same as the Value property.

Long integer values need no conversion, because the native storage format of an integer field is a 32-bit integer. Descendants of TIntegerField that represent other types of integer fields convert the value of the physical database field to a 32-bit integer for the AsInteger property.

If the value assigned to the field does not fall within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TIntegerField.AsString
 VCL Reference

TIntegerField.AsString

TIntegerField	See also	Example

Represents the value of an integer field as a string.

property AsString: String;

Description

Use AsString to

Assign the integer field value to string variable.

Assign a string value to the integer field.

For example, this code assigns a string value to an integer field value:

MyIntegerField.AsString := '27';

To assign an integer field value to a string, use code similar to this:

NewString := MyIntegerField.AsString;

If the string assigned to the field does not represent a valid integer value, an EDatabaseError exception is raised. Also, if the assigned string does not convert to an integer value that falls within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TIntegerField.AsVariant
 VCL Reference

TIntegerField.AsVariant

TIntegerField	See also

Represents the value of an integer field as a Variant value.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the integer field value to Variant variable.

Assign a Variant value to the integer field.

Using variants is useful when you don't know the actual field type and don't want to use one of the other As... properties to convert the field value to another type.

If the value assigned to the field can’t be converted to a valid integer or does not fall within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TIntegerField.DataSize
 VCL Reference

TIntegerField.DataSize

TIntegerField	See also	Example

Indicates the amount of memory needed to store the value of an integer field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store an integer field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For integer fields, DataSize is always 4. Some descendants of TIntegerField such as TSmallintField, represent database fields with smaller values of DataSize.


TIntegerField.MaxValue
 VCL Reference

TIntegerField.MaxValue

TIntegerField	See also

Limits the maximum value in the integer field.

property MaxValue: Longint;

Description

Use MaxValue to get or set the maximum value that can be entered into the field. If a value greater than MaxValue is entered, an EDatabaseError exception is raised.

If the value of MaxValue is 0, the integer field can have a value up to the maximum value that can be represented by the native database type. For 32-bit integer fields, this value is 2147483647.


TIntegerField.MinValue
 VCL Reference

TIntegerField.MinValue

TIntegerField	See also

Limits the minimum value in the integer field.

property MinValue: Longint;

Description

Use MinValue to get or set the minimum value that can be entered into the field. If a value smaller than MinValue is entered, an EDatabaseError exception is raised.

If the value of MinValue is 0, the integer field can have a value as small as the native database type can represent. For 32-bit integer fields, this minimum value is -2147483648.


TIntegerField.Value
 VCL Reference

TIntegerField.Value

TIntegerField	See also

Represents the value of the integer field.

property Value: Longint;

Description

Use Value to read data directly from and write data directly to an integer field. Using the Value property is the same as using the AsInteger property. Use Value when you know the field component is a 32-bit integer field. Use AsInteger when working with a generic field component.


 VCL Reference

TIntegerField events

TIntegerField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TIntegerField events

TIntegerField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TIntegerField methods

TIntegerField	Alphabetically	Legend

In TIntegerField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

GetParentComponent

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TIntegerField methods

TIntegerField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TIntegerField.Create
 VCL Reference

TIntegerField.Create

TIntegerField	See also

Creates an instance of TIntegerField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TIntegerField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftInteger, MinValue to -2147483648, and MaxValue to 2147483647. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TIntegerField. After instantiating a TIntegerField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TIntegerField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TIntegerField with a dataset component by setting its DataSet property.

The example below creates a TIntegerField object for a field named Quantity accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TIntegerField;

begin

  SQLDataSet1.Close;

  T := TIntegerField.Create(SQLDataSet1);

  T.FieldName := 'Quantity';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TIntegerField


IProviderSupport
 VCL Reference

IProviderSupport

Hierarchy	Methods 	See also

IProviderSupport is the interface that datasets use to enable a provider to represent them.

Unit

DB

Description

TDataSetProvider uses the IProviderSupport interface to interact with its associated dataset. Any dataset that implements the IProviderSupport interface can be connected to a client dataset or XML broker via a provider. Once the provider connects the dataset that supports IProvider to a client dataset, that client dataset can obtain data from the datset and apply updates back to it or its database server.

TDataSet, the base class for all datasets, includes support for IProviderSupport. This support appears as a set of protected methods. However, most of these methods are simple stubs that either do nothing or generate an exception. Most of the dataset classes that ship with Delphi(dbExpress datasets, BDE-enabled datasets, ADO-enabled datasets, and InterBase Express datasets) override these protected methods to implement the IProviderSupport interface in a more useful fashion. For datasets that simply rely on the implementation inherited from TDataSet (for example, client datasets), the provider should set its ResolveToDataSet property to True.

Component writers that create their own custom descendants from TDataSet must override all appropriate IProviderSupport methods if their datasets are to work in an application server or connected to a client dataset or XML broker via a local provider.


 VCL Reference

IProviderSupport methods

IProviderSupport	Alphabetically	Legend

In IProviderSupport

PSEndTransaction

PSExecute

PSExecuteStatement

PSGetAttributes

PSGetDefaultOrder

PSGetIndexDefs

PSGetKeyFields

PSGetParams

PSGetQuoteChar

PSGetTableName

PSGetUpdateException

PSInTransaction

PSIsSQLBased

PSIsSQLSupported

PSReset

PSSetCommandText

PSSetParams

PSStartTransaction

PSUpdateRecord

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IProviderSupport methods

IProviderSupport	By object	Legend

_AddRef

_Release

PSEndTransaction

PSExecute

PSExecuteStatement

PSGetAttributes

PSGetDefaultOrder

PSGetIndexDefs

PSGetKeyFields

PSGetParams

PSGetQuoteChar

PSGetTableName

PSGetUpdateException

PSInTransaction

PSIsSQLBased

PSIsSQLSupported

PSReset

PSSetCommandText

PSSetParams

PSStartTransaction

PSUpdateRecord

QueryInterface


IProviderSupport.PSEndTransaction
 VCL Reference

IProviderSupport.PSEndTransaction

IProviderSupport	See also

Ends a transaction that was started by a call to PSStartTransaction

procedure PSEndTransaction(Commit: Boolean);

Description

The provider component applies updates within a transaction, if possible. To do so, it uses PSEndTransaction in conjunction with the PSStartTransaction method.

The Commit parameter indicates whether the dataset should commit the current transaction (Commit is True), or roll it back (Commit is False).

Note:	TDataSetProvider only starts a transaction (Using PSStartTransaction) if the PSInTransaction method indicates that there is no transaction already established. That is, it does not assume nested transaction support is available. Thus, there is no need to ensure that PSEndTransaction does not terminate a transaction that was not started by the provider.


IProviderSupport.PSExecute
 VCL Reference

IProviderSupport.PSExecute

IProviderSupport	See also

Executes the SQL command associated with the dataset.

procedure PSExecute;

Description

The provider component calls PSExecute to implement its Execute method. If the dataset represents a query or stored procedure that does not return a cursor, this method executes the query or stored procedure. If the provider Options includes poAllowCommandText and the dataset supports the PSSetCommandText method, the statement specified by PSSetCommandText may be executed instead.

If there is not statement to execute, PSExecute raises an EDatabaseError exception.


IProviderSupport.PSExecuteStatement
 VCL Reference

IProviderSupport.PSExecuteStatement

IProviderSupport	See also

Executes a specified SQL command.

function PSExecuteStatement(const ASQL: string; AParams: TParams; ResultSet: Pointer = nil): Integer;

Description

If the value its ResolveToDataSet property is False, a provider component calls PSExecuteStatement (indirectly) to execute SQL statements that it generates for applying updates. Usually, the dataset passes these statements on to its database server for execution.

The ASQL parameter specifies the SQL command to execute.

AParams contains any parameter values that should be applied to ASQL before execution.

ResultSet allows PSExecuteStatement to return a dataset component that contains the results of a SELECT statement. If ResultSet is not nil, PSExecuteStatement creates a new dataset component as the target of this pointer and fills it with the result set. The caller is responsible for freeing the dataset.

PSExecuteStatement returns the number of rows affected by executing ASQL.


IProviderSupport.PSGetAttributes
 VCL Reference

IProviderSupport.PSGetAttributes

IProviderSupport	See also

Returns information that is stored in data packets as Name/Value pairs.

procedure PSGetAttributes(List: TList);

Description

The provider component calls PSGetAttributes to add information about the dataset to the metadata stored with generated data packets. This information is stored as Name/Value pairs that are added to the list specified by the List parameter.


IProviderSupport.PSGetDefaultOrder
 VCL Reference

IProviderSupport.PSGetDefaultOrder

IProviderSupport	See also

Returns the definition of an index that imposes the default order on the data included in data packets.

function PSGetDefaultOrder: TIndexDef;

Description

The provider component calls PSGetDefaultOrder to generate a default index, called DEFAULT_ORDER, for the records that appear in data packets. This index defines the default sort order for records when they appear in the client dataset on the client.

PSGetDefaultOrder creates a TIndexDef object to describe the default index. The provider that calls PSGetDefaultOrder subsequently frees this TIndexDef object.


IProviderSupport.PSGetIndexDefs
 VCL Reference

IProviderSupport.PSGetIndexDefs

IProviderSupport	See also

Returns the definitions of all specified indexes defined for the dataset.

function PSGetIndexDefs(IndexTypes:TIndexOptions= [ixPrimary..ixNonMaintained]): TIndexDefs;

Description

The provider component calls PSGetIndexDefs to locate an index that contains information it needs. For example, it uses PSGetIndexDefs to locate an index that contains the key fields returned by PSGetKeyFields. This information allows the provider to locate the records that need to change when it applies updates. The provider also calls this method to locate indexes that it adds to the metadata of data packets.

IndexTypes indicates the options required of the returned indexes. PSGetIndexDefs returns all indexes whose Options property includes the specified flags.

PSGetIndexDefs returns a TIndexDefs object that contains all the indexes of the dataset that match the IndexTypes parameter.


IProviderSupport.PSGetKeyFields
 VCL Reference

IProviderSupport.PSGetKeyFields

IProviderSupport	See also

Returns the names of all fields required to uniquely identify records in the data packet.

function PSGetKeyFields: string;

Description

The provider component calls PSGetKeyFields to determine what information is required to uniquely identify records in the data packet. This information allows it to locate the records that need to change when it applies updates.

PSGetKeyFields returns a semicolon-delimited string that lists the names of the key fields of the dataset. By default (as implemented by TDataSet), these are the fields with pfInKey included in their ProviderFlags property.


IProviderSupport.PSGetParams
 VCL Reference

IProviderSupport.PSGetParams

IProviderSupport	See also

Returns the current parameter values of the dataset.

function PSGetParams: TParams;

Description

The provider component calls PSGetParams to implement its GetParams method.

PSGetParams returns a TParams object that describes the current values of all parameters of the dataset. If the dataset does not have any parameters, PSGetParams returns nil.

Note:	The PSGetParams method should not create a new instance of TParams for the return value. The provider that calls PSGetParams does not free the returned value.


IProviderSupport.PSGetQuoteChar
 VCL Reference

IProviderSupport.PSGetQuoteChar

IProviderSupport	See also

Returns the character or characters to use in generated SQL statements to enclose quoted strings.

function PSGetQuoteChar: string;

Description

The provider component calls PSGetQuoteChar (indirectly) when generating the dynamic SQL statements that apply updates. These statements are subsequently executed by a call to PSExecuteStatement.

PSGetQuoteChar returns the character or characters that delimit quoted strings in the generated SQL. This string appears both before and after quoted strings.


IProviderSupport.PSGetTableName
 VCL Reference

IProviderSupport.PSGetTableName

IProviderSupport	See also

Returns the name of the dataset table that appears in generated SQL statements.

function PSGetTablename: string;

Description

PSGetTableName returns the name of the underlying database table against which updates are applied when the provider’s ResolveToDataSet property is False. This value is used for generating the SQL statements that apply updates. The generated SQL statements are subsequently executed by a call to PSExecuteStatement.

If PSGetTableName does not return a table name, the provider must have an OnGetTableName event handler to supply this value.


IProviderSupport.PSGetUpdateException
 VCL Reference

IProviderSupport.PSGetUpdateException

IProviderSupport	See also

Generates an EUpdateError object based on another exception object.

function PSGetUpdateException(E: Exception; Prev: EUpdateError): EUpdateError;

Description

The provider component calls PSGetUpdateException when the exception E occurs while applying updates. This method allows the provider to create a single EUpdateError object that encapsulates all the exceptions that occur in an update operation.

PSGetUpdateError determines the error message, context string, and error code from the exception specified by E and creates a new EUpdateError exception that includes that information as well as the information about a previous error as specified by Prev. The context string and error code for E may be specific to the Exception class associated with the dataset. By default, TDataSet generates an EUpdateError with an error code of 1 and an empty context string.


IProviderSupport.PSInTransaction
 VCL Reference

IProviderSupport.PSInTransaction

IProviderSupport	See also

Indicates whether actions against the dataset occur in the context of a transaction.

function PSInTransaction: Boolean;

Description

The provider component applies updates within a transaction, if possible. To do so, it first checks whether a transaction is already underway, and if not, generates one using PSStartTransaction. To determine whether a transaction is already underway, the provider calls PSInTransaction.

PSInTransaction returns True if there is a transaction underway, and False otherwise.


IProviderSupport.PSIsSQLBased
 VCL Reference

IProviderSupport.PSIsSQLBased

IProviderSupport	See also

Indicates whether the dataset includes native SQL support.

function PSIsSQLBased: Boolean;

Description

The provider calls PSIsSQLBased to determine whether the dataset supports some form of native SQL. This information is used when generating SQL commands that are executed by PSExecuteStatement.

Even if the dataset is not SQL-based, it may still allow the provider to execute SQL statements for applying updates. For example, BDE-enabled local databases such as Paradox and DBASE provide SQL support via the BDE’s local SQL engine, but are not SQL-based. However, table and field names are not specified in the same way for the local SQL engine as they are for native SQL. The provider uses PSIsSQLBased to determine how these names should appear in generated SQL.

Note:	The PSIsSQLSupported method indicates whether the dataset can execute SQL commands at all, regardless of whether the dataset is SQL-based.


IProviderSupport.PSIsSQLSupported
 VCL Reference

IProviderSupport.PSIsSQLSupported

IProviderSupport	See also

Indicates whether the dataset can execute SQL statements.

function PSIsSQLSupported: Boolean;

Description

PSIsSQLSupported indicates whether the provider can call PSExecuteStatement to execute an SQL statement. When PSIsSQLSupported returns False, calling PSExecuteStatement generates an exception. The provider can still work with a dataset that returns False from PSIsSQLSupported, but it must set the ResolveToDataSet property to True, or provide data on a read-only basis.


IProviderSupport.PSReset
 VCL Reference

IProviderSupport.PSReset

IProviderSupport	See also

Resets the dataset so that it is positioned on the first record.

procedure PSReset;

Description

The provider calls PSReset to reposition the dataset on the first record before fetching records.


IProviderSupport.PSSetCommandText
 VCL Reference

IProviderSupport.PSSetCommandText

IProviderSupport	See also

Assigns a specified SQL command to be executed by PSExecute.

procedure PSSetCommandText(const CommandText: string);

Description

If the provider’s Options property includes poAllowCommandText, clients can supply an SQL command along with a call to GetRecords or Execute. This command is passed to the dataset by a call to PSSetCommandText, and subsequently executed by a call to PSExecute.

The value of the CommandText parameter replaces the dataset’s SQL statement (if it has one), or replaces the name of an underlying database table or stored procedure.


IProviderSupport.PSSetParams
 VCL Reference

IProviderSupport.PSSetParams

IProviderSupport	See also

Assigns the specified parameter values to the dataset.

procedure PSSetParams(AParams: TParams);

Description

PSSetParams assigns the parameter values specified by AParams to the parameters of the dataset.


IProviderSupport.PSStartTransaction
 VCL Reference

IProviderSupport.PSStartTransaction

IProviderSupport	See also

Starts a transaction that encapsulates all activity until a call to PSEndTransaction.

procedure PSStartTransaction;

Description

The provider component applies updates within a transaction, if possible. To do so, it calls PSStartTransaction to start a transaction before applying updates, and calls PSEndTransaction when all updates are applied or too many errors are encountered.

Note:	TDataSetProvider only starts a transaction (Using PSStartTransaction) if the PSInTransaction method indicates that there is no transaction already established. That is, it does not assume nested transaction support is available.


IProviderSupport.PSUpdateRecord
 VCL Reference

IProviderSupport.PSUpdateRecord

IProviderSupport	See also

Applies a single update to the underlying database table or tables.

function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet): Boolean;

Description

Before the provider generates SQL statements to apply an update, it calls PSUpdateRecord to let the dataset apply the update in some other fashion. For example, BDE-enabled datasets generate an OnUpdateRecord to allow the application to apply the update and, if the OnUpdateRecord event handler does not apply the update, uses any associated TUpdateSQL object to apply the update.

UpdateKind indicates whether the update is an insertion (ukInsert), deletion (ukDelete), or modification (ukModify).

Delta is the delta datapacket. The current record represents the record to be updated.

PSUpdateRecord returns True if it updates the record, False otherwise. If PSUpdateRecord returns False, the provider generates dynamic SQL to perform the update and calls PSExecuteStatement.

Note:	PSUpdateRecord is only called if the provider’s ResolveToDataSet property is False.


Hierarchy

IInterface

IProviderSupport


TIpSocket
 VCL Reference

TIpSocket

Hierarchy	Properties	Methods 	Events	See also

TIpSocket encapsulates the network support functions

Unit

Sockets

Description

TIpSocket encapsulates the network support functions, linking sockets to network protocols such as TCP/IP and UDP, as well as raw sockets and custom protocols.

Do not create instances of TIpSocket. Use TIpSocket as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TIpSocket provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TIpSocket properties

TIpSocket	Alphabetically	Legend

In TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TIpSocket properties

TIpSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag

VCLComObject


TIpSocket.LocalHost
 VCL Reference

TIpSocket.LocalHost

TIpSocket	See also

Specifies the name of the local system.

type TSocketHost = string;

property LocalHost: TSocketHost;

Description

Use LocalHost to get the name of the system that is running the application that uses the Windows socket. LocalHost is a string containing the domain name and service of the local socket endpoint, such as

http://www.wSite.Com

Port numbers allow a single system, identified by the LocalHostAddr property, to host multiple connections simultaneously. Each combination of LocalPort and LocalHostAddr can only be bound to a single socket connection.

LocalHost provides an alias for the local IP address given in the LocalHostAddr property. Most Intranets provide host names for the IP addresses of systems on the net. On Windows 95 and NT machines, if a host name is not available, create one for the local IP address by entering the name into the HOSTSs file. See the Microsoft documentation on Windows sockets for more information on the HOSTS file.


TIpSocket.LocalPort
 VCL Reference

TIpSocket.LocalPort

TIpSocket	See also

Specifies the ID number of the port used by the socket connection.

TSocketPort = type string;

property LocalPort: TSocketPort;

Description

Use LocalPort to determine the port number that is bound to the socket connection. For server endpoints of listening connections, LocalPort is the ID associated with the service the server socket provides. For client or server endpoints of connections to another socket, LocalPort is usually an arbitrary value picked when the connection was made.

Many values of LocalPort are associated by convention with a particular service such as FTP or HTTP.


TIpSocket.RemoteHost
 VCL Reference

TIpSocket.RemoteHost

TIpSocket	See also

Specifies the name of the remote system.

TSocketHost = type string;

property RemoteHost: TSocketHost;

Description

Use RemoteHost to get the name of the system on the other end of the socket connection. RemoteHost is a string containing the domain name and service of the remote endpoint of the socket connection, such as

http://www.wSite.Com


TIpSocket.RemotePort
 VCL Reference

TIpSocket.RemotePort

TIpSocket	See also

Specifies the ID number of the port used by the RemoteHost to form the socket connection.

type TSocketPort = string;

property RemotePort: TSocketPort;

Description

Use RemotePort to determine the port number used by the socket on the other end of the socket connection.

Port numbers allow a single system, identified by the RemoteHost property, to host multiple connections simultaneously. Each combination of RemotePort and RemoteHost can only be bound to a single socket connection.

Many port numbers are associated by convention with a particular service such as ftp or http. To determine whether the value of RemotePort is associated with a specific service, use the LookupProtocol method.

Note:	If a client socket requests a specific port to indicate a desired service, the value of RemotePort for the actual connection may differ from the requested port number. Most server sockets listen on the port associated with a service, but switch to an arbitrary available port number for forming connections.


 VCL Reference

TIpSocket events

TIpSocket	By object	Legend

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TIpSocket events

TIpSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TIpSocket methods

TIpSocket	Alphabetically	Legend

In TIpSocket

Create

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Close

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TIpSocket methods

TIpSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForData


TIpSocket.Create
 VCL Reference

TIpSocket.Create

TIpSocket	See also

Creates an instance of TIpSocket.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a TIpSocket object.


TIpSocket.GetSocketAddr
 VCL Reference

TIpSocket.GetSocketAddr

TIpSocket	See also

Builds a valid network socket address.

function GetSocketAddr(h: TSocketHost; p: TSocketPort): TSockAddr;

Description

Use GetSocketAddr to build a valid socket address based on the host name and port number. The TSocketHost and TSocketPort arguments are used to return a TSockAddr structure, which can then be passed to Connect or Bind.


TIpSocket.LocalDomainName
 VCL Reference

TIpSocket.LocalDomainName

TIpSocket	See also

Returns the domain name for the local host.

function LocalDomainName: string;

Description

Use LocalDomain name to return the domain name for the local host.


TIpSocket.LocalHostAddr
 VCL Reference

TIpSocket.LocalHostAddr

TIpSocket	See also

Returns the local IP address for the host machine.

function LocalHostAddr: TSocketHost;

Description

Use LocalHostAddr to return the local IP address in string format.


TIpSocket.LocalHostName
 VCL Reference

TIpSocket.LocalHostName

TIpSocket	See also

Returns the local host name.

function LocalHostName: TSocketHost;

Description

Use LocalHostName to return the host name for the local host.

For example:

ShowMessage(TcpClient1.LocalHostName);


TIpSocket.LookupHostAddr
 VCL Reference

TIpSocket.LookupHostAddr

TIpSocket	See also

Looks up the host address based on the host name.

function LookupHostAddr(const hn: string): TSocketHost;

Description

Use LookupHostAddr to look up the host address based on the machine's host name.

For example:

StrToInt(TcpClient1.LookupHostAddr("borland.com"));


TIpSocket.LookupHostName
 VCL Reference

TIpSocket.LookupHostName

TIpSocket	See also

Looks up the host name based on the IP address.

function LookupHostName(const ipaddr: string): TSocketHost;

Description

Use LookupHostName to look up the host name based on the machine's IP address.

For example:

TcpClient1.LookupHostName("123.60.192.10");


TIpSocket.LookupPort
 VCL Reference

TIpSocket.LookupPort

TIpSocket	See also

Returns the port number.

function LookupPort(const sn: string; pn: pchar = nil): word;

Description

Use LookupPort to return the port number in the SERVICES file based on the service name and protocol number.

For more information, refer to the Services(5) Linux manual page.


TIpSocket.LookupProtocol
 VCL Reference

TIpSocket.LookupProtocol

TIpSocket	See also

Returns the protocol number.

function LookupProtocol(const pn: string): TSocketProtocol;

Description

Use LookupProtocol to return the protocol number in the PROTOCOLS file based on the protocol name.

For more information, refer to the Protocols(5) Linux manual page.


TIpSocket.ReceiveFrom
 VCL Reference

TIpSocket.ReceiveFrom

TIpSocket	See also

Receives a packet of information.

function ReceiveFrom: (var buf; bufsize: Integer; ToAddr: TSockAddr; var len: Integer; flags: Integer = 0): Integer;

Description

Use ReceiveFrom to receive a single packet of information. Note that information in the packet is not checked for length, completeness, and such, which occurs at a higher level.


TIpSocket.SendTo
 VCL Reference

TIpSocket.SendTo

TIpSocket	See also

Sends a packet of information.

function SendTo: (var buf; bufsize: integer; ToAddr: TSockAddr; flags: integer = 0): integer;

Description

Use SendTo to send a single packet of information over the network.  Note that information in the packet is not checked for length, completeness, and such, which occurs at a higher level.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket


TISAPIApplication
 VCL Reference

TISAPIApplication

Hierarchy	Properties	Methods	Using TISAPIApplication	See also

TISAPIApplication encapsulates an ISAPI or NSAPI server application.

Unit

ISAPIApp

Description

TISAPIApplication provides the fundamental behavior of an ISAPI or NSAPI server application. The HTTP server calls the methods of TISAPIApplication when it receives an HTTP request message. TISAPIApplication creates a thread to manage the request message, and a creates a new instance of the Web module for that thread, or reuses an old instance that was deactivated after a previous response was sent.

TISAPIApplication creates TISAPIRequest and TISAPIResponse objects to represent the request message and any response that should be sent in return, passes these to the dispatcher so that the response can be filled in, and sends the response if it was not already sent by a TWebActionItem.

Each ISAPI server project automatically declares an Application variable of type TISAPIApplication as the instance of the application. This declaration overrides the Application variable declared in the Forms unit if the ISAPIApp unit is declared last in the uses list of the project file. Every ISAPI server application must include the ISAPIApp unit.

To work with an Apache server, use the TApacheApplication object.  To work with a CGI server, use the TCGIApplication object instead.


 VCL Reference

TISAPIApplication properties

TISAPIApplication	Alphabetically	Legend

Derived from TWebApplication

Title

Derived from TWebRequestHandler

ActiveCount

CacheConnections

InactiveCount

MaxConnections

WebModuleClass

WebModuleFactory

WebModuleFactoryCount

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TISAPIApplication properties

TISAPIApplication	By object	Legend

ActiveCount

CacheConnections

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

InactiveCount

MaxConnections

Name

Owner

Tag

Title

VCLComObject

WebModuleClass

WebModuleFactory

WebModuleFactoryCount


 VCL Reference

TISAPIApplication methods

TISAPIApplication	Alphabetically	Legend

In TISAPIApplication

GetExtensionVersion

HttpExtensionProc

TerminateExtension

Derived from TWebApplication

Create

CreateForm

Destroy

Initialize

Run

Derived from TWebRequestHandler

AddWebModuleFactory

HandleException

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TISAPIApplication methods

TISAPIApplication	By object	Legend

AddWebModuleFactory

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetExtensionVersion

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HasParent

HttpExtensionProc

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

TerminateExtension

UpdateAction


TISAPIApplication.GetExtensionVersion
 VCL Reference

TISAPIApplication.GetExtensionVersion

TISAPIApplication	See also

Returns the application name and version number.

type

  THSE_VERSION_INFO = packed record

    dwExtensionVersion: DWORD;

    lpszExtensionDesc: array [0..HSE_MAX_EXT_DLL_NAME_LEN-1] of Char;

  end;

function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL;

Description

The HTTP server calls GetExtensionVersion to obtain the application name and version number. GetExtensionVersion returns the version number for the HTTP functions in the runtime library, and the Title property of the ISAPI application object.


TISAPIApplication.HttpExtensionProc
 VCL Reference

TISAPIApplication.HttpExtensionProc

TISAPIApplication	See also

Responds to an HTTP request message.

function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD;

Description

The HTTP server calls HttpExtensionProc when it receives an HTTP request message. HttpExtensionProc creates the TISAPIRequest and TISAPIResponse objects for the HTTP request message, and calls the HandleRequest message so that the response can be filled out and sent. Finally, HttpExtensionProc frees the request and response objects.

If the response is filled out and sent, HttpExtensionProc returns HSE_STATUS_SUCCESS. Otherwise it returns HSE_STATUS_ERROR.


TISAPIApplication.TerminateExtension
 VCL Reference

TISAPIApplication.TerminateExtension

TISAPIApplication

Returns True.

function TerminateExtension(dwFlags: DWORD): BOOL;

Description

The HTTP server calls TerminateExtension when it wants to shut down the ISAPI application. TerminateExtension always returns True, allowing the server to shut down.


Hierarchy

TObject

TPersistent

TComponent

TWebRequestHandler

TWebApplication

TISAPIApplication


TLargeintField
 VCL Reference

TLargeintField

Hierarchy	Properties	Methods	Events 	Using TLargeintField	See also

A TLargeintField object represents a large integer field in a dataset.

Unit

DB

Description

TLargeintField fields are database fields that contain large (64-bit) integer values.

If you use the Fields editor at design time to create a persistent field component for the large integer field, you can access it by name at runtime. When using dynamic field components, you can access the TIntegerField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TLargeintField properties

TLargeintField	Alphabetically	Legend

In TLargeintField

AsFloat

AsInteger

AsLargeInt

AsString

AsVariant

DataSize

MaxValue

MinValue

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TLargeintField properties

TLargeintField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsLargeInt

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMaskPtr

EditMask

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Lookup

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TLargeintField.AsFloat
 VCL Reference

TLargeintField.AsFloat

TLargeintField	See also

Represents the value of the field as a floating-point value.

property AsFloat: Double;

Description

Use AsFloat to

Assign the large integer field value to a floating-point variable.

Assign a floating-point value to the large integer field.

For example, this code assigns a floating-point value to a large integer field value:

MyLargeintField.AsFloat := FloatVariable;

To assign a large integer field value to a floating-point value, use code similar to this:

FloatVariable := MyLargeintField.AsFloat;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


TLargeintField.AsInteger
 VCL Reference

TLargeintField.AsInteger

TLargeintField	See also

Represents the value of the field as a 32-bit integer.

property AsInteger: Longint;

Description

Use AsInteger to

Assign the large integer field value to a 32-bit integer variable.

Assign a 32-bit integer value to the large integer field.

For example, this code assigns integer value to a large integer field value:

MyLargeIntegerField.AsInteger := 47;

To assign a large integer field value to an integer value, use code similar to this:

IntegerVariable := MyLargeIntegerField.AsInteger;

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


TLargeintField.AsLargeInt
 VCL Reference

TLargeIntField.AsLargeInt

TLargeintField	See also

Represents the field value as a large integer.

property AsLargeInt: LargeInt;

Description

Use AsLargeInt to

Assign the large integer field value to a 64-bit integer variable.

Assign a 64-bit integer value to the large integer field.

For example, this code assigns a 64-bit integer value to a large integer field:

MyLargeIntegerField.AsLargeInt := 2147483648;

To assign a large integer field value to a 64-bit integer, use code similar to this:

LargeIntegerVariable := MyLargeIntegerField.AsLargeInt;

If a value assigned to the field is not within the range established by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TLargeintField.AsString
 VCL Reference

TLargeintField.AsString

TLargeintField	See also

Represents the value of the field as a string.

property AsString: String;

Description

Use AsString to

Assign the large integer field value to string variable.

Assign a string value to the large integer field.

For example, this code assigns a string value to a large integer field value:

MyLargeIntegerField.AsString := '1232';

To assign a large integer field value to a string value, use code similar to this:

Edit1.Text := MyLargeIntegerField.AsString;

If the string assigned to the field does not represent a valid 64-bit integer value within the range specified by the MinValue and MaxValue properties, an EDatabaseError exception is raised.


TLargeintField.AsVariant
 VCL Reference

TLargeintField.AsVariant

TLargeintField	See also

Represents the value of a large integer field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the large integer field value to Variant value.

Assign a Variant value to the large integer field.

For example, this code assigns a Variant value to a large integer field value:

MyLargeIntegerField.AsVariant := VariantVariable;

To assign a large integer field value to a variant value, use code similar to this:

VariantVariable:= MyLargeIntegerField.AsVariant;

Using Variants is useful when both the actual field type and the type of the data are unknown.

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


TLargeintField.DataSize
 VCL Reference

TLargeintField.DataSize

TLargeintField	See also

Indicates the amount of memory needed to store the value of an integer field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a large integer field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For large integer fields, DataSize is always 8. This is the number of bytes required for a 64-bit integer values in a database table.


TLargeintField.MaxValue
 VCL Reference

TLargeintField.MaxValue

TLargeintField	See also

Limits the maximum value in the large integer field.

property MaxValue: Largeint;

Description

Use MaxValue to get or set the maximum value that can be entered into the field. If a value greater than MaxValue is entered, an EDatabaseError exception is raised.

If the value of MaxValue is 0, the large integer field can have a value up to the maximum value that can be represented by the native database type. For 64-bit integer fields, this value is 2 ^63 - 1.


TLargeintField.MinValue
 VCL Reference

TLargeintField.MinValue

TLargeintField	See also

Limits the minimum value in the large integer field.

property MinValue: Largeint;

Description

Use MinValue to get or set the minimum value that can be entered into the field. If a value smaller than MinValue is entered, an EDatabaseError exception is raised.

If the value of MinValue is 0, the large integer field can have a value as small as the native database type can represent. For 64-bit integer fields, this minimum value is -2 ^63


TLargeintField.Value
 VCL Reference

TLargeintField.Value

TLargeintField	See also

Represents the value of the large integer field.

property Value: Largeint;

Description

Use Value to read data directly from and write data directly to a large integer field. Using the Value property is the same as using the AsLargeInt property.

If a value assigned to the field is not within the range established by the MinValue and the MaxValue properties, an EDatabaseError exception is raised.


 VCL Reference

TLargeintField events

TLargeintField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TLargeintField events

TLargeintField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TLargeintField methods

TLargeintField	Alphabetically	Legend

In TLargeintField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLargeintField methods

TLargeintField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TLargeintField.Create
 VCL Reference

TLargeintField.Create

TLargeintField	See also

Create creates an instance of TLargeintField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TLargeintField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftLargeint, and valid characters to '+', '-', and '0'..'9'. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TLargeintField. After instantiating a TLargeintField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TLargeintField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TLargeintField with a dataset component by setting its DataSet property.

The example below creates a TLargeintField object for a field named Population accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TLargeintField;

begin

  SQLDataSet1.Close;

  T := TLargeintField.Create(SQLDataSet1);

  T.FieldName := 'Population';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TLargeintField


TLookupList
 VCL Reference

TLookupList

Hierarchy	Methods	See also

TLookupList maintains a list of lookup values associated with a set of key field values.

Unit

DB

Description

TField uses TLookupList to implement a cache of lookup values. Each value in the lookup list is associated with a set of values on the key fields in the lookup data set. Lookup fields match the values of the fields identified by their KeyFields property with the values of the key fields from the lookup data set. When these values match, the value of the lookup field is set to the associated value from TLookupList.

Use TLookupList to generate a lookup list programmatically when there is no actual lookup dataset. Use the methods of the field’s LookupList property to fill the lookup list with values and set the LookupCache property of the field to True. If no other lookup properties of the field are set, the field will use the supplied lookup list without overwriting it with values from a lookup dataset.


 VCL Reference

TLookupList methods

TLookupList	Alphabetically	Legend

In TLookupList

Add

Clear

Create

Destroy

ValueOfKey

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TLookupList methods

TLookupList	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ValueOfKey


TLookupList.Add
 VCL Reference

TLookupList.Add

TLookupList	See also

Adds a lookup value to the list for a given key value.

procedure Add(const AKey, AValue: Variant);

Description

Lookup fields call Add when building the lookup cache to associate lookup values with the values of the key fields in the lookup dataset. The AKey parameter is a variant or variant array that represents the value or values of the key fields. AValue is a variant that represents the value of the lookup field associated with the key field values.

Use Add to build a lookup list from scratch when there is no actual lookup dataset.


TLookupList.Clear
 VCL Reference

TLookupList.Clear

TLookupList	See also

Empties the lookup list and frees the associated memory.

procedure Clear;

Description

Call Clear to empty the current values in the lookup list when building a lookup list programmatically. Lookup fields call Clear automatically before regenerating the lookup cache if the list represents the values in a lookup dataset.


TLookupList.Create
 VCL Reference

TLookupList.Create

TLookupList	See also

Creates an instance of TLookupList.

constructor Create;

Description

Applications should not need to call Create. Instances of TLookupList are created by the field component that uses the list for its lookup cache. To obtain one of these instances, read the LookupList property of the field.


TLookupList.Destroy
 VCL Reference

TLookupList.Destroy

TLookupList	See also

Destroys an instance of TLookupList.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The lookup field that uses TLookupList destroys the lookup list when it is done.

Destroy frees all memory used to store the list of lookup values.


TLookupList.ValueOfKey
 VCL Reference

TLookupList.ValueOfKey

TLookupList	See also

Returns the lookup value associated with a set of key field values.

function ValueOfKey(const AKey: Variant): Variant;

Description

Call ValueOfKey to look up the value for a lookup field that has the set of values specified by the AKey parameter on the fields identified by its KeyFields property. AKey is a Variant or Variant array that contains the values on the key fields in the lookup data set that uniquely specify a lookup field value.


Hierarchy

TObject

TLookupList


TLocalConnection
 VCL Reference

 TLocalConnection

Hierarchy	Properties	Methods	Events	Using TLocalConnection	See also

TLocalConnection represents the connection between a client dataset or XML broker and a provider that resides in the same application.

Unit

MConnect

Description

Use TLocalConnection to manage the connection between one or more client datasets or XML brokers and the providers that reside in the same application. When working with local providers, it is not necessary to set the RemoteServer property of a client dataset or XML broker to a TLocalConnection component. However, using TLocalConnection provides lets your application communicate directly with local providers through the AppServer property. This provides access to methods that would otherwise be unavailable, and makes it easier to scale up to a multi-tiered application at a later time.

TLocalConnection implements the IAppServer interface.

Warning:	TLocalConnection only links clients to providers that are instances of TDataSetProvider.


 VCL Reference

TLocalConnection properties

TLocalConnection	Alphabetically	Legend

In TLocalConnection

AppServer

ProviderCount

Providers

Derived from TCustomConnection

Connected

DataSetCount

DataSets

LoginPrompt

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TLocalConnection properties

TLocalConnection	By object	Legend

AppServer

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DataSetCount

DataSets

DesignInfo

LoginPrompt

Name

Owner

ProviderCount

Providers

Tag

VCLComObject


TLocalConnection.AppServer
 VCL Reference

TLocalConnection.AppServer

TLocalConnection	See also

Provides access to the IAppServer interface that handles communication with providers.

property AppServer: IAppServer;

Description

Use AppServer to make explicit IAppServer calls to communicate with the local providers. The IAppServer interface lets you call provider methods that are otherwise unavailable because they are protected.


TLocalConnection.ProviderCount
 VCL Reference

TLocalConnection.ProviderCount

TLocalConnection	See also

Indicates the number of providers in the Providers property list.

property ProviderCount: Integer;

Description

Read ProviderCount to determine the number of local providers. This is the number of entries in the Providers property list.


TLocalConnection.Providers
 VCL Reference

TLocalConnection.Providers

TLocalConnection	See also

Lists the local providers with which this local connection component can communicate.

property Providers[const ProviderName: string]: TCustomProvider;

Description

Providers provides access to the local providers that are available through the IAppServer interface. Providers only lists the providers whose Exported property is set to True.

ProviderName is the name of a provider. If you specify a name of a provider that is not listed, TLocalConnection raises an exception.


 VCL Reference

TLocalConnection events

TLocalConnection	Alphabetically	Legend

Derived from TCustomConnection

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TLocalConnection events

TLocalConnection	By object	Legend

AfterConnect

AfterDisconnect

BeforeConnect

BeforeDisconnect

OnLogin


 VCL Reference

TLocalConnection methods

TLocalConnection	Alphabetically	Legend

In TLocalConnection

Create

Destroy

GetServer

Derived from TCustomConnection

Close

Open

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLocalConnection methods

TLocalConnection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Open

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TLocalConnection.Create
 VCL Reference

TLocalConnection.Create

TLocalConnection	See also

Creates and initializes a local connection component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TLocalConnection at runtime. TLocalConnection components placed in forms or data modules at design time are created automatically.

The AOwner parameter specifies the component (usually the form or data module) that is responsible for freeing the TLocalConnection instance.


TLocalConnection.Destroy
 VCL Reference

TLocalConnection.Destroy

TLocalConnection	See also

Frees an instance of TLocalConnection.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TLocalConnection reference is not nil before calling the destructor.


TLocalConnection.GetServer
 VCL Reference

TLocalConnection.GetServer

TLocalConnection	See also

Returns the IAppServer interface for communicating with local providers.

function GetServer: IAppServer; override;

Description

GetServer returns the value of the AppServer property.


Hierarchy

TObject

TPersistent

TComponent

TCustomConnection

TCustomRemoteServer

TLocalConnection


TListControlAction
 VCL Reference

TListControlAction

Hierarchy	Properties	Methods	Events	Using TListControlAction	See also

TListControlAction is the base class for action objects that operate on the selection of a list control (list box or list view).

Unit

ExtActns

Description

TListControlAction implements the common behavior for actions that work with list controls (list boxes and list views). Each descendant class performs a specific operation on the target list control. Do not use TListControlAction directly in an application. Instead, use a TListControlAction descendant such as TListControlSelectAll, TListControlClearSelection, TListControlDeleteSelection, TListControlCopySelection, or TListControlMoveSelection.

TListControlAction makes the target list control available to descendant classes as the value of the ListControl property. TListControlAction descendants then override the ExecuteTarget method to perform their specific function on the target list control.


 VCL Reference

TListControlAction properties

TListControlAction	Alphabetically	Legend

In TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlAction properties

TListControlAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TListControlAction.ListControl
 VCL Reference

TListControlAction.ListControl

TListControlAction 	See also

Provides access to the target of the action.

property ListControl: TCustomListControl;

Description

ListControl is the list control on which the action performs its function. It is a TCustomListControl descendant, such a TListView or TListBox.

Set ListControl to associate the action with a particular control. If ListControl is not explicitly set, it is assumed to be the active listbox or list view when the action fires.


 VCL Reference

TListControlAction events

TListControlAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlAction events

TListControlAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlAction methods

TListControlAction	Alphabetically	Legend

In TListControlAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlAction methods

TListControlAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlAction.Create
 VCL Reference

TListControlAction.Create

TListControlAction	See also

Creates an instance of TListControlAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TListControlAction constructor because actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TListControlAction instance.


TListControlAction.HandlesTarget
 VCL Reference

TListControlAction.HandlesTarget

TListControlAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget checks that the target is a TCustomListControl descendant (or that the ListControl property is set if Target is nil). HandlesTarget returns True if there is a list control to act as target, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction


TListControlClearSelection
 VCL Reference

TListControlClearSelection

Hierarchy	Properties	Methods	Events	Using TListControlClearSelection	See also

TListControlClearSelection deselects all selected items in a list control (list view or list box).

Unit

StdActns

Description

Add TListControlClearSelection to an action list to allow users to deselect any selected items of a list control by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to deselect all selected items in the target control.

TListControlClearSelection is designed to work with a list control (TCustomListControl descendant) as a target. TListControlClearSelection automatically disables itself if the target control is not a list control or if that list box or list view has no selected items.


 VCL Reference

TListControlClearSelection properties

TListControlClearSelection	Alphabetically	Legend

Derived from TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlClearSelection properties

TListControlClearSelection	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TListControlClearSelection events

TListControlClearSelection	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlClearSelection events

TListControlClearSelection	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlClearSelection methods

TListControlClearSelection	Alphabetically	Legend

In TListControlClearSelection

ExecuteTarget

UpdateTarget

Derived from TListControlAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

ReferenceInterface

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlClearSelection methods

TListControlClearSelection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlClearSelection.ExecuteTarget
 VCL Reference

TListControlClearSelection.ExecuteTarget

TListControlClearSelection 	See also

Deselects the currently selected items in the target list control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires. It should always be a TCustomListControl descendant (because HandlesTarget returns False if it is not).

ExecuteTarget sets the ListControl property to Target it is not already set.  It then calls the list control’s ClearSelection method, deselecting any selected items.


TListControlClearSelection.UpdateTarget
 VCL Reference

TListControlClearSelection.UpdateTarget

TListControlClearSelection 	See also

Enables or disables the action, depending on the state of the target control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TListControlClearSelection, UpdateTarget checks whether the current target object (specified by the ListControl property if it is set, otherwise by the Target parameter) is a list control that includes at least one selected item. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction

TListControlClearSelection


TListControlDeleteSelection
 VCL Reference

TListControlDeleteSelection

Hierarchy	Properties	Methods	Events	Using TListControlDeleteSelection	See also

TListControlDeleteSelection deletes the selected items in a list control (list view or listbox).

Unit

StdActns

Description

Add TListControlDeleteSelection to an action list to allow users to delete the selected items of a list control by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to delete all selected items in the target control (a listbox or list view).

TListControlDeleteSelection is designed to work with a list control (TCustomListControl descendant) as a target. TListControlDeleteSelection automatically disables itself if the target control is not a list control or if that list box or list view has no selected items.


 VCL Reference

TListControlDeleteSelection properties

TListControlDeleteSelection	Alphabetically	Legend

Derived from TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlDeleteSelection properties

TListControlDeleteSelection	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TListControlDeleteSelection events

TListControlDeleteSelection	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlDeleteSelection events

TListControlDeleteSelection	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlDeleteSelection methods

TListControlDeleteSelection	Alphabetically	Legend

In TListControlDeleteSelection

ExecuteTarget

UpdateTarget

Derived from TListControlAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

ReferenceInterface

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlDeleteSelection methods

TListControlDeleteSelection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlDeleteSelection.ExecuteTarget
 VCL Reference

TListControlDeleteSelection.ExecuteTarget

TListControlDeleteSelection 	See also

Deletes the selected items in the target list control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires. It should always be a TCustomListControl descendant (because HandlesTarget returns False if it is not).

ExecuteTarget sets the ListControl property to Target it is not already set.  It then calls the list control’s DeleteSelected method, deleting any selected items.


TListControlDeleteSelection.UpdateTarget
 VCL Reference

TListControlDeleteSelection.UpdateTarget

TListControlDeleteSelection 	See also

Enables or disables the action, depending on the state of the target control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TListControlDeleteSelection, UpdateTarget checks whether the current target object (specified by the ListControl property if it is set, otherwise by the Target parameter) is a list control that includes at least one selected item. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction

TListControlDeleteSelection


TListControlMoveSelection
 VCL Reference

TListControlMoveSelection

Hierarchy	Properties	Methods	Events	Using TListControlMoveSelection	See also

TListControlMoveSelection moves the selected items in a list control (list view or list box) to another (destination) list control.

Unit

StdActns

Description

Add TListControlMoveSelection to an action list to allow users to move the selected items of a list control to another list control by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to move all selected items in the target control to another (destination) list control.

Your application must explicitly set the Destination property to indicate the list to which items are copied.

TListControlMoveSelection is designed to work with a list control (TCustomListControl descendant) as a target. This target is the source list control, not the destination. TListControlMoveSelection automatically disables itself if the target control is not a list control, if that list box or list view has no selected items, or if there is no destination list control assigned.


 VCL Reference

TListControlMoveSelection properties

TListControlMoveSelection	Alphabetically	Legend

Derived from TListControlCopySelection

Destination

Derived from TListControlAction

ListControl

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListControlMoveSelection properties

TListControlMoveSelection	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Destination

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

ListControl

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TListControlMoveSelection events

TListControlMoveSelection	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TListControlMoveSelection events

TListControlMoveSelection	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TListControlMoveSelection methods

TListControlMoveSelection	Alphabetically	Legend

In TListControlMoveSelection

ExecuteTarget

Derived from TListControlCopySelection

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

ReferenceInterface

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListControlMoveSelection methods

TListControlMoveSelection	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TListControlMoveSelection.ExecuteTarget
 VCL Reference

TListControlMoveSelection.ExecuteTarget

TListControlMoveSelection 	See also

Moves the selected items in the target list control to the list control specified by Destination.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires. It should always be a TCustomListControl descendant (because HandlesTarget returns False if it is not).

ExecuteTarget sets the ListControl property to Target it is not already set.  It then calls the list control’s MoveSelection method, copying any selected items to the list box or list view specified by the Destination property and removing them from the target (source list control).


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TListControlAction

TListControlCopySelection

TListControlMoveSelection


TMasterDataLink
 VCL Reference

TMasterDataLink

Hierarchy	Properties	Methods	Events	See also

TMasterDataLink allows a dataset to establish a master/detail relationship.

Unit

DB

Description

Use TMasterDataLink as a private member of a custom dataset class that can represent the detail records for another dataset. TMasterDataLink maintains a list of field components from the master dataset, and passes on data events to the dataset that owns it. In the constructor of the dataset that uses TMasterDataLink to link to another data source, create the TMasterDataLink object and set any event handlers to respond to data events.

Do not confuse the dataset that is the value of the TMasterDataLink object’s DataSet property with the dataset that uses TMasterDataLink to link to a master dataset. The DataSet property is the master dataset, while the dataset that owns the TMasterDataLink object is the detail set.

TClientDataSet, ADO-based datasets, and TTable objects already include a TMasterDataLink object.

Note:	Unidirectional datasets and TQuery objects use their own dedicated datalink classes to perform the same types of tasks.


 VCL Reference

TMasterDataLink properties

TMasterDataLink	Alphabetically	Legend

In TMasterDataLink

FieldNames

Fields

DetailDataSet

Derived from TDataLink

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

Editing

Eof

ReadOnly

RecordCount


 VCL Reference

TMasterDataLink properties

TMasterDataLink	By object	Legend

Active

ActiveRecord

Bof

BufferCount

DataSet

DataSource

DataSourceFixed

DetailDataSet

Editing

Eof

FieldNames

Fields

ReadOnly

RecordCount


TMasterDataLink.DetailDataSet
 VCL Reference

TMasterDataLink.DetailDataSet

TMasterDataLink

Indicates the detail dataset in the master/detail relationship.

property DetailDataSet: TDataSet;

Description

Read DetailDataSet to access the detail dataset. This is the dataset that includes the master data link as a member to connect it to a master dataset.


TMasterDataLink.FieldNames
 VCL Reference

TMasterDataLink.FieldNames

TMasterDataLink	See also

Names the fields from the master dataset that are used to define the link to the detail dataset.

property FieldNames: String;

Description

Set FieldNames to the fields in the master dataset that supply values that must be matched by fields in the detail dataset. Each field name in the string must be separated from other field names with a semicolon.

Setting FieldNames causes TMasterDataLink to regenerate the Fields property from the field components of the master dataset. Once the Fields property has been regenerated, TMasterDataLink triggers an OnMasterChange event.


TMasterDataLink.Fields
 VCL Reference

TMasterDataLink.Fields

TMasterDataLink	See also

Lists all the field components from the master dataset that are used to establish a link to the detail dataset.

property Fields: TList;

Description

Use Fields to access individual link field components from the master data set. Fields lists the field components in the master dataset named by the FieldNames property. Datasets use this property to ascertain the current values of the link fields.

Fields is a read-only property. Fields is generated by locating the field components referenced by the FieldNames property in the master dataset.


 VCL Reference

TMasterDataLink events

TMasterDataLink	Alphabetically	Legend

In TMasterDataLink

OnMasterChange

OnMasterDisable


 VCL Reference

TMasterDataLink events

TMasterDataLink	By object	Legend

OnMasterChange

OnMasterDisable


TMasterDataLink.OnMasterChange
 VCL Reference

TMasterDataLink.OnMasterChange

TMasterDataLink	See also

Occurs after the Fields property changes.

property OnMasterChange: TNotifyEvent;

Description

Write an OnMasterChange event handler to update the dataset that owns the TMasterSourceLink to reflect any changes that occurred in the source (master) dataset or the FieldNames property. The Fields property reflects the new state of the source (master) dataset and the FieldNames property. If FieldNames refers to any fields that disappeared from the source dataset, the Fields property contains undefined field components for those fields.

Typically, the OnMasterChange event handler updates the detail dataset to reflect those details that correspond to the master field values obtained from the Fields property.


TMasterDataLink.OnMasterDisable
 VCL Reference

TMasterDataLink.OnMasterDisable

TMasterDataLink	See also

Occurs when the source dataset becomes inactive.

property OnMasterDisable: TNotifyEvent;

Description

Write an OnMasterDisable event handler to respond when the source (master) dataset becomes inactive. When the source dataset is inactive, the field components in the Fields property can not be used to obtain the data from records in the source dataset. Thus, only information cached by the detail dataset that owns the TMasterDataLink can be used after OnMasterDisable until the next OnMasterChange event occurs.


 VCL Reference

TMasterDataLink methods

TMasterDataLink	Alphabetically	Legend

In TMasterDataLink

ActiveChanged

CheckBrowseMode

Create

Destroy

GetDetailDataSet

LayoutChanged

RecordChanged

Derived from TDataLink

Edit

ExecuteAction

UpdateAction

UpdateRecord

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMasterDataLink methods

TMasterDataLink	By object	Legend

ActiveChanged

AfterConstruction

Assign

BeforeDestruction

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Edit

ExecuteAction

FieldAddress

Free

FreeInstance

GetDetailDataSet

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LayoutChanged

MethodAddress

MethodName

NewInstance

RecordChanged

SafeCallException

UpdateAction

UpdateRecord


TMasterDataLink.ActiveChanged
 VCL Reference

TMasterDataLink.ActiveChanged

TMasterDataLink	See also

Regenerates the Fields property and triggers an OnMasterChange or OnMasterDisable event.

procedure ActiveChanged; override;

Description

Applications can not call the protected ActiveChanged procedure. Changes in the Active property or the FieldNames property trigger this procedure. When the source dataset becomes inactive, ActiveChanged empties the Fields property and generates an OnMasterDisable event. When the dataset becomes active, ActiveChanged regenerates Fields from the source dataset and generates an OnMasterChange event.


TMasterDataLink.CheckBrowseMode
 VCL Reference

TMasterDataLink.CheckBrowseMode

TMasterDataLink	See also

Informs the dataset that owns the TMasterDataLink object when the current record in the source dataset is about to change.

procedure CheckBrowseMode; override;

Description

Applications can not call the protected CheckBrowseMode procedure. CheckBrowseMode is called immediately before the current record in the source dataset changes. It calls the CheckBrowseMode method of the dataset that owns the TMasterDataLink object, so that it can post any pending edits before the record changes.


TMasterDataLink.Create
 VCL Reference

TMasterDataLink.Create

TMasterDataLink	See also

Creates an instance of TMasterDataLink.

constructor Create(DataSet: TDataSet);

Description

Call Create from the constructor of the dataset that uses TMasterDataLink to link to a master dataset. The dataset that uses the TMasterDataLink passes itself as the DataSet parameter.

Create associates the instance of TMasterDataLink with the dataset that owns it, and creates the helper objects it uses to manage the list of field components.


TMasterDataLink.Destroy
 VCL Reference

TMasterDataLink.Destroy

TMasterDataLink	See also

Destroys an instance of TMasterDataLink.

destructor Destroy; override;

Description

Applications do not free instances of TMasterDataLink. The dataset that owns the TMasterDataLink instance frees the datalink from its own destructor.

Component writers call the Free method from the destructor of the dataset that owns the TMasterDataLink object. Free checks that the TMasterDataLink reference is not already freed, and only then calls Destroy.

Destroy frees up the memory used to manage the list of field components.


TMasterDataLink.GetDetailDataSet
 VCL Reference

TMasterDataLink.GetDetailDataSet

TMasterDataLink	See also

Returns the value of the DetailDataSet property.

function GetDetailDataSet: TDataSet; override;

Description

GetDetailDataSet is the protected read implementation of the DetailDataSet property.


TMasterDataLink.LayoutChanged
 VCL Reference

TMasterDataLink.LayoutChanged

TMasterDataLink	See also

Informs the dataset that owns the TMasterDataLink object after the data source has changed the number of records buffered.

procedure LayoutChanged; override;

Description

Applications can not call the protected LayoutChanged method. LayoutChanged is called automatically when the source dataset changes to reflect a change in the layout of a control linked to that source dataset. LayoutChanged regenerates the Fields property and triggers an OnMasterChange event.


TMasterDataLink.RecordChanged
 VCL Reference

TMasterDataLink.RecordChanged

TMasterDataLink	See also

Generates an OnMasterChange event when the contents of one of the fields in the current record changes.

procedure RecordChanged(Field: TField); override;

Description

Applications can not call the protected RecordChanged method. It is called automatically when the contents of the current record change. The Field parameter indicates which field in the current record has changed. If Field is nil, the entire record has changed.

If the Field parameter is nil, or if the Field parameter is one of the fields listed in the Fields property, RecordChanged triggers an OnMasterChange event.


Hierarchy

TObject

TPersistent

TDataLink

TDetailDataLink

TMasterDataLink


TNamedItem
 VCL Reference

TNamedItem

Hierarchy	Properties	Methods	See also

TNamedItem is the base class for definitions used by datasets.

Unit

DB

Description

Use TNamedItem as a base class when defining a class for definitions that are maintained in a collection by a dataset.  Sets of TNamedItem objects are maintained by a descendant of TDefCollection that is specific to the type of object defined.

Definition objects are used by datasets to specify the properties of database entities such as fields or indexes.


 VCL Reference

TNamedItem properties

TNamedItem	Alphabetically	Legend

In TNamedItem

DisplayName

Name

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TNamedItem properties

TNamedItem	By object	Legend

Collection

DisplayName

ID

Index

Name


TNamedItem.DisplayName
 VCL Reference

TNamedItem.DisplayName

TNamedItem	See also

Specifies the name of the named item as it appears in the collection editor at design time.

property DisplayName: String;

Description

TNamedItem overrides the inherited DisplayName property to ensure that its value is the same as the value of the Name property. Thus, the name that appears in the collection editor is the same as the name of the defined database entity as it appears (or will appear) in the dataset.


TNamedItem.Name
 VCL Reference

TNamedItem.Name

TNamedItem	See also 	Example

Specifies the name of the database entity defined by the TNamedItem object.

property Name: String;

Description

Use Name to specify the name that the underlying database table uses to refer to the defined object. For example, if the TNamedItem object is a field definition, the value of Name is the name of the corresponding field in the underlying database table.

Note:	For dBASE maintained indexes, Name refers to the tag name of the index. For Paradox tables, the Name of the primary key is an empty string.


 VCL Reference

TNamedItem methods

TNamedItem	Alphabetically	Legend

Derived from TCollectionItem

Create

DestroyTCollectionItem_Destroy>main

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TNamedItem methods

TNamedItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TPersistent

TCollectionItem

TNamedItem


TPasswordDialog
 VCL Reference

TPasswordDialog

Hierarchy	Properties	Methods	Events	See also

TPasswordDialog is a dialog box that allows the user to specify passwords for the current BDE session.

Unit

DBPWDlg

Description

Use TPasswordDialog to allow the user to specify passwords for the current session in a BDE-based application. (The current session is represented by a TSession object.) The passwords are used when the application opens a Paradox table that requires a password. If a table requires a password that has not been added to the current session, the user will be prompted for the password.

A TPasswordDialog object is usually created with the PasswordDialog function. However, TPasswordDialog can also be used as a base object for other types of password dialog boxes.


 VCL Reference

TPasswordDialog properties

TPasswordDialog	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

AlphaBlend

AlphaBlendValue

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DefaultMonitor

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

ObjectMenuItem

OldCreateOrder

OleFormObject

Parent

ParentBiDiMode

PixelsPerInch

Position

PrintScale

Scaled

TileMode

TransparentColor

TransparentColorValue

Visible

WindowMenu

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragKind

DragMode

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPasswordDialog properties

TPasswordDialog	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

Align

AlignDisabled

AlphaBlend

AlphaBlendValue

Anchors

AutoScroll

AutoSize

BiDiMode

BorderIcons

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultMonitor

Designer

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

DragKind

DragMode

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Icon

KeyPreview

Left

LRDockWidth

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

Name

ObjectMenuItem

OldCreateOrder

OleFormObject

Owner

Parent

ParentBiDiMode

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

Position

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TileMode

Top

TransparentColor

TransparentColorValue

UndockHeight

UndockWidth

UseDockManager

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowMenu

WindowProc

WindowState


 VCL Reference

TPasswordDialog events

TPasswordDialog	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnPaint

OnShortCut

OnShow

Derived from TWinControl

OnDockDrop

OnDockOver

OnGetSiteInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock


 VCL Reference

TPasswordDialog events

TPasswordDialog	By object	Legend

OnActivate

OnCanResize

OnClick

OnClose

OnCloseQuery

OnConstrainedResize

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnGetSiteInfo

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShortCut

OnShow

OnStartDock

OnUnDock


 VCL Reference

TPasswordDialog methods

TPasswordDialog	Alphabetically	Legend

In TPasswordDialog

AddButtonClick

EditChange

OKButtonClick

RemoveAllButtonClick

RemoveButtonClick

Derived from TForm

ArrangeIcons

Cascade

Next

Previous

Tile

Derived from TCustomForm

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

InitiateAction

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsRightToLeft

MethodAddress

MethodName

NewInstance


 VCL Reference

TPasswordDialog methods

TPasswordDialog	By object	Legend

AddButtonClick

AfterConstruction

ArrangeIcons

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EditChange

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Next

OKButtonClick

PaintTo

ParentToClient

Perform

Previous

Print

Realign

ReferenceInterface

Refresh

Release

RemoveAllButtonClick

RemoveButtonClick

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Tile

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TPasswordDialog.AddButtonClick
 VCL Reference

TPasswordDialog.AddButtonClick

TPasswordDialog	See also

Controls what happens when the Add button is clicked.

procedure AddButtonClick(Sender: TObject);

Description

AddButtonClick adds the password in the edit box to the current session by calling the TSession.AddPassword method. Then AddButtonClick clears and sets focus to the edit box.

After the AddButtonClick method is called, the OK Button is enabled, regardless of whether the edit box currently contains a password.


TPasswordDialog.EditChange
 VCL Reference

TPasswordDialog.EditChange

TPasswordDialog	See also

Controls what happens when the contents of the edit box change.

procedure EditChange(Sender: TObject);

Description

EditChange enables or disables the Add, OK, and Remove buttons according to whether the edit box contains a password. If the edit box contains a password, the buttons are enabled. Otherwise the buttons are disabled.

Note:	If the AddButtonClick method has been called, then the OK button is enabled, regardless of whether the edit box contains a password.


TPasswordDialog.OKButtonClick
 VCL Reference

TPasswordDialog.OKButtonClick

TPasswordDialog	See also

Controls what happens when the OK button is clicked.

procedure OKButtonClick(Sender: TObject);

Description

OKButtonClick adds the password in the edit box to the current session by calling the TSession.AddPassword method.


TPasswordDialog.RemoveAllButtonClick
 VCL Reference

TPasswordDialog.RemoveAllButtonClick

TPasswordDialog	See also

Removes all passwords from the current session.

procedure RemoveAllButtonClick(Sender: TObject);

Description

RemoveAllButtonClick removes all passwords from the current session by calling the TSession.RemoveAllPasswords method. Then RemoveAllButtonClick sets focus to the edit box.


TPasswordDialog.RemoveButtonClick
 VCL Reference

TPasswordDialog.RemoveButtonClick

TPasswordDialog	See also

Removes the password in the edit box from the current session.

procedure RemoveButtonClick(Sender: TObject);

Description

RemoveButtonClick removes the password in the edit box from the current session by calling the TSession.RemovePassword method. Then RemoveButtonClick clears and sets focus to the edit box.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TForm

TPasswordDialog


TPictureAdapter
 VCL Reference

TPictureAdapter

Hierarchy	Properties	Methods	See also

TPictureAdapter connects a native TPicture object to an OLE picture object.

Unit

AxCtrls

Description

To create an instance of a TPictureAdapter call the GetOlePicture procedure, which creates the binding between a TPicture and an OLE picture object.


 VCL Reference

TPictureAdapter properties

TPictureAdapter	Alphabetically	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TPictureAdapter properties

TPictureAdapter	By object	Legend

RefCount


 VCL Reference

TPictureAdapter methods

TPictureAdapter	Alphabetically	Legend

In TPictureAdapter

Create

Derived from TCustomAdapter

Destroy

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TPictureAdapter methods

TPictureAdapter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TPictureAdapter.Create
 VCL Reference

TPictureAdapter.Create

TPictureAdapter	See also

Create constructs an instance of the picture adapter control.

constructor Create(Picture: TPicture);

Description

Do not call the constructor for this class directly. Instead, call the GetOlePicture procedure to create the binding between a TPicture and an OLE picture.


Hierarchy

TObject

TInterfacedObject

TCustomAdapter

TPictureAdapter


TParamList
 VCL Reference

TParamList

Hierarchy	Properties	Methods	See also

TParamList manages a list of session parameters.

Unit

DBTables

Description

Do not use TParamList directly. TParamList is an internal object used to manage a list of session parameters for a TSession component.


 VCL Reference

TParamList properties

TParamList	Alphabetically	Legend

In TParamList

Buffer

FieldCount

FieldDescs


 VCL Reference

TParamList properties

TParamList	By object	Legend

Buffer

FieldCount

FieldDescs


TParamList.Buffer
 VCL Reference

TParamList.Buffer

TParamList	See also

Contains all parameter strings for the parameter list.

property Buffer: PChar;

Description

Buffer is used internally to store parameters in the the parameter list object. While applications can parse this list, there is usually no need to do so.


TParamList.FieldCount
 VCL Reference

TParamList.FieldCount

TParamList	See also

Indicates the number of session parameters in the parameter list.

property FieldCount: Integer;

Description

Check FieldCount to determine how many parameters there are for a session.


TParamList.FieldDescs
 VCL Reference

TParamList.FieldDescs

TParamList 	See also

Contains the field descriptors for each parameter maintained by the parameter list object.

type

  TFieldDescList = array of FLDDesc;

property FieldDescs: TFieldDescList;

Description

Examine FieldDescs to determine the characteristics of each parameter maintained by the parameter list object. Applications usually have no need to access this property directly.


 VCL Reference

TParamList methods

TParamList	Alphabetically	Legend

In TParamList

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParamList methods

TParamList	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TParamList.Create
 VCL Reference

TParamList.Create

TParamList	See also

Creates an instance of TParamList.

constructor Create (Params: TStrings);

Description

Call Create to instantiate a TParamList object. Most applications do not need to create a TParamList object because it is automatically created by TSession.

Params is a string list containing the names of the parameters to create for the session. These parameters correspond to Borland Database Engine (BDE) configuration parameters.


TParamList.Destroy
 VCL Reference

TParamList.Destroy

TParamList	See also

Destroys an instance of TParamList.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks for a nil reference before calling Destroy.

Destroy frees the memory previously allocated for field descriptors and the buffer used by TParamList.

Note:	An application should never need to destroy a TParamList object. It is automatically destroyed when its parent session object is destroyed.


Hierarchy

TObject

TParamList


TPreviousTab
 VCL Reference

TPreviousTab

Hierarchy	Properties	Methods	Events	Using TPreviousTab	See also

TPreviousTab moves a page control to its previous page.

Unit

ExtActns

Description

Add TPreviousTab to an action list to allow users to move to the prior page of a page control using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application change the current page of a page control to the previous one. Typically, these client controls are the “Prior” button or menu item in a tabbed dialog.

Before you can use TPreviousTab, you must assign a target tab control as the value of the TabControl property. Once the target tab control is assigned, TPreviousTab automatically disables itself if the target control is not enabled or if it is on the first page and wrapping is not permitted.


 VCL Reference

TPreviousTab properties

TPreviousTab	Alphabetically	Legend

Derived from TTabAction

SkipHiddenTabs

TabControl

Wrap

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPreviousTab properties

TPreviousTab	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

SkipHiddenTabs

TabControl

Tag

VCLComObject

Visible

Wrap


 VCL Reference

TPreviousTab events

TPreviousTab	Alphabetically	Legend

Derived from TTabAction

AfterTabChange

BeforeTabChange

OnValidateTab

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TPreviousTab events

TPreviousTab	By object	Legend

AfterTabChange

BeforeTabChange

OnExecute

OnHint

OnUpdate

OnValidateTab


 VCL Reference

TPreviousTab methods

TPreviousTab	Alphabetically	Legend

In TPreviousTab

ExecuteTarget

UpdateTarget

Derived from TTabAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPreviousTab methods

TPreviousTab	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TPreviousTab.ExecuteTarget
 VCL Reference

TPreviousTab.ExecuteTarget

TPreviousTab 	See also

Changes the selected page in the target control to the previous one.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget causes the action to perform its default response based on the state of the target tab control.

Target is the currently active object when the action fires. TPreviousTab ignores this parameter and uses the TabControl property to identify the target control.

ExecuteTarget

1. Generates a BeforeTabChange event.

2. Moves the control identified by TabControl to the previous page. If TabControl is on the first page and the Wrap property is Ttrue, this moves to the last page. If Wrap is False, ExecuteTarget does not change the page when the tab control is on the first page. Note that the SkipHiddenTabs property controls whether hidden pages are considered when locating the previous page.

3. Generates an AfterTabChange event.


TPreviousTab.UpdateTarget
 VCL Reference

TPreviousTab.UpdateTarget

TPreviousTab 	See also

Enables or disables the action, depending on the status of the target control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

Target is the currently active object.

In TPreviousTab, UpdateTarget ignores the Target parameter and checks whether the target control specified by the TabControl property is enabled. If so, it sets Enabled to True if the first page is not currently selected or if Wrap is True. It sets Enabled to False if TabControl is not enabled or if the first page is selected and Wrap is False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TTabAction

TPreviousTab


TPropertyPage
 VCL Reference

TPropertyPage

Hierarchy	Properties	Methods	Events	Using TPropertyPage	See also

TPropertyPage is the base class for controls that represent an ActiveX control’s property page.

Unit

AxCtrls

Description

TPropertyPage extends TCustomForm by adding the functionality needed to embed the form in an ActiveX property page dialog. It also adds methods to copy property values from the object to the form’s controls, and vice versa.

To implement your own property page for an ActiveX object, derive a new class from TPropertyPage, design the form, then override the UpdateObject and UpdatePropertyPage methods.  The Delphi IDE provides an expert for creating a skeleton property page.  See Creating a new property page for more information.

TPropertyPage provides a helper method, Modified, that your form can call when any of the controls on the form are changed by the user.  Calling the Modified method notifies the property dialog that the user has modified the object’s properties.  Normally this will enable the Apply button on the property dialog.

The property page maintains a connection to the object it is editing, using the OleObjects property.  This property is a Variant and can be used to read and write the object’s properties.


 VCL Reference

TPropertyPage properties

TPropertyPage	Alphabetically	Legend

In TPropertyPage

OleObject

OleObjects

Derived from TCustomForm

Active

ActiveControl

ActiveOleControl

BorderStyle

Canvas

ClientHeight

ClientRect

ClientWidth

Designer

DropTarget

Floating

FormState

HelpFile

KeyPreview

Menu

ModalResult

Monitor

OldCreateOrder

OleFormObject

Parent

PixelsPerInch

PrintScale

Scaled

Visible

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPropertyPage properties

TPropertyPage	By object	Legend

Action

Active

ActiveControl

ActiveOleControl

Align

AlignDisabled

Anchors

AutoScroll

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

KeyPreview

Left

LRDockWidth

Menu

ModalResult

Monitor

Name

OldCreateOrder

OleFormObject

OleObject

OleObjects

Owner

Parent

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc

WindowState


TPropertyPage.OleObject
 VCL Reference

TPropertyPage.OleObject

TPropertyPage	See also

Contains a reference to the first item in the array of ActiveX controls being edited by the page.

property OleObject: OleVariant;

Description

Property pages have the ability to be “hooked up to” multiple ActiveX controls, usually by multi-selecting the ActiveX controls in the form designer, and right clicking to invoke the property pages. OleObject points to the first control in the array. To access other ActiveX controls, use the property, OleObjects.

Cast the value of OleObject to the appropriate interface, such as IUnknown or IDispatch, and use the methods of the interface to access the property values and methods of the control.


TPropertyPage.OleObjects
 VCL Reference

TPropertyPage.OleObjects

TPropertyPage	See also

An array of Dispatch IDs for each ActiveX control being edited by the page.

property OleObjects: TInterfaceList;

Description

Property pages have the ability to be “hooked up to” multiple ActiveX controls, usually by multi-selecting the ActiveX controls in the form designer, and right clicking to invoke the property pages. Cast the value of an entry from the OleObjects Items property to the appropriate interface, such as IUnknown or IDispatch, and use the methods of the interface to access the property values and methods of the control.


 VCL Reference

TPropertyPage events

TPropertyPage	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnClose

OnCreate

OnDeactivate

OnDestroy

OnHide

OnPaint

OnShow

Derived from TWinControl

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnMouseDown

OnMouseMove

OnMouseUp

OnResize


 VCL Reference

TPropertyPage events

TPropertyPage	By object	Legend

OnActivate

OnClick

OnClose

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDragDrop

OnDragOver

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnShow


 VCL Reference

TPropertyPage methods

TPropertyPage	Alphabetically	Legend

In TPropertyPage

Create

Destroy

EnumCtlProps

Modified

UpdateObject

UpdatePropertyPage

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

CreateNew

DefaultHandler

DefocusControl

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPropertyPage methods

TPropertyPage	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

EnumCtlProps

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

Modified

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateControlState

UpdateObject

UpdatePropertyPage

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TPropertyPage.Create
 VCL Reference

TPropertyPage.Create

TPropertyPage

Creates an instance of TPropertyPage.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a property page at runtime. Property pages added at design time are created automatically.Pass a single Component as an argument to assign the property page an owner that is responsible for freeing the property page.

Create instantiates the helper objects used by the property page.


TPropertyPage.Destroy
 VCL Reference

TPropertyPage.Destroy

TPropertyPage	See also

Frees an instance of TPropertyPage.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which verifies that the property page reference is not nil, and only then calls Destroy.

Destroy frees any associated OLE objects before freeing the object instance.


TPropertyPage.EnumCtlProps
 VCL Reference

TPropertyPage.EnumCtlProps

TPropertyPage	See also

Looks for a PropType type property in a control on the form.

procedure EnumCtlProps(PropType: TGUID; PropNames: TStrings);

Description

Use EnumCtlProps to locate all properties of the ActiveX object specified by OleObject that use the GUID specified by the PropType parameter.  The names of all properties of the specified type are added to the PropNames list.  The property names can be used subsequently to read or write property values using the IDispatch interface of the ActiveX object.

Note:	EnumCtlProps does not clear the PropNames list before adding property names.  Applications should clear the string list before calling EnumCtlProps to avoid mistaking entries that were previously in the list for properties of the ActiveX object.


TPropertyPage.Modified
 VCL Reference

TPropertyPage.Modified

TPropertyPage

Notifies the property page’s container that the user has edited one of the controls on the page.

procedure Modified;

Description

Call Modified from the controls on the property page when their values change. The property dialog will enable the Apply button in response to this method call.


TPropertyPage.UpdatePropertyPage
 VCL Reference

TPropertyPage.UpdatePropertyPage

TPropertyPage	See also

Copies the property values from the ActiveX object to controls on the property page.

procedure UpdatePropertyPage; virtual;

Description

This method is normally called when the property page is first shown, or when the user undoes changes to the property dialog box.  The UpdatePropertyPage method implemented by TPropertyPage does nothing.  Override this method to copy the property values from the ActiveX object to the controls on the property page.

UpdatePropertyPage is the reverse of UpdateObject, which copies the property values from controls on the property page to the ActiveX object.


TPropertyPage.UpdateObject
 VCL Reference

TPropertyPage.UpdateObject

TPropertyPage	See also

UpdateObject is called to copy property values from the controls on the form to the ActiveX Object.

procedure UpdateObject; virtual;

Description

Override this method to copy values from the controls on the property page to properties of the ActiveX Object.  Cast the value of the OleObject property to an IDispatch interface to set the property values.

UpdateObject is the reverse of UpdatePropertyPage, which copies the property values from the ActiveX Object to controls on the form.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TPropertyPage


TPropertyPageImpl
 VCL Reference

TPropertyPageImpl

Hierarchy	Properties	Methods

TPropertyPageImpl implements the IPropertyPage interface to provide the interfaces needed to support an ActiveX property page.

Unit

AxCtrls

Description

Applications do not create TPropertyPageImpl objects; they are created automatically when the user creates an ActiveX control object by using the ActiveX control or ActiveForms wizard.

This class is used internally by TPropertyPage to provide a bridge between a Delphi form and the ActiveX property page API. TPropertyPageImpl implements the property page portion of the COM object while TActiveXPropertyPage implements the COM server portion.


 VCL Reference

TPropertyPageImpl properties

TPropertyPageImpl	Alphabetically	Legend

In TPropertyPageImpl

PropertyPage

Derived from TAggregatedObject

Controller


 VCL Reference

TPropertyPageImpl properties

TPropertyPageImpl	By object	Legend

Controller

PropertyPage


TPropertyPageImpl.PropertyPage
 VCL Reference

TPropertyPageImpl.PropertyPage

TPropertyPageImpl	Properties	See also

Represents the property page of the ActiveX control.

property PropertyPage: TPropertyPage;

Description

The property page that this TPropertyPageImpl represents. When clients call the IPropertyPage interface, TPropertyPageImpl converts these these calls to actions on the property page that is referenced by this object.


 VCL Reference

TPropertyPageImpl methods

TPropertyPageImpl	Alphabetically	Legend

In TPropertyPageImpl

InitPropertyPage

Derived from TAggregatedObject

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPropertyPageImpl methods

TPropertyPageImpl	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InitPropertyPage

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TPropertyPageImpl.InitPropertyPage
 VCL Reference

TPropertyPageImpl.InitPropertyPage

TPropertyPageImpl	Methods	See also

Initializes the associated property page.

procedure InitPropertyPage; virtual;

Description

Do not call InitPropertyPage, TActiveXPropertyPage calls this method after creating both the TPropertyPage and TPropertyPageImpl objects. It sets the TPropertyPageImpl’s PropertyPage property, and then calls InitPropertyPage. InitPropertyPage sets an internal field of TPropertyPage so that the TPropertyPage can locate its associated TPropertyPageImpl. In addition, InitPropertyPage initializes some properties on the property page.


Hierarchy

TObject

TAggregatedObject

TPropertyPageImpl


TProvider
 VCL Reference

 TProvider

Hierarchy	Properties	Methods	Events	See also

TProvider provides data to and applies updates from a client dataset.

Unit

Provider

Description

TProvider is provided for backward compatibility. It is identical to TDataSetProvider. New applications should use TDataSetProvider instead.


 VCL Reference

TProvider properties

TProvider	Alphabetically	Legend

Derived from TDataSetProvider

Constraints

DataSet

ResolveToDataSet

Derived from TBaseProvider

Options

Resolver

UpdateMode

Derived from TCustomProvider

Data

Exported

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TProvider properties

TProvider	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Data

DataSet

DesignInfo

Exported

Name

Options

Owner

Resolver

ResolveToDataSet

Tag

UpdateMode

VCLComObject


 VCL Reference

TProvider events

TProvider	Alphabetically	Legend

Derived from TDataSetProvider

OnGetDataSetProperties

OnGetTableName

Derived from TBaseProvider

AfterUpdateRecord

BeforeUpdateRecord

OnGetData

OnUpdateData

OnUpdateError

Derived from TCustomProvider

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

OnDataRequest


 VCL Reference

TProvider events

TProvider	By object	Legend

AfterApplyUpdates

AfterExecute

AfterGetParams

AfterGetRecords

AfterRowRequest

AfterUpdateRecord

BeforeApplyUpdates

BeforeExecute

BeforeGetParams

BeforeGetRecords

BeforeRowRequest

BeforeUpdateRecord

OnDataRequest

OnGetData

OnGetDataSetProperties

OnGetTableName

OnUpdateData

OnUpdateError


 VCL Reference

TProvider methods

TProvider	Alphabetically	Legend

Derived from TDataSetProvider

Create

Destroy

Derived from TCustomProvider

ApplyUpdates

DataRequest

Execute

GetParams

GetRecords

RowRequest

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TProvider methods

TProvider	By object	Legend

AfterConstruction

ApplyUpdates

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DataRequest

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParams

GetParentComponent

GetRecords

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RowRequest

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomProvider

TBaseProvider

TDataSetProvider

TProvider


TQuery
 VCL Reference

 TQuery

Hierarchy	Properties	Methods	Events	Using TQuery	See also

TQuery encapsulates a dataset with a result set that is based on an SQL statement.

Unit

DBTables

Description

Use TQuery to access one or more tables in a database using SQL statements. Query components can be used with remote database servers (such as Sybase, SQL Server, Oracle, Informix, DB2, and InterBase), with local tables (Paradox, InterBase, dBASE, Access, and FoxPro), and with ODBC-compliant databases.

Query components are useful because they can

Access more than one table at a time (called a “join” in SQL).

Automatically access a subset of rows and columns in its underlying table(s), rather than always returning all rows and columns.

Note:	TQuery is of particular importance to the development of scalable database applications. If there is any chance that an application built to run against local databases will be scaled to a remote SQL database server in the future, use TQuery components from the start to ensure easier scaling later.


 VCL Reference

TQuery properties

TQuery	Alphabetically	Legend

In TQuery

Constrained

DataSource

Local

ParamCheck

ParamCount

Params

Prepared

RequestLive

RowsAffected

SQL

SQLBinary

Text

UniDirectional

Derived from TDBDataSet

AutoRefresh

Database

DatabaseName

DBHandle

DBLocale

DBSession

Handle

SessionName

UpdateMode

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

KeySize

Locale

RecNo

RecordCount

RecordSize

StmtHandle

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

Constraints

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

State

SparseArrays

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TQuery properties

TQuery	By object	Legend

Active

AggFields

AutoCalcFields

AutoRefresh

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constrained

Constraints

Database

DatabaseName

DataSetField

DataSource

DBHandle

DBLocale

DBSession

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Local

Locale

Modified

Name

ObjectView

Owner

ParamCheck

ParamCount

Params

Prepared

RecNo

RecordCount

RecordSize

RequestLive

RowsAffected

SessionName

SparseArrays

SQL

SQLBinary

State

StmtHandle

Tag

Text

UniDirectional

UpdateMode

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


TQuery.Constrained
 VCL Reference

TQuery.Constrained

TQuery	See also

Indicates whether updates and inserts that don’t conform to the result set generated by a SELECT statement are permitted for Paradox and dBASE tables

property Constrained: Boolean;

Description

Use Constrained to determine whether or not edits and insertions are permitted to a Paradox or dBASE table underlying a result set when the UPDATE or INSERT statements contain one or more values that do not comply with the WHERE clause conditions of the SELECT statement that generated the result set. Constrained only applies to live result sets. Constraints are enforced during the editing process.

If Constrained is False (the default), updates and inserts are permitted regardless of the SELECT statement criteria. If True, updates and inserts are not permitted if they violate the criteria of the SELECT statement that generated the result set.

For example, if Constrained is True and a query component’s SQL property is

SELECT *

FROM CUSTOMERS

WHERE (CUSTNO > 1400) AND (CUSTNO < 1500)

then the user would not be allowed to enter a value for CustNo that fell outside this range of values.


TQuery.DataSource
 VCL Reference

TQuery.DataSource

TQuery	See also

Specifies the data source component from which to extract current field values to use with same-name parameters in the query’s SQL statement.

property DataSource: TDataSource;

Description

Set DataSource to automatically fill parameters in a query with fields values from another dataset. Parameters that have the same name as fields in the other dataset are filled with the field values. Parameters with names that are not the same as fields in the other dataset do not automatically get values, and must be programmatically set. For example, if the SQL property of the TQuery contains the SQL statement below and the dataset referenced through DataSource has a CustNo field, the value from the current record in that other dataset is used in the CustNo parameter.

SELECT *

FROM Orders O

WHERE (O.CustNo = :CustNo)

DataSource must point to a TDataSource component linked to another dataset component; it cannot point to this query’s data source component.

The dataset specified in DataSource must be created, populated, and opened before attempting to bind parameters. Parameters are bound by calling the query’s Prepare method prior to executing the query.

Tip:	DataSource is especially of use when creating a master-detail relationship between tables using a linked query. It is also of use to guarantee binding for parameters that are not already set in the Params property or through a call to the ParamByName method.

If the SQL statement used by a query does not contain parameters, or all parameters are bound by the application using the Params property or the ParamByName method, DataSource need not be assigned. The example below shows setting the DataSource property of Query2 to the data source for Query1, preparing Query2, and activating Query2.

with Query2 do begin

  DataSource := DataSource1;

  Prepare;

  Open;

end;

If the SQL statement in the TQuery is a SELECT query, the query is executed using the new field values each time the record pointer in the other dataset is changed. It is not necessary to call the Open method of the TQuery each time. This makes using the DataSource property to dynamically filter a query result set useful for establishing Master-Detail relationships. Set the DataSource property in the Detail query to the TDataSource component for the Master dataset.

If the SQL statement uses other than a SELECT query (such as INSERT or UPDATE), the parameters with the same name as fields in the other dataset still get values, but the query must be explicitly executed each time the other dataset’s record pointer moves. For example, the SQL statement below uses the INSERT statement and has the parameters CustNo and CompanyName.

INSERT INTO Customer

(CustNo, Company)

VALUES (:CustNo, :CompanyName)

Another dataset, Query1 and DataSource1, has a CustNo field but no CompanyName field. If this dataset is used through the DataSource property, the CompanyName parameter must be programmatically assigned a value. Because Query1 has a CustNo field and Query1 is referenced through the DataSource property, the CustNo parameter automatically receives a value.

with Query2 do begin

  DataSource := DataSource1;

  ParamByName('CompanyName').AsString := Edit1.Text;

  Prepare;

  ExecSQL;

end;

If the SQL statement contains parameters with the same name as fields in the other dataset, do not manually set values for these parameters. Any values programmatically set, such as by using the Params property or the ParamByName method, will be overridden with automatic values. Parameters of other names must be programmatically given values. These parameters are unaffected by setting DataSource.

DataSource can be set at runtime or at design-time using the Object Inspector. At design-time, select the desired TDataSource from the drop-down list or type in the name.


TQuery.Local
 VCL Reference

TQuery.Local

TQuery	See also

Indicates whether a query references one or more Paradox or dBASE tables rather than SQL tables on a remote server.

property Local: Boolean;

Description

Check Local to determine if a query accesses one or more Paradox or dBASE tables rather than SQL tables. If Local is True, then the query only accesses dBASE or Paradox tables. Otherwise Local is False. Local is set automatically when an application calls the query’s Prepare method prior to executing the query.

Some query component settings, such as Constrained, are only meaningful for queries against Paradox and dBASE tables. Others are only meaningful for queries against remote SQL servers. Local can provide useful information for branching logic in code based on the type of database accessed. It can also be used to determine whether or not the BDE parsed a query using its local query engine rather than passing SQL statements directly to a remote server.


TQuery.ParamCheck
 VCL Reference

TQuery.ParamCheck

TQuery	See also

Specifies whether the parameter list for a query is regenerated if the SQL property changes at runtime.

property ParamCheck: Boolean;

Description

Set ParamCheck to specify whether or not the Params property is cleared and regenerated if an application modifies the query’s SQL property at runtime. By default ParamCheck is True, meaning that the Params property is automatically regenerated at runtime. When ParamCheck is True, the proper number of parameters is guaranteed to be generated for the current SQL statement.

This property is useful for data definition language (DDL) statements that contain parameters as part of the DDL statement and that are not parameters for the TQuery. For example, the DDL statement to create a stored procedure may contain parameter statements that are part of the stored procedure. Set ParamCheck to False to prevent these parameters from being mistaken for parameters of the TQuery executing the DDL statement.

An application that does not use parameterized queries may choose to set ParamCheck to False, but otherwise ParamCheck should be True.


TQuery.ParamCount
 VCL Reference

TQuery.ParamCount

TQuery	See also	Example

Indicates the current number of parameters for the query.

property ParamCount: Word;

Description

Inspect ParamCount to determine how many parameters are in the Params property. If the ParamCheck property is True, ParamCount always corresponds to the number of actual parameters in the SQL statement for the query.


TQuery.Params
 VCL Reference

TQuery.Params

TQuery	See also	Example

Contains the parameters for a query’s SQL statement.

property Params: TParams;

Description

Access Params at runtime to view and set parameter names, values, and data types dynamically (at design time use the collection editor for the Params property to set parameter information). Params is a zero-based array of TParams parameter records. Index specifies the array element to access.

Note:	An easier way to set and retrieve parameter values when the name of each parameter is known is to call ParamByName. ParamByName cannot, however, be used to change a parameter’s data type or name.

Parameters used in SELECT statements cannot be NULL, but they can be NULL for UPDATE and INSERT statements.


TQuery.Prepared
 VCL Reference

TQuery.Prepared

TQuery	See also	Example

Determines whether or not a query is prepared for execution.

property Prepared: Boolean;

Description

Examine Prepared to determine if a query is already prepared for execution. If Prepared is True, the query is prepared, and if Prepared is False, the query is not prepared. While a query need not be prepared before execution, execution performance is enhanced if the query is prepared beforehand, particularly if it is a parameterized query that is executed more than once using the same parameter values.

Note:	An application can change the current setting of Prepared to prepare or unprepare a query. If Prepared is True, setting it to False calls the Unprepare method to unprepare the query. If Prepared is False, setting it to True calls the Prepare method to prepare the query. Generally, however, it is better programming practice to call Prepare and Unprepare directly. These methods automatically update the Prepared property.


TQuery.RequestLive
 VCL Reference

TQuery.RequestLive

TQuery	See also

Requests an updatable query result set from the database.

property RequestLive: Boolean;

Description

RequestLive is a request that a SELECT query returns an updatable (or live) or read-only result set from the database back-end. A False value for RequestLive (the default) causes the result set to always be read-only. No request is made to the database back-end to return an updatable result set. A True value for RequestLive is a request to database back-end to return an updatable result set. An updatale result set can be made available to the application’s user for direct data editing through visual data controls.

A True value for RequestLive is a request for an updatable result set. It does not guarantee that the database back-end will return an updatable result set. See the documentation for the specific database system used for the criteria needed for a live query result set. If the database cannot return an updatable result set, a read-only result set is returned instead. This is done automatically and usually without error. Some database systems may raise an exception on requests for live result sets that cannot be fulfilled. Check the success of the request by inspecting thr dataset component’s CanModify property.

If the SQL statement used in a TQuery is a general, muli-row SELECT statement, RequestLive can be used with either a True or a False value. For all other SQL statements issued from the TQuery, RequestLive should only be set to False. These other statements include noncursor single-row SELECT statements (more commonly found in stored procedure programming), noncursor Data Manipulation Language (DML) statements like UPDATE or DELETE, and Data Definition Language (DDL) statements like CREATE TABLE and DROP INDEX.

Note:	All multi-table queries return read-only result sets. Other conditions may cause a query to return a read-only result set. For local tables (such as dBASE and Paradox), see the local SQL help file for rules governing live result sets (updatable queries). For other table types (such as InterBase, Oracle, and Sybase), consult the documentation for the specific database system.

Note:	Some SQL database systems require strict case-sensitivity for names of metadata objects in SQL statements. These SQL databases typically have problems with the way metadata names are passed by the BDE in live queries and an exception is raised. A workaround that helps in most cases is to enclose the metadata object references (like table and column names) in quotation marks.


TQuery.RowsAffected
 VCL Reference

TQuery.RowsAffected

TQuery	See also

Returns the number of rows operated upon by the latest query execution.

property RowsAffected: Integer;

Description

Inspect RowsAffected to determine how many rows were updated or deleted by the last query operation. If no rows were updated or deleted, RowsAffected has a value of zero. RowsAffected will have a value of –1 if the execution of the SQL statement could not be executed due to an error condition. This latter situation would typically follow the raising of an exception.


TQuery.SQL
 VCL Reference

TQuery.SQL

TQuery	See also	Example

Contains the text of the SQL statement to execute for the query.

property SQL: TStrings;

Description

Use SQL to provide the SQL statement that a query component executes when its ExecSQL or Open method is called. At design time the SQL property can be edited by invoking the String List editor in the Object Inspector.

The SQL property may contain only one complete SQL statement at a time. In general, multiple “batch” statements are not allowed unless a particular server supports them.

The SQL property can be used to access

Paradox or dBASE tables, using local SQL. The allowable syntax is a subset of SQL-92. See the local SQL help file for information on supported syntax.

Databases on the Local InterBase Server, using standard SQL-92 and specific InterBase extensions to SQL syntax. For information on syntax and limitations, see the InterBase Language Reference and online help.

Databases on remote database servers using the appropriate SQL Links driver or ODBC (not available in all versions). Any standard statement in the server's SQL dialect is allowed. For information on SQL syntax and limitations, see the server documentation.

The SQL statement in the SQL property may contain replaceable parameters, following standard SQL-92 syntax conventions. Parameters are created and stored in the Params property.

Note:	Developers with advanced versions can also invoke the Visual Query Builder to create an SQL statement for execution. Right-click the TQuery icon on the form in the IDE and select the command from the context menu.


TQuery.SQLBinary
 VCL Reference

TQuery.SQLBinary

TQuery	See also

Points to the binary data stream that represents an SQL query statement or result set.

property SQLBinary: PChar;

Description

Do not access SQLBinary. It is an internal binary data stream used by the query component to communicate directly with the Borland Database Engine. To access or set the SQL statement that this query component executes, use the SQL property. To access or set the parameters used in a parameterized SQL statement, use the Params property.


TQuery.Text
 VCL Reference

TQuery.Text

TQuery	See also

Points to the actual text of the SQL query passed to the Borland Database Engine (BDE).

property Text: PChar;

Description

Text is a read-only property that can be examined to determine the actual contents of SQL statement passed to the BDE. For parameterized queries, Text contains the SQL statement with parameters replaced by the parameter substitution symbol (?) in place of actual parameter values.

In general there should be no need to examine the Text property. To access or change the SQL statement for the query, use the SQL property. To examine or modify parameters, use the Params property.


TQuery.UniDirectional
 VCL Reference

TQuery.UniDirectional

TQuery	See also

Determines whether or not Borland Database Engine (BDE) bidirectional cursors are enabled for a query’s result set.

property UniDirectional: Boolean;

Description

Set UniDirectional to control whether or not a BDE cursor can move forward and backward through a result set. By default UniDirectional is False, enabling forward and backward navigation.

Note:	Traditionally SQL cursors are unidirectional. They can travel only forward through a dataset. The BDE, however, permits bidirectional travel by caching records. If an application does not need bidirectional access to records in a result set, set UniDirectional to True. When UniDirectional is True, an application requires less memory and performance is improved.


 VCL Reference

TQuery events

TQuery	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TQuery events

TQuery	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TQuery methods

TQuery	Alphabetically	Legend

In TQuery

Create

Destroy

ExecSQL

GetDetailLinkFields

ParamByName

Prepare

UnPrepare

Derived from TDBDataSet

CheckOpen

CloseDatabase

OpenDatabase

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

CreateBlobStream

DisableConstraints

EnableConstraints

FetchAll

GetFieldData

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQuery methods

TQuery	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

CheckOpen

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CloseDatabase

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecSQL

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

OpenDatabase

ParamByName

Post

Prepare

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UnPrepare

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TQuery.Create
 VCL Reference

TQuery.Create

TQuery	See also

Creates an instance of a query component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a query at runtime. Query components placed in forms or data modules at design time are created automatically.

Create calls its inherited Create constructor, creates an empty SQL statement list, an empty parameter list, sets the OnChange event handler for the SQL statement list, establishes a data link, sets the RequestLive property to False, sets the ParamCheck property to True, and sets the RowsAffected property to -1.


TQuery.Destroy
 VCL Reference

TQuery.Destroy

TQuery	See also

Destroys the instance of a query.

destructor Destroy;

Description

Do not call Destroy directly. Instead, call Free, which checks that the TQuery is not nil before calling Destroy.

Destroy disconnects from the server, frees the SQL statement list, the parameter list, and the data link and SQL binary storage area, and then calls its inherited destructor.


TQuery.ExecSQL
 VCL Reference

TQuery.ExecSQL

TQuery	See also	Example

Executes the SQL statement for the query.

procedure ExecSQL;

Description

Call ExecSQL to execute the SQL statement currently assigned to the SQL property. Use ExecSQL to execute queries that do not return a cursor to data (such as INSERT, UPDATE, DELETE, and CREATE TABLE).

Note:	For SELECT statements, call Open instead of ExecSQL.

ExecSQL prepares the statement in SQL property for execution if it has not already been prepared. To speed performance, an application should ordinarily call Prepare before calling ExecSQL for the first time.


TQuery.GetDetailLinkFields
 VCL Reference

TQuery.GetDetailLinkFields

TQuery	See also

Fills lists with the master and detail fields of the link.

procedure GetDetailLinkFields(MasterFields, DetailFields: TList); override;

Description

Creates two lists of TFields from the master-detail relationship between two tables; one containing the master fields, and the other containing the detail fields.


TQuery.ParamByName
 VCL Reference

TQuery.ParamByName

TQuery	See also	Example

Accesses parameter information based on a specified parameter name.

function ParamByName(const Value: String): TParam;

Description

Call ParamByName to set or use parameter information for a specific parameter based on its name.

Value is the name of the parameter for which to retrieve information.

ParamByName is primarily used to set an parameter’s value at runtime. For example, the following statement retrieves the current value of a parameter called “Contact” into an edit box:

Edit1.Text := Query1.ParamByName('Contact').AsString;

Parameters used in SELECT statements cannot be NULL, but they can be NULL for UPDATE and INSERT statements.


TQuery.Prepare
 VCL Reference

TQuery.Prepare

TQuery	See also	Example

Sends a query to the Borland Database Engine (BDE) and the server for optimization prior to execution.

procedure Prepare;

Description

Call Prepare to have the BDE and a remote database server allocate resources for the query and to perform additional optimizations. Calling Prepare before executing a query improves application performance.

Delphi automatically prepares a query if it is executed without first being prepared. After execution, Delphi unprepares the query. When a query will be executed a number of times, an application should always explicitly prepare the query to avoid multiple and unnecessary prepares and unprepares.

Preparing a query consumes some database resources, so it is good practice for an application to unprepare a query once it is done using it. The UnPrepare method unprepares a query.

Note:	When you change the text of a query at runtime, the query is automatically closed and unprepared.


TQuery.UnPrepare
 VCL Reference

TQuery.UnPrepare

TQuery	See also

Frees the resources allocated for a previously prepared query.

procedure UnPrepare;

Description

Call UnPrepare to free the resources allocated for a previously prepared query on the server and client sides.

Preparing a query consumes some database resources, so it is good practice for an application to unprepare a query once it is done using it. The UnPrepare method unprepares a query.

Note:	When you change the text of a query at runtime, the query is automatically closed and unprepared.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TDBDataSet

TQuery


TQueryTableProducer
 VCL Reference

 TQueryTableProducer

Hierarchy	Properties	Methods	Events	Using TQueryTableProducer	See also

TQueryTableProducer assembles a sequence of HTML commands to display the result set of a query in a tabular format.

Unit

DBBdeWeb

Description

Use TQueryTableProducer to produce an HTML table for the records of a parameterized query. The TQuery object obtains its parameters from an HTTP request message. If the request is a GET message, the parameters for the query are the QueryFields property of the request object. If the request is a POST message, the parameters for the query are the ContentFields property of the request object.

To produce an HTML table for a query that has no parameters, use the TDataSetTableProducer object instead.

Note:	See the WebServ demo for an example of how to use TQueryTableProducer.


 VCL Reference

TQueryTableProducer properties

TQueryTableProducer	Alphabetically	Legend

In TQueryTableProducer

Query

Derived from TDSTableProducer

Caption

CaptionAlignment

Columns

DataSet

Editor

Footer

Header

MaxRows

RowAttributes

TableAttributes

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TQueryTableProducer properties

TQueryTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

MaxRows

Name

Owner

Query

RowAttributes

TableAttributes

Tag

VCLComObject


TQueryTableProducer.Query
 VCL Reference

TQueryTableProducer.Query

TQueryTableProducer	See also 	Example

Specifies the TQuery object that TQueryTableProducer runs to obtain its data.

property Query: TQuery;

Description

Set Query to specify the query to run to obtain the data for the HTML table. Use Query to set the query for the TQueryTableProducer rather than the DataSource property: TQueryTableProducer generates its data source internally.

The individual field bindings specified by the THTMLTableColumn objects in the Columns property refer to fields in DataSet.

Note:	Query is identical to the DataSet property, except Query does not use the TDataSet base class of the query object.


 VCL Reference

TQueryTableProducer events

TQueryTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TQueryTableProducer events

TQueryTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TQueryTableProducer methods

TQueryTableProducer	Alphabetically	Legend

In TQueryTableProducer

Content

Derived from TDSTableProducer

BeginUpdate

Create

Destroy

EndUpdate

Derived from TCustomContentProducer

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TQueryTableProducer methods

TQueryTableProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

EndUpdate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TQueryTableProducer.Content
 VCL Reference

TQueryTableProducer.Content

TQueryTableProducer	See also 	Example

Returns the HTML representation of the query results.

function Content: string; override;

Description

Call Content to run the query with the parameters taken from the HTTP request message and retrieve the resulting HTML representation. If the MethodType of the request is mtGet, the parameters for the query are the QueryFields property of the request. If the MethodType of the request is mtPost, the parameters for the query are the ContentFields property of the request.

After running the query, Content calls the OnCreateContent event handler. If the OnCreateContent event handler indicates that the Content method should continue, Content returns the Header property, followed by an HTML table image of the records in the query, followed by the Footer property. If the OnCreateContent event handler indicates that the Content method should not continue, Content returns an empty string.

The string returned by Content can be used as the Content property of the response object associated with the request message.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TDSTableProducer

TQueryTableProducer


TRawSocket
 VCL Reference

TRawSocket

Hierarchy	Properties	Methods 	Events	See also

TRawSocket encapsulates a raw socket

Unit

Sockets

Description

TRawSocket encapsulates a raw socket.


 VCL Reference

TRawSocket properties

TRawSocket	Alphabetically	Legend

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TRawSocket properties

TRawSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag

VCLComObject


 VCL Reference

TRawSocket events

TRawSocket	Alphabetically	Legend

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TRawSocket events

TRawSocket	By object	Legend

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TRawSocket methods

TRawSocket	Alphabetically	Legend

In TRawSocket

Create

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Close

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRawSocket methods

TRawSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForData


TRawSocket.Create
 VCL Reference

TRawSocket.Create

TRawSocket	See also

Creates an instance of a TRawSocket object.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a TRawSocket object.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TRawSocket


TRichEditAlignCenter
 VCL Reference

TRichEditAlignCenter

Hierarchy	Properties	Methods	Events	Using TRichEditAlignCenter	See also

TRichEditAlignCenter centers the text horizontally in the current paragraph of a rich edit control.

Unit

ExtActns

Description

Add TRichEditAlignCenter to an action list to let users center the text in a rich edit control. Controls such as menu items and tool buttons linked to this action cause the application to center the text in all paragraphs that contain selected text (or the paragraph with the cursor if no text is selected).

TRichEditAlignCenter is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check mark to reflect whether the text in the target edit control is centered.


 VCL Reference

TRichEditAlignCenter properties

TRichEditAlignCenter	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditAlignCenter properties

TRichEditAlignCenter	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditAlignCenter events

TRichEditAlignCenter	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditAlignCenter events

TRichEditAlignCenter	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditAlignCenter methods

TRichEditAlignCenter	Alphabetically	Legend

In TRichEditAlignCenter

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditAlignCenter methods

TRichEditAlignCenter	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditAlignCenter.ExecuteTarget
 VCL Reference

TRichEditAlignCenter.ExecuteTarget

TRichEditAlignCenter 	See also

Centers the text in the current paragraph of the target rich edit control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a rich edit control, and if so, sets its Alignment property to taCenter.


TRichEditAlignCenter.UpdateTarget
 VCL Reference

TRichEditAlignCenter.UpdateTarget

TRichEditAlignCenter 	See also

Configures the action, depending on current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TRichEditAlignCenter, UpdateTarget sets Enabled to True and sets the Checked property to True if the text in the current paragraph is centered.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditAlignCenter


TRichEditAlignLeft
 VCL Reference

TRichEditAlignLeft

Hierarchy	Properties	Methods	Events	Using TRichEditAlignLeft	See also

TRichEditAlignLeft left-justifies the text in the current paragraph of a rich edit control.

Unit

ExtActns

Description

Add TRichEditAlignLeft to an action list to let users left-justify the text in a rich edit control. Controls such as menu items and tool buttons linked to this action cause the application to align the text in all paragraphs that contain selected text (or the paragraph with the cursor if no text is selected) to the left margin.

TRichEditAlignLeft is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check mark to indicate whether the text in the target control is left-aligned.


 VCL Reference

TRichEditAlignLeft properties

TRichEditAlignLeft	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditAlignLeft properties

TRichEditAlignLeft	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditAlignLeft events

TRichEditAlignLeft	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditAlignLeft events

TRichEditAlignLeft	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditAlignLeft methods

TRichEditAlignLeft	Alphabetically	Legend

In TRichEditAlignLeft

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditAlignLeft methods

TRichEditAlignLeft	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditAlignLeft.ExecuteTarget
 VCL Reference

TRichEditAlignLeft.ExecuteTarget

TRichEditAlignLeft 	See also

Left-justifies the text in the current paragraph of the target rich edit control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a rich edit control, and if so, sets its Alignment property to taLeftJustify.


TRichEditAlignLeft.UpdateTarget
 VCL Reference

TRichEditAlignLeft.UpdateTarget

TRichEditAlignLeft 	See also

Configures the action, depending on current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TRichEditAlignLeft, UpdateTarget sets Enabled to True and sets the Checked property to True if the text in the current paragraph is left justified.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditAlignLeft


TRichEditAlignRight
 VCL Reference

TRichEditAlignRight

Hierarchy	Properties	Methods	Events	Using TRichEditAlignRight	See also

TRichEditAlignRight right-justifies the text in the current paragraph of a rich edit control.

Unit

ExtActns

Description

Add TRichEditAlignRight to an action list to let users right-justify the text in a rich edit control. Controls such as menu items and tool buttons linked to this action cause the application to align the text in all paragraphs that contain selected text (or the paragraph with the cursor if no text is selected) to the right margin.

TRichEditAlignRight is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check mark to indicate whether the current paragraph of the target control is right-aligned.


 VCL Reference

TRichEditAlignRight properties

TRichEditAlignRight	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditAlignRight properties

TRichEditAlignRight	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditAlignRight events

TRichEditAlignRight	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditAlignRight events

TRichEditAlignRight	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditAlignRight methods

TRichEditAlignRight	Alphabetically	Legend

In TRichEditAlignRight

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditAlignRight methods

TRichEditAlignRight	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditAlignRight.ExecuteTarget
 VCL Reference

TRichEditAlignRight.ExecuteTarget

TRichEditAlignRight 	See also

Right-justifies the text in the current paragraph of the target rich edit control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a rich edit control, and if so, sets its Alignment property to taRightJustify.


TRichEditAlignRight.UpdateTarget
 VCL Reference

TRichEditAlignRight.UpdateTarget

TRichEditAlignRight 	See also

Configures the action, depending on current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TRichEditAlignRight, UpdateTarget sets Enabled to True and sets the Checked property to True if the text in the current paragraph is right justified.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditAlignRight


TRichEditBold
 VCL Reference

TRichEditBold

Hierarchy	Properties	Methods	Events	Using TRichEditBold	See also

TRichEditBold toggles the bold attribute of the currently selected text in a rich edit control.

Unit

ExtActns

Description

Add TRichEditBold to an action list to let users control whether the selected text in a rich edit control is bold. Controls such as menu items and tool buttons linked to this action cause the application to toggle the bold attribute of selected text (or of all text if there is no text selected).

TRichEditBold is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check mark to indicate whether the target control’s text is bold.


 VCL Reference

TRichEditBold properties

TRichEditBold	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditBold properties

TRichEditBold	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditBold events

TRichEditBold	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditBold events

TRichEditBold	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditBold methods

TRichEditBold	Alphabetically	Legend

In TRichEditBold

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditBold methods

TRichEditBold	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditBold.ExecuteTarget
 VCL Reference

TRichEditBold.ExecuteTarget

TRichEditBold 	See also

Toggles the fsBold style of the target rich edit control’s text attributes.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

If the target rich edit control has a selection, ExecuteTarget toggles the fsBold style of the selected text attributes (SelAttributes property), adding the fsBold property if the selected text is not all bold and removing it if the selected text is entirely bold. Note that if the selected text contains both bold and non-bold text, this results in the text becoming entirely bold.

If the target rich edit control has no selection, ExecuteTarget toggles the default fsBold style of the control. This changes the bold attribute of all text that has not had a specific text attribute applied.


TRichEditBold.UpdateTarget
 VCL Reference

TRichEditBold.UpdateTarget

TRichEditBold 	See also

Sets the Checked property to reflect whether the target control’s text is bold.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

Target is the currently active object when the action fires.

UpdateTarget sets the Checked property to True if Target is a rich edit control whose selected text is bold, otherwise it sets Checked to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditBold


TRichEditBullets
 VCL Reference

TRichEditBullets

Hierarchy	Properties	Methods	Events	Using TRichEditBullets	See also

TRichEditBullets toggles whether the current paragraph of a rich edit control is bulleted.

Unit

ExtActns

Description

Add TRichEditBullets to an action list to let users control whether the current paragraphs in a rich edit control are bulleted. Controls such as menu items and tool buttons linked to this action cause the application to toggle the bulleted attribute of all paragraphs that contain selected text (or the paragraph with the cursor if no text is selected).

TRichEditBullets is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control and adds or removes a check mark to indicate whether that control’s paragraphs are bulleted.


 VCL Reference

TRichEditBullets properties

TRichEditBullets	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditBullets properties

TRichEditBullets	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditBullets events

TRichEditBullets	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditBullets events

TRichEditBullets	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditBullets methods

TRichEditBullets	Alphabetically	Legend

In TRichEditBullets

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditBullets methods

TRichEditBullets	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditBullets.ExecuteTarget
 VCL Reference

TRichEditBullets.ExecuteTarget

TRichEditBullets 	See also

Toggles whether the target rich edit control’s current paragraph is bulleted.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget toggles the Numbering property of the target rich edit control’s Paragraph property between nsNone and nsBullet.


TRichEditBullets.UpdateTarget
 VCL Reference

TRichEditBullets.UpdateTarget

TRichEditBullets 	See also

Configures the action, depending on current conditions.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TRichEditBullets, UpdateTarget sets Enabled to True and sets the Checked property to True if the current paragraph is bulleted or to False if the current paragraph is not bulleted.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditBullets


TRichEditItalic
 VCL Reference

TRichEditItalic

Hierarchy	Properties	Methods	Events	Using TRichEditItalic	See also

TRichEditItalic toggles the italic attribute of the currently selected text in a rich edit control.

Unit

ExtActns

Description

Add TRichEditItalic to an action list to let users control whether the selected text in a rich edit control is italic. Controls such as menu items and tool buttons linked to this action cause the application to toggle the italic attribute of selected text (or of all text if there is no text selected).

TRichEditItalic is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check mark to reflect whether the target control’s text is italic.


 VCL Reference

TRichEditItalic properties

TRichEditItalic	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditItalic properties

TRichEditItalic	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditItalic events

TRichEditItalic	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditItalic events

TRichEditItalic	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditItalic methods

TRichEditItalic	Alphabetically	Legend

In TRichEditItalic

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditItalic methods

TRichEditItalic	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditItalic.ExecuteTarget
 VCL Reference

TRichEditItalic.ExecuteTarget

TRichEditItalic 	See also

Toggles the fsItalic style of the target rich edit control’s text attributes.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

If the target rich edit control has a selection, ExecuteTarget toggles the fsItalic style of the selected text attributes (SelAttributes property), adding the fsItalic property if the selected text is not all italic and removing it if the selected text is entirely italic. Note that if the selected text contains both italic and non-italic text, this results in the text becoming entirely italic.

If the target rich edit control has no selection, ExecuteTarget toggles the default fsItalic style of the control. This changes the italic attribute of all text that has not had a specific text attribute applied.


TRichEditItalic.UpdateTarget
 VCL Reference

TRichEditItalic.UpdateTarget

TRichEditItalic 	See also

Sets the Checked property to reflect whether the target control’s text is italic.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

Target is the currently active object when the action fires.

UpdateTarget checks the selected text of the target rich edit control (which is specified by the Control property or the Target parameter) is in italics. If the selected text is italic, UpdateTarget sets the Checked property to True, otherwise it sets Checked to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditItalic


TRichEditStrikeOut
 VCL Reference

TRichEditStrikeOut

Hierarchy	Properties	Methods	Events	Using TRichEditStrikeOut	See also

TRichEditStrikeOut toggles the strikeout attribute of the currently selected text in a rich edit control.

Unit

ExtActns

Description

Add TRichEditStrikeOut to an action list to let users control whether the selected text in a rich edit control has a line through it. Controls such as menu items and tool buttons linked to this action cause the application to toggle the strikeout attribute of selected text (or of all text if there is no text selected).

TRichEditStrikeOut is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control and adds or removes a check mark to indicate whether the target control’s text has the strike out attribute.


 VCL Reference

TRichEditStrikeOut properties

TRichEditStrikeOut	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditStrikeOut properties

TRichEditStrikeOut	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditStrikeOut events

TRichEditStrikeOut	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditStrikeOut events

TRichEditStrikeOut	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditStrikeOut methods

TRichEditStrikeOut	Alphabetically	Legend

In TRichEditStrikeOut

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditStrikeOut methods

TRichEditStrikeOut	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditStrikeOut.ExecuteTarget
 VCL Reference

TRichEditStrikeOut.ExecuteTarget

TRichEditStrikeOut 	See also

Toggles the fsStrikeOut style of the target rich edit control’s text attributes.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

If the target rich edit control has a selection, ExecuteTarget toggles the fsStrikeOut style of the selected text attributes (SelAttributes property), adding the fsStrikeOut property if the selected text is not all struck out and removing it if the selected text is entirely struck out. Note that if the selected text contains both strikeout and non-strikeout text, this results in the text becoming entirely struck out.

If the target rich edit control has no selection, ExecuteTarget toggles the default fsStrikeOut style of the control. This changes the strikeout attribute of all text that has not had a specific text attribute applied.


TRichEditStrikeOut.UpdateTarget
 VCL Reference

TRichEditStrikeOut.UpdateTarget

TRichEditStrikeOut 	See also

Sets the Checked property to reflect whether the target control’s text includes a strikeout line.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

Target is the currently active object when the action fires.

UpdateTarget checks whether Target is a rich edit control with the strikeout font attribute on its selected text. If the selected text is struck out, UpdateTarget sets the Checked property to True, otherwise it sets Checked to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditStrikeOut


TRichEditUnderline
 VCL Reference

TRichEditUnderline

Hierarchy	Properties	Methods	Events	Using TRichEditUnderline	See also

TRichEditUnderline toggles the underline attribute of the currently selected text in a rich edit control.

Unit

ExtActns

Description

Add TRichEditUnderline to an action list to let users control whether the selected text in a rich edit control is underlined. Controls such as menu items and tool buttons linked to this action cause the application to toggle the underline attribute of selected text (or of all text if there is no text selected).

TRichEditUnderline is designed to work with a rich edit control (TCustomRichEdit descendant) as a target. It automatically disables itself if the active control in a form is not a rich edit control, and adds or removes a check to indicate whether the target control’s text is underlined.


 VCL Reference

TRichEditUnderline properties

TRichEditUnderline	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditUnderline properties

TRichEditUnderline	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditUnderline events

TRichEditUnderline	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditUnderline events

TRichEditUnderline	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditUnderline methods

TRichEditUnderline	Alphabetically	Legend

In TRichEditUnderline

ExecuteTarget

UpdateTarget

Derived from TRichEditAction

Create

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditUnderline methods

TRichEditUnderline	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditUnderline.ExecuteTarget
 VCL Reference

TRichEditUnderline.ExecuteTarget

TRichEditUnderline 	See also

Toggles the fsUnderline style of the target rich edit control’s text attributes.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

If the target rich edit control has a selection, ExecuteTarget toggles the fsUnderline style of the selected text attributes (SelAttributes property), adding the fsUnderline property if the selected text is not all underlined and removing it if the selected text is entirely underlined. Note that if the selected text contains both underlined and non-underlined text, this results in the text becoming entirely underlined.

If the target rich edit control has no selection, ExecuteTarget toggles the default fsUnderline style of the control. This changes the underlined attribute of all text that has not had a specific text attribute applied.


TRichEditUnderline.UpdateTarget
 VCL Reference

TRichEditUnderline.UpdateTarget

TRichEditUnderline 	See also

Sets the Checked property to reflect whether the target control’s text is underlined.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

Target is the currently active object when the action fires.

UpdateTarget checks the selected text of the target rich edit control (which is specified by the Control property or the Target parameter) is underlined. If the selected text is underlined, UpdateTarget sets the Checked property to True, otherwise it sets Checked to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction

TRichEditUnderline


TReferenceField
 VCL Reference

TReferenceField

Hierarchy	Properties	Methods	Events 	Using TReferenceField 	See also

TReferenceField represents a REF field in a dataset.

Unit

DB

Description

Reference fields store a pointer or reference to another persistent object. TReferenceField introduces properties for working with references contained in other tables and for working directly with the reference field values.

If you use the Fields editor at design time to create a persistent field component for the reference field, you can access it by name at runtime. When using dynamic field components, you can access the TReferenceFieldField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TReferenceField properties

TReferenceField	Alphabetically	Legend

In TReferenceField

AsVariant

ReferenceTableName

Derived from TDataSetField

Fields

NestedDataSet

Derived from TObjectField

AsString

DataSet

FieldCount

FieldKind

FieldValues

HasConstraints

ObjectType

UnNamed

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldName

FieldNo

FullName

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TReferenceField properties

TReferenceField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldCount

FieldKind

FieldName

FieldNo

Fields

FieldValues

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NestedDataSet

NewValue

ObjectType

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

ReferenceTableName

Required

Size

Tag

Text

UnNamed

ValidChars

Value

VCLComObject

Visible


TReferenceField.AsVariant
 VCL Reference

TReferenceField.AsVariant

TReferenceField	See also

Represents the value of the reference field as a Variant.

property AsVariant: Variant;

Description

Use AsVariant to

Assign the reference field value to a Variant variable.

Assign a Variant value to the reference field.

AsVariant represents the field value as a Variant array of bytes.


TReferenceField.ReferenceTableName
 VCL Reference

TReferenceField.ReferenceTableName

TReferenceField

Names the table that contains the reference associated with the reference field.

property ReferenceTableName: string;

Description

When ReferenceTableName is set, edits to the referenced data can be posted on the table of the reference field.


 VCL Reference

TReferenceField events

TReferenceField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TReferenceField events

TReferenceField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TReferenceField methods

TReferenceField	Alphabetically	Legend

In TReferenceField

Create

Derived from TObjectField

Destroy

Derived from TField

Assign

AssignValue

Clear

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TReferenceField methods

TReferenceField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TReferenceField.Create
 VCL Reference

TReferenceField.Create

TReferenceField	see also

Creates an instance of TReferenceField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TReferenceField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType to ftReference.


Hierarchy

TObject

TPersistent

TComponent

TField

TObjectField

TReferenceField


TWebRequest
 VCL Reference

TWebRequest

Hierarchy	Properties	Methods	Using TWebRequest	See also

TWebRequest is the base class for all objects that represent client request information that is passed to a Web server application.

Unit

HTTPApp

Description

Use a descendant of TWebRequest to interpret an HTTP request message.

Web application objects create TWebRequest objects to capture client requests. The properties of the TWebRequest objects are obtained from the HTTP request message. The Web application uses TWebRequest objects to create corresponding TWebResponse objects. The TWebDispatcher for the application then invokes the TWebActionItem that is associated with the PathInfo of the TWebRequest object.

TWebRequest has several descendants which represent client requests for different types of Web server applications. These descendants are

TApacheRequest objects for Apache server applications.

TCGIRequest objects for CGI server applications.

TISAPIRequest objects for DLLs that respond to the ISAPI or NSAPI servers.

TWinCGIRequest objects for Windows-based CGI servers.


 VCL Reference

TWebRequest properties

TWebRequest	Alphabetically	Legend

In TWebRequest

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


 VCL Reference

TWebRequest properties

TWebRequest	By object	Legend

Accept

Authorization

CacheControl

Connection

Content

ContentEncoding

ContentFields

ContentLength

ContentParser

ContentType

ContentVersion

Cookie

CookieFields

Date

DerivedFrom

Expires

Files

From

Host

IfModifiedSince

InternalPathInfo

InternalScriptName

Method

MethodType

PathInfo

PathTranslated

ProtocolVersion

Query

QueryFields

Referer

RemoteAddr

RemoteHost

ScriptName

ServerPort

Title

URL

UserAgent


TWebRequest.Accept
 VCL Reference

TWebRequest.Accept

TWebRequest	See also

Reports the value of the Accept header of the HTTP request message.

property Accept: string;

Description

Read Accept to determine the media types the Web client can accept in response to the request. Not every HTTP request message has an Accept header. If the Accept property is not set, then any media type is potentially acceptable in the response.

Accept headers usually indicate that the response should be limited to a small set of desired types. For example, a Web client requesting an audio response might produce a TWebRequest object with Accept set to the following string:

audio/*; q=0.2, audio/basic

This request indicates that the preferred response media type is audio/basic, but that any audio type is acceptable if it is the best available after an 80% mark-down in quality.

For information on the format of Accept headers, see the current Internet standards documentation.


TWebRequest.Authorization
 VCL Reference

TWebRequest.Authorization

TWebRequest	See also	Example

Reports the value of the Authorization header of the HTTP request message.

property Authorization: string;

Description

Read Authorization to check whether the client that sent the request message has provided the correct authentication information. Authorization allows the Web application to provided limited access to the resource specified by the URL property.

For more information about HTTP authentication schemes, see the Internet standards documentation.


TWebRequest.CacheControl
 VCL Reference

TWebRequest.CacheControl

TWebRequest 	See also

Reports the value of the Cache-Control header of the HTTP request message.

property CacheControl: string;

Description

Read CacheControl to determine any Web client directives that must be obeyed by all caching mechanisms along the request/response chain. The CacheControl directives of the HTTP request need not apply to the corresponding HTTP response.

The HTTP 1.1 standard defines the following directives for CacheControl:

Value	Meaning

no-cache	The request may not be cached. The Web server validates the request before the TWebRequest object is created.

no-store	The request contains sensitive information and may not be stored on any permanent medium such as a backup tape. If the request is stored temporarily in a file, the file must be deleted.

max-age=ss	The request is considered invalid if it is older than ss seconds. This directive takes precedence over the Expires property, even if Expires is more restrictive. Invalid requests are validated by the Web server before the TWebRequest object is created.

max-stale or max-stale=ss	The client is willing to accept a response that has exceeded its expiration time. The max-stale directive can optionally specify the number of seconds by which the response can exceed its expiration time.

min-fresh=ss	The client is not willing to accept a response that expires in less than ss seconds.


TWebRequest.Connection
 VCL Reference

TWebRequest.Connection

TWebRequest	See also

Reports the value of the Connection header of the HTTP request message.

property Connection: string;

Description

Read Connection to determine the options requested by the Web client for its connection to the server application. The HTTP 1.1 standard specifies only one value for the Connection header. If the value of Connection is close, the connection should be closed after the completion of the response.


TWebRequest.Content
 VCL Reference

TWebRequest.Content

TWebRequest	See also

Represents the unparsed contents of the HTTP request message.

property Content: string;

Description

Use Content to read the contents of an HTTP request message that is sending information to the server. The value of Content depends on the Method of the HTTP request. When the Method is POST, Content is the unparsed string giving the values to be posted with their associated fields. When the Method is PUT, Content is the value that should replace the URL given by the URL property.

Tip:	When the Method is POST, the parsed version of the post request is available in the ContentFields property.

Note:	If the content of a message is particularly large, it is transferred in chunks. In this case, the Content property does not contain the entire message content. To read the rest of the content, use the ReadClient method.


TWebRequest.ContentEncoding
 VCL Reference

TWebRequest.ContentEncoding

TWebRequest	See also

Reports the value of the Content-Encoding header of the HTTP request message.

property ContentEncoding: string;

Description

Read ContentEncoding to determine what encoding mechanisms, if any, have been applied to the Content of the HTTP request. The encoding mechanisms are listed in the order in which the Web client applied them, separated by commas. Typically, ContentEncoding indicates a compression method or an encoding scheme used to transfer extended ASCII characters over the net.

Reverse the ContentEncoding mechanisms to decode the Content into the form indicated by the ContentType property.


TWebRequest.ContentFields
 VCL Reference

TWebRequest.ContentFields

TWebRequest	See also	Example

Reports the parsed content of a POST request message.

property ContentFields: TStrings;

Description

Use ContentFields to read the fields of an HTTP request message when the MethodType is mtPost. The Content of the HTTP request is parsed, separating into fields at the ampersand character.

Each field appears as a separate string in the ContentFields list with the form Name=Value. As a TStrings object, ContentFields allows applications to manipulate the individual fields by name or value.


TWebRequest.ContentLength
 VCL Reference

TWebRequest.ContentLength

TWebRequest	See also

Reports the value of the Content-Length header of the HTTP request message.

property ContentLength: Integer;

Description

Read the ContentLength property to determine the length of the Content property. ContentLength allows an application to determine the end of the Content property when the ContentType is not text/html. A ContentLength of 0 indicates that the length of the Content property is not determined, either because the request does not include any Content, or because the Web client did not know the length.

Note:	The length of the Content may be less than ContentLength when the Content is passed using chunked transfer coding.


TWebRequest.ContentType
 VCL Reference

TWebRequest.ContentType

TWebRequest	See also

Reports the value of the Content-Type header of the HTTP request message.

property ContentType: string;

Description

Read ContentType to determine the media type of the Content of the HTTP request message. The ContentType is a string of the form Type/SubType.

Most HTTP requests do not require any Content at all. For most requests with a Method that requires a value for Content, the ContentType is text/html. However, HTTP requests for server-specific values of Method can use any media type appropriate to the request.


TWebRequest.ContentParser
 VCL Reference

TWebRequest.ContentParser

TWebRequest

Refers to the object's content parser object.

property ContentParser: TAbstractContentParser;

Description

Read ContentParser to locate the TWebRequest instance's TAbstractContentParser object. The TAbstractContentParser is responsible for parsing the HTTP request.


TWebRequest.ContentVersion
 VCL Reference

TWebRequest.ContentVersion

TWebRequest	See also

Reports the value of the Content-Version header of the HTTP request message.

property ContentVersion: string;

Description

Read ContentVersion to determine the version of the Content of the HTTP request message. Most HTTP requests do not require any Content at all. When the Method requires a value for Content, the ContentVersion may be set to indicate the version of the source of that content. The format of the ContentVersion depends on the ContentType of the request.


TWebRequest.Cookie
 VCL Reference

TWebRequest.Cookie

TWebRequest	See also

Reports the value of the Cookie header of the HTTP request message.

property Cookie: string;

Description

Use Cookie to read the “cookie” strings provided in the Web client request. Cookie strings are used to track state information in a Web application. Cookie is the unparsed value of the Cookie header. The Cookie header can include multiple fields separated by semicolons. Use the CookieFields property to work with the Cookie header on a field-by-field basis.


TWebRequest.CookieFields
 VCL Reference

TWebRequest.CookieFields

TWebRequest	See also	Example

Represents the parsed contents of the Cookie header of an HTTP request message.

property CookieFields: TStrings;

Description

Use CookieFields to work with individual “cookie” strings provided by the Web client request. The Cookie property is parsed into separate fields by separating into substrings whenever a semicolon is encountered.

Cookie strings are used to track state information in a Web application. Each field appears as a separate string in the CookieFields list with the form Name=Value. As a TStrings object, CookieFields allows applications to manipulate the individual fields by name or value.

Note:	Applications can give state variables any name except one of the reserved cookie field names. See the Netscape documentation for a list of reserved cookie field names and their meanings.


TWebRequest.Date
 VCL Reference

TWebRequest.Date

TWebRequest 	See also

Reports the value of the Date header of the HTTP request message.

property Date: TDateTime;

Description

Read Date to determine the date and time at which the HTTP request message originated. Date can be used to determine whether the Content of the request is still valid. The value of Date is translated into local time as specified by the system clock from the time units set by the Web client.

For example, if an HTTP request message specifies a MethodType of mtPost, and Date is older than the most recent values of the fields that are being posted, the server application may return a status code that indicates an error rather than overwriting more recent values.

Date is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24-hour day that has elapsed.


TWebRequest.DerivedFrom
 VCL Reference

TWebRequest.DerivedFrom

TWebRequest	See also

Reports the value of the Derived-From header of the HTTP request message.

property DerivedFrom: string;

Description

Read DerivedFrom to determine the URI from which the value of Content originated. DerivedFrom is only meaningful when the request includes a Content property and the Content did not originate with the Web client.


TWebRequest.Expires
 VCL Reference

TWebRequest.Expires

TWebRequest 	See also

Reports the value of the Expires header of the HTTP request message.

property Expires: TDateTime;

Description

Use Expires to determine whether the request is “stale.” Expires is the date and time at which the request becomes invalid. The value of Expires is translated into local time as specified by the system clock from the time units set by the Web client.

If the request has a CacheControl value with a max-age directive, the max-age directive overrides the value of Expires.

Expires is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24-hour day that has elapsed.


TWebRequest.Files
 VCL Reference

TWebRequest.Files

TWebRequest

Refers to the object's TAbstractRequestFiles object.

property Files: TAbstractWebRequestFiles;

Description

Use this property to find the specific instance of the object's TAbstractRequestFiles object. The TAbstractRequestFiles object contains uploaded files extracted from the HTTP request.


TWebRequest.From
 VCL Reference

TWebRequest.From

TWebRequest	See also

Reports the value of the From header of the HTTP request message.

property From: string;

Description

Read From to determine the Internet e-mail address of the human user for whom the Web client sent the HTTP request message. This value can be used for logging purposes, or to contact the originator of the request if problems occur.


TWebRequest.Host
 VCL Reference

TWebRequest.Host

TWebRequest	See also

Reports the value of the Host header of the HTTP request message.

property Host: string;

Description

Read Host to determine the Internet host and port number of resource being requested. For example, if the client request specifies the following URL:

http://www.TSite.com/art/gallery.dll/mammals?animal=dog&color=black

The value of Host would be

www.TSite.com

The value of Host can be used to differentiate between internally ambiguous URLs, such as the root “/” URL of a server for multiple host names on a single IP address.


TWebRequest.IfModifiedSince
 VCL Reference

TWebRequest.IfModifiedSince

TWebRequest 	See also

Reports the value of the If-Modified-Since header of the HTTP request message.

property IfModifiedSince: TDateTime;

Description

Read IfModifiedSince on a request with a MethodType of mtGet to determine whether the request is conditional. If the information requested by the Web client was not modified since the time indicated by IfModifiedSince, the response should be a not modified error rather than the information indicated by the URL property.

The value of IfModifiedSince is given according to the local clock as specified in the Windows Control Panel, not the clock of the Web client.

IfModifiedSince is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24-hour day that has elapsed.


TWebRequest.InternalPathInfo
 VCL Reference

TWebRequest.InternalPathInfo

TWebRequest	See also

Returns the path info portion of the URL.

property InternalPathInfo: string;

Description

InternalPathInfo contains the path information portion of the URL, which identifies the destination of the message. This property will vary slightly from PathInfo if the application has an embedded test server. In that case, information specific to the test server is contained in the InternalScriptName instead of the InternalPathInfo. To ensure cross platform code compatibility, use InternalPathInfo instead of PathInfo.


TWebRequest.InternalScriptName
 VCL Reference

TWebRequest.InternalScriptName

TWebRequest	See also

Returns the ScriptName part of the URL.

property InternalScriptName: string;

Description

InternalScriptName contains the script name portion of the URL, which specifies the name of a Web server application. This property will vary slightly from ScriptName if the application has an embedded test server. In that case, information specific to the test server is contained in the InternalScriptName instead of the InternalPathInfo. To ensure cross platform code compatibility, use InternalScriptName instead of ScriptName.


TWebRequest.Method
 VCL Reference

TWebRequest.Method

TWebRequest	See also

Reports the value of the Method header of the HTTP request message.

property Method: string;

Description

Read Method to determine the method that is requested by the Web client. The HTTP 1.1 standard defines the following methods

Value	Meaning

OPTIONS	A request for information about available communication options.

GET	A request for the information identified by the URL property.

HEAD	A request for information about the properties of the HTTP response, but not for the content of the response.

POST	A request for the server application to post the data included in the Content property, as appropriate.

PUT	A request for the server application to replace the resource indicated by the URL property with the data included in the Content property.

DELETE	A request for the server application to delete or hide the resource identified by the URL property.

TRACE	A request for the server application to send a loop-back to confirm receipt of the request.

The Method property may indicate any other method that the Web client requests of the server. If the Method can’t be matched to the Allow property of a TWebResponse object, the request can’t be serviced.

Note:	The MethodType property indicates whether the value of Method is GET, HEAD, POST, PUT, or one of the other strings. When possible, use MethodType instead of the Method property to save the overhead of string comparison.

Note:	An HTTP application does not need to service all method types. However, there must be a response for the GET and HEAD method requests.


TWebRequest.MethodType
 VCL Reference

TWebRequest.MethodType

TWebRequest	See also

Indicates the method requested by the Web client.

property MethodType: TMethodType;

Description

Read MethodType to determine the type of response that is requested by the Web client. MethodType encodes of the most common METHOD header values.

If MethodType is mtAny, read the Method property to determine the method requested by the Web client.


TWebRequest.PathInfo
 VCL Reference

TWebRequest.PathInfo

TWebRequest	See also

Reports the value of the path information (if any) of the URL specified in the HTTP request message.

property PathInfo: string;

Description

Read PathInfo to determine the path on the server machine where the target of the request is found. For example, given this URL:

http://www.TSite.com/art/gallery.cgi/mammals?animal=dog&color=black

the PathInfo portion is

/mammals

The TWebDispatcher object uses the PathInfo to identify the appropriate TWebActionItem for servicing the request message.


TWebRequest.PathTranslated
 VCL Reference

TWebRequest.PathTranslated

TWebRequest	See also

Represents a translation of the PathInfo property to a fully qualified path on the Web server.

property PathTranslated: string;

Description

Use PathTranslated to refer to the location of the target of the request in an HTTP response.


TWebRequest.ProtocolVersion
 VCL Reference

TWebRequest.ProtocolVersion

TWebRequest	See also

Reports the version number of the HTTP protocol specified in the initial header of the HTTP request message.

property ProtocolVersion: string;

Description

Use ProtocolVersion to determine the protocol used by the Web client when generating the HTTP request message.

Some properties of the HTTP request may be interpreted differently depending on the ProtocolVersion. For example, if ProtocolVersion is 1.0, then the connection should not be considered persistent, even if the Connection property does not specify the close option.


TWebRequest.Query
 VCL Reference

TWebRequest.Query

TWebRequest	See also

Indicates the value of the query information (if any) of the URL specified in the HTTP request message.

property Query: string;

Description

Read Query to determine the details of a query specified in the URL of the Web client request. For example, given this URL:

http://www.TSite.com/art/gallery.cgi/mammals?animal=dog&color=black

the Query portion is

animal=dog&color=black

Query is the unparsed query portion of the URL. The query may include multiple fields separated by ampersands. Use the QueryFields property to work with the query on a field-by-field basis.


TWebRequest.QueryFields
 VCL Reference

TWebRequest.QueryFields

TWebRequest	See also

Represents the parsed contents of the Query in the URL of the HTTP request message.

property QueryFields: TStrings;

Description

Use QueryFields to work with individual query values provided by the Web client request. The Query property is parsed into separate fields by separating into substrings whenever an ampersand is encountered.

Each query field appears as a separate string in the QueryFields list with the form Name=Value. As a TStrings object, QueryFields allows applications to manipulate the individual fields by name or value.


TWebRequest.Referer
 VCL Reference

TWebRequest.Referer

TWebRequest	See also

Reports the value of the Referer header of the HTTP request message.

property Referer: string;

Description

Read Referer to determine the URI of the resource where the HTTP request message originated. Referer allows the server application to generate back-links to the source of the request. If Referer is a partial URI, it should be interpreted as a relative path to the URL property.

The Referer property is not set when the URL of the HTTP request was obtained from a source that does not have its own URI, such as input from the user keyboard.


TWebRequest.RemoteAddr
 VCL Reference

TWebRequest.RemoteAddr

TWebRequest	See also

Indicates the remote IP address of the client associated with the HTTP request message.

property RemoteAddr: string;

Description

Read RemoteAddr to obtain the IP address of the source of the Web client request.


TWebRequest.RemoteHost
 VCL Reference

TWebRequest.RemoteHost

TWebRequest	See also

Reports the fully qualified reverse domain lookup of the client associated with the HTTP request message.

property RemoteHost: string;

Description

Use RemoteHost to compose URI values for back-links to the source of the request when the Referer property is not specified. RemoteHost does not include any path information.


TWebRequest.ScriptName
 VCL Reference

TWebRequest.ScriptName

TWebRequest	See also

Indicates the value of the script information (if any) of the URL specified in the HTTP request message.

property ScriptName: string;

Description

Read ScriptName to determine the full path to the Web server application specified by the client request. For example, given this URL:

http://www.TSite.com/art/gallery.cgi/mammals?animal=dog&color=black

the ScriptName portion is:

/art/gallery.cgi


TWebRequest.ServerPort
 VCL Reference

TWebRequest.ServerPort

TWebRequest	See also

Indicates the port number of the port on the Web server that receives the HTTP request message.

property ServerPort: Integer;

Description

Read ServerPort to determine the number of the port used in the connection to the Web server. The Host property will include the ServerPort if it is specified as part of the URL for the client request.


TWebRequest.Title
 VCL Reference

TWebRequest.Title

TWebRequest	See also

Reports the value of the Title header of the HTTP request message.

property Title: string;

Description

Read Title to determine the Title of the information requested in the Web client request.


TWebRequest.URL
 VCL Reference

TWebRequest.URL

TWebRequest	See also

Reports the Uniform Resource Identifier (URI) specified by the HTTP request message to identify the target of the request.

property URL: string;

Description

Use the URL property to identify the resource the Web client identifies as the target of the request message. URL may be an HTML page to return, a resource to be created or deleted, or an object that provides some other service for the Web client.

The TWebRequest object parses the URL into its constituent parts, yielding the Host, ScriptName, PathInfo, and Query properties.

Note:	Usually the URL property is a Uniform Resource Locator (URL) that can be parsed into host, script, path, and query portions. However, it is possible for HTTP request messages to specify the target in more general terms, as a Uniform Resource Identifier (URI).


TWebRequest.UserAgent
 VCL Reference

TWebRequest.UserAgent

TWebRequest	See also

Reports the value of the User-Agent header of the HTTP request message.

property UserAgent: string;

Description

Read UserAgent to obtain information about the user agent originating the client request. Use the UserAgent information for statistical purposes, for tracing protocol violations, and for tailoring responses to known limitations of specific applications that generate client requests. The UserAgent string contains one or more descriptors, in order of significance. Each descriptor gives the name of the product or application that generated the request, or a comment about the user agent.


 VCL Reference

TWebRequest methods

TWebRequest	Alphabetically	Legend

In TWebRequest

Create

Destroy

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

GetDateVariable

GetFieldByName

GetIntegerVariable

GetStringVariable

ReadClient

ReadString

TranslateURI

UpdateMethodType

WriteClient

WriteHeaders

WriteString

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebRequest methods

TWebRequest	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

ExtractContentFields

ExtractCookieFields

ExtractFields

ExtractQueryFields

FieldAddress

Free

FreeInstance

GetDateVariable

GetFieldByName

GetIntegerVariable

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetStringVariable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadClient

ReadString

SafeCallException

TranslateURI

UpdateMethodType

WriteClient

WriteHeaders

WriteString


TWebRequest.Create
 VCL Reference

TWebRequest.Create

TWebRequest	See also

Creates an instance of TWebRequest.

constructor Create;

Description

Applications shouldn’t need to call Create to instantiate a request object. The TWebApplication object creates a TWebRequest object whenever it receives a client request.


TWebRequest.Destroy
 VCL Reference

TWebRequest.Destroy

TWebRequest	See also

Destroys an instance of TWebRequest.

destructor Destroy; override;

Description

Do not call Destroy. When the request message is fully handled, TWebApplication destroys the request object by calling its Free method.

Destroy frees the TStrings objects used to represent the ContentFields, CookieFields, and QueryFields properties.


TWebRequest.ExtractContentFields
 VCL Reference

TWebRequest.ExtractContentFields

TWebRequest	See also

Parses the Content property into its constituent fields.

procedure ExtractContentFields(Strings: TStrings);

Description

Call ExtractContentFields to fill the Strings parameter with the individual fields in the Content property. ExtractContentFields assumes that fields are separated by ampersands (&). This is the format used when the MethodType is mtPost. If the Content property is not assigned, ExtractContentFields does nothing.


TWebRequest.ExtractCookieFields
 VCL Reference

TWebRequest.ExtractCookieFields

TWebRequest	See also

Parses the Cookie property into its constituent fields.

procedure ExtractCookieFields(Strings: TStrings);

Description

Call ExtractCookieFields to fill the Strings parameter with the individual fields in the Cookie property. ExtractCookieFields assumes that fields are separated by semicolons. If the Cookie property is not assigned, ExtractCookieFields does nothing.


TWebRequest.ExtractFields
 VCL Reference

TWebRequest.ExtractFields

TWebRequest	See also

Parses a multi-valued string into its constituent fields.

procedure ExtractFields(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings);

Description

Call ExtractFields to parse a multi-valued HTTP header into separate strings for each value. For example, if the separator character of the UserAgent property is known, ExtractFields can parse this property into separate UserAgent values.

Separators is a set of characters that are used to separate individual values within the multi-valued string. WhiteSpace is a set of characters that are to be ignored when parsing the string. Content is the multi-valued string to be parsed. Strings is the TStrings object that receives the individual values that are parsed from Content.


TWebRequest.ExtractQueryFields
 VCL Reference

TWebRequest.ExtractQueryFields

TWebRequest	See also

Parses the Query property into its constituent fields.

procedure ExtractQueryFields(Strings: TStrings);

Description

Call ExtractQueryFields to fill the Strings parameter with the individual fields in the Query property. ExtractQueryFields assumes that fields are separated by ampersands (&). If the Query property is not assigned, ExtractQueryFields does nothing.


TWebRequest.GetDateVariable
 VCL Reference

TWebRequest.GetDateVariable

TWebRequest	See also

Provides the abstract prototype of a method to extract a date value from an indexed table of HTTP header variables.

function GetDateVariable(Index: Integer): TDateTime; virtual; abstract;

Description

Descendants of TWebRequest implement GetDateVariable to provide a method by which the date-time values are read from the header strings of the HTTP request message. The request object uses GetDateVariable to access the properties that represent dates from the HTTP request headers.


TWebRequest.GetFieldByName
 VCL Reference

TWebRequest.GetFieldByName

TWebRequest	See also

Provides the abstract prototype of a method that returns the value of the HTTP header variable specified by the Name parameter.

function GetFieldByName(const Name: string): string; virtual; abstract;

Description

Descendants of TWebRequest implement GetFieldByName to provide access to arbitrary header fields in the HTTP request message. Use GetFieldByName to read the value of an HTTP header variable that is not surfaced as one of the properties of TWebRequest. For information on possible HTTP request header variables, see the current Internet standards documents.


TWebRequest.GetIntegerVariable
 VCL Reference

TWebRequest.GetIntegerVariable

TWebRequest	See also

Provides the abstract prototype of a method to extract an integer value from an indexed table of HTTP header variables.

function GetIntegerVariable(Index: Integer): Integer; virtual; abstract;

Description

Descendants of TWebRequest implement GetIntegerVariable to provide a method by which the integer values are read from the header strings of the HTTP request message. The request object uses GetIntegerVariable to access the properties that represent integers from the HTTP request headers.


TWebRequest.GetStringVariable
 VCL Reference

TWebRequest.GetStringVariable

TWebRequest	See also

Provides the abstract prototype of a method to extract a string value from an indexed table of HTTP header variables.

function GetStringVariable(Index: Integer): string; virtual; abstract;

Description

Descendants of TWebRequest implement GetStringVariable to provide a method by which the string values are read from the header strings of the HTTP request message. The request object uses GetStringVariable to access the properties that represent strings from the HTTP request headers.


TWebRequest.ReadClient
 VCL Reference

TWebRequest.ReadClient

TWebRequest	See also

Provides the abstract prototype of a method to read from the HTTP request into a buffer.

function ReadClient(var Buffer; Count: Integer): Integer; virtual; abstract;

Description

Descendants of TWebRequest implement ReadClient. ReadClient is used to read content information from the HTTP request. Use ReadClient to get the next chunk of information when the content of the request message is too large for the Content property.

Use Buffer to provide a buffer to contain the content information. Use Count to specify the number of bytes to read. ReadClient returns the number of bytes actually read.


TWebRequest.ReadString
 VCL Reference

TWebRequest.ReadString

TWebRequest	See also

Provides the abstract prototype of a method to read Count bytes from the HTTP request into a string.

function ReadString(Count: Integer): string; virtual; abstract;

Description

Descendants of TWebRequest implement ReadString. ReadString is used to load content information from the HTTP request into a string. Use ReadString to get the next chunk of information when the content of the request message is too large for the Content property.


TWebRequest.TranslateURI
 VCL Reference

TWebRequest.TranslateURI

TWebRequest	See also

Provides the abstract prototype for a method to translate a Uniform Resource Identifier (URI) into an internal representation of a location on the server.

function TranslateURI(const URI: string): string; virtual; abstract;

Description

Descendants of TWebRequest implement TranslateURI. TranslateURI is used to translate the URI specified in a client request into a format that can be used by the server application. The internal format varies, depending on whether the server application is an ISAPI or NSAPI application. TranslateURI is not relevant to CGI applications.


TWebRequest.UpdateMethodType
 VCL Reference

TWebRequest.UpdateMethodType

TWebRequest	See also

Provides the abstract prototype for a method to writea pure virtual method for updating the client method type.

procedure UpdateMethodType;

Description

Use UpdateMethodType to update the type of response that is requested by the Web client.


TWebRequest.WriteClient
 VCL Reference

TWebRequest.WriteClient

TWebRequest	See also

Provides the abstract prototype for a method to write Count bytes from Buffer back to the HTTP client.

function WriteClient(var Buffer; Count: Integer): Integer; virtual; abstract;

Description

Descendants of TWebRequest implement WriteClient. WriteClient is used by TWebResponse to send the contents of a response to the Web client.


TWebRequest.WriteHeaders
 VCL Reference

TWebRequest.WriteHeaders

TWebRequest	See also

Provides the abstract prototype for a method to write an HTTP header string.

function WriteHeaders(StatusCode: Integer; const ReasonString, Headers: string): Boolean; virtual; abstract;

Description

Use WriteHeaders to write an HTTP header string.


TWebRequest.WriteString
 VCL Reference

TWebRequest.WriteString

TWebRequest	See also

Provides the abstract prototype for a method to write the string AString back to the HTTP client.

function WriteString(const AString: string): Boolean; virtual; abstract;

Description

Descendants of TWebRequest implement WriteString. WriteString is used by TWebResponse to send the contents of a response to the Web client.


Hierarchy

TObject

TWebRequest


TWebResponse
 VCL Reference

TWebResponse

Hierarchy	Properties	Methods	Using TWebResponse	See also

TWebResponse is the base class for all objects that represent HTTP messages sent in response to an HTTP request message.

Unit

HTTPApp

Description

Use a descendant of TWebResponse to specify the response to an HTTP request message.

A web application creates a TWebResponse object based on the TWebRequest object for an incoming HTTP request message. The Web dispatcher for the application then passes the TWebResponse object to the TWebActionItem associated with the TWebRequest object, so that the response can be formulated.

TWebResponse has three descendants, which represent HTTP response messages in different types of web server applications. These descendants are

TCGIResponse objects in CGI server applications.

TISAPIResponse objects in server DLLs.

TWinCGIResponse objects in Windows-based CGI servers.


 VCL Reference

TWebResponse properties

TWebResponse	Alphabetically	Legend

In TWebResponse

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


 VCL Reference

TWebResponse properties

TWebResponse	By object	Legend

Allow

Content

ContentEncoding

ContentLength

ContentStream

ContentType

ContentVersion

Cookies

CustomHeaders

Date

DerivedFrom

Expires

HTTPRequest

LastModified

Location

LogMessage

Realm

ReasonString

Server

StatusCode

Title

Version

WWWAuthenticate


TWebResponse.Allow
 VCL Reference

TWebResponse.Allow

TWebResponse	See also

Lists the HTTP request methods that the application can service.

property Allow: string;

Description

Use Allow to indicate what type of request methods the server application can respond to for the URI specified by HTTPRequest. Allow is a string of method names, separated by commas. The method names can include any pre-defined methods from the HTTP standard, or any additional methods implemented by the server application. At a minimum, the TWebResponse object must allow GET and HEAD requests.


TWebResponse.Content
 VCL Reference

TWebResponse.Content

TWebResponse	See also 	Example

Contains the information sent to the web client in response to an HTTP request message.

property Content: string;

Description

Use Content to send requested information to the web client. Not every HTTP request message requires content to be returned. For example, responses to requests with a Method of OPTIONS, HEAD, POST, PUT, DELETE, or TRACE should not include any Content. In all these cases, the response information is contained entirely in the response header, which is built from the other properties of the TWebResponse object.

The response content can be a string of HTML commands, the name of an HTML file, graphic content such as a bit-stream, or any other MIME content type.

Note:	If the ContentStream property is set, it supersedes the value of the Content property. If both Content and ContentStream are set, the web client is sent the value of the ContentStream, not the value of the Content property.


TWebResponse.ContentEncoding
 VCL Reference

TWebResponse.ContentEncoding

TWebResponse	See also

Lists the mechanisms, if any, that are used to encode the content of the HTTP response message.

property ContentEncoding: string;

Description

Set ContentEncoding when the value of Content has been encoded before it is sent to the web client. The encoding mechanisms are listed in the order in which they are applied, separated by commas. Typically, ContentEncoding indicates a compression method or an encoding method used to transfer extended-ascii characters over the net.


TWebResponse.ContentLength
 VCL Reference

TWebResponse.ContentLength

TWebResponse	See also

Specifies the length, in bytes, of the Content property.

property ContentLength: Integer;

Description

Set ContentLength to the length of the Content property, if it is known. If the length of the Content property is unknown, or if the response message does not include any content, set ContentLength to 0. Web clients use the ContentLength when reading the contents of the HTTP response message.

If the contents of the response message are taken from a stream, the value of ContentLength is set from the stream.


TWebResponse.ContentStream
 VCL Reference

TWebResponse.ContentStream

TWebResponse	See also	Example

Specifies the stream object for writing the contents of the HTTP response message to the web client.

property ContentStream: TStream;

Description

Use ContentStream to set the contents of the HTTP response message to a value that can be written from a stream. ContentStream allows the response object to write its contents directly from a stream.

The stream specified by ContentStream can access a string of HTML commands, the contents of a BLOB database field, or any MIME content type.

Note:	ContentStream supersedes the Content property. If both Content and ContentStream are set, the web client is sent the value of the ContentStream, not the value of the Content property.


TWebResponse.ContentType
 VCL Reference

TWebResponse.ContentType

TWebResponse	See also	Example

Indicates the media type of the Content of the HTTP response message.

property ContentType: string;

Description

Set ContentType to indicate the media type of the Content of the HTTP response message. The value of ContentType must specify a valid MIME content type. The ContentType string has the form Type/SubType.

For example, if the HTTP response message sends a string of HTML commands to the web client in response to a GET request, the ContentType is text/html.

Note:	If the HTTP request message includes an Accept header, ContentType should be one of the content types listed in the TWebRequest.Accept property.


TWebResponse.ContentVersion
 VCL Reference

TWebResponse.ContentVersion

TWebResponse	See also

Represents the version associated with the Content of the HTTP response message.

property ContentVersion: string;

Description

Use ContentVersion to specify a version associated with the Content of the HTTP response. The meaning of ContentVersion depends on the type of information that is sent in the HTTP response. For example, if the Content of the HTTP response has a ContentType of text/html, ContentVersion would be the version of HTML used.

Server applications that introduce meanings for the ContentVersion property should document the interpretation they assign to ContentVersion.


TWebResponse.Cookies
 VCL Reference

TWebResponse.Cookies

TWebResponse	See also 	Example

Lists all cookie headers that should be sent with the response.

property Cookies: TCookieCollection;

Description

Use Cookies to obtain direct access to the individual TCookie objects that represent the fields of the cookie headers in the response message. Each TCookie object represents in individual cookie header that is included with the response message.

Use the Add method of the cookie collection to add a single cookie to the collection, or use the SetCookieField method to add multiple related cookie headers to this collection. SetCookieField creates and adds new cookies that share a common set of values for the domain, path, expires, and secure fields. Use the HeaderValue property of the individual entries in Cookies to determine the actual response header string that is sent for each cookie header.

Note:	For more information about the use of cookies, see the documentation on Netscape’s Web site.


TWebResponse.CustomHeaders
 VCL Reference

TWebResponse.CustomHeaders

TWebResponse	See also

Lists message header strings that are added to the response message before it is sent.

property CustomHeaders: TStrings;

Description

Use CustomHeaders to add header information to the response that can not be specified using the other properties of TWebResponse. Each string in the CustomHeaders property has the form HeaderName=Value, where HeaderName specifies the name of the header, and Value is the value for that header, formatted as a string.

Note:	Setting the CustomHeaders property assigns a set of strings to the custom headers list. It does not replace the TStrings object that is the value of CustomHeaders.

Warning:	CustomHeaders includes at most one value for each HeaderName. If the HTTP message includes multiple headers with the same name, only the first header’s value will appear in CustomHeaders.


TWebResponse.Date
 VCL Reference

TWebResponse.Date

TWebResponse 	See also

Indicates the time and date when the HTTP response message is sent to the web client.

property Date: TDateTime;

Description

Set Date to the current date and time immediately before sending the HTTP response message to the web client. The Web client uses Date to determine the age of the information returned.

Date is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24-hour day that has elapsed.


TWebResponse.DerivedFrom
 VCL Reference

TWebResponse.DerivedFrom

TWebResponse	See also

Specifies the URI of the resource where the Content of the HTTP response originated.

property DerivedFrom: string;

Description

Set DerivedFrom to the URI where the value of Content originates. It is especially important to set DerivedFrom when the Content of the HTTP response did not originate from the resource indicated by the URL property of the request object.


TWebResponse.Expires
 VCL Reference

TWebResponse.Expires

TWebResponse 	See also

Specifies the date and time after which the Content of the HTTP response message should be considered invalid.

property Expires: TDateTime;

Description

Set Expires when the Content of the HTTP response message contains information that may become invalid with the passage of time. Setting an Expires value does not imply that the information or its source will necessarily change or cease to exist when the Expires date and time is reached. Web clients are simply warned to check the freshness of the information after the Expires date and time.

The value of Expires is specified in Greenwich Mean Time.

Expires is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24 hour day that has elapsed.


TWebResponse.HTTPRequest
 VCL Reference

TWebResponse.HTTPRequest

TWebResponse	See also

Represents the HTTP request message for which this is a response.

property HTTPRequest: TWebRequest;

Description

Read HTTPRequest to determine the header and contents of the HTTP request message that spawned this response message. The properties of HTTPRequest give access to the information sent in the web client request message.


TWebResponse.LastModified
 VCL Reference

TWebResponse.LastModified

TWebResponse 	See also

Indicates the date and time that the value of the Content property was last updated.

property LastModified: TDateTime;

Description

Set LastModified to indicate the last time the Content of the response was modified. This allows web clients to determine whether their local version of that information is up-to-date. When the HTTP request is a HEAD message, this may allow the web client and server to skip a potentially expensive transfer of information.

The value of LastModified is specified in the local time of the machine. The HTTP response message translates this value to the date encoding used by HTTP.

LastModified is represented using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since Dec. 30 1899. The fractional part of a TDateTime value is the fraction of a 24 hour day that has elapsed.


TWebResponse.Location
 VCL Reference

 TWebResponse.Location

TWebResponse	See also

Specifies the URI of a resource the web client should point to for the completion of its request.

property Location: string;

Description

Set Location when the TWebResponse created a new resource in response to the HTTP request message, or when servicing of the request must be delegated to another URI than the one specified in the HTTP request message.


TWebResponse.LogMessage
 VCL Reference

TWebResponse.LogMessage

TWebResponse	See also

Describes the HTTP response message for event logging purposes.

property LogMessage: string;

Description

Set LogMessage to a description of the action carried out by the TWebActionItem object that services this HTTP response. Usually, LogMessage includes the URI that handled the request message, along with date and time information.


TWebResponse.Realm
 VCL Reference

TWebResponse.Realm

TWebResponse	See also

Specifies the set of protected-access URIs that includes the URL specified by the HTTP request message.

property Realm: string;

Description

Set Realm when the response message returns 401 (Unauthorized) or 402 (Payment required). Realm is the name of a set of URIs that require a password or payment before the web client can access them. All the URIs in the realm, including the URL specified in the request message, are made available as soon as the web client provides the password or payment for the realm. The server application should keep track, internally, of the passwords or payments the client has provided, using the client information provided by the TWebRequest object.


TWebResponse.ReasonString
 VCL Reference

TWebResponse.ReasonString

TWebResponse	See also

Indicates the status of the response to the web client request as a human-readable string.

property ReasonString: string;

Description

Set ReasonString to inform the human web client of the success or failure of the HTTP request message. Each reason string is associated with a 3-digit status code whose value indicates the status of the response. The HTTP standard defines a number of stock status codes and corresponding reason strings. In addition, server applications can define new reason strings and associate them with unused status codes.


TWebResponse.Server
 VCL Reference

TWebResponse.Server

TWebResponse	See also

Provides information about the software used by the server application to handle the request.

property Server: string;

Description

Set Server to a string giving the name and version number of the application that provides the Content of the response message. The value of Server can contain multiple product identifiers and comments, listed in order of significance and separated by spaces. Product identifiers take the form ProductName/VersionNumber.


TWebResponse.StatusCode
 VCL Reference

TWebResponse.StatusCode

TWebResponse	See also

Indicates the status of the response to the HTTP request message as a 3-digit integer.

property StatusCode: Integer;

Description

Set StatusCode to inform the web client the status of the HTTP request message. Status codes are standard return values that can be interpreted by all web clients. Each status code has a corresponding reason string that provides a human web client with a more understandable indication of the status.

The following tables lists the standard status codes and their corresponding reason strings.

StatusCode	ReasonString

100	Continue

101	Switching Protocols

200	OK

201	Created

202	Accepted

203	Non-Authoritative Information

204	No Content

205	Reset Content

206	Partial Content

300	Multiple Choices

301	Moved Permanently

302	Moved Temporarily

303	See Other

304	Not Modified

305	Use Proxy

400	Bad Request

401	Unauthorized

402	Payment Required

403	Forbidden

404	Not Found

405	Method Not Allowed

406	Not Acceptable

407	Proxy Authentication Required

408	Request Time-out

409	Conflict

410	Gone

411	Length Required

412	Precondition Failed

413	Request Entity Too Large

414	Request-URI Too Large

415	Unsupported Media Type

500	Internal Server Error

501	Not Implemented

502	Bad Gateway

503	Service Unavailable

504	Gateway Time-out

505	HTTP Version not supported

Status codes not in the table can be created by the server application. When creating a new status code, the most significant digit should indicate the class of response, as follows:

1xx: Informational (request received, continuing process)

2xx: Success (request received, understood, and accepted)

3xx: Redirection (Further action needed to complete the request)

4xx: Client Error (request contains bad syntax or cannot be serviced)

5xx: Server Error (server failed to handle a valid request)


TWebResponse.Title
 VCL Reference

TWebResponse.Title

TWebResponse	See also

Specifies a title for the Content of the HTTP response message.

property Title: string;

Description

Set the Title property to add a Title header to the HTTP response message. Title is an optional application-specific title associated with the information included in the message.


TWebResponse.Version
 VCL Reference

TWebResponse.Version

TWebResponse	See also

Specifies the HTTP protocol version number that the web client is using.

property Version: string;

Description

Read Version to ensure that the properties set in the TWebResponse object will be understood by the web client. The value of Version is taken from the ProtocolVersion property of the TWebRequest object.

For more information on the different HTTP protocol versions, see the Internet standards documentation.


TWebResponse.WWWAuthenticate
 VCL Reference

TWebResponse.WWWAuthenticate

TWebResponse	See also

Lists of one or more comma-separated challenges provided when the request fails with StatusCode 401 (Unauthorized).

property WWWAuthenticate: string;

Description

Set WWWAuthenticate when the HTTP request fails because it requires access to a URI in a realm for which the web client has not provided a password. WWWAuthenticate consists of an authentication scheme name, followed by a comma-separated list of parameter/value pairs that specify the parameters to the authentication scheme. The first parameter/value pair indicates the realm.

For more information about HTTP authentication schemes, see the Internet standards documents.


 VCL Reference

TWebResponse methods

TWebResponse	Alphabetically	Legend

In TWebResponse

AddCustomHeaders

Create

Destroy

GetContent

GetCustomHeader

GetDateVariable

GetIntegerVariable

GetLogMessage

GetStatusCode

GetStringVariable

SendRedirect

SendResponse

SendStream

Sent

SetContent

SetContentStream

SetCookieField

SetCustomHeader

SetDateVariable

SetIntegerVariable

SetLogMessage

SetStatusCode

SetStringVariable

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWebResponse methods

TWebResponse	By object	Legend

AddCustomHeaders

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetContent

GetCustomHeader

GetDateVariable

GetIntegerVariable

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLogMessage

GetStatusCode

GetStringVariable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SendRedirect

SendResponse

SendStream

Sent

SetContent

SetContentStream

SetCookieField

SetCustomHeader

SetDateVariable

SetIntegerVariable

SetLogMessage

SetStatusCode

SetStringVariable


TWebResponse.AddCustomHeaders
 VCL Reference

TWebResponse.AddCustomHeaders

TWebResponse	See also

Appends the custom headers specified by the CustomHeaders property to the Headers parameter.

procedure AddCustomHeaders(var Headers: string);

Description

Call AddCustomHeaders to add the message headers described by the CustomHeaders property to a string of message headers. Each header is added on its own line (separated by carriage return and line feed), in the format HeaderName: Value.


TWebResponse.Create
 VCL Reference

TWebResponse.Create

TWebResponse	See also

Creates an instance of TWebResponse to represent the response to the HTTPRequest parameter.

constructor Create(HTTPRequest: TWebRequest);

Description

Applications shouldn’t need to call Create to instantiate a response object. The TWebApplication object creates a TWebResponse for each TWebRequest it creates.


TWebResponse.Destroy
 VCL Reference

TWebResponse.Destroy

TWebResponse	See also

Destroys an instance of TWebResponse.

destructor Destroy; override;

Description

Do not call Destroy. The TWebApplication object that creates the TWebResponse object destroys it by calling its Free method.

Destroy frees the ContentStream object if one was used to write the contents of the HTTP response message.


TWebResponse.GetContent
 VCL Reference

TWebResponse.GetContent

TWebResponse	See also

Provides the abstract prototype of a method to access the Content property.

function GetContent: string; virtual; abstract;

Description

Descendants of TWebResponse implement GetContent to provide an access method for their internal representation of the Content property. This method is abstract because response objects for different types of HTTP applications store the value of the Content property differently.


TWebResponse.GetCustomHeader
 VCL Reference

TWebResponse.GetCustomHeader

TWebResponse	See also

Returns the value of the custom header with the specified name.

function GetCustomHeader(const Name: string): String;

Description

Call GetCustomHeader to obtain the value of one of the custom headers specified in the CustomHeaders property. The Name parameter specifies the name of the HTTP message header.


TWebResponse.GetDateVariable
 VCL Reference

TWebResponse.GetDateVariable

TWebResponse	See also

Provides the abstract prototype of a method to extract a date value from an indexed table of HTTP header variables.

function GetDateVariable(Index: Integer): TDateTime; virtual; abstract;

Description

Descendants of TWebResponse implement GetDateVariable to provide a method by which date-time values are read from the internal table used to store HTTP header variables. The response object uses GetDateVariable to access the properties that represent dates.


TWebResponse.GetIntegerVariable
 VCL Reference

TWebResponse.GetIntegerVariable

TWebResponse	See also

Provides the abstract prototype of a method to extract an integer value from an indexed table of HTTP header variables.

function GetIntegerVariable(Index: Integer): Integer; virtual; abstract;

Description

Descendants of TWebResponse implement GetIntegerVariable to provide a method by which integer values are read from the internal table used to store HTTP header variables. The response object uses GetIntegerVariable to access the properties that represent integers.


TWebResponse.GetLogMessage
 VCL Reference

TWebResponse.GetLogMessage

TWebResponse	See also

Provides the abstract prototype of a method to access the LogMessage property.

function GetLogMessage: string; virtual; abstract;

Description

Descendants of TWebResponse implement GetLogMessage to provide an access method for internal representation of the LogMessage property. This method is abstract because response objects for different types of HTTP applications store the value of the LogMessage property differently.


TWebResponse.GetStatusCode
 VCL Reference

TWebResponse.GetStatusCode

TWebResponse	See also

Provides the abstract prototype of a method to access the StatusCode property.

function GetStatusCode: Integer; virtual; abstract;

Description

Descendants of TWebResponse implement GetStatusCode to provide an access method for internal representation of the StatusCode property. This method is abstract because response objects for different types of HTTP applications store the value of the StatusCode property differently.


TWebResponse.GetStringVariable
 VCL Reference

TWebResponse.GetStringVariable

TWebResponse	See also

Provides the abstract prototype of a method to extract a string value from an indexed table of HTTP header variables.

function GetStringVariable(Index: Integer): string; virtual; abstract;

Description

Descendants of TWebResponse implement GetStringVariable to provide a method by which the string values are read from the internal table used to store HTTP header variables. The response object uses GetStringVariable to access the properties that represent strings.


TWebResponse.SendRedirect
 VCL Reference

TWebResponse.SendRedirect

TWebResponse	See also

Provides the abstract prototype of a method that sends the response with a StatusCode of 301 (Moved Permanently) and a Location of URI.

procedure SendRedirect(const URI: string); virtual; abstract;

Description

Call SendRedirect to redirect the web client request to another URI that is the proper target of the request. SendRedirect does the same thing as setting the StatusCode to 301, the Location to URI, and calling SendResponse.


TWebResponse.SendResponse
 VCL Reference

TWebResponse.SendResponse

TWebResponse	See also	Example

Provides the abstract prototype of a method that sends the HTTP response message to the web client.

procedure SendResponse; virtual; abstract;

Description

Call SendResponse after setting the properties of the HTTP response object to specify the response that should be made to the web client. If the request should be redirected to another URI, it is more efficient to call SendRedirect instead.


TWebResponse.SendStream
 VCL Reference

TWebResponse.SendStream

TWebResponse	See also

Provides the abstract prototype of a method that sends the HTTP response message with the contents set to the contents of AStream.

procedure SendStream(AStream: TStream); virtual; abstract;

Description

Only call SendStream after first calling SendResponse. Unlike SendStream, SendResponse fills the header of the HTTP response message, based on the properties of the TWebResponse object. If SendResponse has not been called first to set the header of the HTTP response message, set the ContentStream property to AStream, and call SendResponse.


TWebResponse.Sent
 VCL Reference

TWebResponse.Sent

TWebResponse	See also

Indicates whether the HTTP response message has already been sent.

function Sent: Boolean; virtual;

Description

Because SendRedirect and SendStream are abstract methods for TWebResponse, TWebResponse.Sent always returns False. Descendants of TWebResponse override Sent to check whether the message was sent and return True or False as appropriate.

TWebApplication objects read Sent and send unsent responses to the web client.


TWebResponse.SetContent
 VCL Reference

TWebResponse.SetContent

TWebResponse	See also

Provides the abstract prototype of a method to set the Content property.

procedure SetContent(const Value: string); virtual; abstract;

Description

Descendants of TWebResponse implement SetContent to provide a method for setting the Content property. This method is abstract because response objects for different types of HTTP applications can store the value of the Content property differently.


TWebResponse.SetContentStream
 VCL Reference

TWebResponse.SetContentStream

TWebResponse	See also

Sets the value of the ContentStream property to the Value parameter.

procedure SetContentStream(Value: TStream); virtual;

Description

SetContentStream frees the previous value of ContentStream and replaces the property with the Value parameter.


TWebResponse.SetCookieField
 VCL Reference

TWebResponse.SetCookieField

TWebResponse	See also

Adds a cookie header to the response message.

procedure SetCookieField(Values: TStrings; const ADomain, APath: string; AExpires: TDateTime; ASecure: Boolean);

Description

Call SetCookieField to add a cookie header to the Cookies property. Each cookie header contains a set of name/value pairs that can be passed on by the client application. Use the Values parameter to specify the name/value pairs as strings of the form Name=Value. Use the ADomain and APath parameters to indicate which URLs the cookie should be sent to. Use the AExpires parameter to indicate when the cookie is no longer valid. Use the ASecure property to indicate whether the cookie should only be passed on by the client if a secure connection is used.

See the documentation on the Netscape Web site for more information about cookies.


TWebResponse.SetCustomHeader
 VCL Reference

TWebResponse.SetCustomHeader

TWebResponse	See also

Replaces the value of a specified custom header.

procedure SetCustomHeader(const Name, Value: string);

Description

Call SetCustomHeader to add a new custom header to the list maintained by the CustomHeaders property, or to change the value of one of the headers already in the list. SetCustomHeader locates the header in the list with the name specified by the Name parameter. If a header with that name is in the list, SetCustomHeader replaces the value of that header with the value specified as the Value parameter. If the name was not found, SetCustomHeader adds a new header to the list with the given name and value.


TWebResponse.SetDateVariable
 VCL Reference

TWebResponse.SetDateVariable

TWebResponse	See also

Provides the abstract prototype of a method to set a date-time valued HTTP header property.

procedure SetDateVariable(Index: Integer; const Value: TDateTime); virtual; abstract;

Description

Descendants of TWebResponse implement SetDateVariable to provide a method by which date-time values are written to the internal table used to store HTTP header variables. The response object uses SetDateVariable to set the properties that represent dates.


TWebResponse.SetIntegerVariable
 VCL Reference

TWebResponse.SetIntegerVariable

TWebResponse	See also

Provides the abstract prototype of a method to set an integer valued HTTP header property.

procedure SetIntegerVariable(Index: Integer; Value: Integer); virtual; abstract;

Description

Descendants of TWebResponse implement SetIntegerVariable to provide a method by which integer values are written to the internal table used to store HTTP header variables. The response object uses SetIntegerVariable to set the properties that represent integers.


TWebResponse.SetLogMessage
 VCL Reference

TWebResponse.SetLogMessage

TWebResponse	See also

Provides the abstract prototype of a method to set the value of the LogMessage property.

procedure SetLogMessage(const Value: string); virtual; abstract;

Description

Descendants of TWebResponse implement SetLogMessage to provide a method to set the internal representation of the LogMessage property. This method is abstract because response objects for different types of HTTP applications store the value of the LogMessage property differently.


TWebResponse.SetStatusCode
 VCL Reference

TWebResponse.SetStatusCode

TWebResponse	See also

Provides the abstract prototype of a method to set the value of the StatusCode property.

procedure SetStatusCode(Value: Integer); virtual; abstract;

Description

Descendants of TWebResponse implement SetStatusCode to provide a method to set the internal representation of the StatusCode property. This method is abstract because response objects for different types of HTTP applications store the value of the StatusCode property differently.


TWebResponse.SetStringVariable
 VCL Reference

TWebResponse.SetStringVariable

TWebResponse	See also

Provides the abstract prototype of a method to set a string valued HTTP header property.

procedure SetStringVariable(Index: Integer; const Value: string); virtual; abstract;

Description

Descendants of TWebResponse implement SetStringVariable to provide a method by which string values are written to the internal table used to store HTTP header variables. The response object uses SetStringVariable to set the properties that represent strings.


Hierarchy

TObject

TWebResponse


TReflectorWindow
 VCL Reference

TReflectorWindow

Hierarchy	Properties	Methods

TReflectorWindow ensures that ActiveX controls respond properly to Windows messages.

Unit

AxCtrls

Description

TReflectorWindow is for internal use only. Applications should never instantiate this class. It is used to reflect certain messages to an ActiveX control.


 VCL Reference

TReflectorWindow properties

TReflectorWindow	Alphabetically	Legend

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TReflectorWindow properties

TReflectorWindow	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TReflectorWindow methods

TReflectorWindow	Alphabetically	Legend

In TReflectorWindow

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TReflectorWindow methods

TReflectorWindow	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TReflectorWindow.Create
 VCL Reference

TReflectorWindow.Create

TReflectorWindow	See also

Creates an instance of TReflectorWindow.

constructor Create(ParentWindow: HWND; Control: TControl); reintroduce;

Description

Applications never have to instantiate TReflectorWindow.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TReflectorWindow


TRichEditAction
 VCL Reference

TRichEditAction

Hierarchy	Properties	Methods	Events	Using TRichEditAction	See also

TRichEditAction is the base class for action objects that apply rich text attributes to a rich edit control.

Unit

ExtActns

Description

TRichEditAction implements the common behavior for actions that assign text attributes to a rich edit control. Each descendant class represents a specific text attribute.  Do not use TRichEditAction directly in an application. Instead, use a TRichEditAction descendant such as TRichEditBold, TRichEditItalic, TRichEditUnderline, TRichEditStrikeout, TRichEditAlignCenter, TRichEditAlignLeft, TRichEditAlignRight, or TRichEditBullets.

TRichEditAction ensures that the action is only works with a TCustomRichEdit descendant as a target. TRichEditAction descendants toggle their specific text attribute in the target rich edit control: if the attribute is set, it is removed, and if it is not set (or set for only some of the text), the action sets it. If the target rich edit control has a selection, the attribute is toggled for the selected text only. If there is no selection, the attribute is toggled for all of the text.


 VCL Reference

TRichEditAction properties

TRichEditAction	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEditAction properties

TRichEditAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TRichEditAction events

TRichEditAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TRichEditAction events

TRichEditAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TRichEditAction methods

TRichEditAction	Alphabetically	Legend

In TRichEditAction

Create

HandlesTarget

Derived from TEditAction

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEditAction methods

TRichEditAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TRichEditAction.Create
 VCL Reference

TRichEditAction.Create

TRichEditAction	See also

Creates an instance of TRichEditAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TRichEditAction constructor because actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TRichEditAction instance.


TRichEditAction.HandlesTarget
 VCL Reference

TRichEditAction.HandlesTarget

TRichEditAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget returns True if Target is a TCustomRichEdit descendant, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TRichEditAction


EnumDispatchProperties procedure
 VCL Reference

EnumDispatchProperties procedure

See also

Fills a TStringList will all the property names and DispIDs in a specified IDispatch interface.

Unit

AxCtrls

Category

COM utilities

procedure EnumDispatchProperties(Dispatch: IDispatch; PropType: TGUID; VTCode: Integer; PropList: TStrings);

Description

Use EnumDispatchProperties to get the names of the properties supported by an IDispatch interface. The Dispatch parameter is an instance of the IDispatch interface. The PropType and VTCode parameters allow the caller to limit the list to only those properties that match a particular GUID and type identifier. To see all properties of the IDispatch interface, set PropType to GUID_NULL and VTCode to VT_EMPTY.

The property names that the IDispatch interface supports are added to the list passed in as the PropList parameter.


GetOleFont procedure
 VCL Reference

GetOleFont procedure

See also

Creates an OLE font object that is directly mapped to a native TFont.

Unit

AxCtrls

Category

COM utilities

procedure GetOleFont(Font: TFont; var OleFont: IFontDisp);

Description

OLE conventions implement fonts as automation objects that contain the properties of the font.  This routine creates an adapter object that maps the properties of a TFont object into an OLE font object, thereby allowing an OLE client to access the font properties of a VCL control. Call this function when you implement a method that retrieves a TFont value from a VCL object and returns it as an OLE font.

The Font parameter is a pointer to the native TFont. This can be the Font property of a VCL control.  The OLE font is returned in the OleFont parameter. The resulting OLE font object is a direct connection to the native VCL font, so changing the OLE font's properties will change the TFont's properties, and vice-versa.


GetOlePicture procedure
 VCL Reference

GetOlePicture procedure

See also

Creates an OLE picture object that is directly mapped to a native TPicture.

Unit

AxCtrls

Category

COM utilities

procedure GetOlePicture(Picture: TPicture; var OlePicture: IPicture);

Description

OLE conventions implement pictures as automation objects that contain the properties of the picture.  This routine creates an adapter object that maps the properties of a native VCL TPicture into an OLE picture object, thereby allowing an OLE client to access the picture properties of a VCL control. Call this function when you implement a method that retrieves a TPicture value from a VCL object and returns it as an OLE picture.

The Picture parameter is a pointer to the native TPicture. This can be the Picture property of a VCL control.  The OLE picture is returned in the OlePicture parameter. The resulting OLE picture object is a direct connection to the native VCL picture, so changing the OLE picture's properties will change the TPicture's properties, and vice-versa.


GetOleStrings procedure
 VCL Reference

GetOleStrings procedure

See also

Implements a TStrings object as an IStrings interface for use by OLE objects.

Unit

AxCtrls

Category

COM utilities

procedure GetOleStrings(Strings: TStrings; var OleStrings: IStrings);

Description

When the GetOleStrings function is called, the Strings parameter is implemented as an IStrings and assigned to the TStrings.StringsAdapter property. The IStrings interface is returned as the OleStrings parameter.


ParkingWindow function
 VCL Reference

ParkingWindow function

See also

Provides a temporary parent window for activeX controls when the container is not ready to act as a parent.

Unit

AxCtrls

Category

COM utilities

function ParkingWindow: HWND;

Description

Call ParkingWindow to get the window handle of the parking window. This can be used as a temporary parent to activeX controls until the host application’s container is ready.


SetOleFont procedure
 VCL Reference

SetOleFont procedure

See also

Connects an OLE font object to a TFont object and copies the properties of the OLE font object to the TFont.

Unit

AxCtrls

Category

COM utilities

procedure SetOleFont(Font: TFont; OleFont: IFontDisp);

Description

OLE conventions implement fonts as automation objects that contain the properties of the font.  This routine associates an OLE font object (the OleFont parameter) with a native VCL font (the Font parameter), allowing the font to be accessed by both OLE programs and VCL programs.  The TFont object is initialized to have the same properties as OleFont.

Call this method when you implement an automation method that takes an OLE font as a parameter, and which needs to pass the font along as a native TFont object.


SetOlePicture procedure
 VCL Reference

SetOlePicture procedure

See also

Connects an OLE picture object to a TPicture object, and copies the properties of the OLE picture object to the TPicture.

Unit

AxCtrls

Category

COM utilities

procedure SetOlePicture(Picture: TPicture; OlePicture: IPictureDisp);

Description

OLE conventions implement pictures as automation objects that contain the properties of the picture.  This routine associates an OLE picture object (the OlePicture parameter) with a native VCL picture (the Picture parameter), allowing the picture to be accessed by both OLE programs and VCL programs.  The TPicture object is initialized to have the same properties as OlePicture.

Call this method when you implement an automation method that takes an OLE picture as a parameter, and which needs to pass the picture along as a native TPicture object.


SetOleStrings procedure
 VCL Reference

SetOleStrings procedure

See also

Uses an IStrings interface to assign the contents of a TStrings object.

Unit

AxCtrls

Category

COM utilities

procedure SetOleStrings(Strings: TStrings; OleStrings: IStrings);

Description

Use SetOleStrings to update a TStrings object so that it matches the strings supplied by an IStrings interface. The Strings parameter is the TStrings object to update. The OleStrings parameter is the interface used as a source.


CheckToolMenuDropdown procedure
 VCL Reference

CheckToolMenuDropdown procedure

See also

Displays a tool button’s dropdown menu.

Unit

ComCtrls

Category

Windows controls utilities

procedure CheckToolMenuDropdown(ToolButton: TToolButton);

Description

Call CheckToolMenuDropdown to programmatically display the dropdown menu for a tool button of style tbsDropDown.  If the tool button has no associated dropdown menu, CheckToolMenuDropdown does nothing.

Note:	CheckToolMenuDropdown is included for backward compatibility. Applications should use the tool button’s CheckMenuDropdown method instead.


GetComCtlVersion function
 VCL Reference

GetComCtlVersion function

See also

Indicates which version of ComCtl32.dll is installed.

Unit

ComCtrls

Category

Windows controls utilities

function GetComCtlVersion: Integer;

Description

The appearance and behavior of some common controls, such as tool bars and cool bars, varies depending on which version of ComCtl32.dll is installed. Use GetComCtlVersion to determine which version is installed.  GetComCtlVersion returns an integer that includes the major version number as the high-order word and the minor version number as the low-order word.

Installing Microsoft’s Internet Explorer on a system affects which version of ComCtl32.dll is installed. To help determine which version of Internet Explorer is installed, the ComCtrls unit defines several constants:

Constant	Value	Meaning

ComCtlVersionIE3	$00040046	The version of ComCtl32.dll installed with Internet Explorer version 3.

ComCtlVersionIE4	$00040047	The version of ComCtl32.dll installed with Internet Explorer version 4.

ComCtlVersionIE401	$00040048	The version of ComCtl32.dll installed with Internet Explorer version 4.01.

ComCtlVersionIE5	$00050050	The version of ComCtl32.dll installed with Internet Explorer version 5.

To quickly determine which version of Internet Explorer is installed, you can compare the return value of GetComCtlVersion with these constants. For example:

if GetComCtlVersion >= ComCtlVersionIE4 then { IE4 is installed }


InitCommonControl function
 VCL Reference

InitCommonControl function

See also

Wraps the API routine, InitCommonControlsEx, which registers common control classes from ComCtl32.dll.

Unit

ComCtrls

Category

Windows controls utilities

functionInitCommonControl(CC: Integer): Boolean;

Description

InitCommonControl wraps both the current Windows API routine, InitCommonControlsEx, and its obsolete predecessor, InitCommonControls. It calls the newer function if available; otherwise it calls the older InitCommonControls function.

The routine passes the address of an InitCommonControlsEx structure that contains information specifying which control classes will be registered.


ClassIDToProgID function
 VCL Reference

ClassIDToProgID function

See also

Returns the programmatic ID for a specified class given its class ID (CLSID).

Unit

ComObj

Category

COM utilities

function ClassIDToProgID(const ClassID: TGUID): string;

Description

ClassIDToProgID retrieves the programmatic ID for the CLSID specified by the ClassID parameter.

If ClassIDToProgID succeeds, it returns a string that specifies the requested ProgID. If ClassIDToProgID fails an EOleSysError exception is raised with an error code indicating the cause of the error. The possible error codes are as follows:

Error code	Meaning

REGDB_E_CLASSNOTREG	Class not registered in the registry.

REGDB_E_READREGDB	Error reading registry.


CoInitFlags variable
 VCL Reference

CoInitFlags variable

See also

Specifies the level of threading support requested for a COM server .EXE.

Unit

ComObj

Category

COM utilities

var CoInitFlags: Integer = -1;

Description

CoInitFlags controls the way COM is intialized for threading support. This variable only affects executables (.EXEs), not in-process servers (.DLLs and .OCXs).

Typically, code to initialize the level of threading support is added automatically by the wizard that creates the COM object in your application. In applications containing multiple COM objects, COM is initialized for the highest level of support, where single threading is lowest and free threading is highest. To manually set the level of COM threading support, assign a value to CoInitFlags in the program’s main source file before the call to Application.Initialize.

The following table lists the constants (defined in the Activex unit) that can be or’ed together to create a value for CoInitFlags.

Constant	Value	Meaning

COINIT_MULTITHREADED	0	COM calls objects on any thread (free threading)

COINIT_APARTMENTTHREADED	2	Each object has its own thread (apartment model)

COINIT_DISABLE_OLE1DDE	4	Don't use DDE for Ole1 support.

COINIT_SPEED_OVER_MEMORY	8	 Optimize for speed rather than memory.

The value of CoInitFlags is –1 for single threading.


ComClassManager function
 VCL Reference

ComClassManager function

See also

Returns a TComClassManager object.

Unit

ComObj

Category

COM utilities

function ComClassManager: TComClassManager;

Description

Use ComClassManager to obtain a reference to the global COM class manager. This COM class manager manages the class factory objects owned by COM servers.


CreateClassID function
 VCL Reference

CreateClassID function

See also

CreateClassID generates a new GUID and returns it as a string.

Unit

ComObj

Category

COM utilities

function CreateClassID: string;

Description

Use CreateClassID to create a new GUID and access it as a string. A demo of the CreateClassID function is available in the Demos area.


CreateComObject function
 VCL Reference

CreateComObject function

See also

Instantiates a single instance of a COM object.

Unit

ComObj

Category

COM utilities

function CreateComObject(const ClassID: TGUID): IUnknown;

Description

CreateComObject creates a single uninitialized object of the class associated with the CLSID specified by the ClassID parameter. CreateComObject is used to create an object of a specified type when the CLSID is known, and when the object is on a local or in-proc server.

CreateComObject is called once to create each new single instance of a class. To create multiple instance of the same class it is recommended to use a class factory.

CreateComObject returns a reference to the interface to be used to communicate with the object. For CreateComObject this interface is of type IUnknown. To create OLE objects that return references to the IDispatch interface, use CreateOleObject.

Timp:	If the interface returned by CreateCOMObject is assigned to a Variant, you can release the interface by assigning the Unassigned constant to that Variant.


CreateOleObject function
 VCL Reference

CreateOleObject function

See also	Example

Instantiates a single instance of an Automation object.

Unit

ComObj

Category

COM utilities

function CreateOleObject(const ClassName: string): IDispatch;

Description

CreateOleObject creates a single uninitialized object of the class specified by the ClassName parameter.  ClassName specifies the string representation of the Class ID (CLSID). CreateOleObject is used to create an object of a specified type when the CLSID is known, and when the object is on a local or in-proc server. Only objects that are not part of an aggregate are created using CreateOleObject.

CreateOleObject is called once to create each new single instance of a class. To create multiple instance of the same class, using a class factory is recommended.

CreateOleObject returns a reference to the interface that can be used to communicate with the object. For CreateOleObject this interface is of type IDispatch. To create a COM object that does not support an IDispatch interface, use CreateComObject.

Tip:	As shown in the example, if the interface returned by CreateOleObject is assigned to a Variant, you can release the interface by assigning the Unassigned constant to that Variant.


CreateRegKey procedure
 VCL Reference

CreateRegKey procedure

See also

Creates or opens a registry key that is a subkey of HKEY_CLASSES_ROOT.

Unit

ComObj

Category

COM utilities

procedure CreateRegKey(const Key, ValueName, Value: string, RootKey: DWord = HKEY_CLASSES_ROOT);

Description

CreateRegKey creates or opens the key specified by the Key parameter. If the key does not already exist in the registry, CreateRegKey creates it, otherwise CreateRegKey opens it. This is useful for implementing the UpdateRegistry method of a class factory.

Key specifies a null-terminated string, which cannot be NULL and cannot begin with the backslash character ('\'). It must be a subkey of RootKey.

When the key is created, additional value and type information for the specified key can be set from the parameters passed to CreateRegKey.

ValueName points to a null-terminated string that specifies the name of the subkey associated with value. This parameter can be nilNULL or an empty string.

Value specifies the data to be stored with the specified value name.

RootKey is the top-level registry key under which the new key is created or opened. If omitted, it is HKEY_CLASSES_ROOT.

If CreateRegKey is not successful, an EOleRegistrationError exception is raised.


CreateRemoteComObject function
 VCL Reference

CreateRemoteComObject function

See also

Creates a Com object on another machine and returns an IUnknown interface for it.

Unit

ComObj

Category

COM utilities

function CreateRemoteComObject(const MachineName: WideString; const ClassID: TGUID): IUnknown;

Description

Use CreateRemoteComObject to create an object on a remote server. CreateRemoteComObject creates a single uninitialized object of the class associated with the CLSID specified by the ClassID parameter. The MachineName parameter specifies the machine that lists the ClassID in its type library.

Usually, MachineName is the UNC name of the machine, which can be obtained by looking up its Machine Name under the Network settings in the Windows control panel. However, under some configurations of COM, MachineName is the IP address or Host name of the remote system.

CreateRemoteComObject returns a reference to the IUnknown interface for the object. Use this interface to obtain information about other interfaces supported by the object.

Tip:	If the interface returned by CreateRemoteComObject is assigned to a Variant, you can release the interface by assigning the Unassigned constant to that Variant.


DeleteRegKey procedure
 VCL Reference

DeleteRegKey procedure

See also

Deletes a single key that is a subkey of HKEY_CLASSES_ROOT from the system registry.

Unit

ComObj

Category

COM utilities

procedure DeleteRegKey(const Key: string; RootKey: DWord = HKEY_CLASSES_ROOT);

Description

Use DeleteRegKey to update the system registry. This is useful for implementing the UpdateRegistry method of a class factory.

DeleteRegKey deletes the subkey of RootKey that is passed in as the Key parameter.

Key must specify a null-terminated string, which is the name of the key to delete. It cannot be NULL. The Key to delete must not have subkeys.

RootKey is the top-level key under which the key to delete appears. It defaults to HKEY_CLASSES_ROOT.

If DeleteRegKey succeeds it removes the entire specified key from the registry, including all of its values. An exception is raised if it fails.


GetActiveOleObject function
 VCL Reference

GetActiveOleObject function

See also

Retrieves a reference to an IDispatch interface to a currently running, registered COM object.

Unit

ComObj

Category

COM utilities

function GetActiveOleObject(const ClassName: string): IDispatch;

Description

GetActiveOleObject returns a reference to the IDispatch interface of the active object for the given class indicated by ClassName. ClassName is the programmatic ID for the class of the active object from the OLE running object table. GetActiveOleObject is used to access the OLE running object table. To add an object to this table, use the RegisterActiveObject API.

If either the the class object or the IDispatch interface are not successfully returned, an EOleSysError exception is raised.


GetDispatchPropValue function
 VCL Reference

GetDispatchPropValue function

See also

Returns the value of a property on an IDispatch interface.

Unit

ComObj

Category

COM utilities

function GetDispatchPropValue(Disp: IDispatch; DispID: Integer): OleVariant;

Description

Call GetDispatchPropValue to read the value of the property with the dispatch ID specified by DispID from the IDispatch interface given by Disp.


GetRegStringValue function
 VCL Reference

GetRegStringValue function

See also

Retrieves a value stored under a subkey of HKEY_CLASSES_ROOT from the system registry.

Unit

ComObj

Category

COM utilities

function GetRegStringValue(const Key, ValueName: string; RootKey: DWord = HKEY_CLASSES_ROOT): string;

Description

GetRegStringValue returns the value specified by the ValueName property that is stored under the key specified by Key. Key must be a subkey of RootKey, which defaults to HKEY_CLASSES_ROOT. If there is no such value stored in the system registry, GetRegStringValue returns an empty string.


InterfaceConnect procedure
 VCL Reference

InterfaceConnect procedure

See also

Connects an IConnectionPoint interface.

Unit

ComObj

Category

COM utilities

procedure InterfaceConnect(const Source: IUnknown; const IID: TIID; const Sink: IUnknown; var Connection: Longint);

Description

Call InterfaceConnect from a client application to register an object that implements an outgoing server connection. Typically, this object is an event sink that a client uses to respond to server events. When an event occurs, the server (event source) calls its outgoing interface for the event, and the client, which implements the interface as an event sink, receives the call

InterfaceConnect obtains an IConnectionPoint interface from a COM server advising on a particular connection point. IConnectionPoint lets the server expose an outgoing interface for an object, typically an event sink. IConnectionPointContainer enumerates the connection points supported by the server, so that a caller can find the right connection point. The IConnectionPointContainer and IConnectionPoint interfaces comprise the standard COM event-handling mechanism.

Source is an IUnknown interface for the server object that defines and calls the outgoing interface.

IID is the GUID of the outgoing interface.

Sink is the IUnknown interface of the client object that implements the outgoing interface.

Connection returns a token that represents the connection. It must be saved for use by the InterfaceDisconnect procedure that is called to terminate the connection established by calling InterfaceConnect.

Note:	A demo containing this procedure resides in Demos/ActiveX directory.


InterfaceDisconnect procedure
 VCL Reference

InterfaceDisconnect procedure

See also

Disconnects an IConnectionPoint interface connection that was previously made by the InterfaceConnect procedure.

Unit

ComObj

Category

COM utilities

procedure InterfaceDisconnect(const Source: IUnknown; const IID: TIID; var Connection: Longint);

Description

Call InterfaceDisconnect from a client application to tell the server to stop calling its sink interface. InterfaceDisconnect disconnects an IConnectionPoint interface connection that was previously made by the InterfaceConnect procedure. These procedures are wrappers for the COM event-handling mechanism, which is based on the IConnectionPointContainer and IConnectionPoint interfaces.

Source is an IUnknown interface for the server object that defines and calls the outgoing interface.

IID is the GUID of the outgoing interface.

Connection is the token that represents the connection, which was returned by the InterfaceConnect procedure.

Note:	A demo containing this procedure resides in Demos/ActiveX directory.


OleCheck procedure
 VCL Reference

OleCheck procedure

See also	Example

Throws an EOleSysError exception if the result code indicates an error.

Unit

ComObj

Category

COM utilities

procedure OleCheck(ECode: HResult);

Description

OleCheck is used to wrap many COM routines, so that if that routine fails, users will have an opportunity to handle it in the resulting exception that is raised.

If ECode is a value less than zero, OleCheck raises an EOleSysError exception that specifies the error code.


OleError procedure
 VCL Reference

OleError procedure

See also

Raises an EOleSysError exception.

Unit

ComObj

Category

COM utilities

procedure OleError(ErrorCode: HResult);

Description

OleError raises an EOleSysError exception from an error code passed in as the ErrorCode parameter.

OleError is used internally to catch failed function calls by throwing an EOleSysError exception that indicates the cause of the failure as an error code. Unlike the OleCheck procedure, which checks its parameter to determine whether it represents an error, OleError always raises an exception.


ProgIDToClassID function
 VCL Reference

ProgIDToClassID function

See also

Returns the class ID (CLSID) TGUID that corresponds to the string specified as the ProgID parameter.

Unit

ComObj

Category

COM utilities

function ProgIDToClassID(const ProgID: string): TGUID;

Description

ProgIDToClassID retrieves, from the registry, the CLSID for a given programmatic ID. The ProgID parameter specifies the programmatic ID for which the CLSID is requested. A programmatic ID is a string that is associated with the CLSID in the registry.

If ProgIDToClassID succeeds it returns the requested CLSID. If ProgIDToClassID fails an EOleSysError exception is raised with an error code indicating the cause of the error. The error code possibilities are as follows:

Error code	Meaning

CO_E_CLASSSTRING	The registered CLSID for the ProgID is invalid.

REGDB_E_WRITEREGDB	An error occurred writing the CLSID to the registry.

Note:	If the ProgID cannot be found in the registry, ProgIDToClassID creates an OLE 1 CLSID for the ProgID and a CLSID entry in the registry.


RegisterComServer procedure
 VCL Reference

RegisterComServer procedure

Registers an in-process COM server with the operating system.

Unit

ComObj

Category

COM utilities

procedure RegisterComServer(const DLLName: string);

Description

COM servers are always registered as dynamic link libraries, DLLs. The DLLName parameter specifies the name of the DLL that implements the COM controls.


RegisterAsService procedure
 VCL Reference

RegisterAsService procedure

See also

Registers a COM object as an NT service.

Unit

ComObj

Category

COM utilities

procedure RegisterAsService(const ClassID, ServiceName: string);

Description

Use RegisterAsService to register a service given a classID. ClassID specifies the classID of the COM object that implements the service. ServiceName specifies the name under which the object is registered.


SetDispatchPropValue procedure
 VCL Reference

SetDispatchPropValue procedure

See also

Sets the value of a property on an IDispatch interface.

Unit

ComObj

Category

COM utilities

procedure SetDispatchPropValue(Disp: IDispatch; DispID: Integer; const Value: OleVariant);

Description


ComServer variable
 VCL Reference

ComServer variable

Provides class and registry information about server objects.

Unit

ComServ

Category

COM utilities

var ComServer: TComServer;

Description

ComServ declares an instance of COM server. By default, when the ComServ unit is included in a project, Delphi constructs a COM server object and assigns it to ComServ. ComServ has several properties and methods that provide class and registry information about the objects loaded on the server. See TComServer object for a list of properties and methods.


DLLCanUnloadNow function
 VCL Reference

DLLCanUnloadNow function

See also

Tells Windows whether it can unload the in-process server exporting this function.

Unit

ComServ

Category

COM utilities

function DllCanUnloadNow: HResult; stdcall;

Description

Do not call DllCanUnloadNow directly. DllCanUnloadNow is exported by ActiveX servers (DLLs) and is called by the Ole engine to indicate whether the server can be unloaded from memory because it is no longer in use. A DLL is no longer in use when it is not managing any existing objects (the reference count on all of its objects is 0).

The return values for DllCanUnloadNow are as follows:

Value	Meaning

S_OK	The DLL can be unloaded.

S_FALSE	The DLL cannot be unloaded now.

Note:	DllCanUnloadNow is one of four functions in the ComServ unit that every in-process ActiveX server must export so that Windows can manage the server resources properly. The others are DllGetClassObject, DllRegisterServer, and DllUnregisterServer.


DllGetClassObject function
 VCL Reference

DllGetClassObject function

See also

Obtains a class factory for an ActiveX object when the ActiveX object resides in an in-process ActiveX server (DLL).

Unit

ComServ

Category

COM utilities

function DllGetClassObject(const CLSID, IID: TGUID; var Obj): HResult; stdcall;

Description

Do not call DllGetClassObject directly.  DllGetClassObject is exported by all ActiveX server DLLs, and it is called internally by the OLE engine. When a user calls CoGetClassObject (or CoCreateInstance, which internally calls CoGetClassObject) to obtain a class factory for an ActiveX object, the OLE engine loads the ActiveX server DLL into memory and calls its DllGetClassObject function.

The parameters to DllGetClassObject are:

CLSID is the class identifier for the ActiveX object to be created by the class factory.

IID is the interface indentifier for the interface through which the caller will communicate with the class factory object to create instances of the object referenced by CLSID. This parameter is nearly always IID_IClassFactory or IID_IClassFactory2.

Obj will hold a pointer to the resulting class factory interface upon successful completion of the function.  If an error occurs, Obj will be set to nil.

The return values for DLLGetClassObject are as follows:

Value	Meaning

S_OK	The object was retrieved successfully.

E_NOINTERFACE	The object referenced by Obj doesn't support the interface passed in the IID parameter.

CLASS_E_CLASSNOTAVAILABLE	The DLL does not support the class type referenced by the CLSID parameter.

Note:	DllGetClassObject is one of four functions in the ComServ unit that every in-process server must export so that Windows can manage the server resources properly. The others are DllCanUnloadNow, DllRegisterServer, and DllUnregisterServer.


DllRegisterServer function
 VCL Reference

DllRegisterServer function

See also

Registers an in-process ActiveX server in the current module within the system registry.

Unit

ComServ

Category

COM utilities

function DllRegisterServer: HResult; stdcall;

Description

Do not call DllRegisterServer directly. DllRegisterServer is exported by in-process ActiveX servers (DLLs) and instructs the DLL to create its registry entries for the type library and all classes supported in that server module. DLLRegisterServer is usually called when the ActiveX server is installed on a user's system.

If this function fails, the state of the registry for its type library and its classes is indeterminate.

The return values for DllRegisterServer are as follows:

Value	Meaning

S_OK	The registry entries were created successfully.

E_FAIL	The registry entries were not completed.

Note:	DllRegisterServer is one of four functions in the ComServ unit that every in-process server must export so that Windows can manage the server resources properly. The others are DllCanUnloadNow, DllGetClassObject, and DllUnregisterServer.


DllUnregisterServer function
 VCL Reference

DllUnregisterServer function

See also

Unregisters an OLE automation server in the current module with the system registry.

Unit

ComServ

Category

COM utilities

function DllUnregisterServer: HResult; stdcall;

Description

Do not call DllUnregisterServer directly. DllUnregisterServer is exported by in-process automation servers (DLLs) and instructs the DLL to remove entries created through DllRegisterServer. DLLRegisterServer is called when a server is uninstalled.

The return values for DllUnregisterServer are as follows:

Value	Meaning

S_OK	The registry entries were successfully removed.

S_FALSE	Some or all registry entries were not removed.

Note:	DllUnregisterServer is one of four functions in the ComServ unit that every in-process server must export so that Windows can manage the server resources properly. The others are DllCanUnloadNow, DllGetClassObject, and DllRegisterServer. It should never be necessary for users to directly call or alter any of these functions.


DatabaseError procedure
 VCL Reference

DatabaseError procedure

See also

Creates and raises an EDatabaseError exception.

Unit

DB

Category

exception handling routines

procedure DatabaseError(const Message: string; Component: TComponent = nil);

Description

Call DatabaseError to raise an EDatabaseError exception, using Message as the text for the exception. If a component is provided as the second parameter, the message is prefixed by the name of the component to help in interpreting the error message.

Calling DatabaseError rather than creating and raising the exception directly in code reduces the overall code size of the application.


DatabaseErrorFmt procedure
 VCL Reference

DatabaseErrorFmt procedure

See also

Creates and raises an EDatabaseError exception with a formatted error message.

Unit

DB

Category

exception handling routines

procedure DatabaseErrorFmt(const Message: string; const Args: array of const; Component: TComponent = nil);

Description

Call DatabaseError to throw an EDatabaseError exception. The error message for the exception is assembled from the format string specified by the Message parameter and applying the Args parameter.If a component is provided as the final parameter, the message is prefixed by the name of the component to help in interpreting the error message.

Call DatabaseErrorFmt rather than creating and raising the exception directly in code to reduce the overall code size of the application.


ExtractFieldName function
 VCL Reference

ExtractFieldName function

See also

Returns the next name in a semicolon-delimited string of field names.

Unit

DB

Category

Database routines

function ExtractFieldName(const Fields: string; var Pos: Integer): string;

Description

Use ExtractFieldName when parsing a semicolon-delimited string of names such as those used as parameters to many methods on database-specific objects.

Fields is a semicolon-delimited string of names.

Pos is the starting position of the next string in Fields. On exit from the function, Pos is updated to the starting position of the following string. If there is no following string, on exit, Pos is one more than the length of Fields.

ExtractFieldName returns a string with the single name that began at position Pos when the function was called.

ExtractFieldName is typically used in a loop, as follows:

Pos := 1;

while Pos <= Length(FieldNames) do

begin

  Name := ExtractFieldName(FieldNames, Pos);

  // do something with Name

end;


GetFieldProperty function
 VCL Reference

GetFieldProperty function

See also	Example

Returns a TField object for a dataset and data control.

Unit

DB

Category

Database routines

function GetFieldProperty(DataSet: TDataSet; Control: TComponent; const FieldName: String): TField;

Description

GetFieldProperty returns a reference to a field given the dataset component that contains the field, the data-aware control that accesses the field, and the field name. GetFieldProperty returns a value of type TField.

DataSet is the dataset component containing the field.

Control is the data-aware control that accesses the field.

FieldName is the name of the field for which to return a TField.


RegisterFields procedure
 VCL Reference

RegisterFields procedure

See also

Registers a set of field components so that they appear in the Dataset designer.

Unit

DB

Category

component registration routines

procedure RegisterFields(const FieldClasses: array of TFieldClass);

Description

Call RegisterFields to allow custom descendants of TField to appear in the field type drop down of the new field dialog box.

The FieldClasses parameter is an array of TField descendants.


VarTypeToDataType function
 VCL Reference

VarTypeToDataType function

See also

Returns the field type value that most closely corresponds to a Variant type.

Unit

DB

Category

Database routines

function VarTypeToDataType(VarType: Integer): TFieldType;

Description

Call VarTypeToDataType to infer the type of field component that should hold a value, given its Variant type. Use the VarType function to obtain a Variant type from a Variant.


PackageParams function
 VCL Reference

PackageParams function

See also

Converts a TParams object into an OleVariant that can be used in multi-tiered applications.

Unit

DBClient

Category

multi-tier support

function PackageParams(Params: TParams; Types: TParamTypes = AllParamTypes): OleVariant;

Description

IAppServer methods that pass parameter values to or from the application server use an OleVariant to represent those parameters. Client datasets use PackageParams to convert their Params property into the OleVariant format. Use PackageParams to encode parameter values when using the IAppServer interface directly rather than using the methods of TClientDataSet.

The Params parameter is a TParams object (usually the Params property of the source component) whose parameter values are to be encoded.

The Types parameter indicates which parameters from the Params parameter are to be included. This allows applications to include, for example, only input parameters if no others are needed.

PackageParams returns an OleVariant that encodes the parameter values as a Variant array.


UnpackParams procedure
 VCL Reference

UnpackParams procedure

See also

Converts an OleVariant that represents a set of parameters into a TParams object.

Unit

DBClient

Category

multi-tier support

procedure UnpackParams(const Source: OleVariant; Dest: TParams);

Description

Client datasets use UnpackParams update their Params property with parameter values received over an IAppServer interface. Use UnpackParams to decode parameter values when using the IAppServer interface directly rather than using the methods of TClientDataSet.

The Source parameter is an OleVariant that represents a set of parameter values. Parameter values can be encoded into this format using the PackageParams function.

The Dest parameter is a TParams object (usually the Params property of a destination component) that receives the parameter values.


DBUseRightToLeftAlignment function
 VCL Reference

DBUseRightToLeftAlignment function

See also

Indicates whether a data-aware control’s alignment is reversed to a right-to-left mode.

Unit

DBCtrls

Category

BiDiMode support routines

function DBUseRightToLeftAlignment(AControl: TControl; AField: TField): Boolean;

Description

Call DBUseRightToLeftAlignment to determine whether a control’s alignment has been reversed to a right-to-left mode. This information can be used when painting the control or when responding to mouse events.

DBUseRightToLeftAlignment returns True for middle east locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.

AControl is the data-aware control to check.

AField is the field associated with the control specified in AControl. The AField parameter is necessary so that DBUseRightToLeftAlignment can be used with controls such as TDBLookupComboBox, which uses the list field and not the target field for determining alignment.


LoginDialog function
 VCL Reference

LoginDialog function

See also

Brings up the database Login dialog to allow the user to connect to a database server.

Unit

DBLogDlg

Category

dialog and message routines

function LoginDialog(const ADatabaseName: string; var AUserName, APassword: string): Boolean;

Description

Call LoginDialog to bring up the standard Login dialog box to prompt the user for a valid user name and password. The ADatabaseName parameter specifies the database for which access is being requested. The dialog returns the user name and password as the AUserName and APassword parameters.

LoginDialog returns False if the user cancels out of the dialog. If LoginDialog returns True, the application can attempt to connect to the database server using the supplied user name and password.

Note:	If the user should not be permitted to change the user name from within the login dialog, use the LoginDialogEx function.


LoginDialogEx function
 VCL Reference

LoginDialogEx function

See also

Brings up the database Login dialog to allow the user to connect to a database server.

Unit

DBLogDlg

Category

dialog and message routines

function LoginDialogEx(const ADatabaseName: string; var AUserName, APassword: string; NameReadOnly: Boolean): Boolean;

Description

Call LoginDialogEx to bring up the standard Login dialog box to prompt the user for a valid user name and password. The ADatabaseName parameter specifies the database for which access is being requested. The NameReadOnly parameter specifies whether the user can change the user name from within the dialog.

The dialog returns the user name and password as the AUserName and APassword parameters.

LoginDialogEx returns False if the user cancels out of the dialog. If LoginDialog returns True, the application can attempt to connect to the database server using the supplied user name and password.


RemoteLoginDialog function
 VCL Reference

RemoteLoginDialog function

See also

Brings up the database Login dialog to allow the user to connect to a database server.

Unit

DBLogDlg

Category

dialog and message routines

function RemoteLoginDialog(var AUserName, APassword: string): Boolean;

Description

Call RemoteLoginDialog to bring up the standard Login dialog box to prompt the user for a valid user name and password.

The dialog returns the user name and password as the AUserName and APassword parameters.

RemotLoginDialog returns False if the user cancels out of the dialog. If LoginDialog returns True, the application can attempt to connect to the database server using the supplied user name and password.


PasswordDialog function
 VCL Reference

PasswordDialog function

See also	Example

Displays a dialog box that prompts the user for the password of a local password-protected table.

Unit

DBPWDlg

Category

Database routines

function PasswordDialog(const ASession: IDBSession): Boolean;

Description

Use PasswordDialog to allow the user to enter a password for a password-protected Paradox or dBase table.

ASession is the interface of a component that represents the session onto which the user logs in. Typically, this is the interface of a TSession component.

If the user clicks OK in the dialog box, PasswordDialog returns True. Otherwise it returns False.

Note:	When an application opens a Paradox or dBASE table that requires a password, the user is prompted to enter a password unless the Session already has a valid password for that table.


AnsiToNative function
 VCL Reference

AnsiToNative function

See also

Converts a string from the ANSI character set to the character set associated with a given locale.

Unit

DBTables

Category

Database routines

function AnsiToNative(Locale: TLocale; const AnsiStr: string; NativeStr: PChar; MaxLen: Integer): PChar;

Description

Call AnsiToNative to convert a string represented in the ANSI character set (used internally by Windows) to the character set associated with the database locale specified by the Locale parameter. The resulting string is copied into the buffer pointed to by the NativeStr parameter. Use the MaxLen parameter to specify the size of this buffer. If the buffer is too small to contain all characters in the converted version of AnsiStr, the returned value is truncated. AnsiToNative returns a pointer to NativeStr.

Use AnsiToNative to convert strings typed by the user into the character set used by a database table.


AnsiToNativeBuf procedure
 VCL Reference

AnsiToNativeBuf procedure

See also

Converts a string from the ANSI character set to the character set associated with a given locale.

Unit

DBTables

Category

Database routines

procedure AnsiToNativeBuf(Locale: TLocale; Source, Dest: PChar; Len: Integer);

Description

Call AnsiToNativeBuf to convert a null-terminated string in the ANSI character set (used internally by Windows) to the character set associated with the database locale specified by the Locale parameter. The resulting string is copied into the buffer pointed to by the Dest parameter. Use the Len parameter to specify the size of this buffer.

Use AnsiToNativeBuf to convert strings typed by the user into the character set used by a database table.


Check procedure
 VCL Reference

Check procedure

See also

Determines whether a value returned from the Borland Database Engine (BDE) represents an error condition.

Unit

Dbtables

Category

Database routines

procedure Check(Status: DBIResult);

Description

Pass the return code from a direct BDE API call as the Status parameter when calling Check. Check determines whether Status indicates an error condition, and if so, calls DbiError to raise an exception.


DBbiError procedure
 VCL Reference

DbiError procedure

See also

Creates and raises an EDBEngineError exception for an error code returned by the Borland Database Engine (BDE).

Unit

DBTables

Category

Database routines

procedure DBIError(ErrorCode: DBIResult);

Description

Call DbiError to raise an EDBEngineError for the error code passed as the ErrorCode parameter. DbiError obtains the error string from the BDE for the error and raises an EDBEngineError exception.


NativeCompareStr function
 VCL Reference

NativeCompareStr function

See also

Compares strings based on a database locale case sensitively.

Unit

DBTables

Category

Database routines

function NativeCompareStr(Locale: TLocale; const S1, S2: string; Len: Integer): Integer;

Description

NativeCompareStr compares S1 to S2, up to a length of Len characters.  If the Len parameter is 0, NativeCompareStr compares the strings up to their entire length. The comparison is performed with case sensitivity. The compare operation is controlled by the database locale specified as the Locale parameter. The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2	= 0


NativeCompareStrBuf function
 VCL Reference

NativeCompareStrBuf function

See also

Compares null-terminated strings based on a database locale case sensitively.

Unit

DBTables

Category

Database routines

function NativeCompareStrBuf(Locale: TLocale; const S1, S2: PChar; Len: Integer): Integer;

Description

NativeCompareStrBuf compares up to the first Len characters of S1 to those of S2, with case sensitivity. If the Len parameter is 0, NativeCompareStrBuf compares the strings up to their entire length. The compare operation is controlled by the database locale specified as the Locale parameter. The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2	= 0


NativeCompareText function
 VCL Reference

NativeCompareText function

See also

Compares strings based on a database locale without case sensitivity.

Unit

DBTables

Category

Database routines

function NativeCompareText(Locale: TLocale; const S1, S2: string; Len: Integer): Integer;

Description

NativeCompareText compares up to the first Len characters of S1 to those of S2, without case sensitivity. If the Len parameter is 0, NativeCompareText compares the strings up to their entire length. The compare operation is controlled by the database locale specified as the Locale parameter. NativeCompareText returns a value less than 0 if S1 < S2, a value greater than 0 if S1 > S2, and returns 0 if S1 = S2.


NativeCompareTextBuf function
 VCL Reference

NativeCompareTextBuf function

See also

Compares null-terminated strings based on a database locale and is not case sensitive.

Unit

DBTables

Category

Database routines

function NativeCompareTextBuf(Locale: TLocale; const S1, S2: PChar; Len: Integer): Integer;

Description

NativeCompareTextBuf compares up to the first Len characters of S1 to those of S2, without case sensitivity. If the Len parameter is 0, NativeCompareTextBuf compares the strings up to their entire length. The compare operation is controlled by the database locale specified as the Locale parameter. NativeCompareTextBuf returns a value less than 0 if S1 < S2, a value greater than 0 if S1 > S2, and returns 0 if S1 = S2.


NativeToAnsi function
 VCL Reference

NativeToAnsi function

See also

Converts a string from the character set of the given locale to the ANSI character set.

Unit

DBTables

Category

Database routines

procedure NativeToAnsi(Locale: TLocale; NativeStr: PChar; var AnsiStr: string);

Description

Call NativeToAnsi to convert a string represented in the character set of the Locale parameter to the ANSI character set (used internally by the VCL). The resulting string is returned as the AnsiStr parameter.

Use NativeToAnsi to convert strings retrieved from a database table into strings that can be displayed in the user interface.


NativeToAnsiBuf procedure
 VCL Reference

NativeToAnsiBuf procedure

See also

Converts a string from the character set of a specified locale into the ANSI character set.

Unit

DBTables

Category

Database routines

procedure NativeToAnsiBuf(Locale: TLocale; Source, Dest: PChar; Len: Integer);

Description

Call NativeToAnsiBuf to convert a null-terminated string in the character set of the Locale parameter to the ANSI character set (used internally by the VCL). The resulting string is copied into the buffer pointed to by the Dest parameter. Use the Len parameter to specify the size of this buffer.

Use NativeToAnsiBuf to convert strings from a database table into the ANSI character set so that they can be displayed in the user interface.


Session variable
 VCL Reference

Session variable

See also

Maintains database components used by an application.

Unit

DBTables

Category

Database routines

var Session: TSession;

Description

Session is responsible for maintaining all of the database components used by an application. It is created automatically as part of an application's initialization and destroyed as part of the application's termination. The Session variable must remain active at all times; it can not be destroyed and recreated.


Sessions variable
 VCL Reference

Sessions variable

See also 	Example

Provides access to TSessionList methods and properties.

Unit

DBTables

Category

Database routines

var
  Sessions: TSessionList;

Description

Sessions is a way to access TSessionList methods and properties for manipulating sessions. The DB unit automatically creates and destroys Sessions for you; you don't need to do anything but use it.

The Session variable, on the other hand, is responsible for maintaining all of the database components used by your application. It is created automatically as part of your application's initialization and destroyed as part of your application's termination. The Session variable must remain active at all times; it can not be destroyed and recreated.


HtmlTable function
 VCL Reference

HtmlTable function

See also

Generates the HTML image of a dataset, using the properties and events of a table producer object.

Unit

DBWeb

Category

miscellaneous routines

function HtmlTable(DataSet: TDataSet; DataSetHandler: TDSTableProducer; MaxRows: Integer): string;

Description

Call HtmlTable to obtain a sequence of HTML commands that describe a dataset in tabular format. The DataSet parameter indicates the dataset whose records are converted into an HTML image. The DataSetHandler parameter is the table producer whose properties describe the attributes of the resulting image and whose event handlers respond to events that occur during the generation of the image. The MaxRows parameter is the maximum number of records from the dataset that will appear in the image.

Calling HtmlTable is equivalent to calling the Content method of the DataSetHandler parameter after setting its DataSet and MaxRows properties to the values given for the parameters of the same names.


AssociateAttr procedure
 VCL Reference

AssociateAttr procedure

See also

Sets up an association between an attribute ID and a field ID.

Unit

DRIntf

Category

Data Dictionary routines

procedure AssociateAttr(const AttrID: TAttrID; const FieldID: TFieldID);

Description

Call AssociateAttr to associate an attribute set in the Data Dictionary with a field in the field dictionary.


CreateField function
 VCL Reference

CreateField function

See also

Creates a new field from information stored in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

function CreateField(Owner: TComponent; Dataset: TDataset; const FullName, Origin: string; const FieldID: TFieldID; const AttrID: TAttrID): TField;

Description

Call CreateField to create a field component based on the information in the Data Dictionary.

The Owner parameter specifies the component responsible for freeing the field.

The Dataset parameter specifies the dataset that includes the field component.

The FullName and Origin parameters specify the values of the field component’s properties of the same names. Origin can be left blank (‘‘);

The FieldID and AttrID parameters specify the field in the field dictionary and an attribute set to use when creating the field. Both can be 0.


DictionaryActive function
 VCL Reference

DictionaryActive function

See also

Indicates whether there is an active Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

function DictionaryActive: Boolean;

Description

Call DictionaryActive to check whether the Data Dictionary is active. If the dictionary is not active, applications can’t store or retrieve attribute sets.

DictionaryActive returns True if the dictionary is active, False otherwise.


DictionaryDeactivate procedure
 VCL Reference

DictionaryDeactivate procedure

See also

Deactivates the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

procedure DictionaryDeactivate;

Description

Call DictionaryDeactivate to disable the Data Dictionary.


FindAttrID function
 VCL Reference

FindAttrID function

See also

Returns the ID of a specified attribute set.

Unit

DRIntf

Category

Data Dictionary routines

function FindAttrID(const AttrName: string): TAttrID;

Description

Call FindAttrID to get the attribute ID for an attribute set that is stored in the Data Dictionary. AttrName is the name of the attribute set. If the Data Dictionary does not contain an attribute set with the specified name, FindAttrID returns a null ID.


FindDatabaseID function
 VCL Reference

FindDatabaseID function

See also

Returns the ID of a specified database.

Unit

DRIntf

Category

Data Dictionary routines

function FindDatabaseID(const Database: string): TDatabaseID;

Description

Call FindDatabaseID to get the database ID for the database specified by the Database parameter. This ID can be used for locating the database’s tables in the Data Dictionary.

If the named database is not in the Data Dictionary, FindDatabaseID returns a null ID.


FindFieldID function
 VCL Reference

FindFieldID function

See also

Returns the ID of a specified field.

Unit

DRIntf

Category

Data Dictionary routines

function FindFieldID(const Table: TTableID; const Field: string): TFieldID;

Description

Call FindFieldID to get the ID for a field that is stored in the field dictionary. Use this field ID to get or set an associated attribute set or to use as a basis when creating a new field component.

The Table parameter specifies the ID of the table that contains the field. The Field parameter specifies the name of the field.

If the Data Dictionary does not contain an entry for the specified field, FindFieldID returns a null ID.


FindTableID function
 VCL Reference

FindTableID function

See also

Returns the ID of a specified table.

Unit

DRIntf

Category

Data Dictionary routines

function FindTableID(const Database: TDatabaseID; const Table: string): TTableID;

Description

Call FindTableID to get the ID for a table in the database specified by the Database parameter. This ID can be used for locating the database’s fields in the Data Dictionary.

The Database parameter specifies the database in which to locate the table. This ID can be obtained by calling FindDatabaseID.

The Table parameter is the name of table.

If the database ID is invalid or the named table is not in the Data Dictionary, FindTableID returns a null ID.


GetAttrID function
 VCL Reference

GetAttrID function

See also

Returns the ID of the attribute set associated with a field.

Unit

DRIntf

Category

Data Dictionary routines

function GetAttrID(const FieldID: TFieldID): TAttrID;

Description

Call GetAttrID to get the ID for the attribute set associated with a field. The FieldID parameter is the Data Dictionary ID for the field whose attribute set is desired.

If the FieldID is not valid or the field does not have an associated attribute set, GetAttrID returns a null ID.


GetAttrName function
 VCL Reference

GetAttrName function

See also

Returns the name of an attribute set given its ID.

Unit

DRIntf

Category

Data Dictionary routines

function GetAttrName(const AttrID: TAttrID): string;

Description

Call GetAttrName to get the name of an attribute set from its ID.


GetAttrNames procedure
 VCL Reference

GetAttrNames procedure

See also

Executes a callback for every attribute set name.

Unit

DRIntf

Category

Data Dictionary routines

procedure GetAttrNames(Proc: TGetStrProc): string;

Description

Call GetAttrNames to perform a callback for every attribute set in the Data Dictionary. The Proc parameter is called for every attribute set with its parameter set to the name of the attribute set.

The callback can obtain an attribute ID from the attribute set’s name by calling FindAttrID.


GetControlClass function
 VCL Reference

GetControlClass function

See also

Returns the class associated with an attribute set.

Unit

DRIntf

Category

Data Dictionary routines

function GetControlClass(const AttrID: TAttrID): string;

Description

Call GetControlClass to get name of the control class (a TField descendant) associated with an attribute set. If no class is associated with the attribute set, GetControlClass returns an empty string.

Note:	 To obtain a class reference from the class name, use the GetClass function.


HasConstraints function
 VCL Reference

HasConstraints function

See also

Indicates whether there are any data constraints for a dataset stored in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

function HasConstraints(Dataset: TDBDataset): Boolean;

Description

Call HasConstraints to determine whether the Data Dictionary has any constraints recorded for the specified dataset.


IsNullID function
 VCL Reference

IsNullID function

See also

Indicates whether a Data Dictionary Identifier is null.

Unit

DRIntf

Category

Data Dictionary routines

function IsNullID(const ID): Boolean;

Description

Call IsNullID to determine whether the ID for an entity in the Data Dictionary is null. IsNullID returns True if the ID is null, False otherwise.

Use IsNullID to test the return value of functions that look up items in the Data Dictionary.


NewAttr function
 VCL Reference

NewAttr function

See also

Creates an attribute set based on the properties of a field component.

Unit

DRIntf

Category

Data Dictionary routines

function NewAttr(Field: TField; const FieldID: TFieldID; const AttrName: string; const Parent: TAttrID): TAttrID;

Description

Call NewAttr create an attribute set in the data dictionary.

The attributes in the attribute set reflect the current properties of the field component specified by the Field parameter.

If a FieldID is provided, the attribute set is associated with Field ID. To create an attribute set without associating it with a field in the Data Dictionary, set the FieldID parameter to NullFieldID.

The AttrName parameter specifies the name under which the attribute set is stored.

The Parent parameter specifies a parent attribute set from which the new attribute set inherits values. Only field properties that differ from the values in the parent attribute set are saved with the new attribute set. If Parent is NullAttrID, all field properties are saved in the new attribute set.

NewAttr returns the attribute ID for the new attribute set.


QualifyTableName function
 VCL Reference

QualifyTableName function

See also

Returns the fully qualified name of a table in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

function QualifyTableName(Database: TDatabase; const TableName: string): string;

Description

Call QualifyTableName to add user name information to a database table name.  Specify the database that contains the table using the Database parameter. Specify the name of a table within that database using the TableName parameter. QualifyTableName returns the fully qualified name of the database table if the table is stored in the Data Dictionary qualified by user name.


QualifyTableNameByName function
 VCL Reference

QualifyTableNameByName function

See also

Returns the fully qualified name of a table in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

function QualifyTableNameByName(const SessionName, DatabaseName, TableName: string): string;

Description

Call QualifyTableNameByName to add user name information to a database table name.  Specify the BDE session that manages the database connection with the Session Name parameter. Specify the database that contains the table using the Database parameter. Specify the name of a table within that database using the TableName parameter. QualifyTableNameByName returns the fully qualified name of the database table if the table is stored in the Data Dictionary qualified by user name.


UnassociateAttr procedure
 VCL Reference

UnassociateAttr procedure

See also

Removes the association between an attribute ID and a field ID.

Unit

DRIntf

Category

Data Dictionary routines

procedure UnassociateAttr(const FieldID: TFieldID);

Description

Call UnassociateAttr to end the association between the field specified by FieldID and its current attribute set in the Data Dictionary.


UpdateAttr procedure
 VCL Reference

UpdateAttr procedure

See also

Updates an attribute set to match the properties of a field component.

Unit

DRIntf

Category

Data Dictionary routines

procedure UpdateAttr(Field: TField; const FieldID: TFieldID; const AttrID: TAttrID);

Description

Call UpdateAttr to update an attribute set so that it matches the properties of the field component specified by the Field parameter. If the field is in the field dictionary, only those attributes that differ from the field identified by FieldID are saved in the attribute set.

The AttrID parameter identifies the attribute set to update. If AttrID is NULL, the attribute set associated with the FieldID parameter is updated.


UpdateConstraints procedure
 VCL Reference

UpdateConstraints procedure

See also

Replaces all imported constraints for a dataset with the current constraints in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

procedure UpdateConstraints(DataSet: TDBDataset; Constraints: TCheckConstraints);

Description

Call UpdateConstraints to ensure that the constraints for a dataset match the current values stored in the Data Dictionary. Specify the dataset to which the constraints apply as the DataSet parameter. Specify the TCheckConstraints object that represents that dataset’s constraints as the Constraints parameter.

UpdateConstraints removes all constraints with a non-empty ImportedConstraint property and replaces them with new constraints that match the values in the Data Dictionary.

UpdateConstraints is equivalent to calling “Read From Dictionary” in the Constraints property editor.


UpdateDataset procedure
 VCL Reference

UpdateDataset procedure

See also

Updates a dataset and all its field components to match the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

procedure UpdateDataset(Dataset: TDBDataset);

Description

Call UpdateDataset to ensure that a dataset reflects the current settings in the data dictionary. Specify the dataset to update as the Dataset parameter.

If Dataset is a TTable, UpdateDataset updates the Constraints property so that all imported constraints match the Data Dictionary and updates all the field components to match the associated attribute sets.

If Dataset is a TQuery or TStoredProc, UpdateDataset updates the field components to match the associated attribute sets and parses the query to obtain any field constraints included in the constituent tables.

Calling UpdateDataset is equivalent to using “Retrieve attributes” for all fields in the fields editor followed by “Read From Dictionary” in the Constraints property editor.


UpdateField procedure
 VCL Reference

UpdateField procedure

See also

Updates a field component to match the associated attribute set in the Data Dictionary.

Unit

DRIntf

Category

Data Dictionary routines

procedure UpdateField(Field: TField; const FieldID: TFieldID; const AttrID: TAttrID);

Description

Call UpdateField to change the properties of a field component so that they match the associated attribute set in the Data Dictionary.

Specify the field to update as the Field parameter.

Specify the ID of the corresponding field in the Data Dictionary using the FieldID parameter. This value can be obtained using FindFieldID.

Specify the attribute set that acts as a source using the AttrID parameter.


BcdAdd procedure
 VCL Reference

BcdAdd procedure

See also

Adds two TBcd values.

Unit

FMTBcd

Category

BCD support

procedure BcdAdd(const bcdIn1, bcdIn2: TBcd; var bcdOut: TBcd);

Description

BcdAdd adds bcdIn1 to bcdIn2 and returns the result as bcdOut.

The return value is given a precision and number of decimal places that is sufficient to accurately represent the result of the addition. You can convert this to a specific precision and number of decimal places using the NormalizeBcd procedure.


BcdCompare function
 VCL Reference

BcdCompare function

See also

Compares two TBcd values.

Unit

FmtBcd

Category

BCD support

function BcdCompare(const bcd1,bcd2: TBcd): Integer;

Description

Call BcdCompare to compare two TBcd values. The return value is indicated in the following table:

Return value	Condition

-1	bcd1< bcd2

0	bcd1= bcd2

1	bcd1 > bcd2


BcdDivide procedure
 VCL Reference

BcdDivide procedure

See also

Divides one BCD value by another.

Unit

FmtBcd

Category

BCD support

procedure BcdDivide(const Dividend, Divisor: TBcd; var bcdOut: TBcd); overload;

procedure BcdDivide(const Dividend: TBcd; const Divisor: Double; var bcdOut: TBcd); overload;

procedure BcdDivide(const Dividend: TBcd; const Divisor: string; var bcdOut: TBcd); overload;

procedure BcdDivide(Dividend, Divisor: string; var bcdOut: TBcd); overload;

Description

BcdDivide divides Dividend by Divisor and returns the result as bcdOut.

The return value is given a precision and number of decimal places that is sufficient to accurately represent the result of the division, if possible. (The number of decimal places in the result, however, will never exceed 10.) You can convert this to a specific precision and number of decimal places using the NormalizeBcd procedure.


BcdMultiply procedure
 VCL Reference

BcdMultiply procedure

See also

Multiplies two BCD values.

Unit

FmtBcd

Category

BCD support

procedure BcdMultiply(const bcdIn1, bcdIn2: TBcd; var bcdOut: TBcd); overload;

procedure BcdMultiply(const bcdIn: TBcd; const DoubleIn: Double; var bcdOut: TBcd); overload;

procedure BcdMultiply(const bcdIn: TBcd; const StringIn: string; var bcdOut: TBcd); overload;

procedure BcdMultiply(StringIn1, StringIn2: string; var bcdOut: TBcd); overload;

Description

BcdMultiply multiplies the first two arguments and returns the result as bcdOut.

The return value is given a precision and number of decimal places that is sufficient to accurately represent the result of the multiplication, if possible. You can convert this to a specific precision and number of decimal places using the NormalizeBcd procedure.


BcdPrecision function
 VCL Reference

BcdPrecision function

See also

Returns the precision of a binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function BcdPrecision(const Bcd: TBcd): Word;

Description

Use BcdPrecision to determine the number of significant digits in a specified BCD value.


BcdScale function
 VCL Reference

BcdScale function

See also

Returns the number of decimal places for a binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function BcdScale(const Bcd: TBcd): Word;

Description

Use BcdScale to determine the number of decimal places in a specified BCD value.


BcdSubtract procedure
 VCL Reference

BcdSubtract procedure

See also

Subtracts one BCD value from another.

Unit

FmtBcd

Category

BCD support

procedure BcdSubtract(const bcdIn1, bcdIn2: TBcd; var bcdOut: TBcd);

Description

BcdSubtract subtracts bcdIn2 from bcdIn1 and returns the result as bcdOut.

The return value is given a precision and number of decimal places that is sufficient to accurately represent the result of the subtraction. You can convert this to a specific precision and number of decimal places using the NormalizeBcd procedure.


BCDToCurr function
 VCL Reference

BCDToCurr function

See also

Converts a binary-coded decimal value (BCD) to the corresponding Currency value.

Unit

FmtBcd

Category

BCD support

function BCDToCurr(const BCD: TBcd; var Curr: Currency): Boolean;

Description

Use BCDToCurr to convert a binary-coded decimal value, such as is stored in a physical BCD database field, into a Currency value, which is the representation used by TBCDField objects. BCDToCurr returns True if the BCD value passed as the BCD parameter is successfully converted into a Currency object which is passed out as the Curr parameter.


BcdToDouble function
 VCL Reference

BcdToDouble function

See also

Converts a binary-coded decimal value (BCD) to the corresponding Double value.

Unit

FmtBcd

Category

BCD support

function BcdToDouble(const Bcd: TBcd): Double;

Description

Use BcdToDouble to convert a binary-coded decimal value into a Double.  If the Bcd parameter represents a value that can’t be expressed as a double, BcdToDouble raises an exception.


BcdToInteger function
 VCL Reference

BcdToInteger function

See also

Converts a binary-coded decimal value (BCD) to an integer.

Unit

FmtBcd

Category

BCD support

function BcdToInteger(const Bcd: TBcd; Truncate:Boolean = False) : Integer;

Description

Use BcdToInteger to convert a binary-coded decimal value into an integer.

Bcd is the value to convert.

Truncate indicates how to handle values that include a decimal portion. If Truncate is True, BcdToInteger truncates the value specified by Bcd and converts only the integer portion. If Truncate is False, BcdToInteger raises an exception if the Bcd parameter does not represent an integer value.


BcdToStr function
 VCL Reference

BcdToStr function

See also

Returns a string representation of a binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function BcdToStr(const BCD: TBcd): string;

Description

Use BcdToStr to convert a binary-coded decimal value into a string.  BcdToStr formats the string to display all of the digits stored in the BCD value.


BcdToStrF function
 VCL Reference

BcdToStrF function

See also

Returns a string representation of a binary-coded decimal (BCD) value that reflects specified formatting.

Unit

FmtBcd

Category

BCD support

function BcdToStrF(const Value: TBcd; Format: TFloatFormat; const Precision, Digits: Integer): string;

Description

Use BcdToStrF to convert a binary-coded decimal value into a string.

Value is the BCD value to convert to a string.

Format is the formatting code that indicates the overall type of formatting to use.

Precision indicates the maximum number of significant digits in the resulting string.

Digits indicates the maximum number of digits past the decimal point in the resulting string.


CurrToBCD function
 VCL Reference

CurrToBCD function

See also

Converts a Currency value to the corresponding binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function CurrToBCD(const Curr: Currency; var BCD: TBcd; Precision: Integer=32; Decimals: Integer=4): Boolean;

Description

Use CurrToBCD to convert a Currency value, such as is used by TBCDField objects, into a binary-coded decimal value, such as is stored in a physical BCD database field. CurrToBCD returns True if the Currency object passed as the Curr parameter is successfully converted into a BCD value and passed out as the BCD parameter. The Precision parameter specifies the number of digits represented in the BCD value, and the Decimals parameter specifies the number of those digits that are after the decimal point.


DoubleToBcd function
 VCL Reference

DoubleToBcd function

See also

Converts a Double value to the corresponding binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function DoubleToBcd( const aValue: Double): TBcd; overload;

procedure DoubleToBcd( const aValue: Double, var bcd: TBcd; overload;

Description

Use DoubleToBcd to convert a Double value into a binary-coded decimal value. DoubleToBcd infers the number of decimal places and significant digits from the specified value aValue, using only as many as necessary. It never sets the number of significant digits to a value greater than 15.

aValue is the value to convert.

bcd returns the resulting BCD value when using the second syntax. When using the first syntax, the BCD value is the return value of the function.


FormatBcd function
 VCL Reference

FormatBcd function

See also

Returns a string representation of a binary-coded decimal (BCD) value that reflects specified formatting.

Unit

FmtBcd

Category

BCD support

function FormatBcd(const Format: string; Bcd: TBcd): string;

Description

Use FormatBcd to convert a binary-coded decimal value into a string.

Format indicates how the resulting string should be formatted. It uses the same format specifiers as pertain to the FormatFloat function.

Bcd is the value to convert to a string.


IntegerToBcd function
 VCL Reference

IntegerToBcd function

See also

Converts an integer value to the corresponding binary-coded decimal (BCD) value.

Unit

FmtBcd

Category

BCD support

function IntegerToBcd( const aValue: Integer): TBcd;

Description

Use IntegerToBcd to convert an integer into a binary-coded decimal value.


IsBcdNegative function
 VCL Reference

IsBcdNegative function

See also

Indicates whether a binary-coded decimal (BCD) value is less than 0.

Unit

FmtBcd

Category

BCD support

function IsBcdNegative(const Bcd: TBcd): Boolean;

Description

IsBcdNegative returns True if Bcd is less than 0, False if Bcd is greater than or equal to 0.


NormalizeBcd function
 VCL Reference

NormalizeBcd function

Converts a BCD value into another BCD value with a specified precision and number of decimals.

Unit

FmtBcd

Category

BCD support

procedure NormalizeBcd(const InBcd: TBcd; var OutBcd: TBcd; const Prec, Scale: Word): Boolean;

Description

Call NormalizeBcd to give a TBcd value a specific precision and number of decimal places. If the specified precision or number of decimal places is less than that of the original BCD value, NormalizeBcd truncates the value (as opposed to rounding).

InBcd is the BCD value to convert.

OutBcd returns the resulting BCD value with the specified precision and decimal places.

Prec is the number of significant digits in OutBcd.

Scale is the number of decimal places in OutBcd.

NormalizeBcd returns True if the conversion can be made with no loss of precision. It returns False if the conversion required some digits to be truncated.


NullBcd constant
 VCL Reference

NullBcd constant

See also

Represents a NULL TBcd value.

Unit

FmtBcd

Category

BCD support

const

  NullBcd : TBcd = (Precision: 0; SignSpecialPlaces: 0; Fraction: (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));

Description

Use NullBcd to indicate an unknown or missing TBcd value. NullBcd is a TBcd record with all its fields set to 0.


StrToBcd function
 VCL Reference

StrToBcd function

See also

Converts a string to the corresponding binary-coded decimal (BCD) value.

Unit

FMTBcd

Category

BCD support

function StrToBcd( const aValue: string): TBcd;

Description

Use StrToBcd to convert a string into a binary-coded decimal value. The decimals and precision are inferred from the digits present in the string.

StrToBcd converts the string specified by aValue and returns the resulting BCD value. If aValue does not represent a value that can be expressed as a TBcd, StrToBcd raises an exception.

Tip:	To convert a string to a Bcd value without raising an exception for invalid strings, use the TryStrToBcd function instead.


TryStrToBcd function
 VCL Reference

TryStrToBcd function

See also

Converts a string to the corresponding binary-coded decimal (BCD) value.

Unit

FMTBcd

Category

BCD support

function TryStrToBcd( const aValue: string; var Bcd: TBcd): Boolean; overload;

Description

Use TryStrToBcd to convert a string into a binary-coded decimal value. The decimals and precision are inferred from the digits present in the string.

TryStrToBcd converts the string specified by aValue and returns the resulting BCD value as Bcd.

TryStrToBcd returns True if it successfully converts aValue to a TBcd value. If aValue can’t be successfully converted to a TBcd value, TryStrToBcd returns False.


VarFMTBcd function
 VCL Reference

VarFMTBcd function

See also

Returns the TVarType constant that identifies the internal type of a Variant as a TBcd value.

Unit

FMTBcd

Category

variant support routines

function VarFMTBcd: TVarType;

Description

VarFMTBcd returns the Variant type code that identifies a TBcd-valued Variant. This is the value that the VarType function returns when the Variant stores its value as a TBcd value.

The Variant type codes for custom Variants are dynamically allocated when the application loads the unit that implements them. VarFMTBcd allows the application to identify the Variant type code that is currently used for custom Variants that represent a BCD value. This type code, however, may not match the type code used by another application that uses a different set of custom Variant types.


VarFMTBcdCreate function
 VCL Reference

VarFMTBcdCreate function

See also

Creates a new Variant that stores its value internally as a TBcd value.

Unit

FMTBcd

Category

variant support routines

procedure VarFMTBcdCreate(var aDest: Variant; const ABcd: TBcd); overload;

function VarFMTBcdCreate: Variant; overload;

function VarFMTBcdCreate(const ABcd: TBcd): Variant; overload;

function VarFMTBcdCreate(const AValue: string, Precision, Scale: SmallInt): Variant; overload;

function VarFMTBcdCreate(const AValue: Double; Precision: SmallInt = 18; Scale: SmallInt = 4): Variant; overload;

Description

Call VarBcdCreate to obtain a Variant that stores its value as a TBcd value.

Using the first syntax, the Variant returned as aDest has the same value as ABcd.

Using the second syntax (passing no arguments), the returned Variant has a value of NullBcd.

Using the third syntax, the returned Variant has the same value as ABcd.

Using the remaining syntaxes, the AValue parameter is converted into a TBcd value with the specified Precision and Scale and the result is the value of the Variant.


VarIsFMTBcd function
 VCL Reference

VarIsFMTBcd function

See also

Indicates whether a specified Variant represents a TBcd value.

Unit

FMTBcd

Category

variant support routines

function VarIsFMTBcd(const aValue: Variant): Boolean; overload;

Description

VarIsBcd returns True if the Variant aValue stores its value internally as a TBcd value. VarIsBcd returns False otherwise.


VarToBcd function
 VCL Reference

VarToBcd function

See also

Converts a Variant into a TBcd type.

Unit

FMTBcd

Category

variant support routines

function VarToBcd(const aValue: Variant): TBcd;

Description

Use VarDoubleAsBcd to obtain a TBcd value from a Variant.

aValue is the Variant to convert.


DayOfWeekStr function
 VCL Reference

DayOfWeekStr function

See also

Converts a TDateTime value into a string representing the day of the week.

Unit

HTTPApp

Category

HTTP utilities

function DayOfWeekStr(DateTime: TDateTime): string;

Description

HTTP message headers permit several formats for the representation of date and time values. DayOfWeekStr converts a TDateTime value into a string representing the day of the week. DayOfWeekStr allows server applications to work with date values taken from HTTP request messages, without worrying about the details of how they are formatted.


DosPathToUnixPath function
 VCL Reference

DosPathToUnixPath function

See also

Converts a DOS-compatible path specification to a Unix-compatible path specification.

Unit

HTTPApp

function DosPathToUnixPath(const Path: string): string;

Description

Use DosPathToUnixPath to convert a path name on the local machine to a path name that can be sent in an HTTP message, or that will be used by a Unix-based application. DosPathToUnixPath converts all backslash characters (\) to forward slashes (/).

The Path parameter is the Dos-compatible path. The return value is the corresponding Unix-compatible path.


ExtractHeaderFields procedure
 VCL Reference

ExtractHeaderFields procedure

See also

Parses a multi-valued string into its constituent fields.

Unit

HTTPApp

Category

HTTP utilities

procedure ExtractHeaderFields(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings; StripQuotes:Boolean=False);

Description

ExtractHeaderFields is a general utility to parse multi-valued HTTP header strings into separate substrings.

Separators is a set of characters that are used to separate individual values within the multi-valued string.

WhiteSpace is a set of characters that are to be ignored when parsing the string.

Content is the multi-valued string to be parsed.

Strings is the TStrings object that receives the individual values that are parsed from Content.

StripQuotes determines whether the surrounding quotes are removed from the resulting items. When StripQuotes is True, surrounding quotes are removed before substrings are added to Strings.

Note:	Characters contained in Separators or WhiteSpace are treated as part of a value substring if the substring is surrounded by single or double quote marks. HTTP escape characters are converted using the HTTPDecode function.


ExtractHTTPFields procedure
 VCL Reference

ExtractHTTPFields procedure

See also

Parses a multi-valued string into its constituent fields.

Unit

HTTPApp

Category

HTTP utilities

procedure ExtractHTTPFields(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings; StripQuotes:Boolean=False);

Description

ExtractHTTPFields is a general utility to parse multi-valued HTTP header strings into separate substrings.

Separators is a set of characters that are used to separate individual values within the multi-valued string.

WhiteSpace is a set of characters that are to be ignored when parsing the string.

Content is the multi-valued string to be parsed.

Strings is the TStrings object that receives the individual values that are parsed from Content.

StripQuotes determines whether the surrounding quotes are removed from the resulting items. When StripQuotes is True, surrounding quotes are removed before substrings are added to Strings.

Note:	Characters contained in Separators or WhiteSpace are treated as part of a value substring if the substring is surrounded by single or double quote marks. HTTP escape characters are converted using the HTTPDecode function.


HTTPDecode function
 VCL Reference

HTTPDecode function

See also

Decodes a string that includes HTTP escape characters.

Unit

HTTPApp

Category

HTTP utilities

function HTTPDecode(const AStr: string): string;

Description

HTTPDecode decodes the escape characters (+ and %) in a string that comes from an HTTP message header. Plus characters (+) are converted into spaces. Percent signs (%) indicate that the next two characters are the hex representation of a character. If a percent sign is followed by another percent sign (%%), it is converted into a single percent sign.

For example, the string

%%+%3f

is converted into

% ?

The AStr parameter is the undecoded string. The return value is the converted version of the string.


HTTPEncode function
 VCL Reference

HTTPEncode function

See also

Converts a string into a form that contains no values that are illegal in an HTTP message header.

Unit

HTTPApp

Category

HTTP utilities

function HTTPEncode(const AStr: String): string;

Description

HTTPEncode converts all characters in the AStr parameter except for the letters A through Z (and a through z), numerals 0 through 9, the asterisk (*), dollar sign ($), exclamation point (!), at sign (@), period (.), underscore (_), single quote (‘), comma (,) parentheses, and hyphen (-). Spaces are converted to plus characters (+), and all other characters are converted into hex values preceded by the percent sign (%).

For example, the string

% ?

is converted into

%%+%3f

HTTPEncode returns the converted string.


MonthStr function
 VCL Reference

MonthStr function

See also

Converts a TDateTime value into a string representing the month.

Unit

HTTPApp

Category

HTTP utilities

function MonthStr(DateTime: TDateTime): string;

Description

HTTP message headers permit several formats for the representation of date and time values. MonthStr converts a TDateTime value into a string representing the month. MonthStr allows server applications to work with date values taken from HTTP request messages, without worrying about the details of how they are formatted.


ParseDate function
 VCL Reference

ParseDate function

See also

Converts a date value from an HTTP message header into a TDateTime value.

Unit

HTTPApp

Category

HTTP utilities

function ParseDate(const DateStr: string): TDateTime;

Description

HTTP message headers permit several formats for the representation of date and time values. ParseDate converts from any of these formats into a TDateTime value. ParseDate allows server applications to work with date values taken from HTTP request messages, without worrying about the details of how they are formatted.

Use ParseDate when interpreting temporal header values in HTTP request messages when they are not already parsed as a property of TWebRequest. TWebRequest parses the Date header and Expires header automatically.


StatusString function
 VCL Reference

StatusString function

See also

Returns the explanatory string associated with one of the predefined HTTP response status codes.

Unit

HTTPApp

Category

HTTP utilities

function StatusString(StatusCode: Integer): string;

Description

The HTTP protocol specification defines a number of standard status codes that indicate the status of an HTTP request message. HTTP applications interpret these status codes, but for human beings, each of these codes has a corresponding string that provides a more understandable indication of the status of the HTTP request.

Call StatusString to obtain the string that corresponds to a standard status code. If the StatusCode parameter is not one of the codes defined in the HTTP standard, StatusString returns an empty string.


UnixPathToDosPath function
 VCL Reference

UnixPathToDosPath function

See also

Converts a Unix-compatible path specification to a Dos-compatible path specification.

Unit

HTTPApp

Category

HTTP utilities

function UnixPathToDosPath(const Path: string): string;

Description

Use UnixPathToDosPath to convert a path name obtained from an HTTP message or other Unix-based application to a path name that can be used by Windows. UnixPathToDosPath converts all forward slashes (/) to backslash characters (\).

The Path parameter is the Unix-compatible path. The return value is the corresponding Dos-compatible path.


GetExtensionVersion function
 VCL Reference

GetExtensionVersion function

See also

Returns the name and version number of an ISAPI or NSAPI application.

Unit

ISAPIApp

Category

HTTP utilities

function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL;

Description

Do not call GetExtensionVersion. ISAPI and NSAPI DLLs export GetExtension to provide an entry point that is called by ISAPI or NSAPI Web servers. This allows the Web server to obtain version information about the web server application.


HTTPExtensionProc function
 VCL Reference

HttpExtensionProc function

See also

Receives an HTTP request message for an ISAPI or NSAPI application.

Unit

ISAPIApp

Category

HTTP utilities

function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD;

Description

Do not call HttpExtensionProc. ISAPI and NSAPI DLLs export HttpExtensionProc to provide an entry point that is called by ISAPI or NSAPI Web servers when they receive HTTP request messages.


TerminateExtension function
 VCL Reference

TerminateExtension function

See also

Indicates whether an ISAPI or NSAPI application is ready to be shut down.

Unit

ISAPIApp

function TerminateExtension(dwFlags: DWORD): BOOL;

Description

Do not call TerminateExtension. TerminateExtension is exported by ISAPI and NSAPI DLLs. It provides an entry point that is called by ISAPI or NSAPI Web servers, when they are ready to shut down the ISAPI or NSAPI application, to check whether it would cause problems to do so.


MatchesMask function
 VCL Reference

MatchesMask function

See also

Indicates whether a file name conforms to the format specified by a filter string.

Unit

Masks

Category

file name utilities

function MatchesMask(const Filename, Mask: string): Boolean;

Description

Call MatchesMask to check the Filename parameter using the Mask parameter to describe valid values. A valid mask consists of literal characters, sets, and wildcards.

Each literal character must match a single character in the string. The comparison to literal characters is case-insensitive.

Each set begins with an opening bracket ([) and ends with a closing bracket (]). Between the brackets are the elements of the set. Each element is a literal character or a range. Ranges are specified by an initial value, a dash (-), and a final value. Do not use spaces or commas to separate the elements of the set. A set must match a single character in the string. The character matches the set if it is the same as one of the literal characters in the set, or if it is in one of the ranges in the set. A character is in a range if it matches the initial value, the final value, or falls between the two values. All comparisons are case-insensitive. If the first character after the opening bracket of a set is an exclamation point (!), then the set matches any character that is not in the set.

Wildcards are asterisks (*) or question marks (?). An asterisk matches any number of characters. A question mark matches a single arbitrary character.

MatchesMask returns True if the string matches the mask. MatchesMask returns false if the string does not match the mask. MatchesMask raises an exception if the mask is syntactically invalid.

Note:	The Filename parameter does not need to be a file name. MatchesMask can be used to check strings against any syntactically correct mask.


VarArrayFromStrings function
 VCL Reference

VarArrayFromStrings function

See also

Creates a Variant array that contains the strings in a TStrings object.

Unit

Provider

Category

Variant support routines

function VarArrayFromStrings(Strings: TStrings): Variant;

Description

Call VarArrayFromStrings to create a Variant array to represent the strings in a TStrings object. VarArrayFromStrings creates a new Variant array of WideString values, where each WideString corresponds to a string in the specified TStrings object.

Strings is the TStrings object that supplies the strings for the Variant array.

VarArrayFromStrings returns the new Variant array.


HandleReconcileError function
 VCL Reference

HandleReconcileError function

See also	Example

Displays a dialog that lets users determine what action to take when an update could not be applied.

Unit

RecError

Category

multi-tier support

function HandleReconcileError(DataSet: TDataSet; UpdateKind: TUpdateKind; ReconcileError: EReconcileError): TReconcileAction;

Description

HandleReconcileError displays a dialog that shows information about a single record that could not be updated. This information includes the values of all fields before the record was edited, the values of the updated record that could not be posted successfully, and (if available) the current values on the server. An error message describes the reason the update failed.

This method is designed to be called from an OnReconcileError handler. It is intended primarily as a debugging tool, although it can be used as part of an application’s user interface.

In the dialog, the user can edit the values of the record to be updated and/or select how the application should proceed. These choices correspond to the possible return values (a TReconcileAction type).

DataSet is a dataset that contains the record that generated an update error. The fields in DataSet must have the NewValue, OldValue, and (ideally) CurValue properties defined. DataSet is available as a parameter to an OnReconcileError event handler.

UpdateKind indicates what type of update (insertion, deletion, or modification) was attempted on the record. This is the operation that failed.

ReconcileError is the exception object that was created when the update attempt failed. It is used to supply the error message that appears in the dialog. This object is available as a parameter to an OnReconcileError event handler.

Note:	Because HandleReconcileError is intended primarily as a debugging aid, the recerror unit in which it appears can’t be found with the rest of the VCL source. Instead, you can find this unit in the objrepos directory.


SetErrorProc function
 VCL Reference

SetErrorProc function

See also

Replaces the exception handler for error messages that are received from a Windows socket connection.

Unit

ScktComp

Category

exception handling routines

type TSocketErrorProc = procedure(ErrorCode: Integer);

function SetErrorProc(ErrorProc: TSocketErrorProc): TSocketErrorProc;

Description

Call SetErrorProc to assign an exception handler for error messages from Windows socket API calls. By default, socket components have no special error handler and simply raise an ESocketError exception when they receive error messages. If an exception handler is assigned using SetErrorProc, the socket component does not raise this exception.

The ErrorProc parameter specifies the exception handler. It is passed the Windows socket error code. Inside this exception handler an application can compensate for the error or raise an exception. Passing a value of nil for the ErrorProc parameter restores the default behavior, where the socket component raises an ESocketError exception.

SetErrorProc returns the current exception handler. This value is nil when SetErrorProc is called for the first time, and is the value of the ErrorProc parameter from the previous invocation of SetErrorProc thereafter.


FreeProcParams procedure
 VCL Reference

FreeProcParams procedure

See also 	Example

Frees a list of procedure parameters that is allocated by GetProcedureParams.

Unit

SqlExpr

Category

Database routines

procedure FreeProcParams(var ProcParams : TList);

Description

Use FreeProcParams to free a list of stored procedure parameters after using them. FreeProcParams takes a single parameter, ProcParams, which is a list of parameter information that was returned from a call to TSQLConnection.GetProcedureParams. It frees all of the parameter records in the list, and then frees the list itself, changing the parameter that was passed in to nil.


GetDriverNames procedure
 VCL Reference

GetDriverNames procedure

See also

Populates a string list with the names of all available dbExpress drivers.

Unit

SqlExpr

Category

Database routines

procedure GetDriverNames(List: TStrings; DesignMode: Boolean = True);

Description

GetDriverNames fills the string list specified by List with the names of all installed dbExpress drivers. GetDriverNames fetches the names of Installed drivers from the drivers.ini file.

List is a string list object, created and maintained by the application, into which to store the driver names.

DesignMode indicates whether the names are fetched at design time (True) or at runtime (False).


LoadParamListItems procedure
 VCL Reference

LoadParamListItems procedure

See also 	Example

Fills a TParams object with information from a list of parameter descriptors.

Unit

SqlExpr

Category

Database routines

procedure LoadParamListItems(Params : TParams; ProcParams : TList);

Description

Call LoadParamListItems to convert the list of parameter descriptors that is returned from TSQLConnection.GetProcedureParams to a collection of TParam objects.

Params is an empty TParams collection that the procedure fills with information from the list of parameter descriptors.

ProcParams is the list of parameter descriptors returned by GetProcedureParams.


Application variable (for service applications)
 VCL Reference

Application variable (for service applications)

Represents a service application for a service project.

Unit

SvcMgr

Category

service applications

var Application: TServiceApplication;

Description

By default, when a new service application project is created, Delphi constructs an application object and assigns it to Application. If the project represents a service application, Application is initialized to a TServiceApplication object.


Application variable (for Web server applications)
 VCL Reference

Application variable (for Web server applications)

See also

Represents a web server application for an Internet project.

Unit

WebBroker

Category

HTTP utilities

var Application: TWebApplication;

Description

By default, when a new Internet server project is created, Delphi constructs an application object and assigns it to Application. If the project represents a CGI or Win-CGI server application, Application is initialized to a TCGIApplication object. If the project represents an ISAPI or NSAPI server application, Application is initialized to a TISAPIApplication object. Which type of TWebApplication object gets created depends on whether the project includes the ISAPIApp unit or the CGIApp unit.


TSavePicture
 VCL Reference

TSavePicture

Hierarchy	Properties	Methods	Events	Using TSavePicture	See also

TSavePicture is the standard action for displaying the save picture dialog.

Unit

ExtActns

Description

Add TSavePicture to an action list to add a graphics “save as” dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the save picture dialog when invoked. Use the OnAccept event to respond after the user selects a file name in the dialog or the OnCancel event to respond when the user cancels from the dialog. In the event handler, you can read the file name from the dialog specified by the Dialog property.


 VCL Reference

TSavePicture properties

TSavePicture	Alphabetically	Legend

In TSavePicture

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSavePicture properties

TSavePicture	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TSavePicture.Dialog
 VCL Reference

TSavePicture.Dialog

TSavePicture 	See also

Provides access the save picture dialog that the action executes.

property Dialog: TSavePictureDialog;

Description

Use Dialog to configure the graphics file “save as” dialog before the action fires or to read the specified file name after the action executes the dialog. For example, you can set the dialog’s default extension or initial file name at design time using the Object Inspector or read the dialog’s FileName property from an OnAccept event handler to use the file name that the user selects.

When using a save picture action, you do not place a TSavePictureDialog component on the form or data module at design time. Instead, you add the TSavePicture object to your action list and then use the Dialog property. The dialog component is created by the TSavePicture constructor.


 VCL Reference

TSavePicture events

TSavePicture	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSavePicture events

TSavePicture	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TSavePicture methods

TSavePicture	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSavePicture methods

TSavePicture	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TSavePicture


TSendMail
 VCL Reference

TSendMail

Hierarchy	Properties	Methods	Events	Using TSendMail	See also

TSendMail is the standard action for sending an email message.

Unit

ExtActns

Description

Add TSendMail to an action list to let your application send email messages in response to user actions. Controls linked to this action cause the application to send a MAPI mail message containing the message specified in the Text property.


 VCL Reference

TSendMail properties

TSendMail	Alphabetically	Legend

In TSendMail

Text

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSendMail properties

TSendMail	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

Text

VCLComObject

Visible


TSendMail.Text
 VCL Reference

TSendMail.Text

TSendMail 	See also

Specifies the content of the mail message.

property Text: TStrings;

Description

Set Text to the content of the mail message. Because Text is a TStrings object, you can use the string list editor at design time to compose the message. Use the TStrings object’s LoadFromFile method to load the value of Text from a file.

When the action executes, TSendMail displays a dialog for the user to compose the mail message. In that dialog, the body of the message is initialized to Text.


 VCL Reference

TSendMail events

TSendMail	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSendMail events

TSendMail	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TSendMail methods

TSendMail	Alphabetically	Legend

In TSendMail

Destroy

ExecuteTarget

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSendMail methods

TSendMail	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TSendMail.ExecuteTarget
 VCL Reference

TSendMail.ExecuteTarget

TSendMail 	See also

Displays a dialog where the user can compose an email message and then sends the message.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter, and displays a dialog where the user can compose an email message. The body of the message is initialized to the value of the Text property. When the user exits the dialog, the message is sent.

ExecuteTarget always spawns a temporary MAPI session for every mail message, which lasts only for the duration of the message. If necessary, the user is prompted with a login dialog.


TSendMail.HandlesTarget
 VCL Reference

TSendMail.HandlesTarget

TSendMail

Indicates whether the action can execute.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

HandlesTarget ignores the Target parameter and always returns True, because the ability to send mail is not dependant on the state of the application.


TSendMail.UpdateTarget
 VCL Reference

TSendMail.UpdateTarget

TSendMail 	See also

Enables the action.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically the application is idle so that actions can update themselves according to current conditions.

In TSendMail, UpdateTarget ignores the Target parameter and always sets the Enabled property to True.


TSendMail.Destroy
 VCL Reference

TSendMail.Destroy

TSendMail	See also

Frees the memory associated with the TSendMail object.

destructor Destroy; override;

Description

Do not explicitly destroy actions. Action objects are created and destroyed by the action manager or action list that uses them.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TSendMail


TServiceApplication
 VCL Reference

TServiceApplication

Hierarchy	Properties	Methods	Using TServiceApplication	See also

TServiceApplication encapsulates a Windows NT service application.

Unit

SvcMgr

Description

TServiceApplication encapsulates a Windows NT application type known as a service. TServiceApplication provides the fundamental behavior of this type of application. Each Service project automatically declares an Application variable of type TServiceApplication as the instance of the application. The Application variable is added to a project by selecting File | New from the menu of the IDE main window and selecting Service Application in the New Items dialog.

TServiceApplication contains TService objects, each of which encapsulates a Windows NT service. The service application object provides methods to create service objects and to install, register, dispatch, and uninstall services.

When the service application is run using the /INSTALL switch, it registers the services it contains. When run using the /UNINSTALL switch, it unregisters its services. Unless the application is run with the /SILENT switch, the service application shows a confirmation message after successfully installing or uninstalling its services.

Note: Do not add the Forms or Httpapp units to the uses list of the project, because those units declare conflicting Application variables of types TApplication and TWebApplication, respectively.


 VCL Reference

TServiceApplication properties

TServiceApplication	Alphabetically	Legend

In TServiceApplication

ServiceCount

Title

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TServiceApplication properties

TServiceApplication	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

ServiceCount

Tag

Title

VCLComObject


TServiceApplication.ServiceCount
 VCL Reference

TServiceApplication.ServiceCount

TServiceApplication	See also

Indicates the number of services in the service application.

property ServiceCount: Integer;

Description

ServiceCount is the number of services in the service application. Each service is encapsulated by a TService instance and has its own dedicated service thread.

Note:	If the Service application requires a user name and password, the application must implement only a single service.


TServiceApplication.Title
 VCL Reference

TServiceApplication.Title

TServiceApplication

Indicates the name of the title application.

property Title: string;

Description

Title is the name of the service application. This text string appears below the icon of the application when it is minimized.


 VCL Reference

TServiceApplication methods

TServiceApplication	Alphabetically	Legend

In TServiceApplication

Create

CreateForm

Destroy

Initialize

Run

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TServiceApplication methods

TServiceApplication	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateForm

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Run

SafeCallException

SetSubComponent

UpdateAction


TServiceApplication.Create
 VCL Reference

TServiceApplication.Create

TServiceApplication

Instantiates a TServiceApplication object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not need to call the constructor directly. TServiceApplication is instantiated by selecting File | New from the menu of the IDE main window and selecting Service Application in the New Items dialog. An Application variable of type TServiceApplication is declared and initialized as the instance of the application.


TServiceApplication.CreateForm
 VCL Reference

TServiceApplication.CreateForm

TServiceApplication

Creates the service object or objects for the service application.

procedure CreateForm(InstanceClass: TComponentClass; var Reference); virtual;

Description

Do not call CreateForm in an application. Delphi’s module manager calls CreateForm internally to register the service objects of the service application.

CreateForm instantiates a TService object for each service contained in the service application. CreateForm is called automatically, for the first service, when the service application is first created. Subsequently, CreateForm is called for each new service added to the application. To add a new service, select File | New from the menu of the IDE main window and choose Service in the New Items dialog.


TServiceApplication.Destroy
 VCL Reference

TServiceApplication.Destroy

TServiceApplication	See also

Disposes of an instance of a TServiceApplication object.

destructor Destroy; override;

Description

You do not need to call the destructor directly. TServiceApplication is destroyed when your application closes.

The destructor frees the memory associated with sub-objects.


TServiceApplication.Initialize
 VCL Reference

TServiceApplication.Initialize

TServiceApplication

Sets the initial state of the application and hides any associated MainForm.

procedure Initialize; virtual;

Description

Initialize sets the initial state of the application to hide any main form that may be associated with the application. Service applications are rarely interactive and do not typically have a form associated with them. If a form has been added to the application, Initialize hides it on start. Initialize then follows the standard (default) VCL application initialization process.


TServiceApplication.Run
 VCL Reference

TServiceApplication.Run

TServiceApplication

Installs, registers, and adds services to its component list, and creates a thread for the service application.

procedure Run; virtual;

Description

Run handles installing and uninstalling services, depending on the command line switches. When the service application is run using the /INSTALL switch, it registers the services it contains. When run using the /UNINSTALL switch, it unregisters its services. Unless the application is run with the /SILENT switch, the service application shows a confirmation message after successfully installing or uninstalling its services.

If not called with the /INSTALL or /UNINSTALL switch, Run creates a service application thread that responds to Windows messages from clients. Note that this thread is for the application and differs from the dedicated TServiceThread instances associated with individual services in the application.


Hierarchy

TObject

TPersistent

TComponent

TServiceApplication


TService
 VCL Reference

TService

Hierarchy	Properties	Methods	Events	Using TService	See also

TService encapsulates a Windows NT service.

Unit

SvcMgr

Description

TService encapsulates a Windows NT service in an NT service application. A Win32 service is accessed via the Service Control Manager and can be started automatically at system boot, by a user through the Services control panel applet, or by a Win32-based application that uses the service functions. Services can execute even when no user is logged on to the system. Windows NT also supports a driver service that does not interact with the SCM.


 VCL Reference

TService properties

TService	Alphabetically	Legend

In TService

AllowPause

AllowStop

Dependencies

DisplayName

ErrCode

ErrorSeverity

Interactive

LoadGroup

Param

ParamCount

Password

ServiceStartName

ServiceThread

ServiceType

StartType

Status

TagID

Terminated

WaitHint

Win32ErrCode

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TService properties

TService	By object	Legend

AllowPause

AllowStop

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Dependencies

DesignInfo

DesignOffset

DesignSize

DisplayName

ErrCode

ErrorSeverity

Interactive

LoadGroup

Name

OldCreateOrder

Owner

Param

ParamCount

Password

ServiceStartName

ServiceThread

ServiceType

StartType

Status

Tag

TagID

Terminated

VCLComObject

WaitHint

Win32ErrCode


TService.AllowPause
 VCL Reference

TService.AllowPause

TService	See also

Indicates whether clients are allowed to pause the service.

property AllowPause: Boolean;

Description

AllowPause indicates whether clients of the service can pause and resume the service by calling the Windows API ControlService function. When AllowPause is True, an OnPause event occurs before the service pauses, and an OnContinue event occurs when the service resumes.


TService.AllowStop
 VCL Reference

TService.AllowStop

TService	See also

Indicates whether clients are allowed to stop the service.

property AllowStop: Boolean;

Description

AllowStop indicates whether clients of the service can stop it by calling the Windows API ControlService function. When AllowStop is True, an OnStop event occurs before the service stops.


TService.Dependencies
 VCL Reference

TService.Dependencies

TService	See also

Lists the services or load ordering groups on which the service depends.

property Dependencies: TDependencies;

Description

Dependencies is a container for TDependency objects, which are dependent services or load ordering groups that must start before this service. If the container is empty, the service has no dependencies.

Dependency on a service means that this service can only run if the service it depends on is running. Dependency on a group means that this service can run if at least one member of the group is running after an attempt to start all members of the group.


TService.DisplayName
 VCL Reference

TService.DisplayName

TService	See also

Identifies the service in the Windows Service Control Manager.

property DisplayName: String;

Description

DisplayName contains a string, with a maximum length of 256 characters, that is the name of the service as displayed in the Service Control Manager. User interface programs use DisplayName to identify the service. DisplayName is case-preserved in the Service Control Manager, however display name comparisons are always case-insensitive.

Note: A dependency can be a service. If this is true, do not confuse the various name-related properties of dependency and service objects. For more information, see Service name properties.


TService.ErrCode
 VCL Reference

TService.ErrCode

TService	See also

Contains the service specific error code returned on starting or stopping the service.

property ErrCode: DWord;

Description

ErrCode specifies a service specific error code that the service returns when an error occurs while the service is starting or stopping. If ErrCode is not defined, the Win32ErrCode property is used instead.


TService.ErrorSeverity
 VCL Reference

TService.ErrorSeverity

TService	See also

Indicates the severity of service startup failure.

type  TErrorSeverity = (esIgnore, esNormal, esSevere, esCritical);

property ErrorSeverity: TErrorSeverity ;

Description

ErrorSeverity indicates the severity if this service fails to start during startup of the service application. The possible values are listed in the following table:

Value	What the startup program does

esIgnore	Logs the error and continues.

esNormal	Logs the error and displays a message, but continues.

esSevere	Logs the error but continues only if the last-known-good configuration is being started; otherwise the last-known-good configuration is started instead.

esCritical	Logs the error and starts up the last-known-good configuration instead. If this is the last-known-good configuration, the startup operation fails.


TService.Interactive
 VCL Reference

TService.Interactive

TService	See also

Indicates whether the service is interactive with the Windows desktop.

property Interactive: Boolean;

Description

Interactive indicates whether the service can interact with the Windows desktop. Interactive only has an effect when ServiceType is stWin32. For more information about creating interactive NT services, see the Microsoft Help.


TService.LoadGroup
 VCL Reference

TService.LoadGroup

TService	See also

Names of the load ordering group that includes the service.

property LoadGroup: String;

Description

LoadGroup is the name of the load-ordering group that includes the service. This is used by other services that have dependencies on the load ordering group (See Dependencies). The registry lists load-ordering groups at HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ServiceGroupOrder. The order in which services are loaded depends on the order of the load groups in the Registry and the dependencies listed in service Dependencies properties.

Because services and service groups share the same name space, the SC_GROUP_IDENTIFIER character must prefix group names to distinguish them from service names. This is automatically prefixed if the TDependency’s IsGroup property is True.

Note: A dependency can be a service. If this is true, do not confuse the various name-related properties of dependency and service objects. For more information, see Service name properties.


TService.Param
 VCL Reference

TService.Param

TService	See also

Lists the parameters to the service.

property Param[Index: Integer]: String;

Description

Param is an indexed property that contains the parameters to the service. These parameters are typed into the Startup Parameters input window in the Service Control Manager.


TService.ParamCount
 VCL Reference

TService.ParamCount

TService	See also

Indicates the number of startup parameters for the service.

property ParamCount: Integer;

Description

ParamCount is the number of parameters for the service. These parameters are typed into the Startup Parameters input window in the Service Control Manager.


TService.Password
 VCL Reference

TService.Password

TService	See also

Specifies the password, optionally used depending upon the ServiceStartName, for accessing the service.

property Password: String;

Description

Password is the password for the account name specified by the ServiceStartName property if the ServiceType is stWin32.

If Password is nil or if it points to an empty string, the service has no password. If ServiceType is stDevice or stFileSystem, this parameter is ignored.


TService.ServiceStartName
 VCL Reference

TService.ServiceStartName

TService	See also

ServiceStartName is the name used in the Service Control Manager Startup dialog to start the service.

property ServiceStartName: String;

Description

ServiceStartName is the name used to start the service.

If ServiceType is stWin32, ServiceStartName is the account name (in the form "DomainName\Username") which the service process is logged on as when it runs. If the account belongs to the built-in domain, ".\Username" can be specified. If the service application includes more than one service, leave ServiceStartName blank, and leave the Password property blank.

If the service type is not stWin32, ServiceStartName is the driver object name (\FileSytems\Rdr or \Driver\Xns) which the input and output system uses to load the device driver. With device drivers or file systems drivers, you can leave ServiceStartName blank and the I/O system will create a default name based on the service name.

Note: A dependency can be a service. If this is true, do not confuse the various name-related properties of dependency and service objects. For more information, see Service name properties.


TService.ServiceThread
 VCL Reference

TService.ServiceThread

TService	See also

Identifies the dedicated thread for the service.

property ServiceThread: TServiceThread;

Description

ServiceThread is the instance of the TServiceThread class that is the dedicated thread for the service. Each service in the service application has a dedicated thread that contains a loop in its Execute method for processing service requests. Often a service will spawn a new thread, derived from TThread, to free the service thread to continue processing service requests.


TService.ServiceType
 VCL Reference

TService.ServiceType

TService	See also

Identifies the type of the service as Win32, device driver, or file system driver.

type TServiceType = (stWin32, stDevice, stFileSystem);

property ServiceType: TServiceType;

Description

ServiceType indicates the type of service. ServiceType can be stWin32 (a Win32 service – the default), stDevice (a device driver), or stFileSystem (a file system driver).


TService.StartType
 VCL Reference

TService.StartType

TService

Indicates when or how the service starts.

type TStartType = (stBoot, stSystem, stAuto, stManual, stDisabled);

property StartType: TStartType;

Description

StartType specifies how and why the service starts. The following table lists the possible values of TStartType:

StartType value	Service is started

stBoot	by the operating system loader
(used only when ServiceType is not stWin32)

stSystem	after boot systems are initialized
(used only when ServiceType is not stWin32)

stAuto	automatically during system startup

stManual	when a process calls the Windows StartService function

stDisabled	the service can’t be started except by an administrator


TService.Status
 VCL Reference

TService.Status

TService	See also

Indicates the current state of the service.

type

TCurrentStatus = (csStopped, csStartPending, csStopPending, csRunning, csContinuePending, csPausePending, csPaused);

property Status: TCurrentStatus;

Description

Status indicates the current state of the service. The status information is displayed in the Service Control Manager. Status can be specified as one of the following values:

Value	Meaning

csStopped	The service is not running.

csStartPending	The service is starting.

csStopPending	The service is stopping.

csRunning	The service is running.

csContinuePending	The service continue is pending.

csPausePending	The service pause is pending.

csPaused	The service is paused


TService.TagID
 VCL Reference

TService.TagID

TService	See also

Specifies a unique tag for the service within its LoadGroup.

property TagID: DWord;

Description

TagID is the unique tag value for this service in its LoadGroup. If no tag is requested, this property is 0. Tags are only evaluated when the ServiceType is not stWin32 and the StartType is stBoot or stSystem.


TService.Terminated
 VCL Reference

TService.Terminated

TService	See also

Indicates whether the service thread has terminated.

property Terminated: Boolean;

Description

Terminated indicates whether the dedicated thread that the service is running in has terminated.


TService.WaitHint
 VCL Reference

TService.WaitHint

TService	See also

Specifies the estimated time, in milliseconds, between a call from the Windows Service Control Manager and the service reporting its status.

property WaitHint: Integer;

Description

WaitHint specifies the amount of time, in milliseconds, that can elapse between a pending start, stop, pause, or continue operation and the service setting its status with a call to the Windows API. Normally this is handled automatically. If the service performs a lengthy operation of more than WaitHint time in one of its event handlers, you should call ReportStatus method to update to the Service Control Manager.


TService.Win32ErrCode
 VCL Reference

TService.Win32ErrCode

TService	See also

Indicates the Win32 error code reported by the service if a service specific code is not defined.

property Win32ErrCode: DWord;

Description

Win32ErrCode specifies a Win32 error code that the service uses to report an error that occurs when it is starting or stopping. If an error code specific to the service is defined, this property is automatically set to ERROR_SERVICE_SPECIFIC_ERROR and the service specific error is reported instead.


 VCL Reference

TService events

TService	Alphabetically	Legend

In TService

AfterInstall

AfterUninstall

BeforeInstall

BeforeUninstall

OnContinue

OnExecute

OnPause

OnShutdown

OnStart

OnStop

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TService events

TService	By object	Legend

AfterInstall

AfterUninstall

BeforeInstall

BeforeUninstall

OnContinue

OnCreate

OnDestroy

OnExecute

OnPause

OnShutdown

OnStart

OnStop


TService.AfterInstall
 VCL Reference

TService.AfterInstall

TService	See also

Occurs immediately after the service is registered with the Windows Service Control manager.

property AfterInstall: TServiceEvent;

Description

Write an AfterInstall event handler to take specific action immediately after the service is registered. Install services by running the service application with the INSTALL switch.


TService.AfterUninstall
 VCL Reference

TService.AfterUninstall

TService	See also

Occurs immediately after the service is removed from the Service Control manager’s database.

property AfterUninstall: TServiceEvent;

Description

Write an AfterUninstall event handler to take specific action immediately after the service is removed. Uninstall services by running the service application with the UNINSTALL switch.


TService.BeforeInstall
 VCL Reference

TService.BeforeInstall

TService	See also

Occurs before the service is first registered with the Windows Service Control manager.

property BeforeInstall: TServiceEvent;

Description

Write a BeforeInstall event handler to take specific action immediately before the service is first registered.  Install services by running the service application with the INSTALL switch.


TService.BeforeUninstall
 VCL Reference

TService.BeforeUninstall

TService	See also

Occurs immediately before the service is removed from the Service Control manager’s database.

property BeforeUninstall: TServiceEvent;

Description

Write a BeforeUninstall event handler to take specific action immediately before the service is removed. Uninstall services by running the service application with the UNINSTALL switch.


TService.OnContinue
 VCL Reference

TService.OnContinue

TService	See also

Occurs when the Service Control manager resumes the service after it has been paused.

type

  TContinueEvent = procedure(Sender: TService; var Continued: Boolean) of object;

property OnContinue: TContinueEvent;

Description

Write an OnContinue event handler to take specific action when the Service Control manager resumes the service after it has been paused. Set Continued to True when the service resumes.


TService.OnExecute
 VCL Reference

TService.OnExecute

TService	See also

Occurs when the thread associated with the service starts up.

property OnExecute: TServiceEvent;

Description

If you are not spawning a new thread to handle individual service requests in an OnStart event handler, this is where you implement the service. When the OnExecute event handler finishes, the service thread terminates. Most OnExecute event handlers contain a loop that calls the service thread’s ProcessRequests method so that other service requests are not locked out.


TService.OnPause
 VCL Reference

TService.OnPause

TService	See also

Occurs when the Service Control manager pauses the service temporarily.

type

  TPauseEvent = procedure(Sender: TService; var Paused: Boolean) of object;

property OnPause: TPauseEvent;

Description

Write an OnPause event handler to take specific action when the service is temporarily paused. Set Paused to True if you have paused the service.


TService.OnShutdown
 VCL Reference

TService.OnShutdown

TService	See also

Occurs when the system running the service application is about to shut down.

property OnShutdown: TServiceEvent;

Description

Write an OnShutdown event handler to take specific action just before the service shuts down. The service application terminates immediately after OnShutdown.


TService.OnStart
 VCL Reference

TService.OnStart

TService	See also

OnStartup occurs when the service first starts up, before the OnExecute event.

type

  TStartEvent = procedure(Sender: TService; var Started: Boolean) of object;

property OnStart: TStartEvent;

Description

This event should be used to initialize the service. For example, if each service request is handled in a separate thread (a good idea if handling the request takes much time) the thread for a request is spawned in an OnStart event handler. Set Started to True if you have started the service.


TService.OnStop
 VCL Reference

TService.OnStop

TService	See also

Occurs when the Service Control manager stops the service.

type

  TStopEvent = procedure(Sender: TService; var Stopped: Boolean) of object;

property OnStop: TStopEvent;

Description

Write an OnStop event handler to take specific action when the service stops. Set Stopped to True if you have stopped the service.


 VCL Reference

TService methods

TService	Alphabetically	Legend

In TService

CreateNew

Destroy

GetServiceController

LogMessage

ReportStatus

Derived from TDataModule

AfterConstruction

BeforeDestruction

Create

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TService methods

TService	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServiceController

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LogMessage

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

ReportStatus

SafeCallException

SetSubComponent

UpdateAction


TService.CreateNew
 VCL Reference

TService.CreateNew

TService	See also

Instantiates and initializes a TService object.

constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); override;

Description

Call CreateNew to instantiate a service object at runtime. Services added at design time are created automatically. The AOwner parameter specifies the TServiceApplication object that is responsible for ultimately freeing the service.The Dummy parameter is not used. Use CreateNew rather than the Create constructor to instantiate a new service object at runtime. CreateNew does not attempt to stream in an associated DFM file that indicates any components added to the service at design time.

CreateNew instantiates a TService object and initializes the following properties:

Property	Value

WaitHint	5000

Interactive	False

ServiceType	stWin32

ErrorSeverity	esNormal

StartType	stAuto

TagID	0

AllowStop	True

AllowPause	True

Create also creates an empty string list of Params and a collection of Dependencies (a single TDependencies object).  These are used for the Params and Dependencies properties.

Some of these values initialized in the constructor are passed as parameters to the Windows API CreateService function.


TService.Destroy
 VCL Reference

TService.Destroy

TService	See also

Disposes of a TService instance.

destructor Destroy; override;

Description

Destroy frees the memory associated with the objects for the Params and Dependencies properties that were created in the constructor, and for the EventLogger object created in the LogMessage method. Then it calls the inherited Destroy.


TService.GetServiceController
 VCL Reference

TService.GetServiceController

TService

Returns the service’s registered handler function.

type TServiceController = procedure(CtrlCode: DWord); stdcall;

function GetServiceController: TServiceController; virtual; abstract;

Description

GetServiceController returns the handler for the service. You do not need to call this function directly. The service object’s main function calls it automatically.

Note: Each service in the service application has a main function for that service. When a request is made to start the service, the main thread of the service calls the RegisterServiceCtrlHandler function to register this control handler function. TService automatically calls RegisterServiceCtrlHandler and returns this handler function. Because this function cannot be a class method (member function), the Service application wizard generates code that creates a non-member handler, (ServiceController) for your service object. This routine returns the service object’s Handler (Controller).


TService.LogMessage
 VCL Reference

TService.LogMessage

TService

Sends an error message to the event log.

procedure LogMessage(Message: String; EventType: DWord = 1; Category: Integer = 0; ID: Integer = 0);

Description

LogMessage sends an error message to the event log when an error or exception occurs. By default the EventType is EVENTLOG_ERROR_TYPE (usually indicating a loss of functionality or data) and the category and ID are zero. For example, if a service cannot be loaded as the system boots, it can log an error event, and the category and ID are zero.

The EventType specifies the type of event being logged. This parameter can be one of the following values:

Value	Meaning

EVENTLOG_ERROR_TYPE	Error event

EVENTLOG_WARNING_TYPE	Warning event

EVENTLOG_INFORMATION_TYPE	Information event

EVENTLOG_AUDIT_SUCCESS 	Success Audit event

EVENTLOG_AUDIT_FAILURE	Failure Audit event

The Category parameter specifies the event category, which is source-specific information and can have any value.

The ID parameter specifies the event identifier, which is the message that goes with this event as an entry in the message file associated with the event source.


TService.ReportStatus
 VCL Reference

TService.ReportStatus

TService	See also

Updates the Service Control Manager's status information for the calling service.

procedure ReportStatus;

Description

ReportStatus sends current status information about the calling service to the Service Control Manager.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TService


TSimpleEvent
 VCL Reference

TSimpleEvent

Hierarchy	Properties	Methods	Using TSimpleEvent	See also

TSimpleEvent represents an unnamed manual event object.

Unit

SyncObjs

Description

Use TSimpleEvent to coordinate between threads that all have access to the same simple event object. TSimpleEvent can also be used in a single-threaded application to coordinate sections of code that respond to different asynchronous events such as system messages or user actions.

Because TSimpleEvent represents an unnamed event object, a single TSimpleEvent object must be within the scope of all code that uses it. To coordinate with code that is out of scope, or with other applications, use a named TEvent object.


 VCL Reference

TSimpleEvent properties

TSimpleEvent	Alphabetically	Legend

Derived from THandleObject

Handle

LastError


 VCL Reference

TSimpleEvent properties

TSimpleEvent	By object	Legend

Handle

LastError


 VCL Reference

TSimpleEvent methods

TSimpleEvent	Alphabetically	Legend

In TSimpleEvent

Create

Derived from TEvent

ResetEvent

SetEvent

WaitFor

Derived from TSynchroObject

Acquire

Release

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSimpleEvent methods

TSimpleEvent	By object	Legend

Acquire

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Release

ResetEvent

SafeCallException

SetEvent

WaitFor


TSimpleEvent.Create
 VCL Reference

TSimpleEvent.Create

TSimpleEvent	See also

Creates a system event object and instantiates a TSimpleEvent object to represent that event.

constructor Create;

Description

Call Create to create a TSimpleEvent object. Create creates a manual, unnamed system event object. The event starts out in an unset state.

The Handle property is initialized to the handle for the system event object.


Hierarchy

TObject

TSynchroObject

THandleObject

TEvent

TSimpleEvent


TSQLMonitor
 VCL Reference

 TSQLMonitor

Hierarchy	Properties	Methods	Events	Using TSQLMonitor	See also

TSQLMonitor intercepts messages that pass between an SQL connection component and a database server and saves them in a string list.

Unit

SqlExpr

Description

Use TSQLMonitor when debugging the communication between your application and a database server. Each TSQLMonitor instance logs the SQL commands from a particular SQL connection component, adding them to a string list. This allows you to see not only the commands you explicitly add to a SQL dataset or SQL connection component, but also any commands that are generated on your behalf, such as those created by a dataset provider. Use the TraceList property to access the list of SQL commands that has already been logged. The TraceList property is automatically updated when the connection component passes a message to the database server.

Note:	TSQLMonitor uses the TraceCallbackEvent property of the SQL connection component whose messages it monitors. If you assign your own callback to that property, the SQL monitor instance will cease to function.


 VCL Reference

TSQLMonitor properties

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

Active

AutoSave

FileName

MaxTraceCount

SQLConnection

TraceCount

TraceList

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLMonitor properties

TSQLMonitor	By object	Legend

Active

AutoSave

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

FileName

MaxTraceCount

Name

Owner

SQLConnection

Tag

TraceCount

TraceList

VCLComObject


TSQLMonitor.Active
 VCL Reference

TSQLMonitor.Active

TSQLMonitor	See also

Starts or stops the monitor from recording SQL commands passed to the database server.

property Active: Boolean;

Description

Set Active to True to start monitoring the communication between SQLConnection and its database server. Set Active to False to stop the monitoring.

When you set Active to True, TSQLMonitor sets the TraceCallbackEvent property of the associated SQL connection component. This causes all commands sent to the database server to be added to the monitor’s string list.

When you set Active to False, TSQLMonitor clears the TraceCallbackEvent property of the associated SQL connection component. No subsequent commands are added to TraceList, but the list is not cleared. That is, any commands currently in the list remain there until you explicitly clear the list.


TSQLMonitor.AutoSave
 VCL Reference

TSQLMonitor.AutoSave

TSQLMonitor	See also

Specifies whether the monitored messages are automatically saved to a file.

property AutoSave: Boolean;

Description

Set AutoSave to True to automatically save all messages to the file specified by the FileName property. The FileName property must be set to a valid file name.

When AutoSave is False, messages are automatically added to TraceList, but are not saved to a file.


TSQLMonitor.FileName
 VCL Reference

TSQLMonitor.FileName

TSQLMonitor	See also

Specifies the default file to which monitored messages are saved.

property FileName: string;

Description

Set FileName to the name of a file to which the messages listed in TraceList are saved. FileName can be a fully-qualified path name.

Once FileName is specified, setting AutoSave to True causes all monitored messages to be automatically saved to the specified file. Even if AutoSave is False, FileName specifies the default file name used by the LoadFromFile and SaveToFile methods when they are called with an empty string for the AFileName parameter.


TSQLMonitor.MaxTraceCount
 VCL Reference

TSQLMonitor.MaxTraceCount

TSQLMonitor	See also

Indicates the maximum number of messages that can be logged.

property MaxTraceCount: Integer;

Description

Set MaxTraceCount to limit the number of messages that can be added to the TraceList property. When MaxTraceCount is 0 or greater, the SQL monitor logs every message until the limit specified by MaxTraceCount. Once that limit has been reached, the SQL monitor discards messages until the number of messages in TraceList has been reduced or the value of MaxTraceCount is changed.

If MaxTraceCount is –1, there is no limit on the number of messages that can be added to TraceList.

If MaxTraceCount is 0, the SQL monitor does not log any messages.

Note:	Setting MaxTraceCount affects whether messages can be added to TraceList, but does not affect messages that have already been logged. Thus, if you set MaxTraceCount to a value less than the number of strings currently in TraceList, the number of logged messages will exceed MaxTraceCount.


TSQLMonitor.SQLConnection
 VCL Reference

TSQLMonitor.SQLConnection

TSQLMonitor	See also

Specifies the connection components whose messages are to be monitored.

property SQLConnection: TSQLConnection;

Description

Set SQLConnection to identify the TSQLConnection component whose communication with a database server you want to monitor.

Note:	Changing the value of SQLConnection automatically sets the Active property to False.


TSQLMonitor.TraceCount
 VCL Reference

TSQLMonitor.TraceCount

TSQLMonitor	See also

Indicates the number of messages currently logged.

property TraceCount: Integer;

Description

TraceCount indicates the number of messages listed by the TraceList property.


TSQLMonitor.TraceList
 VCL Reference

TSQLMonitor.TraceList

TSQLMonitor	See also

Lists the messages that have passed between SQLConnection and the database server.

property TraceList: TStrings;

Description

Use the TraceList property to access the list of SQL commands that has already been logged. While the SQL monitor is active, the TraceList property is automatically updated when the connection component passes a message to the database server.

TraceList is a TStrings descendant. As such, you can use its methods to

Clear the list.

Access the individual commands in the list.

Add your own comments to the list. For example, you may want to indicate when your application initiates certain actions so that you can see clearly what SQL messages correspond to what actions.


 VCL Reference

TSQLMonitor events

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

OnLogTrace

OnTrace


 VCL Reference

TSQLMonitor events

TSQLMonitor	By object	Legend

OnLogTrace

OnTrace


TSQLMonitor.OnLogTrace
 VCL Reference

TSQLMonitor.OnLogTrace

TSQLMonitor	See also	Example

Occurs immediately after a new message is logged to the list.

type TTraceLogEvent = procedure (Sender: TObject; CBInfo: pSQLTRACEDesc) of object;

property OnLogTrace: TTraceLogEvent;

Description

Write an OnLogTrace event handler to respond immediately after a new string is added to the TraceList property. For example, you can use this event to periodically save the contents of the list to a file and clear the list so that it does not get prohibitively long. OnLogTrace occurs after the message is added to TraceList but before the list is saved to a file when AutoSave is True.

Sender is the TSQLMonitor component.

CBInfo describes the message that was just added to TraceList.


TSQLMonitor.OnTrace
 VCL Reference

TSQLMonitor.OnTrace

TSQLMonitor	See also

Occurs when a message is detected but before it is logged to the list.

type TTraceEvent = procedure(Sender: TObject; CBInfo: pSQLTRACEDesc; var LogTrace: Boolean) of object;

property OnTrace: TTraceEvent;

Description

Write an OnTrace event handler to screen or edit messages before they are added to TraceList. OnTrace occurs for every message that passes between the dbExpress driver and the database server.

Sender is the TSQLMonitor component.

CBInfo describes the message that was just intercepted.

LogTrace specifies whether the message is added to the log (the TraceList property). On entry to the event handler, LogTrace is True. Changing this value in the event handler changes whether the message is logged to the TraceList property.


 VCL Reference

TSQLMonitor methods

TSQLMonitor	Alphabetically	Legend

In TSQLMonitor

Create

Destroy

LoadFromFile

SaveToFile

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLMonitor methods

TSQLMonitor	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LoadFromFile

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SaveToFile

SetSubComponent

UpdateAction


TSQLMonitor.Create
 VCL Reference

TSQLMonitor.Create

TSQLMonitor	See also

Creates and initializes new TSQLMonitor object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TSQLMonitor component at runtime. SQL monitors added to forms or data modules at design time are created automatically.

The Owner parameter specifies the component (usually the form or data module) that is responsible for freeing the SQL monitor.


TSQLMonitor.Destroy
 VCL Reference

TSQLMonitor.Destroy

TSQLMonitor	See also

Frees the memory associated with the TSQLMonitor object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which verifies that the SQL monitor instance is not nil before calling Destroy.


TSQLMonitor.LoadFromFile
 VCL Reference

TSQLMonitor.LoadFromFile

TSQLMonitor	See also

Sets the contents of TraceList to the strings contained in a file.

procedure LoadFromFile(AFileName: string);

Description

Call LoadFromFile to initialize the message log with the contents of a file. This method can be used to start the log with standard header information you have saved in a file, or to pre-load the list with a log you saved previously using the SaveToFile method.

AFileName is the file from which to load the contents of the message log. If AFileName is an empty string, LoadFromFile uses the value of the FileName property.

Note:	Any information currently in TraceList is lost when you call LoadFromFile.


TSQLMonitor.SaveToFile
 VCL Reference

TSQLMonitor.SaveToFile

TSQLMonitor	See also	Example

Saves the contents of TraceList to a file.

procedure SaveToFile(AFileName: string);

Description

Call SaveToFile to save all of the currently logged messages to a file.

AFileName specifies the file to which the strings in TraceList are saved. If AFileName is an empty string, SaveToFile uses the value of the FileName property.

Note:	If the AutoSave property is True, SaveToFile is called automatically whenever a message is added to TraceList.


Hierarchy

TObject

TPersistent

TComponent

TSQLMonitor


TSQLQueryTableProducer
 VCL Reference

 TSQLQueryTableProducer

Hierarchy	Properties	Methods	Events	See also

TSQLQueryTableProducer assembles a sequence of HTML commands to display the result set of a query in a tabular format.

Unit

DBXpressWeb

Description

Use TSQLQueryTableProducer to produce an HTML table for the records of a parameterized query. The TSQLQuery object obtains its parameters from an HTTP request message. If the request is a GET message, the parameters for the query are the QueryFields property of the request object. If the request is a POST message, the parameters for the query are the ContentFields property of the request object.

To produce an HTML table for a query that has no parameters, use the TDataSetTableProducer object instead.

Note:	See the WebServ demo for an example of how to use TSQLQueryTableProducer.


 VCL Reference

TSQLQueryTableProducer properties

TSQLQueryTableProducer	Alphabetically	Legend

In TSQLQueryTableProducer

Query

Derived from TDSTableProducer

Caption

CaptionAlignment

Columns

DataSet

Editor

Footer

Header

MaxRows

RowAttributes

TableAttributes

Derived from TCustomContentProducer

Dispatcher

DispatcherComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLQueryTableProducer properties

TSQLQueryTableProducer	By object	Legend

Caption

CaptionAlignment

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSet

DesignInfo

Dispatcher

DispatcherComponent

Editor

Footer

Header

MaxRows

Name

Owner

Query

RowAttributes

TableAttributes

Tag

VCLComObject


TSQLQueryTableProducer.Query
 VCL Reference

TSQLQueryTableProducer.Query

TSQLQueryTableProducer	See also

Specifies the TSQLQuery object that TSQLQueryTableProducer runs to obtain its data.

property Query: TSQLQuery;

Description

Set Query to specify the query to run to obtain the data for the HTML table. Use Query to set the query for the TSQLQueryTableProducer rather than the DataSource property: TSQLQueryTableProducer generates its data source internally.

The individual field bindings specified by the THTMLTableColumn objects in the Columns property refer to fields in DataSet.

Note:	Query is identical to the DataSet property, except Query does not use the TDataSet base class of the query object.


 VCL Reference

TSQLQueryTableProducer events

TSQLQueryTableProducer	Alphabetically	Legend

Derived from TDSTableProducer

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TSQLQueryTableProducer events

TSQLQueryTableProducer	By object	Legend

OnCreateContent

OnFormatCell

OnGetTableCaption


 VCL Reference

TSQLQueryTableProducer methods

TSQLQueryTableProducer	Alphabetically	Legend

In TSQLQueryTableProducer

Content

Derived from TDSTableProducer

BeginUpdate

Create

Destroy

EndUpdate

Derived from TCustomContentProducer

ContentFromStream

ContentFromString

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLQueryTableProducer methods

TSQLQueryTableProducer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Content

ContentFromStream

ContentFromString

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

EndUpdate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSQLQueryTableProducer.Content
 VCL Reference

TSQLQueryTableProducer.Content

TSQLQueryTableProducer	See also

Returns the HTML representation of the records in the dataset.

function Content: string; override;

Description

Call Content to retrieve the HTML representation specified by the properties of the TSQLQueryTableProducer object. Content calls the OnCreateContent event handler. If the OnCreateContent event handler indicates that the Content method should continue, Content returns the Header property, followed by an HTML table image of the records in the dataset, followed by the Footer property. If the OnCreateContent event handler indicates that the Content method should not continue, Content returns an empty string.

The string returned by Content can be used as the Content property of the response to an HTTP request message.


Hierarchy

TObject

TPersistent

TComponent

TCustomContentProducer

TDSTableProducer

TSQLQueryTableProducer


TSQLQuery
 VCL Reference

 TSQLQuery

Hierarchy	Properties	Methods	Events	Using TSQLQuery	See also

TSQLQuery represents a query that is executed using dbExpress.

Unit

SqlExpr

Description

Use TSQLQuery to execute an SQL command on a database server that is accessed via TSQLConnection.  TSQLQuery can represent the results of a SELECT statement or perform actions on the database server using statements such as INSERT, DELETE, UPDATE, ALTER TABLE, and so on. You can add a TSQLQuery component to a form or data module at design time, or create one dynamically at runtime.

TSQLQuery is a unidirectional dataset. Unlike other datasets, unidirectional datasets do not buffer multiple records in memory. Because of this, you can only navigate using the First and Next methods. There is no built-in editing support: you can only edit the data in an SQL query by explicitly creating an SQL UPDATE command or by connecting the dataset to a client dataset using a provider. Features that require buffering multiple records, such as filters or lookup fields, are not available.

Before you can use a TSQLQuery component, it must be connected to the database server. Therefore, the first step to take when working with TSQLQuery is to set the SQLConnection property. Once the query is connected to a server, use the SQL property to specify the command your query executes.


 VCL Reference

TSQLQuery properties

TSQLQuery	Alphabetically	Legend

In TSQLQuery

SQL

Text

Derived from TCustomSQLDataSet

DataSource

DesignerData

IndexDefs

MaxBlobSize

NoMetadata

ParamCheck

Params

Prepared

RecordCount

RowsAffected

SQLConnection

TransactionLevel

Derived from TDataSet

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IsUniDirectional

Modified

Name

ObjectView

RecNo

RecordSize

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSQLQuery properties

TSQLQuery	By object	Legend

Active

AggFields

AutoCalcFields

BlockReadSize

Bof

Bookmark

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DataSetField

DataSource

DefaultFields

Designer

DesignerData

DesignInfo

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

IndexDefs

IsUniDirectional

MaxBlobSize

Modified

Name

NoMetadata

ObjectView

Owner

ParamCheck

Params

Prepared

RecNo

RecordCount

RecordSize

RowsAffected

SparseArrays

SQL

SQLConnection

State

Tag

Text

TransactionLevel

VCLComObject


TSQLQuery.SQL
 VCL Reference

TSQLQuery.SQL

TSQLQuery	See also	Example

Specifies the SQL statement to execute on the database server.

property SQL: TStrings;

Description

Use the properties and methods of SQL to specify the query that should be executed on the database server. If SQL is a SELECT statement, the query executes the statement when you call Open or set the Active property to True. If the statement does not return a result set, call the ExecSQL method to execute the statement.

When you set the SQL property, TSQLQuery checks the statement for parameters and initializes the Params property to reflect any parameters in the statement. You can subsequently use the Params property to adjust the datatype of any parameters and supply values for the parameters.

At design-time, edit the SQL statement using the property editor that appears when you click the ellipsis button for the property in the Object Inspector. At runtime, use properties and methods of TStrings to clear the current contents, add new contents, or to modify existing contents:

SQLQuery1.SQL.Clear;

SQLQuery1.SQL.Add('SELECT ' + Edit1.Text + ' FROM ' + Edit2.Text);

if Length(Edit3.Text) <> 0 then

  SQLQuery1.SQL.Add('ORDER BY ' + Edit3.Text)

You can also use the methods of SQL to load a query from a file.

Note:	The SQL you supply for this property must be valid for the database server to which the TSQLQuery object is connected.


TSQLQuery.Text
 VCL Reference

TSQLQuery.Text

TSQLQuery	See also

Indicates the SQL statement as a single string.

property Text: string;

Description

Use Text as a convenient way to read the entire SQL query as a single string, rather than using the SQL property, which may divide the query into substrings. Text is the same as the Text property of the TStrings object that implements the SQL property.


 VCL Reference

TSQLQuery events

TSQLQuery	Alphabetically	Legend

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLQuery events

TSQLQuery	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TSQLQuery methods

TSQLQuery	Alphabetically	Legend

In TSQLQuery

Create

Destroy

ExecSQL

PrepareStatement

Derived from TCustomSQLDataSet

CreateBlobStream

GetBlobFieldData

GetDetailLinkFields

GetFieldData

GetKeyFieldNames

GetQuoteChar

IsSequenced

ParamByName

SetSchemaInfo

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

BookmarkValid

Cancel

CheckBrowseMode

ClearFields

Close

CompareBookmarks

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

Locate

Lookup

MoveBy

Next

Open

Post

Prior

Refresh

Resync

SetFields

Translate

UpdateCursorPos

UpdateRecord

UpdateStatus

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLQuery methods

TSQLQuery	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

Assign

BeforeDestruction

BookmarkValid

Cancel

CheckBrowseMode

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CompareBookmarks

ControlsDisabled

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableControls

Dispatch

Edit

EnableControls

ExecSQL

ExecuteAction

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyFieldNames

GetNamePath

GetParentComponent

GetQuoteChar

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

ParamByName

Post

PrepareStatement

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

SafeCallException

SetFields

SetSchemaInfo

SetSubComponent

Translate

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TSQLQuery.Create
 VCL Reference

TSQLQuery.Create

TSQLQuery	See also

Creates an instance of a TSQLQuery component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an SQL query component at runtime. SQL queries placed in forms or data modules at design time are created automatically.


TSQLQuery.Destroy
 VCL Reference

TSQLQuery.Destroy

TSQLQuery	See also

Destroys the TSQLQuery instance.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Usually destruction of datasets is handled automatically by Delphi. If an application creates its own instances of a dataset, however, and does not assign an Owner that is responsible for freeing the dataset, then the application should call Free, which verifies that the dataset reference is not nil before calling Destroy.


TSQLQuery.ExecSQL
 VCL Reference

TSQLQuery.ExecSQL

TSQLQuery	See also

Executes a query that does not return a set of records.

function ExecSQL(ExecDirect: Boolean = False): Integer; override;

Description

Call ExecSQL to execute an SQL command that does not return a set of records. This command is a query other than a SELECT query, such as an INSERT, UPDATE, DELETE, or CREATE TABLE query.

ExecDirect indicates that the query does not need to be prepared before it is executed. This parameter can be set to True if the query does not include any parameters. When ExecDirect is False, the query will be prepared before it is executed. Even when ExecDirect is False, you can avoid preparing the query every time ExecSQL is called by setting the Prepared property to True before calling ExecSQL the first time.

ExecSQL returns the number of rows affected by the executed command. This becomes the value of the RowsAffected property.

Note:	Do not use ExecSQL for commands such as SELECT queries that return data. When the command returns data, use the Open method or set the Active property to True.


TSQLQuery.PrepareStatement
 VCL Reference

TSQLQuery.PrepareStatement

TSQLQuery	See also

Prepares the query for execution.

procedure PrepareStatement; override;

Description

PrepareStatement performs most of the necessary tasks for preparing a query to be executed on the server. It ensures the dbExpress and the database server have allocated any resources they need for executing the query and binding its parameters. Any named parameters are temporarily converted to unnamed parameters because dbExpress does not support named parameters.

Do not call PrepareStatement when preparing a query for execution. Instead, set the Prepared property to True. When you use the Prepared property instead, the query keeps track of the fact that it has already been prepared and need not repeat the process every time it executes the query. In addition, when you set the Prepared property, the query initializes internal properties that keep track of the number of rows affected by the query.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TCustomSQLDataSet

TSQLQuery


TSQLResolver
 VCL Reference

TSQLResolver

Hierarchy	Properties	Methods	See also

TSQLResolver applies updates to a database server on behalf of a provider.

Unit

Provider

Description

Provider components use TSQLResolver to apply updates from a client application directly to a database server when their ResolveToDataSet property is False. Otherwise, they use TDataSetResolver.

Do not create instances of TSQLResolver. Provider components create their own TSQLResolver objects for applying updates.


 VCL Reference

TSQLResolver properties

TSQLResolver	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLResolver properties

TSQLResolver	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSQLResolver methods

TSQLResolver	Alphabetically	Legend

In TSQLResolver

Create

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSQLResolver methods

TSQLResolver	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSQLResolver.Create
 VCL Reference

TSQLResolver.Create

TSQLResolver	See also

Creates and initializes an SQL resolver.

constructor Create(AProvider: TDataSetProvider); reintroduce;

Description

Provider components call Create when they need a resolver component for applying updates to a database server. Do not create resolver instances directly. Resolvers are designed to be created and used by providers, and can not function independently of a provider.

The AProvider parameter specifies the provider that creates and uses the resolver.


TSQLResolver.Destroy
 VCL Reference

TSQLResolver.Destroy

TSQLResolver	See also

Destroys an instance of TSQLResolver.

destructor Destroy; override;

Description

Most applications should not delete instances of TSQLResolver. SQL resolvers are freed automatically by the provider components that use them.


Hierarchy

TObject

TPersistent

TComponent

TCustomResolver

TSQLResolver


TStandardAddRemoveItem
 VCL Reference

TStandardAddRemoveItem

Hierarchy	Properties	Methods	See also

TStandardAddRemoveItem is the ActionBand menu class for customizing action bands.

Unit

ActnMenus

Description

TStandardAddRemoveItem is the standard ActionBand menu for customizing action bands at runtime.

Do not create instances of TStandardAddRemoveItem; this will be done for you automatically if the class is the default customization menu. If you would like to replace the standard customization menu, use the class TCustomAddRemoveItem as a parent class for your replacement class. To make the change for your application, set the value of MenuAddRemoveItemClass (a global variable) to your own subclass of TCustomAddRemoveItem instead of TStandardAddRemoveItem.


 VCL Reference

TStandardAddRemoveItem properties

TStandardAddRemoveItem	Alphabetically	Legend

Derived from TCustomMenuItem

Edges

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStandardAddRemoveItem properties

TStandardAddRemoveItem	By object	Legend

Action

ActionBar

ActionClient

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Edges

Enabled

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

Tag

TBDockHeight

TextBounds

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TStandardAddRemoveItem Events

TStandardAddRemoveItem	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardAddRemoveItem Events

TStandardAddRemoveItem	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardAddRemoveItem methods

TStandardAddRemoveItem	Alphabetically	Legend

In TStandardAddRemoveItem

DrawBackground

DrawGlyph

DrawText

Derived from TCustomAddRemoveItem

CalcBounds

Derived from TCustomMenuItem

Click

Create

Destroy

DragDrop

Keyed

Derived from TCustomActionControl

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStandardAddRemoveItem methods

TStandardAddRemoveItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStandardAddRemoveItem.Create
 VCL Reference

TStandardAddRemoveItem.Create

TStandardAddRemoveItem	See also

Creates an instance of TStandardAddRemoveItem.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TStandardAddRemoveItem. However, you should never attempt to instantiate a TStandardAddRemoveItem. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TStandardAddRemoveItem.Destroy
 VCL Reference

TStandardAddRemoveItem.Destroy

TStandardAddRemoveItem	See also

Destroys an instance of TStandardAddRemoveItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TStandardAddRemoveItem.DrawBackground
 VCL Reference

TStandardAddRemoveItem.DrawBackground

TStandardAddRemoveItem	See also

Draws a background image on the customization menu.

procedure DrawBackground(var PaintRect: TRect); override;

Description

This method is largely the same as the inherited method, with some modifications to account for the method of selection. See the inherited method for more details.


TStandardAddRemoveItem.DrawGlyph
 VCL Reference

TStandardAddRemoveItem.DrawGlyph

TStandardAddRemoveItem	See also

Draws a symbol on the control.

procedure DrawGlyph(const Location: TPoint); override;

Description

DrawGlyph performs the same function as the method it inherits from, and it does call the inherited method. The override sets many of the draw parameters based on the present state of the menu and how it has been selected.


TStandardAddRemoveItem.DrawText
 VCL Reference

TStandardAddRemoveItem.DrawText

TStandardAddRemoveItem	See also

Draws text on the control.

procedure DrawText(var ARect: TRect; var Flags: Cardinal; Text: String); override;

Description

DrawText calls the inherited method after setting the font to an appropriate color.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomMenuItem

TStandardAddRemoveItem


TStandardMenuButton
 VCL Reference

TStandardMenuButton

Hierarchy	Properties	Methods	See also

TStandardMenuButton is the standard ActionBand menu button class.

Unit

StdActnMenus

Description

TStandardMenuButton is the standard menu button class. If you would like to replace the standard menu button behaviors, use the class TCustomMenuButton as a parent class for your replacement class. To make the change for your application, set the value of MenuButtonControlClass (a global variable) to your own subclass of TCustomMenuButton instead of TStandardMenuButton.


 VCL Reference

TStandardMenuButton properties

TStandardMenuButton	Alphabetically	Legend

Derived from TCustomButtonControl

AllowAllUp

Down

Flat

State

TrackButton

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStandardMenuButton properties

TStandardMenuButton	By object	Legend

Action

ActionBar

ActionClient

Align

AllowAllUp

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Down

Enabled

Flat

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

State

Tag

TBDockHeight

TextBounds

Top

TrackButton

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TStandardMenuButton Events

TStandardMenuButton	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardMenuButton Events

TStandardMenuButton	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardMenuButton methods

TStandardMenuButton	Alphabetically	Legend

Derived from TCustomMenuButton

Click

Destroy

Keyed

Derived from TCustomButtonControl

CalcBounds

Create

SetBounds

Derived from TCustomActionControl

DragDrop

DrawBackground

DrawGlyph

DrawText

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStandardMenuButton methods

TStandardMenuButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStandardMenuButton.Create
 VCL Reference

TStandardMenuButton.Create

TStandardMenuButton	See also

Creates an instance of TStandardMenuButton.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TStandardMenuButton. However, you should never attempt to instantiate a TStandardMenuButton. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TStandardMenuButton.Destroy
 VCL Reference

TStandardMenuButton.Destroy

TStandardMenuButton	See also

Destroys an instance of TStandardMenuButton.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomButtonControl

TCustomMenuButton

TStandardMenuButton


TStandardMenuItem
 VCL Reference

TStandardMenuItem

Hierarchy	Properties	Methods	See also

TStandardMenuItem is the ActionBand standard menu item.

Unit

StdActnMenus

Description

TStandardMenuItem is the standard ActionBand menu item class.

Do not create instances of TStandardMenuItem, since that will be handled automatically by the Action Manager. If you would like to replace the standard menu item, use the class TCustomMenuItem as a parent class for your replacement class. To make the change for your application, set the value of MenuItemControlClass (a global variable) to your own subclass of TCustomMenuItem instead of TStandardMenuItem.


 VCL Reference

TStandardMenuItem properties

TStandardMenuItem	Alphabetically	Legend

Derived from TCustomMenuItem

Edges

Derived from TCustomActionControl

ActionBar

ActionClient

GlyphLayout

Margins

Selected

Separator

ShowCaption

ShowShortCut

SmallIcon

Spacing

TextBounds

Transparent

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStandardMenuItem properties

TStandardMenuItem	By object	Legend

Action

ActionBar

ActionClient

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Edges

Enabled

Floating

FloatingDockSiteClass

GlyphLayout

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margins

Name

Owner

Parent

Selected

Separator

ShowCaption

ShowHint

ShowShortCut

SmallIcon

Spacing

Tag

TBDockHeight

TextBounds

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TStandardMenuItem Events

TStandardMenuItem	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardMenuItem Events

TStandardMenuItem	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardMenuItem methods

TStandardMenuItem	Alphabetically	Legend

DrawBackground

DrawGlyph

DrawSeparator

DrawText

Derived from TCustomMenuItem

CalcBounds

Click

Create

Destroy

DragDrop

Keyed

Derived from TCustomActionControl

InitiateAction

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStandardMenuItem methods

TStandardMenuItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CalcBounds

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawBackground

DrawGlyph

DrawSeparator

DrawText

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Keyed

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStandardMenuItem.Create
 VCL Reference

TStandardMenuItem.Create

TStandardMenuItem	See also

Creates an instance of TStandardMenuItem.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TStandardMenuItem. However, you should never attempt to instantiate a TStandardMenuItem. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TStandardMenuItem.Destroy
 VCL Reference

TStandardMenuItem.Destroy

TStandardMenuItem	See also

Destroys an instance of TStandardMenuItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TStandardMenuItem.DrawBackground
 VCL Reference

TStandardMenuItem.DrawBackground

TStandardAddRemoveItem	See also

Draws a background image on the customization menu.

procedure DrawBackground(var PaintRect: TRect); override;

Description

This method is largely the same as the inherited method, with some modifications to account for the method of selection. See the inherited method for more details.


TStandardMenuItem.DrawGlyph
 VCL Reference

TStandardMenuItem.DrawGlyph

TStandardAddRemoveItem	See also

Draws a symbol on the control.

procedure DrawGlyph(const Location: TPoint); override;

Description

DrawGlyph performs the same function as the method it inherits from, and it does call the inherited method. The override sets many of the draw parameters based on the present state of the menu and how it has been selected.


TStandardMenuItem.DrawSeparator
 VCL Reference

TStandardMenuItem.DrawSeparator

TStandardAddRemoveItem

Draws a separator.

procedure DrawSeparator(const Offset: Integer); override;

Description

Use DrawSeparator to draw a separator (a horizonal or vertical line) on the menu.


TStandardMenuItem.DrawText
 VCL Reference

TStandardMenuItem.DrawText

TStandardAddRemoveItem	See also

Draws text on the control.

procedure DrawText(var ARect: TRect; var Flags: Cardinal; Text: String); override;

Description

DrawText calls the inherited method after setting the font to an appropriate color.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomActionControl

TCustomMenuItem

TStandardMenuItem


TStandardMenuPopup
 VCL Reference

TStandardMenuPopup

Hierarchy	Properties	Methods 	Events	See also

TStandardMenuPopup is the default menu popup style.

Unit

StdActnMenus

Description

TStandardMenuPopup is the default menu popup style. If you would like to replace it with a style of your own, subclass TCustomActionPopupMenu to provide your own behaviors. To make the change for your application, set the value of MenuPopupClass (a global variable) to your own subclass of TCustomActionPopupMenu instead of TStandardMenuPopup.


 VCL Reference

TStandardMenuPopup properties

TStandardMenuPopup	Alphabetically	Legend

Derived from TCustomActionPopupMenu

ExpandBtn

Derived from TCustomActionMenuBar

AnimationStyle

ExpandDelay

InMenuLoop

ParentControl

RootMenu

Derived from TCustomActionBar

ActionClient

ActionControls

ActionManager

AllowHiding

ContextBar

DesignMode

HorzMargin

HorzSeparator

Items

Orientation

PersistentHotKeys

Spacing

VertMargin

VertSeparator

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStandardMenuPopup properties

TStandardMenuPopup	By object	Legend

Action

ActionClient

ActionControls

ActionManager

Align

AlignDisabled

AllowHiding

Anchors

AnimationStyle

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ContextBar

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DesignMode

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

ExpandBtn

ExpandDelay

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzMargin

HorzSeparator

HostDockSite

InMenuLoop

Items

Left

LRDockWidth

Name

Orientation

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentControl

ParentWindow

PersistentHotKeys

RootMenu

ShowHint

Showing

Spacing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertMargin

VertSeparator

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TStandardMenuPopup Events

TStandardMenuPopup	Alphabetically	Legend

Derived from TCustomActionMenuBar

OnGetPopupClass

OnPopup

Derived from TCustomActionBar

OnControlCreated

OnGetControlClass

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStandardMenuPopup Events

TStandardMenuPopup	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnControlCreated

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetControlClass

OnGetPopupClass

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnPopup

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TStandardMenuPopup methods

TStandardMenuPopup	Alphabetically	Legend

In TStandardMenuPopup

Create

Derived from TCustomActionPopupMenu

CloseMenu

Destroy

Expand

Popup

SetBounds

Derived from TCustomActionMenuBar

TrackMenu

Derived from TCustomActionBar

DragDrop

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStandardMenuPopup methods

TStandardMenuPopup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

CloseMenu

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FindFirst

FindFirstVisibleItem

FindLastVisibleItem

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Popup

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStandardMenuPopup.Create
 VCL Reference

TStandardMenuPopup.Create

TStandardMenuPopup

Creates and initializes a TStandardMenuPopup instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TStandardMenuPopup and initializes its properties.


TStandardMenuPopup.Destroy
 VCL Reference

TStandardMenuPopup.Destroy

TStandardMenuPopup	See also

Destroys an instance of TCustomActionMenuBar.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomActionMenuBar reference is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCustomActionBar

TCustomActionDockBar

TCustomActionMenuBar

TCustomActionPopupMenu

TStandardMenuPopup


TStringsAdapter
 VCL Reference

TStringsAdapter

Hierarchy	Properties	Methods	See also

TStringsAdapter is a helper class used to allow a TStrings object to implement an IStrings interface for use with OLE.

Unit

AxCtrls

Description

Use a strings adapter to adapt a TStrings object so that it supports the IStrings interface. To do so, create the strings adapter by calling the GetOleStrings procedure, passing the TStrings object as a parameter.  Once the strings adapter is instantiated for a TStrings object, the StringsAdapter property of the TStrings object can be used to interact with the TStrings object through an IStrings interface.


 VCL Reference

TStringsAdapter properties

TStringsAdapter	Alphabetically	Legend

Derived from TAutoIntfObject

DispIID

DispIntfEntry

DispTypeInfo

Derived from TInterfacedObject

RefCount


 VCL Reference

TStringsAdapter properties

TStringsAdapter	By object	Legend

DispIID

DispIntfEntry

DispTypeInfo

RefCount


 VCL Reference

TStringsAdapter methods

TStringsAdapter	Alphabetically	Legend

In TStringsAdapter

Create

Derived from TAutoIntfObject

SafeCallException

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName


 VCL Reference

TStringsAdapter methods

TStringsAdapter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TStringsAdapter.Create
 VCL Reference

TStringsAdapter.Create

TStringsAdapter	See also

Creates an instance of the string adapter control.

constructor Create(Strings: TStrings);

Description

Do not call the Create method directly. Instead, call the GetOleStrings procedure to adapt a TStrings object so that it supports the IStrings interface.


Hierarchy

TObject

TInterfacedObject

TAutoIntfObject

TStringsAdapter


TStoredProc
 VCL Reference

 TStoredProc

Hierarchy	Properties	Methods	Events	Using TStoredProc	See also

TStoredProc encapsulates a stored procedure in a BDE-based application.

Unit

DBTables

Description

Use a TStoredProc object in BDE-based applications to use a stored procedure on a database server. A stored procedure is a grouped set of statements, stored as part of a database server’s metadata (just like tables, indexes, and domains), that performs a frequently-repeated, database-related task on the server and passes results to the client.

Note:	Not all database servers support stored procedures. See a specific server’s documentation to determine if it supports stored procedures.

Many stored procedures require a series of input arguments, or parameters, that are used during processing. TStoredProc provides a Params property that enables an application to set these parameters before executing the stored procedure.

TStoredProc reuses the Params property to hold the results returned by a stored procedure. Params is an array of values. Depending on server implementation, a stored procedure can return either a single set of values, or a result set similar to the result set returned by a query.


 VCL Reference

TStoredProc properties

TStoredProc	Alphabetically	Legend

In TStoredProc

Overload

ParamBindMode

ParamCount

Params

Prepared

StoredProcName

Derived from TDBDataSet

AutoRefresh

Database

DatabaseName

DBHandle

DBLocale

DBSession

Handle

SessionName

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

CanModify

ExpIndex

Filter

Filtered

FilterOptions

KeySize

Locale

RecNo

RecordCount

RecordSize

StmtHandle

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

DataSetField

DataSource

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStoredProc properties

TStoredProc	By object	Legend

Active

AggFields

AutoCalcFields

AutoRefresh

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Database

DatabaseName

DataSetField

DataSource

DBHandle

DBLocale

DBSession

DefaultFields

Designer

DesignInfo

Eof

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IsUniDirectional

KeySize

Locale

Modified

Name

ObjectView

Overload

Owner

ParamBindMode

ParamCount

Params

Prepared

RecNo

RecordCount

RecordSize

SessionName

SparseArrays

State

StmtHandle

StoredProcName

Tag

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


TStoredProc.Overload
 VCL Reference

TStoredProc.Overload

TStoredProc	See also

Specifies which Oracle overloaded stored procedure to execute.

property Overload: Word;

Description

Use Overload to specify which overloaded stored procedure to execute on an Oracle server. An Oracle overloaded stored procedure is one that shares a name with one or more other stored procedures. Oracle distinguishes among overloaded stored procedures by assigning each procedure a unique numeric identifier. An application can specify this identifier using the Overload property.

By default, Overload is zero, which assumes there is no procedure overloading. For all servers except Oracle, do not change this value. If an application attempts to access an Oracle overloaded procedure without setting Overload, the Borland Database Engine (BDE) accesses the lowest numbered, or first, overloaded procedure on the server.

If Overload is 1, the BDE executes the first overloaded procedure on the server. If Overload is 2, it executes the second, and so on.

Note:	While Oracle overloaded procedures share names, their parameter lists are unique. An application must ensure that it passes the correct parameter list to an overloaded procedure.


TStoredProc.ParamBindMode
 VCL Reference

TStoredProc.ParamBindMode

TStoredProc	See also

Determines the order in which a component’s parameters are assigned to the parameter list for the stored procedure on the server.

type TParamBindMode = (pbByName, pbByNumber);

property ParamBindMode: TParamBindMode;

Description

Examine or set ParamBindMode to determine the order in which parameters in the Params property are matched to the parameters used by the stored procedure on the server. ParamBindMode can be one of the following:

Value	Ordering

pbByName	Parameters specified in the Params property are matched to identically named parameters on the server. This is the default.

pbByNumber	Parameters in Params are assigned one-by-one to the next available parameter on the server (for example, the first parameter in Params is assigned to the first parameter used by the stored procedure, and so on).

Whenever possible, ParamBindMode should be pbByName. This guarantees that parameters are matched to the correct parameters used by the stored procedure regardless of physical ordering in Params. At design time, the names of known parameters appear in the Parameters editor.

In some cases stored procedures on the server (for example, Informix) do not provide the Borland Database Engine (BDE) with parameter names. If parameter names as they exist on the server side are not known at design or runtime, it may be necessary to set ParamBindMode to pbByNumber. In this case, however, it is necessary to know the correct data type for each parameter in sequence. Otherwise an exception may be raised on execution.


TStoredProc.ParamCount
 VCL Reference

TStoredProc.ParamCount

TStoredProc	See also	Example

Indicates the number of parameters for the stored procedure component.

property ParamCount: Word;

Description

Examine ParamCount to determine the number of parameters currently stored in the Params property.


TStoredProc.Params
 VCL Reference

TStoredProc.Params

TStoredProc	See also	Example

Stores the input and output parameters for a stored procedure.

property Params: TParams;

Description

Access Params at runtime to set input parameter names, values, and data types dynamically (at design time use the Parameters editor to set parameter information). Params is an array of parameter values.

An application can also access Params after executing a stored procedure to retrieve the output parameters returned to the procedure by the server.


TStoredProc.Prepared
 VCL Reference

TStoredProc.Prepared

TStoredProc	See also

Determines whether or not a stored procedure is prepared for execution.

property Prepared: Boolean;

Description

Examine Prepared to determine if a stored procedure is already prepared for execution. If Prepared is True, the stored procedure is prepared, and if Prepared is False, the procedure is not prepared. A stored procedure must be prepared before it can be executed.

Note:	Delphi automatically prepares a stored procedure if it is unprepared when the application calls ExecProc. After execution, Delphi automatically unprepares the stored procedure. If a procedure will be executed a number of times, it is more efficient for the application to prepare the stored procedure once, and unprepare it when it is no longer needed.

An application can change the current setting of Prepared to prepare or unprepare a stored procedure. If Prepared is True, setting it to False calls the Unprepare method to unprepare the stored procedure. If Prepared is False, setting it to True calls the Prepare method to prepare the procedure. Generally, however, it is better programming practice to call Prepare and Unprepare directly. These methods automatically update the Prepared property.


TStoredProc.StoredProcName
 VCL Reference

TStoredProc.StoredProcName

TStoredProc	See also

Identifies the name of the stored procedure on the server for which this object is an encapsulation.

property StoredProcName: String;

Description

Set StoredProcName to specify the name of the stored procedure to call on the server. If StoredProcName does not match the name of an existing stored procedure on the server, then when the application attempts to prepare the procedure prior to execution, an exception is raised.


 VCL Reference

TStoredProc events

TStoredProc	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TStoredProc events

TStoredProc	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TStoredProc methods

TStoredProc	Alphabetically	Legend

In TStoredProc

CopyParams

Create

DescriptionsAvailable

Destroy

ExecProc

GetResults

ParamByName

Prepare

UnPrepare

Derived from TDBDataSet

CheckOpen

CloseDatabase

OpenDatabase

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

CreateBlobStream

DisableConstraints

EnableConstraints

FetchAll

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetFieldData

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetDetailLinkFields

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStoredProc methods

TStoredProc	By object	Legend

ActiveBuffer

AfterConstruction

Append

AppendRecord

ApplyUpdates

Assign

BeforeDestruction

BookmarkValid

Cancel

CancelUpdates

CheckBrowseMode

CheckOpen

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CloseDatabase

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

CopyParams

Create

CreateBlobStream

CursorPosChanged

DefaultHandler

Delete

DescriptionsAvailable

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EnableConstraints

EnableControls

ExecProc

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetResults

GotoBookmark

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

OpenDatabase

ParamByName

Post

Prepare

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Resync

RevertRecord

SafeCallException

SetFields

SetSubComponent

Translate

UnPrepare

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TStoredProc.CopyParams
 VCL Reference

TStoredProc.CopyParams

TStoredProc	See also

Copies a stored procedure’s parameters into another parameter list.

procedure CopyParams(Value: TParams);

Description

Call CopyParams to copy this stored procedure’s parameters into a separate parameter list object. Value is the parameter list into which to assign this stored procedure’s parameters. Value can be the parameter list of another stored procedure. For example:

TStoredProc1.CopyParams(TStoredProc2.Params);

If the stored procedure is not prepared when an application calls CopyParams, CopyParams calls Prepare before assigning the parameters to the target parameters list, and then calls UnPrepare to return the stored procedure to its previous state.


TStoredProc.Create
 VCL Reference

TStoredProc.Create

TStoredProc	See also

Creates an instance of a stored procedure component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a stored procedure declared in an application. Create calls its inherited Create constructor, creates an empty parameter list for the newly instantiated stored procedure, and initializes its parameter, server, and record buffers to nil.


TStoredProc.DescriptionsAvailable
 VCL Reference

TStoredProc.DescriptionsAvailable

TStoredProc	See also

Determines if parameter information is available from the stored procedure on the server.

function DescriptionsAvailable: Boolean;

Description

Call DescriptionsAvailable to determine if a stored procedure on a server can return parameter information to the application. If DescriptionsAvailable returns True, parameter information is available from the server. If DescriptionsAvailable returns False, parameter information is not available.

Note:	If DescriptionsAvailable returns False, the application must still provide correct parameter information to the stored procedure on the server. It is up to the application developer to know the necessary parameters at design time.


TStoredProc.Destroy
 VCL Reference

TStoredProc.Destroy

TStoredProc	See also

Destroys the instance of a stored procedure.

destructor Destroy;

Description

Do not call Destroy directly. Instead, call Free, which verifies that the stored procedure is not nil before calling Destroy.

Destroy disconnects from the server, frees the parameter list, and calls its inherited Destroy destructor.


TStoredProc.ExecProc
 VCL Reference

TStoredProc.ExecProc

TStoredProc	See also	Example

Executes the stored procedure on the server.

procedure ExecProc;

Description

Call ExecProc to execute a stored procedure on the server. Before calling ExecProc:

1	Provide any input parameters in the Params property. At design time, a developer can provide parameters using the Parameters editor. At runtime an application must access Params directly.

2	Call Prepare to bind the parameters.

If a stored procedure returns output parameters, they are stored in the Params property when ExecProc returns control to the application. An application can access the output parameters by indexing into the Params list, or by using the ParamByName method.

Tip:	If an application is only interested in the result set returned by a stored procedure, call StoredProc.Open or set its Active property to True.


TStoredProc.GetResults
 VCL Reference

TStoredProc.GetResults

TStoredProc	See also	Example

Returns the output parameter values from a Sybase or MSSQL stored procedure.

procedure GetResults;

Description

Call GetResults to force a Sybase or MSSQL stored procedure to return its result set, if any, to the client. For stored procedures on all other servers, result sets are automatically flushed to the client, but Sybase and MSSQL stored procedures do not return a result set until the cursor is positioned at the end of the set. GetResults forces the cursor to the end of the set.

If a stored procedure returns a result set and output parameters in response to GetResults, the output parameters are stored in the Params property. An application can access the output parameters by indexing into the Params list, or by using the ParamByName method.

Tip:	If an application is only interested in the result set returned by a stored procedure, call Open or set the Active property to True.


TStoredProc.Handle
 VCL Reference

TStoredProc.Handle

TStoredProc	See also

Specifies the Borland Database Engine (BDE) cursor handle for the stored procedure.

type HDBICur: Longint;

property Handle: HDBICur;

Description

Use Handle only to bypass TStoredProc methods and call directly into the BDE. Many BDE function calls require a cursor handle parameter. Handle is assigned an initial value when a stored procedure is executed. If used with a BDE call that changes the current record position, call Resync immediately after returning from the BDE call.

Note:	Do not use this property unless an application requires BDE functionality not available through built-in components.


TStoredProc.ParamByName
 VCL Reference

TStoredProc.ParamByName

TStoredProc	See also	Example

Accesses parameter information based on a specified parameter name.

function ParamByName(const Value: String): TParam;

Description

Call ParamByName to return parameter information for a specific parameter based on its name. Value is the name of the parameter for which to retrieve information. Typically ParamByName is used to set an input parameter’s value at runtime, or to retrieve the value of an output parameter. The following command line assigns the value "Jane Smith" as the value for the parameter named Contact:

StoredProc1.ParamByName('Contact').AsString := 'Jane Smith';


TStoredProc.Prepare
 VCL Reference

TStoredProc.Prepare

TStoredProc	See also	Example

Prepares a stored procedure for execution.

procedure Prepare;

Description

Call Prepare to bind a stored procedure’s parameters before calling ExecProc to execute the procedure. Prepare readies a stored procedure’s parameters, initializes the Borland Database Engine (BDE), and informs the server of the stored procedure’s readiness. These steps allocate system resources and optimize the query for server performance.

Note:	If an application attempts to execute a stored procedure that has not been prepared, Delphi automatically prepares the procedure before executing it, and then unprepares it when execution is complete. If a stored procedure will be executed more than once, it is more efficient for an application to call Prepare explicitly once to avoid repeated and unnecessary preparing and unpreparing of the stored procedure, and then call UnPrepare when the stored procedure is no longer needed.


TStoredProc.UnPrepare
 VCL Reference

TStoredProc.UnPrepare

TStoredProc	See also

Frees the resources allocated for a previously prepared stored procedure.

procedure UnPrepare;

Description

Call UnPrepare to free the resources allocated for a previously prepared stored procedure on the server and client sides.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TDBDataSet

TStoredProc


TStringField
 VCL Reference

TStringField

Hierarchy	Properties	Methods	Events 	Using TStringField	See also

TStringField represents a string field in a dataset.

Unit

DB

Description

TStringField encapsulates the fundamental behavior common to fields that contain string data. A value of a string field is physically stored as a sequence of up to 8192 characters. However, some table types may only support string fields of smaller dimensions. Common uses for string fields are to store text, such as names and addresses.

If you use the Fields editor at design time to create a persistent field component for the string field, you can access it by name at runtime. When using dynamic field components, you can access the TStringField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TStringField properties

TStringField	Alphabetically	Legend

In TStringField

AsBCD

AsBoolean

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

DataSize

FixedChar

Transliterate

Value

Derived from TField

Alignment

AsCurrency

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TStringField properties

TStringField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FixedChar

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


TStringField.AsBCD
 VCL Reference

TStringField.AsBCD

TStringField	See also

Represents the field’s value as a TBcd value.

property AsBCD: TBcd;

Description

AsBCD provides a property to read the value of the field’s data into a TBcd, or to assign a TBcd value to the contents of the field. If the string field’s value can’t be converted into a TBcd value, reading AsBCD causes TStringField to raise an exception.


TStringField.AsBoolean
 VCL Reference

TStringField.AsBoolean

TStringField	See also

Represents the value of the field as a Boolean value.

property AsBoolean: Boolean;

Description

Use AsBoolean to

Assign the string field value to a Boolean variable.

Assign a Boolean value to the string field.

AsBoolean returns True on reading the value of the field if its text begins with the letters Y, y, T or t (for Yes or True), and False otherwise. Using AsBoolean to write a TStringField's value sets the string to T or F.


TStringField.AsDateTime
 VCL Reference

TStringField.AsDateTime

TStringField	See also

Represents the value of the field as a TDateTime value.

property AsDateTime: TDateTime;

Description

Use AsDateTime to

Assign the string field value to a TDateTime value.

Assign a TDateTime value to the string field.

Reading AsDateTime converts the value of the field to a date-time using the StrToDateTime function. Setting AsDateTime converts the date-time value to a string using the DateTimeToStr function.

Table1StrDateField.AsDateTime := Now;


TStringField.AsFloat
 VCL Reference

TStringField.AsFloat

TStringField	See also

Represents the value of the field as a floating-point (Double) value.

property AsFloat: Double;

Description

Use AsFloat to

Assign the string field value to a floating-point value.

Assign a floating-point value to the string field.

For example, this code assigns a floating-point value to a string field value:

MyStringField.AsFloat := 7.345;

To assign a string field value to a floating-point value, use code similar to this:

FloatVariable := MyStringField.AsFloat;

Reading AsFloat converts the value of the field to a Double using the StrToFloat function. Setting AsFloat converts the floating-point value to a string using the FloatToStr function.


TStringField.AsInteger
 VCL Reference

TStringField.AsInteger

TStringField	See also

Represents the value of the field as an integer value.

property AsInteger: Longint;

Description

Use AsInteger to

Assign the string field value to an integer value.

Assign an integer value to the string field.

For example, this code assigns integer value to a string field value:

MyStringField.AsInteger := 12;

To assign a string field value to an integer value, use code similar to this:

IntegerVariable := MyStringField.AsInteger;

Reading AsInteger converts the value of the field to an integer using the StrToInt function. Setting AsInteger converts the integer to a string using the IntToStr function.


TStringField.AsSQLTimeStamp
 VCL Reference

TStringField.AsSQLTimeStamp

TStringField	See also

Represents the value of the string field as a TSQLTimeStamp record.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Use AsSQLTimeStamp to

Assign a TSQLTimeStamp value to a string field.

Assign the string field value to a TSQLTimeStamp variable.

It is easier to extract time information (such as the year, month, second, and so on) from a TSQLTimeStamp record than from the more common TDateTime type. However, if you intend to perform many calculations with the date-time value, you may want to use the AsDateTime property for the more efficient TDateTime type.


TStringField.AsString
 VCL Reference

TStringField.AsString

TStringField	See also	Example

Represents the value of the field.

property AsString: String;

Description

String values need no conversion, because the native format of a string field is a string. For string fields, AsString is the same as the Value property. AsString provides a uniform interface that allows applications to get or set string values with generic field components when the internal format of the data is not known.

When setting the AsString property, TStringField converts the assigned string from ANSI to the character set used by the dataset, if the Transliterate property is True. Strings that have more characters than permitted by the value of the Size property are truncated when setting AsString.


TStringField.AsVariant
 VCL Reference

TStringField.AsVariant

TStringField	See also

Represents the value of a string field as a Variant value.

property AsVariant: Variant;

 Description

Use AsVariant to

Assign the string field value to Variant variable.

Assign a Variant value to the string field.

Using variants is useful when both the field type and the type of the value to be assigned to the field are unknown.


TStringField.DataSize
 VCL Reference

TStringField.DataSize

TStringField	See also	Example

Indicates amount of memory needed to store the string field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a string field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For string fields, DataSize is one more than the value of the Size property. The characters in the string can take up to Size bytes, and the extra byte is the null character at the end.


TStringField.FixedChar
 VCL Reference

TStringField.FixedChar

TStringField	See also

Specifies whether the represented field is of Char type.

property FixedChar: Boolean;

Description

FixedChar is True when the field in the underlying database is a CHAR type as opposed to VARCHAR.


TStringField.Transliterate
 VCL Reference

TStringField.Transliterate

TStringField	See also

Determines whether text should be converted to and from the character set identified by the dataset.

property Transliterate: Boolean;

Description

Use Transliterate when the physical database table identified by the dataset does not use an ANSI language driver and the data may contain extended ASCII characters.

When Transliterate is True string fields call the dataset’s Translate method to translate ANSI characters to the character set used by the dataset when the string field value is set. When the string field value is read, the Translate method translates the characters in the database table to the ANSI character set.


TStringField.Value
 VCL Reference

TStringField.Value

TStringField	See also

Represents the data in the string field.

property Value: String;

Description

Use Value to read data directly from and write data directly to a string field component at runtime. Using the Value property is the same as using the AsString property. Use Value when you know the field component is a string field. Use AsString when working with a generic field component.

When setting the Value property, TStringField can convert the assigned string from ANSI to the character set used by the dataset, if the Transliterate property is True. Strings that have more characters than permitted by the value of the Size property are truncated when setting Value.


 VCL Reference

TStringField events

TStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TStringField events

TStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TStringField methods

TStringField	Alphabetically	Legend

In TStringField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStringField methods

TStringField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TStringField.Create
 VCL Reference

TStringField.Create

TStringField	See also

Creates an instance of a TStringField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TStringField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftString, Size to 20, and Transliterate to True. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TStringField. After instantiating a TStringField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TStringField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TStringField with a dataset component by setting its DataSet property.

The example below creates a TStringField object for a field named LastName accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TStringField;

begin

  SQLDataSet1.Close;

  T := TStringField.Create(SQLDataSet1);

  T.FieldName := 'LastName';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TStringField


TSynchroObject
 VCL Reference

TSynchroObject

Hierarchy	Methods	See also

TSynchroObject is the base class for all thread synchronization objects.

Unit

SyncObjs

Description

Use TSynchroObject as a base class when defining an object that coordinates the execution of different threads in a multi-threaded application. Synchronization objects include critical sections that temporarily block the execution of other threads which may interfere with the successful completion of a section of code, and event objects that allow threads to signal when critical events have occurred.


 VCL Reference

TSynchroObject methods

TSynchroObject	Alphabetically	Legend

In TSynchroObject

Acquire

Release

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSynchroObject methods

TSynchroObject	By object	Legend

Acquire

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Release

SafeCallException


TSynchroObject.Acquire
 VCL Reference

TSynchroObject.Acquire

TSynchroObject	See also

Provides the interface for a method that devotes the synchronization object to a thread.

procedure Acquire; virtual;

Description

Call Acquire from the thread that needs to use the synchronization object. The Acquire method for TSynchroObject does nothing other than provide the interface for a method that can start the synchronization object working on behalf of the calling thread.


TSynchroObject.Release
 VCL Reference

TSynchroObject.Release

TSynchroObject	See also

Provides the interface for a method to release the synchronization object for use by other threads.

procedure Release; virtual;

Description

Call Release from a thread that is finished using the synchronization object. The Release method for TSynchroObject does nothing other than provide the interface for a method that can unbind the synchronization object from the calling thread.


Hierarchy

TObject

TSynchroObject


TTabAction
 VCL Reference

TTabAction

Hierarchy	Properties	Methods	Events	Using TTabAction	See also

TTabAction is the base class for action objects designed to respond to the buttons in a tabbed dialog.

Unit

ExtActns

Description

TTabAction implements the common behavior for actions that operate on tabbed controls (TCustomTabControl descendants). Each descendant class is designed to perform a specific function in a tabbed dialog such as a wizard. Do not use TTabAction directly in an application. Instead, use a TTabAction descendant such as TNextTab or TPreviousTab.

TTabAction introduces the TabControl property, which specifies the page control or tab control on which this action operates. It ensures that the action is only enabled when the TabControl property is assigned to an enabled TPageControl or TTabControl object.


 VCL Reference

TTabAction properties

TTabAction	Alphabetically	Legend

In TTabAction

SkipHiddenTabs

TabControl

Wrap

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTabAction properties

TTabAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

SkipHiddenTabs

TabControl

Tag

VCLComObject

Visible

Wrap


TTabAction.SkipHiddenTabs
 VCL Reference

TTabAction.SkipHiddenTabs

TTabAction 	See also

Indicates whether the tab action should consider hidden tabbed pages when moving to the next page.

property SkipHiddenTabs: Boolean;

Description

Set SkipHiddenTabs to True if you do not want the action to move to a tab page if its TabVisible property is False. Set SkipHiddenTabs to False if the tab action can move to and make visible a hidden page.

Note:	SkipHiddenTabs only has an effect when the TabControl property identifies a TPageControl object. (TTabControl does not support hidden pages).


TTabAction.TabControl
 VCL Reference

TTabAction.TabControl

TTabAction 	See also

Specifies the target of the action.

property TabControl: TCustomTabControl;

Description

Set TabControl to the control on which the action operates when its ExecuteTarget method is called. Typically, this is a page control or tab control object that implements the pages of a tabbed dialog.

An application must explicitly assign a value to the TabControl property before the TTabAction descendant is enabled. The action does not infer the target page control when it fires.


TTabAction.Wrap
 VCL Reference

TTabAction.Wrap

TTabAction 	See also

Indicates whether the tab action should “wrap” when navigating to the next tab page.

property Wrap: Boolean;

Description

When Wrap is True, the tab action can move previous to the first tabbed page or after the last tabbed page in the associated control. When Wrap is False, an attempt to move beyond the first or last page does not result in any page change, although it still results in a BeforeTabChange and an AfterTabChange event or in an OnFinish event.


 VCL Reference

TTabAction events

TTabAction	Alphabetically	Legend

In TTabAction

AfterTabChange

BeforeTabChange

OnValidateTab

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TTabAction events

TTabAction	By object	Legend

AfterTabChange

BeforeTabChange

OnExecute

OnHint

OnUpdate

OnValidateTab


TTabAction.AfterTabChange
 VCL Reference

TTabAction.AfterTabChange

TTabAction 	See also

Occurs immediately after the action changes the page of the associated tab control.

property AfterTabChange: TNotifyEvent;

Description

Write an AfterTabChange event handler to perform any additional tasks after the tab action changes the current page of the associated tab control. Typically, this event is used to initialize the current page of the tab control.

Note:	AfterTabChange only occurs if the action tries to change the page of the tab control (even if it is not successful). If the action attempts some other task (for example, when TNextPage is on the last page of the tab control), AfterTabChange does not occur.


TTabAction.BeforeTabChange
 VCL Reference

TTabAction.BeforeTabChange

TTabAction 	See also

Occurs immediately before the action changes the page of the associated tab control.

property BeforeTabChange: TNotifyEvent;

Description

Write a BeforeTabChange event handler to perform any additional tasks before the tab action changes the current page of the associated tab control. Typically, this event is used to save or respond to the changes the user made on the current page before it changes.

Note:	BeforeTabChange only occurs if the action tries to change the page of the tab control (even if it is not successful). If the action attempts some other task (for example, when TNextPage is on the last page of the tab control), BeforeTabChange does not occur.


TTabAction.OnValidateTab
 VCL Reference

TTabAction.OnValidateTab

TTabAction 	See also

Occurs when the application is idle or when the action list updates.

type TValidateTabEvent = procedure(Sender: TTabAction; TabControl: TCustomTabControl; var Enabled: Boolean) of object;

property OnValidateTab: TValidateTabEvent;

Description

Use the OnValidateTab event rather than the OnUpdate event to update the properties of a tab action when the application is idle. Unlike the OnUpdate event, which prevents the default behavior of the UpdateTarget method, OnValidateTab occurs after UpdateTarget has set the Enabled property to reflect whether the target tab control is enabled.

OnValidateTab can be used to update any of the properties of the tab action, but it is intended primarily for enabling or disabling the action, depending on the contents of the current page of the target tab control.

Sender is the tab action component to update in this event.

TabControl is the target tab control.

Enabled reflects the Enabled property of this action. Set Enabled in the event handler to enable or disable the action depending on current conditions.


 VCL Reference

TTabAction methods

TTabAction	Alphabetically	Legend

In TTabAction

Create

HandlesTarget

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTabAction methods

TTabAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TTabAction.Create
 VCL Reference

TTabAction.Create

TTabAction	See also

Creates an instance of TTabAction.

constructor Create(AOwner: TComponent); override;

Description

Do not call the TTabAction constructor. Actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TTabAction instance.


TTabAction.HandlesTarget
 VCL Reference

TTabAction.HandlesTarget

TTabAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides an action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

In TTabAction, HandlesTarget ignores the Target parameter, and checks, instead, whether the TabControl property has been set. If a target tab control has been assigned to the TabControl property, HandlesTarget returns True. Otherwise, it returns False.


TTabAction.UpdateTarget
 VCL Reference

TTabAction.UpdateTarget

TTabAction 	See also

Enables or disables the action, depending on the target tab control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to the current conditions.

Target is the potential target object identified by the application.

In TTabAction, UpdateTarget ignores the Target parameter and checks, instead, whether the TabControl property is set. If TabControl identifies an enabled page control or tab control that has more than one page, UpdateTarget sets the Enabled property to True. If not, it sets Enabled to False.

After setting the Enabled property, UpdateTarget generates an OnValidateTab event, where application-specific code can further determine whether the action should be enabled.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TTabAction


THTMLTableAttributes
 VCL Reference

THTMLTableAttributes

Hierarchy	Properties	Methods	Events	Using THTMLTableAttributes	See also

THTMLTableAttributes represents the display attributes of an HTML table tag.

Unit

HTTPProd

Description

Use THTMLTableAttributes to describe the desired appearance of an HTML table. The properties of the THTMLTableAttributes object correspond to the options that can be added to the HTML table tag. When the attributes of all the parts of the HTML table have been specified, an HTML producer object creates the HTML commands to specify the table as described.


 VCL Reference

THTMLTableAttributes properties

THTMLTableAttributes	Alphabetically	Legend

In THTMLTableAttributes

Align

BgColor

Border

CellPadding

CellSpacing

Width

Derived from THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTableAttributes properties

THTMLTableAttributes	By object	Legend

Align

BgColor

Border

CellPadding

CellSpacing

Custom

Producer

Width


THTMLTableAttributes.Align
 VCL Reference

THTMLTableAttributes.Align

THTMLTableAttributes 	See also

Specifies the alignment of the table within the HTML document.

property Align: THTMLAlign;

Description

Set Align to indicate the desired alignment of the table within the HTML document, or within the cell of a surrounding HTML table object. Align indicates the desired value of the Align option of the HTML table tag.

The default value of Align is haDefault, which means the web browser that reads the HTML document positions the HTML table where it wants.


THTMLTableAttributes.BgColor
 VCL Reference

THTMLTableAttributes.BgColor

THTMLTableAttributes	See also

Specifies the background color of the HTML table.

property BgColor: THTMLBgColor;

Description

Use BgColor to indicate the desired background color of the HTML table. The value of BgColor is the name of color. This can be one of the following strings:

Aqua	Black	Blue
Fuschia	Gray	Green
Lime	Maroon	Navy
Olive	Purple	Red
Silver	Teal	White
Yellow
Use the BgColor property of the HTML attributes objects for the pieces of the table for more involved color effects.


THTMLTableAttributes.Border
 VCL Reference

THTMLTableAttributes.Border

THTMLTableAttributes	See also

Specifies the thickness of the border drawn around the HTML table.

property Border: Integer;

Description

Set Border to specify whether a border should be drawn around the table, and if so, how thick it should be. The thickness specified by any particular value of border depends on the web browser that views the HTML table. For any browser, however, larger numbers indicate thicker borders. A value of -1 indicates that no border should be drawn around the table.


THTMLTableAttributes.CellPadding
 VCL Reference

THTMLTableAttributes.CellPadding

THTMLTableAttributes	See also

Specifies the amount of space to leave around the contents of each cell in the HTML table.

property CellPadding: Integer;

Description

Set CellPadding to specify how many pixels of whitespace should appear between a cell’s contents and the edges of the cell. A value of -1 indicates that the web browser should decide how to pad the cells of the HTML table.


THTMLTableAttributes.CellSpacing
 VCL Reference

THTMLTableAttributes.CellSpacing

THTMLTableAttributes	See also

Specifies the amount of space to leave between cells in the HTML table.

property CellSpacing: Integer;

Description

Set CellSpacing to specify how many pixels of whitespace should appear between the cells in the table. A value of -1 indicates that the web browser should decide how to separate the cells of the HTML table.

Note:	CellSpacing refers to the whitespace between cells in an HTML table, not the thickness of the lines drawn to separate rows and columns.


THTMLTableAttributes.Width
 VCL Reference

THTMLTableAttributes.Width

THTMLTableAttributes	See also

Specifies the width of the entire HTML table.

property Width: Integer;

Description

Set Width to indicate the desired width of the HTML table as a percentage of the width of the web browser window. If the value of Width is too small for the contents of the table, the web browser will ignore this property.

The default value of Width is 100, meaning the table will span the entire browser window. In this case, the value of the Align property is meaningless.


 VCL Reference

THTMLTableAttributes events

THTMLTableAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 VCL Reference

THTMLTableAttributes events

THTMLTableAttributes	By object	Legend

OnChange


 VCL Reference

THTMLTableAttributes methods

THTMLTableAttributes	Alphabetically	Legend

In THTMLTableAttributes

AssignTo

Create

RestoreDefaults

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableAttributes methods

THTMLTableAttributes	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException

THTMLTableAttributesTHTMLTableAttributes_Create>main


THTMLTableAttributes.AssignTo
 VCL Reference

THTMLTableAttributes.AssignTo

THTMLTableAttributes	See also

Copies the properties of a THTMLTableAttributes object to another THTMLTableAttributes object.

procedure AssignTo(Dest: TPersistent); override;

Description

Applications cannot call the protected AssignTo method. To assign the properties of a THTMLTableAttributes object to another object, use the Assign method of the destination object.

When the Assign method of another object specifies a THTMLTableAttributes object as the source of the assignment, the AssignTo method of the THTMLTableAttributes object is called. AssignTo checks whether the Dest parameter is another THTMLTableAttributes object, and if so, copies the values of the Align, Border, CellSpacing, CellPadding, and Width properties. If Dest is any other class of object, the inherited method is called.

Note:	AssignTo does not copy the Custom property.


THTMLTableAttributes.Create
 VCL Reference

THTMLTableAttributes.Create

THTMLTableAttributes	See also

Creates an instance of THTMLTableAttributes.

constructor Create(Producer: TCustomContentProducer);

Description

Call Create to create and initialize a THTMLTableAttributes object. The Producer parameter specifies the HTML producer that is using the THTMLTableAttributes object to specify the attributes of an HTML table that makes up part of its output.

After calling the inherited constructor, Create initializes

Width to a value of 100.

Border to a value of -1.

CellPadding to a value of -1.

CellSpacing to a value of -1.


THTMLTableAttributes.RestoreDefaults
 VCL Reference

THTMLTableAttributes.RestoreDefaults

THTMLTableAttributes	See also

Changes all properties of the table attributes object back to their initial settings.

procedure RestoreDefaults; override;

Description

Call RestoreDefaults to undo any changes that were made to the table attributes either programmatically, or using the response editor at design time. RestoreAttributes sets

Align to haDefault.

Border, CellPadding, and CellSpacing to –1.

Custom to an empty string.

Width to 100.


Hierarchy

TObject

TPersistent

THTMLTagAttributes

THTMLTableAttributes


THTMLTableElementAttributes
 VCL Reference

THTMLTableElementAttributes

Hierarchy	Properties	Methods	Events	See also

THTMLTableElementAttributes is the common base class for objects that describe the display attributes of parts of an HTML table.

Unit

HTTPProd

Description

Use the properties of THTMLTableElementAttributes to describe the desired appearance of a piece of an HTML table. The properties of THTMLTableElementAttributes correspond to the common options that can be added to the tags for the parts of the HTML table. When the attributes of all the parts of the HTML table have been specified, an HTML producer object creates the HTML commands to specify the table as described.


 VCL Reference

THTMLTableElementAttributes properties

THTMLTableElementAttributes	Alphabetically	Legend

In THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTableElementAttributes properties

THTMLTableElementAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


THTMLTableElementAttributes.Align
 VCL Reference

THTMLTableElementAttributes.Align

THTMLTableElementAttributes	See also

Specifies the horizontal alignment of the contents of the HTML table element.

property Align: THTMLAlign;

Description

Set Align to indicate the desired horizontal alignment of the contents of the cell or cells indicated by the table element. Align indicates the desired value of the Align option of the HTML tag for the table element.

The default value of Align is haDefault, which means the web browser that reads the HTML document horizontally positions the contents of the table element wherever it wishes.

The Align property of table data cells or header cells overrides the Align property of the table row in which they appear.


THTMLTableElementAttributes.BgColor
 VCL Reference

THTMLTableElementAttributes.BgColor

THTMLTableElementAttributes	See also

Specifies the background color of the HTML table element.

property BgColor: THTMLBgColor;

Description

Use BgColor to indicate the desired background color of the HTML table element. The value of BgColor is the name of color. This can be one of the following strings:

Aqua	Black	Blue

Fuschia	Gray	Green

Lime	Maroon	Navy

Olive	Purple	Red

Silver	Teal	White

Yellow

Use the BgColor property of the THTMLTableAttributes object to set a background color for the entire table. Use the BgColor property of the table element attributes object to make a table element stand out from the rest of the table.


THTMLTableElementAttributes.VAlign
 VCL Reference

THTMLTableElementAttributes.VAlign

THTMLTableElementAttributes	See also

Specifies the vertical alignment of the contents of the HTML table element.

property VAlign: THTMLVAlign;

Description

Set VAlign to indicate the desired vertical alignment of the contents of the HTML table element. VAlign indicates the desired value of the VAlign option of the HTML tag for the table element.

The default value of VAlign is haVDefault, which means the web browser that reads the HTML document positions the contents of cells in the table element wherever it wishes vertically.

The VAlign property of table data cells or header cells overrides the VAlign property of the table row in which they appear.


 VCL Reference

THTMLTableElementAttributes events

THTMLTableElementAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 VCL Reference

THTMLTableElementAttributes events

THTMLTableElementAttributes	By object	Legend

OnChange


 VCL Reference

THTMLTableElementAttributes methods

THTMLTableElementAttributes	Alphabetically	Legend

In THTMLTableElementAttributes

AssignTo

RestoreDefaults

Derived from THTMLTagAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableElementAttributes methods

THTMLTableElementAttributes	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


THTMLTableElementAttributes.AssignTo
 VCL Reference

THTMLTableElementAttributes.AssignTo

THTMLTableElementAttributes	See also

Copies the properties of a THTMLTableElementAttributes object to another THTMLTableElementAttributes object.

procedure AssignTo(Dest: TPersistent); override;

Description

Applications can not call the protected AssignTo method. To assign the properties of a THTMLTableElementAttributes object to another object, use the Assign method of the destination object.

When the Assign method of another object specifies a THTMLTableElementAttributes object as the source of the assignment, the AssignTo method of the THTMLTableElementAttributes object is called. AssignTo checks whether the Dest parameter is another THTMLTableElementAttributes object, and if so, copies the values of the BgColor, Align, and VAlign properties. If Dest is any other class of object, the inherited method is called.

Note:	AssignTo does not copy the Custom property.


THTMLTableElementAttributes.RestoreDefaults
 VCL Reference

THTMLTableElementAttributes.RestoreDefaults

THTMLTableElementAttributes	See also

Changes all properties of the attributes object back to their initial settings.

procedure RestoreDefaults; override;

Description

Call RestoreDefaults to undo any changes that were made to the table element attributes either programmatically, or using the Object Inspector at design time. RestoreAttributes sets

Align to haDefault, and VAlign to haVDefault.

BgColor to an empty string.

Custom to an empty string.


Hierarchy

TObject

TPersistent

THTMLTagAttributes

THTMLTableElementAttributes


TTable
 VCL Reference

 TTable

Hierarchy	Properties	Methods	Events	Using TTable	See also

TTable encapsulates a database table.

Unit

DBTables

Description

Use TTable to access data in a single database table using the Borland Database Engine (BDE). TTable provides direct access to every record and field in an underlying database table, whether it is from Paradox, dBASE, Access, FoxPro, an ODBC-compliant database, or an SQL database on a remote server, such as InterBase, Oracle, Sybase, MS-SQL Server, Informix, or DB2. A table component can also work with a subset of records within a database table using ranges and filters.

At design time, create, delete, update, or rename the database table connected to a TTable by right-clicking on the TTable and using the pop-up menu.


 VCL Reference

TTable properties

TTable	Alphabetically	Legend

In TTable

CanModify

DataSource

DefaultIndex

Exclusive

Exists

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexFiles

IndexName

KeyExclusive

KeyFieldCount

MasterFields

MasterSource

ReadOnly

StoreDefs

TableLevel

TableName

TableType

Derived from TDBDataSet

AutoRefresh

Database

DatabaseName

DBHandle

DBLocale

DBSession

Handle

SessionName

UpdateMode

Derived from TBDEDataSet

BlockReadSize

CacheBlobs

CachedUpdates

ExpIndex

Filter

Filtered

FilterOptions

KeySize

Locale

RecNo

RecordCount

RecordSize

UpdateObject

UpdateRecordTypes

UpdatesPending

Derived from TDataSet

Active

AggFields

AutoCalcFields

Bof

Bookmark

Constraints

DataSetField

DefaultFields

Designer

Eof

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Found

IsUniDirectional

Modified

Name

ObjectView

SparseArrays

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTable properties

TTable	By object	Legend

Active

AggFields

AutoCalcFields

AutoRefresh

BlockReadSize

Bof

Bookmark

CacheBlobs

CachedUpdates

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Database

DatabaseName

DataSetField

DataSource

DBHandle

DBLocale

DBSession

DefaultFields

DefaultIndex

Designer

DesignInfo

Eof

Exclusive

Exists

ExpIndex

FieldCount

FieldDefList

FieldDefs

FieldList

Fields

FieldValues

Filter

Filtered

FilterOptions

Found

Handle

IndexDefs

IndexFieldCount

IndexFieldNames

IndexFields

IndexFiles

IndexName

IsUniDirectional

KeyExclusive

KeyFieldCount

KeySize

Locale

MasterFields

MasterSource

Modified

Name

ObjectView

Owner

ReadOnly

RecNo

RecordCount

RecordSize

SessionName

SparseArrays

State

StoreDefs

TableLevel

TableName

TableType

Tag

UpdateMode

UpdateObject

UpdateRecordTypes

UpdatesPending

VCLComObject


TTable.CanModify
 VCL Reference

TTable.CanModify

TTable	See also

Indicates whether an application can insert, edit, and delete data in a table.

property CanModify: Boolean;

Description

Check the status of CanModify to determine if an application can modify a dataset in any way. If CanModify is True, the dataset can be modified. If CanModify is False, the table is read-only.

CanModify is set automatically when an application opens a table. If the ReadOnly property of a table component is True, then CanModify is set to False. CanModify can also be False because

Another application currently has exclusive write access to the table.

The table is read-only by database design.

Note:	Even if CanModify is True, it is not a guarantee that a user will be able to insert or update records in a table. Other factors may come in to play, for example, SQL access privileges.


TTable.DataSource
 VCL Reference

TTable.DataSource

TTable	See also

Provides read-only access to the data source for the master dataset when this table is the detail of a master/detail relationship.

property DataSource: TDataSource;

Description

DataSource is a read-only version of the MasterSource property.


TTable.DefaultIndex
 VCL Reference

TTable.DefaultIndex

TTable	See also

Specifies if the data in the table should be ordered on a default index when opened.

property DefaultIndex: Boolean;

Description

When this property is set to False, the BDE does not use an ORDER BY clause when opening a table on a SQL server. When DefaultIndex is True, the BDE attempts to order the data based on the primary key or a unique index when opening the table. DefaultIndex defaults to True.


TTable.Exclusive
 VCL Reference

TTable.Exclusive

TTable	See also	Example

Enables an application to gain sole access to a Paradox or dBASE table.

property Exclusive: Boolean;

Description

Use Exclusive to prevent other applications from accessing a Paradox or dBASE table while it is open in this application. Before opening the table, set Exclusive to True. A table must be closed before changing the Exclusive property.

When Exclusive is True, then when the application successfully opens the table, no other application can access it. If the table for which the application has requested exclusive access is already in use by another application, an exception is raised. To handle such exceptions, wrap the code that opens the table in a try..except block.

Do not set Exclusive to True at design time if you also set the Active property to True at design time. In this case an exception is raised because the table is already in use by the IDE.

Note:	An application can attempt to set Exclusive to True for SQL tables, but some SQL servers do not support exclusive table-locking. Others may grant an exclusive read/write lock, but still permit read-only access to other applications. For more information about exclusive locking of database tables for a specific server, see the server’s documentation.


TTable.Exists
 VCL Reference

TTable.Exists

TTable	See also	Example

Indicates whether the underlying database table exists.

property Exists: Boolean;

Description

Read Exists at runtime to determine whether a database table exists. If the table does not exist, create a table from the field definitions and index definitions using the CreateTable method.

This property is read-only.


TTable.IndexDefs
 VCL Reference

TTable.IndexDefs

TTable	See also	Example

Contains information about the indexes for a table.

property IndexDefs: TIndexDefs;

Description

IndexDefs is a collection of index definitions, each of which describes an available index for the table. Define the index definitions of a table before calling CreateTable or creating a table at design time.

Ordinarily, an application accesses or specifies indexes at runtime through the IndexFieldNames or IndexFields properties.

If IndexDefs is updated or manually edited, the StoreDefs property becomes True.

Note:	The index definitions in IndexDefs may not always reflect the current indexes available for a table. Before examining IndexDefs, call its Update method to refresh the list.


TTable.IndexFieldCount
 VCL Reference

TTable.IndexFieldCount

TTable	See also	Example

Indicates the number of fields that comprise the current key.

property IndexFieldCount: Integer;

Description

Examine IndexFieldCount to determine the number of fields that comprise the current index. For indexes based on a single column, IndexFieldCount returns 1. For multi-column indexes, IndexFieldCount indicates the number of fields upon which the index is based.


TTable.IndexFieldNames
 VCL Reference

TTable.IndexFieldNames

TTable	See also

Lists the columns to use as an index for a table.

property IndexFieldNames: String;

Description

Use IndexFieldNames as an alternative method of specifying the index to use for a table. In IndexFieldNames, specify the name of each column to use as an index for a table. Ordering of column names is significant. Separate names with semicolon.

For Paradox and dBASE any column names specified in IndexFieldNames must already be indexed. This must be a single index using the same fields in the same order as specified in IndexFieldNames.

For SQL-based tables, the specified columns need not be indexed.

Note:	The IndexFieldNames and IndexName properties are mutually exclusive. Setting one clears the other.


TTable.IndexFields
 VCL Reference

TTable.IndexFields

TTable	See also	Example

Lists the fields of the current index.

property IndexFields: [Index: Integer]: TField;

Description

IndexFields is a zero-based array of field objects, each of which corresponds to a field in the current index. Index is an ordinal value indicating the position of a field in the index. The first field in the index is IndexFields[0], the second is IndexFields[1], and so on.

Note:	Do not set IndexFields directly. Instead use the IndexFieldNames property to order datasets on the fly at runtime.


TTable.IndexFiles
 VCL Reference

TTable.IndexFiles

TTable	See also

Specifies one or more dBASE index file to use for a dBASE table that uses non-production indexes.

property IndexFiles: TStrings;

Description

Use IndexFiles to specify dBASE non-production index files and dBASE III PLUS-style .NDX indexes to use with the table. Set IndexFiles to the name of the non-production .MDX file. All index tags in the file become available for activation. This is as opposed to the index tags for a production index that become available automatically on opening the table. When using dBASE III PLUS-style .NDX indexes, add individual files to the list in the IndexFiles property. Both types of indexes become accessible through such means as the IndexName property and the TTable.GetIndexNames method.

When index files are added to the list of available indexes, the table component opens them. The indexes are updated as data is added to, changed in, or deleted from the table. When files are removed from the list, the table component closes them, and they are no longer maintained.

Note:	At design time, use the Object Inspector to add or remove index file names for the IndexFiles property. At runtime, set IndexFiles as a string list.


TTable.IndexName
 VCL Reference

TTable.IndexName

TTable	See also	Example

Identifies a secondary index for the table.

property IndexName: String;

Description

Use IndexName to specify an alternative index for a table. If IndexName is empty, a table’s sort order is based on its default index, or, for dBASE tables, on its physical record order.

If IndexName contains a valid index name, then that index determines the sort order of records. For dBASE tables, an index name supplied to the IndexName property must either reside in the table's master index file, or in another index file already specified in the IndexFiles property.

Note:	IndexFieldNames and IndexName are mutually exclusive. Setting one clears the other.


TTable.KeyExclusive
 VCL Reference

TTable.KeyExclusive

TTable	See also	Example

Specifies how the upper and lower boundaries for a range should be interpreted.

property KeyExclusive: Boolean;

Description

Use KeyExclusive to specify whether a range includes or excludes the records that match the starting and ending values of the range. By default, KeyExclusive is False meaning that matching values are included.

To restrict a range to those records that are greater than the specified starting value and less than the specified ending value, set KeyExclusive to True.


TTable.KeyFieldCount
 VCL Reference

TTable.KeyFieldCount

TTable	See also

Specifies the number of fields to use when conducting a partial key search on a multi-field key.

property KeyFieldCount: Integer;

Description

Use KeyFieldCount to limit a search based on a multi-field key to a consecutive subset of those fields. For example, if the primary key for a dataset consists of three-fields, a partial-key search can be conducted using only the first field in the key by setting KeyFieldCount to 1. If KeyFieldCount is 0, the dataset searches on all fields in the key.

Note:	Searches are only conducted based on consecutive key fields beginning with the first field in the key. For example if a key consists of three fields, an application can set KeyFieldCount to 1 to search on the first field, 2 to search on the first and second fields, or 3 to search on all fields. By default KeyFieldCount is initially set to include all fields in a search.


TTable.MasterFields
 VCL Reference

TTable.MasterFields

TTable	See also	Example

Specifies one or more fields in a master table to link with corresponding fields in this table in order to establish a master-detail relationship between the tables.

property MasterFields: String;

Description

Use MasterFields after setting the MasterSource property to specify the names of one or more fields to use in establishing a detail-master relationship between this table and the one specified in MasterSource.

MasterFields is a string containing one or more field names in the master table. Separate field names with semicolons.

Each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this table for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two tables.


TTable.MasterSource
 VCL Reference

TTable.MasterSource

TTable	See also	Example

Specifies the name of the data source for a dataset to use as a master table in establishing a detail-master relationship between this table and another one.

property MasterSource: TDataSource;

Description

Use MasterSource to specify the name of the data source component whose DataSet property identifies a dataset to use as a master table in establishing a detail-master relationship between this table and another one.

Note:	At design time choose an available data source from the MasterSource property’s drop-down list in the Object Inspector.

After setting the MasterSource property, specify which fields to use in the master table by setting the MasterFields property. At runtime each time the current record in the master table changes, the new values in those fields are used to select corresponding records in this table for display.

Note:	At design time, use the Field Link designer to establish the master-detail relationship between two tables.


TTable.ReadOnly
 VCL Reference

TTable.ReadOnly

TTable	See also

Specifies whether a table is read-only for this application.

property ReadOnly: Boolean;

Description

Use the ReadOnly property to prevent users from updating, inserting, or deleting data in the table. By default, ReadOnly is False, meaning users can potentially alter a table’s data.

Note:	Even if ReadOnly is False, users may not be able to modify or add data to a table. Other factors, such as insufficient SQL privileges for the application or its current user may prevent successful alterations.

To guarantee that users cannot modify or add data to a table,

1	Set the Active property to False.

2	Set ReadOnly to True.

When ReadOnly is True, the table’s CanModify property is False.


TTable.StoreDefs
 VCL Reference

TTable.StoreDefs

TTable	See also

Indicates whether the table's field and index definitions persist with the data module or form.

property StoreDefs: Boolean;

Description

If StoreDefs is True, the table's index and field definitions are stored with the data module or form. Setting StoreDefs to True makes the CreateTable method into a one-step procedure that creates fields, indexes, and validity checks at runtime.

StoreDefs is False by default. It becomes True whenever FieldDefs or IndexDefs is updated or edited manually; to prevent edited (or imported) definitions from being stored, reset StoreDefs to False.


TTable.TableLevel
 VCL Reference

TTable.TableLevel

TTable	See also

Specifies the Borland Database Engine (BDE) driver-dependent table level.

property TableLevel: Integer;

Description

Use TableLevel when creating a table to specify that the table associated with this dataset requires a specific level of BDE driver. If TableLevel is 0, the default, this property is ignored.

For more information about BDE driver table level specification, see the online BDE help file, BDE32.HLP.


TTable.TableName
 VCL Reference

TTable.TableName

TTable	See also	Example

Indicates the name of the database table that this component encapsulates.

property TableName: TFileName;

Description

Use TableName to specify the name of the database table this component encapsulates. To set TableName to a meaningful value, the DatabaseName property should already be set. If DatabaseName is set at design time, then select a valid table name from the TableName drop-down list in the Object Inspector.

Note:	To set TableName, the Active property must be False.


TTable.TableType
 VCL Reference

TTable.TableType

TTable	See also	Example

Indicates the database table structure for the table that this component represents.

type TTableType = (ttDefault, ttParadox, ttDBase, ttASCII, ttFoxPro);

property TableType: TTableType;

Description

Use TableType to specify the database table structure for a dBASE, Paradox, FoxPro or ASCII table. TableType does not apply to tables for remote SQL servers. TableType can be set to any of the following values:

Value	Meaning

ttDefault	(Default) Determine table type based on file extension for the table.

ttParadox	Table is a Paradox table.

ttDBase	Table is a dBASE table.

ttFoxPro	Table is a FoxPro table.

ttASCII	Table is a text file with comma-delimited, quoted strings for each field

If TableType is set to ttDefault, the table's file-name extension determines the table type:

Extension	Meaning

DB or none	Paradox table

DBF	dBASE table

TXT	ASCII table

If TableType is ttParadox, ttDBase, ttFoxPro or ttASCII, the table type is assumed to be of the type specified, regardless of the table’s file name extension.


 VCL Reference

TTable events

TTable	Alphabetically	Legend

Derived from TBDEDataSet

OnUpdateError

OnUpdateRecord

Derived from TDataSet

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError


 VCL Reference

TTable events

TTable	By object	Legend

AfterCancel

AfterClose

AfterDelete

AfterEdit

AfterInsert

AfterOpen

AfterPost

AfterRefresh

AfterScroll

BeforeCancel

BeforeClose

BeforeDelete

BeforeEdit

BeforeInsert

BeforeOpen

BeforePost

BeforeRefresh

BeforeScroll

OnCalcFields

OnDeleteError

OnEditError

OnFilterRecord

OnNewRecord

OnPostError

OnUpdateError

OnUpdateRecord


 VCL Reference

TTable methods

TTable	Alphabetically	Legend

In TTable

AddIndex

ApplyRange

BatchMove

CancelRange

CloseIndexFile

Create

CreateTable

DeleteIndex

DeleteTable

Destroy

EditKey

EditRangeEnd

EditRangeStart

EmptyTable

FindKey

FindNearest

GetDetailLinkFields

GetIndexNames

GotoCurrent

GotoKey

GotoNearest

LockTable

OpenIndexFile

RenameTable

SetKey

SetRange

SetRangeEnd

SetRangeStart

UnlockTable

Derived from TDBDataSet

CheckOpen

CloseDatabase

OpenDatabase

Derived from TBDEDataSet

ApplyUpdates

BookmarkValid

Cancel

CancelUpdates

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

CreateBlobStream

DisableConstraints

EnableConstraints

FetchAll

FlushBuffers

GetBlobFieldData

GetCurrentRecord

GetFieldData

GetIndexInfo

IsSequenced

Locate

Lookup

Post

RevertRecord

Translate

UpdateStatus

Derived from TDataSet

ActiveBuffer

Append

AppendRecord

CheckBrowseMode

ClearFields

Close

ControlsDisabled

CursorPosChanged

Delete

DisableControls

Edit

EnableControls

FieldByName

FindField

FindFirst

FindLast

FindNext

FindPrior

First

FreeBookmark

GetBookmark

GetDetailDataSets

GetFieldList

GetFieldNames

GotoBookmark

Insert

InsertRecord

IsEmpty

IsLinkedTo

Last

MoveBy

Next

Open

Prior

Refresh

Resync

SetFields

UpdateCursorPos

UpdateRecord

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTable methods

TTable	By object	Legend

ActiveBuffer

AddIndex

AfterConstruction

Append

AppendRecord

ApplyRange

ApplyUpdates

Assign

BatchMove

BeforeDestruction

BookmarkValid

Cancel

CancelRange

CancelUpdates

CheckBrowseMode

CheckOpen

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearFields

Close

CloseDatabase

CloseIndexFile

CommitUpdates

CompareBookmarks

ConstraintCallBack

ConstraintsDisabled

ControlsDisabled

Create

CreateBlobStream

CreateTable

CursorPosChanged

DefaultHandler

Delete

DeleteIndex

DeleteTable

Destroy

DestroyComponents

Destroying

DisableConstraints

DisableControls

Dispatch

Edit

EditKey

EditRangeEnd

EditRangeStart

EmptyTable

EnableConstraints

EnableControls

ExecuteAction

FetchAll

FieldAddress

FieldByName

FindComponent

FindField

FindFirst

FindKey

FindLast

FindNearest

FindNext

FindPrior

First

FlushBuffers

Free

FreeBookmark

FreeInstance

FreeNotification

FreeOnRelease

GetBlobFieldData

GetBookmark

GetCurrentRecord

GetDetailDataSets

GetDetailLinkFields

GetFieldData

GetFieldList

GetFieldNames

GetIndexInfo

GetIndexNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GotoBookmark

GotoCurrent

GotoKey

GotoNearest

HasParent

InheritsFrom

InitInstance

Insert

InsertComponent

InsertRecord

InstanceSize

IsEmpty

IsImplementorOf

IsLinkedTo

IsSequenced

Last

Locate

LockTable

Lookup

MethodAddress

MethodName

MoveBy

NewInstance

Next

Open

OpenDatabase

OpenIndexFile

Post

Prior

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

RenameTable

Resync

RevertRecord

SafeCallException

SetFields

SetKey

SetRange

SetRangeEnd

SetRangeStart

SetSubComponent

Translate

UnlockTable

UpdateAction

UpdateCursorPos

UpdateRecord

UpdateStatus


TTable.AddIndex
 VCL Reference

TTable.AddIndex

TTable	See also	Example

Creates a new index for the table.

procedure AddIndex(const Name, Fields: String; Options: TIndexOptions, const DescFields: String='');

Description

Call AddIndex to create a new index for the already-existing table associated with a dataset component. The index created with this procedure is added to the database table underlying the dataset component.

Name is the name of the new index. Name must contain an index name that is valid for the particular database type used (naming rules vary from one database type to another).

Fields is a String value containing the field or fields on which the new index will be based. If more than one field is used, separate the field names in the list with semicolons.

Options is a set of attributes for the index. The Options parameter may contain any one, multiple, or none of the TIndexOptions constants: ixPrimary, ixUnique, ixDescending, ixCaseInsensitive, and ixExpression. Not all database systems will necessarily support all of these options. Even within a particular table type, any given option may only be supported in certain versions of a table type. Consult the documentation for the particular database system used to determine which options are and are not supported. See the topic for the TIndexOptions type for definitions of individual constants and the implications of their use.

DescFields is a string containing a list of field names, separated by semicolons. The fields specified in DescFields are the fields in the new index for which the ordering will be descending. Fields in the index definition but not in the DescFields list use the default ascending ordering. It is possible that a single index can have fields using both ascending and descending ordering.

Table1.AddIndex('MostPaid', 'CustNo;SaleDate;AmountPaid', [ixCaseInsensitive], 'SaleDate;AmountPaid');

Warning:	Attempting to create an index using options that are not applicable to the table type causes AddIndex to raise an exception.

dBASE tables only support primary indexes and true unique indexes when the table level is 7 or higher (concurrent with Visual dBASE 7). dBASE tables do not support case-insensitive indexes at all. You must use the ixExpression constant when the index is based on multiple fields or uses dBASE Data Manipulation Language (DML) functions (that is, for expression indexes). Multi-field dBASE indexes cannot be created simply with a list of field names (separated by semicolons) in the Fields parameter of AddIndex. The ixExpression constant is only applicable to dBASE tables.

Paradox tables support the ixDescending option for secondary indexes if the table level is 7 or higher and ixUnique if the table level is 5 or higher. The ixDescending and ixCaseInsensitive constants are not applicable to primary indexes.

For other table types, see the vendor-supplied documentation for the particular database system for details on what index options are applicable.


TTable.ApplyRange
 VCL Reference

TTable.ApplyRange

TTable	See also	Example

Applies a range to the dataset.

procedure ApplyRange;

Description

Call ApplyRange to cause a range established with SetRangeStart and SetRangeEnd, or EditRangeStart and EditRangeEnd, to take effect. When a range is in effect, only those records that fall within the range are available to the application for viewing and editing.

After a call to ApplyRange, the cursor is left on the first record in the range.


TTable.BatchMove
 VCL Reference

TTable.BatchMove

TTable	See also

Moves records from a dataset into this table.

function BatchMove(ASource: TBDEDataSet; AMode: TBatchMode): Longint;

Description

Call BatchMove to

Copy records from another table into this table.

Update records in this table that occur in another table.

Append records from another table to the end of this table.

Delete records in this table that occur in another table.

ASource is a dataset component containing the records to import or (if deleting) match. The AMode parameter indicates what operation to perform (copy, update, append, or delete). This table is the destination of the batch operation.

BatchMove returns the number of records operated on.


TTable.CancelRange
 VCL Reference

TTable.CancelRange

TTable	See also	Example

Removes any ranges currently in effect for the table.

procedure CancelRange;

Description

Call CancelRange to remove a range currently applied to a table. Canceling a range reenables access to all records in the dataset.


TTable.CloseIndexFile
 VCL Reference

TTable.CloseIndexFile

TTable	See also

Closes a specified dBASE non-production index file.

procedure CloseIndexFile(const IndexFileName: String);

Description

Call CloseIndexFile to shut down a specified dBASE non-production index file. IndexFileName is the name of the file to close, and is either the name of an index file previously opened with a call to OpenIndexFile or previously opened because the file’s name is listed in the IndexFiles property.

Once closed, non-production index files are no longer maintained. Subsequent changes made to the dataset are not reflected in the index.


TTable.Create
 VCL Reference

TTable.Create

TTable	See also

Creates an instance of a table component.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a table declared in an application if it was not placed on a form or data module at design time. Create calls its inherited  constructor, creates an empty index definitions list, creates an empty data link, and creates an empty list of index files.


TTable.CreateTable
 VCL Reference

TTable.CreateTable

TTable	See also	Example

Builds a new table using new structure information.

procedure CreateTable;

Description

Call CreateTable at runtime to create a table using this dataset’s current definitions. If the table already exists, CreateTable overwrites the table’s structure and data. To avoid overwriting an existing table, check the Exists property before calling CreateTable.

If the FieldDefs property contains values, these values are used to create field definitions. Otherwise the Fields property is used. One or both of these properties must contain values in order to create a database table.

If the IndexDefs property contain values, these values are used to create indexes on the table.


TTable.DeleteIndex
 VCL Reference

TTable.DeleteIndex

TTable	See also

Deletes a secondary index for the table.

procedure DeleteIndex(const Name: String);

Description

Call DeleteIndex to remove a secondary index for a table. Name is the name of the index to delete. DeleteIndex cannot remove a primary index.

Note:	To delete an index, an application must first open the table for exclusive access.


TTable.DeleteTable
 VCL Reference

TTable.DeleteTable

TTable	See also	Example

Deletes an existing database table.

procedure DeleteTable;

Description

Call DeleteTable to delete an existing database table associated with the table component through its DatabaseName and TableName properties. A table must be closed before it can be deleted.

Warning:	Deleting a table erases any data the table contains and destroys the table’s structure information.


TTable.Destroy
 VCL Reference

TTable.Destroy

TTable	See also

Destroys the instance of a table.

destructor Destroy;

Description

Do not call Destroy directly. Instead, call Free, which verifies that the table is not nil before calling Destroy. Destroy frees the index files list for the table, frees its data link, frees its index definitions, and then calls its inherited destructor.


TTable.EditKey
 VCL Reference

TTable.EditKey

TTable	See also	Example

Enables modification of the search key buffer.

procedure EditKey;

Description

Call EditKey to put the dataset in dsSetKey state while preserving the current contents of the current search key buffer. To determine current search keys, you can use the IndexFields property to iterate over the fields used by the current index.

EditKey is especially useful when performing multiple searches where only one or two field values among many change between each search.


TTable.EditRangeEnd
 VCL Reference

TTable.EditRangeEnd

TTable	See also	Example

Enables changing the ending value for an existing range.

procedure EditRangeEnd;

Description

Call EditRangeEnd to change the ending value for an existing range. To specify an end range value, call FieldByName after calling EditRangeEnd. After assigning a new ending value, call ApplyRange to activate the modified range.

Note:	With Paradox or dBASE tables, EditRangeEnd works only on indexed fields. With SQL databases, EditRangeEnd also works with any columns specified in the IndexFieldNames property.


TTable.EditRangeStart
 VCL Reference

TTable.EditRangeStart

TTable	See also	Example

Enables changing the starting value for an existing range.

procedure EditRangeStart;

Description

Call EditRangeStart to change the starting value for an existing range. To specify a start range value, call FieldByName after calling EditRangeStart. After assigning a new ending value, call ApplyRange to activate the modified range.

Note:	With Paradox or dBASE tables, EditRangeStart works only on indexed fields. With SQL databases, EditRangeStart also works with any columns specified in the IndexFieldNames property.


TTable.EmptyTable
 VCL Reference

TTable.EmptyTable

TTable	See also	Example

Deletes all records from the table.

procedure EmptyTable;

Description

The EmptyTable method deletes all records from the database table specified by the DatabaseName and TableName properties.

Note:	Deletion of records can fail if the user lacks sufficient privileges to perform the delete operation.


TTable.FindKey
 VCL Reference

TTable.FindKey

TTable	See also

Searches for a record containing specified field values.

function FindKey(const KeyValues: array of const): Boolean;

Description

Call FindKey to search for a specific record in a dataset. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, a null, or nil. If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be null. In the statement below, the FindKey method is used to find the table row with the value "'Princess Island SCUBA" in the index field.

Table1.FindKey(['Princess Island SCUBA']);

For Paradox and dBASE tables, the key must always be an index, which can be specified in the IndexName property. If IndexName is empty, FindKey uses the table’s primary index. Note that FindKey does not work with dBASE expression indexes. Use the GotoKey or GotoNearest method instead.

For SQL tables, the key may correspond to a specified index in IndexName, or to a list of field names in the IndexFieldNames property.

If the search is successful, FindKey positions the cursor on the matching record and returns True. Otherwise the cursor is not moved, and FindKey returns False.


TTable.FindNearest
 VCL Reference

TTable.FindNearest

TTable	See also	Example

Moves the cursor to the record that most closely matches a specified set of key values.

procedure FindNearest(const KeyValues: array of const);

Description

Call FindNearest to move the cursor to a specific record in a dataset or to the first record in the dataset that is greater than the values specified in the KeyValues parameter. KeyValues contains a comma-delimited array of field values, called a key. Each value in the key can be a literal, a variable, a NULL value, or nil. If the number of values passed in KeyValues is less than the number of columns in the index used for the search, the missing values are assumed to be null.  In the statement below, the FindKey method is used to find the table row with the value "'Princess Island SCUBA" in the index field.

Table1.FindNearest(['Princess Island SCUBA']);

For Paradox and dBASE tables, the key must always be an index, which can be specified in the IndexName property. If IndexName is empty, FindNearest uses the table’s primary index. Note that FindKey does not work with dBASE expression indexes. Use the GotoKey or GotoNearest method instead.

For SQL tables, the key may correspond to a specified index in IndexName, or to a list of field names in the IndexFieldNames property.

FindNearest positions the cursor either on a record that exactly matches the search criteria, or on the first record whose values are greater than those specified in the search criteria. If there are no records that match or exceed the specified criteria, FindNearest positions the cursor on the last record in the table. KeyExclusive affects the boundary conditions of ranges and will affect the record selected by FindNearest.


TTable.GetDetailLinkFields
 VCL Reference

TTable.GetDetailLinkFields

TTable	See also

Lists the field components that link this dataset as a detail of a master dataset.

procedure GetDetailLinkFields(MasterFields, DetailFields: TList); override;

Description

GetDetailLinkFields fills two lists of TFields that define a master-detail relationship between this table and another (master) dataset. The MasterFields list is filled with fields from the master table whose values must equal the values of the fields in the DetailFields list. The DetailFields list is filled with fields from the calling dataset.


TTable.GetIndexNames
 VCL Reference

TTable.GetIndexNames

TTable	See also

Retrieves a list of available indexes for a table.

procedure GetIndexNames(List: TStrings);

Description

Call GetIndexNames to retrieve a list of all available indexes for a table. List is a string list object, created and maintained by the application, into which to retrieve the index names.

Table1.GetIndexNames(ListBox1.Items);


TTable.GotoCurrent
 VCL Reference

TTable.GotoCurrent

TTable	See also

Synchronizes the current record for this table with the current record of a specified table component.

procedure GotoCurrent(Table: TTable);

Description

Call GotoCurrent to synchronize the cursor position for this table with the cursor position in another dataset that uses a different data source component, but which is connected to the same underlying database table. Table is the name of the table component whose cursor position to use for synchronizing.

Note:	This procedure works only for table components that have the same DatabaseName and TableName properties. Otherwise, GotoCurrent raises an exception.

GotoCurrent is mainly for use in applications that have two table components that are linked to the same underlying database table through different data source components. It enables an application to ensure that separate views of the data appear to be linked.


TTable.GotoKey
 VCL Reference

TTable.GotoKey

TTable	See also	Example

Moves the cursor to a record specified by the current key.

function GotoKey: Boolean;

Description

Use GotoKey to move to a record specified by key values assigned with previous calls to SetKey or EditKey and actual search values indicated in the Fields property.

If GotoKey finds a matching record, it positions the cursor on the record and returns True. Otherwise the current cursor position remains unchanged, and GotoKey returns False.

For Paradox and dBASE tables, the key must always be an index, which can be specified in the IndexName property. If IndexName is empty, GotoKey uses the table’s primary index. GotoKey works with dBASE expression indexes.

For SQL tables, the key may correspond to a specified index in IndexName, or to a list of field names in the IndexFieldNames property.


TTable.GotoNearest
 VCL Reference

TTable.GotoNearest

TTable	See also	Example

Moves the cursor to the record that most closely matches the current key.

procedure GotoNearest;

Description

Call GotoNearest to position the cursor on the record that is either the exact record specified by the current key values in the key buffer, or on the first record whose values exceed those specified.  If there are no records that match or exceed the specified criteria, GotoNearest positions the cursor on the last record in the table.

Before calling GotoNearest, an application must specify key values by calling SetKey or EditKey to put the dataset is dsSetKey state, and then use FieldByName to populate the key buffer property with search values.

For Paradox and dBASE tables, the key must always be an index, which can be specified in the IndexName property. If IndexName is empty, GotoNearest uses the table’s primary index. GotoNearest works with dBASE expression indexes.

For SQL tables, the key may correspond to a specified index in IndexName, or to a list of field names in the IndexFieldNames property.

Note:	KeyExclusive determines which records are considered part of a search range.


TTable.LockTable
 VCL Reference

TTable.LockTable

TTable	See also

Locks a Paradox or dBASE table.

procedure LockTable(LockType: TLockType);

Description

Call LockTable to lock a Paradox or dBASE table to prevent other applications from placing a particular type of lock on the table. LockType specifies the lock requested by this application.

Requesting a read lock prevents other applications from reading a table. Requesting a write lock prevents other application from writing to a table.

An application can request both types of lock by calling LockTable twice, once for each lock type.


TTable.OpenIndexFile
 VCL Reference

TTable.OpenIndexFile

TTable	See also

Opens a specified dBASE non-production index file.

procedure OpenIndexFile(const IndexFileName: String);

Description

Call OpenIndexFile to open a specified dBASE non-production index file. IndexFileName is the name of the file to open. OpenIndexFile opens the file and adds its name to the list of index files in the IndexFiles property.

While a non-production index file is open, it is maintained.


TTable.RenameTable
 VCL Reference

TTable.RenameTable

TTable	See also

Renames the Paradox or dBASE table associated with this table component.

procedure RenameTable(const NewTableName: String);

Description

Call RenameTable to give a new name to the Paradox or dBASE table underlying this table component. RenameTable renames the table and any support files (for example, Paradox .DB and .MB files).


TTable.SetKey
 VCL Reference

TTable.SetKey

TTable	See also	Example

Enables setting of keys and ranges for a dataset prior to a search.

procedure SetKey;

Description

Call SetKey to put the dataset into dsSetKey state and clear the current contents of the key buffer. The FieldByName method can then be used to supply a new set of search values prior to conducting a search.

Note:	To modify an existing key or range, call EditKey.


TTable.SetRange
 VCL Reference

TTable.SetRange

TTable	See also	Example

Sets the starting and ending values of a range, and applies it.

procedure SetRange(const StartValues, EndValues: array of const);

Description

Call SetRange to specify a range and apply it to the dataset. The new range replaces the currently applied range, if any.

StartValues indicates the field values that designate the first record in the range.

EndValues indicates the field values that designate the last record in the range.

SetRange combines the functionality of SetRangeStart, SetRangeEnd, and ApplyRange in a single procedure call. SetRange performs the following functions:

1	Puts the dataset into dsSetKey state.

2	Erases any previously specified starting range values and ending range values.

3	Sets the start and end range values.

4	Applies the range to the dataset.

If either StartValues or EndValues has fewer elements than the number of fields in the current index, then the remaining entries are set to NULL.

After a call to SetRange, the cursor is left on the first record in the range.

Note:	With Paradox or dBASE tables, SetRange works only on indexed fields. With SQL databases, SetRange also works with any columns specified in the IndexFieldNames property.


TTable.SetRangeEnd
 VCL Reference

TTable.SetRangeEnd

TTable	See also	Example

Indicates that subsequent assignments to field values specify the end of the range of rows to include in the dataset.

procedure SetRangeEnd;

Description

Call SetRangeEnd to put the dataset into dsSetKey state, erase any previous end range values, and set them to NULL. Subsequent key buffer field assignments can be made using the FieldByName method to set the ending values for a range.

After assigning end-range values to FieldValues, call ApplyRange to activate the modified range.

Note:	With Paradox or dBASE tables, SetRangeEnd works only on indexed fields. With SQL databases, SetRangeEnd also works with any columns specified in the IndexFieldNames property.


TTable.SetRangeStart
 VCL Reference

TTable.SetRangeStart

TTable	See also	Example

Indicates that subsequent assignments to field values specify the start of the range of rows to include in the dataset.

procedure SetRangeStart;

Description

Call SetRangeStart to put the dataset into dsSetKey state, erase any previous start range values, and set them to NULL. Subsequent field assignments to the FieldValues property indicate the actual set of starting values for a range.

After assigning start-range values to FieldValues, call ApplyRange to activate the modified range.

Note:	With Paradox or dBASE tables, SetRangeStart works only on indexed fields. With SQL databases, SetRangeStart also works with any columns specified in the IndexFieldNames property.


TTable.UnlockTable
 VCL Reference

TTable.UnlockTable

TTable	See also

Removes a previously applied lock on a Paradox or dBASE table.

procedure UnlockTable(LockType: TLockType);

Description

Call UnlockTable to remove a lock previously applied to a Paradox or dBASE table. LockType specifies the lock to remove.

Removing a read lock enables other applications to read a table. Removing a write lock enables other application to write to a table.

An application can remove both types of lock by calling UnlockTable twice, once for each lock type.


Hierarchy

TObject

TPersistent

TComponent

TDataSet

TBDEDataSet

TDBDataSet

TTable


THTMLTableRowAttributes
 VCL Reference

THTMLTableRowAttributes

Hierarchy	Properties	Methods	Events	See also

THTMLTableRowAttributes represents the display attributes of the row tag in an HTML table.

Unit

HTTPProd

Description

Use THTMLTableRowAttributes to describe the desired appearance of a row of an HTML table. The properties of the THTMLTableRowAttributes object correspond to the options that can be added to the HTML row tag (TR). When the attributes of all the parts of the HTML table have been specified, the content producer creates the HTML commands to specify the table as described.


 VCL Reference

THTMLTableRowAttributes properties

THTMLTableRowAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

Align

BgColor

VAlign

Derived from THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTableRowAttributes properties

THTMLTableRowAttributes	By object	Legend

Align

BgColor

Custom

Producer

VAlign


 VCL Reference

THTMLTableRowAttributes events

THTMLTableRowAttributes	Alphabetically	Legend

Derived from THTMLTagAttributes

OnChange


 VCL Reference

THTMLTableRowAttributes events

THTMLTableRowAttributes	By object	Legend

OnChange


 VCL Reference

THTMLTableRowAttributes methods

THTMLTableRowAttributes	Alphabetically	Legend

Derived from THTMLTableElementAttributes

RestoreDefaults

Derived from THTMLTagAttributes

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableRowAttributes methods

THTMLTableRowAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


Hierarchy

TObject

TPersistent

THTMLTagAttributes

THTMLTableElementAttributes

THTMLTableRowAttributes


THTMLTableColumns
 VCL Reference

THTMLTableColumns

Hierarchy	Properties	Methods	See also

THTMLTableColumns is a collection of THTMLTableColumn objects that describe the display attributes and field bindings of the columns in an HTML representation of tabular data.

Unit

DBWeb

Description

THTMLTableColumns is tailored for use by TDSTableProducer. It stores and manages changes to the THTMLTableColumn objects that describe the columns of the HTML table produced by TDSTableProducer. THTMLTableColumns informs the table producer of changes to the column bindings so the table producer can recompute its layout.


 VCL Reference

THTMLTableColumns properties

THTMLTableColumns	Alphabetically	Legend

In THTMLTableColumns

DSTableProducer

Items

State

Derived from TCollection

Count

ItemClass


 VCL Reference

THTMLTableColumns properties

THTMLTableColumns	By object	Legend

Count

DSTableProducer

ItemClass

Items

State


THTMLTableColumns.DSTableProducer
 VCL Reference

THTMLTableColumns.DSTableProducer

THTMLTableColumns

Indicates the table producer that uses THTMLTableColumns to store and manage column descriptions.

property DSTableProducer: TDSTableProducer;

Description

Read DSTableProducer to gain direct access to the table producer that uses the THTMLTableColumns object. THTMLTableColumns uses this property to inform the table producer of changes to the columns so that it can recompute its layout.


THTMLTableColumns.Items
 VCL Reference

THTMLTableColumns.Items

THTMLTableColumns	See also 	Example

Lists the THTMLTableColumn objects that THTMLTableColumns stores and manages for its TDSTableProducer object.

property Items[Index: Integer]: THTMLTableColumn; default;

Description

Use Items to access the individual column descriptors managed by THTMLTableColumns. Items is an indexed array, where the first column descriptor has index 0, the second column descriptor has index 1, and so on.

Items is the default property of THTMLTableColumns. This means that applications do not need to specify the Items property name when referring to the elements of the Items array.


THTMLTableColumns.State
 VCL Reference

THTMLTableColumns.State

THTMLTableColumns	See also

Indicates whether the individual column descriptors are generated dynamically or statically stored.

type THTMLColumnState = (csDefault, csCustom);

property State: THTMLColumnState;

Description

Set State to csDefault to indicate that the column descriptors should be generated dynamically. Dynamically generated column descriptors impose no special display attributes on the columns of the HTML table, and correspond exactly in order and number to the fields of the dataset. Setting State to csDefault replaces all the column descriptors in the collection with dynamically generated defaults.

Set State to csCustom before customizing the column descriptors by adding display attributes, reordering the fields, adding columns for calculated fields, or including only a subset of the fields in the dataset. When State is csCustom, the column descriptors are saved with the TDSTableProducer object.

Note:	Using the Columns editor to customize the column descriptors automatically sets State to csCustom.


 VCL Reference

THTMLTableColumns methods

THTMLTableColumns	Alphabetically	Legend

In THTMLTableColumns

Add

Create

RebuildColumns

RestoreDefaults

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTableColumns methods

THTMLTableColumns	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

RebuildColumns

RestoreDefaults

SafeCallException


THTMLTableColumns.Add
 VCL Reference

THTMLTableColumns.Add

THTMLTableColumns	See also

Adds a new column descriptor to the end of the Items array.

function  Add: THTMLTableColumn;

Description

Call Add to add a column descriptor to the collection of columns shown in the HTML table generated by TDSTableProducer. Applications should only call Add when the value of the State property is csCustom.


THTMLTableColumns.Create
 VCL Reference

THTMLTableColumns.Create

THTMLTableColumns	See also

Creates an instance of THTMLTableColumns.

type THTMLTableColumnClass = class ofTHTMLTableColumn;

constructor Create(DSTableProducer: TDSTableProducer; ColumnClass: THTMLTableColumnClass);

Description

Do not call the constructor of THTMLTableColumns. TDSTableProducer calls Create from its own constructor. The DSTableProducer parameter specifies the TDSTableProducer object that uses the THTMLTableColumns object to manage its column descriptors. The ColumnClass parameter indicates the class of the THTMLTableColumn objects that fill the Items array.


THTMLTableColumns.RebuildColumns
 VCL Reference

THTMLTableColumns.RebuildColumns

THTMLTableColumns	See also

Replaces all the column descriptors in the Items array with new column descriptors that exactly match the fields in the dataset of DSTableProducer.

procedure RebuildColumns;

Description

Call RebuildColumns to set the collection of column descriptors to the default state which matches the order and number of fields in the dataset, and which imposes no special display attributes. RebuildColumns returns the collection of column descriptors to the state that is dynamically maintained when the State property is csDefault.


THTMLTableColumns.RestoreDefaults
 VCL Reference

THTMLTableColumns.RestoreDefaults

THTMLTableColumns	See also

Restores the default properties of every column in the Items property array.

procedure RestoreDefaults;

Description

At design time, RestoreDefaults is called when the Restore defaults button is pressed in the Response editor.


Hierarchy

TObject

TPersistent

TCollection

THTMLTableColumns


THTMLTagAttributes
 VCL Reference

THTMLTagAttributes

Hierarchy	Properties	Methods	Events	See also

THTMLTagAttributes is the base class for all objects that represent the attributes of an HTML tag.

Unit

HTTPProd

Description

Descendants of TCustomContentProducer use THTMLTagAttributes objects to encapsulate the options added to the HTML tags in the HTML commands that they produce. When the TCustomContentProducer object generates HTML commands, it looks up the tag attributes represented by the properties of its tag attributes objects, and generates the appropriate tag options.


 VCL Reference

THTMLTagAttributes properties

THTMLTagAttributes	Alphabetically	Legend

In THTMLTagAttributes

Custom

Producer


 VCL Reference

THTMLTagAttributes properties

THTMLTagAttributes	By object	Legend

Custom

Producer


THTMLTagAttributes.Custom
 VCL Reference

THTMLTagAttributes.Custom

THTMLTagAttributes	See also

Represents a tag option and its value in an HTML tag.

property Custom: string;

Description

Use Custom to represent one or more options to be added to an HTML tag. Each option and its value should have the form

OPTIONNAME=Value

The options specified by Custom should be separated by spaces. For example, to merge a cell in an HTML table with the three adjacent cells to the left and below, the table data tag for the cell requires the ROWSPAN and COLSPAN options to be set. The value of Custom to specify these values would be the string

ROWSPAN=2 COLSPAN=2

The HTML producer inserts the Custom string into the HTML tag when it generates its Content.


THTMLTagAttributes.Producer
 VCL Reference

THTMLTagAttributes.Producer

THTMLTagAttributes	See also

Indicates the content producer that uses the THTMLTagAttributes object to represent the options for one of the HTML tags in the content it produces.

property Producer: TCustomContentProducer;

Description

Use Producer to gain access to the HTML producer object that is using the THTMLTagAttributes object. The THTMLTagAttributes object can use the Producer property in an OnChange event handler to notify the TCustomContentProducer object of changes to the attributes it represents.


 VCL Reference

THTMLTagAttributes events

THTMLTagAttributes	Alphabetically	Legend

In THTMLTagAttributes

OnChange


 VCL Reference

THTMLTagAttributes events

THTMLTagAttributes	By object	Legend

OnChange


THTMLTagAttributes.OnChange
 VCL Reference

THTMLTagAttributes.OnChange

THTMLTagAttributes	See also

Occurs immediately after a tag attributes property changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever any of the properties of the tag attributes object changes. When OnChange occurs, the tag attributes object already has the new property setting. Use an OnChange event handler to inform the HTML content producer when the attributes of a tag change so that the content producer canupdate the content it is producing.


 VCL Reference

THTMLTagAttributes methods

THTMLTagAttributes	Alphabetically	Legend

In THTMLTagAttributes

Changed

Create

RestoreDefaults

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THTMLTagAttributes methods

THTMLTagAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

RestoreDefaults

SafeCallException


THTMLTagAttributes.Changed
 VCL Reference

THTMLTagAttributes.Changed

THTMLTagAttributes	See also

Generates an OnChange event.

procedure Changed;

Description

Call Changed from a descendant of THTMLTagAttributes after a tag option introduced by that descendant changes. Changed is exposed as a protected method so that component writers can create descendants of THTMLTagAttributes which correctly trigger the OnChange event handler.


THTMLTagAttributes.Create
 VCL Reference

THTMLTagAttributes.Create

THTMLTagAttributes	See also

Creates an instance of THTMLTagAttributes.

constructor Create(Producer: TCustomContentProducer);

Description

Call Create to create and initialize an instance of THTMLTagAttributes at runtime. After calling the inherited constructor, Create sets the Producer property to the value of the Producer parameter.


THTMLTagAttributes.RestoreDefaults
 VCL Reference

THTMLTagAttributes.RestoreDefaults

THTMLTagAttributes	See also

Changes all properties of the tag attributes object back to their initial settings.

procedure RestoreDefaults; virtual;

Description

Call RestoreDefaults to undo any changes that were made to the tag attributes either programmatically, or at design time. RestoreAttributes sets the Custom property to an empty string.


Hierarchy

TObject

TPersistent

THTMLTagAttributes


TTcpClient
 VCL Reference

TTcpClient

Hierarchy	Properties	Methods 	Events	See also

TTcpClient is the TCP client component

Unit

Sockets

Description

Use TTcpClient to create TCP client applications.

TTcpClient publishes properties and events from its ancestor socket components.


 VCL Reference

TTcpClient properties

TTcpClient	Alphabetically	Legend

Derived from TCustomIpClient

Connected

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTcpClient properties

TTcpClient	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag

VCLComObject


 VCL Reference

TTcpClient events

TTcpClient	By object	Legend

Derived from TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TTcpClient events

TTcpClient	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


 VCL Reference

TTcpClient methods

TTcpClient	Alphabetically	Legend

Derived from TCustomIpClient

Close

Connect

Create

Disconnect

GetThreadObject

Open

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTcpClient methods

TTcpClient	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

GetThreadObject

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForData


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TCustomIpClient

TTcpClient


TTcpServer
 VCL Reference

TTcpServer

Hierarchy	Properties	Methods 	Events	See also

TTcpServer is the TCP server component

Unit

Sockets

Description

Use TTcpServer to create TCP server applications.

TTcpServer publishes properties and events from its ancestor socket components.


 VCL Reference

TTcpServer properties

TTcpServer	Alphabetically	Legend

Derived from TCustomTcpServer

BlockMode

Listening

ServerSocketThread

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTcpServer properties

TTcpServer	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Domain

Handle

Listening

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

ServerSocketThread

SockType

Tag

VCLComObject


 VCL Reference

TTcpServer events

TTcpServer	By object	Legend

Derived from TCustomTcpServer

OnAccept

OnGetThread

OnListening

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TTcpServer events

TTcpServer	By object	Legend

OnAccept

OnCreateHandle

OnDestroyHandle

OnError

OnGetThread

OnListening

OnReceive

OnSend


 VCL Reference

TTcpServer methods

TTcpServer	Alphabetically	Legend

Derived from TCustomTcpServer

Accept

Close

Create

Open

WaitForConnection

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTcpServer methods

TTcpServer	By object	Legend

Accept

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForConnection

WaitForData


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TCustomTcpServer

TTcpServer


TTimeField
 VCL Reference

 TTimeField

Hierarchy	Properties	Methods	Events 	Using TTimeField	See also

TTimeField represents a time field in a dataset.

Unit

DB

Description

TTimeField encapsulates the fundamental behavior common to fields that contain time values. Time fields contain time values (without any date), which they manage using the TDateTime type.

If you use the Fields editor at design time to create a persistent field component for the time field, you can access it by name at runtime. When using dynamic field components, you can access the TTimeField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TTimeField properties

TTimeField	Alphabetically	Legend

In TTimeField

DataSize

Derived from TDateTimeField

AsDateTime

AsFloat

AsSQLTimeStamp

AsString

AsVariant

DisplayFormat

Value

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsInteger

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTimeField properties

TTimeField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TTimeField.DataSize
 VCL Reference

TTimeField.DataSize

TTimeField	See also	Example

Indicates the amount of memory needed to store the value of a time field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a time field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For time fields, DataSize is always 4. This is the size of time values in the database tables, not the size of the TDateTime data type used to store and manipulate time values by TTimeField.


 VCL Reference

TTimeField events

TTimeField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TTimeField events

TTimeField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TTimeField methods

TTimeField	Alphabetically	Legend

In TTimeField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTimeField methods

TTimeField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TTimeField.Create
 VCL Reference

TTimeField.Create

TTimeField	See also

Creates and initializes an instance of TTimeField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TTimeField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftTime. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TTimeField. After instantiating a TTimeField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TTimeField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TTimeField with a dataset component by setting its DataSet property.

The example below creates a TTimeField object for a field named CheckOutTime accessed through a TQuery named Query1.

var

  T: TimeField;

begin

  Query1.Close;

  T := TTimeField.Create(Query1);

  T.FieldName := 'CheckOutTime';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TDateTimeField

TTimeField


TTypedComObject
 VCL Reference

TTypedComObject

Hierarchy	Properties	Methods

TTypedComObject supports the IProvideClassInfo interface and is the class type for COM objects that can provide the type information without requring a type library to be loaded.

Unit

ComObj

Description

TTypedComObject supports the IProvideClassInfo interface which gives an object the ability to describe its interfaces and types when everything else about it, such as its class identifier (CLSID), is unknown. TTypedComObject requires a type library for the IProvideClassInfo interface. This class is designed to require a type library so that it can support dual interfaces, which are created by default.

IProvideClassInfo has a single method, GetClassInfo, which is implemented in TTypedComObject to provide access to the type information for the object’s CoClass entry in its type library. This means that if the TTypedComObject has a running instance, a client can query for the IProvideClassInfo interface and retrieve this information without having to load and navigate a type library to find the ITypeInfo pointer for the object’s CoClass.

Use TTypedComObject as a base class for objects that can conveniently provide type information without having to load a type library, such as an unknown object received through a drag-and-drop operation. The only objects that must implement IProvideClassInfo are those with custom events such as ActiveX controls.

Note

There is no support for type information in a particular language. Type information appropriate to the user’s international settings on the current machine is assumed to have been loaded.

Implemented methods of IProvideClassInfo

GetClassClassInfo.


 VCL Reference

TTypedComObject properties

TTypedComObject	Alphabetically	Legend

Derived from TComObject

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TTypedComObject properties

TTypedComObject	By object	Legend

Controller

Factory

RefCount

ServerExceptionHandler


 VCL Reference

TTypedComObject methods

TTypedComObject	Alphabetically	Legend

In TTypedComObject

GetClassInfo

Derived from TComObject

Create

CreateAggregated

CreateFromFactory

Destroy

Initialize

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTypedComObject methods

TTypedComObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateAggregated

CreateFromFactory

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetClassInfo

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ObjAddRef

ObjQueryInterface

ObjRelease

SafeCallException


TTypedComObject.GetClassInfo
 VCL Reference

TTypedComObject.GetClassInfo

TOleContainer

Returns a pointer to a TTypedComObject’s type information.

function GetClassInfo(out TypeInfo: ITypeInfo): HResult; stdcall;

Description

The GetClassInfo method returns a pointer to a type information object that describes the incoming and outgoing interfaces to the ActiveX control. The method gets a pointer to the control’s type library, and through it, uses the ITypeLib interface to retrieve the type information.


Hierarchy

TObject

TComObject


 VCL Reference


TUdpSocket
 VCL Reference

TUdpSocket

Hierarchy	Properties	Methods 	Events

TUdpSocket is the UDP component

Unit

Sockets

Description

Use TUdpSocket to create UDP-based applications. Add a TUdpSocket object to a form or data module to turn an application into a UDP/IP client and server. TUdpSocket specifies a desired connection to a UDP/IP server, manages the connection when it is open, and terminates the connection when the application is through. It also listens for requests for UDP/IP connections from other machines and establishes connections when requests are received.


 VCL Reference

TUdpSocket properties

TUdpSocket	Alphabetically	Legend

Derived from TCustomIpClient

Connected

Derived from TIpSocket

LocalHost

LocalPort

RemoteHost

RemotePort

Derived from TBaseSocket

Active

BlockMode

BytesReceived

BytesSent

Domain

Handle

Protocol

SockType

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TUdpSocket properties

TUdpSocket	By object	Legend

Active

BlockMode

BytesReceived

BytesSent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Connected

DesignInfo

Domain

Handle

LocalHost

LocalPort

Name

Owner

Protocol

RemoteHost

RemotePort

SockType

Tag

VCLComObject


 VCL Reference

TUdpSocket events

TUdpSocket	Alphabetically	Legend

Derived from TCustomIpClient

OnConnect

OnDisconnect

Derived from TBaseSocket

OnCreateHandle

OnDestroyHandle

OnError

OnReceive

OnSend


 VCL Reference

TUdpSocket events

TUdpSocket	By object	Legend

OnConnect

OnCreateHandle

OnDestroyHandle

OnDisconnect

OnError

OnReceive

OnSend


 VCL Reference

TUdpSocket methods

TUdpSocket	Alphabetically	Legend

In TUdpSocket

Create

Derived from TCustomIpClient

Close

Connect

Disconnect

GetThreadObject

Open

Derived from TIpSocket

GetSocketAddr

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

ReceiveFrom

SendTo

Derived from TBaseSocket

Destroy

MapDomain

MapSockType

Open

PeekBuf

ReceiveBuf

Receiveln

Select

SendBuf

Sendln

SendStream

WaitForData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TUdpSocket methods

TUdpSocket	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Close

Connect

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSocketAddr

GetThreadObject

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

LocalDomainName

LocalHostAddr

LocalHostName

LookupHostAddr

LookupHostName

LookupPort

LookupProtocol

MapDomain

MapSockType

MethodAddress

MethodName

NewInstance

Open

PeekBuf

ReceiveBuf

ReceiveFrom

Receiveln

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

Select

SendBuf

Sendln

SendStream

SendTo

SetSubComponent

UpdateAction

WaitForData


TUdpSocket.Create
 VCL Reference

TUdpSocket.Create

TUdpSocket	See also

Creates an instance of TUdpSocket.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TUdpSocket object.


Hierarchy

TObject

TPersistent

TComponent

TBaseSocket

TIpSocket

TCustomIpClient

TUdpSocket


TUpdateTree
 VCL Reference

TUpdateTree

Hierarchy	Methods	See also

TUpdateTree stores information about a delta packet on behalf of a resolver.

Unit

Provider

Description

When a client dataset applies its updates to the source dataset or database server, the provider that represents that dataset or server passes the updates to a resolver component. The resolver takes this delta data packet and builds a TUpdateTree to store the updates and information about them in a convenient form. In particular, the TUpdateTree structure allows a resolver to handle master/detail relationships (represented as nested dataset fields in the delta packet) so that updates are applied in the proper order.

Applications can’t use TUpdateTree directly. Most of the structured information about the delta packet is represented in protected properties that are only available to the resolver classes in the Provider unit.


 VCL Reference

TUpdateTree methods

TUpdateTree	Alphabetically	Legend

In TUpdateTree

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TUpdateTree methods

TUpdateTree	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TUpdateTree.Create
 VCL Reference

TUpdateTree.Create

TUpdateTree

Creates and initializes an instance of TUpdateTree.

constructor Create(AParent: TUpdateTree; AResolver: TCustomResolver);

Description

Applications do not need to call the TUpdateTree constructor. Update trees are created automatically by the resolver components that use them.

The AParent parameter specifies the TUpdateTree for the updates to a master table if this update tree represents a detail data set. If the TUpdateTree does not represent the updates to a detail dataset, AParent is nil.

The AResolver parameter specifies the resolver component that uses this update tree when applying updates. This parameter must be specified because the update tree calls some of this resolver’s methods.


TUpdateTree.Destroy
 VCL Reference

TUpdateTree.Destroy

TUpdateTree 	See also

Destroys an instance of TUpdateTree.

destructor Destroy; override;

Description

Applications do not need to free TUpdateTree instances. Update trees are freed by the resolver components that use them.


Hierarchy

TObject

TUpdateTree


TURLAction
 VCL Reference

TURLAction

Hierarchy	Properties	Methods	Events	Using TURLAction	See also

TURLAction is the base class for actions that perform some function based on an URL.

Unit

ExtActns

Description

Use TURLAction as a base class when creating an action component that uses a Uniform Resource Locator (URL). TURLAction introduces the URL property to get or set the URL that it works with, but does not actually do anything with that URL. Rather, TURLAction descendants, such as TBrowseURL or TDownLoadURL, override the ExecuteTarget method to perform some operation that uses the value of the URL property.

TURLAction automatically disables itself if the URL property has not been assigned.


 VCL Reference

TURLAction properties

TURLAction	Alphabetically	Legend

In TURLAction

URL

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TURLAction properties

TURLAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

URL

VCLComObject

Visible


TURLAction.URL
 VCL Reference

TURLAction.URL

TURLAction 	See also

Specifies the Uniform Resource Locator (URL) on which this action performs its function.

property URL: string;

Description

URL is the Uniform Resource Locator (URL) with which this action works. Each TURLAction descendant performs a different function that uses this URL.

This value is not assigned automatically: it is the responsibility of the application to supply a value for URL. If no value is supplied, TURLAction automatically disables itself.


 VCL Reference

TURLAction events

TURLAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TURLAction events

TURLAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TURLAction methods

TURLAction	Alphabetically	Legend

In TURLAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TURLAction methods

TURLAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TURLAction.HandlesTarget
 VCL Reference

TURLAction.HandlesTarget

TURLAction

Indicates whether the action can execute.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

HandlesTarget always returns True, because TURLAction does not use the target object.


TURLAction.UpdateTarget
 VCL Reference

TURLAction.UpdateTarget

TURLAction 	See also

Enables or disables the action, depending on whether the URL property is set.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically the application is idle so that actions can update themselves according to current conditions.

In TURLAction, UpdateTarget checks whether the URL property has been set. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TURLAction


TValueListEditor
 VCL Reference

 TValueListEditor

Hierarchy	Properties	Methods	Events	Using TValueListEditor	See also

TValueListEditor provides a simple way to edit string lists that contain name/value pairs.

Unit

Valedit

Description

Use TValueListEditor to let users edit string lists that consist of strings with the form Name=Value. By default, the names appear in a column headed “Key”, and the values in a column headed “Value”, although you can customize these labels. You can control whether users can select, add, or edit the strings in the Key column. For each entry in the Value column, you can let users edit the string, supply a drop-down list from which they can select values, or provide a dialog in which they can edit values.


 VCL Reference

TValueListEditor properties

TValueListEditor	Alphabetically	Legend

In TValueListEditor

Cells

ColCount

DisplayOptions

DropDownRows

ItemProps

KeyOptions

Keys

RowCount

Strings

TitleCaptions

Values

Derived from TCustomGrid

BorderStyle

Col

ColWidths

DefaultColWidth

DefaultDrawing

DefaultRowHeight

EditorMode

FixedColor

FixedCols

GridHeight

GridLineWidth

GridWidth

LeftCol

Options

Row

RowHeights

ScrollBars

Selection

TabStops

TopRow

VisibleColCount

VisibleRowCount

Derived from TCustomControl

Canvas

Derived from TWinControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TValueListEditor properties

TValueListEditor	By object	Legend

Action

Align

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Cells

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

Color

ColWidths

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DisplayOptions

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropDownRows

EditorMode

Enabled

FixedColor

FixedCols

Floating

FloatingDockSiteClass

Font

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemProps

KeyOptions

Keys

Left

LeftCol

LRDockWidth

Name

Options

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Row

RowCount

RowHeights

ScrollBars

Selection

ShowHint

Showing

Strings

TabOrder

TabStop

TabStops

Tag

TBDockHeight

TitleCaptions

Top

TopRow

UndockHeight

UndockWidth

Values

VCLComObject

Visible

VisibleColCount

VisibleDockClientCount

VisibleRowCount

Width

WindowProc


TValueListEditor.Cells
 VCL Reference

TValueListEditor.Cells

TValueListEditor	See also

Lists the strings for each cell in the editor.

property Cells[ACol, ARow: Integer]: string;

Description

Use Cells to access the string in a particular cell. ACol is the column coordinate of the cell, and ARow is the row coordinate of the cell. ACol can be 0 (for the name column) or 1 (for the value column). ARow can range from 0 (for the title row) to the number of strings in the associated TStrings descendant.

To access the strings in the name column, use the Keys property instead. To access the strings in the value column, use the Values property instead. To access the underlying string list, use the Strings property.


TValueListEditor.ColCount
 VCL Reference

TValueListEditor.ColCount

TValueListEditor	See also

Indicates the number of columns in the value list editor.

property ColCount: Integer;

Description

TValueListEditor redeclares the ColCount property, which it inherits from TCustomGrid, to change it to a read-only property. The value of ColCount is always 2 plus the number of fixed columns, because the value list editor is designed to display only the name and value of the strings in the associated string list.


TValueListEditor.DisplayOptions
 VCL Reference

TValueListEditor.DisplayOptions

TValueListEditor	See also

Controls aspects of the value list editor’s appearance.

type

  TDisplayOption = (doColumnTitles, doAutoColResize, doKeyColFixed);

  TDisplayOptions = set of TDisplayOption;

property DisplayOptions: TDisplayOptions;

Description

Use DisplayOptions to control whether titles appear at the top of the columns in the value list editor and how the control responds when it is resized.

DisplayOptions is a set that can include any of the following:

Option	Meaning

doColumnTitles	The first row of the value list editor is a fixed (nonscrolling) row that displays the captions specified by the TitleCaptions property.

doAutoColResize	When the editor is resized, the column widths automatically adjust so that they completely fill the new width of the editor. If DisplayOptions does not include doKeyColFixed, each column has a width equal to half the width of the editor. Otherwise, the value column takes up any space left over after the fixed (key) column.

doKeyColFixed	The first (key) column of the value list editor is fixed in width. When the value list editor is resized, only the second (value) column resizes. This option is only used when DisplayOptions includes doAutoColResize.


TValueListEditor.DropDownRows
 VCL Reference

TValueListEditor.DropDownRows

TValueListEditor	See also

Limits the length of the drop-down list that appears for values that use a pick list.

property DropDownRows: Integer;

Description

Use DropDownRows to indicate the maximum height of the drop-down list that appears when the user clicks the drop-down button on values that have a pick list. DropDownRows is an upper limit: if the pick list has fewer entries that DropDownRows, the drop-down list includes only a line for every item in the list.

DropDownRows is ignored for values that do not have a pick list. To provide a value in the value list editor with a drop-down button and pick list, you do either of the following:

For the appropriate entry in the ItemProps property, set the EditStyle property to esPickList and set the PickList property to the list of items.

Write an OnGetPickList event handler that supplies the items in the list.


TValueListEditor.ItemProps
 VCL Reference

TValueListEditor.ItemProps

TValueListEditor	See also

Specifies various constraints on the way users can enter a value for each item in the list.

property ItemProps[const KeyOrIndex: Variant]: TItemProp;

Description

Use ItemProps to indicate, for each item,

Whether the item is read only.

bmc bullet.bmp}	The maximum length of strings the user can enter.

An edit mask that limits the strings the user can enter as a value.

Whether the item lets users drop down a pick list or launch a dialog to enter values.

A fixed set of values from which users select (a pick list).


TValueListEditor.KeyOptions
 VCL Reference

TValueListEditor.KeyOptions

TValueListEditor	See also

Controls the way the value list editor responds to user keystrokes.

type

  TKeyOption = (keyEdit, keyAdd, keyDelete, keyUnique);

  TKeyOptions = set of TDisplayOption;

property KeyOptions: TKeyOptions;

Description

Use KeyOptions to control how users can edit name/value pairs using the value list editor.

KeyOptions is a set that includes zero or more of the following:

Option	Meaning

keyEdit	The user can select and edit values in the first (key) column. That is, the user can specify the name in a name/value pair.

keyAdd	The user can add new name/value pairs. When included, the user can create new entries by pressing the Insert key or using the down arrow key when positioned on the last name/value pair. keyAdd requires that keyEdit is also included.

keyDelete	The user can delete the selected name/value pair by pressing the Delete key.

keyUnique	The user can’t create name/value pairs where the name portion is the same as the name in another name/value pair. Attempting to add a duplicate name causes the value list editor to raise an exception. keyUnique requires that keyEdit is also included.


TValueListEditor.Keys
 VCL Reference

TValueListEditor.Keys

TValueListEditor	See also

Lists the strings for each cell in the name (key) column.

property Keys[Index: Integer]: string;

Description

Use Keys to access the name (or key) value for a particular row. That is, Keys assumes the strings in the associated string list have the form Name=Value, and returns the Name portion.

Index identifies the Row of the value list editor. It takes a value from 0 to the number of rows. When DisplayOptions includes doColumnTitles, the value of Keys is the title of the first column when Index is 0, and is the Name portion of the string when Index is greater than 0. When DisplayOptions does not include doColumnTitles, the value of Keys is the Name portion of the string in the specified row.

To access the strings in the value column, use the Values property instead. To access the underlying string list, use the Strings property.


TValueListEditor.RowCount
 VCL Reference

TValueListEditor.RowCount

TValueListEditor	See also

Indicates the number of rows in the value list editor.

property RowCount: Integer;

Description

TValueListEditor redeclares the RowCount property, which it inherits from TCustomGrid, to change it to a read-only property. The value of RowCount is the number of strings in the Strings property plus the number of fixed rows (typically one, for the column titles).


TValueListEditor.Strings
 VCL Reference

TValueListEditor.Strings

TValueListEditor	See also

Provides access to the string list that is being edited.

property Strings: TStrings;

Description

Use Strings to access the string list that the value list editor displays. Strings should be a TStrings descendant that contains strings of the form Name=Value.

At design time, add values to the Strings property using the string list editor. At runtime, you can use the methods of TStrings to add strings to the list one by one, or assign an existing TStrings descendant to the Strings property. When you set Strings at runtime, TValueListEditor copies the strings from the TStrings object you assign: it does not take ownership of the object itself.

When Strings is assigned, the value list editor displays the name portion (TStrings.Names) of the strings in its key column and the value portion (TStrings.Values) in the value column.


TValueListEditor.TitleCaptions
 VCL Reference

TValueListEditor.TitleCaptions

TValueListEditor	See also

Specifies the captions that label the columns of the value list editor.

property TitleCaptions: TStrings;

Description

Use TitleCaptions to provide titles for the columns of the value list editor. TitleCaptions is a TStrings descendant that contains two strings: the first string labels the name (key) column, and the second string labels the value column. If TitleCaptions contains less than two strings, missing captions are treated as empty strings. If TitleCaptions contains more than two strings, all strings except the first two are ignored.

Note:	TitleCaptions is only used when the DisplayOptions property includes doColumnTitles.


TValueListEditor.Values
 VCL Reference

TValueListEditor.Values

TValueListEditor	See also

Lists the strings for each value from the value column.

property Values[const Key: string]: string;

Description

Use Values to access the value associated with a specified name from the first (key) column. Key specifies a string that appears in the first column of the value list editor. Values is the corresponding string from the second (value) column.

To access the strings in the key column, use the Keys property instead. To access the underlying string list, use the Strings property.

Note:	Setting Values with Key set to a name that is not in the list adds a new string to Strings and a new row to the value list editor.


 VCL Reference

TValueListEditor events

TValueListEditor	Alphabetically	Legend

In TValueListEditor

OnEditButtonClick

OnGetPickList

OnStringsChange

OnStringsChanging

OnValidate

Derived from TCustomDrawGrid

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnStartDock

OnStartDrag


 VCL Reference

TValueListEditor events

TValueListEditor	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawCell

OnEditButtonClick

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetEditMask

OnGetEditText

OnGetPickList

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnRowMoved

OnSelectCell

OnSetEditText

OnStartDock

OnStartDrag

OnStringsChange

OnStringsChanging

OnTopLeftChanged

OnValidate


TValueListEditor.OnGetPickList
 VCL Reference

TValueListEditor.OnGetPickList

TValueListEditor	See also

Supplies a pick list for values associated with a particular key.

type

  TGetPickListEvent = procedure (Sender: TObject; const KeyName: string; Values: TStrings)of object;

property OnGetPickList: TGetPickListEvent;

Description

Write an OnGetPickList event handler to provide a drop-down list of values for specific names from the first (key) column. OnGetPickList is called when the value column gets focus and the name (key) column contains the string specified by KeyName.

The Sender parameter is the value list editor that uses the drop-down list of values.

The KeyName parameter is the name of a string that appears in the first column of the current row.

Values is a string list that you can fill with candidates for the second (value) column. If the ItemProps property has an EditStyle of esPickList for this item, Values is initialized to the value of its PickList property for this item. Otherwise, Values is initialized to an empty list. In either case, the OnGetPickList event handler can change the list of values that appear in the drop-down pick list.

If the OnGetPickList event handler exits with a non-empty string list as the value of Values, a drop-down arrow appears in the value column. The user can click this arrow button to display the pick list you supplied as the value of Values. This makes the Value column behave like a drop-down combo box: the user can select items from the list or type in an entirely different value.


TValueListEditor.OnEditButtonClick
 VCL Reference

TValueListEditor.OnEditButtonClick

TValueListEditor	See also

Occurs when the user click the ellipsis button on a cell in the values column or types Ctrl+Enter while focus is on a value cell with an ellipsis button.

property OnEditButtonClick: TNotifyEvent;

Description

Write an OnEditButtonClick to display a dialog that lets users edit a value in the Values column. This event only occurs for items for which the ItemProps property has an EditStyle of esEllipsis.

In the event handler, you can use the Row property to identify the row that the user is editing. The event handler (or the dialog that the event handler displays) can use the Keys property to identify the current key value, and use that to get and set the corresponding entry in the Values property that is being edited.


TValueListEditor.OnStringsChange
 VCL Reference

TValueListEditor.OnStringsChange

TValueListEditor	See also

Occurs immediately after the names or values in the string list change.

property OnStringsChange: TNotifyEvent;

Description

Write an OnStringsChange event handler to respond when the strings in the list change. For example, you can use the OnStringsChange event to update your display to reflect the new values of the strings in the value list editor.

OnStringsChange occurs after the change is complete. The properties of the value list editor reflect the new values of the strings.


TValueListEditor.OnStringsChanging
 VCL Reference

TValueListEditor.OnStringsChanging

TValueListEditor	See also

Occurs immediately before the names or values in the string list change.

property OnStringsChanging: TNotifyEvent;

Description

Write an OnStringsChanging event handler to prepare for changes in the list of strings. For example, you can use the OnStringsChanging event to disable repaints until the OnStringsChange event when the list has finished changing..

OnStringsChanging occurs before the change occurs. The properties of the value list editor reflect the old values of the strings.


TValueListEditor.OnValidate
 VCL Reference

TValueListEditor.OnValidate

TValueListEditor	See also

Occurs when focus shifts away from a cell in the value list editor.

type

   TOnValidateEvent = procedure(Sender: TObject; ACol, ARow: Longint; const KeyName, KeyValue: string) of object;

property OnValidate: TOnValidateEvent;

Description

Write an OnValidate event handler to validate any edits the user enters in a cell before focus leaves it. OnValidate gives applications an opportunity to provide more validation than the EditMask property of the corresponding TItemProp object can supply.

OnValidate only occurs if the user edited the value of the cell that is about to lose focus. The OnValidate event handler can verify the value the user supplied, and if it is not acceptable, raise an exception.

Sender is the value list editor that contains the cell.

ACol and ARow identify the cell by its column and row numbers, respectively. The first row or column has an index of 0, the second has an index of 1, and so on.

KeyName is the current value of in the key column for ARow. This value includes any edits that have not yet been committed.

KeyValue is the current value of the value column for ARow. This value includes any edits that have not yet been committed.


 VCL Reference

TValueListEditor methods

TValueListEditor	Alphabetically	Legend

In TValueListEditor

Create

DeleteRow

Destroy

FindRow

InsertRow

Refresh

RestoreCurrentRow

Derived from TCustomDrawGrid

CellRect

MouseToCell

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TValueListEditor methods

TValueListEditor	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteRow

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindRow

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InsertRow

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseToCell

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RestoreCurrentRow

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TValueListEditor.Create
 VCL Reference

TValueListEditor.Create

TValueListEditor	See also

Creates and initializes new TValueListEditor object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a value list editor component at runtime. TValueListEditor components added to forms at design time are created automatically.

The AOwner parameter specifies another component (typically the form) that is responsible for freeing the TValueListEditor instance.


TValueListEditor.DeleteRow
 VCL Reference

TValueListEditor.DeleteRow

TValueListEditor	See also

Deletes a row in the value list editor and a corresponding string from the associated TStrings object.

procedure DeleteRow(ARow: Integer); override;

Description

Call DeleteRow to remove the row specified by the ARow parameter. Delete removes the corresponding string from the TStrings object being edited and updates the display.

ARow must be the index of a row that displays a name/value pair. That is, it can’t be less than 0 or greater than the number of rows. If DisplayOptions includes doColumnTitles, ARow can’t be 0, because that is the title row, not a name/value pair in the associated TStrings object.

Note:	DeleteRow deletes the specified row regardless of the value of KeyOptions. The keyDelete member of KeyOptions controls only whether the user can delete a row by pressing the Delete key.


TValueListEditor.Destroy
 VCL Reference

TValueListEditor.Destroy

TValueListEditor	See also

Frees the memory associated with the TValueListEditor object.

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the value list editor reference is not nil, and only then calls Destroy.


TValueListEditor.FindRow
 VCL Reference

TValueListEditor.FindRow

TValueListEditor	See also

Locates the row that corresponds to a specified key name.

function FindRow(const KeyName: string; var Row: Integer): Boolean;

Description

Call FindRow to locate the row in the value list editor that has the value specified by KeyName in the first column. This corresponds to a name/value pair in the string list where the name part is KeyName.

If a row in the value list editor has the specified key name, FindRow returns True and the Row parameter returns the index of the first row found with the specified name. If the specified name does not correspond to any of the rows in the value list editor, FindRow returns False.


TValueListEditor.InsertRow
 VCL Reference

TValueListEditor.InsertRow

TValueListEditor	See also

Inserts a row in the value list editor and a corresponding string into the associated TStrings object.

function InsertRow(const KeyName, Value: string; Append: Boolean): Integer;

Description

Call InsertRow to add a name/value pair to the value list editor and the TStrings object it is editing.

InsertRow adds a string of the form

KeyName=Value

to the Strings property and updates the display to reflect the change.

If the current row of the value list editor is empty (has no name or value portion), InsertRow assigns the new KeyName and Value to the current row. Otherwise, if the Append parameter is True, the new string appears after the currently selected row, while if Append is False, the new string appears before the currently selected row.

Note:	InsertRow inserts the specified row regardless of the value of KeyOptions. The keyAdd member of KeyOptions controls only whether the user can add new rows by pressing the Insert key or navigating past the last row.


TValueListEditor.Refresh
 VCL Reference

TValueListEditor.Refresh

TValueListEditor	See also

Updates the display to reflect the current value of the Strings property.

procedure Refresh;

Description

Call Refresh to ensure that the value list editor accurately reflects the value of the Strings property. For example, call Refresh after programmatically editing the value of the Strings property.


TValueListEditor.RestoreCurrentRow
 VCL Reference

TValueListEditor.RestoreCurrentRow

TValueListEditor	See also

Undoes all edits to the current row.

function RestoreCurrentRow: Boolean;

Description

Call RestoreCurrentRow to back out edits to the current cell in the value list editor. RestoreCurrentRow backs out edits to the current cell if it is still in edit mode, or deletes a newly inserted row.

The user can accomplish the same effect by pressing the Escape key.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDrawGrid

TValueListEditor


TVariantField
 VCL Reference

TVariantField

Hierarchy	Properties	Methods	Events 	Using TVariantField	See also

TVariantField represents a variant field in a dataset.

Unit

DB

Description

TVariantField encapsulates the fundamental behavior common to fields that contain Variant data.

If you use the Fields editor at design time to create a persistent field component for the variant field, you can access it by name at runtime. When using dynamic field components, you can access the TVariantField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TVariantField properties

TVariantField	Alphabetically	Legend

In TVariantField

AsBCD

AsBoolean

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

Value

Derived from TField

Alignment

AsCurrency

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TVariantField properties

TVariantField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TVariantField.AsBCD
 VCL Reference

TVariantField.AsBCD

TVariantField	See also

Represents the field’s value as a TBcd value.

property AsBCD: TBcd;

Description

AsBCD provides a property to read the value of the field’s data into a TBcd, or to assign a TBcd value to the contents of the field.


TVariantField.AsBoolean
 VCL Reference

TVariantField.AsBoolean

TVariantField	See also

Represents the field’s value as a Boolean value.

property AsBoolean: Boolean;

Description

AsBoolean provides a property to read the value of the field’s data into a Boolean, or to assign a Boolean value to the contents of the field.

Table1TheVariantField.AsBoolean := True;


TVariantField.AsDateTime
 VCL Reference

TVariantField.AsDateTime

TVariantField	See also

Represents the field’s value as a TDateTime value.

property AsDateTime: TDateTime;

Description

AsDateTime provides a property to read the value of the field’s data into an object or variable of type TDateTime, or to assign a TDateTime value to the contents of the field.

Table1TheVariantField.AsDateTime := Now;


TVariantField.AsFloat
 VCL Reference

TVariantField.AsFloat

TVariantField	See also

Represents the field’s value as a Double value.

property AsFloat: Double;

Description

AsFloat provides a property to read the value of the field’s data into a Double, or to assign a Double value to the contents of the field.

Table1TheVariantField.AsFloat := 100.45;


TVariantField.AsInteger
 VCL Reference

TVariantField.AsInteger

TVariantField	See also

Represents the field’s value as a 32-bit integer.

property AsInteger: Integer;

Description

AsInteger provides a property to read the value of the field’s data into an integer, or to assign an integer value to the contents of the field.

Table1TheVariantField.AsInteger := 400;


TVariantField.AsSQLTimeStamp
 VCL Reference

TVariantField.AsSQLTimeStamp

TVariantField	See also

Represents the value of the date-time field as a TSQLTimeStamp record.

property AsSQLTimeStamp: TSQLTimeStamp;

Description

Use AsSQLTimeStamp to assign a TSQLTimeStamp value to a date-time field or assign the Variant field value to a TSQLTimeStamp variable.


TVariantField.AsString
 VCL Reference

TVariantField.AsString

TVariantField	See also

Represents the field’s value as a string.

property AsString: String;

Description

AsString provides a property to read the value of the field’s data into a String, or to assign a String value to the contents of the field.

Table1TheVariantField.AsString := 'This is a variant field';


TVariantField.AsVariant
 VCL Reference

TVariantField.AsVariant

TVariantField	See also

Represents the Value of the field as type Variant.

property AsVariant: Variant;

Description

AsVariant provides a property to read the value of the field’s data into a Variant, or to assign a Variant value to the contents of the field. Because Variant fields store their data internally as a Variant, AsVariant is the same as the Value property.

Table1TheVariantField.AsVariant := VariantTypeVariable;


TVariantField.Value
 VCL Reference

TVariantField.Value

TVariantField	See also

Represents the data in a Variant field component.

property Value: Variant

Description

Use Value to read data directly from and write data directly to a field component at runtime. The Value property can affect the contents of a field that is not Visible.

Table1TheVariantField.Value := VariantTypeVariable;


 VCL Reference

TVariantField events

TVariantField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TVariantField events

TVariantField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TVariantField methods

TVariantField	Alphabetically	Legend

In TVariantField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

GetParentComponent

HasParent

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TVariantField methods

TVariantField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TVariantField.Create
 VCL Reference

TVariantField.Create

TVariantField	See also

Creates and initializes a variant field component.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TVariantField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftVariant. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TVariantField. After instantiating a TVariantField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TVariantField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TVariantField with a dataset component by setting its DataSet property to the name of the dataset component.

The example below creates a TInterfaceField object for a field named UnknownData accessed through a TQuery named Query1.

var

  T: TInterfaceField;

begin

  Query1.Close;

  T := TInterfaceField.Create(Query1);

  T.FieldName := 'UnknownData';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TVariantField


TWebModule
 VCL Reference

TWebModule

Hierarchy	Properties	Methods	Events	Using TWebModule	See also

TWebModule is the automatically generated Web module for a Web server application.

Unit

HTTPApp

Description

When a new Web application is created, it automatically contains a Web module. The Web module serves as a repository for non-visual components such as TPageProducer, TTable, TDataSetTableProducer, etc. It also enables the Web server application to respond to HTTP request messages by passing the request and response objects to the appropriate action items. An application can have only one Web module.

The TWebModule object manages a collection of action items which know how to respond to HTTP request messages. View, add and delete the action items managed by the Web module using the Action editor which is opened by double clicking on the TWebModule icon.

If a data module already exists which contains many of the non-visual components and business rules for the application, the Web module can be replaced by that data module. Simply delete the Web module, add the new data module in its place, and add a TWebDispatcher object to the new data module.

See the WebServ demo for an example of how to use TWebModule.

Note:	When you create a new Apache module project and save it with a new name, it may be necessary to change the name of the apache_module (in the exports section of the project source code) by hand. The apache_module name does not change automatically at present, although it will in a future release.


 VCL Reference

TWebModule properties

TWebModule	Alphabetically	Legend

Derived from TCustomWebDispatcher

Action

Actions

AfterDispatch

BeforeDispatch

Request

Response

Derived from TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWebModule properties

TWebModule	By object	Legend

Action

Actions

AfterDispatch

BeforeDispatch

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Request

Response

Tag

VCLComObject


 VCL Reference

TWebModule events

TWebModule	Alphabetically	Legend

Derived from TCustomWebDispatcher

OnException

Derived from TDataModule

OnCreate

OnDestroy


 VCL Reference

TWebModule events

TWebModule	By object	Legend

OnCreate

OnDestroy

OnException


 VCL Reference

TWebModule methods

TWebModule	Alphabetically	Legend

In TWebModule

Create

Derived from TCustomWebDispatcher

ActionByName

Destroy

Derived from TDataModule

AfterConstruction

BeforeDestruction

CreateNew

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWebModule methods

TWebModule	By object	Legend

ActionByName

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TWebModule.Create
 VCL Reference

 TWebModule.Create

TWebModule	See also

Creates an instance of TWebModule.

constructor Create(AOwner: TComponent); override;

Description

Do not create instances at runtime. The Web module is created automatically when a Web application project is created at design time. Every time a Web server application is run in response to an HTTP request message, a new TWebModule is created based on the Web module that was created at design time.

Create generates an OnCreate event, so that Web applications can initialize the Web module before the new HTTP request message is processed.


Hierarchy

TObject

TPersistent

TComponent

TDataModule

TCustomWebDispatcher

TWebModule


PEXTENSION_CONTROL_BLOCK type
 VCL Reference

PEXTENSION_CONTROL_BLOCK type

PEXTENSION_CONTROL_BLOCK is the type of the TISAPIRequest.ECB property.

Unit

Isapiapp

type

  TEXTENSION_CONTROL_BLOCK = packed record

    cbSize: DWORD; // size of this struct.

    dwVersion: DWORD; // version info of this spec

    ConnID: HCONN; // Context number not to be modified!

    dwHttpStatusCode: DWORD; // HTTP Status code

    lpszLogData: array [0..HSE_LOG_BUFFER_LEN-1] ofChar; // DLL specific log information

    lpszMethod: PChar; // REQUEST_METHOD

    lpszQueryString: PChar; // QUERY_STRING

    lpszPathInfo: PChar; // PATH_INFO

    lpszPathTranslated: PChar; // PATH_TRANSLATED

    cbTotalBytes: DWORD; // Total bytes indicated from client

    cbAvailable: DWORD; // Available number of bytes

    lpbData: Pointer; // pointer to cbAvailable bytes

    lpszContentType: PChar; // Content type of client data

    GetServerVariable: TGetServerVariableProc;

    WriteClient: TWriteClientProc;

    ReadClient: TReadClientProc;

    ServerSupportFunction: TServerSupportFunctionProc;

  end;

  PEXTENSION_CONTROL_BLOCK = ^TEXTENSION_CONTROL_BLOCK;

Description

PEXTENSION_CONTROL_BLOCK is the type of the TISAPIRequest.ECB property, which represents the extension control block structure used by the server application DLL to communicate with the web server.


THTTPMethodEvent type
 VCL Reference

THTTPMethodEvent type

See also

The type for event handlers that are called while processing an HTTP request message.

Unit

httpapp

type THTTPMethodEvent = procedure (Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean) of object;

Description

THTTPMethodEvent is the type for event handlers that allow components in Web server applications to respond to HTTP request messages.

Sender is the dispatcher that receives the message or the component to which the dispatcher forwards the request message.

Request is the Request object that describes the headers and content of the incoming request message.

Response is the emerging response to the message described by Request. The event handler can fill out the properties of this response and even send it back to the originator of the request.

Handled indicates whether the response object specified by Response is completed. If the event handler does not complete the response, it must set Handled to False, so that the message is sent on to another component for further processing (or, in some cases, so that the component continues processing the message). If the event handler completes the response message, even if it does not send the message, it should set Handled to True.


THTMLAlign type
 VCL Reference

THTMLAlign type

Represents horizontal alignment within an HTML document or the cell of an HTML table.

Unit

HTTPProd

type THTMLAlign = (haDefault, haLeft, haRight, haCenter);

Description

THTMLAlign describes the value of an Align option in an HTML tag. The following table lists the possible values:

Value	Meaning

haDefault	The web browser can position the HTML control or text where it wants.

haLeft	Web browsers position the HTML control or text with its left edge on the left edge of the HTML document or HTML table cell in which it appears.

haRight	Web browsers position the HTML control or text with its right edge on the right edge of the HTML document or HTML table cell in which it appears.

haCenter	Web browsers horizontally center the HTML control or text within the HTML document or HTML table cell in which it appears.


THTMLBgColor type
 VCL Reference

THTMLBgColor type

Represents the background color of an HTML control or text element.

Unit

HTTPProd

type THTMLBgColor = type string;

Description

THTMLBgColor describes the value of a BgColor option in an HTML tag. Its value is any string that a Web browser recognizes as the name of a color. Most browser recognize the following strings:

Aqua	Black	Blue
Fuschia	Gray	Green
Lime	Maroon	Navy
Olive	Purple	Red
Silver	Teal	White
Yellow


THTMLVAlign type
 VCL Reference

THTMLVAlign type

Represents vertical alignment within an the cell of an HTML table.

Unit

HTTPProd

type THTMLVAlign = (haVDefault, haTop, haMiddle, haBottom, haBaseline);

Description

THTMLAlign describes the value of a VAlign option in a <TD> tag. The following table lists the possible values:

Value	Meaning

haVDefault	The Web browser can position contents of cells anywhere vertically.

haTop	Web browsers position the contents of cells in the column so that they appear lined up on the top.

haMiddle	Web browsers vertically center the contents of cells in the column.

haBottom	Web browsers position the contents of cells in the column so that they appear lined up on the bottom.

haBaseline	Web browsers position the contents of every cell within a row so that they all share the same baseline for the first line of text.


TMethodType type
 VCL Reference

TMethodType type

See also

Represents the type of an HTTP request message.

Unit

httpapp

type TMethodType = (mtAny, mtGet, mtPut, mtPost, mtHead);

Description

HTTP request messages include a METHOD header that indicates the purpose of the message. TMethodType encodes the most common values of the METHOD header for easy lookup and comparison. Components that respond to HTTP request methods use MethodType to indicate the type of messages to which they respond.

The following table lists the possible values:

Value	Meaning

mtAny	On a request object, this indicates a METHOD header that can’t be encoded using another TMethodType value. On a component that handles request messages, this indicates that the component will accept any message, regardless of its METHOD header (including any value that can be encoded using another TMethodType value).

mtGet	A request for information associated with the target URL. This corresponds to a METHOD header of GET.

mtPut	A request that the content of the request be used to replace the resource identified by the target URL. This corresponds to a METHOD header of PUT.

mtPost	A request that the application post the content of the request, as appropriate. This corresponds to a METHOD header of POST.

mtHead	A request for the properties of the response message, but not its content. This corresponds to a METHOD header of HEAD.


OnHTMLTag Example
 VCL Reference

OnHTMLTag Example

This example shows an OnHTMLTag event handler that replaces tags for images based on the information in a dataset and replaces table tags with an image of the entire dataset.  The image tags have the form <#IMAGE ImageID=5> while the table tags have the form <#TABLE>.  The table of images is represented by a table component named ImageTable, which is indexed by image ID.

procedure TMyModule.ImageHTMLTag(Sender: TObject; Tag: TTag; const TagString: String; TagParams: TStrings; var ReplaceText: String);

var

  ImageID: integer;

begin

  case Tag of

    tgImage:

      begin

      ImageID := StrToInt(TagParams.Values['ImageID']);

      if ImageTable.FindKey([ImageID]) then

        ReplaceText := '<IMG SRC=' +

                       ImageTable.FieldByName('Filename').AsString +

                       ' ALT=' +

                       ImageTable.FieldByName('Description').AsString +

                       ' >'

      else

        ReplaceText := '(Unknown Image)'

      end;

    tgTable:

      begin

        ReplaceText := DataSetTableProducer1.Content;

      end;

  end;

end;


Query, OnAction, Content Example
 VCL Reference

Query, OnAction, Content Example

This example shows a simple OnAction event handler that returns the content of a query table producer as the response to matching HTTP request messages.

procedure TInfoModule.WebModule1QueryAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

  if Request.QueryFields.Count = QueryTableProducer1.Query.ParamCount then

    Response.Content := QueryTableProducer1.Content;

  if Response.Content == '' then

    Handled := False; { indicate that the request was not handled }

  end;


Locate, Header, Content Example
 VCL Reference

Header, Content Example

This example shows an OnAction event handler that adds a header to a table producer component and sets the content of the current web response to display that header along with the table generated by the table producer.

procedure TCustomerInfoModule.WebModule1QueryActionAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

  if Customer.Locate('CustNo', Request.QueryFields.Values['CustNo'], []) then

  begin

    DataSetTableProducer1.Header.Clear;

    DataSetTableProducer1.Header.Add('The following table was produced using a TDatasetTableProducer.<P>');

    DataSetTableProducer1.Header.Add('Orders for: ' + CustomerCompany.AsString);

    Response.Content := DataSetTableProducer1.Content;

  end

  else

    Response.Content := Format('<html><body><b>Customer: %s not found</b></body></html>',

      [Request.QueryFields.Values['CustNo']]);

end;


ContentType, ContentStream, SendResponse Example
 VCL Reference

 ContentType, ContentStream, SendResponse Example

This example shows an OnAction event handler that creates a response message containing a jpeg image taken from a database table.

procedure TCustomerInfoModule.CustomerInfoModuleGetImageAction( Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

var

  Jpg: TJPEGImage;

  S: TMemoryStream;

  B: TBitmap;

begin

  Jpg := TJPEGImage.Create;

  try

    B := TBitmap.Create;

    try

      B.Assign(BioLifeGraphic);

      Jpg.Assign(B);

    finally

      B.Free

    end;

    S := TMemoryStream.Create;

    Jpg.SaveToStream(S);

    S.Position := 0;

    Response.ContentType := 'image/jpeg';

    Response.ContentStream := S;

    // do not free the stream because the response

    // object will handle that task.

  finally

    Jpg.Free;

  end;

end;


Cookies, Add, Expires, Secure, Name, Value, Authorization Example
 VCL Reference

Cookies, Add, Expires, Secure, Name, Value, Authorization, CookieFields Example

This example shows an OnAction event handler that adds a cookie to the response message. The cookie stores the current authorization information. This allows the current client to revisit the URL without resupplying a password for a limited period (1 day). Because a password is sensitive information, the cookie can only be sent on a secure connection.

procedure TWebModule1.PasswordCookieActionAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

  Handled := False; { adding a cookie does not handle the request }

  with Response.Cookies.Add do

  begin

    Name := 'LastPassword';

    { Set the LastPassword cookie to the current authorization }

    { Or, if no authorization was supplied this time, carry over }

    { the authorization from the LastPassword cookie of the request }

    Value := Request.Authorization;

    if Value = '' then

      Value :=  Request.CookieFields.Values('LastPassword');

    Secure := True; { be sure to use a secure connection!!!!}

    Expires := Now + 1; { this cookie expires in one day }

  end;

end;


Content, ContentFromString Example
 VCL Reference

Content, ContentFromString Example

This example shows an OnAction event handler that chains multiple page producers together. It  feeds the results of one page producer into another page producer using the ContentFromString method.

procedure WebModule1.Action2Action(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);

begin

  Response.Content := PageProducer2.ContentFromString(PageProducer1.Content);

end;


OnCommandStateChange, Busy Example
 VCL Reference

OnCommandStateChange, Busy Example

This example shows an OnCommandStateChange event handler that updates a set of controls that manipulate the Web browser. BackCtrl calls the GoBack method, the FrwrdCtrl calls the GoForward method, and StopCtrl calls the Stop method. Note that these control can be buttons in a tool bar, menu items, or actions in an action list that control both tool buttons and menu items.

procedure TForm1.WebBrowser1CommandStateChange(Sender: TObject; Command: Integer; Enable: WordBool);

begin

  case Command of

    CSC_NAVIGATEBACK: BackCtrl.Enabled := Enable;

    CSC_NAVIGATEFORWARD: FrwrdCtrl.Enabled := Enable;

    CSC_UPDATECOMMANDS: StopCtrl.Enabled := TWebBrowser(Sender).Busy;

  end;

end;


OnNavigateComplete2, OnDocumentComplete Example
 VCL Reference

OnNavigateComplete2, OnDocumentComplete Example

This example shows how to detect when a document is completely loaded, even if it includes multiple frames. Only the final OnDocumentComplete event passes the same Dispatch interface as the OnNavigateComplete event handler.

var

  CurDispatch: IDispatch; {save the interface globally }

procedure TForm1.WebBrowser1NavigateComplete2(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);

begin

  if CurDispatch = nilthen

    CurDispatch := pDisp; { save for comparison }

end;

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);

begin

  if (pDisp = CurDispatch) then

  begin

    Beep; {the document is loaded, not just a frame }

    CurDispatch := nil; {clear the global variable }

  end;

end;


Columns, Items, BgColor Example
 VCL Reference

Columns, Items, BgColor Example

The following example colors every other column in the HTML table produced by a TDataSetTableProducer gray:

with DataSetTableProducer1 do

  for I := 0 to Columns.Count - 1 do

  begin

    if I mod 2 = 0 then

      { note that we say Columns[I] rather than Columns.Items[I] }

      Columns[I].BgColor := 'White'

    else

      Columns[I].BgColor := 'Gray';

   end;


TWordField
 VCL Reference

 TWordField

Hierarchy	Properties	Methods	Events 	Using TWordField	See also

TWordField represents an unsigned 16-bit integer field in a dataset.

Unit

DB

Description

TWordField encapsulates the fundamental behavior common to fields that contain unsigned integer data. Word fields can hold values in the range 0 to 65535, and are used to hold values that are unsigned 16-bit whole numbers.

If you use the Fields editor at design time to create a persistent field component for the word field, you can access it by name at runtime. When using dynamic field components, you can access the TWordField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TWordField properties

TWordField	Alphabetically	Legend

In TWordField

DataSize

Derived from TIntegerField

AsFloat

AsInteger

AsString

AsVariant

MaxValue

MinValue

Value

Derived from TNumericField

DisplayFormat

EditFormat

Derived from TField

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsSQLTimeStamp

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWordField properties

TWordField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayFormat

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditFormat

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

MaxValue

MinValue

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ReadOnly

Required

Size

Tag

Text

ValidChars

Value

VCLComObject

Visible


TWordField.DataSize
 VCL Reference

 TWordField.DataSize

TWordField	See also	Example

Indicates the amount of memory needed to store the value of a word field in its native database format.

property DataSize: Word;

Description

Check DataSize to determine the number of bytes required to store a word field component’s value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For word fields, DataSize is always 2. This is the size of unsigned word values in the database tables, not the size of the LongInt data type used to store and manipulate values by TWordField.


 VCL Reference

TWordField events

TWordField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TWordField events

TWordField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TWordField methods

TWordField	Alphabetically	Legend

In TWordField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWordField methods

TWordField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TWordField.Create
 VCL Reference

 TWordField.Create

TWordField	See also

Creates an instance of TWordField.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TWordField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftWord, MinValue to 0, and MaxValue to 65535. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TWordField. After instantiating a TWordField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TWordField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TWordField with a dataset component by setting its DataSet property.

The example below creates a TWordField object for a field named Counter accessed through a TSQLDataSet named SQLDataSet1.

var

  T: TWordField;

begin

  SQLDataSet1.Close;

  T := TWordField.Create(SQLDataSet1);

  T.FieldName := 'Counter';

  T.Name := SQLDataSet1.Name + T.FieldName;

  T.Index := SQLDataSet1.FieldCount;

  T.DataSet := SQLDataSet1;

  SQLDataSet1.FieldDefs.UpDate;

  SQLDataSet1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TNumericField

TIntegerField

TWordField


TWinSocketStream
 VCL Reference

TWinSocketStream

Hierarchy	Properties	Methods	Using TWinSocketStream	See also

TWinSocketStream is a stream that provides services which allow applications to read from or write to socket connections.

Unit

ScktComp

Description

Use TWinSocketStream to read or write information over a blocking socket connection. Windows socket objects include methods to read from or write to the socket connection they represent. However, these methods do not provide a mechanism for timing out when the socket connection is dropped or for waiting until the socket connection is ready before reading.

When the socket is a non-blocking socket, this lack of a timeout or waiting mechanism is not a problem, because reading and writing occur asynchronously in response to notifications from the socket connection. For blocking sockets, however, these mechanisms provided by TWinSocketStream are necessary so that the application using the socket does not hang indefinitely.

To use a Windows socket stream, create an instance of TWinSocketStream, use the methods of the stream to read or write the data, and then free the Windows socket stream.

Note:	TWinSocketStream does not work with non-blocking sockets.


 VCL Reference

TWinSocketStream properties

TWinSocketStream	Alphabetically	Legend

In TWinSocketStream

TimeOut

Derived from TStream

Position

Size


 VCL Reference

TWinSocketStream properties

TWinSocketStream	By object	Legend

Position

Size

TimeOut


TWinSocketStream.TimeOut
 VCL Reference

TWinSocketStream.TimeOut

TWinSocketStream	See also

Specifies the time, in milliseconds, that the socket stream should wait before timing out on a read or write call.

property TimeOut: Longint;

Description

Set TimeOut to the amount of time that should elapse before a read or write operation aborts under the assumption that the socket connection has failed.


 VCL Reference

TWinSocketStream methods

TWinSocketStream	Alphabetically	Legend

In TWinSocketStream

Create

Destroy

Read

Seek

WaitForData

Write

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWinSocketStream methods

TWinSocketStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

WaitForData

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TWinSocketStream.Create
 VCL Reference

TWinSocketStream.Create

TWinSocketStream	See also	Example

Creates an instance of TWinSocketStream for a Windows socket object.

constructor Create(ASocket: TCustomWinSocket; TimeOut: Longint);

Description

Call Create to obtain an instance of TWinSocketStream for reading from or writing to the socket connection represented by the ASocket parameter. ASocket should be the endpoint of an open blocking socket connection to another Windows socket.

Create associates the stream with the socket connection, and allocates helper objects to allow it to determine when the socket connection is ready for reading or writing. The TimeOut property (the number of milliseconds before a read or write operation aborts) is initialized to the value of the TimeOut parameter.

If ASocket represents a non-blocking socket connection, Create raises an ESocketError exception.


TWinSocketStream.Destroy
 VCL Reference

TWinSocketStream.Destroy

TWinSocketStream	See also

Destroys an instance of TWinSocketStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead call Free. Free verifies that the TWinSocketStream reference is not nil and only then calls Destroy.

Free the TWinSocketStream object when it is no longer needed for reading from or writing to the socket connection.

Destroy frees the helper objects allocated in the Create method before calling the default destructor.


TWinSocketStream.Read
 VCL Reference

TWinSocketStream.Read

TWinSocketStream	See also 	Example

Reads up to Count bytes from the socket connection into Buffer.

function Read(var Buffer; Count: Longint): Longint; override;

Description

Use Read to read data from the socket connection when the number of bytes to be transferred is unknown. Buffer must have at least Count bytes allocated to hold the data that is read from the connection. Read returns the number of bytes actually transferred (which may be less than the number requested in Count.)

Read may return 0 if the socket connection is extremely slow and the read operation has not completed after TimeOut milliseconds. This ensures that the Read method does not hang indefinitely when a problem occurs with the socket connection.

To guard against the Read method timing out because of a slow connection, set Count fairly low, and make several calls to Read, rather than fewer calls with a large value of Count.

To ensure that the socket connection is ready to send data before calling Read, use the WaitForData method.

Unlike the ReadBuffer method, Read does not raise an exception if Count bytes are not read from the socket connection.


TWinSocketStream.Seek
 VCL Reference

TWinSocketStream.Seek

TWinSocketStream	See also

Always returns 0.

function Seek(Offset: Longint; Origin: Word): Longint; override;

Description

Seek overrides the inherited method to always set the Position property of the TWinSocketStream object to 0. Socket connections do not support random access. The Position property of a Windows socket stream can only reflect the position at the beginning of all remaining data.


TWinSocketStream.WaitForData
 VCL Reference

TWinSocketStream.WaitForData

TWinSocketStream	See also	Example

Waits up to Timeout milliseconds for the socket connection to be ready to transfer data.

function WaitForData(Timeout: Longint): Boolean;

Description

Call WaitForData to ensure that the socket connection is ready to read or write information. WaitForData returns True if the socket connection is ready. WaitForData returns False if the socket connection is not ready after Timeout milliseconds elapse.

Call WaitForData before reading or writing information over the socket connection. Otherwise, Read or Write method calls may time out before any data is transferred.


TWinSocketStream.Write
 VCL Reference

TWinSocketStream.Write

TWinSocketStream	See also 	Example

Writes Count bytes from Buffer to the socket connection.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to write data from a Buffer to the socket connection. Write returns the number of bytes transferred.

Write may return 0 if the socket connection is extremely slow and the write operation has not completed after TimeOut milliseconds. This ensures that the Write method does not hang indefinitely when a problem occurs with the socket connection.

To guard against the Write method timing out because of a slow connection, set Count fairly low, and make several calls to Write, rather than fewer calls with a large value of Count.

Unlike the WriteBuffer method, Write does not raise an exception if Count bytes are not written. For example, if the connection is too slow to transfer all the data, Write will return 0, where WriteBuffer will raise an exception.


Hierarchy

TObject

TStream

TWinSocketStream


TWideStringField
 VCL Reference

TWideStringField

Hierarchy	Properties	Methods	Events 	Using TWideStringField	See also

TWideStringField represents a large string field in a dataset.

Unit

DB

Description

TWideStringField encapsulates the fundamental behavior common to wide string fields. Wide string fields are similar to simple string fields except that their storage capacity is virtually unlimited and the server specifically returns the field as wide string and not string. An example of a wide string field is the Unicode field in Microsoft SQL Server. In all other ways, wide string fields serve the same purpose as string fields.

If you use the Fields editor at design time to create a persistent field component for the wide string field, you can access it by name at runtime. When using dynamic field components, you can access the TWideStringField instance using the dataset’s Fields property or FieldByName method.


 VCL Reference

TWideStringField properties

TWideStringField	Alphabetically	Legend

In TWideStringField

AsString

AsVariant

DataSize

Value

Derived from TStringField

AsBCD

AsBoolean

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

FixedChar

Transliterate

Derived from TField

Alignment

AsCurrency

AttributeSet

AutoGenerateValue

Calculated

CanModify

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataType

DefaultExpression

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

NewValue

Offset

OldValue

Origin

ParentField

ProviderFlags

ReadOnly

Required

Size

Text

ValidChars

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TWideStringField properties

TWideStringField	By object	Legend

Alignment

AsBCD

AsBoolean

AsCurrency

AsDateTime

AsFloat

AsInteger

AsSQLTimeStamp

AsString

AsVariant

AttributeSet

AutoGenerateValue

Calculated

CanModify

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConstraintErrorMessage

CurValue

CustomConstraint

DataSet

DataSize

DataType

DefaultExpression

DesignInfo

DisplayLabel

DisplayName

DisplayText

DisplayWidth

EditMask

EditMaskPtr

FieldKind

FieldName

FieldNo

FixedChar

FullName

HasConstraints

ImportedConstraint

Index

IsIndexField

IsNull

KeyFields

Lookup

LookupCache

LookupDataSet

LookupKeyFields

LookupList

LookupResultField

Name

NewValue

Offset

OldValue

Origin

Owner

ParentField

ProviderFlags

ReadOnly

Required

Size

Tag

Text

Transliterate

ValidChars

Value

VCLComObject

Visible


TWideStringField.AsString
 VCL Reference

TWideStringField.AsString

TWideStringField	See also

Represents the value of the field as a string.

property AsString: String;

Description

Use AsString to get or set the field’s value as a string type.

When setting the AsString property, TWideStringField converts the assigned string from ANSI to the character set for the dataset if the Transliterate property is True. Strings that have more characters than permitted by the value of the Size property are truncated when setting AsString.


TWideStringField.AsVariant
 VCL Reference

TWideStringField.AsVariant

TWideStringField	See also

Represents the value of a string field as a Variant value.

property AsVariant: Variant;

 Description

Assign the string field value to a Variant variable.

Assign a Variant value to the string field.

Using Variants is useful when both the field type and the type of the value to be assigned to the field are unknown.

Table1TheWideStringField.AsVariant := VariantVariable;


TWideStringField.DataSize
 VCL Reference

TWideStringField.DataSize

TWideStringField	See also

Indicates amount of memory needed to store the string field in its native database format.

property DataSize: Word;

Description

Inspect DataSize to determine the number of bytes required to store the fields value. Use DataSize to determine the size needed for a buffer when working with the GetData and SetData methods.

For wide string fields, DataSize is the value of the Size property plus one (for the trailing NULL character), multiplied by two.


TWideStringField.Value
 VCL Reference

TWideStringField.Value

TWideStringField	See also

Represents the data in the string field.

property Value: String;

Description

Use Value to read data directly from and write data directly to a string field component at runtime. Using the Value property is the same as using the AsString property. Use Value when you know the field component is a wide string field. Use AsString when working with a generic field component.

When setting the Value property, TWideStringField converts the assigned string from ANSI to the character set for the dataset if the Transliterate property is True. Strings that have more characters than permitted by the value of the Size property are truncated when setting Value.

Table1TheWideStringField.Value := WideStringVariable;


 VCL Reference

TWideStringField events

TWideStringField	Alphabetically	Legend

Derived from TField

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TWideStringField events

TWideStringField	By object	Legend

OnChange

OnGetText

OnSetText

OnValidate


 VCL Reference

TWideStringField methods

TWideStringField	Alphabetically	Legend

In TWideStringField

Create

Derived from TField

Assign

AssignValue

Clear

Destroy

FocusControl

GetData

IsBlob

IsValidChar

RefreshLookupList

SetData

SetFieldType

Validate

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWideStringField methods

TWideStringField	By object	Legend

AfterConstruction

Assign

AssignValue

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

FocusControl

Free

FreeInstance

FreeNotification

FreeOnRelease

GetData

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsBlob

IsImplementorOf

IsValidChar

MethodAddress

MethodName

NewInstance

ReferenceInterface

RefreshLookupList

RemoveComponent

RemoveFreeNotification

SafeCallException

SetData

SetFieldType

SetSubComponent

UpdateAction

Validate


TWideStringField.Create
 VCL Reference

TWideStringField.Create

TWideStringField	See also

Creates an instance of a TWideStringField object.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not explicitly create instances of TWideStringField. Instead, the field components are created automatically, as persistent field components defined in the Fields editor at design time or as dynamic field components created automatically by the dataset.

Create sets the DataType property to ftWideString, Size to 20, and Transliterate to True. The AOwner parameter specifies the component, typically a dataset, that becomes the new field’s Owner. The Owner is responsible for freeing the component.

In the rare cases when you must create a persistent field component at runtime, call Create to create and initialize an instance of TWideStringField. After instantiating a TWideStringField, associate it with a specific field by setting its FieldName property to the name of the field. Give the TWideStringField a unique identifier in the Name property. Establish where the field appears in the collection of fields by providing an ordinal number in the Index property. Associate the TWideStringField with a dataset component by setting its DataSet property.

The example below creates a TWideStringField object for a field named BookList accessed through a TQuery named Query1.

var

  T: TWideStringField;

begin

  Query1.Close;

  T := TWideStringField.Create(Query1);

  T.FieldName := 'BookList';

  T.Name := Query1.Name + T.FieldName;

  T.Index := Query1.FieldCount;

  T.DataSet := Query1;

  Query1.FieldDefs.UpDate;

  Query1.Open;

end;


Hierarchy

TObject

TPersistent

TComponent

TField

TStringField

TWideStringField


TActionLink
 VCL Reference

TActionLink

Hierarchy	Properties	Methods	Events	See also

TActionLink is the base class for action links that connect actions to commonly used properties of VCL objects, components and controls.

Unit

ActnList

Description

Most applications do not work directly with TActionLink objects. Instead, the clients of actions already include a specialized TActionLink descendant that manages the relationship between the client object and an action. TActionLink introduces methods to manage the relationship between properties on an action object and the corresponding properties of the client object. Descendant classes override these methods, implementing them for the particular properties of a class of client.

Component writers can use TActionLink as a base class for new action link classes that manage the relationship between actions and families of client objects that are not controls or menu items.

TActionLink introduces interfaces for methods that support the following properties, most of which are linked with properties of the same name:

Caption

Checked

Enabled

HelpContext

Hint

ImageIndex

ShortCut

Visible


 VCL Reference

TActionLink properties

TActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TActionLink properties

TActionLink	By object	Legend

Action


 VCL Reference

TActionLink events

TActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TActionLink events

TActionLink	By object	Legend

OnChange


 VCL Reference

TActionLink methods

TActionLink	Alphabetically	Legend

In TActionLink

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsGroupIndexLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsVisibleLinked

SetAutoCheck

SetCaption

SetChecked

SetEnabled

SetGroupIndex

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetShortCut

SetVisible

Derived from TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TActionLink methods

TActionLink	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsGroupIndexLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsShortCutLinked

IsVisibleLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetAutoCheck

SetCaption

SetChecked

SetEnabled

SetGroupIndex

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetShortCut

SetVisible

Update


TActionLink.IsCaptionLinked
 VCL Reference

TActionLink.IsCaptionLinked

TActionLink	See also

Indicates whether the Caption properties for the action and client are linked.

function IsCaptionLinked: Boolean; virtual;

Description

TActionLink descendants call IsCaptionLinked to determine whether they need to propagate changes to the Caption property of the action so that they are reflected by the client object. When IsCaptionLinked returns True, the action controls the Caption property: Changes to the Caption property of the action are reflected by changes to the corresponding property of the client object. When IsCaptionLinked returns False, the client object does not reflect the Caption property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsCaptionLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has a Caption property). Descendant classes override IsCaptionLinked to determine whether the Caption property is linked with the appropriate client property.


TActionLink.IsCheckedLinked
 VCL Reference

TActionLink.IsCheckedLinked

TActionLink	See also

Indicates whether the Checked properties for the action and client are linked.

function IsCheckedLinked: Boolean; virtual;

Description

TActionLink descendants call IsCheckedLinked to determine whether they need to propagate changes to the Checked property of the action so that they are reflected by the client object. When IsCheckedLinked returns True, the action controls the Checked property: Changes to the Checked property of the action are reflected by changes to the corresponding property of the client object. When IsCheckedLinked returns False, the client object does not reflect the Checked property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsCheckedLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has a Checked property). Descendant classes override IsCheckedLinked to determine whether the Checked property is linked with the appropriate client property.


TActionLink.IsEnabledLinked
 VCL Reference

TActionLink.IsEnabledLinked

TActionLink	See also

Indicates whether the Enabled properties for the action and client are linked.

function IsEnabledLinked: Boolean; virtual;

Description

TActionLink descendants call IsEnabledLinked to determine whether they need to propagate changes to the Enabled property of the action so that they are reflected by the client object. When IsEnabledLinked returns True, the action controls the Enabled property: Changes to the Enabled property of the action are reflected by changes to the corresponding property of the client object. When IsEnabledLinked returns False, the client object does not reflect the Enabled property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsEnabledLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has an Enabled property). Descendant classes override IsEnabledLinked to determine whether the Enabled property is linked with the appropriate client property.


TActionLink.IsGroupIndexLinked
 VCL Reference

TActionLink.IsGroupIndexLinked

TActionLink	See also

Indicates whether the GroupIndex properties for the action controls client behavior.

function IsGroupIndexLinked: Boolean; virtual;

Description

TActionLink descendants can call IsGroupIndexLinked to determine whether they need to propagate changes to the GroupIndex property of the action so that they are reflected by the client object. When IsGroupIndexLinked returns True, the action controls the GroupIndex property: Changes to the GroupIndex property of the action are reflected in the client object. When IsGroupIndexLinked returns False, the client object is not influenced by the GroupIndex property of its action.

As implemented in TActionLink, IsGroupIndexLinked merely checks that the Action property specifies a descendant of TCustomAction, and if so, returns True.


TActionLink.IsHelpLinked
 VCL Reference

TActionLink.IsHelpLinked

TActionLink	See also

Indicates whether the help properties for the action and client are linked.

function IsHelpLinked: Boolean; virtual;

Description

TActionLink descendants call IsHelpLinked to determine whether they need to propagate changes to the HelpContext, HelpKeyword, and HelpType properties of the action so that they are reflected by client objects. When IsHelpLinked returns True, the action controls these properties: Changes to any of the help properties of the action are reflected by changes to the corresponding property of the client object. When IsHelpLinked returns False, the client object does not reflect the help properties of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsHelpLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has HelpContext, HelpKeyword, and HelpType properties). Descendant classes override IsHelpLinked to determine whether these properties are linked with the appropriate client property.


TActionLink.IsHintLinked
 VCL Reference

TActionLink.IsHintLinked

TActionLink	See also

Indicates whether the Hint properties for the action and client are linked.

function IsHintLinked: Boolean; virtual;

Description

TActionLink descendants call IsHintLinked to determine whether they need to propagate changes to the Hint property of the action so that they are reflected by the client object. When IsHintLinked returns True, the action controls the Hint property: Changes to the Hint property of the action are reflected by changes to the corresponding property of the client object. When IsHintLinked returns False, the client object does not reflect the Hint property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsHintLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has a Hint property). Descendant classes override IsHintLinked to determine whether the Hint property is linked with the appropriate client property.


TActionLink.IsImageIndexLinked
 VCL Reference

TActionLink.IsImageIndexLinked

TActionLink	See also

Indicates whether the Hint properties for the action and client are linked.

function IsImageIndexLinked: Boolean; virtual;

Description

TActionLink descendants call IsImageIndexLinked to determine whether they need to propagate changes to the ImageIndex property of the action so that they are reflected by the client object. When IsImageIndexLinked returns True, the action controls the ImageIndex property: Changes to the ImageIndex property of the action are reflected by changes to the corresponding property of the client object. When IsImageIndexLinked returns False, the client object does not reflect the ImageIndex property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsImageIndexLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has an ImageIndex property). Descendant classes override IsImageIndexLinked to determine whether the ImageIndex property is linked with the appropriate client property.


TActionLink.IsShortCutLinked
 VCL Reference

TActionLink.IsShortCutLinked

TActionLink	See also

Indicates whether the ShortCut properties for the action and client are linked.

function IsShortCutLinked: Boolean; virtual;

Description

TActionLink descendants call IsShortCutLinked to determine whether they need to propagate changes to the ShortCut property of the action so that they are reflected by the client object. When IsShortCutLinked returns True, the action controls the ShortCut property: Changes to the ShortCut property of the action are reflected by changes to the corresponding property of the client object. When IsShortCutLinked returns False, the client object does not reflect the ShortCut property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsShortCutLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has a ShortCut property). Descendant classes override IsShortCutLinked to determine whether the ShortCut property is linked with the appropriate client property.


TActionLink.IsVisibleLinked
 VCL Reference

TActionLink.IsVisibleLinked

TActionLink	See also

Indicates whether the Visible properties for the action and client are linked.

function IsVisibleLinked: Boolean; virtual;

Description

TActionLink descendants call IsVisibleLinked to determine whether they need to propagate changes to the Visible property of the action so that they are reflected by the client object. When IsVisibleLinked returns True, the action controls the Visible property: Changes to the Visible property of the action are reflected by changes to the corresponding property of the client object. When IsVisibleLinked returns False, the client object does not reflect the Visible property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently.

As implemented in TActionLink, IsVisibleLinked merely checks that the Action property specifies a descendant of TCustomAction (that is, it is an action that has a Visible property). Descendant classes override IsVisibleLinked to determine whether the Visible property is linked with the appropriate client property.


TActionLink.SetAutoCheck
 VCL Reference

TActionLink.SetAutoCheck

TActionLink	See also

Introduces an interface for setting the AutoCheck property of a client.

procedure SetAutoCheck(Value: Boolean); virtual;

Description

The associated action calls SetAutoCheck when its AutoCheck property changes so that the action link can propagate the new value to the client object.

Value specifies the new value of the AutoCheck property.

As implemented in TActionLink, SetAutoCheck does nothing. Descendant classes override SetAutoCheck to set the client property that corresponds to the action’s AutoCheck property.


TActionLink.SetCaption
 VCL Reference

TActionLink.SetCaption

TActionLink	See also

Introduces an interface for setting the caption on a client.

procedure SetCaption(const Value: String); virtual;

Description

The associated action calls SetCaption when its Caption property changes so that the action link can propagate the new Caption value to the client object.

Value specifies the string to which the caption should be set.

As implemented in TActionLink, SetCaption does nothing. Descendant classes override SetCaption to set the client property that corresponds to the action’s Caption property if the IsCaptionLinked method returns True.


TActionLink.SetChecked
 VCL Reference

TActionLink.SetChecked

TActionLink	See also

Introduces an interface for setting the checked state of a client.

procedure SetChecked(Value: Boolean); virtual;

Description

The associated action calls SetChecked when its Checked property changes so that the action link can propagate the new Checked value to the client object.

Value specifies the new value of the Checked property.

As implemented in TActionLink, SetChecked does nothing. Descendant classes override SetChecked to set the client property that corresponds to the action’s Checked property if the IsCheckedLinked method returns True.


TActionLink.SetEnabled
 VCL Reference

TActionLink.SetEnabled

TActionLink	See also

Introduces an interface for setting the enabled state of a client.

procedure SetEnabled(Value: Boolean); virtual;

Description

The associated action calls SetEnabled when its Enabled property changes so that the action link can propagate the new Enabled value to the client object.

Value specifies the new value of the Enabled property.

As implemented in TActionLink, SetEnabled does nothing. Descendant classes override SetEnabled to set the client property that corresponds to the action’s Enabled property if the IsEnabledLinked method returns True.


TActionLink.SetGroupIndex
 VCL Reference

TActionLink.SetGroupIndex

TActionLink	See also

Introduces an interface for setting the GroupIndex property of a client.

procedure SetGroupIndex(Value: Integer); virtual;

Description

The associated action calls SetGroupIndex when its GroupIndex property changes so that the action link can propagate the new GroupIndex value to the client object.

Value specifies the new value of the GroupIndex property.

As implemented in TActionLink, SetGroupIndex does nothing. It is not strictly necessary for descendant classes to override SetGroupIndex to set the client property that corresponds to the action’s GroupIndex property, because the action itself implements the GroupIndex feature. That is, when an action’s Checked property is set to True, it unchecks other actions in the same action list if they have the same GroupIndex value.


TActionLink.SetHelpContext
 VCL Reference

TActionLink.SetHelpContext

TActionLink	See also

Introduces an interface for setting the help context of a client.

procedure SetHelpContext(Value: THelpContext); virtual;

Description

The associated action calls SetHelpContext when its HelpContext property changes so that the action link can propagate the new HelpContext value to the client object.

Value specifies the new value of the HelpContext property.

As implemented in TActionLink, SetHelpContext does nothing. Descendant classes override SetHelpContext to set the client property that corresponds to the action’s HelpContext property if the IsHelpLinked method returns True.


TActionLink.SetHelpKeyword
 VCL Reference

TActionLink.SetHelpKeyword

TActionLink	See also

Introduces an interface for setting the help keyword of a client.

procedure SetHelpKeyword(const Value: string); virtual;

Description

The associated action calls SetHelpKeyword when its HelpKeyword property changes so that the action link can propagate the new HelpKeyword value to the client object.

Value specifies the new value of the HelpKeyword property.

As implemented in TActionLink, SetHelpKeyword does nothing. Descendant classes override SetHelpKeyword to set the client property that corresponds to the action’s HelpKeyword property if the IsHelpLinked method returns True.


TActionLink.SetHelpType
 VCL Reference

TActionLink.SetHelpType

TActionLink	See also

Introduces an interface for setting the HelpType property of a client.

procedure SetHelpType(Value: THelpType); virtual;

Description

The associated action calls SetHelpType when its HelpType property changes so that the action link can propagate the new HelpType value to the client object.

Value specifies the new value of the HelpType property.

As implemented in TActionLink, SetHelpType does nothing. Descendant classes override SetHelpType to set the client property that corresponds to the action’s HelpType property if the IsHelpLinked method returns True.


TActionLink.SetHint
 VCL Reference

TActionLink.SetHint

TActionLink	See also

Introduces an interface for setting the hint for a client.

procedure SetHint(const Value: String); virtual;

Description

The associated action calls SetHint when its Hint property changes so that the action link can propagate the new Hint value to the client object.

Value specifies the new value of the Hint property.

As implemented in TActionLink, SetHint does nothing. Descendant classes override SetHint to set the client property that corresponds to the action’s Hint property if the IsHintLinked method returns True.


TActionLink.SetImageIndex
 VCL Reference

TActionLink.SetImageIndex

TActionLink	See also

Introduces an interface for setting the image index for a client.

procedure SetImageIndex(Value: Integer); virtual;

Description

The associated action calls SetImageIndex when its ImageIndex property changes so that the action link can propagate the new ImageIndex value to the client object.

Value specifies the new value of the ImageIndex property.

As implemented in TActionLink, SetImageIndex does nothing. Descendant classes override SetImageIndex to set the client property that corresponds to the action’s ImageIndex property if the IsImageIndexLinked method returns True.


TActionLink.SetShortCut
 VCL Reference

TActionLink.SetShortCut

TActionLink	See also

Introduces an interface for setting the shortcut for a client.

procedure SetShortCut(Value: TShortCut); virtual;

Description

The associated action calls SetShortCut when its ShortCut property changes so that the action link can propagate the new ShortCut value to the client object.

Value specifies the new value of the ShortCut property.

As implemented in TActionLink, SetShortCut does nothing. Descendant classes override SetShortCut to set the client property that corresponds to the action’s ShortCut property if the IsShortCutLinked method returns True.


TActionLink.SetVisible
 VCL Reference

TActionLink.SetVisible

TActionLink	See also

Introduces an interface for setting the visible state of a client.

procedure SetVisible(Value: Boolean); virtual;

Description

The associated action calls SetVisible when its Visible property changes so that the action link can propagate the new Visible value to the client object.

Value specifies the new value of the Visible property.

As implemented in TActionLink, SetVisible does nothing. Descendant classes override SetVisible to set the client property that corresponds to the action’s Visible property if the IsVisibleLinked method returns True.


Hierarchy

TObject

TBasicActionLink

TActionLink


TActionList
 VCL Reference

 TActionList

Hierarchy	Properties	Methods	Events	Using TActionList	See also

TActionList maintains a list of actions that can be used by components and controls, such as menu items and buttons.

Unit

ActnList

Description

Use Action lists to centralize the response to user commands (actions). Action list components maintain a list of actions that are available to the client controls in an application. Add action list components to your form or data module from the standard page of the component palette. Double-click the action list to display the action list editor, from which you can add, delete, and rearrange actions.

Note:	TActionList is intended primarily for managing the actions in cross-platform applications. While it is always possible to maintain the actions for an application using TActionList, it can be simpler to use an action manager instead.


 VCL Reference

TActionList properties

TActionList	Alphabetically	Legend

Derived from TCustomActionList

ActionCount

Actions

Images

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TActionList properties

TActionList	By object	Legend

ActionCount

Actions

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Images

Name

Owner

State

Tag

VCLComObject


 VCL Reference

TActionList events

TActionList	Alphabetically	Legend

Derived from TCustomActionList

OnChange

OnExecute

OnUpdate


 VCL Reference

TActionList events

TActionList	By object	Legend

OnChange

OnExecute

OnUpdate


 VCL Reference

TActionList methods

TActionList	Alphabetically	Legend

Derived from TCustomActionList

Create

Destroy

ExecuteAction

IsShortCut

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TActionList methods

TActionList	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomActionList

TActionList


TAnimate
 VCL Reference

 TAnimate

Hierarchy	Properties	Methods	Events	Using TAnimate	See also

TAnimate is a wrapper for a Windows animation control.

Unit

ComCtrls

Description

Use TAnimate to put an animation control on a form. An animation control is a window that silently displays an Audio Video Interleaved (AVI) clip. An AVI clip is a series of bitmap frames like a movie. Although AVI clips can have sound, animation controls only work with silent AVI clips. TAnimate works with uncompressed AVI files or AVI clips compressed using run-length encoding (RLE).

TAnimate can obtain its AVI clip from an AVI resource, and AVI file, or, if the application is running under Windows 9x, 2000, or NT 4.0, from Shell32.dll.

At design time, you can browse through the frames of the AVI clip specified in FileName, CommonAVI, ResName, or ResID by right-clicking on the TAnimate component and choosing Next Frame or Previous Frame.


 VCL Reference

TAnimate properties

TAnimate	Alphabetically	Legend

In TAnimate

Active

Center

CommonAVI

FileName

FrameCount

FrameHeight

FrameWidth

Open

Repetitions

ResHandle

ResID

ResName

StartFrame

StopFrame

Timers

Transparent

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TAnimate properties

TAnimate	By object	Legend

Action

Active

Align

AlignDisabled

Anchors

AutoSize

BiDiMode

BorderWidth

BoundsRect

Brush

Center

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

CommonAVI

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

FileName

Floating

FloatingDockSiteClass

FrameCount

FrameHeight

FrameWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Open

Owner

Parent

ParentColor

ParentShowHint

ParentWindow

Repetitions

ResHandle

ResID

ResName

ShowHint

Showing

StartFrame

StopFrame

TabOrder

TabStop

Tag

TBDockHeight

Timers

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TAnimate.Active
 VCL Reference

TAnimate.Active

TAnimate	See also 	Example

Indicates whether the animation control is playing the AVI clip.

property Active: Boolean;

Description

Set Active to True to cycle through the frames specified by the StartFrame and StopFrame properties by the number of iterations specified in the Repetitions property. Set Active to False to interrupt the animation control when it is playing the AVI clip.

The animation control must be Open before it can be Active.


TAnimate.Center
 VCL Reference

TAnimate.Center

TAnimate	See also

Determines whether the frames of the AVI clip are centered in the animation control.

property Center: Boolean;

Description

Use Center to position the frames of the AVI clip in the animation control when FrameHeight is not the same as ClientHeight or FrameWidth is not the same as ClientWidth. When Center is True, the frames are centered both horizontally and vertically in the client area of the control. When Center is False, the top left corner of the frames is positioned at the top left corner of the client area.


TAnimate.CommonAVI
 VCL Reference

TAnimate.CommonAVI

TAnimate	See also	Example

Indicates whether the animation control displays a one of the common Windows AVI clips provided in Shell32.dll.

type TCommonAVI = (aviNone, aviFindFolder, aviFindFile, aviFindComputer, aviCopyFiles, aviCopyFile, aviRecycleFile, aviEmptyRecycle, aviDeleteFile);

property CommonAVI: TCommonAVI;

Description

Set CommonAVI to display one of the common Windows AVI clips in the animation control. The common Windows AVI clips appear in the Windows user interface when the user attempts common file actions. CommonAVI is aviNone when the animation control displays an AVI clip that was specified in some other manner.

Setting CommonAVI automatically sets the FileName property to an empty string, ResHandle and ResID to 0, and ResName to an empty string.

Note:	CommonAVI cannot be used when running under NT 3.51.


TAnimate.FileName
 VCL Reference

TAnimate.FileName

TAnimate	See also

Specifies the name of the file that contains the AVI clip displayed by the animation control.

property FileName: TFileName;

Description

Set FileName to use the animation control to display the AVI clip stored in a file. FileName must be the name of a file containing a silent AVI clip.

Note:	Setting FileName automatically sets the CommonAVI property to aviNone, ResHandle and ResID to 0, and ResName to an empty string.


TAnimate.FrameCount
 VCL Reference

TAnimate.FrameCount

TAnimate	See also

Indicates the total number of frames in the AVI clip.

property FrameCount: Integer;

Description

Read FrameCount to determine the number of frames that can be displayed by the animation control. The animation control can play all the frames in the AVI clip, or run through a subset of those frames.


TAnimate.FrameHeight
 VCL Reference

TAnimate.FrameHeight

TAnimate	See also

Indicates the height, in pixels, of each image in the AVI clip.

property FrameHeight: Integer;

Description

Read FrameHeight to determine the height required to fully display the frames of the AVI clip. If AutoSize is True, the animation control automatically sizes itself to the value of FrameHeight.


TAnimate.FrameWidth
 VCL Reference

TAnimate.FrameWidth

TAnimate	See also

Indicates the width, in pixels, of each image in the AVI clip.

property FrameWidth: Integer;

Description

Read FrameWidth to determine the width required to fully display the frames of the AVI clip. If AutoSize is True, the animation control automatically resizes itself to the value of FrameWidth.


TAnimate.Open
 VCL Reference

TAnimate.Open

TAnimate	See also

Indicates whether the AVI clip is loaded into memory.

property Open: Boolean;

Description

Read Open to determine whether the AVI clip is loaded and ready for playing. When the AVI clip is specified using the CommonAVI, FileName, ResName, or ResID property, the animation control is opened automatically. When Open is True, the animation control displays the frame specified by the StartFrame property until the clip is played using the Active property or Play method.

Set Open to False to free the resources used by the AVI clip. When the animation control is not open, none of the frames can be shown.

Note:	When Open is changed from False to True, the StartFrame property is reset to 1 and the StopFrame property is reset to FrameCount.


TAnimate.Repetitions
 VCL Reference

TAnimate.Repetitions

TAnimate	See also

Specifies the number of times to repeat the sequence of frames.

property Repetitions: Integer;

Description

Set Repetitions to specify the number of times the sequence of frames in the AVI clip is repeated when the Active property is set to True. After the sequence is repeated by the specified number of times, the value of Active becomes False again.

To show the sequence a single time, set Repetitions to 1. Set Repetitions to 0 to indicate that the sequence of frames should repeat indefinitely. When Repetitions is 0, use the Active property or Stop method to interrupt the animation.

Note:	The Play method overrides Repetitions with the value passed as the Count parameter.


TAnimate.ResHandle
 VCL Reference

TAnimate.ResHandle

TAnimate	See also

Specifies the Windows handle for the module that contains the AVI clip as a resource.

type THandle = LongWord;

property ResHandle: THandle;

Description

Set ResHandle at runtime to the instance handle or module handle of the module that includes the animation resource. After setting ResHandle, set the ResID or ResName property to specify which resource in the indicated module is the AVI clip that should be displayed by the animation control.

If a value is not specified for ResHandle, the animate control uses the instance of the application’s main executable.

Note:	Setting ResHandle automatically sets the CommonAVI property to aviNone and the FileName property to an empty string.


TAnimate.ResID
 VCL Reference

TAnimate.ResID

TAnimate	See also

Specifies the resource ID of the AVI clip.

property ResID: Integer;

Description

Set ResID to identify a resource that should be used as the AVI clip displayed by the animation control. Use ResHandle to indicate the module that contains the resource identified by ResID.

If the resource file identifies the AVI clip by name rather than number, use the ResName property instead.

Note:	Setting ResID automatically sets the CommonAVI property to aviNone, the FileName property to an empty string, and the ResName property to an empty string.


TAnimate.ResName
 VCL Reference

TAnimate.ResName

TAnimate	See also

Specifies the resource name of the AVI clip.

property ResName: string;

Description

Set ResName to identify a resource that should be used as the AVI clip displayed by the animation control. Use ResHandle to indicate the module that contains the resource identified by ResName.

If the resource file identifies the AVI clip by number rather than number, use the ResID property instead.

Note:	Setting ResName automatically sets the CommonAVI property to aviNone, the FileName property to an empty string, and the ResID property to 0.


TAnimate.StartFrame
 VCL Reference

TAnimate.StartFrame

TAnimate	See also

Specifies the first frame displayed when the animation control is activated.

property StartFrame: SmallInt;

Description

Set StartFrame to specify the first frame in the AVI clip that is shown when the Active property is set to True. When StartFrame is 1, the clip is played from the very beginning, when StartFrame is 2, the clip begins with the second frame, and so on. If Repetitions is not 1, after the sequence of frames is played, it starts over at the frame specified by StartFrame (which may not be the first frame in the clip).

When the animation control is Open but not Active, it displays the frame specified by StartFrame.

Note:	The Play method overrides StartFrame with the value passed as the FromFrame parameter.


TAnimate.StopFrame
 VCL Reference

TAnimate.StopFrame

TAnimate	See also

Specifies the last frame displayed when the animation control is activated.

property StopFrame: SmallInt;

Description

Set StopFrame to specify the last frame in the AVI clip that is shown every time the animation control displays its sequence of frames. When StopFrame is 0, the clip is played to the very end. Otherwise, StopFrame is the number of the frame in the sequence. When the Active property is set to True, the animation control displays the sequence of frames from StartFrame to StopFrame, repeating this sequence by the number of iterations specified by the Repetitions property.

Note:	The Play method overrides StopFrame with the value passed as the ToFrame parameter.


TAnimate.Timers
 VCL Reference

TAnimate.Timers

TAnimate	See also

Specifies whether the frames are displayed using a timer.

property Timers: Boolean;

Description

Set Timers to specify whether the frames in the AVI clip should be changed in response to timer messages, or whether the sequence progresses asynchronously in a separate execution thread. When Timers is True, the frames progress in response to timer messages. This is useful for synchronizing the animation sequence with other actions such as playing a sound track. When Timers is False, the AVI clip is played in a separate thread.


TAnimate.Transparent
 VCL Reference

TAnimate.Transparent

TAnimate	See also

Specifies whether the background color of the frame matches the Color property.

property Transparent: Boolean;

Description

Set Transparent to True to replace the background color stored in the AVI file with the value of the Color property, or the parent control’s color if the value of ParentColor is True. Set Transparent to False to display the background color stored in the AVI clip.


 VCL Reference

TAnimate events

TAnimate	Alphabetically	Legend

In TAnimate

OnClose

OnOpen

OnStart

OnStop


 VCL Reference

TAnimate events

TAnimate	By object	Legend

OnClose

OnOpen

OnStart

OnStop


TAnimate.OnClose
 VCL Reference

TAnimate.OnClose

TAnimate	See also

Occurs immediately after the animation control is closed.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler to take specific action when the Open property is set to False. For example, if the animation control is used to cycle through a series of AVI clips, the clip could be changed in an OnClose event handler.

To respond when the clip stops playing, but the animation control remains open, use the OnStop event.


TAnimate.OnOpen
 VCL Reference

TAnimate.OnOpen

TAnimate	See also

Occurs immediately after the animation control is opened.

property OnOpen: TNotifyEvent;

Description

Write an OnOpen event handler to take specific action when the Open property changes from False to True. This is a good opportunity to set the Repetitions, StartFrame, and StopFrame properties before the AVI clip is activated, or to seek to a particular frame.


TAnimate.OnStart
 VCL Reference

TAnimate.OnStart

TAnimate	See also

Occurs immediately after the animation control starts playing.

property OnStart: TNotifyEvent;

Description

Write an OnStart event handler to take specific action when the AVI clip is played. Setting the Active property to True or calling the Play method triggers an OnStart event. OnStart is useful for launching other actions that should be synchronized with the playing of the animation sequence.


TAnimate.OnStop
 VCL Reference

TAnimate.OnStop

TAnimate	See also

Occurs when the animation control finishes playing.

property OnStop: TNotifyEvent;

Description

Write an OnStop event handler to take specific action when the AVI clip finishes playing all its repetitions. For example, use an OnStop event handler to shut down any simultaneous actions that were started in an OnStart event handler.


 VCL Reference

TAnimate methods

TAnimate	Alphabetically	Legend

In TAnimate

CanAutoSize

Create

Play

Reset

Seek

Stop

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAnimate methods

TAnimate	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanAutoSize

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Play

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Reset

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

Seek

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Stop

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TAnimate.CanAutoSize
 VCL Reference

TAnimate.CanAutoSize

TAnimate	See also

Indicates how the control can be resized.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanAutoSize is called automatically when the AutoSize property is True and an attempt is made to resize the control. It allows the animation control to adjust to the size of AVI video images.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the control. If the Open property is True, CanAutoSize adjusts these values so that they reflect the dimensions of the AVI video images and returns True. If the animation control is not Open, CanAutoSize returns False.


TAnimate.Create
 VCL Reference

TAnimate.Create

TAnimate	See also	Example

Creates and initializes an animation control.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an animation control at runtime. Animation controls placed on forms at design time are created automatically.

Pass a single Component as a parameter to provide the animation control with an Owner that is responsible for freeing it. This is the most commonly used constructor.

If you want to embed the animation control in a non-VCL window, use the constructor CreateParented, that is inherited from TWinControl. This constructor is used when the control is implemented as an ActiveX control that is embedded in a non-VCL window.

After calling the inherited constructor, Create initializes the following properties:

AutoSize is set to True.

Center is set to True.

ControlStyle is set to [csReflector].

StartFrame is set to 1.

Transparent is set to True.


TAnimate.Play
 VCL Reference

TAnimate.Play

TAnimate	See also

Displays a sequence of frames from the AVI clip.

procedure Play(FromFrame, ToFrame: Word; Count: Integer);

Description

Call Play to display the specified sequence of frames, repeating the sequence Count times. FromFrame is the first frame in the sequence, where 1 specifies the first frame in the clip, 2 specifies the second frame, and so on. ToFrame is the last frame in the sequence. The value of ToFrame should be greater than or equal to FromFrame and less than or equal to the value of the FrameCount property. Count specifies the number of times the sequence should be repeated. If Count is 0, the sequence is repeated until the Stop method is called.

If the animation control is not Open when Play is called, Play sets Open to True.

Note:	Calling Play is the same as setting StartFrame to FromFrame, StopFrame to ToFrame, Repetitions to Count, and then setting Active to True.


TAnimate.Reset
 VCL Reference

TAnimate.Reset

TAnimate	See also

Clears the values of StartFrame and StopFrame, and displays the first frame in the AVI clip.

procedure Reset;

Description

Call Reset to restore the animation control to a default state. Reset closes and reopens the animation control, generating OnClose and OnOpen events. The animation control is left open but not active.


TAnimate.Seek
 VCL Reference

TAnimate.Seek

TAnimate	See also

Displays a specified frame in the sequence.

procedure Seek(Frame: SmallInt);

Description

Call Seek to move to a particular frame in the AVI clip. The Frame parameter specifies which frame, where 1 is the first frame in the sequence, 2 is the second frame, and so on. Frame must be a value less than or equal to FrameCount.

If the animation control is not open when Seek is called, Seek sets Open to True.


TAnimate.Stop
 VCL Reference

TAnimate.Stop

TAnimate	See also

Interrupts the animation control when it is playing.

procedure Stop;

Description

Call Stop to halt the sequence of images in an active animation control. Stop does the same thing as setting the Active property to False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TAnimate


TBaseComponentEditor
 VCL Reference

TBaseComponentEditor

Hierarchy	Properties	Methods	See also

TBaseComponentEditor is the base class for all component editors.

Unit

DesignIntf

Description

Use TBaseComponentEditor or one of its descendants as a base class when defining a design-time editor for working with a new component class. All component editors must descend from TBaseComponentEditor and, in addition, they must support the IComponentEditor interface.

Create a new component editor class for a component class to add verbs to its context menu, change its default double-click behavior, or allow the component to use a new clipboard format.

TBaseComponentEditor does not implement any support for the IComponentEditor interface. This support must be supplied by descendant classes. For example, TBaseComponentEditor has an immediate descendant, TComponentEditor, which supplies a default implementation of the IComponentEditor interface. Typically, component writers use TComponentEditor or TDefaultEditor as a base class when defining new component editors. However, you can derive a component editor directly from TBaseComponentEditor if you want to provide your own implementation of IComponentEditor..

Once the component editor is defined, it can be registered to work with a particular component class.  A registered component editor is created for each component of that class when it is selected in the form designer.  To create the association between a component editor and a component class, call RegisterComponentEditor.


 VCL Reference

TBaseComponentEditor properties

TBaseComponentEditor	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TBaseComponentEditor properties

TBaseComponentEditor	By object 	Legend

RefCount


 VCL Reference

TBaseComponentEditor methods

TBaseComponentEditor	Alphabetically 	Legend

In TBaseComponentEditor

Create

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TBaseComponentEditor methods

TBaseComponentEditor	By object 	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TBaseComponentEditor.Create
 VCL Reference

TBaseComponentEditor.Create

TBaseComponentEditor

Creates a new TBaseComponentEditor object.

constructor Create(AComponent: TComponent; ADesigner: IDesigner);

Description

Do not create instances of a component editor. Registered component editors are created automatically for selected objects in the form designer.

AComponent is the instance of the component for which the editor is created.

ADesigner is an interface that the component editor can use to interact with the forms designer.


Hierarchy

TObject

TInterfacedObject

TBaseComponentEditor


TBiDiComboBoxEx
 VCL Reference

TBiDiComboBoxEx

Hierarchy	Properties	Methods	Events	See also

TBiDiComboBoxEx is the base class for extended combo box components that support right-to-left character sets.

Unit

StdCtrls

Description

Use TBiDiComboBoxEx as a base class when defining a control that represents a Windows extended combo box (ComboBoxEx) that needs to support a right-to-left character set. (The Windows ComboBoxEx control does not include this support.) An extended combo box is an edit box with a scrollable list attached to it that provides native support for item images. Users can select an item from the list or type directly into the edit box. Extended combo boxes can present the list as a drop-down list or as a list box that is always visible.

Note:	To create a combo box class that does not use the extended combo box features such as images associated with entries, use the TCustomComboBox class instead. TCustomComboBox and its descendants all include support for right-to-left character sets.

Do not create instances of TBiDiComboBoxEx. To put an extended combo box in a form, use a descendant of TBiDiComboBoxEx, such as TComboBoxEx.


 VCL Reference

TBiDiComboBoxEx properties

TBiDiComboBoxEx	Alphabetically	Legend

Derived from TCustomComboBoxEx

DropDownCount

Images

ItemsEx

SelText

Style

StyleEx

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBiDiComboBoxEx Properties

TBiDiComboBoxEx	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropDownCount

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Images

ItemIndex

Items

ItemsEx

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

Style

StyleEx

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TBiDiComboBoxEx events

TBiDiComboBoxEx	Alphabetically	Legend

Derived fromTCustomComboBoxEx

OnBeginEdit

OnEndEdit


 VCL Reference

TBiDiComboBoxEx Events

TBiDiComboBoxEx	By Object	Legend

OnBeginEdit

OnEndEdit


 VCL Reference

TBiDiComboBoxEx methods

TBiDiComboBoxEx	Alphabetically	Legend

In TBiDiComboBoxEx

ComboWndProc

Derived from TCustomComboBoxEx

Create

Destroy

Focused

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBiDiComboBoxEx Methods

TBiDiComboBoxEx	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ComboWndProc

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TBiDiComboBoxEx.ComboWndProc
 VCL Reference

TBiDiComboBoxEx.ComboWndProc

TBiDiComboBoxEx	See also

Responds to Windows messages sent to the edit control or drop-down list.

procedure WndProc(var Message: TMessage ComboWnd: HWnd; ComboProc: pointer); virtual;

Description

ComboWndProc handles the common processing of Windows messages sent to the edit region or list portion of the combo box. It is called by the EditWndProc and ListWndProc methods to take care of all processing that is not specific to the edit region or drop-down list.

The Message parameter describes the Windows message. The ComboWnd parameter is the windows handle for the edit region or list. The ComboProc parameter is a pointer to the default window procedure for the window that received the message. ComboWndProc intercepts messages that must be handled differently, depending on the value of BiDiMode.

Note:	Do not confuse ComboWndProc with the WndProc method. ComboWndProc responds to messages that are sent to the edit region or drop-down list. WndProc responds to messages sent to the combo box itself.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBoxEx

TBiDiComboBoxEx


TBits
 VCL Reference

TBits

Hierarchy	Properties	Methods	See also

TBits stores an “array” of Boolean values.

Unit

Classes

Description

Use TBits to store and access an indefinite number of boolean values. TBits can store as many of boolean values as can fit in available memory, automatically expanding its storage space as needed. If the number of boolean values is limited to 32, the same functionality can be achieved using the bitwise AND and OR operators against a 32-bit integer variable.


 VCL Reference

TBits properties

TBits	Alphabetically	Legend

In TBits

Bits

Size


 VCL Reference

TBits properties

TBits	By object	Legend

Bits

Size


TBits.Bits
 VCL Reference

TBits.Bits

TBits	See also

Provides indexed access to the array of boolean values that the TBits object represents.

property Bits[Index: Integer]: Boolean; default;

Description

Use Bits to read or set a particular boolean value, as indexed by the Index parameter. If Index is not in the range 0..Size - 1, an EBitsError exception is raised.

Bits is the default property of TBits. That means the name of the property can be omitted. For example,

MyBitsObject.Bits[0]

can be written

MyBitsObject[0]


TBits.Size
 VCL Reference

TBits.Size

TBits	See also

Represents the number of boolean values the TBits object can hold.

property Size: Integer;

Description

Set Size to expand or shrink the number of values in the array. When expanding the size, new entries are set to False. When shrinking the size, values whose indexes are less than or equal to the new size are preserved; entries whose indexes are greater than the new size are lost.


 VCL Reference

TBits methods

TBits	Alphabetically	Legend

In TBits

Destroy

OpenBit

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBits methods

TBits	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

OpenBit

SafeCallException


TBits.Destroy
 VCL Reference

TBits.Destroy

TBits	See also

Destroys an instance of TBits.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TBits object is not nil and only then calls Destroy.

 Destroy frees the memory used to store the array of boolean values.


TBits.OpenBit
 VCL Reference

TBits.OpenBit

TBits	See also

Returns the index of the first false value.

function OpenBit: Integer;

Description

Use OpenBit to find the first bit in the array that has not been set to True.


Hierarchy

TObject

TBits


TBitmapImage
 VCL Reference

TBitmapImage

Hierarchy	Methods	See also

TBitmapImage is the internal representation of the bitmap image for a TBitmap object.

Unit

Graphics

Description

TBitmapImage is used only for internal implementation in Delphi.  It represents the internal image of the bitmap encapsulated by the TBitmap object.  All of the data and methods introduced in TBitmapImage are private. They contain information about the specific HBITMAP, including pointers to the standard HBITMAP structures defined by Windows. TBitmapImage is referenced in the constructor of the TBitmap object when the bitmap image is created.

Note	TBitmapImage is how TBitmap does reference counting and handle sharing. Multiple instances can refer to the same TBitmap image. TBitmapImage is the actual owner of the bitmap handle.


 VCL Reference

TBitmapImage methods

TBitmapImage	Alphabetically	Legend

In TBitmapImage

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBitmapImage methods

TBitmapImage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TBitmapImage.Destroy
 VCL Reference

TBitmapImage.Destroy

TBitmapImage	See also

Frees the memory associated with the TBitmapImage object.

destructor Destroy; override;

Description

Do not call Destroy. The bitmap object automatically destroys the bitmap image.


Hierarchy

TObject

TSharedImage

TBitmapImage


TBoundLabel
 VCL Reference

TBoundLabel

Hierarchy	Properties	Methods	Events	See also

TBoundLabel is the type of a labeled edit control’s label.

Unit

ExtCtrls

Description

TBoundLabel implements the label of a labeled edit control. Unlike other label controls such as TLabel, TBoundLabel “belongs” to the labeled edit control (it is a subcomponent of the edit control). This means that the bound label’s Owner is the edit control rather than the form, and the edit control is responsible for loading and saving the bound label.

Use the properties of TBoundLabel to specify how you want the labeled edit control’s label to appear. For example, you can use the Caption property to specify the text that appears in the label. You can use the Alignment and Layout properties to specify the placement of that caption within the label.


 VCL Reference

TBoundLabel properties

TBoundLabel	Alphabetically	Legend

Derived from TCustomLabel

Layout

ShowAccelChar

Transparent

WordWrap

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBoundLabel properties

TBoundLabel	By object	Legend

Action

Align

Anchors

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Layout

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowAccelChar

ShowHint

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

WordWrap


 VCL Reference

TBoundLabel events

TBoundLabel	Alphabetically	Legend

Derived from TCustomLabel

OnMouseEnter

OnMouseLeave

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TBoundLabel events

TBoundLabel	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TBoundLabel methods

TBoundLabel	Alphabetically	Legend

In TBoundLabel

Create

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBoundLabel methods

TBoundLabel	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TBoundLabel.Create
 VCL Reference

TBoundLabel.Create

TBoundLabel	See also

Creates a new TBoundLabel object.

constructor Create(AOwner: TComponent); override;

Description

Do not create instances of TBoundLabel. Bound labels are instantiated by the labeled edit controls to which they belong.

AOwner specifies the labeled edit control that acts as the bound label’s Owner.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomLabel

TBoundLabel


TBrushRecall
 VCL Reference

TBrushRecall

Hierarchy	Properties	Methods	See also

TBrushRecall saves and restores a TBrush object.

Unit

Graphics

Description

Use TBrushRecall to store the current state of a TBrush object. You are then free to change the current state of the brush object. To restore the brush object to its original state, all that is necessary is to free the TBrushRecall object and the brush object is automatically restored to the saved property values.

You can update the TBrushRecall instance to reflect the current properties of the TBrush object by calling the Store method. You can prevent the TBrushRecall destructor from updating the TBrush object by calling the Forget method.


 VCL Reference

TBrushRecall properties

TBrushRecall	Alphabetically	Legend

Derived from TRecall

Reference


 VCL Reference

TBrushRecall properties

TBrushRecall	By object	Legend

Reference


 VCL Reference

TBrushRecall methods

TBrushRecall	Alphabetically	Legend

In TBrushRecall

Create

Derived from TRecall

Destroy

Forget

Store

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBrushRecall methods

TBrushRecall	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Forget

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Store


TBrushRecall.Create
 VCL Reference

TBrushRecall.Create

TBrushRecall	See also

Instantiates a TBrushRecall object.

constructor Create(ABrush: TBrush); override;

Description

Call Create to instantiate a brush recall object at runtime. Create saves the current properties of the TBrush object specified by ABrush, which becomes the value of the Reference property.

Subsequent calls to the Store method take snapshots of the properties of ABrush and save them, replacing the values saved by this constructor. When you destroy the TBrushRecall instance, the most recently-saved properties are assigned to ABrush, restoring it to a previous state.


Hierarchy

TObject

TRecall

TBrushRecall


TBrush
 VCL Reference

TBrush

Hierarchy	Properties	Methods	Events	Using TBrush	See also

TBrush represents the color and pattern used to fill solid shapes.

Unit

Graphics

Description

TBrush encapsulates the Windows brush object (HBRUSH) and is used to fill solid shapes, such as rectangles and ellipses, with a color or pattern.


 VCL Reference

TBrush properties

TBrush	Alphabetically	Legend

In TBrush

Bitmap

Color

Handle

Style

Derived from TGraphicsObject

OwnerCriticalSection


 VCL Reference

TBrush properties

TBrush	By object	Legend

Bitmap

Color

Handle

OwnerCriticalSection

Style


TBrush.Bitmap
 VCL Reference

TBrush.Bitmap

TBrush	See also 	Example

Specifies an external bitmap image that defines a pattern for the brush.

property Bitmap: TBitmap;

Description

Bitmap points to a TBitmap object that holds a bitmap image. If Bitmap is nonempty, the bitmap image (rather than the Style property) defines the brush’s pattern. If the image is larger than eight pixels by eight pixels, only the top left eight-by-eight region is used.

Changing the image does not affect the brush until the TBitmap is reassigned to the Bitmap property. Be sure to free the TBitmap after finishing with the brush, since TBrush will not free it.


TBrush.Color
 VCL Reference

TBrush.Color

TBrush	See also 	Example

Indicates the color of the brush.

property Color: TColor;

Description

The Color property determines the color of the brush. This is the color that is used to draw the pattern represented by the Style property, not the background color of the brush (unless Style is bsSolid).

Note:	If the value of the Style property is bsClear, the Color property is ignored. Further, any value assigned to the Color property is lost when Style is set to bsClear.


TBrush.Handle
 VCL Reference

TBrush.Handle

TBrush

Provides access to the handle of a system brush.

property Handle: HBrush;

Description

The Handle property provides access to the Windows GDI object handle. TBrush encapsulates the Windows brush object (HBRUSH) and is used to fill solid shapes, such as rectangles and ellipses, with a color or pattern.


TBrush.Style
 VCL Reference

TBrush.Style

TBrush	See also 	Example

Specifies the pattern for the brush.

type TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);

property Style:TBrushStyle;

Description

The Style property determines the pattern painted by the brush, unless a value is assigned to Bitmap. The possible values of Style are

Value	Pattern	Value	Pattern

bsSolid	bsCross

bsClear	bsDiagCross

bsBDiagonal	bsHorizontal

bsFDiagonal	bsVertical

Tip:	Set the Style property to bsClear to eliminate flicker when the object repaints.


 VCL Reference

TBrush events

TBrush	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 VCL Reference

TBrush events

TBrush	By object	Legend

OnChange


 VCL Reference

TBrush methods

TBrush	Alphabetically	Legend

In TBrush

Assign

Create

Destroy

Derived from TGraphicsObject

HandleAllocated

Derived from TPersistent

GetNamePath

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBrush methods

TBrush	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TBrush.Assign
 VCL Reference

TBrush.Assign

TBrush	See also

Copies the contents of the brush to another brush.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the brush’s properties from another TBrush instance.


TBrush.Create
 VCL Reference

TBrush.Create

TBrush

Creates and initializes a TBrush instance.

constructor Create;

Description

Create generates a new TBrush instance.


TBrush.Destroy
 VCL Reference

TBrush.Destroy

TBrush	See also

Destroys the TBrush instance and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the TBrush instance is not nil before calling Destroy.Destroy frees the resource identified by the Handle property.


Hierarchy

TObject

TPersistent

TGraphicsObject

TBrush


TButtonControl
 VCL Reference

TButtonControl

Hierarchy	Properties	Methods	See also

TButtonControl is the base class for objects that represent Windows button controls.

Unit

StdCtrls

Description

TButtonControl encapsulates behavior common to all button controls, check boxes, and radio buttons. Use TButtonControl as a base class when defining a standard Windows-style button. Do not create instances of TButtonControl directly in an application. Instead, use a descendant of TButtonControl to put a push button, check box, or radio button on a form.

Note:	Some buttons, such as TSpeedButton, do not use the built-in Windows button controls. These controls do not descend from TButtonControl.


 VCL Reference

TButtonControl properties

TButtonControl	Alphabetically	Legend

In TButtonControl

Checked

ClicksDisabled

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TButtonControl Properties

TButtonControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Checked

ClicksDisabled

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TButtonControl.Checked
 VCL Reference

TButtonControl.Checked

TButtonControl	See also	Example

Specifies whether the button control is checked.

property Checked: Boolean;

Description

Use Checked to determine whether a button control is checked.


TButtonControl.ClicksDisabled
 VCL Reference

TButtonControl.ClicksDisabled

TButtonControl	See also

Specifies whether the button control accepts mouse clicks.

property ClicksDisabled: Boolean;

Description

Use ClicksDisabled to determine whether a button control accepts mouse clicks. If ClicksDisabled is True, the button control doesn’t accept mouse clicks. Otherwise, the button control accepts mouse clicks.


 VCL Reference

TButtonControl methods

TButtonControl	Alphabetically	Legend

In TButtonControl

ActionChange

Create

GetActionLinkClass

GetChecked

SetChecked

WndProc

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TButtonControl methods

TButtonControl	By object	Legend

ActionChange

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetChecked

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetChecked

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TButtonControl.ActionChange
 VCL Reference

TButtonControl.ActionChange

TButtonControl	See also

Updates the button control to reflect changes in its associated action.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;

Description

ActionChange is called automatically when the associated action changes. It updates the button control to reflect the action’s current Checked state. Then it calls the inherited method, which checks the associated properties for that client type.

The Sender parameter is the associated action. The CheckDefaults parameter specifies whether properties and event handlers should be changed if they differ from the default values. When CheckDefaults is True, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When CheckDefaults is False, properties and event handlers are changed, regardless of their current values.


TButtonControl.Create
 VCL Reference

TButtonControl.Create

TButtonControl

Creates a button control.

constructor Create(AOwner: TComponent); override;

Description

Create calls the inherited constructorand then sets ImeMode to imDisable.


TButtonControl.GetActionLinkClass
 VCL Reference

TButtonControl.GetActionLinkClass

TButtonControl	See also

Returns the appropriate action link class that is associated with button controls.

function GetActionLinkClass: TControlActionLinkClass; override;

Description

GetActionLinkClass is used to get the appropriate class type for the action link used with button controls. GetActionLinkClass is used internally to create action link objects for clients when a button control has an associated action. The action link is used to link the action to the button control client. Each Action link class type is designed to link specific actions to clients based upon the types of properties the client supports. For button controls, GetActionLinkClass returns the TButtonActionLink class type.


TButtonControl.GetChecked
 VCL Reference

TButtonControl.GetChecked

TButtonControl	See also

Returns whether the button control is checked.

function GetChecked: Boolean; virtual;

Description

GetChecked is the read implementation of the Checked property.


TButtonControl.SetChecked
 VCL Reference

TButtonControl.SetChecked

TButtonControl	See also

Sets the Checked property.

procedure SetChecked(Value: Boolean); virtual;

Description

SetChecked is the write implementer for the Checked property.


TButtonControl.WndProc
 VCL Reference

TButtonControl.WndProc

TButtonControl	See also

Handles Windows messages.

procedure WndProc(var Message: TMessage); override;

Description

WndProc enables button objects to receive input focus when WM_LBUTTONDOWN and WM_LBUTTONDBLCLK messages occur.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl


TCheckListBox
 VCL Reference

 TCheckListBox

Hierarchy	Properties	Methods	Events	Using TCheckListBox	See also

TCheckListBox displays a scrollable list with check boxes next to each item.

Unit

CheckLst

Description

TCheckListBox is similar to TListBox, except that each item has a check box next to it. Users can check or uncheck items in the list.


 VCL Reference

TCheckListBox properties

TCheckListBox	Alphabetically	Legend

In TCheckListBox

AllowGrayed

Checked

Flat

ItemEnabled

Header

HeaderBackgroundColor

HeaderColor

State

Derived from TCustomListBox

AutoComplete

BorderStyle

Canvas

Columns

Count

IntegralHeight

ItemHeight

ItemIndex

Items

MultiSelect

ScrollWidth

SelCount

Selected

Sorted

Style

TabWidth

TopIndex

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCheckListBox properties

TCheckListBox	By object	Legend

Action

Align

AlignDisabled

AllowGrayed

Anchors

AutoComplete

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Checked

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Flat

Floating

FloatingDockSiteClass

Font

Handle

Header

HeaderBackgroundColor

HeaderColor

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IntegralHeight

ItemEnabled

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ScrollWidth

SelCount

Selected

ShowHint

Showing

Sorted

State

Style

TabOrder

TabStop

TabWidth

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCheckListBox.AllowGrayed
 VCL Reference

TCheckListBox.AllowGrayed

TCheckListBox	See also

Determines whether check box can be in a “grayed” state.

property AllowGrayed: Boolean;

Description

If AllowGrayed is set to True, each item has three possible states: checked, unchecked, and grayed. If AllowGrayed is set to False, each item has only two possible states: checked and unchecked.

Note:	It is also possible to disable individual items while still showing whether they are checked or unchecked. To disable items without using the grayed state, use the ItemEnabled property.


TCheckListBox.Checked
 VCL Reference

TCheckListBox.Checked

TCheckListBox	See also

Indicates which items are checked.

property Checked[Index: Integer]: Boolean;

Description

For each member of the Items array, Checked is True if a check mark appears in the item’s check box. Checked corresponds to the cbChecked state; that is, Checked is True when State = cbChecked and False when State = cbUnchecked or State = cbGrayed.

Note:	Items that have been disabled using the ItemEnabled property may still have a state of cbChecked and a Checked property of True.


TCheckListBox.Flat
 VCL Reference

TCheckListBox.Flat

TCheckListBox	See also

Determines whether the check boxes appear three-dimensional.

property Flat: Boolean;

Description

When Flat is True (the default), the check boxes in the list box have flat borders. Setting Flat to False gives the check boxes raised borders, which create a three-dimensional look.


TCheckListBox.Header
 VCL Reference

TCheckListBox.Header

TCheckListBox	See also

Indicates which items act as headers.

property Header[Index: Integer]: Boolean;

Description

Set Header to True to specify that an item in the check listbox acts as a header rather than a selectable item. By setting Header to True for various items in the list, you can divide the check listbox into multiple sections, where each header labels the beginning of a section.

When Header is True for an item, the list box does not display a check box next to the item, but rather, it displays only the item’s text. This item is drawn with a background color of HeaderBackgroundColor and a font color of HeaderColor, which can be used to make it visually distinct from the checkable items in the list box.

Index is the index of the item.


TCheckListBox.HeaderBackgroundColor
 VCL Reference

TCheckListBox.HeaderBackgroundColor

TCheckListBox	See also

Specifies the background color for a header item in the listbox.

property HeaderBackgroundColor: TColor;

Description

Set HeaderBackgroundColor to indicate the color that appears as the background of header items. Header items are items in the listbox for which the Header property is True. HeaderBackgroundColor can make a header item visually more distinct from the checkable items in the listbox.


TCheckListBox.HeaderColor
 VCL Reference

TCheckListBox.HeaderColor

TCheckListBox	See also

Specifies the font color for a header item in the listbox.

property HeaderColor: TColor;

Description

Set HeaderBackgroundColor to indicate the font color of header items. Header items are items in the listbox for which the Header property is True. HeaderColor should be a color that provides contrast with the HeaderBackgroundColor property, which specifies the background color for header items.


TCheckListBox.ItemEnabled
 VCL Reference

TCheckListBox.ItemEnabled

TCheckListBox	See also

Enables or disables individual items in the list.

property ItemEnabled[Index: Integer]: Boolean;

Description

Use ItemEnabled to enable or disable individual list items without using the cbGrayed state. Using ItemEnabled allows the list box to display check marks for items with a state of cbChecked while still graying the item and preventing the user from changing its state.

For each member of the Items array, ItemEnabled is True if the user can change the state of the item. Enabled items have a state of cbChecked or cbUnchecked.

ItemEnabled is False when State =cbGrayed or when the item has been explicitly disabled using this property.


TCheckListBox.State
 VCL Reference

TCheckListBox.State

TCheckListBox	See also

Indicates which items are checked.

type TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed);

property State[Index: Integer]: TCheckBoxState;

Description

For each member of the Items array, State indicates whether its check box is selected (cbChecked), deselected (cbUnchecked), or grayed (cbGrayed).

State combines the information provided by the Boolean Checked property and the Boolean ItemEnabled property:

 When Checked is True, State is cbChecked. (However, when Checked is False, State may be either cbUnchecked or cbGrayed.)

When State is cbGrayed, ItemEnabled is False. (However, ItemEnabled may also be False when State is cbUnchecked or cbChecked.)


 VCL Reference

TCheckListBox events

TCheckListBox	Alphabetically	Legend

In TCheckListBox

OnClickCheck

Derived from TCustomListBox

OnData

OnDataFind

OnDataObject

OnDrawItem

OnMeasureItem

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TCheckListBox events

TCheckListBox	By object	Legend

OnClick

OnClickCheck

OnContextPopup

OnData

OnDataFind

OnDataObject

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


TCheckListBox.OnClickCheck
 VCL Reference

TCheckListBoxOnClickCheck

TCheckListBox	See also

Occurs when the user selects or deselects an item’s check box.

property OnClickCheck: TNotifyEvent;

Description

Write an OnClickCheck event handler to implement any special processing that should occur when the user checks or unchecks an item.

Note:	This event does not occur for items that are grayed (State=cbGrayed) or disabled (ItemEnabled=False).


 VCL Reference

TCheckListBox methods

TCheckListBox	Alphabetically	Legend

In TCheckListBox

Destroy

Derived from TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

Create

DeleteSelected

ItemAtPos

ItemRect

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCheckListBox methods

TCheckListBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCheckListBox.Destroy
 VCL Reference

TCheckListBox.Destroy

TCheckListBox	See also

Destroys the TCheckListBox instance and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the check list box is not nil before it calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListBox

TCheckListBox


TComboExItem
 VCL Reference

TComboExItem

Hierarchy	Properties	Methods	See also

TComboExItem represents an item in an extended combo box.

Unit

ComCtrls

Description

TComboExItem represents a single item in the drop-down list of a TComboBoxEx object. Each TComboBoxEx item publishes a set of properties that determine its appearance in the list of the combo box. These include

Caption, which is the text that appears in the combo box list.

ImageIndex, which identifies an image to appear beside the caption.

SelectedImageIndex, which identifies an image to appear beside the caption when the item is selected.

OverlayImageIndex, which identifies an overlay bitmap that can mask out portions of the image (or selected image), allowing the background of the item to show through.

Indent, which indicates the number of pixels by which the item is indented in the list.


 VCL Reference

TComboExItem properties

TComboExItem	Alphabetically	Legend

In TComboExItem

Caption

Data

DisplayName

ImageIndex

Indent

OverlayImageIndex

SelectedImageIndex

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TComboExItem properties

TComboExItem	By object	Legend

Caption

Collection

Data

DisplayName

ID

ImageIndex

Indent

Index

OverlayImageIndex

SelectedImageIndex


TComboExItem.Caption
 VCL Reference

TComboExItem.Caption

TComboExItem	See also

Specifies the text value of the item.

property Caption: String;

Description

Set Caption to provide the item with a text value. This is the string that appears in the list of the combo box.


TComboExItem.Data
 VCL Reference

TComboExItem.Data

TComboExItem	See also

Points to user-defined data associated with the control.

property Data: Pointer;

Description

Set Data to associate this item with application-specific data. Data has no predefined meaning, although it is used for sorting items when the managing collection’s SortType property is stData.


TComboExItem.DisplayName
 VCL Reference

TComboExItem.DisplayName

TComboExItem	See also

Represents the name of the item as displayed in the collection editor.

property DisplayName: string;

Description

DisplayName is the string that represents the item in the Collection editor.


TComboExItem.ImageIndex
 VCL Reference

TComboExItem.ImageIndex

TComboExItem	See also

Identifies the image associated with this item.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to specify the image that appears beside this item’s text in the drop-down list of the combo box. ImageIndex is an index into the Images property of the combo box.

When the item is selected, the combo box displays the image specified by the SelectedImageIndex property instead, if that property is assigned.

Note:	To mask out portions of the image that ImageIndex specifies, you can identify an overlay mask using the OverlayImageIndex property.


TComboExItem.Indent
 VCL Reference

TComboExItem.Indent

TComboExItem

Indicate the number of pixels by which the item appears indented in the combo box list.

property Indent: Integer;

Description

Use Indent to cause the item to appear indented in the list portion of the combo box. If Indent is –1, the item does not appear indented. If Indent is non-negative, it indicates the number of pixels by which to indent the item.


TComboExItem.OverlayImageIndex
 VCL Reference

TComboExItem.OverlayImageIndex

TComboExItem	See also

Identifies an overlay mask that is used to mask out portions of the image and selected image.

property OverlayImageIndex: TImageIndex;

Description

Set OverlayImageIndex to use an overlay mask with the images that the ImageIndex and SelectedImageIndex properties identify. An overlay mask is a black-and-white bitmap that is combined with another image so that every place the overlay mask is white appears transparent in the other image.

OverlayImageIndex is an index into the Images property of the combo box. If OverlayImageIndex is –1, this item does not use an overlay mask.


TComboExItem.SelectedImageIndex
 VCL Reference

TComboExItem.SelectedImageIndex

TComboExItem	See also

Identifies the image associated with this item when it is selected.

property SelectedImageIndex: TImageIndex;

Description

Set SelectedImageIndex to specify the image that appears beside this item’s text when it is selected. SelectedImageIndex is an index into the Images property of the combo box.

When the item is not selected, the combo box displays the image specified by the ImageIndex property instead. If SelectedImageIndex is –1, the combo box also displays the image identified by the ImageIndex property when the item is selected.

Note:	To mask out portions of the image that SelectedImageIndex specifies, you can identify an overlay mask using the OverlayImageIndex property.


 VCL Reference

TComboExItem methods

TComboExItem	Alphabetically	Legend

In TComboExItem

Assign

Derived from TListControlItem

Create

Derived from TCollectionItem

DestroyTCollectionItem_Destroy>main

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComboExItem methods

TComboExItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetCaption

SetData

SetImageIndex


TComboExItem.Assign
 VCL Reference

TComboExItem.Assign

TComboExItem	See also

Copies the properties of another TComboExItem object.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to assign the properties of another combo box item to this one. If the Source parameter is another TComboExItem object, Assign copies the values of its Caption, ImageIndex, SelectedImageIndex, OverlayImageIndex, and Indent properties. Otherwise, Assign calls the inherited method, which copies the properties from any object that has an AssignTo method that can copy to a TComboExItem object.


Hierarchy

TObject

TPersistent

TCollectionItem

TListControlItem

TComboExItem


TCommonDialogAction
 VCL Reference

TCommonDialogAction

Hierarchy	Properties	Methods	Events	Using TCommonDialogAction	See also

TCommonDialogAction is the base class for action objects that display a dialog.

Unit

StdActns

Description

TCommonDialogAction implements the common behavior for actions that display a dialog when executed. Each descendant class represents a specific dialog. Do not use TCommonDialogAction directly in an application. Instead, use the specific TCommonDialogAction descendant that represents the type of dialog you want to execute. The various TCommonDIalogAction descendants are listed in the See also list.

TCommonDialogAction objects do not require a specific type of control to be active: they handle any target. When executed, the dialog action displays its dialog, and then generates an OnAccept or OnCancel event, which you can use to process the results from the dialog.

When using TCommonDialogAction desendants, there is no need to place the dialog component in your form or data module. The action object creates its own dialog component.


 VCL Reference

TCommonDialogAction properties

TCommonDialogAction	Alphabetically	Legend

In TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCommonDialogAction properties

TCommonDialogAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TCommonDialogAction.ExecuteResult
 VCL Reference

TCommonDialogAction.ExecuteResult

TCommonDialogAction 	See also

Indicates the result of executing the associated dialog.

property ExecuteResult: Boolean;

Description

When the dialog action fires, it executes the dialog specified by the Dialog property and sets ExecuteResult the value returned by that dialog’s Execute method. Thus, ExecuteResult is False if the dialog has not executed or the user canceled when the dialog executed, and True if the user exited the dialog by clicking OK.


 VCL Reference

TCommonDialogAction events

TCommonDialogAction	Alphabetically	Legend

In TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TCommonDialogAction events

TCommonDialogAction	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


TCommonDialogAction.BeforeExecute
 VCL Reference

TCommonDialogAction.BeforeExecute

TCommonDialogAction 	See also

Occurs immediately before the dialog appears.

property BeforeExecute: TNotifyEvent;

Description

Write a BeforeExecute event handler to initialize the dialog immediately before it executes. When the action fires, it generates a BeforeExecute event, and then executes its associated dialog.


TCommonDialogAction.OnAccept
 VCL Reference

TCommonDialogAction.OnAccept

TCommonDialogAction 	See also

Occurs after the user exits a modal dialog by selecting “OK” or when a modeless dialog is successfully displayed.

property OnAccept: TNotifyEvent;

Description

Write an OnAccept event handler to make use the dialog results after it executes. When the action fires, it executes its associated dialog. OnAccept occurs when the dialog component’s Execute method returns True. Thus, if the dialog is modal, OnAccept occurs when the user closes the dialog by clicking the OK button. If the dialog is modeless, OnAccept occurs when the dialog first appears.

For modal dialogs, use the OnAccept event to read the user’s selections from the dialog and act on them. TCommonDialogAction descendants introduce a Dialog property that the event handler can use to obtain information about the user’s selections.


TCommonDialogAction.OnCancel
 VCL Reference

TCommonDialogAction.OnCancel

TCommonDialogAction 	See also

Occurs after the user exits a modal dialog by selecting “Cancel” or when a modeless dialog fails to come up.

property OnCancel: TNotifyEvent;

Description

Write an OnCancel event handler to respond when the user cancels from the associated dialog. When the action fires, it executes its associated dialog. OnCancel occurs when the dialog component’s Execute method returns False. Thus, if the dialog is modal, OnCancel occurs when the user closes the dialog by clicking the Cancel button. If the dialog is modeless, OnCancel occurs if the dialog fails to appear.


 VCL Reference

TCommonDialogAction methods

TCommonDialogAction	Alphabetically	Legend

In TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCommonDialogAction methods

TCommonDialogAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TCommonDialogAction.Create
 VCL Reference

TCommonDialogAction.Create

TCommonDialogAction	See also

Creates an instance of TCommonDialogAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TCommonDialogAction constructor because actions are added at design time to an action list or action manager.

The TCommonDialogAction constructor creates an instance of its associated dialog, which descendant classes make available through the Dialog property.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TCommonDialogAction instance.


TCommonDialogAction.ExecuteTarget
 VCL Reference

TCommonDialogAction.ExecuteTarget

TCommonDialogAction 	See also

Executes the associated dialog and generates an OnAccept or OnCancel event.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and

1. Generates a BeforeExecute event, so that the application can initialize the associated dialog according to current conditions.

2. Calls the Execute method of the dialog.

3. Generates an OnAccept event or an OnCancel event, depending on the value returned by the Execute method. You can write code to make use of the results from executing the dialog in these event handlers.


TCommonDialogAction.HandlesTarget
 VCL Reference

TCommonDialogAction.HandlesTarget

TCommonDialogAction 	See also

Indicates whether the action can execute its dialog.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method lets the action object indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget always returns True, because the execution of the dialog does not depend on any target object.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction


TComponentList
 VCL Reference

TComponentList

Hierarchy	Properties	Methods	See also

TComponentList maintains a list of components, updating itself when a component is freed.

Unit

Contnrs

Description

Use TComponentList to store and maintain a list of components. TComponentList provides properties and methods to add, delete, rearrange, locate, access, and sort components. Like TObjectList, TComponentList controls the memory of its components; unless the OwnsObjects property is set to False (or the components are removed with the Extract method). TComponentList frees its components when they are removed from the list or when the TComponentList instance is itself destroyed.

In addition, TComponentList tracks its components. When a component is freed, TComponentList automatically updates itself by deleting the reference to the freed component and packing the list.


 VCL Reference

TComponentList properties

TComponentList	Alphabetically	Legend

In TComponentList

Items

Derived from TObjectList

OwnsObjects

Derived from TList

Capacity

Count

List


 VCL Reference

TComponentList properties

TComponentList	By object	Legend

Capacity

Count

Items

List

OwnsObjects


TComponentList.Items
 VCL Reference

TComponentList.Items

TComponentList	See also

Lists the component references.

property Items[Index: Integer]: TComponent; default;

Description

Use Items to access components in the list. Items is a zero-based array: The first component is indexed as 0, the second component is indexed as 1, and so forth. You can read or change the value at a specific index, or use Items with the Count property to iterate through the list.

If OwnsObjects is True, reassigning an Items value frees the component that previously occupied that position in the list.

Items can contain nil references. To remove nil references and reduce the size of the array, call the Pack method.


 VCL Reference

TComponentList methods

TComponentList	Alphabetically	Legend

In TComponentList

Add

Destroy

Extract

First

Last

IndexOf

Insert

Remove

Derived from TObjectList

Create

FindInstanceOf

Derived from TList

Assign

Clear

Delete

Error

Exchange

Expand

Move

Pack

Sort

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComponentList methods

TComponentList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Error

Exchange

Expand

Extract

FieldAddress

FindInstanceOf

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

MethodAddress

MethodName

Move

NewInstance

Pack

Remove

SafeCallException

Sort


TComponentList.Destroy
 VCL Reference

TComponentList.Destroy

TComponentList	See also

Destroys an instance of TComponentList.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the component list is not nil before calling Destroy.

Before destroying the TComponentList, Destroy calls Clear, which frees the components in the list if OwnsObjects is True.


TComponentList.Extract
 VCL Reference

TComponentList.Extract

TComponentListClass	See also

Removes a component from the list.

function Extract(Item: TComponent): TComponent;

Description

Call Extract to remove a component from the list. After the component is removed, all the components that follow it are moved up in index position and Count is decremented.

Extract does not free the component when it is removed from the list. This differs, for example, from the Delete method, which frees the component unless OwnsObjects is set to False.

To remove the reference to a component without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil.


TComponentList.Add
 VCL Reference

TComponentList.Add

TComponentList	See also

Inserts a component at the end of the list.

function Add(AComponent: TComponent): Integer;

Description

Call Add to insert a component at the end of the list. Add places the component after the last item, even if the array contains nil references, and returns the index of the inserted component. (The first component in the list has an index of 0.)

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity.


TComponentList.First
 VCL Reference

TComponentList.First

TComponentListClass	See also

Returns Items[0].

function First: TComponent);

Description

Call First to retrieve the first component in the Items array.


TComponentList.IndexOf
 VCL Reference

TComponentList.IndexOf

TComponentList	See also

Returns the index of the first component in the list with a specified value.

function IndexOf(AComponent: TComponent): Integer;

Description

Call IndexOf to get the index for a specified component in the list, where the first component has index 0, the second component has index 1, and so on. If a component is not in the list, IndexOf returns -1. If a component appears more than once, IndexOf returns the index of the first appearance.


TComponentList.Insert
 VCL Reference

TComponentList.Insert

TComponentList	See also

Adds a component to the list at a specified position.

procedure Insert(Index: Integer; AComponent: TComponent);

Description

Call Insert to add a component at a specified position in the list, shifting the item that previously occupied that position (and all subsequent items) up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity.

The Index parameter is zero-based, so the first position in the list has an index of 0.

To replace a nil reference with a new component without growing the array, set the Items property directly.


TComponentList.Last
 VCL Reference

TComponentList.Last

TComponentListClass	See also

Returns the component at the end of the Items array.

function Last: TComponent);

Description

Call Last to retrieve the last component in the Items array.


TComponentList.Remove
 VCL Reference

TComponentList.Remove

TComponentList	See also

Removes a specified component from the list and (if OwnsObjects is True) frees the component.

function Remove(AComponent: TComponent): Integer;

Description

Call Remove to delete a specific component from the list when its index is unknown. The value returned is the index of the component in the Items array before it was removed. If the specified component is not found on the list, Remove returns –1. If OwnsObjects is True, Remove frees the component in addition to removing it from the list.

After a component is deleted, all the components that follow it are moved up in index position and Count is decremented. If a component appears more than once on the list, Remove deletes only the first appearance. Hence, if OwnsObjects is True, removing a component that appears more than once results in empty references later in the list.

To use an index position (rather than an object reference) to specify the component to be removed, call Delete.

To remove a component from the list without freeing it, call Extract.


Hierarchy

TObject

TList

TObjectList

TComponentList


TComponent
 VCL Reference

TComponent

Hierarchy	Properties	Methods	See also

TComponent is the common ancestor of all components that can appear in the form designer

Unit

Classes

Description

Components are persistent objects that have the following capabilities:

The ability to appear on Component palette and be manipulated in the form designer.

The ability to own and manage other components.

Enhanced streaming and filing capabilities.

The ability to be converted into an ActiveX control or other COM object by wizards on the ActiveX page of the New Objects dialog.

Do not create instances of TComponent. Use TComponent as a base class when declaring non-visual components that can appear on the component palette and be used in the form designer. Properties and methods of TComponent provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.

To create components which are visible to users at runtime, use TControl or its descendants as a base. To create visual windowed controls use TWinControl or its descendants as a base.


 VCL Reference

TComponent properties

TComponent	Alphabetically	Legend

In TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TComponent properties

TComponent	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


TComponent.ComObject
 VCL Reference

TComponent.ComObject

TComponent	See also

Specifies the interface reference implemented by the component.

property ComObject: IUnknown;

Description

Use ComObject to assign a COM interface implemented by a component to an interface reference. This property is used by VCL components that support COM interfaces.

If the component is not a wrapper for a COM component, trying to read ComObject causes TComponent to raise an EComponentError exception.


TComponent.ComponentCount
 VCL Reference

TComponent.ComponentCount

TComponent	See also 	Example

Indicates the number of components owned by the component.

property ComponentCount: Integer;

Description

Use ComponentCount to find or verify the number of components owned by a component, or when iterating through the Components list to perform some action on all owned components. ComponentCount is used internally for such iterative procedures.

Note:	The ComponentCount of a component contains the same number of items as in the Components list for that component, and is always 1 more than the highest Components index, because the first Components index is always 0.


TComponent.ComponentIndex
 VCL Reference

TComponent.ComponentIndex

TComponent	See also

Indicates the position of the component in its owner's Components property array.

property ComponentIndex: Integer;

Description

Use ComponentIndex when iterating through the Components list of the component’s owner to perform some action on owned components. It can be used in conjunction with ComponentCount. ComponentIndex is used internally for iterative assignment procedures.

Note:	The first component in the list has a ComponentIndex value of 0, the second has a value of 1, and so on. Therefore, when using ComponentIndex with ComponentCount, note that ComponentCount is always 1 more than the highest Components index.


TComponent.Components
 VCL Reference

TComponent.Components

TComponent	See also 	Example

Lists all components owned by the component.

property Components[Index: Integer]: TComponent;

Description

Use Components to access any of the components owned by this component, such as the components owned by a form. The Components property is most useful when referring to owned components by number rather than name. It is also used internally for iterative processing of all owned components.

Note:	For convenience use Components with ComponentCount for iterative processing. However, be aware that while the ComponentCount of a component contains the same number of items as in the Components list for that component, ComponentCount is always 1 more than the highest Components index, because the first Components index is always 0.


TComponent.ComponentState
 VCL Reference

TComponent.ComponentState

TComponent	See also

Describes the current state of the component, indicating when a component needs to avoid certain actions.

type TComponentState = set of (csLoading, csReading, csWriting, csDestroying, csDesigning, csAncestor, csUpdating, csFixups, csFreeNotification, csInline, csDesignInstance);

property ComponentState: TComponentState;

Description

Components use the ComponentState property to detect states in which certain kinds of actions are allowed or disallowed. For example, if a component needs to avoid certain behaviors at design time that it performs at runtime, it can check for the csDesigning flag. ComponentState is read-only and its flags are set automatically when appropriate.

The TComponentState type defines the set of possible state flags for the ComponentState property. The following table lists the possible values for the TComponentState type and the meaning corresponding to each flag:

Flag	Component state

csAncestor	The component was introduced in an ancestor form. Only set if csDesigning is also set.

csDesigning	The component is in a form being manipulated by the form designer.

csDestroying	The component is about to be destroyed.

csFixups	The component is linked to a component in another form that has not yet been loaded. This flag is cleared when all pending fixups are resolved.

csFreeNotification	One or more other components have requested that this component notify them when it is destroyed. This flag is set when another component calls this component’s FreeNotification method.

csInline	The component is a top-level component that can be modified at design time and also embedded in a form. This flag is used to identify nested frames while loading and saving.

csLoading	A filer object is currently loading the component. This flag is set when the component is first created and not cleared until the component and all its children are fully loaded (when the Loaded method is called).

csReading	The component is reading its property values from a stream. Note that the csLoading flag is always set as well when csReading is set. That is, csReading is set for the subinterval of the time when a component is loading that covers reading in property values.

csUpdating	The component is being updated to reflect changes in an ancestor form. Only set if csAncestor is also set.

csWriting	The component is writing its property values to a stream.

csDesignInstance	The component is the root object in a designer. For example, it is set for a frame when you are designing it, but not on a frame that acts like a component. This flag always appears with csDesigning.


TComponent.ComponentStyle
 VCL Reference

TComponent.ComponentStyle

TComponent	See also

Governs the behavior of the component.

type TComponentStyle = set of (csInheritable, csCheckPropAvailcsSubComponent, csTransient);

property ComponentStyle: TComponentStyle;

Description

ComponentStyle governs how the component interacts with the streaming system and the Object Inspector. ComponentStyle is a read-only property. Typically, the value of the various component style flags are part of a component’s definition, specified in a component’s constructor. The one exception to this is the csSubComponent style, which can be set by calling the SetSubComponent method.

The following table indicates the meaning of the various ComponentStyle flags:

Value	Meaning

csInheritable	Descendant form types can inherit from the component. If any of the components in a form do not have the csInheritable style, the form cannot be used as the ancestor of an inherited form.

csCheckPropAvail	The component needs to check its properties for readability. This is only used for COM controls, where the Object Inspector cannot tell directly that a property is readable, and therefore displayable. Native components do not use this style.

csSubComponent	The component is a subcomponent of the component that is the value of its Owner property. Unlike top-level components, subcomponents are not saved with the form or data module in which they reside. Instead, a subcomponent appears as the value of a published property of its Owner, and its published properties and events are saved in the form file with the owning component.

csTransient	The component is a temporary object that should not be saved in a form file.


TComponent.DesignInfo
 VCL Reference

TComponent.DesignInfo

TComponent	See also

Contains information used by the Form designer.

property DesignInfo: Longint;

Description

DesignInfo is used internally. Do not use this property in applications.


TComponent.Name
 VCL Reference

TComponent.Name

TComponent	See also 	Example

Specifies the name of the component as referenced in code.

property Name: TComponentName;

Description

Use Name to change the name of a component to reflect its purpose in the current application. By default, Delphi assigns sequential names based on the type of the component, such as 'Button1', 'Button2', and so on.

Use Name to refer to the component in code.

Warning:	Changing Name at runtime causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception.


TComponent.Owner
 VCL Reference

TComponent.Owner

TComponent	See also

Indicates the component that is responsible for streaming and freeing this component.

property Owner: TComponent;

Description

Use Owner to find the owner of a component. The Owner of a component is responsible for two things:

The memory for the owned component is freed when its owner's memory is freed. This means that when a form is destroyed, all the components on the form are also destroyed.

The Owner is responsible for loading and saving the published properties of its owned controls.

By default, a form owns all components that are on it. In turn, the form is owned by the application. Thus when the application shuts down and its memory is freed, the memory for all forms (and all their owned components) is also freed. When a form is loaded into memory, it loads all of the components that are on it.

The owner of a component is determined by the parameter passed to the constructor when the component is created. For components created in the form designer, the form is automatically assigned as the Owner.

Warning:	If a component has an Owner other than a form or data module, it will not be saved or loaded with its Owner unless you identify it as a subcomponent. To identify a component as a subcomponent, call the SetSubComponent method.


TComponent.Tag
 VCL Reference

TComponent.Tag

TComponent	Example

Stores an integer value as part of a component.

property Tag: Longint;

Description

Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.


TComponent.VCLComObject
 VCL Reference

TComponent.VCLComObject

TComponent	See also

Represents information used internally by components that support COM.

property VCLComObject: Pointer;

Description

VCLComObject is for internal use only. To access the interfaces implemented by a VCL COM component, use the ComObject property instead.


 VCL Reference

TComponent methods

TComponent	Alphabetically	Legend

In TComponent

_AddRef

_Release

BeforeDestruction

ChangeName

Create

DefineProperties

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetChildOwner

GetChildParent

GetChildren

GetIDsOfNames

GetNamePath

GetOwner

GetParentComponent

GetTypeInfo

GetTypeInfoCount

HasParent

InsertComponent

Invoke

IsImplementorOf

Loaded

Notification

PaletteCreated

QueryInterface

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAncestor

SetChildOrder

SetDesigning

SetDesignInstance

SetInline

SetName

SetParentComponent

SetSubComponent

UpdateAction

Updated

UpdateRegistry

Updating

ValidateContainer

ValidateInsert

ValidateRename

WriteState

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TComponent methods

TComponent	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ChangeName

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineProperties

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildOwner

GetChildParent

GetChildren

GetIDsOfNames

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

GetParentComponent

GetTypeInfo

GetTypeInfoCount

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

Invoke

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

Notification

PaletteCreated

QueryInterface

ReadState

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetAncestor

SetChildOrder

SetDesigning

SetDesignInstance

SetInline

SetName

SetParentComponent

SetSubComponent

UpdateAction

Updated

UpdateRegistry

Updating

ValidateContainer

ValidateInsert

ValidateRename

WriteState


TComponent.BeforeDestruction
 VCL Reference

TComponent.BeforeDestruction

TComponent	See also

Performs any necessary actions before the first destructor is called.

procedure BeforeDestruction; override;

Description

BeforeDestruction is called automatically immediately before the component’s first destructor executes. Do not call it explicitly in your applications.

As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.


TComponent.ChangeName
 VCL Reference

TComponent.ChangeName

TComponent	See also

Sets the private, internal storage for the Name property to the string passed in NewName.

procedure ChangeName(const NewName: TComponentName);

Description

Do not use ChangeName directly in an application.  Instead, use the Name property.

Note:	The property setter for Name, SetName, uses ChangeName to change the component's name. ChangeName is not virtual; do not override it.


TComponent.Create
 VCL Reference

TComponent.Create

TComponent	See also

Allocates memory and constructs a safely initialized instance of a component.

constructor Create(AOwner: TComponent); virtual;

Description

All objects have a Create method that constructs the object. TComponent redefines Create so that, for components, Create also:

establishes the relationship of a component and its Owner, as indicated by the AOwner parameter

sets the ComponentStyle property to csInheritable, meaning that the component can be inherited by a descendant form type

It is not necessary to explicitly create components added in the form designer. These components are created automatically when the application is run, and they are destroyed when the application is closed.

For components created programmatically, that is, not created in the form designer, call Create and pass in an owner component as the AOwner parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use Free when it needs to be destroyed.

Tip:	When passing in Self as the Owner parameter, consider what Self references. If a component creates another component in one of its methods, then Self refers to the first component and not the component being created, which is then owned by the first component.

Note:	TComponent.Create is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the form designer. Do not forget to use the override directive when declaring a new component’s Create constructor.


TComponent.DefineProperties
 VCL Reference

TComponent.DefineProperties

TComponent	See also	Example

Designates methods for storing an object's unpublished data on a stream such as a form file.

procedure DefineProperties(Filer: TFiler); override;

Description

TComponent overrides the DefineProperties method defined in TPersistent to define "fake" Top and Left properties. These are defined so that components that are not controls can be manipulated at design-time. However, the Top and Left properties are hidden, that is, they are not published, because only controls appear at run-time.

DefineProperties is virtual; descendant classes can override it. When overriding DefineProperties, be aware that the Ancestor property of Filer might be set, and that this property can determine whether or not it is appropriate to write properties.

DefineProperties is called automatically as part of the component streaming system; do not call it directly.


TComponent.Destroy
 VCL Reference

TComponent.Destroy

TComponent	See also

Disposes of the component and its owned components.

destructor Destroy; override;

Description

Do not call Destroy directly. Call Free instead.  Free verifies that the component is not nil, and only then calls Destroy.

Before freeing the instance of the component, Destroy sends out an opRemove notification so that any other component with dependencies on the component can make appropriate adjustments.  Destroy then frees all components that it owns (all components listed in the Components property).  Finally it removes the Component from the Components property of its Owner and frees the memory allocated to the component.

Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains.

To destroy a form, call its Release method. Release waits for all the form’s event handlers and the event handlers of the form’s components to finish executing before destroying the form.

Note:	A form owns all the controls and non-visual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global Application object. When an application terminates, it frees the global Application object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call Free after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates.


TComponent.DestroyComponents
 VCL Reference

TComponent.DestroyComponents

TComponent	See also

Destroys all owned components.

procedure DestroyComponents;

Description

DestroyComponents iterates through the components owned by the component, removing each from the list of owned components and destroying it.

It is not necessary to call DestroyComponents directly. DestroyComponents is automatically called in the destructor sequence that begins with a call to Free and ends with the object destroying itself.


TComponent.Destroying
 VCL Reference

TComponent.Destroying

TComponent	See also

Indicates that the component and its owned components are about to be destroyed.

procedure Destroying;

Description

Destroying sets the csDestroying flag in the ComponentState property.  It then calls the Destroying method for each owned component so that their csDestroying flags are also set. If csDestroying is already set, Destroying does nothing.

It is not necessary to call Destroying directly. Destroying is automatically called in the destructor sequence that begins with a call to Free and ends with the object destroying itself.


TComponent.ExecuteAction
 VCL Reference

TComponent.ExecuteAction

TComponent	See also

Invokes an action with the component as its target.

function ExecuteAction(Action: TBasicAction): Boolean; dynamic;

Description

When the user invokes an action, Delphi makes a series of calls to respond to that action. First, it generates an OnExecute event of the action list that contains the action. If the action list does not handle the OnExecute event, then the action is routed to the Application object’s ExecuteAction method, which invokes the OnActionExecute event handler. If the OnActionExecute event handler does not handle the action, then it is routed to the action’s OnExecute event handler. If that does not handle the action, the active control’s ExecuteAction method is called.

The Action parameter specifies the action that was invoked. ExecuteAction returns True if the action was successfully dispatched, and False if the component could not handle the action. If ExecuteAction returns False for the active control, Delphi calls the active form’s ExecuteAction method. If this returns False, Delphi tries all active controls in the form. If these all return False, Delphi repeats the process with the main form, if that is different from the active form.

Note:	ExecuteAction is only called for components and forms that are Visible.

In TComponent, ExecuteAction checks whether the action component knows how to perform its function with the component as a target, and if so, executes the action and returns True. Otherwise, ExecuteAction returns False.

Descendants override ExecuteAction to interpret actions in a class-specific manner and change the default behavior of the action when it specifies the descendant class as a target.


TComponent.FindComponent
 VCL Reference

TComponent.FindComponent

TComponent	See also	Example

Indicates whether a given component is owned by the component.

function FindComponent(const AName: string): TComponent;

Description

FindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another.


TComponent.FreeNotification
 VCL Reference

TComponent.FreeNotification

TComponent	See also

Ensures that AComponent is notified that the component is going to be destroyed.

procedure FreeNotification(AComponent: TComponent);

Description

Use FreeNotification to register AComponent as a component that should be notified when the component is about to be destroyed. It is only necessary to register components this way when they are in a different form or have a different owner. For example, if AComponent is in another form and uses the component to implement a property, it must call FreeNotification so that its Notification method is called when the component is destroyed.

For components with the same owner, the Notification method is called automatically when an application explicitly frees the component (for example, by calling the Free method). This notification is not sent out when components are freed implicitly (because the Owner is freed).


TComponent.FreeOnRelease
 VCL Reference

TComponent.FreeOnRelease

TComponent	See also

Frees the interface reference for components that were created from COM classes.

procedure FreeOnRelease;

Description

FreeOnRelease is called when an interface implemented by the component is released. FreeOnRelease is used internally and calls the corresponding interface method. It should not be necessary to call FreeOnRelease directly.


TComponent.GetChildOwner
 VCL Reference

TComponent.GetChildOwner

TComponent	See also

Returns the owner of a child component being read from a stream.

function GetChildOwner: TComponent; dynamic;

Description

GetChildOwner is used internally by the component streaming system. It is rarely necessary to call it directly.

In TComponent, GetChildOwner always returns nil, indicating that the owner is the root component currently being read (usually a form or data module). The Owner of a component is responsible for destroying it.


TComponent.GetChildParent
 VCL Reference

TComponent.GetChildParent

TComponent	See also

Returns the parent, or if there is no parent, returns the owner of a child component being read from a stream.

function GetChildParent: TComponent; dynamic;

Description

GetChildParent is used internally in the component streaming system. It is not necessary to call it directly.

As implemented in TComponent, GetChildParent returns Self. If GetChildParent returns nil, the parent is assumed to be the root component currently being read (usually a form).


TComponent.GetChildren
 VCL Reference

TComponent.GetChildren

TComponent	See also

Provides the interface for a method that windowed controls use to return their child components.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); dynamic;

Description

GetChildren is introduced in TComponent for the streaming system that loads and saves VCL components. Descendant classes override GetChildren to execute the callback specified by Proc for each of their "child" components; that is, components that return this component from their GetParentComponent method.

Root specifies the top-level component (such as a form or data module) that is currently being loaded or saved. Proc is a callback that loads or saves the child component.


TComponent.GetIDsOfNames
 VCL Reference

TComponent.GetIDsOfNames

TComponent	See also

Maps a single member and an optional set of argument names to a corresponding set of integer dispatch identifiers (dispIDs).

type HResult = Longint;

function GetIDsOfNames(const IID: TGUID; Names: Pointer; NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;

Description

GetIDsOfNames implements the IDispatch interface GetIDsOfNames method. For components that support interfaces, GetIDsOfNames calls this method for the interface supported by the component, passing the specified parameters. The returned value can be used on subsequent calls to the Invoke method.


TComponent.GetNamePath
 VCL Reference

TComponent.GetNamePath

TComponent	See also

Returns a string used by the Object Inspector.

function GetNamePath: string; override;

Description

GetNamePath is used to determine the text to display in the Object Inspector for the name of the object being edited. GetNamePath is introduced in TPersistent so descendants such as collections can appear in the Object Inspector. TComponent overrides GetNamePath to return the component’s name. Do not call GetNamePath directly.


TComponent.GetOwner
 VCL Reference

TComponent.GetOwner

TComponent	See also

Returns the owner of a component.

function GetOwner: TPersistent; override;

Description

GetOwner is called by GetNamePath to find the owner of a component. GetNamePath and GetOwner are introduced in TPersistent so descendants such as collections can appear in the Object Inspector. For TComponent, GetOwner returns the value of the Owner property.


TComponent.GetParentComponent
 VCL Reference

TComponent.GetParentComponent

TComponent	See also

Returns the parent of a component.

function GetParentComponent: TComponent; dynamic;

Description

The GetParentComponent method is introduced in TComponent for the streaming system that loads and saves VCL components. As implemented in TComponent, GetParentComponent always returns nil. Descendant classes can override GetParentComponent to return an appropriate parent component.

Note:	Do not confuse a component’s parent, which is responsible for writing the component to a stream, with the component’s owner, which is responsible for freeing the component.


TComponent.GetTypeInfo
 VCL Reference

TComponent.GetTypeInfo

TComponent	See also

Retrieves the type information for an object.

type HResult = Longint;

function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall;

Description

GetTypeInfo implements the IDispatch interface GetTypeInfo method. For components that support interfaces, GetTypeInfo calls the GetTypeInfo method for the interface supported by the component, passing it the specified parameters.  Use the returned value to get the type information for an interface implemented by the component.


TComponent.GetTypeInfoCount
 VCL Reference

TComponent.GetTypeInfoCount

TComponent	See also

Returns the number of type information interfaces that an object provides (either 0 or 1).

type HResult = Longint;

function GetTypeInfoCount(out Count: Integer): HResult; stdcall;

Description

GetTypeInfoCount implements the IDispatch interface GetTypeInfoCount method. For components that support interfaces, GetTypeInfoCount calls this method for the interface supported by the component. The Count parameter points to a location that receives the number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0.


TComponent.HasParent
 VCL Reference

TComponent.HasParent

TComponent	See also

Indicates whether the component has a parent to handle its filing.

function HasParent: Boolean; dynamic;

Description

HasParent is introduced in TComponent for the streaming system that loads and saves VCL components. It returns False for TComponent.

A return value of True indicates that some other object (a parent) is responsible for writing the object to a stream. Most commonly the parent is a form or panel that contains a control.

Any child component that returns True from HasParent must also implement the GetParentComponent and SetParentComponent methods.

Note:	Do not confuse a component’s parent, which is responsible for writing the component to a stream, with the component’s owner, which is responsible for freeing the component.


TComponent.InsertComponent
 VCL Reference

TComponent.InsertComponent

TComponent	See also 	Example

Establishes the component as the owner of a specified component.

procedure InsertComponent(AComponent: TComponent);

Description

InsertComponent adds the component passed in the AComponent parameter to the end of the Components array property. The inserted component must have no name (no specified Name property value), or the name must be unique among all others in the Components list.

When the owning component is destroyed, AComponent is destroyed also.

Components are automatically inserted and removed when visually manipulating them in the form designer. Use InsertComponent when manually adding components to another Owner component’s Components list.


TComponent.Invoke
 VCL Reference

TComponent.Invoke

TComponent	See also

Provides access to Automation properties and methods when the component wraps an Automation object.

type HResult = Longint;

function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;

Description

Invoke is the standard mechanism for accessing the exposed properties and methods of an Automation object. For components that wrap the IDispatch interface of an Automation object, Invoke calls the Invoke method for the interface supported by the component, passing it the parameters specified by the function.


TComponent.IsImplementorOf
 VCL Reference

TComponent.IsImplementorOf

TComponent	See also

Indicates whether the component implements a specified interface.

function IsImplementorOf(const I: IInterface): Boolean;

Description

Call IsImplementorOf to determine whether the component (or, if the component aggregates its interface with other components, whether the controlling component) supports the interface specified by I. Is ImplementorOf is similar to the QueryInterface method, but it can handle a request for a nil interface, and it does not return an interface pointer.

The streaming system that loads and saves components uses IsImplementorOf to resolve property values that are interfaces.


TComponent.Loaded
 VCL Reference

TComponent.Loaded

TComponent	See also

Initializes the component after the form file has been read into memory.

procedure Loaded; virtual;

Description

Do not call the protected Loaded method. The streaming system calls this method after it loads the component’s form from a stream.

When the streaming system loads a form or data module from its form file, it first constructs the form component by calling its constructor, then reads its property values from the form file. After reading all the property values for all the components, the streaming system calls the Loaded methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself.

Note:	All references to sibling components are resolved by the time Loaded is called. Loaded is the first place that sibling pointers can be used after being streamed in.

As implemented in TComponent, Loaded clears the csLoading flag in the ComponentState property, indicating that the component is no longer loading.

Warning:	Loaded may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden Loaded method without first checking that the memory has not been allocated in a previous call.


TComponent.Notification
 VCL Reference

TComponent.Notification

TComponent	See also

Forwards notification messages to all owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation); virtual;

Description

Do not call the Notification method in an application.  Notification is called automatically when the component specified by AComponent is about to be inserted or removed, as specified by Operation. By default, components pass along the notification to their owned components, if any.

A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed.

Note:	Notification is not called for components that are freed implicitly (because their Owner is freed).


TComponent.PaletteCreated
 VCL Reference

TComponent.PaletteCreated

TComponent	See also

Responds when the component is created from the component palette.

procedure PaletteCreated; dynamic;

Description

PaletteCreated is called automatically at design time when the component has just been created from the component palette. Component writers can override this method to perform adjustments that are required only when the component is created from the component palette.

As implemented in TComponent, PaletteCreated does nothing.


TComponent.QueryInterface
 VCL Reference

TComponent.QueryInterface

TComponent	See also

Returns a reference to a specified interface if the object supports that interface.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;

Description

QueryInterface checks whether the component supports the interface specified by IID, and if so, returns a reference to that interface as the Obj parameter. If the component does not support the interface, the Obj parameter returns nil.

For components that act as COM object wrapper, QueryInterface calls the QueryInterface method of the internal COM object.


TComponent.ReadState
 VCL Reference

TComponent.ReadState

TComponent	See also

Reads the component’s data from a stream.

procedure ReadState(Reader: TReader); virtual;

Description

ReadState is part of a sequence of calls used by the streaming system that loads and saves VCL components.  It reads the values of all the component's published properties, stored data, and owned components from the reader object passed in Reader. Do not call ReadState directly.

Although ReadState is virtual, it is rarely overridden. Any descendant classes overriding ReadState should end with a call to the inherited ReadState method of TComponent.


TComponent.ReferenceInterface
 VCL Reference

TComponent.ReferenceInterface

TComponent	See also

Establishes or removes internal links that cause this component to be notified when the implementer of a specified interface is destroyed.

function ReferenceInterface(const I: IInterface; Operation: TOperation): Boolean;

Description

Component writers use ReferenceInterface to ensure that properties whose values are interfaces are informed when the objects that implement those interfaces are destroyed. This notification must be in place for a property whose value is an interface to be saved with the component in a form file (that is, for such a property to persist as a published property).

I is an interface pointer that is the value of the published property of interest.

Operation indicates whether the notification link to the implementer of the interface should be established (opInsert) or removed (opRemove).

ReferenceInterface returns True if it is successful in establishing or removing the notification link. If ReferenceInterface returns False when called with Operation set to opInsert, the specified interface can’t be stored as the value of a published property.

Note:	 A result of False does not necessarily indicate an error, merely that the interface can’t be stored by the property streaming system. For example, ReferenceInterface returns False when the specified interface employs true reference counting, independent of component lifetimes.


TComponent.RemoveComponent
 VCL Reference

TComponent.RemoveComponent

TComponent	See also 	Example

Removes a specified component specified from the component's Components list.

procedure RemoveComponent(AComponent: TComponent);

Description

Components are automatically inserted and removed when visually manipulating them in the form designer. Use RemoveComponent to programmatically delete the component specified by AComponent from its Owner component.


TComponent.RemoveFreeNotification
 VCL Reference

TComponent.RemoveFreeNotification

TComponent	See also

Disables destruction notification that was enabled by FreeNotification

procedure RemoveFreeNotification(AComponent: TComponent);

Description

RemoveFreeNotification removes the component specified by the AComponent parameter from the internal list of objects to be notified that the component is about to be destroyed. AComponent is added to this list by a previous call to the FreeNotification method.

Most applications have no need to call RemoveFreeNotification. It is used by TComponent to detect loops where two components are notifying each other of their impending destruction.


TComponent.SafeCallException
 VCL Reference

TComponent.SafeCallException

TComponent	See also

Handles exceptions in methods declared using the safecall calling convention.

type HResult = Longint;

function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; override;

Description

SafeCallException is used for COM exception handling support. Classes that implement COM interfaces override this method to handle errors that might occur. TComponent calls the implementation of this method for the interface supported by the component, if it exists. If the component does not support interfaces, this method calls the SafeCallException method inherited from TObject, which returns E_UNEXPECTED. This is a default return value that is appropriate for classes that do not support any interfaces.


TComponent.SetAncestor
 VCL Reference

TComponent.SetAncestor

TComponent	See also

Sets or clears the ComponentState property’s csAncestor flag.

procedure SetAncestor(Value: Boolean);

Description

SetAncestor is used internally by the streaming system that loads and saves VCL components. Do not call SetAncestor directly.

SetAncestor sets or clears the csAncestor flag, which indicates whether the component was introduced in an ancestor form. SetAncestor then calls the SetAncestor methods of any owned components, passing Value, so that the owned components' ComponentState properties will be synchronized with the owner's.


TComponent.SetChildOrder
 VCL Reference

TComponent.SetChildOrder

TComponent	See also

Provides the interface for a method to rearrange child components.

procedure SetChildOrder(Child: TComponent; Order: Integer); dynamic;

Description

SetChildOrder is introduced in TComponent for the streaming system that loads and saves VCL components. As implemented in TComponent, SetChildOrder does nothing. Descendant classes override SetChildOrder to change the order in which a child appears list returned by GetChildren.


TComponent.SetDesigning
 VCL Reference

TComponent.SetDesigning

TComponent	See also

Ensures that components inserted at design time have their design-mode flag set.

procedure SetDesigning(Value: Boolean; SetChildren: Boolean=True);

Description

SetDesigning is used internally by the Form designer. Do not call SetDesigning directly.

SetDesigning sets the csDesigning flag in the ComponentState property if Value is True; otherwise, it removes csDesigning.

If the SetChildren parameter is True, SetDesigning then calls the SetDesigning methods of any owned components, passing Value, so that the owned components' ComponentState properties are synchronized with the owner's.

The InsertComponent and RemoveComponent methods call SetDesigning for inserted or removed components to ensure that their design-mode flags are set properly.


TComponent.SetDesignInstance
 VCL Reference

TComponent.SetDesignInstance

TComponent	See also

Ensures that components inserted at design time have their design-mode flag set.

procedure SetDesignInstance(Value: Boolean);

Description

SetDesignInstance is used internally by the Form designer to identify objects that act as a design surface. Do not call SetDesignInstance directly.

SetDesignInstance sets the csDesignInstance flag in the ComponentState property if Value is True; otherwise, it removes csDesignInstance.


TComponent.SetInline
 VCL Reference

TComponent.SetInline

TComponent	See also

Sets the csInline bit of the component’s ComponentState property

procedure SetInline(Value: Boolean);

Description

SetInline is used internally to indicate whether the component can act as a root component in the designer but also be embedded in a form.

SetInline sets the csInline flag in the ComponentState property if Value is True; otherwise, it removes csInline.


TComponent.SetName
 VCL Reference

TComponent.SetName

TComponent	See also

Sets the value of the Name property.

procedure SetName(const NewName: TComponentName); virtual;

Description

SetName is the virtual property setter for the Name property. It calls the ChangeName method, which performs the actual name change.

ChangeName is not virtual; override SetName instead when modifying the behavior of the Name property.

Warning:	Using SetName to change the name of a component at runtime causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception.


TComponent.SetParentComponent
 VCL Reference

TComponent.SetParentComponent

TComponent	See also

Provides the interface for a method that changes the parent of a component.

procedure SetParentComponent(Value: TComponent); dynamic;

Description

SetParentComponent is introduced in TComponent for the streaming system that loads and saves VCL components. SetParentComponent does nothing in TComponent. Descendant classes override SetParentComponent to change the value that GetParentComponent returns to match the Value parameter.


TComponent.SetSubComponent
 VCL Reference

TComponent.SetSubComponent

TComponent	See also

Identifies whether the component is a subcomponent.

procedure SetSubComponent(IsSubComponent: Boolean);

Description

Call SetSubComponent to indicate that this component is or is not a subcomponent. A subcomponent is a component whose Owner is a component other than the form or data module in which it resides. Unless such a component calls SetSubComponent with IsSubComponent set to True, its published properties will not be saved to the form file.

IsSubComponent indicates whether the component is a subcomponent (True) or not (False).

SetSubComponent is called at design time either

From the constructor of a component that always acts as a subcomponent. In this case, the component calls its own SetSubComponent method from the constructor with IsSubComponent set to True.

Immediately after constructing an instance of the subcomponent. In this case, the Owner calls the SetSubComponent method of a component it has just instantiated, with IsSubComponent set to True.


TComponent.UpdateAction
 VCL Reference

TComponent.UpdateAction

TComponent	See also

Updates an action component to reflect the current state of the component.

function UpdateAction(Action: TBasicAction): Boolean; dynamic;

Description

When the application is idle, Delphi makes a series of calls to update the properties (such as whether it is enabled, checked, and so on) of every action that is linked to a visible control or menu item. First, Delphi generates an OnUpdate event of the action list that contains the action. If the action list does not handle the OnUpdate event, then the action is routed to the Application object’s UpdateAction method, which invokes the OnActionUpdate event handler. If the OnActionUpdate event handler does not update the action, then it is routed to the action’s OnUpdate event handler. If that does not update the action, the active control’s UpdateAction method is called.

The Action parameter specifies the action component that should be updated. UpdateAction returns True if the action component now reflects the state of the component, and False if it did not know how to update the action. If UpdateAction returns False for the active component, Delphi calls the active form’s UpdateAction method.

Do not call UpdateAction. It is called automatically when the application is idle. As implemented in TComponent, UpdateAction allows the action to update itself with the component as a target. Descendants can override this method to perform updates that reflect class-specific properties or states.


TComponent.Updated
 VCL Reference

TComponent.Updated

TComponent	See also

Clears the csUpdating state in the component's ComponentState property when the component finishes updating.

procedure Updated; dynamic;

Description

Do not call Updated directly. It is used internally to clear the csUpdating flag of the ComponentState property. A call to Updated always follows a call to Updating, which sets the flag.


TComponent.UpdateRegistry
 VCL Reference

TComponent.UpdateRegistry

TComponent

Provides the interface for a method that adds type library and version information to the Registry on components that implement COM interfaces.

classprocedure UpdateRegistry(Register: Boolean; const ClassID, ProgID: string); virtual;

Description

Do not call UpdateRegistry directly. It is for internal use only.


TComponent.Updating
 VCL Reference

TComponent.Updating

TComponent	See also

Sets the csUpdating state in the component's ComponentState property.

procedure Updating; dynamic;

Description

Do not call Updating directly. It is used internally to indicate that the component is about to be updated. A call to Updating, which sets the csUpdating flag, is always followed by a call to Updated, which clears the flag.


TComponent.ValidateContainer
 VCL Reference

TComponent.ValidateContainer

TComponent	See also

Determines whether an object can be inserted into a container.

procedure ValidateContainer(AComponent: TComponent); dynamic;

Description

ValidateContainer is called by a component when it is about to be inserted into a container object. By default, ValidateContainer calls the ValidateInsert method of the component specified by the AComponent parameter.

Descendant components can override ValidateContainer to disallow a component from being inserted into specific containers. To disallow an insertion, raise an exception in the derived method.


TComponent.ValidateInsert
 VCL Reference

TComponent.ValidateInsert

TComponent	See also

Provides the interface for a method that validates an child component before it is inserted.

procedure ValidateInsert(AComponent: TComponent); dynamic;

Description

ValidateInsert does nothing in TComponent. Descendant classes can override it to disallow a component from accepting an object as a child. By default ValidateInsert allows any object to be inserted into the component.

If a component needs to validate only certain objects, descendant classes can override ValidateInsert to filter out those objects.  To disallow an insertion, raise an exception in the derived method.


TComponent.ValidateRename
 VCL Reference

TComponent.ValidateRename

TComponent	See also

Ensures that renaming an owned component does not create name conflict.

procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string); virtual;

Description

ValidateRename checks to see if a component can rename one of its owned components, passed in AComponent, from its current name (CurName) to the string passed in NewName. If AComponent is nil or NewName is already the name of a component in the Components list, ValidateRenameraises an EComponentError exception.

ValidateRename is used internally when the Name property is modified. It is not necessary to call it directly.


TComponent.WriteState
 VCL Reference

TComponent.WriteState

TComponent	See also

Writes the component’s data to a stream.

procedure WriteState(Writer: TWriter); virtual;

Description

WriteState is part of a sequence of calls used by the streaming system that loads and saves VCL components. WriteState is an iterative method that writes the values of all the component's published properties and other stored data to the Writer component passed as the Writer parameter. Do not call WriteState directly.

Although WriteState is virtual, it is rarely overridden. Any descendant classes overriding WriteState should end with a call to the inherited WriteState method of TComponent.


TComponent._AddRef
 VCL Reference

TComponent._AddRef

TComponent	See also

Increments the reference count for the number of interface references dependent on the component when the component represents a COM object.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IInterface method, AddRef. For components that wrap COM objects, _AddRef calls the AddRef method for the COM object. _AddRef returns the resulting value of the reference count for the wrapped interface.


TComponent._Release
 VCL Reference

TComponent._Release

TComponent	See also

Decrements the reference count for the interface of a COM object wrapped by the component.

function _Release: Integer; stdcall;

Description

_Release implements the IInterface interface method, Release. For components that wrap COM objects, _Release calls the Release method for the interface supported by the component. If the reference count on the object falls to 0, the object is freed from memory.

_Release returns the resulting value of the reference count for the wrapped interface.


Hierarchy

TObject

TPersistent

TComponent


TContainedAction
 VCL Reference

TContainedAction

Hierarchy	Properties	Methods	Events	See also

TContainedAction is the base class for actions that can be grouped by category and that can appear in action lists or action managers.

Unit

ActnList

Description

TContainedAction introduces properties and methods that enable actions to appear in an action list or action manager. The properties of TContainedAction contain information about the relationship between the action and its action list or action manager. Methods of TContainedAction override those of the base class to take into account the action list or action manager that owns the action.

Objects of type TContainedAction can be associated with a category of action types. This category is used at design time, to organize the actions in an action list or action manager, and at runtime to organize them in the customize dialog.


 VCL Reference

TContainedAction properties

TContainedAction	Alphabetically	Legend

In TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TContainedAction properties

TContainedAction	By object	Legend

ActionComponent

ActionList

Category

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Index

Name

Owner

Tag

VCLComObject


TContainedAction.ActionList
 VCL Reference

TContainedAction.ActionList

TContainedAction	See also

Indicates the action list or action manager that contains the action.

property ActionList: TCustomActionList;

Description

ActionList indicates which action list or action manager contains the action. Only contained actions (instances of TContainedAction or its descendants) can appear in an action list or action manager. An action list provides a visual interface for working with actions, which are then available to be associated with client controls in the application. An action manager uses the actions as an abstract representation of user interface elements, which it generates dynamically at runtime.

When creating an action dynamically at runtime, set the ActionList property to add the action to an action list or action manager.


TContainedAction.Category
 VCL Reference

TContainedAction.Category

TContainedAction	See also

Specifies the category under which the action appears in its action list or action manager.

property Category: String;

Description

Category is the group, or category, to which the action belongs. An action manager or action list displays its actions grouped by category. In addition, action bars associated with an action manager can generate user interface elements that correspond to action categories.

Action categories group actions by similarities, usually of behavior or functionality. At design-time you can modify or set the Category for an action by selecting the action from the action list or object tree view, and choosing Category in the Object Inspector.


TContainedAction.Index
 VCL Reference

TContainedAction.Index

TContainedAction	See also

Specifies the index of the action in its action list or action manager.

property Index: Integer;

Description

Index indicates the position of the action in its action list or action manager. You can change an action’s Index at design time by dragging it to a new position in the action list editor or customize dialog.

The index of actions in an action manager determines the order in which they appear in user interface elements such as menus and tool bars.


 VCL Reference

TContainedAction events

TContainedAction	Alphabetically	Legend

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TContainedAction events

TContainedAction	By object	Legend

OnExecute

OnUpdate


 VCL Reference

TContainedAction methods

TContainedAction	Alphabetically	Legend

In TContainedAction

Destroy

Execute

GetParentComponent

HasParent

Update

Derived from TBasicAction

Create

ExecuteTarget

HandlesTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TContainedAction methods

TContainedAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TContainedAction.Destroy
 VCL Reference

TContainedAction.Destroy

TContainedAction

Destroys the instance of the contained action.

destructor Destroy; override;

Description

If the action is contained in an action list or action manager, Destroy removes the action from that list. Then it calls the inheritedDestroy.


TContainedAction.Execute
 VCL Reference

TContainedAction.Execute

TContainedAction	See also

Responds when the client control “fires”.

function Execute: Boolean; override;

Description

Execute is called automatically when a client control “fires” (for example, when the user clicks a button or selects a menu item). It returns True if an event handler is found to handle the action, False otherwise.

Execute first attempts to handle the action by generating an OnExecute event on the action list that contains this action (if the action belongs to an action list). If the action list’s OnExecute event handler does not handle the action, Execute generates an OnActionExecute event on the application itself. If neither the action list nor the application handles the action in response to these events, Execute generates an OnExecute event on itself. If this action has no OnExecute event handler, it instructs the application to locate the current target control and call the ExecuteTarget method, which is the mechanism by which predefined action classes perform their function.


TContainedAction.GetParentComponent
 VCL Reference

TContainedAction.GetParentComponent

TContainedAction	See also

Returns the action list or action manager that contains the action.

function GetParentComponent: TComponent; override;

Description

GetParentComponent is called by the streaming system that loads and saves components. It ensures that objects are loaded and saved with their parent objects. TContainedAction overrides the inherited method to identify the associated action list or action manager as the action’s parent.


TContainedAction.HasParent
 VCL Reference

TContainedAction.HasParent

TContainedAction	See also

Indicates whether the action is contained in an action list or action manager.

function HasParent: Boolean; override;

Description

HasParent is called by the streaming system that loads and saves components. It ensures that objects are loaded and saved with their parent objects. TContainedAction overrides the inherited method to return True if the action is contained in an action list or action manager.


TContainedAction.Update
 VCL Reference

TContainedAction.Update

TContainedAction	See also

Indicates whether the action updates itself.

function Update: Boolean; override;

Description

Update is called automatically when the application is idle to give the action a chance to update itself according to current conditions. It returns True if an event handler is found to update the action, False otherwise.

Update first attempts to update the action by generating an OnUpdate event on the action list that contains this action (if the action belongs to an action list). If the action list’s OnUpdate event handler does not update the action, Update generates an OnActionUpdate event on the application itself. If neither the action list nor the application updates the action in response to these events, Update generates an OnUpdate event on itself. If this action has no OnUpdate event handler, it instructs the application to locate the current target control and call the UpdateTarget method, which is the mechanism by which predefined action classes update themselves.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction


TCollection
 VCL Reference

TCollection

Hierarchy	Properties	Methods	See also

TCollection is a container for TCollectionItem objects.

Unit

Classes

Description

Each TCollection holds a group of TCollectionItem objects. TCollection maintains an index of the collection items in its Items array. The Count property contains the number of items in the collection. Use the Add and Clear methods to add items to the collection and delete items from the collection.

Objects descended from TCollection can contain objects descended from TCollectionItem. For example, a TDBGridColumns object contains TColumn objects; these two classes are used by TDBGrid to represent grid columns. The following table lists each descendant of TCollection with the corresponding descendant TCollectionItem and the component that uses each pair.

TCollection descendant	TCollectionItem descendant	Component
TAggregates	TAggregate	TClientDataSet
TCheckConstraints	TCheckConstraint	controls that use TField
TCookieCollection	TCookie	HTTP response objects
TCoolBands	TCoolBand	TCoolBar
TDataBindings	TDataBindItem	data-aware ActiveX controls
TDBGridColumns	TColumn	TDBGrid
TDependencies	TDependency	TService
TDisplayDims	TDisplayDim	TDecisionGrid
TFieldDefs	TFieldDef	TDataSet
THeaderSections	THeaderSection	THeaderControl
TIndexDefs	TIndexDef	TTable
THTMLTableColumns	THTMLTableColumn	TQueryTableProducer
TListColumns	TListColumn	TListView
TParams	TParam	TQuery , TStoredProc, TClientDataSet
TParameters	TParameter	ADO datasets and commands
TServerCollection	TServerItem	TSimpleObjectBroker
TStatusPanels	TStatusPanel	TStatusBar
TWorkAreas	TWorkArea	TListView
TWebActionItems	TWebActionItem	TWebDispatcher
The controls that use TCollection and TCollectionItem descendants have a published property that holds a collection. (For example, the Panels property of TStatusBar holds a TStatusPanels.) A standard property editor, referred to generically as the Collection editor, can be invoked from the Object Inspector to edit the items in the collection.

Note:	When writing a TCollection descendant that is used by another control, be sure to override the protected GetOwner method of the collection so that it can appear in the Object Inspector.


 VCL Reference

TCollection properties

TCollection	Alphabetically	Legend

In TCollection

Count

ItemClass

Items

NextID

PropName

UpdateCount


 VCL Reference

TCollection properties

TCollection	By object	Legend

Count

ItemClass

Items

NextID

PropName

UpdateCount


TCollection.Count
 VCL Reference

TCollection.Count

TCollection	See also 	Example

Returns the number of items in the collection.

property Count: Integer;

Description

Count contains the number of items in the Items array. Since Items is indexed starting with 0, the value of Count is always one greater than the index of the last member of Items.


TCollection.ItemClasss
 VCL Reference

TCollection.ItemClass

TCollection	See also

Indicates the class to which the collection’s items belong.

type TCollectionItemClass = class ofTCollectionItem;

property ItemClass: TCollectionItemClass;

Description

ItemClass returns the class (descended from TCollectionItem) to which the items in the collection belong. For example, in an instance of the TCollection descendant THeaderSections, the ItemClass property returns THeaderSection.


TCollection.Items
 VCL Reference

TCollection.Items

TCollection	See also

Provides indexed access to the items in the collection.

property Items[Index: Integer]: TCollectionItem;

Description

Use Items to access individual items in the collection. The value of the Index parameter corresponds to the Index property of TCollectionItem. It represents the position of the item in the collection.


TCollection.NextID
 VCL Reference

TCollection.NextID

TCollection	See also

Specifies a unique ID that can be assigned to the next added collection item.

property NextID: Integer;

Description

TCollection uses NextID internally to assign unique identifiers to collection items. When a new item is added to the collection, it’s ID property is given the value of NextID and NextID is incremented.


TCollection.PropName
 VCL Reference

TCollection.PropName

TCollection	See also

Specifies the name of the property that the collection implements.

property PropName: string;

Description

The GetNamePath method uses this protected property to assemble the name of the collection as it appears in the Object Inspector. It identifies the name of the property in the object returned by the protected GetOwner method that is implemented using this collection object.


TCollection.UpdateCount
 VCL Reference

TCollection.UpdateCount

TCollection	See also

Counts the number of times BeginUpdate was called without a corresponding call to EndUpdate.

property UpdateCount: Integer;

Description

UpdateCount keeps track of calls to BeginUpdate and EndUpdate so that they can be nested. Every call to BeginUpdate increments UpdateCount. Every call to EndUpdate decrements it. When UpdateCount returns to 0, the collection updates itself to reflect all changes that occurred since the first call to BeginUpdate.


 VCL Reference

TCollection methods

TCollection	Alphabetically	Legend

In TCollection

Add

Added

Assign

BeginUpdate

Changed

Clear

Create

Delete

Deleting

Destroy

EndUpdate

FindItemID

GetAttr

GetAttrCount

GetItem

GetItemAttr

GetNamePath

Insert

Notify

Owner

SetItem

SetItemName

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Notify

SafeCallException


 VCL Reference

TCollection methods

TCollection	By object	Legend

Add

Added

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Deleting

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetAttr

GetAttrCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetItemAttr

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Notify

Owner

SafeCallException

SetItem

SetItemName

Update


TCollection.Add
 VCL Reference

TCollection.Add

TCollection	See also

Creates a new TCollectionItem instance and adds it to the Items array.

function Add: TCollectionItem;

Description

Call Add to create an item in the collection. The new item is placed at the end of the Items array.

Add returns the new collection item.


TCollection.Added
 VCL Reference

TCollection.Added

TCollection	See also

Responds when items are added to the collection.

procedure Added(var Item: TCollectionItem); virtual;deprecated;

Description

Applications can’t call the protected Added method. It is called automatically immediately after items are added to the collection.

Item is the item that was just added to the collection.

Added is a deprecated method. Descendant classes should override the Notify method instead when responding to changes in the list of items.


TCollection.Assign
 VCL Reference

TCollection.Assign

TCollection	See also

Copies the contents of another collection to the object where the method is executed.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to copy the contents of one TCollection instance to another. The Assign method deletes all items from the destination collection (the object where it is executed), then adds a copy of each item in the Source collection’s Items array.


TCollection.BeginUpdate
 VCL Reference

TCollection.BeginUpdate

TCollection	See also 	Example

Suspends screen repainting.

procedure BeginUpdate; virtual;

Description

The BeginUpdate method suspends screen repainting until the EndUpdate method is called. Use BeginUpdate to speed processing and avoid flicker while items are added to or deleted from a collection.


TCollection.Changed
 VCL Reference

TCollection.Changed

TCollection	See also

Responds when the collection or any of its items changes.

procedure Changed;

Description

Changed is called automatically when items in the collection change or when the EndUpdate method signals that an update is complete. It checks the value of UpdateCount, and if it is 0, calls the Update method, which performs any necessary updates.

When writing a TCollection descendant, there is no need to call Changed. Instead, bracket any changes by calls to BeginUpdate and EndUpdate.


TCollection.Clear
 VCL Reference

TCollection.Clear

TCollection	See also

Deletes all items from the collection.

procedure Clear;

Description

Clear empties the Items array and destroys each TCollectionItem.


TCollection.Create
 VCL Reference

TCollection.Create

TCollection	See also

Creates and initializes a collection.

type TCollectionItemClass = class ofTCollectionItem;

constructor Create(ItemClass: TCollectionItemClass);

Description

The Create method takes the name of a TCollectionItem descendant class as a parameter. This parameter determines the class of the items created by the Add method.


TCollection.Delete
 VCL Reference

TCollection.Delete

TCollection	See also

Deletes a single item from the collection.

procedure Delete(Index: Integer);

Description

Delete removes the collection item specified by the Index parameter, where Index is the index of the item in the Items property array.


TCollection.Deleting
 VCL Reference

TCollection.Deleting

TCollection	See also

Responds when items are deleted from the collection.

procedure Deleting(Item: TCollectionItem); virtual;deprecated;

Description

Applications can’t call the protected Deleting method. The Delete method calls Deleting immediately before it removes an item from the collection.

Item is the item that is about to be removed.

Deleting is a deprecated method. Descendant classes should override the Notify method instead when responding to changes in the list of items.


TCollection.Destroy
 VCL Reference

TCollection.Destroy

TCollection	See also

Destroys the collection and each item in it.

destructor Destroy; override;

Description

Destroy calls the Clear method to free each item referenced in the Items array, then destroys the collection itself.


TCollection.EndUpdate
 VCL Reference

TCollection.EndUpdate

TCollection	See also 	Example

Re-enables screen repainting.

procedure EndUpdate; virtual;

Description

Use EndUpdate to re-enable screen repainting that was turned off with the BeginUpdate method.


TCollection.FindItemID
 VCL Reference

TCollection.FindItemID

TCollection	See also

Returns the item with the specified ID.

function FindItemID(ID: Integer): TCollectionItem;

Description

The FindItemID method returns the item in the collection whose ID property is passed to it as a parameter. If no item has the specified ID, FindItemID returns nil.


TCollection.GetAttr
 VCL Reference

TCollection.GetAttr

TCollection	See also

Returns the name of a custom attribute that can be retrieved using the GetItemAttr method.

function GetAttr(Index:Integer): string; dynamic;

Description

TCollection descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. The GetAttr method returns the name of an attribute.

Index identifies the attribute whose name is requested. This is a value between 0 and n-1, where n is the value returned by GetAttrCount.

As implemented by TCollection, GetAttr always returns an empty string, because TCollection defines no custom attributes.


TCollection.GetAttrCount
 VCL Reference

TCollection.GetAttrCount

TCollection	See also

Returns the number of custom attributes associated with items in the collection.

function GetAttrCount: Integer; dynamic;

Description

TCollection descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. GetAttrCount returns the number of distinct attributes assigned to each item in the collection.

As implemented in TCollection, GetAttrCount always returns 0, because TCollection defines no custom attributes.


TCollection.GetItem
 VCL Reference

TCollection.GetItem

TCollection	See also

Returns a specified item in the collection.

function GetItem(Index:Integer): TCollectionItem;

Description

GetItem is the protected read implementation of the Items property.


TCollection.GetItemAttr
 VCL Reference

TCollection.GetItemAttr

TCollection	See also

Returns the value of a custom attribute assigned to one of the collection’s items.

function GetItemAttr(Index, ItemIndex :Integer): string; dynamic;

Description

TCollection descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. GetItemAttr returns the value of one of these attributes for a specified item in the collection.

Index identifies which attribute’s value is desired. This is a value between 0 and n-1, where n is the value returned by GetAttrCount.

ItemIndex identifies the item whose attribute value is desired. This is an index into the Items property array.

As implemented in TCollection, GetItemAttr always returns an empty string, because TCollection defines no custom attributes.


TCollection.GetNamePath
 VCL Reference

TCollection.GetNamePath

TCollection	See also

Returns a string used by the Object Inspector.

function GetNamePath: string; override;

Description

If the collection has no owner, GetNamePath returns the name of the collection’s actual (runtime) type. If the collection is owned, GetNamePath returns the owner’s name followed, if applicable, by a dot and the name of the owner’s property that holds the collection. For example, GetNamePath might return “TreeView1.Items”.

Note:	For a collection to have an owner, it must override the GetOwner method.


TCollection.Insert
 VCL Reference

TCollection.Insert

TCollection	See also

Creates a new TCollectionItem instance and adds it to the Items array.

function Insert(Index: Integer): TCollectionItem;

Description

Call Insert to add a new item at a specified position in the collection. Existing items (starting from the specified position) are moved up in the Items array.

Insert returns the new collection item.


TCollection.Notify
 VCL Reference

TCollection.Notify

TCollection	See also

Responds when items are added to or removed from the collection.

type TCollectionNotification = (cnAdded, cnExtracting, cnDeleting);

procedure Notify(Item: TCollectionItem; Action: TCollectionNotification); virtual;

Description

Applications can’t call the protected Notify method. It is called automatically when the items in the collection change.

Item is the item that was just added to or that is about to be removed from the collection.

Action indicates whether item was added, is about to be removed, or is about to be deleted:

Value	Meaning

cnAdded	Item was just added to the collection.

cnExtracting	Item is about to be removed from the collection (but not freed).

cnDeleting	Item is about to be removed from the collection and then freed.

As implemented in TCollection, Notify calls Added when Action is cnAdded and calls Deleting when Action is cnDeleting. TCollection ignores the cnExtracting action. Descendant classes override this method to provide a different response to these notifications.


TCollection.Owner
 VCL Reference

TCollection.Owner

TCollection

Returns the Owner of the collection.

function Owner: TPersistent;

Description

Call Owner to obtain a reference to the object that owns this collection. Typically, the owner uses the collection to implement one of its properties.


TCollection.SetItem
 VCL Reference

TCollection.SetItem

TCollection	See also

Copies the properties of another item to a specified item in the collection.

procedure SetItem(Index:Integer; Value: TCollectionItem);

Description

SetItem is the protected write implementation of the Items property. It calls the Assign method of the item specified by Index, so that the properties of the item specified by Value are copied to that item.


TCollection.SetItemName
 VCL Reference

TCollection.SetItemName

TCollection	See also

Initializes the name of a newly inserted collection item.

procedure SetItemName(Item: TCollectionItem); virtual;

Description

The Insert method calls SetItemName to initialize the Name property of items when it inserts them into the collection.

As implemented in TCollection, SetItemName does nothing. Some TCollection descendants override this method to provide collection items with default names.


TCollection.Update
 VCL Reference

TCollection.Update

TCollection	See also

Updates the collection to reflect changes to its items.

procedure Update(Item: TCollectionItem); virtual;

Description

Override Update in a descendant class to make any necessary changes when the items in the collection change. This method is called automatically when an update is complete.

Item identifies the item that changed. If the Item parameter is nil, then the change affects more than one item in the collection.

As implemented in TCollection, Update does nothing. Descendant classes override this method to make any necessary adjustments.


Hierarchy

TObject

TPersistent

TCollection


TCollectionItem
 VCL Reference

TCollectionItem

Hierarchy	Properties	Methods	See also

TCollectionItem represents an item in a collection.

Unit

Classes

Description

A TCollection holds a group of TCollectionItem objects. TCollectionItems are created and destroyed by TCollection’s Add and Clear methods. Each TCollectionItem has a Collection property that points to the TCollection object to which the item belongs.

Objects descended from TCollection can contain objects descended from TCollectionItem. For example, a TDBGridColumns object contains TColumn objects; these two classes are used by TDBGrid to represent grid columns. For a complete list of TCollection and TCollectionItem descendants, see TCollection.


 VCL Reference

TCollectionItem properties

TCollectionItem	Alphabetically	Legend

In TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TCollectionItem properties

TCollectionItem	By object	Legend

Collection

DisplayName

ID

Index


TCollectionItem.Collection
 VCL Reference

TCollectionItem.Collection

TCollectionItem

Specifies the TCollection instance to which the TCollectionItem belongs.

property Collection: TCollection;

Description

Each TCollectionItem belongs to the TCollection which creates it. The Collection property points to the collection object to which the item belongs.


TCollectionItem.DisplayName
 VCL Reference

TCollectionItem.DisplayName

TCollectionItem

The name displayed in the Collection editor.

property DisplayName: string;

Description

DisplayName is the string that represents the item in the Collection editor. When the item is selected in the Collection editor, the DisplayName can also appear in the Object Inspector as the value of another property (for example, as the Text property of THeaderSection or TStatusPanel). By default, DisplayName is the name of the TCollectionItem descendant class of which the item is an instance.


TCollectionItem.ID
 VCL Reference

TCollectionItem.ID

TCollectionItem	See also

A unique, permanent index for the item.

property ID: Integer;

Description

In most cases, ID is the value of the item’s Index property when it was first added to the collection. But, unlike Index values, ID values are never changed or reassigned. If an item is removed from a collection, its ID not used again.

An item’s Index may change when other items are deleted from the collection or when items are rearranged. ID provides a unique identifier for each item that is unchanged for the life of the collection.


TCollectionItem.Index
 VCL Reference

TCollectionItem.Index

TCollectionItem	See also

Returns the item’s position in the Items array of TCollection.

property Index: Integer;

Description

Each TCollectionItem is indexed in the Items array of the TCollection to which it belongs. The Index property of the TCollectionItem contains the item’s index value in that array. Read the value of Index to determine the collection item’s position. Set the value of Index to move the collection item to a new position.

Items is a zero-based array. The first member of the collection has an index value of 0, the second member has an index value of 1, and so forth.


 VCL Reference

TCollectionItem methods

TCollectionItem	Alphabetically	Legend

In TCollectionItem

Changed

Create

Destroy

GetDisplayName

GetNamePath

GetOwner

SetDisplayName

SetIndex

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCollectionItem methods

TCollectionItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetDisplayName

SetIndex


TCollectionItem.Changed
 VCL Reference

TCollectionItem.Changed

TCollectionItem	See also

Updates the collection to reflect changes to the collection item.

procedure Changed(AllItems: Boolean);

Description

Changed is called automatically when a collection item changes in a way that must be reflected by the collection to which the item belongs. For example, when an item’s Index property changes, the collection must update the indexes of all other items. Call this method in the implementation of a descendant class when making changes that require the collection to update.

The AllItems parameter indicates whether the change affects just the collection item (such as a change to its DisplayName property) or whether it requires corresponding changes to other items in the collection (such as a change to the Index property).


TCollectionItem.Create
 VCL Reference

TCollectionItem.Create

TCollectionItem	See also

Creates and initializes a TCollectionItem instance.

constructor Create(Collection: TCollection); virtual;

Description

The Create method takes as a parameter the name of a TCollection instance. Create is called by TCollection’s Add method.


TCollectionItem.Destroy
 VCL Reference

TCollectionItem.Destroy

TCollectionItem	See also

Destroys the TCollectionItem instance and frees its memory.

destructor Destroy; override;

Description

Destroy is called indirectly by TCollection’s Clear method.


TCollectionItem.GetDisplayName
 VCL Reference

TCollectionItem.GetDisplayName

TCollectionItem	See also

Returns the name of the collection item as it appears in the collection editor.

function GetDisplayName: string; virtual;

Description

GetDisplayName is the protected read implementation of the DisplayName property.


TCollectionItem.GetNamePath
 VCL Reference

TCollectionItem.GetNamePath

TCollectionItem

Returns a string used by the Object Inspector.

function GetNamePath: string; override;

Description

GetNamePath determines the text that represents the collection in the Object Inspector. TCollectionItem overrides the inherited method to return the name of the collection followed by the index of the item within that collection.


TCollectionItem.GetOwner
 VCL Reference

TCollectionItem.GetOwner

TCollectionItem	See also

Returns the name of the collection item as it appears in the collection editor.

function GetOwner: TPersistent; override;

Description

GetOwner is used by the GetNamePath method to find the collection that owns of the collection item, allowing the collection item to appear in the Object Inspector. It returns the value of the Collection property.

Note:	The Owner of a collection item is not synonymous with a component’s Owner. It has no implications about the freeing of objects but merely serves to represent relationships to the Object Inspector.


TCollectionItem.SetDisplayName
 VCL Reference

TCollectionItem.SetDisplayName

TCollectionItem	See also

Sets the name of the collection item as it appears in the collection editor.

procedure SetDisplayName(const Value: string); virtual;

Description

SetDisplayName is the protected write implementation of the DisplayName property. The Value parameter specifies the name for the item that should appear in the collection editor.


TCollectionItem.SetIndex
 VCL Reference

TCollectionItem.SetIndex

TCollectionItem	See also

Moves the collection item to a specified position in the parent collection.

procedure SetIndex(Value: Integer); virtual;

Description

SetIndex is the protected write implementation of the Index property. The Value parameter specifies the new (0-based) position for the item in its parent collection.


Hierarchy

TObject

TPersistent

TCollectionItem


TColorBox
 VCL Reference

 TColorBox

Hierarchy	Properties	Methods	Events	See also

TColorBox represents a combo box that lets users select a color.

Unit

ExtCtrls

Description

Use TColorBox to provide the user with a drop-down combo box from which to select a color. Use the Style property to specify which colors the color box should list. Each color is displayed next to a small square that is drawn in the corresponding color.

Use the Selected property to access the color that the user selects. The Colors property provides access to the entire list of colors, while the ColorNames property lists their names.


 VCL Reference

TColorBox properties

TColorBox	Alphabetically	Legend

Derived from TCustomColorBox

ColorNames

Colors

DefaultColorColor

NoneColorColor

Selected

Style

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

ItemHeight

SelText

Derived from TCustomCombo

Canvas

DropDownCount

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TColorBox properties

TColorBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ColorNames

Colors

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultColorColor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropDownCount

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemHeight

ItemIndex

Items

Left

LRDockWidth

Name

NoneColorColor

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Selected

SelLength

SelStart

SelText

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TColorBox events

TColorBox	Alphabetically	Legend

Derived from TCustomCombo

OnChange

OnCloseUp

OnDropDown

OnSelect

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TColorBox events

TColorBox	By object	Legend

OnChange

OnClick

OnCloseUp

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDropDown

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnSelect

OnStartDock

OnStartDrag


 VCL Reference

TColorBox methods

TColorBox	Alphabetically	Legend

Derived from TCustomColorBox

Create

Derived from TCustomComboBox

Destroy

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TColorBox methods

TColorBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox

TCustomColorBox

TColorBox


TColorDialog
 VCL Reference

 TColorDialog

Hierarchy	Properties	Methods	Events

TColorDialog displays a modal color-selection dialog.

Unit

Dialogs

 Description

The TColorDialog component displays a Windows dialog box for selecting colors. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user selects a color and clicks OK, the dialog closes and the selected color is stored in the Color property.


 VCL Reference

TColorDialog properties

TColorDialog	Alphabetically	Legend

In TColorDialog

Color

CustomColors

Options

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TColorDialog properties

TColorDialog	By object	Legend

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

CustomColors

DesignInfo

Handle

HelpContext

Name

Options

Owner

Tag

VCLComObject


TColorDialog.Color
 VCL Reference

TColorDialog.Color

TColorDialog	See also	Example

Returns the selected color.

property Color: TColor;

Description

When the user selects a color in the dialog box and clicks OK, the selected color becomes the value of the Color property. To make a default color of choice appear in the dialog when it opens, assign a value to Color in the Object Inspector or in program code, otherwise the default is clBlack.


TColorDialog.CustomColors
 VCL Reference

TColorDialog.CustomColors

TColorDialog	See also

Determines which custom colors are available in the dialog box.

property CustomColors: TStrings;

Description

Each custom color is represented as a string of the form ColorX=HexValue. For example, the following string sets the first custom color.

ColorA=808022

Up to 16 custom colors (ColorA through ColorP) can be set.


TColorDialog:Options
 VCL Reference

TColorDialog.Options

TColorDialog

Specifies options and default appearance for the dialog.

type

  TColorDialogOption = (cdFullOpen, cdPreventFullOpen, cdShowHelp, cdSolidColor, cdAnyColor);

  TColorDialogOptions = set of TColorDialogOption;

property Options: TColorDialogOptions;

Description

Use the Options property to customize the appearance and functionality of the dialog. The possible values of Options are

Value	Meaning

cdFullOpen	Displays the custom color options when the dialog opens.

cdPreventFullOpen	Disables the Define Custom Colors button in the dialog, so that the user cannot define new colors.

cdShowHelp	Adds a Help button to the dialog.

cdSolidColor	Directs Windows to use the nearest solid color to the color chosen.

cdAnyColor	Allows the user to select non-solid colors (which may have to be approximated by dithering).

By default, all of these options are off.


 VCL Reference

TColorDialog events

TColorDialog	Alphabetically	Legend

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TColorDialog events

TColorDialog	By object	Legend

OnClose

OnShow


 VCL Reference

TColorDialog methods

TColorDialog	Alphabetically	Legend

In TColorDialog

Create

Destroy

Execute

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TColorDialog methods

TColorDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TColorDialog.Create
 VCL Reference

TColorDialog.Create

TColorDialog	See also

Creates and initializes a color-selection dialog.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TColorDialog instance.

After calling the inherited constructor, Create performs the following action:

Initializes a TStringList object for its CustomColors property.


TColorDialog.Destroy
 VCL Reference

TColorDialog.Destroy

TColorDialog	See also

Destroys the color-selection dialog and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the color-selection dialog is not nil before calling Destroy.

As the dialog is destroyed, it:

Frees the TStringList object in its CustomColors property.


TColorDialog:Execute
 VCL Reference

TColorDialog.Execute

TColorDialog 	See also	Example

Displays the color-selection dialog.

function Execute: Boolean; override;

Description

Execute opens the color-selection dialog, returning true when the user selects a color and clicks OK, or false when the user cancels.

if ColorDialog1.Execute then

  Shape1.Brush.Color := ColorDialog1.Color

else

  Shape1.Brush.Color := clGray;


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TColorDialog


TColorSelect
 VCL Reference

TColorSelect

Hierarchy	Properties	Methods	Events	Using TColorSelect	See also

TColorSelect is the standard action for displaying a color selection dialog.

Unit

StdActns

Description

Add TColorSelect to an action list to add a modal color selection dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the color selection dialog when invoked. Use the OnAccept event to respond after the user selects a color using the dialog or the OnCancel event to respond if the user cancels from the dialog. In the event handler for these events, you can read the color from the dialog specified by the Dialog property.


 VCL Reference

TColorSelect properties

TColorSelect	Alphabetically	Legend

In TColorSelect

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TColorSelect properties

TColorSelect	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TColorSelect.Dialog
 VCL Reference

TColorSelect.Dialog

TColorSelect 	See also

Provides access the color selection dialog that the action executes.

property Dialog: TColorDialog;

Description

Use Dialog to configure the color selection dialog before the action fires or to read the selected color after the action executes the dialog. For example, you can set the initially selected color in the dialog at design time using the Object Inspector or read the dialog’s Color property in an OnAccept event handler to make use of the selected color.

When using a color select action, you do not place a TColorDialog component on the form or data module at design time. Instead, you add the TColorSelect to your action list and then use the Dialog property. The color selection dialog component is created by the TColorSelect constructor.


 VCL Reference

TColorSelect events

TColorSelect	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TColorSelect events

TColorSelect	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TColorSelect methods

TColorSelect	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TColorSelect methods

TColorSelect	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TColorSelect


TComboBox
 VCL Reference

 TComboBox

Hierarchy	Properties	Methods	Events	Using TComboBox	See also	Example

TComboBox combines an edit box with a scrollable list.

Unit

StdCtrls

Description

A TComboBox component is an edit box with a scrollable drop-down list attached to it. Users can select an item from the list or type directly into the edit box.


 VCL Reference

TComboBox properties

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

ItemHeight

SelText

Sorted

Style

Derived from TCustomCombo

Canvas

DropDownCount

DroppedDown

ItemIndex

Items

MaxLength

SelLength

SelStart

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TComboBox Properties

TComboBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropDownCount

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MaxLength

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TComboBox events

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

OnDrawItem

OnMeasureItem

Derived from TCustomCombo

OnChange

OnCloseUp

OnDropDown

OnSelect

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TComboBox Events

TComboBox	By Object	Legend

OnChange

OnClick

OnCloseUp

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnDropDown

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnSelect

OnStartDock

OnStartDrag


 VCL Reference

TComboBox methods

TComboBox	Alphabetically	Legend

Derived from TCustomComboBox

Create

Destroy

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TComboBox Methods

TComboBox	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomComboBox

TComboBox


TCommonCalendar
 VCL Reference

TCommonCalendar

Hierarchy	Properties	Methods	Events

TCommonCalendar is the base class for the controls TDateTimePicker and TMonthCalendar.

Unit

ComCtrls

Description

Use TCommonCalendar as a base class when creating custom controls that represent dates in a calendar-like format. Do not create instances of TCommonCalendar. Instead, to put a calendar control on a form, use a TCommonCalendar descendant such as TDateTimePicker or TMonthCalendar .

Note:	The VCL includes another calendar control that does not descend from TCommonCalendar. This is TCalendar, which is offered as a sample.


 VCL Reference

TCommonCalendar properties

TCommonCalendar	Alphabetically	Legend

In TCommonCalendar

CalColors

CalendarHandle

CalExceptionClass

Date

DateTime

EndDate

FirstDayOfWeek

MaxDate

MaxSelectRange

MinDate

MonthDelta

MultiSelect

ShowToday

ShowTodayCircle

WeekNumbers

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCommonCalendar properties

TCommonCalendar	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CalColors

CalendarHandle

CalExceptionClass

ClientHeight

ClientOrigin

ClientRect

ClientToParent

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Date

DateTime

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

EndDate

FirstDayOfWeek

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IsImplementorOf

Left

LRDockWidth

MaxDate

MaxSelectRange

MinDate

MonthDelta

MultiSelect

Name

Owner

Parent

ParentToClient

ParentWindow

ReferenceInterface

SetSubComponent

ShowHint

Showing

ShowToday

ShowTodayCircle

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WeekNumbers

Width

WindowProc


TCommonCalendar.CalColors
 VCL Reference

TCommonCalendar.CalColors

TCommonCalendar	See also

Contains the colors used for each part of the calendar.

property CalColors: TMonthCalColors;

Description

Use the CalColors property to get or set the calendar's background color, month background color, text color, title background color, title text color, and trailing text color.


TCommonCalendar.CalendarHandle
 VCL Reference

TCommonCalendar.CalendarHandle

TCommonCalendar	See also

Indicates the calendar control's window handle.

property CalendarHandle: HWND;

Description

Use the CalendarHandle property to get the calendar control's window handle.

The CalendarHandle property is declared but not implemented in TCommonCalendar.

For descendants that use only one window, such as TMonthCalendar, CalendarHandle is the same as the Handle property. However, some TCommonCalendar descendants such as TDateTimePicker are implemented using more than one window. In these classes, CalendarHandle is the window handle for the portion of the control that displays date values.


TCommonCalendar.CalExceptionClass
 VCL Reference

TCommonCalendar.CalExceptionClass

TCommonCalendar	See also

Specifies the calendar's exception class.

property CalExceptionClass: ExceptClass;

Description

Use CalExceptionClass in a derived class determine the class used for exceptions raised by the calendar control. Descendants of TCommonCalendar initialize this value in the constructor so that when TCommonCalendar encounters an unexpected condition, it can raise the appropriate type of exception.


TCommonCalendar.Date
 VCL Reference

TCommonCalendar.Date

TCommonCalendar	See also

Indicates the date that is marked on the calendar.

property Date: TDate;

Description

Use Date to get or set the date that is marked on the calendar. The value of Date must lie within the range specified by MaxDate and MinDate.

If MultiSelect is True, the selected range of dates goes from Date to EndDate.

Note:	You can also set the marked date with the DateTime property.


TCommonCalendar.DateTime
 VCL Reference

TCommonCalendar.DateTime

TCommonCalendar	See also

Indicates the date that is marked on the calendar.

property DateTime: TDateTime;

Description

Use DateTime to get or set the date (and, if relevant, time) that is marked on the calendar control. The value of DateTime must lie within the range specified by MaxDate and MinDate.

If MultiSelect is True, the selected range of dates goes from DateTime to EndDate.

Note:	You can also set the marked date with the Date property.


TCommonCalendar.EndDate
 VCL Reference

TCommonCalendar.EndDate

TCommonCalendar	See also

Indicates the last date that in the range of selected dates.

property EndDate: TDate;

Description

Use EndDate to get or set the last selected date that is marked on the calendar. The first selected date is given by the Date property.

Before you can set the EndDate property, you must set the MultiSelect property to True.


TCommonCalendar.FirstDayOfWeek
 VCL Reference

TCommonCalendar.FirstDayOfWeek

TCommonCalendar	See also

Specifies the left-most day on the calendar.

property FirstDayOfWeek: TCalDayOfWeek;

Description

Use FirstDayOfWeek to get or set the left-most day on the calendar.

To make the left-most day adjust for the locale, set FirstDayOfWeek to dowLocaleDefault.


TCommonCalendar.MaxDate
 VCL Reference

TCommonCalendar.MaxDate

TCommonCalendar	See also

Indicates the maximum date to which users can scroll the calendar.

property MaxDate: TDate;

Description

Use MaxDate to get or set the maximum date to which users can scroll the calendar. The value of the Date (or EndDate) property can’t exceed MaxDate.


TCommonCalendar.MaxSelectRange
 VCL Reference

TCommonCalendar.MaxSelectRange

TCommonCalendar	See also

Specifies the maximum number of days that can be selected.

property MaxSelectRange: Integer;

Description

Use MaxSelectRange to limit the number of days that can be selected when MultiSelect is True. To limit ranges so that they fall between specific date values, use the MaxDate and MinDate properties instead.


TCommonCalendar.MinDate
 VCL Reference

TCommonCalendar.MinDate

TCommonCalendar	See also

Indicates the minimum date that can be selected.

property MinDate: TDate;

Description

Use MinDate to get or set the minimum date that can be selected.


TCommonCalendar.MonthDelta
 VCL Reference

TCommonCalendar.MonthDelta

TCommonCalendar

Specifies how many months that the calendar scrolls.

property MonthDelta: Integer;

Description

Use MonthDelta to get or set the number of months that the calendar scrolls when the back and forward buttons are clicked.


TCommonCalendar.MultiSelect
 VCL Reference

TCommonCalendar.MultiSelect

TCommonCalendar	See also

Specifies whether multiple dates can be selected on the calendar.

property MultiSelect: Boolean;

Description

Use MultiSelect to specify whether the calendar represents a single date or a range of dates. When MultiSelect is True, the calendar represents the range of dates from Date to EndDate. When MultiSelect is False, the calendar represents only the value of Date.


TCommonCalendar.ShowToday
 VCL Reference

TCommonCalendar.ShowToday

TCommonCalendar	See also

Specifies whether today's date is shown below the calendar.

property ShowToday: Boolean;

Description

Use ShowToday to specify whether today's date (according to the system clock) is shown below the calendar.


TCommonCalendar.ShowTodayCircle
 VCL Reference

TCommonCalendar.ShowTodayCircle

TCommonCalendar	See also

Specifies whether today's date is circled on the calendar.

property ShowTodayCircle: Boolean;

Description

Use ShowTodayCircle to specify whether today's date (according to the system clock) is circled on the calendar.


TCommonCalendar.WeekNumbers
 VCL Reference

TCommonCalendar.WeekNumbers

TCommonCalendar	See also

Specifies whether week numbers are shown to the left of the calendar.

property WeekNumbers: Boolean;

Description

Use WeekNumbers to indicate whether week numbers are shown to the left of the calendar. The week numbers correspond to the number of the week in the current year.


 VCL Reference

TCommonCalendar events

TCommonCalendar	Alphabetically	Legend

In TCommonCalendar

OnGetMonthInfo


 VCL Reference

TCommonCalendar events

TCommonCalendar	By object	Legend

OnGetMonthInfo


TCommonCalendar.OnGetMonthInfo
 VCL Reference

TCommonCalendar.OnGetMonthInfo

TCommonCalendar	See also

Called whenever a new month is displayed in the calendar.

property OnGetMonthInfo: TOnGetMonthInfoEvent;

Description

Use the OnGetMonthInfo event to initialize the display properties of a month. In particular, OnGetMonthInfo allows applications to bold individual days in the calendar (such as holidays).

To specify that specific dates are to be bolded, use the BoldDays method to obtain a value that can be returned as the MonthBoldInfo parameter. For example, to bold the first and eighth days of every month that is displayed, call

BoldDays([1,8], MonthBoldInfo);

from the OnGetMonthInfo event handler.


 VCL Reference

TCommonCalendar methods

TCommonCalendar	Alphabetically	Legend

In TCommonCalendar

BoldDays

CheckEmptyDate

CheckValidDate

Create

CreateWnd

Destroy

GetCalendarHandle

GetCalStyles

MsgSetCalColors

MsgSetDateTime

MsgSetRange

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCommonCalendar methods

TCommonCalendar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BoldDays

BringToFront

Broadcast

CanFocus

CheckEmptyDate

CheckValidDate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCalendarHandle

GetCalStyles

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MsgSetCalColors

MsgSetDateTime

MsgSetRange

NewInstance

PaintTo

Perform

Realign

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCommonCalendar.BoldDays
 VCL Reference

TCommonCalendar.BoldDays

TCommonCalendar	See also

Encodes a set of dates for use in the OnGetMonthInfo event handler.

procedure BoldDays(Days: array ofLongWord; var MonthBoldInfo: LongWord);

Description

Use BoldDays to encode the days of the current month that should appear in bold. The value returned by BoldDays can be assigned to the MonthBoldInfo parameter of an OnGetMonthInfo event handler.

Days is an array of unsigned integers corresponding to the days that should be bold.

MonthBoldInfo returns the encoding of the values that were passed in the Days array. This value can be assigned to the MonthBoldInfo parameter of the OnGetMonthInfo event handler. (or the MonthBoldInfo parameter can be passed in for this argument). You shouldn't work with the MonthBoldInfo variable directly.

For example, to encode the first and eighth days of a month, call

BoldDays([1,8], MonthBoldInfo);


TCommonCalendar.CheckEmptyDate
 VCL Reference

TCommonCalendar.CheckEmptyDate

TCommonCalendar	See also

Clears the check box associated with the calendar.

procedure CheckEmptyDate; virtual;

Description

CheckEmptyDate is called automatically when DateTime is assigned a value that represents a time and not a date value (or Date is assigned a value of 0). As implemented in TCommonCalendar, CheckEmptyDate does nothing.

TDateTimePicker overrides CheckEmptyDate to clear the check box associated with the calendar, or raise an EDateTimeError if ShowCheckbox is False. This allows TDateTimePicker to represent time values that do not include a date portion. (When a TDateTime value represents a time and not a date, the date portion is 0).


TCommonCalendar.CheckValidDate
 VCL Reference

TCommonCalendar.CheckValidDate

TCommonCalendar	See also

Confirms that a date falls between MinDate and MaxDate.

procedure CheckValidDate(Value: TDate); virtual;

Description

Calendar controls call CheckValidDate to confirm that a date falls between MinDate and MaxDate.

Value is the date to check.

If Value is outside MinDate and MaxDate, an exception of the type specified in the CalExceptionClass property is raised.


TCommonCalendar.Create
 VCL Reference

TCommonCalendar.Create

TCommonCalendar	See also

Creates an instance of TCommonCalendar.

constructor Create(AOwner: TComponent); override;

Description

Call Create to construct and initialize an instance of TCommonCalendar. The AOwner parameter assigns a value to the Owner property, which is responsible for freeing the calendar control.

Create performs the following tasks:

Calls the inherited constructor.

Sets ShowToday and ShowTodayCircle to True.

Sets ControlStyle to [csOpaque, csClickEvents, csDoubleClicks].

Sets DateTime to Now.

Sets FirstDayOfWeek to dowLocaleDefault.

Sets MaxSelectRange to 31.

Sets MonthDelta to 1.


TCommonCalendar.CreateWnd
 VCL Reference

TCommonCalendar.CreateWnd

TCommonCalendar	See also

Creates the windows control for the calendar.

procedure CreateWnd; override;

Description

CreateWnd is called automatically when the windowed control is first created or when the window must be destroyed and recreated to reflect property changes. Override CreateWnd to pass additional initialization messages to the window when it is first created.

CreateWnd calls the TWinControl CreateWnd method to generate the window, and then sends messages to initialize the control so that it reflects the current property settings.


TCommonCalendar.Destroy
 VCL Reference

TCommonCalendar.Destroy

TCommonCalendar	See also

Destroys the TCommonCalendar instance.

destructor Destroy; override;

Description

Do not call the TCommonCalendar destructor directly in an application. Instead, call Free, which checks that the calendar reference is not nil before calling Destroy.

Applications do not need to explicitly destroy calendar controls unless they were created without assigning an Owner.


TCommonCalendar.GetCalendarHandle
 VCL Reference

TCommonCalendar.GetCalendarHandle

TCommonCalendar	See also

Returns the calendar control's window handle.

function GetCalendarHandle: HWND; virtual; abstract;

Description

GetCalendarHandle is the protected read implementation of the CalendarHandle property. For TCommonCalendar, this is an abstract method. It must be implemented in descendant classes.


TCommonCalendar.GetCalStyles
 VCL Reference

TCommonCalendar.GetCalStyles

TCommonCalendar	See also

Returns the style flags that are used when creating the calendar’s window.

function GetCalStyles: DWORD; virtual;

Description

GetCalStyles is used internally to create the style flags that reflect the current property settings of the calendar control. These flags are or’d with style flags generated by TWinControl’s CreateParams method and assigned to the Style field of the window creation parameters.


TCommonCalendar.MsgSetCalColors
 VCL Reference

TCommonCalendar.MsgSetCalColors

TCommonCalendar	See also

Sets the calendar's colors.

function MsgSetCalColors(ColorIndex: Integer; ColorValue: TColor): Boolean; virtual; abstract;

Description

MsgSetCalColors implements the CalColors property by sending a message to the calendar  window handle. MsgSetCalColors is an abstract method, and must be overridden in descendant objects to send the appropriate message.

The ColorIndex parameter indicates which of the TMonthCalColors properties is being set. It is one of the following values:

Value	Property

0	BackColor

1	TextColor

2	TitleBackColor

3	TitleTextColor

4	MonthBackColor

5	TrailingTextColor

The ColorValue parameter is the value that should be set.

MsgSetCalColors returns True if the color is set by the method.


TCommonCalendar.MsgSetDateTime
 VCL Reference

TCommonCalendar.MsgSetDateTime

TCommonCalendar	See also

Sets the calendar's date/time.

function MsgSetDateTime(Value: TSystemTime): Boolean; virtual; abstract;

Description

MsgSetDateTime implements the DateTime property by sending a message to the calendar  window handle. MsgSetDateTime is an abstract method, and must be overridden in descendant objects to send the appropriate message.

The Value parameter indicates the value of DateTime as a TSystemTime value. This can be obtained from the DateTime property value by calling DateTimeToSystemTime.

MsgSetDateTime returns True if the date/time value is set by the method.


TCommonCalendar.MsgSetRange
 VCL Reference

TCommonCalendar.MsgSetRange

TCommonCalendar	See also

Implements the MinDate and MaxDate properties.

function MsgSetRange(Flags: Integer; SysTime: PSystemTime; Boolean; virtual; abstract;

Description

MsgSetRange implements the MinDate and MaxDate properties by sending a message to the calendar window handle. MsgSetRange is an abstract method, and must be overridden in descendant objects to send the appropriate message.

The Flags parameter indicates what type of information is included in the SysTime array. It includes the GDTR_MIN flag if a minimum date is supplied and GDTR_MAX if a maximum date is supplied.

The SysTime parameter is a two-element array containing the minimum date as the first element and the maximum date as the second element. These values can be obtained from the MinDate and MaxDate properties by calling DateTimeToSystemTime.

MsgSetRange returns True if the range is set by the method.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCommonCalendar


TCommonDialog
 VCL Reference

TCommonDialog

Hierarchy	Properties	Methods	Events	See also

TCommonDialog is the ancestor of all components that represent Windows common dialog boxes.

Unit

Dialogs

Description

TCommonDialog is an abstract class that represents Windows common dialog boxes. Its descendants handle such tasks as finding and opening files, setting fonts and colors, and printing. The dialogs do not appear at runtime until activated by a call to the Execute method. Except for TFindDialog and TReplaceDialog, these dialogs are all modal.

The TCommonDialog descendants are nonvisual components that generate a single function call to COMMDLG.DLL, and are therefore less easily modified than other Delphi components. New components that encapsulate common-dialog functions should descend from TCommonDialog. Most other dialog boxes should descend from TForm.


 VCL Reference

TCommonDialog properties

TCommonDialog	Alphabetically	Legend

In TCommonDialog

Ctl3D

Handle

HelpContext

Template

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCommonDialog properties

TCommonDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DesignInfo

Handle

HelpContext

Name

Owner

Tag

Template

VCLComObject


TCommonDialog.Ctl3D
 VCL Reference

TCommonDialog.Ctl3D

TCommonDialog	See also

Determines whether the dialog has a three-dimensional look.

property Ctl3D: Boolean;

Description

Ctl3D is provided for backward compatibility. It has no effect on 32-bit versions of Windows and on NT 4.0 and later.

Ctl3D determined whether controls in the dialog had a flat or beveled look. It required CTL3D32.DLL to be installed in the System32 directory.


TCommonDialog.Handle
 VCL Reference

TCommonDialog.Handle

TCommonDialog	See also

Specifies the window handle of the dialog.

property Handle: HWnd;

Description

The Handle property, which provides access to the dialog’s window handle after a call to Execute, can be used in OnShow and OnClose event handlers. Handle is reset to 0 after the dialog closes.


TCommonDialog.HelpContext
 VCL Reference

TCommonDialog.HelpContext

TCommonDialog	See also

Specifies the context number for online Help.

property HelpContext: THelpContext;

Description

The HelpContext property is an integer value that determines which Help screen appears when the user requests context-sensitive online Help. If HelpContext is set to the default value of 0, the dialog inherits the Help context of its parent.


TCommonDialog.Template
 VCL Reference

TCommonDialog.Template

TCommonDialog	See also

Points to a custom template for the dialog.

property Template: PChar;

Description

Template points to a resource identifier (a null-terminated string or an integer created with MAKEINTRESOURCE) that identifies a Windows dialog resource in the current HInstance module. The Execute method uses this resource to customize the appearance of the dialog.


 VCL Reference

TCommonDialog events

TCommonDialog	Alphabetically	Legend

In TCommonDialog

OnClose

OnShow


 VCL Reference

TCommonDialog events

TCommonDialog	By object	Legend

OnClose

OnShow


TCommonDialog.OnClose
 VCL Reference

TCommonDialog.OnClose

TCommonDialog	See also

Occurs when the dialog closes.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler to perform special processing when the dialog closes.


TCommonDialog.OnShow
 VCL Reference

TCommonDialog.OnShow

TCommonDialog	See also

Occurs when the dialog opens.

property OnShow: TNotifyEvent;

Description

Write an OnShow event handler to perform special processing when the dialog is displayed.


 VCL Reference

TCommonDialog methods

TCommonDialog	Alphabetically	Legend

In TCommonDialog

Create

DefaultHandler

Destroy

DoClose

DoShow

Execute

MessageHook

TaskModalDialog

WndProc

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCommonDialog methods

TCommonDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoClose

DoShow

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

MessageHook

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

TaskModalDialog

UpdateAction

WndProc


TCommonDialog.Create
 VCL Reference

TCommonDialog.Create

TCommonDialog	See also

Creates and initializes a TCommonDialog instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a common dialog component at runtime. Dialogs added to forms or data modules at design time are created automatically.

After calling the inherited constructor, Create performs the following actions:

Placeholder #1.


TCommonDialog.Destroy
 VCL Reference

TCommonDialog.Destroy

TCommonDialog	See also

Destroys the TCommonDialog instance and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the dialog reference is not nil before calling Destroy.

As the dialog is destroyed, it:

Placeholder #1.


TCommonDialog.DefaultHandler
 VCL Reference

TCommonDialog.DefaultHandler

TCommonDialog	See also

Sends unhandled messages to Windows for processing.

procedure DefaultHandler(var Message); override;

Description

DefaultHandler is called by Dispatch when it cannot find a method for a particular message. DefaultHandler sends these messages to the dialog’s window procedure, where they are handled by Windows.


TCommonDialog.DoClose
 VCL Reference

TCommonDialog.DoClose

TCommonDialog	See also

Generates an OnClose event.

procedure DoClose; dynamic;

Description

DoClose is called automatically when the user closes the dialog. Override this method to provide additional processing other than calling the OnClose event handler. For example, to perform shutdown operations that use protected methods of the dialog class, override DoClose rather than writing an OnClose event handler (which can access only public methods).


TCommonDialog.DoShow
 VCL Reference

TCommonDialog.DoShow

TCommonDialog	See also

Generates an OnShow event.

procedure DoShow; dynamic;

Description

DoShow is called automatically when the dialog is first displayed. Override this method to provide additional processing other than calling the OnShow event handler. For example, to perform initializations that use protected methods of the dialog class, override DoShow rather than writing an OnShow event handler (which can access only public methods).


TCommonDialog.Execute
 VCL Reference

TCommonDialog.Execute

TCommonDialog	See also

Displays the dialog box.

function Execute: Boolean; virtual; abstract;

Description

TCommonDialog introduces the abstract Execute method, which descendant classes use to open the dialog instance at runtime. Generally, Execute returns true when the user makes a selection and clicks OK, and returns false when the user closes the dialog without making a selection.


TCommonDialog.MessageHook
 VCL Reference

TCommonDialog.MessageHook

TCommonDialog 	See also

Provides special Windows message processing for the dialog.

function MessageHook(var Msg: TMessage): Boolean; virtual;

virtual bool __fastcall MessageHook(Messages::TMessage &Msg);

Description

MessageHook intercepts messages sent to the dialog window before the dialog’s window procedure gets them. When MessageHook handles a message, it returns true to indicate that the message should not be sent on for further processing. If the window procedure should handle the message, MessageHook returns false.

Override MessageHook to provide extra message processing. For example, if the Template property substitutes a dialog template with additional controls, use MessageHook to handle messages from those dialog controls.

In TCommonDialog, MessageHook handles Help messages by calling the application’s HelpContext method if the HelpContext property is defined. Descendants of TCommonDialog override MessageHook to add additional message processing.


TCommonDialog.TaskModalDialog
 VCL Reference

TCommonDialog.TaskModalDialog

TCommonDialog 	See also

Ensures that Windows messages are properly routed when the dialog executes.

function TaskModalDialog(DialogFunc: Pointer; var DialogData): Bool; virtual;

Description

Descendants of TCommonDialog call TaskModalDialog from their Execute methods.

TaskModalDialog

Disables other windows while the dialog is displayed.

Ensures that application windows are activated and deactivated appropriately.

Ensures that the MessageHook receives Windows messages before the dialog’s window procedure.

Calls the dialog function specified as DialogFunc, passing in the dialog-specific data provided by DialogData.


TCommonDialog.WndProc
 VCL Reference

TCommonDialog.WndProc

TCommonDialog 	See also

Responds to Windows messages sent to the dialog.

procedure WndProc(var Message: TMessage); virtual;

Description

WndProc is the main window procedure for the dialog. As implemented in TCommonDialog, it simply calls the Dispatch method, where any message handlers respond to messages before the DefaultHandler method sends them on to the Windows message handler.

Override WndProc to subclass the dialog’s window procedure. To add additional message processing without interfering with the existing message handling of the dialog, override MessageHook instead.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog


TComponentEditor
 VCL Reference

TComponentEditor

Hierarchy	Properties	Methods	See also

TComponentEditor provides the default implementation for the IComponentEditor interface.

Unit

DesignEditors

Description

Use TComponentEditor or one of its descendants as a base class when defining a design-time editor for working with a new component class. Although you can create component editors that descend directly from TBaseComponentEditor, it is convenient to use TComponentEditor, because this classs supplies a default implementation of the IComonentEditor interface.

Create a new component editor class for a component class to add verbs to its context menu, change its default double-click behavior, or allow the component to use a new clipboard format.

Once the component editor is defined, it can be registered to work with a particular component class.  A registered component editor is created for each component of that class when it is selected in the form designer.  When the component is double-clicked, the Edit method of the component editor is called.  When the user right-clicks the component, the GetVerbCount and GetVerb methods of the editor are called to build context menu. To create the association between a component editor and a component class, call RegisterComponentEditor.

Delphi provides a descendant of TComponentEditor (TDefaultEditor) which all components use if they have no registered association with a component editor.


 VCL Reference

TComponentEditor properties

TComponentEditor	Alphabetically 	Legend

In TComponentEditor

Component

Designer

Derived from TInterfacedObject

RefCount


 VCL Reference

TComponentEditor properties

TComponentEditor	By object 	Legend

Component

Designer

RefCount


TComponentEditor.Component
 VCL Reference

TComponentEditor.Component

TComponentEditor 	See also	Example

Provides access to the component in the form designer that uses this component editor.

property Component: TComponent;

Description

Use Component to read from and make changes to the component associated with the component editor. A component editor is created for each instance of the registered component class when it is selected in the form designer.  Component is the selected instance.

Note:	When the component editor makes changes to the component, it must call the Modified method of the form designer that is specified by the Designer property.


TComponentEditor.Designer
 VCL Reference

TComponentEditor.Designer

TComponentEditor	See also

Provides access to the form designer in the IDE.

property Designer: IDesigner;

Description

Use Designer to read from or make changes to the current form or module in the IDE. The IDesigner interface has methods that can access the components in the current unit and other units linked in by the uses clause, create or alter the methods in the current unit, and so on.

Note:	When the component editor makes changes to the component, it must call the Modified method of the IDesigner interface.


 VCL Reference

TComponentEditor methods

TComponentEditor	Alphabetically	Legend

In TComponentEditor

Copy

Create

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

PrepareItem

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TComponentEditor methods

TComponentEditor	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Copy

Create

DefaultHandler

Destroy

Dispatch

Edit

ExecuteVerb

FieldAddress

Free

FreeInstance

GetComponent

GetDesigner

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetVerb

GetVerbCount

InheritsFrom

InitInstance

InstanceSize

IsInInlined

MethodAddress

MethodName

NewInstance

PrepareItem

SafeCallException


TComponentEditor.Copy
 VCL Reference

TComponentEditor.Copy

TComponentEditor	See also	Example

Provides an opportunity to copy the component to the clipboard in custom formats.

procedure Copy; virtual;

Description

Do not call the Copy method.  It is called automatically when the user tries to copy the component to the clipboard.  When Copy is called, the component's filed image is already on the Clipboard. Override Copy to copy a different clipboard format, which is ignored by the designer but might be recognized by another application.


TComponentEditor.Create
 VCL Reference

TComponentEditor.Create

TComponentEditor	See also

Instantiates a component editor.

constructor Create(AComponent: TComponent; ADesigner: IDesigner); override;

Description

Do not create instances of TComponentEditor. The form designer creates component editor instances for a selected component.

AComponent is the selected component on which the editor will operate.

ADesigner is the form designer’s interface, which can be used to obtain information about the components and methods in the designer and to create or manipulate components and methods.


TComponentEditor.Edit
 VCL Reference

TComponentEditor.Edit

TComponentEditor	See also

Responds when the user double-clicks the component in the form designer.

procedure Edit; virtual;

Description

The form designer calls Edit when the user double-clicks the component. Edit executes the first verb supplied by the component editor.  That is, if GetVerbCount returns a value greater than zero, Edit calls

ExecuteVerb(0);

Override the Edit method to implement another response when the user double-clicks the component.  For example, the Edit method can bring up a dialog or design expert.


TComponentEditor.ExecuteVerb
 VCL Reference

TComponentEditor.ExecuteVerb

TComponentEditor	See also	Example

Performs the action of a specified verb.

procedure ExecuteVerb(Index: Integer); virtual;

Description

The form designer calls ExecuteVerb when the user selects the verb that is returned by GetVerb(Index).  This verb is the string that appears in the corresponding position of the component’s context menu.

TComponentEditor does not supply any verbs for its component.  As a result, ExecuteVerb does nothing.  Override GetVerb to provide a set of verbs, or menu strings, that are added to the context menu which appears when the user right-clicks the component.  Override ExecuteVerb to implement a response to each of these verbs.


TComponentEditor.GetComponent
 VCL Reference

TComponentEditor.GetComponent

TComponentEditor	See also

Returns the value of the Component property.

function GetComponent: TComponent;

Description

Use GetComponent to read from and make changes to the component associated with the component editor. Calling GetComponent is equivalent to reading the Component property, but unlike the Component property, is available through the IComponentEditor interface.

A component editor is created for each instance of the registered component class when it is selected in the form designer.  GetComponent returns the selected instance.

Note:	When the component editor makes changes to the component, it must call the Modified method of the form designer that is specified by the Designer property.


TComponentEditor.GetDesigner
 VCL Reference

TComponentEditor.GetDesigner

TComponentEditor	See also

Returns the interface for the form designer.

function GetDesigner: IDesigner;

Description

GetDesigner is the read implementation for the Designer property.


TComponentEditor.GetVerb
 VCL Reference

TComponentEditor.GetVerb

TComponentEditor	See also	Example

Returns the string that corresponds to the specified position of the component’s context menu.

function GetVerb(Index: Integer): string; virtual;

Description

The form designer calls GetVerb iteratively to build the context menu that appears when the user right-clicks the component.

When overriding GetVerb, adding an ampersand (&) to a verb will cause the following character to appear underlined in the context menu and to act as a shortcut key for selecting the menu item.  Be sure to add ellipsis (...) to the end of a verb if its corresponding action is to bring up a dialog.


TComponentEditor.GetVerbCount
 VCL Reference

TComponentEditor.GetVerbCount

TComponentEditor	See also	Example

Returns the number of menu strings added to the context menu by the component editor.

function GetVerbCount: Integer; virtual;

Description

The form designer calls GetVerbCount when the user right-clicks the component in order to determine the number of menu items that should be added to the context menu.  It then adds the menu items by calling GetVerb for every value from 0 to GetVerbCount - 1.

TComponentEditor does not supply any verbs for its component.  As a result, GetVerbCount returns 0.  Override GetVerbCount when providing a set of verbs, or menu strings, to be added to the context menu.  When overriding GetVerbCount, override GetVerb to return the actual strings, and override ExecuteVerb to implement a response to each of these verbs.  For example, if adding two verbs to the context menu, GetVerbCount should return 2, GetVerb should return a value for an Index of 0 and for an Index of 1, and ExecuteVerb should perform the corresponding actions for an Index of 0 and for an Index of 1.


TComponentEditor.IsInInlined
 VCL Reference

TComponentEditor.IsInInlined

TComponentEditor	See also

Indicates whether the component has the csInline flag set in its ComponentState property.

function IsInInlined: Integer; virtual;

Description

IsInInlined indicates whether the component being edited is inside a top-level component that can be modified at design time and also embedded in a form.

For instance, when a component is used on a Frame and that Frame is dropped on a Form, IsInInlined returns True for the component when it is embedded in the Frame on the Form, but returns False when the component that is only on the Frame.


TComponentEditor.PrepareItem
 VCL Reference

TComponentEditor.PrepareItem

TComponentEditor	See also

Allows the component editor to modify menu items as they are added to the context menu.

procedure PrepareItem(Index: Integer; const AItem: IMenuItem); virtual;

Description

The form designer calls PrepareItem for each verb when it constructs the context menu. This method lets the component editor make any modifications to the menu item for each verb, including adding subitems or removing the item from the context menu.

Index identifies the current verb that the form designer is adding to the context menu. This is the same index as appears for the command in the GetVerb and ExecuteVerb methods.

AItem is an interface to the menu item created by the form designer for the current verb. To add subitems, call the AddItem method of this interface. To disable the item, set the Enabled property to False. To suppress the menu item altogether, set its Visible property to False.

As implemented in TComponentEditor, PrepareItem does nothing. Override this method to customize the context menu before it is displayed.


Hierarchy

TObject

TInterfacedObject

TBaseComponentEditor

TComponentEditor


TControl
 VCL Reference

TControl

Hierarchy	Properties	Methods	Events	See also

TControl is the base class for all components that are visible at runtime.

Unit

Controls

Description

Controls are visual components, meaning the user can see them and possibly interact with them at runtime. All controls have properties, methods, and events that describe aspects of their appearance, such as the position of the control, the cursor or hint associated with the control, methods to paint or move the control, and events that respond to user actions.

TControl has many protected properties and methods that are used or published by its descendents.


 VCL Reference

TControl Properties

TControl	Alphabetically	Legend

In TControl

Action

ActionLink

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DesktopFont

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IsControl

Left

LRDockWidth

MouseCapture

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ScalingFlags

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

WindowText

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TControl Properties

TControl	By Object	Legend

Action

ActionLink

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DesktopFont

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IsControl

Left

LRDockWidth

MouseCapture

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ScalingFlags

ShowHint

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

WindowText


TControl.Action
 VCL Reference

TControl.Action

TControl

Designates the action associated with the control.

property Action: TBasicAction;

Description

Action is the action object that is associated with the control. Actions allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event).

To create actions at design time, place an action list component on a form or data module. Double click the action list to bring up the action list editor. Add actions in the editor using its context menu. Once the actions have been added using the action list editor, they appear in the drop-down list for the Action property in the Object Inspector.


TControl.ActionLink
 VCL Reference

TControl.ActionLink

TControl	See also

Contains the action link object associated with the control.

property ActionLink: TControlActionLink;

Description

ActionLink handles the association between the control and the action specified by the Action property. The action link determines which properties and events of the action object determine the values of corresponding properties and events of the control.

Most applications do not use the ActionLink property. Component writers can change this property in TControl descendants to be a custom descendant of TControlActionLink that handles a desired configuration of properties and events.


TControl.Align
 VCL Reference

TControl.Align

TControl	See also	Example

Determines how the control aligns within its container (parent control).

property Align: TAlign;

Description

Use Align to align a control to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent.

For example, to use a panel component with various controls on it as a tool palette, change the panel’s Align value to alLeft. The value of alLeft for the Align property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form.

The default value of Align is alNone, which means a control remains where it is positioned on a form or panel.

Tip:	If Align is set to alClient, the control fills the entire client area so that it is impossible to select the parent form by clicking on it. In this case, select the parent by selecting the control on the form and pressing Esc, or by using the Object Inspector.

Any number of child components within a single parent can have the same Align value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions.

Note:	To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the Anchors property instead.


TControl.Anchors
 VCL Reference

TControl.Anchors

TControl	See also

Specifies how the control is anchored to its parent.

property Anchors: TAnchors;

Description

Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored.

If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft,akRight], the control stretches when the width of its parent changes.

Anchors is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created.

Note:	If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the Align property instead. Unlike Anchors, Align allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent’s size.


TControl.AutoSize
 VCL Reference

TControl.AutoSize

TControl	See also

Specifies whether the control sizes itself automatically to accommodate its contents.

property AutoSize: Boolean;

Description

Use AutoSize to specify whether the control sizes itself automatically. When AutoSize is True, the control resizes automatically when its contents change.

By default, AutoSize is False.


TControl.BiDiMode
 VCL Reference

TControl.BiDiMode

TControl	See also

Specifies the bi-directional mode for the control.

property BiDiMode: TBiDiMode;

Description

Use BiDiMode to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from right to left instead of left to right. The bi-directional mode controls the reading order for the text, the placement of the vertical scrollbar, and whether the alignment is changed.

Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data aware controls, the alignment does not change for the following field types: ftSmallint, ftInteger, ftWord, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftAutoInc.


TControl.BoundsRect
 VCL Reference

TControl.BoundsRect

TControl	See also	Example

Specifies the bounding rectangle of the control, expressed in the coordinate system of the parent control.

property BoundsRect: TRect;

Description

Use BoundsRect as a quick way to obtain the pixel locations of all corners of the control all at once.

For example, the statement

R := Control.BoundsRect;

corresponds to

R.Left := Control.Left;

R.Top := Control.Top;

R.Right := Control.Left + Control.Width;

R.Bottom := Control.Top + Control.Height;

The origin of the pixel coordinate system is in the top left corner of the parent window.

Note:	A point is considered within the control’s bounds rectangle if it lies on the left or top side but not if it lies on the right or bottom side. That is, to be inside the bounds rectangle, the x-coordinate must be greater than or equal to BoundsRect.Left and less than BoundsRect.Right, and the y-coordinate must be greater than or equal to BoundsRect.Top and less than BoundsRect.Bottom.


TControl.Caption
 VCL Reference

TControl.Caption

TControl	See also	Example

Specifies a text string that identifies the control to the user.

property Caption: TCaption;

Description

Use Caption to specify the text string that labels the control.

To underline a character in a Caption that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the component by pressing Alt while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&).

Note:	Controls that display text use either the Caption property or the Text property to specify the text value. Which property is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control.


TControl.ClientHeight
 VCL Reference

TControl.ClientHeight

TControl	See also

Specifies the height of the control's client area in pixels.

property ClientHeight: Integer;

Description

Use ClientHeight to read or change the height of the control’s client area.

For TControl, ClientHeight is the same as Height. Derived classes may implement a ClientHeight property that differs from Height. For example, the ClientHeight of a form is the value of the Height property minus the height of the title bar, resize border, and scrollbars.


TControl.ClientOrigin
 VCL Reference

TControl.ClientOrigin

TControl	See also

Specifies the screen coordinates (in pixels) of the top left corner of a control’s client area.

property ClientOrigin: TPoint;

Description

Read ClientOrigin to locate the top-left corner of the control’s client area. ClientOrigin returns X and Y coordinates as a TPoint type, where X specifies the horizontal coordinate of the point and Y specifies the vertical coordinate.

The screen coordinates of a control that is descended from TControl and not TWinControl are the screen coordinates of the control’s parent added to its Left and Top properties. If the control doesn’t have a parent, an EInvalidOperation exception is raised when ClientOrigin is read.


TControl.ClientRect
 VCL Reference

TControl.ClientRect

TControl	See also 	Example

Specifies the size (in pixels) of a control’s client area.

property ClientRect: TRect;

Description

Read ClientRect to find the size of the client area of a control. ClientRect returns a rectangle with its Top and Left fields set to zero, and its Bottom and Right fields set to the control's Height and Width, respectively. ClientRect is equivalent to Rect(0, 0, ClientWidth, ClientHeight).

A point is considered within the control’s client rectangle if it lies on the left or top side but not if it lies on the right or bottom side. That is, to be inside the client rectangle, the x-coordinate must be greater than or equal to ClientRect.Left and less than ClientRect.Right, and the y-coordinate must be greater than or equal to ClientRect.Top and less than ClientRect.Bottom.

Note:	ClientRect is the size of the physical client area of the control, not its logical client area. If the control supports scrolling, the ClientRect is not the entire scrolling range, but only the region that is available at any given time.


TControl.ClientWidth
 VCL Reference

TControl.ClientWidth

TControl	See also

Specifies the horizontal size of the control's client area in pixels.

property ClientWidth: Integer;

Description

Use ClientWidth to read or change the width of the control’s client area. ClientWidth is equivalent to ClientRect.Right.

For TControl, ClientWidth is the same as Width. Derived classes may implement a ClientWidth property that differs from Width. For example, the ClientWidth of a form is the value of the Width property minus the width of the resize border and scrollbars.


TControl.Color
 VCL Reference

TControl.Color

TControl	See also	Example

Specifies the background color of the control.

property Color: TColor;

Description

Use Color to read or change the background color of the control.

If a control's ParentColor property is true, then changing the Color property of the control's parent automatically changes the Color property of the control. When the value of the Color property is changed, the control's ParentColor property is automatically set to false.


TControl.Constraints
 VCL Reference

TControl.Constraints

TControl	See also

Specifies the size constraints for the control.

property Constraints: TSizeConstraints;

Description

Use Constraints to specify the minimum and maximum width and height of the control. When Constraints contains maximum or minimum values, the control cannot be resized to violate those constraints.

Warning:	Do not set up constraints that conflict with the value of the Align or Anchors property. When these properties conflict, the response of the control to resize attempts is not well-defined.


TControl.ControlState
 VCL Reference

TControl.ControlState

TControl	See also

Indicates the current state of a control at runtime.

type TControlState = set of (csLButtonDown, csClicked, csPalette, csReadingState, csAlignmentNeeded, csFocusing, csCreating, csPaintCopy, csCustomPaint, csDestroyingHandle, csDocking,);

property ControlState: TControlState;

Description

Read ControlState to find out various conditions that affect the control such as whether it has been clicked or needs alignment. ControlState reflects transient conditions of an instance of the control, as opposed to attributes of the control class as a whole. ControlState consists of a set of flags drawn from the following values:

Flag	Meaning

csLButtonDown	The left mouse button was clicked and not yet released. This is set for all mouse-down events.

csClicked	The same as csLButtonDown, but only set if ControlStyle contains csClickEvents, meaning that mouse-down events are interpreted as clicks.

csPalette	The system palette has changed and the control or one of its descendants has not finished adjusting by realizing its palette.

csReadingState	The control is reading its state from a stream.

csAlignmentNeeded	The control needs to realign itself when alignment is re-enabled.

csFocusing	The application is processing messages intended to give the control focus. This does not guarantee the control will receive focus, but prevents recursive calls.

csCreating	The control and/or its owner and subcontrols are being created. This flag clears when all have finished creating.

csPaintCopy	The control is being replicated, meaning a copy of the control is being painted. The ControlStyle flag csReplicatable must be set for this state to occur.

csCustomPaint	The control is processing custom paint messages.

csDestroyingHandle	The control’s window is being destroyed.

csDocking	The control is being docked.

The flags in ControlState are specific to controls, and augment the state flags in the ComponentState property.

ControlState is primarily used by component writers in the implementation of components derived from TControl.


TControl.ControlStyle
 VCL Reference

TControl.ControlStyle

TControl	See also

Determines style characteristics of the control.

type TControlStyle = set of (csAcceptsControls, csCaptureMouse, csDesignInteractive, csClickEvents, csFramed, csSetCaption, csOpaque, csDoubleClicks, csFixedWidth, csFixedHeight, csNoDesignVisible, csReplicatable, csNoStdEvents, csDisplayDragImage, csReflector, csActionClient, csMenuEvents);

property ControlStyle: TControlStyle;

Description

Use ControlStyle to determine various attributes of the control, such as whether the control can capture the mouse or has a fixed size. The ControlStyle property contains a set of style flags indicating these attributes. The following table lists the flags and their meanings:

Flag	Meaning

csAcceptsControls	The control becomes the parent of any controls dropped on it at design time.

csCaptureMouse	The control captures mouse events when it is clicked.

csDesignInteractive	The control maps right mouse-button clicks at design time into left-button clicks to manipulate the control.

csClickEvents	The control can receive and respond to mouse clicks.

csFramed	The control has a 3D frame.

csSetCaption	The control’s Caption should match the Name property if it has not been explicitly set to something else.

csOpaque	The control completely fills its client rectangle.

csDoubleClicks	The control can receive and respond to double-click messages. Otherwise, map double-clicks into clicks.

csFixedWidth	The width of the control does not vary or scale.

csFixedHeight	The height of the control does not vary or scale.

csNoDesignVisible	The control is not visible at design time.

csReplicatable	The control can be copied using the PaintTo method to draw its image to an arbitrary canvas.

csNoStdEvents	Standard events such as mouse, key, and click events are ignored. This flag allows an application to run faster when there is no need respond to these events.

csDisplayDragImage	If some control that has an associated drag image list is dragged across a control with this setting, then the image list is used to enhance the drag cursor while the cursor is over it. Otherwise, the drag cursor is used on its own.

csReflector	The control responds to Windows dialog messages, focus messages, or size change messages. Use this setting if the control can be used as an ActiveX control, so that it receives notification of these events.

csActionClient	The control is linked to an action object. This flag is set when the Action property is set, and cleared if the Action property is cleared.

csMenuEvents	The control responds to system menu commands.

ControlStyle describes all controls instantiated from a given class. ControlStyle should not be modified at run time, except in the constructor. The ControlState property records transient conditions.

The TControl constructor initializes ControlStyle to [csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks].

ControlStyle is primarily used by component writers when implementing components derived from TControl.


TControl.Cursor
 VCL Reference

TControl.Cursor

TControl	See also	Example

Specifies the image used to represent the mouse pointer when it passes into the region covered by the control.

property Cursor: TCursor;

Description

Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control. The value of Cursor is the index of the cursor in the list of cursors maintained by the global variable, Screen. In addition to the built-in cursors provided by TScreen, applications can add custom cursors to the list.


TControl.DesktopFont
 VCL Reference

TControl.DesktopFont

TControl	See also

Specifies whether the control uses the Windows icon font when writing text.

property DesktopFont: Boolean;

Description

Set DesktopFont to true to specify that the control should use the Windows icon font for its Font property. The Windows icon font is the value of the IconFont property of the global Screen variable.

When DesktopFont is true, the control’s Font property updates every time the Windows icon font changes. This font can be changed by setting the IconFont property of the global Screen variable, or by the actions of other programs. Setting the Font property to Screen.IconFont does not allow controls to dynamically respond in this manner when the Windows icon font changes.


TControl.DockOrientation
 VCL Reference

TControl.DockOrientation

TControl

Specifies how the control is docked relative to other controls docked in the same parent.

property DockOrientation: TDockOrientation;

Description

Use DockOrientation to determine the position of the control relative to other controls docked to the same parent. Docking zones can be arranged from left to right or from top to bottom.


TControl.DragCursor
 VCL Reference

TControl.DragCursor

TControl	See also

Indicates the image used to represent the mouse pointer when the control is being dragged.

property DragCursor: TCursor;

Description

Use the DragCursor property to change the cursor image presented when the control is being dragged.

Note:	To learn how to make a custom cursor available for the DragCursor property, see the Cursor property.


TControl.DragKind
 VCL Reference

TControl.DragKind

TControl	See also

Specifies whether the control is being dragged normally or for docking.

property DragKind: TDragKind;

Description

Use DragKind to get or set whether the control participates in drag-and-drop operations, or drag-and-dock operations.


TControl.DragMode
 VCL Reference

TControl.DragMode

TControl	See also

Determines how the control initiates drag-and-drop or drag-and-dock operations.

property DragMode: TDragMode;

Description

Use DragMode to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at runtime by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic.


TControl.Enabled
 VCL Reference

TControl.Enabled

TControl	See also

Controls whether the control responds to mouse, keyboard, and timer events.

property Enabled: Boolean;

Description

Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to false. Disabled controls appear dimmed. If Enabled is false, the control ignores mouse, keyboard, and timer events.

To re-enable a control, set Enabled to true. The control is no longer dimmed, and the user can use the control.


TControl.Floating
 VCL Reference

TControl.Floating

TControl	See also

Indicates whether the control is floating.

property Floating: Boolean;

Description

Read Floating to determine whether a dockable control appears in a floating window, rather than docked to a parent control.

Note:	Use Floating rather than the Parent property to determine whether a control is free-floating. Floating controls may have a non-nil parent if the FloatingDockSiteClass specifies a floating window type.


TControl.FloatingDockSiteClass
 VCL Reference

TControl.FloatingDockSiteClass

TControl	See also

Specifies the class of the temporary control that hosts the control when it is floating.

type TWinControlClass = class of TWinControl;

property FloatingDockSiteClass: TWinControlClass;

Description

Use FloatingDockSiteClass to specify the class that houses the control when it is floating. This class must be a descendant of TWinControl. By default, it is TCustomDockForm. When the control is undocked, a temporary control of this type is created and the control is docked to that control. When the control is docked to another control, the temporary floating dock site is freed.

If the control can float as a stand-alone window, FloatingDockSiteClass is nil.


TControl.Font
 VCL Reference

TControl.Font

TControl	See also	Example

Controls the attributes of text written on or in the control.

property Font: TFont;

Description

To change to a new font, specify a new TFont object. To modify a font, change the value of the Charset, Color, Height, Name, Pitch, Size, or Style of the TFont object.


TControl.Height
 VCL Reference

TControl.Height

TControl	See also	Example

Specifies the vertical size of the control in pixels.

property Height: Integer;

Description

Use the Height property to read or change the height of the control.


TControl.HelpContext
 VCL Reference

TControl.HelpContext

TControl	See also

Numeric ID for control’s context-sensitive help topic

property HelpContext: THelpContext;

Description

HelpContext supports help systems that use numeric topic IDs. For help systems that use topic keywords, see HelpKeyword.

To enable context-sensitive help for a control, set HelpType to htContext and set HelpContext to a numeric topic ID. A topic ID of 0 (default) means that no help topic is provided for the control.


TControl.HelpKeyword
 VCL Reference

TControl.HelpKeyword

TControl	See also

Keyword for control’s context-sensitive help topic

property HelpKeyword: String;

Description

HelpKeyword supports help systems that use topic keywords. For help systems that use numeric topic IDs, see HelpContext.

To enable context-sensitive help for a control, set HelpType to htKeyword and set HelpKeyword to a keyword string. No keyword (zero-length string; default) means that no help topic is provided for the control.


TControl.HelpType
 VCL Reference

TControl.HelpType

TControl

Indicates whether the control’s context sensitive help topic is identified by context ID or by keyword.

property HelpType: THelpType;

Description

Set HelpType to specify whether the control identifies its context-sensitive help topic by ID or keyword. When HelpType is htContext, the HelpContext property identifies the control’s help topic. When HelpType is htKeyword, the HelpKeyWord property identifies the control’s help topic.


TControl.Hint
 VCL Reference

TControl.Hint

TControl	See also	Example

Contains the text string that can appear when the user moves the mouse over the control.

property Hint: string;

Description

Use the Hint property to provide a string of help text either as a Help Hint, or as help text on a particular location such as a status bar.

A Help Hint is a box containing help text that appears for a control when the user moves the mouse pointer over the control and pauses momentarily. To set up Help Hints:

Specify the Hint property of each control for which a Help Hint should appear.

Set the ShowHint property of each appropriate control to true, or set the ParentShowHint property of all controls to true and set the ShowHint property of the form to true.

At runtime, set the value of the application's ShowHint property to true.

To show the Hint on a status bar or other location, use the OnHint event handler of the application. The application’s OnHint event occurs when the mouse pointer moves over the control.

Specify a hint to be used for both a Help Hint box and by an OnHint handler by specifying two values separated by a | character (the vertical bar “or” symbol). For example,

Edit1.Hint := 'Name|Enter Name in the edit box';

The 'Name' part appears in the Help Hint box and the 'Enter full name in the edit box' part can be extracted using the GetLongHint function for use in an OnHint event handler.

If Hint contains only one value, the entire string is used as a Help Hint and returned by the GetLongHint function. If a control has no Hint value specified, but its parent control does, the control uses the Hint value of the parent control (as long as the control's ShowHint property is true).

Note:	If the application's ShowHint property is false, the Help Hint does not appear, but the OnHint event handler is still called.


TControl.HostDockSite
 VCL Reference

TControl.HostDockSite

TControl	See also

Specifies the control in which the control is docked.

property HostDockSite: TWinControl;

Description

Read HostDockSite to access the windowed control to which the control is docked. If the control is floating, HostDockSite is a temporary control of type FloatingDockSiteClass or (if there is no floating dock site class) nil.

Most applications should use the ManualDock method rather than setting HostDockSite. Setting HostDockSite automatically undocks the control from its previous host (if any) and docks it to the specified control, but does not adjust the control’s position and alignment and bypasses the standard docking events.

For dock clients, the value of HostDockSite is the same as the value of Parent. For controls that are not docking clients, HostDockSite is nil while Parent specifies the containing control.


TControl.IsControl
 VCL Reference

TControl.IsControl

TControl	See also

Determines whether a form stores its form-specific properties to a stream.

property IsControl: Boolean;

Description

Use IsControl to use a form as a complex control, rather than as a desktop form. IsControl affects the way the form gets saved. When IsControl is true, form-specific properties do not get saved with the form. When IsControl is false, the form-specific properties get saved along with the other properties.

IsControl permits you to use the forms designer to create complex controls by creating those controls as forms, placing and naming their contained controls, and attaching code to events. After saving the form, edit the form as text, and in the text version set IsControl to true. The next time the form is loaded and saved, only those form properties appropriate to use as a control are stored, not the properties specific to TForm. Next, edit the form file as text, changing the type of the component from TForm to the desired control type, such as TPanel.


TControl.Left
 VCL Reference

TControl.Left

TControl	See also	Example

Specifies the horizontal coordinate of the left edge of a component relative to its parent.

property Left: Integer;

Description

Use the Left property to determine where the left side of the control begins or to reposition the left side of the control.

If the control is contained in another control, the Left and Top properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the Left property is relative to the screen in pixels.


TControl.LRDockWidth
 VCL Reference

TControl.LRDockWidth

TControl	See also

Specifies the width of the control when it is docked horizontally.

property LRDockWidth: Integer;

Description

Read LRDockWidth to get the width of the control from the last time it was docked horizontally. Set LRDockWidth to indicate the width the control should have the next time it is docked horizontally.

LRDockWidth allows a control to “remember” its docked size even when its width changes because it is undocked or docked with a vertical orientation.


TControl.MouseCapture
 VCL Reference

TControl.MouseCapture

TControl	See also

Indicates whether the control has "captured" mouse events.

property MouseCapture: Boolean;

Description

Use MouseCapture to determine whether a control has captured the mouse. When a control captures the mouse, all subsequent mouse events go to that control until the user releases the mouse button.

A control captures the mouse when the user drags an item from it. In addition, if the control has the csCaptureMouse flag set in its ControlStyle property, it captures the mouse when the user presses the left mouse button over it, until the user releases the mouse button.


TControl.Name
 VCL Reference

TControl.Name

TControl	See also

Specifies the name of the control as referenced in code.

property Name: TComponentName;

Description

Use the Name property to assign a new name to the control or to find out what the name of the control is.

By default, the IDE assigns sequential names based on the type of the control, such as 'Button1', 'Button2', and so on. Change these to more meaningful names that make the application’s code more readable. The Name must be a valid Object Pascal identifier.

If the control’s Caption has not already been modified, Caption is changed to match a new control name.

Warning:	Do not change the Name property except at design time. Run time errors may result.


TControl.Parent
 VCL Reference

TControl.Parent

TControl	See also	Example

Indicates the parent of the control.

property Parent: TWinControl;

Description

Use the Parent property to get or set the parent of this control. The parent of a control is the control that contains the control. For example, if an application includes three radio buttons in a group box, the group box is the parent of the three radio buttons, and the radio buttons are the child controls of the group box.

To serve as a parent, a control must be an instance of a descendent of TWinControl.

When creating a new control at runtime, assign a Parent property value for the new control. Usually, this is a form, panel, group box, or some control that is designed to contain another. Changing the parent of a control moves the control onscreen so that it is displayed within the new parent. When the parent control moves, the child moves with the parent.

Some controls (such as ActiveX controls) are contained in native windows rather than in a parent VCL control. For these controls, the value of Parent is nil and the ParentWindow property specifies the window.

Note:	The Parent property declared in TControl is similar to the Owner property declared in TComponent, in that the Parent of a control frees the control just as the Owner of a component frees that Component. However, the Parent of a control is always a windowed control that visually contains the control, and is responsible for writing the control to a stream when the form is saved. The Owner of a component is the component that was passed as a parameter in the constructor and, if assigned, initiates the process of saving all objects (including the control and its parent) when the form is saved.


TControl.ParentBiDiMode
 VCL Reference

TControl.ParentBiDiMode

TControl	See also

Specifies whether the control uses its parent’s BiDiMode.

property ParentBiDiMode: Boolean;

Description

Use ParentBiDiMode to get or set whether the control uses its parent’s BiDiMode. When ParentBiDiMode is true, the control’s BiDiMode property is always equal to that of its parent. If ParentBiDiMode is false, the control uses its own BiDiMode property.

Set ParentBiDiMode to true for all controls in a form in order to ensure that the entire user interface adjusts to Middle Eastern locales in a uniform manner.

When the value of the control's BiDiMode property changes, ParentBiDiMode becomes false automatically.


TControl.ParentColor
 VCL Reference

TControl.ParentColor

TControl	See also

Determines where a control looks for its color information.

property ParentColor: Boolean;

Description

To have a control use the same color as its parent control, set ParentColor to true If ParentColor is false the control uses its own Color property.

Set ParentColor to true for all controls in order to ensure that all the controls on a form have a uniform appearance. For example, if ParentColor is true for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background.

When the value of a control's Color property changes, ParentColor becomes false automatically.


TControl.ParentFont
 VCL Reference

TControl.ParentFont

TControl	See also

Determines where a control looks for its font information.

property ParentFont: Boolean;

Description

To have a control use the same font as its parent control, set ParentFont to true If ParentFont is false the control uses its own Font property.

Set ParentFont to true for all controls in order to ensure that all the controls on a form have a uniform appearance. For example, if ParentFont is true for all controls in a form, changing the form’s Font property to 12-point Courier causes all controls on the form to use that font.

When the value of a control's Font property changes, ParentFont becomes false automatically.

When ParentFont is true for a form, the form uses the default font.


TControl.ParentShowHint
 VCL Reference

TControl.ParentShowHint

TControl	See also

Determines where a control looks to find out if its Help Hint should be shown.

property ParentShowHint: Boolean;

Description

Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them.

If ParentShowHint is true, the control uses the ShowHint property value of its parent. If ParentShowHint is false, the control uses the value of its own ShowHint property.

To provide Help Hints for only selected controls on a form, set the ShowHint property for those controls that should have Help Hints to true, and ParentShowHint becomes false automatically.

Note:	Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.


TControl.PopupMenu
 VCL Reference

TControl.PopupMenu

TControl	See also 	Example

Identifies the pop-up menu associated with the control.

property PopupMenu: TPopupMenu;

Description

Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the TPopupMenu’s AutoPopup property is True, the pop-up menu appears automatically. If the menu’s AutoPopup property is False, display the menu with a call to its Popup method from the control’s OnContextPopup event handler.


TControl.ScalingFlags
 VCL Reference

TControl.ScalingFlags

TControl	See also

Reflects which attributes of the control have been scaled.

type TScalingFlags = set of (sfLeft, sfTop, sfWidth, sfHeight, sfFont, sfDesignSize);

property ScalingFlags: TScalingFlags;

Description

ScalingFlags is an internal set of flags used primarily in scaling inherited forms and their controls. Applications should not use this property without a serious need.

These are the flags and their meanings:

Flag	Meaning

sfLeft	Left side of control not yet scaled.

sfTop	Top of control not yet scaled.

sfWidth	Width of control not yet scaled.

sfHeight	Height of control not yet scaled.

sfFont	Font of control not yet scaled.

sfDesignSize	Design-time dimensions of control not yet scaled.


TControl.ShowHint
 VCL Reference

TControl.ShowHint

TControl	See also 	Example

Determines whether the control displays a Help Hint when the mouse pointer rests momentarily on the control.

property ShowHint: Boolean;

Description

The Help Hint is the value of the Hint property, which is displayed in a box just beneath the control. Use ShowHint to determine whether a Help Hint appears for the control.

To enable Help Hint for a particular control, the application ShowHint property must be true and either

the control’s own ShowHint property must be true, or

the control’s ParentShowHint property must be true and its parent's ShowHint property must be true.

For example, imagine a check box within a group box. If the ShowHint property of the group box is true and the ParentShowHint property of the check box is true, but the ShowHint property of the check box is false, the check box still displays its Help Hint.

Changing the ShowHint value automatically sets the ParentShowHint property to false.


TControl.TBDockHeight
 VCL Reference

TControl.TBDockHeight

TControl	See also

Specifies the height of the control when it is docked vertically.

property TBDockHeight: Integer;

Description

Read TBDockHeight to get the height of the control from the last time it was docked vertically. Set TBDockHeight to indicate the height the control should have the next time it is docked vertically.

TBDockHeight allows a control to “remember” its docked size even when its height changes because it is undocked or docked with a horizontal orientation.


TControl.Text
 VCL Reference

TControl.Text

TControl	See also 	Example

Contains a text string associated with the control.

property Text: TCaption;

Description

Use the Text property to read the Text of the control or specify a new string for the Text value. By default, Text is the control name. For edit controls and memos, the Text appears within the control. For combo boxes, the Text is the content of the edit control portion of the combo box.

Note:	Controls that display text use either the Caption property or the Text property to specify the text value. Which property is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control.


TControl.Top
 VCL Reference

TControl.Top

TControl	See also	Example

Specifies the Y coordinate of the top left corner of a control, relative to its parent or containing control in pixels.

property Top: Integer;

Description

Use Top to locate the top of the control or reposition the control to a different Y coordinate. The Top property, like the Left property, is the position of the control relative to its container. Thus, if a control is contained in a TPanel, the Left and Top properties are relative to the panel. If the control is contained directly by the form, it is relative to the form. For forms, the value of the Top property is relative to the screen in pixels.


TControl.UndockHeight
 VCL Reference

TControl.UndockHeight

TControl	See also

Specifies the height of the control when it is floating.

property UndockHeight: Integer;

Description

Read UndockHeight to get the height of the control from the last time it was floating. Set UndockHeight to indicate the height the control should have the next time it is undocked.

UndockHeight allows a control to “remember” its floating size even when its height changes because it is docked.


TControl.UndockWidth
 VCL Reference

TControl.UndockWidth

TControl	See also

Specifies the width of the control when it is floating.

property UndockWidth: Integer;

Description

Read UndockWidth to get the width of the control from the last time it was floating. Set UndockWidth to indicate the width the control should have the next time it is undocked.

UndockWidth allows a control to “remember” its floating size even when its width changes because it is docked.


TControl.Visible
 VCL Reference

TControl.Visible

TControl	See also	Example

Determines whether the component appears onscreen.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of the control at runtime. If Visible is true, the control appears. If Visible is false, the control is not visible.

Calling the Show method sets the control's Visible property to true. Calling the Hide method sets it to false.


TControl.Width
 VCL Reference

TControl.Width

TControl	See also

Specifies the horizontal size of the control or form in pixels.

property Width: Integer;

Description

Use the Width property to read or change the width of the control.

Note:	For tab sheet controls, changing this property at runtime has no effect.


TControl.WheelAccumulator
 VCL Reference

TControl.WheelAccumulator

TControl	See also

Accumulates mouse wheel rotations.

property WheelAccumulator: Integer;

Description

WheelAccumulator returns a value indicating the progress of event handlers in response to mouse wheel motion. See DoMouseWheel for more information.


TControl.WindowProc
 VCL Reference

TControl.WindowProc

TControl	See also	Example

Points to the window procedure that responds to messages sent to the control.

property WindowProc: TWndMethod;

Description

Use the WindowProc property to temporarily replace or subclass the window procedure of the control. Component writers that are customizing the window procedure for a descendant class should override the WndProc method instead.

Before assigning a new value to WindowProc, store the original value. WindowProc is initially set to the WndProc method, so if the value has not been changed since then, the original value need not be stored. Within the procedure that is used as the new value for WindowProc, pass any unhandled messages to the original procedure that was the value of WindowProc. After completing any specialized message handling, restore the value of WindowProc to the original procedure.


TControl.WindowText
 VCL Reference

TControl.WindowText

TControl	See also

Contains the text string of the control.

property WindowText: PChar;

Description

Use WindowText to determine the text associated with the control. When setting WindowText, the control frees the memory associated with the previous value of WindowText before assigning a new value. Any memory associated with WindowText is freed when the control is destroyed. By default, WindowText is the same string as the Text property. Descendants of TControl can override the Text property to implement a different value.

For an edit box, the WindowText is the content of the control. For a combo box, the text string is the content of the edit box part of the combo box. For a button, the string is the button name. For all other controls, the string is the window title.


 VCL Reference

TControl Events

TControl	Alphabetically	Legend

In TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TControl Events

TControl	By Object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag


TControl.OnCanResize
 VCL Reference

TControl.OnCanResize

TControl	See also

Occurs when an attempt is made to resize the control.

property OnCanResize: TCanResizeEvent;

Description

Use OnCanResize to adjust the way a control is resized. If necessary, change the new width and height of the control in the OnCanResize event handler. The OnCanResize event handler also allows applications to indicate that the entire resize should be aborted.

If there is no OnCanResize event handler, or if the OnCanResize event handler indicates that the resize attempt can proceed, the OnCanResize event is followed immediately by an OnConstrainedResize event.


TControl.OnClick
 VCL Reference

TControl.OnClick

TControl	See also	Example

Occurs when the user clicks the control.

property OnClick: TNotifyEvent;

Description

Use the OnClick event handler to respond when the user clicks the control. If the control has an associated action, and that action has an OnExecute method, the action’s OnExecute method responds to click events unless it is superseded by an OnClick event handler.

Usually OnClick occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when

The user selects an item in a grid, outline, list, or combo box by pressing an arrow key.

The user presses Spacebar while a button or check box has focus.

The user presses Enter when the active form has a default button (specified by the Default property).

The user presses Esc when the active form has a cancel button (specified by the Cancel property).

The user presses the accelerator key for a button or check box. For example, if the value of the Caption property of a check box is '&Bold', the B is underlined at runtime and the OnClick event of the check box is triggered when the user presses Alt+B.

The Checked property of a radio button is set to True

The value of the Checked property of a check box is changed.

The Click method of a menu item is called.

For a form, an OnClick event occurs when the user clicks a blank area of the form or on a disabled component.


TControl.OnConstrainedResize
 VCL Reference

TControl.OnConstrainedResize

TControl	See also

Adjust resize constraints.

property OnConstrainedResize: TConstrainedResizeEvent;

Description

Use OnConstrainedResize to adjust a control’s constraints when an attempt is made to resize it. Upon entry to the OnConstrainedResize event handler, the parameters of the event handler are set to the corresponding properties of the control’s Constraints object. The event handler can adjust those values before they are applied to the new height and width that is being applied to the control. (The CanAutoSize method or an OnCanResize event handler may already have adjusted this new height and width).

On exit from the OnConstrainedResize event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control’s height and width are changed. After the control’s height and width change, an OnResize event occurs to allow any final adjustments or responses.

Note	The OnConstrainedResize handler is called immediately after the OnCanResize handler.


TControl.OnContextPopup
 VCL Reference

TControl.OnContextPopup

TControl	See also

Occurs when the user right-clicks the control or otherwise invokes the popup menu (such as using the keyboard).

type TContextPopupEvent = procedure(Sender: TObject; MousePos: TPoint, var Handled: Boolean) of object;

property OnContextPopup: TContextPopupEvent;

Description

The OnContextPopup handler is called when the user uses the mouse or keyboard to request a popup menu. The OnContextPopup event is generated by a WM_CONTEXTMENU message, which is itself generated by the user clicking the right mouse button or by pressing SHIFT+F10 or the Applications key.

This event is especially useful when the control does not have an associated popup menu (the PopupMenu property is not set) or if the AutoPopup property of the control’s associated popup menu is false. However, the OnContextPopup can also be used to override the automatic context menu that appears when the control has an associated popup menu with an AutoPopup property of true. In this last case, if the event handler displays its own menu, it should set the Handled parameter to true to suppress the default context menu.

The handler’s MousePos parameter indicates the position of the mouse, in client coordinates.. If the event was not generated by a mouse click, MousePos is (-1,-1).

Note:	Parent controls receive an OnContextPopup event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an OnContextPopup event after the child control. As a result, when parent controls do not set Handled to true in an OnContextPopup event handler, the event handler may be called multiple times for each context menu invocation.


TControl.OnDblClick
 VCL Reference

TControl.OnDblClick

TControl	See also

Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control.

property OnDblClick: TNotifyEvent;

Description

Use the OnDblClick event to respond to mouse double-clicks.


TControl.OnDragDrop
 VCL Reference

TControl.OnDragDrop

TControl	See also 	Example

Occurs when the user drops an object being dragged.

type TDragDropEvent = procedure(Sender, Source: TObject; X, Y: Integer) of object;

property OnDragDrop: TDragDropEvent;

Description

Use the OnDragDrop event handler to specify what happens when the user drops an object. The Source parameter of the OnDragDrop event is the object being dropped, and the Sender is the control the object is being dropped on. The X and Y parameters are the coordinates of the mouse positioned over the control.


TControl.OnDragOver
 VCL Reference

TControl.OnDragOver

TControl	See also 	Example

Occurs when the user drags an object over a control.

type

  TDragOverEvent = procedure(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean) of object;

property OnDragOver: TDragOverEvent;

Description

Use an OnDragOver event to signal that the control can accept a dragged object so the user can drop or dock it.

Within the OnDragOver event handler, change the Accept parameter to false to reject the dragged object. Leave Accept as true to allow the user to drop or dock the dragged object on the control.

To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the DragCursor property for the control before the OnDragOver event occurs.

The Source is the object being dragged, the Sender is the potential drop or dock site, and X and Y are screen coordinates in pixels. The State parameter specifies how the dragged object is moving over the control.

Note:	Within the OnDragOver event handler, the Accept parameter defaults to true. However, if an OnDragOver event handler is not supplied, the control rejects the dragged object, as if the Accept parameter were changed to false.


TControl.OnEndDock
 VCL Reference

TControl.OnEndDock

TControl	See also

Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging.

property OnEndDock: TEndDragEvent;

Description

Use OnEndDock to specify actions or special processing that when a drag-and-dock operation stops.


TControl.OnEndDrag
 VCL Reference

TControl.OnEndDrag

TControl	See also 	Example

Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging.

property OnEndDrag: TEndDragEvent;

Description

Use the OnEndDrag event handler to specify any special processing that occurs when dragging stops.


TControl.OnMouseDown
 VCL Reference

TControl.OnMouseDown

TControl	See also	Example

Occurs when the user presses a mouse button with the mouse pointer over a control.

type TMouseEvent = procedure (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object;

property OnMouseDown: TMouseEvent;

Description

Use the OnMouseDown event handler to implement any special processing that should occur as a result of pressing a mouse button.

The OnMouseDown event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. Shift keys are the Shift, Ctrl, and Alt keys. X and Y are the pixel coordinates of the mouse pointer in the client area of the Sender.


TControl.OnMouseMove
 VCL Reference

TControl.OnMouseMove

TControl	See also	Example

Occurs when the user moves the mouse pointer while the mouse pointer is over a control.

type TMouseMoveEvent = procedure(Sender: TObject; Shift: TShiftState; X, Y: Integer) of object;

property OnMouseMove: TMouseMoveEvent;

Description

Use the OnMouseMove event handler to respond when the mouse pointer moves after the control has captured the mouse.

Use the Shift parameter of the OnMouseDown event handler, to determine to the state of the shift keys and mouse buttons. Shift keys are the Shift, Ctrl, and Alt keys or shift key-mouse button combinations. X and Y are pixel coordinates of the new location of the mouse pointer in the client area of the Sender.


TControl.OnMouseUp
 VCL Reference

TControl.OnMouseUp

TControl	See also	Example

Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component.

type TMouseEvent = procedure (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) of object;

property OnMouseUp: TMouseEvent;

Description

Use an OnMouseUp event handler to implement special processing when the user releases a mouse button.

The OnMouseUp event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. Shift keys are the Shift, Ctrl, and Alt keys. X and Y are the pixel coordinates of the mouse pointer in the client area of the Sender.


TControl.OnMouseWheel
 VCL Reference

TControl.OnMouseWheel

TControl	See also

Occurs when the mouse wheel is rotated.

property OnMouseWheel: TMouseWheelEvent;

Description

Write code in the OnMouseWheel event handler to respond to mouse wheel messages. If there is no OnMouseWheel event handler, or if the mouse wheel message is not handled in the OnMouseWheel event handler, then an OnMouseWheelUp or OnMouseWheelDown event occurs, depending on the direction the mouse wheel was rotated.


TControl.OnMouseWheelDown
 VCL Reference

TControl.OnMouseWheelDown

TControl	See also

Occurs when the mouse wheel is rotated downward.

property OnMouseWheelDown: TMouseWheelUpDownEvent;

Description

Write code in the OnMouseWheelDown event handler to perform actions when the mouse wheel is rotated downward. OnMouserWheelDown occurs only if the message is not already handled in an OnMouseWheel event handler.


TControl.OnMouseWheelUp
 VCL Reference

TControl.OnMouseWheelUp

TControl	See also

Occurs when the mouse wheel is rotated upward.

property OnMouseWheelUp: TMouseWheelUpDownEvent;

Description

Write code in the OnMouseWheelUp event handler to perform actions when the mouse wheel is rotated upward. OnMouserWheelUp occurs only if the message is not already handled in an OnMouseWheel event handler.


TControl.OnResize
 VCL Reference

TControl.OnResize

TControl	See also

Occurs immediately after the control is resized.

property OnResize: TNotifyEvent;

Description

Use OnResize to make any final adjustments after a control is resized.

To modify the way a control responds when an attempt is made to resize it, use OnCanResize or OnConstrainedResize.

Note:	Some controls call this event handler when the control is first created.


TControl.OnStartDock
 VCL Reference

TControl.OnStartDock

TControl	See also

Occurs when the user begins to drag a control with a DragKind of dkDock.

property OnStartDock: TStartDockEvent;

Description

Use the OnStartDock event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control.

The OnStartDock event handler can create a TDragDockObjectEx object for the DragObject parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return TDragDockObjectEx as the drag object, there is no need to call the Free method for the DragObject when dragging is over. If you use TDragDockObject, your application is responsible for freeing the drag object.

If the OnStartDock event handler sets the DragObject parameter to nil, a TDragDockObject object is automatically created.


TControl.OnStartDrag
 VCL Reference

TControl.OnStartDrag

TControl	See also

Occurs when the user begins to drag the control or an object it contains by left-clicking on the control and holding the mouse button down.

type TStartDragEvent = procedure (Sender: TObject; var DragObject: TDragObject) of object;

property OnStartDrag: TStartDragEvent;

Description

Use the OnStartDrag event handler to implement special processing when the user starts to drag the control or an object it contains. OnStartDrag only occurs if DragKind is dkDrag.

Sender is the control that is about to be dragged, or that contains the object about to be dragged.

The OnStartDrag event handler can create a TDragControlObjectEx instance for the DragObject parameter to specify the drag cursor, or, optionally, a drag image list. If you create a TDragControlObjectEx instance, there is no need to call the Free method for the DragObject when dragging is over. If you create, instead, a TDragControlObject instance, your application is responsible for freeing the drag object instance.

If the OnStartDrag event handler sets the DragObject parameter to nil, a TDragControlObject object is automatically created and dragging begins on the control itself.

Note:	On some controls, such as TRichEdit, the underlying Windows control handles internal drag operations. For these controls, there are no OnStartDrag or OnEndDrag events for drag operations within the control.


 VCL Reference

TControl Methods

TControl	Alphabetically	Legend

In TControl

ActionChange

AdjustSize

AssignTo

BeginAutoDrag

BeginDrag

BringToFront

CanAutoSize

CanResize

Changed

ChangeScale

Click

ClientToParent

ClientToScreen

ConstrainedResize

Create

DblClick

DefaultDockImage

DefaultHandler

DefineProperties

Destroy

Dock

DockTrackNoTarget

DoContextPopup

DoDock

DoEndDock

DoEndDrag

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DoStartDock

DoStartDrag

DragCanceled

DragDrop

Dragging

DragOver

DrawDragDockImage

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

EraseDragDockImage

GetActionLinkClass

GetClientOrigin

GetClientRect

GetControlsAlignment

GetDeviceContext

GetDockEdge

GetDragImages

GetEnabled

GetFloating

GetFloatingDockSiteClass

GetPalette

GetParentComponent

GetPopupMenu

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

Loaded

ManualDock

ManualFloat

MouseDown

MouseMove

MouseUp

Notification

PaletteChanged

ParentToClient

Perform

PositionDockRect

ReadState

Refresh

Repaint

ReplaceDockedControl

RequestAlign

Resize

ScreenToClient

SendCancelMode

SendDockNotification

SendToBack

SetBiDiMode

SetBounds

SetDragMode

SetEnabled

SetName

SetParent

SetParentBiDiMode

SetParentComponent

SetTextBuf

SetZOrder

Show

Update

UpdateBoundsRect

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

VisibleChanging

WndProc

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TControl Methods

TControl	By Object	Legend

ActionChange

AdjustSize

AfterConstruction

Assign

AssignTo

BeforeDestruction

BeginAutoDrag

BeginDrag

BringToFront

CanAutoSize

CanResize

Changed

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ConstrainedResize

Create

DblClick

DefaultDockImage

DefaultHandler

DefineProperties

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DockTrackNoTarget

DoContextPopup

DoDock

DoEndDock

DoEndDrag

DoMouseWheel

DoMouseWheelDown

DoMouseWheelUp

DoStartDock

DoStartDrag

DragCanceled

DragDrop

Dragging

DragOver

DrawDragDockImage

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

EraseDragDockImage

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetClientOrigin

GetClientRect

GetControlsAlignment

GetDeviceContext

GetDockEdge

GetDragImages

GetEnabled

GetFloating

GetFloatingDockSiteClass

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPalette

GetParentComponent

GetPopupMenu

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

NewInstance

Notification

PaletteChanged

ParentToClient

Perform

PositionDockRect

ReadState

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

RequestAlign

Resize

SafeCallException

ScreenToClient

SendCancelMode

SendDockNotification

SendToBack

SetBiDiMode

SetBounds

SetDragMode

SetEnabled

SetName

SetParent

SetParentBiDiMode

SetParentComponent

SetSubComponent

SetTextBuf

SetZOrder

Show

Update

UpdateAction

UpdateBoundsRect

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

VisibleChanging

WndProc


TControl.ActionChange
 VCL Reference

TControl.ActionChange

TControl	See also

Responds when the action associated with the control changes.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic;

Description

ActionChange is called automatically when the action object specified by the Action property, or any of its properties, changes. By default, the control’s action link’s OnChange event handler calls ActionChange.

ActionChange updates the control properties that correspond to properties of the associated action. These properties include the Caption, Enabled, Hint, and Visible properties and the OnClick event handler.

The Sender parameter is the action object that changed. The CheckDefaults parameter indicates whether the control’s properties should all be updated or only those that have not been explicitly changed from their default values. When CheckDefaults is true, only those properties and event handlers that have not been changed from the default values are updated.


TControl.AdjustSize
 VCL Reference

TControl.AdjustSize

TControl	See also

Sets the size of the control as determined by the AutoSize property.

procedure AdjustSize; dynamic;

Description

If the AutoSize property is true, AdjustSize is called automatically when the control needs to automatically resize itself to its contents. As implemented in TControl, AdjustSize calls SetBounds with the values of its Left, Top, Width, and Height properties. This call can result in a change of size if these values are altered in the control’s OnCanResize or OnConstrainedResize event handlers, or if the control’s OnResize event handler makes any final adjustments.

Descendant classes override AdjustSize to change the size of the control to adjust to its contents.

Other controls can call AdjustSize after changing the control’s contents. Do not call AdjustSize in application code.


TControl.AssignTo
 VCL Reference

TControl.AssignTo

TControl	See also

Overrides the inherited AssignTo function to enable assignments to TAction objects.

procedure AssignTo(Dest: TPersistent); override;

Description

Do not call the protected AssignTo method in application code. The Assign method of a persistent object calls AssignTo if it is passed the control as a Source and the persistent object does not know how to copy the properties of the control. The Dest parameter is the persistent object that should have its properties copied from the control.

As implemented in TControl, AssignTo checks whether the Dest parameter is a TCustomAction object, and if so, assigns values to its Enabled, Hint, Caption, and Visible properties and its OnExecute event. This allows arbitrary controls to assign these to an associated action object.


TControl.BeginAutoDrag
 VCL Reference

TControl.BeginAutoDrag

TControl	See also

Begin Automatic Drag.

procedure BeginAutoDrag; dynamic;

Description

BeginAutoDrag is called automatically when a user drags a control whose DragMode is dmAutomatic. Do not call BeginAutoDrag in application code.

As implemented in TControl, BeginAutoDrag calls BeginDrag, passing in the global Mouse variable’s DragImmediate and DragThreshold properties.


TControl.BeginDrag
 VCL Reference

TControl.BeginDrag

TControl	See also

Starts the dragging of a control.

procedure BeginDrag(Immediate: Boolean; Threshold: Integer = -1);

Description

Call BeginDrag to start a drag operation. BeginDrag is called in application code only when the value of the control’s DragMode is dmManual. If DragMode is dmAutomatic, BeginDrag is called automatically.

If the Immediate parameter is true, the mouse pointer changes to the value of the DragCursor property and dragging begins immediately. If Immediate is false, the mouse pointer doesn't change to the value of the DragCursor property and dragging doesn't begin until the user moves the mouse pointer the number of pixels specified by the Threshold parameter. If the caller passes a Threshold value less than 0 (such as the default value for this parameter), BeginDrag uses the DragThreshold property of the global Mouse variable.

Setting Immediate to false allows the control to accept mouse clicks without beginning a drag-and-drop or drag-and-dock operation.


TControl.BringToFront
 VCL Reference

TControl.BringToFront

TControl	See also	Example

Puts the control in front of all other controls in its parent control.

procedure BringToFront;

Description

Call BringToFront to ensure that a form is visible or to reorder overlapping controls within a form.

Note that controls that wrap Windows screen objects (control classes descended from TWinControl) always "stack" above lightweight controls (control classes descended from TGraphicControl). BringToFront can force a lightweight control, such as a Shape, to stack above other lightweight controls, but wraped controls, such as an Edit, will still stack above the Shape.

Without BringToFront, controls are stacked in their order they were placed on the form.


TControl.CanAutoSize
 VCL Reference

TControl.CanAutoSize

TControl	See also

Indicates whether the control can resize itself automatically to accommodate its contents.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; virtual;

Description

CanAutoSize is called automatically when the AutoSize property is true and an attempt is made to resize the control. It allows controls to implement the AutoSize property before the resize sequence that begins with the OnCanResize and OnConstrainedResize events and ends with the OnResize event.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the control. CanAutoSize adjusts these values so that the control’s size adjusts to its contents. If the adjustment results in values of NewWidth and NewHeight that differ from the control’s current width and height, CanAutoSize returns true, indicating that the resize sequence should proceed. If, after adjustment, NewWidth and NewHeight equal Width and Height, CanAutoSize returns true, and the resize sequence is aborted.

As implemented in TControl, CanAutoSize always returns true without changing NewWidth or NewHeight. Override CanAutoSize to implement the AutoSize property for a particular control class’s contents.


TControl.CanResize
 VCL Reference

TControl.CanResize

TControl	See also

Generates an OnCanResize event.

function CanResize(var NewWidth, NewHeight: Integer): Boolean;

Description

CanResize is called automatically when an attempt is made to resize the control, after any autosizing has occurred. The NewWidth and NewHeight arguments specify the attempted new values for the control’s height and width. CanResize optionally adjusts the values of NewWidth and NewHeight, and returns true if the control can be resized to the returned values. CanResize returns false if the control cannot be resized.

CanResize generates an OnCanResize event. An OnCanResize event handler may change the values of NewHeight and NewWidth.


TControl.Changed
 VCL Reference

TControl.Changed

TControl	See also

Sends a CM_CHANGED message to the control.

procedure Changed;

Description

Call Changed after changing the properties of the control in a way that affects the properties of a parent object. Changed sends a CM_CHANGED message back to the control. If the control is a windowed control, this message is bubbled up to the parent so that it can make any necessary adjustments.


TControl.ChangeScale
 VCL Reference

TControl.ChangeScale

TControl	See also

Repositions and resizes the control by a specified ratio.

procedure ChangeScale(M, D: Integer); dynamic;

Description

Use ChangeScale to rescale a control. ChangeScale modifies the position as well as the size of a control. Thus, ChangeScale modifies the control’s Top, Left, Width, and Height properties.

The M and D parameters define a fraction by which to scale the control. The M parameter is the multiplier and the D parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of M as 3, and the value of D as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%.

To scale the control to be 33% larger than its previous size, specify the value of M as 133, and the value of D as 100 (133/100). Alternately, specify the value of M as 4, and the value of D as 3 (4/3), as the fraction 133/100 is approximately equal to 4/3.

Descendants of TControl may override ChangeScale. For example, a control that defines additional font properties should scale the heights of these fonts by the M/D ratio so that all the control’s fonts scale uniformly. Similarly, any control that subdivides its client area into display regions and displays text in those regions should override ChangeScale to ensure those regions resize when the font does.

Note:	Because control sizes and coordinates are integers, scaling can result in roundoff error. Repeated calls to ChangeScale can make the control gradually shrink away or creep off the form. Consider destroying and reloading the form after several rescalings.


TControl.Click
 VCL Reference

TControl.Click

TControl	See also

Respond to user click.

procedure Click; dynamic;

Description

Click is called automatically when the user left-clicks the control. Component or application code can call Click to simulate a user mouse click. This is often done in menu actions and hotkey handlers.

As implemented in TControl, Click queries whether the OnClick event handler exists and is different from the OnExecute handler for the control’s Action. If this is true, the OnClick event handler is called. If this is false, and the Action OnExecute event handler exists, the Action’s Execute method is called. Override Click to provide additional behavior.


TControl.ClientToParent
 VCL Reference

TControl.ClientToParent

TControl	See also

Translates client coordinates to parent coordinates.

function ClientToParent(const Point: TPoint; AParent: TWinControl = nil): TPoint;

Description

ClientToParent translates Point from the current control’s coordinate system to AParent’s coordinate system. AParent must be a control that can be found by iterating up the chain of Parent properties. If AParent is nil, the control’s immediate parent is used.

An EInvalidOperation exception is thrown if AParent is not an ancestor control or the Parent property is nil.


TControl.ClientToScreen
 VCL Reference

TControl.ClientToScreen

TControl	See also

Translates a given point from client area coordinates to global screen coordinates.

function ClientToScreen(const Point: TPoint): TPoint;

Description

Use ClientToScreen to convert a point whose coordinates are expressed locally to the control to the corresponding point in screen coordinates. In client area coordinates (0, 0) corresponds to the upper left corner of the control's client area. In screen coordinates (0, 0) corresponds to the upper left corner of the screen.

Use ScreenToClient along with ClientToScreen to convert from one control's coordinate system to another control's coordinate system. For example,

P := TargetControl.ScreenToClient(SourceControl.ClientToScreen(P));

converts P from coordinates in SourceControl to coordinates in TargetControl.


TControl.ConstrainedResize
 VCL Reference

TControl.ConstrainedResize

TControl	See also

Notify control of resize with constraints.

procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); virtual;

Description

ConstrainedResize is called automatically when a control is resized and has nonzero Constraints. This allows the control to modify the constraints before they are applied.

As implemented in TControl, ConstrainedResize simply calls the OnConstrainedResize event handler.


TControl.Create
 VCL Reference

TControl.Create

TControl	See also	Example

Creates an instance of TControl.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TControl. However, you should never attempt to instantiate a TControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

Create calls the parent constructor and initializes the control. Initialization including the following property settings:

Set Visible, Enabled, ParentBiDiMode, ParentColor, ParentFont, and ParentShowHint to true.

Set IsControl to false.

Set Font to a newly-created TFont object. The OnChange handler for that object isFontChanged.

Set Constraints to a newly-created TSizeConstraints object. The OnChange handler for that object is DoConstraintsChange.

Set ControlStyle to [csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks].

Set Anchors to [akLeft, akTop].

Set Color to clWindow

Set DragCursor to to crDrag.

Set FloatingDockSiteClass to TCustomDockForm

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a control's constructor allocates resources or memory, also override the destructor to free those resources.


TControl.DblClick
 VCL Reference

TControl.DblClick

TControl	See also

Generates an OnDblClick event.

procedure DblClick; dynamic;

Description

DblClick calls any event handler attached to the OnDblClick event. Override DblClick to provide other responses in addition to the inherited event-handler call when the user double-clicks the control.

The DblClick method is triggered by left-button double-click message (WM_LBUTTONDBLCLK) from Windows.


TControl.DefaultDockImage
 VCL Reference

TControl.DefaultDockImage

TControl	See also

Handles the painting and erasing of a dock image.

procedure DefaultDockImage(DragDockObject: TDragDockObject; Erase: Boolean); dynamic;

Description

The DrawDragDockImage and EraseDragDockImage methods call DefaultDockImage to paint or erase the drag image of a control while the user drags it in a drag-and-dock operation.

DragDockObject contains the drag-and-dock information for the control.

Erase specifies whether to draw or erase the image.


TControl.DefaultHandler
 VCL Reference

TControl.DefaultHandler

TControl	See also

Provides message handling for all messages that do not have specific handlers.

procedure DefaultHandler(var Message); override;

Description

Override DefaultHandler to extend the default handling of messages. DefaultHandler is the final opportunity for component writers to handle messages to controls. The method referenced by WindowProc provides the first opportunity. Individual message methods such as Click provide additional opportunities.

DefaultHandler handles the messages Windows sends to manage the control's text: WM_GETTEXT, WM_SETTEXT, and WM_GETTEXTLENGTH.


TControl.DefineProperties
 VCL Reference

TControl.DefineProperties

TControl	See also

Provides methods to read and write the IsControl property to a stream such as a form file.

procedure DefineProperties(Filer: TFiler); override;

Description

DefineProperties is called automatically by the streaming system that loads and saves VCL components. It allows persistent objects to read and write properties that are not published. Published properties are loaded and stored automatically.

DefineProperties uses the methods of the filer passed as the Filer parameter to assign methods that can load and save the IsControl property.

Override DefineProperties to persist unpublished properties. Call the DefineBinaryProperty or DefineProperty method of the Filer parameter to assign methods that load or save property values.

Note:	When overriding this method, call the inheritedparent class’s DefineProperties method first.


TControl.Destroy
 VCL Reference

TControl.Destroy

TControl	See also

Destroys an instance of TControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the control is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TFont object in its Font property.

Calls its inherited destructor.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TControl.Dock
 VCL Reference

TControl.Dock

TControl	See also

Used internally to dock the control.

procedure Dock (NewDockSite: TWinControl; ARect: TRect); dynamic;

Description

Do not call Dock. It is called automatically to implement many of the details of docking the control to a dock site.

To dock the control programmatically, use ManualDock instead.

The NewDockSite parameter specifies the docking site to which the control is being docked. The ARect parameter indicates the new dimensions of the control when it is docked to NewDockSite.


TControl.DockTrackNoTarget
 VCL Reference

TControl.DockTrackNoTarget

TControl	See also

Handles dragging of the control over an invalid docking target.

procedure DockTrackNoTarget(Source: TDragDockObject; X, Y: Integer); dynamic;

Description

DockTrackNoTarget is called automatically when the control is dragged over an invalid docking target. It updates the docking rectangle of the TDragDockObject specified by Source to reflect the current mouse coordinates, as given by X and Y.


TControl.DoContextPopup
 VCL Reference

TControl.DoContextPopup

TControl	See also

Generates an OnContextPopup event.

procedure DoContextPopup(MousePos: TPoint; var Handled: Boolean); dynamic;

Description

OnContextPopup calls any event handler attached to the OnContextPopup event. When creating a component that descends from TControl, override OnContextPopup to provide other responses in addition to the inherited event-handler call when the user invokes the control’s context menu.

MousePos indicates the position where the user right-clicked the control. If the user invoked the context menu using the keyboard, MousePos is (-1,-1).

Handled returns a boolean value indicating whether the control should continue with its default response to the user action.


TControl.DoDock
 VCL Reference

TControl.DoDock

TControl	See also

Updates the control to reflect changes that occur when it is docked.

procedure DoDock (NewDockSite: TWinControl; ARect: TRect); dynamic;

Description

DoDock is called automatically as part of the docking process. It updates the control’s dimensions and causes it to repaint.

NewDockSite is the control’s new dock site. This value can be nil or NullDockSite (a constant defined in the controls unit to indicate no dock site).

ARect specifies the control’s new dimensions once it is docked to NewDockSite.


TControl.DoEndDock
 VCL Reference

TControl.DoEndDock

TControl	See also

Generates an OnEndDock event.

procedure DoEndDock(Target: TObject; X, Y: Integer); dynamic;

Description

OnEndDock calls any event handler attached to the OnEndDock event. When creating a component that descends from TControl, override OnEndDock to provide other responses in addition to the inherited event-handler call when the user finishes a drag-and-dock operation.


TControl.DoEndDrag
 VCL Reference

TControl.DoEndDrag

TControl	See also

Generates an OnEndDrag event.

procedure DoEndDrag(Target:TObject); X, Y: Integer); dynamic;

Description

DoEndDrag calls any event handler attached to the OnEndDrag event. When creating a component that descends from TControl, override DoEndDrag to provide other responses in addition to the inherited event-handler call when the user drops an object or cancels a drag-and-drop operation.


TControl.DoMouseWheel
 VCL Reference

TControl.DoMouseWheel

TControl	See also

Processes mouse wheel motion.

procedure DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; dynamic;

Description

DoMouseWheel is called automatically when the user rotates the mouse wheel.

The Shift parameter indicates the current state of the Shift, Alt, and Ctrl keys.

The WheelDelta parameter indicates the distance the wheel was rotated. WheelDelta is positive if the mouse was rotated upward, negative if the mouse was rotated downward.

The MousePos parameter indicates the current position of the mouse pointer.

DoMouseWheel returns True if an event handler was found and indicated that it handled the event.

As implemented in TControl, DoMouseWheel first attempts to call the OnMouseWheel event handler. If this routine exists and succesfully handles the event, DoMouseWheel returns True. Otherwise, DoMouseWheel repeatedly calls DoMouseWheelDown or DoMouseWheelUp, depending on the direction the user turned the mouse wheel. These routines, in turn, call the OnMouseWheelUp or OnMouseWheelDown event handlers.

Before the first call to DoMouseWheelDown or DoMouseWheelUp, DoMouseWheel adds WheelDelta to the WheelAccumulator property. After each call, DoMouseWheel adjusts WheelAccumulator towards zero; each adjustment is by an internal constant that defines the minimum meaningful wheel motion. When the absolute value of of WheelAccumulator drops below the value of this constant, DoMouseWheel exits, returning the value returned by the final call to DoMouseWheelDown or DoMouseWheelUp.


TControl.DoMouseWheelDown
 VCL Reference

TControl.DoMouseWheelDown

TControl	See also

Generates an OnMouseWheelDown event.

procedure DoMouseWheelDown(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic;

Description

The DoMouseWheel method calls DoMouseWheelDown to generate an OnMouseWheelDown event.

The Shift parameter indicates the state of the Shift, Alt, and Ctrl keys.

The MousePos parameter indicates the position of the mouse pointer.

DoMouseWheelDown returns True if an event handler indicates that it handled the message, and False otherwise.

Override DoMouseWheelDown to perform class-specific tasks in addition to calling the event handler when the mouse wheel is rotated downward.


TControl.DoMouseWheelUp
 VCL Reference

TControl.DoMouseWheelUp

TControl	See also

Generates an OnMouseWheelUp event.

procedure DoMouseWheelUp(Shift: TShiftState; MousePos: TPoint): Boolean; dynamic;

Description

The DoMouseWheel method calls DoMouseWheelUp to generate an OnMouseWheelUp event.

The Shift parameter indicates the state of the Shift, Alt, and Ctrl keys.

The MousePos parameter indicates the position of the mouse pointer.

DoMouseWheelUp returns True if an event handler indicates that it handled the message, and False otherwise.

Override DoMouseWheelUp to perform class-specific tasks in addition to calling the event handler when the mouse wheel is rotated upward.


TControl.DoStartDock
 VCL Reference

TControl.DoStartDock

TControl	See also

Generates an OnStartDock event.

procedure DoStartDock(var DragObject: TDragObject); dynamic;

Description

DoStartDock calls any event handler attached to the OnStartDock event. When creating a component that descends from TControl, override DoStartDock to provide other responses in addition to the inherited event-handler call when the user starts a drag-and-dock operation.


TControl.DoStartDrag
 VCL Reference

TControl.DoStartDrag

TControl	See also

Generates an OnStartDrag event.

procedure DoStartDrag(var DragObject: TDragObject); dynamic;

Description

DoStartDrag calls any event handler attached to the OnStartDrag event. When creating a component that descends from TControl, override DoStartDrag to provide other responses in addition to the inherited event-handler call when the user starts a drag-and-drop operation.


TControl.DragCanceled
 VCL Reference

TControl.DragCanceled

TControl	See also

Provides the interface for a method that responds to the cancellation of a drag.

procedure DragCanceled; dynamic;

Description

As implemented in TControl, DragCanceled does nothing. When creating a component that descends from TControl, override DragCanceled to provide code that executes when a drag-and-drop or drag-and-dock operation is canceled.


TControl.DragDrop
 VCL Reference

TControl.DragDrop

TControl	See also

Generates an OnDragDrop event.

procedure DragDrop(Source: TObject; X, Y: Integer);

Description

When creating a component that descends from TControl, override DragDrop to add additional code that executes before the OnDragDrop event handler is called.

The Source parameter is the object that was dropped onto the control. The X and Y parameters are the mouse coordinates where the object was dropped.


TControl.Dragging
 VCL Reference

TControl.Dragging

TControl	See also

Indicates whether a control is being dragged.

function Dragging: Boolean;

Description

Use Dragging to determine the drag state of the control. If Dragging returns true, the control is being dragged. If Dragging is false, the control is not being dragged.


TControl.DragOver
 VCL Reference

TControl.DragOver

TControl	See also

Generates an OnDragOver event.

procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); dynamic;

Description

Override DragOver to add additional code that executes before the OnDragOver event handler is called.

DragOver sets the Accept parameter to true to indicate that the user can drop the dragged object on the control. It sets Accept to false to indicate that the user cannot drop the dragged object on the control.

The Source parameter is the object being dragged. The State parameter indicates how the dragged object is moving in relation to the control. X and Y indicate the current position of the mouse.


TControl.DrawDragDockImage
 VCL Reference

TControl.DrawDragDockImage

TControl	See also

Draws the dock image for the control.

procedure DrawDragDockImage(DragDockObject: TDragDockObject); dynamic;

Description

DrawDragDockImage is called automatically to draw the control (or, more typically, the drag rectangle) when the control is manipulated in drag-and-dock operations.

DrawDragDockImage calls DefaultDockImage to render the image.


TControl.DrawTextBiDiModeFlags
 VCL Reference

TControl.DrawTextBiDiModeFlags

TControl	See also

Returns the text flags that reflect the current setting of the BiDiMode property.

function DrawTextBiDiModeFlags(Flags: LongInt); LongInt;

Description

Call DrawTextBiDiModeFlags to obtain a value for the TextFlags property of a canvas when drawing the control’s text or caption. The return value can also be used with the Windows API DrawText function.

Flags are the current text flags, unaltered by any bi-directional mode considerations.

DrawTextBiDiModeFlags adds or removes the DT_RIGHT or DT_RTLREADING flags based on the values returned from the UseRightToLeftAlignment and UseRightToLeftReading methods.


TControl.DrawTextBiDiModeFlagsReadingOnly
 VCL Reference

TControl.DrawTextBiDiModeFlagsReadingOnly

TControl	See also

Returns the text flag to add that indicates whether the control’s text should read from right to left.

function DrawTextBiDiModeFlagsReadingOnly: LongInt;

Description

Call DrawTextBiDiModeFlagsReadingOnly to determine whether the DT_RTLREADING flag should be added when calling the Windows API DrawText or when assigning the TextFlags property of a canvas.

DrawTextBiDiModeFlagsReadingOnly returns the DT_RTLREADING flag or 0, depending on the value returned from the UseRightToLeftReading method.

To obtain the text flags that indicate the bi-directional alignment as well as text direction for the control, use DrawTextBiDiModeFlags instead.


TControl.EndDrag
 VCL Reference

TControl.EndDrag

TControl	See also

Stops a control from being dragged any further.

procedure EndDrag(Drop: Boolean);

Description

Use EndDrag to stop a dragging operation that began with a call to the BeginDrag method.

If the Drop parameter is true, the control being dragged is dropped or docked. If the Drop parameter is false, the control is not dropped or docked and dragging is canceled.


TControl.EraseDragDockImage
 VCL Reference

TControl.EraseDragDockImage

TControl	See also

Erases the dock image for the control.

procedure EraseDragDockImage(DragDockObject: TDragDockObject); dynamic;

Description

DrawDragDockImage is called automatically to erase the control (or, more typically, the drag rectangle) when the control is manipulated in drag-and-dock operations.

DrawDragDockImage calls DefaultDockImage to remove the image.


TControl.GetActionLinkClass
 VCL Reference

TControl.GetActionLinkClass

TControl	See also

Returns the appropriate action link class that is associated with the control class.

TControlActionLinkClass = class of TControlActionLink;

function GetActionLinkClass: TControlActionLinkClass; dynamic;

Description

GetActionLinkClass returns the appropriate class type for the action link used with a control. This class is used internally to create an action link object for the control when it has an associated action. The action link links the action to the control client. Each Action link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports.

As implemented in TControl, GetActionLinkClass returns the TControlActionLink class type, which associates the ShowHint, Caption, Enabled and Visible properties and the OnClick event handler. Descendants of TControl override this method to specify a descendant of TControlActionLink that handles their configuration of properties and events.


TControl.GetClientOrigin
 VCL Reference

TControl.::GetClientOrigin

TControl	See also

Returns the screen coordinates of the top-left corner of the control’s client area.

function GetClientOrigin: TPoint; virtual;

Description

Override GetClientOrigin to change how the ClientOrigin is calculated.

The GetClientOrigin method is the protected method for reading the ClientOrigin property. GetClientOrigin calculates the ClientOrigin by adding the control’s Left and Top values to the ClientOrigin coordinates of its parent.


TControl.GetClientRect
 VCL Reference

TControl.GetClientRect

TControl	See also

Returns a rectangle defining the client area of the control.

function GetClientRect: TRect; virtual;

Description

Override GetClientRect to change how the client area is calculated.

The GetClientRect method is the protected method for reading the ClientRect property. GetClientRect returns a rectangle with the rectangle’s Top and Left fields set to zero, and its Bottom and Right fields set to the control's ClientHeight and ClientWidth, respectively.


TControl.GetControlsAlignment
 VCL Reference

TControl.GetControlsAlignment

TControl	See also

Indicates how text is aligned within the control.

function GetControlsAlignment: TAlignment; dynamic;

Description

Use GetControlsAlignment to determine the alignment of the control. For controls that do not have an Alignment property, GetControlsAlignment returns taLeftJustify.

Note:	GetControlsAlignment returns the alignment of text before it is altered by the BiDiMode property. To check if the alignment should be reversed to reflect the BiDiMode property, call UseRightToLeftAlignment.


TControl.GetDeviceContext
 VCL Reference

TControl.GetDeviceContext

TControl	See also	Example

Returns a device context for the control.

function GetDeviceContext(var WindowHandle: HWnd): HDC; virtual;

Description

Call GetDeviceContext to obtain a device context and window handle. Override GetDeviceContext to change how the device context is obtained.

The window handle used by the control is returned in the WindowHandle parameter. GetDeviceContext returns the device context of this, the parent control's window.


TControl.GetDockEdge
 VCL Reference

TControl.GetDockEdge

TControl	See also

Returns the edge on which another control should be docked when it is dragged over the control.

function GetDockEdge(MousePos: TPoint): TAlign; dynamic;

Description

Use GetDockEdge to get the edge on which another control should be docked when it is dragged over the control.

MousePos is the position of the mouse.

GetDockEdge is called automatically during drag-and-dock operations involving the control.


TControl.GetDragImages
 VCL Reference

TControl.GetDragImages

TControl	See also

Returns the control's image list containing the image to be displayed while dragging.

function GetDragImages: TDragImageList; virtual;

Description

Override GetDragImages to provide a custom image list for the control. As implemented in TControl, GetDragImages returns nil.


TControl.GetEnabled
 VCL Reference

TControl.GetEnabled

TControl	See also

Returns the value of the Enabled property.

function GetEnabled: Boolean; virtual;

Description

GetEnabled is the read implementation of the Enabled property.

Override GetEnabled and SetEnabled to change the implementation of the Enabled property. For example, A descendant of TControl might change the way the Enabled property interacts with an associated action.


TControl.GetFloating
 VCL Reference

TControl.GetFloating

TControl	See also

Returns the value of the Floating property.

function GetFloating: Boolean; virtual;

Description

GetFloating is the implementation of the read-only Floating property. GetFloating returns true if the HostDockSite property is either nil or of type FloatingDockSiteClass.

Override this method to change the way a control determines if it is floating.


TControl.GetFloatingDockSiteClass
 VCL Reference

TControl.GetFloatingDockSiteClass

TControl	See also

Returns the class used for the control when it is floating.

function GetFloatingDockSiteClass: TWinControlClass; virtual;

Description

GetFloatingDockSiteClass is the read implementation of the FloatingDockSiteClass property. Override this method to change the implementation of FloatingDockSiteClass.


TControl.GetPalette
 VCL Reference

TControl.GetPalette

TControl	See also

Returns the handle to a palette for use by the control.

function GetPalette: HPALETTE; dynamic;

Description

As implemented in TControl, GetPalette returns a null handle, indicating that the control does not have a palette. Override GetPalette to implement derived objects that use a palette. Create a palette handle for the control by a call to the Windows API function CreatePalette. GetPalette should return the palette handle for the control.

Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization.

GetPalette is called only if the run-time video mode requires color palette support, for example, in 256-color mode.


TControl.GetParentComponent
 VCL Reference

TControl.GetParentComponent

TControl	See also

Returns the parent of the control.

function GetParentComponent: TComponent; override;

Description

GetParentComponent is called by the streaming system that loads and saves VCL components. The component returned by GetParentComponent is responsible for loading and saving the control when it is streamed in or out. As implemented in TControl, GetParentComponent returns the value of the Parent property.


TControl.GetPopupMenu
 VCL Reference

TControl.::GetPopupMenu

TControl	See also

Returns the pop-up menu associated with the control.

function GetPopupMenu: TPopupMenu; dynamic;

Description

Call GetPopupMenu to find the popup menu associated with the control. Override GetPopupMenu to change which popup menu is associated with the control or to specify different popup menus depending on the state of the control.

GetPopupMenu returns the value of the Popup property.


TControl.GetTextBuf
 VCL Reference

TControl.GetTextBuf

TControl	See also 	Example

Retrieves the control's text, copies it into a buffer, and returns the number of characters copied.

function GetTextBuf(Buffer: PChar; BufSize: Integer): Integer;

Description

Call GetTextBuf to retrieve the text of a control into a fixed size buffer. The text copied is the value of the Text property. GetTextBuf returns the number of characters that were actually copied, which is either the length of the Text property, or BufSize - 1, whichever is smaller.

To find out how many characters the buffer needs to hold the entire text, call the GetTextLen method before allocating a buffer for GetTextBuf.

GetTextBuf is available for compatibility with 16-bit code. Where backward compatibility is not an issue, use the Text property.


TControl.GetTextLen
 VCL Reference

TControl.GetTextLen

TControl	See also 	Example

Returns the length of the control's text.

function GetTextLen: Integer;

Description

Call GetTextLen to find the length of the control’s text. This is the size needed for a text buffer to be used by the GetTextBuf method.


TControl.HasParent
 VCL Reference

TControl.HasParent

TControl	See also

Indicates whether the control has a parent.

function HasParent: Boolean; override;

Description

HasParent indicates whether the Parent property has been assigned a value. This method is used by the streaming system to determine whether the control has a parent that is responsible for writing it to a stream. As implemented in TControl, HasParent returns true if the Parent property is not nil, and false otherwise.


TControl.Hide
 VCL Reference

TControl.Hide

TControl	See also

Makes the control invisible.

procedure Hide;

Description

Call Hide to hide a control. Hide sets the Visible property of the control to false.

Although a control that is hidden is not visible, its properties and methods are still available.


TControl.InitiateAction
 VCL Reference

TControl.InitiateAction

TControl	See also

Calls the action link’s Update method if the control is associated with an action link.

procedure InitiateAction; virtual;

Description

When the application is idle, Delphi makes a series of calls to allow controls to update their associated actions so that they reflect the current properties of the controls. The first of these is to the InitiateAction method of the each form, followed by the InitiateAction methods of its visible menus and controls.

InitiateAction calls the action’s update method indirectly (through its action link), which leads to a number of events, any of which may update the action and stop the update process:

1.	First, the action list that contains the action receives an OnUpdate event.

2.	If the action list does not handle the OnUpdate event, then the Application object receives an OnActionUpdate event.

3.	If the OnActionUpdate event handler does not update the action, the action itself receives an OnUpdate event.

4.	If that does not update the action, the active control’s UpdateAction method is called.

5. Finally, if the action is still not updated, the active form’s UpdateAction method is called.


TControl.Invalidate
 VCL Reference

TControl.Invalidate

TControl	See also

Completely repaint control.

procedure Invalidate; virtual;

Description

Use Invalidate when the entire control needs to be repainted. When more than one region within the control needs repainting, Invalidate will cause the entire window to be repainted in a single pass, avoiding flicker caused by redundant repaints. There is no performance penalty for calling Invalidate multiple times before the control is actually repainted.


TControl.IsRightToLeft
 VCL Reference

TControl.IsRightToLeft

TControl	See also

Indicates whether the control should be reversed right to left.

function IsRightToLeft: Boolean;

Description

Use IsRightToLeft to determine whether the control should be reversed in any way because it is running on a system with a Middle Eastern locale. IsRightToLeft is intended for component writers to ease the process of implementing the BiDiMode property.

IsRightToLeft returns true if the application is running on a Middle East-enabled version of Windows and the BiDiMode property indicates that the control should make any adjustments.


TControl.Loaded
 VCL Reference

TControl.Loaded

TControl	See also

Initializes the control after it is loaded from a stream.

procedure Loaded; override;

Description

Do not call Loaded. The VCL streaming system calls Loaded automatically after the control’s form is loaded into memory so that the control can complete any initializations that depend on other objects in the form.

Loaded overrides the inheritedTComponent method in order to initialize the control from its associated Action. To change the properties the control copies from its action, override the ActionChange method.


TControl.ManualDock
 VCL Reference

TControl.ManualDock

TControl 	See also

Docks the control.

function ManualDock(NewDockSite: TWinControl; DropControl: TControl = nil; ControlSide: TAlign = alNone): Boolean;

Description

Use ManualDock to dock the control programmatically. ManualDock undocks the control from its current dock site, then docks the control to its new dock site.

NewDockSite is the control’s new dock site.

DropControl is the control in the new dock site, if any, on which to drop the control. For example, when docking to a page control, DropControl would be a tab sheet.

ControlSide specifies on which side of DropControl or NewDockSite (if DropControl is nil) the control should be docked. This value can be obtained by calling the dock site’s GetDockEdge method.


TControl.ManualFloat
 VCL Reference

TControl.ManualFloat

TControl 	See also

Undocks the control.

function ManualFloat(ScreenPos: TRect): Boolean;

Description

Use ManualFloat to undock the control programmatically.

ScreenPos is the rectangle in which the control is displayed when it starts floating.


TControl.MouseDown
 VCL Reference

TControl.MouseDown

TControl	See also

Generates an OnMouseDown event.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic;

Description

Override the protected MouseDown method to provide other responses in addition to calling the OnMouseDown event handler when the user presses the mouse button down while the cursor's hotspot is over the control.

The Button parameter determines which mouse button the user pressed. Shift indicates which shift keys (Shift, Ctrl, or Alt) were down when the user pressed the mouse button. X and Y are the pixel coordinates of the mouse pointer within the client area of the control.

A control calls MouseDown in response to any of the Windows mouse-down messages (WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN), decoding the message parameters into the shift-key state and position, which it passes in the Shift, X, and Y parameters, respectively. The value of the Button parameter indicates which mouse button was pressed down: left, right, or middle.


TControl.MouseMove
 VCL Reference

TControl.MouseMove

TControl	See also

Respond to mouse moving over control area..

procedure MouseMove(Shift: TShiftState; X, Y: Integer); dynamic;

Description

Override the protected MouseMove method to provide other responses in addition to calling the OnMouseMove event handler when the user moves the mouse.

A control calls MouseMove in response to any of the Windows mouse-move messages (WM_MOUSEMOVE), decoding the message parameters into the shift-key state and position, which it passes in the Shift, X, and Y parameters, respectively.

As the mouse cursor moves across a control, this method is called repeatedly. Each time it is called, it is with the new coordinates that reflect the continuous path of the mouse cursor across the screen real estate covered by the control's visual represtation.


TControl.MouseUp
 VCL Reference

TControl.MouseUp

TControl	See also

Generates an OnMouseUp event.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); dynamic;

Description

Override the protected MouseDown method to provide other responses in addition to calling the OnMouseDown event handler when the user releases a previously pressed mouse button while the cursor's hotspot is over the control.

A control calls MouseUp in response to any of the Windows mouse-up messages (WM_LBUTTONUP, WM_MBUTTONUP, WM_RBUTTONUP), decoding the message parameters into the shift-key state and position, which it passes in the Shift, X, and Y parameters, respectively. The value of the Button parameter indicates which mouse button was released: left, right, or middle


TControl.MouseWheelHandler
 VCL Reference

TControl.MouseWheelHandler

TControl	See also

Dispatches messages received from a mouse wheel.

procedure MouseWheelHandler(var Message: TMessage); dynamic;

Description

The WndProc method calls MouseWheelHandler when it receives a mouse wheel message. MouseWheelHandler checks whether the windowed control is embedded in a form, and if so, calls the form’s MouseWheelHandler method. This allows the form to respond to mouse wheel messages before they are handled by individual controls. If the windowed control is not in a form, MouseWheelHandler passes the mouse wheel message to the Perform method, which generates an OnMouseWheel event, followed (if necessary) by an OnMouseWheelUp or OnMouseWheelDown event.


TControl.Notification
 VCL Reference

TControl.::Notification

TControl	See also

Responds to notifications that components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification allows TControl to update its PopupMenu property when the pop-up menu it refers to is destroyed.

Override the Notification method to respond to notifications that other components are about to be destroyed or have just been created. Use the Notification method to update controls that rely on other objects. Remove references to objects that are going away so that the control does not refer to objects that have been destroyed. For example, data-aware objects override the Notification method to update themselves when their data source is removed. Some objects respond to notifications that other objects of a specific type are being created. For example, the session component sets the Session property of new data-aware controls to itself when the AutoSessionName property is true.

By default, components pass along the notification to their owned components, if any.


TControl.PaletteChanged
 VCL Reference

TControl.PaletteChanged

TControl	See also

Responds to changes in the system's palette by realizing the control's palette.

function PaletteChanged(Foreground: Boolean): Boolean; dynamic;

Description

Override PaletteChanged to change how the control responds to Windows notifications that the system palette is changing. TControl responds to these notifications by trying to realize the control’s palette, if any, into the current device context. If the change in the system palette causes the actual value of the control’s palette to change, PaletteChanged invalidates the control so that it can repaint with the new palette.

Windows paints the active window with a foreground palette, while other windows are forced to use background palettes. Background palettes are approximate matches to the colors specified by the control’s logical palette, given the limitations imposed by implementing the foreground palette. Windows only allows a single foreground palette.

PaletteChanged allows the control to obtain a new realization of its palette when the system palette changes. When Foreground is true, the form has been activated and the control is specifying the new foreground palette. When Foreground is false, another application or form has changed the foreground palette, and controls that are sensitive to the available palette should realize new background palettes to best match their logical palettes.

If the control does not have a logical palette to be realized into the current device context, GetPalette returns a handle of 0, and PaletteChanged returns false, indicating that no palette was realized. If GetPalette returns the handle to a logical palette, PaletteChanged realizes this palette into the current device context, and returns true.

Note:	PaletteChanged is called only when the runtime video mode requires palette support, such as for 256 color mode, but not 16 million color mode.


TControl.ParentToClient
 VCL Reference

TControl.ParentToClient

TControl	See also

Translate parent coordinates to client coordinates.

function ParentToClient(const Point: TPoint; AParent: TWidgetControl = nil): TPoint;

Description

ParentToClient translates Point from the AParent’s coordinate system to the current control’s coordinate system. AParent must be a control that can be found by iterating up the chain of Parent properties. If AParent is nil, the control’s immediate parent is used.

An EInvalidOperation exception is thrown if AParent is not an ancestor control or the Parent property is nil.


TControl.Perform
 VCL Reference

TControl.Perform

TControl	See also	Example

Responds as if the control received a specified Windows message.

function Perform(Msg: Cardinal; WParam, LParam: Longint): Longint;

Description

Call Perform to bypass the Windows message queue and send a message directly to the control’s window procedure.

Perform fills a message record (of type TMessage) with the message ID passed in the Msg parameter, the message parameters passed in WParam and LParam, and a result field of zero. Perform then passes the message record to the WindowProc method for processing.


TControl.PositionDockRect
 VCL Reference

TControl.PositionDockRect

TControl	See also

Positions the docking rectangle according to the current drag-and-dock state.

procedure PositionDockRect(DragDockObject: TDragDockObject); dynamic;

Description

Use PositionDockRect to adjust the docking rectangle of the drag-and-dock object specified by DragDockObject. DragDockObject’s DockRect property is updated to reflect the current drag-and-dock state. This updating process makes use of the UndockWidth, UndockHeight, LRDockWidth, or TBDockHeight property, as appropriate.


TControl.ReadState
 VCL Reference

TControl.ReadState

TControl	See also

Prepares the control for having its properties assigned values read from a stream.

procedure ReadState(Reader: TReader); override;

Description

ReadState is part of a sequence of calls used by the streaming system that loads and saves component state.  It reads the values of all the control’s published properties, stored data, and owned components from the reader object passed in Reader.

Override ReadState to change the preparations the control makes as it readies itself to have its property values assigned from a stream. For example, a control might destroy temporary internal data structures or objects before new instances are loaded from the stream. Remember to include a call to the inherited class’s method when overriding ReadState.

As implemented in TControl, ReadState assigns the Reader parameter’s Parent property to the control’s own Parent property before calling the inherited ReadState method of TComponent. Finally, ReadState synchronizes the Font, Color, and ShowHint properties with the parent control, as indicated by the ParentFont, ParentColor, and ParentShowHint properties, respectively.


TControl.Refresh
 VCL Reference

TControl.Refresh

TControl	See also

Repaints the control on the screen.

procedure Refresh;

Description

Call Refresh method to repaint the control immediately. Refresh calls the Repaint method. Use the Refresh and Repaint methods interchangeably.


TControl.Repaint
 VCL Reference

TControl.Repaint

TControl	See also

Forces the control to repaint its image on the screen.

procedure Repaint;

Description

Call Repaint to force the control to repaint its image immediately. If the ControlStyle property includes csOpaque, the control paints itself directly. Otherwise, the Repaint method calls the Invalidate method and then the Update method so that any visible portions of controls beneath the control will be repainted as well.


TControl.ReplaceDockedControl
 VCL Reference

TControl.ReplaceDockedControl

TControl 	See also

Docks the control in the place where another control is already docked.

function ReplaceDockedControl(Control: TControl; NewDockSite: TWinControl; DropControl: TControl; ControlSide: TAlign): Boolean;

Description

Call ReplaceDockedControl to replace a control that is already docked while moving that control to another dock site.

Control is the control whose place this control is taking.

NewDockSite is the new dock site for the control that is replaced.

DropControl is a control in the new dock site on which to drop the control that is replaced. For example, if NewDockSite were a page control, DropControl would be a tab sheet.

ControlSide specifies on which side of DropControl or NewDockSite (if DropControl is nil) the replaced control should be docked. This value can be obtained by calling the dock site’s GetDockEdge method.

ReplaceDockedControl does the same thing as calling the ManualDock method of the control specified by the Control parameter (using the values of NewDockSite, DropControl, and ControlSide) in addition to calling ManualDock for the control whose method this is, docking it in the current position of the Control parameter. However, calling ReplaceDockedControl is more efficient, and prevents unnecessary flicker.


TControl.RequestAlign
 VCL Reference

TControl.RequestAlign

TControl	See also

Instructs the parent of a control to reposition the control, enforcing its Align property.

procedure RequestAlign; dynamic;

Description

Applications do not call this protected method. Controls call RequestAlign internally when changes are made to the size or position of the control, so that they remain properly aligned within the parent control.


TControl.Resize
 VCL Reference

TControl.Resize

TControl	See also

Respond to control resize.

procedure Resize; dynamic;

Description

Resize is called automatically immediately after the control’s dimensions change. As implemented in TControl, Resize calls the control’s OnResize event handler if it is assigned.


TControl.ScreenToClient
 VCL Reference

TControl.ScreenToClient

TControl	See also

Converts the screen coordinates of a specified point on the screen to client coordinates.

function ScreenToClient(const Point: TPoint): TPoint;

Description

Use ScreenToClient to convert a point in screen coordinates to local, or client area, coordinates. In client area coordinates (0, 0) corresponds to the upper left corner of the control's client area. In screen coordinates (0, 0) corresponds to the upper left corner of the screen.

Use ScreenToClient along with ClientToScreen to convert from one control's coordinate system to another control's coordinate system. For example,

P := TargetControl.ScreenToClient(SourceControl.ClientToScreen(P));

converts P from coordinates in SourceControl to coordinates in TargetControl.


TControl.SendCancelMode
 VCL Reference

TControl.SendCancelMode

TControl	See also

Cancels the modal state of the control.

procedure SendCancelMode(Sender: TControl);

Description

Call SendCancelMode to cancel the modal state of the control. Various controls implemented in the VCL support a model state where the user must respond to the control before interacting with any other object on the form. An example is the dropped-down state of a combo box when the drop-down list is showing. For these controls, specific user actions send a Windows message to the control to end the model state, such as a mouse click that closes up the dropped-down list.

SendCancelMode allows an application to end the modal state of the control in the absence of a user action, or when implementing a new user interface response.


TControl.SendDockNotification
 VCL Reference

TControl.SendDockNotification

TControl	See also

Sends a Windows message to the control’s host dock site.

procedure SendDockNotification(Msg: Cardinal; WParam, LParam: Integer);

Description

Use SendDockNotification to send a Windows message to the control’s host dock site.

SendDockNotification is called automatically when the control’s text or visibility changes.


TControl.SendToBack
 VCL Reference

TControl.SendToBack

TControl	See also

Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.

procedure SendToBack;

Description

Use SendToBack to change the order of overlapping controls or forms.

The order in which controls stack on top of each other (also called the Z order) depends on the order the controls are placed on the form. For example, if you put a label and an image on a form so that one is on top of the other, the one that was placed first on the form becomes the one on the bottom. Because both the label and the image are non-windowed controls, they "stack" as you would expect them to. Call the SendToBack method for the top object to move it below the other object.

The stacking order of two windowed controls is the same as the stacking of two non-windowed controls. For example, if you put a memo on a form, then put a check box on top of it, the check box remains on top. Calling SendToBack for the check box makes the memo appear on top.

The stacking order of windowed and non-windowed controls cannot be mingled. For example, if you put a memo, a windowed control, on a form, and then put a label, a non-windowed control, on top of it, the label disappears behind the memo. Windowed controls always stack on top of non-windowed controls. In this example, calling the SendToBack method of the memo does nothing, the label remains behind the memo.

If the control has the input focus when the SendToBack method executes, it loses the input focus.


TControl.SetBiDiMode
 VCL Reference

TControl.SetBiDiMode

TControl	See also

Sets the control’s bi-directional mode.

procedure SetBiDiMode(Value: TBiDiMode); virtual;

Description

SetBiDiMode is the write implementation of the control’s BiDiMode property. Override this method to change the implementation of BiDiMode.


TControl.SetBounds
 VCL Reference

TControl.SetBounds

TControl	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); virtual;

Description

Use SetBounds to change all of the component's boundary properties at one time. The same effect can be achieved by setting the Left, Top, Width, and Height properties separately, but SetBounds changes all four properties at once ensuring that the control will not repaint between changes.

Specify the values for the Left, Top, Width, and Height properties as the value of the ALeft, ATop, AWidth, and AHeight parameters, respectively.

Calling SetBounds does not necessarily result in the Left, Top, Width, and Height properties changing to the specified values. Before the properties are changed, the AutoSize or Constraints property may limit the changes, and an OnCanResize (or OnConstrainedResize) event handler may change the new values. After the control’s Left, Top, Width, and Height properties are changed, SetBounds generates an OnResize event.

Note:	Component writers can change the Left, Top, Width, and Height properties while bypassing all resize events and constraint or autosize logic by using the UpdateBoundsRect method instead.


TControl.SetColor
 VCL Reference

TControl.SetColor

TControl	See also

Sets the drag mode for the control.

procedure SetColor(Value: TDragMode); virtual;

Description

SetColor is the protected write implementation for the DragMode property. Override SetColor to execute additional code when the value of the DragMode property changes.


TControl.SetDragMode
 VCL Reference

TControl.SetDragMode

TControl	See also

Sets the drag mode for the control.

procedure SetDragMode(Value: TDragMode); virtual;

Description

SetDragMode is the protected write implementation for the DragMode property. Override SetDragMode to execute additional code when the value of the DragMode property changes.


TControl.SetEnabled
 VCL Reference

TControl.SetEnabled

TControl	See also

Sets the value of the Enabled property.

procedure SetEnabled(Value: Boolean); virtual;

Description

SetEnabled is the protected write implementation of the Enabled property. After changing the internal representation of the Enabled property, SetEnabled sends a Windows message back to the control so that it can respond to the change. When TControl receives this message, it invalidates the control so that its appearance reflects the change (for example, so that it appears grayed). Some descendants respond to this message in other ways (for example, windowed controls ensure that a disabled control does not have focus).

Override GetEnabled and SetEnabled to change the implementation of the Enabled property. For example, A descendant of TControl might change the way the Enabled property interacts with an associated action. When overriding SetEnabled, be sure to call the inherited method.


TControl.SetName
 VCL Reference

TControl.SetName

TControl	See also

Sets the name of the control.

procedure SetName(const Value: TComponentName); override;

Description

SetName is the protected write implementation of the Name property. TControl updates the Text or Caption property, if appropriate, after changing the value of Name.

Override SetName to execute additional code when the value of the Name property changes.


TControl.SetParent
 VCL Reference

TControl.SetParent

TControl	See also

Sets the parent of the control.

procedure SetParent(AParent: TWinControl); virtual;

Description

SetParent is the protected implementation of the Parent property. Override SetParent to execute additional code when the value of the Parent property changes.

The AParent parameter specifies the new parent of the control.

If the control already has a parent, SetParent removes the control from that parent's list of controls by calling the parent's RemoveControl method. If AParent is not nil, SetParent calls its InsertControl method to add the control to its list of controls.

The TControl destructor calls SetParent(nil)to remove the control from its parent's control list before destroying the component.


TControl.SetParentBiDiMode
 VCL Reference

TControl.SetParentBiDiMode

TControl	See also

Specifies whether the control uses its parent’s BiDiMode.

procedure SetParentBiDiMode(Value: Boolean); virtual;

Description

SetParentBiDiMode is the protected write implementation of the ParentBiDiMode property.


TControl.SetParentComponent
 VCL Reference

TControl.SetParentComponent

TControl	See also

Sets the parent for the control.

procedure SetParentComponent(Value: TComponent); override;

Description

Do not call the SetParentComponent method. It is used by the streaming system that loads and saves VCL components.  SetParentComponent makes the component specified by the Value parameter the parent of the control.

SetParentComponent calls the SetParent method only if the component specified as the parent is a windowed control.


TControl.SetTextBuf
 VCL Reference

TControl.SetTextBuf

TControl	See also

Sets the text of the control.

procedure SetTextBuf(Buffer: PChar);

Description

Call the SetTextBuf method to set the text of the control to the text in the specified buffer.

The text is set to the text in the buffer pointed to by the Buffer parameter. Buffer must point to a null-terminated string. The SetTextBuf method sends the WM_SETTEXT and CM_TEXTCHANGED messages. If done in the tight execution of a function, this could result in the change not being seen until messages from the Windows message queue being processed after the function finishes executing. To interrupt a function's execution and process messages, use the TApplication.ProcessMessages method.

Note:	The SetTextBuf method is provided for backwards compatibility only. To set the text of a control now, assign a string value to the Text property.


TControl.SetZOrder
 VCL Reference

TControl.SetZOrder

TControl	See also

Repositions the control in its parent’s control list, thereby changing position onscreen.

procedure SetZOrder(TopMost: Boolean); dynamic;

Description

Call SetZOrder to change the Z-order of the control. To make the control the topmost control, specify the TopMost value as true. To make the control the bottommost, set TopMost to false.

After changing the order, SetZOrder invalidates the control to ensure repainting to reflect the new order.

The stacking order of windowed and non-windowed controls cannot be mingled. For example, if you put a memo, a windowed control, on a form, and then put a label, a non-windowed control, on top of it, the label disappears behind the memo. Windowed controls always stack on top of non-windowed controls. In this example, calling the SetZOrder method of the label or the memo has no effect, the label always remains behind the memo.


TControl.Show
 VCL Reference

TControl.Show

TControl	See also

Makes a control visible.

procedure Show;

Description

Use the Show method to make visible a control that was previously hidden.

The Show method sets the control’s Visible property to true and ensures that the parent control is also visible.


TControl.Update
 VCL Reference

TControl.Update

TControl	See also

Processes any pending paint messages immediately.

procedure Update; virtual;

Description

Call Update to force the control to be repainted before any more, possibly time-consuming, processing takes place. Use Update to provide immediate feedback to the user that cannot wait for the Windows paint message to arrive.

Update does not invalidate the control, but simply forces a repaint of any regions that have already been invalidated. Call Repaint instead to invalidate the control as well.


TControl.UpdateBoundsRect
 VCL Reference

TControl.UpdateBoundsRect

TControl	See also

Changes the Top, Left, Width, and Height properties of the control, but doesn’t update its screen image and bypasses all resize events.

procedure UpdateBoundsRect(const R: TRect);

Description

UpdateBoundsRect is used internally by controls to stay synchronized with changes made by the underlying Windows screen object. UpdateBoundsRect updates the properties to match those passed in the rectangle as the R parameter.


TControl.UseRightToLeftAlignment
 VCL Reference

TControl.UseRightToLeftAlignment

TControl	See also

Specifies whether the control’s alignment should be reversed right-to-left.

function UseRightToLeftAlignment: Boolean; dynamic;

Description

Controls call UseRightToLeftAlignment when implementing the BiDiMode property. UseRightToLeftAlignment indicates whether the control’s alignment should be reversed right-to-left. This information can be used when painting the control or when responding to mouse events.

UseRightToLeftAlignment returns true if the application is running on a system with a Middle Eastern locale and the BiDiMode property is bdRightToLeft. Otherwise, it returns false. Descendants override UseRightToLeftAlignment if alignment in Middle Eastern locales depends on other factors.


TControl.UseRightToLeftReading
 VCL Reference

TControl.UseRightToLeftReading

TControl	See also

Specifies whether the control is using a right-to-left reading order.

function UseRightToLeftReading: Boolean;

Description

Controls call UseRightToLeftReading when implementing the BiDiMode property. UseRightToLeftReading indicates whether the control’s text should read from right to left. This information can be used to determine which style flags to set for the control when it is created and which flags to set for drawing text.

UseRightToLeftReading returns true if the application is running on a system with a Middle Eastern locale and the BiDiMode property is not bdLeftToRight. UseRightToLeftReading returns false otherwise.


TControl.UseRightToLeftScrollBar
 VCL Reference

TControl.UseRightToLeftScrollBar

TControl	See also

Specifies whether the vertical scroll bar appears on the left side of the control.

function UseRightToLeftScrollBar: Boolean;

Description

Controls call UseRightToLeftScrollBar when implementing the BiDiMode property. UseRightToLeftScrollBar returns true when the vertical scroll bar appears on the left side of the control, and false when it appears on the right.

UseRightToLeftScrollBar returns true if the application is running on a system with a Middle Eastern locale and the BiDiMode property is bdRightToLeft or bdRightToLeftNoAlign.


TControl.VisibleChanging
 VCL Reference

TControl.VisibleChanging

TControl	See also

Provides the interface for a method that responds to changes in the control’s visibility.

procedure VisibleChanging; dynamic;

Description

VisibleChanging is called before the value of a control’s Visible property changes. As implemented in TControl, it does nothing. Override VisibleChanging to respond to changes in the control’s visibility. For example, if a control should not change its visibility, override VisibleChanging to raise an exception when an attempt is made to alter the control’s visibility.


TControl.WndProc
 VCL Reference

TControl.WndProc

TControl	See also	Example

Provides specific message responses for the control.

procedure WndProc(var Message: TMessage); virtual;

Description

Override WndProc to change the initial Windows message handler for the control. The WindowProc property is initialized to WndProc.

WndProc implements the mouse behavior specified by the ControlStyle and DragMode properties, and updates the ControlState property. It passes any unhandled messages on to the Dispatch method.

When overriding WndProc to provide specialized responses to messages, be sure to call the inherited WndProc at the end to dispatch any unhandled messages.


Hierarchy

TObject

TPersistent

TComponent

TControl


TControlBar
 VCL Reference

 TControlBar

Hierarchy	Properties	Methods	Events	See also

TControlBar manages the layout of toolbar components.

Unit

ExtCtrls

Description

Use TControlBar as a docking site for toolbar components. Control bars contain child controls (usually TToolBar objects) that can be moved and resized independently. As with a cool bar, each child control resides on its own individual band that the user positions by dragging its sizing grip.

Tip:	When docking TToolBar objects to a control bar, you may find it useful to use TToolDockObject.


 VCL Reference

TControlBar properties

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

AutoDock

AutoDrag

Picture

RowSize

RowSnap

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TControlBar properties

TControlBar	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoDock

AutoDrag

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderWidth

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

Picture

PopupMenu

RowSize

RowSnap

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TControlBar events

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TControlBar events

TControlBar	By object	Legend

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TControlBar methods

TControlBar	Alphabetically	Legend

Derived from TCustomControlBar

Create

Destroy

StickControls

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TControlBar methods

TControlBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

StickControls

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomControlBar

TControlBar


TConversion
 VCL Reference

TConversion

Hierarchy	Methods	See also

TConversion converts rich text data from one encoding format to another.

Unit

ComCtrls

Description

Use TConversion as the base class for an object that converts rich data from one encoding system to another. TConversion, by itself, does not perform any conversions. It simply reads from or writes to a stream. TConversion provides an interface that can be overridden by derived classes that convert streamed text from one format to another.

Descendants of TCustomRichEdit use TConversion when streaming text to and from files, when the files contain plain ANSI text or text in rich text format (RTF). To allow rich text edit controls to read from and write to files that use another format, derive a class from TConversion which converts between that format and RTF. Rich text edit controls can use the new class by registering it through their RegisterConversionFormat method, or by making it the default converter.


 VCL Reference

TConversion methods

TConversion	Alphabetically	Legend

In TConversion

ConvertReadStream

ConvertWriteStream

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConversion methods

TConversion	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ConvertReadStream

ConvertWriteStream

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TConversion.ConvertReadStream
 VCL Reference

TConversion.ConvertReadStream

TConversion	See also

Reads BufSize bytes from Stream into the memory buffer pointed to by Buffer.

function ConvertReadStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;

Description

To convert text between two formats, override this method in a descendant class and convert the text in the buffer. To create a descendant class that TCustomRichEdit can use, convert the text to RTF format.

Note:	ConvertReadStream should reverse the conversion that ConvertWriteStream makes.


TConversion.ConvertWriteStream
 VCL Reference

TConversion.ConvertWriteStream

TConversion	See also

Writes BufSize bytes to Stream from the memory buffer pointed to by Buffer.

function ConvertWriteStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;

Description

To convert text between two formats, override this method in a descendant class and convert the text in the buffer. To create a descendant class that TCustomRichEdit can use, convert the text from RTF format.

Note:	ConvertWriteStream should reverse the conversion that ConvertReadStream makes.


Hierarchy

TObject

TConversion


TConvTypeFactor
 VCL Reference

TConvTypeFactor

Hierarchy	Properties	Methods	See also

TConvTypeFactor describes a single registered conversion type (measurement unit) that differs from its family’s base units by a simple conversion factor.

Unit

ConvUtils

Description

The global RegisterConversionType function creates a TConvTypeFactor instance automatically when you register a conversion type by supplying a conversion factor. TConvTypeFactor implements the FromCommon and ToCommon methods to perform their conversions by using a conversion factor that is the value of the Factor property.

There is no need to use TConvTypeFactor directly. To register a conversion type that uses a simple conversion factor, call RegisterConversionType using the syntax that supplies a conversion factor.

You can, however, use TConvTypeFactor as a base class when implementing your own conversion type that performs addition actions beyond a conversion factor. For example, you could write a class that multiplies by a conversion factor and then shifts the zero point by adding a constant.


 VCL Reference

TConvTypeFactor properties

TConvTypeFactor	Alphabetically	Legend

In TConvTypeFactor

Factor

Derived from TConvTypeInfo

ConvFamily

ConvType

Description


 VCL Reference

TConvTypeFactor properties

TConvTypeFactor	By object	Legend

ConvFamily

ConvType

Description

Factor


TConvTypeFactor.Factor
 VCL Reference

TConvTypeFactor.Factor

TConvTypeFactor	See also

Specifies the conversion factor that converts from the conversion type into the base units of the conversion family.

property Factor: double;

Description

Factor is the conversion factor that defines the relationship between this conversion type and the base units of its conversion family. The ToCommon method multiplies a measurement made using this conversion type to obtain the corresponding value that uses the base units for the conversion family. The FromCommon method divides a measurement made using the base units for the conversion family to obtain the corresponding value expressed using this conversion unit.


 VCL Reference

TConvTypeFactor methods

TConvTypeFactor	Alphabetically	Legend

In TConvTypeFactor

Create

FromCommon

ToCommon

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConvTypeFactor methods

TConvTypeFactor	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

FromCommon

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ToCommon


TConvTypeFactor.Create
 VCL Reference

TConvTypeFactor.Create

TConvTypeFactor	See also

Creates an instance of TConvTypeFactor.

constructor Create(const AConvFamily: TConvFamily; const ADescription: string; const AFactor: Double);

Description

Call Create to instantiate a TConvTypeFactor descendant at runtime. This descendant can then be passed to the RegisterConversionType function in order to register a new conversion type. There is no need to instantiate TConvTypeFactor instances directly, because the RegisterConversionType function creates a new TConvTypeFactor instance when you register a conversion type by specifying a conversion factor.

Create assigns the AFactor parameter to the Factor property, the AConvFamily parameter to the ConvFamily property, and the ADescription parameter to the Description property.

If AFactor is zero, Create raises an EZeroDivide exception. If AConvFamily is not the identifier of a registered conversion family, Create raises an EConversionError exception.


TConvTypeFactor.FromCommon
 VCL Reference

TConvTypeFactor.FromCommon

TConvTypeFactor	See also

Converts measurements in the base unit for the conversion family into the units represented by this conversion type.

function FromCommon(const AValue: Double): Double; virtual; override;

Description

FromCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeFactor instance to obtain the measurement in the base units of the conversion family, and then calls the FromCommon method of the destination conversion type’s TConvTypeFactor instance to obtain the measurement in the destination units.

AValue is a value expressed in the base units of the conversion family.

FromCommon divides AValue by the value of the Factor property and returns the result.


TConvTypeFactor.ToCommon
 VCL Reference

TConvTypeFactor.ToCommon

TConvTypeFactor	See also

Converts measurements in the units represented by this conversion type to the base units of the conversion family.

function ToCommon(const AValue: Double): Double; virtual; override;

Description

ToCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeFactor instance to obtain the measurement in the base units of the conversion family, and then calls the ToCommon method of the destination conversion type’s TConvTypeFactor instance to obtain the measurement in the destination units.

AValue is a value expressed in the units represented by this conversion type.

ToCommon multiplies AValue by the value of the Factor property and returns the result.


Hierarchy

TObject

TConvTypeFactor


TConvTypeInfo
 VCL Reference

TConvTypeInfo

Hierarchy	Properties	Methods	See also

TConvTypeInfo describes a single registered conversion type (measurement unit).

Unit

ConvUtils

Description

TConvTypeInfo contains information about a conversion type, including

The ConvFamily property, which indicates the conversion family to which the conversion type belongs.

The ConvType property, which is the TConvType identifier for the conversion type.

The Description property, which is a human-readable description of the conversion type.

In addition, each TConvTypeInfo instance defines two methods for converting between the conversion type and the base units of its conversion family. These methods are abstract in TConvTypeInfo, and implemented by the descendant classes created by the RegisterConversionType function.

When you call RegisterConversionType to register a new conversion type (measurement unit), you can describe the new unit in one of three ways:

Specify the conversion family, a description, and supply a factor for converting from the new type to the base units of the conversion family.

Specify the conversion family, a description, and supply two methods for converting between the new type and the base units of the conversion family.

Provide a TConvTypeInfo descendant whose properties describe the conversion family and description and whose methods convert between the new type and the base units of the conversion family.

If you choose either of the first two methods, RegisterConversionType creates a special TConvTypeInfo descendant to represent the new conversion type.

By creating your own TConvTypeInfo descendant, you can make use of a common conversion scheme that relies only on a simple parameterized conversion method rather than creating many nearly identical conversion functions, one for each conversion type. Thus, for example, the TConvTypeFactor class, which is created automatically when you register a conversion type by specifying a conversion factor, implements the FromCommon and ToCommon methods only once, using a property to specify the conversion factor.


 VCL Reference

TConvTypeInfo properties

TConvTypeInfo	Alphabetically	Legend

In TConvTypeInfo

ConvFamily

ConvType

Description


 VCL Reference

TConvTypeInfo properties

TConvTypeInfo	By object	Legend

ConvFamily

ConvType

Description


TConvTypeInfo.ConvFamily
 VCL Reference

TConvTypeInfo.ConvFamily

TConvTypeInfo	See also

Identifies the conversion family to which the conversion type belongs.

property ConvFamily: TConvFamily;

Description

ConvFamily is the identifier for the conversion family to which the conversion type belong. The RegisterConversionType function associates each conversion type with its family.

Measurements in the units represented by the conversion type can be converted to any other conversion type in the same family.


TConvTypeInfo.ConvType
 VCL Reference

TConvTypeInfo.ConvType

TConvTypeInfo	See also

Indicates the registered identifier for the conversion type.

property ConvType: TConvType;

Description

ConvType is the identifier for the conversion type described by this TConvTypeInfo instance. It is generated by the RegisterConversionType function to uniquely identify the conversion type (measurement unit).


TConvTypeInfo.Description
 VCL Reference

TConvTypeInfo.Description

TConvTypeInfo	See also

Names the measurement unit represented by the conversion type.

property Description: string;

Description

Description is the descriptive name supplied for the conversion type when it is registered. Typically, this is the name of a type of measurement unit. For example, the Description for the tuFortnights conversion type is ‘Fortnights’.


 VCL Reference

TConvTypeInfo methods

TConvTypeInfo	Alphabetically	Legend

In TConvTypeInfo

Create

FromCommon

ToCommon

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConvTypeInfo methods

TConvTypeInfo	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

FromCommon

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ToCommon


TConvTypeInfo.Create
 VCL Reference

TConvTypeInfo.Create

TConvTypeInfo	See also

Creates an instance of TConvTypeInfo.

constructor Create(const AConvFamily: TConvFamily; const ADescription: string);

Description

Call Create to instantiate a TConvTypeInfo descendant at runtime. This descendant can then be passed to the RegisterConversionType function in order to register a new conversion type.

Create assigns the AConvFamily parameter to the ConvFamily property and the ADescription parameter to the Description property. If AConvFamily is not the identifier of a registered conversion family, Create raises an EConversionError exception.


TConvTypeInfo.FromCommon
 VCL Reference

TConvTypeInfo.FromCommon

TConvTypeInfo	See also

Converts measurements in the base unit for the conversion family into the units represented by this conversion type.

function FromCommon(const AValue: Double): Double; virtual; abstract;

Description

FromCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeInfo instance to obtain the measurement in the base units of the conversion family, and then calls the FromCommon method of the destination conversion type’s TConvTypeInfo instance to obtain the measurement in the destination units.

TConvTypeInfo introduces FromCommon as an abstract method. Descendant classes implement this method to perform the conversion from the base units of a conversion family into the measurement units represented by this conversion type.


TConvTypeInfo.ToCommon
 VCL Reference

TConvTypeInfo.ToCommon

TConvTypeInfo	See also

Converts measurements in the units represented by this conversion type to the base units of the conversion family.

function ToCommon(const AValue: Double): Double; virtual; abstract;

Description

ToCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeInfo instance to obtain the measurement in the base units of the conversion family, and then calls the ToCommon method of the destination conversion type’s TConvTypeInfo instance to obtain the measurement in the destination units.

TConvTypeInfo introduces ToCommon as an abstract method. Descendant classes implement this method to perform the conversion from the units represented by this conversion type to the base units of its conversion family.


Hierarchy

TObject

TConvTypeInfo


TConvTypeProcs
 VCL Reference

TConvTypeProcs

Hierarchy	Properties	Methods	See also

TConvTypeProcs describes a single registered conversion type (measurement unit) that is registered by supplying conversion methods.

Unit

ConvUtils

Description

The global RegisterConversionType function creates a TConvTypeProcs instance automatically when you register a conversion type by supplying functions to convert between the that type and the base units in its conversion family. TConvTypeProcs implements the FromCommon and ToCommon methods to perform their conversions by using the functions supplied to its constructor.

There is no need to use TConvTypeProcs directly. To register a conversion type that uses custom conversion functions, call RegisterConversionType using the syntax that supplies two conversion functions.

You can, however, use TConvTypeProcs as a base class when implementing your own conversion type that performs addition common actions before or after the custom conversion procedure. For example, you could write a class that always rounds the result to a specified number of decimal places after a conversion is computed using the supplied functions.


 VCL Reference

TConvTypeProcs properties

TConvTypeProcs	Alphabetically	Legend

Derived from TConvTypeInfo

ConvFamily

ConvType

Description


 VCL Reference

TConvTypeProcs properties

TConvTypeProcs	By object	Legend

ConvFamily

ConvType

Description


 VCL Reference

TConvTypeProcs methods

TConvTypeProcs	Alphabetically	Legend

In TConvTypeProcs

Create

FromCommon

ToCommon

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TConvTypeProcs methods

TConvTypeProcs	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

FromCommon

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ToCommon


TConvTypeProcs.Create
 VCL Reference

TConvTypeProcs.Create

TConvTypeProcs	See also

Creates an instance of TConvTypeProcs.

constructorCreate(const AConvFamily: TConvFamily; const ADescription: string; const AToCommonProc, AFromCommonProc: TConversionProc);

Description

Call Create to instantiate a TConvTypeProcs descendant at runtime. This descendant can then be passed to the RegisterConversionType function in order to register a new conversion type. There is no need to instantiate TConvTypeProcs instances directly, because the RegisterConversionType function creates a new TConvTypeProcs instance when you register a conversion type by specifying two conversion functions.

Create assigns the AConvFamily parameter to the ConvFamily property, and the ADescription parameter to the Description property. It saves the AToCommonProc and AFromCommonProc parameters, which it then uses to implement the FromCommon and ToCommon methods.

If AConvFamily is not the identifier of a registered conversion family, Create raises an EConversionError exception.


TConvTypeProcs.FromCommon
 VCL Reference

TConvTypeProcs.FromCommon

TConvTypeProcs	See also

Converts measurements in the base unit for the conversion family into the units represented by this conversion type.

function FromCommon(const AValue: Double): Double; virtual; override;

Description

FromCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeProcs instance to obtain the measurement in the base units of the conversion family, and then calls the FromCommon method of the destination conversion type’s TConvTypeProcs instance to obtain the measurement in the destination units.

AValue is a value expressed in the base units of the conversion family.

FromCommon executes the AFromCommonProc function that was supplied to the constructor.


TConvTypeProcs.ToCommon
 VCL Reference

TConvTypeProcs.ToCommon

TConvTypeProcs	See also

Converts measurements in the units represented by this conversion type to the base units of the conversion family.

function ToCommon(const AValue: Double): Double; virtual; override;

Description

ToCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type’s TConvTypeProcs instance to obtain the measurement in the base units of the conversion family, and then calls the ToCommon method of the destination conversion type’s TConvTypeProcs instance to obtain the measurement in the destination units.

AValue is a value expressed in the units represented by this conversion type.

ToCommon executes the AToCommonProc function that was supplied to the constructor.


Hierarchy

TObject

TConvTypeProcs


TCoolBar
 VCL Reference

 TCoolBar

Hierarchy	Properties	Methods	Events	Using TCoolBar	See also

TCoolBar displays a collection of windowed controls within movable, resizable bands.

Unit

ComCtrls

Description

A TCoolBar contains child controls that can be moved and resized independently. Each control resides on an individual band, represented by a TCoolBand object listed in the Bands property. The user positions the controls by dragging the sizing grip to the left of each band.

The component that TCoolBar represents is sometimes referred to as a rebar.

A TCoolBar can contain objects that do not descend from TWinControl, such as TLabel or TSpeedButton. Only TWinControl descendants, however, appear on resizable bands.

To create a coolbar that acts as a docking site for tool bars and other controls, use TControlBar instead.

Note:	TCoolBar requires version 4.70 or later of COMCTL32.DLL. This file, which usually resides in the WINDOWS\SYSTEM or WINDOWS\SYSTEM32 directory, is required at both design time and runtime. Contact Microsoft for information about deploying COMCTL32.DLL.

Note:	See the Webbrows demo in the coolstuf directory for an example of using TCoolbar.


 VCL Reference

TCoolBar properties

TCoolBar	Alphabetically	Legend

In TCoolBar

Align

BandBorderStyle

BandMaximize

Bands

Bitmap

Constraints

DockSite

DragKind

FixedOrder

FixedSize

Images

ShowText

Vertical

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCoolBar properties

TCoolBar	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoSize

BandBorderStyle

BandMaximize

Bands

BiDiMode

Bitmap

BorderWidth

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

EdgeBorders

EdgeInner

EdgeOuter

Enabled

FixedOrder

FixedSize

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Images

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

ShowText

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Vertical

Visible

VisibleDockClientCount

Width

WindowProc


TCoolBar.Align
 VCL Reference

 TCoolBar.Align

TCoolBar	See also

Determines the alignment of the TCoolBar component.

property Align: TAlign;

Description

Use Align to align the coolbar to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the cool bar changes.

Setting Align to alLeft or alRight automatically sets Vertical to True (causing bands to be arranged vertically). Setting Align to alTop, alBottom, alClient, or alNone automatically sets Vertical to False.


TCoolBar.BandBorderStyle
 VCL Reference

 TCoolBar.BandBorderStyle

TCoolBar	See also

Determines the border style of the bands in the TCoolBar.

property BandBorderStyle: TBorderStyle;

Description

If BandBorderStyle is bsSingle, each band in the TCoolBar has a single line around it. If BandBorderStyle is bsNone, the bands have no borders.

Note:	BandBorderStyle takes precedence over the BorderStyle property on individual cool bands. Thus, when a coolband resides in a cool bar control, its BorderStyle property has no effect.


TCoolBar.BandMaximize
 VCL Reference

TCoolBar.BandMaximize

TCoolBar	See also

Specifies the conditions under which a TCoolBand is maximized.

property BandMaximize: TCoolBandMaximize;

Description

Use BandMaximize to determine the user actions that maximize individual bands. When a band is maximized, it takes up as much space as possible in its row or column.

Note:	Users can’t maximize fixed-size bands.


TCoolBar.Bands
 VCL Reference

 TCoolBar.Bands

TCoolBar	See also 	Example

Lists the bands (TCoolBands) of the coolbar.

property Bands: TCoolBands;

Description

The Bands property holds a TCoolBands—that is, a collection of TCoolBand objects. At design time, you can add, remove, or modify bands with the Bands editor. To open the Bands editor, select the Bands property in the Object Inspector, then double-click in the Value column to the right or click the ellipsis (...) button.

You can also create bands simply by adding new windowed controls from the palette. When any TWinControl descendant is placed on the form as a child of the TCoolBar, a new band is created for it.


TCoolBar.Bitmap
 VCL Reference

 TCoolBar.Bitmap

TCoolBar	See also

Specifies the image that appears behind the bands in the TCoolBar.

property Bitmap: TBitmap;

Description

Bitmap holds a TBitmap object. It determines the image that appears behind the bands in the TCoolBar.

By default, the Bitmap image is positioned relative to the upper left corner of the TCoolBar and covers the client area, where the transparent bands allow it to display without occlusion. Setting the FixedBackground, Bitmap, or ParentBitmap properties of TCoolBand can modify this appearance.


TCoolBar.FixedOrder
 VCL Reference

 TCoolBar.FixedOrder

TCoolBar	See also

Determines whether the user can reorder the bands in the TCoolBar.

property FixedOrder: Boolean;

Description

If FixedOrder is set to True, the user can reposition the bands by dragging them with the mouse, but cannot change their order. Bands can still be reordered from the Collection editor at design time, or by changing their Index properties in program code.


TCoolBar.FixedSize
 VCL Reference

 TCoolBar.FixedSize

TCoolBar	See also

Determines whether the bands automatically maintain a uniform height (or width).

property FixedHeight: Boolean;

Description

Ordinarily, when Vertical and FixedSize are both False, the height of each TCoolBand is determined by the height of the windowed control linked to it. (If there is no TWinControl component linked to a band, its height is determined by the text it contains.) When FixedSize is True, the bands are resized so that they all have the same height; increasing the height of the tallest visible band automatically increases the height of all the other bands.

When Vertical is True, these dependencies are switched. As long as FixedSize is False, the width of each band is determined by the width of the windowed control linked to it. If FixedSize and Vertical are both set to True, the bands maintain the same width; increasing the width of the widest visible band automatically increases the width of all the other bands.


TCoolBar.Images
 VCL Reference

 TCoolBar.Images

TCoolBar	See also

Lists images available for bands in the TCoolBar.

property Images: TCustomImageList;

Description

Images is a list of bitmaps that can be displayed to the left of any band in the TCoolBar. Each band can specify an image from this list by setting its ImageIndex property.


TCoolBar.ShowText
 VCL Reference

 TCoolBar.ShowText

TCoolBar	See also

Determines whether text is displayed on the bands.

property ShowText: Boolean;

Description

If ShowText is True, the Text string of each TCoolBand is displayed on the band at runtime. If ShowText is False, only the TWinControl linked to the band is displayed.


TCoolBar.Vertical
 VCL Reference

 TCoolBar.Vertical

TCoolBar	See also

Determines whether the bands are arranged vertically or horizontally.

property Vertical: Boolean;

Description

If Vertical is False (the default), the bands in the TCoolBar are oriented horizontally, from left to right and top to bottom. If Vertical is True, the bands are oriented vertically, from top to bottom and left to right.


 VCL Reference

TCoolBar events

TCoolBar	Alphabetically	Legend

In TCoolBar

OnChange

Derived from TWinControl

OnDockDrop

OnDockOver

OnGetSiteInfo

OnUnDock

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TCoolBar events

TCoolBar	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


TCoolBar.OnChange
 VCL Reference

 TCoolBar.OnChange

TCoolBar	See also

Occurs when the position or size of a band changes.

property OnChange: TNotifyEvent;

Description

The OnChange event occurs whenever a TCoolBand’s Break, Index, or Width property is modified at runtime. An OnChange event handler can be used, for example, to record the positions and sizes of the bands in the Windows registry.


 VCL Reference

TCoolBar methods

TCoolBar	Alphabetically	Legend

In TCoolBar

Create

Destroy

FlipChildren

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCoolBar methods

TCoolBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCoolBar.Create
 VCL Reference

 TCoolBar.Create

TCoolBar	See also	Example

Creates and initializes a TCoolBar instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a cool bar at runtime. Cool bars added at design time are created automatically.

AOwner is the component that is responsible for freeing the cool bar instance. Typically, this is the form. It becomes the value of the Owner property.

Create generates a TCoolBar object and initializes its properties. If COMCTL32.DLL cannot be found, Create raises the EComponentError exception.


TCoolBar.Destroy
 VCL Reference

 TCoolBar.Destroy

TCoolBar	See also

Destroys the TCoolBar instance and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the coolbar reference is not nil, and only then calls Destroy.


TCoolBar.FlipChildren
 VCL Reference

TCoolBar.FlipChildren

TCoolBar	See also

Flips the control’s children.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren overrides the inherited method in order to prevent the flipping of the control bar’s children.

Applications call FlipChildren to flip the control’s children; that is, to move children on the left side of the control to the right side and vice versa. If an application calls the FlipChildren method of the cool bar’s parent, passing in True for the AllLevels parameter, then the cool bar’s FlipChildren method is called along with the FlipChildren method of any sibling controls. Because of their special nature, cool bar controls do not respond to the FlipChildren command.

Note:	FlipChildren does the same thing as the Flip Children command on the context menu in the IDE.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TCoolBar


TCoolBand
 VCL Reference

TCoolBand

Hierarchy	Properties	Methods	See also

TCoolBand represents a band within a TCoolBar.

Unit

ComCtrls

Description

Use TCoolBand to access one of the resizable bands in a cool bar object. Each TCoolBar uses TCoolBands to maintain a collection of TCoolBand objects.


 VCL Reference

TCoolBand properties

TCoolBand	Alphabetically	Legend

In TCoolBand

Bitmap

BorderStyle

Break

Color

Control

FixedBackground

FixedSize

Height

HorizontalOnly

ImageIndex

MinHeight

MinWidth

ParentBitmap

ParentColor

Text

Visible

Width

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TCoolBand properties

TCoolBand	By object	Legend

Bitmap

BorderStyle

Break

Collection

Color

Control

DisplayName

FixedBackground

FixedSize

Height

HorizontalOnly

ID

ImageIndex

Index

MinHeight

MinWidth

ParentBitmap

ParentColor

Text

Visible

Width


TCoolBand.Bitmap
 VCL Reference

TCoolBand.Bitmap

TCoolBand	See also

Specifies the background image displayed on the band.

property Bitmap: TBitmap;

Description

Use the Bitmap property to select the image that appears on the band. The image is repeated so that it covers the band like wallpaper.

Setting the Bitmap property in the Object Inspector automatically sets ParentBitmap to False.


TCoolBand.BorderStyle
 VCL Reference

TCoolBand.BorderStyle

TCoolBand	See also

Specifies the border style for the band.

property BorderStyle: TBorderStyle;

Description

If BorderStyle is set to the default bsSingle, the band has a single-line border. If BorderStyle is set to bsNone, no border appears around the band.

Note: If the cool band resides in a coolbar control, the coolbar’s BandBorderStyle property takes precedence over BorderStyle.


TCoolBand.Break
 VCL Reference

TCoolBand.Break

TCoolBand

Causes the band to start on a new line.

property Break: Boolean;

Description

If Break is True (the default), the band starts a new line at the left side of the TCoolBar control. If Break is False, the band continues on the same line as its predecessor.


TCoolBand.Color
 VCL Reference

TCoolBand.Color

TCoolBand	See also

Specifies the color of the band.

property Color: TColor;

Description

Use the Color property to select the color of the band. Setting Color in the Object Inspector automatically sets ParentColor to False.


TCoolBand.Control
 VCL Reference

TCoolBand.Control

TCoolBand

Specifies the control that appears on the band.

property Control: TWinControl;

Description

The Control property indicates the windowed control that appears on the band. If Control is unassigned, there is no control associated with the band.


TCoolBand.FixedBackground
 VCL Reference

TCoolBand.FixedBackground

TCoolBand	See also

Determines whether the background is realigned within the band.

property FixedBackground: Boolean;

Description

If ParentBitmap is True, the band displays the same background as the TCoolBar that owns it. Ordinarily, when FixedBackground is True, that background is continuous over the entire TCoolBar. Setting FixedBackground to False realigns the background within the individual band, so that the TCoolBar’s Bitmap image is positioned relative to the upper left corner of the band.


TCoolBand.FixedSize
 VCL Reference

TCoolBand.FixedSize

TCoolBand	See also

Determines whether the band can be resized at runtime.

property FixedSize: Boolean;

Description

Setting FixedSize to True prevents the user from resizing the band.


TCoolBand.Height
 VCL Reference

TCoolBand.Height

TCoolBand

Returns the height of the cool band.

property Height: Integer;

Description

Use Height to get the height of the CoolBand


TCoolBand.HorizontalOnly
 VCL Reference

TCoolBand.HorizontalOnly

TCoolBand	See also

Determines whether the band is displayed when the TCoolBar is arranged vertically.

property HorizontalOnly: Boolean;

Description

If the Vertical property of TCoolBar is True, setting HorizontalOnly to True hides the band. When TCoolBar’s Vertical property is False, HorizontalOnly has no effect.


TCoolBand.ImageIndex
 VCL Reference

TCoolBand.ImageIndex

TCoolBand	See also

Determines the image (from the TCoolBar.Images list) that appears on the band.

property ImageIndex: TImageIndex;

Description

The Images property of TCoolBar contains a list of bitmaps that can appear to the left of any band in the TCoolBar. To select a bitmap from the list, assign a value to the band’s ImageIndex property.


TCoolBand.MinHeight
 VCL Reference

TCoolBand.MinHeight

TCoolBand	See also

Determines the minimum height for the band.

property MinHeight: Integer;

Description

The MinHeight property determines the smallest height to which the band can be resized at runtime.


TCoolBand.MinWidth
 VCL Reference

TCoolBand.MinWidth

TCoolBand	See also

Determines the minimum width for the band.

property MinWidth: Integer;

Description

The MinWidth property determines the smallest width to which the band can be resized at runtime.


TCoolBand.ParentBitmap
 VCL Reference

TCoolBand.ParentBitmap

TCoolBand	See also

Determines whether the band uses the Bitmap image of the TCoolBar that owns it.

property ParentBitmap: Boolean;

Description

If ParentBitmap is set to true, the band displays the same background image as the TCoolBar it belongs to (determined by the TCoolBar’s Bitmap property). Setting the band’s Bitmap property in the Object Inspector automatically sets ParentBitmap to False.


TCoolBand.ParentColor
 VCL Reference

TCoolBand.ParentColor

TCoolBand	See also

Determines whether the band uses the color of the TCoolBar that owns it.

property ParentColor: Boolean;

Description

If ParentColor is True, the band has the same color as the TCoolBar that owns it. Setting the Color property in the Object Inspector automatically sets ParentColor to False.


TCoolBand.Text
 VCL Reference

TCoolBand.Text

TCoolBand	See also 	Example

Specifies the text string that appears on the band and identifies it in the Bands editor.

property Text: string;

Description

Assign a value to Text to create text that appears on the band to the left of the band’s windowed control.


TCoolBand.Visible
 VCL Reference

TCoolBand.Visible

TCoolBand

Determines whether the band appears at runtime.

property Visible: Boolean;

Description

Use the Visible property to control the visibility of the band at runtime. If Visible is True, the band appears on the form; if Visible is False, it does not.


TCoolBand.Width
 VCL Reference

TCoolBand.Width

TCoolBand	See also

Specifies the width of the band.

property Width: Integer;

Description

The Width property indicates the width of the band, in pixels.


 VCL Reference

TCoolBand methods

TCoolBand	Alphabetically	Legend

In TCoolBand

Assign

Create

Destroy

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCoolBand methods

TCoolBand	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TCoolBand.Assign
 VCL Reference

TCoolBand.Assign

TCoolBand	See also

Copies the properties of one band to another.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the Text and Width properties of the source band to the band where Assign is called.


TCoolBand.Create
 VCL Reference

TCoolBand.Create

TCoolBand

Creates and initializes a TCoolBand instance.

constructor Create(Collection: TCollection); override;

Description

Create generates a TCoolBand and initializes its properties.


TCoolBand.Destroy
 VCL Reference

TCoolBand.Destroy

TCoolBand	See also

Destroys the TCoolBand and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the band is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TCollectionItem

TCoolBand


TCustomActionList
 VCL Reference

TCustomActionList

Hierarchy	Properties	Methods	Events	See also

TCustomActionList is the base class for action list objects that manage a set of actions.

Unit

ActnList

Description

Action lists manage a collection of action objects so that they are available to the components in an application. These action objects centralize the response of the application to user input, and update the properties of all controls that trigger that response.

TCustomActionList descendants provide the user interface for working with actions at design time. These include TActionList, which lets you set up actions using the action list editor, and TActionManager, which lets you configure actions using the customize dialog.

Action lists maintain a list of actions that can be grouped by category. Actions in an action list are TContainedAction or descendant types.


 VCL Reference

TCustomActionList properties

TCustomActionList	Alphabetically	Legend

In TCustomActionList

ActionCount

Actions

Images

State

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomActionList properties

TCustomActionList	By object	Legend

ActionCount

Actions

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Images

Name

Owner

State

Tag

VCLComObject


TCustomActionList.Actions
 VCL Reference

TCustomActionList.Actions

TCustomActionList	See also

Lists the actions maintained by the action list.

property Actions[Index: Integer]: TContainedAction;

Description

Actions is an indexed property containing a list of the actions in the action list component.

Index identifies the action by index, where 0 is the index of the first action, 1 is the index of the second action, and so on. The upper limit for Index is given by the ActionCount property.


TCustomActionList.ActionCount
 VCL Reference

TCustomActionList.ActionCount

TCustomActionList	See also

Indicates the number of actions in the action list.

property ActionCount: Integer;

Description

ActionCount indicates how many actions are contained in the action list.


TCustomActionList.Images
 VCL Reference

TCustomActionList.Images

TCustomActionList	See also

Lists the images available for actions in the action list.

property Images: TCustomImageList;

Description

Images is a list of bitmaps that can be displayed to the left of any action in the action list. An action is associated with an image from this image list by its ImageIndex property. This image can then appear on client controls such as menu items, tool buttons, and so on.


TCustomActionList.State
 VCL Reference

TCustomActionList.State

TCustomActionList	See also

Indicates whether the actions in the action list respond when the user triggers a client object.

type TActionListState = (asNormal, asSuspended, asSuspendedEnabled);

property State: TActionListState;

Description

Use State to turn an action list on or off. State can have any of the following values:

Value	Meaning

asNormal	Actions perform their normal response when triggered by client objects or hotkeys.

asSuspended	The actions in the action list do not respond when client objects tell them to “fire”. The Enabled property for all actions in the list is unchanged.

asSuspendedEnabled	The actions in the action list do not respond when client objects tell them to “fire”. The Enabled property for all actions in the list is set to True.


 VCL Reference

TCustomActionList events

TCustomActionList	Alphabetically	Legend

In TCustomActionList

OnChange

OnExecute

OnUpdate


 VCL Reference

TCustomActionList events

TCustomActionList	By object	Legend

OnChange

OnExecute

OnUpdate


TCustomActionList.OnChange
 VCL Reference

TCustomActionList.OnChange

TCustomActionList

Occurs when a change occurs in the action list.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to update your application in response to changes in the action list. Changes to the action list that trigger an OnChange event include changes to an action category or to the action list’s image list.

Note:	The action list automatically informs the actions in the list when an OnChange event occurs. You need only provide an OnChange event handler for application-specific responses.


TCustomActionList.OnExecute
 VCL Reference

TCustomActionList.OnExecute

TCustomActionList	See also

Occurs when a client object triggers an action in the list.

property OnExecute: TActionEvent;

Description

Write an OnExecute event handler to respond when an action in the list fires.

When the user invokes a client object, the action list’s OnExecute event is the first event to occur in response. If the OnExecute event handler sets its Handled parameter to True, the action is considered handled, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class in response to the user action.

If the OnExecute event handler does not set its Handled parameter to True, the application’s OnActionExecute event occurs next. If the OnActionExecute event does not respond to the user input, the action object’s OnExecute event occurs. Finally, if the action does not have an OnExecute event handler, the application locates a target object and executes any predefined response implemented by the action object.


TCustomActionList.OnUpdate
 VCL Reference

TCustomActionList.OnUpdate

TCustomActionList	See also

Occurs when the application is idle so that the action list can update a specific action in the list.

property OnUpdate: TActionEvent;

Description

Write an OnUpdate event handler to configure the properties of a specified action in the list so that it reflects current conditions.

When the application is idle, it cycles through every action in turn giving it a chance to update itself to reflect current conditions. For each action, the first event to occur in this sequence is the action list’s OnUpdate event. If the OnUpdate event handler sets its Handled parameter to True, the action is considered updated, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class.

If the OnUpdate event handler does not set its Handled parameter to True, the application’s OnActionUpdate event occurs next. If the OnActionUpdate event does not update the action, the action object’s OnUpdate event occurs. Finally, if the action does not have an OnUpdate event handler, the application executes any predefined update method implemented by the action object.


 VCL Reference

TCustomActionList methods

TCustomActionList	Alphabetically	Legend

In TCustomActionList

AddAction

Change

Create

Destroy

ExecuteAction

GetChildren

IsShortCut

Notification

RemoveAction

SetChildOrder

SetImages

UpdateAction

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActionList methods

TCustomActionList	By object	Legend

AddAction

AfterConstruction

Assign

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsShortCut

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RemoveAction

RemoveComponent

RemoveFreeNotification

SafeCallException

SetChildOrder

SetImages

SetSubComponent

UpdateAction


TCustomActionList.AddAction
 VCL Reference

TCustomActionList.AddAction

TCustomActionList	See also

Adds an action to the list.

procedure AddAction(Action: TContainedAction);

Description

Applications can’t call this protected method. AddAction is used internally to add an action to the Actions property array.

To add an action to an action list, set the action’s ActionList property.


TCustomActionList.Change
 VCL Reference

TCustomActionList.Change

TCustomActionList	See also

Generates an OnChange event.

procedure Change; virtual;

Description

Change is called when a change, such as a modification to the categories of the actions in the list, occurs in the action list.

Change

1. Invokes an OnChange handler, if one has been assigned.

2. Informs all actions in the list that something has changed so that they can update themselves.


TCustomActionList.Create
 VCL Reference

TCustomActionList.Create

TCustomActionList	See also

Creates and initializes a TCustomActionList object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an action list at runtime. Action lists added to forms at design time are created automatically.

The AOwner parameter is the owner of the action list, typically this is a form or data module.


TCustomActionList.Destroy
 VCL Reference

TCustomActionList.Destroy

TCustomActionList	See also

Disposes of the instance of an action list object.

destructor Destroy; override;

Description

You normally do not need to call the destructor for an action list if it has an owner. The action list is destroyed automatically by its owner, which was passed to its constructor when it was created. In situations where the custom action list object needs to be manually destroyed, do so by calling its Free method.


TCustomActionList.ExecuteAction
 VCL Reference

TCustomActionList.ExecuteAction

TCustomActionList	See also

Generates an OnExecute event.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

Typically, applications do not call the ExecuteAction method. Instead, the action indicated by the Action parameter calls ExecuteAction in response to a user command. It is possible, however, to call ExecuteAction to generate an OnExecute event even though no client control has been triggered.

ExecuteAction invokes the OnExecute event handler for the action list. It returns True if the event handler handles the action, False otherwise.


TCustomActionList.GetChildren
 VCL Reference

TCustomActionList.GetChildren

TCustomActionList

Calls a specified method for each child action of the action list.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is used by the component streaming system. For each action in the action list, GetChildren calls the method passed in Proc. The actions are passed to the callback in the order that they are loaded or saved by the component streaming system.


TCustomActionList.IsShortCut
 VCL Reference

TCustomActionList.IsShortCut

TCustomActionList	See also

Evaluates an input key combination to determine whether it is a shortcut for one of the actions in the list.

function IsShortCut(var Message: TWMKey): Boolean;

Description

Typically, applications do not need to call IsShortCut. When the form’s IsShortCut method does not evaluate a shortcut key by some other means (such as an event handler), it calls IsShortCut for every associated action list until it finds one that can handle the shortcut.

The action list’s IsShortCut method, in turn, checks the specified keystroke against the ShortCut and SecondaryShortCuts properties of each action in the list. If it finds a match, it tells the action to handle the shortcut, and then returns True. If IsShortCut can’t find an action to handle the shortcut, it returns False.

Message encapsulates the Windows keystroke message that is to be checked to see if it is a shortcut.


TCustomActionList.Notification
 VCL Reference

TCustomActionList.Notification

TCustomActionList	See also

Responds to notifications when objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification notifies the action list that the component specified by AComponent is about to be inserted or removed, as specified by Operation. By default, components pass along the notification to their owned components, if any.

TCustomActionList overrides Notification to update the Images property when images from the list are destroyed and the Actions property when actions in the list are destroyed.


TCustomActionList.RemoveAction
 VCL Reference

TCustomActionList.RemoveAction

TCustomActionList	See also

Removes an action from the list.

procedure RemoveAction(Action: TContainedAction);

Description

Applications can’t call this protected method. RemoveAction is used internally to remove an action from the Actions property array. RemoveAction removes the action and sets its ActionList property to nil.

To remove an action from an action list, change the action’s ActionList property.


TCustomActionList.SetChildOrder
 VCL Reference

TCustomActionList.SetChildOrder

TCustomActionList	See also

Sets the order that actions are passed to a callback by the GetChildren method.

procedure SetChildOrder(Component: TComponent; Order: Integer); override;

Description

SetChildOrder specifies the order in which the component streaming system loads and saves the action components owned by this action list. It ensures that the actions are loaded and saved in the same order that they appear in the Actions property array. You should not need to call this method directly.


TCustomActionList.SetImages
 VCL Reference

TCustomActionList.SetImages

TCustomActionList	See also

Sets the value of the Images property.

procedure SetImages(Value: TCustomImageList); virtual;

Description

SetImages is the protected write implementation of the Images property. It registers the action list with the image list specified by Value so that it will be informed of any changes to the image list.


TCustomActionList.UpdateAction
 VCL Reference

TCustomActionList.UpdateAction

TCustomActionList	See also

Generates an OnUpdate event.

function UpdateAction(Action: TBasicAction): Boolean; override;

Description

Typically, applications do not call the UpdateAction method. Instead, the action indicated by the Action parameter calls UpdateAction when informed by the application that it can update itself. It is possible, however, to call UpdateAction to generate an OnUpdate event even though this has not been initiated by the application.

UpdateAction invokes the OnUpdate event handler for the action list. It returns True if the event handler updates the action, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TCustomActionList


TCustomStaticText
 VCL Reference

TCustomStaticText

Hierarchy	Properties	Methods	See also

TCustomStaticText is the base class for TStaticText.

Unit

StdCtrls

Description

TCustomStaticText is the base class for TStaticText, a windowed control that displays text on a form. This component functions like TLabel, except that it has a window handle.

TCustomStaticText cannot receive focus or contain other controls.


 VCL Reference

TCustomStaticText properties

TCustomStaticText	Alphabetically	Legend

In TCustomStaticText

Alignment

AutoSize

BorderStyle

FocusControl

ShowAccelChar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomStaticText properties

TCustomStaticText	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

AutoSize

BiDiMode

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

FocusControl

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowAccelChar

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomStaticText.Alignment
 VCL Reference

TCustomStaticText.Alignment

TCustomStaticText 	See also

Determines how text is aligned within the component.

property Alignment: TAlignment;

Description

The possible values of Alignment are

Value	Meaning

taLeftJustify	Text is aligned at the left of the control.

taCenter	Text is centered in the control.

taRightJustify	Text is aligned at the right of the control.


TCustomStaticText.AutoSize
 VCL Reference

TCustomStaticText.AutoSize

TCustomStaticText	See also

Determines whether the component is automatically resized to accommodate its text.

property AutoSize: Boolean;

Description

If AutoSize is True, the component is automatically resized—at runtime and design time—whenever the font size or Caption text changes.


TCustomStaticText.BorderStyle
 VCL Reference

TCustomStaticText.BorderStyle

TCustomStaticText

Determines the appearance of the control’s border.

type TStaticBorderStyle = (sbsNone, sbsSingle, sbsSunken);

property BorderStyle: TStaticBorderStyle;

Description

The possible values of BorderStyle are

Value	Meaning

sbsNone	No visible border.

sbsSingle	Single-line border.

sbsSunken	Raised border.


TCustomStaticText.FocusControl
 VCL Reference

TCustomStaticText.FocusControl

TCustomStaticText	See also

Links the component with another windowed control.

property FocusControl: TWinControl;

Description

Use the FocusControl property to link the TCustomStaticText instance with another windowed control. If the text of Caption includes an accelerator key, the component specified by FocusControl receives focus when the accelerator is pressed.


TCustomStaticText.ShowAccelChar
 VCL Reference

TCustomStaticText.ShowAccelChar

TCustomStaticText	See also

Enables accelerator characters.

property ShowAccelChar: Boolean;

Description

If ShowAccelChar is True, an ampersand in the component’s Caption text appears as an underline and makes the character after it into an accelerator key. If ShowAccelChar is False, ampersands appear as ampersands.


 VCL Reference

TCustomStaticText methods

TCustomStaticText	Alphabetically	Legend

In TCustomStaticText

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomStaticText methods

TCustomStaticText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomStaticText.Create
 VCL Reference

TCustomStaticText.Create

TCustomStaticText	See also

Creates and initializes a TCustomStaticText instance.

constructor Create(AOwner: TComponent); override;

Description

Create calls the inherited constructor method, then initializes the TCustomStaticText instance by adding the following flags to ControlStyle: csCaptureMouse, csClickEvents, csSetCaption, csOpaque, csReplicatable, csDoubleClicks. Create also sets AutoSize and ShowAccelChar to True.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomStaticText


TCustomVariantType
 VCL Reference

TCustomVariantType

Hierarchy	Properties	Methods	Using TCustomVariantType	See also

TCustomVariantType is the base class for custom variant types.

Unit

Variants

Description

Use TCustomVariantType to define new data types for Object Pascal Variants. TCustomVariantType descendants do not represent the Variants themselves. Rather, they act as utility classes that the custom Variants call on to perform their operations.

To create a Variant type,

1.	Map the storage of the Variant’s data on to the TVarDatarecord.

2.	Write a method that creates instances of your custom Variant. This fills in the Variant’s data as defined in step 1.

3.	Declare a class that descends from TCustomVariantType.

4.	Implement all required behavior (including type conversion rules) in the new class. This involves overriding the appropriate virtual methods (typically BinaryOp, UnaryOp, CompareOp or Compare, Cast, CastTo, Clear, Copy, IsClear, LeftPromotion, and RightPromotion).

5.	In the initialization section of the unit that defines your TCustomVariantType descendant, create an instance of your class. When you instantiate your object, it automatically registers itself with the Variant-handling system so that the new Variant type is enabled.

6.	In the finalization section of the unit that defines your TCustomVariantType descendant, free the instance of your class. This automatically unregisters the Variant type.

For an example, see the VarCmplx unit, which implements a custom Variant type for complex numbers.

Tip:	To create a custom Variant that allows users to call methods or procedures and to get or set property values, use TInvokeableVariantType as a base class instead.


 VCL Reference

TCustomVariantType properties

TCustomVariantType	Alphabetically	Legend

In TCustomVariantType

VarType


 VCL Reference

TCustomVariantType properties

TCustomVariantType	By object	Legend

VarType


TCustomVariantType.VarType
 VCL Reference

TCustomVariantType.VarType

TCustomVariantType	See also

Indicates the Variant type code for the custom Variant type.

property VarType: TVarType;

Description

Each Variant type has a unique identifier, called the type code, that indicates what type of data it stores. The VarType property provides read-only access to the type code that identifies a custom Variant type.

The value of VarType is set in the constructor. This can be an automatically generated value, or it can be a value explicitly passed to the constructor. Note that if the VarType is automatically-generated, it may not remain the same for every application that uses the custom Variant type: its value will depend on the other custom Variants also used in the application.


 VCL Reference

TCustomVariantType methods

TCustomVariantType	Alphabetically	Legend

In TCustomVariantType

_AddRef

_Release

BinaryOp

Cast

CastTo

CastToOle

Clear

Compare

CompareOp

Copy

Create

Destroy

DispInvoke

IsClear

LeftPromotion

OlePromotion

QueryInterface

RaiseCastError

RaiseDispError

RaiseInvalidOp

RightPromotion

SimplisticClear

SimplisticCopy

UnaryOp

VarDataCast

VarDataCastTo

VarDataCastToOleStr

VarDataClear

VarDataCopy

VarDataCopyNoInd

VarDataFromOleStr

VarDataFromStr

VarDataInit

VarDataIsArray

VarDataIsByRef

VarDataIsEmptyParam

VarDataIsFloat

VarDataIsNumeric

VarDataIsOrdinal

VarDataIsStr

VarDataToStr

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomVariantType methods

TCustomVariantType	By object	Legend

_AddRef

_Release

AfterConstruction

BeforeDestruction

BinaryOp

Cast

CastTo

CastToOle

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Compare

CompareOp

Copy

Create

DefaultHandler

Destroy

Dispatch

DispInvoke

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsClear

LeftPromotion

MethodAddress

MethodName

NewInstance

OlePromotion

QueryInterface

RaiseCastError

RaiseDispError

RaiseInvalidOp

RightPromotion

SafeCallException

SimplisticClear

SimplisticCopy

UnaryOp

VarDataCast

VarDataCastTo

VarDataCastToOleStr

VarDataClear

VarDataCopy

VarDataCopyNoInd

VarDataFromOleStr

VarDataFromStr

VarDataInit

VarDataIsArray

VarDataIsByRef

VarDataIsEmptyParam

VarDataIsFloat

VarDataIsNumeric

VarDataIsOrdinal

VarDataIsStr

VarDataToStr


TCustomVariantType._AddRef
 VCL Reference

TCustomVariantType._AddRef

TCustomVariantType	See also

Responds when the caller acquires a reference to this object’s interface.

function _AddRef: Integer; stdcall;

Description

When an application uses an interface that is implemented by TCustomVariantType or one of its descendants, it automatically calls _AddRef. Typically, interfaced objects use the _AddRef method to increment a reference count, which is then decremented when the application releases the interface. In this typical scenario, when the reference count drops to zero, the object frees itself.

TCustomVariantType implements its own version of the IInterface methods _AddRef and _Release that avoid this typical behavior. An application should have only a single instance of TCustomVariantType, and that instance should not be auto-freed when it is not in use. Thus, TCustomVariantType implements _AddRef so that it always returns –1.


TCustomVariantType._Release
 VCL Reference

TCustomVariantType._Release

TCustomVariantType	See also

Responds when the caller releases a reference to this object’s interface.

function _Release: Integer; stdcall;

Description

When an application releases an interface that is implemented by TCustomVariantType or one of its descendants, it automatically calls _Release. Typically, interfaced objects use the _Release method to decrement a reference count. When the reference count drops to zero, the object is automatically freed.

TCustomVariantType implements its own version of the IInterface methods _AddRef and _Release that avoid this typical behavior. An application should have only a single instance of TCustomVariantType, and that instance should not be auto-freed when it is not in use. Thus, TCustomVariantType implements _Release so that it always returns –1.


TCustomVariantType.BinaryOp
 VCL Reference

TCustomVariantType.BinaryOp

TCustomVariantType	See also

Implements any binary operations of which the custom Variant type is capable.

procedure BinaryOp(var Left: TVarData; const Right: TVarData; const Operator: TVarOp); virtual;

Description

Override BinaryOp to implement any binary operators the custom Variant type supports.

Left is the value that appears to the left of the operator. BinaryOp changes this value to indicate the result of the operation.

Right is the value that appears to the right of the operator.

Operator identifies the operator that appears between Left and Right. It can be any of the following values:

Value	Operation

opAdd	addition (+)

opSubtract	subtraction(-)

opMultiply	multiplication (*)

opDivide	floating-point division (/)

opIntDivide	integer division (div)

opModulus	remainder(mod)

opShiftLeft	left shift (shl)

opShiftRight	right shift(shr)

opAnd	bitwise and (and)

opOr	bitwise or (or)

opXor	bitwise exclusive or (xor)

As implemented in TCustomVariantType, BinaryOp raises a system error indicating an invalid operation.


TCustomVariantType.Cast
 VCL Reference

TCustomVariantType.Cast

TCustomVariantType	See also

Converts the data from another Variant type so that it represents this custom type’s data format.

procedure Cast(var Dest: TVarData; const Source: TVarData); virtual;

Description

Override Cast to enable other types of Variants to be cast to this custom Variant type.

Dest is a TVarData record that returns the Variant’s data stored in the format used by this custom Variant type. The Cast method fills out this record from the information in Source.

Source is a TVarData record that contains the data from another Variant type. Check the VType field of Source to identify how it currently stores its data. Then use the other fields to fetch the data and convert it to the format used by this Variant type.

As implemented in TCustomVariantType, Cast checks whether Source is another custom Variant type. If so, it calls its CastTo method, to convert it to this Variant type. If not, it raises a system error indicating an invalid cast.


TCustomVariantType.CastTo
 VCL Reference

TCustomVariantType.CastTo

TCustomVariantType	See also

Converts data in the format of this TCustomVariantType to the format of another Variant type.

procedure CastTo(var Dest: TVarData; const Source: TVarData; const AVarType: TVarType); virtual;

Description

Override CastTo to enable Variants of this custom type to be cast to other Variant types.

Dest is a TVarData record that returns the Variant’s data stored in the format identified by the AVarType parameter. The CastTo method fills out this record.

Source is the data from a Variant of this custom Variant type. CastTo extracts the data from this record, converts it to the format expected by AVarType, and fills out Dest. If the VType field of source is not the same as the VarType property, then CastTo creates a new instance of the associated Variant data and casts it to the destination type.

AVarType is the type to which the data should be converted.


TCustomVariantType.CastToOle
 VCL Reference

TCustomVariantType.CastToOle

TCustomVariantType	See also

Converts data in the format of this custom Variant type to a format that can be used by COM Variants.

procedure CastToOle(var Dest: TVarData; const Source: TVarData); virtual;

Description

Override CastToOle to change the way this custom type is converted for use in COM interface calls. CastToOle converts this custom Variant type to the closest Automation-compatible Variant type.

Dest is a TVarData record that returns the Variant’s data stored in an Automation-compatible format.

Source is a TVarData record that represents the data from a Variant of this custom type.

As implemented in TCustomVariantType, CastToOle calls the OlePromotion method to determine the Automation-compatible type to which Source should be converted. It then calls the CastTo method to perform the actual conversion.


TCustomVariantType.Clear
 VCL Reference

TCustomVariantType.Clear

TCustomVariantType	See also

Sets the data for this custom Variant type to a blank or unassigned value.

procedure Clear(var V: TVarData); virtual; abstract;

Description

Override Clear to implement the way this custom Variant type represents a blank or unassigned value.

V is a TVarData record that represents the data from a Variant of this custom type that needs to be cleared.

In TCustomVariantType, Clear is an abstract method. Descendant classes must override this method to provide an implementation. If the custom Variant type stores its data in a manner that includes memory that needs to be freed, Clear should free that memory. Once any memory is freed, Clear can call the SimplisticClear method, which re-initializes the TVarData record, or set the VType field to varEmpty.


TCustomVariantType.Compare
 VCL Reference

TCustomVariantType.Compare

TCustomVariantType	See also

Implements comparisons that involve the custom Variant type.

type TVarCompareResult = (crLessThan, crEqual, crGreaterThan);

procedure Compare(const Left, Right: TVarData; var Relationship: TVarCompareResult); virtual;

Description

Override Compare to implement any comparison operators the custom Variant type supports. Descendants can implement comparison operators by overriding either the Compare or the CompareOp method.

Left is the value that appears to the left of the operator.

Right is the value that appears to the right of the operator.

Relationship returns a value indicating the relationship between Left and Right, as indicated in the following table:

Value	Operation

crLessThan	Left is less than Right.

crEqual	Left is equal to Right.

crGreaterThan	Left is greater than Right.

As implemented in TCustomVariantType, CompareOp raises a system error indicating an invalid operation.

Tip:	For custom Variants that support a test of inequality, but not ordering, it makes more sense to override the CompareOp method instead.


TCustomVariantType.CompareOp
 VCL Reference

TCustomVariantType.CompareOp

TCustomVariantType	See also

Implements any comparison operations of which the custom Variant type is capable.

function CompareOp(const Left, Right: TVarData; const Operator: TVarOp): Boolean; virtual;

Description

Override CompareOp to implement any comparison operators the custom Variant type supports. Descendants can implement comparison operators by overriding either the Compare or the CompareOp method.

Left is the value that appears to the left of the operator.

Right is the value that appears to the right of the operator.

Operator identifies the operator that appears between Left and Right. It can be any of the following values:

Value	Operation

opCmpEQ	equality comparison (=)

opCmpNE	inequality comparison (<>)

opCmpLT	less than (<)

opCmpLE	less than or equal (<=)

opCmpGT	greater than (>)

opCmpGE	greater than or equal (>=)

CompareOp returns True if the comparison is true as specified. It returns False if the specified comparison does not hold true.

As implemented in TCustomVariantType, CompareOp raises a system error indicating an invalid operation.


TCustomVariantType.Copy
 VCL Reference

TCustomVariantType.Copy

TCustomVariantType	See also

Copies the data from a Variant of this custom type.

procedure Copy(var Dest: TVarData; const Source: TVarData; const Indirect: Boolean): virtual; abstract;

Description

Override Copy to enable the custom Variant type to be copied (assigned) to another Variant.

Dest is the TVarData record from the Variant whose value is to be a copy of the source Variant.

Source is the TVarData record from a Variant of this custom type that is to be copied to Dest.

Indirect indicates whether the copy is direct or indirect. When Indirect is Ttrue, the source TVarData record contains an indirect reference to its data (the VarDataIsByRef method should return true for Source). When making an indirect copy, it is not necessary to reallocate records or objects, because the Variant does not “own” the data, it merely points to it. When making a direct copy, Copy must allocate new memory for any allocated records or objects, so that Dest can “own” its own copy of the data.

In TCustomVariantType, Copy is an abstract method. Descendant classes must override this method to provide an implementation.


TCustomVariantType.Create
 VCL Reference

TCustomVariantType.Create

TCustomVariantType	See also

Creates an instance of TCustomVariantType.

constructor Create;

constructor Create(RequestedVarType: TVarType);

Description

Call Create in the initialization section of the unit that defines your TCustomVariantType descendant to instantiate a single instance of the custom Variant type. This single instance automatically registers itself with the Variant system so that the custom Variant type is enabled in the application.

The RequestedVarType parameter specifies a type code for the new custom Variant type. It must be in the range from $010F to $0FFF.

When called with no parameters, the constructor generates a new type code for the custom Variant type.

The TCustomVariantType constructor raises an exception if there is a problem with the new Variant type code. Such problems include

The RequestedVarType parameter specifies a type code that is already used by another Variant type.

The RequestedVarType parameter specifies a type code that is not in the valid range for custom Variants.

There are too many custom Variants already defined to allow another one.


TCustomVariantType.Destroy
 VCL Reference

TCustomVariantType.Destroy

TCustomVariantType	See also

Frees an instance of TCustomVariantType.

destructor Destroy; override;

Description

To free a TCustomVariantType instance, use the Free method instead. Free checks that the instance is not already nil before calling Destroy.

Free the single instance of a TCustomVariantType descendant from the finalization section of the unit that implements the class.


TCustomVariantType.DispInvoke
 VCL Reference

TCustomVariantType.DispInvoke

TCustomVariantType	See also

Invokes a method call when the Variant supports such operations.

procedure DispInvoke(var Dest: TVarData; const Source: TVarData; CallDesc: PCallDesc; Params: Pointer); virtual;

Description

When the application tries to call a method, set a property, or read a property using a Variant of the custom Variant type, the system automatically generates a call to DispInvoke. TCustomVariantType responds by generating a system error indicating an invalid dispatch attempt.

To create a custom Variant type that allows applications to call methods or use properties, use TInvokeableVariantType as a base class instead of TCustomVariantType. TInvokeableVariantType introduces methods for executing method calls and implementing properties, and overrides the DispInvoke method so that it dispatches method calls to the appropriate methods.

Dest is a TVarData record that receives the return value of any function calls.

Source is the TVarData record that holds the data from the custom Variant whose property or method was invoked.

CallDesc identifies the method that was called, including the type and number of its arguments.

Params points to an array of parameter values that were passed in the method call.


TCustomVariantType.IsClear
 VCL Reference

TCustomVariantType.IsClear

TCustomVariantType	See also

Indicates whether the data from a custom Variant represents a blank or unassigned value.

function IsClear(const V: TVarData): Boolean; virtual;

Description

Override IsClear to identify when data from a Variant of the custom Variant type represents a blank or unassigned value. The global VarIsClear method calls IsClear when given a custom Variant of this type.

As Implemented in TCustomVariantType, IsClear always returns False. Override this method to return True for invalid values or special values set by the Clear method.


TCustomVariantType.LeftPromotion
 VCL Reference

TCustomVariantType.LeftPromotion

TCustomVariantType	See also

Indicates whether the left argument to a binary operation should be coerced to a different type.

function LeftPromotion(const V: TVarData; const Operator: TVarOp; out RequiredVarType: TVarType): Boolean; virtual;

Description

Override LeftPromotion to indicate when the left argument for a binary or comparison operation should be implicitly cast to another type before performing the operation. LeftPromotion is called when the right-hand Variant in a binary or comparison operation is of this Variant type and

The left-hand argument is a built-in Variant type.

The left-hand argument is a custom Variant type that does not indicate any problem with this Variant type for the right-hand argument.

V is the TVarData record for the left-hand argument of the operation.

Operator indicates the type of operation. It can be any of the operators in the following table:

Value	Operation

opAdd	addition (+)

opSubtract	subtraction(-)

opMultiply	multiplication (*)

opDivide	floating-point division (/)

opIntDivide	integer division (div)

opModulus	remainder(mod)

opShiftLeft	left shift (shl)

opShiftRight	right shift(shr)

opAnd	bitwise and (and)

opOr	bitwise or (or)

opXor	bitwise exclusive or (xor)

opCompare	any comparison operation (>=, >, =, <=, <, <>)

RequiredVarType returns the Variant type code for the type to which the left-hand argument should be cast before performing the operation. If the operation can proceed with the left-hand argument left as-is, RequiredVarType returns the VType field of V.

LeftPromotion returns True if the TCustomVariantType descendant can perform the operation (using the BinaryOp, CompareOp, or Compare method) assuming the left-hand argument can be cast to RequiredVarType. It returns False if the TCustomVariantType descendant can’t perform the operation.

As implemented in TCustomVariantType, LeftPromotion returns the VarType property as RequiredVarType, and returns True.


TCustomVariantType.OlePromotion
 VCL Reference

TCustomVariantType.OlePromotion

TCustomVariantType	See also

Indicates the type to which a Variant value must be cast to make it Automation-compatible.

function OlePromotion(const V: TVarData; out RequiredVarType: TVarType): Boolean; virtual;

Description

Override OlePromotion to indicate when a Variant of this custom Variant type must be cast to another type before it can be auto-marshaled using an Automation interface.

V is the TVarData record for the custom Variant that the application wants to marshal.

RequiredVarType returns the type to which V must be cast before it is Automation-compatible.

OlePromotion returns True if V can be cast to an Automation-compatible type, False if there is no type to which V can be cast.

As implemented in TCustomVariantType, OlePromotion sets RequiredVarType to varOleStr and returns True if V does not already represent a Unicode string.


TCustomVariantType.QueryInterface
 VCL Reference

TCustomVariantType.QueryInterface

TCustomVariantType	See also

Returns a reference to a specified interface if the object supports that interface.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;

Description

QueryInterface checks whether the TCustomVariantType object supports the interface specified by IID. If so, QueryInterface

increments the reference count.

sets the Obj parameter so that it points to an instance of the specified interface.

returns 0 to indicate success.

If the object does not support the interface, QueryInterface returns a nonzero error code such as E_NoInterface.


TCustomVariantType.RaiseCastError
 VCL Reference

TCustomVariantType.RaiseCastError

TCustomVariantType	See also

Generates a system error that indicates an invalid cast.

procedure RaiseCastError;

Description

Call RaiseCastError from the implementation of a TCustomVariantType descendant when an operation fails because a Variant value could not be cast to a necessary type.


TCustomVariantType.RaiseDispError
 VCL Reference

TCustomVariantType.RaiseDispError

TCustomVariantType	See also

Generates a system error indicating an invalid dispatch attempt.

procedure RaiseDispError;

Description

Call RaiseDispError from the implementation of a TCustomVariantType descendant when an operation fails because the Variant type can’t execute a method call.


TCustomVariantType.RaiseInvalidOp
 VCL Reference

TCustomVariantType.RaiseInvalidOp

TCustomVariantType	See also

Generates a system error indicating an invalid operation.

procedure RaiseInvalidOp;

Description

Call RaiseInvalidOp from the implementation of a TCustomVariantType descendant when it can’t perform an operation.


TCustomVariantType.RightPromotion
 VCL Reference

TCustomVariantType.RightPromotion

TCustomVariantType	See also

Indicates whether the right argument to a binary operation should be coerced to a different type.

function RightPromotion(const V: TVarData; const Operator: TVarOp; out RequiredVarType: TVarType): Boolean; virtual;

Description

Override RightPromotion to indicate when the right-hand argument for a binary or comparison operation should be implicitly cast to another type before performing the operation. RightPromotion is called when the right-hand Variant in a binary or comparison operation is of this Variant type.

Note:	In operations that involve two custom Variants, the left-hand argument’s RightPromotion method is called first. The right-hand argument’s LeftPromotion method is then called only if the left-hand argument’s RightPromotion method returns False.

V is the TVarData record for the left-hand argument of the operation.

Operator indicates the type of operation. It can be any of the operators in the following table:

Value	Operation

opAdd	addition (+)

opSubtract	subtraction(-)

opMultiply	multiplication (*)

opDivide	floating-point division (/)

opIntDivide	integer division (div)

opModulus	remainder(mod)

opShiftRight	right shift (shl)

opShiftRight	right shift(shr)

opAnd	bitwise and (and)

opOr	bitwise or (or)

opXor	bitwise exclusive or (xor)

opCompare	any comparison operation (>=, >, =, <=, <, <>)

RequiredVarType returns the Variant type code for the type to which the right-hand argument should be cast before performing the operation. If the operation can proceed with the right-hand argument left as-is, RequiredVarType returns the VType field of V.

RightPromotion returns True if the TCustomVariantType descendant can perform the operation (using the BinaryOp, CompareOp, or Compare method) assuming the right-hand argument can be cast to RequiredVarType. It returns False if the TCustomVariantType descendant can’t perform the operation.

As implemented in TCustomVariantType, RightPromotion returns the VarType property as RequiredVarType, and returns True.


TCustomVariantType.SimplisticClear
 VCL Reference

TCustomVariantType.SimplisticClear

TCustomVariantType	See also

Clears a TVarData record by re-initializing it.

procedure SimplisticClear(var V: TVarData);

Description

Call SimplisticClear from the implementation of a TCustomVariantType descendant to clear the TVarData record of a Variant of the custom type. This method should only be called if the TVarData record does not contain any members that must be freed.

SimplisticClear simply calls the VarDataInit method, which reinitializes the TVarData record passed as V.


TCustomVariantType.SimplisticCopy
 VCL Reference

TCustomVariantType.SimplisticCopy

TCustomVariantType	See also

Performs a simple block copy of one TVarData record to another.

procedure SimplisticCopy(var Dest: TVarData; const Source: TVarData; const Indirect: Boolean = False);

Description

Call SimplisticCopy from the implementation of a TCustomVariantType descendant to block copy one TVarData record to another.

Dest is the TVarData record that receives the copy.

Source is the TVarData record to copy.

Indirect indicates whether Source represents the data (False) or merely a reference to the data (True).


TCustomVariantType.UnaryOp
 VCL Reference

TCustomVariantType.UnaryOp

TCustomVariantType	See also

Implements any unary operations of which the custom Variant type is capable.

procedure UnaryOp(var Right: TVarData; const Operator: Integer); virtual;

Description

Override UnaryOp to implement any unary operators the custom Variant type supports.

Right is the value that appears to the right of the operator. UnaryOp changes this value to indicate the result of the operation.

Operator identifies the operator that appears before Right. It can be any of the following values:

Value	Operation

opNegate	unary minus (-)

opNot	logical negation (not)

As implemented in TCustomVariantType, UnaryOp raises a system error indicating an invalid operation.


TCustomVariantType.VarDataCast
 VCL Reference

TCustomVariantType.VarDataCast

TCustomVariantType	See also

Performs a cast from one Variant type to another.

procedure VarDataCast(var Dest: TVarData; const Source: TVarData);

Description

Call VarDataCast from the implementation of a TCustomVariantType descendant to perform casts on the data from another Variant type to the type specified by the VarType property. Do not use VarDataCast as the entire implementation of the Cast method, as this will lead to a circular reference.

Dest returns the result of the cast.

Source is the TVarData record of another Variant type that is to be converted.


TCustomVariantType.VarDataCastTo
 VCL Reference

TCustomVariantType.VarDataCastTo

TCustomVariantType	See also

Performs a cast from one Variant type to another.

procedure VarDataCastTo(var Dest: TVarData; const Source: TVarData; const VarType: TVarType); overload;

procedure VarDataCastTo(var Dest: TVarData; const VarType: TVarType); overload;

Description

Call VarDataCastTo from the implementation of a TCustomVariantType descendant to perform casts on the data from one Variant type to another.  Do not use VarDataCastTo as the entire implementation of the CastTo method, as this will lead to a circular reference.

Dest returns the result of the cast. If VarDataCastTo is called with no Source parameter, it also provides the source data to be cast.

Source is the TVarData record to be cast.

VarType is the type code of the Variant type to which the data should be cast.


TCustomVariantType.VarDataCastToOleStr
 VCL Reference

TCustomVariantType.VarDataCastToOleStr

TCustomVariantType	See also

Performs a cast to a Variant type of varOleStr.

procedure VarDataCastToOleStr(var Dest: TVarData);

Description

Call VarDataCastToOleStr from the implementation of a TCustomVariantType descendant to perform casts to a TVarData record with Variant type code of varOleStr (Unicode string).

Dest is the TVarData record of a Variant, and returns the result of the cast.


TCustomVariantType.VarDataClear
 VCL Reference

TCustomVariantType.VarDataClear

TCustomVariantType	See also

Clears the data from a built-in Variant type.

procedure VarDataClear(var Dest: TVarData);

Description

Call VarDataClear from the implementation of a TCustomVariantType descendant to clear the data in the TVarData record of a Variant.  Do not use VarDataClear as the entire implementation of the Clear method, as this will lead to a circular reference.

Dest is the TVarData record of a Variant type, and returns the result after clearing the data.


TCustomVariantType.VarDataCopy
 VCL Reference

TCustomVariantType.VarDataCopy

TCustomVariantType	See also

Copies the data from one built-in Variant type to another.

procedure VarDataCopy(var Dest: TVarData; const Source: TVarData);

Description

Call VarDataCopy from the implementation of a TCustomVariantType descendant to clear the data from a destination Variant and then copy the TVarData record from another Variant. VarDataCopy can handle data that is stored indirectly (when the VType field includes varByRef).  Do not use VarDataCopy as the entire implementation of the Copy method, as this will lead to a circular reference.

Dest is the TVarData record that receives the copy.

Source is the TVarData record to be copied.


TCustomVariantType.VarDataCopyNoInd
 VCL Reference

TCustomVariantType.VarDataCopyNoInd

TCustomVariantType	See also

Copies the data from one built-in Variant type to another.

procedure VarDataCopyNoInd(var Dest: TVarData; const Source: TVarData);

Description

Call VarDataCopyNoInd from the implementation of a TCustomVariantType descendant to clear the data from a destination Variant and then copy the TVarData record from another Variant. Unlike the VarDataCopy method, it can’t handle data that is stored indirectly (when the VType field includes varByRef). However, it is often more efficient than VarDataCopy.

Dest is the TVarData record that receives the copy.

Source is the TVarData record to be copied.


TCustomVariantType.VarDataFromOleStr
 VCL Reference

TCustomVariantType.VarDataFromOleStr

TCustomVariantType	See also

Creates a TVarData record to represent a Unicode string.

procedure VarDataFromOleStr(var V: TVarData; const Value: WideString);

Description

Call VarDataCopy from the implementation of a TCustomVariantType descendant to fill out a TVarData record so that it represents a specified Unicode string.

V is the TVarData record to be filled out.

Value is a Unicode string that becomes the value of V.


TCustomVariantType.VarDataFromStr
 VCL Reference

TCustomVariantType.VarDataFromStr

TCustomVariantType	See also

Creates a TVarData record to represent a string.

procedure VarDataFromStr(var V: TVarData; const Value: string);

Description

Call VarDataCopy from the implementation of a TCustomVariantType descendant to fill out a TVarData record so that it represents a specified string.

V is the TVarData record to be filled out.

Value is a string that becomes the value of V.


TCustomVariantType.VarDataInit
 VCL Reference

TCustomVariantType.VarDataInit

TCustomVariantType	See also

Initializes a TVarData record.

procedure VarDataInit(var Dest: TVarData);

Description

Call VarDataInit from the implementation of a TCustomVariantType descendant to initialize a newly-allocated TVarData record.


TCustomVariantType.VarDataIsArray
 VCL Reference

TCustomVariantType.VarDataIsArray

TCustomVariantType	See also

Indicates whether a TVarData record represents the data from a Variant array.

function VarDataIsArray(const V: TVarData): Boolean;

Description

VarDataIsArray returns True if the VType field of V contains the varArray bit.


TCustomVariantType.VarDataIsByRef
 VCL Reference

TCustomVariantType.VarDataIsByRef

TCustomVariantType	See also

Indicates whether a TVarData record stores its data indirectly.

function VarDataIsByRef(const V: TVarData): Boolean;

Description

VarDataIsArray returns True if the VType field of V contains the varByRef bit.


TCustomVariantType.VarDataIsEmptyParam
 VCL Reference

TCustomVariantType.VarDataIsEmptyParam

TCustomVariantType	See also

Indicates whether a TVarData record represents an unassigned optional parameter.

function VarDataIsEmptyParam(const V: TVarData): Boolean;

Description

VarDataIsEmptyParam returns True if the given TVarData record represents an unassigned optional parameter.


TCustomVariantType.VarDataIsFloat
 VCL Reference

TCustomVariantType.VarDataIsFloat

TCustomVariantType	See also

Indicates whether a TVarData record represents a floating-point value.

function VarDataIsFloat(const V: TVarData): Boolean;

Description

VarDataIsFloat returns True if the given TVarData record comes from a built-in Variant type that represents a floating-point value (Single, Double, or Currency). VarDataIsFloat does not return True for data from Custom Variant types.


TCustomVariantType.VarDataIsNumeric
 VCL Reference

TCustomVariantType.VarDataIsNumeric

TCustomVariantType	See also

Indicates whether a TVarData record represents a numeric value.

function VarDataIsNumeric(const V: TVarData): Boolean;

Description

VarDataIsNumeric returns True if the given TVarData record represents a numeric value of some sort. This can be either a floating-point value or an ordinal value. VarDataIsNumeric does not return True for data from Custom Variant types.


TCustomVariantType.VarDataIsOrdinal
 VCL Reference

TCustomVariantType.VarDataIsOrdinal

TCustomVariantType	See also

Indicates whether a TVarData record represents a ordinal value.

function VarDataIsOrdinal(const V: TVarData): Boolean;

Description

VarDataIsOrdinal returns True if the given TVarData record comes from a built-in Variant type that represents a ordinal value (such as an integer or boolean type). VarDataIsOrdinal does not return True for data from Custom Variant types.


TCustomVariantType.VarDataIsStr
 VCL Reference

TCustomVariantType.VarDataIsStr

TCustomVariantType	See also

Indicates whether a TVarData record represents a string (normal or Unicode).

function VarDataIsStr(const V: TVarData): Boolean;

Description

VarDataIsStr returns True if the given TVarData record has a VType field of varString or varOleStr.


TCustomVariantType.VarDataToStr
 VCL Reference

TCustomVariantType.VarDataToStr

TCustomVariantType	See also

Returns a string that represents the value from a TVarData record.

function VarDataToStr(const V: TVarData): string;

Description

Call VarDataToStr from the implementation of a TCustomVariantType descendant to extract a string that represents the value of a Variant.

V is the TVarData record that represents the value of the Variant.


Hierarchy

TObject

TCustomVariantType


TControlActionLink
 VCL Reference

TControlActionLink

Hierarchy	Properties	Methods	Events	See also

TControlActionLink links action objects to clients that descend from TControl.

Unit

Controls

Description

TControlActionLink is designed to link actions to generic control clients. It overrides methods to determine whether the action and client are linked, and to ensure that action events are appropriate for properties and events of control clients.

TControlActionLink overrides methods to support linking the following properties and events with control client properties or events, most of which have the same name:

Caption

Enabled

Hint

Visible

OnExecute

Use TControlActionLink as a base class when creating an action link class that targets a more specific client type. Descendant classes of TControlActionLink already support certain branches of the VCL, such as TWinControlActionLink, which supports TWinControl client types.


 VCL Reference

TControlActionLink properties

TControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TControlActionLink properties

TControlActionLink	By object	Legend

Action


 VCL Reference

TControlActionLink events

TControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TControlActionLink events

TControlActionLink	By object	Legend

OnChange


 VCL Reference

TControlActionLink methods

TControlActionLink	Alphabetically	Legend

In TControlActionLink

AssignClient

DoShowHint

IsCaptionLinked

IsEnabledLinked

IsHelpLinked

IsHintLinked

IsOnExecuteLinked

IsVisibleLinked

SetCaption

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetOnExecute

SetVisible

Derived from TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TControlActionLink methods

TControlActionLink	By object	Legend

AfterConstruction

AssignClient

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

DoShowHint

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsCaptionLinked

IsEnabledLinked

IsHelpLinked

IsHintLinked

IsOnExecuteLinked

IsVisibleLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetCaption

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetOnExecute

SetVisible

Update


TControlActionLink.AssignClient
 VCL Reference

TControlActionLink.AssignClient

TControlActionLink	See also

Assigns a client control that is linked to the associated action.

procedure AssignClient(AClient: TObject); override;

Description

TControlActionLink overrides AssignClient to ensure that the client for the action descends from TControl. Descendants of TControlActionLink can further limit the type of client associated with the link.


TControlActionLink.DoShowHint
 VCL Reference

TControlActionLink.DoShowHint

TControlActionLink	See also

Indicates whether the hint is shown, and modified.

function DoShowHint(var HintStr: string): Boolean; virtual;

Description

DoShowHInt determines whether a hint is shown when the mouse moves across a control. DoShowHint also provides an opportunity to modify the hint, and/or append a shortcut to the end of the hint string. If either the application, the control, or the action veto showing the hint, then the hint is not shown. DoShowHint returns True by default. You can override this function to return False if the hint is not shown or modified, or if the shortcut is not appended.


TControlActionLink.IsCaptionLinked
 VCL Reference

TControlActionLink.IsCaptionLinked

TControlActionLink	See also

Indicates whether the caption for the action and the client are linked.

function IsCaptionLinked: Boolean; override;

Description

IsCaptionLinked indicates whether the Caption property is linked to the appropriate client property. IsCaptionLinked returns True if the client requests that the action control this property, False otherwise.


TControlActionLink.IsEnabledLinked
 VCL Reference

TControlActionLink.IsEnabledLinked

TControlActionLink	See also

Indicates whether the enabled state for the action and the client are linked.

function IsEnabledLinked: Boolean; override;

Description

IsEnabledLinked indicates whether the Enabled property is linked to the appropriate client property. IsEnabledLinked returns True if the client requests that the action control this property, False otherwise.


TControlActionLink.IsHelpLinked
 VCL Reference

TControlActionLink.IsHelpLinked

TControlActionLink	See also

Indicates whether the help properties for the action and the client are linked.

function IsHelpLinked: Boolean; override;

Description

IsHelpLinked indicates whether the HelpContext, HelpKeyword, and HelpType properties are linked to the appropriate client properties. IsHelpLinked returns True if the client requests that the action control all of these properties, False otherwise.


TControlActionLink.IsHintLinked
 VCL Reference

TControlActionLink.IsHintLinked

TControlActionLink	See also

Indicates whether the Hint property for the action and the client are linked.

function IsHintLinked: Boolean; override;

Description

IsHintLinked indicates whether the Hint property is linked to the appropriate client property. IsHintLinked returns True if the client requests that the action control this property, False otherwise.


TControlActionLink.IsOnExecuteLinked
 VCL Reference

TControlActionLink.IsOnExecuteLinked

TControlActionLink	See also

Indicates whether the OnExecute event handler for the action and the client are linked.

function IsOnExecuteLinked: Boolean; override;

Description

IsOnExecuteLinked indicates whether the OnExecute event handler is linked to the appropriate client event. IsOnExecuteLinked returns True if the client requests that the action control this event, False otherwise.


TControlActionLink.IsVisibleLinked
 VCL Reference

TControlActionLink.IsVisibleLinked

TControlActionLink	See also

Indicates whether the visible state for the action and the client are linked.

function IsVisibleLinked: Boolean; override;

Description

IsVisibleLinked indicates whether the Visible property is linked to the appropriate client property. IsVisibleLinked returns True if the client requests that the action control this property, False otherwise.


TControlActionLink.SetCaption
 VCL Reference

TControlActionLink.SetCaption

TControlActionLink	See also

Sets the caption of a control if the client is linked to the action for this event.

procedure SetCaption(const Value: string); override;

Description

SetCaption sets the caption of a control, and is called only if the client is linked for this event. Value specifies the string to which the caption should be set.


TControlActionLink.SetEnabled
 VCL Reference

TControlActionLink.SetEnabled

TControlActionLink	See also

Sets the enabled state of a control if the client is linked to the action for this event.

procedure SetEnabled(Value: Boolean); override;

Description

SetEnabled sets the enabled state of a control, and is called only if the client is linked for this event. Value specifies whether the enabled state should be set.


TControlActionLink.SetHelpContext
 VCL Reference

TControlActionLink.SetHelpContext

TControlActionLink	See also

Sets the HelpContext of a control if the client is linked to the action help properties.

procedure SetHelpContext(Value: THelpContext); override;

Description

SetHelpContext sets the HelpContext property of a control, and is called only if the client is linked for help properties. Value specifies the help context ID to which the HelpContext property should be set.


TControlActionLink.SetHelpKeyword
 VCL Reference

TControlActionLink.SetHelpKeyword

TControlActionLink	See also

Sets the HelpKeyword of a control if the client is linked to the action help properties.

procedure SetHelpKeyword(const Value: string); override;

Description

SetHelpKeyword sets the HelpKeyword property of a control, and is called only if the client is linked for help properties. Value specifies the keyword to which the HelpKeyword property should be set.


TControlActionLink.SetHelpType
 VCL Reference

TControlActionLink.SetHelpType

TControlActionLink	See also

Sets the HelpType of a control if the client is linked to the action help properties.

procedure SetHelpType(Value: THelpType); override;

Description

SetHelpType sets the HelpType property of a control, and is called only if the client is linked for help properties. Value indicates the value to which the HelpType property should be set.


TControlActionLink.SetHint
 VCL Reference

TControlActionLink.SetHint

TControlActionLink	See also

Sets the hint of a control if the client is linked to the action for this event.

procedure SetHint(const Value: string); override;

Description

SetHint sets the hint of a control, and is called only if the client is linked for this event. Value specifies the string to which the hint should be set.


TControlActionLink.SetOnExecute
 VCL Reference

TControlActionLink.SetOnExecute

TControlActionLink	See also

Sets the execution event handler for a control if the client is linked to the action for this event.

procedure SetOnExecute(Value: TNotifyEvent); override;

Description

SetOnExecute sets the appropriate execution event handler of a control, and is called only if the client is linked for this event. Value specifies the procedure that should be used for this event.


TControlActionLink.SetVisible
 VCL Reference

TControlActionLink.SetVisible

TControlActionLink	See also

Sets the visible state of a control if the client is linked to the action for this event.

procedure SetVisible(Value: Boolean); override;

Description

SetVisible sets the visible state of a control, and is called only if the client is linked for this event. Value specifies whether the visible state should be set.


Hierarchy

TObject

TBasicActionLink

TActionLink

TControlActionLink


TControlScrollBar
 VCL Reference

TControlScrollBar

Hierarchy	Properties	Methods	See also

TControlScrollBar displays a horizontal or vertical scroll bar.

Unit

Forms

Description

Use TControlScrollBar to control the scrollbar in a scrolling windowed control such as TForm or TScrollBox. TControlScrollBar introduces properties that control the size of the scrollable region and the position to which that region is scrolled, and when the scrollbar appears.


 VCL Reference

TControlScrollBar properties

TControlScrollBar	Alphabetically	Legend

In TControlScrollBar

ButtonSize

Color

Increment

Kind

Margin

ParentColor

Position

Range

ScrollPos

Size

Smooth

Style

ThumbSize

Tracking

Visible


 VCL Reference

TControlScrollBar properties

TControlScrollBar	By object	Legend

ButtonSize

Color

Increment

Kind

Margin

ParentColor

Position

Range

ScrollPos

Size

Smooth

Style

ThumbSize

Tracking

Visible


TControlScrollBar.ButtonSize
 VCL Reference

TControlScrollBar.ButtonSize

TControlScrollBar	See also

Specifies the sizes of the buttons in the scroll bar.

property ButtonSize: Integer

Description

Use ButtonSize to specify the sizes of the buttons in the scroll bar. If the scroll bar is horizontal, ButtonSize is the width of the arrow buttons in pixels. If the scroll bar is vertical, ButtonSize is the height of the arrow buttons in pixels.


TControlScrollBar.Color
 VCL Reference

TControlScrollBar.Color

TControlScrollBar	See also

Specifies the scroll bar’s color.

property Color: TColor

Description

Use Color to specify the scroll bar’s color. When you explicitly assign a value to Color, the ParentColor property is automatically set to False.

If the scroll bar’s ParentColor property is True, then the Color property reflects the Windows button highlight color (clBtnHighlight), and changing this color in the Windows control panel automatically updates the value of Color.


TControlScrollBar.Increment
 VCL Reference

TControlScrollBar.Increment

TControlScrollBar 	See also	Example

Determines how far the display moves when the user clicks one of the small end arrows on the scroll bar.

type TScrollBarInc = 1..32767;

property Increment: TScrollBarInc;

Description

Use Increment to control how the scrollbar affects the scrollable region of the control. If Increment is set to 1, each click scrolls by one position; if Increment is set to 2, each click scrolls by two positions; and so forth.

Note:	Do not use the Increment property when Smooth is set to True. When Smooth is True, every time the range or visibility of the scrollbar changes, the value of Increment is dynamically recomputed.


TControlScrollBar.Kind
 VCL Reference

TControlScrollBar.Kind

TControlScrollBar	See also

Indicates whether the scroll bar is horizontal or vertical.

property Kind: ScrollBarKind;

Description

Kind indicates whether the scroll bar has a vertical or horizontal orientation. This value is initialized in the constructor, when the scroll bar is created by a scrolling windowed control for its VertScrollBar or HorzScrollBar property.

These are the possible values for Kind:

Value	Meaning

sbHorizontal	Scroll bar is horizontal

sbVertical	Scroll bar is vertical


TControlScrollBar.Margin
 VCL Reference

TControlScrollBar.Margin

TControlScrollBar	See also 	Example

Determines when a scroll bar is generated.

property Margin: Word;

Description

The Margin property determines the minimum number of pixels that must separate each control from the edge of the control that uses the scroll bar. At runtime, whenever a child control is less than Margin pixels from the edge and Visible is set to True, a scroll bar appears.


TControlScrollBar.ParentColor
 VCL Reference

TControlScrollBar.ParentColor

TControlScrollBar	See also

Specifies whether the scroll bar should reflect the Windows button highlight color.

property ParentColor: Boolean;

Description

Use ParentColor to indicate that the scroll bar should always reflect the Windows button highlight color. Using ParentColor differs from setting the Color property to clBtnHighlight in that when ParentColor is True, changing the button highlight color in the Windows control panel automatically updates the value of Color.

When the value of the Color property is changed, its ParentColor property is automatically set to False.


TControlScrollBar.Position
 VCL Reference

TControlScrollBar.Position

TControlScrollBar	See also 	Example

Specifies the position of the thumb tab on the scroll bar.

property Position: Integer;

Description

Use Position to programmatically scroll the client area of the associated control. The value of Position changes (from 0 to Range) at runtime as the user scrolls the scroll bar.


TControlScrollBar.Range
 VCL Reference

TControlScrollBar.Range

TControlScrollBar	See also 	Example

Determines how far the scrolling region of the associated control can move.

property Range: Integer;

Description

Range represents the virtual size (in pixels) of the associated control’s client area. For example, if the Range of a form’s horizontal scroll bar is set to 500, and the width of the form is 200, the scroll bar’s Position can vary from 0 to 300.

If the Range of a horizontal scroll bar is less than the width of the form or scroll box, no horizontal scroll bar appears. If the Range of a vertical scroll bar is less than the height of the form or scroll box, no vertical scroll bar appears.

The value of Range is set automatically, but can be overridden in the Object Inspector or in program code.


TControlScrollBar.ScrollPos
 VCL Reference

TControlScrollBar.ScrollPos

TControlScrollBar	See also

Indicates the position of the thumb tab.

property ScrollPos: Integer;

Description

The read-only ScrollPos property returns the current value of Position when the scrollbar is visible. If the scrollbar is not visible, ScrollPos returns 0.


TControlScrollBar.Size
 VCL Reference

TControlScrollBar.Size

TControlScrollBar	See also

Specifies the scroll bar’s size.

property Size: Integer

Description

Use Size to specify the width of the scroll bar in pixels.

Note:	The length of the scroll bar is determined by the width (for horizontal scroll bars) or height (for vertical scroll bars) of the associated scrolling windowed control.


TControlScrollBar.Smooth
 VCL Reference

TControlScrollBar.Smooth

TControlScrollBar	See also

Specifies whether the amount the associated control scrolls is dynamically computed.

property Smooth: Boolean;

Description

Set Smooth to True to specify that the scroll bar should dynamically adjust its scrolling increment based on the size of the associated control’s client area.

When Smooth is True, clicking the end arrows of the scrollbar scrolls the associated control by approximately one tenth of its client area, and clicking the scrollbar beside the thumb tab scrolls the control by the length of the client area minus the amount scrolled by the end arrows. When Smooth is False, the Increment property controls the amount of scrolling when the user clicks the end arrows, and clicking beside the thumb tab scrolls the control by the entire length of the client area.


TControlScrollBar.Style
 VCL Reference

TControlScrollBar.Style

TControlScrollBar

Specifies the scroll bar’s style.

property Style: TScrollBarStyle

Description

Use Style to specify the scroll bar’s style. The style determines whether the scroll bar appears three-dimensional, flat, or uses hot tracking.


TControlScrollBar.ThumbSize
 VCL Reference

TControlScrollBar.ThumbSize

TControlScrollBar	See also

Specifies the length of the scroll bar’s thumb tab.

property ThumbSize: Integer

Description

Use ThumbSize to specify the length of the scroll bar’s thumb tab.


TControlScrollBar.Tracking
 VCL Reference

TControlScrollBar.Tracking

TControlScrollBar

Determines whether the form or scroll box moves before the thumb tab is released.

property Tracking: Boolean;

Description

Use Tracking to control whether the scrollbar and associated control repaint while the thumb tab is dragged with the mouse.  If Tracking is True, the image moves as the user drags the thumb tab. If Tracking is False, the image remains static until the thumb tab is released.

Repainting while the thumb tab is dragged can provide useful feedback to the user about how far the control has scrolled, but slows performance.


TControlScrollBar.Visible
 VCL Reference

TControlScrollBar.Visible

TControlScrollBar	See also 	Example

Determines whether the scroll bar appears.

property Visible: Boolean;

Description

If Visible is set to True, a scroll bar appears whenever a visual component is less than Margin pixels from the edge of the form or scroll box. If Visible is set to False, the scroll bar is never visible. This is useful, for example, for programmatically controlling the scroll position of a form without allowing the user to control the scroll position.


 VCL Reference

TControlScrollBar methods

TControlScrollBar	Alphabetically	Legend

In TControlScrollBar

Assign

ChangeBiDiPosition

Create

IsScrollBarVisible

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TControlScrollBar methods

TControlScrollBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ChangeBiDiPosition

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

IsScrollBarVisible

MethodAddress

MethodName

NewInstance

SafeCallException


TControlScrollBar.Assign
 VCL Reference

TControlScrollBar.Assign

TControlScrollBar	See also

Copies the contents of a TControlScrollBar instance to another TControlScrollBar.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the Visible, Range, Position, and Increment properties from the source object to the TControlScrollBar instance. If the Source parameter is not another scroll bar, Assign calls the TPersistent Assign method, which allows the source object to copy properties if it has an AssignTo method that knows how to copy to a control scroll bar.


TControlScrollBar.ChangeBiDiPosition
 VCL Reference

TControlScrollBar.ChangeBiDiPosition

TControlScrollBar	See also

Changes the position of a horizontal scroll bar to match the current bi-directional mode.

procedure ChangeBiDiPosition;

Description

Use ChangeBiDiPosition to change the position of a horizontal scroll bar to reflect the current bi-directional mode of its associated scrolling windowed control.

For example, TScrollingWinControl calls ChangeBiDiPosition from its DoFlipChildren method to determine whether the scroll bar should be repositioned along with the child controls.


TControlScrollBar.IsScrollBarVisible
 VCL Reference

TControlScrollBar.IsScrollBarVisible

TControlScrollBar	See also

Returns True if the scroll bar is visible.

function IsScrollBarVisible: Boolean;

Description

Call IsScrollBarVisible to determine whether the scroll bar is visible. IsScrollBarVisible returns True if the Visible property is True and the associated scrolling windowed control contains child controls that lie within Margin pixels from the edge.


TControlScrollBar.Create
 VCL Reference

TControlScrollBar.Create

TControlScrollBar	See also

Creates a new TControlScrollBar object.

constructor Create(AControl: TScrollingWinControl; AKind: TScrollBarKind);

Description

Do not create instances of TControlScrollBar. These objects are created automatically by the controls that use them.

The AControl parameter is the associated control that creates the scroll bar. The AKind parameter indicates whether the scroll bar is used as a horizontal or vertical scroll bar. AKind becomes the value of the Kind property.


Hierarchy

TObject

TPersistent

TControlScrollBar


TCustomAction
 VCL Reference

TCustomAction

Hierarchy	Properties	Methods	Events	See also

TCustomAction is the base class for actions meant to be used with menu items and controls.

Unit

ActnList

Description

TCustomAction introduces support for the properties and methods of menu items and controls that are linked to action objects. Use TCustomAction as a base class when deriving your own actions that publish specific properties of associated controls. The VCL provides a generic descendant class that publishes all of the properties of TCustomAction as well as specialized action classes for operating on components as datasets or text controls.

Action objects centralize the response to user commands (actions) and represent user interface elements in applications that use action bars. They provide an easy way to synchronize, for example, the enabled state and caption of a speed button and a menu item, and handle the response when users click on these components. Each such component, called the client, has its properties dynamically updated by the action and forwards user actions to the action for a response.

You can work with actions at design-time in the action list editor of an action list or the customize dialog of an action manager. The action list or action manager is a container for actions, which it organizes into categories.

Component and control properties and events that are supported in TCustomAction, either directly or through an ancestor, are:

Caption

Checked

Enabled

HelpContext

Hint

ImageIndex

ShortCut

Visible

OnHint

OnUpdate

OnExecute


 VCL Reference

TCustomAction properties

TCustomAction	Alphabetically	Legend

In TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomAction properties

TCustomAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TCustomAction.AutoCheck
 VCL Reference

TCustomAction.AutoCheck

TCustomAction	See also

Controls whether the Checked property toggles when the action executes.

property AutoCheck: TShortCutList;

Description

AutoCheck causes the checked property to toggle when the action executes. This allows the action’s Checked property to remain in sync with the client’s Checked property (or equivalent). If the client is a menu item (where the Checked property does not necessarily toggle), AutoCheck is propagated to the AutoCheck property of the menu item.


TCustomAction.Caption
 VCL Reference

TCustomAction.Caption

TCustomAction 	See also

Represents the caption of client controls and menu items.

property Caption: String;

Description

Caption holds the string that is the caption for the action when it is set. The value of Caption is propagated to client controls and menu items.


TCustomAction.Checked
 VCL Reference

TCustomAction.Checked

TCustomAction 	See also	Example

Indicates whether client controls and menu items appear checked.

property Checked: Boolean;

Description

Checked specifies the checked state for the action. The value of Checked is propagated to client controls and menu items.

Note:	If the action has a GroupIndex value greater than 0, then setting Checked to True causes all other actions in the group to have their Checked property set to False.

Note:	Use the AutoCheck property to ensure that the action’s Checked property stays synchronized with client’s Checked properties.


TCustomAction.DisableIfNoHandler
 VCL Reference

TCustomAction.DisableIfNoHandler

TCustomAction	See also

Indicates whether client components should be disabled if no handler is found.

property DisableIfNoHandler: Boolean;

Description

DisableIfNoHandler specifies whether the Enabled property of client components should be set to False if no handler can be found for the action.

When the user triggers one of the action’s clients, the application makes a series of attempts to determine how the action should respond. This includes checking a number of event handlers, and, if it fails to find an event handler, locating a target control and checking for a predefined response that applies to that target control. When DisableIfNoHandler is True, if the application completes this sequence without finding any way for the action to respond to the user input, The action’s Enabled property is set to False.

In addition, for some predefined actions, DisableIfNoHandler causes the action to disable itself if an event handler is required for the action to perform a meaningful task. For example, if you do not supply an OnAccept event handler to TFileOpen, then if DisableIfNoHandler is True, the action disables itself because there is no way for the application to respond when the user selects a file name in the dialog.


TCustomAction.Enabled
 VCL Reference

TCustomAction.Enabled

TCustomAction	See also

Indicates whether client controls and menu items are enabled.

property Enabled: Boolean;

Description

Enabled specifies the enabled state for the action. The value of Enabled is propagated to client controls and menu items.


TCustomAction.GroupIndex
 VCL Reference

TCustomAction.GroupIndex

TCustomAction	See also

Indicates whether the action acts like a radio button with other actions in the same action list.

property GroupIndex: Integer;

Description

GroupIndex is used to define groups of actions that act like radio buttons. When GroupIndex is greater than 0, it identifies the group to which the action belongs. When the Checked property of any action in that group is set to True, the Checked property of all other actions in the group is set to False. That is, only one action in the group can be checked at a time.

Note:	All actions in a group must be listed by the same action list or action manager.


TCustomAction.HelpContext
 VCL Reference

TCustomAction.HelpContext

TCustomAction	See also

Indicates the help context ID for client controls and menu items.

property HelpContext: THelpContext;

Description

HelpContext specifies the help context for the action when it is set. This value is propagated to client controls and menu items.

When a client control has focus and the user presses the F1 key, the control uses the value of HelpContext for this associated action to invoke the online help targeting a specific topic. The target topic is uniquely identified by a nonzero HelpContext value. Leave the HelpContext property of the client control at its default value of zero. This allows multiple controls (and multiple types of controls) to be associated with the same help topic through the one action object.

Note:	HelpContext is only used when the HelpType property of this action or the client control is htInteger.


TCustomAction.HelpKeyword
 VCL Reference

TCustomAction.HelpKeyword

TCustomAction	See also

Indicates the help keyword for client controls and menu items.

property HelpKeyword: string;

Description

HelpKeyword, when set, specifies the keyword that identifies a help topic for this action. This value is propagated to the HelpKeyword property of client controls and menu items. The interpretation of HelpKeyword depends on which help system is used to display the topic. For example, when using WinHelp, HelpKeyword refers to an A link.

When a client control has focus and the user presses the F1 key, the control uses the value of HelpKeyword for this associated action object to invoke the online help targeting a specific topic. Leave the HelpKeyword property of the client control unassigned. This allows multiple controls (and multiple types of controls) to be associated with the same help topic through the one action object.

Note:	HelpKeyword is only used when the HelpType property of this action or the client control is htKeyword.


TCustomAction.HelpType
 VCL Reference

TCustomAction.HelpType

TCustomAction	See also

Indicates the mechanism for client controls and menu items to use when invoking help.

property HelpType: THelpType;

Description

HelpType, when set, indicates whether client controls and menu items should use the HelpContext or the HelpKeyword property for invoking the help system. This value is propagated to the HelpType property of client controls and menu items.


TCustomAction.Hint
 VCL Reference

TCustomAction.Hint

TCustomAction	See also

Indicates the Help hint for client controls and menu items.

property Hint: String;

Description

Hint holds the string that is the hint for that action when it is set. This value is propagated to client controls and menu items.


TCustomAction.ImageIndex
 VCL Reference

TCustomAction.ImageIndex

TCustomAction	See also

Indicates the ImageIndex property for client controls and menu items.

property ImageIndex: TImageIndex;

Description

ImageIndex is an index into the Images property of the action list or action manager that contains the action. It identifies an image that is associated with controls and menu items that use this action.


TCustomAction.Name
 VCL Reference

TCustomAction.Name

TCustomAction	See also

Specifies the name of the action as referenced in code.

property Name: TComponentName;

Description

Use Name when referring to the action in code.

If Name is set to the same string as Caption, then the two properties become linked: subsequent changes to the value of Name update the caption as well.


TCustomAction.SavedEnabledState
 VCL Reference

TCustomAction.SavedEnabledState

TCustomAction	See also

Saves the value of the Enabled property when the action is suspended.

property SavedEnabledState: Boolean;

Description

TCustomAction uses SavedEnabledState internally to save the value of the Enabled property when its action list has a state of asSuspendedEnabled.


TCustomAction.SecondaryShortCuts
 VCL Reference

TCustomAction.SecondaryShortCuts

TCustomAction	See also

Specifies the short cuts (in addition to ShortCut) for triggering clients.

property SecondaryShortCuts: TShortCutList;

Description

Actions can execute in response to multiple short cut key combinations. SecondaryShortCuts lists all the short cut key combinations (other than the one specified by the ShortCut property) that can trigger the action. This lets you specify shortcuts for clients that do not have a ShortCut property or provide additional, secondary shortcuts.

When the user types one of the key combinations listed in SecondaryShortCuts, the action’s Execute method is called.


TCustomAction.ShortCut
 VCL Reference

TCustomAction.ShortCut

TCustomAction	See also

Specifies the ShortCut property for client menu items.

property ShortCut: TShortCut;

Description

ShortCut holds the value that is the shortcut for the action when it is set. This value is propagated to client menu items.


TCustomAction.Visible
 VCL Reference

TCustomAction.Visible

TCustomAction	See also

Specifies the Visible property for client controls and menu items.

property Visible: Boolean;

Description

Visible specifies the visible state for the action. This value is propagated to client controls and menu items.


 VCL Reference

TCustomAction events

TCustomAction	Alphabetically	Legend

In TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TCustomAction events

TCustomAction	By object	Legend

OnExecute

OnHint

OnUpdate


TCustomAction.OnHint
 VCL Reference

TCustomAction.OnHint

TCustomAction	 See also

Occurs when the mouse pauses over a client control or menu item.

type THintEvent = procedure (var HintStr: String; var CanShow: Boolean) of object;

property OnHint: THintEvent;

Description

Use OnHint to override the default hint that appears when the user pauses the mouse over a client control or menu item. The OnHint event handler can change the hint that appears (by changing the HintStr parameter), or display the hint in some application-specific way.

Set CanShow to indicate whether the hint specified by HintStr should be shown using the default popup window after the event handler exits.


 VCL Reference

TCustomAction methods

TCustomAction	Alphabetically	Legend

In TCustomAction

AssignTo

Create

Destroy

DoHint

Execute

HandleShortCut

SetName

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

ExecuteTarget

HandlesTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomAction methods

TCustomAction	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleShortCut

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetName

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TCustomAction.AssignTo
 VCL Reference

TCustomAction.AssignTo

TCustomAction	See also

Copies the properties of this action to a destination object.

procedure AssignTo(Dest: TPersistent); override;

Description

AssignTo is overridden so that existing objects of type TCustomAction can be copied to other action objects of the same type. AssignTo ensures the correct assignment of property values.


TCustomAction.Create
 VCL Reference

TCustomAction.Create

TCustomAction	See also

Instantiates and initializes a TCustomAction object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not need to call the constructor directly. Actions are created automatically when you add them to an action manager or action list component at design time. If you want to create an action at runtime, assign a TActionList or TActionManager component to its ActionList property after calling Create.


TCustomAction.Destroy
 VCL Reference

TCustomAction.Destroy

TCustomAction	See also

Frees an instance of TCustomAction.

destructor Destroy; override;

Description

Do not call the destructor directly in an application. Instead, call Free. Free ensures that the action is not nil before calling the destructor.

If the action is contained in an action list or action manager, Destroy removes the action from that list.


TCustomAction.DoHint
 VCL Reference

TCustomAction.DoHint

TCustomAction	See also

Generates an OnHint event.

function DoHint(var HintStr: String): Boolean; dynamic;

Description

Typically, Applications do not call the DoHint method. It is called automatically when the user pauses the mouse over one of the action’s client controls or menu items.

DoHint checks for an OnHint event handler and passes HintStr to it, if the handler exists. DoHint returns True if no event handler is assigned or if the OnHint event handler indicates that the hint should be displayed using the default popup window.


TCustomAction.Execute
 VCL Reference

TCustomAction.Execute

TCustomAction	See also

Responds when a client control “fires”.

function TCustomAction.Execute: Boolean; override;

Description

Execute is called automatically when a client control “fires” (for example, when the user clicks a button or selects a menu item). It returns True if an event handler is found to handle the action, False if there was no event handler or if the action was not enabled.

Execute first ensures that the action is updated. Then, if the Enabled property is True, it attempts to handle the action by generating an OnExecute event on the action list that contains this action (if the action belongs to an action list). If the action list’s OnExecute event handler does not handle the action, Execute generates an OnActionExecute event on the application itself. If neither the action list nor the application handles the action in response to these events, Execute generates an OnExecute event on itself. If this action has no OnExecute event handler, Execute instructs the application to locate the current target control and call the ExecuteTarget method, which is the mechanism by which predefined action classes perform their function.


TCustomAction.HandleShortCut
 VCL Reference

TCustomAction.HandleShortCut

TCustomAction	See also

Executes the action when the user types on of its short cuts.

function HandleShortCut: Boolean; virtual;

Description

Applications can’t call the protected HandleShortCut method. The action list’s IsShortCut method calls HandleShortCut when it finds a match between a shortcut key combination and the action’s ShortCut or SecondaryShortCuts property.

As implemented in TCustomAction, HandleShortCut calls Execute to cause the action to perform its function. HandleShortCut returns the value that Execute returns.

Descendant classes can override HandleShortCut to respond in other ways when the user types the action’s shortcut keys.


TCustomAction.SetName
 VCL Reference

TCustomAction.SetName

TCustomAction	 See also

Sets the value of the Name property.

procedure SetName(const Value: TComponentName); override;

Description

SetName is the protected write implementation of the Name property. It calls the ChangeName method, which performs the actual name change. TCustomAction overrides SetName so that it also changes the Caption property if Caption is the same as Name.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction


TCustomApplicationEvents
 VCL Reference

TCustomApplicationEvents

Hierarchy	Properties	Methods	Events	See also

TCustomApplicationEvents intercepts application-level events.

Unit

AppEvnts

Description

Use TCustomApplicationEvents as a base class for objects that intercept the events of the global Application object. Each event of the TApplicationEvents object is the same as the event with the same name on the Application object.

Do not create instances of TCustomApplicationEvents. Instead, use a descendant of TCustomApplicationEvents such a TApplicationEvents.


 VCL Reference

TCustomApplicationEvents properties

TCustomApplicationEvents	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomApplicationEvents properties

TCustomApplicationEvents	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomApplicationEvents events

TCustomApplicationEvents	Alphabetically	Legend

In TCustomApplicationEvents

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


 VCL Reference

TCustomApplicationEvents events

TCustomApplicationEvents	By object	Legend

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


TCustomApplicationEvents.OnActionExecute
 VCL Reference

TCustomApplicationEvents.OnActionExecute

TCustomApplicationEvents	See also

Occurs when an action’s Execute method is called and its action list has not already handled it.

property OnActionExecute: TActionEvent;

Description

Use the OnExecute event handler to respond when a user invokes actions whose action lists do not have OnExecute event handlers.

If the action list that contains the action does not handle it in an OnExecute event handler, then the action is routed to the Application object’s OnActionExecute event. The application events object hooks this event and responds with its own OnActionExecute event handler.

The Handled parameter of the event handler returns False by default. If the handler handles the event, it should change Handled to True, thereby preventing further attempts to handle the action. When the event handler exits with Handled set to False, the event first goes to any other application events objects, and then the action’s OnExecute event occurs. If the action remains unhandled after that, the active control’s ExecuteAction method is called to allow the action to execute with an identified target. Finally, the active form’s ExecuteAction method is called if all other handlers do not handle the action.

Note:	Call the CancelDispatch method from an OnActionExecute event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnActionUpdate
 VCL Reference

TCustomApplicationEvents.OnActionUpdate

TCustomApplicationEvents	See also

Occurs when an action’s Update method is called and its action list has not already handled it.

property OnActionUpdate: TActionEvent;

Description

Use the OnActionUpdate event handler to update the properties of an action when the application is idle if the action’s action list does not handle it in an OnUpdate event handler. OnActionUpdate occurs after the OnIdle event.

If the action list that contains the action does not update it in an OnUpdate event handler, the action is routed to the Application object’s OnActionUpdate event. The application events object hooks this event and responds with its own OnActionUpdate event handler.

The Handled parameter of the event handler returns False by default. If the handler updates the event, it should change Handled to True, thereby ending the processing of the action. When the event handler exits with Handled set to False, the event first goes to any other application events objects, and then the action’s OnUpdate event occurs. If the action is not updated after that, the active control’s UpdateAction method is called to allow the target to update the action. Finally, the active form’s UpdateAction method is called if all other handlers do not handle the action.

Note:	Call the CancelDispatch method from an OnActionUpdate event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnActivate
 VCL Reference

TCustomApplicationEvents.OnActivate

TCustomApplicationEvents	See also

Occurs when an application becomes active.

property OnActivate: TNotifyEvent;

Description

Write an OnActivate event handler to perform special processing when the application becomes active.

An application becomes active when it is initially run or when focus moves from another Windows application back to any window of the application.

Note:	Call the CancelDispatch method from an OnActivate event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnDeactivate
 VCL Reference

TCustomApplicationEvents.OnDeactivate

TCustomApplicationEvents	See also

Occurs when an application becomes inactive.

property OnDeactivate: TNotifyEvent;

Description

Write an OnDeactivate event handler to perform any special processing that should occur immediately before the application is deactivated. The OnDeactivate event occurs when the user switches from the application to another Windows application.

Note:	Call the CancelDispatch method from an OnDeactivate event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnException
 VCL Reference

TCustomApplicationEvents.OnException

TCustomApplicationEvents	See also

Occurs when an unhandled exception occurs in the application.

type TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;

property OnException: TExceptionEvent;

Description

Use OnException to change the default behavior that occurs when an exception is not handled by application code. The OnException event handler is called automatically in the application’s HandleException method.

OnException only handles exceptions that occur during message processing. Exceptions that occur before or after the execution of the application’s Run method do not generate OnException events.

If an exception passes through the try blocks in the application code, the application automatically calls the HandleException method. Unless the exception object is EAbort, HandleException calls the OnException handler, if one exists. Otherwise, it calls ShowException to display a message box indicating an error occurred.

The Sender parameter is the object that raised the exception, and E is the exception object.

Note:	Call the CancelDispatch method from an OnException event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnHelp
 VCL Reference

TCustomApplicationEvents.OnHelp

TCustomApplicationEvents	See also

Occurs when the application receives a request for help.

type THelpEvent = function (Command: Word; Data: Longint; var CallHelp: Boolean): Booleanof object;

property OnHelp: THelpEvent;

Description

Write an OnHelp event handler to perform special processing when the user requests help. The HelpContext and the HelpJump methods automatically trigger the OnHelp event.

Set CallHelp to True to have the application call WinHelp after the event. Set CallHelp to False to prevent the application from calling WinHelp. All application help methods go through OnHelp. The application calls WinHelp only if OnHelp’s CallHelp parameter returns True, or if no OnHelp event handler is assigned.

To find the possible values of the Command and Data parameters, search for WinHelp in the Win32 Developer's Reference Help (Win32.HLP) file, which explains the WinHelp API (application programming interface). The possible values for the Data parameter depend upon the value of the Command parameter.

The return value is True if the event handler succeeds, False if it fails.

Note:	Call the CancelDispatch method from an OnHelp event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnHint
 VCL Reference

TCustomApplicationEvents.OnHint

TCustomApplicationEvents	See also

Occurs when the mouse pointer moves over a control or menu item that can display a Help Hint.

property OnHint: TNotifyEvent;

Description

Write an OnHint event handler to perform special processing when the mouse pauses over a control or menu item whose Hint property is not an empty string (‘’).

A common use of the OnHint event is to display the value of a control or menu item's Hint property as the text of a status bar (TStatusBar). The Hint property of a control can specify both a short Help Hint and a (usually) longer hint that appears elsewhere because of code in an OnHint event handler.

Note:	Call the CancelDispatch method from an OnHint event handler to prevent the application from forwarding the event to any other application events objects.

Tip:	Component writers can respond to the automatically-fired THintAction action in a component’s ExecuteAction method rather than relying on an OnHint event handler.


TCustomApplicationEvents.OnIdle
 VCL Reference

TCustomApplicationEvents.OnIdle

TCustomApplicationEvents 	See also

Occurs when an application becomes idle.

type TIdleEvent = procedure (Sender: TObject; var Done: Boolean) of object;

property OnIdle: TIdleEvent;

Description

Write an OnIdle event handler to perform special processing when an application is idle. An application is idle when it is not processing code. For example, an application is idle when it is waiting for input from the user.

TIdleEvent has a Boolean parameter Done that is True by default. When Done is True, the Windows API WaitMessage function is called after OnIdle returns. WaitMessage yields control to other applications until a new message appears in the message queue of the application. When Done is False, the application does not yield control to other applications while it is not busy.

OnIdle is called only once, as the application transitions into an idle state. It is not called continuously unless Done is set to False. Applications that set Done to False consume an inordinate amount of CPU time, which affects overall system performance.

Note:	Call the CancelDispatch method from an OnIdle event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnMessage
 VCL Reference

TCustomApplicationEvents.OnMessage

TCustomApplicationEvents	See also

Occurs when the application receives a Windows message.

type TMessageEvent = procedure (var Msg: TMsg; var Handled: Boolean) of object;

property OnMessage: TMessageEvent;

Description

Use OnMessage to trap any or all Windows messages posted to all windows in the application. OnMessage occurs when an application receives a Windows message. OnMessage only receives messages that are posted to the message queue, not those sent directly with the Windows API SendMessage function.

An OnMessage event handler allows an application to respond to messages other than those declared in the events for TApplication. If the application doesn't have a specific handler for an incoming message, the message is dispatched to the window for which it was intended, and Windows handles the message.

The Msg parameter identifies the Windows message, and the Handled parameter indicates whether the event handler responded to the message. Set Handled to Truetrue if the message has been completely handled, to prevent subsequent processing of the message.

Caution:	Thousands of messages per second flow though this event. Be careful when coding the handler, because it can affect the performance of the entire application.

Tip:	Call the CancelDispatch method from an OnMessage event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnMinimize
 VCL Reference

TCustomApplicationEvents.OnMinimize

TCustomApplicationEvents	See also

Occurs when an application is minimized.

property OnMinimize: TNotifyEvent;

Description

Write an OnMinimize event handler to perform special processing when the application is minimized. The application is minimized, either because the user minimizes the main window, or because of a call to the Minimize method. The application’s Icon property determines the icon that represents the minimized application.

Note:	Call the CancelDispatch method from an OnMinimize event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnSettingChange
 VCL Reference

TCustomApplicationEvents.OnSettingChange

TCustomApplicationEvents	See also	Example

Occurs when Windows notifies the application that a system-wide setting has changed.

type TSettingChangeEvent = procedure (Sender: TObject; Flag: Integer; const Section: string; var Result: Longint) of object;

property OnSettingChange: TSettingChangeEvent;

Description

Use OnSettingChange to respond when Windows informs the application that a system-wide setting or policy has changed.

Sender is the application object.

Section indicates the area that contains the system parameter that changed. Typically, this is a registry key or the name of a section in Win.ini. If the notification indicates a policy change, Section is the string ‘Policy’. If the notification indicates a change in locale settings, Section is the string ‘intl’.

Result is the value returned to Windows. It should be 0 if the event handler responded to the setting change, nonzero otherwise.

Flag indicates what setting changed. The following table lists the possible values:

Value	Meaning

0	A user policy was applied or a user locale setting changed.

1	A computer policy was applied.

SPI_SETDESKWALLPAPER	The bitmap for the desktop wallpaper changed.

SPI_SETCURSORS	The system cursors changed.

SPI_SETDESKPATTERN	The desktop pattern was reloaded from Win.ini.

SPI_SETFONTSMOOTING	The font smoothing feature was enabled or disabled.

SPI_SETWORKAREA	The size of the work area (the portion of the screen not obscured by the system taskbar or desktop toolbars) changed.

SPI_ICONHORIZONTALSPACING	The width, in pixels, of an icon cell changed. This affects the arrangement of icons in large icon view.

SPI_ICONVERTICALSPACING	The height, in pixels, of an icon cell changed. This affects the arrangement of icons in large icon view.

SPI_SETICONMETRICS	The metrics associated with system icons changed.

SPI_SETICONS	The system icons were reloaded.

SPI_SETICONTITLELOGFONT	The font for icon titles changed.

SPI_SETICONTITLEWRAP	Icon title-wrapping was turned on or off.

SPI_SETBEEP	The warning beeper was turned on or off.

SPI_SETDEFAULTINPUTLANG	The default input language for the system shell changed

SPI_SETDOUBLECLICKTIME	The double-click time for the mouse changed.

SPI_SETDOUBLECLICKHEIGHT	The height of the double-click rectangle changed.

SPI_SETDOUBLECLICKWIDTH	The width of the double-click rectangle changed.

SPI_SETKEYBOARDCUES	The setting for whether Menu access key letters appear always or only when the menu is activated from the keyboard changed.

SPI_SETKEYBOARDDELAY	The keyboard repeat-delay setting changed.

SPI_SETKEYBOARDPREF	The keyboard preference changed. This indicates whether the user wants applications to display hidden keyboard interfaces.

SPI_SETKEYBOARDSPEED	The keyboard repeat-speed setting changed.

SPI_SETLANGTOGGLE	The hotkey for switching input languages changed.

SPI_SETMOUSE	The mouse threshold values or acceleration changed.

SPI_SETMOUSEBUTTONSWRAP	The meaning of left and right mouse buttons changed.

SPI_SETMOUSEHOVERHEIGHT	The height of the rectangle in which the mouse must stay for mouse hover messages changed.

SPI_SETMOUSEHOVERTIME	The time the mouse must stay in the hover rectangle to generate mouse hover messages changed.

SPI_SETMOUSEHOVERWIDTH	The width of the rectangle in which the mouse must stay for mouse hover messages changed.

SPI_SETMOUSESPEED	The mouse speed changed.

SPI_SETMOUSETRAILS	Mouse trails were turned on or off.

SPI_SETSNAPTODEFBUTTON	The automatic snapping of the mouse to the default button was turned on or off.

SPI_SETWHEELSCROLLLINES	The number of lines to scroll when the mouse wheel rotates changed.

SPI_SETMENUDROPALIGNMENT	Popup menus changed between left- and right-alignment.

SPI_SETMENUFADE	Menu fade animation was turned on or off (Windows 2K)

SPI_SETMENUSHOWDELAY	The delay before displaying a shortcut menu when the mouse is over a submenu item changed.

SPI_SETLOWPOWERACTIVE	The low-power phase of screen saving was activated or deactivated.

SPI_SETLOWPOWERTIMEOUT	The time period before the low-power phase of screen saving is activated changed.

SPI_SETPOWEROFFACTIVE	The power-off phase of screen saving came on or off.

SPI_SETPOWEROFFTIMEOUT	The delay before activating the power-off phase of screen saving changed.

SPI_SETSCREENSAVEACTIVE	The screen saver was activated or deactivated.

SPI_SETSCREENSAVETIMEOUT	The delay before the screen saver appears changed.

SPI_SETCOMBOBOXANIMATION	The slide-open effect for combo boxes was turned on or off.

SPI_SETCURSORSHADOW	The cursor shadow was turned on or off (WIndows 2K).

SPI_SETGRADIENTCAPTIONS	The gradient effect on window title bars was turned on or off.

SPI_SETHOTTRACKING	Hot-tracking was enabled or disabled.

SPI_SETLISTBOXSMOOTHSCROLLING	Smooth scrolling of list boxes was enabled or disabled.

SPI_SETMENUANIMATION	Menu animation was enabled or disabled.

SPI_SETMENUUNDERLINES	Same as SPI_SETKEYBOARDCUES.

SPI_SETSELECTIONFADE	The menu selection fade feature was enabled or disabled. (Windows 2K)

SPI_SETTOOLTIPANIMATION	ToolTip animation was enabled or disabled. (Windows 2K)

SPI_SETTOOLTIPFADE	ToolTip animation changed between a fade and a slide effect. (Windows 2K)

SPI_SETUIEFFECTS	UI effects were enabled or disabled. (Windows 2K)

SPI_SETACTIVEWINDOWTRACKING	Active window tracking (where the active window follows the mouse) was enabled or disabled.

SPI_SETACTIVEWNDTRKZORDER	Active window tracking changed whether the active window was brought to the top.

SPI_SETANIMATION	Parameters to the animation effects for user actions changed.

SPI_SETBORDER	The width of a window’s sizing border changed.

SPI_SETCARETWIDTH	The width of the caret in edit controls changed (Windows 2K)

SPI_SETDRAGFULLWINDOWS	Dragging of full windows was turned on or off.

SPI_SETDRAGHEIGHT	The height of the rectangle used to detect drag operations changed.

SPI_SETDRAGWIDTH	The width of the rectangle used to detect drag operations changed.

SPI_SETFOREGROUNDFLASHCOUNT	The number of times a taskbar button flashes when rejecting a foreground switch request changed.

SPI_SETFOREGROUNDLOCKTIMEOUT	The time after user input during which applications can’t force themselves into the foreground changed.

SPI_SETMINIMIZEDMETRICS	The metrics for minimized windows changed.

SPI_SETNONCLIENTMETRICS	The metrics for the nonclient area of nonminimized windows changed.

SPI_SETSHOWIMEUI	The ability of the IME window to be visible on a per-user basis changed.

SPI_SETPENWINDOWS	Pen windows was loaded or unloaded. (Windows 9x)

SPI_SETACCESSTIMEOUT	The time-out period for accessibility features changed.

SPI_SETFILTERKEYS	The parameters to the FilterKeys accessibility feature changed.

SPI_SETHIGHCONTRAST	The parameters to the HighContrast accessibility feature changed.

SPI_SETMOUSECLICKLOCK	The mouse ClickLock state was turned on or off. (Windows Me)

SPI_SETMOUSECLICKLOCKTIME	The time delay for locking the primary mouse button changed. (Windows Me)

SPI_SETMOUSEKEYS	The parameters for the MouseKeys accessibility feature changed.

SPI_SETMOUSESONAR	The mouse Sonar feature was turned on or off. (Windows Me)

SPI_SETMOUSEVANISH	The mouse Vanish feature was turned on or off. (Windows Me)

SPI_SETSCREENREADER	A screen reviewer utility (such as a speech synthesizer or Braille display utility) started or stopped running.

SPI_SETSERIALKEYS	The parameters to the SerialKeys accessibility feature changed. (Windows 9x)

SPI_SETSHOWSOUNDS	The Show Sounds accessibility feature toggled.

SPI_SETSOUNDSENTRY	The parameters to the SoundSentry accessibility feature changed.

SPI_SETSTICKYKEYS	The parameters to the StickyKeys feature changed.

SPI_SETTOGGLEKEYS	The parameters to the ToggleKeys feature changed.


TCustomApplicationEvents.OnRestore
 VCL Reference

TCustomApplicationEvents.OnRestore

TCustomApplicationEvents	See also

Occurs when the previously minimized application is restored to its normal size.

property OnRestore: TNotifyEvent;

Description

Write an OnRestore event handler to perform special processing when the application is restored from the minimized state in which it appears as an icon. An application is restored either because the user restores the application, or because the application calls the Restore method.

Note:	Don't confuse restoring an application with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of the WindowState property.

Note:	Call the CancelDispatch method from an OnRestore event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnShortCut
 VCL Reference

TCustomApplicationEvents.OnShortCut

TCustomApplicationEvents	See also

Occurs when the user presses a key (before the OnKeyDown event).

property OnShortCut: TShortCutEvent;

Description

Use OnShortCut to dispatch shortcut keystrokes before the form or its controls handle them. When the user presses a key, the application can dispatch it as a shortcut key instead of allowing the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp). Built-in shortcut processing is provided for menu shortcuts and actions associated with the form. OnShortCut lets the application implement additional shortcuts.

If the OnShortCut event handler responds to the keystroke, set its Handled parameter to True. This prevents the keystroke from being passed on to menus or actions associated with the application. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does.

Note:	Call the CancelDispatch method from an OnShortCut event handler to prevent the application from forwarding the event to any other application events objects.


TCustomApplicationEvents.OnShowHint
 VCL Reference

TCustomApplicationEvents.OnShowHint

TCustomApplicationEvents	See also

Occurs when the application is about to display the hint window for a Help Hint.

type TShowHintEvent = procedure (var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo) of object;

property OnShowHint: TShowHintEvent;

Description

Write an OnShowHint event handler to change the appearance and behavior of Help Hints.

The HintStr parameter sets the text of the Help Hint. To obtain the text of a hint for a particular control, call the GetLongHint or GetShortHint function, assigning the result to HintStr. To change the text, change the value of this string.

Use the CanShow parameter to permit or prevent the Help Hint from displaying. If CanShow is True, the Help Hint displays. If it is False, the Help Hint does not appear.

The HintInfo parameter is a record that contains information about the appearance and behavior of the Help window. Change its fields to customize the way the Help Hint is displayed.

Note:	Call the CancelDispatch method from an OnShowHint event handler to prevent the application from forwarding the event to any other application events objects.


 VCL Reference

TCustomApplicationEvents methods

TCustomApplicationEvents	Alphabetically	Legend

In TCustomApplicationEvents

Activate

CancelDispatch

Create

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomApplicationEvents methods

TCustomApplicationEvents	By object	Legend

Activate

AfterConstruction

Assign

BeforeDestruction

CancelDispatch

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TCustomApplicationEvents.Activate
 VCL Reference

TCustomApplicationEvents.Activate

TCustomApplicationEvents	See also

Ensures that this is the first component to receive any application events.

procedure Activate;

Description

Call Activate to move the TCustomApplicationEvents descendant to the front of the internal list of components that respond to the application’s events. There is no need to call Activate unless the project includes more than one TCustomApplicationEvents descendant.

Typically, each form that contains a TCustomApplicationEvents descendant calls that component’s Activate method from its OnActivate event handler. This has the effect of switching the first event handler to receive an event every time the user changes the active form.

Activate does not prevent other TCustomApplicationEvents descendants from receiving events, it merely places them in the queue behind the active TCustomApplicationEvents descendant. To prevent other components from receiving the events, use the CancelDispatch method.

Warning:	Do not call Activate from an event handler that is responding to an application-level event. Such a call will cause an exception to be raised.


TCustomApplicationEvents.CancelDispatch
 VCL Reference

TCustomApplicationEvents.CancelDispatch

TCustomApplicationEvents

Prevents other TCustomApplicationEvents objects from receiving the current event.

procedure CancelDispatch;

Description

Call CancelDispatch from one of the TCustomApplicationEvents descendant’s event handlers when it handles an event. CancelDispatch prevents other TCustomApplicationEvents descendant’s from receiving the event after the current event handler exits.

CancelDispatch has no effect unless it is called from one of the component’s event handlers.


TCustomApplicationEvents.Create
 VCL Reference

TCustomApplicationEvents.Create

TCustomApplicationEvents	See also

Creates a new TCustomApplicationEvents object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TCustomApplicationEvents at runtime. Components added to forms at design time are created automatically.

Create adds the component to the internal list of components that respond to the application’s events. Once the component is created, it responds to any of the application events unless another TCustomApplicationEvents component prevents it by calling CancelDispatch.


Hierarchy

TObject

TPersistent

TComponent

TCustomApplicationEvents


TCustomComboBox
 VCL Reference

TCustomComboBox

Hierarchy	Properties	Methods	Events	See also

TCustomComboBox is the base class for combobox components.

Unit

StdCtrls

Description

Use TCustomComboBox as a base class when defining a control that represents a specializedWindows combo box. A combo box is an edit box with a scrollable list attached to it; users can select an item from the list or type directly into the edit box. Combo boxes can present the list as a drop-down list or as a list box that is always visible.

Note:	To create a combo box class that uses the extended combo box features such as images associated with entries, do not use TCustomComboBox. Instead, use the TCustomComboBoxEx class instead.

Do not create instances of TCustomComboBox. To put a combo box in a form, use a descendant of TCustomComboBox, such as TComboBox.


 VCL Reference

TCustomComboBox properties

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

AutoComplete

AutoDropDown

CharCase

ItemHeight

SelText

Sorted

Style

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomComboBox Properties

TCustomComboBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemHeight

ItemIndex

Items

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomComboBox.AutoComplete
 VCL Reference

TCustomComboBox.AutoComplete

TCustomComboBox	See also

Specifies whether the combo box automatically completes words that the user types by selecting the first item that begins with the currently typed string.

property AutoComplete: Boolean;

Description

When AutoComplete is True, the combo box responds to user keystrokes by searching the Items property array for the first item that matches the string entered so far. If it finds an item that begins with the prefix typed so far, the combo box selects that item, “completing” the user’s typing. If the user continues to type, selection may move to another, later, item, as the currently typed prefix no longer matches the initial AutoComplete selection. If the user types a string that is not the prefix of a string in the combo box, the string is taken as a unique entry and none of the items in the list are selected.

When AutoComplete is False, this feature is disabled. Strings that the user types are taken literally, with no attempt to match them to a string in the combo box. Setting AutoComplete to False is necessary if you want to allow the user to enter a value that is not in the Items list but that is a prefix on one of the items.


TCustomComboBox.AutoDropDown
 VCL Reference

TCustomComboBox.AutoDropDown

TCustomComboBox	See also

Specifies whether the drop-down list drops down automatically in response to user keystrokes.

property AutoDropDown: Boolean;

Description

When AutoDropDown is True, the combo box automatically drops down its list when the user starts typing a string while the combo box has focus.

When AutoDropDown is False, the user must explicitly use the drop-down button to drop down the combo box list.


TCustomComboBox.CharCase
 VCL Reference

TCustomComboBox.CharCase

TCustomComboBox	See also

Determines the case of the text in the combo box.

type TEditCharCase = (ecNormal, ecUpperCase, ecLowerCase);

property CharCase: TEditCharCase;

Description

Use CharCase to force the contents of the combo box into upper or lower case. The possible values of CharCase are

Value	Meaning

ecLowerCase	The text is converted to lowercase.

ecNormal	The text appears in mixed case; it is not forced into any case. This is the default setting.

ecUpperCase	The text is converted to uppercase.

When CharCase is set to ecLowerCase or ecUpperCase, the case of characters is converted as the user types into the combo box. Changing the CharCase property changes the actual text, not just its appearance; case information is lost and cannot be recaptured by changing CharCase back to ecNormal.


TCustomComboBox.ItemHeight
 VCL Reference

TCustomComboBox.ItemHeight

TCustomComboBox	See also

Specifies the height, in pixels, of the items in the drop-down list.

property ItemHeight: Integer;

Description

Use ItemHeight to specify the height needed to draw the items in the list when Style is set to csOwnerDrawFixed. If Style is csOwnerDrawVariable, ItemHeight is the default height for drawing list items. When Style is csOwnerDrawVariable, ItemHeight can be overridden by an OnMeasureItem event handler. If Style is set to any other value, the ItemHeight property is inoperative.


TCustomComboBox.SelText
 VCL Reference

TCustomComboBox.SelText

TCustomComboBox	See also

Represents the selected text in the edit region.

property SelText: string;

Description

Read SelText to obtain the text that is selected in the edit region of the combo box. When the combo box is the active control, SelText appears highlighted. Set SelText to replace the current selection with a different substring. If no text is selected when a value is assigned to SelText, the SelText string is inserted in the text at the cursor.

Note:	The SelText property is only valid when the combo box has focus. When the combo box does not have focus, reading SelText always yields an empty string and setting it inserts the text at the cursor rather than replacing the selected text.


TCustomComboBox.Sorted
 VCL Reference

TCustomComboBox.Sorted

TCustomComboBox	See also 	Example

Determines whether the list portion of the combo box is alphabetized.

property Sorted: Boolean;

Description

Set Sorted to True to sort the items in the Items list alphabetically. New items added to the list while Sorted is True are inserted in the correct alphabetical position.

When Sorted is changed from False to True, the original order of the items is lost. Setting Sorted back to False does not restore the original order.


TCustomComboBox.Style
 VCL Reference

TCustomComboBox.Style

TCustomComboBox	See also

Determines the display style of the combo box.

type TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable);

property Style: TComboBoxStyle;

Description

Set Style to specify how the list and edit region of the combo box should appear.

These are the values in the TComboBoxStyle type:

Value	Meaning

csDropDown	Creates a drop-down list with an edit box for manually entered text. All items are strings of the same height.

csSimple	Creates an edit box with a fixed list (list box) underneath. The length of the list is determined by the Height of the combo box.

csDropDownList	Creates a drop-down list with no edit box; the user cannot enter text manually. All items are strings of the same height.

csOwnerDrawFixed	Creates an owner-draw drop-down list with no edit box. Each item in the list is the height specified by the ItemHeight property.

csOwnerDrawVariable	Creates an owner-draw drop-down list with no edit box. List items can have varying heights.

When Style is csOwnerDrawFixed or csOwnerDrawVariable, the OnDrawItem event occurs when the list items need to be drawn. If Style is csOwnerDrawVariable, an OnMeasureItem event occurs as well.


 VCL Reference

TCustomComboBox events

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

OnDrawItem

OnMeasureItem


 VCL Reference

TCustomComboBox Events

TCustomComboBox	By Object	Legend

OnDrawItem

OnMeasureItem


TCustomComboBox.OnDrawItem
 VCL Reference

TCustomComboBox.OnDrawItem

TCustomComboBox	See also

Occurs when an item in an owner-draw combo box needs to be displayed.

property OnDrawItem: TDrawItemEvent;

Description

Write an OnDrawItem event handler to draw the items in the drop-down list of an owner-draw combo box. An OnDrawItem event handler can add graphic elements to the list items, or replace the list item text by graphics.

Draw the items on the Canvas using the coordinates provided by the Rect parameter. OnDrawItem occurs only if Style is set to csOwnerDrawFixed or csOwnerDrawVariable.

If an OnDrawItem event handler is not provided, the combo box fills the Rect parameter with the current brush and writes the text value of the item specified by the Index parameter.


TCustomComboBox.OnMeasureItem
 VCL Reference

TCustomComboBox.OnMeasureItem

TCustomComboBox 	See also

Occurs when an item in a csOwnerDrawVariable combo box needs to be redisplayed.

type TMeasureItemEvent = procedure(Control: TWinControl; Index: Integer; var Height: Integer) of object;

property OnMeasureItem: TMeasureItemEvent;

Description

When Style is set to csOwnerDrawVariable, the OnMeasureItem event precedes OnDrawItem. Write an OnMeasureItem event handler to specify the height, in pixels, needed to draw an item in the drop-down list.

OnMeasureItem passes three parameters to its event handler:

Control	A reference to the combo box containing the item.

Index	The index of the item in the Items property.

Height	The default height of the item, in pixels.

The event handler can reset the final parameter, Height, to the appropriate value.


 VCL Reference

TCustomComboBox methods

TCustomComboBox	Alphabetically	Legend

In TCustomComboBox

Create

CreateParams

CreateWnd

Destroy

DestroyWnd

DrawItem

GetItemCount

GetItemHt

GetItemsClass

GetSelText

KeyPress

MeasureItem

SelectItem

SetStyle

WndProc

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomComboBox Methods

TCustomComboBox	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawItem

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemCount

GetItemHt

GetItemsClass

GetNamePath

GetParentComponent

GetSelText

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyPress

ManualDock

ManualFloat

MeasureItem

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SelectItem

SendToBack

SetBounds

SetFocus

SetStyle

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TCustomComboBox.Create
 VCL Reference

TCustomComboBox.Create

TCustomComboBox	See also

Creates and initializes a TCustomComboBox instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to generate a combo box at runtime. Combo boxes placed on forms at design time are created automatically.

AOwner is a component, typically the form, that is responsible for freeing the combo box instance.


TCustomComboBox.CreateParams
 VCL Reference

TCustomComboBox.CreateParams

TCustomComboBox	See also

Initializes the window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it uses to create the window for the combo box. CreateParams overrides theinherited method to implement the Style property.


TCustomComboBox.CreateWnd
 VCL Reference

TCustomComboBox.CreateWnd

TCustomComboBox	See also

Creates the underlying Windowscontrol that implements the combo box.

procedure CreateWnd; override;

Description

The CreateHandle method calls CreateWnd to perform the task of creating the underlying Windowscontrol.

The Windows control for the combo box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, CreateWnd may be called several times during the lifetime of the TCustomComboBox instance.


TCustomComboBox.Destroy
 VCL Reference

TCustomComboBox.Destroy

TCustomComboBox	See also

Destroys the combo box and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the combo box is not nil, and only then calls Destroy.


TCustomComboBox.DestroyWnd
 VCL Reference

TCustomComboBox.DestroyWnd

TCustomComboBox	See also

Destroys the Windows control that represents the combo box.

procedure DestroyWnd; override;

Description

The Windows control for the combo box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. TCustomComboBox calls DestroyWnd to destroy this Windows control when necessary.

DestroyWnd saves the contents of Items list before calling theinherited DestroyWnd method. The saved list is used if the window is recreated.


TCustomComboBox.DrawItem
 VCL Reference

TCustomComboBox.DrawItem

TCustomComboBox	See also

Generates an OnDrawItem event.

procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); virtual;

Description

When Style is csOwnerDrawFixed or csOwnerDrawVariable, DrawItem is called whenever an item in the list needs to be drawn. If an OnDrawItem event handler is assigned, DrawItem generates an OnDrawItem event, passing the Index, Rect, and State parameters to the event handler. Otherwise, OnDrawItem fills the rectangle passed in Rect and draws any text associated with the indexed item, ignoring the State parameter.

Override DrawItem to provide class-specific drawing code for the items in the list.


TCustomComboBox.GetItemCount
 VCL Reference

TCustomComboBox.GetItemCount

TCustomComboBox	See also

Returns the number of items in the Items property list.

function GetItemCount: Integer; override;

Description

GetItemCount is used internally to quickly determine the number of items in the drop-down list of the combo box.


TCustomComboBox.GetItemHt
 VCL Reference

TCustomComboBox.GetItemHt

TCustomComboBox	See also

Returns the value of the ItemHeight property.

function GetItemHt: Integer; override;

Description

GetItemHt is the protected read implementation of the ItemHeight property.


TCustomComboBox.GetItemsClass
 VCL Reference

TCustomComboBox.GetItemsClass

TCustomComboBox	See also

Returns the class used to implement the Items property.

type TCustomComboBoxStringsClass = class ofTCustomComboBoxStrings;

function GetItemsClass: TCustomComboBoxStringsClass; override;

Description

Combo box controls use GetItemsClass internally to determine what class to use when implementing the Items property. This allows the TCustomCombo base class to implement the Items property for both TCustomComboBox descendants and TCustomComboBoxEx descendants.


TCustomComboBox.GetSelText
 VCL Reference

TCustomComboBox.GetSelText

TCustomComboBox	See also

Returns the value of the SelText property.

function GetSelText: string;

Description

GetSelText is the protected read implementation of the SelText property.


TCustomComboBox.KeyPress
 VCL Reference

TCustomComboBox.KeyPress

TCustomComboBox	See also

Responds to WM_CHAR messages sent to the combo box.

procedure KeyPress (var Key: Char); override;

Description

KeyPress processes standard keystroke messages for the combo box control. If the KeyPress method does not handle the keystroke, it calls the inherited method, which generates an OnKeyPress event.

Key is the character represented by the key that was pressed. If the KeyPress method changes Key to 0, no further processing occurs for the keystroke.


TCustomComboBox.MeasureItem
 VCL Reference

TCustomComboBox.MeasureItem

TCustomComboBox	See also

Generates an OnMeasureItem event.

procedure MeasureItem(Index: Integer; var Height: Integer); virtual;

Description

MeasureItem is the protected implementation method for the OnMeasureItem event. Override MeasureItem to provide class-specific code to specify the size of list items when Style is csOwnerDrawVariable.


TCustomComboBox.SelectItem
 VCL Reference

TCustomComboBox.SelectItem

TCustomComboBox	See also

Selects a specified item from the drop-down list.

function SelectItem(const AnItem: AnsiString): Boolean;

Description

SelectItem selects the first item in the drop-down list that matches the string specified by AnItem. If the list does not contain a string that matches AnItem, SelectItem does nothing.


TCustomComboBox.SetStyle
 VCL Reference

TCustomComboBox.SetStyle

TCustomComboBox	See also

Sets the Style property.

type TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable);

procedure SetStyle(Value: TComboBoxStyle); virtual;

Description

SetStyle is the protected implementation method for the Style property. Override SetStyle to change the implementation of the Style property.


TCustomComboBox.WndProc
 VCL Reference

TCustomComboBox.WndProc

TCustomComboBox	See also

Processes messages received by the combo box.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the first method to received Windows messages that are sent to the combo box. Messages sent to the child windows of the combo box (for the edit region and the list portion) go to the EditWndProc or ListWndProc method instead. WndProc handles messages about changes to the system colors defined in the Windows control panel, and closes up the drop-down list when the Enter key or the Escape key is pressed. All other messages are passed to Dispatch for default processing.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox


TCustomComboBoxEx
 VCL Reference

TCustomComboBoxEx

Hierarchy	Properties	Methods	Events	See also

TCustomComboBoxEx is the base class for combo box components that support extended combo box features such as images on the list entries.

Unit

StdCtrls

Description

Use TCustomComboBoxEx as a base class when defining a control that represents a Windows extended combo box (ComboBoxEx). An extended combo box is an edit box with a scrollable list attached to it that provides native support for item images. Users can select an item from the list or type directly into the edit box. Extended combo boxes can present the list as a drop-down list or as a list box that is always visible.

Note:	To create a combo box class that does not use the extended combo box features such as images associated with entries, use the TCustomComboBox class instead.

Do not create instances of TCustomComboBoxEx. To put an extended combo box in a form, use a descendant of TCustomComboBoxEx, such as TComboBoxEx.


 VCL Reference

TCustomComboBoxEx properties

TCustomComboBoxEx	Alphabetically	Legend

In TCustomComboBoxEx

DropDownCount

Images

ItemHeight

ItemsEx

SelText

Style

StyleEx

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomComboBoxEx Properties

TCustomComboBoxEx	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropDownCount

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Images

ItemHeight

ItemIndex

Items

ItemsEx

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

Style

StyleEx

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomComboBoxEx.DropDownCount
 VCL Reference

TCustomComboBoxEx.DropDownCount

TCustomComboBoxEx	See also

Specifies the maximum number of items displayed in the drop-down list.

property DropDownCount: Integer;

Description

By default, the drop-down list is long enough to contain eight items without requiring the user to scroll to see them all. To make the drop-down list smaller or larger, specify a number larger or smaller than eight as the DropDownCount value.

If the DropDownCount value is larger than the number of items in the Items property, the drop-down list will be just large enough to hold all the possible choices and no more. If the DropDownCount value is smaller then the number of item in the Items property, the drop down list will display a scroll bar.

DropDownCount is meaningful only if Style is not csExSimple.


TCustomComboBoxEx.Images
 VCL Reference

TCustomComboBoxEx.Images

TCustomComboBoxEx	See also

Specifies the images that appear next to items in the combo box list.

property Images: TCustomImageList;

Description

Use Images to supply the list of images that appear beside items in the combo box’s drop-down list. Each combo box item has an ImageIndex property that identifies an image in this list. In addition, Images can contain images that are used as overlay masks for the item images (to create non-rectangular images) and images that are used only when items are selected. The combo box items reference these images using their OverlayImageIndex and SelectedImageIndex properties.


TCustomComboBoxEx.ItemsEx
 VCL Reference

TCustomComboBoxEx.ItemsEx

TCustomComboBoxEx	See also

Lists the items that appear in the list portion of the combo box.

property ItemsEx: TComboExItems;

Description

Read Items to access the list of items that appears in the combo box. ItemsEx is a collection of TComboExItem objects.

Set the value of Items to copy the items from another collection of TComboExItem objects.

Use the methods of Items to add, insert, delete and move items. Use the properties of individual items in the collection to specify the appearance of each item.

Note:	To work with only the strings in the combo box, and not the other properties of the items, you can use the Items property instead.


TCustomComboBoxEx.ItemHeight
 VCL Reference

TCustomComboBoxEx.ItemHeight

TCustomComboBoxEx	See also

Specifies the height, in pixels, of the items in the drop-down list.

property ItemHeight: Integer;

Description

Read ItemHeight to determine the height of the items in the drop-down list. TCustomComboBoxEx ignores attempts to set ItemHeight.


TCustomComboBoxEx.SelText
 VCL Reference

TCustomComboBoxEx.SelText

TCustomComboBoxEx	See also

Represents the selected text in the edit region.

property SelText: string;

Description

Read SelText to obtain the text that is selected in the edit region of the combo box. When the combo box is the active control, SelText appears highlighted. Set SelText to replace the current selection with a different substring. If no text is selected when a value is assigned to SelText, the SelText string is inserted in the text at the cursor.


TCustomComboBoxEx.Style
 VCL Reference

TCustomComboBoxEx.Style

TCustomComboBoxEx	See also

Determines the display style of the combo box.

type TComboBoxExStyle = (csExDropDown, csExSimple, csExDropDownList);

property Style: TComboBoxExStyle;

Description

Set Style to specify how the list and edit region of the combo box should appear.

These are the values in the TComboBoxExStyle type:

Value	Meaning

csExDropDown	Creates a drop-down list with an edit box for manually entered text.

csExSimple	Creates an edit box with a fixed list (list box) underneath. The length of the list is determined by the Height of the combo box.

csExDropDownList	Creates a drop-down list with no edit box; the user cannot enter text manually.


TCustomComboBoxEx.StyleEx
 VCL Reference

TCustomComboBoxEx.StyleEx

TCustomComboBoxEx	See also

Determines the appearance and behavior of the items in the list.

type

  TComboBoxExStyleEx = (csExCaseSensitive, csExNoEditImage, csExNoEditImageIndent, csExNoSizeLimit, csExPathWordBreak);

  TComboBoxExStyles = set of TComboBoxExStyleEx;

property StyleEx: TComboBoxExStyles;

Description

Set StyleEx to configure how the items in the list look and behave.

These are the values in the TComboBoxExStyleEx type:

Value	Meaning

csExCaseSensitive	Searches against item captions are case sensitive. This includes the automatic location of items in the list as the user types.

csExNoEditImage	The items in the list appear without any corresponding images (The combo box ignores their ImageIndex property).

csExNoEditImageIndent	The items in the list can’t appear indented. (The combo box ignores their Indent property).

csExNoSizeLimit	The extended combo box can be resized vertically smaller than the edit region and drop-down button. When resized in this way, the combo box appears clipped.

csExPathWordBreak	The backslash (\), forward slash (/), and period (.) characters are treated as word delimiters for keyboard navigation purposes. This enables keyboard navigation of path names and URLs. (This style is not supported on Windows 9x).


 VCL Reference

TCustomComboBoxEx events

TCustomComboBoxEx	Alphabetically	Legend

In TCustomComboBoxEx

OnBeginEdit

OnEndEdit


 VCL Reference

TCustomComboBoxEx Events

TCustomComboBoxEx	By Object	Legend

OnBeginEdit

OnEndEdit


TCustomComboBoxEx.OnBeginEdit
 VCL Reference

TCustomComboBoxEx.OnBeginEdit

TCustomComboBoxEx	See also

Occurs when the user starts editing the text of the combo box.

property OnBeginEdit: TNotifyEvent;

Description

Write an OnBeginEdit event handler to take specific action immediately before the user edits the text in the combo box.


TCustomComboBoxEx.OnEndEdit
 VCL Reference

TCustomComboBoxEx.OnEndEdit

TCustomComboBoxEx 	See also

Occurs when the user finishes editing the text of the combo box.

property OnEndEdit: TNotifyEvent;

Description

Write an OnEndEdit event handler to take specific action immediately after the user edits the text in the combo box.


 VCL Reference

TCustomComboBoxEx methods

TCustomComboBoxEx	Alphabetically	Legend

In TCustomComboBoxEx

ActionChange

CMColorChanged

CMParentColorChanged

CNNotify

ComboExWndProc

Create

CreateParams

CreateWnd

Destroy

DestroyWnd

Focused

GetActionLinkClass

GetItemCount

GetItemHt

GetItemsClass

Notification

SetDropDownCount

WMLButtonDown

WndProc

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomComboBoxEx Methods

TCustomComboBoxEx	By Object	Legend

ActionChange

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

CMColorChanged

CMParentColorChanged

CNNotify

ComboExWndProc

ContainsControl

ControlAtPos

CopySelection

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemCount

GetItemHt

GetItemsClass

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetDropDownCount

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WMLButtonDown

WndProc


TCustomComboBoxEx.ActionChange
 VCL Reference

TCustomComboBoxEx.ActionChange

TCustomComboBoxEx	See also

Responds when the action for which this combo box is a client changes.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;

Description

ActionChange is called automatically when the action object specified by the Action property, or any of its properties, changes.

In TCustomComboBoxEx, ActionChange checks whether the action is a TStaticActionList object, and if so, updates its Images and ItemIndex properties, as appropriate. It then calls the inherited method, which updates the Caption, Enabled, Hint, and Visible properties and the OnClick event handler.

The Sender parameter is the action object that changed. The CheckDefaults parameter indicates whether the control’s properties should all be updated or only those that have not been explicitly changed from their default values. When CheckDefaults is True, only those properties and event handlers that have not been changed from the default values are updated.


TCustomComboBoxEx.CMColorChanged
 VCL Reference

TCustomComboBoxEx.CMColorChanged

TCustomComboBoxEx	See also

Responds when the Color property changes.

procedure CMColorChanged(var Message: TMessage);

Description

CMColorChanged is called automatically when the Color property changes. It forces a repaint to reflect the new color.

Message represents the parameters of the Windows message that informs the combo box of the color change.


TCustomComboBoxEx.CMParentColorChanged
 VCL Reference

TCustomComboBoxEx.CMParentColorChanged

TCustomComboBoxEx	See also

Responds when the ParentColor property changes.

procedure CMParentColorChanged(var Message: TMessage);

Description

CMParentColorChanged is called automatically when the ParentColor property changes. It forces a repaint to reflect the new color.

Message represents the parameters of the Windows message that informs the combo box of the property change.


TCustomComboBoxEx.CNNotify
 VCL Reference

TCustomComboBoxEx.CNNotify

TCustomComboBoxEx	See also

Responds to notifications of changes in the combo box.

procedure CNNotify(var Message: TWMNotify);

Description

CNNotify is called automatically in response to notification messages from Windows that there has been a change in the combo box. It checks the notification code, and if it is a notification that the user started or stopped editing, generates an OnBeginEdit or OnEndEdit event, as appropriate.

Message represents the parameters of the Windows message that informs the combo box of the change.


TCustomComboBoxEx.ComboExWndProc
 VCL Reference

TCustomComboBoxEx.ComboExWndProc

TCustomComboBoxEx

Responds to Windows messages sent to the combo box.

procedure ComboExWndProc(var Message: TMessage);

Description

ComboExWndProc is the window procedure of the internal combo box Ex control that is part of the extended combo box. It forwards all messages directed at that control to the ComboWndProc method.

Message represents the parameters of the Windows message.


TCustomComboBoxEx.Create
 VCL Reference

TCustomComboBoxEx.Create

TCustomComboBoxEx	See also

Creates and initializes a TCustomComboBoxEx instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to generate an extended combo box at runtime. Combo boxes placed on forms at design time are created automatically.

AOwner is a component, typically the form, that is responsible for freeing the combo box instance.


TCustomComboBoxEx.CreateParams
 VCL Reference

TCustomComboBoxEx.CreateParams

TCustomComboBoxEx	See also

Initializes the window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it uses to create the window for the combo box. CreateParams overrides theinherited method to implement the Style property.


TCustomComboBoxEx.CreateWnd
 VCL Reference

TCustomComboBoxEx.CreateWnd

TCustomComboBoxEx	See also

Creates the underlying Windowscontrol that implements the extended combo box.

procedure CreateWnd; override;

Description

The CreateHandle method calls CreateWnd to perform the task of creating the underlying Windowscontrol.

The Windows control for the combo box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, CreateWnd may be called several times during the lifetime of the TCustomComboBoxEx instance.


TCustomComboBoxEx.Destroy
 VCL Reference

TCustomComboBoxEx.Destroy

TCustomComboBoxEx	See also

Destroys the combo box and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the combo box is not nil, and only then calls Destroy.


TCustomComboBoxEx.DestroyWnd
 VCL Reference

TCustomComboBoxEx.DestroyWnd

TCustomComboBoxEx	See also

Destroys the Windows control that represents the combo box.

procedure DestroyWnd; override;

Description

DestroyWnd is called when the underlying Windows control needs to be destroyed. In addition to freeing this control when the TCustomComboBoxEx object is destroyed, it can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters.

DestroyWnd saves the contents of Items list before calling theinherited DestroyWnd method. The saved list is used if the window is recreated.


TCustomComboBoxEx.::Focused
 VCL Reference

TCustomComboBoxEx.Focused

TCustomComboBoxEx	See also

Indicates whether the combo box has input focus.

function Focused: Boolean; override;

Description

Call Focused to determine whether the combo box is currently the recipient of keyboard input. When Focused returns True, the combo box is the active control and keystroke messages are sent to it. When Focused is False, the combo box is not active (although it may be selected).


TCustomComboBoxEx.GetActionLinkClass
 VCL Reference

TCustomComboBoxEx.GetActionLinkClass

TCustomComboBoxEx	See also

Returns the action link class that is associated with extended combo boxes.

type TControlActionLinkClass = class ofTControlActionLink;

function GetActionLinkClass: TControlActionLinkClass; override;

Description

GetActionLinkClass returns the class type for the action link that manages communication between the combo box and the action specified by the Action property. Each Action link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports.


TCustomComboBoxEx.GetItemCount
 VCL Reference

TCustomComboBoxEx.GetItemCount

TCustomComboBoxEx	See also

Returns the number of items in the Items property list.

function GetItemCount: Integer; override;

Description

GetItemCount is used internally to quickly determine the number of items in the drop-down list of the combo box.


TCustomComboBoxEx.GetItemHt
 VCL Reference

TCustomComboBoxEx.GetItemHt

TCustomComboBoxEx	See also

Returns the height, in pixels, allocated for each item in the drop-down list.

function GetItemHt: Integer; override;

Description

Extended combo boxes do not support variable-height items. For this reason, TCustomComboBoxEx overrides the GetItemHt method so that it always returns 16.


TCustomComboBoxEx.GetItemsClass
 VCL Reference

TCustomComboBoxEx.GetItemsClass

TCustomComboBoxEx	See also

Returns the class used to implement the Items property.

type TCustomComboBoxStringsClass = class ofTCustomComboBoxStrings;

function GetItemsClass: TCustomComboBoxStringsClass; override;

Description

Combo box controls use GetItemsClass internally to determine what class to use when implementing the Items property. TCustomComboBoxEx overrides the inherited method to specify a class that can maintain the relationship between the Items property and the ItemsEx property.


TCustomComboBoxEx.Notification
 VCL Reference

TCustomComboBoxEx.Notification

TCustomComboBoxEx	See also

Responds to notifications that objects are about to be inserted or removed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called when the component specified by AComponent is about to be inserted or removed, as specified by Operation. TCustomComboBoxEx overrides this method to respond to notifications that the image list assigned to the Images property is going away.


TCustomComboBoxEx.SetDropDownCount
 VCL Reference

TCustomComboBoxEx.SetDropDownCount

TCustomComboBoxEx	See also

Sets the DropDownCount property.

procedure SetDropDownCount(const Value: Integer); override;

Description

SetDropDownCount is the protected write implementation method for the DropDownCount property. Override SetDropDownCount to change the implementation of the DropDownCount property.


TCustomComboBoxEx.WMLButtonDown
 VCL Reference

TCustomComboBoxEx.WMLButtonDown

TCustomComboBoxEx	See also

Responds when the user clicks the left mouse button on the combo box.

procedure WMLButtonDown(var Message: TWMLButtonDown);

Description

WMLButtonDown is called automatically in response to Windows messages that the user clicked the left mouse button over the combo box. This method handles the details of starting drag operations when the DragMode property is dmAutomatic.

Message represents the parameters of the Windows message that informs the combo box of the left mouse click.


TCustomComboBoxEx.WndProc
 VCL Reference

TCustomComboBoxEx.WndProc

TCustomComboBoxEx	See also

Processes messages received by the combo box.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the first method to received Windows messages that are sent to the combo box. Messages sent to the child windows of the combo box (for the edit region and the list portion) go to the EditWndProc or ListWndProc method instead. WndProc handles messages about changes to the system colors defined in the Windows control panel, and closes up the drop-down list when the Enter key or the Escape key is pressed. All other messages are passed to Dispatch for default processing.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBoxEx


TCustomCombo
 VCL Reference

TCustomCombo

Hierarchy	Properties	Methods	Events	See also

TCustomCombo is the base class for all combo boxes.

Unit

StdCtrls

Description

Use TCustomCombo as a base class when defining a control that represents a specialized combo box. A combo box is an edit box with a scrollable list attached to it; users can select an item from the list or type directly into the edit box. Combo boxes can present the list as a drop-down list or as a list box that is always visible.

Typically, combo box classes do not descend directly from TCustomCombo. Rather, they descend from one of TCustomCombo’s descendants, TCustomComboBox or TCustomComboBoxEx. Use TCustomCombo as a base class for a simple combo box, or TCustomComboBoxEx as a base class for a combo box that supports the extended combo box features such as images on the list entries.

Do not create instances of TCustomCombo. To put a combo box in a form, use a descendant of TCustomCombo, such as TComboBox or TComboBoxEx.


 VCL Reference

TCustomCombo properties

TCustomCombo	Alphabetically	Legend

In TCustomCombo

Canvas

DropDownCount

DroppedDown

EditHandle

ItemCount

ItemHeight

ItemIndex

Items

ListHandle

MaxLength

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomCombo Properties

TCustomCombo	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropDownCount

DroppedDown

EditHandle

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemCount

ItemHeight

ItemIndex

Items

Left

ListHandle

LRDockWidth

MaxLength

Name

Owner

Parent

ParentColor

ParentWindow

SelLength

SelStart

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomCombo.Canvas
 VCL Reference

TCustomCombo.Canvas

TCustomCombo	See also

Provides access to the drawing surface of the combo box.

property Canvas: TCanvas;

Description

Use Canvas as the drawing surface when customizing the way the combo box paints itself. For example, when using a TCustomCombo descendant that allows applications to draw combo box items in an OnDrawItem even, the OnDrawItem event handler uses Canvas for painting the customized items.


TCustomCombo.DropDownCount
 VCL Reference

TCustomCombo.DropDownCount

TCustomCombo	See also

Specifies the maximum number of items displayed in the drop-down list.

property DropDownCount: Integer;

Description

By default, the drop-down list is long enough to contain eight items without requiring the user to scroll to see them all. To make the drop-down list smaller or larger, specify a number larger or smaller than eight as the DropDownCount value.

If the DropDownCount value is larger than the number of items in the Items property, the drop-down list will be just large enough to hold all the possible choices and no more. If the DropDownCount value is smaller then the number of item in the Items property, the drop down list will display a scroll bar.


TCustomCombo.DroppedDown
 VCL Reference

TCustomCombo.DroppedDown

TCustomCombo	See also

Indicates whether the drop-down list is currently displayed.

property DroppedDown: Boolean;

Description

Read DroppedDown to determine whether the drop-down list is visible. Set DropDown to drop the list down or close it up. DroppedDown is True when the drop-down list is open, and False when it is closed.


TCustomCombo.EditHandle
 VCL Reference

TCustomCombo.EditHandle

TCustomCombo	See also

Returns the window handle for the edit portion of the combo box.

property EditHandle: HWnd;

Description

A combo box is composed of several windows: the combo box itself, the edit control, and the drop-down list. EditHandle is the window handle of the edit control portion. (The Handle property and the ListHandle property give the handles for the combo box itself and the drop-down list, respectively.)

Use EditHandle when making Windows API calls addressed to the edit portion of the combo box.


TCustomCombo.ItemCount
 VCL Reference

TCustomCombo.ItemCount

TCustomCombo	See also

Specifies the number of items in the drop-down list.

property ItemCount: Integer;

Description

Read ItemCount to get the number of items in the drop-down list. ItemCount is the number of all items, not just those that are visible at one time.


TCustomCombo.ItemHeight
 VCL Reference

TCustomCombo.ItemHeight

TCustomCombo	See also

Specifies the height, in pixels, of the items in the drop-down list.

property ItemHeight: Integer;

Description

Read ItemHeight to determine the height of the items in the drop-down list.

The effect of setting ItemHeight varies, depending on the type of combo box and the style. For example, TComboBox lets you set the item height only when Style is set to csOwnerDrawFixed or csOwnerDrawVariable. If Style is csOwnerDrawVariable, ItemHeight is the default height for drawing list items, but this value can be overridden by an OnMeasureItem event handler.

TComboBoxEx does not let you change the value of ItemHeight.

Note:	Combo boxes that do not support changes to ItemHeight do not raise an exception when you attempt to change ItemHeight; they simply ignore the attempt.


TCustomCombo.ItemIndex
 VCL Reference

TCustomCombo.ItemIndex

TCustomCombo	See also

Indicates which item in the drop-down list is selected.

property ItemIndex: Integer;

Description

Read ItemIndex to determine which item in the list is the selected value in the combo box. This value appears in the edit box portion of the combo box. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1.

Write to ItemIndex to programmatically select an item from the list by passing in the index value.


TCustomCombo.Items
 VCL Reference

TCustomCombo.Items

TCustomCombo	See also 	Example

Provides access to the list of items (strings) in the list portion of the combo box.

property Items: TStrings;

Description

Read Items to access the list of items that appears in the combo box. Use the methods of Items to add, insert, delete and move items. Set the value of Items to copy the items from another string list.


TCustomCombo.ListHandle
 VCL Reference

TCustomCombo.ListHandle

TCustomCombo	See also

Provides access to the window handle of the list of items in the combo box.

property ListHandle: HWND;

Description

A combo box is composed of several windows: the combo box itself, the edit control, and the drop-down list. ListHandle is the window handle of the drop-down list. (The Handle property and the EditHandle property give the handles for the combo box itself and the edit portion, respectively.)

Use ListHandle when making Windows API calls addressed to the drop-down list of the combo box.


TCustomCombo.MaxLength
 VCL Reference

TCustomCombo.MaxLength

TCustomCombo	See also

Specifies the maximum number of characters the user can type into the edit portion of the combo box.

property MaxLength: Integer;

Description

Use MaxLength to limit the number of characters that the user can enter into the edit portion of the combo box. A value of 0 indicates that there is no application-defined limit on the length.

Note:	Setting MaxLength will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of MaxLength characters.

Note:	Even when MaxLength is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control.


TCustomCombo.SelLength
 VCL Reference

TCustomCombo.SelLength

TCustomCombo	See also

Specifies the length, in characters, of the selected text in the edit portion of the combo box.

property SelLength: Integer;

Description

The selected portion of the text in the edit region of the combo box is the string of SelLength characters that starts at the character specified by the SelStart property. The selected text appears highlighted in the edit region of the combo box.

To select a section of text in the edit region, first set the SelStart property to position the cursor, and then set SelLength to the number of characters that should be selected. The SelText property is the substring that is selected.

Note:	The SelLength property is only valid when the combo box has focus. When the combo box does not have focus, reading SelLength always yields a value of 0, and setting it has no effect.


TCustomCombo.SelStart
 VCL Reference

TCustomCombo.SelStart

TCustomCombo	See also

Specifies the position of the first selected character in the edit portion of the combo box.

property SelStart: Integer;

Description

Read SelStart to determine where the selection starts in the Text property. The first character is designated with 0, the second with 1, and so on. When SelLength is 0, SelStart is the position of the cursor.

Set SelStart to position the cursor in the edit region of the combo box. Setting SelStart to 0 positions the cursor before the first character, setting SelStart to 1 positions the cursor before the second character, and so on.

Note:	Setting SelStart changes the SelLength property to 0. When using SelStart and SelLength to programmatically select a portion of the text in the edit region, set SelStart before setting SelLength.

Note:	The SelStart property is only valid when the combo box has focus. When the combo box does not have focus, reading SelStart always yields a value of 0, and setting it has no effect.


 VCL Reference

TCustomCombo Events

TCustomCombo	Alphabetically	Legend

In TCustomCombo

OnChange

OnCloseUp

OnDropDown

OnSelect


 VCL Reference

TCustomCombo Events

TCustomCombo	By Object	Legend

OnChange

OnCloseUp

OnDropDown

OnSelect


TCustomCombo.OnChange
 VCL Reference

TCustomCombo.OnChange

TCustomCombo	See also 	Example

Occurs when the user changes the text displayed in the edit region.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action immediately after the user edits the text in the edit region or selects an item from the list. The Text property gives the new value in the edit region.

Note: OnChange only occurs in response to user actions. Changing the Text property programmatically does not trigger an OnChange event.


TCustomCombo.OnCloseUp
 VCL Reference

TCustomCombo.OnCloseUp

TCustomCombo	See also

Occurs when the drop-down list closes up due to some user action.

property OnCloseUp: TNotifyEvent;

Description

Write an OnCloseUp event handler to implement special processing that needs to occur when the drop-down list closes up. For example, an OnCloseUp event handler can check whether the user changed the selected item while the list was dropped down and respond accordingly.


TCustomCombo.OnDropDown
 VCL Reference

TCustomCombo.OnDropDown

TCustomCombo	See also 	Example

Occurs when the user opens the drop-down list.

property OnDropDown: TNotifyEvent;

Description

Write an OnDropDown event handler to implement special processing that needs to occur only when the drop-down list is activated.


TCustomCombo.OnSelect
 VCL Reference

TCustomCombo.OnSelect

TCustomCombo	See also

Occurs when the user selects a string in the drop-down list.

property OnSelect: TNotifyEvent;

Description

Write an OnSelect event handler to respond when the user changes the selected item in the drop-down list. OnSelect occurs after the selection has changed and the Text property reflects the new item.


 VCL Reference

TCustomCombo Methods

TCustomCombo	Alphabetically	Legend

In TCustomCombo

AddItem

AdjustDropDown

Change

Clear

ClearSelection

CloseUp

ComboWndProc

CopySelection

Create

CreateWnd

DeleteSelected

Destroy

DestroyWindowHandle

DropDown

EditWndProc

Focused

GetCount

GetDroppedDown

GetItemCount

GetItemHt

GetItemIndex

GetItemsClass

GetSelLength

GetSelStart

ListWndProc

Loaded

Select

SelectAll

SetDropDownCount

SetDroppedDown

SetItemHeight

SetItemIndex

SetItems

SetMaxLength

SetSelLength

SetSelStart

WndProc

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomCombo Methods

TCustomCombo	By Object	Legend

AddItem

AdjustDropDown

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

CloseUp

ComboWndProc

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DestroyWindowHandle

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

DropDown

EditWndProc

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetCount

GetDroppedDown

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemCount

GetItemHt

GetItemIndex

GetItemsClass

GetNamePath

GetParentComponent

GetSelLength

GetSelStart

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ListWndProc

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

Select

SelectAll

SendToBack

SetBounds

SetDropDownCount

SetDroppedDown

SetFocus

SetItemHeight

SetItemIndex

SetItems

SetMaxLength

SetSelLength

SetSelStart

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TCustomCombo.AddItem
 VCL Reference

TCustomCombo.AddItem

TCustomCombo	See also

Adds an item to the drop-down list of items.

procedure AddItem(Item: String; AObject: TObject);

Description

Call AddItem to add a string, with an associated object, to the drop-down list.

Item is the string to add to the drop-down list.

AObject is an object associated with that string. It can be accessed using the Objects property of the TStrings object that implements the Items property.


TCustomCombo.AdjustDropDown
 VCL Reference

TCustomCombo.AdjustDropDown

TCustomCombo	See also

Adjusts the size and position of the drop down list.

procedure AdjustDropDown; virtual;

Description

TCustomCombo calls AdjustDropDown when it drops down the drop-down list. This method adjusts the size and position of the drop-down list to reflect the values of the ItemHeight and DropDownCount properties.


TCustomCombo.Change
 VCL Reference

TCustomCombo.Change

TCustomCombo	See also

Generates an OnChange event.

procedure Change; dynamic;

Description

Change is called automatically in response to notifications that the text has changed. It responds by generating an OnChange event. Override this method to add additional processing when the text changes, or to block the OnChange event.


TCustomCombo.Clear
 VCL Reference

TCustomCombo.Clear

TCustomCombo	See also

Deletes all text from the edit box and all items from the Items list.

procedure Clear; override;

Description

Call Clear to empty the combo box at runtime.


TCustomCombo.ClearSelection
 VCL Reference

TCustomCombo.ClearSelection

TCustomCombo	See also

Deselects any selected items in the drop-down list.

procedure ClearSelection; override

Description

ClearSelection checks whether an item in the drop-down list is currently selected. If so, it deselects the item (sets ItemIndex to –1), and changes the Text property to an empty string.


TCustomCombo.CloseUp
 VCL Reference

TCustomCombo.CloseUp

TCustomCombo	See also

Generates an OnCloseUp event.

procedure CloseUp; dynamic;

Description

CloseUp is called automatically when the DroppedDown property changes to False. It generates an OnCloseUp event.

Override CloseUp to implement additional class-specific responses when the drop-down list closes up or to suppress the event.


TCustomCombo.ComboWndProc
 VCL Reference

TCustomCombo.ComboWndProc

TCustomCombo	See also

Responds to Windows messages sent to the edit control or drop-down list.

procedure WndProc(var Message: TMessage ComboWnd: HWnd; ComboProc: pointer); virtual;

Description

ComboWndProc handles the common processing of Windows messages sent to the edit region or list portion of the combo box. It is called by the EditWndProc and ListWndProc methods to take care of all processing that is not specific to the edit region or drop-down list.

The Message parameter describes the Windows message. The ComboWnd parameter is the windows handle for the edit region or list. The ComboProc parameter is a pointer to the default window procedure for the window that received the message. ComboWndProc provides default responses to focus events, mouse events, and key strokes.

Override ComboWndProc to change the way the combo box responds to Windows messages. When overriding ComboWndProc, be sure to call the parent class’s method to process all unhandled messages.

Note:	Do not confuse ComboWndProc with the WndProc method. ComboWndProc responds to messages that are sent to the edit region or drop-down list. WndProc responds to messages sent to the combo box itself.


TCustomCombo.CopySelection
 VCL Reference

TCustomCombo.CopySelection

TCustomCombo	See also

Copies the selected item in the drop-down list to another list control.

procedure CopySelection (Destination: TCustomListControl); override;

Description

CopySelection checks whether an item is selected in the drop-down list, and if so, adds it to the control specified by Destination, along with its associated object.


TCustomCombo.Create
 VCL Reference

TCustomCombo.Create

TCustomCombo	See also

Creates and initializes a TCustomCombo instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to generate a combo box at runtime. Combo boxes placed on forms at design time are created automatically.

AOwner is a component (typically a form) that is responsible for freeing the combo box instance.


TCustomCombo.::CreateWnd
 VCL Reference

TCustomCombo.CreateWnd

TCustomCombo	See also

Creates the Windows control that represents the combo box.

procedure CreateWnd; override;

Description

The CreateHandle method calls CreateWnd to handle the particulars of creating the combo box window. TCustomCombo overrides the inherited method to ensure that the newly-created window and the TCustomCombo properties correctly reflect each other.

The Windows control for the combo box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, CreateWnd may be called more than once during the lifetime of the TCustomCombo instance.


TCustomCombo.DeleteSelected
 VCL Reference

TCustomCombo.DeleteSelected

TCustomCombo	See also

Deletes the selected item from the drop-down list.

procedure DeleteSelected; override

Description

DeleteSelected deletes the item specified by the ItemIndex property from the drop-down list.


TCustomCombo.Destroy
 VCL Reference

TCustomCombo.Destroy

TCustomCombo	See also

Destroys the combo box and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the combo box is not nil, and only then calls Destroy.


TCustomCombo.DestroyWindowHandle
 VCL Reference

TCustomCombo.DestroyWindowHandle

TCustomCombo	See also

Destroys all of the windows controls that implement the combo box.

procedure DestroyWindowHandle; dynamic;

Description

The DestroyWnd method calls DestroyWindowHandle to release the underlying Windows control. TCustomCombo overrides the inherited method to reset the EditHandle and ListHandle properties once the underlying Windows controls are gone.


TCustomCombo.DropDown
 VCL Reference

TCustomCombo.DropDown

TCustomCombo	See also

Generates an OnDropDown event.

procedure DropDown; dynamic;

Description

DropDown is called automatically when the DroppedDown property changes to True. It responds by generating an OnDropDown event. To perform additional processing or block the OnDropDown event, override DropDown.


TCustomCombo.EditWndProc
 VCL Reference

TCustomCombo.EditWndProc

TCustomCombo	See also

Responds to Windows messages that are sent to the edit control portion of the combo box.

procedure EditWndProc(var Message: TMessage);

Description

A combo box is composed of several windows: the combo box itself, the edit control, and the drop-down list. EditWndProc is the window procedure for the edit control portion of the combo box.


TCustomCombo.::Focused
 VCL Reference

TCustomCombo.Focused

TCustomCombo	See also

Indicates whether the combo box has input focus.

function Focused: Boolean; override;

Description

Call Focused to determine whether the combo box is currently the recipient of keyboard input. When Focused returns True, the combo box is the active control and keystroke messages are sent to it. When Focused is False, the combo box is not active (although it may be selected).


TCustomCombo.GetCount
 VCL Reference

TCustomCombo.GetCount

TCustomCombo	See also

Returns the value of the ItemCount property.

function GetCount: Integer; override;

Description

GetCount returns the number of items in the drop-down list.


TCustomCombo.GetDroppedDown
 VCL Reference

TCustomCombo.GetDroppedDown

TCustomCombo	See also

Returns the value of the DroppedDown property.

function GetDroppedDown: Boolean;

Description

GetDroppedDown is the read implementation of the DroppedDown property. It returns True if the drop-down list is showing.


TCustomCombo.GetItemCount
 VCL Reference

TCustomCombo.GetItemCount

TCustomCombo	See also

Returns the value of the ItemCount property.

function GetItemCount: Integer; virtual; abstract;

Description

GetItemCount is the protected read access method for the ItemCount property. In TCustomCombo, this method is abstract, meaning it has no implementation. Descendant classes override this method to return the number of items in the drop-down list.


TCustomCombo.GetItemHt
 VCL Reference

TCustomCombo.GetItemHt

TCustomCombo	See also

Returns the value of the ItemHeight property.

function GetItemHt: Integer; virtual; abstract;

Description

Description

GetItemHt is the protected read access method for the ItemHeight property. In TCustomCombo, this method is abstract, meaning it has no implementation. Descendant classes override this method to return the height of items in the drop-down list.


TCustomCombo.GetItemIndex
 VCL Reference

TCustomCombo.GetItemIndex

TCustomCombo	See also

Returns the value of the ItemIndex property.

function GetItemIndex: Integer; override;

Description

GetItemIndex is the read implementation of the ItemIndex property. It returns the index of the selected item in the drop-down list. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1.


TCustomCombo.GetItemsClass
 VCL Reference

TCustomCombo.GetItemsClass

TCustomCombo	See also

Indicates the class that implements the Items property.

type TCustomComboBoxStringsClass = class ofTCustomComboBoxStrings;

function GetItemsClass: TCustomComboBoxStringsClass; virtual; abstract;

Description

TCustomCombo uses GetItemsClass internally to determine what class to instantiate when it implements the Items property.

In TCustomCombo, GetItemsClass is abstract, meaning it has no implementation. TCustomCombo descendants override this method to indicate a TCustomComboBoxStrings descendant that implements the Items property.


TCustomCombo.GetSelLength
 VCL Reference

TCustomCombo.GetSelLength

TCustomCombo	See also

Returns the value of the SelLength property.

function GetSelLength: Integer;

Description

GetSelLength is the read implementation of the SelLength property. It returns the number of selected characters.


TCustomCombo.GetSelStart
 VCL Reference

TCustomCombo.GetSelStart

TCustomCombo	See also

Returns the value of the SelStart property.

function GetSelStart: Integer;

Description

GetSelStart is the read implementation of the SelStart property. It returns the position of the first selected character, or the position of the cursor if no characters are selected.


TCustomCombo.ListWndProc
 VCL Reference

TCustomCombo.ListWndProc

TCustomCombo	See also

Responds to Windows messages that are sent to the drop-down list portion of the combo box.

procedure ListWndProc(var Message: TMessage);

Description

A combo box is composed of several windows: the combo box itself, the edit control, and the drop-down list. ListWndProc is the window procedure for the drop-down list.


TCustomCombo.Loaded
 VCL Reference

TCustomCombo.Loaded

TCustomCombo	See also

Initializes the combo box after its form is loaded into memory.

procedure Loaded; override;

Description

Do not call the protected Loaded method. The component streaming system calls this method after it loads the combo box’s form from a stream.

TCustomCombo overrides the inherited method to select the item specified by the ItemIndex property once the form is fully loaded.


TCustomCombo.::Select
 VCL Reference

TCustomCombo.Select

TCustomCombo	See also

Generates an OnSelect event.

procedure Select; dynamic;

Description

Select is called automatically when the selected item in the drop-down list changes. It responds by generating an OnSelect event. To perform additional processing or block the OnSelect event, override Select.


TCustomCombo.::SelectAll
 VCL Reference

TCustomCombo.SelectAll

TCustomCombo	See also

Selects the entire block of text in the edit box.

procedure SelectAll; override;

Description

Use SelectAll to select the entire block of text in the edit box. To select only part of the text, use the SelStart and SelLength properties.


TCustomCombo.SetDropDownCount
 VCL Reference

TCustomCombo.SetDropDownCount

TCustomCombo	See also

Sets the value of the DropDownCount property.

procedure SetDropDownCount(const Value: Integer); virtual;

Description

SetDropDownCount is the protected write implementation of the DropDownCount property.


TCustomCombo.SetDroppedDown
 VCL Reference

TCustomCombo.SetDroppedDown

TCustomCombo	See also

Sets the value of the DroppedDown property.

procedure SetDroppedDown(Value: Boolean); virtual;

Description

SetDroppedDown is the protected write implementation of the DroppedDown property.


TCustomCombo.SetItemHeight
 VCL Reference

TCustomCombo.SetItemHeight

TCustomCombo	See also

Sets the value of the ItemHeight property.

procedure SetItemHeight(const Value: Integer); virtual;

Description

SetItemHeight is the protected write implementation of the ItemHeight property. Although SetItemHeight never raises an exception, in some cases it does not change the value of the ItemHeight property. ItemHeight can only be changed for some TCustomCombo descendants, and then only under specific circumstances.

For example, TComboBoxEx never allows the ItemHeight property to change.


TCustomCombo.SetItemIndex
 VCL Reference

TCustomCombo.SetItemIndex

TCustomCombo	See also

Sets the value of the ItemIndex property.

procedure SetItemIndex(const Value: Integer); override;

Description

SetItemIndex is the protected write implementation of the ItemIndex property. It selects an item in the drop-down list.

Value is the item to select, where 0 indicates the first item, 1 indicates the second item, and so on. A negative Value causes all items to be unselected.


TCustomCombo.SetItems
 VCL Reference

TCustomCombo.SetItems

TCustomCombo	See also

Sets the value of the Items property.

procedure SetItems(const Value: TStrings); virtual;

Description

SetItems is the protected write implementation for the Items property. It copies the strings (and possibly their associated objects) from Value to the Items property.


TCustomCombo.SetMaxLength
 VCL Reference

TCustomCombo.SetMaxLength

TCustomCombo	See also

Sets the value of the MaxLength property.

procedure SetMaxLength(Value: Integer); virtual;

Description

SetMaxLength is the protected write implementation of the MaxLength property.


TCustomCombo.SetSelLength
 VCL Reference

TCustomCombo.SetSelLength

TCustomCombo	See also

Sets the value of the SelLength property.

procedure SetSelLength(Value: Integer); virtual;

Description

SetSelLength is the protected write implementation of the SelLength property.


TCustomCombo.SetSelStart
 VCL Reference

TCustomCombo.SetSelStart

TCustomCombo	See also

Sets the value of the SelStart property.

procedure SetSelStart(Value: Integer); virtual;

Description

SetSelStart is the protected write implementation of the SelStart property.


TCustomCombo.::WndProc
 VCL Reference

TCustomCombo.WndProc

TCustomCombo	See also

Processes messages received by the combo box.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the first method to received Windows messages that are sent to the combo box. Messages sent to the child windows of the combo box (for the edit region and the list portion) go to the EditWndProc or ListWndProc method instead. WndProc handles messages about changes to the system colors defined in the Windows control panel, and closes up the drop-down list when the Enter key or the Escape key is pressed. All other messages are passed to Dispatch for default processing.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo


TCustomControlBar
 VCL Reference

TCustomControlBar

Hierarchy	Properties	Methods	Events	See also

TCustomControlBar is the base class for control bar components.

Unit

ExtCtrls

Description

Use TCustomControlBar as a base class when defining control bar components. Control bars are designed to manage the layout of toolbar controls, although they can contain other controls as well. They provide a convenient docking site in applications that have dockable toolbars.

Do not create instances of TCustomControlBar. To add a control bar to a form, use TControlBar instead.


 VCL Reference

TCustomControlBar properties

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

AutoDock

AutoDrag

Picture

RowSize

RowSnap

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomControlBar properties

TCustomControlBar	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoDock

AutoDrag

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

Picture

RowSize

RowSnap

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomControlBar.AutoDock
 VCL Reference

TCustomControlBar.AutoDock

TCustomControlBar	See also

Determines whether the control bar temporarily docks drag clients to provide visual feedback.

property AutoDock: Boolean;

Description

If AutoDock is True (the default), when a dockable object is dragged over the control bar, the control bar temporarily docks the object so that the user can see the impact of the drag operation. That is, the user can see the dock position and how other docked controls will be repositioned to make room. When the user releases the mouse, the dragged object is docked at the current spot, and any temporary dockings are canceled. However, if the user cancels the drag-and-dock operation, the dragged object reverts to its last temporary dock site rather than to its location at the start of the drag operation.

If AutoDock is False, the control bar does not temporarily dock dragged objects. Instead, the user only sees the dragging rectangle as it passes over the control bar, with no feedback as to the adjustments the control bar would make if the dragged object were released.


TCustomControlBar.AutoDrag
 VCL Reference

TCustomControlBar.AutoDrag

TCustomControlBar	See also

Specifies whether control bands can be undocked by dragging.

property AutoDrag: Boolean;

Description

Use AutoDrag to specify whether control bands are automatically undocked when the user drags them. If AutoDrag is True, control bands (TToolBar objects) are undocked when dragged off the control bar. Otherwise, control bands are kept within the control bar.


TCustomControlBar.Picture
 VCL Reference

TCustomControlBar.Picture

TCustomControlBar	See also

Specifies the control bar’s picture.

property Picture: TPicture;

Description

Use Picture to specify the control bar’s picture. The picture is tiled across the control bar.


TCustomControlBar.RowSize
 VCL Reference

TCustomControlBar.RowSize

TCustomControlBar	See also

Specifies the height of the control bar’s rows.

type TRowSize = 1..MaxInt;

property RowSize: TRowSize;

Description

Use RowSize to specify the height of the control bar’s rows.


TCustomControlBar.RowSnap
 VCL Reference

TCustomControlBar.RowSnap

TCustomControlBar	See also

Specifies whether controls are snapped to the control bar’s rows when docked.

property RowSnap: Boolean;

Description

Use RowSnap to specify whether controls are snapped to the control bar’s rows when docked. Controls that are snapped have their Top and Height properties set automatically to correspond to the control bar’s rows.


 VCL Reference

TCustomControlBar events

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint


 VCL Reference

TCustomControlBar events

TCustomControlBar	By object	Legend

OnBandDrag

OnBandInfo

OnBandMove

OnBandPaint

OnPaint


TCustomControlBar.OnBandDrag
 VCL Reference

TCustomControlBar.OnBandDrag

TCustomControlBar	See also

Occurs when the user starts a drag operation on a specified control.

type TBandDragEvent = procedure (Sender: TObject; Control: TControl; var Drag: Boolean) of object;

property OnBandDrag: TBandDragEvent;

Description

Use OnBandDrag to conditionally allow the user to start dragging the control specified by the Control parameter. Change the Drag parameter to False to prevent the drag operation. If Drag remains True on exit from the event handler, the drag operation proceeds.


TCustomControlBar.OnBandInfo
 VCL Reference

TCustomControlBar.OnBandInfo

TCustomControlBar	See also

Occurs when the control bar adjusts the docking position of a band.

property OnBandInfo: TBandInfoEvent;

Description

Write code in the OnBandInfo event handler to provide information to the control bar that it can use when arranging its bands. The OnBandInfo event handler has several parameters that can be used to return information about how the band should be positioned, including its size, inset, and number of rows.


TCustomControlBar.OnBandMove
 VCL Reference

TCustomControlBar.OnBandMove

TCustomControlBar	See also

Occurs when a control band is moving.

property OnBandMove: TBandMoveEvent;

Description

Write an OnBandMove event handler to perform actions when a band is moving.

Use OnBandMove to specify the destination rectangle for the band. For example, adjust the destination rectangle so that its right edge matches the right edge of the control bar. This means the control extends to the control bar’s right edge no matter where it is moved.


TCustomControlBar.OnBandPaint
 VCL Reference

TCustomControlBar.OnBandPaint

TCustomControlBar	See also

Occurs when a control band is painted.

property OnBandPaint: TBandPaintEvent;

Description

Write an OnBandPaint event handler to customize the way the control bar draws its bands. From the event handler, you can draw to the control bar’s canvas, using the dimensions of the band that are passed in as the ARect parameter. You can change the dimensions so that the automatically drawn frame and grabber appear in a different portion of the control bar (for example, indented slightly). You can suppress the automatic painting of the frame or grabber by removing options from the Options parameter.


TCustomControlBar.OnPaint
 VCL Reference

TCustomControlBar.OnPaint

TCustomControlBar	See also

Occurs when the control bar is painted.

property OnPaint: TNotifyEvent;

Description

Write an OnPaint event handler to change the way the control bar is rendered. When a control bar receives a Windows paint message, it first draws the background picture, if any, and then generates an OnPaint event. After the OnPaint event exits, the control bar generates an OnBandPaint event for each band, finally rendering the grabbers and frames for each band.

Use the Canvas property to draw the control bar’s image. Use the ClientRect property to obtain the dimensions on which to draw.

If the custom drawing is intended to change the appearance of individual bands, use the OnBandPaint event instead.


 VCL Reference

TCustomControlBar methods

TCustomControlBar	Alphabetically	Legend

In TCustomControlBar

AlignControls

CanAutoSize

Create

CreateParams

Destroy

DoBandMove

DoBandPaint

DockOver

DoPaletteChange

DragControl

GetControlInfo

GetPalette

GetSiteInfo

HitTest

MouseDown

MouseMove

MouseUp

Paint

PaintControlFrame

StickControls

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomControlBar methods

TCustomControlBar	By object	Legend

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanAutoSize

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoBandMove

DoBandPaint

Dock

DockDrop

DockOver

DoPaletteChange

DragControl

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlInfo

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPalette

GetParentComponent

GetSiteInfo

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

HitTest

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

MouseWheelHandler

NewInstance

Paint

PaintControlFrame

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

StickControls

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomControlBar.AlignControls
 VCL Reference

TCustomControlBar.AlignControls

TCustomControlBar	See also

Aligns controls in the control bar.

procedure AlignControls(AControl: TControl; var ARect: TRect); override;

Description

AlignControls overrides the method introduced by TWinControl to enforce the alignment of child controls in a manner appropriate to a control bar. AlignControls determines the best alignment for each control according to its size and the available space.


TCustomControlBar.CanAutoSize
 VCL Reference

TCustomControlBar.CanAutoSize

TCustomControlBar	See also

Specifies whether the control bar can size itself to accommodate its contents.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanAutoSize is called automatically when the AutoSize property is True and an attempt is made to resize the control. It allows controls to implement the AutoSize property before the resize sequence that begins with the OnCanResize and OnConstrainedResize events and ends with the OnResize event.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the control bar. CanAutoSize adjusts these values so that the control bar’s bands are all visible. CanAutoSize returns True, indicating that the resize sequence should proceed.


TCustomControlBar.Create
 VCL Reference

TCustomControlBar.Create

TCustomControlBar	See also

Creates and initializes an instance of TCustomControlBar.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a control bar at runtime. Control bars added to forms at design time are created automatically.

Pass a single Component as a parameter to provide the control bar with an Owner that is responsible for freeing it.


TCustomControlBar.CreateParams
 VCL Reference

TCustomControlBar.CreateParams

TCustomControlBar	See also

Sets the control bar’s window flags.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams overrides the inherited method in order to turn off the CS_HREDRAW and CS_VREDRAW windows flags.


TCustomControlBar.Destroy
 VCL Reference

TCustomControlBar.Destroy

TCustomControlBar	See also

Destroys the TCustomControlBar instance.

destructor Destroy; override;

Description

Do not call Destroy. Instead, call Free.

Destroy frees the memory allocated for the TCustomControlBar properties.


TCustomControlBar.DoBandMove
 VCL Reference

TCustomControlBar.DoBandMove

TCustomControlBar	See also

Generates an OnBandMove event.

procedure DoBandMove(Control: TControl; var ARect: TRect); virtual;

Description

Do not call DoBandMove. It is called automatically when a band is moved in the control bar.

Control is the band that is about to be moved.

ARect is the area to which the control is about to be moved. This value can be changed by the OnBandMove event handler.

Override DoBandMove to perform actions in addition to calling the OnBandMove event handler when a band is moved.


TCustomControlBar.DoBandPaint
 VCL Reference

TCustomControlBar.DoBandPaint

TCustomControlBar	See also

Generates an OnBandPaint event.

procedure DoBandPaint(Control: TControl; Canvas: TCanvas; var ARect: TRect; var Options: TBandPaintOptions); virtual;

Description

Do not call DoBandPaint. It is called automatically for each band when the control bar is painted. Override DoBandPaint to provide class-specific paint code for the bands or to suppress the OnBandPaint event.

Control is the control (usually a tool bar) whose band is about to be painted.

Canvas is the control bar’s canvas. This is the canvas to use for drawing the band.

ARect is the dimensions of the band on the canvas. The OnBandPaint event handler can change this value to alter where the frame and grabber are drawn.

Options specifies which parts of the band should be drawn after DoBandPaint exits.


TCustomControlBar.DockOver
 VCL Reference

TCustomControlBar.DockOver

TCustomControlBar	See also

Generates an OnDockOver event and ensures proper docking of floating controls.

procedure DockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override;

Description

DockOver overrides the inherited method to ensure proper docking of floating controls that are accepted by the OnDockOver event handler.


TCustomControlBar.DoPaletteChange
 VCL Reference

TCustomControlBar.DoPaletteChange

TCustomControlBar	See also

Prepares the control bar to realize a new palette.

function DoPaletteChange: Boolean;

Description

Call DoPaletteChange to prepare the control bar to realize a new palette. DoPaletteChange returns True if the control bar should be redrawn to reflect the new palette, and False otherwise.

DoPaletteChange is called when the Picture property changes.


TCustomControlBar.DragControl
 VCL Reference

TCustomControlBar.DragControl

TCustomControlBar	See also

Starts a drag operation on a control band.

function DragControl(AControl: TControl; X, Y: Integer; KeepCapture: Boolean = False): Boolean; virtual;

Description

Call DragControl to start a drag operation on a control band.

If AutoDrag is True, DragControl is called automatically when a control is undocked from the control bar.

AControl is the control on the band that should be dragged.

X and Y are the current positions of the mouse pointer.

KeepCapture indicates whether the control bar should capture the mouse when processing the drag.


TCustomControlBar.GetControlInfo
 VCL Reference

TCustomControlBar.GetControlInfo

TCustomControlBar	See also

Generates an OnBandInfo event.

procedure GetControlInfo(AControl: TControl; var Insets: TRect; var PreferredSize, RowCount: Integer); virtual;

Description

GetControlInfo is called automatically when the control bar needs to arrange the position of its bands. It generates an OnBandInfo event to obtain information about a control band.

AControl is the control associated with the band being positioned.

Insets returns the margin between the edges of the control and the edges of its band.

PreferredSize returns the control’s preferred width. (The control’s width is reduced if it can’t fit inside the control bar.)

RowCount returns the number of control rows that the control spans in the control bar.


TCustomControlBar.GetPalette
 VCL Reference

TCustomControlBar.GetPalette

TCustomControlBar	See also

Returns the control bar’s palette.

function GetPalette: HPALETTE; override;

Description

GetPalette returns the palette used for the control bar’s picture (Picture property). It is called when the control bar needs to realize its palette.


TCustomControlBar.GetSiteInfo
 VCL Reference

TCustomControlBar.GetSiteInfo

TCustomControlBar	See also

Returns the control bar’s dock site information.

procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean); override;

Description

GetSiteInfo generates an OnGetSiteInfo event to allow an application to influence how controls are docked to the control bar. On return from the event handler, GetSiteInfo sets the CanDock parameter to False if the control is not floating. This prevents controls that have been docked to other dock sites from being moved to the control bar.

Client is the control that is a potential dock client.

InfluenceRect returns the dimensions where the client will be docked.

MousePos is the position of the mouse pointer.

CanDock returns whether the client is permitted to dock in the control bar.


TCustomControlBar.HitTest
 VCL Reference

TCustomControlBar.HitTest

TCustomControlBar	See also

Returns the control at the specified coordinates.

function HitTest(X, Y: Integer): TControl; reintroduce;

Description

Call HitTest to get the control at the specified coordinates.

X and Y are the coordinates.


TCustomControlBar.MouseDown
 VCL Reference

TCustomControlBar.MouseDown

TCustomControlBar	See also

Handles mouse button clicks.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseDown is called automatically when the user clicks the control bar with the mouse. After generating an OnMouseDown event, MouseDown determines whether a band is being dragged and if so, computes its position.

Button indicates which button was clicked.

Shift indicates the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.

X and Y are the position where the mouse was clicked.


TCustomControlBar.MouseMove
 VCL Reference

TCustomControlBar.MouseMove

TCustomControlBar	See also

Handles mouse movements.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

MouseMove generates an OnMouseMove event and then performs special processing if a control is being undocked from the control bar or moved within the control bar.

Shift indicates the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.

X and Y are the current position of the mouse.


TCustomControlBar.MouseUp
 VCL Reference

TCustomControlBar.MouseUp

TCustomControlBar	See also

Handles releasing of a mouse button.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseUp handles the dropping of a control onto the control bar and, once the control (if any) is docked, generates an OnMouseUp event.

Button indicates which button was released.

Shift indicates the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons.

X and Y are the position where the mouse was released.


TCustomControlBar.Paint
 VCL Reference

TCustomControlBar.Paint

TCustomControlBar	See also

Paints the control bar.

procedure Paint; override;

Description

Paint is called automatically when the control bar needs to paint itself.

To customize the painting, either override the Paint method, or specify options in the OnPaint and OnBandPaint event handlers.


TCustomControlBar.PaintControlFrame
 VCL Reference

TCustomControlBar.PaintControlFrame

TCustomControlBar	See also

Paints a control band’s frame.

procedure PaintControlFrame(Canvas: TCanvas; AControl: TControl; var ARect: TRect); virtual;

Description

The Paint method calls PaintControlFrame for each band to render its image. PaintControlFrame generates an OnBandPaint event, and then draws the frame and grabber for the band, depending on the values returned by the event handler.

Canvas is the control bar’s canvas.

AControl is the control on the band to be painted.

ARect indicates the dimensions of the band.


TCustomControlBar.StickControls
 VCL Reference

TCustomControlBar.StickControls

TCustomControlBar	See also

Places controls in their final positions after a control is moved in or dropped on the control bar.

procedure StickControls; virtual;

Description

Override StickControls to specify how controls are set in their final positions after a control is moved in or dropped on the control bar.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomControlBar


TCustomControl
 VCL Reference

TCustomControl

Hierarchy	Properties	Methods	See also

Base class for controls that wrap Windows screen objects but perform their own rendering.

Unit

Controls

Description

In most descendents of TWinControl, the job of drawing the control's surface belongs to the underlying Windows screen object. If a control has visible features that cannot be rendered by a Windows screen object, it requires access to a canvas object so it can do its own drawing.

TCustomControl is one of two base classes for controls that draw their own surfaces. Because TCustomControl is descended from from TWinControl, instances of its descendents can receive the focus and serve as containers.

Classes of controls that perform their own screen rendering and do not need the features of TWinControl should be descendents of TGraphicControl instead of TCustomControl. TGraphicControl objects can render themselves with less overhead, because they do not have underlying Windows screen objects.

TCustomControl objects have a Paint method, which is called whenever the control needs to render its image. Custom controls paint themselves using the Canvas property.


 VCL Reference

TCustomControl Properties

TCustomControl	Alphabetically	Legend

In TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomControl Properties

TCustomControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomControl.Canvas
 VCL Reference

TCustomControl.Canvas

TCustomControl	See also 	Example

Specifies the TCanvas object that presents a drawing surface for the control.

property Canvas: TCanvas;

Description

Use the properties of the TCanvas object to draw or paint on the surface of the control. Canvas encapsulates a Windows device context, providing all the tools and methods needed for drawing and painting.

Canvas is a protected property that is usually redeclared as public in descendants of TCustomControl.


 VCL Reference

TCustomControl methods

TCustomControl	Alphabetically	Legend

In TCustomControl

Create

Destroy

Paint

PaintWindow

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomControl methods

TCustomControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

PaintTo

PaintWindow

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomControl.Create
 VCL Reference

TCustomControl.Create

TCustomControl	See also

Creates an instance of TCustomControl.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TCustomControl. However, you should never attempt to instantiate a TCustomControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents. Controls placed on forms at design time are created automatically.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes a TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TCustomControl.Destroy
 VCL Reference

TCustomControl.Destroy

TCustomControl	See also

Destroys an instance of TCustomControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the control is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Destroys the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TCustomControl.Paint
 VCL Reference

TCustomControl.Paint

TCustomControl	See also

Renders the image of a custom control.

procedure Paint; virtual;

Description

The Paint method for TCustomControl does nothing other than provide the interface for a method that responds to WM_PAINT messages. Paint is called by the PaintWindow method, after that method has supplied the Canvas with the handle to a device context. When creating a custom control, always override Paint to draw the image of the control.

Tip:	To determine which portions of the control’s canvas need to be repainted when Paint is called, use the ClipRect property of the canvas.


TCustomControl.PaintWindow
 VCL Reference

TCustomControl.PaintWindow

TCustomControl	See also

Renders the image of the control on a specified device context.

procedure PaintWindow(DC: HDC); override;

Description

PaintWindow is called automatically when a custom control receives a WM_PAINT message. PaintWindow assigns the device context specified by the DC parameter to the custom control’s canvas, calls the Paint method, and finally removes the device context. Override PaintWindow to provide additional responses to the WM_PAINT message. To draw the image of the control, override the Paint method instead.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl


TCustomDrawGrid
 VCL Reference

 TCustomDrawGrid

Hierarchy	Properties	Methods	Events	See also

TCustomDrawGrid is the base class for grids that publish events for painting and manipulating the cells in the grid.

Unit

Grids

Description

Use TCustomDrawGrid as a base class when defining grid components that publish events for painting or manipulating the cells in the grid. TCustomDrawGrid introduces a number of events and methods that take advantage of the tabular organization of the grid in responding to user actions.

Do not create instances of TCustomDrawGrid. Instead, put a grid control in a form by instantiating a descendant of TCustomDrawGrid. Use TDrawGrid to represent non-textual material in a tabular grid. For text, use a TStringGrid object. If the text represents field values from a dataset, use TDBGrid. If you are displaying Name/Value pairs, use TValueListEditor.


 VCL Reference

TCustomDrawGrid properties

TCustomDrawGrid	Alphabetically	Legend

Derived from TCustomGrid

Col

ColWidths

EditorMode

GridHeight

GridWidth

LeftCol

Row

RowHeights

Selection

TabStops

TopRow

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomDrawGrid properties

TCustomDrawGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColWidths

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditorMode

Enabled

Floating

FloatingDockSiteClass

GridHeight

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LeftCol

LRDockWidth

Name

Owner

Parent

ParentWindow

Row

RowHeights

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

TBDockHeight

Top

TopRow

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TCustomDrawGrid events

TCustomDrawGrid	Alphabetically	Legend

In TCustomDrawGrid

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged


 VCL Reference

TCustomDrawGrid events

TCustomDrawGrid	By object	Legend

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged


TCustomDrawGrid.OnColumnMoved
 VCL Reference

TCustomDrawGrid.OnColumnMoved

TCustomDrawGrid	See also

Occurs immediately after the position of a column changes.

type TMovedEvent = procedure (Sender: TObject; FromIndex, ToIndex: Longint) of object;

property OnColumnMoved: TMovedEvent;

Description

Use OnColumnMoved to perform special processing when the position of a grid column changes. Columns can be moved programmatically or by user manipulation. The FromIndex parameter is the old index of the column, and the ToIndex parameter is the new index. OnColumnMoved does not occur unless the Options property includes goColMoving.


TCustomDrawGrid.OnDrawCell
 VCL Reference

TCustomDrawGrid.OnDrawCell

TCustomDrawGrid	See also 	Example

Occurs when a cell in the grid needs to be drawn.

type

  TDrawCellEvent = procedure (Sender: TObject; ACol, ARow: Longint; Rect: TRect; State: TGridDrawState) of object;

property OnDrawCell: TDrawCellEvent;

Description

Write an OnDrawCell event handler to draw the contents of all the cells in the grid. Draw on the cell using the methods of the Canvas property. The Rect parameter indicates the location of the cell on the canvas. The Col and Row parameters indicate the column and row indexes of the cell that should be drawn. The State parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (nonscrolling) cell.

If the OnDrawCell event handler is not assigned, all cells in the draw grid will appear empty. If the DefaultDrawing property is True, the draw grid paints the background color of the cell before the OnDrawCell event, and draws a focus rectangle around the selected cell after the OnDrawCell event handler finishes drawing the contents of the cell. If the DefaultDrawing property is False, the OnDrawCell event handler should paint the background of the cell and provide all visual indication of selection and focus.


TCustomDrawGrid.OnGetEditMask
 VCL Reference

TCustomDrawGrid.OnGetEditMask

TCustomDrawGrid	See also 	Example

Occurs when the in-place editor requests an edit mask.

type TGetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; var Value: String) of object;

property OnGetEditMask: TGetEditEvent;

Description

Write an OnGetEditMask event handler to provide the in-place editor with an edit mask that describes the valid input strings a user can type into a cell. Set the Value parameter to the string that describes the edit mask for the cell specified by the ACol and ARow parameters. If the cell does not have an edit mask, set the Value parameter to an empty string.

OnGetEditMask does not occur unless the Options property includes goEditing.


TCustomDrawGrid.OnGetEditText
 VCL Reference

TCustomDrawGrid.OnGetEditText

TCustomDrawGrid	See also 	Example

Occurs when the in-place editor requests the value of a cell.

type TGetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; var Value: String) of object;

property OnGetEditText: TGetEditEvent;

Description

Write an OnGetEditText event handler to provide the in-place editor with a string representing the contents of the cell. Set the Value parameter to the string for the cell specified by the ACol and ARow parameters. When the cell enters edit mode, the contents of the cell are drawn as the Value string returned by the OnGetEditText event handler. This image need not match the appearance of the cell when it is not in edit mode, which is drawn using the OnDrawCell event handler.

OnGetEditText does not occur unless the Options property includes goEditing.


TCustomDrawGrid.OnRowMoved
 VCL Reference

TCustomDrawGrid.OnRowMoved

TCustomDrawGrid	See also 	Example

Occurs immediately after the position of a row changes.

type TMovedEvent = procedure (Sender: TObject; FromIndex, ToIndex: Longint) of object;

property OnRowMoved: TMovedEvent;

Description

Write an OnRowMoved event handler to provide special processing whenever a row in the grid changes position. Rows can be moved programmatically or by user manipulation. The FromIndex parameter is the old index of the row, and the ToIndex parameter is the new index. OnRowMoved does not occur unless the Options property includes goRowMoving.


TCustomDrawGrid.OnSelectCell
 VCL Reference

TCustomDrawGrid.OnSelectCell

TCustomDrawGrid	See also 	Example

Occurs before a cell in the grid is selected.

type

  TSelectCellEvent = procedure (Sender: TObject; ACol, ARow: Longint; var CanSelect: Boolean) of object;

property OnSelectCell: TSelectCellEvent;

Description

Write an OnSelectCell event handler to specify whether any particular cell in the grid can be selected. The Col and Row parameters indicate the column and row indexes of the cell that is about to be selected. Set the CanSelect parameter to False to prevent the cell being selected.


TCustomDrawGrid.OnSetEditText
 VCL Reference

TCustomDrawGrid.OnSetEditText

TCustomDrawGrid	See also

Occurs when the user edits the value of a cell.

type TSetEditEvent = procedure (Sender: TObject; ACol, ARow: Longint; const Value: String) of object;

property OnSetEditText: TSetEditEvent;

Description

Write an OnSetEditText event handler to perform any special processing of the text edited by the user in an in-place editor. For example, use the OnSetEditText event to retrieve and store the value of a cell so that it can be displayed in an OnDrawCell event handler. OnSetEditText occurs every time the user changes the text.

The Value parameter is the new value for the cell specified by the ACol and ARow parameters.

OnSetEditText does not occur unless the Options property includes goEditing.


TCustomDrawGrid.OnTopLeftChanged
 VCL Reference

TCustomDrawGrid.OnTopLeftChanged

TCustomDrawGrid	See also

Occurs immediately after the TopRow property or the LeftCol property changes.

property OnTopLeftChanged: TNotifyEvent;

Description

Use OnTopLeftChanged to perform special processing when the non-fixed cells in the grid are scrolled.


 VCL Reference

TCustomDrawGrid methods

TCustomDrawGrid	Alphabetically	Legend

In TCustomDrawGrid

CellRect

ColumnMoved

DrawCell

GetEditMask

GetEditText

MouseToCell

RowMoved

SelectCell

SetEditText

TopLeftChanged

Derived from TCustomGrid

Create

Destroy

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDrawGrid methods

TCustomDrawGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColumnMoved

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawCell

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetEditMask

GetEditText

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseToCell

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowMoved

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectCell

SendToBack

SetBounds

SetEditText

SetFocus

SetSubComponent

SetTextBuf

Show

TopLeftChanged

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomDrawGrid.CellRect
 VCL Reference

TCustomDrawGrid.CellRect

TCustomDrawGrid	See also

Returns the screen coordinates of a cell in the grid.

function CellRect(ACol, ARow: Longint): TRect;

Description

Call CellRect to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ACol and ARow parameters. The top left cell is specified when ACol and ARow are set to zero.

If the indicated cell is not visible, CellRect returns an empty rectangle.


TCustomDrawGrid.ColumnMoved
 VCL Reference

TCustomDrawGrid.ColumnMoved

TCustomDrawGrid	See also

Generates an OnColumnMoved event.

procedure ColumnMoved(FromIndex, ToIndex: Longint); override;

Description

ColumnMoved is called immediately after a column in the grid has moved. It overrides the inherited method to generate an OnColumnMoved event. Descendants of TCustomDrawGrid can override this method to make internal adjustments or to block the OnColumnMoved event.


TCustomDrawGrid.DrawCell
 VCL Reference

TCustomDrawGrid.DrawCell

TCustomDrawGrid	See also

Generates an OnDrawCell event.

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

Description

DrawCell is called automatically whenever a cell in the grid is drawn. If the DefaultDrawing property is True, the background of the cell is painted before DrawCell is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after DrawCell. Descendants of TCustomDrawGrid can override this method to draw the contents of the cell or to block the OnDrawCell event.


TCustomDrawGrid.GetEditMask
 VCL Reference

TCustomDrawGrid.GetEditMask

TCustomDrawGrid	See also

Generates an OnGetEditMask event.

function GetEditMask(ACol, ARow: Longint): String; override;

Description

The inplace editor calls GetEditMask to obtain any input mask associated with the cell specified by the ACol and ARow parameters. GetEditMask returns the Value parameter set by the OnGetEditMask event handler. If there is no OnGetEditMask event handler, GetEditMask returns an empty string, indicating that there is no edit mask.


TCustomDrawGrid.GetEditText
 VCL Reference

TCustomDrawGrid.GetEditText

TCustomDrawGrid	See also

Generates an OnGetEditText event.

function GetEditText(ACol, ARow: Longint): String; override;

Description

The inplace editor calls GetEditText to obtain the text for the indicated cell. GetEditText returns the Value parameter set by the OnGetEditText event handler. If there is no OnGetEditText event handler, GetEditText returns an empty string.


TCustomDrawGrid.MouseToCell
 VCL Reference

TCustomDrawGrid.MouseToCell

TCustomDrawGrid	See also 	Example

Returns the column and row of the cell at the position with screen coordinates (X,Y).

procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint);

Description

Call MouseToCell to convert from grid-relative screen coordinates to row and column indexes. The X and Y parameters are the screen coordinates of the point to be converted. MouseToCell returns the ACol parameter as the number of the column over the point (X,Y), and the ARow parameter as the number of the row.

Usually the MouseToCell method is used in a mouse event handler, which supplies the mouse coordinates as the X and Y parameters of the method call.


TCustomDrawGrid.RowMoved
 VCL Reference

TCustomDrawGrid.RowMoved

TCustomDrawGrid	See also

Generates an OnRowMoved event.

procedure RowMoved(FromIndex, ToIndex: Longint); override;

Description

RowMoved is called immediately after a row in the grid changes position. It overrides the inherited method to generate an OnRowMoved event. Descendants of TCustomDrawGrid can override this method to make internal adjustments or to block the OnRowMoved event.


TCustomDrawGrid.SelectCell
 VCL Reference

TCustomDrawGrid.SelectCell

TCustomDrawGrid	See also

Determines whether a particular cell in the grid can be selected.

function SelectCell(ACol, ARow: Longint): Boolean; override;

Description

Grid controls call SelectCell internally before attempting to move selection to a the cell identified by the ACol and ARow parameters. ACol and ARow are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0.

SelectCell generates an OnSelectCell event. This method then returns True, unless the OnSelectCell event handler indicates that the cell should not be selected. Descendants of TCustomDrawGrid can override this method to check the properties of the information displayed in the cell or block the OnSelectCell event.


TCustomDrawGrid.SetEditText
 VCL Reference

TCustomDrawGrid.SetEditText

TCustomDrawGrid	See also

Generates an OnSetEditText event.

procedure SetEditText(ACol, ARow: Longint; const Value: String); dynamic;

Description

SetEditText is called by the inplace editor so that the grid can store the new value for the current cell. SetEditText overrides the inherited method to generate an OnSetEditText event. Descendants of TCustomDrawGrid can override this method to update an internal representation of the cell’s value, or to block the OnSetEditText event.


TCustomDrawGrid.TopLeftChanged
 VCL Reference

TCustomDrawGrid.TopLeftChanged

TCustomDrawGrid	See also

Generates an OnTopLeftChanged event.

procedure TopLeftChanged; dynamic;

Description

Grid controls call TopLeftChanged internally, whenever the LeftCol or TopRow property changes. After calling the inherited method to update the position of the inplace editor, TopLeftChanged generates an OnTopLeftChanged event.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDrawGrid

TCustomDrawGrid


TCustomEdit
 VCL Reference

TCustomEdit

Hierarchy	Properties	Methods	Events	See also

TCustomEdit is the base class from which all edit-box and memo controls are derived.

Unit

StdCtrls

Description

TCustomEdit encapsulates the behavior common to all components for editing text by introducing methods and properties that provide:

Basic text editing functions such as selecting text, modifying selected text, and case conversions.

Ability to respond to changes in the contents of the text.

Access control of the text for making it read-only or introducing a password character to hide the actual value.

Do not create instances of TCustomEdit. Use TCustomEdit as a base class when declaring control objects that permit the user to enter or modify text. Properties and methods of TCustomEdit provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomEdit properties

TCustomEdit	Alphabetically	Legend

In TCustomEdit

AutoSelect

AutoSize

BorderStyle

CanUndo

CharCase

HideSelection

MaxLength

Modified

OEMConvert

PasswordChar

ReadOnly

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomEdit Properties

TCustomEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoSelect

AutoSize

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

Left

LRDockWidth

MaxLength

Modified

Name

OEMConvert

Owner

Parent

ParentColor

ParentWindow

PasswordChar

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomEdit.AutoSelect
 VCL Reference

TCustomEdit.AutoSelect

TCustomEdit	See also

Determines whether all the text in the edit control is automatically selected when the control gets focus.

property AutoSelect: Boolean;

Description

Set AutoSelect to select all the text when the edit control gets focus. AutoSelect only applies to single-line edit controls.

Use AutoSelect when the user is more likely to replace the text in the edit control than to append to it.


TCustomEdit.AutoSize
 VCL Reference

TCustomEdit.AutoSize

TCustomEdit	See also 	Example

Determines whether the height of the edit control automatically resizes to accommodate the text.

property AutoSize: Boolean;

Description

Use AutoSize to make the edit control adjust its size automatically so the client area accommodates the height of the text. When AutoSize is False, the edit control has a fixed height. When AutoSize is True, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style.

Note:	AutoSize only adjusts the height of the edit control. Even with AutoSize set to True, text in the edit control may appear truncated if it extends beyond the width of the control.


TCustomEdit.BorderStyle
 VCL Reference

TCustomEdit.BorderStyle

TCustomEdit

Determines whether the edit control has a single line border around the client area.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to affect the sharpness with which the client area of the edit control stands out. BorderStyle can have a value of either bsSingle or bsNone. If BorderStyle is bsSingle, the edit control has a single-line border around the client area. If BorderStyle is bsNone, there will be no border.


TCustomEdit.CanUndo
 VCL Reference

TCustomEdit.CanUndo

TCustomEdit	See also

Indicates whether the edit control contains changes that can be backed out.

property CanUndo: Boolean;

Description

Read CanUndo to determine whether the user has made any changes to the text that can be undone by calling the Undo method. This is useful when enabling or disabling menu items that correspond to these commands.


TCustomEdit.CharCase
 VCL Reference

TCustomEdit.CharCase

TCustomEdit	See also

Determines the case of the text within the edit control.

type TEditCharCase = (ecNormal, ecUpperCase, ecLowerCase);

property CharCase: TEditCharCase;

Description

Use CharCase to force the contents of the edit control to assume a particular case. The possible values of CharCase are as follows:

Value	Meaning

ecLowerCase	The text is converted to lowercase.

ecNormal	The text appears in mixed case. It is not forced into any case.

ecUpperCase	The text is converted to uppercase.

When CharCase is set to ecLowerCase or ecUpperCase, the case of characters is converted as the user types them into the edit control. Changing the CharCase property to ecLowerCase or ecUpperCase changes the actual contents of the text, not just the appearance. Any case information is lost and can’t be recaptured by changing CharCase to ecNormal.


TCustomEdit.HideSelection
 VCL Reference

TCustomEdit.HideSelection

TCustomEdit	See also

Determines whether the visual indication of the selected text remains when focus shifts to another control.

property HideSelection: Boolean;

Description

Set HideSelection to False to provide visual feedback of the selected portion of the text even when the edit control does not have focus. Set HideSelection to True to show the selection only when the edit control has focus. HideSelection does not affect the actual value of the selection, only the visual indication. Always setting HideSelection to False can make forms with many edit controls look too busy.


TCustomEdit.MaxLength
 VCL Reference

TCustomEdit.MaxLength

TCustomEdit	See also

Specifies the maximum number of characters the user can enter into the edit control.

property MaxLength: Integer;

Description

Use MaxLength to limit the number of characters that can be entered into the edit control. A value of 0 indicates that there is no application-defined limit on the length.

Use MaxLength to limit the length of the text in an edit control if that text will be copied into a fixed-length buffer.

Note:	Setting MaxLength will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of MaxLength characters.

Note:	Even when MaxLength is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control.


TCustomEdit.Modified
 VCL Reference

TCustomEdit.Modified

TCustomEdit	See also

Indicates whether the user edited the text of the edit control.

property Modified: Boolean;

Description

Use Modified to determine whether the Text property of the edit control changed. If an application directly alters the Text property of an edit control, it should set the Modified property to True.


TCustomEdit.OEMConvert
 VCL Reference

TCustomEdit.OEMConvert

TCustomEdit	See also

Determines whether characters typed in the edit control are converted from ANSI to OEM and then back to ANSI.

property OEMConvert: Boolean;

Description

To ensure that any characters typed in the edit control can be unambiguously converted to the OEM character set, set OEMConvert toTrue. This causes all characters to be converted from ANSI to OEM and then back to ANSI as they are typed. Set OEMConvert toFalse to avoid the overhead of this conversion when it does not matter whether the text can be unambiguously mapped to an OEM string.

OEMConvert is most useful for edit controls used to enter file names when the application does not use Unicode file names.


TCustomEdit.PasswordChar
 VCL Reference

TCustomEdit.PasswordChar

TCustomEdit	See also

Indicates the character, if any, to display in place of the actual characters typed in the control.

property PasswordChar: Char;

Description

Use the PasswordChar property to create an edit control that displays a special character in place of any entered text. If PasswordChar is set to the null character (ANSI character zero), the edit control displays its text normally. If PasswordChar is any other character, the edit control displays PasswordChar in place of each character typed. PasswordChar affects the appearance of the edit control only. The value of the Text property reflects the actual characters that are typed.


TCustomEdit.ReadOnly
 VCL Reference

TCustomEdit.ReadOnly

TCustomEdit	See also

Determines whether the user can change the text of the edit control.

property ReadOnly: Boolean;

Description

To restrict the edit control to display only, set the ReadOnly property to True. Set ReadOnly to False to allow the contents of the edit control to be edited.

Setting ReadOnly to True ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the Clipboard.


TCustomEdit.SelLength
 VCL Reference

TCustomEdit.SelLength

TCustomEdit	See also 	Example

Specifies the number of characters (bytes) that are selected.

property SelLength: Integer;

Description

Read SelLength to determine the length, in bytes, of the selected text. This is the same as the number of characters, unless you are using a multi-byte character set. Set SelLength to change the selection to consist of the first SelLength bytes starting at SelStart.

Note:	Setting SelLength to a value greater than the number of characters from SelStart to the end of the text results in the selection of all characters from SelStart to the end of the text. Reading SelLength immediately after setting it to a value greater than the number of available characters returns the number of characters actually selected, not the value that was just set.


TCustomEdit.SelStart
 VCL Reference

TCustomEdit.SelStart

TCustomEdit	See also 	Example

Specifies the position of the first selected character in the text.

property SelStart: Integer;

Description

Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Set SelStart to remove the current selection and position the cursor just before the indicated character.

To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection.


TCustomEdit.SelText
 VCL Reference

TCustomEdit.SelText

TCustomEdit	See also 	Example

Specifies the selected portion of the edit control’s text.

property SelText: string;

Description

Read SelText to determine the value of the selected text. Set SelText to replace the selected text with a new string. If there is no selection, but the edit control has focus, set SelText to insert a new string into the text at the cursor.


 VCL Reference

TCustomEdit Events

TCustomEdit	By Object	Legend

In TCustomEdit

OnChange


 VCL Reference

TCustomEdit Events

TCustomEdit	By Object	Legend

OnChange


TCustomEdit.OnChange
 VCL Reference

TCustomEdit.OnChange

TCustomEdit	See also

Occurs when the text for the edit control may have changed.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever the text for the edit control may have changed. Use the Modified property to see if a change actually occurred. The Text property of the edit control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the edit control.


 VCL Reference

TCustomEdit Methods

TCustomEdit	By Object	Legend

In TCustomEdit

Change

Clear

ClearSelection

ClearUndo

CopyToClipboard

Create

CreateParams

CreateWindowHandle

CreateWnd

CutToClipboard

DefaultHandler

DestroyWnd

DoSetMaxLength

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

PasteFromClipboard

SelectAll

SetAutoSize

SetSelLength

SetSelStart

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomEdit Methods

TCustomEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParams

CreateParented

CreateParentedControl

CreateWindowHandle

CreateWnd

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DoSetMaxLength

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetAutoSize

SetBounds

SetFocus

SetSelLength

SetSelStart

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomEdit.Change
 VCL Reference

TCustomEdit.Change

TCustomEdit	See also

Generates an OnChange event.

procedure Change; virtual;

Description

Applications do not call the Change method directly. It is triggered automatically by Windows events. Change is exposed as a protected method so that derived classes can make additional responses when the text changes beyond invoking the OnChange event handler. If Derived classes that override the Change method do not call the inherited method, the OnChange event handler will not be called.


TCustomEdit.Clear
 VCL Reference

TCustomEdit.Clear

TCustomEdit	See also

Deletes all text from the edit control.

procedure Clear; virtual;

Description

Use Clear to replace the Text property with an empty string. Clear removes all text, not just the selected text. To remove just the selected text, use ClearSelection.


TCustomEdit.ClearSelection
 VCL Reference

TCustomEdit.ClearSelection

TCustomEdit	See also

Removes the selected text from the edit control.

procedure ClearSelection;

Description

Use ClearSelection to delete the selected text from the edit control. If no text is selected, ClearSelection does nothing. If all of the text is selected, ClearSelection clears all text, like the Clear method.

Note:	Calling ClearSelection does the same thing as sending the edit control a WM_CLEAR message.


TCustomEdit.ClearUndo
 VCL Reference

TCustomEdit.ClearUndo

TCustomEdit	See also

Clears the undo buffer so that no changes to the text can be backed out.

procedure ClearUndo;

Description

Use ClearUndo to commit changes to the Text property. After calling ClearUndo, the CanUndo property isFalse and the Undo method does nothing.


TCustomEdit.CopyToClipboard
 VCL Reference

TCustomEdit.CopyToClipboard

TCustomEdit	See also 	Example

Copies the selected text in the edit control to the Clipboard in CF_TEXT format.

procedure CopyToClipboard;

Description

Use CopyToClipboard to replace the contents of the Clipboard with the selected text. CopyToClipboard does not clear the Clipboard if no text is selected. If no text is selected, CopyToClipboard does nothing.

Note:	Calling CopyToClipboard does the same thing as sending the edit control a WM_COPY message.


TCustomEdit.Create
 VCL Reference

TCustomEdit.Create

TCustomEdit	See also	Example

Creates an instance of TCustomEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create and initialize an instance of TCustomEdit.

AOwner is another component, typically the form, that is responsible for freeing the edit control. It becomes the value of the Owner property.

Derived objects that override the Create method should call the inherited Create before performing any additional initialization.


TCustomEdit.CreateParams
 VCL Reference

TCustomEdit.CreateParams

TCustomEdit	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TCustomEdit overrides the inherited method to specify a scrollable single-line edit control that reflects the current values of the BorderStyle, HideSelection, PasswordChar, and ReadOnly properties.


TCustomEdit.CreateWindowHandle
 VCL Reference

TCustomEdit.CreateWindowHandle

TCustomEdit	See also

Creates a Windows control to represent the control.

procedure CreateWindowHandle(const Params: TCreateParams); override;

Description

CreateWindowHandle calls the inherited CreateWindowHandle method after working around a Win95 bug involving setting the read-only style on machines with Far East locales.


TCustomEdit.CreateWnd
 VCL Reference

TCustomEdit.CreateWnd

TCustomEdit	See also

Creates a Windows control corresponding to the edit control.

procedure CreateWnd; override;

Description

CreateWnd is called when the edit control is created, and whenever a change to the edit control requires the window to be recreated. After calling the inherited method, CreateWnd sends the newly created window messages to enforce the MaxLength and PasswordChar properties.


TCustomEdit.CutToClipboard
 VCL Reference

TCustomEdit.CutToClipboard

TCustomEdit	See also 	Example

Copies the selected text to the Clipboard in CF_TEXT format and then deletes the selection.

procedure CutToClipboard;

Description

Use CutToClipboard to replace the contents of the Clipboard with the selected text while clearing the selected text. If no text is selected, CutToClipboard does nothing.


TCustomEdit.DefaultHandler
 VCL Reference

TCustomEdit.:DefaultHandler

TCustomEdit	See also

Provides message handling for all messages that the control does not fully process itself.

procedure DefaultHandler(var Message); override;

Description

Override DefaultHandler to change the default message handling for the edit control. The Message parameter can be cast to a TMessage type, to obtain the WParam, LParam, and Result of the message. If the Result of the message is non-zero, the message has already been handled. Set the Result field to a non-zero value to prevent further processing of the message by the inherited method.

Calling inherited in a message-handling method results in a call to the ancestor's DefaultHandler method if that ancestor does not specify a handler for the message being handled.


TCustomEdit.DestroyWnd
 VCL Reference

TCustomEdit.DestroyWnd

TCustomEdit	See also

Destroys the Windows control that corresponds to the edit control.

procedure DestroyWnd; override;

Description

The Windows control for the edit box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. When this happens, DestroyWnd is called.

Before the window is destroyed, DestroyWnd saves a copy of any properties that are needed to recreate the window after it is destroyed.


TCustomEdit.DoSetMaxLength
 VCL Reference

TCustomEdit.DoSetMaxLength

TCustomEdit	See also

Sets the MaxLength property.

procedure DoSetMaxLength(Value: Integer); virtual;

Description

DoSetMaxLength is the property access function for the MaxLength property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the MaxLength property.

DoSetMaxLength sends an EM_LIMITTEXT message to the window of the edit control.


TCustomEdit.GetSelLength
 VCL Reference

TCustomEdit.GetSelLength

TCustomEdit	See also

Returns the SelLength property.

function GetSelLength: Integer; virtual;

Description

GetSelLength is the property access function for the SelLength property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the SelLength property.

GetSelLength sends an EM_GETSEL message to the window of the edit control and returns the difference between the starting position and the ending position.


TCustomEdit.GetSelStart
 VCL Reference

TCustomEdit.GetSelStart

TCustomEdit	See also

Returns the SelStart property.

function GetSelStart: Integer; virtual;

Description

GetSelStart is the property access method for the SelStart property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the SelStart property.

GetSelLength sends an EM_GETSEL message to the window of the edit control and returns the starting position.


TCustomEdit.GetSelText
 VCL Reference

TCustomEdit.GetSelText

TCustomEdit	See also

Returns the SelText property.

function GetSelText: string; virtual;

Description

GetSelText is the property access method for the SelText property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the SelText property.


TCustomEdit.GetSelTextBuf
 VCL Reference

TCustomEdit.GetSelTextBuf

TCustomEdit	See also 	Example

Copies the selected text into a buffer and returns the number of characters copied.

function GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; virtual;

Description

Use GetSelTextBuf to copy the selected text into a character buffer. If there is no selection, the buffer receives an empty string. If the selection contains more than (BufSize - 1) characters, only the first (BufSize - 1) characters are copied. GetSelTextBuf returns the number of characters that were actually copied into the buffer.


TCustomEdit.PasteFromClipboard
 VCL Reference

TCustomEdit.PasteFromClipboard

TCustomEdit	See also	Example

Pastes the contents of the Clipboard into edit control, replacing the current selection.

procedure PasteFromClipboard;

Description

Use PasteFromClipboard to replace the selected text with the contents of the Clipboard, or, if no text is selected, to insert the contents of the Clipboard at the cursor. If the Clipboard is empty, or if it does not contain anything in CF_TEXT format, PasteFromClipboard does nothing.

Note:	Calling PasteFromClipboard does the same thing as sending the edit control a WM_PASTE message.


TCustomEdit.SelectAll
 VCL Reference

TCustomEdit.SelectAll

TCustomEdit	See also 	Example

Selects all text in the edit control.

procedure SelectAll;

Description

Use SelectAll to select all text in the edit control. To select only part of the text, use the SelStart and SelLength properties.


TCustomEdit.SetAutoSize
 VCL Reference

TCustomEdit.SetAutoSize

TCustomEdit	See also

Sets the AutoSize property.

procedure SetAutoSize(Value: Boolean); override;

Description

SetAutoSize is the protected write implementation of the AutoSize property.

TCustomEdit overrides the inherited method to update the height of the edit control to reflect the current font when the value of AutoSize changes to True.


TCustomEdit.SetSelLength
 VCL Reference

TCustomEdit.SetSelLength

TCustomEdit	See also

Sets the SelLength property.

procedure SetSelLength(Value: Integer); virtual;

Description

SetSelLength is the property access method for the SelLength property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the SelLength property.

SetSelLength sends an EM_SETSEL message to the window of the edit control, specifying a selection that begins at SelStart and ends at SelStart + Value.


TCustomEdit.SetSelStart
 VCL Reference

TCustomEdit.SetSelStart

TCustomEdit	See also

Sets the SelStart property.

procedure SetSelStart(Value: Integer); virtual;

Description

SetSelStart is the property access method for the SelStart property. It is exposed as a protected method so that descendants of TCustomEdit can customize the implementation of the SelStart property.

SetSelLength sends an EM_SETSEL message to the window of the edit control to position the cursor on the position indicated by Value.


TCustomEdit.SetSelTextBuf
 VCL Reference

TCustomEdit.SetSelTextBuf

TCustomEdit	See also	Example

Replaces the selected text with a null-terminated string.

procedure SetSelTextBuf(Buffer: PChar);

Description

Use SetSelTextBuf to replace the current selection by the contents of the null-terminated string pointed to by Buffer. If no text is selected, the contents of Buffer are inserted at the cursor. SetSelTextBuf does the same thing as setting the SelText property, except that it takes a PChar rather than a string.


TCustomEdit.Undo
 VCL Reference

TCustomEdit.Undo

TCustomEdit	See also

Backs out all changes in the undo buffer.

procedure Undo;

Description

Call Undo to cancel all changes made to the Text property since the last call to the ClearUndo method. If ClearUndo was never called, Undo rolls back all changes.

To determine whether there are any changes in the undo buffer, check the CanUndo property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit


TCustomForm
 VCL Reference

 TCustomForm

Hierarchy	Properties	Methods	Events	See also

TCustomForm is the base class from which to derive a window such as a form or dialog.

Unit

Forms

Description

Derive from TCustomForm to create a custom window. The TCustomForm descendant can contain other objects, such as TButton, TCheckBox, and TComboBox objects.


 VCL Reference

TCustomForm properties

TCustomForm	Alphabetically	Legend

In TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

AlphaBlend

AlphaBlendValue

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DefaultMonitor

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

ObjectMenuItem

OldCreateOrder

OleFormObject

Parent

ParentBiDiMode

PixelsPerInch

Position

PrintScale

Scaled

TileMode

TransparentColor

TransparentColorValue

Visible

WindowMenu

WindowState

Derived from TScrollingWinControlt

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiModeBoundsRect

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomForm properties

TCustomForm	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

Align

AlignDisabled

AlphaBlend

AlphaBlendValue

Anchors

AutoScroll

BiDiModeBoundsRect

BorderIcons

BorderStyle

BoundsRect

Brush

Canvas

Caption

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultMonitor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpKeyword

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Icon

KeyPreview

Left

LRDockWidth

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

Name

ObjectMenuItem

OldCreateOrder

OleFormObject

Owner

Parent

ParentBiDiMode

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

Position

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TileMode

Top

TransparentColor

TransparentColorValue

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowMenu

WindowProc

WindowState


TCustomForm.Active
 VCL Reference

TCustomForm.Active

TCustomForm	See also

Specifies whether the form has focus.

property Active: Boolean;

Description

Use Active to determine whether the form has focus.  The Active Form receives all keyboard input. If it has a title bar, it is drawn using the active colors specified in the Control panel.

If Active is True , the form has focus; if Active is False, the form does not have focus.


TCustomForm.ActiveControl
 VCL Reference

TCustomForm.ActiveControl

TCustomForm	See also 	Example

Specifies the control that has focus on the form.

property ActiveControl: TWinControl;

Description

Use ActiveControl to get or set the control that has focus on the form. Only one control can have focus at a given time in an application.

If the form does not have focus, ActiveControl is the control on the form that will receive focus when the form receives focus.

Note:	When focus shifts to another control, ActiveControl is updated before the OnExit event occurs.


TCustomForm.::ActiveMDIChild
 VCL Reference

TCustomForm.::ActiveMDIChild

TCustomForm	See also

Specifies the MDI child that has focus.

property ActiveMDIChild: TForm;

Description

Use ActiveMDIChild to get the MDI child that has focus.

If the form is not an MDI parent (that is, if the FormStyle property of the form is not fsMDIForm), ActiveMDIChild returns nil.NULL.


TCustomForm.ActiveOleControl
 VCL Reference

TCustomForm.ActiveOleControl

TCustomForm	See also

Specifies the OLE control on the form that reacts to changes in focus.

property ActiveOLEControl: TWinControl;

Description

Use ActiveOLEControl to get or set an OLE control on the form that reacts to changes in focus.

If ActiveOLEControl is not nil, the user interface for the specified OLE control is deactivated when it is not focused. Also, when the form receives or loses focus, the document window for the specified OLE control is activated or deactivated respectively.


TCustomForm.AlphaBlend
 VCL Reference

TCustomForm.AlphaBlend

TCustomForm	See also

Specifies whether the form is translucent.

property AlphaBlend: Boolean;

Description

Set AlphaBlend to specify that the form represents a layered window that allows a translucent color. The AlphaBlendValue property specifies the degree of translucency.

Note:	AlphaBlend does not work on all systems. The application must be running under Windows 2000 or better, and the machine must be a P90 or better.


TCustomForm.AlphaBlendValue
 VCL Reference

TCustomForm.AlphaBlendValue

TCustomForm	See also

Specifies the degree of translucency on a translucent form.

property AlphaBlendValue: Byte;

Description

Set AlphaBlendValue to a value between 0 and 255 to indicate the degree of translucency when the AlphaBlend property is True. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity.

Note:	AlphaBlendValue only has an effect when the AlphaBlend property is True.


TCustomForm.BorderIcons
 VCL Reference

TCustomForm.BorderIcons

TCustomForm	See also 	Example

Specifies which icons appear on the title bar of the form.

type TBorderIcon = (biSystemMenu, biMinimize, biMaximize, biHelp);

TBorderIcons = set of TBorderIcon;

property BorderIcons:TBorderIcons;

Description

Use BorderIcons to get or set the icons that appear on the title bar of the form. BorderIcons can include any of the following TBorderIcons values:

Value	Meaning

biSystemMenu	The form has a Control menu (also known as a System menu).

biMinimize	The form has a Minimize button

biMaximize	The form has a Maximize button

biHelp	If BorderStyle is bsDialog or biMinimize and biMaximize are excluded, a question mark appears in the form's title bar and when clicked, the cursor changes to crHelp; otherwise,no question mark appears.

Note:	Certain combinations of the BorderIcons and BorderStyle properties are mutually exclusive. For example, BorderIcons biMax, biMin with BorderStyle of bsDialog are mutually exclusive.


TCustomForm.BorderStyle
 VCL Reference

TCustomForm.BorderStyle

TCustomForm	See also

Specifies the appearance and behavior of the form border.

property BorderStyle: TFormBorderStyle;

Description

Use BorderStyle to get or set the appearance and behavior of the form border. BorderStyle can be any of the following TFormBorderStyle values:

Value	Meaning

bsDialog	Not resizable; standard dialog box border

bsSingle	Not resizable; single-line border

bsNone	Not resizable; no visible border line

bsSizeable	Standard resizable border

bsToolWindow	like bsSingle but with a smaller caption

bsSizeToolWin	like bsSizeable with a smaller caption

Note:	Changing the border style of an MDI child form to bsDialog or bsNone has no effect.


TCustomForm.Canvas
 VCL Reference

TCustomForm.Canvas

TCustomForm	See also 	Example

Provides access to the drawing area of the form.

property Canvas: TCanvas;

Description

Use TCanvas to draw on the client area of the form. Canvas is often used in the OnPaint event handler.


TCustomForm.ClientHandle
 VCL Reference

TCustomForm.ClientHandle

TCustomForm	See also

Provides access to the handle of the form’s internal MDI client window.

property ClientHandle: HWND;

Description

Use ClientHandle to get the handle for the form’s internal MDI client window.

ClientHandle is meaningful only if the form is an MDI parent (that is, if the form’s FormStyle property is set to fsMDIForm).

Note:	Use the Handle property instead to get the handle to the form window itself.


TCustomForm.ClientHeight
 VCL Reference

TCustomForm.ClientHeight

TCustomForm	See also	Example

Specifies the height (in pixels) of the form’s client area.

property ClientHeight: Integer;

Description

Use ClientHeight to determine the height (in pixels) of the form’s client area. The client area is the usable area inside the form's border, excluding the title bar, scroll bars, and so on.

Set ClientHeight to change the height of the form’s window based on the desired client area. To change the height of the form’s window based on the total size of the window (including the border, menu, status bar and so on), use the Height property instead.


TCustomForm.ClientRect
 VCL Reference

TCustomForm.ClientRect

TCustomForm	See also

Specifies the dimensions of the form’s client area.

property ClientRect: TRect;

Description

Use ClientRect to get or set the form’s client area. The client area is the usable area inside the form's border.

ClientRect is equivalent to Rect(0,0,ClientWidth, ClientHeight).


TCustomForm.ClientWidth
 VCL Reference

TCustomForm.ClientWidth

TCustomForm	See also 	Example

Specifies the width (in pixels) of the form’s client area.

property ClientWidth: Integer;

Description

Use ClientWidth to determine the width (in pixels) of the form’s client area. The client area is the usable area inside the form's border. Set ClientWidth to change the width of the form’s window based on the desired client area.  To change the width of the form’s window based on the total size of the window (including the border, status bar and so on), use the Width property instead.


TCustomForm.DefaultMonitor
 VCL Reference

TCustomForm.DefaultMonitor

TCustomForm	See also

Specifies the monitor on which the form appears.

type TDefaultMonitor = (dmDesktop, dmPrimary, dmMainForm, dmActiveForm);

property DefaultMonitor: TDefaultMonitor;

Description

Use DefaultMonitor to associate a form with a particular monitor in a multi-monitor application. The following table lists the possible values:

Value	Meaning

dmDesktop	No attempt is made to position the form on a specific monitor.

dmPrimary	The form is positioned on the first monitor listed in the global screen object’s Monitors property.

dmMainForm	The form appears on the same monitor as the application’s main form.

dmActiveForm	The form appears on the same monitor as the currently active form.

Note:	DefaultMonitor has no effect if the application does not have a main form.


TCustomForm.Designer
 VCL Reference

TCustomForm.Designer

TCustomForm	See also

Specifies the designer interface for the form.

property Designer: IDesignerHook;

Description

The Designer property is used internally at design time. Never assign a value to this property. This is done automatically by the form designer. Only use this property when designing classes for use in the form designer, such as property editors and component editors.


TCustomForm.DropTarget
 VCL Reference

TCustomForm.DropTarget

TCustomForm	See also

Specifies whether the form is the target of a drag-and-drop operation.

property DropTarget: Boolean;

Description

Use DropTarget to determine whether the form is currently the target of a drag-and-drop operation.


TCustomForm.Floating
 VCL Reference

TCustomForm.Floating

TCustomForm	See also

Indicates whether the form is docked to another window.

__property bool Floating={read=GetFloating};

Description

Read Floating to determine whether the form is a free-floating window or docked to another window. Floating is True when the form window is not docked. Floating is False if the form is docked in another window.


TCustomForm.FormState
 VCL Reference

TCustomForm.FormState

TCustomForm	See also

Indicates transitional state information about the form.

type TFormState = set of (fsCreating, fsVisible, fsShowing, fsModal, fsCreatedMDIChild, fsActivated);

property FormState: TFormState;

Description

Read FormState to determine the state of the form. FormState indicates when the form is in various transitional states or when certain Windows operations have occurred. The following table lists the values that can be included in a form’s state:

Value	Meaning

fsCreating	The form’s constructor is currently executing.

fsVisible	The form’s window is visible. This state is used to update the Visible property.

fsShowing	The form’s WindowState property is changing. This state is used to prevent WindowState changes from interfering with a transition that is in progress.

fsModal	The form was created as a modal window.

fsCreatedMDIChild	The form is an MDI parent window. This state is only set once the MDI client window has been created.

fsActivated	The form has received a CM_ACTIVATE message (because it received focus or the application became active) but has not yet called the Activate method to generate an OnActivate event.


TCustomForm.FormStyle
 VCL Reference

TCustomForm.FormStyle

TCustomForm	See also	Example

Determines the form’s style.

type TFormStyle = (fsNormal, fsMDIChild, fsMDIForm, fsStayOnTop);

property FormStyle: TFormStyle;

Description

Use FormStyle to get or set the form’s style. FormStyle is one of the following values:

Value	Meaning

fsNormal	The form is neither an MDI parent window nor an MDI child window.

fsMDIChild	The form is an MDI child window.

fsMDIForm	The form is an MDI parent window.

fsStayOnTop	This form remains on top of the desktop and of other forms in the project, except any others that also have FormStyle set to fsStayOnTop.If one fsStayOnTop form launches another, neither form will consistently remain on top.

If the form is the main form of an MDI application, its FormStyle property must be set to fsMDIForm.

Note:	It is not advisable to change FormStyle at runtime.

Warning:	TGraphicControl descendants placed in the client area of a form with FormStyle set to fsMDIForm will not paint.


TCustomForm.HelpFile
 VCL Reference

TCustomForm.HelpFile

TCustomForm	See also

Specifies the name of the file the form uses to display Help.

property HelpFile: string;

Description

Use HelpFile for forms that have a help file to use with the Help system. Help topics are selected from the specified file.


TCustomForm.Icon
 VCL Reference

TCustomForm.Icon

TCustomForm	See also 	Example

Specifies the icon that appears when the form is minimized.

property Icon: TIcon;

Description

Set the Icon property to provide an icon for the form. If Icon is not set, the system provides a default icon when the form is minimized.


TCustomForm.KeyPreview
 VCL Reference

TCustomForm.KeyPreview

TCustomForm	See also 	Example

Specifies whether the form should receive keyboard events before the active control.

property KeyPreview: Boolean;

Description

If KeyPreview is True, keyboard events occur on the form before they occur on the active control. (The active control is specified by the ActiveControl property.)

If KeyPreview is False, keyboard events occur only on the active control.

Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by KeyPreview because they do not generate keyboard events.

KeyPreview is False by default.


TCustomForm.MDIChildCount
 VCL Reference

TCustomForm.MDIChildCount

TCustomForm	See also 	Example

Specifies the number of open MDI child forms.

property MDIChildCount: Integer;

Description

Use MDIChildCount to get the number of open MDI child forms.

MDIChildCount is meaningful only if the form is an MDI parent (that is, if the form’s FormStyle property is set to fsMDIForm).


TCustomForm.MDIChildren
 VCL Reference

TCustomForm.MDIChildren

TCustomForm	See also 	Example

Provides indexed access to all MDI child forms.

property MDIChildren[I: Integer]: TForm;

Description

Use MDIChildren to access a child form.

I is the index of the child form to access. The order of MDI children changes as different MDI forms are activated. Initially, forms are listed in creation order, with new forms being added to the end of the array. Whenever an MDI child is activated, however, it moves to the front of the list. Thus, use I to index over all forms in the array, but not to refer to a specific form.

MDIChildren is meaningful only if the form is an MDI frame (that is, if the form’s FormStyle property is set to fsMDIForm).


TCustomForm.Menu
 VCL Reference

TCustomForm.Menu

TCustomForm	See also	Example

Specifies the form’s main menu.

property Menu: TMainMenu;

Description

Use Menu to get or set the form’s main menu. At design time, Menu is set to the first TMainMenu component added to the form.


TCustomForm.ModalResult
 VCL Reference

TCustomForm.ModalResult

TCustomForm	See also 	Example

Represents the return value of a form that is used as a modal dialog.

property ModalResult: TModalResult;

Description

Use ModalResult to close the form when it is displayed modally.

By default, ModalResult is mrNone. Set ModalResult to any nonzero value to close the form. The value assigned to ModalResult becomes the return value of the ShowModal function call used to display the form.

Note:	This property is modified automatically by some components such as the TButton object. See TButton.ModalResult for details.


TCustomForm.Monitor
 VCL Reference

TCustomForm.Monitor

TCustomForm	See also

Provides access to the monitor on which the form appears.

property Monitor: TMonitor;

Description

Use Monitor to access information about the monitor on which the form appears if the application runs on a multi-monitor system. The monitor is determined by the DefaultMonitor property.


TCustomForm.ObjectMenuItem
 VCL Reference

TCustomForm.ObjectMenuItem

TCustomForm	See also

Represents an OLE object menu item that reacts to selections of OLE objects.

property ObjectMenuItem: TMenuItem;

Description

Use ObjectMenuItem to get or set a menu item that becomes enabled or disabled when an OLE object on the form is selected or unselected respectively.

The OLE object menu item can be used for standard OLE commands, such as Activate or Convert. (The implementations of these commands are provided by the OLE server.)


TCustomForm.OldCreateOrder
 VCL Reference

TCustomForm.OldCreateOrder

TCustomForm	See also

Specifies when OnCreate and OnDestroy events occur.

property OldCreateOrder: Boolean;

Description

When OldCreateOrder is False (the default) the OnCreate event occurs after all constructors are finished (from the AfterConstruction method) and the OnDestroy event occurs before any destructors are called (from the BeforeDestruction method).

This timing differs from Delphi version 3 and previous, where the OnCreate event occurred when the TCustomForm constructor executed and the OnDestroy event occurred when the TCustomForm destructor executed. Applications that require the OnCreate event and OnDestroy events to occur from the constructor and destructor of the form can set OldCreateOrder to True.


TCustomForm.OleFormObject
 VCL Reference

TCustomForm.OleFormObject

TCustomForm	See also

Specifies the IOleForm interface for an in-place OLE object contained in the form.

property OleFormObject: IOleForm;

Description

OleFormObject is used to communicate resize and destroy notifications when a form is used as a frame for an in-place OLE object.


TCustomForm.Parent
 VCL Reference

TCustomForm.Parent

TCustomForm	See also

Specifies the windowed control that contains the form.

property Parent: TWinControl;

Description

Use the Parent property to embed the form in another control (usually another form). Changing the Parent property moves the form to a new container.

Many forms do not have a Parent. For example, forms that appear directly on the desktop have Parent set to nil.


TCustomForm.ParentBiDiMode
 VCL Reference

TCustomForm.ParentBiDiMode

TCustomForm	See also

Specifies whether the control uses its parent’s BiDiMode.

property ParentBiDiMode: Boolean;

Description

If the Parent property is nil and the ParentBiDiMode is True, the form’s BiDiMode property is set equal to the global Application object’s BiDiMode property. If the Parent property is not nil and the ParentBiDiMode is True, then the form’s BiDiMode property is set equal to the parent’s BiDiMode property.


TCustomForm.PixelsPerInch
 VCL Reference

TCustomForm.PixelsPerInch

TCustomForm	See also

Represents the proportion of the font on the system on which the form was designed.

property PixelsPerInch: Integer;

Description

Use PixelsPerInch at runtime to change how the form is scaled to the current screen resolution. If PixelsPerInch is changed from its default value, the form will not have the same proportion on every screen resolution.

At design time, PixelsPerInch is set automatically when the form is saved. Changes to PixelsPerInch made in the Object Inspector only affect the form at runtime.

The form’s Scaled property must be True for PixelsPerInch to have an effect.


TCustomForm.Position
 VCL Reference

TCustomForm.Position

TCustomForm	See also

Represents the size and placement of the form.

type TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);

property Position: TPosition;

Description

Use Position to get or set the size and placement of the form. Position can have one of the following TPosition values:

Value	Meaning

poDesigned	The form appears positioned on the screen and with the same height and width as it had at design time.

poDefault	The form appears in a position on the screen and with a height and width determined by the operating system. Each time you run the application, the form moves slightly down and to the right. The right side of the form is always near the far right side of the screen, and the bottom of the form is always near the bottom of the screen, regardless of the screen's resolution.

poDefaultPosOnly	The form displays with the size you created it at design time, but the operating system chooses its position on the screen. Each time you run the application, the form moves slightly down and to the right. When the form can no longer move down and to the right and keep the same size while remaining entirely visible on the screen, the form displays at the top-left corner of the screen.

poDefaultSizeOnly	The form appears in the position you left it at design time, but the operating system chooses its size. The right side of the form is always near the far right side of the screen, and the bottom of the form is always near the bottom of the screen, regardless of the screen's resolution.

poScreenCenter	The form remains the size you left it at design time, but is positioned in the center of the screen. In multi-monitor applications, the form may be moved from this center position so that it falls entirely on one monitor, as specified by the DefaultMonitor property.

poDesktopCenter	The form remains the size you left it at design time, but is positioned in the center of the screen. No adjustments are made for multi-monitor applications.

poMainFormCenter	The form remains the size you left it at design time, but is positioned in the center of the application’s main form. No adjustments are made for multi-monitor applications. This position should only be used with secondary forms. If set for a main form, it acts like poScreenCenter.

poOwnerFormCenter	The form remains the size you left it at design time, but is positioned in the center of the form specified by the Owner property. If the Owner property does not specify a form, this position acts like poMainFormCenter.


TCustomForm.PrintScale
 VCL Reference

TCustomForm.PrintScale

TCustomForm	See also

Represents the proportions of a printed form.

type TPrintScale = (poNone, poProportional, poPrintToFit);

property PrintScale: TPrintScale;

Description

Use PrintScale to get or set the proportions of the printed form. PrintScale can have one of the following TPrintScale values:

Value	Meaning

poNone	No special scaling occurs; therefore, the printed form and how the form appears onscreen may appear squished or stretched.

poProportional	The form is printed so that the printed image is approximately the same visible size as on the screen (WYSIWYG). The form image is scaled so that the printed image is approximately the same visible size as on the screen.

poPrintToFit	The form is printed using the same screen proportions, but in a size that just fits the printed page.


TCustomForm.Scaled
 VCL Reference

TCustomForm.Scaled

TCustomForm	See also

Specifies whether the form is sized according to the value of the PixelsPerInch property.

property Scaled: Boolean;

Description

Scaled determines whether the form adjust itself to differences between the font used at design time and the current system font used by a system at runtime. If Scaled is True, the form resizes itself and all its child controls to maintain the relationship between the size of controls and the height of text displayed in the default font. If Scaled is False, no such resizing occurs.

By setting Scaled to True, the form can adjust to fonts that are not scalable (that is, fonts that only supply discrete point sizes) or to differences such as forms designed using small fonts at design time that are run on systems that use large fonts.

The degree of resizing is determined by the PixelsPerInch property, which measures the proportion of the font on the system used when designing the form.


TCustomForm.TileMode
 VCL Reference

TCustomForm.TileMode

TCustomForm	See also	Example

Represents how MDI child forms are arranged when the Tile method is called.

type TTileMode = (tbHorizontal, tbVertical);

property TileMode: TTileMode;

Description

TileMode can have one of the following TTileMode values:

Value	Meaning

tbHorizontal	Each form stretches across the width of the parent form

tbVertical	Each form stretches along the height of the parent form

TileMode is meaningful only if the form is an MDI child (that is, if the form’s FormStyle property is set to fsMDIChild).


TCustomForm.TransparentColor
 VCL Reference

TCustomForm.TransparentColor

TCustomForm	See also

Specifies whether a color on the form appears transparent.

property TransparentColor: Boolean;

Description

Use TransparentColor to indicate that one of the colors on the form should be treated as transparent, allowing windows behind the form to completely show through. The TransparentColorValue property indicates the color that appears completely transparent.

Note:	To make the entire form transparent, or to make it translucent rather than transparent, use the AlphaBlend and AlphaBlendValue properties.

Note:	TransparentColor does not work on all systems. The application must be running under Windows 2000 or better, and the machine must be a P90 or better.


TCustomForm.TransparentColorValue
 VCL Reference

TCustomForm.TransparentColorValue

TCustomForm	See also

Indicates the color on the form that appears transparent when TransparentColor is True.

property TransparentColorValue: TColor;

Description

Use TransparentColorValue to indicate the color that appears transparent when the TranparentColor property is True.

Note:	If the application uses a 16-bit color palette, TransparentColorValue must be a basic (nonblended) color.


TCustomForm.Visible
 VCL Reference

TCustomForm.Visible

TCustomForm	See also 	Example

Indicates whether the form is visible.

property Visible: Boolean;

Description

Use Visible to determine whether the form is visible.

If Visible is True, the form is visible unless it is completely obscured by other forms. If Visible is False, the form is not visible.

The Show and ShowModal methods set Visible to True and bring the form to the front of all open windows.


TCustomForm.WindowMenu
 VCL Reference

TCustomForm.WindowMenu

TCustomForm	See also

Specifies the Window menu for an MDI parent form.

property WindowMenu: TMenuItem;

Description

Use WindowMenu to get or set the Window menu for an MDI parent form. The Window menu is a standard menu in MDI applications. It contains commands that let the user manage the windows in the application. Menu items usually include Cascade, Arrange Icons, Tile, and so on.

The Window menu also lists (at the bottom) the child windows that are currently open in the application. When the user selects one of these windows from the menu, the window becomes the active window in the application.

Although this menu is commonly called the Window menu, it can have any name that corresponds to an existing menu item on the menu bar. The names of open child forms are merged onto the menu automatically at run-time.

WindowMenu is meaningful only if the form is an MDI parent (that is, if the form’s FormStyle property is set to fsMDIForm).


TCustomForm.WindowState
 VCL Reference

TCustomForm.WindowState

TCustomForm	See also

Represents how the form appears on the screen.

property WindowState: TWindowState;

Description

Set WindowState to minimize, maximize, or restore the form window. Read WindowState to determine whether the form is minimized, maximized, or in a normal state.


 VCL Reference

TCustomForm events

TCustomForm	Alphabetically	Legend

In TCustomForm

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnPaint

OnShortCut

OnShow


 VCL Reference

TCustomForm events

TCustomForm	By object	Legend

OnActivate

OnClose

OnCloseQuery

OnCreate

OnDeactivate

OnDestroy

OnHelp

OnHide

OnPaint

OnShortCut

OnShow


TCustomForm.OnActivate
 VCL Reference

TCustomForm.OnActivate

TCustomForm	See also 	Example

Occurs when the form becomes active.

property OnActivate: TNotifyEvent;

Description

Use OnActivate to perform special processing when the form receives focus. A form becomes active when focus is transferred to it (when the user clicks on the form, for example).

Note:	The OnActivate event of the application (TApplication), not the form, occurs when Windows switches control from another application.


TCustomForm.OnClose
 VCL Reference

TCustomForm.OnClose

TCustomForm	See also 	Example

Occurs when the form closes.

type

  TCloseAction = (caNone, caHide, caFree, caMinimize);

  TCloseEvent = procedure(Sender: TObject; var Action: TCloseAction) of object;

property OnClose: TCloseEvent;

Description

Use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is about to close. The handler specified by OnClose might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the form to close.

A form is closed by the Close method or when the user chooses Close from the form's system menu.

The TCloseEvent type points to a method that handles the closing of a form. The value of the Action parameter determines if the form actually closes. These are the possible values of Action:

Value	Meaning

caNone	The form is not allowed to close, so nothing happens.

caHide	The form is not closed, but just hidden. Your application can still access a hidden form.

caFree	The form is closed and all allocated memory for the form is freed.

caMinimize	The form is minimized, rather than closed. This is the default action for MDI child forms.

If a form is an MDI child form, and its BorderIcons property is biMinimize, then the default Action is caMinimize. If a MDI child form does not have these settings, the default Action is caNone, meaning that nothing happens when the user attempts to close the form.

If a form is an SDI child form, Action defaults to caHide.

To close the form and free it in an OnClose event, set Action to caFree.

Note:	When the application shuts down, the main form receives an OnClose event, but any child forms do not receive the OnClose event.


TCustomForm.OnCloseQuery
 VCL Reference

TCustomForm.OnCloseQuery

TCustomForm	See also 	Example

Occurs when the Close method is called or when the user chooses Close from the form's System menu.

type TCloseQueryEvent = procedure(Sender: TObject; var CanClose: Boolean) of object;

property OnCloseQuery: TCloseQueryEvent;

Description

Use OnCloseQuery to specify the conditions under which the form can close. An OnCloseQuery event handler contains a Boolean CanClose variable that determines whether a form is allowed to close. Its default value is True.

You can use an OnCloseQuery event handler to ask users if they are sure they really want the form closed immediately. For example, you can use the handler to display a message box that prompts the user to save a file before closing the form.

The TCloseQueryEvent type points to the method that determines whether a form can be closed. The value of the CanClose parameter determines if the form can close or not.


TCustomForm.OnCreate
 VCL Reference

TCustomForm.OnCreate

TCustomForm	See also	Example

Occurs when the form is created.

property OnCreate: TNotifyEvent;

Description

Use OnCreate to perform special processing when the form is created and is invoked by TCustomForm’s constructor. Either implement this event or override the constructor of the form; do not do both. Any objects created in the OnCreate event should be freed by the OnDestroy event.

When a form is being created and its Visible property is True, the following events occur in the order listed:

1. OnCreate
2. OnShow
3. OnActivate
4. OnPaint


TCustomForm.OnDeactivate
 VCL Reference

TCustomForm.OnDeactivate

TCustomForm	See also

Occurs when the form loses focus.

property OnDeactivate: TNotifyEvent;

Description

Use OnDeactivate to perform special processing when the form transitions from being the active form to another form in the same application becoming the active form. If activation goes to another application, this event is not triggered. To determine if another application has become active, Use the TApplication object’s OnDeactivate event.


TCustomForm.OnDestroy
 VCL Reference

TCustomForm.OnDestroy

TCustomForm	See also 	Example

Occurs when the form is destroyed.

property OnDestroy: TNotifyEvent;

Description

Use OnDestroy to perform special processing when the form is destroyed. Either implement this event or override the destructor of the class, but not both. This event should destroy any objects created in the OnCreate event.


TCustomForm.OnHelp
 VCL Reference

TCustomForm.OnHelp

TCustomForm	See also

Occurs when the form receives a request for help.

type THelpEvent = function (Command: Word; Data: Longint; var CallHelp: Boolean): Booleanof object;

property OnHelp: THelpEvent;

Description

Write an OnHelp event handler to perform special processing when the user requests help. The HelpContext and the HelpJump methods automatically trigger the OnHelp event.

Set CallHelp to True if the application should still invoke the help system after the event. Set CallHelp to False to prevent the default response by the help system. The form calls the help system only if OnHelp’s CallHelp parameter returns True or if no OnHelp event handler is assigned.

To find the possible values of the Command and Data parameters, search for WinHelp in the Win32 Developer's Reference Help (Win32.HLP) file, which explains the WinHelp API (application programming interface). The possible values for the Data parameter depend upon the value of the Command parameter.

The event handler returns True if it succeeds, False if it fails.


TCustomForm.OnHide
 VCL Reference

TCustomForm.OnHide

TCustomForm	See also 	Example

Occurs when the form is hidden (that is, when its Visible property is set to False).

property OnHide: TNotifyEvent;

Description

Use OnHide to perform special processing when the form is hidden (that is, when the form’s Visible property is set to False).


TCustomForm.OnPaint
 VCL Reference

TCustomForm.OnPaint

TCustomForm	See also 	Example

Occurs when the form is redrawn.

property OnPaint: TNotifyEvent;

Description

Use OnPaint to perform special processing when the form is redrawn. Any special painting on the form should be done in this event. OnPaint occurs before any controls on the form are painted.

Tip:	To determine which portions of the form’s canvas need to be repainted, use the ClipRect property of the canvas.

If you use the form’s Canvas property outside the OnPaint event, it will be erased and drawn-over by the next OnPaint event.


TCustomForm.ShortCut
 VCL Reference

TCustomForm.OnShortCut

TCustomForm	See also

Occurs when the user presses a key (before the OnKeyDown event).

property OnShortCut: TShortCutEvent;

Description

Use OnShortCut to dispatch shortcut keystrokes before the form handles them. When the user presses a key, the form can dispatch it as a shortcut key instead of allowing the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp). Built-in shortcut processing is provided for menu shortcuts and actions associated with the form. OnShortCut allows the form to implement additional shortcuts.

If the OnShortCut implements a response to the keystroke, set the Handled parameter of the event handler to True. This prevents the keystroke from being passed on to menus or actions associated with the form. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does.


TCustomForm.OnShow
 VCL Reference

TCustomForm.OnShow

TCustomForm	See also 	Example

Occurs when the form is shown (that is, when its Visible property is set to True).

property OnShow: TNotifyEvent;

Description

Use OnShow to perform special processing when the form is shown (that is, when the form’s Visible property is set to True).


 VCL Reference

TCustomForm methods

TCustomForm	Alphabetically	Legend

In TCustomForm

Activate

ActiveChanged

AfterConstruction

AlignControls

BeforeDestruction

BeginAutoDrag

ChangeScale

Close

CloseQuery

Create

CreateNew

CreateParams

CreateWindowHandle

CreateWnd

Deactivate

DefaultHandler

DefineProperties

DefocusControl

Destroy

DestroyWindowHandle

Dock

DoClose

DoCreate

DoDestroy

DoDock

DoHide

DoShow

FocusControl

GetChildren

GetClientRect

GetFoating

GetFormImage

HandleCreateException

Hide

IsShortCut

Loaded

MakeFullyVisible

MouseWheelHandler

Notification

Paint

PaintWindow

PaletteChanged

Print

QueryInterface

ReadState

Release

RequestAlign

Resizing

SendCancelMode

SetChildOrder

SetFocus

SetFocusedControl

SetParent

SetParentBiDiMode

Show

ShowModal

UpdateActions

UpdateWindowState

ValidateRename

VisibleChanging

WantChildKey

WndProc

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TFrameControl

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomForm methods

TCustomForm	By object	Legend

Activate

ActiveChanged

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginAutoDrag

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParams

CreateParented

CreateParentedControl

CreateWindowHandle

CreateWnd

Deactivate

DefaultHandler

DefineProperties

DefocusControl

Destroy

DestroyComponents

Destroying

DestroyWindowHandle

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DoClose

DoCreate

DoDestroy

DoDock

DoHide

DoShow

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetClientRect

GetControlsAlignment

GetFoating

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleCreateException

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

Loaded

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

Paint

PaintTo

PaintWindow

PaletteChanged

ParentToClient

Perform

Print

QueryInterface

ReadState

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RequestAlign

Resizing

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetChildOrder

SetFocus

SetFocusedControl

SetParent

SetParentBiDiMode

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateActions

UpdateControlState

UpdateWindowState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidateRename

VisibleChanging

WantChildKey

WndProc


TCustomForm.Activate
 VCL Reference

TCustomForm.Activate

TCustomForm	See also

Generates an OnActivate event.

procedure Activate; dynamic;

Description

The form component calls Activate in response to the CM_ACTIVATE message, sent when a form gets the focus either because of a change in active windows within an application or because of the application becoming active.

The default Activate method calls any event handler attached by the user to the OnActivate event. Override this method to change the response to CM_ACTIVATE messages


TCustomForm.ActiveChanged
 VCL Reference

TCustomForm.ActiveChanged

TCustomForm	See also

Responds when the active control on the form changes.

procedure ActiveChanged; dynamic;

Description

As implemented in TCustomForm, ActiveChange ignores changes in the active control. Override this method in a descendant class to execute some action when the active control on the form changes.


TCustomForm.AfterConstruction
 VCL Reference

TCustomForm.AfterConstruction

TCustomForm	See also

Generates an OnCreate event.

procedure AfterConstruction; override;

Description

AfterConstruction is called after the form’s constructor is finished. Do not call it explicitly in applications. TCustomForm overrides AfterConstruction to generate an OnCreate event if OldCreateOrder is False.


TCustomForm.AlignControls
 VCL Reference

TCustomForm.AlignControls

TCustomForm	See also

Aligns all child controls of the form that fall within a specified rectangle.

procedure AlignControls(AControl: TControl; var ARect: TRect); override;

Description

Use AlignControls to align all controls within an area of the form. Specify the area in which to align the controls as the value of the Rect parameter.

AlignControls uses the Align property value for each child control to determine how to align it. The AControl parameter can be nil. If you specify a control in AControl, that control takes precedence in alignment over other, similarly aligned controls.


TCustomForm.BeforeDestruction
 VCL Reference

TCustomForm.BeforeDestruction

TCustomForm	See also

Generates an OnDestroy event.

procedure BeforeDestruction; override;

Description

BeforeDestruction is called immediately before the form’s destructor. Do not call it explicitly in applications. TCustomForm overrides BeforeDestruction to generate an OnDestroy event if OldCreateOrder is False.


TCustomForm.BeginAutoDrag
 VCL Reference

TCustomForm.BeginAutoDrag

TCustomForm	See also

Responds when the user starts dragging the form if DragMode is dmAutomatic.

procedure BeginAutoDrag; override;

Description

BeginAutoDrag suppresses the default behavior of the BeginAutoDrag method. This is because forms do not change the mouse cursor when dragged.


TCustomForm.ChangeScale
 VCL Reference

TCustomForm.ChangeScale

TCustomForm	See also

Repositions and resizes the form by the ratio M/D, adjusting its client area and font size as needed.

procedure ChangeScale(M, D: Integer); override;

Description

The ScaleBy method calls ChangeScale to perform its rescaling. TCustomForm overrides ChangeScale to rescale any scrollbars and child controls before rescaling itself.


TCustomForm.Close
 VCL Reference

TCustomForm.Close

TCustomForm	See also	Example

Closes the form.

procedure Close;

Description

Call Close to close a form.

Close calls the CloseQuery method to determine if the form can close. If CloseQuery returns False, the close operation is aborted. Otherwise, the OnClose event occurs.

Note:	When the main form of the application closes, the application terminates.


TCustomForm.CloseQuery
 VCL Reference

TCustomForm.CloseQuery

TCustomForm	See also

Indicates whether the form can close.

function CloseQuery: Boolean; virtual;

Description

Use CloseQuery to determine whether the form can close. If the form can close, CloseQuery returns True; otherwise, CloseQuery returns False.

For an MDI parent form, CloseQuery calls the CloseQuery method on the form’s MDI children to determine the return value.


TCustomForm.Create
 VCL Reference

TCustomForm.Create

TCustomForm	See also

Creates and initializes a new TForm object.

constructor Create(AOwner: TComponent); override;

Description

Use Create to instantiate a TForm object or descendant of TForm at runtime. AOwner is the owner of the TCustomForm object.

For descendants of TCustomForm that are not TForm objects, use CreateNew instead.  Calling Create for a TCustomForm descendant that is not a TForm will raise an exception.


TCustomForm.CreateNew
 VCL Reference

TCustomForm.CreateNew

TCustomForm	See also

Creates and initializes a new form.

constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); virtual;

Description

Use CreateNew instead of Create to create a form without using the associated .DFM file to initialize it. Always use CreateNew if the TCustomForm descendant is not a TForm object or a descendant of TForm.

CreateNew bypasses the streaming in of the previously-associated .DFM file. If the form contains visual components, therefore, you must stream in an external .DFM to bind the visual components with their classes. If the newly created form has an external .DFM file, then you can follow the call to CreateNew with a call to InitInheritedComponent. If you need to create the .dfm file for the new form instance, bracket the call to CreateNew with calls to WriteComponentResFile and ReadComponentResFile. The following code sequence

1. streams out an external .DFM file;
2. creates a new form disassociated from any .DFM resource file;
3. streams in the external .DFM file and binds it to this new form.

WriteComponentResFile('Temp.dfm', Form1);

…

Form2 := TForm.CreateNew(Application);

ReadComponentResFile('Temp.dfm', Form2);

Warning	Using CreateNew instead of Create can cause unpredictable results because most forms are written assuming their controls will be created from the .DFM file.

CreateNew is called by the Create method.

The first argument, AOwner, is the owner of the form (usually the application or another form is the owner). The second argument, Dummy, defaults to 0 and is not used by this constructor. The system passes 0 by default if this constructor is passed only the first argument, AOwner.


TCustomForm.CreateParams
 VCL Reference

TCustomForm.CreateParams

TCustomForm	See also

Initializes the window-creation parameter record when the form window is created.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TCustomForm overrides CreateParams to customize the way the form creates its Windows representation after calling the inherited method. You should never need to override this method in the context of a form class.

The fields of the Params parameter become the parameters to a call to the CreateWindowEx API function.


TCustomForm.CreateWindowHandle
 VCL Reference

TCustomForm.CreateWindowHandle

TCustomForm	See also

Creates a form window given a set of window-creation parameters.

procedure CreateWindowHandle(const Params: TCreateParams); override;

Description

The CreateWnd method calls CreateWindowHandle to create the form window once it has been specified in the window-creation parameters. CreateWindowHandle creates the window by calling the CreateWindowEx API function, passing parameters from the record passed in the Params parameter. CreateWindowHandle removes the CS_HREDRAW and CS_VREDRAW class styles from the window class.

Params holds information needed when telling Windows to create a window handle.


TCustomForm.CreateWnd
 VCL Reference

TCustomForm.CreateWnd

TCustomForm	See also

Creates the form window.

procedure CreateWnd; override;

Description

CreateWnd is called when the form is created, and whenever a change to the form requires the window to be recreated. CreateWnd calls (indirectly) the CreateParams method to obtain the window creation parameters, and then calls CreateWindowHandle to direct Windows to create the underlying window for the form. It then initializes the newly-created window to reflect the property settings of the form.


TCustomForm.Deactivate
 VCL Reference

TCustomForm.Deactivate

TCustomForm	See also

Generates an OnDeactivate event.

procedure Deactivate; dynamic;

Description

The form component calls Deactivate in response to the CM_DEACTIVATE message, sent when a form gets the focus either because of a change in active windows within an application or because of the application becoming active.

The default Deactivate method calls any event handler attached by the user to the OnDeactivate event.  Override this method to block the OnDeactivate event or provide additional responses to the loss of activation.


TCustomForm.DefaultHandler
 VCL Reference

TCustomForm.DefaultHandler

TCustomForm	See also

Provides message handling for all messages that the form does not fully process.

procedure DefaultHandler(var Message); override;

Description

Override DefaultHandler to change the default message handling for the form. This is seldom necessary because messages can be handled by creating message methods.

DefaultHandler passes any otherwise-unhandled messages to the form's window procedure by calling the CallWindowProc API function.

Note:	Calling inherited in a message-handling method results in a call to the ancestor's DefaultHandler method unless that ancestor specifies a handler for the message.


TCustomForm.DefineProperties
 VCL Reference

TCustomForm.DefineProperties

TCustomForm	See also

Designates methods for storing a form's unpublished data on a stream such as a form file.

procedure DefineProperties(Filer: TFiler); override;

Description

DefineProperties calls the inherited method and calls the filer object's DefineProperty method for the PixelsPerInch, and TextHeight properties. TForm descendants can also specify methods that read and write data other than properties by overriding the DefineProperties method.


TCustomForm.DefocusControl
 VCL Reference

TCustomForm.DefocusControl

TCustomForm	See also

Removes focus from a control on the form.

procedure DefocusControl(Control: TWinControl; Removing: Boolean);

Description

Use DefocusControl to remove focus from a control on the form. This method is used internally by the VCL.

Control is the control from which to remove focus. If Control is the form’s active control,DefocusControl sets  the form’s ActiveControl property to nil.

Removing specifies whether to set focus to the control’s parent.


TCustomForm.Destroy
 VCL Reference

TCustomForm.Destroy

TCustomForm	See also

Removes the form from memory.

destructor Destroy; override;

Description

Do not call Destroy. Instead, call Release, which posts a CM_RELEASE message to the form. The handler for CM_RELEASE calls the Free method, which in turn calls Destroy.


TCustomForm.DestroyWindowHandle
 VCL Reference

TCustomForm.DestroyWindowHandle

TCustomForm	See also

Destroys the window created in the CreateWindowHandle method.

procedure DestroyWindowHandle; override;

Description

DestroyWindowHandle is called automatically to destroy the window associated with a form before destroying the form.


TCustomForm.Dock
 VCL Reference

TCustomForm.Dock

TCustomForm	See also

Handles automatic docking of the form into other windows.

procedure Dock(NewDockSite: TWinControl; ARect: TRect); override;

Description

Do not call Dock. It is called automatically when the form is released on a docking site that will accept it. To dock a form programmatically, use the ManualDock method instead.


TCustomForm.DoClose
 VCL Reference

TCustomForm.DoClose

TCustomForm	See also

Generates an OnClose event.

type  TCloseAction = (caNone, caHide, caFree, caMinimize);

procedure DoClose(var Action: TCloseAction); dynamic;

Description

DoClose is called automatically when the form closes. It calls the OnClose event handler if it is assigned.

Override this method to suppress the OnClose event or to add class-specific processing when the form closes. Set the Action parameter to indicate how the form should be closed. For details on the possible values, see the OnClose event.


TCustomForm.DoCreate
 VCL Reference

TCustomForm.DoCreate

TCustomForm	See also

Generates an OnCreate event.

procedure DoCreate; virtual;

Description

DoCreate is called automatically when the form is created. It calls the OnCreate event handler if it is assigned, wrapping the call in an exception handling layer in case the event handler raises an exception. Finally, it updates the Visible property based on the fsVisible flag in the form’s FormState.


TCustomForm.DoDestroy
 VCL Reference

TCustomForm.DoDestroy

TCustomForm	See also

Generates an OnDestroy event.

procedure DoDestroy; virtual;

Description

DoDestroy is called automatically when the form is freed. It calls the OnDestroy event handler if it is assigned, wrapping the call in an exception handling layer in case the event handler raises an exception.


TCustomForm.DoDock
 VCL Reference

TCustomForm.DoDock

TCustomForm	See also

Makes all necessary adjustments when the form is docked to another window.

procedure DoDock(NewDockSite: TWinControl; var ARect: TRect); override;

Description

DoDock is called automatically after the form is docked or undocked. It adjusts the borders of the form to reflect its new status.

The NewDockSite parameter is the window in which the form is docked. If the form has been undocked and is now floating, NewDockSite is nil.

The ARect parameter specifies the new boundaries of the form.


TCustomForm.DoHide
 VCL Reference

TCustomForm.DoHide

TCustomForm	See also

Generates an OnHide event.

procedure DoHide; dynamic;

Description

The form component calls DoHide in response to the CM_SHOWINGCHANGED message, sent when the application shows or hides the form.

The default DoHide method calls any event handler attached by the user to the OnHide event.  Override DoHide to block the OnHide event or introduce additional responses when the form is hidden.


TCustomForm.DoShow
 VCL Reference

TCustomForm.DoShow

TCustomForm	See also

Generates an OnShow event.

procedure DoShow; dynamic;

Description

The form component calls DoShow in response to the CM_SHOWINGCHANGED message, sent when the application shows or hides the form.

The default DoShow method calls any event handler attached by the user to the OnShow event.  Override DoShow to block the OnShow event or introduce additional responses when the form is shown.


TCustomForm.FocusControl
 VCL Reference

TCustomForm.FocusControl

TCustomForm	See also

Sets focus to a control on the form.

procedure FocusControl(Control: TWinControl);

Description

Use FocusControl to set focus to a control on the form.

Control is a TWinControl object encapsulating the control on which to set focus. FocusControl sets the ActiveControl property.


TCustomForm.GetChildren
 VCL Reference

TCustomForm.GetChildren

TCustomForm	See also

Returns the "child" components of the form; that is, those components that return the form from their GetParentComponent method.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

The component streaming system calls GetChildren to request that the form execute a callback for every child component in the form. The callback must execute in creation order (the order the child components appear in the form file). A child component is defined as any component that returns this form from its GetParentComponent method.

Proc is the callback to execute for every child componenet.

Root specifies the top-level component (such as a form or data module) that is currently being loaded or saved.

In TCustomForm, GetChildren first calls the inherited method, which executes Proc for every control that lists the form as its Parent. Then, if the Root parameter identifies this form, GetChildren executes Proc for every child component that does not have a Parent.


TCustomForm.GetClientRect
 VCL Reference

TCustomForm.GetClientRect

TCustomForm	See also

Returns the value of the ClientRect property.

function GetClientRect: TRect; override;

Description

GetClientRect is the protected access function for the ClientRect property. It returns the dimensions of the form window, indented by any scrollbars and menus.

Override this method to change the way the client area of the form is defined.


TCustomForm.GetFloating
 VCL Reference

TCustomForm.GetFloating

TCustomForm	See also

Returns the value of the Floating property.

function GetFloating: Boolean; override;

Description

GetFloating is the protected access function for the Floating property. Override this method in descendants that implement floating windows in some class-specific way.


TCustomForm.GetFormImage
 VCL Reference

TCustomForm.GetFormImage

TCustomForm	See also 	Example

Returns a bitmap of the form.

function GetFormImage: TBitmap;

Description

Use the GetFormImage method to obtain a bitmap of the form.


TCustomForm.HandleCreateException
 VCL Reference

TCustomForm.HandleCreateException

TCustomForm	See also

Handles exceptions that are raised by the OnCreate event handler.

function HandleCreateException: Boolean; dynamic;

Description

The form calls HandleCreateException internally if the OnCreate event handler raisesthrows an exception.  HandleCreateException forwards the exception on to the application object, which generates an OnException event. If there is no OnException event handler, the application displays an exception message box.

HandleCreateException returns True if it handles the exception, False otherwise.


TCustomForm.Hide
 VCL Reference

TCustomForm.Hide

TCustomForm	See also 	Example

Hides the form.

procedure Hide;

Description

Hide sets the Visible property to False.


TCustomForm.IsShortCut
 VCL Reference

TCustomForm.IsShortCut

TCustomForm	See also

Processes shortcut keys when the form has focus.

function IsShortCut(var Message: TWMKey): Boolean; dynamic;

Description

IsShortCut is called automatically when the user presses a key while the form has focus. It allows the form to dispatch shortcut keys and bypass the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp events).

The Message parameter encapsulates the Windows message describing the keypress. If a shortcut for the key exists, IsShortCut executes the appropriate command and returns True. Otherwise IsShortCut returns False.

IsShortCut generates an OnShortCut event to allow the developer to insert shortcuts for the form. If the keystroke is not handled in an OnShortCut event handler, IsShortCut checks for any shortcuts associated with the form’s menus and actions.


TCustomForm.Loaded
 VCL Reference

TCustomForm.Loaded

TCustomForm	See also

Performs fix-ups when the form is first loaded into memory.

procedure Loaded; override;

Description

Loaded overrides the inherited method to give focus to the ActiveControl if it is assigned. Before assigning focus, Loaded calls the inherited method to perform any lower-level initialization.


TCustomForm.MakeFullyVisible
 VCL Reference

TCustomForm.MakeFullyVisible

TCustomForm	See also

Ensures that the form is fully visible on a specified monitor.

procedure MakeFullyVisible(AMonitor: TMonitor = nil);

Description

Call MakeFullyVisible to ensure that the form does not appear split over more than one monitor in a multi-monitor application.

AMonitor is the monitor on which the form should appear. If a value of nil is supplied, MakeFullyVisible uses the value of the Monitor property.

MakeFullyVisible checks whether the form fits entirely on the specified monitor. If not, it respositions the form so that it fits, if possible.


TCustomForm.MouseWheelHandler
 VCL Reference

TCustomForm.MouseWheelHandler

TCustomForm	See also

Directs mouse wheel messages to the appropriate control.

procedure MouseWheelHandler(var Message: TMessage); override;

Description

MouseWheelHandler is called automatically when the form or any windowed control contained in the form receives a message from a mouse wheel. The Message parameter encapsulates the message.

As implemented in TCustomForm, MouseWheelHandler performs no special processing, but simply redirects the message to the active control by calling its Perform method. By default, the Perform method generates the appropriate mouse wheel events.


TCustomForm.Notification
 VCL Reference

TCustomForm.Notification

TCustomForm	See also

Responds to notifications that objects are about to be inserted or removed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called when the component specified by AComponent is about to be inserted or removed, as specified by Operation. By default, forms pass along the notification to their owned components, if any. In addition, TCustomForm.Notification makes internal adjustments if the main menu is added or deleted.

A form can, if needed, override Notification to make other adjustments when components are inserted or removed. In particular, if a form has object fields or properties that contains references to other components, it might check the notifications of component removals and invalidate those references as needed.


TCustomForm.Paint
 VCL Reference

TCustomForm.Paint

TCustomForm	See also

Generates an OnPaint event.

procedure Paint; dynamic;

Description

The form component calls Paint in response to the WM_PAINT message (sent when the window needs to be painted) before rendering all controls on the form.

The default Paint method calls any event handler attached by the user to the OnPaint event.  Override Paint to block the OnPaint event or to draw additional features before or after the OnPaint event.


TCustomForm.PaintWindow
 VCL Reference

TCustomForm.PaintWindow

TCustomForm	See also

Renders the image of the form.

procedure PaintWindow(DC: HDC); override;

Description

Applications can’t call this protected method. It is called when the form needs to be painted.

PaintWindow locks the canvas to prevent threading issues, assigns the DC parameter as the Handle of the form’s canvas, and then calls the Paint method to render the image of the form.


TCustomForm.PaletteChanged
 VCL Reference

TCustomForm.PaletteChanged

TCustomForm	See also

Responds to changes in the system's palette by realizing the control's palette as returned from GetPalette.

function PaletteChanged(Foreground: Boolean): Boolean; override;

Description

PaletteChanged is called automatically when the system palette changes. The Foreground parameter indicates whether the palette realization should treat this control's palette as being in the foreground or the background. The return value from PaletteChanged indicates whether the form actually realized its palette, returning True only if the form has an associated palette.

Most applications should not need to alter the default behavior of PaletteChanged.


TCustomForm.Print
 VCL Reference

TCustomForm.Print

TCustomForm	See also

Prints the form.

procedure Print; virtual;

Description

Call Print to print the form. Print uses the GetFormImage method to obtain a bitmap of the form and draws that to the printer’s HDC.


TCustomForm.QueryInterface
 VCL Reference

TCustomForm.QueryInterface

TCustomForm	See also

Returns a reference to a specified interface if that interface is supported by the form.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; override;

Description

For forms that support interfaces, QueryInterface calls the QueryInterface method of the interface supported by the form. QueryInterface returns a reference to the interface specified by the IID parameter, as the Obj parameter. If the form does not support the interface, the Obj parameter is nil.

QueryInterface returns S_OK if the Obj parameter is successfully assigned.


TCustomForm.ReadState
 VCL Reference

TCustomForm.ReadState

TCustomForm	See also

Reads the form's published properties, stored data, and owned components from a reader object.

procedure ReadState(Reader: TReader); override;

Description

ReadState is part of a sequence of calls used by the VCLstreaming system that loads and saves VCL components.  It reads the values of all the component's published properties, stored data, and owned components from the reader object passed in Reader. Do not call ReadState directly.

Any descendant classes overriding ReadState should end with a call to the inherited ReadState method.


TCustomForm.Release
 VCL Reference

TCustomForm.Release

TCustomForm	See also

Destroys the form and frees its associated memory.

procedure Release;

Description

Use Release to destroy the form and free its associated memory.

Release does not destroy the form until all event handlers of the form and event handlers of components on the form have finished executing. Release also guarantees that all messages in the form's event queue are processed before the form is released. Any event handlers of the form should use Release instead of Free. Failing to do so could lead to an access violation.

Note:	Release returns immediately to the caller. It does not wait for the form to be freed before returning.


TCustomForm.RequestAlign
 VCL Reference

TCustomForm.RequestAlign

TCustomForm	See also

Instructs the form’s parent (if any) to reposition the form, enforcing its Align property.

procedure RequestAlign; override;

Description

RequestAlign is called internally when changes are made to the size or position of the form, so that it remains properly aligned within a dock site or properly positioned on the screen.


TCustomForm.Resizing
 VCL Reference

TCustomForm.Resizing

TCustomForm

Makes any required adjustments when the form changes size.

procedure Resizing(State: TWindowState); override;

Description

This protected method is called automatically when the form is resized, including when it is maximized, minimized, or restored to normal size. Resizing adjusts the size and position of any child controls that are aligned to the form.

The State parameter indicates the state of the form after the resize.


TCustomForm.SendCancelMode
 VCL Reference

TCustomForm.SendCancelMode

TCustomForm	See also

Cancels modes on the form.

procedure SendCancelMode(Sender: TControl);

Description

Use SendCancelMode to release the mouse capture and cancel scroll bar input and menu processing on the form.


TCustomForm.SetChildOrder
 VCL Reference

TCustomForm.SetChildOrder

TCustomForm	See also

Changes the order in which Child appears when GetChildren is called.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

Use SetChildOrder to change the order in which child components are loaded and saved. The Child moves as if it were an item in a list object: items previously below the child's old position move up, and those below the new position move down.


TCustomForm.SetFocus
 VCL Reference

TCustomForm.SetFocus

TCustomForm	See also

Sets focus to the form.

procedure SetFocus;

Description

Use SetFocus to give the form input focus. SetFocus calls the SetFocus method of the active control, if one exists. To determine whether the form has focus, use the Active property.


TCustomForm.SetFocusedControl
 VCL Reference

TCustomForm.SetFocusedControl

TCustomForm	See also

Sets focus to a control on the form.

function SetFocusedControl(Control: TWinControl): Boolean; virtual;

Description

Use SetFocusedControl to give a control on the form input focus.  SetFocusedControl returns False if the Control specified by the Control parameter was already in the process of receiving focus, True otherwise.

Note:	A return value of True does not indicate the control has successfully received input focus.  If the Control can’t have focus (for example, if it is not visible), SetFocusedControl will still return True, indicating that an attempt was made.


TCustomForm.SetParent
 VCL Reference

TCustomForm.SetParent

TCustomForm	See also

Sets the Parent property.

procedure SetParent(AParent: TWinControl); override;

Description

SetParent is the protected implementation of the Parent property. It overrides the inherited method to regenerate the form’s window when the Parent property is changed to nil.


TCustomForm.SetParentBiDiMode
 VCL Reference

TCustomForm.SetParentBiDiMode

TCustomForm	See also

Sets the ParentBiDiMode property.

procedure SetParentBiDiMode(Value: Boolean); override;

Description

SetParentBiDiMode is the protected implementation of the ParentBiDiMode property. It overrides the inherited method to obtain the BiDiMode property of the application if the form does not have a parent.


TCustomForm.Show
 VCL Reference

TCustomForm.Show

TCustomForm	See also	Example

Shows the form.

procedure Show;

Description

Use Show to set the form’s Visible property to True and to bring the form to the front of other forms on the screen.


TCustomForm.ShowModal
 VCL Reference

TCustomForm.ShowModal

TCustomForm	See also 	Example

Shows a form as a modal dialog.

function ShowModal: Integer; virtual;

Description

Use ShowModal to show a form as a modal form.  A modal form is one where the application can’t continue to run until the form is closed. Thus, ShowModal does not return until the form closes. When the form closes, it returns the value of the ModalResult property.

To close a modal form, set its ModalResult property to a nonzero value.

Note:	If the form contains buttons with a ModalResult property set to a value other than mrNone, the form automatically closes when the user clicks one of those buttons and returns the ModalResult value as the return value of ShowModal.

You can check the return value against common return values using the global IsAbortResult, IsAnAllResult, IsNegativeResult, or IsPositiveResult functions.


TCustomForm.UpdateActions
 VCL Reference

TCustomForm.UpdateActions

TCustomForm	See also

Updates all actions associated with the form.

procedure UpdateActions; virtual;

Description

UpdateActions is called automatically when the application is idle to allow all components in the form an opportunity to update any actions for which the component is a target. This allows actions to be checked, grayed, and so on to reflect the current state of their targets.

UpdateActions updates all actions associated with the form, its menus, and the components contained in the form.


TCustomForm.UpdateWindowState
 VCL Reference

TCustomForm.UpdateWindowState

TCustomForm	See also

Updates the WindowState property to reflect the current state of the form.

procedure UpdateWindowState;

Description

UpdateWindowState ensures that the WindowState property reflects the current state of the form.


TCustomForm.ValidateRename
 VCL Reference

TCustomForm.ValidateRename

TCustomForm	See also

Determines if a form can rename one of its owned components.

procedure ValidateRename(AComponent: TComponent; const CurName, NewName: string); override;

Description

The ValidateRename method checks to see if a form can rename one of its owned components, passed in AComponent, from its current name (CurName) to the string passed in NewName. If AComponent is nil or NewName is already the name of a component in the form’s list, ValidateRename raises an EComponentError exception.


TCustomForm.VisibleChanging
 VCL Reference

TCustomForm.VisibleChanging

TCustomForm	See also

Responds just before the form changes the value of its Visible property.

procedure VisibleChanging; override;

Description

This protected method raises an exception if, for some reason, the form should not change its visible state.


TCustomForm.WantChildKey
 VCL Reference

TCustomForm.WantChildKey

TCustomForm

Indicates whether the form processes keyboard input for a control it owns.

function WantChildKey(Child: TControl; var Message: TMessage): Boolean; virtual;

Description

WantChildKey is called by any control that the form owns when the control receives keyboard input. If WantChildKey returns True, the control performs no further processing in response to the keyboard input, instead deferring to its parent form to respond to the keystroke. In its default implementation, WantChildKey always returns False; it is overridden in TActiveForm to implement certain ActiveX functionality.


TCustomForm.WndProc
 VCL Reference

TCustomForm.WndProc

TCustomForm	See also

Provides specific message responses for the form.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the first method that receives messages for a form. After calling the inherited method, WndProc performs some window activation, focus, and position message handling necessary to keep in sync with Windows. Override WndProc to change how the form responds to Windows messages.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm


TCustomFrame
 VCL Reference

TCustomFrame

Hierarchy	Properties	Methods	See also

TCustomFrame is the base class from which TFrame descends.

Unit

Forms

Description

TCustomFrame is the base class for frames. A frame, like a form, is a container for controls and components. It uses the same ownership mechanism as forms for automatic instantiation and destruction of the components on it, and the same parent-child relationships for synchronization of component properties. Unlike forms, however, frames can be nested within forms or other frames, and can be saved on the Component palette for easy reuse. After a frame is created and saved, it continues to function as a unit and to inherit changes from the components (including other frames) it contains. Moreover, an embedded frame continues to inherit changes made to the frame from which it is derived.

Do not create instances of TCustomFrame. Instead, to create and work with frames, define a TCustomFrame descendant by choosing File|New|Frame, and adding the controls and components that you want your frame to encapsulate.


 VCL Reference

TCustomFrame properties

TCustomFrame	Alphabetically	Legend

In TCustomFrame

Parent

Derived from TScrollingWinControl

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomFrame properties

TCustomFrame	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc


TCustomFrame.Parent
 VCL Reference

TCustomFrame.Parent

TControl	See also

Indicates the parent of the frame.

property Parent: TWinControl;

Description

Use the Parent property to get or set the parent of the frame. The parent of a frame is the windowed control that contains the frame and all of its children. Usually, this is a form, panel, group box, or some control that is designed to contain another. Changing the parent of a control moves the control onscreen so that it is displayed within the new parent. When the parent control moves, the child moves with the parent.

When creating a new instance of the frame at runtime, assign a Parent property value for the new instance or the frame will not appear visible to the user.


 VCL Reference

TCustomFrame methods

TCustomFrame	Alphabetically	Legend

In TCustomFrame

Create

CreateParams

GetChildren

Notification

SetParent

Derived from TScrollingWinControl

Destroy

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomFrame methods

TCustomFrame	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetParent

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomFrame.Create
 VCL Reference

TCustomFrame.Create

TCustomFrame	See also

Creates and initializes a TCustomFrame object.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create and initialize a frame.

AOwner is the component that owns the frame.


TCustomFrame.CreateParams
 VCL Reference

TCustomFrame.CreateParams

TCustomFrame	See also

Initializes frame creation parameters for efficient redrawing.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle.


TCustomFrame.GetChildren
 VCL Reference

TCustomFrame.GetChildren

TCustomFrame	See also

Calls a specified method for each child of the frame.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is called by the component streaming system that loads and saves forms and data modules. Applications seldom need to call this routine.

Proc is a callback to execute for every component in the frame.

Root indicates the top-level component that is the entry point for the entire streaming process. This can be a form, data module, or frame.

GetChildren executes the method specified by Proc for every component contained by the frame. It provides extra support for components that do not have parents if the Root parameter identifies this frame.


TCustomFrame.Notification
 VCL Reference

TCustomFrame.Notification

TCustomFrame	See also

Provides necessary fix-up when notified that components are added or removed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called automatically when objects are added or removed from the frame. It updates the host form so that it is aware when action lists are added to or removed from the frame.


TCustomFrame.SetParent
 VCL Reference

TCustomFrame.SetParent

TCustomFrame	See also

Sets the Parent property.

procedure SetParent(AParent: TWinControl); override;

Description

SetParent is the protected implementation of the Parent property. TCustomFrame overrides the method inherited from TControl to

Update the parent form so that it is aware of any action lists in the frame.

Regenerate the frame’s window so that it fits properly into its new parent.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomFrame


TCustomGroupBox
 VCL Reference

TCustomGroupBox

Hierarchy	Properties	Methods	See also

TCustomGroupBox is the base class for all group-box components.

Unit

StdCtrls

Description

Group boxes are visual components that act as containers for sets of related controls, such as radio buttons. Group boxes may also contain other group boxes. TCustomGroupBox is the class from which all group-box components—including TGroupBox, TRadioGroup, and TDBRadioGroup—descend.


 VCL Reference

TCustomGroupBox properties

TCustomGroupBox	Alphabetically	Legend

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomGroupBox Properties

TCustomGroupBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TCustomGroupBox methods

TCustomGroupBox	Alphabetically	Legend

In TCustomGroupBox

AdjustClientRect

Create

CreateParams

Paint

Derived from TCustomControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomGroupBox Methods

TCustomGroupBox	By Object	Legend

AdjustClientRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomGroupBox.AdjustClientRect
 VCL Reference

TCustomGroupBox.AdjustClientRect

TCustomGroupBox	See also

Adjusts the ClientRect property for idiosyncrasies of the window.

procedure AdjustClientRect(var Rect: TRect); override;

Description

AdjustClientRect is called internally when the group box needs accurate information on where to place child controls within the client area. It indents the client rectangle slightly so that child controls are not placed on the frame (or caption) of the group box.


TCustomGroupBox.Create
 VCL Reference

TCustomGroupBox.CreateTCustomGroupBox	See also

Creates and initializes a TCustomGroupBox instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a group box at runtime. Group boxes placed on forms at design time are created automatically.

After calling the inherited constructor, Create initializes the ControlStyle property by turning on the following flags: csAcceptsControls, csCaptureMouse, csClickEvents, csSetCaption, csDoubleClicks, and csReplicatable. Create also sets the Width and Height properties to 185 and 105 pixels, respectively.


TCustomGroupBox.CreateParams
 VCL Reference

TCustomGroupBox.CreateParams

TCustomGroupBox	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. Override CreateParams to customize the way a group box creates its Windows representation. When overriding CreateParams, always call the inherited method first to set the default values, then make any desired adjustments.

Specify the parameter record as the value of the Params parameter. The TCreateParams type is a data structure holding information needed when telling Windows to create a window handle. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function.

TCustomGroupBox adjusts the window style by turning off the CS_HREDRAW and CS_VREDRAW flags.


TCustomGroupBox.Paint
 VCL Reference

TCustomGroupBox.Paint

TCustomGroupBox

Renders the onscreen image of the group box.

procedure Paint; override;

Description

Paint draws a border around the group box and fills in the caption.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGroupBox


TCustomGrid
 VCL Reference

TCustomGrid

Hierarchy	Properties	Methods	See also

TCustomGrid is the base type for all components that present information in a two-dimensional grid.

Unit

Grids

Description

Use TCustomGrid as a base class when defining components that represent information in a tabular format. TCustomGrid introduces properties and methods to control the appearance and behavior of the grid, including responses to mouse actions and user editing.

Do not create instances of TCustomGrid. Instead, put a grid control in a form by instantiating a descendant of TCustomGrid. Use TDrawGrid to represent non-textual material in a tabular grid. For text, use a TStringGrid object. If the text represents field values from a dataset, use TDBGrid.


 VCL Reference

TCustomGrid properties

TCustomGrid	Alphabetically	Legend

In TCustomGrid

BorderStyle

Col

ColCount

ColWidths

DefaultColWidth

DefaultDrawing

DefaultRowHeight

EditorMode

FixedColor

FixedCols

FixedRows

GridHeight

GridLineWidth

GridWidth

HitTest

InplaceEditor

LeftCol

Options

Row

RowCount

RowHeights

ScrollBars

Selection

TabStops

TopRow

VisibleColCount

VisibleRowCount

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ShowHint

Top

TBDockHeight

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomGrid properties

TCustomGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

ColWidths

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

Floating

FloatingDockSiteClass

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HitTest

HostDockSite

InplaceEditor

Left

LeftCol

LRDockWidth

Name

Options

Owner

Parent

ParentColor

ParentWindow

Row

RowCount

RowHeights

ScrollBars

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

TBDockHeight

Top

TopRow

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleColCount

VisibleDockClientCount

VisibleRowCount

Width

WindowProc


TCustomGrid.BorderStyle
 VCL Reference

TCustomGrid.BorderStyle

TCustomGrid

Determines whether a single line border is drawn around the grid.

property BorderStyle: TBorderStyle;

Description

Set BorderStyle to bsSingle to add a single line border around the grid’s image. Set BorderStyle to bsNone to omit the border.


TCustomGrid.Col
 VCL Reference

TCustomGrid.Col

TCustomGrid	See also	Example

Specifies the index of the column that contains the selected cell.

property Col: Longint;

Description

Use Col at runtime to determine the current column in the grid. Setting Col moves focus to the cell in the current row that is in the new column. The first column has an index of 0, the second column an index of 1, and so on.

The selected cell in the grid can be located by reading the Col property and the Row property to obtain the indexes of its column and row. When focus moves to the grid, the selected cell gets input focus.


TCustomGrid.ColCount
 VCL Reference

TCustomGrid.ColCount

TCustomGrid	See also 	Example

Specifies the number of columns in the grid.

property ColCount: Longint;

Description

Read ColCount to determine the number entries in the ColWidths array. Set ColCount to add or delete columns at the righthand side of the grid. The value of ColCount includes any fixed columns at the left of the grid as well as the scrollable columns in the body of the grid.


TCustomGrid.ColWidths
 VCL Reference

TCustomGrid.ColWidths

TCustomGrid	See also

Indicates the width (in pixels) of all the columns in the grid.

property ColWidths[Index: Longint]: Integer;

Description

Read ColWidths to determine the width of the cells in the column specified by the Index parameter. An index of 0 refers to the first column. Set ColWidths at runtime to change the width of an individual column.

If the width of a column has not been set explicitly by resizing with the mouse, or by using the ColWidths property, its width is DefaultColWidth.

Use the ColCount property to determine the number of entries in the ColWidths array.


TCustomGrid.DefaultColWidth
 VCL Reference

TCustomGrid.DefaultColWidth

TCustomGrid	See also	Example

Determines the width (in pixels) of all columns that have not been explicitly resized.

property DefaultColWidth: Integer;

Description

Set DefaultColWidth to change the size of all columns in the grid. When DefaultColWidth is set, columns that have been resized using the mouse or by setting the ColWidths property are given the DefaultColWidth as well.

When new columns are added to the grid using the ColCount property, they are created with a width of DefaultColWidth.


TCustomGrid.DefaultDrawing
 VCL Reference

TCustomGrid.DefaultDrawing

TCustomGrid	See also

Determines whether the Cells are painted when the grid is drawn.

property DefaultDrawing: Boolean;

Description

Set DefaultDrawing to True to have the grid automatically paint the cells in the grid, including adding the background color, the 3-D effects on the fixed cells, and the focus rectangle around the selected cell. Set DefaultDrawing to False to skip the painting of the cells when the grid is drawn.

When DefaultDrawing is False, the cells should be painted using the DrawCell method. For TCustomGrid, DrawCell is an abstract method. Descendants of TCustomGrid use DrawCell to provide their own customized drawing code, or to generate an OnDrawCell event.


TCustomGrid.DefaultRowHeight
 VCL Reference

TCustomGrid.DefaultRowHeight

TCustomGrid	See also

Specifies the height (in pixels) of all rows that have not been explicitly resized.

property DefaultRowHeight: Integer;

Description

Set DefaultRowHeight to change the size of all rows in the grid. When DefaultRowHeight is set, rows that have been resized using the mouse or by setting the RowHeights property are given the DefaultRowHeight as well.

When new rows are added to the grid using the RowCount property, they are created with a height of DefaultRowHeight.


TCustomGrid.EditorMode
 VCL Reference

TCustomGrid.EditorMode

TCustomGrid	See also

Determines whether the current cell can be edited.

property EditorMode: Boolean;

Description

Set EditorMode to True, at runtime, to put the grid in edit mode. When EditorMode is True, the user can edit cells in the grid. When the user presses F2, EditorMode is set to True. When the user presses Enter, the value of EditorMode is toggled.

Note:	EditorMode has no effect if the Options property does not include goEditing or if the Options property includes goAlwaysShowEditor.


TCustomGrid.FixedColor
 VCL Reference

TCustomGrid.FixedColor

TCustomGrid	See also

Specifies the background color of the fixed rows and columns in the grid.

property FixedColor: TColor;

Description

Set FixedColor to specify the color for the nonscrolling cells in the grid. The scrolling region of the grid is drawn using the Color property.


TCustomGrid.FixedCols
 VCL Reference

TCustomGrid.FixedCols

TCustomGrid	See also

Specifies the number of columns on the left of the grid that cannot be scrolled.

property FixedCols: Integer;

Description

Set FixedCols to create or get rid of nonscrolling columns. Nonscrolling columns appear at the left of the grid, and are always visible, even when the user scrolls the other columns in the grid. Use nonscrolling columns for displaying row titles or row numbers, or to implement a scroll lock that the user can set.

Nonscrolling columns are visually distinct from the scrollable columns in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look.

Note:	Grids must include at least one scrolling column. Do not set FixedCols to a value greater than ColCount - 1.


TCustomGrid.FixedRows
 VCL Reference

TCustomGrid.FixedRows

TCustomGrid	See also

Specifies the number of rows on the top of the grid that cannot be scrolled.

property FixedRows: Integer;

Description

Set FixedRows to create or get rid of nonscrolling rows. Nonscrolling rows appear at the top of the grid, and are always visible, even when the user scrolls the other rows in the grid. Use nonscrolling rows for displaying column titles or column numbers.

Nonscrolling rows are visually distinct from the scrollable rows in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look.

Note:	Grids must include at least one scrolling row. Do not set FixedRows to a value greater than RowCount - 1.


TCustomGrid.GridHeight
 VCL Reference

TCustomGrid.GridHeight

TCustomGrid	See also

Specifies the height of the grid in pixels.

property GridHeight: Integer;

Description

Read GridHeight to determine the size of the grid. If GridHeight is less than the value of ClientHeight, all of the rows of the grid appear in the control with an empty region below the grid. If the underlying grid is too tall to appear in the control, GridHeight is the same as ClientHeight, and the user must scroll to see the entire contents of the grid.


TCustomGrid.GridLineWidth
 VCL Reference

TCustomGrid.GridLineWidth

TCustomGrid	See also	Example

Specifies the width (in pixels) of the lines that separate the cells of the grid.

property GridLineWidth: Integer;

Description

Set GridLineWidth to make the lines that separate the cells in the grid heavier or lighter. When GridLineWidth is zero, no separators are drawn between the cells of the grid.

GridLineWidth will have no effect if the Options property does not include goFixedHorzLine, goFixedVertLine, goHorzLine, or goVertLine.

Note:	Values greater than 3 pixels are not recommended for applications that run on Windows 95 because of distortions that can appear.


TCustomGrid.GridWidth
 VCL Reference

TCustomGrid.GridWidth

TCustomGrid	See also

Specifies the width of the grid in pixels.

property GridWidth: Integer;

Description

Read GridWidth to determine the size of the grid. If GridWidth is less than the value of ClientWidth, all of the columns of the grid appear in the control with an empty region to the right of the grid. If the underlying grid is too wide to appear in the control, GridWidth is the same as ClientWidth, and the user must scroll to see the entire contents of the grid.


TCustomGrid.HitTest
 VCL Reference

TCustomGrid.HitTest

TCustomGrid	See also

Indicates the current position of the mouse cursor.

property HitTest: TPoint;

Description

Read HitTest to determine the position of the mouse when it is over the grid or when the grid has captured the mouse. HitTest may represent a position that is not within the client area of the grid control if the user is moving or resizing the rows or columns, or if the user is selecting a range of cells using the mouse. HitTest is the position of the mouse cursor in the coordinate system where (0,0) is the upper left corner of the grid control’s client area.


TCustomGrid.InplaceEditor
 VCL Reference

TCustomGrid.InplaceEditor

TCustomGrid	See also

Designates the edit control the grid uses to allow users to edit the contents of the selected cell.

property InplaceEditor: TInplaceEdit;

Description

Read InplaceEditor to gain direct access to the edit control that sits on top of the selected cell when the grid is in edit mode. The inplace editor is created the first time the grid is put in edit mode. It is not destroyed until the grid is destroyed. The grid moves the editor when the selected cell changes. The grid hides the editor’s window when the grid goes out of edit mode.


TCustomGrid.LeftCol
 VCL Reference

TCustomGrid.LeftCol

TCustomGrid	See also

Specifies the index of the first visible scrollable column in the grid.

property LeftCol: Longint;

Description

Read LeftCol to determine the index of the first column in the scrollable region that is visible. Set LeftCol to scroll the columns in the grid so that the column with index LeftCol is the first column after the fixed columns.


TCustomGrid.Options
 VCL Reference

TCustomGrid.Options

TCustomGrid 	See also

Specifies various display and behavioral properties of the grid.

type

  TGridOption = (goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goDrawFocusSelected, goRowSizing, goColSizing, goRowMoving, goColMoving, goEditing, goTabs, goRowSelect, goAlwaysShowEditor, goThumbTracking);

TGridOptions = set of TGridOption;

property Options: TGridOptions;

Description

Set Options to include the desired properties for the grid. Options is a set drawn from the following values:

Value	Meaning

goFixedVertLine	Vertical lines are drawn to separate the fixed (nonscrolling) columns in the grid.

goFixedHorzLine	Horizontal lines are drawn to separate the fixed (nonscrolling) rows in the grid.

goVertLine	Vertical lines are drawn to separate the scrollable columns in the grid.

goHorzLine	Horizontal lines are drawn to separate the scrollable rows in the grid.

goRangeSelect	Users can select ranges of cells at one time. goRangeSelect is ignored if Options includes goEditing.

goDrawFocusSelected	Cells with input focus are drawn with a special highlight color, just like selected cells without input focus. If goDrawFocusSelected is not included, the cell with input focus is distinguished by a focus rectangle, not by a special background color.

goRowSizing	Scrollable rows can be individually resized.

goColSizing	Scrollable columns can be individually resized.

goRowMoving	Scrollable rows can be moved using the mouse.

goColMoving	Scrollable columns can be moved using the mouse.

goEditing	Users can edit the contents of cells. When goEditing is included in Options, goRangeSelect has no effect.

goTabs	Users can navigate through the cells in the grid using Tab and Shift+Tab.

goRowSelect	Entire rows are selected rather than individual cells. If goRowSelect is included in Options, goAlwaysShowEditor has no effect.

goAlwaysShowEditor	The grid is locked into edit mode. The user does not need to use Enter or F2 to turn on EditorMode. If Options does not include goEditing, goAlwaysShowEditor has no effect. If Options includes goRowSelect, goAlwaysShowEditor has no effect.

goThumbTracking	The grid image updates while the user is dragging the thumb of the scrollbar. If goThumbTracking is not included, the image does not update until the user releases the thumb in a new position.


TCustomGrid.Row
 VCL Reference

TCustomGrid.Row

TCustomGrid	See also 	Example

Specifies the index of the row that contains the selected cell.

property Row: Longint;

Description

Use Row at runtime to determine the current row in the grid. Setting Row moves focus to the cell in the current column that is in the new row. The first row has an index of 0, the second row an index of 1, and so on.

The selected cell in the grid can be located by reading the Row property and the Col property to obtain the indexes of its row and column. When focus moves to the grid, the selected cell gets input focus.


TCustomGrid.RowCount
 VCL Reference

TCustomGrid.RowCount

TCustomGrid	See also 	Example

Specifies the number of rows in the grid.

property RowCount: Longint;

Description

Read RowCount to determine the number entries in the RowHeights array. Set RowCount to add or delete rows at the bottom of the grid. The value of RowCount includes any fixed rows at the top of the grid as well as the scrollable rows in the body of the grid.


TCustomGrid.RowHeights
 VCL Reference

TCustomGrid.RowHeights

TCustomGrid	See also

Gives the height (in pixels) of all rows in the grid.

property RowHeights[Index: Longint]: Integer;

Description

Read RowHeights to determine the height of the cells in the row specified by the Index parameter. An index of 0 refers to the first row. Set RowWidths at runtime to change the height of an individual row.

If the height of a row has not been set explicitly by resizing with the mouse, or by using the RowHeights property, it’s height is DefaultRowHeight.

Use the RowCount property to determine the number of entries in the RowHeights array.


TCustomGrid.ScrollBars
 VCL Reference

TCustomGrid.ScrollBars

TCustomGrid	See also

Specifies whether the grid includes horizontal and vertical scroll bars.

property ScrollBars: TScrollStyle;

Description

Use ScrollBars to give the grid horizontal or vertical scroll bars. ScrollBars can take one of the following values:

Value	Meaning

ssNone	The grid has no scroll bars.

ssHorizontal	The grid has a single scroll bar on the bottom edge.

ssVertical	The grid has a single scroll bar on the right edge.

ssBoth	The grid has a scroll bar on both the bottom and right edges.

Note:	If all the cells in the grid fit in the ClientWidth, no horizontal scrollbar appears, even if ScrollBars is ssHorizontal or ssBoth. If all the cells fit in the ClientHeight, no vertical scrollbar appears, even if ScrollBars is ssVertical or ssBoth.


TCustomGrid.Selection
 VCL Reference

TCustomGrid.Selection

TCustomGrid	See also	Example

Indicates the boundaries of the current selection.

type TGridCoord = record

    X: Longint;

    Y: Longint;

  end;

type TGridRect = record

    caseIntegerof

      0: (Left, Top, Right, Bottom: Longint);

      1: (TopLeft, BottomRight: TGridCoord);

  end;

property Selection: TGridRect;

Description

Set Selection to select a range of cells in the grid. Selection can either represent the first column, first row, last column and last row in the grid, or the row and column coordinates of the upper left and bottom right cells in the selected region.

Selection can only indicate more than one cell when Options includes goRangeSelect.


TCustomGrid.TabStops
 VCL Reference

TCustomGrid.TabStops

TCustomGrid	See also

Indicates whether the user can tab to specified columns in the grid.

property TabStops[Index: Longint]: Boolean;

Description

Set TabStops to False to remove the column identified by Index from the tab order. The first column in the grid is identified by an Index of 0.

Note:	When the Options property does not include goTabs, the user can’t tab to any column, even if TabStops is True.


TCustomGrid.TopRow
 VCL Reference

TCustomGrid.TopRow

TCustomGrid	See also	Example

Specifies the index of the first visible scrollable row in the grid.

property TopRow: Longint;

Description

Read TopRow to determine the index of the first row in the scrollable region that is visible. Set TopRow to scroll the rows in the grid so that the row with index TopRow is the first row after the fixed rows.


TCustomGrid.VisibleColCount
 VCL Reference

TCustomGrid.VisibleColCount

TCustomGrid	See also

Indicates the number of scrollable columns visible in the grid.

property VisibleColCount: Integer;

Description

Use VisibleColCount to determine the number of scrollable columns fully visible in the grid. VisibleColCount does not include the fixed columns counted by the FixedCols property. It does not include any partially visible columns on the right edge of the grid.


TCustomGrid.VisibleRowCount
 VCL Reference

TCustomGrid.VisibleRowCount

TCustomGrid	See also

Indicates the number of scrollable rows visible in the grid.

property VisibleColCount: Integer;

Description

Use VisibleRowCount to determine the number of scrollable rows fully visible in the grid. VisibleRowCount does not include the fixed rows counted by the FixedRows property. It does not include any partially visible rows on the bottom of the grid.


 VCL Reference

TCustomGrid methods

TCustomGrid	Alphabetically	Legend

In TCustomGrid

AdjustSize

BeginColumnDrag

BeginRowDrag

BoxRect

CalcDrawInfo

CalcFixedInfo

CalcSizingState

CanEditAcceptKey

CanEditModify

CanEditShow

CanGridAcceptKey

CellRect

ChangeGridOrientation

CheckColumnDrag

CheckRowDrag

ColumnMoved

ColWidthsChanged

Create

CreateEditor

CreateParams

DefineProperties

DeleteColumn

DeleteRow

Destroy

DoExit

DoMouseWheelDown

DoMouseWheelUp

DrawCell

EndColumnDrag

EndRowDrag

FocusCell

GetEditLimit

GetEditMask

GetEditStyle

GetEditText

GetGridHeight

GetGridWidth

HideEdit

HideEditor

InvalidateCell

InvalidateCol

InvalidateEditor

InvalidateGrid

InvalidateRow

KeyDown

KeyPress

MouseCoord

MouseDown

MouseMove

MouseUp

MoveColRow

MoveColumn

MoveRow

Paint

RowHeightsChanged

RowMoved

ScrollData

SelectCell

SetEditText

ShowEditor

ShowEditorChar

SizeChanged

Sizing

TimedScroll

TopLeftChanged

UpdateDesigner

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

IsRightToLeft

InitiateAction

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

ReplaceDockedControl

Refresh

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

ExecuteAction

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomGrid methods

TCustomGrid	By object	Legend

AdjustSize

AfterConstruction

Assign

BeforeDestruction

BeginColumnDrag

BeginDrag

BeginRowDrag

BoxRect

BringToFront

Broadcast

CalcDrawInfo

CalcFixedInfo

CalcSizingState

CanEditAcceptKey

CanEditModify

CanEditShow

CanFocus

CanGridAcceptKey

CellRect

ChangeGridOrientation

CheckColumnDrag

CheckRowDrag

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ColumnMoved

ColWidthsChanged

ContainsControl

ControlAtPos

Create

CreateEditor

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

DefineProperties

DeleteColumn

DeleteRow

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoExit

DoMouseWheelDown

DoMouseWheelUp

DragDrop

Dragging

DrawCell

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndColumnDrag

EndDrag

EndRowDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusCell

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetEditLimit

GetEditMask

GetEditStyle

GetEditText

GetGridHeight

GetGridWidth

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

HideEdit

HideEditor

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

InvalidateCell

InvalidateCol

InvalidateEditor

InvalidateGrid

InvalidateRow

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseDown

MouseMove

MouseUp

MouseWheelHandler

MoveColRow

MoveColumn

MoveRow

NewInstance

Paint

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowHeightsChanged

RowMoved

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollData

SelectCell

SendToBack

SetBounds

SetEditText

SetFocus

SetSubComponent

SetTextBuf

Show

ShowEditor

ShowEditorChar

SizeChanged

Sizing

TimedScroll

TopLeftChanged

Update

UpdateAction

UpdateControlState

UpdateDesigner

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomGrid.AdjustSize
 VCL Reference

TCustomGrid.AdjustSize

TCustomGrid	See also

Adds or deletes rows or columns from the grid.

procedure AdjustSize(Index, Amount: Longint; Rows: Boolean); reintroduce; dynamic;

Description

Grid components call AdjustSize internally to fix up the number of rows or columns when the user resizes them using the mouse. Index is the index of the row or column where the insertion or deletion should begin. Amount is the number of rows or columns to insert (Amount > 0) or delete (Amount < 0). Rows is a boolean that indicates whether the rows or the columns are changing.


TCustomGrid.BeginColumnDrag
 VCL Reference

TCustomGrid.BeginColumnDrag

TCustomGrid	See also

Starts the dragging of a column in the grid.

function BeginColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

BeginColumnDrag is called automatically when the user clicks on a column to start dragging. It enables the grid to control whether the column can be repositioned and if so, which column.

Origin is the index of the column to be moved. When BeginColumnDrag is called, this is the index of the column in which the mouse was clicked. TCustomGrid does not change this value. However, descendant classes can override this method to adjust which column can be moved.

Destination is the index of where the column should move. When BeginColumnDrag is called, this is the same as Origin. TCustomGrid does not change this value because the mouse has not yet moved. Descendant classes can override this method to adjust the default destination of the column.

MousePt is the coordinates of the mouse button when the user clicked.

BeginColumnDrag returns True if the drag operation is permitted, False if the drag should be disallowed.


TCustomGrid.BeginRowDrag
 VCL Reference

TCustomGrid.BeginRowDrag

TCustomGrid	See also

Starts the dragging of a row in the grid.

function BeginRowDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Call BeginRowDrag to start a drag operation. BeginRowDrag enables the grid to control where the row can be dropped. It is exposed as a protected method so that descendants of TCustomGrid can customize row dragging in a grid.


TCustomGrid.BoxRect
 VCL Reference

TCustomGrid.BoxRect

TCustomGrid	See also

Returns the screen coordinates of a specified set of cells.

function BoxRect(ALeft, ATop, ARight, ABottom: Longint): TRect;

Description

Call BoxRect to obtain the screen coordinates, in pixels, of the cells that run from the column with index ALeft to the column with index ARight and the row with index ATop to the row with index ABottom. The coordinates of cells that are not visible onscreen are not included in the final rectangle.


TCustomGrid.CalcDrawInfo
 VCL Reference

TCustomGrid.CalcDrawInfo

TCustomGrid	See also

Calculates the pixel locations of the grid boundaries.

procedure CalcDrawInfo(var DrawInfo: TGridDrawInfo);

Description

Use CalcDrawInfo to determine the pixel locations of the major grid boundaries in the X and Y directions, including things like the first visible column/row, the last visible column/row, the pixel extent of the fixed column/row, etc.


TCustomGrid.CalcFixedInfo
 VCL Reference

TCustomGrid.CalcFixedInfo

TCustomGrid	See also

Calculates the pixel locations of the fixed cells.

procedure CalcFixedInfo(var DrawInfo: TGridDrawInfo);

Description

Use CalcDrawInfo to determine the pixel locations of the fixed cells in the X and Y directions.


TCustomGrid.CalcSizingState
 VCL Reference

TCustomGrid.CalcSizingState

TCustomGrid	See also

Determines the appearance of the mouse cursor during resizing.

procedure CalcSizingState(X, Y: Integer; var State: TGridState; var Index: Longint; var SizingPos, SizingOfs: Integer; var FixedInfo: TGridDrawInfo); virtual;

Description

Use CalcSizingState to determine if the mouse cursor should be changed to a resize or drag cursor based on where the mouse is in the grid. For example, cursor over a grid line, in the fixed cell region, and column resize is enabled = resize cursor.


TCustomGrid.CanEditAcceptKey
 VCL Reference

TCustomGrid.CanEditAcceptKey

TCustomGrid	See also

Indicates whether the Key parameter can be entered into the current cell.

function CanEditAcceptKey(Key: Char): Boolean; dynamic;

Description

CanEditAcceptKey provides a simple screening of keyboard input while the user is editing the contents of a cell. The CanEditAcceptKey method for TCustomGrid always returns True. Descendants of TCustomGrid override this method to screen out illegal characters.

More refined validation can be obtained by using an edit mask.


TCustomGrid.CanEditModify
 VCL Reference

TCustomGrid.CanEditModify

TCustomGrid	See also

Indicates whether the current cell in the grid can be edited.

function CanEditModify: Boolean; dynamic;

Description

Grid components use CanEditModify internally to determine whether to allow the user to edit the current cell. CanEditModify returns True unless the inplace editor has disallowed editing for the cell.


TCustomGrid.CanEditShow
 VCL Reference

TCustomGrid.CanEditShow

TCustomGrid	See also

Indicates whether the inplace edit control can be created to allow editing.

function  CanEditShow: Boolean; dynamic;

Description

Grid controls call CanEditShow internally before creating the editor for a cell. CanEditShow is called after the grid has determined that the field can be edited by calling CanEditModify.

CanEditShow returns False if the Options property does not indicate that the grid allows editing, or if it indicates that the grid permits row selection. Otherwise, if the Options property indicates that the grid is locked in edit mode, or if the grid has input focus, CanEditShow returns True. If the grid is not locked in edit mode and the grid does not have input focus, CanEditShow returns False.


TCustomGrid.CanGridAcceptKey
 VCL Reference

TCustomGrid.CanGridAcceptKey

TCustomGrid	See also

Indicates whether the grid should respond to a given key combination.

function CanGridAcceptKey(Key: Word; Shift: TShiftState): Boolean; dynamic;

Description

Grid controls call CanGridAcceptKey internally to screen key combinations when the user first presses a key. The CanGridAcceptKey method for TCustomGrid always returns True. Descendants of TCustomGrid override this method to screen out irrelevant key combinations, or key combinations that indicate actions that would violate the Options or mode of the grid.


TCustomGrid.CellRect
 VCL Reference

TCustomGrid.CellRect

TCustomGrid	See also

Returns the screen coordinates of a cell in the grid.

function CellRect(ACol, ARow: Longint): TRect;

Description

Call CellRect to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ACol and ARow parameters. The top left cell is specified when ACol and ARow are set to zero.

If the indicated cell is not visible, CellRect returns an empty rectangle.


TCustomGrid.ChangeGridOrientation
 VCL Reference

TCustomGrid.ChangeGridOrientation

TCustomGrid	See also

Prepares the grid’s canvas for painting to reflect a right-to-left or left-to-right orientation.

procedure ChangeGridOrientation(RightToLeftOrientation: Boolean);

Description

TCustomGrid uses ChangeGridOrientation internally when painting. ChangeGridOrientation sets the origin and dimensions of the grid’s canvas so that painting occurs from right-to-left or from left-to-right based on the value of the RightToLeftOrientation parameter.

RightToLeftOrientation is True if the grid should prepare for painting from right to left. RightToLeftOrientation is False if the grid should restore the canvas to normal.


TCustomGrid.CheckColumnDrag
 VCL Reference

TCustomGrid.CheckColumnDrag

TCustomGrid	See also

CheckColumnDrag validates whether the column currently selected for dragging can be dropped at the current location.

function CheckColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Use CheckColumnDrag to validate that the column currently selected for dragging can be dropped at the current location.  CheckColumnDrag can change the Origin (the column being dragged) and/or the Destination (the drop target), as needed, to keep the grid's columns in order.


TCustomGrid.CheckRowDrag
 VCL Reference

TCustomGrid.CheckRowDrag

TCustomGrid	See also

CheckRowDrag validates whether the row currently selected for dragging can be dropped at the current location.

function CheckRowDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Use CheckRowDrag to validate that the row currently selected for dragging can be dropped at the current location.  CheckRowDrag can change the Origin (the row being dragged) and/or the Destination (the drop target), as needed, to keep the grid's rows in order.


TCustomGrid.ColumnMoved
 VCL Reference

TCustomGrid.ColumnMoved

TCustomGrid	See also

Provides the interface for a method that responds when the position of a column changes.

procedure ColumnMoved(FromIndex, ToIndex: Longint); dynamic;

Description

ColumnMoved is called immediately after a column in the grid has moved. The FromIndex parameter is the old index of the column, and the ToIndex parameter is the new index. The ColumnMoved method of TCustomGrid does nothing. Descendants of TCustomGrid override this method to make internal adjustments or to generate an OnColumnMoved event.


TCustomGrid.ColWidthsChanged
 VCL Reference

TCustomGrid.ColWidthsChanged

TCustomGrid	See also

Responds when the column widths change.

procedure ColWidthsChanged; dynamic;

Description

ColWidthsChanged is called immediately after the column widths change. The change can result from setting the ColWidths property, from setting the DefaultColWidth property, from moving one of the columns, or from resizing the columns with the mouse.

ColWidthsChanged adjusts the scroll bar and the position of the inplace editor to take into account the new column size and positions of the columns.


TCustomGrid.Create
 VCL Reference

TCustomGrid.Create

TCustomGrid	See also

Creates an instance of TCustomGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a grid control at runtime. Grid controls placed on a form at design time are created automatically.

Owner is a component that is responsible for freeing the grid and for initiating the streaming process when it is saved to a form file.


TCustomGrid.CreateEditor
 VCL Reference

TCustomGrid.CreateEditor

TCustomGrid	See also

Creates the inplace editor control.

function CreateEditor: TInplaceEdit; virtual;

Description

Grid controls call CreateEditor internally the first time the grid goes into edit mode. CreateEditor is exposed as a protected method so that descendants of TCustomGrid can substitute a specialized descendant of TInplaceEdit to handle cell editing.


TCustomGrid.CreateParams
 VCL Reference

TCustomGrid.CreateParams

TCustomGrid	See also

Initializes the window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method is called internally to specify the properties of the window that implements this control. These properties are set in the window-creation parameter record passed as Params. The fields of this record become the parameters to a call to the CreateWindowEx API function.

After calling the inherited method, CreateParams adjusts the value of Params to request that the grid receive double click messages, and to implement the values of the ScrollBars and BorderStyle properties.


TCustomGrid.DefineProperties
 VCL Reference

TCustomGrid.DefineProperties

TCustomGrid	See also

Adds the ColWidths and RowHeights properties to the values saved with the grid.

procedure DefineProperties(Filer: TFiler); override;

Description

DefineProperties overrides the inherited method to save the ColWidths and RowHeights properties with the grid when they contain values other than the default widths and heights.


TCustomGrid.DeleteColumn
 VCL Reference

TCustomGrid.DeleteColumn

TCustomGrid	See also

Deletes a specified column from the grid.

procedure DeleteColumn(ACol: Longint);

Description

Call DeleteColumn to remove a column from the middle of the grid. Provide the index of the column to remove as ACol. To remove the last column from the grid, set the ColCount property instead.


TCustomGrid.DeleteRow
 VCL Reference

TCustomGrid.DeleteRow

TCustomGrid	See also

Deletes a specified from the grid.

procedure DeleteRow(ARow: Longint); virtual;

Description

Call DeleteRow to remove a row from the middle of the grid. Provide the index of the row to remove as ARow. To remove the last row from the grid, set the RowCount property instead.


TCustomGrid.Destroy
 VCL Reference

TCustomGrid.Destroy

TCustomGrid	See also

Destroys an instance of TCustomGrid.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the grid reference is not nil, and only then calls Destroy.


TCustomGrid.DoExit
 VCL Reference

TCustomGrid.DoExit

TCustomGrid	See also

Hides the inplace editor when selection moves to another control in a form.

procedure DoExit; override;

Description

After calling the inherited method, which generates an OnExit event, DoExit hides the inplace editor unless the Options property includes goAlwaysShowEditor.


TCustomGrid.DoMouseWheelDown
 VCL Reference

TCustomGrid.DoMouseWheelDown

TCustomGrid	See also

Performs tasks when the mouse wheel is rotated downward.

function DoMouseWheelDown(Shift: TShiftState; const MousePos: TPoint): Boolean; override;

Description

Override DoMouseWheelDown to perform tasks when the mouse wheel is rotated downward.

DoMouseWheelDown returns False if the control’s parent should handle the message.

In TCustomGrid, DoMouseWheelDown increments the current row and returns True.


TCustomGrid.DoMouseWheelUp
 VCL Reference

TCustomGrid.DoMouseWheelUp

TCustomGrid	See also

Performs tasks when the mouse wheel is rotated upward.

function DoMouseWheelUp(Shift: TShiftState; const MousePos: TPoint): Boolean; override;

Description

Override DoMouseWheelUp to perform tasks when the mouse wheel is rotated downward.

DoMouseWheelUp should return False if the control’s parent should handle the message.

In TCustomGrid, DoMouseWheelUp decrements the current row and returns True.


TCustomGrid.DrawCell
 VCL Reference

TCustomGrid.DrawCell

TCustomGrid	See also

Provides the abstract prototype for a method that draws the contents of a cell in the grid.

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); virtual; abstract;

Description

Descendants of TCustomGrid implement the DrawCell method to draw the contents of the cell or to generate an OnDrawCell event. If the DefaultDrawing property is True, the background of the cell is painted before DrawCell is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after DrawCell.

The ACol and ARow parameters give the column and row indexes of the cell that should be drawn. The ARect parameter gives the boundaries of the cell in the coordinates of the canvas. The AState parameter indicates whether the cell is selected, whether the cell has input focus, and whether the cell is in the fixed, non-scrolling portion of the grid.


TCustomGrid.EndColumnDrag
 VCL Reference

TCustomGrid.EndColumnDrag

TCustomGrid	See also

Ends the dragging of a column in the grid.

function EndColumnDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Call EndColumnDrag to end a drag operation. EndColumnDrag enables the grid to control where the column can be dropped. It is exposed as a protected method so that descendants of TCustomGrid can customize column dragging in a grid.


TCustomGrid.EndRowDrag
 VCL Reference

TCustomGrid.EndRowDrag

TCustomGrid	See also

Ends the dragging of a row in the grid.

function EndRowDrag(var Origin, Destination: Integer; const MousePt: TPoint): Boolean; dynamic;

Description

Call EndRowDrag to end a drag operation. EndRowDrag enables the grid to control where the row can be dropped. It is exposed as a protected method so that descendants of TCustomGrid can customize row dragging in a grid.


TCustomGrid.FocusCell
 VCL Reference

TCustomGrid.FocusCell

TCustomGrid	See also

Changes the current cell to a specified cell.

procedure FocusCell(ACol, ARow: Longint; MoveAnchor: Boolean);

Description

TCustomGrid calls FocusCell internally to change the currently selected cell. FocusCell changes the current cell and updates the selection appropriately.

ACol is the column of the cell to select.

ARow is the row of the cell to select.

MoveAnchor determines how the selection changes. If the grid does not allow multiple cells to be selected (Options does not include goRangeSelect), MoveAnchor is ignored and the specified cell becomes the selected cell. If the grid allows multiple cells to be selected, MoveAnchor determines whether the new cell becomes the starting cell (anchor) of a new selection, or whether the current selection is updated to range from the current anchor to the specified cell.


TCustomGrid.GetEditLimit
 VCL Reference

TCustomGrid.GetEditLimit

TCustomGrid	See also

Provides the interface for a method that limits the number of characters the user can type into cells.

function GetEditLimit: Integer; dynamic;

Description

The inplace editor calls GetEditLimit to determine if a limit should be placed on the number of characters a user can type into a cell. GetEditLimit sets no limits. Descendants of TCustomGrid override this method to limit the text for certain cells.


TCustomGrid.GetEditMask
 VCL Reference

TCustomGrid.GetEditMask

TCustomGrid	See also

Provides the interface for a method that returns an input mask for the specified cell.

function  GetEditMask(ACol, ARow: Longint): String; dynamic;

Description

The inplace editor calls GetEditMask to obtain any input mask associated with the cell specified by the ACol and ARow parameters. GetEditMask returns an empty string, indicating that the cell has no input mask. Descendants of TCustomGrid override this method to provide an input mask or generate an OnGetEditMask event.


TCustomGrid.GetEditStyle
 VCL Reference

TCustomGrid.GetEditStyle

TCustomGrid

Indicates whether a specified cell has an ellipsis button or drop-down arrow.

function GetEditStyle(ACol, ARow: Longint): TEditStyle; dynamic;

Description

GetEditStyle indicates whether the specified cell can only be edited directly (esSimple), whether it has an ellipsis button that users can click to launch an editor for modifying field values (esEllipsis ), or whether it has a drop-down arrow that users can click to display a pick list of possible values (esPickList).

ACol is the column that contains the cell. ARow is the row that contains the cell.

In TCustomGrid, GetEditStyle always returns esSimple, indicating that there is no ellipsis button or drop-down arrow. Descendant classes can override this methods if they provide a way to add pick lists or ellipsis buttons to cells.


TCustomGrid.GetEditText
 VCL Reference

TCustomGrid.GetEditText

TCustomGrid	See also

Returns the value of the indicated cell formatted for editing.

function  GetEditText(ACol, ARow: Longint): String; dynamic;

Description

The inplace editor calls GetEditText to obtain the text for the indicated cell. GetEditText returns an empty string. Descendants of TCustomGrid override the GetEditText method to return a string that represents the contents of the cell indicated by the ACol and ARow parameters.


TCustomGrid.GetGridHeight
 VCL Reference

TCustomGrid.GetGridHeight

TCustomGrid	See also

Returns the value of the GridHeight property.

function GetGridHeight: Integer;

Description

GetGridHeight is the protected property access method for the GridHeight property. It computes the value of the GridHeight property based on the row heights, separator width, and the size of the control.


TCustomGrid.GetGridWidth
 VCL Reference

TCustomGrid.GetGridWidth

TCustomGrid	See also

Returns the value of the GridWidth property.

function GetGridWidth: Integer;

Description

GetGridWidth is the protected property access method for the GridWidth property. It computes the value of the GridWidth property based on the column widths, separator width, and the size of the control.


TCustomGrid.HideEdit
 VCL Reference

TCustomGrid.HideEdit

TCustomGrid	See also

Hides the inplace editor.

procedure HideEditor;

Description

The HideEditor method calls the protected HideEdit method to hide the editor. This method hides the editor window after updating the text to reflect the text in the editor.


TCustomGrid.HideEditor
 VCL Reference

TCustomGrid.HideEditor

TCustomGrid	See also

Hides the inplace editor when it is not in use.

procedure HideEditor;

Description

Grid controls call HideEditor when the grid goes out of edit mode. HideEditor hides the window of the inplace editor.


TCustomGrid.InvalidateCell
 VCL Reference

TCustomGrid.InvalidateCell

TCustomGrid	See also

Invalidates the region occupied by a cell so that it will be repainted with the next Windows paint message.

procedure InvalidateCell(ACol, ARow: Longint);

Description

Call InvalidateCell when the contents of a cell change so that the cell will need to be repainted. The ACol parameter is the column index of the cell, and the ARow parameter is the row index.


TCustomGrid.InvalidateCol
 VCL Reference

TCustomGrid.InvalidateCol

TCustomGrid	See also

Invalidates the region occupied by a column so that it will be repainted with the next Windows paint message.

procedure InvalidateCol(ACol: Longint);

Description

Call InvalidateCol when a column changes so that the area it occupies will need to be repainted. The ACol parameter is the column index.


TCustomGrid.InvalidateEditor
 VCL Reference

TCustomGrid.InvalidateEditor

TCustomGrid	See also

Causes the inplace editor to repaint itself, moving to a new location if necessary.

procedure InvalidateEditor;

Description

InvalidateEditor is called when the selected cell changes while the grid is in edit mode.


TCustomGrid.InvalidateGrid
 VCL Reference

TCustomGrid.InvalidateGrid

TCustomGrid	See also

Tells Windows to repaint the grid after other important Windows messages are handled.

procedure InvalidateGrid;

Description

InvalidateGrid is used internally to ensure that the grid is repainted when its properties change. It calls the Invalidate method to indicate that the grid needs repainting.


TCustomGrid.InvalidateRow
 VCL Reference

TCustomGrid.InvalidateRow

TCustomGrid	See also

Invalidates the region occupied by a row so that it will be repainted with the next Windows paint message.

procedure InvalidateRow(ARow: Longint);

Description

Call InvalidateRow when a row changes so that the area it occupies will need to be repainted. The ARow parameter is the row index.


TCustomGrid.KeyDown
 VCL Reference

TCustomGrid.KeyDown

TCustomGrid	See also

Provides special processing when the user presses a key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

After generating an OnKeyDown event, KeyDown calls CanGridAcceptKey to screen out problematic key combinations. KeyDown moves to the appropriate cell in response to navigational key combinations, or sets the EditorMode property to True when the user presses F2.


TCustomGrid.KeyPress
 VCL Reference

TCustomGrid.KeyPress

TCustomGrid	See also

Provides special processing when the user presses a key.

procedure KeyPress(var Key: Char); override;

Description

KeyPress is called automatically after the KeyDown method, but before the user releases the key.

After generating an OnKeyPress event, KeyPress toggles the EditorMode property when the user presses the Enter key.


TCustomGrid.MouseCoord
 VCL Reference

TCustomGrid.MouseCoord

TCustomGrid	See also

Returns the row and column indexes of the cell that contains a point specified in screen coordinates.

type TGridCoord = record

    X: Longint;

    Y: Longint;

  end;

function MouseCoord(X, Y: Integer): TGridCoord;

Description

Call MouseCoord to locate the column and row of the cell which contains a given screen coordinate. Usually, MouseCoord is used to locate the cell that is under the mouse.


TCustomGrid.MouseDown
 VCL Reference

TCustomGrid.MouseDown

TCustomGrid	See also

Provides special processing when the user presses a mouse button.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseDown hides the editor window so that it can move selection to the cell that receives the mouse click. If the mouse lands in the hot region for beginning a move or resize of a row or column, MouseDown starts the move or resize, and provides visual feedback by changing the cursor. If the editor window was hidden, it is brought back up in its new location. Finally, MouseDown generates an OnMouseDown event.


TCustomGrid.MouseMove
 VCL Reference

TCustomGrid.MouseMove

TCustomGrid	See also

Provides special processing when the user moves the mouse.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

If the grid is in the middle of moving or resizing a row or column, or in the middle of selecting a range of cells using the mouse, MouseMove calculates the changes implied by the mouse move and provides visual feedback to the user. Finally, MouseMove generates an OnMouseMove event.


TCustomGrid.MouseUp
 VCL Reference

TCustomGrid.MouseUp

TCustomGrid	See also

Provides special processing when the user releases the mouse button.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

MouseUp finishes a move or resize operation on a row or column, or if the user is selecting a range of cells using the mouse, MouseUp finishes the select operation. Finally, MouseUp generates an OnMouseUp event.


TCustomGrid.MoveColRow
 VCL Reference

TCustomGrid.MoveColRow

TCustomGrid	See also

Selects the cell indicated by the ACol and ARow parameters.

procedure MoveColRow(ACol, ARow: Longint; MoveAnchor, Show: Boolean);

Description

Grid controls call MoveColRow internally when changing the selected cell or cells. MoveColRow selects the indicated cell, but does not take care of removing any previous selection.

The ACol and ARow parameters are the column index and the row index of the cell to be selected. The MoveAnchor parameter indicates whether the new cell becomes the upper left corner of the selected region. MoveAnchor is True unless MoveColRow is called when extending a multicell selected region. The Show parameter indicates whether MoveColRow should ensure that the newly selected cell is visible.


TCustomGrid.MoveColumn
 VCL Reference

TCustomGrid.MoveColumn

TCustomGrid	See also

Moves a column to a new position.

procedure MoveColumn(FromIndex, ToIndex: Longint);

Description

Call MoveColumn to move the column identified by the FromIndex parameter to the position specified by the ToIndex parameter.


TCustomGrid.MoveRow
 VCL Reference

TCustomGrid.MoveRow

TCustomGrid	See also

Moves a row to a new position.

procedure MoveRow(FromIndex, ToIndex: Longint);

Description

Call MoveRow to move the row identified by the FromIndex parameter to the position specified by the ToIndex parameter.


TCustomGrid.Paint
 VCL Reference

TCustomGrid.Paint

TCustomGrid	See also

Draws the image of the grid control on the screen.

procedure Paint; override;

Description

Paint is called when the grid receives a paint message. Paint draws the grid, calling the DrawCell method when it is time to paint the contents of each cell. If DefaultDrawing is False, Paint does not draw the background of the cells, provide the raised 3D effects on the fixed cells, or draw the focus rectangle around the selected cell when it has focus.


TCustomGrid.RowHeightsChanged
 VCL Reference

TCustomGrid.RowHeightsChanged

TCustomGrid	See also

Responds when the row heights change.

procedure RowHeightsChanged; dynamic;

Description

RowHeightsChanged is called immediately after the row heights change. The change can result from setting the RowHeights property, from setting the DefaultRowHeight property, from moving one of the rows, or from resizing the rows with the mouse.

RowHeightsChanged adjusts the scroll bar and the position of the inplace editor to take into account the new row size and positions of the rows.


TCustomGrid.RowMoved
 VCL Reference

TCustomGrid.RowMoved

TCustomGrid	See also

Provides the interface for a method that responds when the position of a row changes.

procedure RowMoved(FromIndex, ToIndex: Longint); dynamic;

Description

RowMoved is called immediately after a row in the grid changes position. The FromIndex parameter is the old index of the row, and the ToIndex parameter is the new index. The RowMoved method of TCustomGrid does nothing. Descendants of TCustomGrid override this method to make internal adjustments or to generate an OnRowMoved event.


TCustomGrid.ScrollData
 VCL Reference

TCustomGrid.ScrollData

TCustomGrid	See also

Scrolls the visual image of the cells in the grid.

procedure ScrollData(DX, DY: Integer);

Description

Grid controls call ScrollData internally when the nonfixed rows or columns scroll. ScrollData updates the image of the grid.


TCustomGrid.SelectCell
 VCL Reference

TCustomGrid.SelectCell

TCustomGrid	See also

Determines whether a particular cell in the grid can be selected.

function SelectCell(ACol, ARow: Longint): Boolean; virtual;

Description

Grid controls call SelectCell internally before attempting to move selection to a the cell identified by the ACol and ARow parameters. ACol and ARow are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0.

The SelectCell method for TCustomGrid always returns True, allowing the cell to be selected. Descendants of TCustomGrid override this method to check the properties of the information displayed in the cell or generating an OnSelectCell event.


TCustomGrid.SetEditText
 VCL Reference

TCustomGrid.SetEditText

TCustomGrid	See also

Provides the interface for a method that updates the text associated with a cell.

procedure SetEditText(ACol, ARow: Longint; const Value: string); dynamic;

Description

SetEditText is called by the inplace editor so that the grid can store the new value for the current cell. The SetEditText method for TCustomGrid does nothing. Descendants of TCustomGrid override this method to update an internal representation of the cell’s value, or to generate an OnSetEditText event.


TCustomGrid.ShowEditor
 VCL Reference

TCustomGrid.ShowEditor

TCustomGrid	See also

Displays the inplace editor when the grid enters edit mode.

procedure ShowEditor;

Description

Grid controls call ShowEditor when the grid enters edit mode. ShowEditor displays the window of the inplace editor over the currently selected cell. If the inplace editor does not yet exist, ShowEditor creates it.


TCustomGrid.ShowEditorChar
 VCL Reference

TCustomGrid.ShowEditorChar

TCustomGrid	See also

Displays the inplace editor, with its text set to the specified character.

procedure ShowEditorChar(Ch: Char);

Description

Grid controls call ShowEditorChar when the user types a character into a cell and the editor is not already showing. ShowEditorChar displays the window of the inplace editor over the currently selected cell, and sets its text property to the character Ch. If the inplace editor does not yet exist, ShowEditorChar creates it.


TCustomGrid.SizeChanged
 VCL Reference

TCustomGrid.SizeChanged

TCustomGrid	See also

Responds to changes in the size of the grid.

procedure SizeChanged(OldColCount, OldRowCount: Longint); dynamic;

Description

SizeChanged provides the interface for a method that responds to changes in the number of rows or columns in the grid. The SizeChanged method of TCustomGrid does nothing. Descendants of TCustomGrid override this method to make internal adjustments or generate events.


TCustomGrid.Sizing
 VCL Reference

TCustomGrid.Sizing

TCustomGrid	See also

Indicates whether the indicated coordinates are on one of the resize hot zones of the graph.

function Sizing(X, Y: Integer): Boolean;

Description

Grid controls call Sizing internally with the coordinates of a mouse click to determine whether the user is about to resize a row or column.


TCustomGrid.TimedScroll
 VCL Reference

TCustomGrid.TimedScroll

TCustomGrid	See also

Extends a move, resize, or selection out of the scrollable region when the user drags the mouse in a direction where the grid is scrolled.

type TGridScrollDirection = set of (sdLeft, sdRight, sdUp, sdDown);

procedure TimedScroll(Direction: TGridScrollDirection); dynamic;

Description

TimedScroll is called periodically as the user continues to drag with the mouse outside of the scrollable cells in the grid. TimedScroll does nothing unless the user is moving a row or column, resizing a row or column, or selecting a multiple cell region using the mouse. TimedScroll scrolls the cells in the grid to allow the operation to continue into the portion of the grid that was hidden due to scrolling.


TCustomGrid.TopLeftChanged
 VCL Reference

TCustomGrid.TopLeftChanged

TCustomGrid	See also

Updates the position of the inplace editor when the grid scrolls.

procedure TopLeftChanged; dynamic;

Description

Grid controls call TopLeftChanged internally, whenever the LeftCol or TopRow property changes.

Descendants of TCustomGrid override this method to make additional adjustments or to generate an OnTopLeftChanged event.


TCustomGrid.UpdateDesigner
 VCL Reference

TCustomGrid.UpdateDesigner

TCustomGrid	See also

Notifies the designer when rows and columns of the grid are moved or resized.

procedure UpdateDesigner;

Description

At design time, the designer automatically keeps track of property changes so that it can prompt the user to save any changes. Moving or resizing the rows and columns of the grid using the mouse bypasses this system. When such changes occur, UpdateDesigner notifies the designer that the properties of the grid have changed and that the changes should be saved.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid


TCustomHeaderControl
 VCL Reference

TCustomHeaderControl

Hierarchy	Properties	Methods	Events	See also

TCustomHeaderControl represents a spreadsheet-style header.

Unit

ComCtrls

Description

TCustomHeaderControl is an abstract base class for control classes that provide column and row headers for spreadsheet-style controls. Use TCustomHeaderControl to create new kinds of header controls.

Do not create instances of TCustomHeaderControl. THeaderControl provides a minimal implementation of TCustomHeaderControl. Use THeaderControl or create your own descendant classes that represent spreadsheet-style headers.


 VCL Reference

TCustomHeaderControl Properties

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

Canvas

DragReorder

FullDrag

HotTrack

Images

Sections

Style

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomHeaderControl Properties

TCustomHeaderControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderWidth

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DragReorder

Enabled

Floating

FloatingDockSiteClass

Font

FullDrag

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotTrack

Images

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

Sections

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomHeaderControl.Canvas
 VCL Reference

TCustomHeaderControl.Canvas

TCustomHeaderControl	See also 	Example

Provides runtime access to the header control’s drawing surface.

property Canvas: TCanvas;

Description

The read-only Canvas property provides access to the header control’s drawing surface that can be used when implementing a handler for the OnDrawSection event.


TCustomHeaderControl.Clickable
 VCL Reference

TCustomHeaderControl.Clickable

TCustomHeaderControl	See also

Make header clickable.

property Clickable: Boolean;

Description

If Clickable is true (default), the OnSectionClick event is generated when the user clicks the header.


TCustomHeaderControl.DragReorder
 VCL Reference

TCustomHeaderControl.DragReorder

TCustomHeaderControl	See also

Make header reorderable.

property DragReorder: Boolean;

Description

If DragReorder is True (default is False), the user can rearrange headers by dragging them. Setting DragReorder to True also sets Clickable to True.


TCustomHeaderControl.FullDrag
 VCL Reference

TCustomHeaderControl.FullDrag

TCustomHeaderControl	See also

Specifies whether headers are repainted when they are dragged.

property FullDrag: Boolean;

Description

Use FullDrag to specify whether headers are repainted while they are dragged.


TCustomHeaderControl.HotTrack
 VCL Reference

TCustomHeaderControl.HotTrack

TCustomHeaderControl	See also

Highlights the header sections as the mouse passes over them.

property HotTrack: Boolean;

Description

If HotTrack is set to True, the text on each header section appears highlighted when the mouse passes over it at runtime.


TCustomHeaderControl.Images
 VCL Reference

TCustomHeaderControl.Images

TCustomHeaderControl

Specifies header images

property Images: TCustomImageList;

Description

Images contains a list of images that can be used as icons. Each section's ImageIndex property determines the specific image displayed on it. If Images is unassigned, items are displayed as captions with no icons.


TCustomHeaderControl.Sections
 VCL Reference

TCustomHeaderControl.Sections

TCustomHeaderControl

Specifies header sections.

property Sections: TCustomHeaderSections;

Description

The Sections property refers to the TCustomHeaderSections object that contains the header sections.. This protected property is only useful for creating new control classes derived from TCustomHeaderControl.


TCustomHeaderControl.Style
 VCL Reference

TCustomHeaderControl.Style

TCustomHeaderControl

Specifies the header control’s style.

property Style: THeaderStyle;

Description

Use Style to determine the appearance of the header sections.


 VCL Reference

TCustomHeaderControl Events

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

OnCreateSectionClass

OnDrawSection

OnSectionClick

OnSectionDrag

OnSectionEndDrag

OnSectionResize

OnSectionTrack


 VCL Reference

TCustomHeaderControl Events

TCustomHeaderControl	By Object	Legend

OnCreateSectionClass

OnDrawSection

OnSectionClick

OnSectionDrag

OnSectionEndDrag

OnSectionResize

OnSectionTrack


TCustomHeaderControl.OnCreateSectionClass
 VCL Reference

TCustomHeaderControl.OnCreateSectionClass

TCustomHeaderControl

Runtime specification of section object class.

type

  THeaderSectionClass = classofTHeaderSection;

  TCustomHCCreateSectionClassEvent = procedure(Sender: TCustomHeaderControl;

    var SectionClass: THeaderSectionClass) ofobject;

property OnCreateSectionClass: TCustomHCCreateSectionClassEvent;

Description

The OnCreateSectionClass event occurs when a new header section object is about to be created. If the event handler exists, it is called with SectionClass set to THeaderSection. The event handler can modify this value to any descendent of THeaderSection, which will then be used to create the header section object.


TCustomHeaderControl.OnDrawSection
 VCL Reference

TCustomHeaderControl.OnDrawSection

TCustomHeaderControl

Draw header section.

type

  TCustomDrawSectionEvent = procedure(HeaderControl: TCustomHeaderControl;

    Section: THeaderSection; const Rect: TRect; Pressed: Boolean) ofobject;

property OnDrawSection: TCustomDrawSectionEvent;

Description

Use the OnDrawSection to define custom section drawing code. The event handler takes the following parameters.

Section is the header section that is being redrawn.

Rect is the the display rectangle for the header section.

Pressed is True if the section is being displayed as a button, and that button is currently in its depressed state.


TCustomHeaderControl.OnSectionClick
 VCL Reference

TCustomHeaderControl.OnSectionClick

TCustomHeaderControl

Respond to mouse clicks on header section.

property OnSectionClick: TSectionNotifyEvent;

Description

The OnSectionClick event occurs when the user clicks on a header section.


TCustomHeaderControl.OnSectionDrag
 VCL Reference

TCustomHeaderControl.OnSectionDrag

TCustomHeaderControl 	See also

Respond to section drag.

type TSectionDragEvent = procedure (Sender: TObject; FromSection, ToSection: THeaderSection;

    var AllowDrag: Boolean) ofobject;

property OnSectionDrag: TSectionDragEvent;

Description

The OnSectionDrag event occurs when the user attempts to rearrange header sections by dragging a section to a new position. This event can only occur when the DragReorder property is True. The event handler is passed the folowing parameters.

FromSection is the section being dragged.

ToSection is the section currently occupying the position FromSection was dragged to. If the operation is successful, FromSection will move to this position, and other sections, including ToSection shifted right or left to make room. Note that FromSection and ToSection can be the same section if FromSection was not dragged far enough to trigger a re-arrangement.

AllowDrag is passed a value of True. Change AllowDrag to False to cancel the operation.


TCustomHeaderControl.OnSectionEndDrag
 VCL Reference

TCustomHeaderControl.OnSectionEndDrag

TCustomHeaderControl 	See also

Respond to moved sections

property OnSectionEndDrag: TNotifyEvent;

Description

The OnSectionEndDrag event occurs after the user moves a header section to a new postion.


TCustomHeaderControl.OnSectionResize
 VCL Reference

TCustomHeaderControl.OnSectionResize

TCustomHeaderControl	See Also

Respond to section resizing.

property OnSectionResize: TSectionNotifyEvent;

Description

The OnSectionResize event occurs when the the user resizes a header section. If the Tracking property is true (default), a series of OnSectionResize events occur while the user is manipulating the section. Otherwise, OnSectionResize occurs only when the the user releases the mouse button.


TCustomHeaderControl.OnSectionTrack
 VCL Reference

TCustomHeaderControl.OnSectionTrack

TCustomHeaderControl	See also

Occurs as one of the header control’s sections is being resized.

type

  TSectionTrackState = (tsTrackBegin, tsTrackMove, tsTrackEnd);

  TSectionTrackEvent = procedure(HeaderControl: THeaderControl; Section: THeaderSection; Width: Integer; State: TSectionTrackState) of object;

property OnSectionTrack: TSectionTrackEvent;

Description

The OnSectionTrack event tracks the dragging of a header section’s border as it happens. OnSectionTrack occurs when the mouse pointer is positioned between two header sections and the left mouse button is depressed.

OnSectionTrack is of type TSectionTrackEvent, whose Width and State parameters indicate the size of the header section (in pixels) and the status of the event. The State property can take three values:

Value	Meaning

tsTrackBegin	The border has not yet been dragged.

tsTrackMove	The border is being dragged.

tsTrackEnd	The border is no longer being dragged.


 VCL Reference

TCustomHeaderControl Methods

TCustomHeaderControl	Alphabetically	Legend

In TCustomHeaderControl

Create

Destroy

FlipChildren

Notification

Derived from TWinControl

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomHeaderControl Methods

TCustomHeaderControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomHeaderControl.Create
 VCL Reference

TCustomHeaderControl.Create

TCustomHeaderControl	See Also

Instantiate a TCustomHeaderControl object.

constructor Create(AOwner: TComponent); override;

Description

TCustomHeaderControl is an abstract class and should not be instantiated in application code. Concrete subclasses, such as THeaderControl, call the TCustomHeaderControl constructor in their own constructors.

After calling the inherited constructor, the TCustomHeaderControl constructor instantiates the TControlCanvas object used by the control, and initializes property defaults.


TCustomHeaderControl.Destroy
 VCL Reference

TCustomHeaderControl.Destroy

TCustomHeaderControl

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the object variable is not nil, and only then calls Destroy.

The destructor frees the TControlCanvas object created in the constructor, then calls the superclass constructor.'


TCustomHeaderControl.FlipChildren
 VCL Reference

TCustomHeaderControl.FlipChildren

TCustomHeaderControl	Methods

Reverses the order in which sections are displayed.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren flips the order of the header control’s sections; then calls the inherited FlipChildren method to reverse the order of any other child controls.


TCustomHeaderControl.Notification
 VCL Reference

TCustomHeaderControl.::Notification

TCustomHeaderControl	See also

Responds to notifications that components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

TCustomHeaderControl overrides Notification in order to call ImageListChanged when the image list is removed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomHeaderControl


TCustomHotKey
 VCL Reference

TCustomHotKey

Hierarchy	Properties	Methods	Events	See also

TCustomHotKey is the base class for objects that wrap the Windows hot key Common Control.

Unit

ComCtrls

Description

TCustomHotKey is an abstract class that encapsulates behavior of an object that is used to set a shortcut property at runtime. Hot key objects are used to perform an action quickly by enabling users to link the hot key to a combination of keystrokes that will execute the action. TCustomHotKey introduces properties to:

Associate the hot key with keystrokes to perform an action

Select a key combination at design time

Invalidate specific modifier keys

To change the key combination at runtime hold down the Alt, Ctrl or Shift keys or combinations of them and type a letter or number. The hot key property can then be assigned to the shortcut property of a menu item, for example.

Hot key classes that descend from TCustomHotKey inherit the basic functionality of TCustomHotKey. Use TCustomHotKey as a base class for deriving specialized hot key objects.


 VCL Reference

TCustomHotKey properties

TCustomHotKey	Alphabetically	Legend

In TCustomHotKey

AutoSize

HotKey

InvalidKeys

Modifiers

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomHotKey properties

TCustomHotKey	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoSize

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotKey

InvalidKeys

Left

LRDockWidth

Modifiers

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomHotKey.AutoSize
 VCL Reference

TCustomHotKey.AutoSize

TCustomHotKey

Determines whether the hot key automatically changes its height to accommodate the font size.

property AutoSize: Boolean;

Description

Use AutoSize to fully display the font on the hot key control. When AutoSize is True, the height of the hot key changes to display the key combinations typed in it. When AutoSize is False, the hot key remains the same height, regardless of any font changes. The default value is True.


TCustomHotKey.HotKey
 VCL Reference

TCustomHotKey.HotKey

TCustomHotKey	See also 	Example

Contains the current key combination of the hot key control.

property HotKey: TShortCut;

Description

Use HotKey to set or change the key combination associated with the hot key. Alt+A is the default. To modify the value of HotKey either edit it directly or set the value of the Modifiers property. At runtime HotKey is reset when the hot key has focus and the user presses valid key combinations.


TCustomHotKey.InvalidKeys
 VCL Reference

TCustomHotKey.InvalidKeys

TCustomHotKey	See also 	Example

Allows you to specify that one or more modifier keys should be considered invalid.

type

  THKInvalidKey = (hcNone, hcShift, hcCtrl, hcAlt, hcShiftCtrl, hcShiftAlt, hcCtrlAlt, hcShiftCtrlAlt);

THKInvalidKeys = set of THKInvalidKey;

property InvalidKeys: THKInvalidKeys;

Description

Use InvalidKeys to select which modifier keys are not allowed. If this property is set, a default modifier should also be specified in the Modifiers property. When the invalid key is selected, the default modifier is displayed in its place.

THKInvalidKey is the type of the InvalidKeys property. These are the possible values:

Value	Meaning

hcNone	Unmodified keys are invalid.

hcShift	The Shift key is invalid as a modifier.

hcCtrl	The Ctrl key is invalid as a modifier.

hcAlt	The Alt key is invalid as a modifier.

hcShiftCtrl	The Shift+Ctrl key combination is invalid as a modifier.

hcShiftAlt	The Shift+Alt key combinations invalid as a modifier.

hcCtrlAlt	The Ctrl+Alt key combination is invalid as a modifier.

hcShiftCtrlAlt	The Shift+Ctrl+Alt key combination is invalid as a modifier.

The default values are hcNone and hcShift.


TCustomHotKey.Modifiers
 VCL Reference

TCustomHotKey.Modifiers

TCustomHotKey 	Example

Specifies the key or keys that are used in combination with a  non-modifier key.

type

  THKModifier = (hkShift, hkCtrl, hkAlt, hkExt);

  THKModifiers = set of THKModifier;

property Modifiers: THKModifiers;

Description

Use Modifiers to select a modifier key such as Ctrl, Alt, or Shift for the hot key. These are the possible values:

Value	Meaning

hkShift	The Shift key is used as a modifier.

hkCtrl	The Ctrl key is used as a modifier.

hkAlt	The Alt key is used as a modifier.

hkExt	The Extra key is used as a modifier.

The default value is hkAlt.

Modifier keys are used with other non-modifier keys such as character and function keys, arrow keys, and so on. More than one modifier key can be used.


 VCL Reference

TCustomHotKey events

TCustomHotKey	Alphabetically	Legend

In TCustomHotKey

OnChange


 VCL Reference

TCustomHotKey events

TCustomHotKey	By object	Legend

OnChange


TCustomHotKey.OnChange
 VCL Reference

TCustomHotKey.OnChange

TCustomHotKey

Occurs when the properties of the hot key change.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to respond when the hot key changes to represent a different combination of keys. OnChange occurs after the TCustomHotKey properties have been updated to reflect the change.


 VCL Reference

TCustomHotKey methods

TCustomHotKey	Alphabetically	Legend

In TCustomHotKey

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomHotKey methods

TCustomHotKey	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomHotKey.Create
 VCL Reference

TCustomHotKey.Create

TCustomHotKey	See also

Instantiates a hot key control.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a hot key control at runtime. For hot key controls added at design time, Create is called automatically.

AOwner is the component, typically the form, that is responsible for freeing the hotkey instance. It becomes the value of the Owner property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomHotKey


TCustomIniFile
 VCL Reference

TCustomIniFile

Hierarchy	Properties	Methods	See also

TCustomIniFile is the abstract base class for components that encapsulate access to INI files or provide similar access to the system registry.

Unit

IniFiles

Description

Use TCustomIniFile as a base class when defining components that access INI files. INI files are text files that are divided into sections with variable assignments in each section. TCustomIniFile introduces properties and methods to handle storage and retrieval of application-specific information and settings in a standard INI file.

TCustomIniFile acts as a common base class to components that work with INI files and to components that access the system registry. Because of this, it allows applications that use both INI files and the system registry to handle both media in a unified manner.

Do not create instances of TCustomIniFile. Instead, use or create descendants of TCustomIniFile, such as TIniFile, TRegistryIniFile, and TMemIniFile.

Note:	Delphi provides other objects for handling the system registry, such as TRegistry. Unlike the TCustomIniFile descendant TRegistryIniFile, TRegistry has a different set of properties that correspond more directly to the terminology of the system registry.


 VCL Reference

TCustomIniFile properties

TCustomIniFile	Alphabetically	Legend

In TCustomIniFile

FileName


 VCL Reference

TCustomIniFile properties

TCustomIniFile	By object	Legend

FileName


TCustomIniFile.FileName
 VCL Reference

TCustomIniFile.FileName

TCustomIniFile	See also

Contains the name of the INI file from which to read and to which to write information.

property FileName: String;

Description

Read FileName to retrieve the name of the INI file that this object can be used to access. The methods that read and write INI file information automatically handle opening and closing the file specified by FileName.

FileName is read-only. The name of the INI file the object uses is supplied as the parameter for the constructor.

Note:	Usually INI files are stored in the \WINDOWS directory. To work with an INI file in another location, specify the full path name of the file in the FileName parameter passed to the Create method of TCustomIniFile.


 VCL Reference

TCustomIniFile methods

TCustomIniFile	Alphabetically	Legend

In TCustomIniFile

Create

DeleteKey

EraseSection

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

SectionExists

UpdateFile

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomIniFile methods

TCustomIniFile	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DeleteKey

Destroy

Dispatch

EraseSection

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

SafeCallException

SectionExists

UpdateFile

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime


TCustomIniFile.Create
 VCL Reference

TCustomIniFile.Create

TCustomIniFile	See also	Example

Creates a TCustomIniFile object for an application.

constructor Create(const FileName: String);

Description

Create constructs a TCustomIniFile object for an application. Create assigns the FileName parameter to the FileName property, which is used to specify the name of the INI file to use.

Note:	Usually INI files are stored in the \WINDOWS directory. To work with an INI file in another location, specify the full path name of the file in FileName.


TCustomIniFile.DeleteKey
 VCL Reference

TCustomIniFile.DeleteKey

TCustomIniFile	See also 	Example

Erases the data value associated with an INI file entry.

procedure DeleteKey(const Section, Ident: String); virtual; abstract;

Description

Call DeleteKey to erase a data value associated with an INI file entry. Section is string containing the name of an INI file section, and Ident is a string containing the name of the key for which to set a nil value.

Note:	Attempting to erase a data value in a nonexistent section or attempting to erase data from a nonexistent key are not errors. In these cases, DeleteKey creates the section and key and sets its initial value to an empty value.


TCustomIniFile.EraseSection
 VCL Reference

TCustomIniFile.EraseSection

TCustomIniFile	See also

Erases an entire section of an INI file.

procedure EraseSection(const Section: String); virtual; abstract;

Description

Call EraseSection to remove a section, all its keys, and their data values from an INI file. Section identifies the INI file section to remove. If a section cannot be removed, an exception is raised.


TCustomIniFile.ReadBinaryStream
 VCL Reference

TCustomIniFile.ReadBinaryStream

TCustomIniFile	See also

Retrieves a binary value from the INI file.

function ReadBinaryStream(const Section, Name: string; Value: TStream): Integer; virtual;

Description

Call ReadBinaryStream to read a binary value into a specified stream. After reading the binary value, which it converts from a series of hexadecimal characters, from the INI file into the current position of the stream, ReadBinaryStream returns the number of bytes written to the stream. If the stream is a memory stream (TMemoryStream or one of its descendants), the stream is left positioned to the same byte as it was before the call to ReadBinaryStream (immediately before the new binary value).

Section is the section that contains the desired key.

Name is the key under which the binary data is stored.

Value is a stream to which the binary value is written.


TCustomIniFile.ReadBool
 VCL Reference

TCustomIniFile.ReadBool

TCustomIniFile	See also 	Example

Retrieves a Boolean value from an INI file.

function ReadBool (const Section, Ident: String; Default: Boolean): Boolean ; virtual;

Description

Call ReadBool to read a Boolean value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the Boolean value. Default is the Boolean value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadDate
 VCL Reference

TCustomIniFile.ReadDate

TCustomIniFile	See also

Retrieves a date value from an INI file.

function ReadDate (const Section, Ident: String; Default: TDateTime): TDateTime; virtual;

Description

Call ReadDate to read a date value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the date value. Default is the date value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadDateTime
 VCL Reference

TCustomIniFile.ReadDateTime

TCustomIniFile	See also

Retrieves a date-time value from an INI file.

function ReadDateTime (const Section, Ident: String; Default: TDateTime): TDateTime; virtual;

Description

Call ReadDateTime to read a date-time value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the date-time value. Default is the date-time value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadFloat
 VCL Reference

TCustomIniFile.ReadFloat

TCustomIniFile	See also

Retrieves a float value from an INI file.

function ReadFloat (const Section, Ident: String; Default: Double): Double; virtual;

Description

Call ReadFloat to read a float value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the float value. Default is the float value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadInteger
 VCL Reference

TCustomIniFile.ReadInteger

TCustomIniFile	See also 	Example

Retrieves an integer value from an INI file.

function ReadInteger(const Section, Ident: String; Default: Longint): Longint; virtual;

Description

Call ReadInteger to read an integer value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the integer value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadSection
 VCL Reference

TCustomIniFile.ReadSection

TCustomIniFile	See also

Reads all the key names from a specified section of an INI file into a string list.

procedure ReadSection (const Section: String; Strings: TStrings); virtual; abstract;

Description

Call ReadSection to retrieve the names of all keys within a specified section of an INI file into a string list object.

Section identifies the section from which to retrieve a list of key names. Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings descendant such as a string list, or to a component property, such as Items for a TListBox component.


TCustomIniFile.ReadSections
 VCL Reference

TCustomIniFile.ReadSections

TCustomIniFile	See also

Reads the names of all sections in an INI file into a string list.

procedure ReadSections(Strings: TStrings); virtual; abstract;

Description

Call ReadSections to retrieve the names of all sections in an INI file into a string list.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings descendant, or to a component property, such as Items for a TListBox component.


TCustomIniFile.ReadSectionValues
 VCL Reference

TCustomIniFile.ReadSectionValues

TCustomIniFile	See also	Example

Reads the values from all keys in a section of an INI file into a string list.

procedure ReadSectionValues(const Section: String; Strings: TStrings); virtual; abstract;

Description

Call ReadSectionValues to read the values from all keys in a specified section of an INI file into a string list object. Section identifies the section in the file from which to read key values. Strings is the string list object into which to read the values.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings object, or to a component property, such as Items for a TListBox component.


TCustomIniFile.ReadString
 VCL Reference

TCustomIniFile.ReadString

TCustomIniFile	See also 	Example

Retrieves a string value from an INI file.

function ReadString(const Section, Ident, Default: String): String; virtual; abstract;

Description

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.ReadTime
 VCL Reference

TCustomIniFile.ReadTime

TCustomIniFile	See also

Retrieves a time value from an INI file.

function ReadTime (const Section, Ident: String; Default: TDateTime): TDateTime; virtual;

Description

Call ReadTime to read a time value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the time value. Default is the time value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TCustomIniFile.SectionExists
 VCL Reference

TCustomIniFile.SectionExists

TCustomIniFile	See also

Indicates whether a section exists in the INI file.

function SectionExists (const Section: String): Boolean;

Description

Use SectionExists to determine whether a section exists within the INI file specified in FileName.

Section is the INI file section SectionExists determines the existence of.

SectionExists returns a Boolean value that indicates whether the section in question exists.


TCustomIniFile.UpdateFile
 VCL Reference

TCustomIniFile.UpdateFile

TCustomIniFile	See also

Flushes buffered INI file data to disk.

function UpdateFile; virtual; abstract;

Description

Call UpdateFile to flush buffered reads from and writes to the INI file to disk.


TCustomIniFile.ValueExists
 VCL Reference

TCustomIniFile.ValueExists

TCustomIniFile	See also

Indicates whether a key exists in the INI file.

function ValueExists (const Section, Ident: String): Boolean;

Description

Use ValueExists to determine whether a key exists in the INI file specified in FileName.

Section is the section in the INI file in which to search for the key.

Ident is the name of the key to search for.

ValueExists returns a Boolean value that indicates whether the key exists in the specified section.


TCustomIniFile.WriteBinaryStream
 VCL Reference

TCustomIniFile.WriteBinaryStream

TCustomIniFile	See also

Writes a binary value to the INI file.

procedure WriteBinaryStream(const Section, Name: string; Value: TStream): virtual;

Description

Call WriteBinaryStream to write a binary value from a specified stream to a specified section and key in the INI file. WriteBinaryStream writes from the current position in the stream to the end, converting the value into its hexadecimal representation.

Section is the section that contains the target key.

Name is the key under which the binary data is to be written.

Value is a stream to from which the binary value can be read.

Note:	Attempting to write a value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteBinaryStream creates the section and key and sets its initial value to the hexadecimal representation of the stream’s data.


TCustomIniFile.WriteBool
 VCL Reference

TCustomIniFile.WriteBool

TCustomIniFile	See also 	Example

Writes a Boolean value to an INI file.

procedure WriteBool(const Section, Ident: String; Value: Boolean); virtual;

Description

Call WriteBool to write a Boolean value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the Boolean value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteBool creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteDate
 VCL Reference

TCustomIniFile.WriteDate

TCustomIniFile	See also

Writes a date value to an INI file.

procedure WriteDate(const Section, Ident: String; Value: TDateTime); virtual;

Description

Call WriteDate to write a date value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the date value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteDate creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteDateTime
 VCL Reference

TCustomIniFile.WriteDateTime

TCustomIniFile	See also

Writes a date-time value to an INI file.

procedure WriteDateTime(const Section, Ident: String; Value: TDateTime); virtual;

Description

Call WriteDateTime to write a date-time value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the date-time value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteDateTime creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteFloat
 VCL Reference

TCustomIniFile.WriteFloat

TCustomIniFile	See also

Writes a float value to an INI file.

procedure WriteFloat(const Section, Ident: String; Value: Double); virtual;

Description

Call WriteFloat to write a float value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the float value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteFloat creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteInteger
 VCL Reference

TCustomIniFile.WriteInteger

TCustomIniFile	See also 	Example

Writes an integer value to an INI file.

procedure WriteInteger(const Section, Ident: String; Value: Longint); virtual;

Description

Call WriteInteger to write an integer value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the integer value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteInteger creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteString
 VCL Reference

TCustomIniFile.WriteString

TCustomIniFile	See also 	Example

Writes a string value to an INI file.

procedure WriteString(const Section, Ident, Value: String); virtual; abstract;

Description

Call WriteString to write a string value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the string value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteString creates the section and key and sets its initial value to Value.


TCustomIniFile.WriteTime
 VCL Reference

TCustomIniFile.WriteTime

TCustomIniFile	See also

Writes a time value to an INI file.

procedure WriteTime(const Section, Ident: String; Value: TDateTime); virtual;

Description

Call WriteTime to write a time value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the time value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteTime creates the section and key and sets its initial value to Value.


Hierarchy

TObject

TCustomIniFile


TCustomLabeledEdit
 VCL Reference

TCustomLabeledEdit

Hierarchy	Properties	Methods	See also

TCustomLabeledEdit is the base class for edit controls that have an integrated label.

Unit

ExtCtrls

Description

TCustomLabeledEdit is the base class for edit controls that have an associated label. This class introduces new properties for managing a label that sits on one side of the edit control.

Do not create instances of TCustomLabeledEdit. Use TCustomLabeledEdit as a base class when declaring edit controls that include a label. Properties and methods of TCustomLabeledEdit provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomLabeledEdit Properties

TCustomLabeledEdit	Alphabetically	Legend

In TCustomLabeledEdit

EditLabel

LabelPosition

LabelSpacing

Derived from TCustomEdit

CanUndo

Modified

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomLabeledEdit Properties

TCustomLabeledEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CanUndo

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditLabel

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

LabelPosition

LabelSpacing

Left

LRDockWidth

Modified

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

ShowHint

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomLabeledEdit.EditLabel
 VCL Reference

TCustomLabeledEdit.EditLabel

TCustomLabeledEdit	See also

Specifies the control that implements the label.

property EditLabel: TBoundLabel;

Description

Use EditLabel to work with the label that is associated with this labeled edit control. Use this label’s properties to specify the caption that appears on the label, the position of the caption within the label, the font used to write that caption, and so on. At design time, expand the EditLabel property in the Object Inspector to set its properties.


TCustomLabeledEdit.LabelPosition
 VCL Reference

TCustomLabeledEdit.LabelPosition

TCustomLabeledEdit	See also

Specifies the position of the label relative to the edit control.

type TLabelPosition = (lpAbove, lpBelow, lpLeft, lpRight);

property LabelPosition: TLabelPosition;

Description

Set LabelPosition to indicate where the label sits relative to the edit control. The following table lists the possible values:

Value	Meaning

lpAbove	The label appears above the edit control.

lpBelow	The label appears below the edit control.

lpLeft	The label appears to the left of the edit control.

lpRight	The label appears to the right of the edit control.


TCustomLabeledEdit.LabelSpacing
 VCL Reference

TCustomLabeledEdit.LabelSpacing

TCustomLabeledEdit	See also

Specifies the distance, in pixels, between the label and the edit region.

property LabelSpacing: Integer;

Description

Set LabelSpacing to indicate the distance, in pixels, between the label and the edit control.


 VCL Reference

TCustomLabeledEdit Methods

TCustomLabeledEdit	Alphabetically	Legend

In TCustomLabeledEdit

CMBidimodechanged

CMEnabledchanged

CMVisiblechanged

Create

Notification

SetBounds

SetName

SetParent

SetupInternalLabel

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomLabeledEdit Methods

TCustomLabeledEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

CMBidimodechanged

CMEnabledchanged

CMVisiblechanged

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetName

SetParent

SetSelTextBuf

SetSubComponent

SetTextBuf

SetupInternalLabel

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomLabeledEdit.CMBidiModeChanged
 VCL Reference

TCustomLabeledEdit.CMBidiModeChanged

TCustomLabeledEdit	See also

Responds when the BiDiMode property changes.

procedure CMBidimodechanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the BiDiMode property.

Message is a CM_BIDIMODECHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the BiDiMode property of the associated label to the value of its own BiDiMode property.


TCustomLabeledEdit.CMEnabledchanged
 VCL Reference

TCustomLabeledEdit.CMEnabledchanged

TCustomLabeledEdit	See also

Responds when the Enabled property changes.

procedure CMEnabledchanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the Enabled property.

Message is a CM_ENABLEDCHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the Enabled property of the associated label to the value of its own Enabled property.


TCustomLabeledEdit.CMVisiblechanged
 VCL Reference

TCustomLabeledEdit.CMVisiblechanged

TCustomLabeledEdit	See also

Responds when the Visible property changes.

procedure CMVisiblechanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the Visible property.

Message is a CM_VISIBLECHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the Visible property of the associated label to the value of its own Visible property.


TCustomLabeledEdit.Create
 VCL Reference

TCustomLabeledEdit.Create

TCustomLabeledEdit	See also

Creates an instance of TCustomLabeledEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a labeled edit control. AOwner specifies a component, typically the form, that is responsible for freeing the labeled edit control.


TCustomLabeledEdit.Notification
 VCL Reference

TCustomLabeledEdit.Notification

TCustomLabeledEdit	See also

Responds to notifications when objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

This protected method is called automatically immediately after objects are created and immediately before they are destroyed. TCustomLabeledEdit overrides this method to update the EditLabel property when it receives a notification that the label component is about to be destroyed.

AComponent is the component that was just created or that is about to be destroyed.

Operation indicates whether the notification indicates the creation or destruction of AComponent.


TCustomLabeledEdit.SetBounds
 VCL Reference

TCustomLabeledEdit.SetBounds

TCustomLabeledEdit	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft: Integer; ATop: Integer; AWidth: Integer; AHeight: Integer); override;

Description

Use SetBounds to change all of the labeled edit control’s boundary properties at one time. The same effect can be achieved by setting the Left, Top, Width, and Height properties separately, but SetBounds changes all four properties at once, ensuring that the control will not repaint between changes. After changing the boundaries of the edit control, SetBounds adjusts the position of the label if necessary.

Specify the values for the Left, Top, Width, and Height properties as the value of the ALeft, ATop, AWidth, and AHeight parameters, respectively.

Note:	Calling SetBounds does not necessarily result in the Left, Top, Width, and Height properties changing to the specified values. Before the properties are changed, the AutoSize or Constraints property may limit the changes.


TCustomLabeledEdit.SetName
 VCL Reference

TCustomLabeledEdit.SetName

TCustomLabeledEdit	See also

Sets the Name property.

procedure SetName(const Value: TComponentName); override;

Description

SetName is the protected property setter for the Name property. TCustomLabeledEdit overrides SetName to keep the Name property in sync with the label’s Caption property, as long as the Caption property has not been explicitly set to another value.

Value is the new name to set.


TCustomLabeledEdit.SetParent
 VCL Reference

TCustomLabeledEdit.SetParent

TCustomLabeledEdit	See also

Sets the value of the Parent property.

procedure SetParent(AParent: TWinControl); override;

Description

SetParent is the protected property setter for the Parent property. TCustomLabeledEdit overrides SetParent to ensure that the label has the same parent as the edit control.


TCustomLabeledEdit.SetupInternalLabel
 VCL Reference

TCustomLabeledEdit.SetupInternalLabel

TCustomLabeledEdit	See also

Initializes the control that implements the EditLabel property.

procedure SetupInternalLabel;

Description

Applications do not need to call SetupInternalLabel because this method is called when you set the EditLabel property.

SetupInternalLabel ensures that there is a control to implement the EditLabel property, adds the labeled edit control to the list of components that should be notified when the label is freed, and sets the label’s FocusControl property to the labeled edit control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomLabeledEdit


TCustomListBox
 VCL Reference

TCustomListBox

Hierarchy	Properties	Methods	Events	See also

TCustomListBox is the base class for listbox objects that are wrappers for list box controls.

Unit

StdCtrls

Description

TCustomListBox encapsulates behavior common to all list box controls. List box objects are used to display a scrollable list from which users can select one or more items. Use a list box control to limit the user to selecting from a list of items. Items can be added at design time or at runtime.

As a wrapper for a list box TCustomListBox introduces methods for:

Displaying, sorting, selecting, manipulating and querying items in the list.

Creating owner-draw style list boxes that can display graphical images such as icons and bitmaps.

Creating multiple-column and multiple-selection lists.

By default TCustomListBox is a standard list box that displays items as text strings. These items are contained in a TStrings object, and the methods of the TStrings object are used to add, insert or delete a string. The following code demonstrates adding a new string to the list box:

MyListBox.Items.Add('New item');

Descendants of TCustomListBox inherit the basic functionality of TCustomListBox. Some descendants also have specialized behavior and can be linked to file, directory, drive or database information. Use these list boxes to easily access and list this type of information.

A combo box is a list box with an edit control and an optional drop down style for the list. Use a combo box to allow users to type their selection into an edit box or to save space on a form by having the list drop down.

For lists of items that require a matrix or expandable tree-like structure, use list views or tree views. These controls allow the grouping of items under column headings or in expandable and contractible rows.


 VCL Reference

TCustomListBox properties

TCustomListBox	Alphabetically	Legend

In TCustomListBox

AutoComplete

BorderStyle

Canvas

Columns

Count

ExtendedSelect

IntegralHeight

ItemHeight

ItemIndex

Items

MultiSelect

ScrollWidth

SelCount

Selected

Sorted

Style

TabWidth

TopIndex

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomListBox Properties

TCustomListBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

ExtendedSelect

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IntegralHeight

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentColor

ParentWindow

ScrollWidth

SelCount

Selected

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

TabWidth

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomListBox.AutoComplete
 VCL Reference

TCustomListBox.AutoComplete

TCustomListBox	See also

Determines whether the user can give focus to items by typing in the list.

property AutoComplete: Boolean;

Description

Use AutoComplete to specify whether the list box automatically updates the ItemIndex property in response to user keystrokes. When AutoComplete is True, the item with focus changes to the first item that begins with the sequence of characters that the user typed. As the user types more characters, ItemIndex may change to a later item because the string to match becomes longer.


TCustomListBox.BorderStyle
 VCL Reference

TCustomListBox.BorderStyle

TCustomListBox	See also

Determines whether the list box has a border.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to change the appearance of the outer boundary of the list box control. A list box can have a single border (bsSingle) or no visible border (bsNone).


TCustomListBox.Canvas
 VCL Reference

TCustomListBox.Canvas

TCustomListBox	See also 	Example

Provides a drawing surface when implementing a handler for the OnDrawItem event of an owner-draw list box.

property Canvas: TCanvas;

Description

Canvas is only useful for applications that control the drawing of list box items, that is, for owner-draw list boxes. Canvas is used to draw graphical images that can be used as items in a list box.

By default a TControlCanvas object is created for the Canvas property in the list box constructor. To create an owner-draw list box that uses a canvas, set the Style property accordingly.


TCustomListBox.Columns
 VCL Reference

TCustomListBox.Columns

TCustomListBox	See also

Specifies the number of columns, in a multi-column list box, that are visible without having to scroll.

property Columns: Integer;

Description

Use Columns to specify the number of columns, in a multi-column list box, that are visible without having to use the horizontal scrollbar.

Multi-column list boxes have a horizontal scrollbar that allows users to view multiple columns as they wrap. The default value for Columns is 0, meaning that the list box is not multi-column. That is, users can scroll only vertically and the list of items will not wrap.

For Columns values greater than 0, multiple columns accommodate the items as they wrap beyond the bottom of the list box. The Columns property specifies the number of columns that are visible without having to horizontally scroll the list box.

The width of each column depends upon both the Width property and the number of Columns.


TCustomListBox.Count
 VCL Reference

TCustomListBox.Count

TCustomListBox	See also

Indicates the number of items in the list box.

property Count: Integer;

Description

Use Count to determine the number of items in the list box. You can only set Count when the Style property is lbVirtual or lbVirtualOwnerDraw, in which case you must set this property.


TCustomListBox.ExtendedSelect
 VCL Reference

TCustomListBox.ExtendedSelect

TCustomListBox	See also

Determines if the user can select a sequential range of items in the list box.

property ExtendedSelect: Boolean;

Description

ExtendedSelect works with the MultiSelect property. If ExtendedSelect is True and MultiSelect is True, the user can select an item then hold down the Shift key and select another and all the items in between the two selected items also become selected.

If the user doesn’t hold down the Shift or Ctrl key while selecting a second item, the first selected item becomes unselected—in other words, the user must use the Ctrl key to select multiple noncontiguous items, or the Shift key to select a range of items.

If ExtendedSelect is False and MultiSelect is True, the user can select multiple items without using the Shift or Ctrl key, but they can’t select a range of items in one operation.

If MultiSelect is False, the setting of ExtendedSelect has no effect as the user will not be able to select more than one item at a time in the list box.


TCustomListBox.IntegralHeight
 VCL Reference

TCustomListBox.IntegralHeight

TCustomListBox	See also

Determines whether the list box displays the partial items.

property IntegralHeight: Boolean;

Description

IntegralHeight controls the height of the list box itself.

When IntegralHeight isTrue, and the Style property is lsOwnerDrawFixed, the list box height will always be a multiple of the ItemHeight property value. In this case, items will never be partially displayed.

If IntegralHeight isFalse, the list box height can be set to any value, but the last item may not be fully displayed.

If the Style property value of the list box is lbOwnerDrawVariable, setting the IntegralHeight property toTrue has no effect.


TCustomListBox.ItemHeight
 VCL Reference

TCustomListBox.ItemHeight

TCustomListBox	See also

Specifies the height in pixels of an item in an owner-draw list box.

property ItemHeight: Integer;

Description

Use ItemHeight to control the height of an item in a list box when the Style property is lbOwnerDrawFixed. The ItemHeight property can also affect the height of the list box itself. When the IntegralHeight property is True, the height of the list box is always an increment of the ItemHeight value.

If the Style property is lbStandard or lbOwnerDrawVariable, the value of ItemHeight is ignored.


TCustomListBox.ItemIndex
 VCL Reference

TCustomListBox.ItemIndex

TCustomListBox	See also 	Example

Specifies the ordinal number of the selected item in the list box’s item list.

property ItemIndex: Integer;

Description

Use ItemIndex to select an item at runtime. Set the value of ItemIndex to the index of the item to be selected. The ItemIndex of the first item in the list box is 0. If no item is selected, the value is -1, which is the default value unless MultiSelect is True.

If the value of the MultiSelect property is True the user can select more than one item in the list box. In this case, the ItemIndex value is the index of the selected item that has focus. If MultiSelect is True, ItemIndex defaults to 0.


TCustomListBox.Items
 VCL Reference

TCustomListBox.Items

TCustomListBox	See also 	Example

Contains the strings that appear in the list box.

property Items: TStrings;

Description

Use Items to add, insert, delete and move items. By default, the items in a list box are of type TStrings. Use this item type to access its methods or properties to manipulate the items in the list.

For example, the following code adds the text in the edit box to the list box as an item:

ListBox1.Items.Add(Edit1.Text);


TCustomListBox.MultiSelect
 VCL Reference

TCustomListBox.MultiSelect

TCustomListBox	See also

Determines whether the user can select more than one element at a time.

property MultiSelect: Boolean;

Description

Set MultiSelect to True to allow the user to select multiple items. If MultiSelect if False, multiple items cannot be selected in the list box at the same time.

MultiSelect allows users to select multiple non-sequential items. It does not allow users to select a range of items in one operation, as does the ExtendedSelect property.

When MultiSelect is True and multiple items are selected, the value of the ItemIndex property, which indicates the index of the Selected item, is the index of the selected item that has focus.


TCustomListBox.ScrollWidth
 VCL Reference

TCustomListBox.ScrollWidth

TCustomListBox	See also

Specifies the width, in pixels, by which the list box can scroll horizontally.

property ScrollWidth: Integer;

Description

Use ScrollWidth to get or set the logical width of the list box. When ScrollWidth is greater than the client width of the list box, the list box gets a horizontal scrollbar. When ScrollWidth is less than or equal to ClientWidth, the horizontal scrollbar disappears.


TCustomListBox.SelCount
 VCL Reference

TCustomListBox.SelCount

TCustomListBox	See also

Indicates the number of items that are selected when multiple selections are allowed.

property SelCount: Integer;

Description

SelCount is read-only. Use SelCount to find the number of selected items in the list box when the MultiSelect property is True.

When the MultiSelect property is False, SelCount is always –1.


TCustomListBox.Selected
 VCL Reference

TCustomListBox.Selected

TCustomListBox	See also 	Example

Indicates whether a particular item is selected.

property Selected[Index: Integer]: Boolean;

Description

Use Selected to query the state of a particular item in the list box. If the item specified by the Index parameter is selected in the list box, the value of the Selected property is True. If the specified item is not selected, Selected is False. Set Selected to change the currently selected item.

The Index parameter is the item referenced by its position in the list box, with the first item having an Index value of 0.

An item is selected when the user highlights it. More than one item in the list box can be selected by setting the MultiSelect property to True. In this case, the Selected item is the one that has focus when the list box has input focus.


TCustomListBox.Sorted
 VCL Reference

TCustomListBox.Sorted

TCustomListBox	See also 	Example

Specifies whether the items in a list box are arranged alphabetically.

property Sorted: Boolean;

Description

Use Sorted to sort the items by setting its value to True. If Sorted is False, the items are unsorted. When Sorted is True, items are automatically added or inserted into the list box in alphabetical order.

Note:	Sorted has no effect if Listbox's style is lbVirtual or lbVirtualOwnerDraw


TCustomListBox.Style
 VCL Reference

TCustomListBox.Style

TCustomListBox	See also

Determines whether the list box is standard or owner-draw and whether it is virtual.

type TListBoxStyle = (lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable, lbVirtual, lbVirtualOwnerDraw);

property Style: TListBoxStyle;

Description

Use Style to specify whether the list box is a standard list box that displays text strings, or an owner-draw list box that can display graphical images. Owner-draw list boxes let you display items in some nonstandard way. In this case, you must write the code to paint items in the list box.

In addition, Style controls whether the list box is virtual, which means that items are supplied dynamically using event handlers. By default, Style is lbStandard, meaning that the list box is not virtual and it displays each item as a string.

The following table lists the values for the TListBoxStyle type of the Style property:

Value	Meaning

lbStandard	All items are strings, with each item the same height.

lbOwnerDrawFixed	The list box is owner-drawn, but each item in the list box is the height specified by the ItemHeight property. Each time an item is displayed in an lbOwnerDrawFixed list box, the OnDrawItem event occurs. The event handler for OnDrawItem draws the specified item. The ItemHeight property determines the height of each of the items.

lbOwnerDrawVariable	The list box is owner-drawn, and items in the list box can be of varying heights. Each time an item is displayed in an lbOwnerDrawVariable list box, two events occur. The first is the OnMeasureItem event. The code for the OnMeasureItem handler can set the height of each item. Then the OnDrawItem event occurs. The code for the OnDrawItem handler draws each item in the list box using the size specified by the OnMeasureItem handler.

lbVirtual	The list box is virtual, but all items are strings with the same height. You must indicate the number of items in the list box by setting the Count property. You must supply the items in the list box using an OnData event handler. If the items have associated objects, you must supply them using an OnDataObject event handler. In addition, you must supply an OnDataFind event handler to provide the mapping from the strings in the list box to their indexes.

lbVirtualOwnerDraw	The list box is virtual and owner-drawn. All items are the same height. As with lbOwnerDrawFixed, the item height is specified by the ItemHeight property, and you must draw items using an OnDrawItem event handler. As with lbVirtual, you must set the Count property and supply OnData and OnDataFind event handlers to provide the mapping between items and indexes. If items are associated with objects, you must also supply an OnDataObject event handler.


TCustomListBox.TabWidth
 VCL Reference

TCustomListBox.TabWidth

TCustomListBox

Specifies the size of the tabs in the list box.

property TabWidth: Integer;

Description

Set TabWidth to control the number of dialog base units displayed for each tab character that appears in the strings of a list box.

If TabWidth is set to 0, which is the default setting, the tabs default to the width specified by Windows, which is two dialog base units.

If TabWidth is set to 0, which is the default setting, the tabs default to two dialog base units.


TCustomListBox.TopIndex
 VCL Reference

TCustomListBox.TopIndex

TCustomListBox	See also 	Example

Specifies the index number of the item that appears at the top of the list box.

property TopIndex: Integer;

Description

Use TopIndex property to find or set the first item displayed at the top of the list box. TopIndex can be used, for example, to change the topmost item to a different item in the list.


 VCL Reference

TCustomListBox events

TCustomListBox	Alphabetically	Legend

In TCustomListBox

OnData

OnDataFind

OnDataObject

OnDrawItem

OnMeasureItem


 VCL Reference

TCustomListBox events

TCustomListBox	By object	Legend

In TCustomListBox

OnData

OnDataFind

OnDataObject

OnDrawItem

OnMeasureItem


TCustomListBox.OnData
 VCL Reference

TCustomListBox.::OnData

TCustomListBox	See also

Occurs when a virtual list box needs to supply the text of an item.

type TLBGetDataEvent = procedure(Control: TWinControl; Index: Integer; var Data: String) of object;

property OnData: TLBGetDataEvent;

Description

You must supply an OnData event handler to dynamically supply the items in the list box when the Style property is lbVirtual or lbVirtualOwnerDraw.

Control is the virtual list box whose item is needed.

Index is the index of the desired item. Index must be less than the value of the Count property.

Data returns the string that is the value of the specified item.


TCustomListBox.OnDataFind
 VCL Reference

TCustomListBox.OnDataFind

TCustomListBox	See also

Occurs when a virtual list box needs to identify the index of an item given its text.

type TLBFindDataEvent = function(Control: TWinControl; FindString: String): Integer of object;

property OnDataFind: TLBGetDataEvent;

Description

You must supply an OnDataFind event handler to dynamically provide the mapping from list item to index when the Style property is lbVirtual or lbVirtualOwnerDraw.

Control is the virtual list box whose item index is needed.

FindString is the text of the item whose index is needed.

The event handler must return the index of the item identified by FindString. This return value must be in the range from 0 to one less than the value of the Count property.


TCustomListBox.OnDataObject
 VCL Reference

TCustomListBox.OnDataObject

TCustomListBox	See also

Occurs when a virtual list box needs to supply the object associated with an item.

type TLBGetDataObjectEvent = procedure(Control: TWinControl; Index: Integer; var DataObject: TObject ) of object;

property OnDataObject: TLBGetDataEvent;

Description

Supply an OnDataObject event handler to dynamically provide objects associated with the items in a virtual list box.

Control is the virtual list box that contains the item associated with the object.

Index is the index of the desired item. Index must be less than the value of the Count property.

DataObject returns the object associated with the specified item.


TCustomListBox.OnDrawItem
 VCL Reference

TCustomListBox.OnDrawItem

TCustomListBox	See also 	Example

Occurs when an item in an owner-draw list box needs to be redisplayed.

property OnDrawItem: TDrawItemEvent;

Description

Use OnDrawItem to write a handler for drawing of the items in list boxes with the Style values lbOwnerDrawFixed, lbOwnerDrawVariable, or lbVirtualOwnerDraw. OnDrawItem occurs when the list box needs to display an item. OnDrawItem occurs only for owner-draw list boxes.

The size of the rectangle that contains the item is determined either by the ItemHeight property for fixed owner-draw list boxes or by the response to the OnMeasureItem event for variable owner-draw list boxes.


TCustomListBox.OnMeasureItem
 VCL Reference

TCustomListBox.OnMeasureItem

TCustomListBox	See also 	Example

Occurs when the application needs to redisplay an item in a variable height owner-draw list box.

type TMeasureItemEvent = procedure(Control: TWinControl; Index: Integer; var Height: Integer) of object;

property OnMeasureItem: TMeasureItemEvent;

Description

Use OnMeasureItem to write a handler to measure items to be drawn in a list box with a Style property value of lbOwnerDrawVariable.

OnMeasureItem is of type TMeasureItemEvent which contains three parameters describing the item to measure:

Control, specifying the control containing the item.

Index, specifying the index of the item in the control.

Height, specifying the height of the item.

The Index parameter identifies the position of the item in the list box.

The Height parameter should specify the height in pixels that the given item will occupy in the control. The Height parameter is passed by reference (a var parameter), which initially contains the default height of the item or the height of the item text in the control’s font. The handler can set Height to a value appropriate to the contents of the item, such as the height of a graphical image to be displayed within the item.

After the OnMeasureItem event occurs, the OnDrawItem event occurs, rendering the item with the measured size.


 VCL Reference

TCustomListBox methods

TCustomListBox	Alphabetically	Legend

In TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

Create

CreateParams

CreateWnd

DeleteSelected

DeleteString

Destroy

DestroyWnd

DoFindData

DoGetData

DoGetDataObject

DragCanceled

DrawItem

GetCount

GetItemData

GetItemIndex

GetSelCount

GetSelected

InternalGetItemData

InternalSetItemData

ItemAtPos

ItemRect

KeyPress

MeasureItem

ResetContent

SelectAll

SetItemData

SetItemIndex

SetMultiSelect

WndProc

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomListBox Methods

TCustomListBox	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

DeleteSelected

DeleteString

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DoFindData

DoGetData

DoGetDataObject

DragCanceled

DragDrop

Dragging

DrawItem

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemData

GetItemIndex

GetNamePath

GetParentComponent

GetSelCount

GetSelected

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

InternalGetItemData

InternalSetItemData

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

KeyPress

ManualDock

ManualFloat

MeasureItem

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

ResetContent

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetItemData

SetItemIndex

SetMultiSelect

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TCustomListBox.AddItem
 VCL Reference

TCustomListBox.AddItem

TCustomListBoxTCustomListBox	See also

Adds an item to the list box

procedure AddItem(Item: String; AObject: TObject);

Description

Call AddItem to add a new item to the end of the list.

Item is the text of the item to add.

AObject is the object associated with the new item.


TCustomListBox.Clear
 VCL Reference

TCustomListBox.Clear

TCustomListBox	See also

Deletes all items from the list box.

procedure Clear;

Description

Use Clear to delete all of the items in the list box at once. Although the items in a standard list box are of type TStrings, use the Clear method of the list box rather than calling the Clear method of the Items property. This allows descendants of TCustomListBox to perform any other necessary clean-up in the Clear method, in addition to deleting the items from the Items property. Thus, applications should use

ListBox1.Clear;

rather than

ListBox1.Items.Clear;


TCustomListBox.ClearSelection
 VCL Reference

TCustomListBox.ClearSelection

TCustomListBox	See also

Deselects all selected items in the list box, if possible.

procedure ClearSelection;

Description

Use ClearSelection to deselect all the currently selected items in the list box. When the list box receives focus, after ClearSelection is called, the last item that was selected is the item that receives the current focus in the list box. Although this item receives focus, the item itself is not selected.


TCustomListBox.CopySelection
 VCL Reference

TCustomListBox.CopySelection

TCustomListBox	See also

Copies the selected items to another list-type control

procedure CopySelection (Destination: TCustomListControl); override;

Description

Call CopySelection to copy all the items selected in the list box to a combo box, list view, or another list box. If the destination control is not sorted, the selected items are added to the end of its list.

Destination is the list box, combo box, or list view to which the selected items are copied.


TCustomListBox.Create
 VCL Reference

TCustomListBox.Create

TCustomListBox	See also

Instantiates a list box control.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a list box control at runtime. For list boxes created at design time, Create is called automatically.

Create allocates memory for a list box control, and calls the inherited constructor. Then it:

Initializes values for its Width, Height and ItemHeight properties.

Sets ParentColor to False, and TabStop and ExtendedSelect to True.

Sets the ControlStyle for the list box.

Sets the BorderStyle property to bsSingle.

Creates a TControlCanvas object for the Canvas property.

Creates a TStrings type of object for the Items property.


TCustomListBox.CreateParams
 VCL Reference

TCustomListBox.CreateParams

TCustomListBox	See also

Initializes the window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); virtual;

Description

CreateParams is used to pass information, in its Params parameter, to CreateWindowHandle when the list box control is created.

TCustomListBox overrides CreateParams to customize the representation of the window. It uses information from the list box Columns, ExtendedSelect, IntegralHeight, MultiSelect, Sorted and Style properties and sets WS_HSCROLL, WS_VSCROLL, LBS_HASSTRINGS and LBS_NOTIFY Windows styles for creation of the list box.

When overriding CreateParams, always call theinherited method first to set the default values, then make any desired adjustments.


TCustomListBox.CreateWnd
 VCL Reference

TCustomListBox.CreateWnd

TCustomListBox	See also

Creates a Windows control corresponding to the list box component.

procedure CreateWnd; virtual;

Description

CreateWnd is called automatically when the list box must be displayed. CreateWnd calls the inherited CreateWnd method, which calls

CreateParams to initialize the window-creation parameters.

CreateWindowHandle to create the window handle for the control.

TCustomListBox.CreateWnd additionally sets up the list box position, tabs, items, and columns.


TCustomListBox.DeleteSelected
 VCL Reference

TCustomListBox.DeleteSelected

TCustomListBox	See also

Deletes the selected items from the list box

procedure DeleteSelected; override;

Description

Call DeleteSelected to delete the selected items from the list box.


TCustomListBox.::DeleteString
 VCL Reference

TCustomListBox.DeleteString

TCustomListBox

Deletes a string from the list box.

procedure DeleteString(Index: Integer); dynamic;

Description

DeleteString deletes the string, specified by the Index parameter, from the list box control.


TCustomListBox.Destroy
 VCL Reference

TCustomListBox.Destroy

TCustomListBox	See also

Destroys the instance of a list box control.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, an application should call Free. Free checks that the list box reference is not nil before it calls Destroy.

Destroy frees the memory associated with the objects for the Canvas and Items properties. Then it calls the inherited destructor to destroy the list box object.


TCustomListBox.DestroyWnd
 VCL Reference

TCustomListBox.DestroyWnd

TCustomListBox	See also

Saves the list box items in a string list before calling the inherited DestroyWnd method.

procedure DestroyWnd; virtual;

Description

DestroyWnd saves the list box text string items in the Items property to internal storage in a TStringList object that it creates. It then calls theinherited DestroyWnd method to destroy the windowed control’s window handle and free associated device contexts.


TCustomListBox.DoFindData
 VCL Reference

TCustomListBox.DoFindData

TCustomListBoxTCustomListBox	See also

Returns the index of a string in the list box.

function DoFindData(const Data: String): Integer;

Description

This protected method is called automatically when the list box needs to indicate the index for an item.

If the list box is virtual (that is, if the value of the Style property is lbVirtual or lbVirtualOwnerDraw), DoFindData generates an OnDataFind event so that the index can be provided dynamically. If the list box is not virtual (any other Style), DoFindData locates the specified string from the Items property and returns its index.

Data is the text of the item to locate.


TCustomListBox.DoGetData
 VCL Reference

TCustomListBox.DoGetData

TCustomListBoxTCustomListBox	See also

Returns a string in the list box given its index.

function DoGetData(const Index: Integer): string;

Description

This protected method is called automatically when a virtual list box needs to supply the text of an item. DoGetData is never called unless the list box is virtual (that is, unless the value of the Style property is lbVirtual or lbVirtualOwnerDraw).

DoGetData generates an OnData event and returns the string that is supplied dynamically by the event handler.


TCustomListBox.DoGetDataObject
 VCL Reference

TCustomListBox.DoGetDataObject

TCustomListBoxTCustomListBox	See also

Returns the object associated with an item in a virtual list box.

function DoGetDataObject(const Index: Integer): TObject;

Description

This protected method is called automatically when a virtual list box needs to supply the object associated with an item. DoGetDataObject is never called unless the list box is virtual (that is, unless the value of the Style property is lbVirtual or lbVirtualOwnerDraw).

DoGetDataObject generates an OnDataObject event and returns the object that is supplied dynamically by the event handler.


TCustomListBox.DragCanceled
 VCL Reference

TCustomListBox.DragCanceled

TCustomListBox	See also

Sends a mouse message canceling the drag-and-drop operation.

procedure DragCanceled; dynamic;

Description

DragCanceled is called in response to the cancellation of a drag-and-drop operation that had started. Users can cancel the operation by dropping the item over a component that does not accept the item, or by pressing Esc while dragging.

Delphi calls the DragCanceled method before invoking the OnEndDrag event.


TCustomListBox.DrawItem
 VCL Reference

TCustomListBox.DrawItem

TCustomListBox	See also

Generates an OnDrawItem event.

procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); virtual;

Description

DrawItem is called whenever a visual aspect of an owner-draw list box changes. The list box calls DrawItem for each visible item in its list, passing the index of the item in the Index parameter.

By default, the DrawItem method for a list box calls any event handler attached to the component's OnDrawItem event. If there is no handler attached, DrawItem fills the rectangle passed in Rect and draws any text associated with the indexed item. The default drawing ignores the State parameter, although State is passed along to attached event handlers.


TCustomListBox.::GetCount
 VCL Reference

TCustomListBox.GetCount

TCustomListBox	See also

Returns the value of the Count property.

function GetCount: Integer; override;

Description

GetCount is the protected read implementation of the Count property.


TCustomListBox.GetItemData
 VCL Reference

TCustomListBox.GetItemData

TCustomListBox	See also

Returns a 32-bit value associated with the specified item in a list box.

function GetItemData(Index: Integer): LongInt; dynamic;

Description

GetItemData retrieves the data associated with a particular item in the list box. This value can be displayed as that list box item, or can be a value (such as a pointer) associated with the list box item.


TCustomListBox.::GetItemIndex
 VCL Reference

TCustomListBox.GetItemIndex

TCustomListBox	See also

Returns the value of the ItemIndex property.

function GetItemIndex: Integer; override;

Description

GetItemIndex is the protected read implementation of the ItemIndex property. It returns the index of the first selected item in the list box.

The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1.


TCustomListBox.::GetSelCount
 VCL Reference

TCustomListBox.GetSelCount

TCustomListBox	See also

Returns the number of selected items.

function GetSelCount: Integer; override;

Description

GetSelCount is the protected read implementation of the SelCount property.


TCustomListBox.::GetSelected
 VCL Reference

TCustomListBox.GetSelected

TCustomListBox	See also

Indicates whether a particular item is selected.

function GetSelected (Index: Integer): Boolean;

Description

GetSelected is the protected read implementation of the Selected property. It returns True if the item specified by Index is selected, False if it is not.


TCustomListBox.InternalGetItemData
 VCL Reference

TCustomListBox.InternalGetItemData

TCustomListBox	See also

Retrieves the data associated with an item in the list box.

function InternalGetItemData(Index: Integer): Longint; dynamic;

Description

InternalGetItemData is the low-level protected method for fetching the data associated with an item in the list box. It retrieves a reference pointer to the object associated with the specified item, as an integer.

Index is the index of the item whose data is to be fetched.


TCustomListBox.InternalSetItemData
 VCL Reference

TCustomListBox.InternalSetItemData

TCustomListBox	See also

Associates an integer with a specified item in the list box.

procedure InternalSetItemData(Index: Integer; AData: Longint); dynamic;

Description

InternalSetItemData is the low-level protected method for associating data with an item in the list box. It associates the item that has the index specified by Index with the integer specified by AData.


TCustomListBox.ItemAtPos
 VCL Reference

TCustomListBox.ItemAtPos

TCustomListBox	See also 	Example

Returns the index of the list box item indicated by the coordinates of a point on the control.

function ItemAtPos(Pos: TPoint; Existing: Boolean): Integer;

Description

Use ItemAtPos to detect if an item exists at a particular point in the control.

The Pos parameter is the point in the control in window coordinates. If Pos is beyond the last item in the list box, the value of the Existing variable determines the returned value. If Existing is set to True, ItemAtPos returns -1, indicating that no item exists at that point. If Existing is set to False, ItemAtPos returns the index of the last item in the list box plus one.


TCustomListBox.ItemRect
 VCL Reference

TCustomListBox.ItemRect

TCustomListBox	See also 	Example

Returns the rectangle that surrounds the item specified in the Item parameter.

function ItemRect(Item: Integer): TRect;

Description

Use ItemRect to get the coordinates of a particular item in the list box. For example, ItemRect is used internally by the ItemAtPos method.

The Item parameter is the ItemIndex of the item whose position is queried.


TCustomListBox.KeyPress
 VCL Reference

TCustomListBox.KeyPress

TCustomListBox	See also

Responds when the user presses a key.

procedure KeyPress (var Key: Char); override;

Description

KeyPress is called automatically when the list box receives a key-press message (WM_CHAR). It generates an OnKeyPress event, and then, if the AutoComplete property is True, updates ItemIndex to reflect the next character that the user typed.

The Key parameter is the character represented by the key that is pressed, not a Windows virtual key code.


TCustomListBox.MeasureItem
 VCL Reference

TCustomListBox.MeasureItem

TCustomListBox	See also

Generates an OnMeasureItem event.

procedure MeasureItem(Index: Integer; var Height: Integer); virtual;

Description

MeasureItem is called whenever a visual aspect of a variable owner-draw list box changes and the value of the Style property is csOwnerDrawVariable.

Before drawing its items, a variable owner-draw list box calls MeasureItem once for each visible item, passing the index of the item to measure, and the default height  of the item. Since Height is passed by reference (avar parameter), MeasureItem can increase or reduce the height of each item as needed.

By default, the MeasureItem method does nothing except call any event handler attached to the OnMeasureItem event. Override MeasureItem to change or add functionality to the default behavior.


TCustomListBox.ResetContent
 VCL Reference

TCustomListBox.ResetContent

TCustomListBox	See also

Removes all of the items from a list box.

procedure ResetContent; dynamic;

Description

ResetContent is used to remove the items from the list box. ResetContent is used, for example, by the Clear method.


TCustomListBox.::SelectAll
 VCL Reference

TCustomListBox.SelectAll

TCustomListBox

Selects the entire block of text in the list box.

procedure SelectAll;override;

Description

Use SelectAll to select the entire block of text in the list box. To select only part of the text, use the SelStart and SelLength properties.


TCustomListBox.SetItemData
 VCL Reference

TCustomListBox.SetItemData

TCustomListBox	See also

Sets the 32-bit value associated with the specified item in a list box.

procedure SetItemData(Index: Integer; AData: LongInt); dynamic;

Description

Use SetItemData to set the data associated with a particular item in a list box. This value can be displayed as that list box item, or it can be a value (such as a pointer) represented by the list box item.


TCustomListBox.SetItemIndex
 VCL Reference

TCustomListBox.SetItemIndex

TCustomCombo	See also

Gives focus to the item with a specified index.

procedure SetItemIndex(const Value: Integer); override;

Description

SetItemIndex is the protected write implementation for the ItemIndex property. Value is the index of the item that should receive focus.


TCustomListBox.SetMultiSelect
 VCL Reference

TCustomListBox.SetMultiSelect

TCustomCombo	See also

Sets the MultiSelect property.

procedure SetMultiSelect(Value: Boolean); override;

Description

SetMultiSelect is the protected write implementation for the MultiSelect property. Value is True if the list box should allow more than one item to be selected, False if only one item can be selected at a time.


TCustomListBox.WndProc
 VCL Reference

TCustomListBox.WndProc

TCustomListBox	See also	Example

Handles Windows messages.

procedure WndProc(var Message: TMessage); virtual;

Description

WndProc overrides the inherited WndProc to provide specialized responses to messages that allows the list box to handle auto drag mode itself. Then it calls the inherited WndProc to handle all other messages.

When overriding the WndProc method, be sure to call the inherited WndProc at the end to dispatch any other messages.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControlTCustomListControl

TCustomMultiSelectListControl

TCustomListBox


TCustomListControl
 VCL Reference

TCustomListControl

Hierarchy	Properties	Methods	See also

TCustomListControl is the base class for controls that display a list of items.

Unit

Controls

Description

TCustomListControl is the common base class for controls that represent a list of items. Its descendants include combo boxes, list boxes, and list views. TCustomListControl introduces a common set of properties and methods for working with the items in the list. This includes the ability to

Add items to the list.

Delete items from the list.

Select items in the list.

Copy items to another TCustomListControl descendant.

Rearrange the order of items.

Most of the TCustomListControl methods are abstract. That is, although TCustomListControl introduces the methods for working with items, it does not provide the actual implementation. Rather, TCustomListControl descendants must override the TCustomListControl methods, providing the actual implementation. As a result, applications should not create instances of TCustomListControl, only its descendants that provide an implementation for the abstract methods.


 VCL Reference

TCustomListControl Properties

TCustomListControl	Alphabetically	Legend

In TCustomListControl

ItemIndex

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomListControl Properties

TCustomListControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomListControl.ItemIndex
 VCL Reference

TCustomListControl.ItemIndex

TCustomListControl	See also	Example

Specifies the index of the selected item.

property ItemIndex: Integer;

Description

Read ItemIndex to determine which item is selected. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1. If the list control supports multiple selected items, ItemIndex is the index of the selected item that has focus.

Set ItemIndex programmatically to select an item by passing in the index value.

Note:	To implement the ItemIndex property in a TCustomListControl descendant, override the protected GetItemIndex and SetItemIndex methods.


 VCL Reference

TCustomListControl methods

TCustomListControl	Alphabetically	Legend

In TCustomListControl

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

GetCount

GetItemIndex

MoveSelection

SelectAll

SetItemIndex

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomListControl methods

TCustomListControl	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemIndex

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetItemIndex

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomListControl.AddItem
 VCL Reference

TCustomListControl.AddItem

TCustomListControl

Adds an item to the list control.

procedure AddItem(Item: String; AObject: TObject); virtual; abstract;

Description

AddItem adds an item to the end of the list, possibly associating it with a specified object.

Item is the text that is the item’s value. This is the string that appears for the item in the list control.

AObject is an object that you can associated with the item. Note that the list control does not take ownership of this object. That is, if you delete the item, the corresponding object is not freed.

Note:	TCustomListControl introduces AddItem as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override AddItem to provide an implementation.


TCustomListControl.Clear
 VCL Reference

TCustomListControl.Clear

TCustomListControl	See also

Deletes all of the items from the list control.

procedure Clear; virtual; abstract;

Description

Clear empties the list control so that it contains no items.

Note:	TCustomListControl introduces Clear as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override Clear to provide an implementation.


TCustomListControl.ClearSelection
 VCL Reference

TCustomListControl.ClearSelection

TCustomListControl	See also

Removes the selection, leaving all items unselected.

procedure ClearSelection; virtual; abstract;

Description

Call ClearSelection to deselect any selected items in the list control. ClearSelection removes the selection, but leaves the items in the list.

Note:	TCustomListControl introduces ClearSelection as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override ClearSelection to provide an implementation.


TCustomListControl.CopySelection
 VCL Reference

TCustomListControl.CopySelection

TCustomListControl	See also

Copies the selected item or items to another TCustomListControl descendant.

procedure CopySelection(Destination: TCustomListControl); virtual; abstract;

Description

CopySelection adds all selected items to another TCustomListControl descendant.

Destination is the list control that receives the items.

Note:	TCustomListControl introduces CopySelection as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override CopySelection to provide an implementation. When overriding CopySelection, you can add items to the destination list control by calling its AddItem method.


TCustomListControl.DeleteSelected
 VCL Reference

TCustomListControl.DeleteSelected

TCustomListControl	See also

Deletes all the selected items.

procedure DeleteSelected; virtual; abstract;

Description

Call DeleteSelected to remove all selected items from the list control. DeleteSelected deletes only the item or items that are selected.

Note:	TCustomListControl introduces DeleteSelected as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override DeleteSelected to provide an implementation.


TCustomListControl.GetCount
 VCL Reference

TCustomListControl.GetCount

TCustomListControl

Returns the number of items in the list.

function GetCount: Integer; virtual; abstract;

Description

Call GetCount to determine the number of items in the list control.

Note:	TCustomListControl introduces GetCount as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override GetCount to provide an implementation.


TCustomListControl.GetItemIndex
 VCL Reference

TCustomListControl.GetItemIndex

TCustomListControl	See also

Returns the value of the ItemIndex property.

function GetItemIndex: Integer; virtual; abstract;

Description

Override GetItemIndex to provide the read implementation for the ItemIndex property. GetItemIndex returns the index of the selected item, where the first item in the list has index 0, the second item has index 1, and so on. If no item is selected, GetItemIndex returns -1. If the list control supports multiple selected items, GetItemIndex returns the index of the selected item that has focus.

Note:	TCustomListControl introduces GetItemIndex as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override GetItemIndex to provide an implementation.


TCustomListControl.MoveSelection
 VCL Reference

TCustomListControl.MoveSelection

TCustomListControl	See also

Moves all selected items to another list control.

procedure MoveSelection(Destination: TCustomListControl); virtual;

Description

Call MoveSelection to copy all selected items to another list control and then delete them from this list control.


TCustomListControl.SelectAll
 VCL Reference

TCustomListControl.SelectAll

TCustomListControl	See also

Selects all items or all text in the selected item.

procedure SelectAll; virtual; abstract;

Description

SelectAll performs different tasks, depending on the custom list control descendant. In list controls that allow multiple items to be selected, SelectAll selects all items in the list. In list controls that allow only one item to be selected, SelectAll selects the entire text of the current item.

Note:	TCustomListControl introduces SelectAll as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override SelectAll to provide an implementation.


TCustomListControl.SetItemIndex
 VCL Reference

TCustomListControl.SetItemIndex

TCustomListControl	See also

Sets the value of the ItemIndex property.

procedure SetItemIndex(const Value: Integer); overload; virtual; abstract;

Description

Override SetItemIndex to provide the write implementation for the ItemIndex property.

Value represents the index of the item to select, where the first item in the list has index 0, the second item has index 1, and so on. If Value is –1, SetItemIndex deselects all items (the same as the ClearSelection method).

Note:	TCustomListControl introduces SetItemIndex as an abstract method. It does not provide an implementation for this method, because each TCustomListControl descendant manages its list of items in a class-dependant way. Descendant classes must override SetItemIndex to provide an implementation.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl


TCustomMemoryStream
 VCL Reference

TCustomMemoryStream

Hierarchy	Properties	Methods	See also

TCustomMemoryStream is an abstract base class used as the common ancestor for memory streams.

Unit

Classes

Description

Use TCustomMemoryStream as a base class when defining a stream object that can transfer data that is stored in memory. Memory streams are useful for providing file-like access to data that is stored in a less accessible medium. Data can be moved to an internal memory buffer when the memory stream is created. After manipulating the data in a memory stream, the data can be written out to its actual storage medium when the memory stream is destroyed.

Do not instantiate an instance of TCustomMemoryStream. It is an abstract class that implements behavior common to all memory streams. To work with an instance of a memory stream, use one of the descendants of TCustomMemoryStream, such as TMemoryStream or TResourceStream.


 VCL Reference

TCustomMemoryStream properties

TCustomMemoryStream	Alphabetically	Legend

In TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TCustomMemoryStream properties

TCustomMemoryStream	By object	Legend

Memory

Position

Size


TCustomMemoryStream.Memory
 VCL Reference

TCustomMemoryStream.Memory

TCustomMemoryStream	See also

Provides direct access to the memory pool allocated for the memory stream.

property Memory: Pointer;

Description

Use Memory to get access to the memory for the stream. The memory for the stream holds the data that is being transferred by means of the memory stream. Size is the number of bytes of Memory that were allocated, and Position is the current position within Memory.

Note:	Memory is a read-only property. Memory can be used to change the contents of the memory, but to set the actual memory the stream works with, descendants of TCustomMemoryStream must assign a pointer to a memory buffer by calling the SetPointer method.


 VCL Reference

TCustomMemoryStream methods

TCustomMemoryStream	Alphabetically	Legend

In TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

SetPointer

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomMemoryStream methods

TCustomMemoryStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

SetPointer

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TCustomMemoryStream.Read
 VCL Reference

TCustomMemoryStream.Read

TCustomMemoryStream	See also

Reads up to Count bytes from the memory stream into Buffer and advances the current position of the stream by the number of bytes read.

function Read(var Buffer; Count: Longint): Longint; override;

Description

Use Read to read the contents of the memory stream into a buffer, starting at the current position. Read will read up to Count bytes from the current position in Memory. If Count bytes extends beyond the end of the memory buffer, Read will only transfer the data up to the end of the associated memory buffer. Read returns the number of bytes actually transferred to Buffer, and advances the current position accordingly. If the return value is less than Count, it means that reading reached the end of the stream data.

All the other data-reading methods of the memory stream (ReadBuffer, ReadComponent) call Read to do the actual reading.

Note:	Read treats Count as an upper bound. The ReadBuffer method, by contrast, raises an exception if Count bytes cannot be read.


TCustomMemoryStream.SaveToFile
 VCL Reference

TCustomMemoryStream.SaveToFile

TCustomMemoryStream	See also

Writes the entire contents of the memory stream to the file with a given file name.

procedure SaveToFile(const FileName: string);

Description

Use SaveToFile to write the contents of Memory to a file. SaveToFile allows an application to write out the contents of the memory stream without having to explicitly create and free a file stream object. If the named file cannot be created or opened, SaveToFileraises an EFCreateError exception.


TCustomMemoryStream.SaveToStream
 VCL Reference

TCustomMemoryStream.SaveToStream

TCustomMemoryStream	See also

Writes the entire contents of the memory stream to the stream object specified by Stream.

procedure SaveToStream(Stream: TStream);

Description

Use SaveToStream to copy data that is stored in memory into another storage medium. SaveToStream writes the entire contents of Memory into the indicated stream object, starting at the current position in the stream that was passed as a parameter.

When the Stream parameter is a TFileStream object, SaveToStream does much the same thing as the SaveToFile method. However, SaveToStream writes to the current position in the target stream. Thus, for example, SaveToStream can be used to append the contents of Memory to a file stream, rather than replace the contents of the file the way SaveToFile does.

If the entire contents of the memory stream cannot be written to the target stream, SaveToStreamraises an EWriteError exception.


TCustomMemoryStream.Seek
 VCL Reference

TCustomMemoryStream.Seek

TCustomMemoryStream	See also	Example

Moves the current position of the stream by Offset bytes, relative to the origin specified by Origin.

function Seek(Offset: Longint; Origin: Word): Longint; override;

Description

Use Seek to move the current position within the memory stream by the indicated offset. Seek allows an application to read from or write to a particular location within the Memory associated with the memory stream.

If Offset is a negative number, the seek is backward from the specified origin. The following table shows the different values of Origin and their meanings for seeking.

Value	Meaning

soFromBeginning	Offset is from the beginning of Memory. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of Memory. Offset must be <= 0 to indicate a number of bytes before the end of the memory buffer.

Seek returns the new value of the Position property.

Note:	Seek does no error checking on the value provided for Offset. Do not call seek with an offset that would move the current position less than 0 (before the start of Memory) or greater than Size (beyond the end of the memory buffer).


TCustomMemoryStream.SetPointer
 VCL Reference

TCustomMemoryStream.SetPointer

TCustomMemoryStream	See also

Replaces the memory buffer associated with the memory stream.

procedure SetPointer(Ptr: Pointer; Size: Longint);

Description

Use SetPointer to set the internal memory buffer, Memory, to be the value passed in by Ptr. Size is the number of bytes Ptr points to.

Descendants of TCustomMemoryStream should use SetPointer to associate the memory stream with the memory buffer that holds the data for the memory stream.

Note:	SetPointer does not free the existing value of Memory, if any, when it replaces the memory buffer. Descendants of TCustomMemoryStream that use SetPointer to replace the stream’s memory pool should free the memory pointed to by the Memory property before calling SetPointer to replace the memory buffer.


Hierarchy

TObject

TStream

TCustomMemoryStream


TCustomMultiSelectListControl
 VCL Reference

TCustomMultiSelectListControl

Hierarchy	Properties	Methods	See also

TCustomMultiSelectListControl is the base class for list controls that allow multiple items to be selected.

Unit

Controls

Description

TCustomMultiSelectListControl is the common base class for controls that represent a list of items where the user can select one or more of those items. Its descendants include list boxes and list views. TCustomMultiSelectListControl implements a common set of properties and methods for working with the items in the list. This includes the ability to

Specify whether the control allows one or multiple items to be selected.

Determine the number of selected items.

Add items to the list.

Delete items from the list.

Select items in the list.

Copy items to another list control.

Rearrange the order of items.

Most of the TCustomMultiSelectListControl methods are abstract. That is, although TCustomMultiSelectListControl introduces the methods for working with items, it does not provide the actual implementation. Rather, TCustomMultiSelectListControl descendants must override the TCustomMultiSelectListControl methods, providing the implementation. As a result, applications should not create instances of TCustomMultiSelectListControl, only its descendants that provide an implementation for the abstract methods.


 VCL Reference

TCustomMultiSelectListControl Properties

TCustomMultiSelectListControl	Alphabetically	Legend

In TCustomMultiSelectListControl

MultiSelect

SelCount

Derived from TCustomListControl

ItemIndex

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomMultiSelectListControl Properties

TCustomMultiSelectListControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentWindow

SelCount

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomMultiSelectListControl.MultiSelect
 VCL Reference

TCustomMultiSelectListControl.MultiSelect

TCustomMultiSelectListControl	See also

Specifies whether the user can select more than one item.

property MultiSelect: Boolean;

Description

Use MultiSelect to specify whether the user can select more than one item. When MultiSelect is True, the user can select multiple items in the control, and the SelCount property indicates the number of selected items. When MultiSelect is False, the user can only select one item, which is indicated by the ItemIndex property.

Note:	To implement the MultiSelect property in a TCustomMultiSelectListControl descendant, override the protected SetMultiSelect method.


TCustomMultiSelectListControl.SelCount
 VCL Reference

TCustomMultiSelectListControl.SelCount

TCustomMultiSelectListControl	See also

Indicates the number of selected items.

property SelCount: Integer;

Description

Read SelCount to determine the number of items that are currently selected. If the value of the MultiSelect property is False, SelCount is 0 or 1. If MultiSelect is True, the value of SelCount can be greater than 1 as well.

Note:	To implement the SelCount property in a TCustomMultiSelectListControl descendant, override the protected GetSelCount method.


 VCL Reference

TCustomMultiSelectListControl methods

TCustomMultiSelectListControl	Alphabetically	Legend

In TCustomMultiSelectListControl

GetSelCount

SetMultiSelect

Derived from TCustomListControl

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

MoveSelection

SelectAll

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomMultiSelectListControl methods

TCustomMultiSelectListControl	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelCount

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetMultiSelect

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomMultiSelectListControl.GetSelCount
 VCL Reference

TCustomMultiSelectListControl.GetSelCount

TCustomMultiSelectListControl	See also

Returns the value of the SelCount property.

function GetSelCount: Integer; virtual; abstract;

Description

Override GetSelCount to provide the read implementation for the SelCount property. GetSelCount returns the number of items that are currently selected.

Note:	TCustomMultiSelectListControl introduces GetSelCount as an abstract method. It does not provide an implementation for this method, because each TCustomMultiSelectListControl descendant manages selection in a class-dependant way. Descendant classes must override GetSelCount to provide an implementation.


TCustomMultiSelectListControl.SetMultiSelect
 VCL Reference

TCustomMultiSelectListControl.SetMultiSelect

TCustomMultiSelectListControl	See also

Sets the value of the MultiSelect property.

procedure SetMultiSelect(Value: Boolean); virtual; abstract;

Description

Override SetMultiSelect to provide the write implementation for the MultiSelect property.

Value is True if the control should allow the user to select more than one item at a time, False if the control should support at most one selected item.

Note:	TCustomMultiSelectListControl introduces SetMultiSelect as an abstract method. It does not provide an implementation for this method, because each TCustomMultiSelectListControl descendant manages the selection of items in a class-dependant way. Descendant classes must override SetMultiSelect to provide an implementation.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomMultiSelectListControl


TCustomOutline
 VCL Reference

TCustomOutline

Hierarchy	Properties	Methods	Events	See also

TCustomOutline is the base class for controls that display outline nodes (TOutlineNode objects).

Unit

Outline

Description

Use TCustomOutline as a base class when defining a control that displays outline nodes in a two-dimensional layout. TCustomOutline introduces the ability to manage a hierarchy of outline nodes, including the ability to control the appearance and layout of those nodes and to expand or collapse branches of the outline tree.

Do not create instances of TCustomOutline. To add an outline control to a form, use the TOutline object, which publishes many of the properties, events, and methods of TCustomOutline, or TTreeView, which wraps the Windows control that performs the same function.


 VCL Reference

TCustomOutline properties

TCustomOutline	Alphabetically	Legend

In TCustomOutline

ItemCount

ItemHeight

Items

ItemSeparator

Lines

Options

OutlineStyle

PictureClosed

PictureLeaf

PictureMinus

PictureOpen

PicturePlus

SelectedItem

Style

Derived from TCustomGrid

Row

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomOutline properties

TCustomOutline	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemCount

ItemHeight

Items

ItemSeparator

Left

Lines

LRDockWidth

Name

Options

OutlineStyle

Owner

Parent

ParentWindow

PictureClosed

PictureLeaf

PictureMinus

PictureOpen

PicturePlus

Row

SelectedItem

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomOutline.ItemCount
 VCL Reference

TCustomOutline.ItemCount

TCustomOutline	See also

Indicates the number of nodes in the outline.

property ItemCount: LongInt;

Description

Read ItemCount to determine the number of nodes in the outline. Use ItemCount with the Items property array to iterate over all nodes in the outline.

Note:	Reading ItemCount can be computationally expensive, as it causes all the indexes used by the outline to be updated.


TCustomOutline.ItemHeight
 VCL Reference

TCustomOutline.ItemHeight

TCustomOutline	See also

Specifies the height of each node in the outline.

property ItemHeight: Integer;

Description

Set ItemHeight to the height, in pixels, of each node in the outline. Changing the ItemHeight property also changes the font used to display the nodes.


TCustomOutline.Items
 VCL Reference

TCustomOutline.Items

TCustomOutline	See also

Lists the nodes in the outline.

property Items[Index: LongInt]: TOutlineNode; default;

Description

Use Items to access a node in the outline. Each item is a TOutlineNode object.

Index is a number specifying the node to return, where Items[0] refers to the root, Items[1] is the first (topmost) node, and so on.

Items is the default property of TCustomOutline. This means that the name of the property may be omitted in code. Thus the line

Outline1.Items[1].Text := Edit1.Text;

can also be written

Outline1[1].Text := Edit1.Text;


TCustomOutline.ItemSeparator
 VCL Reference

TCustomOutline.ItemSeparator

TCustomOutline	See also

Specifies a delimiting string for outline nodes.

property ItemSeparator: string;

Description

Set ItemSeparator to the string that should appear between node names in the path description of any individual node in the outline. ItemSeparator is used to implement the FullPath read method of TOutlineNode.

ItemSeparator is initialized to the backslash (\) character when the TCustomOutline object is created.


TCustomOutline.Lines
 VCL Reference

TCustomOutline.Lines

TCustomOutline	See also

Lists the Text property values of all nodes in the outline.

property Lines: TStrings;

Description

Read Lines to obtain a text representation of the outline. Set Lines to fill the outline from a set of text strings. Each string in the Lines property represents a node in the outline. Lines does not include the root node.

Leading tabs and spaces are converted into levels of the outline. Text without any leading tabs or spaces becomes level 1 items. For example, the following set of strings represents an outline with three first level children descended from the root, and an additional, second level child on the first and third nodes:

ChildA

 ChildA1

ChildB

ChildC

 ChildC1

The Lines property is primarily useful for filling an outline with items at design time. While Lines can be used to access the individual nodes at run time, it is much quicker to access an item with the Items property.


TCustomOutline.Options
 VCL Reference

TCustomOutline.Options

TCustomOutline	See also

Determines how the nodes in the outline are drawn.

property Options: TOutlineOptions;

Description

Set Options to any combination of the following values:

Value	Meaning

ooDrawTreeRoot	The first item (Index value of 1) is connected to the root item by the outline tree. This means that the tree will extend from the top of the outline to all the first level items. Without ooDrawTreeRoot, all first level items appear leftmost in the outline, not connected by the tree.

ooDrawFocusRect	The outline draws a focus rectangle around the selected item.

ooStretchBitmaps	The outline stretches the standard bitmaps (PictureLeaf, PictureOpen, PictureClosed, PicturePlus, PictureMinus) to fit in the size of the item, determined by the size of the Font of the Text. Without ooStretchBitmaps, the bitmaps will be cropped if larger than the height of the item text, or won't fill up the entire item space if smaller than the text.


TCustomOutline.OutlineStyle
 VCL Reference

TCustomOutline.OutlineStyle

TCustomOutline	See also

Specifies how the outline tree is displayed.

property OutlineStyle: TOutlineStyle;

Description

Set OutlineStyle to one of the following values:

Value	Meaning

osText	Displays node text (specified in TOutlineNode::Text) only.

osPlusMinusText	Displays plus picture (specified in PicturePlus), minus picture (specified in PictureMinus), and node text (specified in TOutlineNode::Text).

osPictureText	Displays open picture (specified in PictureOpen), closed picture (specified in PictureClosed), leaf picture (specified in PictureLeaf) and node text (specified in TOutlineNode::Text).

osPlusMinusPictureText	Displays plus picture (specified in PicturePlus), minus picture (specified in PictureMinus), open picture (specified in PictureOpen), closed picture (specified in PictureClosed), leaf picture (specified in PictureLeaf), and node text (specified in TOutlineNode::Text).

osTreeText	Displays lines connecting outline nodes and node text (specified in TOutlineNode::Text).

osTreePictureText	Displays lines connecting outline nodes, open picture (specified in PictureOpen), closed picture (specified in PictureClosed), leaf picture (specified in PictureLeaf), and node text (specified in TOutlineNode::Text).

Note:	If the Style property is otOwnerDraw, the value of OutlineStyle is ignored. The connecting lines, node bitmaps, and node text must all be drawn in an OnDrawItem event handler.


TCustomOutline.PictureClosed
 VCL Reference

TCustomOutline.PictureClosed

TCustomOutline	See also

Specifies the bitmap used to represent a collapsed node that has subitems.

property PictureClosed: TBitmap;

Description

By default, PictureClosed is a closed file folder bitmap. Set PictureClosed to change the bitmap used for collapsed nodes.

Note:	The bitmap is not displayed in the outline unless the OutlineStyle property is set to osPictureText, osPlusMinusPictureText, or osTreePictureText.


TCustomOutline.PictureLeaf
 VCL Reference

TCustomOutline.PictureLeaf

TCustomOutline	See also

Specifies the bitmap used to represent an item that does not have subitems.

property PictureLeaf: TBitmap;

Description

By default, PictureLeaf is a document bitmap. Set PictureLeaf to change the bitmap used for leaf nodes.

Note:	The bitmap is not displayed in the outline unless the OutlineStyle property is set to osPictureText, osPlusMinusPictureText, or osTreePictureText.


TCustomOutline.PictureMinus
 VCL Reference

TCustomOutline.PictureMinus

TCustomOutline	See also

Specifies the bitmap used to represent an expanded item that has subitems.

property PictureMinus: TBitmap;

Description

By default, PictureMinus is a minus sign (-). Set PictureMinus to change the bitmap used for collapsible nodes.

Note:	The bitmap is not displayed in the outline unless the OutlineStyle property is set to osPlusMinusPictureText or osPlusMinusText.


TCustomOutline.PictureOpen
 VCL Reference

TCustomOutline.PictureOpen

TCustomOutline	See also

Specifies the bitmap used to represent an expanded item that has subitems.

property PictureOpen: TBitmap;

Description

By default, the PictureOpen property is an open file folder. Set PictureOpen to change the bitmap used for expanded nodes.

Note:	The bitmap is not displayed in the outline unless the OutlineStyle property is set to osPictureText, osPlusMinusPictureText, or osTreePictureText.


TCustomOutline.PicturePlus
 VCL Reference

TCustomOutline.PicturePlus

TCustomOutline	See also

Specifies the bitmap used to represent a collapsed item that has subitems.

property PicturePlus: TBitmap;

Description

By default, the PicturePlus property is a plus sign (+). Set PicturePlus to change the bitmap used for collapsed nodes.

Note:	The bitmap will not be displayed in the outline unless the OutlineStyle property is set to osPlusMinusPictureText or osPlusMinusText.


TCustomOutline.SelectedItem
 VCL Reference

TCustomOutline.SelectedItem

TCustomOutline	See also

Specifies the index of the selected node.

property SelectedItem: LongInt;

Description

Read SelectedItem to determine the Index of the selected node. If no node is selected, SelectedItem is 0. Set SelectedItem to set focus to a particular node in the outline.


TCustomOutline.Style
 VCL Reference

TCustomOutline.Style

TCustomOutline	See also

Determines whether the nodes and tree are drawn automatically.

property Style: TOutlineType;

Description

By default, Style is osStandard, meaning that the outline displays items in the style determined by the OutlineStyle property. Set Style to otOwnerDraw to create owner-draw outlines, meaning that items must be drawn on the canvas of the outline by code in an OnDrawItem event handler.

Owner-draw outlines can display items other than the Text of a node and the standard bitmaps specified in the PictureClosed, PictureOpen, PictureMinus, PicturePlus, and PictureLeaf properties. Owner-draw outlines require more programming, however, as the application must specify how to render the image for each node in an OnDrawItem event handler.


 VCL Reference

TCustomOutline events

TCustomOutline	Alphabetically	Legend

In TCustomOutline

OnCollapse

OnDrawItem

OnExpand


 VCL Reference

TCustomOutline events

TCustomOutline	By object	Legend

OnCollapse

OnDrawItem

OnExpand


TCustomOutline.OnCollapse
 VCL Reference

TCustomOutline.OnCollapse

TCustomOutline	See also

Occurs immediately after a node in the outline is collapsed.

EOutlineChange = procedure (Sender: TObject; Index: LongInt) of object;

property OnCollapse:EOutlineChange;

Description

Write an OnCollapse event handler to perform special processing when a node in the outline is collapsed. The Sender parameter is the outline, and the Index parameter is the index of the node that was just collapsed.


TCustomOutline.OnDrawItem
 VCL Reference

TCustomOutline.OnDrawItem

TCustomOutline	See also

Occurs when a node must be drawn in an owner-draw outline.

property OnDrawItem: TDrawItemEvent;

Description

When the Style property is set to otOwnerDraw, specify an OnDrawItem event handler to render the image of each node in the outline. An OnDrawItem event handler can display items other than the Text of a node and the standard bitmaps specified in the PictureClosed, PictureOpen, PictureMinus, PicturePlus, and PictureLeaf properties.

Draw the image of the node specified by the Index parameter onto the canvas of the outline.


TCustomOutline.OnExpand
 VCL Reference

TCustomOutline.OnExpand

TCustomOutline	See also

Occurs immediately after a node in the outline is expanded.

EOutlineChange = procedure (Sender: TObject; Index: LongInt) of object;

property OnExpand:EOutlineChange;

Description

Write an OnExpand event handler to perform special processing when a node in the outline is expanded. The Sender parameter is the outline, and the Index parameter is the index of the node that was just expanded.


 VCL Reference

TCustomOutline methods

TCustomOutline	Alphabetically	Legend

In TCustomOutline

Add

AddChild

AddChildObject

AddObject

BadIndex

BeginUpdate

Clear

Click

Collapse

Create

DblClick

DefineProperties

Delete

DeleteNode

Destroy

DrawCell

EndUpdate

Expand

FullCollapse

FullExpand

GetDataItem

GetItem

GetNodeDisplayWidth

GetTextItem

GetVisibleNode

Insert

InsertObject

KeyDown

KeyPress

Loaded

LoadFromFile

LoadFromStream

MouseDown

Move

SaveToFile

SaveToStream

SetDisplayWidth

SetGoodIndex

SetLevel

SetUpdateState

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomOutline methods

TCustomOutline	By object	Legend

Add

AddChild

AddChildObject

AddObject

AfterConstruction

Assign

BadIndex

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Click

ClientToParent

ClientToScreen

Collapse

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DblClick

DefaultHandler

DefineProperties

Delete

DeleteNode

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawCell

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

EndUpdate

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

FullCollapse

FullExpand

GetControlsAlignment

GetDataItem

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

GetNodeDisplayWidth

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextItem

GetTextLen

GetVisibleNode

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertControl

InsertObject

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

Loaded

LoadFromFile

LoadFromStream

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseDown

MouseWheelHandler

Move

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetDisplayWidth

SetFocus

SetGoodIndex

SetLevel

SetSubComponent

SetTextBuf

SetUpdateState

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomOutline.Destroy
 VCL Reference

TCustomOutline.Destroy

TCustomOutline

Destroys an instance of TCustomOutline.

destructor Destroy; override;

Description

Destroy frees all memory associated with the outline. While Destroy frees the TOutlineNode objects that comprise the outline, any objects associated with those nodes are not freed.


TCustomOutline.Add
 VCL Reference

TCustomOutline.Add

TCustomOutline	See also

Adds a node to the outline.

function Add(Index: LongInt; const Text: string): LongInt;

Description

Use Add to add a TOutlineNode object to the outline. Text specifies the Text property value of the new node.

Index specifies where to add the new node. The new node is positioned in the outline as the last sibling of the node identified by Index. To add nodes to the beginning of the outline, specify zero (0) as the Index parameter.

Nodes that appear after the new node are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

Add returns the Index property of the new node.


TCustomOutline.AddChild
 VCL Reference

TCustomOutline.AddChild

TCustomOutline	See also

Adds a child node to a node in the outline.

function AddChild(Index: LongInt; const Text: string): LongInt;

Description

Use AddChild to add a TOutlineNode object as the child of a node in the outline. Text specifies the Text property value of the new node.

Index specifies where to add the new node. The new node is positioned in the outline as the last child of the node identified by Index. To add nodes to the top level of the outline (off the root), specify zero (0) as the Index parameter.

Nodes that appear after the new node are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

AddChild returns the Index property of the new node.


TCustomOutline.AddChildObject
 VCL Reference

TCustomOutline.AddChildObject

TCustomOutline	See also

Adds a child node containing data to a node in the outline.

function AddChildObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;

Description

Use AddChildObject to add a TOutlineNode object as the child of a node in the outline and assign it a data pointer. Text specifies the value of the Text property for the new node. Data specifies the value of the Data property for the new node.

Index specifies where to add the new node. The new node is positioned in the outline as the last child of the node identified by Index. To add nodes to the top level of the outline (off the root), specify zero (0) as the Index parameter.

Nodes that appear after the new node are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

AddChildObject returns the Index property of the new node.


TCustomOutline.AddObject
 VCL Reference

TCustomOutline.AddObject

TCustomOutline	See also

Adds a node containing data to the outline.

function AddObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;

Description

Use AddObject to add a TOutlineNode object to the outline and assign it a data pointer. Text specifies the value of the Text property for the new node. Data specifies the value of the Data property for the new node.

Index specifies where to add the new node. The new node is positioned in the outline as the last sibling of the node identified by Index. To add nodes to the beginning of the outline, specify zero (0) as the Index parameter.

Nodes that appear after the new node are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

AddChild returns the Index property of the new node.


TCustomOutline.BadIndex
 VCL Reference

TCustomOutline.BadIndex

TCustomOutline	See also

Indicates whether a node’s index is up to date.

function BadIndex(Value: TOutlineNode): Boolean;

Description

Use BadIndex to determine whether the Index property of the TOutlineNode object specified by the Value parameter accurately reflects the position of the node in the outline.

If nodes are added or removed after a call to BeginUpdate, the indexes may be out of date until the EndUpdate method is called.


TCustomOutline.BeginUpdate
 VCL Reference

TCustomOutline.BeginUpdate

TCustomOutline	See also

Prevents the updating of the outline until the EndUpdate method is called.

procedure BeginUpdate;

Description

Call BeginUpdate before adding, removing, or moving multiple outline items. BeginUpdate speeds processing time by deferring repaints and the adjustment of index values until EndUpdate is called.

Note:	Make sure that EndUpdate is called after all changes have been made to the nodes in the Items array.


TCustomOutline.Clear
 VCL Reference

TCustomOutline.Clear

TCustomOutline

Removes all items from the outline.

procedure Clear;

Description

Call Clear to empty the outline of all its nodes. Clear frees the memory for the removed items but not any memory for associated data.


TCustomOutline.Click
 VCL Reference

TCustomOutline.Click

TCustomOutline	See also

Updates the SelectedItem property.

procedure Click; override;

Description

Click is called automatically when the user clicks the mouse on a node in the outline. Click updates the SelectedItem property before the OnClick event handler is called by the inherited method.


TCustomOutline.Collapse
 VCL Reference

TCustomOutline.Collapse

TCustomOutline	See also

Generates an OnCollapse event.

procedure Collapse(Index: LongInt); dynamic;

Description

Collapse is called automatically after a node in the outline is collapsed. It calls the OnCollapse event handler if it is assigned.

Override the Collapse method to provide additional processing after nodes in the outline have been collapsed, or to block the OnCollapse event.


TCustomOutline.DblClick
 VCL Reference

TCustomOutline.DblClick

TCustomOutline	See also

Expands or collapses the selected node.

procedure DblClick; override;

Description

DblClick is called automatically when the user double clicks the mouse on a node in the outline. After calling the OnDblClick event handler, DblClick updates the SelectedItem property and expands the selected node if it is collapsed or collapses the selected node if it is expanded.


TCustomOutline.DefineProperties
 VCL Reference

TCustomOutline.DefineProperties

TCustomOutline	See also

Creates a binary property for customized bitmap values.

procedure DefineProperties(Filer: TFiler); override;

Description

The streaming system calls DefineProperties to allow the outline to define new properties that should be saved with the outline object. DefineProperties checks whether the outline uses any bitmaps other than the default values of PictureClosed, PictureLeaf, PictureMinus, PictureOpen, and PicturePlus. If the outline has customized any of these bitmaps, DefineProperties uses the DefineBinaryProperty method of the Filer parameter to create a binary property for the customized values.


TCustomOutline.Delete
 VCL Reference

TCustomOutline.Delete

TCustomOutline	See also

Deletes a node from the outline.

procedure Delete(Index: LongInt);

Description

Call Delete to remove a node and all its descendants from the outline. Index is the index of the node to delete.

Delete removes the node and its children, frees all associated memory, and then calls DeleteNode to update the indexes and make sure that SelectedItem is valid.


TCustomOutline.DeleteNode
 VCL Reference

TCustomOutline.DeleteNode

TCustomOutline	See also

Fixes up the outline after a node has been deleted.

procedure DeleteNode(Node: TOutlineNode; CurIndex: LongInt);

Description

DeleteNode is called automatically whenever a node in the outline is destroyed. It fixes up the index and makes sure that the SelectedItem property is valid.

To Delete a node from the outline, call the Delete method of the outline or the Free method of the TOulineNode object.


TCustomOutline.DrawCell
 VCL Reference

TCustomOutline.DrawCell

TCustomOutline	See also

Draws a node in the outline.

procedure DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); override;

Description

DrawCell is called automatically whenever the outline needs to draw a node. If the Style property is otOwnerDraw and an OnDrawItem event handler has been supplied, DrawCell generates an OnDrawItem event. Otherwise, DrawCell draws the node in the manner indicated by the OutlineStyle property.


TCustomOutline.EndUpdate
 VCL Reference

TCustomOutline.EndUpdate

TCustomOutline	See also

Performs the reindexing and repaints deferred by a call to BeginUpdate.

procedure EndUpdate;

Description

Call EndUpdate at the end of a segment of code that began with a call to BeginUpdate. Every time BeginUpdate is called, an internal counter is incremented. When EndUpdate is called, the counter is decremented. When every call to BeginUpdate has been matched by a call to EndUpdate, EndUpdate fixes up the indexes and repaints the outline.


TCustomOutline.Expand
 VCL Reference

TCustomOutline.Expand

TCustomOutline	See also

Generates an OnExpand event.

procedure Expand(Index: LongInt); dynamic;

Description

Expand is called automatically after a node in the outline is expanded. It calls the OnExpand event handler if it is assigned.

Override the Expand method to provide additional processing after nodes in the outline have been expanded, or to block the OnExpand event.


TCustomOutline.FullCollapse
 VCL Reference

TCustomOutline.FullCollapse

TCustomOutline	See also

Causes all top-level nodes in the outline to collapse.

procedure FullCollapse;

Description

Call FullCollapse to shrink the outline as much as possible. FullCollapse sets the Expanded property of each TOutlineNode that is a direct descendant of the root of the outline to false. This causes all the descendants of these top-level nodes to be hidden. Depending on the value of OutlineStyle, each collapsed top-level node is then represented with the PictureClosed bitmap and/or the PicturePlus bitmap.


TCustomOutline.FullExpand
 VCL Reference

TCustomOutline.FullExpand

TCustomOutline	See also

Expands every node in the outline.

procedure FullExpand;

Description

Call FullExpand to show all nodes in the outline. FullExpand calls the FullExpand method of the root node. This causes the Expanded property of all nodes in the outline to be set to true. Every node in the Items array appears fully expanded in the outline. Depending on the value of OutlineStyle, each node that has descendants is then represented with the PictureOpen bitmap and/or the PictureMinus bitmap. The appearance of leaf nodes is unaffected.


TCustomOutline.GetDataItem
 VCL Reference

TCustomOutline.GetDataItem

TCustomOutline	See also

Returns the index of the first node in the outline that has the Value pointer as its Data property.

function GetDataItem(Value: Pointer): Longint;

Description

Call GetDataItem to locate the node that corresponds to the Value parameter. GetDataItem returns an index into the Items property array.


TCustomOutline.GetItem
 VCL Reference

TCustomOutline.GetItem

TCustomOutline	See also

Returns the index of the node at the position indicated by the X and Y parameters.

function GetItem(X, Y: Integer): LongInt;

Description

Call GetItem to locate the node at the specified screen pixel coordinates. GetItem returns an index into the Items property array.


TCustomOutline.GetNodeDisplayWidth
 VCL Reference

TCustomOutline.GetNodeDisplayWidth

TCustomOutline	See also

Returns the length of the row containing a specified node.

function GetNodeDisplayWidth(Node: TOutlineNode): Integer;

Description

Call GetNodeDisplayWidth to determine the length, in pixels, of the line in the outline that contains the node specified by the Node parameter. GetNodeDisplayWidth adjusts for the lines and bitmaps specified by the OutlineStyle property.


TCustomOutline.GetTextItem
 VCL Reference

TCustomOutline.GetTextItem

TCustomOutline	See also

Returns the index of the first node in the outline with the Value parameter as its Text property.

function GetTextItem(const Value: string): Longint;

Description

Call GetTextItem to locate the node that corresponds to the Value parameter. GetTextItem returns an index into the Items property array.


TCustomOutline.GetVisibleNode
 VCL Reference

TCustomOutline.GetVisibleNode

TCustomOutline	See also

Returns the TOutlineNode object for the node indicated by a position in the image of the outline.

function GetVisibleNode(Index: LongInt): TOutlineNode;

Description

Call GetVisibleNode to locate a node with the position given by the Index parameter, where all nodes that are hidden because their parent node is collapsed are ignored. An Index of 0 indicates the first visible node, an Index of 1 indicates the second visible node, and so on. If the outline is fully expanded, GetVisibleNode returns the value of Items[Index+1].


TCustomOutline.Insert
 VCL Reference

TCustomOutline.Insert

TCustomOutline	See also

Inserts a node at a specified position.

function Insert(Index: LongInt; const Text: string): LongInt;

Description

Use Insert to add a TOutlineNode object to the outline. Text specifies the Text property value of the new node.

Index specifies where to add the new node. The new node is positioned in the outline in the position currently occupied by the node identified by Index. The new node is inserted at the same level as the node currently identified by Index, so that the original node and the new node are siblings and share the same parent. To add nodes to the beginning of the outline, specify zero (0) as the Index parameter.

Nodes that appear after the new node, including the one specified by Index before Insert is called, are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

Insert returns the Index property of the new node.


TCustomOutline.InsertObject
 VCL Reference

TCustomOutline.InsertObject

TCustomOutline	See also

Inserts a node containing data at a specified position.

function InsertObject(Index: LongInt; const Text: string; const Data: Pointer): LongInt;

Description

Use InsertObject to add a TOutlineNode object to the outline and assign it a data pointer. Text specifies the value of the Text property for the new node. Data specifies the value of the Data property for the new node.

Index specifies where to add the new node. The new node is positioned in the outline in the position currently occupied by the node identified by Index. The new node is inserted at the same level as the node currently identified by Index, so that the original node and the new node are siblings and share the same parent. To add nodes to the beginning of the outline, specify zero (0) as the Index parameter.

Nodes that appear after the new node, including the one specified by Index before Insert is called, are moved down one row and reindexed in the Items property array with valid Index values. If BeginUpdate has been called, the Items array is not reindexed until the EndUpdate method is called.

Insert returns the Index property of the new node.


TCustomOutline.KeyDown
 VCL Reference

TCustomOutline.KeyDown

TCustomOutline	See also

Provides special processing when the user presses a key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

KeyDown is called automatically when the user presses a key. After calling the inherited method, which generates an OnKeyDown event, KeyDown processes the following keystrokes:

Key	Behavior

Home	Selects the first node in the outline.

End	Selects the last node in the outline.

Return	Toggles the selected node between its collapsed and expanded states.

Ctrl+*	Fully expands the outline.

Right arrow	Selects the first child of the selected node.

Left arrow	Selects the parent of the selected node.

Ctrl+Up arrow	Selects the node following the selected node.

Ctrl+Down arrow	Selects the node preceding the selected node.


TCustomOutline.KeyPress
 VCL Reference

TCustomOutline.KeyPress

TCustomOutline	See also

Provides special processing when a key is pressed.

procedure KeyPress(var Key: Char); override;

Description

KeyPress is called automatically after the user presses a key but before it is released. After calling the inherited method, which generates an OnKeyPress event, KeyPress processes the following characters :

Key	Behavior

+	Expands the selected node.

-	Collapses the selected node.

*	Fully expands the outline.


TCustomOutline.Loaded
 VCL Reference

TCustomOutline.Loaded

TCustomOutline	See also

Sets up the outline after it has been streamed in.

procedure Loaded; override;

Description

The streaming system calls Loaded after the outline has been fully loaded into memory. Loaded makes sure that all indexes are correct, loads any custom bitmaps that replaced the default values, and selects the first node in the outline.


TCustomOutline.LoadFromFile
 VCL Reference

TCustomOutline.LoadFromFile

TCustomOutline	See also

Loads the outline from a text image stored in a file.

procedure LoadFromFile(const FileName: string);

Description

Call LoadFromFile to fill an outline from the file specified by the FileName parameter. Each line in the file represents a node in the outline. The file does not include the root node.

Leading tabs and spaces are converted into levels of the outline. Text without any leading tabs or spaces becomes level 1 items. For example, the following set of strings represents an outline with three first level children descended from the root, and an additional, second level child on the first and third nodes:

ChildA

 ChildA1

ChildB

ChildC

 ChildC1

To fill the outline from a text image read from a stream, use the LoadFromStream method. To fill the outline from a text image represented as a TStrings object, use the Lines property.


TCustomOutline.LoadFromStream
 VCL Reference

TCustomOutline.LoadFromStream

TCustomOutline	See also

Loads the outline from a text image read from a stream.

procedure LoadFromStream(Stream: TStream);

Description

Call LoadFromStream to fill an outline from the stream specified by the Stream parameter. For example, use LoadFromStream to load an outline from an image stored in a database table, using a TBlobStream object. Each node in the outline is separated by a newline character. The stream does not provide the root node.

Leading tabs and spaces are converted into levels of the outline. Text without any leading tabs or spaces becomes level 1 items. For example, the following set of strings represents an outline with three first level children descended from the root, and an additional, second level child on the first and third nodes:

ChildA

 ChildA1

ChildB

ChildC

 ChildC1

To fill the outline from a text image read from a file, use the LoadFromFile method. To fill the outline from a text image represented as a TStrings object, use the Lines property.


TCustomOutline.MouseDown
 VCL Reference

TCustomOutline.MouseDown

TCustomOutline	See also

Updates the SelectedItem property.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

After calling the inherited method to generate an OnMouseDown event and locate the line under the mouse, MouseDown sets the SelectedItem property to the node in the line under the mouse.


TCustomOutline.Move
 VCL Reference

TCustomOutline.Move

TCustomOutline	See also

Repositions a node in the outline.

procedure Move(Destination, Source: LongInt; AttachMode: TAttachMode);

Description

Call Move to reposition the node with the index specified by the Source parameter to the position indicated by the Destination parameter. The meaning of the Destination parameter depends on the value of the AttachMode parameter.


TCustomOutline.SaveToFile
 VCL Reference

TCustomOutline.SaveToFile

TCustomOutline	See also

Saves the Lines property to a file.

procedure SaveToFile(const FileName: string);

Description

Call SaveToFile to save a text image of the outline to the file specified by the FileName parameter. The image saved is the value of the Lines property, where each line of the file represents a node, and each level of the outline is represented by a tab character.

To write the outline to an arbitrary stream, use the SaveToStream method.


TCustomOutline.SaveToStream
 VCL Reference

TCustomOutline.SaveToStream

TCustomOutline	See also

Writes the Lines property to a stream.

procedure SaveToStream(Stream: TStream);

Description

Call SaveToStream to write a text image of the outline to the stream specified by the Stream parameter. The image saved is the value of the Lines property, where each line of text represents a node, and each level of the outline is represented by a tab character.

To write the outline to a file, use the SaveToFile method.


TCustomOutline.SetDisplayWidth
 VCL Reference

TCustomOutline.SetDisplayWidth

TCustomOutline	See also

Sets the display width of the outline.

procedure SetDisplayWidth(Value: Integer);

Description

Call SetDisplayWidth to set the width of the image of the outline to the number of pixels specified by the Value parameter. Value should large enough to display the most deeply nested node. Use the GetNodeDisplayWidth method to determine the size needed to display the visible nodes.

If the display width is greater than the client width of the control, users can scroll the image to view the entire width.


TCustomOutline.SetGoodIndex
 VCL Reference

TCustomOutline.SetGoodIndex

TCustomOutline	See also

Rturns the first node in the Items array that must be reindexed to make the index of the Value parameter correct.

function SetGoodIndex(Value: TOutlineNode): TOutlineNode;

Description

Call SetGoodIndex to determine how much of the Items array must be reindexed after changing the nodes in the outline. All nodes from the root to the value returned by SetGoodIndex do not need to be reindexed.


TCustomOutline.SetLevel
 VCL Reference

TCustomOutline.SetLevel

TCustomOutline	See also

Sets the level of an outline node.

procedure SetLevel(Node: TOutlineNode; CurLevel, NewLevel: Cardinal);

Description

Call SetLevel to change the nesting depth of the node specified by the Node parameter. CurLevel is the node’s current level and NewLevel is the node’s new level.

For example, consider the outline specified by the following value of Lines:

NodeA

 NodeB

  NodeC

 NodeD

Calling SetLevel for NodeD with CurLevel set to 2 and NewLevel set to 4 results in the outline with the following value of Lines:

NodeA

 NodeB

  NodeC

   NodeD

That is, the parent of NodeD was changed from NodeA to NodeC.


TCustomOutline.SetUpdateState
 VCL Reference

TCustomOutline.SetUpdateState

TCustomOutline	See also

Enables or disables the maintenance of the node indexes.

procedure SetUpdateState(Value: Boolean);

Description

Call SetUpdateState with Value set to true to block the recomputation of indexes. Call SetUpdateState with Value set to false to recompute all indexes in the outline and enable the maintenance of indexes with every change to the nodes in the outline.

Unlike calls to BeginUpdate and EndUpdate, calls to SetUpdateState do not nest: Calling SetUpdateState with Value set to false always recomputes the indexes regardless of the number of previous calls to SetUpdateState with Value set to true.

Note:	Calling SetUpdateState takes precedence over any enabling or disabling of index maintenance provided by BeginUpdate or EndUpdate.


TCustomOutline.Create
 VCL Reference

TCustomOutline.Create

TCustomOutline	See also

Creates an instance of TCustomOutline.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TCustomOutline object at runtime. Outlines placed on forms at design time are created automatically.

Create initializes the outline object, setting the values of some internal properties, as well as setting

Color to clWindow and ParentColor to false.

Height to 97 and Width to 121.

ItemSeparator to ’\’.

Options to [ooDrawTreeRoot, ooDrawFocusRect].

OutlineStyle to osTreePictureText.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomOutline


TCustomPanel
 VCL Reference

TCustomPanel

Hierarchy	Properties	Methods	See also

TCustomPanel is the base class for all panel components.

Unit

ExtCtrls

Description

Use TCustomPanel as a base class when defining objects that include other controls as constituent parts. Panel components are controls can contain other controls, grouping them together.

When a panel is aligned with the form using the Align property, it maintains the same relative position to the form even when the form is resized. For example, a panel can be aligned so that it always remains on the top of the form, even when the user changes the shape and size of the form. This makes panels useful for implementing components that act like tool bars or status bars. For example, construct a tool bar or tool palette by adding speed buttons that execute commands or set modes to a panel .


 VCL Reference

TCustomPanel properties

TCustomPanel	Alphabetically	Legend

In TCustomPanel

Alignment

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

FullRepaint

Locked

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomPanel properties

TCustomPanel	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BevelInner

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

FullRepaint

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

Locked

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UseDockManager

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomPanel.Alignment
 VCL Reference

TCustomPanel.Alignment

TCustomPanel	See also

Determines how the caption is aligned within the panel.

property Alignment: TAlignment;

Description

Use the Alignment property to specify if the caption of a panel appears on the left, right, or center of the panel. For example, to use a panel as a status bar that displays the TApplication.Hint property as the panel’s Caption property, set Alignment to taLeftJustify to place the hint text on the left side of the panel.


TCustomPanel.BevelInner
 VCL Reference

TCustomPanel.BevelInner

TCustomPanel	See also 	Example

Determines the style of the inner bevel of a panel.

type TPanelBevel = TBevelCut;

property BevelInner: TPanelBevel;

Description

Use BevelInner to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the BorderWidth property. The width of the bevels, if they are drawn, is the BevelWidth property.

The BevelInner property determines the style of the inner bevel of a panel component.


TCustomPanel.BevelOuter
 VCL Reference

TCustomPanel.BevelOuter

TCustomPanel	See also 	Example

Determines the style of the outer bevel of a panel.

type TPanelBevel = TBevelCut;

property BevelInner: TPanelBevel;

Description

Use BevelOuter to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the BorderWidth property. The width of the outer bevel is specified in the BevelWidth property in pixels.


TCustomPanel.BevelWidth
 VCL Reference

TCustomPanel.BevelWidth

TCustomPanel	See also 	Example

Determines the width, in pixels, of both the inner and outer bevels of a panel.

type TBevelWidth = 1..MaxInt;

property BevelWidth: TBevelWidth;

Description

Use BevelWidth to specify how wide the inner or outer bevel should be. Do not confuse BevelWidth, which is the width of the bevels, with BorderWidth, which is the space between the bevels.

If both the BevelInner and BevelOuter properties are bvNone, BevelWidth has no effect. To remove both bevels, set the BevelInner and BevelOuter properties to bvNone, rather than setting the BevelWidth to 0, as this involves less overhead when painting.


TCustomPanel.BorderStyle
 VCL Reference

TCustomPanel.BorderStyle

TCustomPanel	See also

Determines the style of the line drawn around the perimeter of the panel control.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to specify whether the panel has a single line drawn around it. These are the possible values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border

Do not confuse the line drawn around the panel with the BorderWidth of the panel. The BorderWidth of the panel is the distance between the outer and inner bevels.


TCustomPanel.BorderWidth
 VCL Reference

TCustomPanel.BorderWidth

TCustomPanel	See also 	Example

Specifies the distance, in pixels, between the outer and inner bevels.

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to specify how wide the border around the panel should be. A value of 0 (zero) means no border should appear.

The border of a panel is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the caption within the panel even if BevelInner is bvNone. If the Alignment property is not taCenter, the Caption will be aligned to the inner edge of the border. This edge is BorderWidth pixels in from the outer bevel if BevelInner is bvNone. It is the inner edge of the inner bevel otherwise.

Do not confuse the border of the panel with line drawn around the panel itself. The line around the panel is specified by the BorderStyle property.


TCustomPanel.FullRepaint
 VCL Reference

TCustomPanel.FullRepaint

TCustomPanel	See also

Determines how the panel repaints itself when it is resized.

property FullRepaint: Boolean;

Description

FullRepaint controls how the panel responds when it is resized. When FullRepaint is True, the entire panel, including the beveled border repaints when the size changes. When FullRepaint is False, only the area inside the beveled border repaints.


TCustomPanel.Locked
 VCL Reference

TCustomPanel.Locked

TCustomPanel	See also

Determines whether a panel that is used as a toolbar is replaced by a toolbar supplied by an OLE server.

property Locked: Boolean;

Description

Set the Locked property to False when the panel is used as a toolbar by a TOleContainer component. Any panels aligned to a TOleContainer are assumed to be replaceable toolbars unless the Locked property is True. Prevent the panel from being replaced by an OLE server’s toolbar by setting the panel's Locked property to True.

Note:	An OLE application's toolbars must be in panels aligned to a side of the form (that is, their Align properties must be set to alTop, alBottom, alLeft, or alRight).


 VCL Reference

TCustomPanel methods

TCustomPanel	Alphabetically	Legend

In TCustomPanel

AdjustClientRect

CanAutoSize

Create

CreateParams

GetControlsAlignment

Paint

Derived from TCustomControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomPanel methods

TCustomPanel	By object	Legend

AdjustClientRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanAutoSize

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomPanel.AdjustClientRect
 VCL Reference

TCustomPanel.AdjustClientRect

TCustomPanel	See also

Adjusts the ClientRect property for the idiosyncrasies of the window.

procedure AdjustClientRect(var Rect: TRect); override;

Description

AdjustClientRect is called internally when the panel needs accurate information on where to place child controls within the client area. AdjustClientRect reduces ClientRect by the width of the inner and outer bevels so that child objects are not placed on the beveled region.


TCustomPanel.CanAutoSize
 VCL Reference

TCustomPanel.CanAutoSize

TCustomPanel	See also

Adjusts the way the panel responds to resize attempts.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanAutoSize is called automatically when the AutoSize property is True and an attempt is made to resize the panel. It allows the panel to implement the AutoSize property before the resize sequence that begins with the OnCanResize and OnConstrainedResize events and ends with the OnResize event.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the panel. CanAutoSize adjusts these values so that the panel’s size adjusts to its contents. If the adjustment results in values of NewWidth and NewHeight that differ from the panel’s current width and height, CanAutoSize returns True, indicating that the resize sequence should proceed. If, after adjustment, NewWidth and NewHeight equal Width and Height, CanAutoSize returns False, and the resize sequence is aborted.


TCustomPanel.Create
 VCL Reference

TCustomPanel.Create

TCustomPanel	See also

Creates and initializes an instance of TCustomPanel.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically.

AOwner is the component, typically a form, that is responsible for freeing the panel.


TCustomPanel.CreateParams
 VCL Reference

TCustomPanel.CreateParams

TCustomPanel	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams is called automatically to initialize the window-creation parameters whenever the window for the panel needs to be created. CreateParams overrides the inherited method to implement the BorderStyle property.


TCustomPanel.GetControlsAlignment
 VCL Reference

TCustomPanel.GetControlsAlignment

TCustomPanel	See also

Returns the alignment of text in the panel.

function GetControlsAlignment: TAlignment; override;

Description

GetControlsAlignment returns the value of the Alignment property.


TCustomPanel.Paint
 VCL Reference

TCustomPanel.Paint

TCustomPanel	See also

Renders the image of the panel.

procedure Paint; override;

Description

Override the Paint method to change the way the panel is drawn. The Paint method for TCustomPanel draws the bevels of the panel, sets the brush and font for the panel, and fills in the interior of the panel. Finally, Paint writes the value of Caption on the panel.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel


TCustomRadioGroup
 VCL Reference

TCustomRadioGroup

Hierarchy	Properties	Methods	See also

TCustomRadioGroup is the base class for radio-group components.

Unit

ExtCtrls

Description

Radio groups are collections of radio buttons in a single group box. TCustomRadioGroup is the class from which radio-group components—including TRadioGroup and TDBRadioGroup—descend.

Radio buttons that are contained directly in the same control component are said to be “grouped.” When the user checks a radio button, all other radio buttons in its group become unchecked. Hence, two radio buttons on a form can be checked at the same time only if they are placed in separate containers, such as group boxes.

If the BiDiMode changes, the positions of the radio buttons are flipped.


 VCL Reference

TCustomRadioGroup properties

TCustomRadioGroup	Alphabetically	Legend

In TCustomRadioGroup

Columns

ItemIndex

Items

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomRadioGroup properties

TCustomRadioGroup	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Items

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomRadioGroup.Columns
 VCL Reference

TCustomRadioGroup.Columns

TCustomRadioGroup

Specifies number of columns in the radio group.

property Columns: Integer;

Description

Columns determines the number of columns in the radio group. Its value can range from 1 to 16. The default value is 1, which means that the radio buttons are arranged in a single vertical line.


TCustomRadioGroup.ItemIndex
 VCL Reference

TCustomRadioGroup.ItemIndex

TCustomRadioGroup	See also	Example

Indicates which radio button in the group is currently selected.

property ItemIndex: Integer

Description

ItemIndex holds the index of the selected radio button in the Items list. (The first button is 0.) The value of ItemIndex changes at runtime as the user selects radio buttons. If you want one of the buttons to appear selected when the application starts, assign that button to ItemIndex at design time; otherwise, leave ItemIndex set to the default value of -1, which means that no button is selected.


TCustomRadioGroup.Items
 VCL Reference

TCustomRadioGroup.Items

TCustomRadioGroup	See also 	Example

Lists the radio buttons in the radio group.

property Items: TStrings

Description

Items holds a TStrings object that lists the captions of the radio buttons in the group. In TCustomRadioGroup descendants, where this property is published, radio buttons can be added or removed by editing the Items list from the Object Inspector.

Note:	The items in a radio-group object are special instances of TRadioButton generated by TCustomRadioGroup. Independently created TRadioButton instances cannot be included in a radio group.


 VCL Reference

TCustomRadioGroup methods

TCustomRadioGroup	Alphabetically	Legend

In TCustomRadioGroup

CanModify

Create

Destroy

FlipChildren

GetChildren

Loaded

ReadState

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomRadioGroup methods

TCustomRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanModify

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

ReadState

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomRadioGroup.CanModify
 VCL Reference

TCustomRadioGroup.CanModify

TCustomRadioGroup	See also

Determines whether the user can select a different radio button in the group.

function CanModify: Boolean; virtual;

Description

Event handlers call CanModify to verify that the user is allowed to select a different radio button in the group. As defined in TCustomRadioGroup, this method always returns True; override it to return False in situations where the user should not be able to make changes.


TCustomRadioGroup.Create
 VCL Reference

TCustomRadioGroup.Create

TCustomRadioGroup	See also

Creates and initializes a TCustomRadioGroup instance.

constructor Create(AOwner: TComponent); override;

Description


TCustomRadioGroup.Destroy
 VCL Reference

TCustomRadioGroup.Destroy

TCustomRadioGroup 	See also

Destroys the TCustomRadioGroup instance and the radio buttons it contains.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the radio group is not nil, and only then calls Destroy.

Destroy frees the memory for each item in the group, then calls the inherited destructor.


TCustomRadioGroup.FlipChildren
 VCL Reference

TCustomRadioGroup.FlipChildren

TCustomRadioGroup 	See also

Prevents the default behavior of flipping the child radio buttons.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren overrides the inherited FlipChildren method to disable flipping the radio buttons.

To flip the children of a radio group, use the BiDiMode property.


TCustomRadioGroup.GetChildren
 VCL Reference

TCustomRadioGroup.GetChildren

TCustomRadioGroup	See also

Prevents the streaming system from loading and saving child controls in the usual fashion.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is called in the streaming sequence that loads and saves VCL components. Because radio groups load and save their buttons using the ReadState and WriteState methods, TCustomRadioGroup overrides TWinControl to disable the GetChildren method.


TCustomRadioGroup.Loaded
 VCL Reference

TCustomRadioGroup.Loaded

TCustomRadioGroup	See also

Initializes the radio group after it is loaded into memory.

procedure Loaded; override;

Description

Do not call Loaded. The component streaming system calls Loaded automatically after the radio group’s form is loaded into memory so that it can complete any initializations that depend on other objects in the form.

Loaded overrides the inherited method to ensure that the buttons in the group are properly arranged.


TCustomRadioGroup.ReadState
 VCL Reference

TCustomRadioGroup.ReadState

TCustomRadioGroup	See also

Reads the radio group’s data from a stream.

procedure ReadState(Reader: TReader); override;

Description

ReadState is part of a sequence of calls used by the streaming system that loads and saves VCL components.  It reads the values of all the radio groups published properties, stored data, and owned components from the reader object passed in Reader. Do not call ReadState directly.

ReadState calls the inherited ReadState method to read the radio group’s published properties and other stored data to a reader object. It then initializes and redraws the buttons in the group.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGroupBox

TCustomRadioGroup


TCustomTabControl
 VCL Reference

TCustomTabControl

Hierarchy	Properties	Methods	Events	See also

TCustomTabControl is the base type for tab-control components such as TTabControl and TPageControl.

Unit

ComCtrls

Description

Use TCustomTabControl as a base class when defining a control that includes a set of notebook style tabs across the top. TCustomTabControl introduces many properties, methods, and events to manage appearance and behavior of the tabs, and to respond when the user selects one of the tabs.


 VCL Reference

TCustomTabControl Properties

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

Canvas

DisplayRect

HotTrack

Images

MultiLine

MultiSelect

OwnerDraw

RaggedRight

ScrollOpposite

Style

TabHeight

TabIndex

TabPosition

Tabs

TabWidth

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomTabControl Properties

TCustomTabControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DisplayRect

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotTrack

Images

Left

LRDockWidth

MultiLine

MultiSelect

Name

Owner

OwnerDraw

Parent

ParentWindow

RaggedRight

ScrollOpposite

ShowHint

Showing

Style

TabHeight

TabIndex

TabOrder

TabPosition

Tabs

TabStop

TabWidth

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomTabControl.Canvas
 VCL Reference

TCustomTabControl.Canvas

TCustomTabControl	See also

Gives access to the tab control’s canvas.

property Canvas: TCanvas;

Description

Use Canvas to paint to the tab control’s canvas during the OnDrawTab event.


TCustomTabControl.DisplayRect
 VCL Reference

TCustomTabControl.DisplayRect

TCustomTabControl	See also

Specifies the bounding rectangle of a tab control client area.

property DisplayRect: TRect;

Description

Use DisplayRect to obtain the coordinates, in pixels, of the portion of the tab control that represents the contents of the tab pages. The appearance of this portion of the tab control does not change when different tabs are selected.

Use DisplayRect rather than the ClientRect property to determine the portion of the tab control that can contain other objects.


TCustomTabControl.HotTrack
 VCL Reference

TCustomTabControl.HotTrack

TCustomTabControl	See also

Determines whether labels on the tab under the mouse are automatically highlighted.

property HotTrack: Boolean;

Description

Set HotTrack to True to provide visual feedback to the user about which tab would be selected if the mouse button is clicked. HotTrack is especially useful when the tab control contains multiple rows of tabs.


TCustomTabControl.Images
 VCL Reference

TCustomTabControl.Images

TCustomTabControl	See also

Specifies the images drawn in tabs.

property Images: TCustomImageList;

Description

Images specifies the images that are drawn in tabs.

In the implementation of TCustomTabControl, the order of images in image list properties directly corresponds to the associated tabs in the control. In the descendant class, TPageControl, this behavior is replaced by support for individual TTabSheet objects, each with an ImageIndex property. In any case, the application programmer can define customized image displays by defining an OnGetImageIndex event handler.


TCustomTabControl.MultiLine
 VCL Reference

TCustomTabControl.MultiLine

TCustomTabControl	See also	Example

Determines whether the tabs can appear on more than one row.

property MultiLine: Boolean;

Description

Use MultiLine to determine how the tabs are displayed. If MultiLine is True, the tabs are displayed on more than one row when the number of tabs exceeds the number that fits across the top of the tab control. How many rows is determined by how many tabs are in the tab control. If MultiLine is False, the tabs are displayed on one row only, and the user must scroll the displayed scroll arrows to view all the tabs.


TCustomTabControl.MultiSelect
 VCL Reference

TCustomTabControl.MultiSelect

TCustomTabControl	See also	Example

Specifies whether multiple tabs can be selected.

property MultiSelect: Boolean;

Description

Use MultiSelect to get or set whether multiple tabs can be selected.

MultiSelect can only be True if Style is tsFlatButtons or tsButtons.


TCustomTabControl.OwnerDraw
 VCL Reference

TCustomTabControl.OwnerDraw

TCustomTabControl	See also

Specifies whether the tab control handles its own painting.

property OwnerDraw: Boolean;

Description

Set OwnerDraw to True to override any default painting behavior.


TCustomTabControl.RaggedRight
 VCL Reference

TCustomTabControl.RaggedRight

TCustomTabControl

Specifies whether rows of tabs stretch to fill the width of the control.

property RaggedRight: Boolean;

Description

Use RaggedRight to get or set whether rows of tabs stretch to fill the width of the control.


TCustomTabControl.ScrollOpposite
 VCL Reference

TCustomTabControl.ScrollOpposite

TCustomTabControl	See also

Determines how the rows of tabs are scrolled in a muliline tab control.

property ScrollOpposite: Boolean;

Description

Set ScrollOpposite to determine where previous rows of tabs in a multi-line tab control move when the user selects a tab in another row. When ScrollOpposite is True, previous rows of tabs are moved to the bottom of the tab control if TabPosition is tpTop, or to the top if TabPosition is tpBottom. When ScrollOpposite is False, previous rows of tabs are moved to the back of all other rows of tabs.

For example, in a tab control with three rows of tabs at the top, if the user selects a tab in the second row, ScrollOpposite determines where the first row moves. If ScrollOpposite is True, the second row now appears at the front (bottom) row on top of the tab control, followed by the third row behind (above) it. The first row moves to the bottom of the tab control. If ScrollOpposite is False, the first row moves to the back (top), so that the tab control displays the second row in front (at the bottom of the tab region), followed by the third row (now in the middle), followed by the first row.

Note:	Setting ScrollOpposite to True automatically sets the MultiLine property to True.


TCustomTabControl.Style
 VCL Reference

TCustomTabControl.Style

TCustomTabControl

Specifies the style of the tab control.

property Style: TTabStyle;

Description

Use Style to determine the appearance of the tabs. These can appear as notebook tabs or as buttons.


TCustomTabControl.TabHeight
 VCL Reference

TCustomTabControl.TabHeight

TCustomTabControl	See also	Example

Specifies the height, in pixels, of the tabs in the tab control.

property TabHeight: Smallint;

Description

Set TabHeight to control the height of the tabs that appear above the client region of the tab control. The TabHeight property is the vertical size in pixels of the individual tabs. If TabHeight is set to 0, the tabs automatically size themselves to fit their text.


TCustomTabControl.TabIndex
 VCL Reference

TCustomTabControl.TabIndex

TCustomTabControl	See also	Example

Identifies the selected tab on a tab control.

property TabIndex: Integer;

Description

Read TabIndex to determine which tab was selected by the user. TabIndex is the index of the tab in the list of labels maintained by the Tabs property. The first (leftmost) tab has a TabIndex of 0, the next has 1, and so on. If no tabs are selected, TabIndex has a value of -1.

Set TabIndex to programmatically change the selected tab in the tab control.


TCustomTabControl.TabPosition
 VCL Reference

TCustomTabControl.TabPosition

TCustomTabControl	See also

Determines whether tabs appear at the top or bottom.

type TTabPosition = (tpTop, tpBottom, tpLeft, tpRight);

property TabPosition: TTabPosition;

Description

Set TabPosition to tpTop to display the tabs at the top of the tab control. Set TabPosition to tpBottom to display the tabs at the bottom. If the ScrollOpposite property is True, tabs can appear at both top and bottom, with the row containing the current tab and all subsequent rows on the side indicated by TabPosition.

Due to a limitation in the windows common control, if TabPosition is tpLeft or tpRight, Font must be a True Type font. Otherwise, tab text may paint incorrectly.


TCustomTabControl.Tabs
 VCL Reference

TCustomTabControl.Tabs

TCustomTabControl	See also	Example

Contains the list of text strings that label the tabs of the tab control.

property Tabs: TStrings;

Description

Use Tabs to access the labels of the tabs in the tab control, or any objects associated with those tabs using the Objects property of the Tabs object. Add new strings to the Tabs property to add new tabs to the tab control. Rearrange the Tabs list to rearrange the tabs in the tab control.


TCustomTabControl.TabWidth
 VCL Reference

TCustomTabControl.TabWidth

TCustomTabControl	See also	Example

Specifies the horizontal size, in pixels, of the tabs in the tab control.

property TabWidth: Smallint;

Description

Set TabWidth to control the width of the tabs that appear above the client region of the tab control. The TabWidth property is the horizontal size in pixels of the individual tabs. If TabWidth is set to 0, the tabs automatically size themselves to fit their text.


 VCL Reference

TCustomTabControl Events

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

OnChange

OnChanging

OnDrawTab

OnGetImageIndex


 VCL Reference

TCustomTabControl Events

TCustomTabControl	By Object	Legend

OnChange

OnChanging

OnDrawTab

OnGetImageIndex


TCustomTabControl.OnChange
 VCL Reference

TCustomTabControl.OnChange

TCustomTabControl	See also	Example

Occursafteranewtabisselected.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action immediately after the selected tab changes. Use the TabIndex property to determine which tab is now selected. This is the opportunity to make any changes to the control that reflect the new state implied by the selected tag.

Before the value of TabIndex changes, an OnChanging event occurs.


TCustomTabControl.OnChanging
 VCL Reference

TCustomTabControl.OnChanging

TCustomTabControl	See also	Example

Occurs immediately before a new tab is selected.

type TTabChangingEvent = procedure (Sender: TObject; var AllowChange: Boolean) of object;

property OnChanging: TTabChangingEvent;

Description

Write an OnChanging event handler to take specific action immediately before the selected tab changes. Set the AllowChange parameter to False to prevent the change.

Use an OnChanging event handler to prevent the user from leaving a tab setting until certain conditions have been met. An OnChanging event handler can also be used to save information about the current state of the tab control before it is changed by a new tab selection.


TCustomTabControl.OnDrawTab
 VCL Reference

TCustomTabControl.OnDrawTab

TCustomTabControl	See also

Occurs when a tab is about to be drawn.

property OnDrawTab: TDrawTabEvent;

Description

Use OnDrawTab to customize the painting of tabs.

You can paint the tab using the Canvas property.


TCustomTabControl.OnGetImageIndex
 VCL Reference

TCustomTabControl.OnGetImageIndex

TCustomTabControl	See also

Occurs when a tab is about to display its associated image.

property OnGetImageIndex: TTabGetImageEvent;

Description

Write an OnGetImageIndex event handler to specify the ImageIndex for a given TabIndex.

On entry to the event handler, the ImageIndex parameter is the same as the TabIndex parameter, where TabIndex is the index of the tab which is about to display its image. Change the ImageIndex parameter to specify the index into the Images property that specifies the image that should be painted.


 VCL Reference

TCustomTabControl Methods

TCustomTabControl	Alphabetically	Legend

In TCustomTabControl

AdjustClientRect

CanChange

CanShowTab

Change

Create

CreateParams

CreateWnd

Destroy

DrawTab

GetHitTestInfoAt

GetImageIndex

IndexOfTabAt

Loaded

Notification

RowCount

ScrollTabs

TabRect

UpdateTabImages

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomTabControl Methods

TCustomTabControl	By Object	Legend

AdjustClientRect

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanChange

CanFocus

CanShowTab

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTab

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetHitTestInfoAt

GetImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowCount

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TabRect

Update

UpdateAction

UpdateControlState

UpdateTabImages

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomTabControl.AdjustClientRect
 VCL Reference

TCustomTabControl.AdjustClientRect

TCustomTabControl	See also

Calculates the control’s display area given a rectangle.

procedure AdjustClientRect(var Rect: TRect); override;

Description

AdjustClientRect is called internally when the tab control needs accurate information on where to place child controls within the client area. As implemented in TCustomTabControl, returns the DisplayRect property as the Rect parameter.


TCustomTabControl.CanChange
 VCL Reference

TCustomTabControl.CanChange

TCustomTabControl	See also

Determines whether the selected tab can be changed.

function CanChange: Boolean;

Description

CanChange is called automatically when an attempt is made to change the selected tab. CanChange generates an OnChanging event so that an OnChanging event handler can prevent the selection from changing. If there is no OnChanging event handler, CanChange returns True, allowing the change.

Override CanChange to specify additional processing before the OnChanging event handler executes or to block the OnChanging event.


TCustomTabControl.CanShowTab
 VCL Reference

TCustomTabControl.CanShowTab

TCustomTabControl	See also

Indicates whether the tab can be selected.

function CanShowTab(TabIndex: Integer): Boolean;

Description

Call CanShowTab to determine whether a tab can be selected or accessed. CanShowTab is exposed as a protected method so that descendants can override this method to provide application-specific criteria that determines whether a tab is accessible.

TabIndex is the index of the tab in the list of labels maintained by the Tabs property.

CanShowTab returns a Boolean value that indicates whether the tab specified in TabIndex can be accessed.

Tip:	CanShowTab can be used with such methods as TWinControl.CanFocus, to determine whether the tab can both be accessed and can receive focus. Criteria for an overridden CanShowTab might include checking whether the tab is enabled.


TCustomTabControl.Change
 VCL Reference

TCustomTabControl.Change

TCustomTabControl	See also

Generates an OnChange event.

procedure Change;

Description

Change is called automatically when the selected tab changes. Override Change to specify additional processing before the OnChange event handler executes, or to block the OnChange event.


TCustomTabControl.Create
 VCL Reference

TCustomTabControl.Create

TCustomTabControl	See also

Creates and initializes an instance of TCustomTabControl.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a tab control at runtime. Tab controls placed on forms at design time are created automatically. Create calls the inherited Create method and sets the initial values for the tab control, including the creation of a tab list that contains the text strings for the tabs.

AOwner is a component, typically the form, that is responsible for freeing the tab control. It becomes the value of the Owner property.


TCustomTabControl.CreateParams
 VCL Reference

TCustomTabControl.CreateParams

TCustomTabControl	See also

Sets up the window-creation parameters for the tab control.

procedure CreateParams(var Params: TCreateParams); override;

Description

Tab controls call CreateParams internally when the window for the tab control must be generated. CreateParams overrides the inherited method to specify a tab control window with the current property settings.


TCustomTabControl.CreateWnd
 VCL Reference

TCustomTabControl.CreateWnd

TCustomTabControl	See also

Creates the window for a tab control.

procedure CreateWnd; override;

Description

CreateWnd is called automatically when the tab control’s window is recreated. CreateWnd calls the inherited CreateWnd method, before assigning any saved tab text strings in internal storage.


TCustomTabControl.Destroy
 VCL Reference

TCustomTabControl.Destroy

TCustomTabControl	See also

Destroys an instance of TCustomTabControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use Free. Free checks that the tab control is not nil, and only then calls Destroy. Destroy frees the tab list that holds the list of text strings for the tabs and calls the inherited destructor.


TCustomTabControl.DrawTab
 VCL Reference

TCustomTabControl.DrawTab

TCustomTabControl	See also

Draws a tab.

procedure DrawTab(TabIndex: Integer; const Rect: TRect; Active: Boolean); virtual;

Description

Override DrawTab in a derived class to control the painting of tabs.

TabIndex is the index of the tab that requires painting.

Rect is the area in which the tab should be painted.

Active is whether the tab is active.

Use the Canvas property to paint the tab.


TCustomTabControl.GetHitTestInfoAt
 VCL Reference

TCustomTabControl.GetHitTestInfoAt

TCustomTabControl	See also

Returns information about the location of a point relative to the client area of the tab control.

function GetHitTestInfoAt(X, Y: Integer): THitTests;

Description

Call GetHitTestInfoAt to determine what portion of the tab control, if any, sits under the point specified by the X and Y parameters.

GetHitTestInfo returns a THitTests type. This set describes the possible elements under the mouse. When interpreting these values, each tab can be considered an “item” of the tab control.


TCustomTabControl.GetImageIndex
 VCL Reference

TCustomTabControl.GetImageIndex

TCustomTabControl	See also

Generates an OnGetImageIndex event

function GetImageIndex(TabIndex: Integer): Integer; virtual;

Description

Override GetImageIndex in a derived class to specify the index of the image to display for a particular tab.

TabIndex is the index of the tab that is about to be displayed.

Integer is the index of the image in the Images property that will be displayed in the tab.


TCustomTabControl.IndexOfTabAt
 VCL Reference

TCustomTabControl.IndexOfTabAt

TCustomTabControl	See also

Indicates the index of the tab at a specified point.

function IndexOfTabAt(X, Y: Integer): Integer;

Description

Use IndexOfTabAt to locate which tab is at the point specified by X and Y. If the point with X-coordinate X and Y-coordinate Y is over a tab, IndexOfTabAt returns the 0-offset index of that tab in the Tabs property (TTabControl) or in the Pages property (TPageControl). If the point defined by X and Y is not over a tab, IndexOfTabAt returns –1.


TCustomTabControl.Loaded
 VCL Reference

TCustomTabControl.Loaded

TCustomTabControl	See also

Performs updates when the form containing the tab control is first loaded into memory.

procedure Loaded; override;

Description

The protected Loaded method is called automatically when the form that contains the tab control is loaded into memory. It provides an opportunity for the tab control to perform any initializations after the control and all other components in the form are loaded into memory, but before the first paint operation.

In TCustomTabControl, Loaded ensures that the layout of the tabs accommodate the images specified by the Images property.


TCustomTabControl.Notification
 VCL Reference

TCustomTabControl.Notification

TCustomTabControl	See also

Responds to notifications when objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification checks whether the notification indicates that the component that implements the Images property is about to be destroyed, and if so, sets that property to nil.


TCustomTabControl.RowCount
 VCL Reference

TCustomTabControl.RowCount

TCustomTabControl	See also

Returns the number of rows in a multiline tab control.

function RowCount: Integer;

Description

Use RowCount to determine the number of rows of tabs in the tabbed control. RowCount always returns 1 if the MultiLine property is False.


TCustomTabControl.ScrollTabs
 VCL Reference

TCustomTabControl.ScrollTabs

TCustomTabControl	See also

Scrolls the tabs that are visible when the tab control is not multi-line.

procedure ScrollTabs(Delta: Integer);

Description

Call ScrollTabs to change the tabs that are visible in the tab control. When Delta is positive, Delta additional tabs to the right are scrolled into view. When Delta is negative, the tabs to the left are scrolled into view, with the absolute value of Delta indicating how many tabs are scrolled. If there are fewer than the absolute value of Delta tabs in the indicated direction, ScrollTabs scrolls as far as possible.

ScrollTabs has no effect if there are no scrolled tabs, either because the control is wide enough to display all tabs or because the MultiLine property is True.

Note:	ScrollTabs scrolls the visible tabs. It does not change the current selection. Calling ScrollTabs may scroll the selected tab out of view.


TCustomTabControl.TabRect
 VCL Reference

TCustomTabControl.TabRect

TCustomTabControl	See also

Returns the bounding rectangle for a specified tab.

function TabRect(Index: Integer): TRect;

Description

Use TabRect to determine the current position of the tab with the specified index. Index is the  0-offset index of a tab in the Tabs property (TTabControl) or in the Pages property (TPageControl). TabRect returns the bounding rectangle (in client coordinates) of the specified tab.


TCustomTabControl.UpdateTabImages
 VCL Reference

TCustomTabControl.UpdateTabImages

TCustomTabControl	See also

Updates the tab images.

procedure UpdateTabImages;

Description

UpdateTabImages is called automatically to update the tab images after streaming in the control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTabControl


TDdeClientItem
 VCL Reference

 TDdeClientItem

Hierarchy	Properties	Methods	Events	Using TDdeClientItem	See also

TDdeClientItem defines an item in a DDE conversation.

Unit

DdeMan

Description

Use TDdeClientItem with TDdeClientConv to enable an application to act as a DDE client. A DDE client item specifies a single item supported by a DDE server. A single TDdeClientConv object may be associated with multiple client items. If the DDE client conversation has established a link with a DDE server, the server will automatically and continually update all client items until the conversation is terminated.


 VCL Reference

TDdeClientItem properties

TDdeClientItem	Alphabetically	Legend

In TDdeClientItem

DdeConv

DdeItem

Lines

Text

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDdeClientItem properties

TDdeClientItem	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DdeConv

DdeItem

DesignInfo

Lines

Name

Owner

Tag

Text

VCLComObject


TDdeClientItem.DdeConv
 VCL Reference

TDdeClientItem.DdeConv

TDdeClientItem	See also

Specifies the DDE client conversation to associate with the DDE client item.

property DdeConv: TDDEClientConv;

Description

Set DdeConv to associate the DDE client item with a DDE client conversation. The value of DdeConv is the DDE client conversation object that defines the DDE conversation. The DdeConv establishes the link to the server that provides the Text for the DDE client item.


TDdeClientItem.DdeItem
 VCL Reference

TDdeClientItem.DdeItem

TDdeClientItem	See also 	Example

Specifies the item of a DDE conversation.

property DdeItem: string;

Description

Set the DdeItem property to the name of a DDE item supported by the DDE server. The value of DdeItem depends on the linked DDE server application. DdeItem is typically a selectable portion of text, such as a spreadsheet cell or a database field in an edit box. If the DDE server is a Delphi application, DdeItem is the name of the linked DDE server item.

At design time, specify DdeItem by typing the item string in the object inspector. Alternately, DdeItem can be specified from the DDE conversation by pasting a link using the DDE Info dialog box, which is called by clicking the ellipsis (...) button for DdeService or DdeTopic in the object inspector. After choosing Paste Link in the DDE Info dialog box, choose the item from a list of possible items for DdeItem in the object inspector when link information is on the Clipboard.

Note:	See the documentation for the DDE server application for the specific information about specifying DDE items.


TDdeClientItem.Lines
 VCL Reference

TDdeClientItem.Lines

TDdeClientItem	See also 	Example

Contains the text data to exchange in a DDE conversation.

property Lines: TStrings;

Description

Read Lines to get the text that is updated by the DDE server application. Lines is updated automatically by the DDE server. When Lines is changed by the server, an OnChange event occurs.

Set the Lines property to poke data to the DDE server.

Lines corresponds to the Text property. Whenever the value of Lines or Text is updated, the other is also changed so that the first line of Lines is always equal to Text.

Note:	Lines of data can also be sent to the DDE server by calling the PokeDataLines method of the DDE client conversation.


TDdeClientItem.Text
 VCL Reference

TDdeClientItem.Text

TDdeClientItem	See also

Contains the text data to exchange in a DDE conversation.

property Text: string;

Description

Read Text to get the text that is updated by the DDE server application. Text is updated automatically by the DDE server. When Text is changed by the server, an OnChange event occurs.

Set the Text property to poke data to the DDE server.

Text corresponds to the Lines property. Whenever the value of Lines or Text is updated, the other is also changed so that the first line of Lines is always equal to Text.

For text data longer than the 255 character limit of Text, use the Lines property.

Note:	Data can also be sent to the DDE server by calling the PokeData method of the DDE client conversation.


 VCL Reference

TDdeClientItem events

TDdeClientItem	Alphabetically	Legend

In TDdeClientItem

OnChange


 VCL Reference

TDdeClientItem events

TDdeClientItem	By object	Legend

OnChange


TDdeClientItem.OnChange
 VCL Reference

TDdeClientItem.OnChange

TDdeClientItem	See also 	Example

Occurs immediately after the DDE server updates the Lines property.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action when the DDE server updates the text for this DDE client item. The new value for the DDE client item can be found by reading the Lines or Text property.


 VCL Reference

TDdeClientItem methods

TDdeClientItem	Alphabetically	Legend

In TDdeClientItem

Create

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetParentComponent

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

ExecuteAction

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDdeClientItem methods

TDdeClientItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDdeClientItem.Create
 VCL Reference

TDdeClientItem.Create

TDdeClientItem	See also

Creates an instance of TDdeClientItem.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TDdeClientItem at runtime. After calling the inherited constructor, Create creates a helper object to manage the Lines property.


TDdeClientItem.Destroy
 VCL Reference

TDdeClientItem.Destroy

TDdeClientItem	See also

Destroys an instance of TDdeClientItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDdeClientItem is not nil, and only then calls Destroy.

Destroy frees the memory associated with the Lines property before calling the inherited destructor.


Hierarchy

TObject

TPersistent

TComponent

TDdeClientItem


TDefaultEditor
 VCL Reference

TDefaultEditor

Hierarchy	Properties	Methods	See also

TDefaultEditor is the component editor for components that do not explicitly register a component editor.

Unit

DesignEditors

Description

When a component class does not have a registered property editor, TDefaultEditor controls its response to right clicks, double clicks, and clipboard commands.

TDefaultEditor does not add any custom menu items to the context menu that appears when the user right-clicks a component in the designer, nor does it add any clipboard formats to the standard component format. However, TDefaultEditor does override the Edit method to supply a default response when the user double clicks a component.

The Edit method in TDefaultEditor searches the component for events. If it finds an OnCreate event, it brings up the code editor for the OnCreate event handler. If there is no OnCreate event, it brings up the code editor for the OnChange event handler. If there is no OnChange event, it brings up the code editor for the OnClick event handler. If it finds none of these events, it brings up the code editor for the first event it finds.

Use TDefaultEditor as a base class when creating component editors that bring up the code editor as the default response to a double click.


 VCL Reference

TDefaultEditor properties

TDefaultEditor	Alphabetically 	Legend

Derived from TComponentEditor

Component

Designer

Derived from TInterfacedObject

RefCount


 VCL Reference

TDefaultEditor properties

TDefaultEditor	By object 	Legend

Component

Designer

RefCount


 VCL Reference

TDefaultEditor methods

TDefaultEditor	Alphabetically	Legend

In TDefaultEditor

Edit

EditProperty

Derived from TComponentEditor

Copy

Create

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

PrepareItem

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TDefaultEditor methods

TDefaultEditor	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Copy

Create

DefaultHandler

Destroy

Dispatch

Edit

EditProperty

ExecuteVerb

FieldAddress

Free

FreeInstance

GetComponent

GetDesigner

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetVerb

GetVerbCount

InheritsFrom

InitInstance

InstanceSize

IsInInlined

MethodAddress

MethodName

NewInstance

PrepareItem

SafeCallException


TDefaultEditor.Edit
 VCL Reference

TDefaultEditor.Edit

TDefaultEditor	See also

Responds when the user double-clicks the component in the form designer.

procedure Edit; override;

Description

The Object Inspector calls Edit when the user double-clicks the component. Edit searches the component for events. If it finds an OnCreate event, it brings up the code editor for the OnCreate event handler. If there is no OnCreate event, it brings up the code editor for the OnChange event handler. If there is no OnChange event, it brings up the code editor for the OnClick event handler. If it finds none of these events, it brings up the code editor for the first event it finds.

Note:	Do not override Edit to change the event handler that your component editor displays in the code editor. Instead, override the protected EditProperty method.


TDefaultEditor.EditProperty
 VCL Reference

TDefaultEditor.EditProperty

TDefaultEditor	See also	Example

Scans through the event handlers of the component and selects the one that the Edit method displays.

procedure EditProperty(const Prop: IProperty; var Continue: Boolean); virtual;

Description

The Edit method uses EditProperty to identify the property editor it displays when the user double-clicks. Edit scans through the properties and events of the component, calling EditProperty (indirectly) with the property editor for each property and event. EditProperty sets two internal class members, FBest and FFirst, to the best property editor it finds and the first appropriate property editor it finds. After all the properties and events are scanned or the Continue parameter is set to False, the Edit method calls the Edit method of the property editor selected by EditProperty (FBest if it is available, otherwise FFirst).

As implemented in TDefaultEditor, EditProperty only accepts property editors for events.

Override EditProperty to change the property editor that appears when the user double-clicks the component. You can filter the events that are viewed by TDefaultEditor’s EditProperty method (as shown in the example), or set FBest and FFirst to the property editor you want displayed.

Prop is the interface of the property editor for the current property.

Continue indicates whether the component editor should continue scanning properties. Set Continue to False if the desired property editor has been found and there is no need to continue scanning.


Hierarchy

TObject

TInterfacedObject

TBaseComponentEditor

TComponentEditor

TDefaultEditor


TDirectoryListBox
 VCL Reference

 TDirectoryListBox

Hierarchy	Properties	Methods	Events 	See also

TDirectoryListBox represents a list box control that is aware of the directory structure of the current drive.

Unit

FileCtrl

Description

TDirectoryListBox implements the generic behavior introduced in TCustomListBox. TDirectoryListBox publishes many of the properties inherited from TCustomListBox and introduces new behavior to let the user change directories or drives.


 VCL Reference

TDirectoryListBox properties

TDirectoryListBox	Alphabetically	Legend

In TDirectoryListBox

CaseSensitive

Directory

DirLabel

Drive

FileList

PreserveCase

Derived from TCustomListBox

AutoComplete

Canvas

Columns

Count

IntegralHeight

ItemHeight

ItemIndex

Items

MultiSelect

ScrollWidth

SelCount

Selected

TopIndex

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDirectoryListBox properties

TDirectoryListBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

CaseSensitive

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Ctl3D

Cursor

DesignInfo

Directory

DirLabel

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Drive

Enabled

FileList

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IntegralHeight

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

PreserveCase

ScrollWidth

SelCount

Selected

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDirectoryListBox.CaseSensitive
 VCL Reference

TDirectoryListBox.CaseSensitive

TDirectoryListBox	See also

Indicates whether the system supports case-sensitive directory information.

property CaseSensitive: Boolean;

Description

Read CaseSensitive to ascertain whether the current file system supports case-sensitive file names. CaseSensitive returns True if it does and False if it does not.


TDirectoryListBox.Directory
 VCL Reference

TDirectoryListBox.Directory

TDirectoryListBox	See also 	Example

Determines the current directory for the directory list box control.

property Directory: string;

Description

The directory list box displays the value of the Directory property as the current directory in the list box. The example shows how a directory list box and a file list box can work together through their Directory properties.

If the form contains a file list box, you can set the FileList property to have the file list box automatically display the files from the directory specified by the Directory property.


TDirectoryListBox.DirLabel
 VCL Reference

TDirectoryListBox.DirLabel

TDirectoryListBox	See also 	Example

Provides a simple way to display the current directory as the caption of a label control.

property DirLabel: TLabel;

Description

Use DirLabel to specify a label. When the current directory changes in the directory list box, the change is reflected in the caption of the label.


TDirectoryListBox.Drive
 VCL Reference

TDirectoryListBox.Drive

TDirectoryListBox	See also 	Example

Determines the drive for which the list box displays the directory structure.

property Drive: Char;

Description

When the value of Drive changes, the Directory value changes to the current directory on the specified drive.


TDirectoryListBox.FileList
 VCL Reference

TDirectoryListBox.FileList

TDirectoryListBox	See also 	Example

Provides a simple way to connect a directory list box with a file list box.

property FileList: TFileListBox;

Description

Use FileList to specify a file list box in which to display the files of the current directory.


TDirectoryListBox.PreserveCase
 VCL Reference

TDirectoryListBox.PreserveCase

TDirectoryListBox	See also

Indicates whether the file system preserves the case of file names when writing to disk.

property PreserveCase: Boolean;

Description

Read PreserveCase to ascertain whether the current file system preserves the case of file names. PreserveCase returns True if it does and False if it does not.


 VCL Reference

TDirectoryListBox events

TDirectoryListBox	Alphabetically	Legend

In TDirectoryListBox

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 VCL Reference

TDirectoryListBox events

TDirectoryListBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


TDirectoryListBox.OnChange
 VCL Reference

TDirectoryListBox.OnChange

TDirectoryListBox 	Example

Occurs when the user selects a new directory with the mouse or keyboard when the user moves the selection bar and presses enter.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to perform an action whenever a new directory is selected.


 VCL Reference

TDirectoryListBox methods

TDirectoryListBox	Alphabetically	Legend

In TDirectoryListBox

Create

Destroy

DisplayCase

FileCompareText

GetItemPath

OpenCurrent

Update

Derived from TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

SelectAll

ItemAtPos

ItemRect

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDirectoryListBox methods

TDirectoryListBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DisplayCase

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FileCompareText

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemPath

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

OpenCurrent

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDirectoryListBox.Create
 VCL Reference

TDirectoryListBox.Create

TDirectoryListBox	See also

Creates and initializes a directory list box.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a directory list box at runtime. For directory list boxes created at design time, Create is called automatically.


TDirectoryListBox.Destroy
 VCL Reference

TDirectoryListBox.Destroy

TDirectoryListBox	See also

Disposes of an instance of a directory list box.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free checks that the list box reference is not nil before it calls Destroy.

Destroy frees the bitmaps used for the Open, Close and Current folders, and then calls the inherited Destroy method.


TDirectoryListBox.DisplayCase
 VCL Reference

TDirectoryListBox.DisplayCase

TDirectoryListBox	See also

Preserves or converts the case of the string passed to it.

function DisplayCase(const S: String): string;

Description

DisplayCase converts S to all-lower-case (using the currently installed language driver) if neither PreserveCase nor CaseSensitive is True. Otherwise, it returns S unmodified.


TDirectoryListBox.FileCompareText
 VCL Reference

TDirectoryListBox:.FileCompareText

TDirectoryListBox	See also

Compares two strings, taking into account the case-sensitivity of the file system.

function FileCompareText(const A, B: String): Integer;

Description

If CaseSensitive is False, FileCompareText compares the strings passed to it case-insensitively. Otherwise, it uses AnsiCompareStr to compare the strings.


TDirectoryListBox.GetItemPath
 VCL Reference

TDirectoryListBox.GetItemPath

TDirectoryListBox	See also	Example

Returns the path of a directory in the directory list box.

function GetItemPath(Index : Integer): string;

Description

Use GetItemPath to get the path of a directory by specifying the directory’s index value. The first directory in the list has an index of 0.


TDirectoryListBox.OpenCurrent
 VCL Reference

TDirectoryListBox.OpenCurrent

TDirectoryListBox 	Example

Opens the selected directory.

procedure OpenCurrent;

Description

OpenCurrent opens the directory selected in the directory list box, as if the user had double-clicked the directory.


TDirectoryListBox.Update
 VCL Reference

TDirectoryListBox.Update

TDirectoryListBox 	Example

Refreshes the directory list.

procedure Update; reintroduce;

Description

Call Update to refresh the directory list after new directories have been created or existing directories deleted.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomMultiSelectListControl

TCustomListBox

TDirectoryListBox


TDrawGrid
 VCL Reference

 TDrawGrid

Hierarchy	Properties	Methods	Events	Using TDrawGrid	See also

TDrawGrid represents a grid control that displays information in column and row format.

Unit

Grids

Description

Add a TDrawGrid object to a form to present arbitrary information in a tabular format. TDrawGrid provides many properties to control the appearance of the grid, as well as events and methods that take advantage of the tabular organization of the grid in responding to user actions.

TDrawGrid introduces several events and methods to allow applications to customize the appearance and behavior of the grid.

If the cells of the grid contain text strings that represent objects, consider using a TStringGrid object instead. If the grid displays field values from the records in a dataset, use TDBGrid instead.


 VCL Reference

TDrawGrid properties

TDrawGrid	Alphabetically	Legend

Derived from TCustomGrid

BorderStyle

Col

ColCount

ColWidths

DefaultColWidth

DefaultDrawing

DefaultRowHeight

EditorMode

FixedColor

FixedCols

FixedRows

GridHeight

GridLineWidth

GridWidth

LeftCol

Options

Row

RowCount

RowHeights

ScrollBars

Selection

TabStops

TopRow

VisibleColCount

VisibleRowCount

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDrawGrid properties

TDrawGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

Color

ColWidths

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

Floating

FloatingDockSiteClass

Font

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LeftCol

LRDockWidth

Name

Options

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Row

RowCount

RowHeights

ScrollBars

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

TBDockHeight

Top

TopRow

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleColCount

VisibleDockClientCount

VisibleRowCount

Width

WindowProc


 VCL Reference

TDrawGrid events

TDrawGrid	Alphabetically	Legend

Derived from TCustomDrawGrid

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnStartDock

OnStartDrag


 VCL Reference

TDrawGrid events

TDrawGrid	By object	Legend

OnClick

OnColumnMoved

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawCell

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetEditMask

OnGetEditText

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnRowMoved

OnSelectCell

OnSetEditText

OnStartDock

OnStartDrag

OnTopLeftChanged


 VCL Reference

TDrawGrid methods

TDrawGrid	Alphabetically	Legend

In TDrawGrid

Derived from TCustomDrawGrid

CellRect

MouseToCell

Derived from TCustomGrid

Create

Destroy

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDrawGrid methods

TDrawGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseToCell

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDrawGrid

TDrawGrid


TDriveComboBox
 VCL Reference

 TDriveComboBox

Hierarchy	Properties	Methods	Events	See also

TDriveComboBox implements a specialized combo box that displays all the drives available when the application runs.

Unit

FileCtrl

Description

Add TDriveComboBox to a form to allow users to select a drive. Use TDriveComboBox along with TFileListBox, TFilterComboBox, and TDirectoryListBox to add full file selection capabilities to a form.

To add a standard Windows 95 file open or save dialog to an application, use TOpenDialog or TSaveDialog instead.


 VCL Reference

TDriveComboBox properties

TDriveComboBox	Alphabetically	Legend

In TDriveComboBox

DirList

Drive

TextCase

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

SelText

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDriveComboBox properties

TDriveComboBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DirList

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Drive

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

ItemIndex

Items

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

TextCase

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDriveComboBox.DirList
 VCL Reference

TDriveComboBox.DirList

TDriveComboBox	See also 	Example

Connects the drive combo box to a directory list box.

property DirList: TDirectoryListBox;

Description

Set DirList to a directory list box control that should update when the user changes the drive. When a new drive is selected in the drive combo box, the specified directory list box updates to display the directory structure and the current directory on the new drive.

Note:	If the form contains a file list box as well, it can be updated automatically using the FileList property of the directory list box object.


TDriveComboBox.Drive
 VCL Reference

TDriveComboBox.Drive

TDriveComboBox	See also 	Example

Indicates the currently selected drive displayed in the edit portion of the combo box.

property Drive: Char;

Description

Set Drive to initialize the combo box to a particular drive. Read Drive to obtain the drive that was selected by the user.

When the user uses the drive combo box to select a new drive, the selected drive becomes the value of the Drive property. The value of the Text property also changes to the new volume name when the Drive property value changes.


TDriveComboBox.TextCase
 VCL Reference

TDriveComboBox.TextCase

TDriveComboBox	See also

Determines if the volume name in the Text property appears in uppercase or lowercase.

type TTextCase = (tcLowerCase, tcUpperCase);

property TextCase: TTextCase;

Description

Set TextCase to the case that should be used to represent the drive letter. These are the possible values:

Value	Meaning

tcLowerCase	The volume name specified in the Text property is displayed in lowercase letters.

tcUpperCase	The volume name specified in the Text property is displayed in uppercase letters.

Note:	Changes made to the TextCase property at design time don’t appear until the application runs.


 VCL Reference

TDriveComboBox events

TDriveComboBox	Alphabetically	Legend

Derived from TCustomCombo

OnChange

OnDropDown

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 VCL Reference

TDriveComboBox events

TDriveComboBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDropDown

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnStartDrag


 VCL Reference

TDriveComboBox methods

TDriveComboBox	Alphabetically	Legend

In TDriveComboBox

Create

Destroy

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDriveComboBox methods

TDriveComboBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDriveComboBox.Create
 VCL Reference

TDriveComboBox.Create

TDriveComboBox	See also

Creates and initializes an instance of TDriveComboBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TDriveComboBox object at runtime. Drive combo boxes placed on a form at design time are created automatically.

After allocating the memory for the combo box, Create fills the combo box with all the drives on the system, and initializes the Drive property to the current drive.


TDriveComboBox.Destroy
 VCL Reference

TDriveComboBox.Destroy

TDriveComboBox	See also

Destroys an instance of TDriveComboBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the drive combo box reference is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox

TDriveComboBox


TDesignerSelections
 VCL Reference

TDesignerSelections

Hierarchy	Properties	Methods	See also

TDesignerSelections maintains a list of persistent objects.

Unit

DesignIntf

Description

The form designer and its property editors and component editors use TDesignerSelections to manage lists of persistent objects in the IDE. For example, the form designer uses a TDesignerSelections to represent the set of components currently selected in the form designer.

TDesignerSelections implements the IDesignerSelections interface. TDesignerSelections introduces properties and methods to

Add objects to the list.

Compare two lists of objects.

Access individual objects in the list.

Note:	TDesignerSelections does not allow objects to be rearranged or deleted from the list once they are added. To maintain a list of objects that allows the objects to be rearranged or deleted, use the TList object, or the Objects property of a descendant of TStrings.


 VCL Reference

TDesignerSelections properties

TDesignerSelections	Alphabetically	Legend

In TDesignerSelections

Count

Items

Derived from TInterfacedObject

RefCount


 VCL Reference

TDesignerSelections properties

TDesignerSelections	By object	Legend

Count

Items

RefCount


TDesignerSelections.Count
 VCL Reference

TDesignerSelections.Count

TDesignerSelections	See also

Indicates the number of entries in the list.

property Count: Integer;

Description

Read Count to determine the number of entries in the Items array.  Use Count as an upper limit when iterating over all the objects in the list.

Count is a read-only property.  To increase the number of objects in the list, use the Add method.  Objects can not be removed from the list once they have been added.

Note:	Count is a protected property. To access this property you must use the IDesignerSelections interface.


TDesignerSelections.Items
 VCL Reference

TDesignerSelections.Items

TDesignerSelections	See also

Provides indexed access to the objects in the list.

property Items[Index: Integer]: TPersistent; default;

Description

Use Items to access a specific object in the array. The Index parameter indicates the index of the object, where 0 is the index of the first object, 1 is the index of the second object, and so on. Use Items with the Count property to iterate through all of the objects in the list.

To add objects to the Items array, use the Add method.  Once objects have been added, they can’t be deleted or rearranged.

Note:	Items is a protected property. To access this property you must use the IDesignerSelections interface.


 VCL Reference

TDesignerSelections methods

TDesignerSelections	Alphabetically	Legend

In TDesignerSelections

Add

Copy

Create

Destroy

Equals

Get

GetCount

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TDesignerSelections methods

TDesignerSelections	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Copy

Create

DefaultHandler

Destroy

Dispatch

Equals

FieldAddress

Free

FreeInstance

Get

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TDesignerSelections.Add
 VCL Reference

TDesignerSelections.Add

TDesignerSelections	See also

Adds a new object to the end of the list.

function Add(const Item: TPersistent): Integer;

Description

Call Add to insert a new object at the end of the Items array. Add returns the index of the new item, where the first item in the list has an index of 0. Add increases the value of Count to reflect the addition of a new object.

Note:	Add is a protected method. To call this method you must use the IDesignerSelections interface.


TDesignerSelections.Copy
 VCL Reference

TDesignerSelections.Copy

TDesignerSelections	See also

Creates an instance of TDesignerSelections that is a copy of another list.

constructor Copy(const Selections: IDesignerSelections);

Description

Call Copy to create a TDesignerSelections object that represents the same list of selected objects as those in the Selections parameter.


TDesignerSelections.Create
 VCL Reference

TDesignerSelections.Create

TDesignerSelections	See also

Creates an instance of TDesignerSelections.

constructor Create;

Description

Call Create to create an empty component list. After creating the list, use the Add method (via the IDesignerSelections interface) to add objects to the list.


TDesignerSelections.Destroy
 VCL Reference

TDesignerSelections.Destroy

TDesignerSelections	See also

Destroys an instance of TDesignerSelections.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TDesignerSelections reference is not nil, and only then calls Destroy.


TDesignerSelections.Equals
 VCL Reference

TDesignerSelections.Equals

TDesignerSelections	See also

Indicates whether the selections list is identical to another selections list.

function Equals(const List: IDesignerSelections): Boolean;

Description

Call Equals to determine whether the list specified by the List parameter contains exactly the same objects in the same order as this list. Equals returns False if the other list

Contains objects not in the Items array.

Contains a subset of the objects in the Items array.

Contains the same objects but in a different order.


TDesignerSelections.Get
 VCL Reference

TDesignerSelections.Get

TDesignerSelections	See also

Returns a specified item from the list.

function Get(Index: Integer): TPersistent;

Description

Get is the protected read access method for the Items property.

Index identifies the desired object by its position in the list, where 0 identifies the first position. Get returns the specified object.


TDesignerSelections.GetCount
 VCL Reference

TDesignerSelections.GetCount

TDesignerSelections	See also

Returns the value of the Count property.

function GetCount: Integer;

Description

GetCount is the protected read access method for the Count property.


Hierarchy

TObject

TInterfacedObject

TDesignerSelections


TDateTimePicker
 VCL Reference

 TDateTimePicker

Hierarchy	Properties	Methods	Events	See also

TDateTimePicker displays a list box for entering dates or times.

Unit

ComCtrls

Description

TDateTimePicker is a visual component designed specifically for entering dates or times. In dmComboBox date mode, it resembles a list box or combo box, except that the drop-down list is replaced with a calendar illustration; users can select a date from the calendar. Dates or times can also be selected by scrolling with Up and Down arrows and by typing.

Date-time picker ignores the BiDiMode setting for right-to-left reading, displaying dates according to the system locale.

TDateTimePicker formats date and time values according to the date and time settings in the Regional Settings of the Control panel on the user’s system. Because TDateTimePicker is a wrapper for a Windows control, these formats can’t be changed by changing the formatting variables in the SysUtils unit. However, you can use the Windows API call DateTime_SetFormat to programmatically specify these settings.

Note:	The underlying Windows control is known to behave unpredictably when used to set dates in 1752, the year English-speaking countries changed to the Gregorian calendar. Similar problems may appear for different dates when a non-English locale is used. If an application may be used to specify dates on or before the changeover in the current locale (for example, 1918 or before in Russian locales), be sure to test the application using the dates affected.


 VCL Reference

TDateTimePicker properties

TDateTimePicker	Alphabetically	Legend

In TDateTimePicker

CalAlignment

Checked

DateFormat

DateMode

DroppedDown

Format

Kind

ParseInput

ShowCheckbox

Time

Derived from TCommonCalendar

CalColors

Date

DateTime

MaxDate

MinDate

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TDateTimePicker properties

TDateTimePicker	By object	Legend

Action

Align

AlignDisabled

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BoundsRect

Brush

CalAlignment

CalColors

Checked

ClientHeight

ClientOrigin

ClientRect

ClientToParent

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Date

DateFormat

DateMode

DateTime

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Font

Format

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IsImplementorOf

Kind

Left

LRDockWidth

MaxDate

MinDate

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentToClient

ParentWindow

ParseInput

PopupMenu

ReferenceInterface

SetSubComponent

ShowCheckbox

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Time

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TDateTimePicker.CalAlignment
 VCL Reference

TDateTimePicker.CalAlignment

TDateTimePicker	See also

Determines the alignment of the drop-down calendar.

type TDTCalAlignment = (dtaLeft, dtaRight);

property CalAlignment: TDTCalAlignment;

Description

Set CalAlignment to dtaLeft or dtaRight to align the drop-down calendar on the left or right side of the component. This property is applicable only if Kind = dtkDate and DateMode = dmComboBox, and makes little difference except when the TDateTimePicker component is larger than the drop-down calendar.


TDateTimePicker.Checked
 VCL Reference

TDateTimePicker.Checked

TDateTimePicker	See also

Indicates whether the check box next to the date or time is selected.

property Checked: Boolean;

Description

Checked returns True if the check box in the TDateTimePicker component is selected. Setting Checked to True at design time makes the check box appear selected by default.


TDateTimePicker.DateFormat
 VCL Reference

TDateTimePicker.DateFormat

TDateTimePicker	See also

Specifies format in which the date is presented.

type TDTDateFormat = (dfShort, dfLong);

property DateFormat: TDTDateFormat;

Description

If DateFormat is set to dfShort, the date is formatted using the short date format specified in the Windows control panel. By default, it appears like this: 3/21/97.

If DateFormat is set to dfLong, the date is formatted using the long date format specified in the Windows control panel. By default, it appears like this: Friday, March 21, 1997. (Applies only when Kind = dtkDate.)

For custom date formats, set the Format property.


TDateTimePicker.DateMode
 VCL Reference

TDateTimePicker.DateMode

TDateTimePicker	See also

Determines the method of date selection used by the component.

type TDTDateMode = (dmComboBox, dmUpDown);

property DateMode: TDTDateMode;

Description

If DateMode is dmComboBox, the component has a drop-down calendar illustration from which the user can select a date. If DateMode is dmUpDown, the component has Up/Down arrows with which the user can adjust the date. (Applies only when Kind = dtkDate.)


TDateTimePicker.DateTime
 VCL Reference

TDateTimePicker.DateTime

TDateTimePicker	See also

Indicates the date and time.

property DateTime: TDateTime;

Description

DateTime represents both a date and a time. If the Kind property is switched at runtime, TDateTimePicker continues to track both the last date entered and the last time entered. If the Kind property never changes, DateTime can be set programmatically (for example, by reading system date and time information) to indicate both a date and a time.


TDateTimePicker.DroppedDown
 VCL Reference

TDateTimePicker.DroppedDown

TDateTimePicker

Specifies whether the date time picker control is dropped down.

property DroppedDown: Boolean;

Description

Use DroppedDown to get or set whether the date time picker control is dropped down.


TDateTimePicker.Format
 VCL Reference

TDateTimePicker.Format

TDateTimePicker	See also

Specify format for date-time string.

property Format: String;

Description

Format specifies custom format string for the date-time display, overriding the control panel strings. A custom format can include both date and time fields, but time fields are not editable unless the Kind property is dtkTime. The following format characters are understood.

Element	Description

d	The one- or two-digit day.

dd	The two-digit day. Single-digit day values are preceded by a zero.

ddd	The three-character weekday abbreviation.

dddd	The full weekday name.

h	The one- or two-digit hour in 12-hour format.

hh	The two-digit hour in 12-hour format. Single-digit values are preceded by a zero.

H	The one- or two-digit hour in 24-hour format.

HH	The two-digit hour in 24-hour format. Single-digit values are preceded by a zero.

m	The one- or two-digit minute.

mm	The two-digit minute. Single-digit values are preceded by a zero.

M	The one- or two-digit month number.

MM	The two-digit month number. Single-digit values are preceded by a zero.

MMM	The three-character month abbreviation.

MMMM	The full month name.

t	The one-letter AM/PM abbreviation (that is, AM is displayed as "A").

tt	The two-letter AM/PM abbreviation (that is, AM is displayed as "AM").

yy	The last two digits of the year (that is, 2001 would be displayed as "01").

yyyy	The full year (that is, 2001 would be displayed as "2001").

To include literal strings in the format, enclose them in single quotes. Failing to quote literal strings can have unpredicable results, even if they do not include formatting codes. Use two single quotes to represent one single quote character in literal string. For example,

'Today''s date:' MMM dd, yyyy

formatted for the first day of April, 2001, would display "Today's date: Apr 01, 2001".


TDateTimePicker.Kind
 VCL Reference

TDateTimePicker.Kind

TDateTimePicker	See also

Determines whether the component is a date selector or a time selector.

type TDateTimeKind = (dtkDate, dtkTime);

property Kind: TDateTimeKind;

Description

If the Kind property is dtkDate, the control is configured to support date editing. The default format gives only the date portion of the control value, and a drop-down calender is available if DateMode is dmComboxBox.

If the Kind property is dtkTime, the control is configured to support time editing. The default format give only the time portion of the control value, but the date portion can also be edited if the Format property includes date field codes..


TDateTimePicker.MaxDate
 VCL Reference

TDateTimePicker.MaxDate

TDateTimePicker	See also

Determines the latest allowable date that can be entered.

type TDate = typeTDateTime;

property MaxDate: TDate;

Description

Assign a value to MaxDate to limit the range of dates that the user can enter. Out-of-range dates raise the EDateTimeError exception. (Applies only when Kind = dtkDate.)


TDateTimePicker.MinDate
 VCL Reference

TDateTimePicker.MinDate

TDateTimePicker	See also

Determines the earliest allowable date that can be entered.

type TDate = typeTDateTime;

property MinDate: TDate;

Description

Assign a value to MinDate to limit the range of dates that the user can enter. Out-of-range dates raise the EDateTimeError exception. (Applies only when Kind = dtkDate.)


TDateTimePicker.ParseInput
 VCL Reference

TDateTimePicker.ParseInput

TDateTimePicker	See also

Enables the OnUserInput event.

property ParseInput: Boolean;

Description

If ParseInput is True, the OnUserInput event occurs whenever the user types into the component’s edit box.


TDateTimePicker.ShowCheckbox
 VCL Reference

TDateTimePicker.ShowCheckbox

TDateTimePicker	See also

Displays a check box next to the date or time.

property ShowCheckbox: Boolean;

Description

Set ShowCheckbox to True to display a check box in the TDateTimePicker component.


TDateTimePicker.Time
 VCL Reference

TDateTimePicker.Time

TDateTimePicker	See also

Indicates the time entered by the user.

type TTime = typeTDateTime;

property Time: TTime;

Description

Time represents the time entered by the user. Set Time in program code or in the Object Inspector to determine which time is selected by default. (Applies only when Kind = dtkTime.)


 VCL Reference

TDateTimePicker events

TDateTimePicker	Alphabetically	Legend

In TDateTimePicker

OnChange

OnCloseUp

OnDropDown

OnUserInput

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TDateTimePicker events

TDateTimePicker	By object	Legend

OnChange

OnClick

OnCloseUp

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDropDown

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnStartDock

OnStartDrag

OnUserInput


TDateTimePicker.OnChange
 VCL Reference

TDateTimePicker.OnChange

TDateTimePicker	See also

Occurs when a date or time is entered.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever the date or time entered in the component changes.


TDateTimePicker.OnCloseUp
 VCL Reference

TDateTimePicker.OnCloseUp

TDateTimePicker	See also

Occurs when the drop-down calendar closes.

property OnCloseUp: TNotifyEvent;

Description

Write an OnCloseUp event handler to implement special processing that needs to occur only when the drop-down calendar closes.


TDateTimePicker.OnDropDown
 VCL Reference

TDateTimePicker.OnDropDown

TDateTimePicker	See also

Occurs when the user opens the drop-down calendar by clicking the arrow at the right of the control.

property OnDropDown: TNotifyEvent;

Description

Write an OnDropDown event handler to implement special processing that needs to occur only when the drop-down calendar is opened.


TDateTimePicker.OnUserInput
 VCL Reference

TDateTimePicker.OnUserInput

TDateTimePicker	See also

Occurs when the user types directly into the component’s edit box.

type TDTParseInputEvent = procedure(Sender: TObject; const UserString: string; var DateAndTime: TDateTime; var AllowChange: Boolean) of object;

property OnUserInput: TDTParseInputEvent;

Description

This event occurs only if ParseInput is set to True. Write an OnUserInput event handler implement special processing that needs to occur when the user types directly into the TDateTimePicker (rather than selecting with the drop-down calendar or scroll arrows). UserString is the string that the user types, and DateAndTime represents the value of the Date or Time property.


 VCL Reference

TDateTimePicker methods

TDateTimePicker	Alphabetically	Legend

In TDateTimePicker

Create

Derived from TCommonCalendar

BoldDays

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDateTimePicker methods

TDateTimePicker	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BoldDays

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

Perform

Realign

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TDateTimePicker.Create
 VCL Reference

TDateTimePicker.Create

TDateTimePicker	See also

Creates and initializes a TDateTimePicker instance.

constructor Create(AOwner: TComponent); override;

Description

Create calls the inherited constructor method and initializes the Date and Time properties to the current date and time. It also sets the following ControlStyle flags: csCaptureMouse, csOpaque, csClickEvents, csDoubleClicks, and csFixedHeight.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCommonCalendar

TDateTimePicker


EAbort
 VCL Reference

EAbort

Hierarchy	Properties	Methods	See also

EAbort is the exception class for errors that should not display an error message dialog box.

Unit

SysUtils

Description

Use EAbort to raise an exception without displaying an error message in a dialog box. If applications do not trap such “silent” exceptions, the EAbort exception is passed to the HandleException method of the Application object.

The easiest way to raise an EAbort exception is to call the Abort procedure.


 VCL Reference

EAbort properties

EAbort	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EAbort properties

EAbort	By object	Legend

HelpContext

Message


 VCL Reference

EAbort methods

EAbort	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EAbort methods

EAbort	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EAbort


EAbstractError
 VCL Reference

EAbstractError

Hierarchy	Properties	Methods

EAbstractError is the exception class for attempts to call an abstract method.

Unit

SysUtils

Description

EAbstractError is raised when an application tries to call an Object Pascal abstract method. It is also raised at design time when a component with an Object Pascal abstract method is placed on a form.

Abstract methods are declared with the abstract directive and must be overridden in descendant classes before an instance object can be created.


 VCL Reference

EAbstractError properties

EAbstractError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EAbstractError properties

EAbstractError	By object	Legend

HelpContext

Message


 VCL Reference

EAbstractError methods

EAbstractError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EAbstractError methods

EAbstractError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception


 VCL Reference


EAssertionFailed
 VCL Reference

EAssertionFailed

Hierarchy	Properties	Methods	See also

EAssertionFailed is the exception class for Assert procedures performed on Boolean expressions that return False.

Unit

SysUtils

Description

EAssertionFailed is raised by the Assert procedure when an application passes it a Boolean expression whose value is False. The exception is raised only if the $ASSERTIONS ON compiler directive is in effect.


 VCL Reference

EAssertionFailed properties

EAssertionFailed	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EAssertionFailed properties

EAssertionFailed	By object	Legend

HelpContext

Message


 VCL Reference

EAssertionFailed methods

EAssertionFailed	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EAssertionFailed methods

EAssertionFailed	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EAssertionFailed


EControlC
 VCL Reference

EControlC

Hierarchy	Properties	Methods	See also

EControlC is the exception class for Ctrl+C key presses in console applications.

Unit

SysUtils

Description

EControlC is raised when a user presses Ctrl+C to terminate a console application.

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EControlC properties

EControlC	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EControlC properties

EControlC	By object	Legend

HelpContext

Message


 VCL Reference

EControlC methods

EControlC	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EControlC methods

EControlC	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal


 VCL Reference


TEdit
 VCL Reference

 TEdit

Hierarchy	Properties	Methods	Events	Using TEdit	See also

TEdit is a wrapper for a Windows single-line edit control.

Unit

StdCtrls

Description

Use a TEdit object to put a standard Windows edit control on a form. Edit controls are used to retrieve text that users type. Edit controls can also display text to the user.

When only displaying text to the user, choose an edit control to allow users to select text and copy it to the Clipboard. Choose a label object if the selection capabilities of an edit control are not needed.

TEdit implements the generic behavior introduced in TCustomEdit. TEdit publishes many of the properties inherited from TCustomEdit, but does not introduce any new behavior. For specialized edit controls, use other descendant classes of TCustomEdit or derive from it.


 VCL Reference

TEdit properties

TEdit	Alphabetically	Legend

Derived from TCustomEdit

AutoSelect

AutoSize

BorderStyle

CanUndo

CharCase

HideSelection

MaxLength

Modified

OEMConvert

PasswordChar

ReadOnly

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEdit Properties

TEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoSelect

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

ImeMode

ImeName

Left

LRDockWidth

MaxLength

Modified

Name

OEMConvert

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PasswordChar

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TEdit events

TEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TEdit Events

TEdit	By Object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TEdit methods

TEdit	Alphabetically	Legend

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

Create

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

Destroy

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEdit Methods

TEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TEdit


TEditAction
 VCL Reference

TEditAction

Hierarchy	Properties	Methods	Events	Using TEditAction	See also

TEditAction is the base class for action objects that perform standard edits on an edit control.

Unit

StdActns

Description

TEditAction is the common base class for actions that work with edit controls. Each descendant class performs a specific type of edit on the target edit control. Do not use TEditAction directly in an application. Instead, use a TEditAction descendant that performs a specific function (Cut, Copy, Paste, Delete, Select All, or Undo). The various TEditAction descendants are listed in the See also list.


 VCL Reference

TEditAction properties

TEditAction	Alphabetically	Legend

In TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditAction properties

TEditAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TEditAction.Control
 VCL Reference

TEditAction.Control

TEditAction 	See also

Provides access to the target of the action.

property Control: TCustomEdit;

__propertyTCustomEdit Control = {read=FControl, write=SetControl};

Description

EditControl is the edit control on which the action performs its function. Set the value of Control to limit the action so that it only operates on a specific edit control. If Control is unassigned, the action dynamically locates the target edit control when it executes.


 VCL Reference

TEditAction events

TEditAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditAction events

TEditAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditAction methods

TEditAction	Alphabetically	Legend

In TEditAction

GetControl

HandlesTarget

Notification

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditAction methods

TEditAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControl

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditAction.GetControl
 VCL Reference

TEditAction.GetControl

TEditAction 	See also

Returns the target of the edit action.

function GetControl(Target: TObject): TCustomEdit; virtual;

Description

TEditAction uses the protected GetControl method internally to obtain the target of the action.

Target is the currently active object, or the value of the Control property.

GetControl returns the target object as an edit control.


TEditAction.HandlesTarget
 VCL Reference

TEditAction.HandlesTarget

TEditAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget checks that the target of is a TCustomEdit descendant (or that the Control property is set if Target is nil). HandlesTarget returns True if there is an edit control to act as target, False otherwise.


TEditAction.Notification
 VCL Reference

TEditAction.Notification

TEditAction 	See also

Responds when objects are added or removed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Do not call the Notification method in an application.  Notification is called automatically when the component specified by AComponent is about to be inserted or removed, as specified by Operation.

TEditAction responds to notifications that the target edit control (as specified by the Control property) is about to be freed by setting Control to nil.


TEditAction.UpdateTarget
 VCL Reference

TEditAction.::UpdateTarget

TEditAction 	See also

Enables or disables the action, depending on the currently active control in the form.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the potential target changes so that actions can update themselves accordingly.

In TEditAction, UpdateTarget checks whether the current target object (specified by the Target parameter) is an edit control and, if the action’s function requires it, that some of its text is selected. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction


TEditCopy
 VCL Reference

TEditCopy

Hierarchy	Properties	Methods	Events	Using TEditCopy	See also

TEditCopy copys the selected text in a target edit control to the Windows clipboard.

Unit

StdActns

Description

Add TEditCopy to an action list to allow users to copy selected text to the clipboard using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to copy the currently selected text in an active text control to the clipboard.

TEditCopy is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control or if that edit control does not have any text selected.


 VCL Reference

TEditCopy properties

TEditCopy	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditCopy properties

TEditCopy	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditCopy events

TEditCopy	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditCopy events

TEditCopy	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditCopy methods

TEditCopy	Alphabetically	Legend

In TEditCopy

ExecuteTarget

Derived from TEditAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditCopy methods

TEditCopy	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditCopy.ExecuteTarget
 VCL Reference

TEditCopy.ExecuteTarget

TEditCopy 	See also

Copies selected text in the target control to the Windows clipboard.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is an edit control (TCustomEdit descendant), and if so, calls its CopyToClipboard method, copying the selected text to the clipboard.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditCopy


TEditCut
 VCL Reference

TEditCut

Hierarchy	Properties	Methods	Events	Using TEditCut	See also

TEditCut cuts the selected text in a target edit control to the Windows clipboard.

Unit

StdActns

Description

Add TEditCut to an action list to allow users to cut selected text to the clipboard using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to cut the currently selected text in an active text control to the clipboard.

TEditCut is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control or if that edit control does not have a selection to cut.


 VCL Reference

TEditCut properties

TEditCut	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditCut properties

TEditCut	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditCut events

TEditCut	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditCut events

TEditCut	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditCut methods

TEditCut	Alphabetically	Legend

In TEditCut

ExecuteTarget

Derived from TEditAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditCut methods

TEditCut	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditCut.ExecuteTarget
 VCL Reference

TEditCut.ExecuteTarget

TEditCut 	See also

Cuts selected text in the target control to the Windows clipboard.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is an edit control (TCustomEditControl descendant), and if so, calls its CutToClipboard method, cutting the selected text to the clipboard.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditCut


EDivByZero
 VCL Reference

EDivByZero

Hierarchy	Properties	Methods	See also

EDivByZero is the exception class for integer divide-by-zero errors.

Unit

SysUtils

Description

EDivByZero is raised when an application tries to divide an integer by zero. In practice, this error is easy to trap and correct in a try...except block.

Run-time exception information is saved in fields provided by EExternal.

Note:	Floating-point divide-by-zero errors raise the EZeroDivide exception.


 VCL Reference

EDivByZero properties

EDivByZero	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDivByZero properties

EDivByZero	By object	Legend

HelpContext

Message


 VCL Reference

EDivByZero methods

EDivByZero	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp>main

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDivByZero methods

EDivByZero	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EIntError

EDivByZero


EDateTimeError
 VCL Reference

EDateTimeError

Hierarchy	Properties	Methods	See also

EDateTimeError is the exception class for invalid date and time entries.

Unit

ComCtrls

Description

EDateTimeError is raised by TDateTimePicker when an invalid date or time is entered.


 VCL Reference

EDateTimeError properties

EDateTimeError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EDateTimeError properties

EDateTimeError	By object	Legend

HelpContext

Message


 VCL Reference

EDateTimeError methods

EDateTimeError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EDateTimeError methods

EDateTimeError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ECommonCalendarError

EDateTimeError


EFilerError
 VCL Reference

EFilerError

Hierarchy	Properties	Methods	See also

EFilerError is the exception class for file stream errors.

Unit

Classes

Description

EFilerError is raised when an attempt is made to register the same class twice.

EFilerError is also the immediate ancestor of the following exceptions that occur when reading or writing streams:

Exception	Description

EReadError	Cannot read the specified number of bytes

EWriteError	Cannot write the specified number of bytes

EClassNotFound	Component is not linked to application

EInvalidImage	Cannot read an resource file


 VCL Reference

EFilerError properties

EFilerError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EFilerError properties

EFilerError	By object	Legend

HelpContext

Message


 VCL Reference

EFilerError methods

EFilerError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EFilerError methods

EFilerError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFilerError


EIniFileException
 VCL Reference

EIniFileException

Hierarchy	Properties	Methods	See also

EIniFileException is the exception class for errors that occur when working with INI files using TIniFile.

Unit

IniFiles

Description

EIniFileException is raised when TIniFile fails in an attempt to modify its associated INI file.


 VCL Reference

EIniFileException properties

EIniFileException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EIniFileException properties

EIniFileException	By object	Legend

HelpContext

Message


 VCL Reference

EIniFileException methods

EIniFileException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EIniFileException methods

EIniFileException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EIniFileException


EInOutError
 VCL Reference

EInOutError

Hierarchy	Properties	Methods	See also

EInOutError is the exception class for file input/output errors.

Unit

SysUtils

Description

EInOutError is raised when an file input/output error occurs, provided the $I+ directive is in effect. The resulting error code is returned in the public ErrorCode class member. Error codes are come in two ranges: 0-99 (Win32 errors) and 100-149 (VCL errors).

Error codes in the range 0-99 represent Win32 error conditions. The SysErrorMessage function returns descriptive text for these errors. Here are the most common Win32 error codes:

Error code	Meaning

2	File not found

3	Path not found

5	Access denied

32	Sharing violation

Error codes in the range 100 to 149 represent error conditions raised by the VCL. Here are the VCL I/O error codes:

Error code	Meaning

100	End of File

101	Disk Full

102	File variable not assigned

103	File not open

104	File not open for input

105	File not open for output

106	Error in formatted input

107	File already open

Note:	If an I/O error occurs when an application is in the $I- state, the application must call the IOResult function to clear the error.


 VCL Reference

EInOutError properties

EInOutError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInOutError properties

EInOutError	By object	Legend

HelpContext

Message


 VCL Reference

EInOutError methods

EInOutError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInOutError methods

EInOutError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInOutError


EInvalidImage
 VCL Reference

EInvalidImage

Hierarchy	Properties	Methods	See also

EInvalidImage is the exception class for unsuccessful attempts to read resource files.

Unit

Classes

Description

EInvalidImage is raised when an application cannot read a resource file. This occurs most often because the specified file is not a resource file.

This error can occur if the TStream object’s read and write methods are used inconsistently. Always use ReadComponentRes to read components written with WriteComponentRes, and ReadComponent to read components written with WriteComponent. Failure to use the corresponding read and write methods can result in EInvalidImage exceptions.


 VCL Reference

EInvalidImage properties

EInvalidImage	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidImage properties

EInvalidImage	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidImage methods

EInvalidImage	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidImage methods

EInvalidImage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFilerError

EInvalidImage


EInvalidPointer
 VCL Reference

EInvalidPointer

Hierarchy	Properties	Methods

EInvalidPointer is the exception class for invalid pointer operations.

Unit

SysUtils

Description

EInvalidPointer is raised when an application attempts an invalid pointer operation. For example, it can occur if an application tries to dispose of the same pointer twice, or refers to a pointer which has already been disposed of.

Note:	Never raise an EInvalidPointer exception directly. EInvalidPointer is raised internally by the memory manager.


 VCL Reference

EInvalidPointer properties

EInvalidPointer	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidPointer properties

EInvalidPointer	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidPointer methods

EInvalidPointer	Alphabetically	Legend

Derived from EHeapException

FreeInstance

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidPointer methods

EInvalidPointer	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EHeapException

EInvalidPointer


EListError
 VCL Reference

EListError

Hierarchy	Properties	Methods	See also

EListError is the exception class for list and string errors.

Unit

Classes

Description

EListError is raised when an error is made in a list, string, or TStringList object. This exception commonly occurs when an application refers to an item that is out of the list’s range.

EListError also occurs if an application tries to add a duplicate string to a TStringList object when the value of the Duplicates property is dupError.

An EListError exception is raised when an application attempts to insert a string into a sorted string list, since the insertion of a string at a specified position may put the list out of order.


 VCL Reference

EListError properties

EListError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EListError properties

EListError	By object	Legend

HelpContext

Message


 VCL Reference

EListError methods

EListError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EListError methods

EListError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EListError


EMaskException
 VCL Reference

EMaskException

Hierarchy	Properties	Methods	See also

EMaskException is the exception class for errors that occur when comparing a file name to a mask.

Unit

Masks

Description

EMaskException is raised when the TMask object or the global MatchesMask function encounters an improperly formed mask string.


 VCL Reference

EMaskException properties

EMaskException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EMaskException properties

EMaskException	By object	Legend

HelpContext

Message


 VCL Reference

EMaskException methods

EMaskException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EMaskException methods

EMaskException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EMaskException


EMenuError
 VCL Reference

EMenuError

Hierarchy	Properties	Methods	See also

EMenuError is the exception class for errors involving menu items.

Unit

Menus

Description

EMenuError is raised if an error occurs while an application is working with menu items. For example, an EMenuError exception occurs if

An application tries to delete an item from an empty menu

A menu item attempts to insert itself into it’s own list of items

An application attempts to reference a menu that does not exist

An application specifies an invalid GroupIndex for a menu item


 VCL Reference

EMenuError properties

EMenuError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EMenuError properties

EMenuError	By object	Legend

Message

HelpContext


 VCL Reference

EMenuError methods

EMenuError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EMenuError methods

EMenuError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EMenuError


TEnumPropDesc
 VCL Reference

TEnumPropDesc

Hierarchy	Methods	See also

TEnumPropDesc provides the mapping between strings used to name the values of a property in an OLE control object and the values themselves.

Unit

OleCtrls

Description

Use TEnumPropDesc to interpret the strings used by an OLE control object to represent the values of one of its properties.  TEnumPropDesc can provide a list of possible value strings to a callback function, or map between the string names of property values and the values themselves.  TEnumPropDesc objects are made available through the GetEnumPropDesc method of an OLE control object.


 VCL Reference

TEnumPropDesc methods

TEnumPropDesc	Alphabetically	Legend

In TEnumPropDesc

Create

Destroy

GetStrings

StringToValue

ValueToString

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TEnumPropDesc methods

TEnumPropDesc	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetStrings

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

StringToValue

ValueToString


TEnumPropDesc.Create
 VCL Reference

TEnumPropDesc.Create

TEnumPropDesc	See also

Creates an instance of TEnumPropDesc.

constructor Create(DispID, ValueCount: Integer; const TypeInfo: ITypeInfo);

Description

Create is called by an OLE control object to create an instance of TEnumPropDesc to represent the values of one of its properties.  Applications should not need to create instances of TEnumPropDesc.  When working with OLE properties, get the TEnumPropDesc objects from the OLE control object.

DispID identifies the property of the OLE object, ValueCount is the number of distinct values the property can take TypeInfo is an ITypeInfo object that the constructor can use to capture the values and their strings.


TEnumPropDesc.Destroy
 VCL Reference

TEnumPropDesc.Destroy

TEnumPropDesc	See also

Destroys an instance of TEnumPropDesc.

destructor Destroy; override;

Description

Do not call Destroy directly in an application.  The TOleControl object that owns the TEnumPropDesc object will destroy it automatically.

Destroy frees the internal list used to map value strings to property values.


TEnumPropDesc.GetStrings
 VCL Reference

TEnumPropDesc.GetStrings

TEnumPropDesc	See also

Calls the callback Proc for each property value string.

procedure GetStrings(Proc: TGetStrProc);

Description

Use GetStrings to execute code for every property value string represented in the TEnumPropDesc object.  The callback Proc is called for every value, with the S parameter set to a string that gives the integer value followed by the string representation of that value.

For example, consider a  TEnumPropDesc object that represents a color property, with values equal to TColor values. The callback Proc would be called for every built-in color name with strings of the form ‘255 - clRed’.


TEnumPropDesc.StringToValue
 VCL Reference

TEnumPropDesc.StringToValue

TEnumPropDesc	See also

Maps a string representation of the property value to the integer value.

Function StringToValue(const S: string): Integer;

Description

Use StringToValue to map the string representation of a property value used by an OLE control object to an integer value that is a more accurate representation of the property value.  If the property value is not an integer, the integer associated with the string can be a pointer to the value.


TEnumPropDesc.ValueToString
 VCL Reference

TEnumPropDesc.ValueToString

TEnumPropDesc	See also

Maps an integer that indicates the value of the property to the string representation of that value used by the OLE control object.

function ValueToString(V: Integer): string;

Description

Use ValueToString to map the integer value of a property value to the string representation used by an OLE control object.  If the property value is not an integer, the integer associated with the string can be a pointer to the value.


Hierarchy

TObject

TEnumPropDesc


EOleCtrlError
 VCL Reference

EOleCtrlError

Hierarchy	Properties	Methods	See also

EOleCtrlError is the exception class for ActiveX controls.

Unit

OleCtrls

Description

EOleCtrlError is raised when an application cannot link to an ActiveX control.


 VCL Reference

EOleCtrlError properties

EOleCtrlError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOleCtrlError properties

EOleCtrlError	By object	Legend

HelpContext

Message


 VCL Reference

EOleCtrlError methods

EOleCtrlError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOleCtrlError methods

EOleCtrlError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EOleCtrlError


EPropertyConvertError
 VCL Reference

EPropertyConvertError

Hierarchy	Properties	Methods	See also

EPropertyConvertError is the exception class for type errors when attempting to get or set the value of a property.

Unit

TypInfo

Description

EPropertyConvertError is raised when an application tries to set a property to a value of the wrong type or to read a property that has invalid type information.


 VCL Reference

EPropertyConvertError properties

EPropertyConvertError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPropertyConvertError properties

EPropertyConvertError	By object	Legend

HelpContext

Message


 VCL Reference

EPropertyConvertError methods

EPropertyConvertError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPropertyConvertError methods

EPropertyConvertError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPropertyConvertError


EPropertyError
 VCL Reference

EPropertyError

Hierarchy	Properties	Methods	See also

EPropertyError is the exception class for unsuccessful attempts to set the value of a property.

Unit

TypInfo

Description

EPropertyError is raised by the SetValue (or Edit) methods of property-editor objects when they cannot set a requested property value. This usually occurs because the requested value is out of range or of an invalid data type.


 VCL Reference

EPropertyError properties

EPropertyError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPropertyError properties

EPropertyError	By object	Legend

HelpContext

Message


 VCL Reference

EPropertyError methods

EPropertyError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPropertyError methods

EPropertyError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPropertyError


EPropReadOnly
 VCL Reference

EPropReadOnly

Hierarchy	Properties	Methods

EPropReadOnly is the exception class for invalid attempts to write to a property using OLE automation.

Unit

SysUtils

Description

EPropReadOnly is raised when an application tries to write to a read-only property using OLE automation.


 VCL Reference

EPropReadOnly properties

EPropReadOnly	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPropReadOnly properties

EPropReadOnly	By object	Legend

HelpContext

Message


 VCL Reference

EPropReadOnly methods

EPropReadOnly	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPropReadOnly methods

EPropReadOnly	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPropReadOnly


EPropWriteOnly
 VCL Reference

EPropWriteOnly

Hierarchy	Properties	Methods

EPropWriteOnly is the exception class for invalid attempts to read a property using OLE automation.

Unit

SysUtils

Description

EPropWriteOnly is raised when an application tries to read a write-only property using OLE automation.


 VCL Reference

EPropWriteOnly properties

EPropWriteOnly	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPropWriteOnly properties

EPropWriteOnly	By object	Legend

HelpContext

Message


 VCL Reference

EPropWriteOnly methods

EPropWriteOnly	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPropWriteOnly methods

EPropWriteOnly	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPropWriteOnly


ERangeError
 VCL Reference

ERangeError

Hierarchy	Properties	Methods	See also

ERangeError is the exception class for integer values that are too large for the declared type to which they are assigned.

Unit

SysUtils

Description

ERangeError is an integer math exception. It occurs when

An integer expression’s value exceeds the bounds of the specified integer type to which it is assigned.

Source code attempts to access an item in an array using an index value that is not within the defined array.

ERangeError is raised only if range checking is turned on. To turn on range checking, include the $R+ directive in project source code, or select Project|Options, choose the Compiler tab, and check the Range-checking option in the dialog box.

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

ERangeError properties

ERangeError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ERangeError properties

ERangeError	By object	Legend

HelpContext

Message


 VCL Reference

ERangeError methods

ERangeError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ERangeError methods

ERangeError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EIntError

ERangeError


EReadError
 VCL Reference

EReadError

Hierarchy	Properties	Methods	See also

EReadError is the exception class for unsuccessful attempts to read data from a stream.

Unit

Classes

Description

EReadError is raised when an application attempts to read data from a stream but cannot read the specified number of bytes.

An EReadError exception may also be raised if Delphi is unable to read a property while creating a form. This can occur because a component reads the form resource incorrectly, or because the resource is corrupt.


 VCL Reference

EReadError properties

EReadError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EReadError properties

EReadError	By object	Legend

HelpContext

Message


 VCL Reference

EReadError methods

EReadError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EReadError methods

EReadError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFilerError

EReadError


ERegistryException
 VCL Reference

ERegistryException

Hierarchy	Properties	Methods	See also

ERegistryException is the exception class for registry errors.

Unit

Registry

Description

ERegistryException is raised when an application cannot

Create a new key in the registry.

Read a data value associated with a key.

Read a binary data value associated with a key into a local buffer.

Write a data value to a key.

Key creation fails when an application attempts to create a subkey under a key for which it does not have KEY_CREATE_SUB_KEY security access.

Reading a data value associated with a key fails when an application does not have KEY_READ security access, or when the application attempts to read the wrong kind of data from a key (for example, attempting to read string data from an integer data value).

Reading a binary data value into a local buffer fails when an application does not allocate a buffer large enough for the data.

Writing a data value to a key fails because an application does not have KEY_WRITE security access for the current key.


 VCL Reference

ERegistryException properties

ERegistryException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ERegistryException properties

ERegistryException	By object	Legend

HelpContext

Message


 VCL Reference

ERegistryException methods

ERegistryException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ERegistryException methods

ERegistryException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ERegistryException


EStackOverflow
 VCL Reference

EStackOverflow

Hierarchy	Properties	Methods	See also

EStackOverflow is the exception class for stack overflows.

Unit

SysUtils

Description

EStackOverflow is raised when the system is unable to allocate necessary stack space. This can happen because of extremely large local variables, deeply recursive routines, or invalid machine-language code.

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EStackOverflow properties

EStackOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EStackOverflow properties

EStackOverflow	By object	Legend

HelpContext

Message


 VCL Reference

EStackOverflow methods

EStackOverflow	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EStackOverflow methods

EStackOverflow	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EStackOverflow


EStringListError
 VCL Reference

EStringListError

Hierarchy	Properties	Methods	See also

EStringListError is the exception class for invalid listbox references.

Unit

Classes

Description

EStringListError is raised when an application attempts to access a list box (for example, to add an item) using an invalid index.


 VCL Reference

EStringListError properties

EStringListError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EStringListError properties

EStringListError	By object	Legend

HelpContext

Message


 VCL Reference

EStringListError methods

EStringListError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EStringListError methods

EStringListError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStringListError


EVariantError
 VCL Reference

EVariantError

Hierarchy	Properties	Methods	See also

EVariantError is the exception class for errors involving Variant data types.

Unit

SysUtils

Description

EVariantError is raised when an application attempts an invalid operation when working with a Variant. Such errors include the case when

An application attempts an invalid typecast or operation on a Variant.

A Variant does not contain a required OLE IDispatch object.

The VarArrayCreate function is unable to create a requested Variant array.

A Variant-array operation is attempted on something that is not a Variant array.

A Variant-array index is out of bounds.


 VCL Reference

EVariantError properties

EVariantError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EVariantError properties

EVariantError	By object	Legend

HelpContext

Message


 VCL Reference

EVariantError methods

EVariantError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EVariantError methods

EVariantError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EVariantError


EWin32Error
 VCL Reference

 EWin32Error

Hierarchy	Properties	Methods	See also

EWin32Error is the exception class for Windows errors.

Unit

SysUtils

Description

EWin32Error is now deprecated in favor of EOSError.


 VCL Reference

EWin32Error properties

EWin32Error	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EWin32Error properties

EWin32Error	By object	Legend

HelpContext

Message


 VCL Reference

EWin32Error methods

EWin32Error	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EWin32Error methods

EWin32Error	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

EOSError

Exception

EWin32Error


EWriteError
 VCL Reference

EWriteError

Hierarchy	Properties	Methods	See also

EWriteError is the exception class for unsuccessful attempts to write data to a stream.

Unit

Classes

Description

EWriteError is raised when:

The WriteBuffer method of a stream object is unable to write the specified number of bytes.

The IDE is unable to write one of a component’s properties to a stream. This can occur when you try to save a form at design time.


 VCL Reference

EWriteError properties

EWriteError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EWriteError properties

EWriteError	By object	Legend

HelpContext

Message


 VCL Reference

EWriteError methods

EWriteError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EWriteError methods

EWriteError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFilerError

EWriteError


OnKeyDown, Abort, Printing example
 VCL Reference

OnKeyDown, Abort, Printing Example

The following code aborts a print job if the user presses Esc. Note that you should setKeyPreview to True to ensure that the OnKeyDown event handler of Form1 is called.

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

begin

if (Key=VK_ESCAPE) and Printer.Printing then

  begin

  Printer.Abort;

  MessageDlg('Printing aborted', mtInformation, [mbOK],0);

  end;

end;


Aborted example
 VCL Reference

Aborted Example

The following code displays a dialog box if the print job was aborted:

if Printer.Aborted then

  MessageDlg('The print job did not finish printing', mtInformation, [mbOK], 0);


OnTimer, Interval, ActiveControl, Left example
 VCL Reference

OnTimer, Interval, ActiveControl, Left example

The following event handler responds to timer events by moving the active control one pixel to the right:

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  Timer1.Interval := 100;

  if ActiveControl <> nilthen

    ActiveControl.Left := ActiveControl.Left + 1;

end;


AddChildObject example
 VCL Reference

AddChildObject example

The following example adds a new child to the selected item’s list of child items in the tree view control. The new item is identified by the text ‘New Item’. The TBitmap object is attached to the new item.

TreeView1.Items.AddChildObject(TreeView1.Selected,'New Item',MyBitMap);


AddChildObjectFirst example
 VCL Reference

AddChildObjectFirst example

The following example adds a new item to the selected item’s list of child items in the tree view control. The new item is added first in the list of child items. The new item is identified by the text ‘New Item’. The TBitmap object is attached to the new item.

TreeView1.Items.AddChildObjectFirst(TreeView1.Selected,'New Item',MyBitMap);


AddObject, Count, Data example
 VCL Reference

AddObject, Count, Data Example

The following code defines a record type of TMyRec and a record pointer type of PMyRec.

type

PMyRec = ^TMyRec;

TMyRec = record

  FName: string;

  LName: string;

end;

Assuming these types are used, the following code adds a node to TreeView1 as the last sibling of a specified node. A TMyRec record is associated with the added item. The FName and LName fields are obtained from edit boxes Edit1 and Edit2. The Index parameter is obtained from edit box Edit3. The item is added only if the Index is a valid value.

procedure TForm1.Button1Click(Sender: TObject);

var

  MyRecPtr: PMyRec;

  TreeViewIndex: LongInt;

begin

  New(MyRecPtr);

  MyRecPtr^.FName := Edit1.Text;

  MyRecPtr^.LName := Edit2.Text;

  TreeViewIndex := StrToInt(Edit3.Text);

  with TreeView1 do

  begin

    if Items.Count = 0 then

      Items.AddObject(nil, 'Item' + IntToStr(TreeViewIndex), MyRecPtr)

    elseif (TreeViewIndex < Items.Count) and (TreeViewIndex >= 0) then

      Items.AddObject(Items[TreeViewIndex], 'Item' + IntToStr(TreeViewIndex), MyRecPtr);

  end;

end;

After an item containing a TMyRec record has been added, the following code retrieves the FName and LName values associated with the item and displays the values in a label.

procedure TForm1.Button2Click(Sender: TObject);

begin

  Label1.Caption := PMyRec(TreeView1.Selected.Data)^.FName + ' ' +

                  PMyRec(TreeView1.Selected.Data)^.LName;

end;


AllowGrayed, State example
 VCL Reference

AllowGrayed, State Example

This example uses a check box on a form. When the application runs, the check box is initially checked. When the user clicks it, the check box is unchecked. Clicking it again grays the check box.

procedure TForm1.FormCreate(Sender: TObject);

begin

  CheckBox1.AllowGrayed := True;

  CheckBox1.State := cbChecked;

end;


ApplyFilePath, FileEdit, FileList, DirLabel, DirList example
 VCL Reference

ApplyFilePath, FileEdit, FileList, DirLabel, DirList Example

This example uses a file list box, a directory list box, a filter combo box, a drive combo box, a label, an edit box, and a button on a form. When the user runs the application and enters a path or filename in the edit box and presses the button, all the controls update:

procedure TForm1.FormCreate(Sender: TObject);

begin

  FileListBox1.FileEdit := Edit1;

  FilterComboBox1.FileList := FileListBox1;

  DirectoryListBox1.FileList := FileListBox1;

  DirectoryListBox1.DirLabel := Label1;

  DriveComboBox1.DirList := DirectoryListBox1;

  Button1.Default := True;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  FileListBox1.ApplyFilePath(Edit1.Text);

end;


Arc example
 VCL Reference

Arc Example

The following lines of code draw the top quarter of an arc bounded by the current window:

procedure TForm1.FormPaint(Sender: TObject);

var

  R: TRect;

begin

  R := GetClientRect;   {Gets the boundaries of the current window}

  Canvas.Arc(R.Left, R.Top, R.Right, R.Bottom, R.Right, R.Top, R.Left, R.Top);

end;


OnClick, ArrangeIcons example
 VCL Reference

OnClick, ArrangeIcons Example

This code runs when the user chooses a menu item called Window | Arrange Icons:

procedure TForm1.WindowArrangeIconsClick(Sender: TObject);

begin

  Form1.ArrangeIcons;

end;

void __fastcall TForm1::ArrangeIcons1Click(TObject *Sender)

{

  Form1->ArrangeIcons();

}


Assign example
 VCL Reference

Assign Example

The following line copies the bitmap of a speed button named SpeedButton1 to the Clipboard.  Note that you must addClipbrd to the uses clause

Clipboard.Assign(SpeedButton1.Glyph);


AutoEnable, EnabledButtons example
 VCL Reference

AutoEnable, EnabledButtons Example

The following code causes all of the buttons of MediaPlayer1 to become disabled when a bitmap button is clicked:

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  with MediaPlayer1 do begin

    AutoEnable := False;

    EnabledButtons := [];

  end;

end;


AutoRewind, Previous Example
 VCL Reference

AutoRewind, Previous Example

The following code plays MediaPlayer. If AutoRewind is False, Previous is called to rewind after Play is finished.

MediaPlayer.Wait := True;

MediaPlayer.Play;

if not MediaPlayer.AutoRewind then MediaPlayer.Previous;


AutoSize Example
 VCL Reference

AutoSize Example

This example uses an edit box and a button on a form. When the user clicks the button, the font in the edit box enlarges, and the edit box enlarges also to accommodate the larger font size.

procedure TForm1.Button1Click(Sender: TObject);

begin

  Edit1.AutoSize := True;

  Edit1.Font.Size := 20;

  Edit1.Text := 'The edit box is taller now';

end;


AutoSize, Caption Example
 VCL Reference

AutoSize, Caption Example

The following code keeps the size of the label control constant, even though the length of the label’s caption changes. As a result, the caption of the label is probably too long to display in the label when the user clicks the button:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Label1.AutoSize := False;

  Label1.Caption := 'This string is too long as the caption of this label';

end;


FileName, Back, Next Example
 VCL Reference

FileName, Back, Next Example

The following example lets the user pick an .AVI video file using OpenDialog1 and opens that file in MediaPlayer1. Then, the Forward and Back buttons can be used to step through the frames of the AVI clip in either direction.

procedure TForm1.OpenClick(Sender: TObject);

begin

  OpenDialog1.DefaultExt := 'AVI';

  OpenDialog1.Filename := '*.avi';

  if OpenDialog1.Execute then

  begin

    MediaPlayer1.Filename := OpenDialog1.Filename;

    MediaPlayer1.Open;

  end;

end;

procedure TForm1.BackClick(Sender: TObject);

begin

  MediaPlayer1.Back;

end;

procedure TForm1.ForwardClick(Sender: TObject);

begin

  MediaPlayer1.Next;

end;


BeginUpdate, EndUpdate, Add, Count, Items Example
 VCL Reference

BeginUpdate, EndUpdate, Add, Count, Items Example

The following example adds a panel to the status bar control when the user clicks the button and adds a caption to the panel. The code uses BeginUpdate and EndUpdate to prevent repaints until the operation is complete.  A try...finally block ensures EndUpdate is called even when an exception occurs.

procedure TForm1.Button1Click(Sender: TObject);

var

  PanelIndex : Integer;

begin

  with StatusBar1 do

  begin

    Panels.BeginUpdate;

    PanelIndex := StatusBar1.Panels.Count - 1;

    try

      Panels.Add;

      Inc(PanelIndex);

      Panels.Items[PanelIndex].Text := 'Panel' + IntToStr(PanelIndex);

    finally

      Panels.EndUpdate;

    end;

  end;

end;


BevelInner, BevelOuter, BorderWidth, BevelWidth Example
 VCL Reference

BevelInner, BevelOuter, BorderWidth, BevelWidth Example

This example uses a panel component and a button named CreateStatusLine on a form. The code moves the panel to the bottom of the form when the user clicks the button and gives the panel the appearance of a status line by changing the value of the BevelInner, BevelOuter, BevelWidth, and BorderWidth properties.

procedure TForm1.CreateStatusLineClick(Sender: TObject);

begin

  with Panel1 do

  begin

    Align := alBottom;

    BevelInner := bvLowered;

    BevelOuter := bvRaised;

    BorderWidth := 1;

    BevelWidth := 1;

  end;

end;


Canvas, Brush, Bitmap, FillRect Example
 VCL Reference

Canvas, Brush, Bitmap, FillRect Example

The following code loads a bitmap from a file and assigns it to the Brush of the Canvas of Form1:

var

  Bitmap: TBitmap;

begin

  Bitmap := TBitmap.Create;

  try

    Bitmap.LoadFromFile('MyBitmap.bmp');

    Form1.Canvas.Brush.Bitmap := Bitmap;

    Form1.Canvas.FillRect(Rect(0,0,100,100));

  finally

    Form1.Canvas.Brush.Bitmap := nil;

    Bitmap.Free;

  end;

end;


BorderIcons Example
 VCL Reference

BorderIcons example

The following code removes a form’s Maximize button when the user clicks a button:

procedure TForm1.Button1Click(Sender: TObject);

begin

BorderIcons := BorderIcons - [biMaximize];

end;


BoundsRect Example
 VCL Reference

BoundsRect Example

This code resizes the active control to twice as wide and half as high:

procedure TForm1.Button1Click(Sender: TObject);

var

  MyRect: TRect;

begin

  MyRect := ActiveControl.BoundsRect;

  MyRect.Right := MyRect.Left + 2 * (MyRect.Right - MyRect.Left);

  MyRect.Bottom := MyRect.Top + (MyRect.Bottom - MyRect.Top) div 2;

  ActiveControl.BoundsRect := MyRect;

end;


Visible, BringToFront Example
 VCL Reference

Visible, BringToFront Example

The following code uses two forms. Form1 has a button on it. The second form is used as a tool palette. This code makes the palette form visible, and ensures it is the top form by bringing it to the front.

To run this example, you must add Unit2 in the uses clause of your unit.

procedure TForm1.ShowPaletteButtonClick(Sender: TObject);

begin

if Form2.Visible = False then Form2.Visible := True;

Form2.BringToFront;

end;


BrushCopy, CopyRect Example
 VCL Reference

BrushCopy, CopyRect Example

The following code illustrates the differences between CopyRect and BrushCopy. The bitmap graphic ‘TARTAN.BMP’ is loaded into Bitmap and displayed on the Canvas of Form1. BrushCopy replaces the color black in the graphic with the brush of the canvas, while CopyRect leaves the colors intact.

var

  Bitmap: TBitmap;

  MyRect, MyOther: TRect;

begin

  MyRect := Rect(10,10,100,100);

  MyOther := Rect(10,111,100, 201);

  Bitmap := TBitmap.Create;

  Bitmap.LoadFromFile('c:\windows\tartan.bmp');

  Form1.Canvas.BrushCopy(MyRect, Bitmap, MyRect, clBlack);

  Form1.Canvas.CopyRect(MyOther,Bitmap.Canvas,MyRect);

  Bitmap.Free;

end;


Canvas, Ellipse, Color, Style Example
 VCL Reference

Canvas, Ellipse, Color, Style Example

The following example paints a cross-hatched ellipse onto Image1 which is a TImage on the form when the user clicks on Button1.

procedure TForm1.Button1Click(Sender: TObject);

begin

  with Image1 do begin

    Canvas.Brush.Color := clRed;

    Canvas.Brush.Style := bsDiagCross;

    Canvas.Ellipse(0, 0, Image1.Width, Image1.Height);

  end;

end;


OnDrawPanel, Canvas, Draw Example
 VCL Reference

OnDrawPanel, Canvas, Draw Example

The following code is the OnDrawPanel event handler of a status bar.  It draws each panel of the status bar, adding text and icons stored in ImageList1. The image list contains as many icons as there are header sections.

procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar;

  Panel: TStatusPanel; const Rect: TRect);

begin

with StatusBar1.Canvas do

  begin

    Brush.Color := clRed;

    FillRect(Rect);

    Font.Color := clYellow;

    ImageList1.Draw(StatusBar1.Canvas,Rect.Left,Rect.Top,Panel.Index);

    TextOut(Rect.left + 30, Rect.top + 2, 'Panel' + IntToStr(Panel.Index));

  end;

end;


Capabilities Example
 VCL Reference

Capabilities Example

The following code determines whether the device opened by the media player control MediaPlayer1 uses a window to display output. If so, the output displays in a form named Form2:

if mpUsesWindow in MediaPlayer1.Capabilities then

  MediaPlayer1.Display := Form2;


Cascade Example
 VCL Reference

Cascade Example

This code runs when the user chooses a menu item called Window | Cascade:

procedure TForm1.Cascade1Click(Sender: TObject);

begin

  Cascade;

end;


Chord example
 VCL Reference

Chord example

This code draws a chord on the top of an ellipse bounded by the current window.

procedure TForm1.Button1Click(Sender: TObject);

var

  R: TRect;

begin

  R := GetClientRect;  { Get coordinates of the current window. }

  Canvas.Chord(R.Left, R.Top, R.Right, R.Bottom, R.Right, R.Top, R.Left, R.Top);

end;


ColCount, RowCount, Cells Example
 VCL Reference

ColCount, RowCount, Cells Example

This code fills each cell with a number. The numbers are arranged in consecutive order by rows.

procedure TForm1.Button1Click(Sender: TObject);

var

  I, J, K : Integer;

begin

  K := 0;

  with StringGrid1 do

    for I := 0 to ColCount - 1 do

      for J:= 0 to RowCount - 1 do

        begin

          K := K + 1;

          Cells[I,J] := IntToStr(K);

        end;

end;


ClassType, ClassParent Example
 VCL Reference

ClassType, ClassParent Example

This example shows how to obtain the ancestry of a component using the ClassType and ClassParent properties. It uses a button and a list box on a form. When the user clicks the button, the name of the button’s class and the names of its parent classes are added to the list box.

procedure TForm1.Button1Click(Sender: TObject);

var

  ClassRef: TClass;

begin

  ListBox1.Clear;

  ClassRef := Sender.ClassType;

  while ClassRef <> nil do

  begin

    ListBox1.Items.Add(ClassRef.ClassName);

    ClassRef := ClassRef.ClassParent;

  end;

end;

The list box contains the following strings after the user clicks the button:

TButton

TButtonControl

TWinControl

TControl

TComponent

TPersistent

TObject


ClientHeight example
 VCL Reference

ClientHeight example

This example reduces the height of the form's client area by half when the user clicks the button on the form:

procedure TForm1.Button1Click(Sender: TObject);

begin

  ClientHeight := ClientHeight div 2;

end;

Note that only the client area is halved, not the entire form.


ClientRect Example
 VCL Reference

ClientRect Example

The following code uses ClientRect to find and draw a line from the top left to the bottom right of the current control.  It assumes that the current object has a Canvas property, such as can be found on descendants of TGraphicControl or TCustomControl.

with ClientRect do

begin

  Canvas.MoveTo(Left,Top);

  Canvas.LineTo(Right, Bottom);

end;


OnMouseDown, OnMouseMove, OnMouseUp, Panels, Text Example
 VCL Reference

OnMouseDown, OnMouseMove, OnMouseUp, Panels, Text Example

The following example requires a form with a four-paneled status bar.  (Set the Width of the status panels to 150 before running this example).  When the user presses a mouse button, moves the mouse, and releases the mouse button, a rectangle is drawn on the form. When the mouse button is released, the rectangle appears on the form’s canvas. Its top-left and bottom-right corners are defined by the location of the mouse pointer when the user pressed and released the mouse button.  While the user drags the mouse, the location of the top, left, bottom, and right sides of the rectangle are displayed in the status bar.

var

StartX, StartY: Integer;{Declare in interface section of form’s unit}

{Use this code as the OnMouseDown event handler of the form:}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

  StartX := X;

  StartY := Y;

end;

{Use this code as the OnMouseUp event handler of the form:}

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

  Form1.Canvas.Rectangle(StartX, StartY, X, Y);

  StatusBar1.Panels[0].Text := '';

  StatusBar1.Panels[1].Text := '';

  StatusBar1.Panels[2].Text := '';

  StatusBar1.Panels[3].Text := '';

end;

{Use this code as the OnMouseMove event handler of the form:}

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

begin

  if ssLeft in Shift then { make sure button is down }

  begin

    if Y > StartY then

      begin

      StatusBar1.Panels[0].Text := 'Top: ' + IntToStr(StartY);

      StatusBar1.Panels[2].Text := 'Bottom: ' + IntToStr(Y);

      end

    else

      begin

      StatusBar1.Panels[0].Text := 'Top: ' + IntToStr(Y);

      StatusBar1.Panels[2].Text := 'Bottom: ' + IntToStr(StartY);

      end;

    if X > StartX then

      begin

      StatusBar1.Panels[1].Text := 'Left: ' + IntToStr(StartX);

      StatusBar1.Panels[3].Text := 'Right: ' + IntToStr(X);

      end

    else

      begin

      StatusBar1.Panels[1].Text := 'Left: ' + IntToStr(X);

      StatusBar1.Panels[3].Text := 'Right: ' + IntToStr(StartX);

      end;

  end;

end;


Color Example
 VCL Reference

Color Example

The following code changes the color of a shape control using the Color dialog box. The example displays the Color dialog box when the Button1 button is clicked, allowing the user to select a color with the dialog box. When a color value is selected with the dialog box, it is assigned to the shape control.

procedure TForm1.Button1Click(Sender: TObject);

begin

  if ColorDialog1.Execute then Shape1.Color := ColorDialog1.Color;

end;


ComponentCount, Components, RemoveComponent, InsertComponent Example
 VCL Reference

ComponentCount, Components, RemoveComponent, InsertComponent example

This code fragment moves any nonvisual components on the form into a separate data module.  Note that the components are removed starting with the last component, so that the unprocessed portion of the Components array does not change.

Note: This code does not save the form or data module to disk after the nonvisual components are moved.  If executed at runtime, the effect will not persist.

var

  I: Integer;

  Temp: TComponent;

begin

  for I := ComponentCount - 1 downto 0 do

  begin

    Temp := Components[I];

    ifnot (Temp is TControl) then

    begin

      RemoveComponent(Temp);

      DataModule2.InsertComponent(Temp);

    end;

  end;

end;


ControlCount, Controls, Top Example
 VCL Reference

CountrolCount, Controls, Top Example

This example uses an updown control and a group box on a form, with several controls contained within the group box. When the updown control is clicked, the controls within the group box are moved in the appropriate direction.

procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);

var

  I: Integer;

  ChildControl: TControl;

begin

  for I:= 0 to GroupBox1.ControlCount -1 do

  begin

    ChildControl := GroupBox1.Controls[I];

    if Button = btNext then

      ChildControl.Top := ChildControl.Top + 15

    else

      ChildControl.Top := ChildControl.Top - 15;

  end;

end;


CopyFrom, ExeName, ExtractFilePath, Format Example
 VCL Reference

CopyFrom, ExeName, ExtractFilePath, Format Example

This example copies a specified file into the same directory as the application.

procedure TForm1.Save1Click(Sender: TObject);

var

  NewFileName: string;

  Msg: string;

  NewFile: TFileStream;

  OldFile: TFileStream;

begin

  NewFileName := ExtractFilePath(Application.ExeName) + ExtractFileName(Edit1.Text);

  Msg := Format('Copy %s to %s?', [Edit1.Text, NewFileName]);

  if MessageDlg(Msg, mtConfirmation, mbOKCancel, 0) = mrOK then

  begin

    OldFile := TFileStream.Create(Edit1.Text, fmOpenRead or fmShareDenyWrite);

    try

      NewFile := TFileStream.Create(NewFileName, fmCreate or fmShareDenyRead);

      try

        NewFile.CopyFrom(OldFile, OldFile.Size);

      finally

        FreeAndNil(NewFile);

      end;

    finally

      FreeAndNil(OldFile);

    end;

  end;

end;


CopyToClipboard, PasteFromClipboard Example
 VCL Reference

CopyToClipboard, PasteFromClipboard Example

This example uses an edit box, a rich edit control, and a button on a form. When the user clicks the button, text is copied from the rich edit control and pasted into the edit box.  Note that only the text is pasted. If the rich edit control includes any formatting information that is not pasted into the edit control.  If the destination were a rich edit control, the formatting information would be copied as well.

procedure TForm1.Button1Click(Sender: TObject);

begin

  RichEdit1.SelectAll;

  RichEdit1.CopyToClipboard;

  Edit1.Clear;

  Edit1.PasteFromClipboard;

  RichEdit1.SetFocus;

end;


SelectAll, CutToClipboard Example
 VCL Reference

SelectAll, CutToClipboard Example

This example uses an edit box, a rich edit control, and a button on a form. When the user clicks the button, text is cut from the rich edit control and pasted into the edit box.  Note that only the text is pasted. If the rich edit control includes any formatting information that is not pasted into the edit control.  If the destination where a rich edit control, the formatting information would be copied as well.

procedure TForm1.Button1Click(Sender: TObject);

begin

  RichEdit1.SelectAll;  { ensure that all the text is cut, not just the current selection }

  RichEdit1.CutToClipboard;

  Edit1.Clear;

  Edit1.PasteFromClipboard;

  RichEdit1.SetFocus;

end;


CustomSort Example
 VCL Reference

CustomSort Example

The following code orders a list view in reverse alphabetical order on the click of a button. The callback function CustomSortProc calls the global CompareText function and negates its return value.

function CustomSortProc(Item1, Item2: TListItem; ParamSort: integer): integer; stdcall;

begin

  Result := -CompareText(Item1.Caption,Item2.Caption);

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  ListView1.CustomSort(@CustomSortProc, 0);

end;


Items, Delete Example
 VCL Reference

Items, Delete Example

The following example deletes an item in the tree view when the user clicks on it if a checkbox is checked.

procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

  HT : THitTests;

begin

if (CheckBox1.Checked) and (Sender is TTreeView) then

  begin

  with Sender as TTreeView do

    begin

    HT := GetHitTestInfoAt(X,Y);

    if (htOnItem in HT) then

      Items.Delete(GetNodeAt(X,Y));

    end;

  end;

end;


Drive, Directory Example
 VCL Reference

Drive, Directory Example

The following example assumes that a drive combo box, a file list box, and a directory list box are on a form. Add this code as the OnChange event handler for the drive combo box.  When the user changes the drive using the combo box, the directory list box and file list box will update to reflect the new drive and the current directory on that drive.

procedure TForm1.DriveComboBox1Change(Sender: TObject);

begin

  DirectoryListBox1.Drive := DriveComboBox1.Drive;

  FileListBox1.Drive := DriveComboBox1.Drive;

  FileListBox1.Directory := DirectoryListBox1.Directory;

end;


Eject, Close, Enabled Example
 VCL Reference

Eject, Close, Enabled Example

This code ejects the CD from the CD-ROM player and shuts down the media player after 10 seconds. For the code to run correctly, you must have your CD audio device installed correctly, and the device must have software-ejecting capabilities.

var

  TimerOver: Word;

procedure TForm1.FormClick(Sender: TObject);

begin

  MediaPlayer1.DeviceType := dtCDAudio;

  MediaPlayer1.Open;

  MediaPlayer1.Play;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  if TimeOver = 10 then

  begin

    MediaPlayer1.Eject;

    MediaPlayer1.Close;

    { disable the timer, as we are done }

    Timer1.Enabled := False;

  end

  else

    Inc(TimeOver);

end;


Empty Example
 VCL Reference

Empty Example

The following loads a file into Graphic1 if it does not already contain a graphic.

if Graphic1.Empty then Graphic1.LoadFromFile('myfile.bmp');


EndPos, TrackLength Example
 VCL Reference

EndPos, TrackLength Example

The following procedure begins playing the .WAV audio file from the beginning of the file to middle only.

procedure TForm1.Button1Click(Sender: TObject);

begin

  with MediaPlayer1 do

  begin

    FileName := 'D:\WINAPPS\SOUNDS\CARTOON.WAV';

    Open;

    EndPos := TrackLength[1] div 2;

    Play;

  end;

end;


Error, ErrorMessage Example
 VCL Reference

 Error, ErrorMessage Example

The following code opens MediaPlayer1. If an exception occurs, a message window displays the error number and string.

procedure TForm1.BitBtn1Click(Sender: TObject);

var

  MyErrorString: String;

begin

  try

    MediaPlayer1.Open;

  except

    MyErrorString := 'ErrorCode: ' + IntToStr(Error) + #13#10;

    MessageDlg(MyErrorString + MediaPlayer1.ErrorMessage, mtError, [mbOk], 0);

  end;

end;


FilterIndex, Files, Strings, Append Example
 VCL Reference

FilterIndex, Files, Strings, Append Example

This example uses an Open dialog box, a memo, and a button on a form. When the user clicks the button, the Open dialog box appears. When the user selects files in the dialog box and chooses the OK button, the first line from each of the files is added to the memo.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: integer;

  F: TextFile;

  FirstLine: string;

begin

  OpenDialog1.Options := [ofAllowMultiSelect, ofFileMustExist];

  OpenDialog1.Filter := 'Text files (*.txt)|*.txt|All files (*.*)|*.*';

  OpenDialog1.FilterIndex := 2; { start the dialog showing all files }

  if OpenDialog1.Execute then

    with OpenDialog1.Files do

      for I := 0 to Count - 1 do

      begin

        AssignFile(F, Strings[I]);  { next file in Files property }

        Reset(F);

        Readln(F, FirstLine);  { Read the first line out of the file }

        Memo1.Lines.Append(FirstLine);  { Add the line to the memo }

        CloseFile(F);

      end;

end;


AddStrings, Find Example
 VCL Reference

Add, AddStrings, Find Example

This example uses a list box and a label on a form. When the application runs, a string list object is created and three strings are added to it. The Find method searches the strings to look for a match with the string ‘Flowers’. If the string is found, all the strings in the string list are added to the list box, and the index value of the ‘Flowers’ string appears in the caption of the label control.

procedure TForm1.FormCreate(Sender: TObject);

var

  MyList: TStringList;

  Index: Integer;

begin

  MyList := TStringList.Create;

  try

    MyList.Add('Animals');

    MyList.Add('Flowers');

    MyList.Add('Cars');

    MyList.Sort;   { Find will only work on sorted lists! }

    if MyList.Find('Flowers', Index) then

    begin

      ListBox1.Items.AddStrings(MyList);

      Label1.Caption := 'Flowers has an index value of ' + IntToStr(Index);

    end;

  finally

    MyList.Free;

  end;

end;


FloodFill example
 VCL Reference

FloodFill example

The following code floodfills from the center point of Form1's client area until the color black is encountered:

Canvas.FloodFill(ClientWidth div 2, ClientHeight div 2, clBlack, fsBorder);


SetFocus, SelStart, SelLength Example
 VCL Reference

SetFocus, SelStart, SelLength Example

The following OnFind event handler searches a memo component for the text specified in the FindText property of a find dialog component. If found, the first occurrence of the text in Memo1 is selected. The code uses the Pos function to compare strings, and stores the number of characters to skip when determining the selection position in the SkipChars variable. Because there is no handling of case, whole word, or search direction in this algorithm, it is assumed that the Options property of FindDialog1 was set to [frHideMatchCase, frHideWholeWord, frHideUpDown].

procedure TForm1.FindDialog1Find(Sender: TObject);

var

  I, J, PosReturn, SkipChars: Integer;

begin

  for I := 0 to Memo1.Lines.Count do

  begin

    PosReturn := Pos(FindDialog1.FindText,Memo1.Lines[I]);

    if PosReturn <> 0 then {found!}

    begin

      SkipChars := 0;

      for J := 0 to I - 1 do

        SkipChars := SkipChars + Length(Memo1.Lines[J]);

      SkipChars := SkipChars + (I*2);

      SkipChars := SkipChars + PosReturn - 1;

      Memo1.SetFocus;

      Memo1.SelStart := SkipChars;

      Memo1.SelLength := Length(FindDialog1.FindText);

      Break;

    end;

  end;

end;


OnActiveControlChange, Focused Example
 VCL Reference

OnActiveControlChange, Focused Example

This example uses the OnActiveControlChange event to detect when focus changes on the form.  When focus changes, the active control is drawn in red.  All other controls are given the window color from the control panel.

type

  TForm1 = class(TForm)

    Edit1: TEdit;

    Memo1: TMemo;

    Button1: TButton;

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    procedure ColorControl(Sender: TObject);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.ColorControl(Sender: TObject);

var

  I : Integer;

  ControlColor: TColor;

begin

  for I:= 0 to ControlCount -1 do

  begin

    ControlColor :=clWindow;

    if Controls[I] is TWinControl then

      if (Controls[I] as TWinControl).Focused then

        ControlColor := clRed

    if Controls[I] is TEdit then

      (Controls[I] as TEdit).Color := ControlColor

    elseif Controls[I] is TMemo then

      (Controls[I] as TMemo).Color := ControlColor

    elseif Controls[I] is TButton then

      (Controls[I] as TButton).Font.Color := ControlColor;

  end;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Screen.OnActiveControlChange := ColorControl;

end;


OnDropDown, Sorted, Clear, BeginUpdate, EndUpdate Example
 VCL Reference

OnDropDown, Sorted, Clear, BeginUpdate, EndUpdate Example

This example fills the list of a combo box with the set of available fonts when the user drops down the list.  The list is regenerated every time the list is dropped down, so if the application adds or removes fonts, the combo box stays current.

procedure Form1.ComboBox1DropDown(Sender: TObject);

begin

  with ComboBox1 do

  begin

    Items.BeginUpdate; { prevent repaints until done }

    Items.Clear; { empty the list of any old values }

    Sorted := True; { make sure the font names are sorted }

    Items := Screen.Fonts; { add the current list of fonts }

    Items.EndUpdate; {reenable painting }

  end;

end;


FormatCount, Formats Example
 VCL Reference

FormatCount, Formats Example

The following code adds each format on the Clipboard to ListBox1 when Button1 is clicked.Note: You will need to add Clipbrd to the uses clause.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  for I := 0 to Clipboard.FormatCount-1 do

    ListBox1.Items.Add(IntToStr(Clipboard.Formats[I]));

end;


MenuItem, FormCount, Forms Example
 VCL Reference

MenuItem, FormCount, Forms Example

This example assumes that the main form of the application has a main menu with a Windows menu item.  The following code adds a separator, and the name of all forms to the Windows menu.

var

  NewItem: TMenuItem;

  I : integer;

begin

  { first create the separator }

  NewItem := TMenuItem.Create(Self);

  NewItem.Caption := '-';

  { add the new item to the Windows menu }

  Windows.Add(NewItem);

  { now create and add a menu item for each form }

  for  I := 0 to Screen.FormCount-1 do

  begin

    NewItem := TMenuItem.Create(Self);

    NewItem.Caption := Screen.Forms[I].Name;

    Windows.Add(NewItem);

  end;

end;


FormStyle example
 VCL Reference

FormStyle example

This example ensures that the main form of the application is an MDI parent:

constructor TForm1.Create(AOwner : TComponent);

begin

  inherited Create;

  if FormStyle <> fsMDIForm then

    	  FormStyle := fsMDIForm;

  if FormStyle = fsMDIForm then

    	  Edit1.Text := 'MDI form'

  else

    //This line never executes

    Edit1.Text := 'Not an MDI form';

end;


Rect, TextRect, FrameRect Example
 VCL Reference

Rect, TextRect, FrameRect Example

The following code displays the text “Hello, world!” in a rectangle defined by the coordinates (10, 10) and (100, 100). After displaying the text with the TextRect method, the code draws a black, vertical line frame around the rectangle.

var

TheRect: TRect;

begin

  TheRect := Rect(10,10,100,100);

  Form1.Canvas.TextRect(TheRect,10,10,'Hello, world!');

  Form1.Canvas.Brush.Color := clBlack;

  Form1.Canvas.FrameRect(TheRect);

end;


Open, Close, GetAsHandle Example
 VCL Reference

Open, Close, GetAsHandle Example

The following code locks the memory for text on the Clipboard, then converts the text to a Pascal-style string.

var

  MyHandle: THandle;

  TextPtr: PChar;

  MyString: string;

begin

  ClipBoard.Open;

try

  MyHandle := Clipboard.GetAsHandle(CF_TEXT);

  TextPtr := GlobalLock(MyHandle);

  MyString := StrPas(TextPtr);

  GlobalUnlock(MyHandle);

finally

  Clipboard.Close;

end;

end;


GetComponent, SetComponent Example
 VCL Reference

GetComponent, SetComponent Example

This example uses a button and a group box on a form. When the user clicks the button, the button is copied to the Clipboard and then retrieved from the Clipboard and placed in the new parent of the button, the group box. The name of the original button is changed to avoid having two components with the same name at the same time.

implementation

usesClipbrd;

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);

begin

  { copy the button to the clipboard }

  Clipboard.SetComponent(Button1);

  { rename the button which is still on the form }

  Button1.Name := 'OriginalButton';

  { Now retrieve the button from the clipboard }

  { and add it to GroupBox1 }

  { Note that the clipboard button is named Button1, while }

  { the source button has been renamed to 'OriginalButton' }

  Clipboard.GetComponent(Self, GroupBox1);

end;

initialization

  RegisterClasses([TButton]);{ registers the TButton class }

end.


GetFirstNode, GetNext Example
 VCL Reference

GetFirstNode, GetNext Example

The following example adds the Text for all items in the tree view to the list box.

var

  CurItem: TTreeNode;

begin

  CurItem := TreeView1.Items.GetFirstNode;

  while CurItem <> nildo

  begin

    ListBox1.Items.Add(CurItem.Text);

    CurItem := CurItem.GetNext;

  end;

end;


GetFormImage, Picture, Assign Example
 VCL Reference

GetFormImage, Picture, Assign Example

This example uses an image, a button, and a shape component on a form. When the user clicks the button, an image of the form is stored in the FormImage variable and copied to the Clipboard. Then image of the form in then copied back to the image component, producing an interesting result, especially if the button is clicked multiple times.

procedure TForm1.Button1Click(Sender: TObject);

var

  FormImage: TBitmap;

begin

  FormImage := GetFormImage;

  try

    Clipboard.Assign(FormImage);

    Image1.Picture.Assign(Clipboard);

  finally

    FormImage.Free;

  end;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Shape1.Shape := stEllipse;

  Shape1.Brush.Color := clLime;

  Image1.Stretch := True;

end;


OpenCurrent, GetItemPath Example
 VCL Reference

OpenCurrent, GetItemPath Example

This example uses a directory list box, a button, and a label on a form. When the user selects a directory in the directory list box and clicks the button, the selected directory opens, and the path of the second directory displayed in the list box appears as the caption of the label.

procedure TForm1.Button1Click(Sender: TObject);

begin

  DirectoryListBox1.OpenCurrent;

  Label1.Caption := DirectoryListBox1.GetItemPath(1);

end;


GetSelTextBuf, SelText Example
 VCL Reference

GetSelTextBuf, SelText Example

procedure TForm1.Button1Click(Sender: TObject);

var

  Buffer: PChar;

  Size: Integer;

begin

  Size := Edit1.SelLength; {Get length of selected text in Edit1}

  Inc(Size); {Add room for null character}

  GetMem(Buffer, Size); {Creates Buffer dynamic variable}

  Edit1.GetSelTextBuf(Buffer,Size); {Puts Edit1.Text into Buffer}

  Edit2.Text := StrPas(Buffer);{Converts Buffer into Pascal-style string}

  FreeMem(Buffer, Size);{Frees memory allocated to Buffer}

end;

Note: the same thing could be accomplished more simply as follows:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Edit2.Text := Edit1.SelText;

end;


GetStaticRect Example
 VCL Reference

GetStaticRect Example

The following example is taken from TOpenPictureDialog. It calculates the preview rectangle based on the difference between the client area of the dialog and the static area of the standard controls.

procedure TOpenPictureDialog.DoShow;

var

  PreviewRect, StaticRect: TRect;

begin

  { Set preview area to entire dialog }

  GetClientRect(Handle, PreviewRect);

  StaticRect := GetStaticRect;

  { Move preview area to right of static area }

  PreviewRect.Left := StaticRect.Left + (StaticRect.Right - StaticRect.Left);

...


GetTextLen, GetTextBuf, Text Example
 VCL Reference

GetTextLen, GetTextBuf, Text Example

This example copies the text in an edit box into a null-terminated string, and puts this string in another edit box when the user clicks the button on the form.

procedure TForm1.Button1Click(Sender: TObject);

var

  Buffer: PChar;

  Size: Byte;

begin

  Size := Edit1.GetTextLen;       {Get length of string in Edit1}

  Inc(Size);                      {Add room for null character}

  GetMem(Buffer, Size);           {Creates Buffer dynamic variable}

  Edit1.GetTextBuf(Buffer,Size);  {Puts Edit1.Text into Buffer}

  Edit2.Text := StrPas(Buffer);   {Converts Buffer to a Pascal-style string}

  FreeMem(Buffer, Size);{Frees memory allocated to Buffer}

end;

Note: the same thing could be accomplished more simply as follows:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Edit2.Text := Edit1.Text;

end;


Glyph, NumGlyphs Example
 VCL Reference

Glyph, NumGlyphs Example

These lines of code load a four-image bitmap into the Glyph property of a speed button, and specify the appropriate value for the NumGlyphs property:

SpeedButton1.Glyph.LoadFromFile('MYBITMAP.BMP');

SpeedButton1.NumGlyphs := 4;


Graphic Example
 VCL Reference

Graphic Example

The following code draws the graphic in Picture1 in the top-left corner PaintBox1.

PaintBox1.Canvas.Draw(0,0, Picture1.Graphic);


Handle Example
 VCL Reference

Handle Example

The following code uses the Windows API function ShowWindow to display Form2 as an icon, but does not activate it.

ShowWindow(Form2.Handle, SW_SHOWMINNOACTIVE);


OnIdle, HandleMessage Example
 VCL Reference

OnIdle, HandleMessage Example

The following code demonstrates background processing using the OnIdle event, and using the HandleMessage method to permit messages or background processing to get through.

Note:	You must add MyIdleHandler to the Form1 methods.

var

{ global variables to show the order of events. }

  XPos, YPos, Delta: integer;

{ This is a utility procedure to display messages }

{ add this at the beginning of the implementation section }

procedure StatusMsg(MyForm : TForm; Canvas : TCanvas; Message : string; Bkg : Boolean);

begin

  if not bkg then

    Canvas.Font.Style := [fsBold]; {foreground messages are bold }

  Canvas.TextOut(XPos, YPos, Message);

  ifnot bkg then

    Canvas.Font.Style := [];

  { change Xpos and YPos to prepare for the next message }

  Ypos := Ypos + Delta;

  if YPos >= MyForm.ClientHeight then

  begin

    YPos := 10;

    Xpos := Xpos + 100;

  end;

  if (Xpos >= MyForm.ClientWidth - 100) then

  begin

    if(Canvas.Font.Color = clRed) then

      Canvas.Font.Color := clBlack;

    else

      Canvas.Font.Color := clRed;

    Xpos := 10;

  end;

end;

{This is the Form’s OnCreate event handler.  }

{ It initializes global variables and sets the  the OnIdle event handler }

procedure TForm1.FormCreate(Sender: TObject);

begin

  Button1.Caption := 'Do not yield';

  Button2.Caption := 'Handle Message';

  Application.OnIdle:= MyIdleHandler;

  XPos := 10;

  YPos := 10;

  Delta := Abs(Canvas.Font.Height) + 1;

 end;

{ This is the OnIdle event handler. It is set in the Form’s OnCreate event handler, so you need only add it as a private method of the form.  Usually it would perform some background processing for the application.  This one simply writes a message to let you know when it’s there. }

procedure TForm1.MyIdleHandler(Sender: TObject; var Done: Boolean);

begin

  StatusMsg(TForm1, Canvas, 'This represents a background process.', True);

end;

  { Set this method as the OnClick event handler of Button1.  It performs a calculation without yielding to other messages or idle time. }

procedure TForm1.Button1Click(Sender: TObject);

var

  I, J, X, Y: Word;

begin

  StatusMsg(TForm1, Canvas, 'The Button1Click handler is starting', False);

  I := 0;

  J := 0;

  while I < 10 do

  begin

    Randomize;

    while J < 10 do

    begin

      Y := Random(J);

      Inc(J);

    end;

    X := Random(I);

    Inc(I);

  end;

  StatusMsg(TForm1, Canvas, 'The Button1Click handler is done', False);

end;

{ Set this method as the OnClick event handler of Button2.  It performs a calculation but calls HandleMessage to allow idle time or asynchronous message processing. }

procedure TForm1.Button2Click(Sender: TObject);

var

  I, J, X, Y: Word;

begin

 StatusMsg(TForm1, Canvas, 'The Button2Click handler is starting', False);

  I := 0;

  J := 0;

  while I < 10 do

  begin

    Randomize;

    while J < 10 do

    begin

      Y := Random(J);

      Inc(J);

      Application.HandleMessage; { yield to OnIdle or other messages }

    end;

    X := Random(I);

    Inc(I);

  end;

  StatusMsg(TForm1, Canvas, 'The Button2Click handler is done', False);

end;


HasFormat, AsText Example
 VCL Reference

HasFormat, AsText Example

This example uses a button and an edit control on a form. When the user clicks the button, any text on the clipboard is pasted into the edit control.  If there is no text on the clipboard, a message box appears.

Note:	To use this example, you must add Clipbrd to the uses clause.

procedure TForm1.Button1Click(Sender: TObject);

begin

if Clipboard.HasFormat(CF_TEXT) then

  Edit1.Text := Clipboard.AsText

else

  MessageDlg('There is no text on the Clipboard', mtInformation,

        [mbOK],0);

end;


HelpCommand Example
 VCL Reference

HelpCommand Example

This example uses a bitmap button on a form. When the user clicks the button, the Help contents screen of the specified Help file appears.

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  Application.HelpFile := 'myhelp.hlp';

  Application.HelpCommand(HELP_FINDER, 0);

end;


HelpContext Example
 VCL Reference

HelpContext Example

This example uses a bitmap button on a form. When the user clicks the button, the screen with the context number of 714 in the data.hlp Help file appears.  Note that using constants for HelpContext numbers makes the code easier to read:

const

  DATANOTFOUND = 714;

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  Application.HelpFile := 'data.hlp';

  Application.HelpContext(DATANOTFOUND);

end;


HelpFile, HelpJump Example
 VCL Reference

HelpFile, HelpJump Example

This example uses a bitmap button on a form. When the user clicks the button, the Help screen describing the HelpJump property in the Help file appears, because the HelpJump property screen has the a JumpID string of ‘TApplication_HelpJump'. (Note: In the following example, replace "vcl.hlp" with the full name of the VCL Help file that accompanies this product.)

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  Application.HelpFile := 'vcl.hlp';

  Application.HelpJump('TApplication_HelpJump');

end;


Hide Example
 VCL Reference

Hide Example

This code uses a button and a timer on a form. When the user clicks the button, the form disappears for the period of time specified in the Interval property of the timer control, then the form reappears:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Timer1.Enabled := True;

  Hide;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  Visible := True;

  Timer1.Enabled := False;

end;


Hint, ShowHint Example
 VCL Reference

Hint, ShowHint Example

This example uses an edit box and a list box on a form. Items are added to the list box and a Help Hint is assigned to both controls. The last statement enables the Help Hints for the entire application.

procedure TForm1.FormCreate(Sender: TObject);

var

  I: Integer;

begin

  Edit1.Hint := 'Enter your name';

  Edit1.ShowHint := True;

  with ListBox1 do

  begin

    for I := 1 to 10 do

      Items.Add('Item ' + IntToStr(I));

    Hint := 'Select an item';

    ShowHint := True;

  end;

  Application.ShowHint := True;

end;

Note: To see a example that displays the hints of controls in some place other than in a Help Hint box, see the OnHint example.


ClientWidth, HorzScrollBar, Position, Range, Increment, Visible Example
 VCL Reference

ClientWidth, HorzScrollBar, Position, Range, Increment, Visible Example

This example starts the form in a position scrolled so that the right hand edge shows:

procedure TForm1.FormCreate(Sender: TObject);

begin

  ClientWidth := 300;

  with HorzScrollBar do

  begin

    { Set the range to twice the ClientWidth of the form }

    { This means that the form’’s logical size is twice as big }

    { as the physical window. }

    { Note that Range must always be larger than the ClientWidth }

    Range := 600;

    Position := Range - ClientWidth; { start form out fully scrolled }

    Increment := 10;  { clicking the scroll arrows moves the form 10 pixels }

    Visible := True;  { Show the scrollbar }

  end;

end;


Icon Example
 VCL Reference

Icon Example

This code assigns an icon to a form when the form is created:

procedure TForm1.FormCreate(Sender: TObject);

begin

  Icon.LoadFromFile('MDIChild1.ICO');

end;


OpenPictureDialog, Icon Example
 VCL Reference

OpenPictureDialog, Icon Example

The following code allows the user to use a dialog box to redefine the icon for the application at run time. When the user clicks Button1, OpenDialog1 executes and the user specifies an icon filename. The Icon is then assigned to the application.

procedure TForm1.Button1Click(Sender: TObject);

var

Done: Boolean;

begin

  OpenPictureDialog1.DefaultExt := GraphicExtension(TIcon);

  OpenPictureDialog1.FileName := GraphicFileMask(TIcon);

  OpenPictureDialog1.Filter := GraphicFilter(TIcon);

  OpenPictureDialog1.Options := [ofFileMustExist, ofHideReadOnly, ofNoChangeDir ];

  whilenot Done do

  begin

  if OpenPictureDialog1.Execute then

    begin

    if not (ofExtensionDifferent in OpenPictureDialog1.Options) then

      begin

      Application.Icon.LoadFromFile(OpenPictureDialog1.FileName);

      Done := True;

      end

    else

      OpenPictureDialog1.Options := OpenPictureDialog1.Options - ofExtensionDifferent;

    end

  else { User cancelled }

    Done := True;

  end;

end;


IndexOf Example
 VCL Reference

IndexOf Example

The following code adds an object to MyList if it isn’t already in the list.

if MyList.IndexOf(MyObject)=-1 then MyList.Add(MyObject);


OnChange, IndexOf Example
 VCL Reference

OnChange, IndexOf Example

This example uses a file list box, a directory list box, and a label on a form. When the user uses the directory list box to change directories, a message appears and the color of the form changes if the file AUTOEXEC.BAT is in the new directory. The code is written in the OnChange event of the directory list box:

procedure TForm1.DirectoryListBox1Change(Sender: TObject);

begin

  FileListBox1.Directory := DirectoryListBox1.Directory;

  if FileListBox1.Items.IndexOf('AUTOEXEC.BAT') > -1 then

  begin

    Color := clYellow;

    Label1.Caption := 'You are in the root directory!';

  end;

end;


IndexOfName, Count, Names, Strings Example
 VCL Reference

IndexOfName, Count, Names, Strings,  Example

The following example updates the strings in a list box given the strings contained in another list box. If a string in the source list box has the form Name=Value and the destination list box contains a string with the same Name part, the Value part in the destination list box will be replaced by the source’s value.

procedure MergeStrings(Dest, Source: TStrings);

var

  I, DI: Integer;

  begin

  for I := 0 to Source.Count - 1 do

  begin

    if Pos ('=', Source[I]) > 1 then

    begin

      DI := Dest.IndexOfName(Source.Names[I]);

      if DI > -1 then Dest[DI] := Source[I];

    end;

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  MergeStrings(ListBox1.Items,ListBox2.Items);

end;


Insert, Selected, Index Example
 VCL Reference

Insert, Selected, Index Example

The following example inserts a list item after the selected item in the list view.

procedure TForm1.Button1Click(Sender: TObject);

var InsertItem : TListItem;

begin

  with ListView1 do

    InsertItem := Items.Insert(Selected.Index);

  InsertItem.Caption := Edit1.Text;

end;


Parent, InsertControl, RemoveControl Example
 VCL Reference

Parent, InsertControl, RemoveControl Example

This example uses a button placed next to a group box. When the user clicks the button, the group box becomes the parent of the button, so the button moves inside the group box.

procedure TForm1.Button1Click(Sender: TObject);

begin

  RemoveControl(Button1);

  GroupBox1.InsertControl(Button1);

end;

Note that it was necessary to remove the button from the Controls property of the form before the button actually moves into the group box.

This code accomplishes the same thing:

procedure TForm1.Button1Click(Sender: TObject);

begin

Button1.Parent := GroupBox1;

end;


InsertObject, Name, ItemAtPos Example
 VCL Reference

InsertObject, Name, ItemAtPos Example

For the following example, add a button, a status bar, and a list box to Form1. Set the SimplePanel property of the status bar to True, using the object inspector.The following code fills a list box with the names of all components on the form when the user clicks the button. References to the components themselves are inserted along with the names.  The components are all inserted at the front of the list, so that the last component added to the form is the first component in the list.  When the user right-clicks the name of an object in the list, the component’s coordinates are displayed on the status bar. Note that because we are using the right-click, the item need not be selected.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  for I := 0 to Form1.ComponentCount-1 do

    ListBox1.Items.InsertObject(0, Form1.Components[I].Name,

                                Form1.Components[I] as TObject);

end;

procedure TForm1.ListBox1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X,Y: integer);

var

  APoint: TPoint;

  Index: integer;

  TheObject: TControl;

begin

  if Button = mbRight then

  begin

  APoint.X := X;

  APoint.Y := Y;

  Index := ListBox1.ItemAtPos(APoint, True);

  if (ListBox1.Items.Objects[Index] is TControl) then

  begin

    TheObject := (ListBox1.Items.Objects[Index] as TControl);

    StatusBar1.SimpleText := TheObject.Name + ' is at (' +

                           IntToStr(TheObject.Left) + ', ' +

                           IntToStr(TheObject.Top) + ') ';

  end

  else

    Beep;

  end;

end;


IsMasked Example
 VCL Reference

IsMasked Example

This example tests the masked edit box to determine if it has an edit mask. If it doesn’t an edit mask is assigned. The edit mask is one for dates in the MM/DD/YY format:

if not MaskEdit1.IsMasked then

    MaskEdit1.EditMask := '!99/99/00;1;_';


EditMask example
 VCL Reference

EditMask example

This example assigns an edit mask to the masked edit box on the form. The edit mask makes it easy to enter American telephone numbers in the edit box.

procedure TForm1.FormCreate(Sender: TObject);

begin

  MaskEdit1.EditMask := '!\(999\)000-0000;1';

  MaskEdit1.Text = '';

  MaskEdit1.AutoSelect := False;

end;


ItemRect Example
 VCL Reference

ItemRect Example

This example uses a list box on a form. When the user clicks one of the items in the list box, a beep occurs if the mouse is in the first half of the item. A similar technique can be used to detect “hot” regions in an owner-draw list box:

procedure TForm1.FormCreate(Sender: TObject);

begin

  with ListBox1 do

  begin

    Items.Add('Hello');

    Items.Add('New');

    Items.Add('World');

  end;

end;

procedure TForm1.ListBox1MouseUp (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

  ListBoxItem: TRect;

begin

  if Button = mbLeft then

  begin

    ListBoxItem := ListBox1.ItemRect(ListBox1.ItemIndex);

    if (Y > ListBoxItem.Top) and

       (Y < ListBoxItem.Bottom) and

       (X > ListBoxItem.Left) and

       (X < (ListBoxItem.Left + ListBoxItem.Right) div 2) then

      Beep;

  end;

end;


Add, AddChild Example
 VCL Reference

Add, AddChild Example

The following example demonstrates how to add nodes and child nodes to a TTreeView control.

procedure TForm1.Button1Click(Sender: TObject);

var

  MyTreeNode1, MyTreeNode2: TTreeNode;

begin

  with TreeView1.Items do

  begin

    Clear; { remove any existing nodes }

    MyTreeNode1 := Add(nil, 'RootTreeNode1'); { Add a root node }

    { Add a child node to the node just added }

    AddChild(MyTreeNode1,'ChildNode1');

    {Add another root node}

    MyTreeNode2 := Add(MyTreeNode1, 'RootTreeNode2');

    {Give MyTreeNode2 to a child }

    AddChild(MyTreeNode2,'ChildNode2');

    {Change MyTreeNode2 to ChildNode2 }

    { and add a child node to it}

    MyTreeNode2 := TreeView1.Items[3];

    AddChild(MyTreeNode2,'ChildNode2a');

    {Add another child to ChildNode2, after ChildNode2a }

    Add(MyTreeNode2,'ChildNode2b');

    {add another root node}

    Add(MyTreeNode1, 'RootTreeNode3');

  end;

end;


Count, Items, Enabled Example
 VCL Reference

Count, Items, Enabled Example

The following code disables all the subitems of MenuItem1.

var

  I: Integer;

begin

  for I := 0 to MenuItem1.Count-1 do

    MenuItem1.Items[I].Enabled := False;

end;


Add, Count, Items Example
 VCL Reference

Add, Count, Items Example

This example creates a list object and inserts two records into it. The value of the record fields are written on a paintbox:

procedure TForm1.FormButton1Click(Sender: TObject);

type

  PMyList = ^AList;

  AList = record

    I: Integer;

    C: Char;

  end;

var

  MyList: TList;

  ARecord: PMyList;

  B: Byte;

  Y: Word;

begin

  MyList := TList.Create;

  try

    New(ARecord);

    ARecord^.I := 100;

    ARecord^.C := 'Z';

    MyList.Add(ARecord); {Add integer 100 and character Z to list}

    New(ARecord);

    ARecord^.I := 200;

    ARecord^.C := 'X';

    MyList.Add(ARecord); {Add integer 200 and character X to list}

    { Now paint the items onto the paintbox}

    Y := 10;             {Variable used in TextOut function}

    for B := 0 to (MyList.Count - 1) do

    begin

      ARecord := MyList.Items[B];

      Canvas.TextOut(10, Y, IntToStr(ARecord^.I)); {Display I}

      Y := Y + 30;  {Increment Y Value again}

      Canvas.TextOut(10, Y, ARecord^.C);  {Display C}

      Y := Y + 30;  {Increment Y Value}

    end;

    { Cleanup: must free the list items as well as the list }

   for B := 0 to (MyList.Count - 1) do

   begin

     ARecord := MyList.Items[B];

     Dispose(ARecord);

   end;

  finally

    MyList.Free;

  end;

end;


KeyPreview, OnKeyDown, OnKeyUp Example
 VCL Reference

KeyPreview, OnKeyDown, OnKeyUp Example

This example changes a form’s color to aqua when the user presses a key, even when a control on the form has the focus. When the user releases the key, the form returns to its original color.

var

  FormColor: TColor;

procedure TForm1.FormCreate(Sender: TObject);

begin

  KeyPreview := True;

end;

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

begin

  FormColor := Form1.Color;

  Form1.Color := clAqua;

end;

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);

begin

  Form1.Color := FormColor;

end;


Kind Example
 VCL Reference

Kind Example

This example uses three bitmap buttons on a form. When the application runs, the Kind property for each bitmap button is set, and the BitBtn1 button (the OK button) becomes the default button.

procedure TForm1.FormCreate(Sender: TObject);

begin

  BitBtn1.Kind := bkOK;

  BitBtn2.Kind := bkCancel;

  BitBtn3.Kind := bkHelp;

end;


Items, ItemIndex, Kind Example
 VCL Reference

Items, ItemIndex, Kind Example

This example uses a radio group box and a scroll bar on a form. When the user selects one of the radio buttons, the scroll bar changes orientation accordingly.

procedure TForm1.FormCreate(Sender: TObject);

begin

  RadioGroup1.Items.Add('Vertical');

  RadioGroup1.Items.Add('Horizontal');

  RadioGroup1.ItemIndex := 2;

end;

procedure TForm1.RadioGroup1Click(Sender: TObject);

begin

  if RadioGroup1.Items[RadioGroup1.ItemIndex] = 'Vertical' then

    ScrollBar1.Kind := sbVertical;

  if RadioGroup1.Items[RadioGroup1.ItemIndex] = 'Horizontal' then

    ScrollBar1.Kind := sbHorizontal;

end;


Last Example
 VCL Reference

Last Example

This example inserts two records into a list object and displays the contents of the last record in the list on the form:

procedure TForm1.FormActivate(Sender: TObject);

type

  PMyList = ^AList;

  AList = record

    I: Integer;

    C: Char;

  end;

var

  MyList: TList;

  ARecord: PMyList;

  integer: I;

begin

  MyList := TList.Create;

  New(ARecord);

  ARecord^.I := 100;

  ARecord^.C := 'Z';

  MyList.Add(ARecord); {Add integer 100 and character Z to list}

  New(ARecord);

  ARecord^.I := 200;

  ARecord^.C := 'X';

  MyList.Add(ARecord); {Add integer 200 and character X to list}

  ARecord := MyList.Last;

  Canvas.TextOut(10, 10, IntToStr(ARecord^.I)); {Display I}

  Canvas.TextOut(10, 40, ARecord^.C);  {Display C}

  { Cleanup: must free the list items as well as the list }

  for I := 0 to (MyList.Count - 1) do

  begin

    ARecord := MyList.Items[I];

    Dispose(ARecord);

  end;

  MyList.Free;

end;


Layout example
 VCL Reference

Layout example

This example uses a bitmap button on a form that has a bitmap specified as the value of its Glyph property. When the user clicks the bitmap button, the bitmap randomly changes its position on the button:

procedure TForm1.BitBtn1Click(Sender: TObject);

var

  RNum: Integer;

begin

  RNum := Random(4);

  case RNum of

    0: BitBtn1.Layout := blGlyphLeft;

    1: BitBtn1.Layout := blGlyphRight;

    2: BitBtn1.Layout := blGlyphTop;

    3: BitBtn1.Layout := blGlyphBottom;

    else

      ShowMessage('Unhandled case');

  end;

end;


Lines Example
 VCL Reference

Lines Example

This example uses a button and a memo control on a form. When the user clicks the button, the content of the system’s AUTOEXEC.BAT file is loaded into the memo, and the sixth line of the file is written across the top of the form.

procedure TForm1.Button1Click(Sender: TObject);

begin

  Memo1.Lines.LoadFromFile('C:\AUTOEXEC.BAT');

  Writeln('The 6th line of AUTOEXEC.BAT is: ', Memo1.Lines[5]);

end;


OnChange Example
 VCL Reference

OnChange Example

The following code assigns the value to the Lines property of DDEClientItem1 to the Lines of Memo1. This code is executed in the OnChange event handler of DDEClientItem1, so whenever the client is updated, the new data from the server is displayed.

procedure TForm1.DdeClientItem1Change(Sender: TObject);

begin

  Memo1.Lines := DDEClientItem1.Lines

end;


MoveTo, LineTo Example
 VCL Reference

MoveTo, LineTo Example

The following code draws a line from the upper left corner of a form to the mouse position when the mouse is moved, creating a “rubber band” effect.

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);

begin

  { first call FillRect to paint the surface of the form.

  this removes any previously drawn lines (and anything else!) }

  Canvas.FillRect(ClientRect);

  Canvas.MoveTo(0, 0);

  Canvas.LineTo(X, Y);

end;


Margin, Range Example
 VCL Reference

Margin, Range Example

This example uses a button and a label on a form. Place the label near the left side of the form, and place the button somewhere near the middle of the form. When the user runs the application, a horizontal scroll bar does not appear, because no control on the form is close enough to the right edge. Each time the user clicks the button, the button moves 25 pixels to the right, and the calculated Range value is reported in the caption of the label. Repeatedly clicking the button eventually moves the button close enough to the edge of the form (within the Margin amount) so that a horizontal scroll bar appears.  Note that the Range property is continuously updated as the button moves to the right.

procedure TForm1.FormCreate(Sender: TObject);

begin

  with HorzScrollBar do

  begin

    Margin:= 25;

    Increment := 10;

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Button1.Left := Button1.Left + 25;

  Label1.Caption := IntToStr(HorzScrollBar.Range);

end;


Filter, Mask Example
 VCL Reference

 Filter, Mask Example

This example uses a filter combo box and a file list box on a form. When the user selects a filter in the filter combo box, the file list box displays only files which match the selected mask:

procedure TForm1.FilterComboBox1Change(Sender: TObject);

begin

  FileListBox1.Mask := FilterComboBox1.Mask;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  FilterComboBox1.Filter := 'All files (*.*)|*.*| Pascal files (*.pas)|*.pas';

end;


Options, MaxFontSize, MinFontSize Example
 VCL Reference

Options, MaxFontSize, MinFontSize Example

This example uses a Font dialog box, a button, and a label on a form. When the user clicks the button, the Font dialog box appears. The font sizes available are within the range of 8 to 14. When the user chooses OK, the selected font is applied to the caption of the label.

procedure TForm1.Button1Click(Sender: TObject);

begin

  FontDialog1.Options := [fdLimitSize];

  FontDialog1.MaxFontSize := 14;

  FontDialog1.MinFontSize := 8;

  if FontDialog1.Execute then

    Label1.Font := FontDialog1.Font;

end;


NewMenu, NewItem, TextToShortCut, Menu example
 VCL Reference

NewMenu, NewItem, TextToShortCut, Menu example

This code displays a new menu named MyMenu when the user clicks the button.

procedure TForm1.Button1Click(Sender: TObject);

begin

  Menu := NewMenu(Self, 'MyMenu',

            [NewItem('New item', TextToShortCut('Ctrl+N'),

            False, True, Action1.OnExecute, 0, 'Item1')];

end;


Printing Example
 VCL Reference

Printing Example

This example uses a button, a Page Control, and a Print dialog box on a form. When the user clicks the button, the print dialog is displayed.  The user can select any subset of the pages in the page control for printing.  The selected pages are then printed.

To run this example successfully, you must add the Printers unit to the uses clause of your unit.

procedure TForm1.Button1Click(Sender:TObject);

var

  I, Start, Stop: Integer;

begin

PrintDialog1.Options := [poPageNums, poSelection];

PrintDialog1.FromPage := 1;

PrintDialog1.MinPage := 1;

PrintDialog1.ToPage := PageControl1.PageCount;

PrintDialog1.MaxPage := PageControl1.PageCount;

if PrintDialog1.Execute then

  begin

   { determine the range the user wants to print }

    with PrintDialog1 do

    begin

      if PrintRange = prAllPages then

        begin

        Start := MinPage - 1;

        Stop := MaxPage - 1;

      end

      else if PrintRange = prSelection then

      begin

        Start := PageControl1.ActivePage.PageIndex;

        Stop := Start;

        end

      else  { PrintRange = prPageNums }

      begin

        Start := FromPage - 1;

        Stop := ToPage - 1;

      end;

    end;

    { now, print the pages }

    with Printer do

    begin

      BeginDoc;

      for I := Start to Stop do

      begin

        PageControl1.Pages[I].PaintTo(Handle, 10, 10);

        if I <> Stop then

          NewPage;

      end;

      EndDoc;

    end;

  end;

end;


MDIChildCount, MDIChildren, Close Example
 VCL Reference

MDIChildCount, MDIChildren, Close Example

The following code closes all the MDI children of Form1.

var

  I: Integer;

begin

  with Form1 do

    for I := MDIChildCount-1 downto 0 do

      MDIChildren[I].Close;

end;


ModalResult, ShowModal Example
 VCL Reference

ModalResult, ShowModal Example

The following methods are used for buttons in a form that is used as a modal dialog box. The methods cause the dialog box to terminate when the user clicks either the OK or Cancel button, returning mrOk or mrCancel from ShowModal, respectively. You could also set the ModalResult value to mrOk for the OK button and mrCancel for the Cancel button to accomplish the same thing. When the user clicks either button, the dialog box closes.

procedure TMyDialogBox.OKButtonClick(Sender: TObject);

begin

  ModalResult := mrOK;

end;

procedure TMyDialogBox.CancelButtonClick(Sender: TObject);

begin

  ModalResult := mrCancel;

end;

This code brings up the modal dialog from Form1 when a button is clicked.  It causes a Beep if the OK button is clicked.

procedure TForm1.Button1Click(Sender: TObject);

begin

  if MyDialogBox1.ShowModal = mrOK then

    Beep;

end;


OnNotify, Mode Example
 VCL Reference

OnNotify, Mode, Notify Example

The following code declares an array of strings named ModeStr, indexed by the TMPModes type. The Caption of a form displays the string describing the current mode of the device.

Note: before running this example, initialize the Notify property of TMediaPlayer1 to True.

const

  ModeStr: array[TMPModes] of string = ('Not ready', 'Stopped', 'Playing', 'Recording', 'Seeking', 'Paused', 'Open');

procedure TForm1.MediaPlayer1Notify(Sender: TObject);

begin

  with Sender as TMediaPlayer do

  begin

    Form1.Caption := ModeStr[Mode];

    { Note we must reset the Notify property to True }

    { so that we are notified the next time the }

    { mode changes }

    Notify := True;

  end;

end;


MouseToCell Example
 VCL Reference

MouseToCell Example

This example uses a string grid on a form. When the user selects a cell in the grid and releases the mouse button, the column and row coordinates for the cell appear in the cell. The code for displaying the coordinates is written in the OnMouseUp event handler:

procedure TForm1.FormCreate(Sender: TObject);

begin

  StringGrid1.DefaultColWidth := 100;

end;

procedure TForm1.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

  Column, Row: Longint;

begin

  StringGrid1.MouseToCell(X, Y, Column, Row);

  StringGrid1.Cells[Column, Row] := 'Col ' + IntToStr(Column) +

    ',Row ' + IntToStr(Row);

end;


ItemIndex, Move Example
 VCL Reference

ItemIndex, Move Example

This example uses a list box and a button on a form. The list box contains items when the form appears. When the user clicks the button, the selected item in the list box is moved to the top of the list box:

procedure TForm1.FormCreate(Sender: TObject);

var

  I: Integer;

begin

  ListBox1.MultiSelect := False;

  Button1.Caption := 'Move to Top';

  for I := 1 to 10 do

    ListBox1.Items.Add('Item ' + IntToStr(I));

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  ListBox1.Items.Move(ListBox1.ItemIndex, 0);

end;


Printer, Canvas, PageWidth, PageHeight Example
 VCL Reference

Printer, Canvas, PageWidth, PageHeight Example

This example uses a button and a memo on a form. When the user clicks the button, the content of the memo is printed, with a 200-pixel border around the page. To run this example successfully, you must add the Printers unit to the uses clause of your unit.

procedure TForm1.Button1Click(Sender: TObject);

begin

  with Printer do

  begin

    BeginDoc;

    Canvas.TextRect(Rect(200,200,PageWidth-200,PageHeight-200),

                    200, 200, Memo1.Lines.Text);

    EndDoc;

  end;

end;


NormalizeTopMosts, RestoreTopMosts, MessageBox Example
 VCL Reference

NormalizeTopMosts, RestoreTopMosts, MessageBox Example

The following code causes “stay on top” forms to allow a MessageBox to appear on top. After the message box is closed, the topmost forms are restored so that they continue to float to the top.

Begin

  with Application do

  begin

    NormalizeTopMosts;

    MessageBox('This should be on top.', 'Look', MB_OK);

    RestoreTopMosts;

  end;

end;


NotifyValue Example
 VCL Reference

NotifyValue Example

This example uses a media player component named MediaPlayer1. When the application runs, the code attempts to play a CD in the CD audio device, If it is not successful, the application displays an error dialog.

Before you can run this example, you must have a CD audio device installed correctly.

procedure TForm1.FormCreate(Sender: TObject);

begin

  with MediaPlayer1 do

  begin

    Visible := False;

    Notfiy := True;

    DeviceType := dtCDAudio;

    Open;

    Play;

    if NotifyValue <> nvSuccessful then

      MessageDlg('Error playing CD audio', mtError, [mbOk], 0)

  end;

end;


OnActivate, ComponentCount, Components Example
 VCL Reference

OnActivate, ComponentCount, Components example

The following code sets the DataSource for a DBGrid component in Form2 to the currently selected data source in a list provided in Form1. This allows users to specify the desired information in Form1, and then move to Form2 to view the information.

procedure TForm2.FormActivate(Sender: TObject);

begin

  DBGrid1.DataSource :=

    Form1.ListBox1.Objects[Form1.ListBox1.ItemIndex] as TDataSource;

end;

Here is the code on Form1 that fills the list box:

procedure TForm1.FormCreate(Sender.TObject);

var

  I: Integer;

begin

  for I := 0 to DataModule2.ComponentCount - 1 do

  begin

    if (DataModule2.Components[I] is TDataSource) then

      ListBox1.Items.AddObject(DataModule2.Components[I].Name,

        DataModule2.Components[I] as TObject);

  end;

end;


OnActiveFormChange, ActiveForm Example
 VCL Reference

OnActiveFormChange, ActiveForm Example

This example uses a two forms with a button on the first form. When the user clicks the button, the second form appears. As the user switches between forms, the form that is active is colored aqua.

type

  TForm1 = class(TForm)

    Button1: TButton;

    procedure FormCreate(Sender: TObject);

    procedure Button1Click(Sender: TObject);

  private

    { Private declarations }

  public

    procedure ColorForm(Sender: TObject);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

uses Unit2;

procedure TForm1.ColorForm(Sender: TObject);

begin

  Color := clBtnFace;

  Form2.Color := clBtnFace;

  Screen.ActiveForm.Color := clAqua;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Screen.OnActiveFormChange := ColorForm;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Form2.Show;

end;


Font, Execute, OnApply, Assign Example
 VCL Reference

Font, Execute, OnApply, Assign Example

This example takes an edit control, a button, and a rich edit control on a form.  When the user presses the button, a Font dialog appears.  When the user clicks the Apply button in the Font dialog, the currently selected font is applied to the active control.

procedure TForm1.Button1Click(Sender: TObject);

begin

   TFontDialog1.Options = TFontDialog1.Options + fdApplyButton;

   TFontDialog1.Execute;

end;

procedure TForm1.FontDialog1Apply(Sender: TObject; Wnd: Integer);

begin

  if ActiveControl is TEdit then

    with ActiveControl as TEdit do

       Font.Assign(TFontDialog(Sender).Font)

  else if ActiveControl is TRichEdit then

    with ActiveControl as TRichEdit do

      SelAttributes.Assign(TFontDialog(Sender).Font)

  else

    Beep;

end;


OnClick Example
 VCL Reference

OnClick Example

This example uses a label and a media player on a form. When the user clicks one of the media player buttons, the caption of the label indicates which button was clicked. For this example to run successfully, you must have a CD audio device installed correctly.

procedure TForm1.FormCreate(Sender: TObject);

begin

  MediaPlayer1.DeviceType := dtCDAudio;

  MediaPlayer1.Open;

  MediaPlayer1.Left := 20;

  MediaPlayer1.Top := 12;

  Label1.Top := 44;

  Label1.Left := 20;

  Label1.Color := clYellow;

  Label1.Font.Name := 'Arial';

  Label1.Caption := 'Click Me';

end;

procedure TForm1.MediaPlayer1Click(Sender: TObject; Button: TMPBtnType; var DoDefault: Boolean);

begin

  case Button of

    btPlay :

    begin

      Label1.Caption := 'Playing';

      Label1.Left := 20;

    end;

    btPause:

    begin

      Label1.Caption := 'Paused';

      Label1.Left := 48;

    end;

    btStop:

    begin

      Label1.Caption := 'Stopped';

      Label1.Left := 76;

    end;

    btNext:

    begin

      Label1.Caption := 'Next';

      Label1.Left := 104;

    end;

    btPrev:

    begin

      Label1.Caption := 'Previous';

      Label1.Left := 132;

    end;

    btStep:

    begin

      Label1.Caption := 'Step';

      Label1.Left := 160;

    end;

    btBack:

    begin

      Label1.Caption := 'Back';

      Label1.Left := 188;

    end;

    btRecord:

    begin

      Label1.Caption := 'Record';

      Label1.Left := 216;

    end;

    btEject:

    begin

      Label1.Caption := 'Eject';

      Label1.Left := 244;

    end;

  end;

end;


OnOpen, OnClose, ExecuteMacro Example
 VCL Reference

OnOpen, OnClose, ExecuteMacro Example

The following code enables the send macro button and macro edit control when the DDE conversation begins, and disables them when it ends.  When the send macro button is clicked, the macro is sent to the DDE server.

procedure TForm1.DdeClientConv1Open(Sender: TObject);

begin

  SendMacroButton.Enabled := True;

  EditMacro.Enabled := True;

end;

procedure TForm1.DdeClientConv1Close(Sender: TObject);

begin

  SendMacroButton.Enabled := False;

  EditMacro.Enabled := False;

end;

procedure TForm1.SendMacroButtonClick(Sender: TObject);

begin

  DdeClientConv1.ExecuteMacro(EditMacro.Text, True);

end;


OnDeactivate, Minimize Example
 VCL Reference

OnDeactivate, Minimize Example

The following code minimizes an application when it’s deactivated. Note that AppDeactivate should be declared a method of TForm1.

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.OnDeactivate := AppDeactivate;

end;

procedure TForm1.AppDeactivate(Sender: TObject);

begin

  Application.Minimize;

end;


OnDestroy Example
 VCL Reference

OnDestroy Example

The following code explicitly allocates memory for a pointer in the OnCreate event of Form1, then releases the memory in the OnDestroy event. Assume that MyPtr is a Pointer type field of TForm1.

procedure TForm1.FormCreate(Sender: TObject);

begin

  New(MyPtr);

end;

procedure TForm1.FormDestroy(Sender: TObject);

begin

  Dispose(MyPtr);

end;


OnDragOver, OnDragDrop Example
 VCL Reference

OnDragOver, OnDragDrop Example

This code comes from an application that contains a list box and three labels, each with a different font and color.  The DragMode property for each of the labels is dmAutomatic.  The user can select a label and drag it to a list box and drop it. When the label is dropped, the items in the list box assume the color and font of the dropped label.

This OnDragOver event handler permits the list box to accept a dropped label:

procedure TForm1.ListBox1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);

begin

  Accept := Source is TLabel;

end;

This OnDragDrop event handler implements the drop behavior.

procedure TForm1.ListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);

begin

  if (Sender is TListBox) and (Source is TLabel) then

  begin

    with Sender as TListBox do

    begin

      Font := (Source as TLabel).Font;

      Color := (Source as TLabel).Color;

    end;

  end;

end;


OnDrawCell, Canvas, DrawFocusRect Example
 VCL Reference

OnDrawCell, Canvas, DrawFocusRect Example

The following code uses the bitmaps in an image list component to draw the contents of each cell in a draw grid.  It draws a focus rectangle around the cell that has focus.

procedure TForm1.DrawGrid1DrawCell(Sender: TObject; Col, Row: Longint; Rect: TRect; State: TGridDrawState);

var

  index: integer;

begin

  index := Row * DrawGrid1.ColCount + Col;

  with Sender as TDrawGrid do

  begin

    Canvas.Brush.Color := clBackGround;

    Canvas.FillRect(Rect);

    ImageList1.Draw(Canvas,Rect.Left,Rect.Top,index);

    if gdFocused in State then

      Canvas.DrawFocusRect(Rect);

  end;

end;


OnEndDrag Example
 VCL Reference

OnEndDrag Example

This code displays a message in a label named Status. The message displayed depends on whether the dragged label control was successfully dropped into and accepted by a another control.

procedure TForm1.Label1EndDrag(Sender, Target: TObject; X, Y: Integer);

var

  S: string;

begin

  S := (Sender as TLabel).Name + ' was dropped... and ';

  if Target <> nil then

    S := S + 'accepted!'

  else

    S := S + 'rejected!';

  Status.Caption := S;

end;


OnEnter, OnExit Example
 VCL Reference

OnEnter, OnExit Example

This example uses an edit box and a memo control on a form. When either the edit box or the memo is the active control, it is colored yellow. When the active control becomes inactive, the color of the control returns to the Windows system color for a window.

procedure TForm1.Edit1Enter(Sender: TObject);

begin

  Edit1.Color := clYellow;

end;

procedure TForm1.Edit1Exit(Sender: TObject);

begin

  Edit1.Color := clWindow;

end;

procedure TForm1.Memo1Enter(Sender: TObject);

begin

  Memo1.Color := clYellow;

end;

procedure TForm1.Memo1Exit(Sender: TObject);

begin

  Memo1.Color := clWindow;

end;


OnException, ShowException, Terminate Example
 VCL Reference

OnException, ShowException, Terminate Example

In addition to displaying the exception message, which happens by default, the following code shuts down the application when anexception is not caught and handled.

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.OnException := AppException;

end;

procedure TForm1.AppException(Sender: TObject; E: Exception);

begin

  Application.ShowException(E);

  Application.Terminate;

end;


OnExecuteMacro Example
 VCL Reference

OnExecuteMacro Example

The following code clears the contents of a memo in the server application if the appropriate message is sent from the client application.

procedure TForm1.DdeServerConv1ExecuteMacro(Sender: TObject; Msg: TStrings);

begin

 if Msg.Strings[0] = 'Edit|Clear' then

    Memo1.Clear;

end;


OnGetEditMask Example
 VCL Reference

OnGetEditMask Example

This example specifies an edit mask in a string grid to limit the cells that contain telephone numbers, as indicated by a label cell in the first row:

procedure TForm1.StringGrid1GetEditMask(Sender: TObject; ACol, ARow: Longint; var Value: string);

begin

  if StringGrid1.Cells[ACol, 0] = 'Phone Number' then

    Value :=  '!\(999\)000-0000;1';

end;


OnGetEditText Example
 VCL Reference

OnGetEditText Example

The following code lowercases the text for a string grid cell when the user begins to edit it.

procedure TForm1.StringGrid1GetEditText(Sender: TObject; ACol, ARow: Longint; var Value: string);

begin

  Value := AnsiLowerCase(Value);

end;


OnHelp Example
 VCL Reference

OnHelp Example

The following code changes the Help file depending on the active form, before WinHelp is called. AppHelp is assigned to the OnHelp event handler of Application in the OnCreate event of Form1.

function TForm1.AppHelp(Command: Word; Data: Longint; var CallHelp: Boolean): Boolean;

begin

  Application.HelpFile := Screen.ActiveForm.Name + '.hlp';

  CallHelp := True;

end;

function TForm1.FormCreate(Sender: TObject);

begin

  Application.OnHelp := AppHelp;

end;


OnHide Example
 VCL Reference

OnHide Example

This example uses two forms, each with a label and a button. When the user clicks a button, the other form appears and the current form disappears. Also, a message appears in the label of the form that is showing, indicating that the other form is hidden. This is the implementation section of Unit1:

implementation

{$R *.DFM}

uses Unit2;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Form2.Show;

  Hide;

end;

procedure TForm1.FormHide(Sender: TObject);

begin

  Form2.Label1.Caption := 'Form1 is hiding';

end;

end.

This is the implementation section of Unit2:

implementation

{$R *.DFM}

uses Unit1;

procedure TForm2.Button1Click(Sender: TObject);

begin

  Form1.Show;

  Hide;

end;

procedure TForm2.FormHide(Sender: TObject);

begin

  Form1.Label1.Caption := 'Form2 is hiding';

end;

end.


OnKeyPress Example
 VCL Reference

OnKeyPress Example

This event handler displays a message dialog box specifying which key was pressed:

procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);

begin

  MessageDlg(Key + ' has been pressed', mtInformation, [mbOK], 0)

end;


OnMessage Example
 VCL Reference

OnMessage Example

The following code handles a custom message that the application sends to itself when a file is ready for reading.

const

 WM_FILEREADY = WM_USER + 2000;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.OnMessage := AppMessage;

end;

procedure TForm1.AppMessage(var Msg: TMsg; var Handled: Boolean);

begin

  if Msg.message = WM_FILEREADY then

  begin

    Memo1.Lines.LoadFromFile(StrPas(PChar(Msg.lParam)));

    Handled := True;

  end;

  { for all other messages, Handled remains False }

  { so that other message handlers can respond }

end;


OnPokeData, Lines, Text Example
 VCL Reference

OnPokeData, Lines, Text Example

The following code uses two DDE server items to protect poked data from being lost by a DDE server application. DoOnPoke is the OnPokeData event handler for the DDE server item named DDETestItem. When data is poked, The Text for the DDE server item named FInPoke is set to 'True', telling the client application not to send any more data.  After the poked data is stored in the Lines property of Memo2,  the Text property of FInPoke is set back to 'False', telling the client application that more data can safely be sent.

procedure TDdeSrvrForm.doOnPoke(Sender: TObject);

begin

  FInPoke.Text := 'True';

  Memo2.Lines := DdeTestItem.Lines;

  FInPoke.Text := 'False';

end;


OnPopup Example
 VCL Reference

OnPopup Example

The following code enables the Paste item from the pop-up menu if the Clipboard has text data.

procedure TForm1.PopupMenu1Popup(Sender: TObject);

begin

  Paste1.Enabled := Clipboard.HasFormat(CF_TEXT);

  Copy1.Enabled := Edit1.SelLength > 0;

end;


Options Example
 VCL Reference

Options example

The following code calls the user-defined routine DoReplace if the Replace button was clicked, or calls the user-defined routine DoReplaceAll if the Replace All button was clicked.

procedure TForm1.ReplaceDialog1Replace(Sender: TObject);

begin

  with Sender as TReplaceDialog do

  begin

  if frReplace in Options then

    DoReplace(FindText, ReplaceText);

  elseif frReplaceAll in Options then

    DoReplaceAll(FindText, ReplaceText);

end;


OnReplace, ReplaceText Example
 VCL Reference

OnReplace, ReplaceText Example

The following event handler searches a TMemo object called Memo1 and replaces FindText with ReplaceText. It uses TMemo’s SelStart, SelLength, and SelText properties.

procedure TForm1.ReplaceDialog1Replace(Sender: TObject);

var

  SelPos: Integer;

begin

  with TReplaceDialog(Sender) do

  begin

  { Perform a global case-sensitive search for FindText in Memo1 }

    SelPos := Pos(FindText, Memo1.Lines.Text);

    if SelPos > 0 then

    begin

      Memo1.SelStart := SelPos - 1;

      Memo1.SelLength := Length(FindText);

      { Replace selected text with ReplaceText }

      Memo1.SelText := ReplaceText;

    end

    else MessageDlg(Concat('Could not find "', FindText, '" in Memo1.'), mtError, [mbOk], 0);

  end;

end;


OnResize Example
 VCL Reference

OnResize Example

The following code keeps the right edge on Button1 against the right edge of Form1 when Form1 is resized.

procedure TForm1.FormResize(Sender: TObject);

begin

  Button1.Left := Form1.ClientWidth-Button1.Width;

end;


OnResizeRequest Example
 VCL Reference

OnResizeRequest Example

The following code resizes the rich edit control to accommodate growing or shrinking lines of text:

procedure TForm1.RichEditResizeRequest(Sender: TObject; Rect: TRect);

begin

(Sender as TRichEdit).BoundsRect := Rect;

end;


OnRowMoved Example
 VCL Reference

OnRowMoved Example

The following code displays the number of rows a row was moved in a label.

procedure TForm1.StringGrid1RowMoved(Sender: TObject; FromIndex, ToIndex: Longint);

begin

  Label1 := IntToStr(Abs(FromIndex-ToIndex));

end;


Min, Max, Position, SmallChange, LargeChange, OnScroll Example
 VCL Reference

Min, Max, Position, SmallChange, LargeChange, OnScroll Example

This example shows how to use a scrollbar to navigate the pages of a page control.  To run this example, place a scrollbar and a page control on a form.  Right click the page control and add 12 pages to it.  Add the following code to the OnCreate event of the form, the OnChange event of the page control, and the OnScroll event of the scrollbar.

Note that the LargeChange and SmallChange properties are set to automatically change the active page by one tab or one row respectively.  The OnScroll event is used to make the actual change in the page control, while the OnChange event of the page control ensures that the scrollbar is kept in sync with changes made directly to the page control.

procedure TForm1.FormCreate(Sender: TObject);

var

  I : Integer;

begin

  { First, initialize the page control }

  PageControl1.TabWidth := PageControl1.ClientWidth div 4 - 1;

  PageControl1.ActivePage := PageControl1.Pages[0];

  { set up the scrollbar to reflect the structure of the page control}

  with ScrollBar1 do

  begin

    Max := PageControl1.PageCount - 1;

    Min := 0;

    SmallChange := 1;

    { set LargeChange to a single row of tabs }

    LargeChange := PageControl1.ClientWidth div PageControl1.TabWidth;

  end;

end;

procedure TForm1.PageControl1Change(Sender: TObject);

begin

  with Sender as TPageControl do

    ScrollBar1.Position := ActivePage.PageIndex;

end;

procedure TForm1.ScrollBar1Scroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);

begin

  PageControl1.ActivePage := PageControl1.Pages[ScrollPos];

end;


PageSize Example
 VCL Reference

PageSize Example

The following code sets the thumb tab of a scrollbar so that it represents the proportion of the scrolling range that is visible:

var

  TrackHeight: Integer; { the size of the scroll bar track }

  MinHeight: Integer; { the default size of the thumb tab }

begin

  MinHeight := GetSystemMetrics(SM_CYVTHUMB); { save default size }

  with ScrollBar1 do

  begin

    TrackHeight := ClientHeight - 2 * GetSystemMetrics(SM_CYVSCROLL);

    PageSize := TrackHeight div (Max - Min + 1);

    if PageSize < MinHeight then PageSize := MinHeight;

  end;

end;


OnSelectCell Example
 VCL Reference

OnSelectCell Example

The following code ensures that the user cannot select a cell unless it is empty.

procedure TForm1.StringGrid1SelectCell(Sender: TObject; Col, Row: Longint; var CanSelect: Boolean);

begin

  CanSelect := (StringGrid1.Cells[Col,Row]='')

end;


OnShowHint Example
 VCL Reference

OnShowHint Example

This example uses three speed buttons on a panel. The code changes the color, width, and position of the text in the Help Hint for the third speed button. . Set the ShowHint property of each speed button to True and give a value to the Hint property of each.

You must declare the DoShow method in the type declaration of the form. Once it is declared, write the code for the DoShow method in the implementation part of the unit. Finally, in the OnCreate event handler for the form, assign the method to the OnShowHint event of the application.

type

  TForm1 = class(TForm)

    Panel1: TPanel;

    SpeedButton1: TSpeedButton;

    SpeedButton2: TSpeedButton;

    SpeedButton3: TSpeedButton;

    procedure FormCreate(Sender: TObject);

   private

    { Private declarations }

  public

    procedure DoShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.DoShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);

begin

  if HintInfo.HintControl = SpeedButton3 then

  begin

    with HintInfo do

    begin

      HintColor := clAqua;{ Changes only for this hint }

      HintMaxWidth := 120;{Hint text word wraps if width is greater than 120 }

      Inc(HintPos.X, SpeedButton3.Width); { Move hint to right edge }

    end;

  end;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.ShowHint := True;

  Application.OnShowHint := DoShowHint;

end;

end.


OpenLink, RequestData, DDEItem Example
 VCL Reference

OpenLink, RequestData, DDEItem Example

The following code requests data if a link is open.

with DDEClientConv1 do

  if OpenLink then RequestData(DDEClientItem1.DDEItem);


Orientation Example
 VCL Reference

Orientation Example

This example uses two radio buttons on a form named Landscape and Portrait. The form also includes a button. When the user selects an orientation by clicking one of the radio buttons and then clicks the button to print one line of text, the print job prints using the selected orientation:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Printer.BeginDoc;

  Printer.Canvas.TextOut(100,100,'Hi there');

  Printer.EndDoc;

end;

procedure TForm1.PortraitClick(Sender: TObject);

begin

  Printer.Orientation := poPortrait;

end;

procedure TForm1.LandscapeClick(Sender: TObject);

begin

  Printer.Orientation := poLandscape;

end;


Pack Example
 VCL Reference

Pack Example

This example assumes there are two edit box controls on the form. The code creates a list object and adds two strings to it. The second string in the list is a nil string. The code counts the number of strings in the list and displays the number in the Edit1 control. The code then packs the list, removing the nil string, and counts the strings in the list again. The second count displays in the Edit2 control:

procedure TForm1.FormCreate(Sender: TObject);

var

  MyList: TList;

  I: Integer;

begin

  MyList := TList.Create;              {Create a list }

  MyList.Add(PChar('A string')); {Add a string}

  MyList.Add(PChar('')); { Add an empty string }

  MyList.Add(nil);              {Add nil }

  MyList.Add(PChar('')); { Add another empty string }

  Edit1.Text := IntToStr(MyList.Count); {Put count into Edit1}

  Mylist.Pack;                         {Pack the list.}

  Edit2.Text := IntToStr(MyList.Count); {Put count into Edit2}

  MyList.Free;                         {Free memory for list}

end;


PageNumber Example
 VCL Reference

PageNumber Example

This example uses a button on a form. When the user clicks the button, one line of text is printed on six separate pages. As each page is printed, a message indicating the number of the page being printed appears on the status bar.

To run this example successfully, you must add Printers to the uses clause of your unit and set the SimplePanel property of the status bar to True.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  StatusBar1.SimplePanel := True; { so that SimpleText will work }

  Printer.BeginDoc;

  for I := 1 to 6 do

  begin

    Printer.Canvas.TextOut(100, 100, 'Object Pascal is great');

    StatusBar1.SimpleText := 'Now printing page ' + IntToStr(Printer.PageNumber));

    Printer.NewPage;

  end;

  Printer.EndDoc;

end;


Parent, GetNextChild, GetPrevChild Example
 VCL Reference

Parent, GetNextChild, GetPrevChild Example

The following code tests to see if the currently selected item has a sibling. True will be assigned to HasSibling if so.

var

  HasSibling: Boolean;

  SelNode: TTreeNode;

  ParentNode: TTreeNode;

begin

  SelNode := TTreeView1.Selected;

  ParentNode := SelNode.Parent;

  HasSibling := (ParentNode.GetPrevChild(SelNode) <> nil) or

                (ParentNode.GetNextChild(SelNode) <> nil);

end;


Pause Example
 VCL Reference

Pause Example

This example uses a media player, a timer, and a button on a form. Only the button is visible when the application runs. When the user clicks the button, the .WAV file plays. When the user clicks the button again, the .WAV file pauses. The caption of the button changes, depending on whether the .WAV file is playing, paused, or stopped.

To run this example, you must have the CHIMES.WAV file in your Windows directory and install a device that plays WAV audio files:

procedure TForm1.FormActivate(Sender: TObject);

var

  WinDir: PChar;

begin

  MediaPlayer1.Visible := False;

  GetMem(WinDir, 144);

  GetWindowsDirectory(WinDir, 144);

  StrCat(WinDir, '\chimes.wav');

  MediaPlayer1.FileName := StrPas(WinDir);

  MediaPlayer1.Open;

  FreeMem(WinDir, 144);

  Button1.Caption := 'Play';

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  if Button1.Caption = 'Play' then

  begin

    Button1.Caption := 'Pause';

    MediaPlayer1.Play;

  end

  else

  begin

    Button1.Caption := 'Play';

    MediaPlayer1.Pause;

  end;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  if MediaPlayer1.Mode = mpStopped then

    Button1.Caption := 'Play';

end;


PauseOnly Example
 VCL Reference

PauseOnly Example

The following code illustrates the difference between Pause and PauseOnly. After the second call to Pause, MediaPlayer1 resumes playing. After the second call to PauseOnly, MediaPlayer1 is still paused.

with MediaPlayer1 do

begin

  MediaPlayer1.Play;

  MediaPlayer1.Pause;

  { Now its paused }

  MediaPlayer1.Pause;

  { Now it’s playing – the Pause property toggled }

  MediaPlayer1.PauseOnly;

  { Now it’s paused again }

  MediaPlayer1.PauseOnly;

  { Now it’s still paused }

end;


Pixels Example
 VCL Reference

Pixels Example

This example draws a red line (very slowly) when the user presses a button. Attach the following code to the button’s OnClick event handler:

procedure TForm1.Button1Click(Sender: TObject);

var

  W: Word;

begin

  for W := 10 to 200 do

    Canvas.Pixels[W, 10] := clRed;

end;


PokeData Example
 VCL Reference

 PokeData Example

The following code pokes the data that is in Edit1 to the DDE server. The DDE item of the conversation is specified in the DDEItem property of DDEClientItem1.

var

  TheData: PChar;

DDEClientConv1.PokeData(DDEClientItem1.DDEItem,

                StrPCopy(TheData, Edit1.Text));


PokeDataLines Example
 VCL Reference

 PokeDataLines Example

The following line pokes the data that is in Memo1 to the DDE server. The DDE item of the conversation is specified in the DDEItem property of DDEClientItem1.

DDEClientConv1.PokeDataLines(DDEClientItem1.DDEItem, Memo1.Lines);


OnPaint, Pen, Polyline Example
 VCL Reference

OnPaint, Pen, Polyline example

This example paints a white five-pointed star in a paintbox control:

procedure TForm1.PaintBox1Paint(Sender: TObject);

begin

  with Sender as TPaintBox do

  begin

    Canvas.Pen.Color := clWhite;

    Canvas.Polyline([Point(40, 10), Point(20, 60), Point(70, 30),

    Point(10, 30), Point(60, 60), Point(40, 10)]);

  end;

end;


Popup, AutoPopup Example
 VCL Reference

Popup, AutoPopup example

This example uses a pop-up menu. When the user presses the mouse button, the pop-up menu appears where the user clicked the mouse:

procedure TForm1.FormCreate(Sender: TObject);

begin

  PopupMenu1.AutoPopup := False;

end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

  PopupMenu1.Popup(X, Y);

end;


PopupComponent, PopupMenu Example
 VCL Reference

PopupComponent, PopupMenu Example

This example uses two edit boxes, two memos, and one pop-up menu on a form. The pop-up menu contains Cut, Copy, and Paste commands. This code makes the pop-up menu available to both edit boxes and both memos:

procedure TForm1.FormCreate(Sender: TObject);

begin

  PopupMenu1.AutoPopup := True;

  Edit1.PopupMenu := PopupMenu1;

  Edit2.PopupMenu := PopupMenu1;

  Memo1.PopupMenu := PopupMenu1;

  Memo2.PopupMenu := PopupMenu1;

end;

These are the cut, copy, and paste OnClick events for the commands on the pop-up menu.

procedure TForm1.Copy1Click(Sender: TObject);

begin

  if PopupMenu1.PopupComponent = Edit1 then

   Edit1.CopyToClipboard

  elseif PopupMenu1.PopupComponent = Edit2 then

    Edit2.CopyToClipboard

  else if PopupMenu1.PopupComponent = Memo1 then

    Memo1.CopyToClipboard

  else if PopupMenu1.PopupComponent = Memo2 then

    Memo2.CopyToClipboard

  else

    Beep;

end;

procedure TForm1.Cut1Click(Sender: TObject);

begin

  if PopupMenu1.PopupComponent = Edit1 then

    Edit1.CutToClipboard

  elseif PopupMenu1.PopupComponent = Edit2 then

    Edit2.CutToClipboard;

  else if PopupMenu1.PopupComponent = Memo1 then

    Memo1.CutToClipboard

  else if PopupMenu1.PopupComponent = Memo2 then

    Memo2.CutToClipboard

  else

    Beep;

end;

procedure TForm1.Paste1Click(Sender: TObject);

begin

  if PopupMenu1.PopupComponent = Edit1 then

    Edit1.PasteFromClipboard

  else if PopupMenu1.PopupComponent = Edit2 then

    Edit2.PasteFromClipboard;

  else if PopupMenu1.PopupComponent = Memo1 then

    Memo1.PastFromClipboard

  else if PopupMenu1.PopupComponent = Memo2 then

    Memo2.PasteFromClipboard

  else

    Beep;

end;


PrintToFile, SaveToFile Example
 VCL Reference

PrintToFile, SaveToFile Example

This example displays a print dialog box with a Print to File check box, and then prints the contents of a rich edit control to the indicated destination:

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

with PrintDialog1 do

  begin

  Options := [poPrintToFile];

  PrintToFile := True;

  if Execute then

    begin

    if PrintToFile then

      begin

      SaveDialog1.Title := 'Print to File: ';

      if SaveDialog1.Execute then

        RichEdit1.Lines.SaveToFile(SaveDialog1.FileName);

      end

    else

      RichEdit1.Print('');

    end;

  end;

end;


ProcessMessages Example
 VCL Reference

ProcessMessages Example

This example uses two buttons that are long enough to accommodate lengthy captions on a form. When the user clicks the button with the caption Ignore Messages, the code begins to generate a long series of random numbers. If the user tries to resize the form while the handler is running, nothing happens until the handler is finished. When the user clicks the button with the caption Process Messages, more random numbers are generated, but the application can still respond to a series of mouse events, such as resizing the form.

Note:	How quickly these event handlers run depends on the microprocessor of your computer. A message appears on the form informing you when the handler has finished executing.

procedure TForm1.FormCreate(Sender: TObject);

begin

  Button1.Caption := 'Ignore Messages';

  Button2.Caption := 'Process Messages';

end;

procedure TForm1.Button1Click(Sender: TObject);

var

  I, J, X, Y: Word;

begin

  I := 0;

  J := 0;

  while I < 64000 do

  begin

    Randomize;

    while J < 64000 do

    begin

      Y := Random(J);

      Inc(J);

    end;

    X := Random(I);

    Inc(I);

  end;

  Canvas.TextOut(10, 10, 'The Button1Click handler is finished');

end;

procedure TForm1.Button2Click(Sender: TObject);

var

  I, J, X, Y: Word;

begin

  I := 0;

  J := 0;

  while I < 64000 do

  begin

    Randomize;

    while J < 64000 do

    begin

      Y := Random(J);

      Inc(J);

      Application.ProcessMessages;

    end;

    X := Random(I);

    Inc(I);

  end;

  Canvas.TextOut(10, 10, 'The Button2Click handler is finished');

end;


ReadBool, ReadInteger, ReadString Example
 VCL Reference

ReadBool, ReadInteger, ReadString Example

This example reads the myapp.ini file and displays on the form the status of your auto save options.

Before you run this example, you must add the IniFiles unit to the uses clause of your unit.

procedure TForm1.FormActivate(Sender: TObject);

var

  MyIniFile: TIniFile;

begin

  MyIniFile := TIniFile.Create('myapp.ini');

  with MyIniFile do

  begin

    if ReadBool('AutoLoad', 'FormProperties', False) = True then

    begin

      Visible := ReadBool('FormOptions', 'Visible', True);

      Color := TColor(ReadInteger('FormOptions', 'Color', clWindow));

      Caption := ReadString('FormOptions', 'Caption', 'Main');

  end;

  MyIniFile.Free;

end;


Create, ReadSectionValues, WriteString, DeleteKey Example
 VCL Reference

Create, ReadSectionValues, WriteString, DeleteKey Example

This example reads the Transfer section of the myapp.ini file into a memo and changes one of the strings in the INI file when Button1 is clicked.  When Button2 is clicked, the myapp.ini file is restored to its initial state, using the values stored in the memo.

Before you run this example, you must add the IniFiles unit to the uses clause of your unit.

Warning:	Do not click button2 before you have clicked button1!

procedure TForm1.Button1Click(Sender: TObject);

var

  MyIniFile: TIniFile;

  begin

  MyIniFile := TIniFile.Create('myapp.ini');

  Memo1.Clear;

  MyIniFile.ReadSectionValues('Transfer', Memo1.Lines);

  if Memo1.Lines.Values['Title1'] <> 'Picture Painter' then

    MyIniFile.WriteString('Transfer', 'Title1', 'Picture Painter');

  MyIniFile.Free;

end;

procedure TForm1.Button2Click(Sender: TObject);

var

  MyIniFile: TIniFile;

  begin

  MyIniFile := TIniFile.Create('myapp.ini');

  { if the entry wasn’t there before, delete it now }

  if Memo1.Lines.Values['Title1'] = '' then

    MyIniFile.DeleteKey('Transfer', 'Title1')

  { otherwise, restore the old value }

  else

    MyIniFile.WriteString('Transfer', 'Title1', Memo1.Lines.Values['Title1']);

  MyIniFile.Free;

end;


Rectangle, Style, Color Example
 VCL Reference

Rectangle, Style, Color example

This example draws many rectangles of various sizes and colors on a form maximized to fill the entire screen.  To run the code, drop a TTimer component on the form and use the object inspector to create the OnTimer and OnActivate event handlers.

var

  X, Y: Integer;

procedure TForm1.FormActivate(Sender: TObject);

begin

  WindowState := wsMaximized;

  Timer1.Interval := 50;

  Randomize;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  X := Random(Screen.Width - 10);

  Y := Random(Screen.Height - 10);

  Canvas.Pen.Color := Random(65535);

  case Random(5) of

    0: Canvas.Pen.Style := psSolid;

    1: Canvas.Pen.Style := psDash;

    2: Canvas.Pen.Style := psDot;

    3: Canvas.Pen.Style := psDashDot;

    4: Canvas.Pen.Style := psDashDotDot;

  end;

  Canvas.Rectangle(X, Y, X + Random(400), Y + Random(400));

end;


Remove Example
 VCL Reference

Remove Example

The following code adds a new object to a list in a list object and then removes it:

type

  TMyClass = class

    MyString: string;

    constructor Create(S: string);

  end;

constructor TMyClass.Create(S: string);

begin

  MyString := S;

end;

procedure TForm1.Button1Click(Sender: TObject);

var

  MyList: TList;

  MyObject: TMyClass;

begin

  MyList := TList.Create;        { create the list }

  try

    MyObject := TMyClass.Create('Semper Fidelis!');  { create a class instance }

    try

      MyList.Add(MyObject);      { add instance to list }

      MessageDlg('The list has ' + IntToStr(MyList.Count) + 'objects',

                 mtInformation, [mbOk], 0);

      MyList.Remove(MyObject);

      MessageDlg('The list has ' + IntToStr(MyList.Count) + 'objects',

                 mtInformation, [mbOk], 0);

    finally

      MyObject.Free;

    end;                  { don't forget to clean up! }

  finally

    MyList.Free;

  end;

end;


OnMinimize, Restore Example
 VCL Reference

OnMinimize, Restore Example

This example uses a timer on a form. When the application runs and the user minimizes the application, the timer starts and the application returns to its normal size when an OnTimer event occurs.  The timer then shuts down until the next time the form is minimized.

Be sure to declare the AppStartTimer method as a public method of TForm1.

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.OnMinimize := AppStartTimer;

end;

procedure TForm1.AppStartTimer(Sender: TObject);

begin

  Timer1.Enabled := True;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  Application.Restore;

  Timer1.Enabled := False;

end;


Rewind Example
 VCL Reference

Rewind Example

This example uses a media player and a button on a form. When the user clicks the button, the WAV audio media rewinds and begins playing. To run this example successfully, you must have installed a WAV audio device correctly.

procedure TForm1.FormCreate(Sender: TObject);

begin

  with MediaPlayer1 do

  begin

    DeviceType := dtWaveAudio;

    AutoRewind := False;

    FileName := 'CHIMES.WAV';

  end;

  Button1.Caption := 'Rewind and Play';

  Button1.Width := 130;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  MediaPlayer1.Rewind;

  MediaPlayer1.Play;

end;


RoundRect, Width Example
 VCL Reference

RoundRect, Width Example

This example draws many rounded rectangles of various sizes and colors on a form maximized to fill the entire screen:

var

  X, Y, DX, DY: Integer;

procedure TForm1.FormActivate(Sender: TObject);

begin

  WindowState := wsMaximized;

  Timer1.Interval := 50;

  Randomize;

end;

procedure TForm1.Timer1Timer(Sender: TObject);

begin

  X := Random(Screen.Width - 10);

  Y := Random(Screen.Height - 10);

  Canvas.Pen.Color := Random(65535);

  Canvas.Pen.Width := Random(7);

  DX := Random(400);

  DY := Random(400);

  Canvas.RoundRect(X, Y, X + DX, Y + DY, DX div 2, DY div 2);

end;


Row, Rows Example
 VCL Reference

Row, Rows Example

This example displays a string grid, a list box, and a button on a form. When the application runs, strings are put in the cells of row 1 of the string grid. When the user clicks the button, The strings in the current row of the grid are displayed in the list box.

Note that when the grid contains an empty cell, the list box has a corresponding empty string.

procedure TForm1.Button1Click(Sender: TObject);

begin

  ListBox1.Items := StringGrid1.Rows[StringGrid1.Row];

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  with StringGrid1 do

  begin

    Cells[1,0] := 'Column 1';

    Cells[2,0] := 'Column 2';

    Cells[3,0] := 'Column 3';

    Cells[4,0] := 'Column 4';

    Cells[0,1] := 'Row 1';

    Cells[1,1] := 'Object';

    Cells[2,1] := 'Pascal';

    Cells[3,1] := 'is';

    Cells[4,1] := 'excellent';

    Cells[0,2] := 'Row 2';

    Cells[1,2] := 'Delphi';

    Cells[2,2] := 'is';

    Cells[4,2] := 'RAD';

  end;

end;


SetLink, DdeService, DdeTopic Example
 VCL Reference

SetLink, DdeService, DdeTopic Example

The following code establishes a link with a DDE server. The service is specified in the DdeService property of DdeClientConv1, and the topic is specified in the DdeTopic property of DdeClientConv1. If the link is not established, an exception is raised.

with DDEClientConv1 do

begin

  DDEService := 'ReportSmith';

  DDETopic := 'RS_PrintReport';

  ifnot SetLink(DDEService, DDETopic) then

    raise Exception.Create ('Could not link to DDE server.');

end;


ShowAccelChar Example
 VCL Reference

ShowAccelChar Example

This example uses two labels on a form. The first label has a caption with an accelerator character in it. The second label also includes an ampersand, but it does not appear as an accelerator character.

procedure TForm1.FormCreate(Sender: TObject);

begin

  Label1.ShowAccelChar := True;

  Label1.Caption := 'An &Underlined character appears here';

  Label2.ShowAccelChar := False;

  Label2.Caption := 'An ampersand (&) appears here';

end;


Sort example
 VCL Reference

Sort Example

The following code sorts the objects in a list in alphabetical order based on their names. It assumes that the list contains only component references.

The CompareNames function performs the comparisons between objects in the list. The list is sorted when the user clicks a button.

function CompareNames(Item1, Item2: Pointer): Integer;

begin

  Result := CompareText((Item1 as TComponent).Name, (Item2 as TComponent).Name);

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  List1.Sort(@CompareText);

end;


Sorted Example
 VCL Reference

Sorted example

This example uses an edit box, a list box, and two buttons on a form. The buttons are named Add and Sort. When the user clicks the Add button, the text in the edit box is added to the list in the list box. Before the user clicks the sort button, any new items are added to the end of the list.  After the user clicks the Sort button, the list in the list box is sorted and remains sorted, even if additional strings are added.  If the user clicks the sort button again, the list box remains sorted, but any new strings are again added to the end of the list.

procedure TForm1.FormCreate(Sender: TObject);

begin

  ListBox1.Items.Add('Not');

  Listbox1.Items.Add('In');

  ListBox1.Items.Add('Alphabetical');

  ListBox1.Items.Add('Order');

end;

procedure TForm1.AddClick(Sender: TObject);

begin

  ListBox1.Items.Add(Edit1.Text);

end;

procedure TForm1.SortClick(Sender: TObject);

begin

  ListBox1.Sorted := not ListBox1.Sorted;

end;


Sorted Example
 VCL Reference

Sorted example

This example uses a list box on a form. When the application runs, a string list object is created and three strings are added to it. The strings are sorted and added to the list box, where they appear in their sorted order:

procedure TForm1.FormCreate(Sender: TObject);

var

  MyList: TStringList;

begin

  MyList := TStringList.Create;

  MyList.Add('Plants');

  MyList.Add('Animals');

  MyList.Add('Minerals');

  MyList.Sorted := True;

  ListBox1.Items.AddStrings(MyList);

  MyList.Free;

end;


TimeFormat, Length Example
 VCL Reference

TimeFormat, Length Example

The following code declares a HMSRec record with four byte fields. If TimeFormat is tfHMS, the first field specifies hours, the second field specifies minutes, the third field specifies seconds, and the fourth field corresponds to the unused most-significant byte of the tfHMS time format. A LongInt variable is typecast to an HMSRec record, then the hours, minutes, and seconds of the Length of the loaded media are displayed in labels when the user clicks a button.

type

  HMSRec = record

    Hours: byte;

    Minutes: byte;

    Seconds: byte;

    NotUsed: byte;

  end;

procedure TForm1.Button1Click(Sender: TObject);

var

  TheLength: LongInt;

begin

  { Set time format - note that some devices don’t support tfHMS }

  MediaPlayer1.TimeFormat := tfHMS;

  { Store length of currently loaded media }

  TheLength := MediaPlayer1.Length;

  with HMSRec(TheLength) do { Typecast TheLength as a HMSRec record }

  begin

    Label1.Caption := IntToStr(Hours); { Display Hours in Label1 }

    Label2.Caption := IntToStr(Minutes); { Display Minutes in Label2 }

    Label3.Caption := IntToStr(Seconds); { Display Seconds in Label3 }

  end;

end;


Create Example
 VCL Reference

Create example

This example shows how to create or augment a metafile using a metafile canvas object.  This metafile can then be used to draw on the canvas of another object such as a paintbox or a printer.

MyMetafile := TMetafile.Create;

with TMetafileCanvas.Create(MyMetafile, 0) do

try

  Brush.Color := clRed;

  Ellipse(0,0,100,100);

  ...

finally

  Free;

end;

Form1.Canvas.Draw(0,0,MyMetafile); {1 red circle }

To add to an existing metafile image, create a metafile canvas and play the source metafile into the metafile canvas:

with TMetafileCanvas.Create(MyMetafile, 0) do

try

  Draw(0,0,MyMetafile);

  Brush.Color := clBlue;

  Ellipse(100,100,200,200);

...

finally

  Free;

end;

Form1.Canvas.Draw(0,0,MyMetafile); {1 red circle and 1 blue circle }


Update Example
 VCL Reference

Update Example

The following sample code sets the directory of DirectoryListBox1 to C:\TEMP when the form is created. When Button1 is pressed, a subdirectory called MYDIR is added to C:\TEMP, but note that it is not updated in DirectoryListBox1 until Button2 is pressed and Update is called.

procedure TForm1.Button1Click(Sender: TObject);

begin

  MkDir('c:\temp\mydir');

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  DirectoryListBox1.Directory := 'c:\temp';

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

  DirectoryListBox1.Update;

end;


TileMode, Tile example
 VCL Reference

TileMode, Tile example

This example uses three forms. The first form has its FormStyle property set to MDIForm. The other two have their FormStyle properties set to MDIChild and their Visible properties set to True. Add a main menu component and name one of the menu items TileForms. This is code for the TileFormsClick handler:

procedure TForm1.TileFormsClick(Sender: TObject);

begin

  TileMode := tbVertical;

  Tile;

end;

When the user chooses the TileForms command, the child forms tile vertically within the MDI frame form.


Wait Example
 VCL Reference

Wait Example

The following code plays a .WAV audio file named NI!.WAV twice. The first call to play doesn't return control to the application until the file is done playing. Note that if you remove the line of code that sets wait to True, the sound is only played once.

procedure TForm1.Button1Click(Sender: TObject);

begin

  with MediaPlayer1 do

  begin

    FileName := 'ni!.wav';

    AutoRewind := True;

    Open;          { Open Media Player }

    try

      Wait := True;  { Waits until sounds is done playing to return }

      Play;          { Play sound }

      Play;          { Play again after first playing is completed }

    finally

      Close;             { Close media player }

    end;

  end;

end;


WriteBool, WriteInteger Example
 VCL Reference

WriteBool, WriteInteger Example

This example creates an .INI file for a game with two entries in the Options section, and one entry in the Configuration section.

Before you try this example, you must add IniFiles to the uses clause of your unit.

var

  GameIni: TIniFile;

begin

  Gameini := TIniFile.Create('fungame.ini');

  with GameIni do

  begin

    WriteBool('Options', 'Sound', True);

    WriteInteger('Options', 'Level', 3);

    WriteBool('Configuration', 'ShowToolBar', True);

    Free;

  end;

end;


TToolBar example
 VCL Reference

Toolbar example

To create an “IE4-style” toolbar that corresponds to an existing menu:

1	Drop a ToolBar on the form and add a ToolButton for each top-level menu item you wish to create.

2	Set the MenuItem property of each ToolButton to correspond to the top level menu items.

3	Set the Grouped property of each ToolButton to True.

4	Clear the MainMenu property of the Form (if it is assigned)


DefaultColWidth, GridLineWidth example
 VCL Reference

DefaultColWidth, GridLineWidth example

This example includes a draw grid on a form. When the application runs and the form is created, the width of the lines on the draw grid changes if the default column width of the grid is over 90 pixels wide:

procedure TForm1.FormCreate(Sender: TObject);

begin

  if DrawGrid1.DefaultColWidth > 90 then

    DrawGrid1.GridLineWidth := 2

  else

    DrawGrid1.GridLineWidth := 1;

end;


Col example
 VCL Reference

Col example

This example uses a string grid with a label above it on a form. When the user clicks a cell in the grid, the location of the cursor is displayed in the label caption.

procedure TForm1.DrawGrid1Click(Sender: TObject);

begin

  Label1.Caption := 'The cursor is in column ' +

                     IntToStr(DrawGrid1.Col + 1) +

                     ', row ' +

                     IntToStr(DrawGrid1.Row + 1);

end;


Selection example
 VCL Reference

Selection example

The following code selects the rectangle containing rows 1 through 4, and columns 2 and 3.

procedure TForm1.Button1Click(Sender: TObject);

var

  myRect: TGridRect;

begin

  myRect.Left := 3;

  myRect.Top := 1;

  myRect.Right := 2;

  myRect.Bottom := 4;

  DrawGrid1.Selection := myRect;

end;


TopRow example
 VCL Reference

TopRow example

This code uses a draw grid and a button on a form. When the user clicks the button, the last row of the draw grid becomes the top row:

procedure TForm1.Button1Click(Sender: TObject);

begin

  DrawGrid1.TopRow := DrawGrid1.RowCount;

end;


TMenu example 1
 VCL Reference

TMenu example 1 (menudemo.pas)

menuform.pas	about.pas	menudemo.dfm	menuform.dfm	about.dfm

Objects

The example demonstrates using TMainMenu, TMenuItem, TPopupMenu, TColorDialog, TShape, and TPanel  objects.

Running

To run this example, load the project file from the Help\Examples\Menu directory.

Description

This example demonstrates using a main menu, menu items, and a popup menu.  Clicking on the various menu options allows the user to modify the shape and color of an image.

unit menudemo;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  Menus, ExtCtrls, ComCtrls;

type

  TMenuForm = class(TForm)

    DisplayPanel: TPanel;

    DemoShape: TShape;

    MainMenu: TMainMenu;

    Application1: TMenuItem;

    Exit1: TMenuItem;

    Color1: TMenuItem;

    Outline1: TMenuItem;

    Randomize1: TMenuItem;

    Select1: TMenuItem;

    Inside1: TMenuItem;

    Randomize2: TMenuItem;

    Select2: TMenuItem;

    Shape1: TMenuItem;

    Circle1: TMenuItem;

    Ellipse1: TMenuItem;

    Rectangle1: TMenuItem;

    Square1: TMenuItem;

    Misc1: TMenuItem;

    ThickOutline1: TMenuItem;

    RoundedShape1: TMenuItem;

    Help1: TMenuItem;

    About1: TMenuItem;

    SolidColorDialog: TColorDialog;

    AnyColorDialog: TColorDialog;

    PopupMenu: TPopupMenu;

    Random1: TMenuItem;

    RandomizeColors1: TMenuItem;

    InvertColors1: TMenuItem;

    procedure DisplayPanelResize(Sender: TObject);

    procedure Exit1Click(Sender: TObject);

    procedure Randomize1Click(Sender: TObject);

    procedure Select1Click(Sender: TObject);

    procedure Randomize2Click(Sender: TObject);

    procedure Select2Click(Sender: TObject);

    procedure Circle1Click(Sender: TObject);

    procedure Ellipse1Click(Sender: TObject);

    procedure Rectangle1Click(Sender: TObject);

    procedure Square1Click(Sender: TObject);

    procedure ThickOutline1Click(Sender: TObject);

    procedure RoundedShape1Click(Sender: TObject);

    procedure About1Click(Sender: TObject);

    procedure Random1Click(Sender: TObject);

    procedure RandomizeColors1Click(Sender: TObject);

    procedure InvertColors1Click(Sender: TObject);

  private

    { Private declarations }

    Roundable: Boolean;

    function RandomColor: TColor;

    procedure AlterShape(shape: TShapeType; roundable: Boolean);

  public

    { Public declarations }

  end;

const

  SHAPE_OFFSET = 4;

var

  MenuForm: TMenuForm;

implementation

uses about;

{$R *.DFM}

procedure TMenuForm.DisplayPanelResize(Sender: TObject);

begin

  DemoShape.Top := SHAPE_OFFSET;

  DemoShape.Left := DemoShape.Top;

  DemoShape.Height := DisplayPanel.Height - 2 * SHAPE_OFFSET;

  DemoShape.Width := DisplayPanel.Width - 2 * SHAPE_OFFSET;

end;

procedure TMenuForm.Exit1Click(Sender: TObject);

begin

  Close;

end;

function TMenuForm.RandomColor;

var

  red, green, blue: Byte;

begin

  red := Random(255);

  green := Random(255);

  blue := Random(255);

  Result := red or (green shl 8) or (blue shl 16);

end;

procedure TMenuForm.Randomize1Click(Sender: TObject);

begin

  DemoShape.Pen.Color := RandomColor;

end;

procedure TMenuForm.Select1Click(Sender: TObject);

begin

  try

    SolidColorDialog.Color := DemoShape.Pen.Color;

    if SolidColorDialog.Execute then

      DemoShape.Pen.Color := SolidColorDialog.Color;

  except

    ShowMessage('Color selection dialog failed to load');

  end;

end;

procedure TMenuForm.Randomize2Click(Sender: TObject);

begin

  DemoShape.Brush.Color := RandomColor;

end;

procedure TMenuForm.Select2Click(Sender: TObject);

begin

  AnyColorDialog.Color := DemoShape.Brush.Color;

  try

    if AnyColorDialog.Execute then

      DemoShape.Brush.Color := AnyColorDialog.Color;

  except

    ShowMessage('Color selection dialog failed to load.');

  end;

end;

procedure ToggleCheck(Sender: TObject);

var

  Item: TMenuItem;

begin

  Item := Sender as TMenuItem;

  Item.Checked := not Item.Checked;

end;

procedure SetCheck(Sender: TObject);

var

  Item: TMenuItem;

begin

  Item := Sender as TMenuItem;

  Item.Checked := True;

end;

procedure TMenuForm.AlterShape(shape: TShapeType; roundable: Boolean);

begin

  Self.Roundable := roundable;

  DemoShape.Shape := shape;

end;

procedure TMenuForm.Circle1Click(Sender: TObject);

begin

  SetCheck(Sender);

  AlterShape(stCircle, False);

end;

procedure TMenuForm.Ellipse1Click(Sender: TObject);

begin

  SetCheck(Sender);

  AlterShape(stEllipse, False);

end;

procedure TMenuForm.Rectangle1Click(Sender: TObject);

begin

  SetCheck(Sender);

  if RoundedShape1.Checked then

    AlterShape(stRoundRect, True)

  else

    AlterShape(stRectangle, True);

end;

procedure TMenuForm.Square1Click(Sender: TObject);

begin

  SetCheck(Sender);

  if RoundedShape1.Checked then

    AlterShape(stRoundSquare, True)

  else

    AlterShape(stSquare, True);

end;

procedure TMenuForm.ThickOutline1Click(Sender: TObject);

begin

  ToggleCheck(Sender);

  DemoShape.Pen.Width := 11 - DemoShape.Pen.Width;

end;

procedure TMenuForm.RoundedShape1Click(Sender: TObject);

begin

  ToggleCheck(Sender);

  case DemoShape.Shape of

    stRectangle:   DemoShape.Shape := stRoundRect;

    stRoundRect:   DemoShape.Shape := stRectangle;

    stSquare:      DemoShape.Shape := stRoundSquare;

    stRoundSquare: DemoShape.Shape := stSquare;

  end;

end;

procedure TMenuForm.About1Click(Sender: TObject);

var

  AboutBox: TAboutBox;

begin

  AboutBox := TAboutBox.Create(Self);

  try

    AboutBox.ShowModal;

  finally

    AboutBox.Free;

  end;

end;

procedure TMenuForm.Random1Click(Sender: TObject);

var

  newshape: TShapeType;

begin

  // Ensure we actually change the shape.

  repeat newshape := TShapeType(Random(6)) until

    newshape <> DemoShape.Shape;

  // Adjust the "Shape" and "Rounded Shape" menu selections.

  case newshape of

    stEllipse: Ellipse1Click(Ellipse1);

    stCircle: Circle1Click(Circle1);

    stRectangle, stRoundRect:

      begin

        RoundedShape1.Checked := newshape = stRoundRect;

        Rectangle1Click(Rectangle1);

      end;

    stSquare, stRoundSquare:

      begin

        RoundedShape1.Checked := newshape = stRoundSquare;

        Square1Click(Square1);

      end;

    end;

end;

procedure TMenuForm.RandomizeColors1Click(Sender: TObject);

begin

  DemoShape.Brush.Color := RandomColor;

  DemoShape.Pen.Color := RandomColor;

end;

procedure TMenuForm.InvertColors1Click(Sender: TObject);

var

  i : Integer;

begin

  i := Integer(DemoShape.Brush.Color) xor $FFFFFF;

  DemoShape.Brush.Color := TColor(i);

end;

end.


 VCL Reference

TMenu example 1 (about.pas)

menudemo.pas	menuform.pas	menudemo.dfm	menuform.dfm	about.dfm

This example shows a simple about box for an application.

unit about;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls;

type

  TAboutBox = class(TForm)

    Label1: TLabel;

    Label2: TLabel;

    Button1: TButton;

    procedure Button1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

var

  AboutBox: TAboutBox;

implementation

{$R *.DFM}

procedure TAboutBox.Button1Click(Sender: TObject);

begin

  Close;

end;

end.


 VCL Reference

TMenu example 1 (menuform.pas)

menudemo.pas	about.pas	menudemo.dfm	menuform.dfm	about.dfm

This is the code for the main form of the menu example.

unit menuform;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  Menus, ExtCtrls;

type

  TForm1 = class(TForm)

    DisplayPanel: TPanel;

    DemoShape: TShape;

    MainMenu: TMainMenu;

    Application1: TMenuItem;

    Exit1: TMenuItem;

    Color1: TMenuItem;

    Outline1: TMenuItem;

    Randomize1: TMenuItem;

    Select1: TMenuItem;

    Inside1: TMenuItem;

    Randomize2: TMenuItem;

    Select2: TMenuItem;

    Shape1: TMenuItem;

    Circle1: TMenuItem;

    Ellipse1: TMenuItem;

    Rectangle1: TMenuItem;

    Square1: TMenuItem;

    Misc1: TMenuItem;

    ThickOutline1: TMenuItem;

    RoundedShape1: TMenuItem;

    Help1: TMenuItem;

    About1: TMenuItem;

    SolidColorDialog: TColorDialog;

    AnyColorDialog: TColorDialog;

    PopupMenu: TPopupMenu;

    Random1: TMenuItem;

    RandomizeColors1: TMenuItem;

    InvertColors1: TMenuItem;

    procedure DisplayPanelResize(Sender: TObject);

    procedure Exit1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

const

  SHAPE_OFFSET = 4;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.DisplayPanelResize(Sender: TObject);

begin

  DemoShape.Top := SHAPE_OFFSET;

  DemoShape.Left := DemoShape.Top;

  DemoShape.Height := DisplayPanel.Height - 2 * SHAPE_OFFSET;

  DemoShape.Width := DisplayPanel.Width - 2 * SHAPE_OFFSET;

end;

procedure TForm1.Exit1Click(Sender: TObject);

begin

  Close;

end;

end.


 VCL Reference

TMenu example 1 (menudemo.dfm)

menudemo.pas	menuform.pas	about.pas	menuform.dfm	about.dfm

object MenuForm: TMenuForm

  Left = 180

  Top = 233

  Width = 696

  Height = 480

  Caption = 'MenuForm'

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Menu = MainMenu

  Position = poDefaultPosOnly

  ShowHint = True

  Visible = True

  PixelsPerInch = 96

  TextHeight = 13

  object DisplayPanel: TPanel

    Left = 0

    Top = 0

    Width = 688

    Height = 434

    Align = alClient

    BevelInner = bvLowered

    BevelOuter = bvLowered

    PopupMenu = PopupMenu

    TabOrder = 0

    OnResize = DisplayPanelResize

    object DemoShape: TShape

      Left = 120

      Top = 8

      Width = 193

      Height = 217

      Shape = stCircle

    end

  end

  object MainMenu: TMainMenu

    Left = 16

    Top = 56

    object Application1: TMenuItem

      Caption = '&Application'

      Hint = 'Simple command menu item'

      object Exit1: TMenuItem

        Caption = 'E&xit'

        Hint = 'Close the application'

        OnClick = Exit1Click

      end

    end

    object Color1: TMenuItem

      Caption = '&Color'

      Hint = 'Submenus'

      object Outline1: TMenuItem

        Caption = '&Outline'

        Hint = 'Adjust shape outline color'

        object Randomize1: TMenuItem

          Caption = '&Randomize'

          Hint = 'Set shape outline to a random color'

          OnClick = Randomize1Click

        end

        object Select1: TMenuItem

          Caption = '&Select...'

          Hint = 'Select shape outline color'

          OnClick = Select1Click

        end

      end

      object Inside1: TMenuItem

        Caption = '&Inside'

        Hint = 'Adjust shape inside color'

        object Randomize2: TMenuItem

          Caption = '&Randomize'

          Hint = 'Set shape inside to a random color'

          OnClick = Randomize2Click

        end

        object Select2: TMenuItem

          Caption = '&Select...'

          Hint = 'Select a color for the shape filling'

          OnClick = Select2Click

        end

      end

    end

    object Shape1: TMenuItem

      Caption = '&Shape'

      GroupIndex = 1

      Hint = 'Mutually-exclusive toggle group'

      object Circle1: TMenuItem

        Caption = '&Circle'

        Checked = True

        GroupIndex = 1

        Hint = 'Make the shape a circle'

        RadioItem = True

        OnClick = Circle1Click

      end

      object Ellipse1: TMenuItem

        Caption = '&Ellipse'

        GroupIndex = 1

        Hint = 'Make the shape an ellipse'

        RadioItem = True

        OnClick = Ellipse1Click

      end

      object Rectangle1: TMenuItem

        Caption = '&Rectangle'

        GroupIndex = 1

        Hint = 'Make the shape a rectangle'

        RadioItem = True

        OnClick = Rectangle1Click

      end

      object Square1: TMenuItem

        Caption = '&Square'

        GroupIndex = 1

        Hint = 'Make the shape a square'

        RadioItem = True

        OnClick = Square1Click

      end

    end

    object Misc1: TMenuItem

      Caption = '&Misc'

      GroupIndex = 1

      Hint = 'Simple checkable menu items with a superfluous bar break in between'

      object ThickOutline1: TMenuItem

        Caption = '&Thick Outline'

        Hint = 'Controls whether or not the outline is thick'

        OnClick = ThickOutline1Click

      end

      object RoundedShape1: TMenuItem

        Break = mbBarBreak

        Caption = '&Rounded Shape'

        Hint = 'Makes rectangle or square have rounded corners'

        OnClick = RoundedShape1Click

      end

    end

    object Help1: TMenuItem

      Caption = '&Help'

      GroupIndex = 1

      Hint = 'Simple command menu item'

      object About1: TMenuItem

        Caption = '&About...'

        Hint = 'Summons an About box'

        OnClick = About1Click

      end

    end

  end

  object SolidColorDialog: TColorDialog

    Ctl3D = True

    Options = [cdSolidColor]

    Left = 48

    Top = 56

  end

  object AnyColorDialog: TColorDialog

    Ctl3D = True

    Options = [cdAnyColor]

    Left = 80

    Top = 56

  end

  object PopupMenu: TPopupMenu

    Left = 16

    Top = 88

    object Random1: TMenuItem

      Caption = 'Randomize &Shape'

      OnClick = Random1Click

    end

    object RandomizeColors1: TMenuItem

      Caption = 'Randomize &Colors'

      OnClick = RandomizeColors1Click

    end

    object InvertColors1: TMenuItem

      Caption = '&Invert Inside Color'

      OnClick = InvertColors1Click

    end

  end

end


 VCL Reference

TMenu example 1 (about.dfm)

menudemo.pas	menuform.pas	about.pas	menudemo.dfm	menuform.dfm

object AboutBox: TAboutBox

  Left = 200

  Top = 108

  BorderIcons = []

  BorderStyle = bsDialog

  Caption = 'About Menu'

  ClientHeight = 134

  ClientWidth = 239

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Position = poScreenCenter

  PixelsPerInch = 96

  TextHeight = 13

  object Label1: TLabel

    Left = 60

    Top = 24

    Width = 123

    Height = 16

    Alignment = taCenter

    Caption = 'Menu Demonstration'

    Font.Charset = ANSI_CHARSET

    Font.Color = clBlack

    Font.Height = -13

    Font.Name = 'MS Sans Serif'

    Font.Style = []

    ParentFont = False

  end

  object Label2: TLabel

    Left = 32

    Top = 56

    Width = 186

    Height = 13

    Caption = 'Copyright (c) 1999 Inprise International'

  end

  object Button1: TButton

    Left = 80

    Top = 88

    Width = 75

    Height = 25

    Caption = 'OK'

    TabOrder = 0

    OnClick = Button1Click

  end

end


 VCL Reference

TMenu example 1 (menuform.dfm)

menudemo.pas	menuform.pas	about.pas	menudemo.dfm	about.dfm

object Form1: TForm1

  Left = 134

  Top = 226

  Width = 696

  Height = 480

  Caption = 'Form1'

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Menu = MainMenu

  Visible = True

  PixelsPerInch = 96

  TextHeight = 13

  object DisplayPanel: TPanel

    Left = 0

    Top = 0

    Width = 688

    Height = 434

    Align = alClient

    BevelInner = bvLowered

    BevelOuter = bvLowered

    Caption = 'DisplayPanel'

    PopupMenu = PopupMenu

    TabOrder = 0

    OnResize = DisplayPanelResize

    object DemoShape: TShape

      Left = 120

      Top = 8

      Width = 193

      Height = 217

      Shape = stCircle

    end

  end

  object MainMenu: TMainMenu

    Left = 16

    Top = 56

    object Application1: TMenuItem

      Caption = '&Application'

      Hint = 'Simple command menu item'

      object Exit1: TMenuItem

        Caption = 'E&xit'

        OnClick = Exit1Click

      end

    end

    object Color1: TMenuItem

      Caption = '&Color'

      Hint = 'Submenus'

      object Outline1: TMenuItem

        Caption = '&Outline'

        Hint = 'Adjust shape outline color'

        object Randomize1: TMenuItem

          Caption = '&Randomize'

          Hint = 'Set shape outline to a random color'

        end

        object Select1: TMenuItem

          Caption = '&Select...'

          Hint = 'Select shape outline color'

        end

      end

      object Inside1: TMenuItem

        Caption = '&Inside'

        Hint = 'Adjust shape inside color'

        object Randomize2: TMenuItem

          Caption = '&Randomize'

          Hint = 'Set shape inside to a random color'

        end

        object Select2: TMenuItem

          Caption = '&Select...'

          Hint = 'Select a color for the shape filling'

        end

      end

    end

    object Shape1: TMenuItem

      Caption = '&Shape'

      GroupIndex = 1

      Hint = 'Mutually-exclusive toggle group'

      object Circle1: TMenuItem

        Caption = '&Circle'

        Checked = True

        GroupIndex = 1

        Hint = 'Make the shape a circle'

        RadioItem = True

      end

      object Ellipse1: TMenuItem

        Caption = '&Ellipse'

        GroupIndex = 1

        Hint = 'Make the shape an ellipse'

        RadioItem = True

      end

      object Rectangle1: TMenuItem

        Caption = '&Rectangle'

        GroupIndex = 1

        Hint = 'Make the shape a rectangle'

        RadioItem = True

      end

      object Square1: TMenuItem

        Caption = '&Square'

        GroupIndex = 1

        Hint = 'Make the shape a square'

        RadioItem = True

      end

    end

    object Misc1: TMenuItem

      Caption = '&Misc'

      GroupIndex = 1

      Hint = 'Simple checkable menu items with a superfluous bar break in between'

      object ThickOutline1: TMenuItem

        Caption = '&Thick Outline'

        Hint = 'Controls whether or not the outline is thick'

      end

      object RoundedShape1: TMenuItem

        Break = mbBarBreak

        Caption = '&Rounded Shape'

        Hint = 'Makes rectangle or square have rounded corners'

      end

    end

    object Help1: TMenuItem

      Caption = '&Help'

      GroupIndex = 1

      Hint = 'Simple command menu item'

      object About1: TMenuItem

        Caption = '&About...'

        Hint = 'Summons an About box'

      end

    end

  end

  object SolidColorDialog: TColorDialog

    Ctl3D = True

    Options = [cdSolidColor]

    Left = 48

    Top = 56

  end

  object AnyColorDialog: TColorDialog

    Ctl3D = True

    Options = [cdAnyColor]

    Left = 80

    Top = 56

  end

  object PopupMenu: TPopupMenu

    Left = 16

    Top = 88

    object Random1: TMenuItem

      Caption = 'Randomize &Shape'

    end

    object RandomizeColors1: TMenuItem

      Caption = 'Randomize &Colors'

    end

    object InvertColors1: TMenuItem

      Caption = '&Invert Inside Color'

    end

  end

end


TMenu example 2
 VCL Reference

TMenu example 2 (umnudmo.pas)

umnudmo.dfm

Objects

The example demonstrates using TMainMenu, TMenuItem, and TPopupMenu objects.

Running

To run this example, load the project file from the Help\Examples\Menu2 directory.

Description

This example demonstrates creating a main menu, menu items, and a popup menu.

unit UMnuDmo;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ExtCtrls,Menus;

type

  TForm1 = class(TForm)

    Panel1: TPanel;

    Button1: TButton;

    Button2: TButton;

    Button3: TButton;

    Button4: TButton;

    Button5: TButton;

    Button6: TButton;

    Button7: TButton;

    Button8: TButton;

    Button9: TButton;

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

    procedure Button7Click(Sender: TObject);

    procedure Button3Click(Sender: TObject);

    procedure MyPopupHandler(Sender: TObject);

    procedure Button4Click(Sender: TObject);

    procedure Button5Click(Sender: TObject);

    procedure Button6Click(Sender: TObject);

    procedure Button8Click(Sender: TObject);

    procedure Button9Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

  MyMainMenu: TMainMenu;

  MyPopUpMenu: TPopUpMenu;

  MySubItem1,MySubItem2 : TMenuItem;

  MySubItems: array[0..3] of TMenuItem;

  MyPopUpItems: array[0..3] of TMenuItem;

implementation

{$R *.DFM}

procedure TForm1.MyPopupHandler(Sender: TObject);

begin

  with Sender as TMenuItem do begin

    ShowMessage(Caption);

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  MyMainMenu:= TMainMenu.Create(Self);

  Button4.Enabled := true;

  ShowMessage('MainMenu created but no items' + #13#10+

              'are added so it does not show.');

  Button1.Enabled := False;

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

  MyPopUpMenu := TPopUpMenu.Create(self);

  Button3.Enabled := true;

  ShowMessage('PopUpMenu created.');

  Button2.Enabled := False;

end;

procedure TForm1.Button7Click(Sender: TObject);

begin

  MyPopUpMenu.Popup(Form1.Left + 60, Form1.Top + 140);

  Button9.Enabled := true;

end;

procedure TForm1.Button3Click(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 3 do begin

    MyPopUpItems[i] := TMenuItem.Create(Self);

    MyPopUpItems[i].Caption := 'New item ' + IntToStr(i);

    MyPopUpMenu.Items.Add(MyPopUpItems[i]);

  end;

  Button7.Enabled := true;

  Button3.Enabled := False;

end;

procedure TForm1.Button4Click(Sender: TObject);

var

  MyItem: array[0..2] of TMenuItem;

  i: Integer;

begin

  for i := 0 to 2 do begin

    MyItem[i] := TMenuItem.Create(Self);

    MyItem[i].Caption := 'New item ' + IntToStr(i);

    MyMainMenu.Items.Add(MyItem[i]);

    end;

  Button4.Enabled := False;

  Button5.Enabled := true;

end;

procedure TForm1.Button5Click(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 3 do begin

    MySubItems[i] := TMenuItem.Create(Self);

    MySubItems[i].Caption := 'New item ' + IntToStr(i);

    MySubItems[i].OnClick := MyPopUpHandler;

    MyMainMenu.Items[0].Add(MySubItems[i]);

  end;

  Button6.Enabled := true;

  Button8.Enabled := true;

  Button5.Enabled := False;

end;

procedure TForm1.Button6Click(Sender: TObject);

begin

  MySubItems[3].Break := mbBarBreak;

end;

procedure TForm1.Button8Click(Sender: TObject);

begin

  MySubItems[2].Caption :='-';

end;

procedure TForm1.Button9Click(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 3 do begin

    MyPopUpItems[i].OnClick := MyPopupHandler;

  end;

end;

end.


 VCL Reference

TMenu example 2 (umnudmo.dfm)

umnudmo.pas

object Form1: TForm1

  Left = 199

  Top = 67

  Width = 467

  Height = 341

  Caption = 'Menu Demo'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  PixelsPerInch = 96

  TextHeight = 13

  object Panel1: TPanel

    Left = 56

    Top = 56

    Width = 345

    Height = 209

    TabOrder = 0

    object Button1: TButton

      Left = 32

      Top = 16

      Width = 110

      Height = 25

      Caption = 'Create Main Menu'

      TabOrder = 0

      OnClick = Button1Click

    end

    object Button2: TButton

      Left = 200

      Top = 14

      Width = 110

      Height = 25

      Caption = 'Create PopUp Menu'

      TabOrder = 1

      OnClick = Button2Click

    end

    object Button3: TButton

      Left = 200

      Top = 52

      Width = 110

      Height = 25

      Caption = 'Add PopUp Items'

      Enabled = False

      TabOrder = 2

      OnClick = Button3Click

    end

    object Button4: TButton

      Left = 32

      Top = 54

      Width = 110

      Height = 25

      Caption = 'Add Main Items'

      Enabled = False

      TabOrder = 3

      OnClick = Button4Click

    end

    object Button5: TButton

      Left = 32

      Top = 92

      Width = 110

      Height = 25

      Caption = 'Add Sub-Menu'

      Enabled = False

      TabOrder = 4

      OnClick = Button5Click

    end

    object Button6: TButton

      Left = 32

      Top = 130

      Width = 110

      Height = 25

      Caption = 'Add  Vertical Break'

      Enabled = False

      TabOrder = 5

      OnClick = Button6Click

    end

    object Button7: TButton

      Left = 200

      Top = 90

      Width = 110

      Height = 25

      Caption = 'Show PopUp'

      Enabled = False

      TabOrder = 6

      OnClick = Button7Click

    end

    object Button8: TButton

      Left = 32

      Top = 168

      Width = 110

      Height = 25

      Caption = 'Add Horizontal Break'

      Enabled = False

      TabOrder = 7

      OnClick = Button8Click

    end

    object Button9: TButton

      Left = 200

      Top = 128

      Width = 110

      Height = 25

      Caption = 'Assign OnClick Event'

      Enabled = False

      TabOrder = 8

      OnClick = Button9Click

    end

  end

end


TBitmap example
 VCL Reference

TBitmap example (bmpformu.pas)

bmpformu.dfm

Objects

The example demonstrates using the TBitmap object.

Running

To run this example, load the project file from the Help\Examples\Bitmap directory.

Description

This example demonstrates changing the palette of a TBitmap object. A TBitmap is an encapsulation of the windows BITMAP and PALETTE which manages realizing of the palette automatically. The bitmap can be loaded from a .BMP file (LoadFromFile method) or a resource (LoadFromResourceName or LoadFromResourceID method) and saved back to a file (SaveToFile method).  It can be drawn on a canvas by using the TCanvas' Draw or StretchDraw method.  The size of the bitmap can be determined by using the Height and Width properties of TBitmap.

The example below illustrates the use of TBitmap’s Palette, LoadFromFile, Draw, Height, and Width. Be sure that a small bitmap file named bor6.bmp is present in the same directory as the .exe file.

Disclaimer

This is an example of using TBitmaps and is not intended to be an efficient method of tiling a form.

unit bmpformu;

//

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls;

type

  TBmpForm = class(TForm)

    Button1: TButton;

    procedure FormDestroy(Sender: TObject);

    procedure FormPaint(Sender: TObject);

    procedure Button1Click(Sender: TObject);

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

    Bitmap: TBitmap;

    procedure ScrambleBitmap;

    procedure WMEraseBkgnd(var m: TWMEraseBkgnd); message WM_ERASEBKGND;

  public

    { Public declarations }

  end;

var

  BmpForm: TBmpForm;

implementation

{$R *.DFM}

procedure TBmpForm.FormCreate(Sender: TObject);

begin

  Bitmap := TBitmap.Create;

  Bitmap.LoadFromFile('bor6.bmp');

end;

procedure TBmpForm.FormDestroy(Sender: TObject);

begin

  Bitmap.Free;

end;

// since we're going to be painting the whole form, handling this

// message will suppress the uneccessary repainting of the background

// which can result in flicker.

procedure TBmpform.WMEraseBkgnd(var m : TWMEraseBkgnd);

begin

  m.Result := LRESULT(False);

end;

procedure TBmpForm.FormPaint(Sender: TObject);

var

  x, y: Integer;

begin

  y := 0;

  while y < Height do

  begin

    x := 0;

    while x < Width do

    begin

      Canvas.Draw(x, y, Bitmap);

      x := x + Bitmap.Width;

    end;

    y := y + Bitmap.Height;

  end;

end;

procedure TBmpForm.Button1Click(Sender: TObject);

begin

  ScrambleBitmap;

  Invalidate;

end;

//

// scrambling the bitmap is easy when it has 256 colors:

// we just need to change each of the colors in the palette

// to some other value.

//

procedure TBmpForm.ScrambleBitmap;

var

  pal: PLogPalette;

  hpal: HPALETTE;

  i: Integer;

begin

  pal := nil;

  try

    GetMem(pal, sizeof(TLogPalette) + sizeof(TPaletteEntry) * 255);

    pal.palVersion := $300;

    pal.palNumEntries := 256;

    for i := 0 to 255 do

    begin

      pal.palPalEntry[i].peRed := Random(255);

      pal.palPalEntry[i].peGreen := Random(255);

      pal.palPalEntry[i].peBlue := Random(255);

    end;

    hpal := CreatePalette(pal^);

    if hpal <> 0 then

      Bitmap.Palette := hpal;

  finally

    FreeMem(pal);

  end;

end;

end.


 VCL Reference

TBitmap example (bmpformu.dfm)

bmpformu.pas

object BmpForm: TBmpForm

  Left = 311

  Top = 321

  Width = 466

  Height = 334

  Caption = 'BmpForm'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OnCreate = FormCreate

  OnDestroy = FormDestroy

  OnPaint = FormPaint

  PixelsPerInch = 96

  TextHeight = 13

  object Button1: TButton

    Left = 56

    Top = 40

    Width = 113

    Height = 25

    Caption = 'Scramble Palette'

    TabOrder = 0

    OnClick = Button1Click

  end

end


TRegIniFile example
 VCL Reference

TRegIniFile example (regini.pas)

reginid.pas	reginid.dfm

Objects

The example demonstrates using TRegIniFile, TGroupBox, TLabel, TCheckBox, TRadioGroup, TEdit and TMemo objects.

Running

To run this example, load the project file from the Help\Examples\Regini directory.

Description

This example demonstrates using a TRegIniFile object to make changes to the Windows registry.  Changes made to the system registry will not be permanent and will be deleted upon termination of the example application.

program regini;

uses

  Forms,

  reginid in 'reginid.pas' {Form1};

{$R *.RES}

begin

  Application.Initialize;

  Application.CreateForm(TForm1, Form1);

  Application.Run;

end.


 VCL Reference

TRegIniFile example (reginid.pas)

regini.pas	reginid.dfm

unit reginid;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ExtCtrls, Registry;

type

  TRegIniForm = class(TForm)

    GroupBox1: TGroupBox;

    Label1: TLabel;

    CheckBox_Write: TCheckBox;

    RadioGroup_Write: TRadioGroup;

    Edit_Write: TEdit;

    GroupBox2: TGroupBox;

    Label3: TLabel;

    CheckBox_Read: TCheckBox;

    RadioGroup_Read: TRadioGroup;

    Edit_Read: TEdit;

    Memo_Read: TMemo;

    Button_Write: TButton;

    Button_Read: TButton;

    procedure FormCreate(Sender: TObject);

    procedure FormDestroy(Sender: TObject);

    procedure Button_WriteClick(Sender: TObject);

    procedure Button_ReadClick(Sender: TObject);

    procedure CheckBox_ReadClick(Sender: TObject);

    procedure RadioGroup_ReadClick(Sender: TObject);

  private

    { Private declarations }

    procedure Read_Registry;

    procedure Write_Registry;

  public

    { Public declarations }

    FIniFile: TRegIniFile;

  end;

var

  RegIniForm: TRegIniForm;

implementation

{$R *.DFM}

const

  SECTION = 'Sample';

procedure TRegIniForm.FormCreate(Sender: TObject);

begin

  FIniFile := TRegIniFile.Create('Sample Registry');

end;

procedure TRegIniForm.FormDestroy(Sender: TObject);

var

  Cleanup: TRegistry;

  key: string;

begin

  key := FIniFile.FileName;

  FIniFile.Free;

  // make sure we don't leave junk in the registry behind.

  Cleanup := TRegistry.Create;

  try

    Cleanup.DeleteKey(key);

  finally

    Cleanup.Free;

  end;

end;

procedure TRegIniForm.Write_Registry;

begin

  FIniFile.WriteBool(SECTION, 'BooleanTest', CheckBox_Write.Checked);

  FIniFile.WriteInteger(SECTION, 'IntegerTest', RadioGroup_Write.ItemIndex);

  FIniFile.WriteString(SECTION, 'StringTest', Edit_Write.Text);

  if not Button_Read.Enabled then Button_Read.Enabled := True;

end;

procedure TRegIniForm.Read_Registry;

begin

  CheckBox_Read.Checked := FIniFile.ReadBool(SECTION, 'BooleanTest', False);

  RadioGroup_Read.ItemIndex := FIniFile.ReadInteger(SECTION, 'IntegerTest', 0);

  Edit_Read.Text := FIniFile.ReadString(SECTION, 'StringTest', '');

  Memo_Read.Lines.Clear;

  FIniFile.ReadSectionValues(SECTION, Memo_Read.Lines);

  Button_Read.Enabled := False;

end;

procedure TRegIniForm.Button_WriteClick(Sender: TObject);

begin

  Write_Registry;

end;

procedure TRegIniForm.Button_ReadClick(Sender: TObject);

begin

  Read_Registry;

end;

procedure TRegIniForm.CheckBox_ReadClick(Sender: TObject);

begin

  Read_Registry;

end;

procedure TRegIniForm.RadioGroup_ReadClick(Sender: TObject);

begin

  Read_Registry;

end;

end.


 VCL Reference

TRegIniFile example (reginid.dfm)

regini.pas	reginid.pas

object RegIniForm: TRegIniForm

  Left = 200

  Top = 108

  Width = 476

  Height = 264

  Caption = 'RegIniForm'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OnCreate = FormCreate

  OnDestroy = FormDestroy

  PixelsPerInch = 96

  TextHeight = 13

  object GroupBox1: TGroupBox

    Left = 8

    Top = 16

    Width = 145

    Height = 169

    Caption = 'Write to Registry'

    TabOrder = 0

    object Label1: TLabel

      Left = 16

      Top = 120

      Width = 51

      Height = 13

      Caption = 'String Test'

    end

    object CheckBox_Write: TCheckBox

      Left = 16

      Top = 24

      Width = 97

      Height = 17

      Caption = 'Boolean Test'

      TabOrder = 0

    end

    object RadioGroup_Write: TRadioGroup

      Left = 16

      Top = 48

      Width = 105

      Height = 65

      Caption = 'Integer Test'

      Columns = 3

      ItemIndex = 0

      Items.Strings = (

        '0'

        '1'

        '2'

        '3'

        '4'

        '5')

      TabOrder = 1

    end

    object Edit_Write: TEdit

      Left = 16

      Top = 136

      Width = 105

      Height = 21

      TabOrder = 2

      Text = 'Edit_Write'

    end

  end

  object GroupBox2: TGroupBox

    Left = 160

    Top = 16

    Width = 289

    Height = 169

    Caption = 'Read from Registry'

    TabOrder = 1

    object Label3: TLabel

      Left = 16

      Top = 120

      Width = 51

      Height = 13

      Caption = 'String Test'

    end

    object CheckBox_Read: TCheckBox

      Left = 16

      Top = 24

      Width = 97

      Height = 17

      Caption = 'Boolean Test'

      TabOrder = 0

      OnClick = CheckBox_ReadClick

    end

    object RadioGroup_Read: TRadioGroup

      Left = 16

      Top = 48

      Width = 105

      Height = 65

      Caption = 'Integer Test'

      Columns = 3

      ItemIndex = 0

      Items.Strings = (

        '0'

        '1'

        '2'

        '3'

        '4'

        '5')

      TabOrder = 1

      OnClick = RadioGroup_ReadClick

    end

    object Edit_Read: TEdit

      Left = 16

      Top = 136

      Width = 105

      Height = 21

      ReadOnly = True

      TabOrder = 2

      Text = 'Edit_Read'

    end

    object Memo_Read: TMemo

      Left = 144

      Top = 24

      Width = 129

      Height = 137

      Lines.Strings = (

        '')

      ReadOnly = True

      TabOrder = 3

    end

  end

  object Button_Write: TButton

    Left = 24

    Top = 200

    Width = 105

    Height = 25

    Caption = 'Write to Registry'

    TabOrder = 2

    OnClick = Button_WriteClick

  end

  object Button_Read: TButton

    Left = 176

    Top = 200

    Width = 105

    Height = 25

    Caption = 'Read from Registry'

    TabOrder = 3

    OnClick = Button_ReadClick

  end

end


TScrollBar example
 VCL Reference

TScrollBar example (scroldem.pas)

scroldem.dfm

Objects

The example demonstrates using TScrollBar, TImage, TEdit, TUpDown, TOpenDialog, TMenuItem, TBevel, TLabel and TPanel objects.

Running

To run this example, load the project file from the Help\Examples\Scrollbar directory.

Description

This example demonstrates the use of TScrollBar, including how to properly set scrolling ranges and how to respond to the scroll bar notification events.  In addition, an interface is provided for the user to adjust the values to see how the different parameters affect the scrolling behavior.  No attempt is made to verify that the parameters supplied by the user make any sense.

unit scroldem;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  Menus, StdCtrls, ComCtrls, ExtCtrls;

type

  TScrollForm1 = class(TForm)

    Bevel1: TBevel;

    Label3: TLabel;

    Label4: TLabel;

    Label5: TLabel;

    Label1: TLabel;

    Vertical: TLabel;

    ImgPanel: TPanel;

    Image: TImage;

    HScrollb: TScrollBar;

    VScrollb: TScrollBar;

    HUnits: TEdit;

    HPage: TEdit;

    HMax: TEdit;

    VUnits: TEdit;

    VPage: TEdit;

    VMax: TEdit;

    HUnitsUpDown: TUpDown;

    HPageUpDown: TUpDown;

    HMaxUpDown: TUpDown;

    VUnitsUpDown: TUpDown;

    VMaxUpDown: TUpDown;

    VPageUpDown: TUpDown;

    DefaultBtn: TButton;

    ApplyBtn: TButton;

    MainMenu1: TMainMenu;

    File1: TMenuItem;

    Open1: TMenuItem;

    N1: TMenuItem;

    Exit1: TMenuItem;

    View1: TMenuItem;

    VScrollMenu: TMenuItem;

    HScrollMenu: TMenuItem;

    Help1: TMenuItem;

    About1: TMenuItem;

    OpenDialog: TOpenDialog;

    procedure FormCreate(Sender: TObject);

    procedure Exit1Click(Sender: TObject);

    procedure View1Click(Sender: TObject);

    procedure VScrollMenuClick(Sender: TObject);

    procedure HScrollMenuClick(Sender: TObject);

    procedure Open1Click(Sender: TObject);

    procedure VScrollbChange(Sender: TObject);

    procedure HScrollbScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);

    procedure ImgPanelResize(Sender: TObject);

    procedure About1Click(Sender: TObject);

    procedure ApplyBtnClick(Sender: TObject);

    procedure DefaultBtnClick(Sender: TObject);

    procedure UpDownClick(Sender: TObject; Button: TUDBtnType);

  private

    { Private declarations }

    Units: TPoint;

    FDirty: Boolean;

    procedure SetDirty(d: Boolean);

    procedure ImageLoad(filename: string);

    procedure ScrollAdjust(update: Boolean);

    procedure ScrollReset;

    procedure UpdateDisplay;

    property Dirty: Boolean read FDirty write SetDirty;

  public

        { Public declarations }

  end;

var

  ScrollForm1: TScrollForm1;

implementation

uses about;

{$R *.DFM}

const

  DEF_SCROLL_UNITS = 8;

procedure TScrollForm1.FormCreate(Sender: TObject);

begin

  ScrollReset;

end;

procedure TScrollForm1.Exit1Click(Sender: TObject);

begin

  Close;

end;

procedure TScrollForm1.View1Click(Sender: TObject);

begin

  HScrollMenu.Checked := HScrollb.Visible;

  VScrollMenu.Checked := VScrollb.Visible;

end;

procedure TScrollForm1.VScrollMenuClick(Sender: TObject);

begin

  VScrollb.Visible := not VScrollb.Visible;

end;

procedure TScrollForm1.HScrollMenuClick(Sender: TObject);

begin

  HScrollb.Visible := not HScrollb.Visible;

end;

procedure TScrollForm1.Open1Click(Sender: TObject);

begin

  if OpenDialog.Execute then

    ImageLoad(OpenDialog.FileName);

end;

//

// Hooking the OnChange event is the simplest way to handle the

// scrollbar notification.  Note the check to ensure that the

// that the sender is the vertical scrollbar.  While irrelevant for

// this example, some forms may need to distinguish between various

// scrollbars.

//

procedure TScrollForm1.VScrollbChange(Sender: TObject);

begin

  if Sender as TScrollBar = VScrollb then

    Image.Top := -Units.y * VScrollb.Position;

end;

//

// Hooking the OnScroll event is another option for handling the

// scrollbar notification.  This is needed for a few reasons:

//   1) you want to do something special with particular scroll

//      events

//   2) the range of your scrollbar is larger than [0, 65535].  in

//      this case, the ScrollPos element is invalid and much of the

//      scrolling has to be done manually.

//

procedure TScrollForm1.HScrollbScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);

begin

  if HScrollb.Max <= 65535 then

    Image.Left := -Units.x * ScrollPos

  else

    ShowMessage('Scrollbar ranges > 65535 not supported');

end;

//

// The panel's size doesn't change in this example, so

// this event will only happen once.  In general, the range

// of the scrollbars will need to be changed when the size of

// the visible window is changed.

//

procedure TScrollForm1.ImgPanelResize(Sender: TObject);

begin

  ScrollAdjust(True);

end;

function scale(n, u: Integer): Integer;

begin

  Result := (n + u - 1) div u;

end;

function maxval(a, b: Integer): Integer;

begin

  if a >= b then

    Result := a

  else

    Result := b;

end;

//

// Readjust the range of the scrollbars to match the new size

// of the visible window.  (Also called by ScrollReset to avoid

// duplicating the code).

//

procedure TScrollForm1.ScrollAdjust(update: Boolean);

begin

  // set the maximum scrolling to be large enough to scroll the whole

  // image, but not so much that it can scroll off the window.  we

  // divide by the number of Units (>1) because scrolling one pixel at

  // a time is way too slow for most images of any size.

  if Image.Picture <> nil then

  begin

    HScrollb.Max := maxval(0, scale(Image.Width - ImgPanel.Width, Units.x));

    VScrollb.Max := maxval(0, scale(Image.Height - ImgPanel.Height, Units.y));

  end;

  if update then

    UpdateDisplay;

end;

//

// ScrollReset() is used to put the scrollbars into a sane "initial"

// state.  this needs to be done each time the image is changed,

// since the amount we scroll depends upon the image size.  for

// simplicity, the special case of "new image size" == "old image size"

// is ignored.

//

procedure TScrollForm1.ScrollReset;

begin

  // this fixed size works nice, although in some cases basing

  // the scroll units upon the size of the image works well, too.

  Units.x := DEF_SCROLL_UNITS;

  Units.y := DEF_SCROLL_UNITS;

  if Image.Picture <> nil then

  begin

    // move the image and the scrollbars to their "home" location

    Image.Top := 0;

    Image.Left := 0;

    HScrollb.Position := 0;

    VScrollb.Position := 0;

    // negative scrolling ranges aren't worth the trouble, so set

    // the range to go from [0, M].  See 'ScrollAdjust' to see how M

    // is calculated.

    HScrollb.Min := 0;

    VScrollb.Min := 0;

    ScrollAdjust(False);

    HScrollb.LargeChange := scale(HScrollb.Max, Units.x);

    VScrollb.LargeChange := scale(VScrollb.Max, Units.y);

    HScrollb.Visible := True;

    VScrollb.Visible := True;

  end;

  UpdateDisplay;

end;

procedure TScrollForm1.SetDirty(d: Boolean);

begin

  if d <> FDirty then

  begin

    FDirty := d;

    ApplyBtn.Enabled := FDirty;

  end;

end;

procedure TScrollForm1.ImageLoad(filename: string);

begin

  Image.Picture.LoadFromFile(filename);

  ScrollReset;

end;

procedure TScrollForm1.About1Click(Sender: TObject);

var

  about: TAboutBox;

begin

  about := TAboutBox.Create(Self);

  try

    about.ShowModal;

  finally

    about.Free;

  end;

end;

procedure TScrollForm1.ApplyBtnClick(Sender: TObject);

begin

  Units.x := HUnitsUpDown.Position;

  HScrollb.LargeChange := HPageUpDown.Position;

  HScrollb.Max := HMaxUpDown.Position;

  Units.y := VUnitsUpDown.Position;

  VScrollb.LargeChange := VPageUpDown.Position;

  VScrollb.Max := VMaxUpDown.Position;

  Dirty := False;

end;

procedure TScrollForm1.DefaultBtnClick(Sender: TObject);

begin

  ScrollReset;

  Dirty := False;

end;

procedure TScrollForm1.UpDownClick(Sender: TObject; Button: TUDBtnType);

begin

  Dirty := True;

end;

procedure TScrollForm1.UpdateDisplay;

begin

  HUnitsUpDown.Position := Units.x;

  HPageUpDown.Position := HScrollb.LargeChange;

  HMaxUpDown.Position := HScrollb.Max;

  VUnitsUpDown.Position := Units.y;

  VPageUpDown.Position := VScrollb.LargeChange;

  VMaxUpDown.Position := VScrollb.Max;

  Dirty := False;

end;

end.


 VCL Reference

TScrollBar example (scroldem.dfm)

scroldem.pas

object ScrollForm1: TScrollForm1

  Left = 200

  Top = 108

  BorderIcons = [biSystemMenu, biMinimize]

  BorderStyle = bsSingle

  Caption = 'ScrollDemo'

  ClientHeight = 194

  ClientWidth = 436

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Menu = MainMenu1

  OnCreate = FormCreate

  PixelsPerInch = 96

  TextHeight = 13

  object Bevel1: TBevel

    Left = 0

    Top = 0

    Width = 436

    Height = 9

    Align = alTop

    Shape = bsTopLine

  end

  object Label3: TLabel

    Left = 238

    Top = 42

    Width = 24

    Height = 13

    Caption = 'Units'

  end

  object Label4: TLabel

    Left = 198

    Top = 78

    Width = 64

    Height = 13

    Caption = 'LargeChange'

  end

  object Label5: TLabel

    Left = 242

    Top = 117

    Width = 20

    Height = 13

    Caption = 'Max'

  end

  object Label1: TLabel

    Left = 280

    Top = 16

    Width = 47

    Height = 13

    Caption = 'Horizontal'

  end

  object Vertical: TLabel

    Left = 376

    Top = 16

    Width = 35

    Height = 13

    Caption = 'Vertical'

  end

  object HScrollb: TScrollBar

    Left = 9

    Top = 169

    Width = 159

    Height = 16

    Max = 32767

    TabOrder = 1

    OnScroll = HScrollbScroll

  end

  object VScrollb: TScrollBar

    Left = 169

    Top = 9

    Width = 16

    Height = 157

    Kind = sbVertical

    TabOrder = 2

    OnChange = VScrollbChange

  end

  object HUnits: TEdit

    Left = 275

    Top = 38

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 3

    Text = '1'

  end

  object HPage: TEdit

    Left = 275

    Top = 74

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 4

    Text = '0'

  end

  object HMax: TEdit

    Left = 276

    Top = 113

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 5

    Text = '0'

  end

  object VUnits: TEdit

    Left = 363

    Top = 38

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 6

    Text = '1'

  end

  object VPage: TEdit

    Left = 363

    Top = 74

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 7

    Text = '0'

  end

  object VMax: TEdit

    Left = 363

    Top = 113

    Width = 48

    Height = 20

    ReadOnly = True

    TabOrder = 8

    Text = '0'

  end

  object HUnitsUpDown: TUpDown

    Left = 323

    Top = 38

    Width = 16

    Height = 20

    Associate = HUnits

    Min = 1

    Max = 32767

    Position = 1

    TabOrder = 9

    Wrap = False

    OnClick = UpDownClick

  end

  object HPageUpDown: TUpDown

    Left = 323

    Top = 74

    Width = 16

    Height = 20

    Associate = HPage

    Min = 0

    Max = 32767

    Position = 0

    TabOrder = 10

    Wrap = False

    OnClick = UpDownClick

  end

  object HMaxUpDown: TUpDown

    Left = 324

    Top = 113

    Width = 16

    Height = 20

    Associate = HMax

    Min = 0

    Max = 32767

    Position = 0

    TabOrder = 11

    Wrap = False

    OnClick = UpDownClick

  end

  object VUnitsUpDown: TUpDown

    Left = 411

    Top = 38

    Width = 16

    Height = 20

    Associate = VUnits

    Min = 1

    Max = 32767

    Position = 1

    TabOrder = 12

    Wrap = False

    OnClick = UpDownClick

  end

  object VMaxUpDown: TUpDown

    Left = 411

    Top = 113

    Width = 16

    Height = 20

    Associate = VMax

    Min = 0

    Max = 32767

    Position = 0

    TabOrder = 13

    Wrap = False

    OnClick = UpDownClick

  end

  object VPageUpDown: TUpDown

    Left = 411

    Top = 74

    Width = 16

    Height = 20

    Associate = VPage

    Min = 0

    Max = 32767

    Position = 0

    TabOrder = 14

    Wrap = False

    OnClick = UpDownClick

  end

  object DefaultBtn: TButton

    Left = 348

    Top = 157

    Width = 75

    Height = 25

    Caption = '&Defaults'

    ParentShowHint = False

    ShowHint = False

    TabOrder = 15

    OnClick = DefaultBtnClick

  end

  object ApplyBtn: TButton

    Left = 265

    Top = 157

    Width = 75

    Height = 25

    Caption = '&Apply'

    Enabled = False

    TabOrder = 16

    OnClick = ApplyBtnClick

  end

  object ImgPanel: TPanel

    Left = 8

    Top = 8

    Width = 160

    Height = 160

    BevelOuter = bvNone

    BorderStyle = bsSingle

    TabOrder = 0

    object Image: TImage

      Left = 0

      Top = 0

      Width = 600

      Height = 470

      AutoSize = True

      Picture.Data = {

// rest of bitmap goes here

                }

       end

  end

  object MainMenu1: TMainMenu

    Left = 196

    Top = 159

    object File1: TMenuItem

      Caption = '&File'

      object Open1: TMenuItem

        Caption = '&Open...'

        OnClick = Open1Click

      end

      object N1: TMenuItem

        Caption = '-'

      end

      object Exit1: TMenuItem

        Caption = 'E&xit'

        OnClick = Exit1Click

      end

    end

    object View1: TMenuItem

      Caption = '&Scroll'

      OnClick = View1Click

      object VScrollMenu: TMenuItem

        Caption = '&Vertical'

        OnClick = VScrollMenuClick

      end

      object HScrollMenu: TMenuItem

        Caption = '&Horizontal'

        OnClick = HScrollMenuClick

      end

    end

    object Help1: TMenuItem

      Caption = '&Help'

      object About1: TMenuItem

        Caption = '&About...'

        OnClick = About1Click

      end

    end

  end

  object OpenDialog: TOpenDialog

    DefaultExt = '.bmp'

    FileEditStyle = fsEdit

    Filter = 'Images (*.bmp;*.ico)|*.bmp;*.ico|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico'

    Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist]

    Left = 230

    Top = 158

  end

end


TProgressBar, TThread example
 VCL Reference

TProgressBar, TThread example (pg1.pas)

pg1.dfm

Objects

The example demonstrates using the TProgressBar and TThread objects.

Running

To run this example, load the project file from the Help\Examples\PrgrsBar directory.

Description

This example illustrates the use of a progress bar control, how to update the control, and how to manage threads during such a process.

For another example using TProgress bar see Technical Information Document #3103 on our website: www.inprise.com/devsupport/delphi/ti_list/TI3103.html.

unit Pg1;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ComCtrls, ExtCtrls, Pg2;

const

  WM_ThreadDoneMsg = WM_User + 8;

type

  TForm1 = class(TForm)

    ProgressBar1: TProgressBar;

    ProgressBar2: TProgressBar;

    Button1: TButton;

    Button2: TButton;

    TrackBar1: TTrackBar;

    TrackBar2: TTrackBar;

    Bevel1: TBevel;

    Bevel2: TBevel;

    Label1: TLabel;

    Label2: TLabel;

    Button3: TButton;

    Button4: TButton;

    procedure Button1Click(Sender: TObject);

    procedure Button2Click(Sender: TObject);

    procedure Button3Click(Sender: TObject);

    procedure Button4Click(Sender: TObject);

    procedure FormCreate(Sender: TObject);

    procedure TrackBar1Change(Sender: TObject);

    procedure TrackBar2Change(Sender: TObject);

    procedure FormDestroy(Sender: TObject);

  private

    { Private declarations }

    MyThread1 : TMyThread; // thread number 1

    MyThread2 : TMyThread; // thread number 2

    Thread1Active : boolean; // used to test if thread 1 is active

    Thread2Active : boolean; // used to test if thread 2 is active

    procedure ThreadDone(var AMessage : TMessage); message WM_ThreadDoneMsg; // Message to be sent back from thread when its done

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject); // Create Thread 1

{ The thread will destroy iteself when it is done executing because FreeOnTerminate is set to true.

The first paramter is the priority, and the second is the progressbar to update.

}

begin

   if (MyThread1 = nil) or (Thread1Active = false) then // make sure its not already running

   begin

     MyThread1 := TMyThread.CreateIt(TrackBar1.Position, ProgressBar1);

     Thread1Active := true;

   end

   else

     ShowMessage('Thread still executing');

end;

procedure TForm1.Button2Click(Sender: TObject); // Create Thread 2

begin

   if (MyThread2 = nil) or (Thread2Active = false) then  // make sure its not already running

   begin

     MyThread2 := TMyThread.CreateIt(TrackBar2.Position, ProgressBar2);

     Thread2Active := true;

   end

   else

     ShowMessage('Thread still executing');

end;

procedure TForm1.Button3Click(Sender: TObject); // Terminate Thread 1

begin

  if (MyThread1 <> nil) and (Thread1Active = true) then  // check to see if it is running

    MyThread1.Terminate

  else

   ShowMessage('Thread not started');

end;

procedure TForm1.Button4Click(Sender: TObject); // Terminate Thread 2

begin

  if (MyThread2 <> nil) and (Thread2Active = true) then  // check to see if it is running

    MyThread2.Terminate

  else

    ShowMessage('Thread not started');

end;

procedure TForm1.ThreadDone(var AMessage: TMessage); // keep track of when and which thread is done executing

begin

  if ((MyThread1 <> nil) and (MyThread1.ThreadID = cardinal(AMessage.WParam))) then

  begin

      Thread1Active := false;

  end;

  if ((MyThread2 <> nil) and (MyThread2.ThreadID = cardinal(AMessage.WParam))) then

  begin

      Thread2Active := false;

  end;

end;

procedure TForm1.FormCreate(Sender: TObject); // initialize to zero

begin

  Thread1Active := false;

  Thread2Active := false;

end;

procedure TForm1.TrackBar1Change(Sender: TObject); // set Thread 1 Priority

begin

  if (MyThread1 <> nil) and (Thread1Active = true) then

     MyThread1.priority := TThreadPriority(TrackBar1.Position);

end;

procedure TForm1.TrackBar2Change(Sender: TObject); // set Thread 2 Priority

begin

  if (MyThread2 <> nil) and (Thread2Active = true) then

    MyThread2.priority := TThreadPriority(TrackBar2.Position);

end;

procedure TForm1.FormDestroy(Sender: TObject); // Terminate any threads still running

begin

   if (MyThread1 <> nil) and (Thread1Active = true) then

   begin

     MyThread1.Terminate;

     MyThread1.WaitFor;  // wait for it to terminate

   end;

   if (MyThread2 <> nil) and (Thread2Active = true) then

   begin

     MyThread2.Terminate;

     MyThread2.WaitFor;

   end;

end;

end.


 VCL Reference

TProgressBar, TThread example (pg1.dfm)

pg1.pas

object Form1: TForm1

  Left = 516

  Top = 256

  Width = 712

  Height = 507

  Caption = 'TThread, TTrackBar, TProgressBar'

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OldCreateOrder = False

  Position = poDesktopCenter

  OnCreate = FormCreate

  OnDestroy = FormDestroy

  PixelsPerInch = 96

  TextHeight = 13

  object Bevel1: TBevel

    Left = 32

    Top = 8

    Width = 513

    Height = 169

  end

  object Bevel2: TBevel

    Left = 32

    Top = 200

    Width = 513

    Height = 169

  end

  object Label1: TLabel

    Left = 256

    Top = 104

    Width = 34

    Height = 13

    Caption = 'Priority:'

  end

  object Label2: TLabel

    Left = 248

    Top = 296

    Width = 34

    Height = 13

    Caption = 'Priority:'

  end

  object ProgressBar1: TProgressBar

    Left = 64

    Top = 32

    Width = 393

    Height = 25

    Min = 0

    Max = 100

    Step = 1

    TabOrder = 0

  end

  object ProgressBar2: TProgressBar

    Left = 64

    Top = 224

    Width = 401

    Height = 25

    Min = 0

    Max = 100

    TabOrder = 1

  end

  object Button1: TButton

    Left = 72

    Top = 80

    Width = 105

    Height = 25

    Caption = 'Create Thread'

    TabOrder = 2

    OnClick = Button1Click

  end

  object Button2: TButton

    Left = 72

    Top = 272

    Width = 105

    Height = 25

    Caption = 'Create Thread'

    TabOrder = 3

    OnClick = Button2Click

  end

  object TrackBar1: TTrackBar

    Left = 296

    Top = 104

    Width = 193

    Height = 33

    Max = 6

    Orientation = trHorizontal

    Frequency = 1

    Position = 3

    SelEnd = 0

    SelStart = 0

    TabOrder = 4

    TickMarks = tmBottomRight

    TickStyle = tsAuto

    OnChange = TrackBar1Change

  end

  object TrackBar2: TTrackBar

    Left = 288

    Top = 296

    Width = 193

    Height = 45

    Max = 6

    Orientation = trHorizontal

    Frequency = 1

    Position = 3

    SelEnd = 0

    SelStart = 0

    TabOrder = 5

    TickMarks = tmBottomRight

    TickStyle = tsAuto

    OnChange = TrackBar2Change

  end

  object Button3: TButton

    Left = 72

    Top = 128

    Width = 105

    Height = 25

    Caption = 'Terminate Thread'

    TabOrder = 6

    OnClick = Button3Click

  end

  object Button4: TButton

    Left = 72

    Top = 320

    Width = 105

    Height = 25

    Caption = 'Terminate Thread'

    TabOrder = 7

    OnClick = Button4Click

  end

end


TTabControl example
 VCL Reference

TTabControl example (clsexm1.pas)

clsexm1.dfm

Objects

The example demonstrates using TTabControl, TTable, TDataSource, TIntegerField, TStringField, TFloatField, TDateTimeField, TDBEdit and TLabel objects.

Running

To run this example, load the project file from the Help\Examples\TabCntrl directory.

Description

This project shows how to use a tab control to display records from a database table, including the creation of a calculated field.

unit clsexm1;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  Db, DBTables, ComCtrls, ExtCtrls, DBCtrls, StdCtrls, Mask;

type

  TForm1 = class(TForm)

    TabControl1: TTabControl;

    Table1: TTable;

    DataSource1: TDataSource;

    Table1EmpNo: TIntegerField;

    Table1LastName: TStringField;

    Table1FirstName: TStringField;

    Table1PhoneExt: TStringField;

    Table1HireDate: TDateTimeField;

    Table1Salary: TFloatField;

    Label1: TLabel;

    DBEdit1: TDBEdit;

    Label2: TLabel;

    DBEdit2: TDBEdit;

    Label3: TLabel;

    DBEdit3: TDBEdit;

    Label4: TLabel;

    DBEdit4: TDBEdit;

    Label5: TLabel;

    DBEdit5: TDBEdit;

    Label6: TLabel;

    DBEdit6: TDBEdit;

    DBText1: TDBText;

    Table1FullName: TStringField;

    procedure FormCreate(Sender: TObject);

    procedure TabControl1Change(Sender: TObject);

    procedure Table1CalcFields(DataSet: TDataSet);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);

begin

  TabControl1.Align := alClient;

  TabControl1.TabHeight := 30;

  with Table1 do

  begin

    Close;

    IndexName := 'ByName';

    Open;

    while not EOF do

    begin

      TabControl1.Tabs.Add(FieldByName('LASTNAME').AsString);

      Next;

    end;

    // Sync page and table.

    First;

  end;

end;

procedure TForm1.TabControl1Change(Sender: TObject);

begin

  with TabControl1 do

  begin

    if TabIndex <> -1 then

      if not Table1.Locate('LASTNAME', Tabs[TabIndex], []) then

        ShowMessage(Tabs[TabIndex -1] + ' not found.');

  end;

end;

procedure TForm1.Table1CalcFields(DataSet: TDataSet);

begin

  DataSet['FullName'] := DataSet['LASTNAME'] + ', ' + DataSet['FIRSTNAME'];

end;

end.


 VCL Reference

TTabControl example (clsexm1.dfm)

clsexm1.pas

object Form1: TForm1

  Left = 266

  Top = 182

  Width = 366

  Height = 354

  Caption = 'Form1'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OnCreate = FormCreate

  PixelsPerInch = 96

  TextHeight = 13

  object TabControl1: TTabControl

    Left = 0

    Top = 0

    Width = 358

    Height = 327

    Align = alClient

    TabOrder = 0

    OnChange = TabControl1Change

    object Label1: TLabel

      Left = 16

      Top = 72

      Width = 35

      Height = 13

      Caption = 'EmpNo'

      FocusControl = DBEdit1

    end

    object Label2: TLabel

      Left = 16

      Top = 112

      Width = 48

      Height = 13

      Caption = 'LastName'

      FocusControl = DBEdit2

    end

    object Label3: TLabel

      Left = 16

      Top = 152

      Width = 47

      Height = 13

      Caption = 'FirstName'

      FocusControl = DBEdit3

    end

    object Label4: TLabel

      Left = 16

      Top = 192

      Width = 46

      Height = 13

      Caption = 'PhoneExt'

      FocusControl = DBEdit4

    end

    object Label5: TLabel

      Left = 16

      Top = 232

      Width = 42

      Height = 13

      Caption = 'HireDate'

      FocusControl = DBEdit5

    end

    object Label6: TLabel

      Left = 16

      Top = 272

      Width = 29

      Height = 13

      Caption = 'Salary'

      FocusControl = DBEdit6

    end

    object DBText1: TDBText

      Left = 56

      Top = 48

      Width = 6

      Height = 20

      AutoSize = True

      DataField = 'FullName'

      DataSource = DataSource1

      Font.Charset = ANSI_CHARSET

      Font.Color = clBlack

      Font.Height = -16

      Font.Name = 'MS Sans Serif'

      Font.Style = [fsBold]

      ParentFont = False

    end

    object DBEdit1: TDBEdit

      Left = 16

      Top = 88

      Width = 64

      Height = 20

      DataField = 'EmpNo'

      DataSource = DataSource1

      TabOrder = 0

    end

    object DBEdit2: TDBEdit

      Left = 16

      Top = 128

      Width = 124

      Height = 20

      DataField = 'LastName'

      DataSource = DataSource1

      TabOrder = 1

    end

    object DBEdit3: TDBEdit

      Left = 16

      Top = 168

      Width = 94

      Height = 20

      DataField = 'FirstName'

      DataSource = DataSource1

      TabOrder = 2

    end

    object DBEdit4: TDBEdit

      Left = 16

      Top = 208

      Width = 28

      Height = 20

      DataField = 'PhoneExt'

      DataSource = DataSource1

      TabOrder = 3

    end

    object DBEdit5: TDBEdit

      Left = 16

      Top = 248

      Width = 64

      Height = 20

      DataField = 'HireDate'

      DataSource = DataSource1

      TabOrder = 4

    end

    object DBEdit6: TDBEdit

      Left = 16

      Top = 288

      Width = 64

      Height = 20

      DataField = 'Salary'

      DataSource = DataSource1

      TabOrder = 5

    end

  end

  object Table1: TTable

    Active = True

    OnCalcFields = Table1CalcFields

    DatabaseName = 'DBDEMOS'

    TableName = 'EMPLOYEE.DB'

    Left = 32

    Top = 48

    object Table1EmpNo: TIntegerField

      FieldName = 'EmpNo'

      DisplayFormat = 'Emp'#39'#'#39' 0000'

      MaxValue = 9999

      MinValue = 1

    end

    object Table1LastName: TStringField

      FieldName = 'LastName'

    end

    object Table1FirstName: TStringField

      FieldName = 'FirstName'

      Size = 15

    end

    object Table1PhoneExt: TStringField

      FieldName = 'PhoneExt'

      Size = 4

    end

    object Table1HireDate: TDateTimeField

      FieldName = 'HireDate'

    end

    object Table1Salary: TFloatField

      FieldName = 'Salary'

    end

    object Table1FullName: TStringField

      FieldName = 'FullName'

      Size = 30

      Calculated = True

    end

  end

  object DataSource1: TDataSource

    DataSet = Table1

    Left = 64

    Top = 48

  end

end


TUpdateSQL example
 VCL Reference

TUpdateSQL example (cupdm.pas)

cuperror.pas	cupmnfrm.pas	cupdm.dfm	cuperror.dfm	cupmnfrm.dfm

Objects

The example demonstrates using TUpdateSQL, TDataModule, TTable, TDataSource, TQuery, TIntegerField, TStringField, TDBGrid, TDBNavigator, TButton, TLabel, TPanel and TEdit objects.

Running

To run this example, load the project file from the Help\Examples\Update directory.

Description

This project shows how to use TUpdateSQL to update the records of a read-only query (QueryCache). The UpdateSQLCache TUpdateSQL object contains SQL statements in its DeleteSQL, InsertSQL and ModifySQL properties that are executed when ApplyUpdates of the TQuery (QueryCache) object is called.  Note that the CachedUpdates property of QueryCache is True.

This example uses the local InterBase database \Demos\Data\EMPLOYEE.GDB. You may need to update this path in the Params property of the DBaseCache TDatabase object.

unit CUpMnFrm;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ExtCtrls, DBCtrls, Grids, DBGrids;

type

  TForm1 = class(TForm)

    DBGridRefresh: TDBGrid;

    DBGridCache: TDBGrid;

    DBNavigator1: TDBNavigator;

    ButtonApply: TButton;

    ButtonCancel: TButton;

    ButtonUndo: TButton;

    ButtonRefresh: TButton;

    Label1: TLabel;

    Label2: TLabel;

    procedure ButtonApplyClick(Sender: TObject);

    procedure ButtonCancelClick(Sender: TObject);

    procedure ButtonUndoClick(Sender: TObject);

    procedure ButtonRefreshClick(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

uses  CUpDM;

{$R *.DFM}

procedure TForm1.ButtonApplyClick(Sender: TObject);

begin

  DataModuleCache.DBaseCache.ApplyUpdates([DataModuleCache.QueryCache]);

end;

procedure TForm1.ButtonCancelClick(Sender: TObject);

begin

  DataModuleCache.QueryCache.CancelUpdates;

end;

procedure TForm1.ButtonUndoClick(Sender: TObject);

begin

  DataModuleCache.QueryCache.RevertRecord;

end;

procedure TForm1.ButtonRefreshClick(Sender: TObject);

begin

  With DataModuleCache.TableRefresh do

  begin

    close;

    open;

  end;

end;

end.


 VCL Reference

TUpdateSQL example (cuperror.pas)

cupdm.pas	cupmnfrm.pas	cupdm.dfm	cuperror.dfm	cupmnfrm.dfm

unit CUpError;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ExtCtrls,DB,dbitypes,dbiprocs,dbtables;

type

  TFormError = class(TForm)

    Panel1: TPanel;

    LabelOld: TLabel;

    LabelNew: TLabel;

    LabelMessage: TLabel;

    EditOld: TEdit;

    EditNew: TEdit;

    ButtonIgnore: TButton;

    ButtonRetry: TButton;

    ButtonAbort: TButton;

  private

    { Private declarations }

  public

  function ErrorDecision(DataSet : TDataSet; E: EDataBaseError;

                                 UpdateKind: TUpdateKind):TUpdateAction;

    { Public declarations }

  end;

var

  FormError: TFormError;

implementation

uses CUpDM;

{$R *.DFM}

function TFormError.Errordecision(Dataset: TDataSet;

             E: EDataBaseError; UpdateKind: TUpdateKind):

             TUpdateAction;

    const

      UpdateKindStr: array[TUpdateKind] of String =('Modify Error',

                     'Insert Error','Delete Error');

      begin

        Panel1.caption := UpdateKindStr[UpdateKind];

        LabelMessage.Caption := E.Message;

        EditOld.text := DataModuleCache.QueryCache.Fields[0].OldValue;

        EditNew.text := DataModuleCache.QueryCache.Fields[0].NewValue;

        ShowModal;

        case ModalResult of

        mrRetry:

        begin

          DataModuleCache.QueryCache.Fields[0].newvalue := EditNew.text;

          Result := uaRetry;

        end;

        mrIgnore: Result := uaSkip;

        else

          result := uaAbort;

      end;

   end;

end.


 VCL Reference

TUpdateSQL example (cupmnfrm.pas)

cupdm.pas	cuperror.pas	cupdm.dfm	cuperror.dfm	cupmnfrm.dfm

unit CUpDM;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  DB, DBTables;

type

  TDataModuleCache = class(TDataModule)

    DBaseCache: TDatabase;

    TableRefresh: TTable;

    DataSourceCache: TDataSource;

    DataSourceRefresh: TDataSource;

    QueryCache: TQuery;

    UpdateSQLCache: TUpdateSQL;

    QueryCacheCUST_NO: TIntegerField;

    QueryCacheCUSTOMER: TStringField;

    QueryCacheCONTACT_FIRST: TStringField;

    QueryCacheCONTACT_LAST: TStringField;

    QueryCachePHONE_NO: TStringField;

    QueryCacheADDRESS_LINE1: TStringField;

    QueryCacheADDRESS_LINE2: TStringField;

    QueryCacheCITY: TStringField;

    QueryCacheSTATE_PROVINCE: TStringField;

    QueryCacheCOUNTRY: TStringField;

    QueryCachePOSTAL_CODE: TStringField;

    QueryCacheON_HOLD: TStringField;

    procedure QueryCacheUpdateError(DataSet: TDataSet; E: EDatabaseError;

      UpdateKind: TUpdateKind; var UpdateAction: TUpdateAction);

  private

    { Private declarations }

  public

    { Public declarations }

  end;

var

  DataModuleCache: TDataModuleCache;

implementation

uses CUpError;

{$R *.DFM}

procedure TDataModuleCache.QueryCacheUpdateError(DataSet: TDataSet;

  E: EDatabaseError; UpdateKind: TUpdateKind;

  var UpdateAction: TUpdateAction);

begin

  if EDBEngineError(e).errors[0].errorcode = 9729 then

  begin

    UpdateAction := FormError.ErrorDecision(DataSet, E, UpdateKind);

  end;

end;

end.


 VCL Reference

TUpdateSQL example (cupdm.dfm)

cupdm.pas	cuperror.pas	cupmnfrm.pas	cuperror.dfm	cupmnfrm.dfm

object Form1: TForm1

  Left = 181

  Top = 96

  Width = 435

  Height = 358

  Caption = 'CachedUpdate Demo'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  PixelsPerInch = 96

  TextHeight = 13

  object Label1: TLabel

    Left = 40

    Top = 40

    Width = 227

    Height = 13

    Caption = 'This grid is Hooked to the  TQuery  QueryCache'

  end

  object Label2: TLabel

    Left = 48

    Top = 184

    Width = 214

    Height = 13

    Caption = 'This grid is hooked to a TTable TableRefresh'

  end

  object DBGridRefresh: TDBGrid

    Left = 0

    Top = 200

    Width = 320

    Height = 120

    DataSource = DataModuleCache.DataSourceRefresh

    Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines,

dgTabs, dgConfirmDelete, dgCancelOnExit]

    ReadOnly = True

    TabOrder = 0

    TitleFont.Charset = DEFAULT_CHARSET

    TitleFont.Color = clWindowText

    TitleFont.Height = -11

    TitleFont.Name = 'MS Sans Serif'

    TitleFont.Style = []

  end

  object DBGridCache: TDBGrid

    Left = 0

    Top = 56

    Width = 320

    Height = 120

    DataSource = DataModuleCache.DataSourceCache

    TabOrder = 1

    TitleFont.Charset = DEFAULT_CHARSET

    TitleFont.Color = clWindowText

    TitleFont.Height = -11

    TitleFont.Name = 'MS Sans Serif'

    TitleFont.Style = []

  end

  object DBNavigator1: TDBNavigator

    Left = 0

    Top = 0

    Width = 320

    Height = 25

    DataSource = DataModuleCache.DataSourceCache

    ParentShowHint = False

    ShowHint = True

    TabOrder = 2

  end

  object ButtonApply: TButton

    Left = 336

    Top = 40

    Width = 75

    Height = 25

    Caption = 'Apply'

    TabOrder = 3

    OnClick = ButtonApplyClick

  end

  object ButtonCancel: TButton

    Left = 336

    Top = 80

    Width = 75

    Height = 25

    Caption = 'Cancel'

    TabOrder = 4

    OnClick = ButtonCancelClick

  end

  object ButtonUndo: TButton

    Left = 336

    Top = 120

    Width = 75

    Height = 25

    Caption = 'Undo'

    TabOrder = 5

    OnClick = ButtonUndoClick

  end

  object ButtonRefresh: TButton

    Left = 336

    Top = 216

    Width = 75

    Height = 25

    Caption = 'Refresh'

    TabOrder = 6

    OnClick = ButtonRefreshClick

  end

end


 VCL Reference

TUpdateSQL example (cuperror.dfm)

cupdm.pas	cuperror.pas	cupmnfrm.pas	cupdm.dfm	cupmnfrm.dfm

object FormError: TFormError

  Left = 191

  Top = 96

  Width = 383

  Height = 192

  Caption = 'FormError'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  PixelsPerInch = 96

  TextHeight = 13

  object LabelOld: TLabel

    Left = 24

    Top = 72

    Width = 57

    Height = 13

    Caption = 'Old Cust No'

  end

  object LabelNew: TLabel

    Left = 24

    Top = 104

    Width = 48

    Height = 13

    Caption = 'LabelNew'

  end

  object LabelMessage: TLabel

    Left = 24

    Top = 136

    Width = 69

    Height = 13

    Caption = 'LabelMessage'

    WordWrap = True

  end

  object Panel1: TPanel

    Left = 64

    Top = 8

    Width = 185

    Height = 41

    Caption = 'Panel1'

    TabOrder = 0

  end

  object EditOld: TEdit

    Left = 96

    Top = 64

    Width = 121

    Height = 21

    TabOrder = 1

  end

  object EditNew: TEdit

    Left = 96

    Top = 96

    Width = 121

    Height = 21

    TabOrder = 2

  end

  object ButtonIgnore: TButton

    Left = 272

    Top = 16

    Width = 75

    Height = 25

    Caption = 'Ignore'

    ModalResult = 5

    TabOrder = 3

  end

  object ButtonRetry: TButton

    Left = 272

    Top = 64

    Width = 75

    Height = 25

    Caption = 'Retry'

    ModalResult = 4

    TabOrder = 4

  end

  object ButtonAbort: TButton

    Left = 272

    Top = 112

    Width = 75

    Height = 25

    Caption = 'Abort'

    ModalResult = 3

    TabOrder = 5

  end

end


 VCL Reference

TUpdateSQL example (cupmnfrm.dfm)

cupdm.pas	cuperror.pas	cupmnfrm.pas	cupdm.dfm	cuperror.dfm

object DataModuleCache: TDataModuleCache

  Left = 728

  Top = 102

  Height = 260

  Width = 290

  object TableRefresh: TTable

    Filtered = True

    DatabaseName = 'myib'

    TableName = 'CUSTOMER'

    Left = 96

    Top = 104

  end

  object DataSourceCache: TDataSource

    DataSet = QueryCache

    Left = 32

    Top = 152

  end

  object DataSourceRefresh: TDataSource

    DataSet = TableRefresh

    Left = 120

    Top = 152

  end

  object QueryCache: TQuery

    CachedUpdates = True

    OnUpdateError = QueryCacheUpdateError

    DatabaseName = 'myib'

    SQL.Strings = (

      'select * from customer')

    UpdateObject = UpdateSQLCache

    Left = 32

    Top = 104

    object QueryCacheCUST_NO: TIntegerField

      FieldName = 'CUST_NO'

    end

    object QueryCacheCUSTOMER: TStringField

      FieldName = 'CUSTOMER'

      Size = 25

    end

    object QueryCacheCONTACT_FIRST: TStringField

      FieldName = 'CONTACT_FIRST'

      Size = 15

    end

    object QueryCacheCONTACT_LAST: TStringField

      FieldName = 'CONTACT_LAST'

    end

    object QueryCachePHONE_NO: TStringField

      FieldName = 'PHONE_NO'

    end

    object QueryCacheADDRESS_LINE1: TStringField

      FieldName = 'ADDRESS_LINE1'

      Size = 30

    end

    object QueryCacheADDRESS_LINE2: TStringField

      FieldName = 'ADDRESS_LINE2'

      Size = 30

    end

    object QueryCacheCITY: TStringField

      FieldName = 'CITY'

      Size = 25

    end

    object QueryCacheSTATE_PROVINCE: TStringField

      FieldName = 'STATE_PROVINCE'

      Size = 15

    end

    object QueryCacheCOUNTRY: TStringField

      FieldName = 'COUNTRY'

      Size = 15

    end

    object QueryCachePOSTAL_CODE: TStringField

      FieldName = 'POSTAL_CODE'

      Size = 12

    end

    object QueryCacheON_HOLD: TStringField

      FieldName = 'ON_HOLD'

      Size = 1

    end

  end

  object UpdateSQLCache: TUpdateSQL

    ModifySQL.Strings = (

      'update customer'

      'set'

      '  CUST_NO = :CUST_NO,'

      '  CUSTOMER = :CUSTOMER,'

      '  CONTACT_FIRST = :CONTACT_FIRST,'

      '  CONTACT_LAST = :CONTACT_LAST,'

      '  PHONE_NO = :PHONE_NO,'

      '  ADDRESS_LINE1 = :ADDRESS_LINE1,'

      '  ADDRESS_LINE2 = :ADDRESS_LINE2,'

      '  CITY = :CITY,'

      '  STATE_PROVINCE = :STATE_PROVINCE,'

      '  COUNTRY = :COUNTRY,'

      '  POSTAL_CODE = :POSTAL_CODE,'

      '  ON_HOLD = :ON_HOLD'

      'where'

      '  CUST_NO = :OLD_CUST_NO')

    InsertSQL.Strings = (

      'insert into customer'

      '  (CUST_NO, CUSTOMER, CONTACT_FIRST, CONTACT_LAST, PHONE_NO, '

      'ADDRESS_LINE1, '

      '   ADDRESS_LINE2, CITY, STATE_PROVINCE, COUNTRY, POSTAL_CODE, '

      'ON_HOLD)'

      'values'

        '  (:CUST_NO, :CUSTOMER, :CONTACT_FIRST, :CONTACT_LAST, :PHONE_NO' +

        ', '

      ':ADDRESS_LINE1, '

        '   :ADDRESS_LINE2, :CITY, :STATE_PROVINCE, :COUNTRY, :POSTAL_COD' +

        'E, '

      ':ON_HOLD)')

    DeleteSQL.Strings = (

      'delete from customer'

      'where'

      '  CUST_NO = :OLD_CUST_NO')

    Left = 32

    Top = 48

  end

  object DBaseCache: TDatabase

    AliasName = 'IBLOCAL'

    Connected = True

    DatabaseName = 'myib'

    Params.Strings = (

        'SERVER NAME=..\Demos\Data\EMPLOYE' +

        'E.GDB'

      'USER NAME=SYSDBA'

      'OPEN MODE=READ/WRITE'

      'SCHEMA CACHE SIZE=8'

      'LANGDRIVER='

      'SQLQRYMODE='

      'SQLPASSTHRU MODE=SHARED AUTOCOMMIT'

      'SCHEMA CACHE TIME=-1'

      'MAX ROWS=-1'

      'BATCH COUNT=200'

      'ENABLE SCHEMA CACHE=FALSE'

      'SCHEMA CACHE DIR='

      'ENABLE BCD=FALSE'

      'BLOBS TO CACHE=64'

      'BLOB SIZE=32'

      'PASSWORD=')

    SessionName = 'Default'

    Left = 112

    Top = 24

  end

end


TBatchMove example
 VCL Reference

TBatchMove example (batmove.pas)

batmov.dfm

Objects

The example demonstrates using TBatchMove, TBevel, TComboBox, TPageControl, TDatabase, and TOpenDialog objects.

Running

To run this example, load the project file from the Help\Examples\Batchmv directory. A second, similar example is also provided in the folder Help\Examples\Batchmv2.

Description

This example demonstrates using TBatchMove to manipulate the records in a database table.

unit Batmove;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ExtCtrls, Db, DBTables, ComCtrls;

type

  TForm1 = class(TForm)

    BatchMove1: TBatchMove;

    tblSource: TTable;

    tblDest: TTable;

    Bevel1: TBevel ;

    Label6: TLabel;

    cmbxDestAlias: TComboBox;

    Label7: TLabel;

    cmbxDestTable: TComboBox;

    Label8: TLabel;

    cmbxDestIndex: TComboBox;

    Bevel2: TBevel;

    cmbxSourceAlias: TComboBox;

    cmbxSourceTable: TComboBox;

    cmbxSourceIndex: TComboBox;

    Label5: TLabel;

    Label4: TLabel;

    Label3: TLabel;

    cmbxMode: TComboBox;

    Button1: TButton;

    Bevel3: TBevel;

    chkbxAbortKey: TCheckBox;

    chkbxAbortProblem: TCheckBox;

    chkbxTrans: TCheckBox;

    Label1: TLabel;

    Label2: TLabel;

    Label10: TLabel;

    Label9: TLabel;

    Label12: TLabel;

    edtChangedTable: TEdit;

    Label13: TLabel;

    edtKeyVioTbl: TEdit;

    Label14: TLabel;

    edtProbTbl: TEdit;

    Label11: TLabel;

    edtRecCount: TEdit;

    procedure FormCreate(Sender: TObject);

    procedure cmbxSourceAliasChange(Sender: TObject);

    procedure cmbxDestAliasChange(Sender: TObject);

    procedure cmbxSourceTableChange(Sender: TObject);

    procedure cmbxDestTableChange(Sender: TObject);

    procedure cmbxSourceIndexChange(Sender: TObject);

    procedure cmbxDestIndexChange(Sender: TObject);

    procedure Button1Click(Sender: TObject);

    procedure chkbxAbortKeyClick(Sender: TObject);

    procedure chkbxAbortProblemClick(Sender: TObject);

    procedure chkbxTransClick(Sender: TObject);

    procedure cmbxModeChange(Sender: TObject);

    procedure edtRecCountKeyPress(Sender: TObject; var Key: Char);

    procedure FormShow(Sender: TObject);

  private

    { Private declarations }

    function IsStringsEqual(const s1,s2 : string): boolean;

//    simple utility function

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject); // Get alias names

begin

  if Session.Active = false then

    Session.Open;

  Session.GetAliasNames(CmbxSourceAlias.Items);

  cmbxDestAlias.Items := cmbxSourceAlias.Items;

end;

procedure TForm1.cmbxSourceAliasChange(Sender: TObject);

begin

  if cmbxSourceAlias.ItemIndex <> -1 then

  begin

     tblSource.DatabaseName := cmbxSourceAlias.Items[cmbxSourceAlias.ItemIndex];

     Session.GetTableNames(tblSource.DatabaseName,'',true,false,cmbxSourceTable.Items);

  end

  else

  begin

    tblSource.DatabaseName := '';

    cmbxSourceTable.Items.Clear;

  end;

end;

procedure TForm1.cmbxDestAliasChange(Sender: TObject);

begin

  if cmbxDestAlias.ItemIndex <> -1 then

  begin

     tblDest.DatabaseName := cmbxDestAlias.Items[cmbxDestAlias.ItemIndex];

     Session.GetTableNames(tblDest.DatabaseName,'',true,false,cmbxDestTable.Items);

  end

  else

  begin

    tblDest.DatabaseName := '';

    cmbxDestTable.Items.Clear;

  end;

end;

procedure TForm1.cmbxSourceTableChange(Sender: TObject);

begin

  if cmbxSourceTable.ItemIndex <> -1 then

  begin

     tblSource.TableName := cmbxSourceTable.Items[cmbxSourceTable.ItemIndex];

     tblSource.GetIndexNames(cmbxSourceIndex.Items);

  end

  else

  begin

    tblSource.TableName := '';

    cmbxSourceIndex.Items.Clear;

  end;

end;

procedure TForm1.cmbxDestTableChange(Sender: TObject);

begin

  if cmbxDestTable.ItemIndex <> -1 then

  begin

     tblDest.TableName := cmbxDestTable.Items[cmbxDestTable.ItemIndex];

     tblDest.GetIndexNames(cmbxDestIndex.Items);

  end

  else

  begin

    tblDest.TableName := '';

    cmbxDestIndex.Items.Clear;

  end;

end;

procedure TForm1.cmbxSourceIndexChange(Sender: TObject);

begin

  if cmbxSourceIndex.ItemIndex <> -1 then

  begin

    tblSource.IndexName := cmbxSourceIndex.Items[cmbxSourceIndex.ItemIndex];

  end

  else

  begin

     tblSource.IndexName := '';

  end;

end;

procedure TForm1.cmbxDestIndexChange(Sender: TObject);

begin

  if cmbxDestIndex.ItemIndex <> -1 then

  begin

    tblDest.IndexName := cmbxDestIndex.Items[cmbxDestIndex.ItemIndex];

  end

  else

  begin

     tblDest.IndexName := '';

  end;

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  if tblDest.TableName = '' then

    tblDest.TableName := cmbxDestTable.Text;

  if ((tblSource.DatabaseName <> '') and // test for enough input

     (tblSource.TableName <> '') and

     (tblDest.DatabaseName <> '') and

     (tblDest.TableName <> '') and

     (cmbxMode.items[cmbxMode.ItemIndex] <> '')) then

  begin

    BatchMove1.ChangedTableName := edtChangedTable.Text;  // more batchmove setup

    BatchMove1.KeyViolTableName := edtKeyVioTbl.Text;

    BatchMove1.ProblemTableName := edtProbTbl.Text;

    BatchMove1.RecordCount := StrToInt(edtRecCount.Text);

  end

  else

  begin

    MessageDlg('Incomplete input.',mtError,[mbOK],0);

    exit;

  end;

  BatchMove1.Execute;  // run the batchmove

  MessageDlg('BatchMove complete. Number of records applied: '+IntToStr(BatchMove1.MovedCount),mtInformation,[mbOK],0);

end;

procedure TForm1.chkbxAbortKeyClick(Sender: TObject);

begin

  BatchMove1.AbortOnKeyViol := chkbxAbortKey.Checked;

end;

procedure TForm1.chkbxAbortProblemClick(Sender: TObject);

begin

  BatchMove1.AbortOnProblem := chkbxAbortProblem.Checked;

end;

procedure TForm1.chkbxTransClick(Sender: TObject);

begin

  BatchMove1.Transliterate := chkbxTrans.Checked;

end;

function TForm1.IsStringsEqual(const s1,s2 : string): boolean;

begin

   Result := UpperCase(s1) = UpperCase(s2);

end;

// set the batch mode

procedure TForm1.cmbxModeChange(Sender: TObject);

begin

  if cmbxMode.ItemIndex <> -1 then

  begin

    if IsStringsEqual(cmbxMode.Items[cmbxMode.ItemIndex],'Append') then

      BatchMove1.Mode := batAppend

    elseif IsStringsEqual(cmbxMode.Items[cmbxMode.ItemIndex],'Copy') then

      BatchMove1.Mode := batCopy

    elseif IsStringsEqual(cmbxMode.Items[cmbxMode.ItemIndex],'Append Update') then

      BatchMove1.Mode := batAppendUpdate

    elseif IsStringsEqual(cmbxMode.Items[cmbxMode.ItemIndex],'Delete') then

      BatchMove1.Mode := batDelete

    elseif IsStringsEqual(cmbxMode.Items[cmbxMode.ItemIndex],'Update') then

      BatchMove1.Mode := batUpdate

    else

      MessageDlg('Batch mode not found',mtError,[mbOK],0);

  end;

end;

// only allow numbers to be typed in

procedure TForm1.edtRecCountKeyPress(Sender: TObject; var Key: Char);

begin

  if ((key in ['0'..'9'] = false) and (word(key) <> VK_BACK)) then

    key := #0;

end;

procedure TForm1.FormShow(Sender: TObject);

begin

    cmbxSourceAlias.SetFocus;

end;

end.


 VCL Reference

TBatchMove example (batmove.dfm)

batmov.pas

object Form1: TForm1

  Left = 169

  Top = 154

  Width = 766

  Height = 584

  Caption = 'TBatchMove Example'

  Color = clBtnFace

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  OldCreateOrder = False

  Position = poDesktopCenter

  OnCreate = FormCreate

  OnShow = FormShow

  PixelsPerInch = 96

  TextHeight = 13

  object Bevel1: TBevel

    Left = 312

    Top = 8

    Width = 265

    Height = 169

    Shape = bsFrame

    Style = bsRaised

  end

  object Label6: TLabel

    Left = 344

    Top = 48

    Width = 25

    Height = 13

    Caption = 'Alias:'

  end

  object Label7: TLabel

    Left = 324

    Top = 88

    Width = 61

    Height = 13

    Caption = 'Table Name:'

  end

  object Label8: TLabel

    Left = 348

    Top = 128

    Width = 29

    Height = 13

    Caption = 'Index:'

  end

  object Bevel2: TBevel

    Left = 16

    Top = 8

    Width = 265

    Height = 169

    Shape = bsFrame

    Style = bsRaised

  end

  object Label5: TLabel

    Left = 48

    Top = 128

    Width = 29

    Height = 13

    Caption = 'Index:'

  end

  object Label4: TLabel

    Left = 24

    Top = 88

    Width = 61

    Height = 13

    Caption = 'Table Name:'

  end

  object Label3: TLabel

    Left = 48

    Top = 48

    Width = 25

    Height = 13

    Caption = 'Alias:'

  end

  object Bevel3: TBevel

    Left = 16

    Top = 192

    Width = 561

    Height = 201

    Shape = bsFrame

    Style = bsRaised

  end

  object Label1: TLabel

    Left = 104

    Top = 16

    Width = 77

    Height = 13

    Caption = 'Source Table'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -12

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label2: TLabel

    Left = 400

    Top = 16

    Width = 101

    Height = 13

    Caption = 'Destination Table'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -12

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label10: TLabel

    Left = 224

    Top = 200

    Width = 131

    Height = 13

    Caption = 'Options/Error Handling'

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -12

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object Label9: TLabel

    Left = 28

    Top = 336

    Width = 61

    Height = 13

    Caption = 'Batch Mode:'

  end

  object Label12: TLabel

    Left = 288

    Top = 232

    Width = 110

    Height = 13

    Caption = 'Changed Table Name: '

  end

  object Label13: TLabel

    Left = 272

    Top = 272

    Width = 128

    Height = 13

    Caption = 'Key Violation Table Name: '

  end

  object Label14: TLabel

    Left = 296

    Top = 312

    Width = 105

    Height = 13

    Caption = 'Problem Table Name: '

  end

  object Label11: TLabel

    Left = 256

    Top = 352

    Width = 145

    Height = 13

    Caption = 'Record Count (Leave 0 for all):'

  end

  object cmbxDestAlias: TComboBox

    Left = 400

    Top = 48

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 0

    OnChange = cmbxDestAliasChange

  end

  object cmbxDestTable: TComboBox

    Left = 400

    Top = 88

    Width = 145

    Height = 21

    ItemHeight = 13

    Sorted = True

    TabOrder = 1

    OnChange = cmbxDestTableChange

  end

  object cmbxDestIndex: TComboBox

    Left = 400

    Top = 128

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 2

    OnChange = cmbxDestIndexChange

  end

  object cmbxSourceAlias: TComboBox

    Left = 96

    Top = 48

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 3

    OnChange = cmbxSourceAliasChange

  end

  object cmbxSourceTable: TComboBox

    Left = 96

    Top = 88

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 4

    OnChange = cmbxSourceTableChange

  end

  object cmbxSourceIndex: TComboBox

    Left = 96

    Top = 128

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 5

    OnChange = cmbxSourceIndexChange

  end

  object cmbxMode: TComboBox

    Left = 96

    Top = 336

    Width = 145

    Height = 21

    Style = csDropDownList

    ItemHeight = 13

    Sorted = True

    TabOrder = 6

    OnChange = cmbxModeChange

    Items.Strings = (

      'Append'

      'Append Update'

      'Copy'

      'Delete'

      'Update')

  end

  object Button1: TButton

    Left = 230

    Top = 404

    Width = 131

    Height = 25

    Caption = 'Execute BatchMove'

    TabOrder = 7

    OnClick = Button1Click

  end

  object chkbxAbortKey: TCheckBox

    Left = 32

    Top = 232

    Width = 193

    Height = 17

    Caption = 'Abort on key violation'

    Checked = True

    State = cbChecked

    TabOrder = 8

    OnClick = chkbxAbortKeyClick

  end

  object chkbxAbortProblem: TCheckBox

    Left = 32

    Top = 264

    Width = 193

    Height = 17

    Caption = 'Abort on problem (data is truncated)'

    Checked = True

    State = cbChecked

    TabOrder = 9

    OnClick = chkbxAbortProblemClick

  end

  object chkbxTrans: TCheckBox

    Left = 32

    Top = 296

    Width = 193

    Height = 17

    Caption = 'Transliterate Characters'

    Checked = True

    State = cbChecked

    TabOrder = 10

    OnClick = chkbxTransClick

  end

  object edtChangedTable: TEdit

    Left = 416

    Top = 232

    Width = 121

    Height = 21

    TabOrder = 11

  end

  object edtKeyVioTbl: TEdit

    Left = 416

    Top = 272

    Width = 121

    Height = 21

    TabOrder = 12

  end

  object edtProbTbl: TEdit

    Left = 416

    Top = 312

    Width = 121

    Height = 21

    TabOrder = 13

  end

  object edtRecCount: TEdit

    Left = 416

    Top = 352

    Width = 121

    Height = 21

    TabOrder = 14

    Text = '0'

    OnKeyPress = edtRecCountKeyPress

  end

  object BatchMove1: TBatchMove

    Destination = tblDest

    Source = tblSource

    Transliterate = False

    Left = 280

    Top = 88

  end

  object tblSource: TTable

    Left = 280

    Top = 24

  end

  object tblDest: TTable

    Left = 280

    Top = 144

  end

end


TComboBox example
 VCL Reference

TComboBox example (combform.pas)

inptform.pas	combform.dfm	inptform.dfm

Objects

The example demonstrates using the TComboBox object.

Running

To run this example, load the project file from the Help\Examples\ComboBox directory.

Description

This example demonstrates the properties and methods of a combo box by allowing the user to manipulate them by clicking buttons.

unit combform;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, ComCtrls, Menus, ExtCtrls;

type

  TComboForm = class(TForm)

    CbDrop: TComboBox;

    CbDropList: TComboBox;

    CbSimple: TComboBox;

    Label1: TLabel;

    Label2: TLabel;

    Label3: TLabel;

    Label4: TLabel;

    MainMenu1: TMainMenu;

    ComboStyle: TMenuItem;

    CmSimple: TMenuItem;

    CmDrop: TMenuItem;

    CmDropList: TMenuItem;

    Add1: TMenuItem;

    CmAddString: TMenuItem;

    CmAddStringAt: TMenuItem;

    Search1: TMenuItem;

    CmFindString: TMenuItem;

    CmFindIndex: TMenuItem;

    CmDelete: TMenuItem;

    CmList: TMenuItem;

    CmDelString: TMenuItem;

    CmDelIndex: TMenuItem;

    CmShowList: TMenuItem;

    CmClear: TMenuItem;

    N1: TMenuItem;

    Label5: TLabel;

    EdCursel: TEdit;

    EdCuridx: TEdit;

    EdCurlen: TEdit;

    EdEdit: TEdit;

    EdEditlen: TEdit;

    CmSortList: TMenuItem;

    Bevel1: TBevel;

    procedure ComboStyleClick(Sender: TObject);

    procedure CmSimpleClick(Sender: TObject);

    procedure CmDropClick(Sender: TObject);

    procedure CmDropListClick(Sender: TObject);

    procedure FormCreate(Sender: TObject);

    procedure ComboChange(Sender: TObject);

    procedure CmClearClick(Sender: TObject);

    procedure CmDelStringClick(Sender: TObject);

    procedure CmDelIndexClick(Sender: TObject);

    procedure CmFindStringClick(Sender: TObject);

    procedure CmFindIndexClick(Sender: TObject);

    procedure CmAddStringClick(Sender: TObject);

    procedure CmAddStringAtClick(Sender: TObject);

    procedure Button1Click(Sender: TObject);

    procedure CmSortListClick(Sender: TObject);

    procedure CmListClick(Sender: TObject);

    procedure CmShowListClick(Sender: TObject);

  private

    { Private declarations }

    FCbActive: TComboBox;

    procedure SetCbActive(cb: TComboBox);

    procedure NewSelection;

    procedure DeleteAt(idx: Integer);

    procedure AddAt(idx: Integer; s: string);

    procedure SelectAt(idx: Integer);

    function FindString(s: string): Integer;

    property CbActive: TComboBox read FCbActive write SetCbActive;

  public

    { Public declarations }

  end;

var

  ComboForm: TComboForm;

implementation

uses inptform;

{$R *.DFM}

// -------------- //

// event handlers //

// -------------- //

procedure TComboForm.FormCreate(Sender: TObject);

begin

  FCbActive := CbSimple;

  CbSimple.Visible := True;

  CbDrop.Visible := False;

  CbDropList.Visible := False;

  NewSelection;

end;

// Control notifications

// ---------------------

//

// close form

//

procedure TComboForm.Button1Click(Sender: TObject);

begin

  Close;

end;

procedure TComboForm.ComboChange(Sender: TObject);

begin

  NewSelection;

end;

// ComboBox menu

// -------------

procedure TComboForm.ComboStyleClick(Sender: TObject);

begin

  CmSimple.Checked := CbActive = CbSimple;

  CmDrop.Checked := CbActive = CbDrop;

  CmDropList.Checked := CbActive = CbDropList;

end;

procedure TComboForm.CmSimpleClick(Sender: TObject);

begin

  CbActive := CbSimple;

end;

procedure TComboForm.CmDropClick(Sender: TObject);

begin

  CbActive := CbDrop;

end;

procedure TComboForm.CmDropListClick(Sender: TObject);

begin

  CbActive := CbDropList;

end;

// Add menu

// --------

procedure TComboForm.CmAddStringClick(Sender: TObject);

var

  s: string;

begin

  if InputForm.GetString('String to add:', s) then

    AddAt(0, s);

end;

procedure TComboForm.CmAddStringAtClick(Sender: TObject);

var

  i: Integer;

  s: string;

begin

  if InputForm.GetString('String to add:', s)

      and InputForm.GetInteger('Index to insert at:', i) then

    AddAt(i, s);

end;

// Find menu

// ---------

procedure TComboForm.CmFindStringClick(Sender: TObject);

var

  s: string;

begin

  if InputForm.GetString('String to select:', s) then

    SelectAt(FindString(s));

end;

procedure TComboForm.CmFindIndexClick(Sender: TObject);

var

  i: Integer;

begin

  if InputForm.GetInteger('Index to select:', i) then

    SelectAt(i);

end;

// Delete menu

// -----------

procedure TComboForm.CmDelStringClick(Sender: TObject);

var

  s: string;

begin

  if InputForm.GetString('String to delete:', s) then

    DeleteAt(FindString(s));

end;

procedure TComboForm.CmDelIndexClick(Sender: TObject);

var

  i: Integer;

begin

  if InputForm.GetInteger('Index to delete:', i) then

    DeleteAt(i);

end;

procedure TComboForm.CmClearClick(Sender: TObject);

begin

  CbActive.Clear;

end;

// List menu

// ---------

procedure TComboForm.CmShowListClick(Sender: TObject);

begin

  CbActive.DroppedDown := not CbActive.DroppedDown;

end;

procedure TComboForm.CmSortListClick(Sender: TObject);

begin

  CbActive.Sorted := not CbActive.Sorted;

end;

procedure TComboForm.CmListClick(Sender: TObject);

begin

  CmShowList.Enabled := CbActive <> CbSimple;

  CmSortList.Checked := CbActive.Sorted;

end;

// --------------- //

// private methods //

// --------------- //

procedure TComboForm.NewSelection;

begin

  if CbActive.ItemIndex = -1 then

    EdCursel.Text := ''

  else

    EdCursel.Text := CbActive.Items[CbActive.ItemIndex];

  EdCuridx.Text := IntToStr(CbActive.ItemIndex);

  EdCurlen.Text := IntToStr(length(EdCursel.Text));

  EdEdit.Text := CbActive.Text;

  EdEditlen.Text := IntToStr(length(EdEdit.Text));

end;

procedure TComboForm.SetCbActive(cb: TComboBox);

begin

  if FCbActive <> cb then

  begin

    FCbActive.Visible := False;

    FCbActive := cb;

    FCbActive.Visible := True;

    NewSelection;

  end;

end;

//

// Delete an item from the active combobox given its index.

// Ignores bogus indices.

//

procedure TComboForm.DeleteAt(idx: Integer);

begin

  if idx >= 0 then

    CbActive.Items.Delete(idx);

end;

//

// Add a string into the active combobox at the given index.

// If the index is too big, append the item, if too small,

// insert it at the top.

//

procedure TComboForm.AddAt(idx: Integer; s: string);

begin

  if idx > CbActive.Items.Count then

    CbActive.Items.Append(s)

  else

  begin

    if idx < 0 then

      idx := 0;

    CbActive.Items.Insert(idx, s);

  end;

end;

//

// Select an item in the active combobox given it's index.

// A bogus index will result in an exception.

procedure TComboForm.SelectAt(idx: Integer);

begin

  CbActive.ItemIndex := idx;

  NewSelection;

end;

//

// Find the index of an item in the combobox given a string.

// If the string does not exist, return -1.

//

function TComboForm.FindString(s: string): Integer;

var

  i: Integer;

begin

  i := 0;

  while (i < CbActive.Items.Count) and (CbActive.Items[i] <> s) do

    inc(i);

  Result := i;

end;

end.


 VCL Reference

TComboBox example (combform.dfm)

combform.pas	inptform.pas	inptform.dfm

object ComboForm: TComboForm

  Left = 200

  Top = 108

  BorderIcons = [biSystemMenu, biMinimize]

  BorderStyle = bsSingle

  Caption = 'ComboBox demo'

  ClientHeight = 281

  ClientWidth = 611

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Menu = MainMenu1

  OnCreate = FormCreate

  PixelsPerInch = 96

  TextHeight = 13

  object Label1: TLabel

    Left = 288

    Top = 48

    Width = 82

    Height = 13

    Caption = 'Current selection:'

  end

  object Label2: TLabel

    Left = 305

    Top = 82

    Width = 65

    Height = 13

    Caption = 'Current index:'

  end

  object Label3: TLabel

    Left = 241

    Top = 116

    Width = 129

    Height = 13

    Caption = 'Length of current selection:'

  end

  object Label4: TLabel

    Left = 321

    Top = 150

    Width = 49

    Height = 13

    Caption = 'Edit string:'

  end

  object Label5: TLabel

    Left = 271

    Top = 176

    Width = 99

    Height = 13

    Caption = 'Length of Edit String:'

  end

  object Bevel1: TBevel

    Left = 0

    Top = 0

    Width = 611

    Height = 2

    Align = alTop

  end

  object CbDrop: TComboBox

    Left = 40

    Top = 48

    Width = 178

    Height = 20

    ItemHeight = 13

    Items.Strings = (

      'in'

      'this'

      'box'

      'we'

      'have'

      'a'

      'list'

      'of'

      'strings')

    TabOrder = 0

    Visible = False

    OnChange = ComboChange

  end

  object CbDropList: TComboBox

    Left = 40

    Top = 48

    Width = 178

    Height = 20

    Style = csDropDownList

    ItemHeight = 13

    Items.Strings = (

      'Closer'

      'Still'

      'Substance'

      'Little Earthquakes'

      'Under the Pink'

      'Boys for Pele')

    TabOrder = 1

    Visible = False

    OnChange = ComboChange

  end

  object CbSimple: TComboBox

    Left = 40

    Top = 48

    Width = 178

    Height = 129

    Style = csSimple

    ItemHeight = 13

    Items.Strings = (

      'Return of the Native'

      'Jude the Obscure'

      'One Hundred Years of Solitude'

      'The Autumn of the Patriarch'

      'Idoru'

      'Neuromancer')

    TabOrder = 2

    OnChange = ComboChange

  end

  object EdCursel: TEdit

    Left = 384

    Top = 48

    Width = 178

    Height = 20

    ReadOnly = True

    TabOrder = 3

  end

  object EdCuridx: TEdit

    Left = 384

    Top = 80

    Width = 178

    Height = 20

    ReadOnly = True

    TabOrder = 4

  end

  object EdCurlen: TEdit

    Left = 384

    Top = 112

    Width = 178

    Height = 20

    ReadOnly = True

    TabOrder = 5

  end

  object EdEdit: TEdit

    Left = 384

    Top = 144

    Width = 178

    Height = 20

    ReadOnly = True

    TabOrder = 6

  end

  object EdEditlen: TEdit

    Left = 384

    Top = 176

    Width = 178

    Height = 20

    ReadOnly = True

    TabOrder = 7

  end

  object MainMenu1: TMainMenu

    Left = 8

    Top = 8

    object ComboStyle: TMenuItem

      Caption = '&ComboBox'

      OnClick = ComboStyleClick

      object CmSimple: TMenuItem

        Caption = '&Simple'

        OnClick = CmSimpleClick

      end

      object CmDrop: TMenuItem

        Caption = '&Dropdown'

        OnClick = CmDropClick

      end

      object CmDropList: TMenuItem

        Caption = 'Dropdown &list'

        OnClick = CmDropListClick

      end

    end

    object Add1: TMenuItem

      Caption = '&Add'

      object CmAddString: TMenuItem

        Caption = '&String...'

        OnClick = CmAddStringClick

      end

      object CmAddStringAt: TMenuItem

        Caption = 'String &at...'

        OnClick = CmAddStringAtClick

      end

    end

    object Search1: TMenuItem

      Caption = '&Find'

      object CmFindString: TMenuItem

        Caption = '&String...'

        OnClick = CmFindStringClick

      end

      object CmFindIndex: TMenuItem

        Caption = '&Index...'

        OnClick = CmFindIndexClick

      end

    end

    object CmDelete: TMenuItem

      Caption = '&Delete'

      object CmDelString: TMenuItem

        Caption = '&String...'

        OnClick = CmDelStringClick

      end

      object CmDelIndex: TMenuItem

        Caption = '&Index...'

        OnClick = CmDelIndexClick

      end

      object N1: TMenuItem

        Caption = '-'

      end

      object CmClear: TMenuItem

        Caption = '&All'

        OnClick = CmClearClick

      end

    end

    object CmList: TMenuItem

      Caption = '&List'

      OnClick = CmListClick

      object CmShowList: TMenuItem

        Caption = '&Show'

        OnClick = CmShowListClick

      end

      object CmSortList: TMenuItem

        Caption = 'So&rt'

        OnClick = CmSortListClick

      end

    end

  end

end


 VCL Reference

TComboBox example (inptform.pas)

combform.pas	combform.dfm	inptform.dfm

unit inptform;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls;

type

  TInputForm = class(TForm)

    Button1: TButton;

    Button2: TButton;

    PromptLabel: TLabel;

    InputEdit: TEdit;

  private

    { Private declarations }

    function Execute: Boolean;

  public

    { Public declarations }

    function GetString(prompt: string; var s: string): Boolean;

    function GetInteger(prompt: string; var i: Integer): Boolean;

  end;

var

  InputForm: TInputForm;

implementation

{$R *.DFM}

function TInputForm.Execute: Boolean;

begin

  InputEdit.Text := '';

  Result := ShowModal = mrOk;

end;

function TInputForm.GetString(prompt: string; var s: string): Boolean;

begin

  PromptLabel.Caption := prompt;

  Result := InputForm.Execute;

  if Result then

    s := InputEdit.Text;

end;

function TInputForm.GetInteger(prompt: string; var i: Integer): Boolean;

begin

  PromptLabel.Caption := prompt;

  Result := InputForm.Execute;

  if Result then

    i := StrToInt(InputEdit.Text);

end;

end.


 VCL Reference

TComboBox example (inptform.dfm)

combform.pas	inptform.pas	combform.dfm

object InputForm: TInputForm

  Left = 200

  Top = 108

  Width = 274

  Height = 140

  ActiveControl = InputEdit

  Caption = 'InputForm'

  Font.Charset = DEFAULT_CHARSET

  Font.Color = clWindowText

  Font.Height = -11

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Position = poScreenCenter

  PixelsPerInch = 96

  TextHeight = 13

  object PromptLabel: TLabel

    Left = 40

    Top = 8

    Width = 5

    Height = 13

    Font.Charset = DEFAULT_CHARSET

    Font.Color = clWindowText

    Font.Height = -11

    Font.Name = 'MS Sans Serif'

    Font.Style = [fsBold]

    ParentFont = False

  end

  object InputEdit: TEdit

    Left = 36

    Top = 24

    Width = 193

    Height = 20

    TabOrder = 0

  end

  object Button1: TButton

    Left = 43

    Top = 72

    Width = 75

    Height = 25

    Caption = '&OK'

    Default = True

    ModalResult = 1

    TabOrder = 1

  end

  object Button2: TButton

    Left = 147

    Top = 72

    Width = 75

    Height = 25

    Caption = '&Cancel'

    ModalResult = 2

    TabOrder = 2

  end

end


TJPegImage example
 VCL Reference

TJPegImage example (jpegdemo.pas)

jpegdemo.dfm

Objects

The example demonstrates using the TJPegImage object.

Running

To run this example, load the project file from the Help\Examples\JPEG directory.

Description

This example demonstrates the effect of various properties of the TJPegImage object.  In the example form, controls along the left allow you to select a .JPG file to display.  Across the top, various controls allow you to alter the PixelFormat, Scale, GrayScale, Performance, ProgressiveDisplay, and ProgressiveEncoding properties. The JPEG examples directory contains example .JPG files that were saved with and without progressive encoding.

unit jpegdemo;

interface

uses

  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,

  StdCtrls, jpeg, ExtCtrls, FileCtrl, ComCtrls, Menus, printers;

type

  TForm1 = class(TForm)

    Panel1: TPanel;

    DirectoryListBox1: TDirectoryListBox;

    FileListBox1: TFileListBox;

    Panel3: TPanel;

    DriveComboBox1: TDriveComboBox;

    Scale: TComboBox;

    PixelFormat: TComboBox;

    ColorSpace: TComboBox;

    Performance: TComboBox;

    ProgressiveDisplay: TCheckBox;

    IncrementalDisplay: TCheckBox;

    MainMenu1: TMainMenu;

    File1: TMenuItem;

    Open1: TMenuItem;

    N1: TMenuItem;

    Print1: TMenuItem;

    PrinterSetup1: TMenuItem;

    N2: TMenuItem;

    Exit1: TMenuItem;

    OpenDialog1: TOpenDialog;

    PrinterSetupDialog1: TPrinterSetupDialog;

    PrintDialog1: TPrintDialog;

    ScrollBox1: TScrollBox;

    Image1: TImage;

    procedure FileListBox1DblClick(Sender: TObject);

    procedure SetJPEGOptions(Sender: TObject);

    procedure FormCreate(Sender: TObject);

    procedure ProgressUpdate(Sender: TObject; Stage: TProgressStage;

      PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string);

    procedure Open1Click(Sender: TObject);

    procedure Print1Click(Sender: TObject);

    procedure PrinterSetup1Click(Sender: TObject);

    procedure Exit1Click(Sender: TObject);

  private

    { Private declarations }

  public

    { Public declarations }

    procedure OpenFile(const Filename: string);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.OpenFile(const Filename: string);

begin

  try

    Image1.Picture.LoadFromFile(Filename);

  except

    on EInvalidGraphic do

      Image1.Picture.Graphic := nil;

  end;

  SetJPEGOptions(self);

end;

procedure TForm1.FileListBox1DblClick(Sender: TObject);

begin

  OpenFile(FileListbox1.Filename);

end;

procedure TForm1.SetJPEGOptions(Sender: TObject);

var

  Temp: Boolean;

begin

  Temp := Image1.Picture.Graphic is TJPEGImage;

  if Temp then

    with TJPEGImage(Image1.Picture.Graphic) do

    begin

      PixelFormat := TJPEGPixelFormat(Self.PixelFormat.ItemIndex);

      Scale := TJPEGScale(Self.Scale.ItemIndex);

      Grayscale := Boolean(Colorspace.ItemIndex);

      Performance := TJPEGPerformance(Self.Performance.ItemIndex);

      ProgressiveDisplay := Self.ProgressiveDisplay.Checked;

    end;

  Scale.Enabled := Temp;

  PixelFormat.Enabled := Temp;

  Colorspace.Enabled := Temp;

  Performance.Enabled := Temp;

  ProgressiveDisplay.Enabled := Temp

    and TJPEGImage(Image1.Picture.Graphic).ProgressiveEncoding;

  Image1.IncrementalDisplay := IncrementalDisplay.Checked;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Scale.ItemIndex := 0;

  PixelFormat.ItemIndex := 0;

  Colorspace.ItemIndex := 0;

  Performance.ItemIndex := 0;

  OpenDialog1.Filter := GraphicFilter(TGraphic);

  FileListbox1.Mask := GraphicFileMask(TGraphic);

  Image1.OnProgress := ProgressUpdate;

end;

procedure TForm1.ProgressUpdate(Sender: TObject; Stage: TProgressStage;

  PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string);

begin

  if Stage = psRunning then

    Caption := Format('%d%%',[PercentDone])

  else

    Caption := 'Form1';

end;

procedure TForm1.Open1Click(Sender: TObject);

begin

  if OpenDialog1.Execute then

    OpenFile(OpenDialog1.FileName);

end;

procedure TForm1.Print1Click(Sender: TObject);

var

  AspectRatio: Single;

  OutputWidth, OutputHeight: Single;

begin

  if not PrintDialog1.Execute then Exit;

  Printer.BeginDoc;

  try

    OutputWidth := Image1.Picture.Width;

    OutputHeight := Image1.Picture.Height;

    AspectRatio := OutputWidth / OutputHeight;

    if (OutputWidth < Printer.PageWidth) and

      (OutputHeight < Printer.PageHeight) then

    begin

      if OutputWidth < OutputHeight then

      begin

        OutputHeight := Printer.PageHeight;

        OutputWidth := OutputHeight * AspectRatio;

      end

      else

      begin

        OutputWidth := Printer.PageWidth;

        OutputHeight := OutputWidth / AspectRatio;

      end

    end;

    if OutputWidth > Printer.PageWidth then

    begin

      OutputWidth := Printer.PageWidth;

      OutputHeight := OutputWidth / AspectRatio;

    end;

    if OutputHeight > Printer.PageHeight then

    begin

      OutputHeight := Printer.PageHeight;

      OutputWidth := OutputHeight * AspectRatio;

    end;

    Printer.Canvas.StretchDraw(Rect(0,0,

      Trunc(OutputWidth), Trunc(OutputHeight)),

      Image1.Picture.Graphic);

  finally

    Printer.EndDoc;

  end;

end;

procedure TForm1.PrinterSetup1Click(Sender: TObject);

begin

  PrinterSetupDialog1.Execute;

end;

procedure TForm1.Exit1Click(Sender: TObject);

begin

  Close;

end;

end.


 VCL Reference

TJPEGImage Example(jpegdemo.dfm)

jpegdemo.pas

object Form1: TForm1

  Left = 225

  Top = 115

  AutoScroll = False

  Caption = 'Form1'

  ClientHeight = 376

  ClientWidth = 488

  Font.Charset = ANSI_CHARSET

  Font.Color = clWindowText

  Font.Height = -10

  Font.Name = 'MS Sans Serif'

  Font.Style = []

  Menu = MainMenu1

  Position = poDefaultPosOnly

  ShowHint = True

  OnCreate = FormCreate

  PixelsPerInch = 96

  TextHeight = 13

  object Panel1: TPanel

    Left = 0

    Top = 27

    Width = 124

    Height = 349

    Align = alLeft

    TabOrder = 0

    object DirectoryListBox1: TDirectoryListBox

      Left = 1

      Top = 1

      Width = 122

      Height = 79

      Align = alTop

      Ctl3D = True

      FileList = FileListBox1

      ItemHeight = 16

      ParentCtl3D = False

      TabOrder = 0

    end

    object FileListBox1: TFileListBox

      Left = 1

      Top = 80

      Width = 122

      Height = 268

      Align = alClient

      ItemHeight = 13

      TabOrder = 1

      OnClick = FileListBox1DblClick

    end

  end

  object Panel3: TPanel

    Left = 0

    Top = 0

    Width = 488

    Height = 27

    Align = alTop

    TabOrder = 1

    object DriveComboBox1: TDriveComboBox

      Left = 7

      Top = 3

      Width = 117

      Height = 19

      DirList = DirectoryListBox1

      TabOrder = 0

    end

    object Scale: TComboBox

      Left = 127

      Top = 3

      Width = 36

      Height = 21

      Hint = 'Scale'

      Style = csDropDownList

      Enabled = False

      ItemHeight = 13

      Items.Strings = (

        '1:1'

        '1:2'

        '1:4'

        '1:8')

      TabOrder = 1

      OnClick = SetJPEGOptions

    end

    object PixelFormat: TComboBox

      Left = 166

      Top = 3

      Width = 49

      Height = 21

      Hint = 'Pixel Format'

      Style = csDropDownList

      Enabled = False

      ItemHeight = 13

      Items.Strings = (

        '24 bit'

        '8 bit')

      TabOrder = 2

      OnClick = SetJPEGOptions

    end

    object ColorSpace: TComboBox

      Left = 218

      Top = 3

      Width = 62

      Height = 21

      Hint = 'Color space'

      Style = csDropDownList

      Enabled = False

      ItemHeight = 13

      Items.Strings = (

        'RGB'

        'Grayscale')

      TabOrder = 3

      OnClick = SetJPEGOptions

    end

    object Performance: TComboBox

      Left = 283

      Top = 3

      Width = 75

      Height = 21

      Hint = 'Performance'

      Style = csDropDownList

      Enabled = False

      ItemHeight = 13

      Items.Strings = (

        'Quality'

        'Speed')

      TabOrder = 4

      OnClick = SetJPEGOptions

    end

    object ProgressiveDisplay: TCheckBox

      Left = 364

      Top = 1

      Width = 124

      Height = 14

      Caption = 'Progressive JPEG'

      Enabled = False

      Font.Charset = ANSI_CHARSET

      Font.Color = clWindowText

      Font.Height = -9

      Font.Name = 'arial'

      Font.Style = []

      ParentFont = False

      TabOrder = 5

      OnClick = SetJPEGOptions

    end

    object IncrementalDisplay: TCheckBox

      Left = 364

      Top = 12

      Width = 137

      Height = 14

      Caption = 'Incremental Display'

      Font.Charset = ANSI_CHARSET

      Font.Color = clWindowText

      Font.Height = -9

      Font.Name = 'Arial'

      Font.Style = []

      ParentFont = False

      TabOrder = 6

    end

  end

  object ScrollBox1: TScrollBox

    Left = 124

    Top = 27

    Width = 364

    Height = 349

    Align = alClient

    TabOrder = 2

    object Image1: TImage

      Left = 0

      Top = 0

      Width = 85

      Height = 85

      AutoSize = True

    end

  end

  object MainMenu1: TMainMenu

    Left = 96

    Top = 217

    object File1: TMenuItem

      Caption = '&File'

      object Open1: TMenuItem

        Caption = '&Open...'

        ShortCut = 114

        OnClick = Open1Click

      end

      object N1: TMenuItem

        Caption = '-'

      end

      object Print1: TMenuItem

        Caption = '&Print'

        OnClick = Print1Click

      end

      object PrinterSetup1: TMenuItem

        Caption = 'Printer &Setup...'

        OnClick = PrinterSetup1Click

      end

      object N2: TMenuItem

        Caption = '-'

      end

      object Exit1: TMenuItem

        Caption = 'E&xit'

        ShortCut = 32856

        OnClick = Exit1Click

      end

    end

  end

  object OpenDialog1: TOpenDialog

    Options = [ofPathMustExist, ofFileMustExist]

    Left = 96

    Top = 257

  end

  object PrinterSetupDialog1: TPrinterSetupDialog

    Left = 96

    Top = 313

  end

  object PrintDialog1: TPrintDialog

    Left = 96

    Top = 377

  end

end


TFileOpenWith
 VCL Reference

TFileOpenWith

Hierarchy	Properties	Methods	Events	Using TFileOpenWith	See also

TFileOpenWith is the standard action for displaying the dialog that lets users choose what application to user for opening a file.

Unit

StdActns

Description

Add TFileOpenWith to an action list to add the Open With dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the Open With dialog and then use the chosen application to open the file specified by the FileName property. If the FileName property was not previously set, TFileOpenWith first displays an Open dialog in which the user can select a file name before displaying the Open With dialog for the user to specify what application to use when opening that file.

Note:	TFileOpenWith always displays the Open With dialog, even if the specified file already has an extension with a registered association. To let users open a file by letting Windows choose the application based on the extension (or bring up the Open With dialog automatically when there is no association for the extension), use the TFileRun action instead.

You do not need to do anything to launch the selected application. TFileOpenWith automatically opens the file using the application that the user selects.

Note:	The Dialog property of TFileOpenWith represents the Open dialog in which a user selects the file to open, not the Open With dialog in which they choose the application to user for opening that file. Similarly, the OnAccept and OnCancel events do not occur after the action displays the Open With dialog – rather, they occur after the Open dialog that appears when the FileName property is not preset.


 VCL Reference

TFileOpenWith properties

TFileOpenWith	Alphabetically	Legend

In TFileOpenWith

FileName

Derived from TFileOpen

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileOpenWith properties

TFileOpenWith	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

FileName

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFileOpenWith.FileName
 VCL Reference

TFileOpenWith.FileName

TFileOpenWith 	See also

Specifies the file to be opened when the action executes.

property FileName: TFileName;

Description

Set FileName to specify the file to open with the application that the user selects in the Open With dialog. If the FileName property is not set, then when the action executes, it displays an Open dialog (specified by the Dialog property) in which the user can select a file before displaying the Open With dialog.


 VCL Reference

TFileOpenWith events

TFileOpenWith	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileOpenWith events

TFileOpenWith	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileOpenWith methods

TFileOpenWith	Alphabetically	Legend

In TFileOpenWith

ExecuteTarget

Derived from TFileOpen

Create

Derived from TCommonDialogAction

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileOpenWith methods

TFileOpenWith	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TFileOpenWith.ExecuteTarget
 VCL Reference

TFileOpenWith.ExecuteTarget

TFileOpenWith 	See also

Displays the Open With dialog and then opens a file with the application the user selects.

procedure ExecuteTarget(Target: TObject); override;

Description

This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and does the following:

1. If the FileName property is not set, it displays the Open dialog (specified by the Dialog property) to let the user select a file to open.

2. If it displays the Open dialog, it generates an OnAccept or OnCancel event, depending on whether the user exited the Open dialog by clicking OK or Cancel.

3. It displays the Open With dialog for the user to choose an application with which to view the file specified by FileName or selected in the Open dialog.

4. It launches the selected application, displaying the specified File.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TFileAction

TFileOpen

TFileOpenWith


TFiler
 VCL Reference

TFiler

Hierarchy	Properties	Methods	See also

TFiler is the abstract base class for reader and writer objects, which are used for loading and saving components and their properties.

Unit

Classes

Description

TFiler works with stream and component objects. It handles the internal mechanics of the streaming system that reads and writes components and their associated data.  This streaming system is the mechanism by which Delphi saves components to or reads components from disk (in .dfm files) and by which it saves and restores temporary in-memory images of components.

TFiler has two descendants, TReader and TWriter, that implement the methods introduced by TFiler. The filer type is used as a parameter to component methods that can require either a reader or writer object, depending on whether the data is read from or written to a stream. Every filer has an associated stream that is passed as a parameter to its constructor. Filer objects are usually created by the stream that becomes associated with the filer.

TFiler properties provide support for managing the streaming of owned components. Filer objects read and write the properties of components to and from a stream. Filer objects provide buffering of data to speed read and write operations.

TFiler introduces abstract methods that are customized by its descendant reader and writer objects. These include methods that enable components to load and save hidden or complex data as if it was the value of a published property.

Note:	Most of the filer properties and methods have public visibility for convenience within the Delphi streaming system. The majority of them are never called directly by applications.


 VCL Reference

TFiler properties

TFiler	Alphabetically	Legend

In TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 VCL Reference

TFiler properties

TFiler	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Root


TFiler.Ancestor
 VCL Reference

TFiler.Ancestor

TFiler	See also	Example

Determines whether to write the properties of inherited components.

property Ancestor: TPersistent;

Description

Do not use Ancestor directly. It is used internally by the methods of writer objects to write components in inherited forms.

In Visual Form Inheritance, a writer object only needs to write the values of properties that differ from those that are inherited. It tracks each component from which properties can be inherited in Ancestor and compares properties before writing. If Ancestor is nil, there is no corresponding component from which to inherit, and the writer object writes the component out to the stream completely.

Ancestor is only non-nil when writing forms created with Visual Form Inheritance. The streaming system uses WriteDescendent and WriteDescendentRes to write such forms to the stream.

When writing or overriding a DefineProperties method, be aware that Ancestor might be set, and it might be necessary to write or omit properties, as appropriate. Normally, DefineProperty read procedures ignore the value of Ancestor.


TFiler.IgnoreChildren
 VCL Reference

TFiler.IgnoreChildren

TFiler	See also

Enables a writer object to save a component without saving the components it owns.

property IgnoreChildren: Boolean;

Description

Programs rarely use IgnoreChildren directly. Delphi uses IgnoreChildren internally to avoid writing owned components when the Root is changed during the streaming process. A few components change Root while streaming, but this is rare.

If IgnoreChildren is True, the writer writes a component without writing any child components it owns. If IgnoreChildren is False, the writer object writes all owned objects to the stream.


TFiler.LookupRoot
 VCL Reference

TFiler.LookupRoot

TFiler	See also

Specifies the root component for resolving names while loading and saving components.

property LookupRoot: TComponent;

Description

The Filer sets LookupRoot when loading or saving components to resolve name references in nested frames. This allows the Writer to look up component names relative to a local root component, even when a frame is nested in another root component.


TFiler.Root
 VCL Reference

TFiler.Root

TFiler	See also

Indicates which object is the root, or ultimate owner, of the objects read or written by the filer.

property Root: TComponent;

Description

Do not call Root directly. It is used internally to find the root object when streaming owned components. Root represents the ultimate owner of all the components being streamed during the current streaming process.

The ReadRootComponent and WriteRootComponent methods set Root before reading or writing their components and owned components.


 VCL Reference

TFiler methods

TFiler	Alphabetically	Legend

In TFiler

Create

DefineBinaryProperty

DefineProperty

Destroy

FlushBuffer

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFiler methods

TFiler	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineBinaryProperty

DefineProperty

Destroy

Dispatch

FieldAddress

FlushBuffer

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TFiler.Create
 VCL Reference

TFiler.Create

TFiler	See also

Creates a filer object.

constructor Create(Stream: TStream; BufSize: Integer);

Description

Call Create to instantiate a filer descendant at runtime, if necessary. It is seldom necessary to directly create a filer object because the methods and routines that use them automatically create filers.

Create allocates memory for a filer object, and associates it with the stream passed in the Stream parameter, with a buffer of size BufSize.


TFiler.DefineBinaryProperty
 VCL Reference

TFiler.DefineBinaryProperty

TFiler	See also

Introduces an abstract method that allows descendants to read and write unformatted data like a property.

type TStreamProc = procedure(Stream: TStream) of object;

procedure DefineBinaryProperty(const Name: string; ReadData, WriteData: TStreamProc; HasData: Boolean); virtual; abstract;

Description

Each descendant filer object declares a DefineBinaryProperty method that reads or writes binary data as if the data were a property.


TFiler.DefineProperty
 VCL Reference

TFiler.DefineProperty

TFiler	See also	Example

Introduces an abstract method that allows descendants to read or write data like a property.

type

  TReaderProc = procedure(Reader: TReader) of object;

  TWriterProc = procedure(Writer: TWriter) of object;

procedure DefineProperty(const Name: string; ReadData: TReaderProc; WriteData: TWriterProc; HasData: Boolean); virtual; abstract;

Description

Each descendant filer object declares a DefineProperty method that defines the data that the descendant object will read or write as if the data were a property.


TFiler.Destroy
 VCL Reference

TFiler.Destroy

TFiler	See also

Destroys a filer object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the filer reference is not nil before calling Destroy.

The Destroy method for filer objects~TFiler frees memory associated with the buffer. Memory deallocation for the object instance is handled automatically when Destroy is called. TFiler’s Destroy method is called by descendant objects in their respective destructors.


TFiler.FlushBuffer
 VCL Reference

TFiler.FlushBuffer

TFiler

Introduces an abstract method that allows descendants to synchronize the filer’s buffer with its stream.

procedure FlushBuffer; virtual; abstract;

Description

Each descendant filer object defines a FlushBuffer method to provide practical implementations for synchronizing the filer object’s buffer with the associated stream.


Hierarchy

TObject

TFiler


TFileStream
 VCL Reference

TFileStream

Hierarchy	Properties	Methods	See also

TFileStream enables applications to read from and write to a file on disk.

Unit

Classes

Description

Use TFileStream to access the information in disk files. TFileStream will open a named file and provide methods to read from or write to it. If an application already has a handle to the file, opened in the appropriate mode, use THandleStream instead.


 VCL Reference

TFileStream properties

TFileStream	Alphabetically	Legend

Derived from THandleStream

Handle

Derived from TStream

Position

Size


 VCL Reference

TFileStream properties

TFileStream	By object	Legend

Handle

Position

Size


 VCL Reference

TFileStream methods

TFileStream	Alphabetically	Legend

In TFileStream

Create

Destroy

Derived from THandleStream

Read

Seek

Write

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFileStream methods

TFileStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TFileStream.Create
 VCL Reference

TFileStream.Create

TFileStream	See also

Creates an instance of TFileStream.

constructor Create(const FileName: string; Mode: Word); overload;

constructor Create(const FileName: string; Mode: Word; Rights: Cardinal); overload;

Description

Call Create to instantiate a file stream for reading from or writing to the named file. Specify the name of the file and the way the file should be opened as parameters.

The Mode parameter indicates how the file is to be opened. The Mode parameter consists of an open mode and (possibly) a share mode or’ed together. The open mode must be one of the following values:

Value	Meaning

fmCreate	Create a file with the given name. If a file with the given name exists, open the file in write mode.

fmOpenRead	Open the file for reading only.

fmOpenWrite	Open the file for writing only. Writing to the file completely replaces the current contents.

fmOpenReadWrite	Open the file to modify the current contents rather than replace them.

The share mode must be one of the following values:

Value	Meaning

fmShareCompat	Sharing is compatible with the way FCBs are opened.

fmShareExclusive	Other applications can not open the file for any reason.

fmShareDenyWrite	Other applications can open the file for reading but not for writing.

fmShareDenyRead	Other applications can open the file for writing but not for reading.

fmShareDenyNone	No attempt is made to prevent other applications from reading from or writing to the file.

The Rights parameter indicates the permission bits with which to create the file on Linux when Mode is fmCreate. Rights is ignored when used on the Windows platform.

If the file can not be opened, Create raises an exception.


TFileStream.Destroy
 VCL Reference

TFileStream.Destroy

TFileStream	See also

Destroys an instance of TFileStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free, which checks that the TFileStream reference is not nil and only then calls Destroy.

Destroy closes the Handle for the file stream before freeing the object.


Hierarchy

TObject

TStream

THandleStream

TFileStream


TFileSaveAs
 VCL Reference

TFileSaveAs

Hierarchy	Properties	Methods	Events	Using TFileSaveAs	See also

TFileSaveAs is the standard action for displaying a file save as dialog.

Unit

StdActns

Description

Add TFileSaveAs to an action list to add a common file save dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display a file save dialog when invoked. Use the OnAccept event to respond after the user selects a file name in the file save dialog or the OnCancel event to respond when the user cancels from the dialog. In the event handler for these events, you can read the file name from the dialog specified by the Dialog property.


 VCL Reference

TFileSaveAs properties

TFileSaveAs	Alphabetically	Legend

In TFileSaveAs

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileSaveAs properties

TFileSaveAs	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFileSaveAs.Dialog
 VCL Reference

TFileSaveAs.Dialog

TFileSaveAs 	See also

Provides access the save dialog that the action executes.

property Dialog: TSaveDialog;

Description

Use Dialog to configure the save as dialog before the action fires. For example, you can set the save as dialog’s default extension at design time using the Object Inspector. Dialog is also useful for reading the selected file name from an OnAccept event handler.

When using a file save as action, you do not place a TSaveDialog component on the form or data module at design time. Instead, you add the TFileSaveAs to your action list and then use the Dialog property. The save dialog component is created by the TFileSaveAs constructor.


 VCL Reference

TFileSaveAs events

TFileSaveAs	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileSaveAs events

TFileSaveAs	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileSaveAs methods

TFileSaveAs	Alphabetically	Legend

In TFileSaveAs

Create

Derived from TCommonDialogAction

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileSaveAs methods

TFileSaveAs	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TFileSaveAs.Create
 VCL Reference

TFileSaveAs.Create

TFileSaveAs	See also

Creates an instance of TFileSaveAs.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TFileSaveAs constructor because actions are added at design time to an action manager or action list.

The TFileSaveAs constructor creates an instance of its associated dialog and assigns that component as the value of the Dialog property.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TFileSaveAs instance.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TFileAction

TFileSaveAs


TFindDialog
 VCL Reference

 TFindDialog

Hierarchy	Properties	Methods	Events	See also

TFindDialog displays a Find dialog that allows users to search for text in a file.

Unit

Dialogs

Description

The TFindDialog component displays a modeless Windows dialog box that prompts the user for a search string. The dialog does not appear at runtime until it is activated by a call to the Execute method.


 VCL Reference

TFindDialog properties

TFindDialog	Alphabetically	Legend

In TFindDialog

FindText

Left

Options

Position

Top

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFindDialog properties

TFindDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DesignInfo

FindText

Handle

HelpContext

Left

Name

Options

Owner

Position

Tag

Top

VCLComObject


TFindDialog.FindText
 VCL Reference

TFindDialog.FindText

TFindDialog	Example

Contains the search string.

property FindText: String;

Description

FindText contains the text string that the user wants to search for. When the user clicks the Find Next button, the text in the dialog’s edit box is automatically assigned to FindText. To make a default text string appear in the edit box when the dialog opens, assign a value to FindText in the Object Inspector or in program code.


TFindDialog:Left
 VCL Reference

TFindDialog.Left

TFindDialog	See also

Determines the X coordinate (horizontal position) of the Find dialog’s upper left corner.

property Left: Integer;

Description

Left holds the same value as the first integer in Position. This property is maintained for compatibility with older applications.


TFindDialog.Options
 VCL Reference

TFindDialog.Options

TFindDialog	See also 	Example

Determines the appearance and behavior of the Find dialog.

property Options: TFindOptions;

Description

Use Options to

Determine which controls in the dialog are disabled (grayed).

Determine which controls do not appear in the dialog.

Specify settings for the search direction, case-sensitivity, and “whole word” attributes of the search.

By default, all options except frDown are off.


TFindDialog.Position
 VCL Reference

TFindDialog.Position

TFindDialog	See also	Example

Determines the position of the Find dialog on the screen.

property Position: TPoint;

Description

Position gives the pixel coordinates of the dialog’s upper left corner.


TFindDialog:Top
 VCL Reference

TFindDialog.Top

TFindDialog	See also

Determines the Y coordinate (vertical position) of the Find dialog’s upper left corner.

Description

Top holds the same value as the second integer in Position. This property is maintained for compatibility with older applications.


 VCL Reference

TFindDialog events

TFindDialog	Alphabetically	Legend

In TFindDialog

OnFind

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TFindDialog events

TFindDialog	By object	Legend

OnClose

OnFind

OnShow


TFindDialog.OnFind
 VCL Reference

TFindDialog.OnFind

TFindDialog	See also	Example

Occurs when the user clicks the Find Next button.

property OnFind: TNotifyEvent;

Description

Write an OnFind event handler to perform the requested search when the user clicks Find Next in the dialog. Use the Options flags to determine how the search is conducted.


 VCL Reference

TFindDialog methods

TFindDialog	Alphabetically	Legend

In TFindDialog

CloseDialog

Create

Destroy

Execute

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFindDialog methods

TFindDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseDialog

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TFindDialog.CloseDialog
 VCL Reference

TFindDialog.CloseDialog

TFindDialog

Closes the Find dialog box.

procedure CloseDialog;

Description

CloseDialog closes the dialog box and frees its window handle, but leaves most properties of the TFindDialog (including FindText) unchanged.


TFindDialog.Create
 VCL Reference

TFindDialog.Create

TFindDialog	See also

Creates and initializes a TFindDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TFindDialog instance, but the new dialog does not appear on the form at runtime until the Execute method is called.

After calling the inherited constructor, Create performs the following actions:

Sets its Title property to the string for a find dialog.

Sets the Options property to include frDown.


TFindDialog.Destroy
 VCL Reference

TFindDialog.Destroy

TFindDialog	See also

Destroys the TFindDialog and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free checks that the Find dialog reference is not nil before calling Destroy.


TFindDialog:Execute
 VCL Reference

TFindDialog.Execute

TFindDialog	See also	Example

Displays the Find dialog.

function Execute: Boolean; override;

Description

Execute opens the Find dialog, returning true when a window handle is successfully allocated. If the dialog is already open when Execute is called, Execute brings the dialog to the top, activates its parent form, and returns true.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TFindDialog


TFilterComboBox
 VCL Reference

 TFilterComboBox

Hierarchy	Properties	Methods	Events	See also

TFilterComboBox is a specialized combo box that presents the user with a choice of file filters.

Unit

FileCtrl

Description

Add a filter combo box to a form that includes a file selection control to provide a set of predefined file filters. Use TFilterComboBox along with TDriveComboBox, TDirectoryListBox, and TFileListBox to add full file selection capabilities to a form.

To add a standard Win32 file open or save dialog to an application, use TOpenDialog or TSaveDialog instead.


 VCL Reference

TFilterComboBox properties

TFilterComboBox	Alphabetically	Legend

In TFilterComboBox

FileList

Filter

Mask

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

SelText

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFilterComboBox properties

TFilterComboBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

DroppedDown

Enabled

FileList

Filter

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

ItemIndex

Items

Left

LRDockWidth

Mask

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TFilterComboBox.FileList
 VCL Reference

TFilterComboBox.FileList

TFilterComboBox	See also 	Example

Links the filter combo box to a file list box control.

property FileList: TFileListBox;

Description

If the form includes a TFileListBox object to display a list of files to choose from, set FileList to allow the filter combo box to limit which files are displayed in the list box. Once the two controls are connected, whenever a new filter is selected using a filter combo box, the file list box displays the files that match the selected filter.


TFilterComboBox.Filter
 VCL Reference

TFilterComboBox.Filter

TFilterComboBox	See also 	Example

Contains all the file masks displayed in the filter combo box.

property Filter: string;

Description

Set the Filter property to specify the names that appear in the filter combo box, along with the masks associated with each name. Each mask is a file name that may include wildcards. The asterisk (*) is a wildcard which matches any number of arbitrary characters. The question mark (?) is a wildcard which matches a single arbitrary character. When the application runs, the file filter the user selects in the filter combo box becomes the value of the Mask property.

To create the value of Filter for a single file type, follow these steps:

1	Type some meaningful text to indicate the type of file.

2	Type a | character (vertical bar).

3	Type the file filter.

Don't put in any spaces around the | character in the string.

Here's an example:

FilterComboBox1.Filter := 'Text files|*.TXT';

If Filter is set to this string, the string “Text files” appears in the filter combo box. When the user selects “Text files”, the mask is set to “*.TXT”.

To specify multiple file filters, extend the value of Filter, separating each file name/mask combination with a | character.

Here's an example of two file filters that could be specified as the value of the Filter property:

'Text files (*.TXT)|*.TXT|Pascal files (*.PAS)|*.PAS'

The previous example includes the file filters in parentheses in the text parts. This isn't required, but it's a common convention that helps users understand what to expect when they select a file filter.

The mask portion can include multiple file specifiers if they are separated with semicolons:

'All files|*.TXT;*.PAS;*.WB1'


TFilterComboBox.Mask
 VCL Reference

TFilterComboBox.Mask

TFilterComboBox	See also 	Example

Specifies the mask associated with the string selected in the filter combo box.

property Mask: string;

Description

Read Mask to obtain the mask that was selected by the user.

When the user uses the filter combo box to select a new filter, the mask associated with the selected file type becomes the value of the Mask property. If a file list box is linked to the filter combo box with the FileList property, the file list will update when the value of Mask changes.


 VCL Reference

TFilterComboBox events

TFilterComboBox	Alphabetically	Legend

Derived from TCustomCombo

OnChange

OnDropDown

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnStartDrag


 VCL Reference

TFilterComboBox events

TFilterComboBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDropDown

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnStartDrag


 VCL Reference

TFilterComboBox methods

TFilterComboBox	Alphabetically	Legend

In TFilterComboBox

Create

Destroy

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFilterComboBox methods

TFilterComboBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TFilterComboBox.Create
 VCL Reference

TFilterComboBox.Create

TFilterComboBox	See also

Creates and initializes an instance of TFilterComboBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TFilterComboBox objectat runtime. Filter combo boxes placed on a form at design time are created automatically.

After allocating the memory for the combo box, Create initializes the Mask property to *.* and initializes the Style property to csDropDownList.


TFilterComboBox.Destroy
 VCL Reference

TFilterComboBox.Destroy

TFilterComboBox	See also

Destroys an instance of TFilterComboBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the filter combo box is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox

TFilterComboBox


TFontRecall
 VCL Reference

TFontRecall

Hierarchy	Properties	Methods	See also

TFontRecall saves and restores the properties of a TFont object.

Unit

Graphics

Description

Use TFontRecall to store the current state of a TFont object. You are then free to change the current state of the font object. To restore the font object to its original state, all that is necessary is to free the TFontRecall object and the TFont object is automatically restored to the saved property values.

You can update the TFontRecall instance to reflect the current properties of the TFont object by calling the Store method. You can prevent the TFontRecall destructor from updating the TFont object by calling the Forget method.


 VCL Reference

TFontRecall properties

TFontRecall	Alphabetically	Legend

Derived from TRecall

Reference


 VCL Reference

TFontRecall properties

TFontRecall	By object	Legend

Reference


 VCL Reference

TFontRecall methods

TFontRecall	Alphabetically	Legend

In TFontRecall

Create

Derived from TRecall

Destroy

Forget

Store

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFontRecall methods

TFontRecall	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Forget

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Store


TFontRecall.Create
 VCL Reference

TFontRecall.Create

TFontRecall	See also

Instantiates a TFontRecall object.

constructor Create(AFont: TFont); override;

Description

Call Create to instantiate a font recall object at runtime. Create saves the current properties of the TFont object specified by AFont, which becomes the value of the Reference property.

Subsequent calls to the Store method take snapshots of the properties of AFont and save them, replacing the values saved by this constructor. When you destroy the TFontRecall instance, the most recently-saved properties are assigned to AFont, restoring it to a previous state.


Hierarchy

TObject

TRecall

TFontRecall


TFont
 VCL Reference

TFont

Hierarchy	Properties	Methods	Events	See also

TFont encapsulates a system font.

Unit

Graphics

Description

TFont describes font characteristics used when displaying text. TFont defines a set of characters by specifying the height, font family (typeface), attributes (such as bold or italic) and so on.

TFont encapsulates a windows logical font.


 VCL Reference

TFont properties

TFont	Alphabetically	Legend

In TFont

Charset

Color

FontAdapter

Handle

Height

Name

Pitch

PixelsPerInch

Size

Style

Derived from TGraphicsObject

OwnerCriticalSection


 VCL Reference

TFont properties

TFont	By object	Legend

Charset

Color

FontAdapter

Handle

Height

Name

OwnerCriticalSection

Pitch

PixelsPerInch

Size

Style


TFont.Charset
 VCL Reference

TFont.Charset

TFont	See also

Specifies the character set of the font.

property Charset: TFontCharsetnodefault;

Description

Set Charset to identify the character set of the font. Each typeface (specified by the Name property) supports one or more character sets. Check the information supplied by the font vendor to determine what values of Charset are valid.


TFont.FontAdapter
 VCL Reference

TFont.FontAdapter

TFont	See also

Designates an interface for providing the font information to ActiveX controls.

property FontAdapter: IChangeNotifier;

Description

Do not use the FontAdapter property. FontAdapter is used internally by ActiveX controls to communicate font information through an OLE interface.


TFont.Color
 VCL Reference

TFont.Color

TFont	See also 	Example

Specifies the color of the text.

property Color: TColor;

Description

Use Color to specify the color of the text characters (as opposed to the background color). If Color is set to a dithered color, the text appears in the closest non-dithered value.


TFont.Handle
 VCL Reference

TFont.Handle

TFont	See also	Example

Provides access to the handle of a system font.

property Handle: HFont;

Description

The Handle property indicates the Windows GDI font object handle.

Use Handle as a parameter when calling Windows API functions that require a font handle. Set Handle to make the TFont object represent the Windows font indicated by the font handle. Setting Handle releases the current Windows font resource.

Note:	When possible, change a font by setting the other properties of TFont rather than using the Handle property. Setting Handle does not reset the properties that describe the font. However, an OnChange event does occur when Handle is set directly by an application.


TFont.Height
 VCL Reference

TFont.Height

TFont	See also

Specifies the height of the font.

property Height: Integer;

Description

Use Height to specify the height of the font in pixels. If the value is negative, the internal leading that appears at the top of each line of text is not measured. If the value is positive, Height represents the height of the characters plus the internal leading.

To specify the size of the font in points, use the Size property instead. Users usually specify font size in points, while applications may be concerned with the actual size of the font in pixels when displaying the font on the screen.

The value of Height can be obtained from the point size using this formula:

Font.Height = -Font.Size * Font.PixelsPerInch / 72

When the Height property has a positive value, the Size property has a negative value. When the Size property has a positive value, the Height property has a negative value.


TFont.Name
 VCL Reference

TFont.Name

TFont	See also	Example

Identifies the typeface of the font.

type TFontName = type string;

property Name: TFontName;

Description

Use Name to specify the typeface of the font. If the font family described by Name includes multiple character sets, be sure to set the Charset property as well.

Note:	If the combination of font family (typeface) and attributes (such as bold or italic) specifies a font that is not available on the system, the system substitutes a different font.


TFont.Pitch
 VCL Reference

TFont.Pitch

TFont	See also

Specifies whether the characters in the font all have the same width.

type TFontPitch = (fpDefault, fpVariable, fpFixed);

property Pitch: TFontPitch;

Description

Each typeface has an associated pitch. The characters in fixed-pitch fonts are all the same width. The characters in variable-pitch fonts differ in width. Fixed pitch fonts are generally used for representing source code, because they allow the indentation to line up properly. Variable pitch fonts are generally used to give text a more natural appearance.

Here are the possible values for Pitch:

Value	Meaning

fpDefault	The font pitch is set to the default value, which depends on the font specified in the Name property.

fpFixed	The font pitch is set to fixed. All characters in the font have the same width.

fpVariable	The font pitch is set to variable. The characters in the font have different widths.

Setting the Pitch of a fixed-pitch font to fpVariable or a variable-pitch font to fpFixed will cause window system to find what it considers the best match to all of the font characteristics that have been specified. This might have no effect on the appearance of a font, or might cause the window sysytem to substitute a different font with the appropriate pitch. For example, setting the pitch of Serif (a variable-pitch font) to fpFixed causes Courier to be displayed.


TFont.PixelsPerInch
 VCL Reference

TFont.PixelsPerInch

TFont	See also

Indicates the conversion factor between logical inches and the pixels of the device (printer or screen) using the font.

property PixelsPerInch: Integer;

Description

PixelsPerInch is used to ensure that when a font is copied from the form's canvas to the printer, the font is the same size in points. The PixelsPerInch property affects printer fonts only and should not be modified.

To modify the size of a font, use the Size or Height properties.


TFont.Size
 VCL Reference

TFont.Size

TFont	See also

Specifies the height of the font in points.

property Size: Integer;

Description

Use Size to specify the point size of the font. If the value is negative, the internal leading that appears at the top of each line of text is included. If the value is positive, Size represents the height of the characters but not the internal leading.

To determine the size of the font in pixels, use the Height property instead. The value of Size can be obtained from the height in pixels using this formula:

Font.Size = -Font.Height * 72 / Font.PixelsPerInch

When the Size property has a positive value, the Height property has a negative value. When the Height property has a positive value, the Size property has a negative value.


TFont.Style
 VCL Reference

TFont.Style

TFont	See also	Example

Determines whether the font is normal, italic, underlined, bold, and so on.

type

  TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);

  TFontStyles = set of TFontStyle;

property Style: TFontStyles;

Description

Use Style to add special characteristics to characters that use the font. Style is a set containing zero or more values from the following:

Value	Meaning

fsBold	The font is boldfaced.

fsItalic	The font is italicized.

fsUnderline	The font is underlined.

fsStrikeOut	The font is displayed with a horizontal line through it.


 VCL Reference

TFont events

TFont	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 VCL Reference

TFont events

TFont	By object	Legend

OnChange


 VCL Reference

TFont methods

TFont	Alphabetically	Legend

In TFont

Assign

Create

Destroy

Derived from TGraphicsObject

HandleAllocated

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TFont methods

TFont	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TFont.Assign
 VCL Reference

TFont.Assign

TFont	See also	Example

Copies the properties of another TFont object.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to set the properties of the font to match the characteristics of the Source object. If Source is another TFont object, Assign matches the font characteristics of the source. Assign does not copy the PixelsPerInch property, so this method can be used to copy a screen font to a printer font, or vice versa.

If the Source parameter is not another TFont object, Assign calls the inherited method so that the font can be copied from any object that can assign font properties in its AssignTo method.


TFont.Create
 VCL Reference

TFont.Create

TFont	See also

Creates and initializes an instance of TFont.

constructor Create;

Description

Call Create to create a font object at runtime.

{ Create allocates memory for the font resource, and initializes the Color property to clWindowText. Create also initializes the PixelsPerInch property based on the screen resolution.


TFont.Destroy
 VCL Reference

TFont.Destroy

TFont	See also

Destroys an instance of TFont.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TFont reference is not nil, and only then calls Destroy.Destroy frees the resource identified by the Handle property.


Hierarchy

TObject

TPersistent

TGraphicsObject

TFont


THandleStream
 VCL Reference

THandleStream

Hierarchy	Properties	Methods	See also

THandleStream enables applications to read from and write to communications resources identified by a Windows handle.

Unit

Classes

Description

Use THandleStream to access files, sockets, named pipes, mailslots, or other communications resources that provide a Windows handle when opened. For example, the FileOpen function provides a Windows handle for a file on disk. THandleStream allows applications to use a uniform stream interface when performing I/O using a Windows handle.

To avoid the overhead of managing file handles, use TFileStream to work with disk files.


 VCL Reference

THandleStream properties

THandleStream	Alphabetically	Legend

In THandleStream

Handle

Derived from TStream

Position

Size


 VCL Reference

THandleStream properties

THandleStream	By object	Legend

Handle

Position

Size


THandleStream.Handle
 VCL Reference

THandleStream.Handle

THandleStream	See also

Specifies the handle for the communications resource the stream reads from and writes to.

property Handle: Integer;

Description

Read Handle to get the handle for Windows API calls or file management functions. To read from or write to the resource, use the methods of the THandleStream object.

Handle is a read-only property. The handle property cannot be changed to allow the handle stream to switch from reading to writing or vice versa. For example, to change from a file handle that is opened in read-only mode to one that is opened in write mode:

1	Free the stream object.

2	Call FileClose to close the file.

3	Reopen the file in write mode, and use the handle to create a new instance of a handle stream. Alternately, open a TFileStream object for the file, specifying a write mode for the stream.

Note:	Do not call the FileClose function on the Handle until after the THandleStream object has been destroyed.


 VCL Reference

THandleStream methods

THandleStream	Alphabetically	Legend

In THandleStream

Create

Read

Seek

SetSize

Write

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THandleStream methods

THandleStream	By object	Legend

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

SetSize

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


THandleStream.Create
 VCL Reference

THandleStream.Create

THandleStream	See also

Creates an instance of THandleStream.

constructor Create(AHandle: Integer);

Description

Call Create to instantiate a THandleStream for a given handle.

The handle must be obtained by opening or creating the resource in the appropriate mode. For example, to create a handle stream for reading from a file, obtain the file handle by opening the file with an fmOpenRead or fmOpenReadWrite mode. To create a handle stream for writing to a file, obtain the file handle by opening the file with an fmOpenWrite or fmOpenReadWrite mode.


THandleStream.Read
 VCL Reference

THandleStream.Read

THandleStream	See also

Reads up to Count bytes of data from the resource associated with the handle stream into Buffer.

function Read(var Buffer; Count: Longint): Longint; override;

Description

Use Read to read data from the resource associated with the handle stream when the number of bytes in the file is not known. Read transfers up to Count bytes from the resource, starting at the current position, and then advances the current position in the resource by the number of bytes actually transferred. Read returns the number of bytes actually transferred, which may be less than Count if the end of file marker is encountered.

All other data-reading methods of a handle stream (ReadBuffer, ReadComponent) call Read to do the actual reading.


THandleStream.Seek
 VCL Reference

THandleStream.Seek

THandleStream	See also

Resets the current position of the handle stream.

function Seek(Offset: Longint; Origin: Word): Longint; overload; virtual;

function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;

Description

Use Seek to move the current position within the resource associated with the handle stream by the indicated offset. Seek allows an application to read from or write to a particular location within the resource.

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:

Value	Meaning

soFromBeginning	Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position in the resource. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file.

Seek returns the new value of the Position property, the new current position in the resource.


THandleStream.SetSize
 VCL Reference

THandleStream.SetSize

THandleStream	See also

Sets the end of file marker to truncate the resource at the indicated position.

procedure SetSize(NewSize: Longint); override;

procedure SetSize(const NewSize: Int64); override;

Description

Call SetSize to set the size of the resource. SetSize calls Seek to go to the indicated position, and then writes an end of file marker. If the size of the resource can not be changed, an exception is raised. For example, calling SetSize for a file handle that was opened in fmOpenRead mode will raise an exception.


THandleStream.Write
 VCL Reference

THandleStream.Write

THandleStream	See also

Writes Count bytes from the Buffer to the current position in the resource.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to write Count bytes to the resource associated with the handle stream, starting at the current position. After writing to the resource, Write advances the current position by the number bytes written, and returns the number of bytes written.

All other data-writing methods of a handle stream (WriteBuffer, WriteComponent) call Write to do the actual writing.


Hierarchy

TObject

TStream

THandleStream


IDesignerNotify
 VCL Reference

IDesignerNotify

Hierarchy	Methods	See also

IDesignerNotify is the interface for responding to notifications about changes to components in the designer.

Unit

Classes

Description

IDesignerNotify introduces two methods, Modified and Notification, that allow the designer to respond when components are added, deleted, or changed. These methods are called automatically by the form designer or by component and property editors.


 VCL Reference

IDesignerNotify methods

IDesignerNotify	Alphabetically	Legend

In IDesignerNotify

Modified

Notification

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDesignerNotify methods

IDesignerNotify	By object	Legend

_AddRef

_Release

Modified

Notification

QueryInterface


IDesignerNotify.Modified
 VCL Reference

IDesignerNotify.Modified

IDesignerNotify	See also

Notifies property and component editors when a change is made to a component.

procedure Modified;

Description

When any change is made to a component the property and component editors call this method, allowing the designer to respond to the change.


IDesignerNotify.Notification
 VCL Reference

IDesignerNotify.Notification

IDesignerNotify	See also

Allows the designer to respond when a notification is sent to the form.

procedure Notification(AComponent: TComponent; Operation: TOperation);

Description

When a form receives a notification, it calls the Notification method of the designer, allowing the designer to respond to all the notifications the form receives.


Hierarchy

IInterface

IDesignerNotify


IDesigner
 VCL Reference

IDesigner

Hierarchy	Properties	Methods	See also

IDesigner is an interface to the form designer in the IDE.

Unit

DesignIntf

Description

Use IDesigner to interact with the current unit when implementing a property editor or component editor. Access IDesigner through the Designer property of the property editor or component editor. IDesigner introduces several methods that are useful for managing standard menu items and for creating and manipulating components and methods such as event handlers.


 VCL Reference

IDesigner properties

IDesigner	Alphabetically	Legend

In IDesigner

AncestorDesigner

IsDormant

Root


 VCL Reference

IDesigner properties

IDesigner	By object	Legend

AncestorDesigner

IsDormant

Root


IDesigner.AncestorDesigner
 VCL Reference

IDesigner.AncestorDesigner

IDesigner	See also

Returns an interface to form designer’s ancestor.

property AncestorDesigner: IDesigner;

Description

Use AncestorDesigner to access the ancestor interface for the form designer.


IDesigner.IsDormant
 VCL Reference

IDesigner.IsDormant

IDesigner	See also

Indicates whether the current root object exists in the IDE, or is only available as a streamed-out memory image.

property IsDormant: Boolean;

Description

Component writers should not need to use the IsDormant property, which should always be False when property editors or component editors are up. IsDormant is used internally when loading and unloading packages.


IDesigner.Root
 VCL Reference

IDesigner.Root

IDesigner	See also

Designates the current entity being edited by the form designer.

property Root: TComponent;

Description

Root is the object that the form designer manages. This can be a form, frame, data module, or other top-level object. The Root object is the Owner of all objects that are placed into it using the form designer.

Root also defines a global name space: Objects placed in the root object must not have the same name as another object contained by the root object. When code on components that are not contained in the root object refer to objects in the root object, they use the name of the root object to qualify the contained object’s name. For example

Form1.Button1


 VCL Reference

IDesigner methods

IDesigner	Alphabetically	Legend

In IDesigner

Activate

CanPaste

ChainCall

ClearSelection

CopySelection

CreateComponent

CreateCurrentComponent

CreateMethod

CutSelection

DeleteSelection

Edit

GetAncestorDesigner

GetBaseRegKey

GetComponent

GetComponentName

GetComponentNames

GetIDEOptions

GetIsDormant

GetMethodName

GetMethods

GetObject

GetObjectName

GetObjectNames

GetPathAndBaseExeName

GetPrivateDirectory

GetProjectModules

GetRoot

GetRootClassName

GetScrollRanges

GetSelections

GetShiftState

IsComponentHidden

IsComponentLinkable

IsSourceReadOnly

MakeComponentLinkable

MethodExists

MethodFromAncestor

ModalEdit

Modified

ModuleFileNames

NoSelection

PasteSelection

RenameMethod

Resurrect

Revert

SelectComponent

SelectItemName

SetSelections

ShowMethod

UniqueName

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDesigner methods

IDesigner	By object	Legend

_AddRef

_Release

Activate

CanPaste

ChainCall

ClearSelection

CopySelection

CreateComponent

CreateCurrentComponent

CreateMethod

CutSelection

DeleteSelection

Edit

GetAncestorDesigner

GetBaseRegKey

GetComponent

GetComponentName

GetComponentNames

GetIDEOptions

GetIsDormant

GetMethodName

GetMethods

GetObject

GetObjectName

GetObjectNames

GetPathAndBaseExeName

GetPrivateDirectory

GetProjectModules

GetRoot

GetRootClassName

GetScrollRanges

GetSelections

GetShiftState

IsComponentHidden

IsComponentLinkable

IsSourceReadOnly

MakeComponentLinkable

MethodExists

MethodFromAncestor

ModalEdit

Modified

ModuleFileNames

NoSelection

PasteSelection

QueryInterface

RenameMethod

Resurrect

Revert

SelectComponent

SelectItemName

SetSelections

ShowMethod

UniqueName


IDesigner.Activate
 VCL Reference

IDesigner.Activate

IDesigner

Activates the form designer’s window.

procedure Activate;

Description

Call Activate to give focus to the form designer window and bring it to the front.


IDesigner.CanPaste
 VCL Reference

IDesigner.CanPaste

IDesigner	See also

Indicates whether the user can paste the contents of the clipboard into the designer.

function CanPaste: Boolean;

Description

CanPaste indicates whether the Paste command on the Edit menu should be grayed. When CanPaste returns True, the current selection in the designer can accept the contents of the Windows clipboard.

If the user subsequently chooses the Paste command, the PasteSelection method handles the details of pasting the contents of the clipboard.


IDesigner.ChainCall
 VCL Reference

IDesigner.ChainCall

IDesigner

Used internally when creating event methods that call another event handler inherited from a frame.

procedure ChainCall(const MethodName, InstanceName, InstanceMethod: string; TypeData: PTypeData);

Description

ChainCall is used internally to generate the method call to an inherited method. Editors should not use this method.


IDesigner.ClearSelection
 VCL Reference

IDesigner.ClearSelection

IDesigner	See also

Clears the contents of the selected component or components.

procedure ClearSelection;

Description

Call ClearSelection to delete the contents of the components returned by GetSelections.


IDesigner.CopySelection
 VCL Reference

IDesigner.CopySelection

IDesigner	See also

Copies the selected component or components to the Windows clipboard

procedure CopySelection;

Description

Call CopySelection to copy the components returned by GetSelections to the Windows clipboard.


IDesigner.CreateComponent
 VCL Reference

IDesigner.CreateComponent

IDesigner	See also

Creates a specified component.

CreateComponent(ComponentClass: TComponentClass; Parent: TComponent; Left, Top, Width, Height: Integer): TComponent;

Description

Call CreateComponent to create an instance of ComponentClass at the position specified by the Left and Height parameters with the size specified by the Width and Height parameters. The new component will be a child of the component specified by the Parent parameter.


IDesigner.CreateCurrentComponent
 VCL Reference

IDesigner.CreateCurrentComponent

IDesigner	See also

Creates an instance of the component that is currently selected on the component palette.

CreateCurrentComponent(Parent: TComponent; const Rect: TRect): TComponent;

Description

Call CreateCurrentComponent to create an instance of the component that is selected on the component palette.

Parent is the parent of the newly created component.

Rect specifies the boundaries of the newly created component.

CreateCurrentComponent returns the new component instance.


IDesigner.CreateMethod
 VCL Reference

IDesigner.CreateMethod

IDesigner	See also

Creates an event handler.

function CreateMethod(const Name: string; TypeData: PTypeData): TMethod;

Description

Call CreateMethod to add an event handler to the unit of the Root object. Allocate a TTypeData structure and fill in the MethodKind, ParamCount, and ParamList fields. The event handler gets the name specified by the Name parameter and the type specified by the TypeData parameter. CreateMethod returns a method pointer to the new event handler.


IDesigner.CutSelection
 VCL Reference

IDesigner.CutSelection

IDesigner	See also

Copies the selected component or components to the Windows clipboard

procedure CutSelection;

Description

Call CutSelection to cut the components returned by GetSelections to the Windows clipboard. CutSelection has the same effect as a call to CopySelection and to DeleteSelection, but in a single action.


IDesigner.DeleteSelection
 VCL Reference

IDesigner.DeleteSelection

IDesigner	See also

Deletes the selected component or components

procedure DeleteSelection(ADoAll: Boolean = False);

Description

Call DeleteSelection to remove the selected components in the designer and free their memory.

ADoAll controls what objects are freed. When ADoAll is Ffalse, components are only freed if the deletion can be undone. When ADoAll is Ttrue, all components are deleted, including any components that can’t be recovered by an Undo operation.

To remove the components from the set of selected components without deleting them, use SetSelections instead. To delete the contents of the components but not the components themselves, use ClearSelection instead.


IDesigner.Edit
 VCL Reference

IDesigner.Edit

IDesigner	See also

Displays the component editor for the specified component.

procedure Edit(const Component: TComponent);

Description

Call Edit to display the component editor for the component specified by Component. Passing nil displays the Form editor.


IDesigner.GetAncestorDesigner
 VCL Reference

IDesigner.GetAncestorDesigner

IDesigner	See also

Returns the value of the AncestorDesigner property.

function GetAncestorDesigner: IDesigner;

Description

GetAncestorDesigner is the read implementation of the AncestorDesigner property.


IDesigner.GetBaseRegKey
 VCL Reference

IDesigner.GetBaseRegKey

IDesigner	See also

Returns the name of the registry key where the form designer saves option values.

function GetBaseRegKey: string;

Description

On Windows, GetBaseRegKey returns the root key in the system registry where Delphi stores information such as

Information about known packages and libraries.

Options set in the IDE.

Tool bar settings.

Information used to implement Code Insight.

Items stored in the Object Repository.

The history list used by the code editor.


IDesigner.GetComponent
 VCL Reference

IDesigner.GetComponent

IDesigner	See also

Returns the component with the name passed as a parameter.

function GetComponent(const Name: string): TComponent;

Description

Call GetComponent to access a component given its name. If the component is not in the current root object, the Name parameter should include the name of the entity in which it resides. For example, to obtain a reference to a component in a data module named 'DataModule2', use a line such as

TheComponent := Designer.GetComponent('DataModule2.Button1');

If DataModule2’s unit is in the uses clause of the current root object, GetComponent will return the component.

Note:	To obtain a reference to a persistent object that is not a component, use the GetObject method instead.


IDesigner.GetComponentName
 VCL Reference

IDesigner.GetComponentName

IDesigner	See also

Returns the name of the component passed as its parameter.

function GetComponentName(Component: TComponent): string;

Description

Call GetComponentName to obtain the name of a component. This is the inverse of GetComponent.

Note:	If the component is in the current root object, GetComponentName returns the Name property of the component itself. If the component is in another entity, GetComponentName qualifies the component name with the name of the object in which it resides.


IDesigner.GetComponentNames
 VCL Reference

IDesigner.GetComponentNames

IDesigner	See also

Executes a callback for every component that can be assigned a property of a specified type.

procedure GetComponentNames(TypeData: PTypeData; Proc: TGetStrProc);

Description

Use GetComponentNames to call the procedure specified by the Proc parameter for every component that can be assigned a property that matches the TypeData parameter. For each component, Proc is called with its S parameter set to the name of the component. This parameter can be used to obtain a reference to the component by calling the GetComponent method.

Note:	GetComponentNames calls Proc for components in units used by the current root object as well as the entity that is the value of Root.


IDesigner.GetIDEOptions
 VCL Reference

IDesigner.GetIDEOptions

IDesigner	See also

Returns an interface for reading and writing option values.

function GetIDEOptions: TCustomIniFile;

Description

GetIDEOptions returns a TCustomIniFile object that represents the various IDE options and settings that the form designer uses.


IDesigner.GetIsDormant
 VCL Reference

IDesigner.GetIsDormant

IDesigner	See also

Returns the value of the IsDormant property.

function GetIsDormant: Boolean;

Description

GetIsDormant is the read implementation of the IsDormant property.


IDesigner.GetMethodName
 VCL Reference

IDesigner.GetMethodName

IDesigner	See also

Returns the name of a specified event handler.

function GetMethodName(const Method: TMethod): string;

Description

Call GetMethodName to obtain the name of an event handler given a pointer to it.


IDesigner.GetMethods
 VCL Reference

IDesigner.GetMethods

IDesigner	See also

Executes a callback for every method of a specified type.

procedure GetMethods(TypeData: PTypeData; Proc: TGetStrProc);

Description

Use GetMethods to call the procedure specified by the Proc parameter for every event handler that matches the TypeData parameter. For each event handler, Proc is called with its S parameter set to the name of the method. This parameter can be used to bring up a code editor for the method by calling the ShowMethod method.


IDesigner.GetObject
 VCL Reference

IDesigner.GetObject

IDesigner	See also

Returns the persistent object with the name passed as a parameter.

function GetObject(const Name: string): TPersistent;

Description

Call GetObject to access a persistent object given its name. This is useful when working with components that include constituent objects that are not components, such as the TStatusPanel objects that TStatusBar uses.

To obtain the name of a persistent object, use the GetObjectName method.


IDesigner.GetObjectName
 VCL Reference

IDesigner.GetObjectName

IDesigner	See also

Returns the name of the object passed as its parameter.

function GetObjectName(Instance: TPersistent): string;

Description

Call GetObjectName to obtain the name of a persistent object. This is the inverse of GetObject. GetObjectName is useful when working with components that include constituent objects that are not components, such as the TStatusPanel objects that TStatusBar uses.


IDesigner.GetObjectNames
 VCL Reference

IDesigner.GetObjectNames

IDesigner	See also

Executes a callback for every object that can be assigned a property of a specified type.

procedure GetObjectNames(TypeData: PTypeData; Proc: TGetStrProc);

Description

Use GetObjectNames to call the procedure specified by the Proc parameter for every persistent object that can be assigned a property that matches the TypeData parameter. For each object, Proc is called with its S parameter set to the name of the object. This parameter can be used to obtain a reference to the object by calling the GetObject method.

Note:	GetObjectNames calls Proc for components in forms or modules used by the current root object as well as in the root itself.


IDesigner.GetPathAndBaseExeName
 VCL Reference

IDesigner.GetPathAndBaseExeName

IDesigner	See also

Returns the fully-qualified path name for the Delphi executable.

function GetPathAndBaseExeName: string;

Description

Call GetPathAndBaseExeName to obtain the fully qualified path name for the Delphi executable.


IDesigner.GetPrivateDirectory
 VCL Reference

IDesigner.GetPrivateDirectory

IDesigner	See also

Returns the private directory for the form designer.

function GetPrivateDirectory: string;

Description

Call GetPrivateDirectory to obtain the location that can be used for housing executables or auxiliary files that store state information, examples, templates, and so on.

This location is stored in the registry key specified by GetBaseRegKey under the subkey PrivateDir.


IDesigner.GetProjectModules
 VCL Reference

IDesigner.GetProjectModules

IDesigner	See also

Executes a callback for every module being edited by the form designer.

type

  TGetModuleProc = procedure(const FileName, UnitName, FormName, DesignClass: string; CoClasses: TStrings) of object;

procedure GetProjectModules(Proc: TGetModuleProc);

Description

Call GetProjectModules to execute a callback function for every module in the current project. The callback is of type TGetModuleProc.

The FileName parameter specifies the file name for the module.  The UnitName parameter specifies the name of the unit (usually the same as the file base name).  The FormName parameter indicates the name of the root component.  The DesignClass parameter indicates the class of the object named by the FormName parameter.  The CoClasses parameter lists all CoClasses supported by the module.


IDesigner.GetRoot
 VCL Reference

IDesigner.GetRoot

IDesigner	See also

Returns the current entity being edited by the form designer.

function GetRoot: TComponent;

Description

GetRoot is the read implementation of the Root property. It returns the object on which the form designer is working.


IDesigner.GetRootClassName
 VCL Reference

IDesigner.GetRootClassName

IDesigner	See also

Returns the class name for the root component.

function GetRootClassName: string;

Description

Call GetRootClassName to obtain the class name of the component specified by the Root property.


IDesigner.GetScrollRanges
 VCL Reference

IDesigner.GetScrollRanges

IDesigner	See also

Returns the size of the logical designer window.

function GetScrollRanges(const ScrollPosition: TPoint): TPoint;

Description

Call GetScrollRanges to determine the farthest point to which the designer can scroll. The ScrollPosition parameter specifies a point that must be included in the scroll range. GetScrollRanges returns the coordinates that minimally contain all components on the design surface plus the point specified by ScrollPosition.


IDesigner.GetSelections
 VCL Reference

IDesigner.GetSelections

IDesigner	See also

Fills a list with all selected components on the current root object.

procedure GetSelections(const List: IDesignerSelections);

Description

Use GetSelections to access every component currently selected on the root object returned by the GetRoot method.

Pass a component  that supports the IDesignerSelections interface as the List parameter. GetSelections fills this component with references to the selected objects.

Note:	GetSelections can return persistent objects that are not components, as well as components.


IDesigner.GetShiftState
 VCL Reference

IDesigner.GetShiftState

IDesigner

Returns the current state of the Shift, Alt, and Ctrl keys.

function GetShiftState: TShiftState;

Description

Call GetShiftState to ascertain whether the Shift, Alt, and Ctrl keys are currently pressed. GetShiftState returns a TShiftState value that indicates the status of these keys.


IDesigner.IsComponentHidden
 VCL Reference

IDesigner.IsComponentHidden

IDesigner	See also

Indicates whether a component does not appear directly in the form designer.

function IsComponentHidden(Component: TComponent): Boolean;

Description

Call IsComponentHidden to determine whether the component specified by the Component parameter appears directly in the form designer. When IsComponentHidden returns True, the component does not appear as an icon or control. For example, menu items and field components are hidden components, and can only be accessed through a parent component’s editor (the menu designer or fields editor). Hidden components are registered using the RegisterNoIcon procedure.


IDesigner.IsComponentLinkable
 VCL Reference

IDesigner.IsComponentLinkable

IDesigner	See also

Indicates whether a component is declared in a unit used by the current root object.

function IsComponentLinkable(Component: TComponent): Boolean;

Description

Call IsComponentLinkable to determine whether the component specified by the Component parameter can be referenced from within the root object. IsComponentLinkable returns True if the specified component is declared in a unit used by the root object.

If IsComponentLinkable returns False, the component’s unit can be added to the uses clause of the root unit by calling MakeComponentLinkable.


IDesigner.IsSourceReadOnly
 VCL Reference

IDesigner.IsSourceReadOnly

IDesigner

Indicates whether the source file for the component being designed is read-only.

function IsSourceReadOnly: Boolean;

Description

Call IsSourceReadOnly to determine whether the unit module for the object in the designer is a read-only file.


IDesigner.MakeComponentLinkable
 VCL Reference

IDesigner.MakeComponentLinkable

IDesigner	See also

Adds a component’s unit to the uses clause of the root unit.

procedure MakeComponentLinkable(Component: TComponent);

Description

Call MakeComponentLinkable to add the specified component's unit to the uses clause of the object being designed.


IDesigner.MethodExists
 VCL Reference

IDesigner.MethodExists

IDesigner	See also

Indicates whether an event handler with a specified name already exists.

function MethodExists(const Name: string): Boolean;

Description

Call MethodExists to determine whether an event handler with a given name has already been created. If MethodExists returns True, the specified event handler exists and can be displayed by calling the ShowMethod method. If MethodExists returns False, the specified event handler does not exist, and can be created by calling the CreateMethod method.


IDesigner.MethodFromAncestor
 VCL Reference

IDesigner.MethodFromAncestor

IDesigner	See also

Indicates whether an event handler is inherited from an ancestor of the root object.

function MethodFromAncestor(const Method: TMethod): Boolean;

Description

Call MethodFromAncestor to determine whether the root object implements a given method. MethodFromAncestor returns False if the method is introduced by the root object, True if it is introduced by an ancestor of the root object.


IDesigner.ModalEdit
 VCL Reference

IDesigner.ModalEdit

IDesigner

Passes a keystroke to a modal editor.

function ModalEdit(EditKey: Char; const ReturnWindow: IActivatable): Boolean;

Description

ModalEdit launches a modal editor dialog, passing it the key specified by the EditKey parameter. When the modal dialog is finished, it uses the ReturnWindow parameter to activate a window. ReturnWindow is an interface that contains a single method, Activate, that activates a window.


IDesigner.Modified
 VCL Reference

IDesigner.Modified

IDesigner	See also

Notifies property and component editors when a change is made to a component.

procedure Modified;

Description

When any change is made to a component the property and component editors call this method, allowing the designer to respond to the change.


IDesigner.ModuleFileNames
 VCL Reference

IDesigner.ModuleFileNames

IDesigner	See also

Indicates the files associated with the current root object.

procedure ModuleFileNames(var ImplFileName, IntfFileName, FormFileName: string);

Description

Call ModuleFileNames to obtain the names of files that contain information about the current root object.

ImplFileName is the source code file that contains the root object’s implementation.

IntfFileName is the file that contains the root object’s declaration. Typically, this is the same as ImplFileName.

FormFileName is the form file (.dfm) for the root object.


IDesigner.NoSelection
 VCL Reference

IDesigner.NoSelection

IDesigner	See also

Deselects all components in the form designer.

procedure NoSelection;

Description

Use NoSelection to programmatically deselect all components in the designer.

Note:	To set the selection to a specific component or set of components, use the SelectComponent or SetSelections method.


IDesigner.PasteSelection
 VCL Reference

IDesigner.PasteSelection

IDesigner	See also

Pastes the contents of the clipboard into the selected component or components.

procedure PasteSelection;

Description

Call PasteSelection to paste the contents of the Windows clipboard to the components returned by GetSelections.


IDesigner.RenameMethod
 VCL Reference

IDesigner.RenameMethod

IDesigner	See also

Renames an existing event handler.

procedure RenameMethod(const CurName, NewName: string);

Description

Call RenameMethod to provide an event handler with a new name. The CurName parameter specifies the current name of the event handler, and the NewName parameter specifies the value that the name should be changed to.

Note:	Before calling RenameMethod, check whether a method with the new name already exists by calling MethodExists.


IDesigner.Revert
 VCL Reference

IDesigner.Revert

IDesigner	See also

Restores a specified property to its value before any edits were made.

procedure Revert(Instance: TPersistent; PropInfo: PPropInfo);

Description

Call Revert to undo all changes that have been made to the property specified by the PropInfo parameter on the object specified by the Instance parameter. Revert restores the property to the setting it had when Instance was first created.


IDesigner.Resurrect
 VCL Reference

IDesigner.Resurrect

IDesigner	See also

The designer is becoming active after having been dormant.

procedure Resurrect(void);

Description

You should not need to call the Resurrect method. It is used internally to restore the root object after the designer has been in a dormant state.


IDesigner.SelectComponent
 VCL Reference

IDesigner.SelectComponent

IDesigner	See also

Replaces the current set of selected components by a single specified object.

procedure SelectComponent(Instance: TPersistent);

Description

Call SelectComponent to select a single persistent object in the designer. Any previous set of selected components is de-selected. To select a set of objects, use the SetSelections method instead.


IDesigner.SelectItemName
 VCL Reference

IDesigner.SelectItemName

IDesigner	See also

Selects the object that is the implementation of a specified property.

procedure SelectItemName(const PropertyName: string);

Description

Call SelectItemName to select the object that implements a specified property of the currently selected object. SelectItemName allows selection to move to another component when the user selects a property of the currently selected component.

PropertyName is the name of the property on the currently selected component.


IDesigner.SetSelections
 VCL Reference

IDesigner.SetSelections

IDesigner	See also

Changes the currently selected set of components.

procedure SetSelections(const List: IDesignerSelections);

Description

Call SetSelections to programmatically change which objects in the root object are selected. Pass in a list of selections using an object  that supports the IDesignerSelections interface.

Note:	The List parameter of SetSelections can contain persistent objects that are not components.


IDesigner.ShowMethod
 VCL Reference

IDesigner.ShowMethod

IDesigner	See also

Activates the code editor with the input cursor in a specified event handler.

procedure ShowMethod(const Name: string);

Description

Call ShowMethod to allow the user to edit the method specified by the Name parameter.


IDesigner.UniqueName
 VCL Reference

IDesigner.UniqueName

IDesigner	See also

Generates a unique name from a specified base string.

function UniqueName(const BaseName: string): string;

Description

Call UniqueName to automatically generate a unique name for a component. Specify the base string for the name by the BaseName parameter. UniqueName appends a number to BaseName to ensure that there are no name-space conflicts.


Hierarchy

IInterface

IDesigner


TPaintBox
 VCL Reference

 TPaintBox

Hierarchy	Properties	Methods	Events	Using TPaintBox	See also

TPaintBox provides a canvas that applications can use for rendering an image.

Unit

ExtCtrls

Description

Use TPaintBox to add custom images to a form. Unlike TImage, which displays an image that is stored in a bitmap, icon, or metafile, TPaintBox requires an application to draw the image directly on a canvas. Use the OnPaint event handler to draw on the paint box’s Canvas, the drawing surface of the paint box.


 VCL Reference

TPaintBox properties

TPaintBox	Alphabetically	Legend

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Font

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPaintBox properties

TPaintBox	By object	Legend

Action

Align

Anchors

BiDiMode

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


 VCL Reference

TPaintBox events

TPaintBox	Alphabetically	Legend

In TPaintBox

OnPaint

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TPaintBox events

TPaintBox	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint

OnStartDock

OnStartDrag


TPaintBox.OnPaint
 VCL Reference

TPaintBox.OnPaint

TPaintBox	See also	Example	Example2

OnPaint occurs when the paintbox receives a Windows paint message.

property OnPaint: TNotifyEvent;

Description

Write an OnPaint event handler to draw the image of the paint box. The OnPaint event fires when the system repaints the TPaintBox control. If there is a handler for this event, its code is executed when the OnPaint event fires.

Use properties and methods of the canvas (such as LineTo, Draw, and TextOut) to programmatically construct the image that the paintbox presents on a form. This can consist of a number of operations including drawing lines, images, and shapes. A TPaintBox itself has no visible manifestation, so if an OnPaint event handler is not provided or no drawing is done in the event handler, the paintbox can not be seen on the form at runtime.


 VCL Reference

TPaintBox methods

TPaintBox	Alphabetically	Legend

In TPaintBox

Create

Paint

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPaintBox methods

TPaintBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TPaintBox.Create
 VCL Reference

TPaintBox.Create

TPaintBox	See also

Creates an instance of TPaintBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TPaintBox object at runtime. TPaintBox objects added to forms at design time are created automatically.

Call Create to instantiate a TImage object at runtime. Images placed on forms at design time are created automatically.

After calling the inherited constructor, Create initializes the control and performs the following actions:

Sets the ControlStyle property to include csReplicatable.

Sets the Height and Width properties to the default 105.


TPaintBox.Paint
 VCL Reference

TPaintBox.::Paint

TPaintBox	See also

Generates an OnPaint event.

procedure Paint; override;

Description

Paint responds to WM_PAINT messages from Windows by initializing the canvas and calling the OnPaint event handler if it is assigned.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TPaintBox


TPersistent
 VCL Reference

TPersistent

Hierarchy	Methods	See also

TPersistent is the ancestor for all objects that have assignment and streaming capabilities(dfm format).

Unit

Classes

Description

TPersistent encapsulates the behavior common to all objects that can be assigned to other objects, and that can read and write their properties to and from a stream. For this purpose TPersisent introduces methods that can be overridden to:

Define the procedure for loading and storing unpublished data to a stream.

Provide the means to assign values to properties.

Provide the means to assign the contents of one object to another.

Do not create instances of TPersistent. Use TPersistent as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects.


 VCL Reference

TPersistent methods

TPersistent	Alphabetically	Legend

In TPersistent

Assign

AssignTo

DefineProperties

Destroy

GetNamePath

GetOwner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPersistent methods

TPersistent	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineProperties

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TPersistent.Assign
 VCL Reference

TPersistent.Assign

TPersistent	See also

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent); virtual;

Description

Call Assign to copy the properties or other attributes of one object from another. The standard form of a call to Assign is

Destination.Assign(Source);

which tells the Destination object to copy the contents of the Source object to itself.

Most objects override Assign to handle the assignment of properties from similar objects. When overriding Assign, call the inherited method if the destination object can’t handle the assignment of properties from the class of the Source parameter.

If no overridden Assign method can handle the assignment of properties from Source, the method implemented in TPersistent calls the source object’s AssignTo method. This allows the source object to handle the assignment. If the Source object is nil, TPersistent.Assign raises an EConvertError exception.

In general, the statement “Destination := Source” is not the same as the statement “Destination.Assign(Source)”. The statement “Destination := Source” makes Destination reference the same object as Source, whereas "Destination.Assign(Source)" copies the contents of the object referenced by Source into the object referenced by Destination.

Note:	The types of some properties are also objects. If these properties have write methods that use Assign to set the value of the property, then in these cases the statement "Destination := Source" is the same as "Destination.Assign(Source)".


TPersistent.AssignTo
 VCL Reference

TPersistent.AssignTo

TPersistent	See also

Copies the properties of an object to a destination object.

procedure AssignTo(Dest: TPersistent); virtual;

Description

Override the AssignTo method to extend the functionality of the Assign method of destination objects so that they handle newly created object classes. When defining a new object class, override the Assign method for every existing object class that should be able to copy its properties to the new class.  Override the AssignTo method for every existing class to which the new class can copy.

The Assign method of TPersistent calls AssignTo if the descendant object does not succeed in copying the properties of a source object. The AssignTo method defined by TPersistent raises an EConvertError exception.

For example, given the following code in which A and B are instance variables:

A.Assign(B);

if A knows how to handle B, then it does so and returns. If A doesn’t know how to handle B’s type, execution will trickle to TPersistent.Assign, which calls:

B.AssignTo(A);

If B knows how to copy to A, the assignment succeeds. Otherwise, TPersistent raises an exception.


TPersistent.DefineProperties
 VCL Reference

TPersistent.DefineProperties

TPersistent	See also	Example

Provides an interface for a method that reads and writes otherwise unpublished data.

procedure DefineProperties(Filer: TFiler); virtual;

Description

Descendants of TPersistent override DefineProperties to designate a method for storing the object's unpublished data to a stream such as a form file. By default, writing an object to a stream writes the values of all its published properties, and reading the object in reads those values and assigns them to the properties. Objects can also specify methods that read and write data other than published properties by overriding the DefineProperties method.

When overriding DefineProperties, consider including some or all of the following:

A call to the inherited method

Calls to the filer object's DefineProperty method

Calls to the filer object's DefineBinaryProperty method

DefineProperties is virtual, so descendant classes can override it as necessary but are not required to do so.


TPersistent.Destroy
 VCL Reference

TPersistent.Destroy

TPersistent	See also

Destroys the TPersistent instance and frees its memory.

procedure Destroy; override;

Description

Destroy cleans up references in the global fix-up list for form linking. It then calls the inherited destructor.

Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.


TPersistent.GetNamePath
 VCL Reference

TPersistent.GetNamePath

TPersistent	See also

Returns the name of the object as it appears in the Object Inspector.

function  GetNamePath: string; dynamic;

Description

GetNamePath is for internal use only. It determines the text that the Object Inspector displays for the name of the object being edited. GetNamePath is introduced in TPersistent so descendants such as collections can appear in the Object Inspector. Do not call GetNamePath directly.

For components, GetNamePath returns the component name. For TCollectionItem objects it returns the name of the hosting component, the name of the property, and the index into the collection surrounded by brackets.


TPersistent.GetOwner
 VCL Reference

TPersistent.GetOwner

TPersistent	See also

Returns the owner of an object.

function  GetOwner: TPersistent; dynamic;

Description

GetOwner is used by the GetNamePath method to find the owner of a persistent object. GetNamePath and GetOwner are introduced in TPersistent so descendants such as collections can appear in the Object Inspector. As implemented in TPersistent, GetOwner returns nil.

For TCollection, GetOwner returns the owner of the collection. For collection items, it returns the collection object into which the collection item has been inserted. For TComponent it is the value of the Owner property.


Hierarchy

TObject

TPersistent


TPopupMenu
 VCL Reference

 TPopupMenu

Hierarchy	Properties	Methods	Events	Using TPopupMenu	See also	Example 1	Example 2

TPopupMenu encapsulates the properties, methods, and events of a pop-up menu.

Unit

Menus

Description

Use TPopupMenu to define the pop-up menu that appears when the user clicks on a control with the right mouse button. To make a pop-up menu available, assign the TPopupMenu object to the control’s PopupMenu property.

Note:	If the popup menu’s ParentBiDiMode is True, the popup menu’s BiDiMode is set to the BiDiMode of the control that activates it. If a control cannot be found, the BiDiMode is set to Application.BiDiMode. The popup menu’s BiDiMode affects all of its menu items.


 VCL Reference

TPopupMenu properties

TPopupMenu	Alphabetically	Legend

In TPopupMenu

Alignment

AutoPopup

HelpContext

MenuAnimation

PopupComponent

PopupPoint

TrackButton

Derived from TMenu

AutoHotkeys

AutoLineReduction

BiDiMode

Handle

Images

Items

OwnerDraw

ParentBiDiMode

WindowHandle

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPopupMenu properties

TPopupMenu	By object	Legend

Alignment

AutoHotkeys

AutoLineReduction

AutoPopup

BiDiMode

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

HelpContext

Images

Items

MenuAnimation

Name

Owner

OwnerDraw

ParentBiDiMode

PopupComponent

PopupPoint

Tag

TrackButton

VCLComObject

WindowHandle


TPopupMenu.Alignment
 VCL Reference

 TPopupMenu.Alignment

TPopupMenu	See also

Determines where the pop-up menu appears when the user clicks the right mouse button.

property Alignment: TPopupAlignment;

Description

Set Alignment to control the placement of the popup menu. Alignment controls whether the menu appears to the left of the mouse, to the right of the mouse, or centered over the mouse.

By default, the menu appears with its top left corner under the mouse (paLeft).


TPopupMenu.AutoPopup
 VCL Reference

TPopupMenu.AutoPopup

TPopupMenu	See also 	Example

Determines whether the pop-up menu appears automatically when the user clicks the right mouse button.

property AutoPopup: Boolean;

Description

Set AutoPopup to True to cause the pop-up menu to appear automatically when the user clicks the right mouse button on a control that has the pop-up menu specified as its PopupMenu property. The application key present on keyboards specifically designed for Windows 95 will also show this menu when pressed.

Set AutoPopup to False if the appearance of the pop-up menu should be controlled programmatically. To display a pop-up menu when AutoPopup is False, use the Popup method.


TPopupMenu.HelpContext
 VCL Reference

TPopupMenu.HelpContext

TPopupMenu	See also

Specifies a context ID for the entire pop-up menu.

property HelpContext: THelpContext;

Description

Use HelpContext to associate a help screen with the entire pop-up menu. Each screen in the Help system should have a unique context ID. When a component is selected in the application, pressing F1 displays the Help screen associated with the value of HelpContext.

To associate a help screen with the individual items in the pop-up menu, use the HelpContext property of the associated TMenuItem objects.


TPopupMenu.MenuAnimation
 VCL Reference

TPopupMenu.MenuAnimation

TPopupMenu	See also

Specifies how the menu appears when it is first displayed.

property MenuAnimation: TMenuAnimation;

Description

Use MenuAnimation to specify how the popup menu appears on the screen. The menu can simply appear as a whole, or can slide into view like a window shade being drawn from any edge.

Note:	MenuAnimation only has an effect when running on Windows 98, NT 5.0, or later.


TPopupMenu.PopupComponent
 VCL Reference

TPopupMenu.PopupComponent

TPopupMenu	See also 	Example

Indicates the component that last displayed the popup menu in response to a right mouse click.

property PopupComponent: TComponent;

Description

Read PopupComponent to determine which control is currently using the popup menu. In applications where multiple controls share the same pop-up menu, use PopupComponent to determine which of them displayed the menu.

Set PopupComponent to associate a control with the menu before calling the Popup method programmatically to bring up the pop-up menu.


TPopupMenu.PopupPoint
 VCL Reference

TPopupMenu.PopupPoint

TPopupMenu	See also

Indicates the location where the pop-up menu appears.

property PopupPoint: TPoint;

Description

This protected property is used internally to locate the popup menu. Its value is set by the Popup method.


TPopupMenu.TrackButton
 VCL Reference

TPopupMenu.TrackButton

TPopupMenu

Specifies which mouse button activates the popup menu when it is associated with a toolbar button.

property TrackButton: TTrackButton;

Description

Use TrackButton to specify which mouse button activates the popup menu when it is associated with a toolbar button.


 VCL Reference

TPopupMenu events

TPopupMenu	Alphabetically	Legend

In TPopupMenu

OnPopup

Derived from TMenu

OnChange


 VCL Reference

TPopupMenu events

TPopupMenu	By object	Legend

OnChange

OnPopup


TPopupMenu.OnPopup
 VCL Reference

TPopupMenu.OnPopup

TPopupMenu	See also 	Example

Occurs just before the pop-up menu appears.

property OnPopup: TNotifyEvent;

Description

Write an OnPopup event handler to take specific action just before the pop-up menu appears. For example, use an OnPopup event handler to set the Checked, Enabled, or Visible property of individual items in the menu so that they are appropriate to the PopupComponent.


 VCL Reference

TPopupMenu methods

TPopupMenu	Alphabetically	Legend

In TPopupMenu

Create

Destroy

DoPopup

Popup

UseRightToLeftAlignment

Derived from TMenu

DispatchCommand

DispatchPopup

FindItem

GetHelpContext

IsRightToLeft

IsShortCut

ParentBiDiModeChanged

ProcessMenuChar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstrucion

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPopupMenu methods

TPopupMenu	By object	Legend

AfterConstrucion

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchCommand

DispatchPopup

DoPopup

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

FreeOnRelease

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsRightToLeft

IsShortCut

MethodAddress

MethodName

NewInstance

ParentBiDiModeChanged

Popup

ProcessMenuChar

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

UseRightToLeftAlignment


TPopupMenu.Create
 VCL Reference

TPopupMenu.Create

TPopupMenu	See also

Creates an instance of TPopupMenu.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create to create a pop-up menu at runtime. Pop-up menus placed in forms or data modules at design time are created automatically.


TPopupMenu.Destroy
 VCL Reference

TPopupMenu.Destroy

TPopupMenu	See also

Destroys an instance of TPopupMenu.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TPopupMenu reference is not nil, and only then calls Destroy.


TPopupMenu.DoPopup
 VCL Reference

TPopupMenu.DoPopup

TPopupMenu	See also

Generates an OnPopup event.

procedure DoPopup(Sender: TObject); virtual;

Description

DoPopup is called automatically just before the pop-up menu appears to generate an OnPopup event. Override DoPopup in a descendant class to change the event.


TPopupMenu.Popup
 VCL Reference

TPopupMenu.Popup

TPopupMenu	See also 	Example

Displays the pop-up menu onscreen.

procedure Popup(X, Y: Integer); virtual;

Description

Call Popup to bring up the pop-up menu. The menu appears at the screen coordinates indicated by the values (in pixels) of X and Y.


TPopupMenu.UseRightToLeftAlignment
 VCL Reference

TPopupMenu.::UseRightToLeftAlignment

TPopupMenu

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the control’s alignment is in a right-to-left mode. This information can be used when painting the control or when responding to mouse events.

UseRightToLeftAlignment returns the setting from the control that activated the popup. If the popup was not activated by a control, UseRightToLeftAlignment returns the setting used in the global Application object.


Hierarchy

TObject

TPersistent

TComponent

TMenu

TPopupMenu


TRegistryIniFile
 VCL Reference

TRegistryIniFile

Hierarchy	Properties	Methods	See also

TRegistryIniFile is a wrapper for the Windows system registry.

Unit

Registry

Description

TRegistryIniFile presents a simple interface to the system registry and hides the need to know about the underlying structure of the registry. TRegistryIniFile enables handling the Windows system registry as if it were a Windows 3.x INI file. Instead of processing an INI file, however, TRegistryIniFile reads from and writes to the system registry. Because TRegistryIniFile, like TIniFile, descends from TCustomIniFile, you can use it in common code that writes to both INI files and the registry.

In addition, application developers that are switching from the use of INI files to the system registry can use this object to migrate their application with a minimum of coding changes. By finding all references to TIniFile in an application, replacing them with TRegistryIniFile, and recompiling the application, a developer can update an application to use the system registry instead of INI files without having to code any new logic into the application.

Note:	Information contained in existing users’ INI files is not migrated into the system registry using the method described above. A one-time operation to explicitly copy the INI file data, through TRegistryIniFile, must be used to do this.

TRegistryIniFile adapts the methods inherited from TCustomIniFile to operate on Registry entries rather than INI file keys. It reinterprets the FileName property as a subkey under the system registry’s root key (HKEY_CURRENT_USER by default). What corresponds to a section in an INI file is treated as a key in the system registry, and what corresponds to data entries under a section in an INI file are treated as data values under a key in the system registry.


 VCL Reference

TRegistryIniFile properties

TRegistryIniFile	Alphabetically	Legend

In TRegistryIniFile

RegIniFile

Derived from TCustomIniFile

FileName


 VCL Reference

TRegistryIniFile properties

TRegistryIniFile	By object	Legend

FileName

RegIniFile


TRegistryIniFile.RegIniFile
 VCL Reference

TRegistryIniFile.RegIniFile

TRegistryIniFile	See also

Contains an internal instance of a TRegIniFile object.

property RegIniFile: TRegIniFile;

Description

RegIniFile is used internally by the TRegistryIniFile object as the gateway connection between TRegistryIniFile methods and the system registry.


 VCL Reference

TRegistryIniFile methods

TRegistryIniFile	Alphabetically	Legend

In TRegistryIniFile

Create

DeleteKey

EraseSection

ReadBinaryStream

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

UpdateFile

WriteBinaryStream

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime

Derived from TCustomIniFile

ReadBool

SectionExists

ValueExists

WriteBool

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRegistryIniFile methods

TRegistryIniFile	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DeleteKey

Destroy

Dispatch

EraseSection

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

SafeCallException

SectionExists

UpdateFile

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime


TRegistryIniFile.Create
 VCL Reference

TRegistryIniFile.Create

TRegistryIniFile	See also

Creates a TRegistryIniFile object for an application.

constructor Create(const FileName String); overload;

constructor Create(const FileName String, AAccess:LongWord); overload;

Description

Create constructs a TRegistryIniFile and creates an internal TRegIniFile object used to access the system registry. TRegistryIniFile uses this TRegIniFile object as a helper object to provide much of its functionality.

FileName is used as the FileName property for the internal TRegIniFile object in the RegIniFile property.

AAccess initializes the Access property of the internal TRegIniFile object.


TRegistryIniFile.DeleteKey
 VCL Reference

TRegistryIniFile.DeleteKey

TRegistryIniFile	See also 	Example

Erases the data value associated with an INI file entry.

procedure DeleteKey(const Section, Ident: String); override;

Description

Call DeleteKey to erase a data value associated with an INI file entry. Section is string containing the name of an INI file section, and Ident is a string containing the name of the key from for which to set a nil value.

Note:	Attempting to erase a data value in a nonexistent section or attempting to erase data from a nonexistent key are not errors. In these cases, DeleteKey creates the section and key and sets its initial value to an empty value.


TRegistryIniFile.EraseSection
 VCL Reference

TRegistryIniFile.EraseSection

TRegistryIniFile	See also

Erases an entire section of an INI file.

procedure EraseSection(const Section: String); override;

Description

Call EraseSection to remove a section, all its keys, and their data values from an INI file. Section identifies the INI file section to remove. If a section cannot be removed, an exception is raised.


TRegistryIniFile.ReadBinaryStream
 VCL Reference

TRegistryIniFile.ReadBinaryStream

TRegistryIniFile	See also

Retrieves a binary value from the registry.

function ReadBinaryStream(const Section, Name: string; Value: TStream): Integer; virtual;

Description

Call ReadBinaryStream to read a binary value into a specified stream. After reading the binary value from the INI file into the current position of the stream, ReadBinaryStream returns the number of bytes written to the stream. The stream is left positioned immediately after the new binary value.

Section is the key for the section that contains the binary data.

Name is the subkey under which the binary data is stored.

Value is a stream to which the binary value is written.


TRegistryIniFile.ReadDate
 VCL Reference

TRegistryIniFile.ReadDate

TRegistryIniFile	See also

Retrieves a date value from an INI file.

function ReadDate (const Section, Ident: String; Default: TDateTime): TDateTime; override;

Description

Call ReadDate to read a date value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the date value. Default is the date value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.ReadDateTime
 VCL Reference

TRegistryIniFile.ReadDateTime

TRegistryIniFile	See also

Retrieves a date-time value from an INI file.

function ReadDateTime (const Section, Ident: String; Default: TDateTime): Boolean; override;

Description

Call ReadDateTime to read a date-time value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the date-time value. Default is the date-time value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.ReadFloat
 VCL Reference

TRegistryIniFile.ReadFloat

TRegistryIniFile	See also

Retrieves a float value from an INI file.

function ReadFloat (const Section, Ident: String; Default: Double): Double; override;

Description

Call ReadFloat to read a float value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the float value. Default is the float value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.ReadInteger
 VCL Reference

TRegistryIniFile.ReadInteger

TRegistryIniFile	See also 	Example

Retrieves an integer value from an INI file.

function ReadInteger(const Section, Ident: String; Default: Longint): Longint; override;

Description

Call ReadInteger to read an integer value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the integer value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.ReadSection
 VCL Reference

TRegistryIniFile.ReadSection

TRegistryIniFile	See also

Reads all the key names from a specified section of an INI file into a string list.

procedure ReadSection (const Section: String; Strings: TStrings); override;

Description

Call ReadSection to retrieve the names of all keys within a specified section of an INI file into a string list object.

Section identifies the section from which to retrieve a list of key names. Strings specifies the string object to hold the retrieved names. Strings can point to a TString object such as a string list, or to a component property, such as Items for a TListBox component, that is a TString object itself.


TRegistryIniFile.ReadSections
 VCL Reference

TRegistryIniFile.ReadSections

TRegistryIniFile	See also

Reads the names of all sections in an INI file into a string list.

procedure ReadSections(Strings: TStrings); override;

Description

Call ReadSections to retrieve the names of all sections in an INI file into a string list object.

Strings specifies the string object to hold the retrieved names. Strings can point to a TString object, or to a component property, such as Items for a TListBox component, that is a TString object itself.


TRegistryIniFile.ReadSectionValues
 VCL Reference

TRegistryIniFile.ReadSectionValues

TRegistryIniFile	See also	Example

Reads the values from all keys within a section of an INI file into a string list.

procedure ReadSectionValues(const Section: String; Strings: TStrings); override;

Description

Call ReadSectionValues to read the values from all keys within a specified section of an INI file into a string list object. Section identifies the section in the file from which to read key values. Strings is the string list object into which to read the values.

Strings specifies the string object to hold the retrieved names. Strings can point to a TString object, or to a component property, such as Items for a TListBox component, that is a TString object itself.


TRegistryIniFile.ReadString
 VCL Reference

TRegistryIniFile.ReadString

TRegistryIniFile	See also 	Example

Retrieves a string value from an INI file.

function ReadString(const Section, Ident, Default: string): String; override;

Description

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.ReadTime
 VCL Reference

TRegistryIniFile.ReadTime

TRegistryIniFile	See also

Retrieves a time value from an INI file.

function ReadTime (const Section, Ident: string; Default: TDateTime): TDateTime; override;

Description

Call ReadTime to read a time value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the time value. Default is the time value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TRegistryIniFile.UpdateFile
 VCL Reference

TRegistryIniFile.UpdateFile

TRegistryIniFile	See also

Flushes buffered INI file data to disk.

function UpdateFile; override;

Description

Call UpdateFile to flush buffered reads from and writes to the INI file to disk. UpdateFile is useful under Windows95, but has no effect under Windows NT as NT does not buffer INI file reads and writes.


TRegistryIniFile.WriteBinaryStream
 VCL Reference

TRegistryIniFile.WriteBinaryStream

TRegistryIniFile	See also

Writes a binary value to the registry.

procedure WriteBinaryStream(const Section, Name: string; Value: TStream): virtual;

Description

Call WriteBinaryStream to write a binary value from a specified stream to a specified key in the registry. WriteBinaryStream writes from the current position in the stream to the end.

Section is the key for the section that contains the subkey where the binary data should be written.

Name is the subkey under which the binary data is stored.

Value is a stream from which the binary value can be read.

Note:	Attempting to write a value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteBinaryStream creates the section and key and sets its initial value to the stream’s data.


TRegistryIniFile.WriteDate
 VCL Reference

TRegistryIniFile.WriteDate

TRegistryIniFile	See also

Writes a date value to an INI file.

procedure WriteDate(const Section, Ident: String; Value: TDateTime); override;

Description

Call WriteDate to write a date value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the date value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteDate creates the section and key and sets its initial value to Value.


TRegistryIniFile.WriteDateTime
 VCL Reference

TRegistryIniFile.WriteDateTime

TRegistryIniFile	See also

Writes a date-time value to an INI file.

procedure WriteDateTime(const Section, Ident: String; Value: TDateTime); override;

Description

Call WriteDateTime to write a date-time value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the date-time value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteDateTime creates the section and key and sets its initial value to Value.


TRegistryIniFile.WriteFloat
 VCL Reference

TRegistryIniFile.WriteFloat

TRegistryIniFile	See also

Writes a float value to an INI file.

procedure WriteFloat(const Section, Ident: String; Value: Double); override;

Description

Call WriteFloat to write a float value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the float value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteFloat creates the section and key and sets its initial value to Value.


TRegistryIniFile.WriteInteger
 VCL Reference

TRegistryIniFile.WriteInteger

TRegistryIniFile	See also 	Example

Writes an integer value to an INI file.

procedure WriteInteger(const Section, Ident: String; Value: Longint); override;

Description

Call WriteInteger to write an integer value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the integer value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteInteger creates the section and key and sets its initial value to Value.


TRegistryIniFile.WriteString
 VCL Reference

TRegistryIniFile.WriteString

TRegistryIniFile	See also 	Example

Writes a string value to an INI file.

procedure WriteString(const Section, Ident, Value: String); override;

Description

Call WriteString to write a string value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the string value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteString creates the section and key and sets its initial value to Value.


TRegistryIniFile.WriteTime
 VCL Reference

TRegistryIniFile.WriteTime

TRegistryIniFile	See also

Writes a time value to an INI file.

procedure WriteTime(const Section, Ident: String; Value: TDateTime); override;

Description

Call WriteTime to write a time value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the time value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteTime creates the section and key and sets its initial value to Value.


Hierarchy

TObject

TCustomIniFile

TRegistryIniFile


TReplaceDialog
 VCL Reference

 TReplaceDialog

Hierarchy	Properties	Methods	Events	See also

TReplaceDialog displays a search-and-replace dialog.

Unit

Dialogs

Description

TReplaceDialog is a special version of TFindDialog that prompts the user for both a search string and a replace string. Like the Find dialog, the Replace dialog is modeless and does not appear at runtime until activated by a call to the Execute method.


 VCL Reference

TReplaceDialog properties

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

ReplaceText

Derived from TFindDialog

FindText

Left

Options

Position

Top

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TReplaceDialog properties

TReplaceDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DesignInfo

FindText

Handle

HelpContext

Left

Name

Options

Owner

Position

ReplaceText

Tag

Top

VCLComObject


TReplaceDialog::ReplaceText
 VCL Reference

TReplaceDialog::ReplaceText

TReplaceDialog	See also 	Example

Contains the text that should replace FindText.

property ReplaceText: String;

Description

FindText, taken from the Find What edit box, contains the text string that the user wants to search for. ReplaceText, taken from the Replace With edit box, contains the text string that will replace FindText. To make a default text string appear in the Replace With edit box when the dialog opens, assign a value to ReplaceText in the Object Inspector or in program code.


 VCL Reference

TReplaceDialog events

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

OnReplace

Derived from TFindDialog

OnFind

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TReplaceDialog events

TReplaceDialog	By object	Legend

OnClose

OnFind

OnReplace

OnShow


TReplaceDialog.OnReplace
 VCL Reference

TReplaceDialog::OnReplace

TReplaceDialog	See also 	Example

Occurs when the user clicks the Replace or Replace All button.

property OnReplace: TNotifyEvent;

Description

OnReplace occurs whenever the user clicks Replace or Replace All. In addition, when the user clicks Replace, the frReplace flag is set (and the frReplaceAll flag is turned off) in Options. When the user clicks ReplaceAll, the frReplaceAll flag is set (and the frReplace flag is turned off) in Options.

Write an OnReplace event handler that searches for the text specified in FindText and replaces it with the text in ReplaceText. Use the Options flags to determine how the search is conducted.


 VCL Reference

TReplaceDialog methods

TReplaceDialog	Alphabetically	Legend

In TReplaceDialog

Create

Derived from TFindDialog

CloseDialog

Destroy

Execute

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TReplaceDialog methods

TReplaceDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseDialog

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TReplaceDialog.Create
 VCL Reference

TReplaceDialog.Create

TReplaceDialog	See also

Creates and initializes a TReplaceDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TReplaceDialog instance, but the new dialog does not appear on the form at runtime until the Execute method is called.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TFindDialog

TReplaceDialog


ActivateClassGroup procedure
 VCL Reference

ActivateClassGroup procedure

See also

Activates a group of classes that derive from TPersistent.

Unit

Classes

Category:

streaming utilities

function ActivateClassGroup(AClass: TPersistentClass): TPersistentClass;

Description

The streaming system allows the classes that can be loaded and saved to be registered in separate groups. This allows the IDE to distinguish between CLX classes (which can be used in cross-platform applications) and VCL classes (which are only available on Windows). Call ActivateClassGroup to activate the group of classes that contains the class specified by AClass. If AClass is in more than one group, all groups that contain the class are activated.

ActivateClassGroup returns the class that was last used to activate a class group.

If the requested class group cannot be activated ActivateClassGroup raises an exception.


AllocateHwnd function
 VCL Reference

AllocateHWnd function

See also	Example

Creates a window that implements a specified window procedure.

Unit

Classes

Category

Windows controls utilities

function AllocateHWnd(Method: TWndMethod): HWND;

Description

Call AllocateHWnd to create a window that is not associated with a windowed control. Typically, this method is used to create non-visual windows that respond to messages but that do not appear in the user interface. For example, the TTimer component uses this method to create a window that responds to timer messages from Windows.

The Method parameter specifies the window procedure that the generated window uses to respond to messages.

AllocateHWnd returns the handle of the newly created window.

Note:	Use the DeallocateHWnd procedure to free windows that are created using AllocateHWnd.


BinToHex procedure
 VCL Reference

BinToHex procedure

See also

Converts a binary value into its hexadecimal representation.

Unit

Classes

Category

type conversion routines

procedure BinToHex(Buffer, Text: PChar; BufSize: Integer);

Description

Call BinToHex to convert the binary value in a buffer into a string that is its hexadecimal representation.

Buffer is a buffer of bytes that contains the binary value.

Text returns a null-terminated string that represents the value of Buffer as a hexadecimal number.

BufSize is the size of Buffer. Text needs to point to a sequence of characters that has at least 2*BufSize bytes because each hexadecimal character represents two bytes.


CheckSynchronize function
 VCL Reference

CheckSynchronize function

See also

Allows background threads to synchronize their execution with the main thread.

Unit

Classes

Category

thread management routines

function CheckSynchronize: Boolean;

Description

It is not necessary to call CheckSynchronize in a GUI application. The call to CheckSynchronize is made automatically by the application object. In a non-GUI application, you must call CheckSynchronize if you use the Synchronize method of TThread. To do this, set the WakeMainThread variable to a procedure that calls CheckSynchronize.

CheckSynchronize allows background threads to synchronize their execution with the main thread, so that it is safe to make method calls in the background thread.

CheckSynchronize returns True if a method was synchronized, False if it does nothing.


CurrentGroup variable
 VCL Reference

CurrentGroup variable

See also

Keeps track of which objects are associated with which packages.

Unit

Classes

Category

package support routines

var CurrentGroup: Integer;

Description

When a design-time package registers a property editor class, the registration list has to keep track of what package that property editor class is associated with.  Tracking this association ensures that if the package needs to be unloaded at design time (to recompile the package), the registration list knows which property classes to delete from its list. CurrentGroup is used to obtain an indicator that represents this association. It gets incremented every time a package is loaded at design time.

CurrentGroup is used to write design-time tools that keep track of things stored in other packages.


CollectionsEqual function
 VCL Reference

CollectionsEqual function

See also

Compares the contents of two collections.

Unit

Classes

Category

comparison routines

function CollectionsEqual(C1, C2: TCollection; Owner1, Owner2: TComponent): Boolean;

Description

Call CollectionsEqual to determine whether two collections contain identical information. CollectionsEqual returns True if all the items in each collection have the same settings, and the items appear in the same order. CollectionsEqual returns False if the collections differ in number or order of items, or if any of the items in the collections differ.

C1 and C2 are the collections to compare.

Owner1 and Owner2 are the Owners of the collections. Owner1 and Owner2 must be “root” components, such as forms or data modules. They are used for resolving name references in the properties of the collections.


CountGenerations function
 VCL Reference

CountGenerations function

Returns the number of intermediate classes between a derived class and its ancestor.

Unit

Classes

Category

miscellaneous routines

function CountGenerations(Ancestor, Descendant: TClass): Integer;

Description

Use CountGenerations to determine how close a derived class is to one of its ancestors. For example, if Ancestor and Descendant are the same class, CountGenerations returns 0. If Descendant is derived directly from Ancestor, CountGenerations returns 1.

Ancestor is the ancestor class.

Descendant is the descendant class. If it is not the same as Ancestor or does not derive from Ancestor, CountGenerations returns –1.

Tip:	To check that Descendant derives from Ancestor, use the is operator to check that Descendant is Ancestor before calling CountGenerations.


CreateVCLComObjectProc variable
 VCL Reference

CreateVCLComObjectProc variable

See also

Specifies a procedure that creates a COM object associated with a component.

Unit

Classes

Category

COM utilities

var CreateVCLComObjectProc: procedure(Component: TComponent) = nil;

Description

Components (TComponent and its descendants) can act as COM objects by delegating to an associated object that supports the IVCLComObject interface, which is defined in the Classes unit. This associated object is the value of the component’s ComObject property.

The procedure specified by CreateVCLComObjectProc creates the associated object for the component specified by the Component parameter. When the CreateVCLComObjectProc variable is not nil, reading a component’s ComObject property causes the component to call the assigned procedure to instantiate the associated object. This object is then used to implement subsequent calls to the component’s _AddRef, _Release, QueryInterface, FreeOnRelease, GetIDsOfNames, GetTypeInfo, GetTypeInfoCount, Invoke, and SafeCallException methods.

By default, CreateVCLComObjectProc is nil. The VCLCom unit assigns a value to this variable to link VCL components into the Delphi ActiveX framework (DAX). The procedure in the VCLCom unit instantiates a COM object that supports a particular threading model such as the apartment (setting up thread apartments) or free-threading model.

Assign a value to CreateVCLComObjectProc to provide your own implementation that lets a component act as a COM object. The assigned procedure should create an object that supports the IVCLComObject interface and assign it to the Component parameter’s VCLComObject property.

Note:	Do not assign a value to CreateVCLComObjectProc if you are using the VCLCom unit.


DeallocateHwnd procedure
 VCL Reference

DeallocateHwnd procedure

See also	Example

Frees a window that was created using AllocateHWnd.

Unit

Classes

Category

Windows controls utilities

procedure DeallocateHWnd(Wnd: HWND);

Description

Call DeallocateHWnd to free a window that was created using the AllocateHWnd function. Windows must be freed to release the system resources that they consume.

The Wnd parameter is the window handle of the window to be freed. This value is the same as the handle returned by the call to AllocateHWnd.

Warning:	Do not use DeallocateHWnd on the handle of a windowed control. Windowed controls free their handles using the protected DestroyHandle method, which ensures that the control is left in a consistent state.


ExtractStrings function
 VCL Reference

ExtractStrings function

See also

Fills a string list with substrings parsed from a delimited list.

Unit

Classes

Category

string handling routines (null-terminated)

function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings): Integer;

Description

Use ExtractStrings to fill a string list with the substrings of the null-terminated string specified by Content.

Separators is a set of characters that are used as delimiters, separating the substrings. Carriage returns, newline characters, and quote characters (single or double) are always treated as separators. Separators are ignored when inside a quoted string until the final end quote. (Note that quoted characters can appear in a quoted string if the quote character is doubled.)

WhiteSpace is a set of characters to be ignored when parsing Content if they occur at the beginning of a string.

Content is the null-terminated string to parse into substrings.

Strings is a string list to which all substrings parsed from Content are added. The string list is not cleared by ExtractStrings, so any strings already in the string list are preserved.

ExtractStrings returns the number of strings added to the Strings parameter.

Note:	ExtractStrings does not add empty strings to the list.


FindClass function
 VCL Reference

FindClass function

See also

Finds and returns a class that is derived from TPersistent.

Unit

Classes

Category:

streaming utilities

function FindClass(const ClassName: string): TPersistentClass;

Description

Call FindClass to locate a class type by name.  FindClass searches the classes that the streaming system knows about.  Form classes and component classes that are referenced in a form declaration (instance variables) are automatically registered with the streaming system.  Other classes can be registered (with a call to RegisterClasses) so that the streaming system will recognize that class in a stream and know how to construct it.

If the requested class name cannot be found, FindClass raises an exception.


FindGlobalComponent function
 VCL Reference

FindGlobalComponent function

See also

Returns a top-level container component.

Unit

Classes

Category

streaming utilities

function FindGlobalComponent(const Name: string): TComponent;

Description

FindGlobalComponent is used by the component streaming system to implement form linking. When a component property refers to a component on another form, data module, or other top-level container component, the streaming system calls FindGlobalComponent to locate the root object in the form linking reference (e.g. Form1 in "Form1.Edit1"). If the object cannot be found, FindGlobalComponent returns nil.


GetClass function
 VCL Reference

GetClass function

See also	Example

Returns a registered persistent class given its name.

Unit

Classes

Category

streaming utilities

function GetClass(const ClassName: string): TPersistentClass;

Description

Call GetClass to obtain a class from a class name. This class can be used as a parameter to routines that require a class.

The Class must be registered before GetClass can find it.  Form classes and component classes that are referenced in a form declaration (instance variables) are automatically registered when the form is loaded.  Other classes can be registered by calling RegisterClass or RegisterClasses.


GroupDescendentsWith procedure
 VCL Reference

GroupDescendentsWith procedure

See also

Adds a specified class to the group in which another class appears.

Unit

Classes

Category:

streaming utilities

procedure GroupDescendentsWith(AClass, AClassGroup: TPersistentClass);

Description

Call GroupDescendentsWith to add the class specified by AClass to the same group as the one that contains AClassGroup. If AClassGroup is a member of more than one group, GroupDescendentsWith adds AClass to the group that contains the nearest ancestor of AClassGroup. (The nearest ancestor is the ancestor for which CountGenerations returns the lowest value).

If AClassGroup is not a member of any group, GroupDescendentsWith raises an exception.


HexToBin function
 VCL Reference

HexToBin function

See also

Converts a string of hexadecimal digits to the corresponding binary value.

Unit

Classes

Category

type conversion routines

function HexToBin(Text, Buffer: PChar; BufSize: Integer): Integer

Description

Call HexToBin to convert the hexadecimal string Text to the binary value it represents.

Text is a string representation of a hexadecimal value.

Buffer returns the resulting value in binary.

BufSize is the size of Buffer. Text needs to point to at least 2*BufSize hexadecimal characters, because each two hexadecimal characters represent one byte.

HexToBin returns the number of characters in Buffer that have not been used because Text did not contain valid hexadecimal characters ('0'..'f').

Note:	The hexadecimal number must use lower-case characters; HexToBind does not recognize upper-case characters.


IdentToInt function
 VCL Reference

IdentToInt function

See also

Uses a mapping array to convert string identifiers into their corresponding integer values.

Unit

Classes

Category

streaming utilities

type

  TIdentMapEntry = record

    Value: Integer;

    Name: String;

  end;

function IdentToInt(const Ident: string; var Int: Longint; const Map: array of TIdentMapEntry): Boolean;

Description

IdentToInt provides the underlying translation from string identifiers to integers that occurs when you register a mapping using the RegisterIntegerConsts procedure.

Ident is the string identifier to translate.

Int returns the corresponding integer value.

Map is an array of records that describe the mapping. Each member of the array contains a Value field, which is the integer value to return and a Name field, which is the string identifier to translate.

IdentToInt looks for the string specified by Ident as the Name field on an entry in Map. If it finds a match, it sets Int to the corresponding Value field and returns True. If it does not find a match, it returns False.


InitInheritedComponent function
 VCL Reference

InitInheritedComponent function

See also

Initializes streaming of a form file for an inherited root class.

Unit

Classes

Category

streaming utilities

function InitInheritedComponent(Instance: TComponent; RootAncestor: TClass): Boolean;

Description

Call InitInheritedComponent from the constructor of a root class to start streaming in of information in the associated form file.

Instance is the object being instantiated.

RootAncestor is the base root class of which Instance may represent a descendant. This class must be a root class, meaning a class such as TCustomForm, TFrame, or TDataModule, which is the starting point of the streaming process (the component associated with the form file).

InitInheritedComponent returns True if the .dfm file was successfully streamed in, False otherwise.

The call to InitInheritedComponent is only required for descendant classes of the root class, and must follow the construction of the object instance except for streaming in of persistent properties in the form file. The following code shows a typical root class contstructor:

constructor TMyRootClass.Create(AOwner: TComponent);

begin

  inherited Create(AOwner); { first construct an object instance }

  if (ClassType <> TMyRootClass) and not (csDesigning in ComponentState) then

  begin

    if not InitInheritedComponent(Self, TMyRootClass) then

      raise EResNotFound.CreateFmt(SResNotFound, [ClassName]);

  end;

end;


IntToIdent function
 VCL Reference

IntToIdent function

See also

Uses a mapping array to convert integers into their corresponding string identifiers.

Unit

Classes

Category

streaming utilities

type

  TIdentMapEntry = record

    Value: Integer;

    Name: String;

  end;

function IntToIdent(Int: Longint; var Ident: string; const Map: array of TIdentMapEntry): Boolean;

Description

IntToIdent provides the underlying translation from integers to string identifiers that occurs when you register a mapping using the RegisterIntegerConsts procedure.

Int is the integer to translate.

Ident returns the corresponding string identifier.

Map is an array of records that describe the mapping. Each member of the array contains a Value field, which is the integer value to translate and a Name field, which is the corresponding string identifier.

IntToIdent looks for the integer specified by Int as the Value field on an entry in Map. If it finds a match, it sets Ident to the corresponding Name field and returns True. If it does not find a match, it returns False.


InvalidPoint function
 VCL Reference

InvalidPoint function

Indicates whether a specified point is equal to (-1,-1).

Unit

Classes

Category

geometric routines

function InvalidPoint(const At: TPoint): Boolean; overload;

function InvalidPoint(const At: TSmallPoint): Boolean; overload;

function InvalidPoint(X, Y: Integer): Boolean; overload;

Description

The point (-1,-1) is often used, by convention, to represent an invalid set of coordinates. This convention is often employed by Windows API functions. When working with other code that uses this convention, use InvalidPoint to identify coordinate values that are invalid.

At is the point to examine.

X and Y identify the point by giving the X and Y coordinates respectively.

InvalidPoint returns True if the specified point is (-1,-1), False otherwise.


IsUniqueGlobalComponentName function
 VCL Reference

IsUniqueGlobalComponentName function

See also

Indicates whether a proposed component name is unambiguous.

Unit

Classes

Category

streaming utilities

function IsUniqueGlobalComponentName(const Name: string): Boolean;

Description

IsUniqueGlobalComponentName returns True if the name specified by Name is not currently used by any component on any form, data module, or other top-level container component. IsUniqueGlobalComponentName returns False if another component is already using Name (in which case, references to the component should be qualified by the root object’s name.


LineStart function
 VCL Reference

LineStart function

Finds the end of the last whole line in a buffer.

Unit

Classes

Category

string handling routines (null-terminated)

function LineStart(Buffer, BufPos: PChar): PChar;

Description

Use LineStart to find the start of the last partial line in the buffer. LineStart starts at BufPos and scans backwards for a line-feed character (\n).  It returns a pointer to that character.  If no line-feed char is found, it returns the Buffer pointer.  Buffer should point to the beginning of a block of memory and BufPos to the end of the block you want to scan.

Note:	The undocumented TParser class uses LineStart to locate line-endings in chunks of text read into a fixed-size buffer. When the last full line of text is parsed, the parser moves the last partial line of text from the end of the buffer to the front and fills the rest of the buffer with new data from disk.


ObjectBinaryToText procedure
 VCL Reference

ObjectBinaryToText procedure

See also	Example

Converts the binary representation of an object into more readily understandable text.

Unit

Classes

Category

streaming utilities

procedure ObjectBinaryToText(Input, Output: TStream); overload;

procedure ObjectBinaryToText(Input, Output: TStream; var OriginalFormat: TStreamOriginalFormat); overload;

Description

Call ObjectBinaryToText to convert the representation of an object as it is saved in files and memory streams into a text version that human readers can understand. ObjectBinaryToText creates a TReader object for the Input stream, and uses this to read the saved representation of the object. A symbolic text representation is then written to the Output stream. OriginalFormat indicates the format in which the object was saved.

Use the WriteComponent method of the Input stream to write a binary representation before calling ObjectBinaryToText.


ObjectResourceToText procedure
 VCL Reference

ObjectResourceToText procedure

See also

Converts the binary representation of an object resource into more readily understandable text.

Unit

Classes

Category

streaming utilities

procedure ObjectResourceToText(Input, Output: TStream); overload;

procedure ObjectResourceToText(Input, Output: TStream; var OriginalFormat: TStreamOriginalFormat); overload;

Description

Call ObjectResourceToText to convert the representation of an object as it is saved in module resource files into a text version that that human readers can understand. ObjectResourceToText is the same as ObjectBinaryToText, except that it reads from a stream that includes a resource header.

ObjectResourceToText converts the binary version of a form, as stored in a .dfm file, into the text version that can be seen by right clicking the form and choosing View As Text.

Use the WriteComponentRes method of the Input stream to write the binary representation before calling ObjectResourceToText.


ObjectTextToBinary procedure
 VCL Reference

ObjectTextToBinary procedure

See also	Example

Converts a symbolic text representation of an object into the binary version that is used to save the object to files or memory streams.

Unit

Classes

Category

streaming utilities

procedure ObjectTextToBinary(Input, Output: TStream); overload;

procedure ObjectTextToBinary(Input, Output: TStream; var OriginalFormat: TStreamOriginalFormat); overload;

Description

Call ObjectTextToBinary to create the internal representation of a component from a symbolic text representation. ObjectTextToBinary creates a TWriter object for the Output stream, and uses this to write the form file representation of the object from the symbolic representation that is read from the Input stream. OriginalFormat indicates whether the output stream stores the object in binary or text format.

Use the ReadComponent method of the output stream to obtain the actual object.


ObjectTextToResource procedure
 VCL Reference

ObjectTextToResource procedure

See also

Converts a symbolic text representation of an object into an internal binary representation.

Unit

Classes

Category

streaming utilities

procedure ObjectTextToResource(Input, Output: TStream); overload;

procedure ObjectTextToResource(Input, Output: TStream; var OriginalFormat: TStreamOriginalFormat); overload;

Description

Call ObjectTextToResource to create a component from the representation of an object as it is saved in module resource files. ObjectTextToResource is the same as ObjectTextToBinary, except that it skips over any object headers and includes a resource header instead. Use the ReadComponentRes method of the output stream to obtain the actual object.

ObjectTextToResource converts the text version of a form that can be seen by right clicking the form and choosing View As Text into the binary version which is stored in a .dfm file.


PointsEqual function
 VCL Reference

PointsEqual function

Indicates whether two points have the same coordinates.

Unit

Classes

Category

geometric routines

function PointsEqual(const P1, P2: TPoint): Boolean; overload;

function PointsEqual(const P1, P2: TSmallPoint): Boolean; overload;

Description

Call PointsEqual to compare two points. PointsEqual returns True if P1 has the same coordinates as P2, False if the two points differ.


ReadComponentRes function
 VCL Reference

ReadComponentRes function

See also

Reads components and their properties from a specified Windows resource.

Unit

Classes

Category

streaming utilities

function ReadComponentRes(const ResName: string; Instance: TComponent): TComponent;

Description

Call ReadComponentRes to create a component from its representation in a Windows resource header. The ResName parameter is the name assigned to the resource for the component. The Instance parameter is an instance of the component that should be filled in with the attributes of the saved resource. Instance must be an object of the same class as the saved resource, or one of its descendants.  Create an instance of the appropriate type of object, and then call ReadComponentRes to read in its property settings. If Instance is NULL, the object class is read from the resource.

ReadComponentRes returns an instance of the component that was read from the resource.


ReadComponentResEx function
 VCL Reference

ReadComponentResEx function

See also

Reads a component from a resource.

Unit

Classes

Category

streaming utilities

function ReadComponentResEx(HInstance: THandle; const ResName: string): TComponent;

Description

Use ReadComponentResEx to load a component from a resource stored in a particular module (as opposed to ReadComponentRes, which assumes the current module).

The HInstance parameter is the instance handle for the module that stores the component as a resource.  The ResName parameter is the name assigned to the resource for the component.

ReadComponentResEx returns an instance of the component that was read from the resource.


ReadComponentResFile function
 VCL Reference

ReadComponentResFile function

See also	Example

Reads components and their properties from a specified Windows resource file.

Unit

Classes

Category

streaming utilities

function ReadComponentResFile(const FileName: string; Instance: TComponent): TComponent;

Description

Call ReadComponentResFile to create a component and its children from their representation in a Windows resource file.

The FileName parameter is the name of the compiled resource file that contains the component resource.

The Instance parameter is an instance of the type of component that should be read. Create an instance of the appropriate type of object, and then call ReadComponentResFile to read in its property settings. If Instance is NULL, the object class is read from the resource. Before passing an Instance parameter of NULL, all classes being read must have been registered using the RegisterClass or RegisterClasses routine.

ReadComponentResFile returns an instance of the component that was read from the resource file.


Rect function
 VCL Reference

Rect function

See also	Example

Creates a TRect structure from a set of coordinates.

Unit

Classes

Category

type conversion routines

function Rect(ALeft, ATop, ARight, ABottom: Integer): TRect; overload;

function Rect(const ATopLeft, ABottomRight: TPoint): TRect; overload;

Description

Call Rect to create a TRect that represents the rectangle with the specified coordinates. Use Rect to construct parameters for functions that require TRect, rather than setting up local variables for each parameter.


RegisterClass procedure
 VCL Reference

RegisterClass procedure

See also

Registers a class of persistent object so that it’s class type can be retrieved.

Unit

Classes

Category

streaming utilities

procedure RegisterClass(AClass: TPersistentClass);

Description

Call RegisterClass to register a class with the streaming system. Form classes and component classes that are referenced in a form declaration (instance variables) are automatically registered.  Any other classes used by an application must be explicitly registered by calling RegisterClass if instances are to be saved.

Once classes are registered, they can be loaded or saved by the component streaming system. IdentToInt returns nil when passed the class name of an unregistered class, and FindClass raises an exception for unregistered classes.

The AClass parameter is the class that is descended from TPersistent. Put the call to RegisterClass in a Register procedure or in the initialization section of the unit in which the class is defined.

If the class is already registered, RegisterClass does nothing. If a different class with the same name is already registered, RegisterClass raises an EFilerError exception.

Note:	Registering a component using the RegisterNoIcon or RegisterComponents method does not automatically register the class. It is still necessary to call RegisterClass for components.


RegisterClassAlias procedure
 VCL Reference

RegisterClassAlias procedure

See also

Registers a class that is identical to another class except for the name.

Unit

Classes

Category

streaming utilities

procedure RegisterClassAlias(AClass: TPersistentClass; const Alias: string);

Description

Component writers call RegisterClassAlias to register custom classes that are identical to another persistent class except for the name. Registering a class allows it to be loaded and saved by the component streaming system.

The AClass parameter identifies the previously registered persistent class to which the new class is identical. The Alias parameter specifies the class name of the new class.


RegisterClasses procedure
 VCL Reference

RegisterClasses procedure

See also

Registers a set of classes.

Unit

Classes

Category

streaming utilities

procedure RegisterClasses(AClasses: array of TPersistentClass);

Description

Call RegisterClasses to register a set of custom classes in a single line. Each class is registered by calling RegisterClass. Unregistered classes can’t be loaded or saved by the component streaming system.


RegisterComponents procedure
 VCL Reference

RegisterComponents procedure

See also 	Example

Registers a set of components so that they all appear on the same page of the component palette.

Unit

Classes

Category

component registration routines

procedure RegisterComponents(const Page: string; ComponentClasses: array of TComponentClass);

Description

Call RegisterComponents to install a set of components in the IDE. Once a component is registered, it appears on the component palette, where it can be selected and placed on forms or data modules. Registered components can communicate with the Object Inspector to allow the user to get and set properties and events.

Set the Page parameter to the name of the page on the component palette where the components should appear. If the named page already exists, the components are added to that page. If the named page does not exist, a new palette page with that name is created.

Pass the components to be registered in the ComponentClasses parameter.

Call RegisterComponents from the implementation of the Register procedure in one of the units that defines the custom components. The units that define the components must then be compiled into a package and the package must be installed before the custom components appear in the component palette.

Note:	After components are registered, users can move them to different palette pages. Once this happens, the component always appears on the new page. Calling RegisterComponents a second time does not influence the page on which the component appears.


RegisterIntegerConsts procedure
 VCL Reference

RegisterIntegerConsts procedure

See also

Registers conversion functions for string identifiers that represent type values.

Unit

Classes

Category

streaming utilities

procedure RegisterIntegerConsts(AIntegerType: Pointer; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);

Description

RegisterIntegerConsts registers conversion functions for type identifiers. Call RegisterIntegerConsts from the initialization section of the unit that defines an integer-based type and a set of strings that represent the values of that type.

AIntegerType is a pointer to the type information for the integer-based type whose values are represented as strings. Its value can be obtained from the base type using the TypeInfo function.

AIdentToInt is the conversion function that converts strings that are symbolic representations of values to the corresponding integers.

AIntToIdent is the conversion function that converts values that are instances of the base type to the corresponding string representation.

Once the conversion functions are registered, string identifiers can represent type values and the conversion functions are used to convert the string identifiers into the underlying integer values.  For example, the TColor type uses this system to convert between the type constants in the Graphics unit and numeric TColor values.


RegisterNoIcon procedure
 VCL Reference

RegisterNoIcon procedure

See also

Registers a set of components but does not add them to the component palette.

Unit

Classes

Category

component registration routines

procedure RegisterNoIcon(ComponentClasses: array of TComponentClass);

Description

Call RegisterNoIcon to register a set of custom components so that objects from that class can use the Object Inspector. Because the components are not added to the component palette, instances of components registered using RegisterNoIcon must be explicitly created by calling the constructor, usually from another component.

The ComponentClasses parameter is an array of custom classes that are descended from TComponent.

Put the call to RegisterNoIcon in the Register procedure.

To add the components to the component palette, use RegisterComponents instead.


RegisterNonActiveX procedure
 VCL Reference

RegisterNonActiveX procedure

See also

Prevents a set of components from being made available to the ActiveX wizard.

Unit

Classes

Category

component registration routines

procedure RegisterNonActiveX(ComponentClasses: array of TComponentClass; AxRegType: TActiveXRegType);

Description

Call RegisterNonActiveX to prevent a registered set of custom components from being converted into ActiveX controls using the ActiveX wizard. The components must still be registered using RegisterComponents or RegisterNoIcon if they are to work with the Object Inspector.

The ComponentClasses parameter is an array of custom classes that are descended from TComponent. The AxRegType parameter indicates whether only the components in the ComponentClasses array should be blocked from the ActiveX wizard (AxRegType = axrComponentOnly), or whether their descendants should be prohibited from becoming ActiveX controls as well (AxRegType = axrIncludeDescendants).

Put the call to RegisterNonActiveX in the Register procedure.


SmallPoint function
 VCL Reference

SmallPoint function

See also

Creates a TSmallPoint structure from a pair of coordinates.

Unit

Classes

Category

type conversion routines

function SmallPoint(AX, AY: SmallInt): TSmallPoint;

Description

Call SmallPoint to create a TSmallPoint that represents the specified coordinates.


StartClassGroup procedure
 VCL Reference

StartClassGroup procedure

See also

Starts a class group derived from TPersistent.

Unit

Classes

Category:

streaming utilities

procedure StartClassGroup(AClass: TPersistentClass);

Description

The streaming system allows the classes that can be loaded and saved to be registered in separate groups. This allows the IDE to distinguish between CLX classes (which can be used in cross-platform applications) and VCL classes (which are only available on Windows). StartClassGroup creates a new group of classes, and adds the class specified by AClass to that group.


TestStreamFormat function
 VCL Reference

TestStreamFormat function

See also

Identifies the format of a form file when reading it from a stream.

Unit

Classes

Category

streaming utilities

function TestStreamFormat(Stream: TStream): TStreamOriginalFormat;

Description

Call TestStreamFormat to check the signature of a stream that reads a form file to determine whether it was stored in binary or text format.

Stream is the stream to check.

TestStreamFormat checks the signature of the stream and returns sofBinary if the form file was saved in binary format, sofText if it was saved in text format, and sofUnknown if it could not tell. A return value of sofUnknown usually indicates that the stream is not reading a form file or that the stream is not positioned at the start of the file.


UnregisterClass procedure
 VCL Reference

UnregisterClass procedure

See also

Unregisters an object class.

Unit

Classes

Category

streaming utilities

procedure UnRegisterClass(AClass: TPersistentClass);

Description

Call UnregisterClass to unregister an object class. When a class is unregistered, it can’t be loaded or saved by the component streaming system.

After unregistering a class, its name can be reused to register another object class.


UnregisterClasses procedure
 VCL Reference

UnregisterClasses procedure

See also

Unregisters a set of classes.

Unit

Classes

Category

streaming utilities

procedure UnRegisterClasses(AClasses: array of TPersistentClass);

Description

Call UnregisterClasses to unregister several persistent object classes in a single line. When a class is unregistered, it can’t be loaded or saved by the component streaming system.

The AClasses parameter specifies the classes (descendants of TPersistent) to unregister.

After unregistering a class, its name can be reused to register another object class.


UnregisterIntegerConsts procedure
 VCL Reference

UnregisterIntegerConsts procedure

See also

Unregisters conversion functions for string identifiers that represent type values.

Unit

Classes

Category

streaming utilities

procedure UnregisterIntegerConsts(AIntegerType: Pointer; AIdentToInt: TIdentToInt; AIntToIdent: TIntToIdent);

Description

UnregisterIntegerConsts unregisters conversion functions that were previously registered by a call to RegisterIntegerConsts. Call UnregisterIntegerConsts from the finalization section of the unit that defines the constants and registers the conversion functions in its initialization section. Once the conversion functions are unregistered, string identifiers can’t be used to represent type values.

AIntegerType is a pointer to the type information for the integer-based type whose values are represented as strings. Its value can be obtained from the base type using the TypeInfo function.

AIdentToInt is the conversion function that converts strings that are symbolic representations of values to the corresponding integers.

AIntToIdent is the conversion function that converts values that are instances of the base type to the corresponding string representation.


UnregisterModuleClasses procedure
 VCL Reference

UnregisterModuleClasses procedure

See also

Unregisters all classes defined in a specified module.

Unit

Classes

Category

streaming utilities

procedure UnRegisterModuleClasses(Module: HMODULE);

Description

Call UnregisterModuleClasses to unregister all object classes that were registered by the module with the handle specified by the Module parameter. When a class is unregistered, it can’t be loaded or saved by the component streaming system.

After unregistering a class, its name can be reused to register another object class.


WakeMainThread variable
 VCL Reference

WakeMainThread variable

See also

Represents a method (event handler) that is forced into the main thread’s queue.

Unit

Classes

Category

thread management routines

var WakeMainThread: TNotifyEvent = nil;

Description

Assign a method to WakeMainThread before calling a thread’s Synchronize method. When you call a thread’s Synchronize method, it calls the method assigned to WakeMainThread once it has obtained a lock on the main GUI thread. This allows other threads to quickly synchronize with the GUI thread even if no events are being processed due to an idle state.


WriteComponentResFile procedure
 VCL Reference

WriteComponentResFile procedure

See also	Example

Writes components and their properties to a file using a Windows resource file format.

Unit

Classes

Category

streaming utilities

procedure WriteComponentResFile(const FileName: string; Instance: TComponent);

Description

Use WriteComponentResFile to save the component specified by the Instance parameter to the specified file, storing it in a Windows resource-file format.

To read a component written with WriteComponentResFile, call ReadComponentResFile.


RegisterLibraryExpert procedure
 VCL Reference

RegisterLibraryExpert procedure

Registers an expert so that it is installed when a package is installed.

Unit

ExptIntf

Category

design tool registration routines

procedure RegisterLibraryExpert(Expert: TIExpert);

Description

Call RegisterLibrary to register an expert for a package so that it appears in the New Items dialog. If the package already has a registered expert, RegisterLibraryExpert does nothing.


Frame3D procedure
 VCL Reference

Frame3D procedure

See also

Draws a three dimensional frame on a canvas.

Unit

ExtCtrls

Category

graphics utilities

procedure Frame3D(Canvas: TCanvas; var Rect: TRect; TopColor, BottomColor: TColor; Width: Integer);

Description

Use Frame3D to create three-dimensional effects when drawing directly on a canvas.

The Canvas parameter is the canvas to draw on.

The Rect parameter specifies the position on the canvas where the three-dimensional rectangle should appear.  It returns the dimensions of the rectangle that lies inside the frame.

The TopColor and BottomColor parameters indicate the colors that appear on the left and top or the right and bottom of the rectangle respectively.

The Width parameter specifies the width of the frame.

To create a raised effect, the TopColor should be a light color and the BottomColor should be a shadow color.  To create a depressed effect, the TopColor should be the shadow color and the BottomColor should be the light color.  To create a beveled effect, draw a frame immediately inside another frame with the colors reversed.


Application variable
 VCL Reference

Application variable

There are several versions of the Application variable:

One for standard applications (declared in the Forms unit).

One for Web server applications (Declared in the Httpapp unit). The Web server Application variable is initialized as either an ISAPI application (in the Isapiapp unit) or a CGI application (in the Cgiapp unit). A single project should include only one of these.

One for service applications (Declared in the Svcmgr unit).

One for Control panel applets (Declared in the Ctlpanel unit).

Do not add more than one of these units (Forms, Cgiapp, Isapiapp, Svcmgr, or Ctlpanel) to the uses list of a project. When a program starts running, Delphi instantiates the Application variable as declared in the unit that is included in the project, and calls its Initialize method, its CreateForm method, and then its Run method. The behavior of the application depends on the implementation of these methods in the class of Application object that gets created.


Application variable (for standard applications)
 VCL Reference

Application variable (for standard applications)

See also 	Example

Represents application-level information.

Unit

Forms

Category

application-level information

var Application: TApplication;

Description

By default, when a new project is created, Delphi constructs an application object and assigns it to the Application variable in the Forms unit. Application has several properties that can be used to get information about an application while it runs.


ForegroundTask function
 VCL Reference

ForegroundTask function

Indicates whether the current thread is running in the foreground.

Unit

Forms

Category

thread management routines

function ForegroundTask: Boolean;

Description

Call ForegroundTask to determine whether the current thread is executing in the Foreground. This is useful if you want to provide feedback to users only if they are currently interacting with a window on the same thread, but do not want to interrupt other processes.

ForegroundTask checks whether the window that currently has focus belongs to the thread that executes the function. It returns True if the focused window belongs to the current thread, False otherwise.


GetParentForm function
 VCL Reference

GetParentForm function

See also

Returns the form or property page that contains a specified control.

Unit

Forms

Category

Windows controls utilities

function GetParentForm(Control: TControl): TCustomForm;

Description

Call GetParentForm to obtain the descendant of TCustomForm that contains the control specified by the Control parameter. If the control is not contained in a VCL form (for example, an ActiveX control embedded in another type of window), GetParentForm returns nil.


HintWindowClass variable
 VCL Reference

HintWindowClass variable

See also

Specifies the class for the window used to display help hints.

Unit

Forms

Category

application-level information

var HintWindowClass: THintWindowClass = THintWindow;

Description

When the application displays a Help Hint, it creates an instance of HintWindowClass to represent the window used for displaying the hint. Applications can customize this window by creating a descendant of THintWindow and assigning it to the HintWindowClass variable at application startup.


IsAccel function
 VCL Reference

IsAccel function

See also

Indicates whether a particular character is an accelerator character (or hot key) within a given menu caption or other text string.

Unit

Forms

Category

miscellaneous routines

function IsAccel(VK: Word; const Str: string): Boolean;

Description

Call IsAccel to determine whether the character represented by the VK (virtual key) parameter appears as an accelerator in the string specified by the Str parameter.  IsAccel only looks for accelerators that are identified by a preceding ampersand (&).  Such accelerators appear underlined in the string when displayed as a control’s caption.

Use IsAccel when processing key events to determine whether a key matches an accelerator character in a control’s caption.

Note:	IsAccel does not recognize hot key combinations in menu items that are identified by the HotKey property.


Screen variable
 VCL Reference

Screen variable

See also 	Example

Represents a screen device.

Unit

Forms

Category

application-level information

var Screen: TScreen;

Description

The Screen variable is a TScreen component that represents the screen of the system on which the application runs. By default, applications create a screen component based on information from Windows about the current screen device and assign it to Screen.


ValidParentForm function
 VCL Reference

ValidParentForm

See also

Returns the form or property page that contains a specified control.

Unit

Forms

Category

miscellaneous routines

function ValidParentForm(Control: TControl): TCustomForm;

Description

Call ValidParentForm to obtain the descendant of TCustomForm that contains the control specified by the Control parameter. If the control is not contained in a VCL form (for example, an ActiveX control embedded in another type of window), ValidParentForm raises an EInvalidOperation exception.


CharsetToIdent function
 VCL Reference

CharsetToIdent function

See also

Obtains the name of a character set.

Unit

Graphics

Category

graphics utilities

function CharsetToIdent(Charset: Longint; var Ident: string): Boolean;

Description

Call CharsetToIdent to obtain the symbolic name for the character set of a font. CharsetToIdent returns true if the Ident parameter is successfully given an identifying name for the character set.

Note:	The return value of CharsetToIdent does not indicate whether the Charset parameter is valid for a given font. Many fonts support only a limited number of character sets. Some fonts may support less common character sets that can't be mapped to identifiers by CharsetToIdent.


ColorToIdent function
 VCL Reference

ColorToIdent function

See also

Provides the symbolic name of a TColor value.

Unit

Graphics

Category

graphics utilities

function ColorToIdent(Color: Longint; var Ident: string): Boolean;

Description

Call ColorToIdent to obtain the name of the symbolic constant that represents a TColor value, such as clBlack or clWindow. The Ident parameter is set to the symbolic name. If there is no symbolic constant defined for the color, ColorToIdent returns False.


ColorToRGB function
 VCL Reference

ColorToRGB function

See also 	Example

Converts a TColor value into an RGB representation of the color.

Unit

Graphics

Category

graphics utilities

function ColorToRGB(Color: TColor): Longint;

Description

Call ColorToRGB to obtain an RGB representation of a color for using with Windows API calls. ColorToRGB strips away the information that is stored in the highest order bits about which palette to use for colors that are not always available.


ColorToString function
 VCL Reference

ColorToString function

See also

Returns a string that represents the name of a TColor value.

Unit

Graphics

Category

graphics utilities

function ColorToString(Color: TColor): string;

Description

Call ColorToString to obtain a string that represents a TColor value. If there is a symbolic constant defined for the color (such as clBlack or clWindow), ColorToString returns the name of the constant. Otherwise, ColorToString returns the hex value of the color, formatted as a string such as '$02FF8800'.


CopyPalette function
 VCL Reference

CopyPalette function

Creates a new palette object that matches an existing palette.

Unit

Graphics

Category

graphics utilities

function CopyPalette(Category: HPALETTE): HPALETTE;

Description

Call CopyPalette to create a new Windows palette object that exactly matches an existing palette. If the Palette parameter does not refer to a valid Windows palette, or if a problem occurs while copying the palette, CopyPalette returns 0.


CreateGrayMappedBmp function
 VCL Reference

CreateGrayMappedBmp function

See also

Remaps the standard gray colors in a bitmap with the system grays.

Unit

Graphics

Category

graphics utilities

function CreateGrayMappedBmp(Handle: HBITMAP): HBITMAP;

Description

Call CreateGrayMappedBmp to create a bitmap that uses the system gray colors (clBtnHightlight, clBtnFace, clBtnShadow and clBtnText) from a bitmap that uses standard gray scale colors (clWhite, clSilver, clGray, and clBlack). This allows an application to dynamically create images that match the user’s control panel settings, given a base image.

CreateGrayMappedBmp creates a new bitmap.  It does not alter the original bitmap, which has the handle specified by the Handle parameter.

Note:	CreateGrayMappedBmp does not work with bitmaps that have more than 256 colors. For bitmaps with more than 256 colors (8bpp), this function returns the original bitmap.


CreateGrayMappedRes function
 VCL Reference

CreateGrayMappedRes function

See also

Remaps the standard gray colors in a bitmap resource with the system grays.

Unit

Graphics

Category

graphics utilities

type THandle = Integer;

function CreateGrayMappedRes(Instance: THandle; ResName: PChar): HBITMAP;

Description

Call CreateGrayMappedRes to create a bitmap that uses the system gray colors (clBtnHightlight, clBtnFace, clBtnShadow and clBtnText) from a resourced bitmap that uses standard gray scale colors (clWhite, clSilver, clGray, and clBlack). This allows an application to dynamically create images that match the user’s control panel settings, by creating a base image as a bitmap resource.

Use the Instance and ResName parameters to identify the bitmap resource whose color table should be changed

Note:	CreateMappedRes does not work with bitmaps that have more than 256 colors. For bitmaps with more than 256 colors (8bpp), this function returns an instance of the original bitmap without color modifications.


CreateMappedBmp function
 VCL Reference

CreateMappedBmp function

See also

Changes the color table in a bitmap.

Unit

Graphics

Category

graphics utilities

function CreateMappedBmp(Handle: HBITMAP; const OldColors, NewColors: array ofTColor): HBITMAP;

Description

Call CreateMappedBmp to make selective changes to the color map of a bitmap. This function replaces the colors specified by the OldColors parameter with the colors specified by the NewColors parameter and returns the handle for a new device dependent bitmap (DDB) that uses the new color table. Handle is the handle to the bitmap whose color table should be changed. The OldColors and NewColors arrays should contain the same number of elements.

CreateMappedBmp creates a new bitmap.  It does not alter the original bitmap, which has the handle specified by the Handle parameter.

Note:	CreateMappedBmp does not work with bitmaps that have more than 256 colors. For bitmaps with more than 256 colors (8bpp), this function returns the original bitmap.


CreateMappedRes function
 VCL Reference

CreateMappedRes function

See also

Changes the color table in a bitmap resource.

Unit

Graphics

Category

graphics utilities

function CreateMappedRes(Instance: THandle; ResName: PChar; const OldColors, NewColors: array ofTColor): HBITMAP;

Description

Call CreateMappedRes to make selective changes to the color map of a resourced bitmap. This function replaces the colors specified by the OldColors parameter with the colors specified by the NewColors parameter and returns the handle for a new device dependent bitmap (DDB) that uses the new color table. Use the Instance and ResName parameters to identify the bitmap resource whose color table should be changed. The OldColors and NewColors arrays should contain the same number of elements.

Note:	CreateMappedRes does not work with bitmaps that have more than 256 colors. For bitmaps with more than 256 colors (8bpp), this function returns an instance of the original bitmap without color modifications.


DDBsOnly variable
 VCL Reference

DDBsOnly variable

See also

Determines whether bitmap handles are created as device-dependent bitmaps (DDB).

Unit

Graphics

Category

graphics utilities

var DDBsOnly: Boolean = False;

Description

Set DDBsOnly to force all bitmap handles to be created as device-dependent bitmaps (DDB). The default VCL bitmap handle format is DIB (device-independent bitmap).

Setting DDBsOnly to True undercuts much of the VCL graphics architecture; it should not be used unless it is absolutely required. Examples of when to set it to True are:

A graphics-intensive application does bitmap operations that Windows does not support with DIBs; you can either set each bitmap object to DDB before you access its handle property, or you can set this global variable to True.

An application uses hundreds of very small bitmaps. Each DIB consumes a separate 4k memory page. DIBs are less efficient for storing many small images than DDBs.  Before resorting to changing the DDBsOnly flag to address this, however, consider switching your code to use image lists instead of individual tiny bitmaps.  Image lists are more efficient than DIBs and DDBs for storing many same-size small images.

Note:	Setting DDBsOnly to True reintroduces the Delphi 2/Delphi 1 issue of image alteration.  When a BMP file or resource is loaded into a DDB, the color information in the original image is changed to fit the pixel format of the current video device and mode.  If you read an image, touch its handle, and write it out, you will not get the same file you read in.  DIBs solve this problem. Do not change DDBsOnly unless you have a specific need for device-dependent bitmaps and are willing to accept the image-altering DDB side effects.


GetCharsetValues procedure
 VCL Reference

GetCharsetValues procedure

See also 	Example

Passes the name of every predefined character set string to a callback function.

Unit

Graphics

Category

graphics utilities

procedure GetCharsetValues(Proc: TGetStrProc);

Description

Call GetCharsetValues to execute a callback for every character set name that has a corresponding constant in the VCL. The Proc parameter is the callback function that is called for every character set constant name.

Note:	To convert the strings that are passed to the callback into the TFontCharset type, use the IdentToCharset function.


GetColorValues procedure
 VCL Reference

GetColorValues procedure

See also

Passes the name of every predefined color constant to a callback function.

Unit

Graphics

Category

graphics utilities

procedure GetColorValues(Proc: TGetStrProc);

Description

Call GetColorValues to execute a callback for every TColor constant in the VCL.  The Proc parameter is the callback function that is called for every color constant name.

Note:	To convert the strings that are passed to the callback into the TColor type, use the IdentToColor function.


GetDefFontCharSet function
 VCL Reference

GetDefFontCharSet function

See also

Returns the character set of the default system font.

Unit

Graphics

Category

graphics utilities

function GetDefFontCharSet: TFontCharset;

Description

Call GetDefFontCharSet to determine the character set that is used when a font is not explicitly assigned to a control. This character set can be used to initialize a font that is specified by font name only, to best match the characters for the locale of the machine on which the application is running.


GetDIB function
 VCL Reference

GetDIB function

See also

Returns the info header and image for a device independent bitmap.

Unit

Graphics

Category

graphics utilities

function GetDIB(Bitmap: HBITMAP; Palette: HPALETTE; var BitmapInfo; var Bits): Boolean;

Description

Call GetDIB to convert a device dependent bitmap into a device independent bitmap (DIB).  Pass the handle to a device dependent bitmap and a handle to its palette as the Bitmap and Palette parameters.  GetDIB fills in the BitmapInfo and Bits parameters with the info header and image of the corresponding DIB. GetDIB returns True if the bitmap was successfully converted into a DIB, False otherwise.

Before calling GetDIB, the memory for the info header and image must be allocated.  Call GetDIBSizes to determine the amount of memory that must be allocated for the info header and image.


GetDIBSizes procedure
 VCL Reference

GetDIBSizes procedure

See also

Returns the size of the info header and of the image for a device independent bitmap.

Unit

Graphics

Category

graphics utilities

procedure GetDIBSizes(Bitmap: HBITMAP; var InfoHeaderSize: DWord; var ImageSize: DWORD);

Description

Call GetDIBSizes to determine the amount of memory needed to convert a device dependent bitmap into a device independent bitmap (DIB).  Pass the handle to a device dependent bitmap as the Bitmap parameter.  GetDIBSizes returns the sizes of the info header and image of the corresponding DIB as the InfoHeaderSize parameter and the ImageSize parameter, respectively.

Call GetDIBSizes to determine the amount of memory that must be allocated before calling GetDIB to convert a device dependent bitmap into a device independent bitmap.


GraphicExtension function
 VCL Reference

GraphicExtension function

See also	Example

Returns the default file-name extension of a graphics object.

Unit

Graphics

Category

graphics utilities

function GraphicExtension(GraphicClass: TGraphicClass): string;

Description

Call GraphicExtension to obtain a default extension value for the DefaultExt property of an Open or Save Picture dialog. GraphicExtension returns the default extension for the type of graphics object specified by the GraphicClass parameter. The TGraphicClass type is the class type for descendants TGraphic.

These are the file extensions returned for each built-in graphics class:

Graphic class	File extension returned

TBitmap	bmp

TIcon	ico

TMetafile	emf

If custom graphics classes register a file extension, GraphicExtension will return that extension when passed the custom graphics class as an argument.


GraphicFileMask function
 VCL Reference

GraphicFileMask function

See also

Returns a file mask that specifies the valid extensions for a graphic class.

Unit

Graphics

Category

graphics utilities

function GraphicFileMask(GraphicClass: TGraphicClass): string;

Description

Call GraphicFileMask to obtain a mask to determine the file extensions associated with a graphic class. The GraphicClass parameter can specify one of these values: TBitmap, TGraphic, TIcon, TMetafile, or a user-defined descendant of TGraphic. These are the strings that are returned for each built-in graphics class:

Graphic class	Filter string returned

TBitmap	*.bmp

TIcon	*.ico

TMetafile	*.emf;*.wmf

TGraphic	*.bmp;*.ico;*.emf;*.wmf


GraphicFilter function
 VCL Reference

GraphicFilter function

See also	Example

Returns a file filter compatible with the Filter property of an Open or Save dialog.

Unit

Graphics

Category

graphics utilities

function GraphicFilter(GraphicClass: TGraphicClass): string;

Description

Call GraphicFilter to obtain a value for the Filter property of an Open Picture or Save Picture dialog box. The GraphicClass parameter can specify one of these values: TBitmap, TGraphic, TIcon, TMetafile, or a user-defined descendant of TGraphic. These are the strings that are returned for each built-in graphics class:

Graphic class	Filter string returned

TBitmap	Bitmaps (*.bmp)|*.bmp

TIcon	Icons (*.ico)|*.ico

TMetafile	All (*.emf;*.wmf)|*.emf;*.wmf|Enhanced Metafiles (*.emf)|*.emf|Metafiles(*.wmf)|*.wmf

TGraphic	All (*.bmp;*.ico;*.emf;*.wmf)|*.bmp;*.ico;*.emf; *.wmf|Bitmaps (*.bmp)|*.bmp|Icons (*.ico)|*.ico|Enhanced Metafiles (*.emf)|*.emf|Metafiles(*.wmf)|*.wmf


IdentToCharset function
 VCL Reference

IdentToCharset function

See also

Translates the name of a character set constant to the corresponding character set.

Unit

Graphics

Category

graphics utilities

function IdentToCharset(const Ident: string; var Charset: Longint): Boolean;

Description

Call IdentToCharset to reverse the translation performed by CharsetToIdent. This method is useful for converting the strings generated by GetCharsetValues into useable character sets. IdentToCharset returns True if the Ident parameter is successfully converted into a character set that is returned by the Charset parameter. IdentToCharset returns False if the Ident parameter is not the name of one of the TFontCharset constants.


IdentToColor function
 VCL Reference

IdentToColor function

See also

Translates the name of a color constant to the corresponding TColor value.

Unit

Graphics

Category

graphics utilities

function IdentToColor(const Ident: string; var Color: Longint): Boolean;

Description

Call IdentToColor to reverse the translation performed by ColorToIdent. This method is useful for converting the strings generated by GetColorValues into useable TColor values. IdentToColor returns True if the Ident parameter is successfully converted into a color that is returned by the Color parameter. IdentToColor returns False if the Ident parameter is not the name of one of the TColor constants.

Note:	If the string identifier for a color may represent either a hex value or a color constant, use the StringToColor function instead.


StringToColor function
 VCL Reference

StringToColor function

See also

Translates a string representation of a color to the corresponding TColor value.

Unit

Graphics

Category

graphics utilities

function StringToColor(const S: string): TColor;

Description

Call StringToColor to reverse the translation performed by ColorToString. This method is useful for converting the strings entered by the user into useable TColor values.

The S parameter can be either the name of a built-in color constant such as 'clBtnFace', or the string representation of a valid TColor value such as '$02FF8800'.  StringToColor returns the TColor value that corresponds to the S parameter.

Note:	If the string identifier can only be the name of a color constant, use IdentToColor instead.


SystemPalette16 variable
 VCL Reference

SystemPalette16 variable

See also

Contains the 16 VGA system colors.

Unit

Graphics

Category

graphics utilities

var SystemPalette16: HPalette;

Description

SystemPalette16 holds a palette handle that contains the 16 VGA system colors. This palette is built at runtime from the system colors defined by the current video card and driver.  The actual color values of the stock VGA palette can vary from one video card vendor to the next. Therefore it is not safe to assume, for example, that clGray will be RGB(128,128,128) on all systems.

This handle is available as a convenience.  This is the palette that VCL forces on all 16 color bitmaps that are loaded from files or resources.

Note:	Using custom 16-color palettes does not work on 16-color video systems. It is problematic on many 256 color drivers because the variation in colors interferes with transparency operations.


ArcCos function
 VCL Reference

ArcCos function

See also

Calculates the inverse cosine of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCos(const X: Extended): Extended;

Description

ArcCos returns the inverse cosine of X. X must be between -1 and 1. The return value will be in the range [0..Pi], in radians.


ArcCosh function
 VCL Reference

ArcCosh function

See also

Calculates the inverse hyperbolic cosine of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCosh(const X: Extended): Extended;

Description

ArcCosh returns the inverse hyperbolic cosine of X.  The value of X must be greater than or equal to 1.


ArcCot function
 VCL Reference

ArcCot function

See also

Calculates the inverse cotangent of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCot(const X: Extended): Extended;

Description

ArcCot returns the inverse cotangent of X.


ArcCotH function
 VCL Reference

ArcCotH function

See also

Calculates the inverse hyperbolic cotangent of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCotH(const X: Extended): Extended;

Description

ArcCot returns the inverse hyperbolic cotangent of X.


ArcCsc function
 VCL Reference

ArcCsc function

See also

Calculates the inverse cosecant of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCsc(const X: Extended): Extended;

Description

ArcCsc returns the inverse cosecant of X.


ArcCscH function
 VCL Reference

ArcCscH function

See also

Calculates the inverse hyperbolic cosecant of a given number.

Unit

Math

Category

Trigonometry routines

function ArcCscH(const X: Extended): Extended;

Description

ArcCsc returns the inverse hyperbolic cosecant of X.


ArcSec function
 VCL Reference

ArcSec function

See also

Calculates the inverse secant of a given number.

Unit

Math

Category

Trigonometry routines

function ArcSec(const X: Extended): Extended;

Description

ArcSec returns the inverse secant of X.


ArcSecH function
 VCL Reference

ArcSecH function

See also

Calculates the inverse hyperbolic secant of a given number.

Unit

Math

Category

Trigonometry routines

function ArcSecH(const X: Extended): Extended;

Description

ArcSec returns the inverse hyperbolic secant of X.


ArcSin function
 VCL Reference

ArcSin function

See also

Calculates the inverse sine of a given number.

Unit

Math

Category

Trigonometry routines

function ArcSin(const X: Extended): Extended;

Description

ArcSin returns the inverse sine of X. X must be between -1 and 1. The return value will be in the range [-Pi/2..Pi/2], in radians.


ArcSinh function
 VCL Reference

ArcSinh function

See also

Calculates the inverse hyperbolic sine of a given number.

Unit

Math

Category

Trigonometry routines

function ArcSinh(X: Extended): Extended;

Description

ArcSinh returns the inverse hyperbolic sine of X.


ArcTanh function
 VCL Reference

ArcTanh function

See also

Calculates the inverse hyperbolic tangent of a given number.

Unit

Math

Category

Trigonometry routines

function ArcTanh(X: Extended): Extended;

Description

ArcTanh returns the inverse hyperbolic tangent of X.  The value of X must be between -1 and 1 (inclusive).


ArcTan2 function
 VCL Reference

ArcTan2 function

Calculates the arctangent angle and quadrant of a given number.

Unit

Math

Category

Trigonometry routines

function ArcTan2(const Y, X: Extended): Extended;

Description

ArcTan2 calculates ArcTan(Y/X), and returns an angle in the correct quadrant.  The values of X and Y must be between –2^64 and 2^64.  In addition, the value of X can’t be 0.  The return value will fall in the range from -Pi to Pi radians.


Ceil function
 VCL Reference

Ceil function

Rounds variables up toward positive infinity.

Unit

Math

Category

Arithmetic routines

function Ceil(const X: Extended):Integer;

Description

Call Ceil to obtain the lowest integer greater than or equal to X. The absolute value of X must be less than MaxInt.  For example:

Ceil(-2.8) = -2

Ceil(2.8) = 3

Ceil(-1.0) = -1


ClearExceptions procedure
 VCL Reference

ClearExceptions procedure

See also

Clears any pending exception bits in the status word.

Unit

Math

Category

FPU control

procedure ClearExceptions;

Description

The floating-point unit status word reflects details of floating point exceptions. See Intel's processor documentation for details.


CompareValue function
 VCL Reference

CompareValue function

See also

Returns the relationship between two numeric values.

Unit

Math

Category

Arithmetic routines

function CompareValue(const A, B: Integer): TValueRelationship; overload;

function CompareValue(const A, B: Int64): TValueRelationship; overload;

function CompareValue(const A, B: Single; Epsilon: Single = 0): TValueRelationship; overload;

function CompareValue(const A, B: Double; Epsilon: Double = 0): TValueRelationship; overload;

function CompareValue(const A, B: Extended; Epsilon: Extended = 0): TValueRelationship; overload;

Description

Call CompareValue to determine the relationship between two numeric values. When comparing floating-point values, CompareValue lets you specify a maximum difference to use when comparing values, so that they are considered the same if they are within that amount.

A and B are the values to compare.

Epsilon is the maximum amount by which A and B can differ and still be considered the same value.

CompareValue returns

LessThanValue if A is less than B (by more than Epsilon if A and B are floating-point numbers).

EqualsValue if A is equivalent to B (the same, or within Epsilon if A and B are floating-point numbers).

GreaterThanValue if A is larger than B (by more than Epsilon if A and B are floating-point numbers).


Cosecant function
 VCL Reference

Cosecant function

See also

Returns the cosecant of an angle.

Unit

Math

Category

Trigonometry routines

function Cosecant(const X: Extended): Extended;

Description

Use the Cosecant to calculate the cosecant of X, where X is an angle in radians. The cosecant is calculated as 1/ Sin(X).


Cosh function
 VCL Reference

Cosh function

See also

Calculates the hyperbolic cosine of an angle.

Unit

Math

Category

Trigonometry routines

function Cosh(const X: Extended): Extended;

Description

Use the Cosh to calculate the hyperbolic cosine of X.


Cot function
 VCL Reference

Cot function

See also

Calculates the cotangent of an angle.

Unit

Math

Category

Trigonometry routines

function Cot(const X: Extended): Extended;

Description

Call Cot to obtain the cotangent of X. The cotangent is calculated using the formula 1 / Tan(X).


Cotan function
 VCL Reference

Cotan function

See also

Calculates the cotangent of an angle.

Unit

Math

Category

Trigonometry routines

function Cotan(const X: Extended): Extended;

Description

Call Cotan to obtain the cotangent of X. The cotangent is calculated using the formula

1 / Tan(X)

Note:	Do not call Cotan with X = 0.


CotH function
 VCL Reference

CotH function

See also

Calculates the hyperbolic cotangent of an angle.

Unit

Math

Category

Trigonometry routines

function CotH(const X: Extended): Extended;

Description

Call CotH to obtain the hyperbolic cotangent of X, where X is an angle in Radians.


Csc function
 VCL Reference

Csc function

See also

Returns the cosecant of an angle.

Unit

Math

Category

Trigonometry routines

function Csc(const X: Extended): Extended;

Description

Use the Csc to calculate the cosecant of X, where X is an angle in radians.


CscH function
 VCL Reference

CscH function

See also

Returns the hyperbolic cosecant of an angle.

Unit

Math

Category

Trigonometry routines

function CscH(const X: Extended): Extended;

Description

Use the CscH to calculate the hyperbolic cosecant of X, where X is an angle in radians.


CycleToDeg function
 VCL Reference

CycleToDeg function

See also

Converts an angle measurement from cycles to degrees.

Unit

Math

Category

Measurement conversion routines

function CycleToDeg(const Cycles: Extended): Extended;

Description

CycleToDeg converts angles measured in cycles into degrees, where

degrees = cycles * 360.


CycleToGrad function
 VCL Reference

CycleToGrad function

See also

Converts an angle measurement from cycles to grads.

Unit

Math

Category

Measurement conversion routines

function CycleToGrad(const Cycles: Extended): Extended;

Description

CycleToGrad converts angles measured in cycles into grads.


CycleToRad function
 VCL Reference

CycleToRad function

See also

Converts an angle measurement from cycles to radians.

Unit

Math

Category

Measurement conversion routines

function CycleToRad(const Cycles: Extended): Extended;

Description

CycleToRad converts angles measured in cycles into radians, where

radians = 2pi * cycles.


DegToCycle function
 VCL Reference

DegToCycle function

See also

Returns the value of a degree measurement expressed in cycles.

Unit

Math

Category

Measurement conversion routines

function DegToCycle(const Degrees: Extended): Extended;

Description

Use DegToCycle to convert angles expressed in degrees to the corresponding value in cycles.


DegToGrad function
 VCL Reference

DegToGrad function

See also

Returns the value of a degree measurement expressed in grads.

Unit

Math

Category

Measurement conversion routines

function DegToGrad(const Degrees: Extended): Extended;

Description

Use DegToGrad to convert angles expressed in degrees to the corresponding value in grads.


DegToRad function
 VCL Reference

DegToRad function

See also

Returns the value of a degree measurement expressed in radians.

Unit

Math

Category

Measurement conversion routines

function DegToRad(const Degrees: Extended): Extended;

Description

Use DegToRad to convert angles expressed in degrees to the corresponding value in radians, where

radians = degrees(pi/180).


DivMod procedure
 VCL Reference

DivMod procedure

Returns the result of an integer division, including the remainder.

Unit

Math

Category

Arithmetic routines

procedure DivMod(Dividend: Integer; Divisor: Word; var Result, Remainder: Word);

Description

Call DivMod to perform 16-bit integer division and fetch the remainder as well, all in one operation.

Dividend is the integer into which you are dividing.

Divisor is the value by which to divide Dividend.

Result returns the result of the integer division.

Remainder returns the remainder (the difference between Result * Divisor and Dividend).


DoubleDecliningBalance function
 VCL Reference

DoubleDecliningBalance function

Calculates the depreciation of an asset using the double-declining balance method.

Unit

Math

Category

Business and finance routines

function DoubleDecliningBalance(const Cost, Salvage: Extended; Life, Period: Integer): Extended;

Description

DoubleDecliningBalance determines accelerated depreciation values for an asset, given the initial cost, life expectancy, end value, and depreciation period.


EnsureRange function
 VCL Reference

EnsureRange function

See also

Returns the closest value to a specified value within a specified range.

Unit

Math

Category

Arithmetic routines

function EnsureRange(const AValue, AMin, AMax: Integer): Integer; overload;

function EnsureRange(const AValue, AMin, AMax: Int64): Int64; overload;

function EnsureRange(const AValue, AMin, AMax: Double): Double; overload;

Description

EnsureRange returns a value that is guaranteed to be within a specified range.

AValue is the value you want as long as it is in range. If AValue is in range, EnsureRange returns AValue.

AMin is the minimum acceptable value. If AValue is less than AMin, EnsureRange returns AMin.

AMax is the maximum acceptable value. If AValue is greater than AMax, EnsureRange returns AMax.


Floor function
 VCL Reference

Floor function

Rounds variables toward negative infinity.

Unit

Math

Category

Arithmetic routines

function Floor(const X: Extended): Integer;

Description

Call Floor to obtain the highest integer less than or equal to X. For example:

Floor(-2.8) = -3

Floor(2.8) = 2

Floor(-1.0) = -1

Note:	The absolute value of X must be less than MaxInt.


Frexp procedure
 VCL Reference

Frexp procedure

Separates the Mantissa and Exponent of X

Unit

Math

Category

Arithmetic routines

procedure Frexp(const X: Extended; var Mantissa: Extended; var Exponent: Integer) register;

Description

Frexp returns the mantissa of X as Mantissa and the exponent as Exponent.


FutureValue function
 VCL Reference

FutureValue function

See also

Calculates the future value of an investment.

Unit

Math

Category

Business and finance routines

function FutureValue(const Rate: Extended; NPeriods: Integer; const Payment, PresentValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

FutureValue returns the future value of an investment of PresentValue where Payment is invested for NPeriods at the rate of Rate per period. The PaymentTime parameter indicates whether the investment is an ordinary annuity or an annuity due (enter ptEndOfPeriod if payments are at the end of each period, ptStartOfPeriod if they are at the beginning).


GetExceptionMask function
 VCL Reference

GetExceptionMask function

See also

Returns the exception mask from the FPU control word.

Unit

Math

Category

FPU control

type

  TFPUException = (exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision);

  TFPUExceptionMask = set of TFPUException;

function GetExceptionMask: TFPUExceptionMask;

Description

Call GetExceptionMask to ascertain the types of exceptions the FPU (floating-point unit) generates. Any element set in this mask prevents the FPU from raising the corresponding type of exception. Instead, the FPU returns its best attempt at a value – often NaN, Infinity, or NegInfinity. The value depends on the operation and the current rounding mode.


GetPrecisionMode function
 VCL Reference

GetPrecisionMode function

See also

Returns the FPU precision control mode.

Unit

Math

Category

FPU control

type TFPUPrecisionMode = (pmSingle, pmReserved, pmDouble, pmExtended);

function GetPrecisionMode: TFPUPrecisionMode;

Description

Call GetPrecisionMode to ascertain the level of precision that the FPU (floating-point unit) uses for floating-point calculations. The precision control mode can be any of the following values:

Value	Meaning

pmSingle	single precision

pmReserved	not used

pmDouble	double precision

pmExtended	extended precision


GetRoundMode function
 VCL Reference

GetRoundMode function

See also

Returns the FPU rounding mode.

Unit

Math

Category

FPU control

type TFPURoundingMode = (rmNearest, rmDown, rmUp, rmTruncate);

function GetRoundMode: TFPURoundingMode;

Description

Call GetRoundingMode to ascertain how the FPU handles rounding issues. The rounding mode can be any of the following values:

Value	Meaning

rmNearest	Rounds to the closest value.

rmDown	Rounds toward negative infinity.

rmUp	Rounds toward positive infinity.

rmTruncate	Truncates the value, rounding positive numbers down and negative numbers up.


GradToCycle function
 VCL Reference

GradToCycle function

See also

Converts grad measurements to cycles.

Unit

Math

Category

Measurement conversion routines

function GradToCycle(const Grads: Extended): Extended;

Description

GradToCycle converts angles measured in grads into cycles.


GradToDeg function
 VCL Reference

GradToDeg function

See also

Converts grad measurements to degrees.

Unit

Math

Category

Measurement conversion routines

function GradToDeg(const Grads: Extended): Extended;

Description

GradToDeg converts angles measured in grads into degrees.


GradToRad function
 VCL Reference

GradToRad function

See also

Converts grad measurements to radians.

Unit

Math

Category

Measurement conversion routines

function GradToRad(const Grads: Extended): Extended;

Description

GradToRad converts angles measured in grads into radians, where

radians = grads(pi/200).


Hypot function
 VCL Reference

Hypot function

Calculates the length of the hypotenuse.

Unit

Math

Category

Trigonometry routines

function Hypot(const X, Y: Extended): Extended;

Description

Hypot returns the length of the hypotenuse of a right triangle. Specify the lengths of the sides adjacent to the right angle in X and Y.  Hypot uses the formula

Sqrt(X**2 + Y**2)


IfThen function
 VCL Reference

IfThen function

Conditionally returns one of two specified values.

Unit

Math

or StrUtils

Category

miscellaneous routines

function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer = 0): Integer; overload;

function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64 = 0): Int64; overload;

function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double = 0.0): Double; overload;

function IfThen(AValue: Boolean; const ATrue: string; const AFalse: string = ''): string; overload;

Description

IfThen checks the expression passed as AValue and returns ATrue if it evaluates to True, or AFalse if it evaluates to False. If the AFalse parameter is omitted, IfThen returns 0 or an empty string when AValue evaluates to False.


Infinity constant
 VCL Reference

Infinity constant

See also

Represents positive infinity.

Unit

Math

Category

Arithmetic routines

const Infinity =  1.0 / 0.0;

Description

Use Infinity to assign a value of positive Infinity to a floating-point variable. Do not use Infinity in comparisons. To check whether a variable or expression represents infinity, use the IsInfinite function instead.


InRange function
 VCL Reference

InRange function

See also

Indicates whether a value falls within a specified range.

Unit

Math

Category

Arithmetic routines

function InRange(const AValue, AMin, AMax: Integer): Boolean; overload;

function InRange(const AValue, AMin, AMax: Int64): Boolean; overload;

function InRange(const AValue, AMin, AMax: Double): Boolean; overload;

Description

InRange returns True if AValue is greater than or equal to AMin and less than or Equal to AMax. It returns False if AValue is less than AMin or greater than AMax.


InterestPayment function
 VCL Reference

InterestPayment function

See also

Calculates the interest portion of a loan payment.

Unit

Math

Category

Business and finance routines

function InterestPayment(const Rate: Extended; Period, NPeriods: Integer; const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

Call InterestPayment to calculate the portion of a loan payment that reflects the interest.

Rate represents the fixed periodic interest rate.

Period identifies the payment period.

NPeriods is the number of periods of the loan.

PresentValue represents the amount borrowed (the principal).

FutureValue is the future value of the investment.

PaymentTime indicates whether the cash flows occur at the beginning or end of the period.


InterestRate function
 VCL Reference

InterestRate function

See also

Returns the interest rate required to increase PresentValue to FutureValue.

Unit

Math

Category

Business and finance routines

function InterestRate(NPeriods: Integer; const Payment, PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

InterestRate calculates the interest rate required in order for an investment of PresentValue, with periodic payments of Payment, to be worth FutureValue within NPeriods compounding periods. If NPeriods represents years, an annual interest rate results; if NPeriods represents months, a monthly interest rate results, and so on. The PaymentTime parameter indicates whether the cash flows occur at the beginning or end of the period.


InternalRateOfReturn function
 VCL Reference

InternalRateOfReturn function

See also

Calculates the internal rate of return for an investment.

Unit

Math

Category

Business and finance routines

function InternalRateOfReturn(const Guess: Extended; const CashFlows: array of Double): Extended;

Description

InternalRateOfReturn determines the internal rate of return on an investment. It references an array that contains cash flow information and uses the supplied internal rate of return estimate to calculate results.

Before using this function, define an array containing expected cash flow amounts over a period of time. It is assumed that the amounts are received at regular intervals. Negative amounts are interpreted as cash outflows, and positive amounts as inflows. The first amount must be a negative number, to reflect the initial investment. The following amounts can all be the same for each time period, or they can be different (including a mixture of negatives, positives, or zeros).

Specify the estimated rate of return as the Guess parameter. Pass the array of expected cash flow amounts as the CashFlows parameter.


IntPower function
 VCL Reference

IntPower function

See also

Calculates the integral power of a base value.

Unit

Math

Category

Arithmetic routines

function IntPower(const Base: Extended; const Exponent: Integer): Extended register;

Description

IntPower raises Base to the power specified by Exponent.


IsInfinite function
 VCL Reference

IsInfinite function

See also

Indicates when a variable or expression represents an infinite value.

Unit

Math

Category

Arithmetic routines

function IsInfinite(const AValue: Double): Boolean;

Description

Use IsInfinite to test whether the value specified by AValue represents positive or negative infinity. Use the Sign function to distinguish positive infinity from negative infinity.


IsNan function
 VCL Reference

IsNan function

See also

Indicates when a variable or expression does not evaluate to a numeric value.

Unit

Math

Category

Arithmetic routines

function IsNan(const AValue: Double): Boolean;

Description

Use IsNan to test whether the value specified by AValue represents NaN (not a number). Note that NaN is distinct from positive and negative infinity, which can be detected using the IsInfinite function.


IsZero function
 VCL Reference

IsZero function

See also

Indicates when a floating-point variable or expression evaluates to zero, or very close to zero.

Unit

Math

Category

Arithmetic routines

function IsZero(const A: Single; Epsilon: Single = 0): Boolean; overload;

function IsZero(const A: Double; Epsilon: Double = 0): Boolean; overload;

function IsZero(const A: Extended; Epsilon: Extended = 0): Boolean; overload;

Description

Use IsZero to test whether the value specified by AValue is zero, or differs from zero by at most Epsilon.


Ldexp function
 VCL Reference

Ldexp function

Calculates X * (2**P)

Unit

Math

Category

Arithmetic routines

function Ldexp(const X: Extended; const P: Integer): Extended register;

Description

Ldexp returns X times (2 to the power of P).


LnXP1 function
 VCL Reference

LnXP1 function

Returns the natural log of (X+1)

Unit

Math

Category

Arithmetic routines

function LnXP1(const X: Extended): Extended;

Description

LnXP1 returns the natural logarithm of (X+1).  Use LnXP1 when X is a value near 0.


Log2 function
 VCL Reference

Log2 function

See also

Calculates log base 2.

Unit

Math

Category

Arithmetic routines

function Log2(const X: Extended): Extended;

Description

Log2 returns the log base 2 of X.


Log10 function
 VCL Reference

Log10 function

See also

Calculates log base 10.

Unit

Math

Category

Arithmetic routines

function Log10(const X: Extended): Extended;

Description

Log10 returns the log base 10 of X.


LogN function
 VCL Reference

LogN function

See also

Calculates the log of X for a specified base.

Unit

Math

Category

Arithmetic routines

function LogN(const Base, X: Extended): Extended;

Description

LogN returns the log base Base of X.


Max function
 VCL Reference

Max function

See also

Returns the greater of two numeric values.

Unit

Math

Category

Arithmetic routines

function Max(A,B: Integer): Integer; overload;

function Max(A,B: Int64): Int64; overload;

function Max(A,B: Single): Single; overload;

function Max(A,B: Double): Double; overload;

function Max(A,B: Extended): Extended; overload;

Description

Call Max to compare two numeric values. Max returns the greater value of the two.


MaxComp constant
 VCL Reference

MaxComp constant

The maximum value of the Comp data type.

Unit

Math

Category

maximum and minimum values

const MaxComp =  9.223372036854775807e+18;

Description

MaxComp represents the highest value in the range of the Comp data type.


MaxDouble constant
 VCL Reference

MaxDouble constant

The maximum value of the Double data type.

Unit

Math

Category

maximum and minimum values

const MaxDouble   =  1.7e+308;

Description

MaxDouble represents the highest value in the range of the Double data type.


MaxExtended constant
 VCL Reference

MaxExtended constant

The maximum value of the Extended data type.

Unit

Math

Category

maximum and minimum values

const MaxExtended = 1.1e+4932;

Description

MaxExtended represents the highest value in the range of the Extended data type.


MaxIntValue function
 VCL Reference

MaxIntValue function

See also

Returns the largest signed value in an integer array.

Unit

Math

Category

Statistical routines

function MaxIntValue(const Data: array of Integer): Integer;

Description

Call MaxIntValue to obtain the largest integer from the Data array.


MaxSingle constant
 VCL Reference

MaxSingle constant

The maximum value of the Single data type.

Unit

Math

Category

maximum and minimum values

const MaxSingle = 3.4e+38;

Description

MaxSingle represents the highest value in the range of the Single data type.


MaxValue function
 VCL Reference

MaxValue function

See also

Returns the largest signed value in an array.

Unit

Math

Category

Statistical routines

function MaxValue(const Data: array of Double): Double;

Description

MaxValue returns the largest signed value in the Data array.


Mean function
 VCL Reference

Mean function

See also

Returns the average of all values in an array.

Unit

Math

Category

Statistical routines

function Mean(const Data: array of Double): Extended;

Description

Mean calculates the arithmetic average of all the values in the Data array parameter.


MeanAndStdDev procedure
 VCL Reference

MeanAndStdDev procedure

See also

Calculates the mean and standard deviation of array elements.

Unit

Math

Category

Statistical routines

procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended);

Description

MeanAndStdDev calculates Mean and standard deviation in one pass. Using this is twice as fast as calculating them separately. Precision may be lost when the Mean is very large (> 10e7) or the variance is very small.

Data specifies the data to be summarized. The mean is returned as Mean and the standard deviation is returned as StdDev.


Min function
 VCL Reference

Min function

See also

Returns the lesser of two numeric values.

Unit

Math

Category

Arithmetic routines

function Min(A,B: Integer): Integer; overload;

function Min(A,B: Int64): Int64; overload;

function Min(A,B: Single): Single; overload;

function Min(A,B: Double): Double; overload;

function Min(A,B: Extended): Extended; overload;

Description

Call Min to compare two numeric values. Min returns the smaller value of the two.


MinComp constant
 VCL Reference

MinComp constant

The minimum value of the Comp data type.

Unit

Math

Category

maximum and minimum values

const MinComp = -9.223372036854775807e+18;

Description

MinComp represents the lowest value in the range of the Comp data type.


MinDouble constant
 VCL Reference

MinDouble constant

The minimum value of the Double data type.

Unit

Math

Category

maximum and minimum values

const MinDouble = 5.0e-324;

Description

MinDouble represents the smallest value in the range of the Double data type.


MinExtended constant
 VCL Reference

MinExtended constant

The minimum value of the Extended data type.

Unit

Math

Category

maximum and minimum values

const MinExtended = 3.4e-4932;

Description

MinExtended represents the smallest value in the range of the Extended data type.


MinIntValue function
 VCL Reference

MinIntValue function

See also

Returns the smallest signed value in an integer array.

Unit

Math

Category

Statistical routines

function MinIntValue(const Data: array of Integer): Integer;

Description

Call MinIntValue to obtain the smallest integer in the Data array.


MinSingle constant
 VCL Reference

MinSingle constant

The minimum value of the Single data type.

Unit

Math

Category

maximum and minimum values

const MinSingle = 1.5e-45;

Description

MinSingle represents the smallest value in the range of the Single data type.


MinValue function
 VCL Reference

MinValue function

See also

Returns smallest signed value in an array.

Unit

Math

Category

Statistical routines

function MinValue(const Data: array of Double): Double;

Description

MinValue returns the smallest signed value in the Data array.


MomentSkewKurtosis procedure
 VCL Reference

MomentSkewKurtosis procedure

Calculates the mean, variance, skew, and kurtosis.

Unit

Math

Category

Statistical routines

procedure MomentSkewKurtosis(const Data: array of Double; var M1, M2, M3, M4, Skew, Kurtosis: Extended);

Description

MomentSkewKurtosis calculates the core factors of statistical analysis: the first four moments plus the coefficients of skew and kurtosis.

Data specifies the data to be analyzed. M1, M2, M3 and M4 return the first four moments (M1 is the mean, M2 is the variance, and so on). Skew reflects symmetry of distribution. Kurtosis reflects flatness of distribution.


NaN constant
 VCL Reference

NaN constant

See also

Represents a value that is not a number.

Unit

Math

Category

Arithmetic routines

const NaN =  0.0 / 0.0;

Description

Use NaN to assign a value of NaN (not a number) to a floating-point variable. Do not use NaN in comparisons. To check whether a variable or expression evaluates to NaN, use the IsNan function instead.


NegInfinity constant
 VCL Reference

NegInfinity constant

See also

Represents negative infinity.

Unit

Math

Category

Arithmetic routines

const NegInfinity = -1.0 / 0.0;

Description

Use NegInfinity to assign a value of negative infinity to a floating-point variable. Do not use NegInfinity in comparisons. To check whether a variable or expression represents infinity, use the IsInfinite function instead.


NetPresentValue function
 VCL Reference

NetPresentValue function

See also

Calculates the current value from an array of estimated cash flow values.

Unit

Math

Category

Business and finance routines

function NetPresentValue(const Rate: Extended; const CashFlows: array of Double; PaymentTime: TPaymentTime): Extended;

Description

NetPresentValue calculates the current value of an array of estimated cash flow values, discounted at the given interest rate of Rate.

CashFlows is the array of estimated cash flow values.

PaymentTime indicates whether the cash flows occur at the beginning or end of the period.

NetPresentValue helps determine how much an investment is currently worth, based on expected earnings, although its accuracy depends on the accuracy of the cash flows in the array.


Norm function
 VCL Reference

Norm function

See also

Returns the Euclidean 'L-2' norm.

Unit

Math

Category

Statistical routines

function Norm(const Data: array of Double): Extended;

Description

Norm returns the Euclidean 'L-2' norm for the values in the Data array. The 'L-2' norm is the square root of the sum of squares.


NumberOfPeriods function
 VCL Reference

NumberOfPeriods function

See also

Returns the number of payment periods for an investment.

Unit

Math

Category

Business and finance routines

function NumberOfPeriods(const Rate, Payment, PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

NumberOfPeriods computes the number of payment periods required for an investment of PresentValue to reach a value of FutureValue, while making regular payments of Payment and accruing interest at the rate of Rate per compounding period. PaymentTime indicates whether the cash flows occur at the beginning or end of the period.


Payment function
 VCL Reference

Payment function

See also

Calculates a fully amortized payment.

Unit

Math

Category

Business and finance routines

function Payment(Rate: Extended; NPeriods: Integer; const PresentValue, const FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

Payment calculates the fully amortized payment of borrowing PresentValue at Rate percent per period over NPeriods. It assumes that interest is paid at the end of each period.

FutureValue is the value that the investment will reach at some point. PaymentTime indicates whether the cash flows occur at the beginning or end of the period.


PeriodPayment function
 VCL Reference

PeriodPayment function

See also

Returns the principal amount from a full payment.

Unit

Math

Category

Business and finance routines

function PeriodPayment(const Rate: Extended; Period, NPeriods: Integer; const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

PeriodPayment gives the part of the payment that is principal. The InterestPayment function gives the part of the payment that is interest.

The Rate parameter is the interest rate. Period is the number of periods into the loan for which the principal is desired, and NPeriods is the number of periods of the loan. FutureValue is the value the investment will reach at some point. PaymentTime indicates whether the cash flows occur at the beginning or end of the period.


Poly function
 VCL Reference

Poly function

Evaluates a uniform polynomial of one variable at the value X.

Unit

Math

Category

Arithmetic routines

function Poly(const X: Extended; const Coefficients: arrayof Double): Extended;

Description

Call Poly to evaluate the polynomial represented by the Coefficients parameter at the point where the variable equals the value of the X parameter. The coefficients are ordered in increasing powers of X:

    Coefficients[0] + Coefficients[1]*X + ... + Coefficients[N]*(X**N)


PopnStdDev function
 VCL Reference

PopnStdDev function

See also

Calculates the population standard deviation.

Unit

Math

Category

Statistical routines

function PopnStdDev(const Data: array of Double): Extended;

Description

PopnStdDev calculates the population standard deviation (the square root of the population variance) of all values in the Data array parameter. This function is used in some business and financial calculations.


PopnVariance function
 VCL Reference

PopnVariance function

See also

Calculates the population variance.

Unit

Math

Category

Statistical routines

function PopnVariance(const Data: array of Double): Extended;

Description

PopnVariance calculates the population variance of all values in the Data array parameter, using the n method (biased): TotalVariance / n.


Power function
 VCL Reference

Power function

See also

Raises Base to any power.

Unit

Math

Category

Arithmetic routines

function Power(const Base, Exponent: Extended): Extended;

Description

Power raises Base to any power. For fractional exponents or exponents greater than MaxInt, Base must be greater than 0.


PresentValue function
 VCL Reference

PresentValue function

See also

Calculates the present value of an investment.

Unit

Math

Category

Business and finance routines

function PresentValue(const Rate: Extended; NPeriods: Integer; const Payment, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;

Description

PresentValue calculates the present value of an investment where Payment is received for NPeriods and is discounted at the rate of Rate per period. FutureValue is the value the investment may reach at some point. PaymentTime indicates whether the cash flows occur at the beginning or end of the period.


RadToCycle function
 VCL Reference

RadToCycle function

See also

Converts radians to cycles.

Unit

Math

Category

Measurement conversion routines

function RadToCycle(const Radians: Extended): Extended;

Description

Use RadToCycle to convert angles measured in radians into cycles, where

cycles = radians/(2pi).


RadToDeg function
 VCL Reference

RadToDeg function

See also

Converts radians to degrees.

Unit

Math

Category

Measurement conversion routines

function RadToDeg(const Radians: Extended): Extended;

Description

Use RadToDeg to convert angles measured in radians to degrees, where

degrees = radians(180/pi).


RadToGrad function
 VCL Reference

RadToGrad function

See also

Converts radians to grads.

Unit

Math

Category

Measurement conversion routines

function RadToGrad(const Radians: Extended): Extended;

Description

Use RadToGrad to convert angles measured in radians to grads, where

grads = radians(200/pi).


RandG function
 VCL Reference

RandG function

Generates random numbers with Gaussian distribution.

Unit

Math

Category

random number routines

function RandG(Mean, StdDev: Extended): Extended;

Description

RandG produces random numbers with Gaussian distribution about the Mean. This is useful for simulating data with sampling errors and expected deviations from the Mean.


RandomFrom function
 VCL Reference

RandomFrom function

See also

Returns a randomly selected element from an array.

Unit

Math

or StrUtils

Category

random number routines

function RandomFrom(const AValues: array of Double): Double; overload;

function RandomFrom(const AValues: array of Integer): Integer; overload;

function RandomFrom(const AValues: array of Int64): Int64; overload;

function RandomFrom(const AValues: array ofstring): string; overload;

Description

RandomFrom returns a randomly selected element from the array passed as the AValues argument.

To initialize the random number generator, add a single call Randomize or assign a value to the RandSeed variable before making any calls to RandomFrom.


RandomRange function
 VCL Reference

RandomRange function

See also

Returns a random integer from a specified range.

Unit

Math

Category

random number routines

function RandomRange(const AFrom, ATo: Integer): Integer;

Description

RandomRange returns a random integer from the range that extends between AFrom and ATo (inclusive). RandomRange can handle negative ranges (where AFrom is greater than ATo).

To initialize the random number generator, add a single call Randomize or assign a value to the RandSeed variable before making any calls to RandomRange.


RoundTo function
 VCL Reference

RoundTo function

See also

Rounds a floating-point value to a specified digit or power of ten using “Banker’s rounding”.

Unit

Math

Category

Arithmetic routines

type TRoundToRange = -37..37;

function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;

Description

Call RoundTo to round AValue to a specified power of ten.

AValue is the value to round.

ADigit indicates the power of ten to which you want AValue rounded. It can be any value from –37 to 37 (inclusive).

RoundTo uses “Banker’s Rounding” to determine how to round values that are exactly midway between the two values that have the desired number of significant digits. This method rounds to an even number in the case that AValue is not nearer to either value.

The following examples illustrate the use of RoundTo:

Expression	Value

RoundTo(1234567, 3)	1234000

RoundTo(1.234, -2)	1.23

RoundTo(1.235, -2)	1.24

RoundTo(1.245, -2)	1.24

Note:	The behavior of RoundTo can be affected by the Set8087CW procedure or SetRoundMode function.


SameValue function
 VCL Reference

SameValue function

See also

Indicates whether two floating-point values are (approximately) equal.

Unit

Math

Category

Arithmetic routines

function SameValue(const A, B: Single; Epsilon: Single = 0): Boolean; overload;

function SameValue(const A, B: Double; Epsilon: Double = 0): Boolean; overload;

function SameValue(const A, B: Extended; Epsilon: Extended = 0): Boolean; overload;

Description

Call SameValue to determine when two floating-point values are equal, or approximately equal.

A and B are the values to compare.

Epsilon is the maximum amount by which A and B can differ and still be considered the same value.


Sec function
 VCL Reference

Sec function

See also

Calculates the secant of an angle.

Unit

Math

Category

Trigonometry routines

function Sec(const X: Extended): Extended;

Description

Call Sec to obtain the secant of X, where X is an angle in radians. The secant is calculated using the formula 1 / Cos(X).

Note:	Sec is identical to the Secant function.


Secant function
 VCL Reference

Secant function

See also

Calculates the secant of an angle.

Unit

Math

Category

Trigonometry routines

function Secant(const X: Extended): Extended;

Description

Call Secant to obtain the secant of X, where X is an angle in radians. The secant is calculated using the formula 1 / Cos(X).


SecH function
 VCL Reference

SecH function

See also

Calculates the hyperbolic secant of an angle.

Unit

Math

Category

Trigonometry routines

function SecH(const X: Extended): Extended;

Description

Call SecH to obtain the hyperbolic secant of X, where X is an angle in Radians.


SetExceptionMask function
 VCL Reference

SetExceptionMask function

See also

Sets the exception mask on the FPU control word.

Unit

Math

Category

FPU control

type

  TFPUException = (exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision);

  TFPUExceptionMask = set of TFPUException;

function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;

Description

Call SetExceptionMask to specify the types of exceptions the FPU (floating-point unit) generates. Any element set in this mask prevents the FPU from raising the corresponding type of exception. Instead, the FPU returns its best attempt at a value – often NaN, Infinity, or NegInfinity. The value depends on the operation and the current rounding mode.

SetExceptionMask returns the previous exception mask.


SetPrecisionMode function
 VCL Reference

SetPrecisionMode function

See also

Sets the FPU precision control mode.

Unit

Math

Category

FPU control

type TFPUPrecisionMode = (pmSingle, pmReserved, pmDouble, pmExtended);

function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;

Description

Call SetPrecisionMode to specify the level of precision that the FPU (floating-point unit) uses for floating-point calculations. The precision control mode can be any of the following values:

Value	Meaning

pmSingle	single precision

pmReserved	not used

pmDouble	double precision

pmExtended	extended precision

SetPrecisionMode returns the previous precision control mode.


SetRoundMode function
 VCL Reference

SetRoundMode function

See also

Sets the FPU rounding mode.

Unit

Math

Category

FPU control

type TFPURoundingMode = (rmNearest, rmDown, rmUp, rmTruncate);

function SetRoundMode(const RoundMode: TFPURoundingMode): TFPURoundingMode;

Description

Call SetRoundingMode to specify how the FPU handles rounding issues. The rounding mode can be any of the following values:

Value	Meaning

rmNearest	Rounds to the closest value.

rmDown	Rounds toward negative infinity.

rmUp	Rounds toward positive infinity.

rmTruncate	Truncates the value, rounding positive numbers down and negative numbers up.


Sign function
 VCL Reference

Sign function

See also

Indicates whether a numeric value is positive, negative, or zero.

Unit

Math

Category

Arithmetic routines

type TValueSign = -1..1;

function Sign(const AValue: Double): TValueSign; overload;

function Sign(const AValue: Integer): TValueSign; overload;

function Sign(const AValue: Int64): TValueSign; overload;

Description

Use Sign to test the sign of a numeric value. Sign returns

0 if AValue is zero.

1 if AValue is greater than zero.

-1 if AValue is less than zero.


SimpleRoundTo function
 VCL Reference

SimpleRoundTo function

See also

Rounds a floating-point value to a specified digit or power of ten using asymmetric arithmetic rounding.

Unit

Math

Category

Arithmetic routines

type TSimpleRoundToRange = -37..37;

function SimpleRoundTo(const AValue: Double; const ADigit: TSimpleRoundToRange = -2): Double;

Description

Call SimpleRoundTo to round AValue to a specified power of ten.

AValue is the value to round.

ADigit indicates the power of ten to which you want AValue rounded. It can be any value from –37 to 37 (inclusive).

SimpleRoundTo uses asymmetric arithmetic rounding to determine how to round values that are exactly midway between the two values that have the desired number of significant digits. This method always rounds to the larger value.

The following examples illustrate the use of SimpleRoundTo:

Expression	Value

SimpleRoundTo(1234567, 3)	1234000

SimpleRoundTo(1.234, -2)	1.23

SimpleRoundTo(1.235, -2)	1.24

SimpleRoundTo(-1.235, -2)	-1.23


SinCos procedure
 VCL Reference

SinCos procedure

Returns sine and cosine of an angle.

Unit

Math

Category

Trigonometry routines

procedure SinCos(const Theta: Extended; var Sin, Cos: Extended); register;

Description

Call SinCos to obtain the sine and cosine of an angle expressed in radians. Theta specifies the angle. The sine and cosine are returned by the Sin and Cos parameters, respectively.

SinCos is twice as fast as calling Sin and Cos separately for the same angle.


Sinh function
 VCL Reference

Sinh function

Returns the hyperbolic sine of an angle.

Unit

Math

Category

Trigonometry routines

function Sinh(const X: Extended): Extended;

Description

Sinh calculates the hyperbolic sine of X.


SLNDepreciation function
 VCL Reference

SLNDepreciation function

See also

Returns the straight-line depreciation allowance of an asset.

Unit

Math

Category

Business and finance routines

function SLNDepreciation(const Cost, Salvage: Extended; Life: Integer): Extended;

Description

SLNDepreciation calculates the straight-line depreciation allowance for an asset over one period of its life. The function divides the Cost minus the Salvage by the number of years of useful Life of the asset. Cost is the amount initially paid for the asset. Salvage is the value of the asset at the end of its useful life.

To compute accelerated depreciation (allowing higher depreciation values in the first years of the assets life), use the SYDDepreciation function.


StdDev function
 VCL Reference

StdDev function

See also

Returns the sample standard deviation for elements in an array.

Unit

Math

Category

Statistical routines

function StdDev(const Data: array of Double): Extended;

Description

StdDev calculates the sample standard deviation (the square root of the sample variance) of all values in the Data array parameter.


Sum function
 VCL Reference

Sum function

See also

Returns the sum of the elements in an array.

Unit

Math

Category

Statistical routines

function Sum(const Data: array of Double): Extended; register;

Description

Sum returns the sum of all the values in the Data array parameter.


SumInt function
 VCL Reference

SumInt function

See also

Returns the sum of the elements in an integer array.

Unit

Math

Category

Statistical routines

function SumInt(const Data: array of Integer): Integer register;

Description

Sum returns the sum of all the values in the Data array parameter.


SumOfSquares function
 VCL Reference

SumOfSquares function

See also

Returns the sum of the squared values from a data array.

Unit

Math

Category

Statistical routines

function SumOfSquares(const Data: array of Double): Extended;

Description

SumOfSquares returns the sum of the squares of the Data values: Data[0]^2 + Data[1]^2 + Data[2]^2...


SumsAndSquares procedure
 VCL Reference

SumsAndSquares procedure

See also

Returns the sum of the values and the sum of the squared values in an array.

Unit

Math

Category

Statistical routines

procedure SumsAndSquares(const Data: arrayof Double; var Sum, SumOfSquares: Extended) register;

Description

SumsAndSquares returns the sum of the Data values in Sum and the sum of the squares in SumOfSquares. The data to sum is specified in the Data array parameter.

This function is faster than calculating the sums separately.


SYDDepreciation function
 VCL Reference

SYDDepreciation function

See also

Calculates depreciation for an asset.

Unit

Math

Category

Business and finance routines

function SYDDepreciation(const Cost, Salvage: Extended; Life, Period: Integer): Extended;

Description

SYDDepreciation (for "sum-of-years-digits depreciation") calculates depreciation amounts for an asset using an accelerated depreciation method. This allows for higher depreciation in the earlier years of an asset's life.

Cost is the initial cost of the asset. Salvage is the value of the asset at the end of its life expectancy. Life is the length of the asset's life expectancy. Period is the period for which to calculate the depreciation.


Tan function
 VCL Reference

Tan function

See also

Returns the tangent of X.

Unit

Math

Category

Trigonometry routines

function Tan(const X: Extended): Extended;

Description

Tan returns the tangent of X. Tan(X) = Sin(X) / Cos(X).


Tanh function
 VCL Reference

Tanh function

See also

Returns the hyperbolic tangent of X.

Unit

Math

Category

Trigonometry routines

function Tanh(const X: Extended): Extended;

Description

Tanh calculates the hyperbolic tangent of X.


TotalVariance function
 VCL Reference

TotalVariance function

See also

Returns the statistical variance from an array of values.

Unit

Math

Category

Statistical routines

function TotalVariance(const Data: array of Double): Extended;

Description

TotalVariance returns the sum of the squares of the difference between each Data value and the mean of the data values.

Total Variance: SUM(i=1,N)[(X(i) - Mean)**2]


Variance function
 VCL Reference

Variance function

See also

Calculates statistical sample variance from an array of data.

Unit

Math

Category

Statistical routines

function Variance(const Data: array of Double): Extended;

Description

Variance calculates the sample variance of all values in the Data array parameter, using the n-1 method (unbiased).


AnsiSameCaption function
 VCL Reference

AnsiSameCaption function

See also

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.

Unit

Menus

Category

menu support routines

function AnsiSameCaption(const Text1, Text2: string): Boolean;

Description

AnsiSameCaption compares Text1 to Text2, without case sensitivity and ignoring any ampersands (&) that are included to create accelerator characters. The compare operation is controlled by the current Windows locale. The return value is True if the two strings have the same value, False otherwise.


GetHotkey function
 VCL Reference

GetHotkey function

See also

Returns the last character in a string marked with an ampersand (&).

Unit

Menus

Category

menu support routines

function GetHotKey(const Text: string): string;

Description

GetHotKey searches Text, starting at the end, for a character that is identified as an accelerator key by a preceding ampersand (&). If it locates a character marked with an ampersand, GetHotKey returns that character. Otherwise, it returns an empty string.


NewItem function
 VCL Reference

NewItem function

See also	Example

Creates and initializes a menu item.

Unit

Menus

Category

menu support routines

function NewItem(const ACaption: string; AShortCut: TShortCut; AChecked, AEnabled: Boolean; AOnClick: TNotifyEvent; hCtx: THelpContext; const AName: string): TMenuItem;

Description

Call NewItem to create and initialize a menu item when constructing a menu programmatically.

The ACaption parameter specifies the string that should appear for the menu item.

The AShortCut parameter specifies any associated shortcut.

The AChecked parameter indicates whether the menu item appears with a check mark.

The AEnabled parameter specifies whether the menu item is enabled or grayed.

The AOnClick parameter specifies an event handler that executes when the user clicks the menu item.

The hCtx parameter specifies the help context ID for the menu item.

The AName parameter specifies the name of the menu item, which can be used to refer to the menu item in code.

The menu item returned by NewItem can be added to a menu using the target parent’s Add method. If the entire menu is being created dynamically at runtime, the new menu item can be added to an array that is passed as a parameter to the NewMenu, NewPopupMenu, or NewSubMenu function.

Warning:	The item returned by NewItem does not have an owner. You are responsible for freeing its memory when it is no longer needed. The Delete and Remove methods of TMenuItem do not free memory.


NewLine function
 VCL Reference

NewLine function

See also

Creates a menu item for a separator.

Unit

Menus

Category

menu support routines

function NewLine: TMenuItem;

Description

Call NewLine to create a separator that divides the items in a menu into logical groups. Once the menu item for the separator has been created using NewLine, it can be added to a menu using the target parent’s Add method. If the entire menu is being created dynamically at runtime, the new menu item can be added to an array that is passed as a parameter to the NewMenu, NewPopupMenu, or NewSubMenu function.

Warning:	The item returned by NewLine does not have an owner. You are responsible for freeing its memory when it is no longer needed. The Delete and Remove methods of TMenuItem do not free memory.


NewMenu function
 VCL Reference

NewMenu function

See also	Example

Creates and initializes a main menu.

Unit

Menus

Category

menu support routines

function NewMenu(Owner: TComponent; const AName: string; constItems: array ofTMenuItem): TMainMenu;

Description

Call NewMenu to create and initialize a main menu programmatically. NewMenu returns the TMainMenu component that represents the menu.

The Owner parameter specifies the component that is responsible for freeing the menu (typically the form).

The AName parameter specifies the name of the menu, which is used to refer to it in code.

The Items parameter is an array of menu items that make up the top level menu items. To create the menu items for the Items parameter, use the NewItem function.


NewPopupMenu function
 VCL Reference

NewPopupMenu function

See also

Creates and initializes a popup menu.

Unit

Menus

Category

menu support routines

function NewPopupMenu(Owner: TComponent; const AName: string; Alignment: TPopupAlignment; AutoPopup: Boolean; constItems: array of TMenuItem): TPopupMenu;

Description

Call NewPopupMenu to create and initialize a popup menu programmatically. NewPopupMenu returns the TPopupMenu component that represents the popup menu, but does not associate that popup menu with any control.

The Owner parameter specifies the component that is responsible for freeing the menu.

The AName parameter specifies the name of the popup menu, which is used to refer to it in code.

The Alignment parameter determines where the menu appears relative to the mouse when the user right clicks on the control that uses the menu.

The AutoPopup parameter specifies whether the menu should appear automatically when the user right clicks the associated control.

The Items parameter is an array of menu items that make up the top level menu items. To create the menu items for the Items parameter, use the NewItem function.


NewSubMenu function
 VCL Reference

NewSubMenu function

See also

Creates and initializes a menu item that represents a submenu.

Unit

Menus

Category

menu support routines

function NewSubMenu(const ACaption: string; hCtx: THelpContext; const AName: string; const Items: array ofTMenuItem; AEnabled: Boolean = True): TMenuItem;

Description

Call NewSubMenu to create a menu item that represents a submenu when constructing a menu programmatically at runtime.

The ACaption parameter indicates the string that appears in the parent menu for the submenu.

The hCtx parameter specifies the help context ID for the menu item.

The AName parameter specifies the name of the menu item, which can be used to refer to the menu item in code.

The Items parameter specifies an array of menu items that make up the submenu and that appear when the user clicks the submenu item in the parent menu.

The AEnabled parameter specifies whether the menu item that appears in the parent menu is enabled.

Once a submenu has been created using NewSubMenu, it can be added to a menu using the target parent’s Add method. If the entire menu is being created dynamically at runtime, the new menu item can be added to an array that is passed as a parameter to the NewMenu, NewPopupMenu, or NewSubMenu function.

Warning:	The item returned by NewSubMenu does not have an owner. You are responsible for freeing its memory when it is no longer needed. The Delete and Remove methods of TMenuItem do not free memory.


PopupList variable
 VCL Reference

PopupList variable

See also

Provides centralized handling of Windows messages directed at popup menus.

Unit

Menus

Category

application-level information

var  PopupList: TPopupList;

Description

Use PopupList to access all the popup menus in the application or access the window handle of the window that responds to popup menu messages. PopupList maintains a list of all the popup menu components created in an application. It holds the handle of a hidden window that centralizes the processing of Windows messages directed at these popup menus.


ShortCut function
 VCL Reference

ShortCut function

See also 	Example

Creates a menu shortcut for a specified key combination.

Unit

Menus

Category

menu support routines

function ShortCut(Key: Word; Shift: TShiftState): TShortCut;

Description

Call ShortCut to create a menu shortcut at runtime.

Specify a Key value using a virtual key code.

Specify the values for the Shift, Control, and Alt keys by using a set of type TShiftState. For example, to specify the Shift key, use the set [ssShift]. To specify a Shift and Ctrl key combination, use the set [ssShift, ssCtrl].

Assign the value returned by ShortCut as the value of the ShortCut property of a menu item.

Note:	TextToShortCut can also create a shortcut. TextToShortCut converts a string to a shortcut, so it can be used to let the user specify the shortcut. However, TextToShortCut executes much more slowly than ShortCut. Use ShortCut whenever possible.


ShortCutToKey procedure
 VCL Reference

ShortCutToKey procedure

See also 	Example

Returns the virtual key code and shift state of a menu shortcut.

Unit

Menus

Category

menu support routines

procedure ShortCutToKey(ShortCut: TShortCut; var Key: Word; var Shift: TShiftState;

Description

Call ShortCutToKey to parse a menu shortcut into its virtual key code and shift state parts.

ShortCut is the value of the menu shortcut.

Key returns the virtual key code for the key.

Shirt returns the associated combination of Shift, Ctrl, and Alt keys.


ShortCutToText function
 VCL Reference

ShortCutToText function

See also 	Example

Converts a menu shortcut into a string that describes the shortcut.

Unit

Menus

Category

menu support routines

function ShortCutToText(ShortCut: TShortCut): string;

Description

Call ShortCutToText to obtain a text description of the shortcut associated with a menu item. Use this function when the application needs to display a description of a shortcut to the user.


StripHotKey function
 VCL Reference

StripHotKey function

See also

Removes the accelerator character marker from a string.

Unit

Menus

Category

menu support routines

function StripHotKey (const Text: string): string;

Description

StripHotKey removes the & escape char that marks the accelerator characters in the string Text.  When the current locale is Asian, this function also looks for and removes any parentheses around the accelerator, which are common in Asian locales.


TextToShortCut function
 VCL Reference

TextToShortCut function

See also 	Example

Creates a menu shortcut from a text string.

Unit

Menus

Category

menu support routines

function TextToShortCut(Text: string): TShortCut;

Description

Call TextToShortCut to create a menu shortcut from a descriptive string. For example, an application can allow users to specify the value of a shortcut in an edit box control, and then call TextToShortCut to create a menu shortcut for the value entered by the user.

Note:	TextToShortCut executes slowly. When possible, use the ShortCut function to create a menu shortcut instead.


ValidMenuHotkeys variable
 VCL Reference

ValidMenuHotkeys variable

See also

Determines what accelerator keys can be automatically assigned to a menu item caption.

Unit

Menus

Category

menu support routines

var ValidMenuHotkeys: string = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ';

Description

ValidMenuHotkeys is used to limit the characters that a menu considers when automatically assigning accelerator keys to menu items. This variable is used at runtime when the AutoHotkeys property is True or when an application calls RethinkHotkeys.

By default, ValidMenuHotkeys limits accelerator keys to alphanumeric values (digits and letters). Change this variable to redefine the keys that can be used when assigning accelerator keys automatically.


 VCL Reference


EmptyParam variable
 VCL Reference

EmptyParam variable

Specifies that an optional parameter on a dual interface is not used.

Unit

OleCtrls

Category

COM utilitiesCOM utilities

var EmptyParam: OleVariant;

Description

When marshaling interface calls that include optional parameters, COM still requires a value for those parameters even when they are not used. Pass EmptyParam as that value to indicate that the parameter is not used.


FontToOleFont function
 VCL Reference

FontToOleFont function

See also

Returns a Variant containing an IFontDispatch interface that represents a TFont object.

Unit

OleCtrls

Category

COM utilities

function FontToOleFont(Font: TFont): Variant;

Description

Use FontToOleFont to convert a font from TFont to IFontDispatch format. The interface uses the TFont object to implement the methods of the interface.


OleFontToFont procedure
 VCL Reference

OleFontToFont procedure

See also

Fills in a TFont structure to represent an IFontDispatch.

Unit

OleCtrls

Category

COM utilities

procedure OleFontToFont(const OleFont: Variant; Font: TFont);

Description

Use OleFontToFont to convert a font from COM (IFontDispatch) to TFont format.


DestroyMetaPict procedure
 VCL Reference

DestroyMetaPict procedure

See also

Frees a metafile resource given its handle.

Unit

OleCtnrs

Category

Windows controls utilities

procedure DestroyMetaPict(MetaPict: HGlobal);

Description

Call DestroyMetaPict to free a metafile obtained using the GetIconMetaPict method of TOleContainer.

You do not need to use DestroyMetaPict to free metafiles represented using TMetafile. These are freed automatically when the TMetafile instance is destroyed.  However, if you assign a new value to the Handle property of TMetafile, thereby replacing its old metafile, you must free the old metafile by calling DestroyMetaPict.


Abort procedure
 VCL Reference

Abort procedure

See also	Example

Raises a silent exception.

Unit

SysUtils

Category

flow control routines

procedure Abort;

Description

Use Abort to escape from an execution path without reporting an error.

Abort raises a special "silent exception" (EAbort), which operates like any other exception, but does not display an error message to the end user.  Abort redirects execution to the end of the last try .. finally block.


AddExitProc procedure
 VCL Reference

AddExitProc procedure

Add procedure to exit list.

Unit

SysUtils

Category

backward compatibility routines

procedure AddExitProc(Proc: TProcedure);

Description

AddExitProc adds Proc to the exit procedure list, so that Proc is automatically executed when the application terminates. AddExitProc is not compatible with VCL package support and is provided for backward compatibility only. Do not use AddExitProc in new applications.


AddTerminateProc procedure
 VCL Reference

AddTerminateProc procedure

See also

Adds a terminate procedure to the system list of termination procedures.

Unit

SysUtils

Category

termination procedure support

procedure AddTerminateProc(TermProc: TTerminateProc);

Description

Call AddTerminateProc to add a procedure that should be called when the application is about to terminate. The run time library calls all termination procedures before the application terminates.  The supplied termination procedure (TermProc) should return True if the application can safely terminate or False if the application cannot safely terminate. If any termination procedure returns False, the application does not terminate.


AllocMem function
 VCL Reference

AllocMem function

See also

Allocates a memory block and initializes each byte to zero.

Unit

SysUtils

Category

memory management routines

function AllocMem(Size: Cardinal): Pointer;

Description

AllocMem allocates a block of the given size on the heap. Each byte in the allocated buffer is set to zero. To dispose the buffer, use FreeMem.

If there isn't enough memory available to allocate the block, an EOutOfMemory exception is raised. For more information on handling run-time library exceptions, see Handling RTL Exceptions.

Note:	If the memory does not need to be zero-initialized, it is more efficient to use GetMem instead.


AnsiCompareFileName function
 VCL Reference

AnsiCompareFileName function

See also

Compares file names based on the current locale.

Unit

SysUtils

Category

MBCS utilities

function AnsiCompareFileName(const S1, S2: string): Integer;

Description

AnsiCompareFileName compares S1 to S2, without case sensitivity. The current locale controls the compare operation.

The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2	= 0

AnsiCompareFileName supports the idiosyncracies of MS-DOS file names that use Zenkaku Moji, a character encoding used in some Asian locales. Under  locales that do not use MBCS, AnsiCompareFileName is identical to AnsiCompareText.


AnsiCompareStr function
 VCL Reference

AnsiCompareStr function

See also

Compares strings based on the current locale with case sensitivity.

Unit

SysUtils

Category

string handling routines

function AnsiCompareStr(const S1, S2: string): Integer;

Description

AnsiCompareStr compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is:

Condition	Return Value
S1 > S2	> 0
S1 < S2	< 0
S1 = S2	= 0
Note:	Most locales consider lowercase characters to be less than the corresponding uppercase characters.  This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters.  Thus,

AnsiCompareStr('a','A')

returns a value less than zero, while

CompareStr('a','A')

returns a value greater than zero.


AnsiCompareText function
 VCL Reference

AnsiCompareText function

See also

Compares strings based on the current locale without case sensitivity.

Unit

SysUtils

Category

string handling routines

function AnsiCompareText(const S1, S2: string): Integer;

Description

AnsiCompareText compares S1 to S2, without case sensitivity. The compare operation is controlled by the current locale. AnsiCompareText returns a value less than 0 if S1 < S2, a value greater than 0 if S1 > S2, and returns 0 if S1 = S2.


AnsiDequotedStr function
 VCL Reference

AnsiDequotedStr function

See also

Converts a quoted string into an unquoted

Unit

SysUtils

Category

string handling routines

function AnsiDequotedStr(const S: string; AQuote: Char): string;

Description

AnsiDequotedStr removes the quote characters from the beginning and end of a quoted string, and reduces pairs of quote characters within the string to a single quote character. The AQuote parameter defines what character to use as a quote character. If the S parameter does not begin and end with the quote character, AnsiDequotedStr returns S unchanged.

Note:	This function supports multi-byte character sets (MBCS).


AnsiExtractQuotedStr function
 VCL Reference

AnsiExtractQuotedStr function

See also

Converts a quoted string into an unquoted string.

Unit

SysUtils

Category

string handling routines

function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string;

Description

AnsiExtractQuotedStr removes the quote characters from the beginning and end of a quoted string, and reduces pairs of quote characters within the string to a single quote character. The Quote parameter defines what character to use as a quote character. If the first character in Src is not the value of the Quote parameter, AnsiExtractQuotedStr returns an empty string.

The function copies characters from Src to the result string until the second solitary quote character or the first null character in Src. The Src parameter is updated to point to the first character following the quoted string.  If Src does not contain a matching end quote character, the Src parameter is updated to point to the terminating null character.

Note:	This function supports multi-byte character sets (MBCS).


AnsiLastChar function
 VCL Reference

AnsiLastChar function

See also

Returns a pointer to the last character in a string.

Unit

SysUtils

Category

MBCS utilities

function AnsiLastChar(const S: string): PChar;

Description

Call AnsiLastChar to obtain locate the last character in a string. This function supports multi-byte character sets (MBCS).


AnsiLowerCase function
 VCL Reference

AnsiLowerCase function

See also

Returns a string that is a copy of the given string converted to lower case.

Unit

SysUtils

Category

string handling routines

function AnsiLowerCase(const S: string): string;

Description

AnsiLowerCase returns a string that is a copy of the given string converted to lower case. The conversion uses the current locale. This function supports multi-byte character sets (MBCS).


AnsiLowerCaseFileName function
 VCL Reference

AnsiLowerCaseFileName function

See also

Converts a file name to lower case.

Unit

SysUtils

Category

MBCS utilities

function AnsiLowerCaseFileName(const S: string): string;

Description

AnsiLowerCaseFileName returns a string that is a copy of S converted to lower case. The conversion uses the current locale.

AnsiLowerCaseFileName supports lowercase conversion idiosyncrasies of file names in Asian locales (Zenkaku).  In locales that do not use multi byte character systems (MBCS), AnsiLowerCaseFileName is identical to AnsiLowerCase.


AnsiPos function
 VCL Reference

AnsiPos function

See also

Locates the position of a substring within a string.

Unit

SysUtils

Category

string handling routines

function AnsiPos(const Substr, S: string): Integer;

Description

Call AnsiPos to obtain the byte offset of the Substr parameter, as it appears in the string S. For example, if Substr is the string 'AB', and S is the string 'ABCDE', AnsiPos returns 1. If Substr does not appear in S, AnsiPos returns 0.

Note:	This function supports multi-byte character sets (MBCS).


AnsiQuotedStr function
 VCL Reference

AnsiQuotedStr function

See also

Returns the quoted version of a string.

Unit

SysUtils

Category

string handling routines

function AnsiQuotedStr(const S: string; Quote: Char): string;

Description

Use AnsiQuotedStr to convert a string (S) to a quoted string, using the provided Quote character.  A Quote character is inserted at the beginning and end of S, and each Quote character in the string is doubled.

Note:	This function supports multi-byte character sets (MBCS).


AnsiSameStr function
 VCL Reference

AnsiSameStr function

See also

Compares strings based on the current locale with case sensitivity.

Unit

SysUtils

Category

string handling routines

function AnsiSameStr(const S1, S2: string): Boolean;

Description

AnsiSameStr compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is True if the two strings have the same value, False otherwise.


AnsiSameText function
 VCL Reference

AnsiSameText function

See also

Compares strings based on the current locale without case sensitivity.

Unit

SysUtils

Category

string handling routines

function AnsiSameText(const S1, S2: string): Boolean;

Description

AnsiSameText compares S1 to S2, without case sensitivity. The compare operation is controlled by the current locale. The return value is True if the two strings have the same value, False otherwise.


AnsiStrComp function
 VCL Reference

AnsiStrComp function

See also

Compares null-terminated character strings.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrComp(S1, S2: PChar): Integer;

Description

AnsiStrComp compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2	= 0

Note:	Most locales consider lowercase characters to be less than the corresponding uppercase characters.  This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters.

Note:	This function supports multi-byte character sets (MBCS).


AnsiStrIComp function
 VCL Reference

AnsiStrIComp function

See also

Compares null terminated character strings case insensitively.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrIComp(S1, S2: PChar): Integer;

Description

AnsiStrIComp compares S1 to S2, without case sensitivity. The compare operation is controlled by the current locale. The return value is the same as for CompareStr.

Note:	This function supports multi-byte character sets (MBCS).


AnsiStrLastChar function
 VCL Reference

AnsiStrLastChar function

See also

Returns a pointer to the last character in a null-terminated string.

Unit

SysUtils

Category

MBCS utilities

function AnsiStrLastChar(P: PChar): PChar;

Description

Call AnsiStrLastChar to obtain a pointer to the last full character in a null-terminated sequence. When working with multi-byte character sets (MBCS), the last character will not be the same as the last Char if the last two bytes represent a single double byte character.


AnsiStrLComp function
 VCL Reference

AnsiStrLComp function

See also

Compares the first MaxLen bytes of two null-terminated strings, case-sensitively.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrLComp(S1, S2: PChar; MaxLen: Cardinal): Integer;

Description

AnsiStrLComp compares S1 to S2, with case sensitivity. If S1 or S2 is longer than MaxLen bytes, AnsiStrLComp only compares the first MaxLen bytes. The compare operation is controlled by the current locale. The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2 (up to MaxLen characters)	= 0

Note:	This function supports multi-byte character sets (MBCS).

Note:	AnsiStrLComp can continue the comparison beyond a null terminating character if S1 and S2 are equal up to a null character and the null character occurs before MaxLen bytes.

Note:	Most locales consider lowercase characters to come before corresponding uppercase characters.  This is in contrast to ASCII order, in which lowercase characters come after uppercase characters.


AnsiStrLIComp function
 VCL Reference

AnsiStrLIComp function

See also

Compares two strings, case-insensitively, up to the first MaxLen bytes.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrLIComp(S1, S2: PChar; MaxLen: Cardinal): Integer;

Description

AnsiStrLIComp compares S1 to S2, without case sensitivity. If S1 or S2 is longer than MaxLen characters, AnsiStrLIComp only compares up to the first MaxLen characters. The compare operation is controlled by the current locale. The return value is:

Condition	Return Value

S1 > S2	> 0

S1 < S2	< 0

S1 = S2 (up to MaxLen characters)	= 0

Note:	This function supports multi-byte character sets (MBCS).

Note:	AnsiStrLIComp can continue the comparison beyond a null terminating character if S1 and S2 are equal up to a null character and the null character occurs before MaxLen bytes.


AnsiStrLower function
 VCL Reference

AnsiStrLower function

See also

Converts all characters in a null-terminated string to lower case.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrLower(Str: PChar): PChar;

Description

AnsiStrLower returns a null-terminated character sequence where all characters are lower case. The conversion uses the current locale.

Note:	This function supports multi-byte character sets (MBCS).


AnsiStrPos function
 VCL Reference

AnsiStrPos function

See also

Returns a pointer to the first occurrence of SubStr in Str.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrPos(Str, SubStr: PChar): PChar;

Description

Call AnsiStrPos to locate the first occurrence of SubStr in Str. If SubStr does not occur in Str, AnsiStrPos returns nil.

Unlike the StrPos function, AnsiStrPos works with multi-byte characters sets (MBCS).


AnsiStrRScan function
 VCL Reference

AnsiStrRScan function

See also

Returns a pointer to the last occurrence of a specified character in a specified string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrRScan(Str: PChar; Chr: Char): PChar;

Description

Call AnsiStrRScan to obtain a pointer to the last occurrence of Chr in Str. If Chr does not occur in Str, AnsiStrRScan returns nil. The null terminator is considered to be part of the string.

Unlike the StrRScan function, AnsiStrRScan works with multi-byte character systems (MBCS).


AnsiStrScan function
 VCL Reference

AnsiStrScan function

See also

Returns a pointer to first occurrence of a character in a string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrScan(Str: PChar; Chr: Char): PChar;

Description

Call AnsiStrScan to obtain a pointer to the first occurrence of Chr in Str. If Chr does not occur in Str, AnsiStrScan returns nil. The null terminator is considered to be part of the string.

Unlike the StrScan function, AnsiStrScan works with multi-byte character systems (MBCS).


AnsiStrUpper function
 VCL Reference

AnsiStrUpper function

See also

Converts all characters in a null-terminated string to upper case.

Unit

SysUtils

Category

string handling routines (null-terminated)

function AnsiStrUpper(Str: PChar): PChar;

Description

AnsiStrUpper returns a null-terminated string where all characters are upper case. The conversion uses the current locale.

Note:	This function supports multi-byte character sets (MBCS).


AnsiUpperCase function
 VCL Reference

AnsiUpperCase function

See also

Converts a string to upper case.

Unit

SysUtils

Category

string handling routines

function AnsiUpperCase(const S: string): string;

Description

AnsiUpperCase returns a string that is a copy of S, converted to upper case. The conversion uses the current locale.

Note:	This function supports multi-byte character sets (MBCS).


AnsiUpperCaseFileName function
 VCL Reference

AnsiUpperCaseFileName function

See also

Converts a file name to upper case.

Unit

SysUtils

Category

MBCS utilities

function AnsiUpperCaseFileName(const S: string): string;

Description

AnsiUpperCaseFileName returns a string that is a copy of S converted to upper case. The conversion uses the current locale.

AnsiUpperCaseFileName supports uppercase conversion idiosyncrasies of file names in Asian locales (Zenkaku).  In locales that do not use multi byte character systems (MBCS), AnsiUpperCaseFileName is identical to AnsiUpperCase.


AppendStr procedure
 VCL Reference

AppendStr procedure

Appends a dynamically allocated string to an existing string.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

procedure AppendStr(var Dest: string; const S: string); deprecated;

Description

AppendStr appends S to the end of Dest. It is provided for backwards compatibility only. Use

Dest := Dest + S;

instead.


AssignStr procedure
 VCL Reference

AssignStr procedure

See also

Assigns a new dynamically allocated string to a specified pointer.

Unit

SysUtils

Category

backward compatibility routines

procedure AssignStr(var P: PString; const S: string); deprecated;

Description

Do not use AssignStr in new applications.  It is provided for backward compatibility only.


Beep procedure
 VCL Reference

Beep procedure

Generates a message beep.

Unit

SysUtils

Category

miscellaneous routines

procedure Beep;

Description

Beep calls the Windows API MessageBeep.


BoolToStr function
 VCL Reference

BoolToStr function

See also	Example

Converts a boolean value to a string.

Unit

SysUtils

Category

type conversion routines

function BoolToStr(B: Boolean; UseBoolStrs: Boolean = False): string;

Description

BoolToStr converts the given boolean value to a string as follows:

Value of B	Value of UseBoolStrs	Value of returned string

True	False	‘-1’

True	True	The first string in TrueBoolStrs (default, ‘TRUE’);

False	False	‘0’

False	True	The first string in FalseBoolStrs (default ‘FALSE’);


ByteToCharIndex function
 VCL Reference

ByteToCharIndex function

See also

Returns the position of the character that contains a specified byte in a string.

Unit

SysUtils

Category

MBCS utilities

function ByteToCharIndex(const S: string; Index: Integer): Integer;

Description

Call ByteToCharIndex to determine which character contains a particular byte in a string, where 1 specifies the first byte, 2 specifies the second byte, and so on. If the Index parameter specifies a byte that is not in the AnsiString (Index < 0 or Index > Length(S)), ByteToCharIndex returns 0.

If the system does not use a multi-byte character system (MBCS), ByteToCharIndex simply returns the value of Index, because there is a 1:1 correspondence between bytes and characters. Otherwise, ByteToCharIndex returns the position of the character, where 1 specifies the first character, 2 specifies the second character, and so on.

For example, if an AnsiString contains two characters, a single-byte character followed by a double byte character, then ByteToCharIndex returns 1 when Index is 1, it returns 2 when Index is 2 or 3, and it returns 0 for any other value of Index.


ByteToCharLen function
 VCL Reference

ByteToCharLen function

See also

Returns the number of characters fully contained in the first MaxLen bytes of a string.

Unit

SysUtils

Category

MBCS utilities

function ByteToCharLen(const S: string; MaxLen: Integer): Integer;

Description

Call ByteToCharLen to determine the number of characters represented by a portion of a string. ByteToCharLen counts characters until it reaches MaxLen bytes or the end of the string, whichever comes first.

When working with multi-byte character systems (MBCS), the value returned by ByteToCharLen may be less than MaxLen or the length of the string.

Note:	ByteToCharLen will count a partial character if it appears as the last of the first MaxLen bytes.


ByteType function
 VCL Reference

ByteType function

See also

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

Unit

SysUtils

Category

MBCS utilities

function ByteType(const S: string; Index: Integer): TMbcsByteType;

Description

Call ByteType to determine the type of the byte specified by the Index parameter, where 0 specifies the first byte in S, 1 specifies the second byte, and so on.

If the system is not using a multi-byte character system (MBCS), ByteType always returns mbSingleByte. Otherwise, ByteType returns mbSingleByte if the indicated byte represents a complete character in S, mbLeadByte if it represents the first byte of a double byte character, and mbTrailByte if it represents the second byte of a double byte character.

Note:	No checking is done to ensure that Index is less than the length of S. It is the caller's responsibility to ensure that Index is not out of bounds.


CallTerminateProcs function
 VCL Reference

CallTerminateProcs function

See also

Calls all of the functions in the termination procedure list.

Unit

SysUtils

Category

termination procedure support

function CallTerminateProcs: Boolean;

Description

CallTerminateProcs is called internally when an application is about to terminate.  It returns True only if all of the functions in the application's terminate procedure list return True.  This function is intended only to be called by Delphi. Do not call it directly.


ChangeFileExt function
 VCL Reference

ChangeFileExt function

See also 	Example

Changes the extension of a file name.

Unit

SysUtils

Category

file name utilities

function ChangeFileExt(const FileName, Extension: string): string;

Description

ChangeFileExt takes the file name passed in FileName and changes the extension of the file name to the extension passed in Extension.  Extension specifies the new extension, including the initial dot character.

ChangeFileExt does not rename the actual file, it just creates a new file name string.

Note:	This function works with multi-byte character sets (MBCS).


CharLength function
 VCL Reference

CharLength function

Returns number of bytes used by a character.

Unit

SysUtils

Category

MBCS utilities

function CharLength(const S: String; Index: Integer): Integer;

Description

Call CharLength to determine the size in bytes of the character located in S at Index.

If the system is not using a multi-byte character system (MBCS), CharLength always returns 1.


CharToByteIndex function
 VCL Reference

CharToByteIndex function

See also

Returns the 1-based index of the first byte of a specified character in a string.

Unit

SysUtils

Category

MBCS utilities

function CharToByteIndex(const S: string; Index: Integer): Integer;

Description

Call CharToByteIndex to obtain the byte offset for the character at a specified position in the string S, where 1 specifies the first character, 2 specifies the second character, and so on. CharToByteIndex returns zero if Index is out of range (Index <= 0 or S contains fewer than Index characters). If the Index parameter indicates a double-byte character, CharToByteIndex returns the offset of the first byte.

If the system is not using a multi-byte character system (MBCS), CharToByteIndex returns the value of Index, because there is a 1:1 correspondence between bytes and characters.


CharToByteLen function
 VCL Reference

CharToByteLen function

See also

Returns the length, in bytes, of the first MaxLen characters of a string.

Unit

SysUtils

Category

MBCS utilities

function CharToByteLen(const S: string; MaxLen: Integer): Integer;

Description

Call CharToByteLen to convert the length of a string in characters to the corresponding length in bytes. CharToByteLen returns the number of bytes required by the first MaxLen characters of S. If S contains fewer than MaxLen characters, CharToByteLen returns the byte length of S.

If the system is not using a multi-byte character system (MBCS), CharToByteLen returns the length of S or MaxLen, whichever is smaller.


CompareMem function
 VCL Reference

CompareMem function

See also

Performs a binary comparison of two memory images.

Unit

SysUtils

Category

comparison routines

function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; assembler;

Description

CompareMem performs a binary compare of Length bytes of memory referenced by P1 to that of P2.  CompareMem returns True if the memory referenced by P1 is identical to that of P2.


CompareStr function
 VCL Reference

CompareStr function

See also 	Example

Compares two strings case sensitively.

Unit

SysUtils

Category

string handling routines

function CompareStr(const S1, S2: string): Integer;

Description

CompareStr compares S1 to S2, with case-sensitivity. The return value is less than 0 if S1 is less than S2, 0 if S1 equals S2, or greater than 0 if S1 is greater than S2. The compare operation is based on the 8-bit ordinal value of each character and is not affected by the current locale.


CompareText function
 VCL Reference

CompareText function

See also	Example

Compares two strings by ordinal value without case sensitivity.

Unit

SysUtils

Category

string handling routines

function CompareText(const S1, S2: string): Integer;

Description

CompareText compares S1 and S2 and returns 0 if they are equal. If S1 is greater than S2, CompareText returns an integer greater than 0. If S1 is less than S2, CompareText returns an integer less than 0. CompareText is not case sensitive and is not affected by the current locale.


CreateDir function
 VCL Reference

CreateDir function

See also	Example

Creates a new directory.

Unit

SysUtils

Category

file management routines

function CreateDir(const Dir: string): Boolean;

Description

CreateDir creates a new directory. The return value is True if a new directory was successfully created, or False if an error occurred.


Currency and date/time formatting variables
 VCL Reference

Currency and date/time formatting variables

See also 	Example

Influence the way numeric or date/time values are formatted.

Unit

SysUtils

The following are a set of variables used to define the format for numeric or date/time strings:

var CurrencyString: string;

var CurrencyFormat: Byte;

var NegCurrFormat: Byte;

var ThousandSeparator: Char;

var DecimalSeparator: Char;

var CurrencyDecimals: Byte;

var DateSeparator: Char;

var ShortDateFormat: string;

var LongDateFormat: string;

var TimeSeparator: Char;

var TimeAMString: string;

var TimePMString: string;

var ShortTimeFormat: string;

var LongTimeFormat: string;

var ShortMonthNames: array[1..12] of string;

var LongMonthNames: array[1..12] of string;

var ShortDayNames: array[1..7] of string;

var LongDayNames: array[1..7] of string;

var SysLocale: TSysLocale;

var EraNames: array[1..7] of string;

var EraYearOffsets: array[1..7] of Integer;

var TwoDigitYearCenturyWindow: Word = 50;

var TListSeparator: Char;

Description

The SysUtils unit includes a number of variables that are used by various formatting routines. Values are assigned to these variables to define the formats of numeric and date/time strings. The initial values of these variables are fetched from the system registry using the GetLocaleInfo function in the Win32 API. VCL (non-console) applications automatically update these formatting variables in response to WM_WININICHANGE messages. The Application variable’s UpdateFormatSettings method either allows or disallows changes in system settings. The default is True. Set this property to False to prevent the system settings from changing.

The description of each variable specifies the LOCALE_XXXX constant used to fetch the value .

Typed constant	Defines

CurrencyString	CurrencyString defines the currency symbol (or characters) used in floating-point to decimal conversions. The initial value is fetched from LOCALE_SCURRENCY.

CurrencyFormat	CurrencyFormat defines the currency symbol placement and separation used in floating-point–to–decimal conversions. Possible values are:
0 = $1
1 = 1$
2 = $ 1
3 = 1 $
The initial value is fetched from LOCALE_ICURRENCY.

NegCurrFormat	NegCurrFormat defines the currency format used in floating-point to decimal conversions of negative numbers. Possible values are:
0 = ($1)    4 = (1$)    8 = -1 $     12 = $ -1
1 = -$1     5 = -1$     9 = -$ 1     13 = 1- $
2 = $-1     6 = 1-$    10 = 1 $-    14 = ($ 1)
3 = $1-     7 = 1$-    11 = $ 1-    15 = (1 $)
The initial value is fetched from LOCALE_INEGCURR.

ThousandSeparator	ThousandSeparator is the character used to separate thousands in numbers with more than three digits to the left of the decimal separator. A value of #0 indicates that no thousand separator character should be output, even if the format string specifies it. The initial value is fetched from LOCALE_STHOUSAND.

DecimalSeparator	DecimalSeparator is the character used to separate the integer part from the fractional part of a number. This variable must have a value other than #0. The initial value is fetched from LOCALE_SDECIMAL.

CurrencyDecimals	CurrencyDecimals is the number of digits to the right of the decimal point in a currency amount. The initial value is fetched from LOCALE_ICURRDIGITS.

DateSeparator	DateSeparator is the character used to separate the year, month, and day parts of a date value. The initial value is fetched from LOCATE_SDATE.

ShortDateFormat	ShortDateFormat is the format string used to convert a date value to a short string suitable for editing. For a complete description of date and time format strings, see Date-Time format strings. The short date format should only use the date separator character and the  m, mm, d, dd, yy, and yyyy format specifiers. The initial value is fetched from LOCALE_SSHORTDATE.

LongDateFormat	LongDateFormat is the format string used to convert a date value to a long string suitable for display but not for editing. For a complete description of date and time format strings, see Date-Time format strings. The initial value is fetched from LOCALE_SLONGDATE.

TimeSeparator	TimeSeparator is the character used to separate the hour, minute, and second parts of a time value. The initial value is fetched from LOCALE_STIME.

TimeAMString	TimeAMString is the suffix string used for time values between 00:00 and 11:59 in 12-hour clock format. The initial value is fetched from LOCALE_S1159.

TimePMString	TimePMString is the suffix string used for time values between 12:00 and 23:59 in 12-hour clock format. The initial value is fetched from LOCALE_S2359.

ShortTimeFormat	ShortTimeFormat is the format string used to convert a time value to a short string with only hours and minutes. The default value is computed from LOCALE_ITIME and LOCALE_ITLZERO.

LongTimeFormat	LongTimeFormat is the format string used to convert a time value to a long string with hours, minutes, and seconds. The default value is computed from LOCALE_ITIME and LOCALE_ITLZERO.

ShortMonthNames	ShortMonthNames is the array of strings containing short month names. The mmm format specifier in a format string passed to FormatDateTime causes a short month name to be substituted. The default values are fetched from the LOCALE_SABBREVMONTHNAME system locale entries.

LongMonthNames	LongMonthNames is the array of strings containing long month names. The mmmm format specifier in a format string passed to FormatDateTime causes a long month name to be substituted. The default values are fetched from the LOCALE_SMONTHNAME system locale entries.

ShortDayNames	ShortDayNames is the array of strings containing short day names. The ddd format specifier in a format string passed to FormatDateTime causes a short day name to be substituted. The default values are fetched from the LOCALE_SABBREVDAYNAME system locale entries.

LongDayNames	LongDayNames is the array of strings containing long day names. The dddd format specifier in a format string passed to FormatDateTime causes a long day name to be substituted. The default values are fetched from the LOCALE_SDAYNAME system locale entries.

SysLocale	Indicates the locale used by FormatDateTime to interpret dates.

EraName	Controls the DateTimeToStr function (for East Asian locales).

EraYearOffsets	Controls the DateTimeToStr function (for East Asian locales).

TwoDigitYearCenturyWindow	Determines what century is added to two-digit years when string dates are converted to numeric dates with StrToDate or StrToDateTime. The value of TwoDigitYearCenturyWindow, if it is nonzero, is subtracted from the current year to calculate the floating “pivot” prior to which two-digit years are interpreted as falling in the next century. The default value is 50. You can use TwoDigitYearCenturyWindow to extend the life of legacy applications that are tied to two-digit-year data entry; but the best solution is to require four-digit input for years.

ListSeparator	The character used to separate items in a list. The default value is fetched from LOCALE_SLIST.


CurrentYear function
 VCL Reference

CurrentYear function

Creates a new directory.

Unit

SysUtils

Category

Date/Time routines

function CurrentYear: Word;

Description

CurrentYear returns the current year on the Gregorian calendar. The value returned is the complete four-digit year.


CurrToStr function
 VCL Reference

CurrToStr function

See also

Formats a Currency value as a string.

Unit

SysUtils

Category

numeric formatting routines

function CurrToStr(Value: Currency): string;

Description

CurrToStr converts the Currency value given by Value to its string representation. The conversion uses the ffGeneral floating point conversion rules.


CurrToStrF function
 VCL Reference

CurrToStrF function

See also

Converts a Currency value to a string, using a specified format.

Unit

SysUtils

Category

numeric formatting routines

function CurrToStrF(Value: Currency; Format: TFloatFormat; Digits: Integer): string;

Description

CurrToStrF converts the Currency value given by Value to its string representation using the indicated float format convention. A call to CurrToStrF corresponds to a call to FloatToStrF with an implied precision of 19 digits.


Date function
 VCL Reference

Date function

See also	Example

Returns the current date.

Unit

SysUtils

Category

date/time routines

function Date: TDateTime;

Description

Use Date to obtain the current local date as a TDateTime value. The time portion of the value is 0 (midnight).


DateDelta constant
 VCL Reference

DateDelta constant

See also

Specifies the difference between TDateTime and TTimeStamp values.

Unit

SysUtils

Category

date/time routines

const DateDelta = 693594;

Description

DateDelta is number of days between January 1, 0001, and December 31, 1899. This value is useful for converting date-time values between TDateTime and TTimeStamp.


DateTimeToFileDate function
 VCL Reference

DateTimeToFileDate function

See also

Converts a TDateTime object to an OS timestamp.

Unit

SysUtils

Category

date/time routines

function DateTimeToFileDate(DateTime: TDateTime): Integer;

Description

Use DateTimeToFileDate to convert a TDateTime value, which is the representation of date-and-time values used by the VCL, to an OS time stamp..

For example, use DateTimeToFileDate to convert a TDateTime value to a format that can be used as the Age parameter of FileSetDate. You may also need to use DateTimeToFileDate to convert a TDateTime so that it is compatible with the Time field of the TSearchRec record used by the FindFirst and FindNext functions.


DateTimeToStr function
 VCL Reference

DateTimeToStr function

See also	Example

Converts a TDateTime value to a string.

Unit

SysUtils

Category

date/time routines

function DateTimeToStr(DateTime: TDateTime): string;

Description

DateTimeToString converts the TDateTime value given by DateTime using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the fractional part of the DateTime value is zero.

To change how the string is formatted, change ShortDateFormat and LongTimeFormat global date time formatting variables.


DateTimeToString procedure
 VCL Reference

DateTimeToString procedure

See also

Converts a TDateTime value to a string using a specified Format.

Unit

SysUtils

Category

date/time routines

procedure DateTimeToString(var Result: string; const Format: string; DateTime: TDateTime);

Description

DateTimeToString converts the TDateTime value given by DateTime using the format string given by Format into the string variable given by Result. For Formats supported, refer to see Date-Time format strings.


DateTimeToSystemTime procedure
 VCL Reference

DateTimeToSystemTime procedure

See also

Converts a TDateTime value into the Win32 API's TSystemTime type.

Unit

SysUtils

Category

date/time routines

procedure DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime);

Description

Use DateTimeToSystemTime to convert a TDateTime value into a TSystemTime value to use with an API call.


DateTimeToTimeStamp function
 VCL Reference

DateTimeToTimeStamp function

See also

Converts a TDateTime value into the corresponding TTimeStamp value.

Unit

SysUtils

Category

date/time routines

function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;

Description

Call DateTimeToTimeStamp to convert a TDateTime value into a TTimeStamp value.


DateToStr function
 VCL Reference

DateToStr function

See also	Example

Converts a TDateTime value to a string.

Unit

SysUtils

Category

date/time routines

function DateToStr(Date: TDateTime): string;

Description

Use DateToStr to obtain a string representation of a date value that can be used for display purposes. The conversion uses the format specified by the ShortDateFormat global variable.


DayOfWeek function
 VCL Reference

DayOfWeek function

See also	Example

Returns the day of the week for a specified date.

Unit

SysUtils

Category

date/time routines

function DayOfWeek(Date: TDateTime): Integer;

Description

DayOfWeek returns the day of the week of the specified date as an integer between 1 and 7, where Sunday is the first day of the week and Saturday is the seventh.

Note:	DayOfWeek is not compliant with the ISO 8601 standard, which defines Monday as the first day of the week. For an ISO 8601 compliant version, use the DayOfTheWeek function instead.


DecodeDate procedure
 VCL Reference

DecodeDate procedure

See also	Example

Returns Year, Month, and Day values for a TDateTime value.

Unit

SysUtils

Category

date/time routines

procedure DecodeDate(Date: TDateTime; var Year, Month, Day: Word);

Description

The DecodeDate procedure breaks the value specified as the Date parameter into Year, Month, and Day values. If the given TDateTime value has a negative (BC) year, the year, month, and day return parameters are all set to zero.


DecodeDateFully function
 VCL Reference

DecodeDateFully function

See also

Returns Year, Month, and Day, and Day-of-Week values for a TDateTime value.

Unit

SysUtils

Category

date/time routines

function DecodeDateFully(const DateTime: TDateTime; var Year, Month, Day,

    DOW: Word): Boolean;

Description

DecodeDateFully procedure breaks the value specified as the Date parameter into Year, Month, Day, and DOW values. If Year is a leap year, the function return value is True; otherwise the function return value is false. If the given TDateTime value has a negative (BC) year, the return parameters are all set to zero.


DecodeTime procedure
 VCL Reference

DecodeTime procedure

See also	Example

Breaks a TDateTime value into hours, minutes, seconds, and milliseconds.

Unit

SysUtils

Category

date/time routines

procedure DecodeTime(Time: TDateTime; var Hour, Min, Sec, MSec: Word);

Description

DecodeTime breaks the object specified as the Time parameter into hours, minutes, seconds, and milliseconds.


DeleteFile function
 VCL Reference

DeleteFile function

Example

Deletes a file from disk.

Unit

SysUtils

Category

file management routines

function DeleteFile(const FileName: string): Boolean;

Description

DeleteFile deletes the file named by FileName from the disk. If the file cannot be deleted or does not exist, the function returns False.


DirectoryExists function
 VCL Reference

DirectoryExists function

See also	Example

Determines whether a specified directory exists.

Unit

SysUtils

or FileCtrl

Category

file management routines

function DirectoryExists(const Directory: string): Boolean;

Description

Call DirectoryExists to determine whether the directory specified by the Name parameter exists. If the directory exists, the function returns True. If the directory does not exist, the function returns False.

If a full path name is entered, DirectoryExists searches for the directory along the designated path. Otherwise, the Name parameter is interpreted as a relative path name from the current directory.

Note:	DirectoryExists is also found in the FileCtrl unit.


DiskFree function
 VCL Reference

DiskFree function

See also	Example

Returns the number of free bytes on a specified drive.

Unit

SysUtils

Category

file management routines

function DiskFree(Drive: Byte): Int64;

Description

DiskFree returns the number of free bytes on the specified drive, where 0 = Current, 1 = A, 2 = B, and so on.

DiskFree returns -1 if the drive number is invalid.


DiskSize function
 VCL Reference

DiskSize function

See also	Example

Returns the size, in bytes, of a specified drive.

Unit

SysUtils

Category

file management routines

function DiskSize(Drive: Byte): Int64;

Description

DiskSize returns the size in bytes of the specified drive, where 0 = Current, 1 = A, 2 = B, etc. DiskSize returns -1 if the drive number is invalid.


DisposeStr procedure
 VCL Reference

DisposeStr procedure

See also

Disposes of a string pointer that was allocated using NewStr.

Unit

SysUtils

Category

backward compatibility routines

procedure DisposeStr(P: PString); deprecated;

Description

DisposeStr is only provided for backward compatibility with existing code that allocated a string using NewStr. Both DisposeStr and NewStr are obsolete.


EncodeDate function; TryEncodeDate function
 VCL Reference

EncodeDate, TryEncodeDate functions

See also	Example

Returns a TDateTime value that represents a specified Year, Month, and Day.

Unit

SysUtils

Category

date/time routines

function EncodeDate(Year, Month, Day: Word): TDateTime;

function TryEncodeDate(Year, Month, Day: Word; out Date: TDateTime): Boolean;

Description

EncodeDate returns a TDateTime value from the values specified as the Year, Month, and Day parameters.

The year must be between 1 and 9999.

Valid Month values are 1 through 12.

Valid Day values are 1 through 28, 29, 30, or 31, depending on the Month value. For example, the possible Day values for month 2 (February) are 1 through 28 or 1 through 29, depending on whether or not the Year value specifies a leap year.

If the specified values are not within range, EncodeDate raises an EConvertError exception.

TryEncodeDate is identical to EncodeDate, except that TryEncodeDate responds to out of range parameters by returning False instead of raising an exception.


EncodeTime function;TryEncodeTime function
 VCL Reference

EncodeTime function

See also	Example

Returns a TDateTime value for a specified Hour, Min, Sec, and MSec.

Unit

SysUtils

Category

date/time routines

function EncodeTime(Hour, Min, Sec, MSec: Word): TDateTime;

function TryEncodeTime(Hour, Min, Sec, MSec: Word; out Time: TDateTime): Boolean;

Description

EncodeTime encodes the given hour, minute, second, and millisecond into a TDateTime value.

Valid Hour values are 0 through 24. If Hour is 24, Min, Sec, and MSec must all be 0, and the resulting TDateTime value represents midnight (12:00:00:000 AM) of the following day.

Valid Min and Sec values are 0 through 59.

Valid MSec values are 0 through 999.

If the specified values are not within range, EncodeTime raises an EConvertError exception.

The resulting value is a number between 0 and 1 (inclusive) that indicates the fractional part of a day given by the specified time or (if 1.0) midnight on the following day. The value 0 corresponds to midnight, 0.5 corresponds to noon, 0.75 corresponds to 6:00 pm, and so on.

TryEncodeTime is identical to EncodeTime, except that TryEncodeTime responds to out of range parameters by returning False instead of raising an exception.


ExceptionErrorMessage function
 VCL Reference

ExceptionErrorMessage function

See also

Formats a standard error message.

Unit

SysUtils

Category

exception handling routines

function ExceptionErrorMessage(ExceptObject: TObject; ExceptAddr: Pointer; Buffer: PChar; Size: Integer): Integer;

Description

Call ExceptionErrorMessage to assemble an error message that indicates the object associated with the current exception and the location at which the exception was raised. The assembled message is written into the buffer provided by the Buffer parameter. Specify the size of this buffer using the Size parameter.

ExceptionErrorMessage returns the number of bytes in the assembled error message.


ExcludeTrailingBackslash function
 VCL Reference

ExcludeTrailingBackslash function

See also

Returns a path name without a trailing delimiter.

Unit

SysUtils

Category

file name utilities

function ExcludeTrailingBackslash(const S: string): string;

Description

ExcludeTrailingBackslash returns S with any trailing path delimiter ('\') removed. This function is included for backward compatibility only. New programs should use ExcludeTrailingPathDelimiter.

Note:	ExcludeTrailingBackslash works with multibyte character sets.


ExcludeTrailingPathDelimiter function
 VCL Reference

ExcludeTrailingPathDelimiter function

See also

Returns a path name without a trailing delimiter.

Unit

SysUtils

Category

file name utilities

function ExcludeTrailingPathDelimiter(const S: string): string;

Description

ExcludeTrailingPathDelimiter returns S with any trailing path delimiter ('\') removed. If the last character in S is a delimiter, the return value is S with the last character removed. Otherwise, S is returned unchanged.

Note:	ExcludeTrailingPathDelimiter works with multibyte character sets.


ExpandFileName function
 VCL Reference

ExpandFileName function

See also	Example

Returns the full path name for a relative file name.

Unit

SysUtils

Category

file name utilities

function ExpandFileName(const FileName: string): string;

Description

ExpandFileName converts the relative file name into a fully qualified path name.  ExpandFileName does not verify that the resulting fully qualified path name refers to an existing file, or even that the resulting path exists.

Note:	ExpandFileName does not support UNC format. To expand to a UNC file name, use ExpandUNCFileName.


ExpandUNCFileName function
 VCL Reference

ExpandUNCFileName function

See also

Returns the full path of a file name in UNC format, if appropriate.

Unit

SysUtils

Category

file name utilities

function ExpandUNCFileName(const FileName: string): string;

Description

ExpandUNCFileName returns a fully qualified path name using Universal Naming Convention for network files. For a files on local disks, ExpandUNCFileName is equivalent to ExpandFileName.

In a UNC file name, the drive prefix is replaced with the name of the network resource the drive is mapped to. For example, if the working directory is J:\ourdir and drive J is mapped to \\ourserver\ourshare, ExpandUNCFileName('ourfile') returns "\\ourserver\ourshare\ourdir\ourfile".


ExtractFileDir function
 VCL Reference

ExtractFileDir function

See also

Extracts the drive and directory parts from FileName.

Unit

SysUtils

Category

file name utilities

function ExtractFileDir(const FileName: string): string;

Description

The resulting string is a directory name suitable for passing to the CreateDir, GetCurrentDir, RemoveDir, and SetCurrentDir functions. This string is empty if FileName contains no drive and directory parts.

Note:	This function works for multi-byte character systems (MBCS).


ExtractFileDrive function
 VCL Reference

ExtractFileDrive function

See also

Returns the drive portion of a file name.

Unit

SysUtils

Category

file name utilities

function ExtractFileDrive(const FileName: string): string;

Description

ExtractFileDrive returns a string containing the drive portion of a fully qualified path name for the file passed in the FileName. For file names with drive letters, the result is in the form “'<drive>'”. For file names with a UNC path the result is in the form “'\\<servername>\<sharename>'”. If the given path contains neither style of path prefix, the result is an empty string.


ExtractFileExt function
 VCL Reference

ExtractFileExt function

See also

Returns the extension portions of a file name.

Unit

SysUtils

Category

file name utilities

function ExtractFileExt(const FileName: string): string;

Description

Use ExtractFileExt to obtain the extension from a file name. For example, the following code returns the extension of the file name specified by a variable named MyFileName:

MyFilesExtension := ExtractFileExt(MyFileName);

The resulting string includes the period character that separates the name and extension parts. This string is empty if the given file name has no extension.

Note:	This function works for multi-byte character systems (MBCS).


ExtractFileName function
 VCL Reference

ExtractFileName function

See also	Example

Extracts the name and extension parts of a file name.

Unit

SysUtils

Category

file name utilities

function ExtractFileName(const FileName: string): string;

Description

The resulting string is the rightmost characters of FileName, starting with the first character after the colon or backslash that separates the path information from the name and extension. The resulting string is equal to FileName if FileName contains no drive and directory parts.

Note:	This function works for multi-byte character systems (MBCS).


ExtractFilePath function
 VCL Reference

ExtractFilePath function

See also	Example

Returns the drive and directory portions of a file name.

Unit

SysUtils

Category

file name utilities

function ExtractFilePath(const FileName: string): string;

Description

The resulting string is the leftmost characters of FileName, up to and including the colon or backslash that separates the path information from the name and extension. The resulting string is empty if FileName contains no drive and directory parts.

Note:	This function works for multi-byte character systems (MBCS).


ExtractRelativePath function
 VCL Reference

ExtractRelativePath function

See also

Returns a relative path name, relative to a specific base directory.

Unit

SysUtils

Category

file name utilities

function ExtractRelativePath(const BaseName, DestName: string): string;

Description

Call ExtractRelativePath to convert a fully qualified path name into a relative path name.  The DestName parameter specifies file name (including path) to be converted.  BaseName is the fully qualified name of the base directory to which the returned path name should be relative. BaseName may or may not include a file name, but it must include the final path delimiter.


ExtractShortPathName function
 VCL Reference

ExtractShortPathName function

See also

Converts a file name to the short 8.3 form.

Unit

SysUtils

Category

file name utilities

function ExtractShortPathName(const FileName: string): string;

Description

ExtractShortPathName converts the file name, FileName, to the short 8.3 form. ExtractShortPathName returns an empty string if the file or directory does not exist.

The first parameter, FileName, can be a full path name. For example, ExtractShortPathName would convert the full path name:

C:\Program Files\Borland\Delphi\Bin\Delphi32.exe

to the short form:

C:\Progra~1\Borland\Delphi\Bin\Delphi32.exe


FalseBoolStrs variable
 VCL Reference

FalseBoolStrs variable

See also

Lists strings that can represent the boolean value False.

Unit

SysUtils

Category

type conversion routines

var FalseBoolStrs: array of String;

Description

FalseBoolStrs is an array of strings that are used in conversions between boolean values and strings. When using the BoolToStr function, False values are converted to the first string in the list. When using the StrToBool function, any string in the list is converted to False.


FileAge function
 VCL Reference

FileAge function

See also	Example

Returns the OS timestamp of a file.

Unit

SysUtils

Category

file management routines

function FileAge(const FileName: string): Integer;

Description

Call FileAge to obtain the OS timestamp of the file specified by FileName. The return value can be converted to a TDateTime object using the FileDateToDateTime function. The return value is -1 if the file does not exist.


FileClose procedure
 VCL Reference

FileClose procedure

See also	Example

Closes a specified file.

Unit

SysUtils

Category

file management routines

procedure FileClose(Handle: Integer);

Description

FileClose closes a file given its handle. The handle is obtained when the file is opened using FileOpen or FileCreate.

Note:	 When working with Pascal file variables, use the CloseFile procedure instead.


FileCreate function
 VCL Reference

FileCreate function

See also	Example

Creates a new file.

Unit

SysUtils

Category

file management routines

function FileCreate(const FileName: string): Integer;

Description

FileCreate creates a new file with the specified name. If the return value is positive, the function was successful and the value is the file handle of the new file. A return value of -1 indicates that an error occurred.


FileDateToDateTime function
 VCL Reference

FileDateToDateTime function

See also	Example

Converts an OS timestamp value to TDateTime value.

Unit

SysUtils

Category

file management routines

function FileDateToDateTime(FileDate: Integer): TDateTime;

Description

A timestamp is a signed 32-bit integer, used by the OS to record information such as the date and time a file was modified. The precise format of a timestamp depends on the OS. Use FileDateToDateTime to convert a timestamp to a TDateTime value.

For example, use FileDateToDateTime to convert the file timestamp returned by FileGetDate or FileAge to a value that can be used with other VCL routines and properties. You may also need to use FileDateToDateTime to convert the Time field of the TSearchRec record used by the FindFirst and FindNext functions.


FileExists function
 VCL Reference

FileExists function

See also	Example

Tests if a specified file exists.

Unit

SysUtils

Category

file management routines

function FileExists(const FileName: string): Boolean;

Description

FileExists returns True if the file specified by FileName exists. If the file does not exist, FileExists returns False.


FileGetAttr function
 VCL Reference

FileGetAttr function

See also	Example

Returns the file attributes of FileName.

Unit

SysUtils

Category

file management routines

function FileGetAttr(const FileName: string): Integer;

Description

FileGetAttr returns the attributes of the file as a string of bits. This value is the same as the Attr field of a TSearchRec record. Check for individual attributes with code such as the following:

Attrs := FileGetAttr('MyFile.sys');

if Attrs and faHidden <> 0 then

  FileSetAttr('MyFile.sys', Attrs – faHidden);

A return value of -1 indicates that an error occurred.

Note:	See TSearchRec for a description of the individual attribute constants.


FileGetDate function
 VCL Reference

FileGetDate function

See also

Returns an OS timestamp for a specified file.

Unit

SysUtils

Category

file management routines

function FileGetDate(Handle: Integer): Integer;

Description

Use FileGetDate to determine the timestamp of a file given its handle. The return value is -1 if the handle is invalid. The FileDateToDateTime function can be used to convert the returned value to a TDateTime value.

Note:	FileGetDate uses a file handle rather than a native Pascal file variable. To obtain the timestamp of a file that has not been opened using the FileOpen or FileCreate method, use the FileAge function instead.


FileIsReadOnly function
 VCL Reference

FileIsReadOnly function

Report if file is read-only.

Unit

SysUtils

Category

file management routines

function FileIsReadOnly(const FileName: string): Boolean;

Description

FileIsReadOnly returns true if FileName can be found and opened, but the current process does not have permission to write to it.


File open mode constants
 VCL Reference

File open mode constants

File open mode constants are used to control the access mode to a file or stream.

Unit

SysUtils

Category

file management routines

const

  fmOpenRead       = $0000;

  fmOpenWrite      = $0001;

  fmOpenReadWrite  = $0002;

  fmShareCompat    = $0000;

  fmShareExclusive = $0010;

  fmShareDenyWrite = $0020;

  fmShareDenyRead  = $0030;

  fmShareDenyNone  = $0040;

Description

The file open mode constants are used when a file or stream is opened to control how it can be shared.

The TFileStream constructor has a Mode parameter that you can set to one of these constants:

Constant	Definition

fmCreate	If the file exists, open for write access, otherwise, create a new file. Unlike the other constants, which are declared in the SysUtils unit, this constant is declared in classes.pas.

fmOpenRead	Open for read access only.

fmOpenWrite	Open for write access only.

fmOpenReadWrite	Open for read and write access.

fmShareCompat	Compatible with the way FCBs are opened.

fmShareExclusive	Read and write access is denied.

fmShareDenyWrite	Write access is denied.

fmShareDenyRead	Read access is denied.

fmShareDenyNone	Allows full access for others.


FileOpen function
 VCL Reference

FileOpen function

See also	Example

Opens a specified file using a specified access mode.

Unit

SysUtils

Category

file management routines

function FileOpen(const FileName: string; Mode: LongWord): Integer;

Description

Use FileOpen to open a file and obtain a file handle. The access mode value is constructed by or-ing one of the fmOpen constants with one of the fmShare constants defined in File open mode constants. If the return value is 0 or greater, the function was successful and the value is the file handle of the opened file. A return value of -1 indicates that an error occurred.

Note:	Use of the non-native Pascal file handlers such as FileOpen is not encouraged. These routines map to system routines and return OS file handles, not normal Pascal file variables. These are low-level file access routines. For normal file operations use AssignFile, Rewrite, and Reset instead.


FileRead function
 VCL Reference

FileRead function

See also	Example

Reads a specified number of bytes from a file.

Unit

SysUtils

Category

file management routines

function FileRead(Handle: Integer; var Buffer; Count: Integer): Integer;

Description

FileRead reads Count bytes from the file specified by Handle into the buffer. The Count parameter indicates the size, in bytes, of the buffer. The function result is the actual number of bytes read, which may be less than Count. The Handle that is passed to FileRead must be opened with FileOpen or FileCreate.

Note:	Do not mix routines that take or return file handles with those that use Pascal file variables (typically seen as var F). To read from a file specified by a Pascal file variable, use the BlockRead procedure or the Read procedure instead.


FileSearch function
 VCL Reference

FileSearch function

See also	Example

Searches a specified directory path for a file.

Unit

SysUtils

Category

file management routines

function FileSearch(const Name, DirList: string): string;

Description

FileSearch searches through the directories passed in DirList for a file named Name. DirList is a semicolon delimited set of DOS path names. If FileSearch locates a file matching Name, it returns a string specifying a path name for that file. If no matching file exists, FileSearch returns an empty string.


FileSeek function
 VCL Reference

FileSeek function

See also	Example

Repositions read/write point.

Unit

SysUtils

Category

file management routines

function FileSeek(Handle, Offset, Origin: Integer): Integer; overload;

function FileSeek(Handle: Integer; const Offset: Int64; Origin: Integer): Int64; overload;

Description

Use FileSeek to reposition the read/write point in a file that was opened with FileOpen or FileCreate. Handle is the file handle that was returned by FileOpen or FileCreate.

Offset specifies the number of bytes from Origin where the file pointer should be positioned. Origin is a code with three possible values, denoting the beginning of the file, the end of the file, and the current position of the file pointer.

Origin	Action

0	The file pointer is positioned Offset bytes from the beginning of the file.

1	The file pointer is positioned Offset bytes from its current position.

2	The file pointer is positioned Offset bytes from the end of the file.

If FileSeek is successful, it returns the new position of the file pointer; otherwise, it returns -1.

Note:	Do not mix routines that take or return file handles with those that use Pascal file variables (typically seen as var F). To move the file pointer in a file specified by a Pascal file variable, use the Seek procedure instead.


FileSetAttr function
 VCL Reference

FileSetAttr function

See also	Example

Sets the file attributes of a specified file.

Unit

SysUtils

Category

file management routines

function FileSetAttr(const FileName: string; Attr: Integer): Integer;

Description

FileSetAttr sets the file attributes of the file given by FileName to the value given by Attr. The value of Attr is formed by combining the appropriate file attribute constants, as in the following:

FileSetAttr('MyFile.sys', faReadOnly or faSysFile);

FileSetAttr returns zero if the function was successful. Otherwise the return value is an error code.

Note:	See TSearchRec for a description of the file attribute constants.


FileSetDate function
 VCL Reference

FileSetDate function

See also

Sets the OS time stamp for a specified file.

Unit

SysUtils

Category

file management routines

function FileSetDate(Handle: Integer; Age: Integer): Integer;

Description

FileSetDate sets the OS timestamp of the file given by Handle to the value given by Age. The DateTimeToFileDate function can be used to convert a TDateTime value to a OS timestamp.

The return value is zero if the function was successful. Otherwise the return value is an error code.


FileWrite function
 VCL Reference

FileWrite function

See also	Example

Writes the contents of a buffer to the current position in a file.

Unit

SysUtils

Category

file management routines

function FileWrite(Handle: Integer; const Buffer; Count: Integer): Integer;

Description

FileWrite writes Count bytes to the file given by Handle from the buffer specified by Buffer. Handle is a file handle returned by the FileOpen or FileCreate method.

The return value is the number of bytes actually written, or -1 if an error occurred.

Note:	Do not mix routines that take or return file handles with those that use Pascal file variables (typically seen as var F). To write to a file specified by a Pascal file variable, use Write, Writeln, or BlockWrite instead.


FinalizePackage procedure
 VCL Reference

FinalizePackage procedure

See also

Finalizes the specified package .BPL.

Unit

SysUtils

Category

package support routines

procedure FinalizePackage(Module: HMODULE);

Description

Most applications do not need to call FinalizePackage, because UnloadPackage calls FinalizePackage internally. FinalizePackage executes any finalization code in the specified package.


FindClose procedure
 VCL Reference

FindClose procedure

See also 	Example

Releases memory allocated by FindFirst.

Unit

SysUtils

Category:

file management routines

procedure FindClose(var F: TSearchRec);

Description

FindClose terminates a FindFirst/FindNext sequence.


FindCmdLineSwitch function
 VCL Reference

FindCmdLineSwitch function

See also

Determines whether a string was passed as a command line argument to the application.

Unit

SysUtils

Category

command line utilities

function FindCmdLineSwitch(const Switch: string; SwitchChars: TSysCharSet; IgnoreCase: Boolean): Boolean;

Description

FindCmdLineSwitch determines whether the string specified by the Switch parameter was passed as a command line argument to the application. SwitchChars identifies valid argument-delimiter characters (such as "-"and "/"). The IgnoreCase parameter controls whether a case-sensitive or case-insensitive search is performed.


FindFirst function
 VCL Reference

FindFirst function

See also	Example

Searches for the first instance of a file name with a given set of attributes in a specified directory.

Unit

SysUtils

Category

file management routines

function FindFirst(const Path: string; Attr: Integer; var F: TSearchRec): Integer;

Description

FindFirst searches the directory specified by Path for the first file that matches the file name implied by Path and the attributes specified by the Attr parameter. The result is returned in the F parameter. Use the fields of this search record to extract the information needed. FindFirst returns 0 if a file was successfully located, otherwise, it returns an error code.

The Path constant parameter is the directory and file name mask, including wildcard characters. For example, 'c:\test\*.*' specifies all files in the C:\TEST directory).

The Attr parameter specifies the special files to include in addition to all normal files. Choose from these file attribute constants when specifying the Attr parameter:

Constant	Value	Description
faReadOnly	$00000001	Read-only files
faHidden	$00000002	Hidden files
faSysFile	$00000004	System files
faVolumeID	$00000008	Volume ID files
faDirectory	$00000010	Directory files
faArchive	$00000020	Archive files
faAnyFile	$0000003F	Any file
Attributes can be combined by adding their constants or values. For example, to search for read-only and hidden files in addition to normal files, pass (faReadOnly + faHidden) as the Attr parameter.

Note:	FindFirst allocates resources (memory) which must be released by calling FindClose.


FindNext function
 VCL Reference

FindNext function

See also	Example

Returns the next entry matching the name and attributes specified in a previous call to FindFirst.

Unit

SysUtils

Category

file management routines

function FindNext(var F: TSearchRec): Integer;

Description

FindNext returns the next entry that matches the name and attributes specified in a previous call to FindFirst. The search record must be one that was passed to FindFirst. The return value is zero if the function was successful. Otherwise the return value is an error code.


FloatToCurr function
 VCL Reference

FloatToCurr function

Converts a floating-point value to a Currency value.

Unit

SysUtils

Category

floating point conversion routines

const

  MinCurrency: Currency = -922337203685477.5807 +1;

  MaxCurrency: Currency =  922337203685477.5807 -1;

function FloatToCurr(const Value: Extended): Currency;

Description

FloatToCurr returns the Currency value equivalent to to Value. If Value is not within the valid range for a Currency value, an EConvertError is raised.


FloatToDateTime function
 VCL Reference

FloatToDateTime function

Converts a floating-point value to a TDateTime value.

Unit

SysUtils

Category

floating point conversion routines

const

  MinDateTime: TDateTime = -657434.0;      { 01/01/0100 12:00:00.000 AM }

  MaxDateTime: TDateTime =  2958465.99999; { 12/31/9999 11:59:59.999 PM }

function FloatToDateTime(const Value: Extended): TDateTime;

FloatToDateTime returns the TDateTime value equivalent to Value. If Value is not within the valid range for TDateTime, an EConvertError is raised.


FloatToDecimal procedure
 VCL Reference

FloatToDecimal procedure

Converts a floating-point value to a decimal representation.

Unit

SysUtils

Category

floating point conversion routines

procedure FloatToDecimal(var DecVal: TFloatRec; const Value; ValueType: TFloatValue; Precision, Decimals: Integer);

Description

FloatToDecimal converts a floating-point value to a decimal representation that is suited for further formatting.

The Value parameter must be a variable of type Extended or Currency, as indicated by the ValueType parameter.

For values of type Extended, the Precision parameter specifies the requested number of significant digits in the result--the allowed range is 1..18. For values of type Currency, the Precision parameter is ignored, and the implied precision of the conversion is 19 digits.

The Decimals parameter specifies the requested maximum number of digits to the left of the decimal point in the result. Precision and Decimals together control how the result is rounded. To produce a result that always has a given number of significant digits regardless of the magnitude of the number, specify 9999 for the Decimals parameter.


FloatToStr function
 VCL Reference

FloatToStr function

See also

Converts a floating point value to a string.

Unit

SysUtils

Category

floating point conversion routines

function FloatToStr(Value: Extended): string;

Description

FloatToStr converts the floating-point value given by Value to its string representation. The conversion uses general number format with 15 significant digits.

For greater control over the formatting of the string, use the FloatToStrF function.


FloatToStrF function
 VCL Reference

FloatToStrF function

See also

Converts a floating point value to a string, using a specified Format, Precision, and Digits.

Unit

SysUtils

Category

Floating point conversion routines

function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): string;

Description

FloatToStrF converts the floating-point value given by Value to its string representation.

The Value parameter is the value to convert.

The Precision parameter specifies the precision of the given value. It should be 7 or less for values of type Single, 15 or less for values of type Double, and 18 or less for values of type Extended.

The Digits and Format parameters together control how the value is formatted into a string. For details, see the description of TFloatFormat.

For all formats, the actual characters used as decimal and thousand separators are obtained from the DecimalSeparator and ThousandSeparator global variables.

If the given value is a NAN (not-a-number), the resulting string is 'NAN'. If the given value is positive infinity, the resulting string is 'INF'. If the given value is negative infinity, the resulting string is '-INF'.


FloatToText function
 VCL Reference

FloatToText function

See also

Converts a floating-point value to an unterminated character string, using a specified Format, Precision and Digits.

Unit

SysUtils

Category

floating point conversion routines

function FloatToText(Buffer: PChar; const Value; ValueType: TFloatValue; Format: TFloatFormat; Precision, Digits: Integer): Integer;

Description

FloatToText converts the given floating-point value to its decimal representation using the specified format, precision, and digits. The Value parameter must be a variable of type Extended or Currency, as indicated by the ValueType parameter. The resulting string of characters is stored in the given buffer, and the returned value is the number of characters stored. The resulting string is not null-terminated.


FloatToTextFmt function
 VCL Reference

FloatToTextFmt function

See also

Converts a floating-point value to to an unterminated character string, using a specified format.

Unit

SysUtils

Category

floating point conversion routines

function FloatToTextFmt(Buffer: PChar; const Value; ValueType: TFloatValue; Format: PChar): Integer;

Description

Use FloatToTextFmt to format a floating-point value using a format string rather than using a predefined format. To use a predefined format, use the FloatToText or FloatToStrF function instead.

The Value parameter must be a variable of type Extended or Currency, as indicated by the ValueType parameter. The resulting string of characters is stored in the given buffer, and the returned value is the number of characters stored. The resulting string is not null-terminated.

Formats supported are described as part of the FormatFloat function.


FmtLoadStr function
 VCL Reference

FmtLoadStr function

See also

Returns formatted output using a resourced format string.

Unit

SysUtils

Category

string formatting routines

function FmtLoadStr(Ident: Integer; const Args: array of const): string;

Description

FmtLoadStr loads a string from a program's resource string table and uses that string, plus the Args array, as a parameter to Format. Ident is the string resource ID of the desired format string.

FmtLoadStr returns the resourced string with the arguments applied. This is the same value that would result from calling Format, using the resourced string and the specified arguments.

For information on the format strings, see Format Strings.


FmtStr procedure
 VCL Reference

FmtStr procedure

See also

Assembles a formatted string using a format string and an array of arguments.

Unit

SysUtils

Category

string formatting routines

procedure FmtStr(var StrResult: string; const Format: string; const Args: array of const);

Description

This function formats the series of arguments in the open array Args. Formatting is controlled by the format string Format; the results are returned in the parameter StrResult.

For information on the format strings, see Format Strings.


ForceDirectories function
 VCL Reference

ForceDirectories function

See also	Example

Creates a new directory, also creating parents as needed.

Unit

SysUtils

or FileCtrl

Category

file management routines

function ForceDirectories(const Dir: string): Boolean;

Description

ForceDirectories creates a new directory as specified in Dir, which must be a fully-qualified path name. If the directories given in the path do not yet exist, ForceDirectories attempts to create them.

ForceDirectories returns True if it successfully creates all necessary directories, False if it could not create a needed directory.

Important

Do not call ForceDirectories with an empty string. Doing so causes ForceDirectories to raise an exception.

Note:	ForceDirectories is also found in the FileCtrl unit.


Format function
 VCL Reference

Format function

See also	Example

Returns a formatted string assembled from a format string and an array of arguments.

Unit

SysUtils

Category

string formatting routines

function Format(const Format: string; const Args: array of const): string;

Description

This function formats the series of arguments in the open array Args. Formatting is controlled by the format string Format; the results are returned in the function result as a string.

For information on the format strings, see Format Strings.


Format strings
 VCL Reference

Format strings

See also

Format strings specify required formats to general-purpose formatting routines.

Description

Format strings passed to the string formatting routines contain two types of objects -- literal characters and format specifiers. Literal characters are copied verbatim to the resulting string. Format specifiers fetch arguments from the argument list and apply formatting to them.

Format specifiers have the following form:

"%" [index ":"] ["-"] [width] ["." prec] type

A format specifier begins with a % character. After the % come the following, in this order:

An optional argument index specifier, [index ":"]

An optional left justification indicator, ["-"]

An optional width specifier, [width]

An optional precision specifier, ["." prec]

The conversion type character, type

The following table summarizes the possible values for type:

d	Decimal. The argument must be an integer value. The value is converted to a string of decimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has less digits, the resulting string is left-padded with zeros.
u	Unsigned decimal. Similar to 'd' but no sign is output.
e	Scientific. The argument must be a floating-point value. The value is converted to a string of the form "-d.ddd...E+ddd". The resulting string starts with a minus sign if the number is negative. One digit always precedes the decimal point. The total number of digits in the resulting string (including the one before the decimal point) is given by the precision specifier in the format string—a default precision of 15 is assumed if no precision specifier is present. The "E" exponent character in the resulting string is always followed by a plus or minus sign and at least three digits.
f	Fixed. The argument must be a floating-point value. The value is converted to a string of the form "-ddd.ddd...". The resulting string starts with a minus sign if the number is negative. The number of digits after the decimal point is given by the precision specifier in the format string—a default of 2 decimal digits is assumed if no precision specifier is present.
g	General. The argument must be a floating-point value. The value is converted to the shortest possible decimal string using fixed or scientific format. The number of significant digits in the resulting string is given by the precision specifier in the format string—a default precision of 15 is assumed if no precision specifier is present. Trailing zeros are removed from the resulting string, and a decimal point appears only if necessary. The resulting string uses fixed point format if the number of digits to the left of the decimal point in the value is less than or equal to the specified precision, and if the value is greater than or equal to 0.00001. Otherwise the resulting string uses scientific format.
n	Number. The argument must be a floating-point value. The value is converted to a string of the form "-d,ddd,ddd.ddd...". The "n" format corresponds to the "f" format, except that the resulting string contains thousand separators.
m	Money. The argument must be a floating-point value. The value is converted to a string that represents a currency amount. The conversion is controlled by the CurrencyString, CurrencyFormat, NegCurrFormat, ThousandSeparator, DecimalSeparator, and CurrencyDecimals global variables, all of which are initialized from the Currency Format in the International section of the Windows Control Panel. If the format string contains a precision specifier, it overrides the value given by the CurrencyDecimals global variable.
p	Pointer. The argument must be a pointer value. The value is converted to an 8 character string that represents the pointers value in hexadecimal.
s	String. The argument must be a character, a string, or a PChar value. The string or character is inserted in place of the format specifier. The precision specifier, if present in the format string, specifies the maximum length of the resulting string. If the argument is a string that is longer than this maximum, the string is truncated.
x	Hexadecimal. The argument must be an integer value. The value is converted to a string of hexadecimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has fewer digits, the resulting string is left-padded with zeros.
Conversion characters may be specified in uppercase as well as in lowercase—both produce the same results.

For all floating-point formats, the actual characters used as decimal and thousand separators are obtained from the DecimalSeparator and ThousandSeparator global variables.

Index, width, and precision specifiers can be specified directly using decimal digit string (for example "%10d"), or indirectly using an asterisk character (for example "%*.*f"). When using an asterisk, the next argument in the argument list (which must be an integer value) becomes the value that is actually used. For example,

Format('%*.*f', [8, 2, 123.456])

is the same as

Format('%8.2f', [123.456]).

A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (a "-" character preceding the width specifier), the result is left-justified by adding blanks after the value.

An index specifier sets the current argument list index to the specified value. The index of the first argument in the argument list is 0. Using index specifiers, it is possible to format the same argument multiple times. For example "Format('%d %d %0:d %1:d', [10, 20])" produces the string '10 20 10 20'.

Note:	Setting the index specifier affects all subsequent formatting. That is, Format('%d %d %d %0:d %d', [1, 2, 3, 4]) returns '1 2 3 1 2', not '1 2 3 1 4'. To get the latter result, you have must use  Format('%d %d %d %0:d %3:d', [1, 2, 3, 4])


FormatBuf function
 VCL Reference

FormatBuf function

See also

Formats the arguments from an array, placing the result in a buffer.

Unit

SysUtils

Category

string formatting routines

function FormatBuf(var Buffer; BufLen: Cardinal; const Format; FmtLen: Cardinal; const Args: array of const): Cardinal;

Description

This function formats the series of arguments in the open array Args. Formatting is controlled by the format string Format (whose length is given by FmtLen); the results are returned in Buffer (whose length is given by BufLen). The function returns the length, in bytes, of the resulting string.

For information on the format strings, see Format Strings.


FormatCurr function
 VCL Reference

FormatCurr function

See also

Formats a Currency object.

Unit

SysUtils

Category

numeric formatting routines

function FormatCurr(const Format: string; Value: Currency): string;

Description

FormatCurr formats the Currency object given by Value using the format string given by Format. Formats supported are described as part of the FormatFloat function.


FormatDateTime function
 VCL Reference

FormatDateTime function

See also	Example

Formats a TDateTime value.

Unit

SysUtils

Category

date/time routines

function FormatDateTime(const Format: string; DateTime: TDateTime): string;

Description

FormatDateTime formats the TDateTime value given by DateTime using the format given by Format. See Date-Time format strings for more information.

If the string specified by the Format parameter is empty, the TDateTime value is formatted as if a 'c' format specifier had been given.


FormatFloat function
 VCL Reference

FormatFloat function

See also	Example

Formats a floating point value.

Unit

SysUtils

Category

floating point conversion routines

function FormatFloat(const Format: string; Value: Extended): string;

Description

FormatFloat formats the floating-point value given by Value using the format string given by Format. The following format specifiers are supported in the format string:

Specifier	Represents
0	Digit place holder. If the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the output string. Otherwise, a '0' is stored in that position in the output string.
#	Digit placeholder. If the value being formatted has a digit in the position where the '#' appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.
.	Decimal point. The first '.' character in the format string determines the location of the decimal separator in the formatted value; any additional '.' characters are ignored. The actual character used as a the decimal separator in the output string is determined by the DecimalSeparator global variable. The default value of DecimalSeparator is specified in the Number Format of the International section in the Windows Control Panel.
,	Thousand separator. If the format string contains one or more ',' characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of ',' characters in the format string does not affect the output, except to indicate that thousand separators are wanted. The actual character used as a the thousand separator in the output is determined by the ThousandSeparator global variable. The default value of ThousandSeparator is specified in the Number Format of the International section in the Windows Control Panel.
E+	Scientific notation. If any of the strings 'E+', 'E-', 'e+', or 'e-' are contained in the format string, the number is formatted using scientific notation. A group of up to four '0' characters can immediately follow the 'E+', 'E-', 'e+', or 'e-' to determine the minimum number of digits in the exponent. The 'E+' and 'e+' formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The 'E-' and 'e-' formats output a sign character only for negative exponents.
'xx'/"xx"	Characters enclosed in single or double quotes are output as-is, and do not affect formatting.
;	Separates sections for positive, negative, and zero numbers in the format string.
The locations of the leftmost '0' before the decimal point in the format string and the rightmost '0' after the decimal point in the format string determine the range of digits that are always present in the output string.

The number being formatted is always rounded to as many decimal places as there are digit placeholders ('0' or '#') to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number.

If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the '.' character in the format string, the extra digits are output before the first digit placeholder.

To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons.

One section: The format string applies to all values.

Two sections: The first section applies to positive values and zeros, and the second section applies to negative values.

Three sections: The first section applies to positive values, the second applies to negative values, and the third applies to zeros.

If the section for negative values or the section for zero values is empty, that is if there is nothing between the semicolons that delimit the section, the section for positive values is used instead.

If the section for positive values is empty, or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits, corresponding to a call to FloatToStrF with the ffGeneral format. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.


FreeAndNil procedure
 VCL Reference

FreeAndNil procedure

See also

Frees an object reference and replaces the reference with nil..

Unit

SysUtils

Category

Pointer and address routines

procedure FreeAndNil(var Obj);

Description

Use FreeAndNil to ensure that a variable is nil after you free the object it references. Pass any variable that represents an object as the Obj parameter.

Warning:	Do not pass a value for Obj if it is not an instance of TObject or one of its descendants.


GetCurrentDir function
 VCL Reference

GetCurrentDir function

See also

Returns the name of the current directory.

Unit

SysUtils

Category

file management routines

function GetCurrentDir: string;

Description

GetCurrentDir returns the fully qualified name of the current directory.


GetEnvironmentVariable function
 VCL Reference

GetEnvironmentVariable function

Returns environment variable value..

Unit

SysUtils

Category

miscellaneous routines

GetEnvironmentVariable(Name: string): string;

Description

GetEnvironmentVariable returns the value of the Windows environment variable indicated by Name.


GetFormatSettings procedure
 VCL Reference

GetFormatSettings procedure

Resets the date and number format parameters to initial values.

Unit

SysUtils

Category

string formatting routines

procedure GetFormatSettings;

Description

GetFormatSettings resets all date and number format variables to their initial values. GetFormatSettings is called in non-console applications in response to WM_WININICHANGE messages.


GetPackageDescription function
 VCL Reference

GetPackageDescription function

See also

Returns the description resource from a package.

Unit

SysUtils

Category

package support routines

function GetPackageDescription(ModuleName: PChar): string;

Description

Call GetPackageDescription to obtain the description stored with the named package. If the package does not have a description resource, GetPackageDescription returns an empty string.


GetPackageInfo procedure
 VCL Reference

GetPackageInfo procedure

See also

Enumerates all the units and required packages for a package.

Unit

SysUtils

Category

package support routines

procedure GetPackageInfo(Module: HMODULE; Param: Pointer; var Flags: Integer; InfoProc: TPackageInfoProc);

Description

Call GetPackageInfo to process the information in a package's information table. The InfoProc callback is called for every unit included in the package and for every package required by the package. Module is the module handle for the package. GetPackageInfo passes any application-supplied information passed in the Param parameter to the InfoProc callback. The package's information flags are passed to the InfoProc and returned in the Flags parameter.


GUIDToString function
 VCL Reference

GUIDToString function

See also

Converts a class identifier GUID to a string.

Unit

SysUtils

Category

Interface utilities

function GUIDToString(const ClassID: TGUID): string;

Description

GUIDToString converts a GUID into a string of printable characters. Each GUID always converts to a unique string.

If GUIDToString succeeds it returns a string for the requested GUID. If GUIDToString fails, an EOleSysError exception is raised with an error code indicating the cause of the error.


IncAMonth procedure
 VCL Reference

IncAMonth procedure

See also

Increments date data by one month.

Unit

SysUtils

Category

date/time routines

procedure IncAMonth(var Year, Month, Day: Word; NumberOfMonths: Integer = 1);

Description

IncAMonth modifies Year, Month, and Day parameters so the date they describe is incremented by NumberOfMonths months.  NumberOfMonths can be negative, to return a date N months previous.

If the input day of month is greater than the last day of the resulting month, the day is set to the last day of the resulting month.


IncludeTrailingBackslash function
 VCL Reference

IncludeTrailingBackslash function

See also

Ensures path name ends with delimiter

Unit

SysUtils

Category

file name utilities

function IncludeTrailingBackslash(const S: string): string;

Description

IncludeTrailingBackslash ensures that a path name ends with a trailing path delimiter ('\'). This function is included for backward-compatibility only. New programs should use IncludeTrailingPathDelimiter.

Note:	IncludeTrailingBackslash works with multibyte character sets.


IncludeTrailingPathDelimiter function
 VCL Reference

IncludeTrailingPathDelimiter function

See also

Ensures path name ends with delimiter.

Unit

SysUtils

Category

file name utilities

function IncludeTrailingPathDelimiter(const S: string): string;

Description

IncludeTrailingPathDelimiter ensures that a path name ends with a trailing path delimiter ('\'). If S already ends with a trailing delimiter character, it is returned unchanged; otherwise S with appended delimiter character is returned.

Note:	IncludeTrailingPathDelimiter works with multibyte character sets.


IncMonth function
 VCL Reference

IncMonth function

See also

Returns a date shifted by a specified number of months.

Unit

SysUtils

Category

date/time routines

function IncMonth(const Date: TDateTime; NumberOfMonths: Integer = 1): TDateTime;

Description

IncMonth returns the value of the Date parameter, incremented by NumberOfMonths months.  NumberOfMonths can be negative, to return a date N months previous.

If the input day of month is greater than the last day of the resulting month, the day is set to the last day of the resulting month.  The time of day specified by the Date parameter is copied to the result.


InitializePackage procedure
 VCL Reference

InitializePackage procedure

See also

Validates and initializes a given package.

Unit

SysUtils

Category

package support routines

procedure InitializePackage(Module: HMODULE);

Description

InitializePackage checks for duplicate units in a package and calls the initialization blocks of the contained units.

Note:	InitializePackage is called internally by the LoadPackage function.


IntToHex function
 VCL Reference

IntToHex function

See also 	Example

Returns the hex representation of an integer.

Unit

SysUtils

Category

numeric formatting routines

function IntToHex(Value: Integer; Digits: Integer): string; overload;

function IntToHex(Value: Int64; Digits: Integer): string; overload;

Description

IntToHex converts a number into a string containing the number's hexadecimal (base 16) representation. Value is the number to convert. Digits indicates the minimum number of hexadecimal digits to return.


IntToStr function
 VCL Reference

IntToStr function

See also 	Example

Converts an integer to a string.

Unit

SysUtils

Category

numeric formatting routines

function IntToStr(Value: Integer): string; overload;

function IntToStr(Value: Int64): string; overload;

Description

IntToStr converts an integer into a string containing the decimal representation of that number.


IsDelimiter function
 VCL Reference

IsDelimiter function

See also

Indicates whether a specified character in a string matches one of a set of delimiters.

Unit

SysUtils

Category

string handling routines

function IsDelimiter(const Delimiters, S: string; Index: Integer): Boolean;

Description

Call IsDelimiter to determine whether the character at byte offset Index in the string S is one of the delimiters in the string Delimiters. Index is the 0-based index of the byte in question, where 0 is the first byte of the string, 1 is the second byte, and so on.

When working with a multi-byte character system (MBCS), IsDelimiter checks to make sure the indicated byte is not part of a double byte character. The delimiters in the Delimeters parameter must all be single byte characters.


IsLeapYear function
 VCL Reference

IsLeapYear function

See also 	Example

Indicates whether a specified year is a leap year.

Unit

SysUtils

Category

date/time routines

function IsLeapYear(Year: Word): Boolean;

Description

Call IsLeapYear to determine whether the year specified by the Year parameter is a leap year.  Year specifies the calendar year.

Use YearOf to obtain the value of Year for IsLeapYear from a TDateTime value.


IsPathDelimiter function
 VCL Reference

IsPathDelimiter function

See also

Indicates whether the byte at position Index of a string is the path delimiter.

Unit

SysUtils

Category

file name utilities

function IsPathDelimiter(const S: string; Index: Integer): Boolean;

Description

Call IsPathDelimiter to determine whether a position in the string S contains the path delimiter character (‘\’). Positions are numbered from 1.

When working with a multi-byte character system (MBCS), IsPathDelimiter distinguishes between a true delimiter character, and the byte of the same value that can appear as the second byte of a double byte character.

To test for more characters than just the delimiter, use IsDelimiter.


IsValidIdent function
 VCL Reference

IsValidIdent function

Tests for a valid Pascal identifier.

Unit

SysUtils

Category

miscellaneous routines

function IsValidIdent(const Ident: string): Boolean;

Description

IsValidIdent returns true if the given string is a valid identifier. An identifier is defined as a character from the set ['A'..'Z', 'a'..'z', '_'] followed by zero or more characters from the set ['A'..'Z', 'a'..'z', '0..'9', '_'].


Languages function
 VCL Reference

Languages function

See also

Lists the locales for which support is available.

Unit

SysUtils

Category

Application-level information

function Languages: TLanguages;

Description

Use the value returned by Languages to obtain information about the locales that the system supports.


LastDelimiter function
 VCL Reference

LastDelimiter function

See also

Returns the byte index in S of the last character that matches any character in the Delimiters AnsiString.

Unit

SysUtils

Category

string handling routines

function LastDelimiter(const Delimiters, S: string): Integer;

Description

Call LastDelimiter to locate the last delimiter in S. For example, the line

MyIndex := LastDelimiter('\.:','c:\filename.ext');

sets MyIndex to 12.

When working with multi-byte character sets (MBCS), S may contain double byte characters, but the delimiters listed in the Delimeters parameter must all be single byte non-null characters.


LeadBytes variable
 VCL Reference

LeadBytes variable

See also

Lists all Char values that can be the first byte of a double byte character on the local system.

Unit

SysUtils

Category

MBCS utilities

var LeadBytes: set of Char = [];

Description

Use LeadBytes to test whether a Char value can represent the lead byte in a double byte character. If an individual Char is in the LeadBytes set, it is not necessarily used as the lead byte of a double byte character.  It may also appear as the second byte of a double byte character.  To determine whether the character is used as a lead byte, use the global ByteType or StrByteType function.

Note:	LeadBytes is always empty when running on a system with a locale that does not use a multi byte character system (MBCS).


LoadPackage function
 VCL Reference

LoadPackage function

See also

Loads a specified package.

Unit

SysUtils

Category

package support routines

function LoadPackage(const Name: string): HMODULE;

Description

LoadPackage loads the package specified by the Name parameter, checks for duplicate units, and calls the initialization blocks of all units contained in the package.


LoadStr function
 VCL Reference

LoadStr function

Loads a string from the application's executable file.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

function LoadStr(Ident: Integer): string;

Description

LoadStr loads the string resource given by Ident from the application's executable file or .dll. If the string resource does not exist, LoadStr returns an empty string.

Moving display strings into string resources makes an application easier to localize without rewriting the program.

Note:	LoadStr is provided primarily for backward compatibility. To isolate string resources, use the resourcestring keyword in new applications.


LowerCase function
 VCL Reference

LowerCase function

See also 	Example

Converts an ASCII string to lowercase.

Unit

SysUtils

Category

String handling routines

function LowerCase(const S: string): string;

Description

LowerCase returns a string with the same text as the string passed in S, but with all letters converted to lowercase. The conversion affects only 7-bit ASCII characters between 'A' and 'Z'. To convert 8-bit international characters, use AnsiLowerCase.


MSecsToTimeStamp function
 VCL Reference

 AMSecsToTimeStamp function

See also

Converts a specified number of milliseconds into a TTimeStamp value.

Unit

SysUtils

Category

date/time routines

function MSecsToTimeStamp(MSecs: Comp): TTimeStamp;

Description

Call MSecsToTimeStamp to convert MSecs, a number of milliseconds, into the number of days represented, plus the number of milliseconds remaining. The days and milliseconds are expressed as a TTimeStamp value, where the Date field is the number of days and the Time field is the remainder in milliseconds.


NewStr function
 VCL Reference

NewStr function

Allocates a string on the heap.

Unit

SysUtils

Category

backward compatibility routines

function NewStr(const S: string): PString; deprecated;

Description

Do not use NewStr in new applications.  This function is provided for backward compatibility only.


NextCharIndex function
 VCL Reference

NextCharIndex function

Return byte index of next character.

Unit

SysUtils

Category

MBCS routines

function NextCharIndex(const S: String; Index: Integer): Integer;

Description

NextCharIndex returns the byte index of the first byte of the character following the character starting at S[Index].


Now function
 VCL Reference

Now function

See also 	Example

Returns the current date and time.

Unit

SysUtils

Category

date/time routines

function Now: TDateTime;

Description

Returns the current date and time, corresponding to Date + Time.


NullStr constant
 VCL Reference

NullStr constant

See also

Declares a pointer to EmptyStr.

Unit

SysUtils

Category

string handling routines

const NullStr: PString = @EmptyStr;

Description

NullStr is the return value for many string-handling routines when the string is empty.


OutOfMemoryError procedure
 VCL Reference

OutOfMemoryError procedure

See also

Raises an EOutOfMemory exception.

Unit

SysUtils

Category

exception handling routines

procedure OutOfMemoryError;

Description

Call OutOfMemoryError to raise the EOutOfMemory exception. OutOfMemory runs without allocating additional memory.


QuotedStr function
 VCL Reference

QuotedStr function

Returns the quoted version of a string.

Unit

SysUtils

Category

String handling routines

function QuotedStr(const S: string): string;

Description

Use QuotedStr to convert the string S to a quoted string. A single quote character (') is inserted at the beginning and end of S, and each single quote character in the string is repeated.

Note:	When working with multi-byte character systems (MBCS), use AnsiQuotedStr instead.


RaiseLastOSError procedure
 VCL Reference

RaiseLastOSError procedure

See also

Raises an exception for the last occurring OS or system library error.

Unit

SysUtils

Category

exception handling routines

procedure RaiseLastOSError;

Description

Call RaiseLastOSError to raise an EOSError exception for the last OS API call that failed. RaiseLastOSError retrieves the code for the last occurring API call error, if any. If this belongs to a previously occurring error, RaiseLastOSError raises an EOSError exception with the error code and message associated with that error.


RaiseLastWin32Error procedure
 VCL Reference

RaiseLastWin32Error procedure

See also

Raises an exception for the last occurring Win32 error.

Unit

SysUtils

Category

exception handling routines

procedure RaiseLastWin32Error;

Description

Call RaiseLastWin32Error to raise an EWin32Error exception for the last Windows API call that failed. RaiseLastWin32Error retrieves the code for the last occurring Win32 error, if any. If Windows returns a previously occurring error code, RaiseLastWin32Error raises an EWin32Error exception with the error code and message associated with that error.

Note:	RaiseLastWin32Error is a deprecated procedure. New applications should use RaiseLastOSError instead.


RemoveDir function
 VCL Reference

RemoveDir function

See also

Deletes an existing empty directory.

Unit

SysUtils

Category

file management routines

function RemoveDir(const Dir: string): Boolean;

Description

Call RemoveDir to remove the directory specified by the Dir parameter. The return value is True if a new directory was successfully deleted, False if an error occurred. The directory must be empty before it can be successfully deleted.


RenameFile function
 VCL Reference

RenameFile function

See also 	Example

Changes a file name.

Unit

SysUtils

Category

file management routines

function RenameFile(const OldName, NewName: string): Boolean;

Description

RenameFile attempts to change the name of the file specified by OldFile to NewFile. If the operation succeeds, RenameFile returns True. If it cannot rename the file (for example, if a file called NewName already exists), it returns False.


ReplaceDate procedure
 VCL Reference

ReplaceDate procedure

See also

Replaces the date portion of a TDateTime value with a specified date.

Unit

SysUtils

Category

date/time routines

procedure ReplaceDate(var DateTime: TDateTime; const NewDate: TDateTime);

Description

ReplaceDate changes the value of the DateTime parameter so that it has the same date as the NewDate parameter. The time portion of DateTime remains the same. ReplaceDate makes any necessary adjustments for negative dates (before 1900).


ReplaceTime procedure
 VCL Reference

ReplaceTime procedure

See also

Replaces the time portion of a TDateTime value with a specified time.

Unit

SysUtils

Category

date/time routines

procedure ReplaceTime(var DateTime: TDateTime; const NewTime: TDateTime);

Description

ReplaceTime changes the value of the DateTime parameter so that it has the same time as the NewTime parameter. The date portion of DateTime remains the same. ReplaceTime makes any necessary adjustments for negative dates. (before 1900)


SafeLoadLibrary function
 VCL Reference

SafeLoadLibrary function

Loads a DLL while suppressing error dialogs and preventing the DLL from changing the FPU control word.

Unit

SysUtils

Category

Package support routines

function SafeLoadLibrary(const Filename: string; ErrorMode: UINT = SEM_NOOPENFILEERRORBOX): HMODULE;

Description

SafeLoadLibrary calls LoadLibrary, disabling normal Win32 error message dialogs if the requested file can't be loaded.  SafeLoadLibrary also preserves the current FPU control word (which specifies precision and exception masks) across the LoadLibrary call, in case the DLL you're loading overrides the FPU control word in its initialization, as many Microsoft DLLs do.

Filename is the name of the DLL to load.

ErrorMode indicates which Windows error message dialogs should be suppressed. For a complete list of possible values, see the Microsoft documentation for the SetErrorMode Windows API function.


SameFileName function
 VCL Reference

SameFileName function

See also

Compares file names based on the current locale.

Unit

SysUtils

Category

MBCS utilities

function SameFileName(const S1, S2: string): Boolean;

Description

SameFileName compares two file names in the same way as AnsiCompareFileName. SameFileName returns true if the file names match, false otherwise. Like AnsiCompareFileName, SameFileName supports locales and MBCS strings; see the AnsiCompareFileName topic for more details.


SameText function
 VCL Reference

SameText function

See also

Compares two strings by ordinal value without case sensitivity.

Unit

SysUtils

Category

string handling routines

function SameText(const S1, S2: string): Boolean;

Description

SameText compares S1 and S2 and returns true if they are equal. SameText is not case sensitive and is not affected by the current locale.


SetCurrentDir function
 VCL Reference

SetCurrentDir function

See also

Sets the current directory.

Unit

SysUtils

Category

file management routines

function SetCurrentDir(const Dir: string): Boolean;

Description

The SetCurrentDir function sets the current directory. The return value is True if the current directory was successfully changed, or False if an error occurred.


ShowException procedure
 VCL Reference

ShowException procedure

See also

Displays an exception message with its physical address

Unit

SysUtils

Category

exception handling routines

procedure ShowException(ExceptObject: TObject; ExceptAddr: Pointer);

Description

ShowException displays the message associated with an exception, together with the exception's physical address. The exception's address can be used with Search | Find Error menu command to find the statement that raised the exception.


StrAlloc function
 VCL Reference

StrAlloc function

See also

Allocates a buffer for a null-terminated string and returns a pointer to its first character.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

function StrAlloc(Size: Cardinal): PChar;

Description

StrAlloc allocates a buffer for a null-terminated string with a maximum length of Size - 1 (1 byte must be reserved for the termination character). The result points to the location where the first character of the string is to be stored. A 32-bit number giving the total amount of memory allocated is stored in the four bytes preceding the first character; it is equal to Size + 4. If space for a string is allocated with StrAlloc, it should be deallocated via StrDispose.

Because long strings are implicitly null terminated and dynamically allocated, the use of StrAlloc is in decline.


StrBufSize function
 VCL Reference

StrBufSize function

See also

Returns the maximum number of characters that can be stored in a buffer allocated by StrAlloc.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

function StrBufSize(const Str: PChar): Cardinal;

Description

StrBufSize returns the number of bytes in Str, including the byte for the termination character. If Str does not point to a string buffer allocated by StrAlloc or StrNew, no error message is returned, and the result is unpredictable.


StrByteType function
 VCL Reference

StrByteType function

See also

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

Unit

SysUtils

Category

MBCS utilities

function StrByteType(Str: PChar; Index: Cardinal): TMbcsByteType;

Description

Call StrByteType to determine the type of the byte specified by the Index parameter, where 0 specifies the first byte in the string Str, 1 specifies the second byte, and so on.

If the system is not using a multi-byte character system (MBCS), StrByteType always returns mbSingleByte. Otherwise, StrByteType returns mbSingleByte if the indicated byte represents a complete character in Str, mbLeadByte if it represents the first byte of a double byte character, and mbTrailByte if it represents the second byte of a double byte character.

Note:	No checking is done to ensure that Index is less than the length of Str. It is the caller's responsibility to ensure that Index is not out of bounds.


StrCat function
 VCL Reference

StrCat function

See also 	Example

Appends a copy of Source to the end of Dest and returns the concatenated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrCat(Dest: PChar; const Source: PChar): PChar;

Description

Use StrCat to concatenate Source to the end of Dest. StrCat does not perform any length checking. The destination buffer must have room for at least StrLen(Dest)+StrLen(Source)+1 characters.

To check length, use the StrLCat function.


StrCharLength function
 VCL Reference

StrCharLength function

See also

Find character size.

Unit

SysUtils

Category

MBCS utilities

function StrCharLength(const Str: PChar): Integer;

Description

StarCharLength returns the size, in bytes, of the first character in Str. The return value is either 1 or 2.


StrComp function
 VCL Reference

StrComp function

See also 	Example

Compares two strings with case sensitivity.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrComp(const Str1, Str2 : PChar): Integer;

Description

Call StrComp to compare two null-terminated strings, with case sensitivity. The return value is indicated in the following table:

Return value	Condition

<0	Str1< Str2

=0	Str1= Str2

>0	Str1 > Str2

Note:	When working with International characters, use AnsiStrComp instead.


StrCopy function
 VCL Reference

StrCopy function

See also 	Example

Copies Source to Dest and returns Dest.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrCopy(Dest: PChar; const Source: PChar): PChar;

Description

Use StrCopy to copy a null-terminated string. StrCopy does not perform any length checking. The destination buffer must have room for at least StrLen(Source)+1 characters.

For length checking, use the StrLCopy function.


StrDispose procedure
 VCL Reference

StrDispose procedure

See also

Disposes of a string.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

procedure StrDispose(Str: PChar);

Description

StrDispose is provided for backward compatibility only. StrDispose disposes of a string on a heap that was previously allocated with StrAlloc or StrNew.

If Str is nil, StrDispose does nothing.


StrECopy function
 VCL Reference

StrECopy function

See also 	Example

Copies null-terminated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrECopy(Dest: PChar; const Source: PChar): PChar;

Description

StrECopy copies Source to Dest and returns StrEnd(Dest).

StrECopy does not perform any length checking. The destination buffer must have room for at least StrLen(Source)+1 characters.

Nested calls to StrECopy to concatenate a sequence of strings run more efficiently than multiple calls to StrCat.


StrEnd function
 VCL Reference

StrEnd function

See also 	Example

Returns a pointer to the end of a null terminated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrEnd(const Str: PChar): PChar;

Description

StrEnd returns a pointer to the null character at the end of Str.


StrFmt function
 VCL Reference

StrFmt function

See also

Formats entries in an array.

Unit

SysUtils

Category

string formatting routines

function StrFmt(Buffer, Format: PChar; const Args: array of const): PChar;

Description

StrFmt formats the series of arguments in the open array Args. The null-terminated format string Format controls formatting. The results are returned in Buffer. The function returns a pointer to the destination buffer.

For more information about how the result is formatted, see Format Strings.


StrIComp function
 VCL Reference

StrIComp function

See also 	Example

Compares two strings without case sensitivity.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrIComp(const Str1, Str2:PChar): Integer;

Description

Call StrIComp to compare two strings without case sensitivity. StrIComp returns a value greater than 0 if Str1 > Str2, less than 0 if Str1 < Str2, and returns 0 if the strings are equal except for differences in case.

When working with international characters, use AnsiStrIComp instead.


StringReplace function
 VCL Reference

StringReplace function

Returns a string with occurrences of one substring replaced by another substring.

Unit

SysUtils

Category

string handling routines

type

  TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);

function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;

Description

StringReplace replaces occurrences of the substring specified by OldPattern with the substring specified by NewPattern. StringReplace assumes that the source string, specified by S, may contain Multibyte characters.

If the Flags parameter does not include rfReplaceAll, StringReplace only replaces the first occurrence of OldPattern in S. Otherwise, all instances of OldPattern are replaced by NewPattern.

If the Flags parameter includes rfIgnoreCase, The comparison operation is case insensitive.


StringToGUID function
 VCL Reference

StringToGUID function

See also

Converts a string to a GUID.

Unit

SysUtils

Category

GUID Routines

function StringToGUID(const S: string): TGUID;

Description

StringToGUID converts the string representation of a GUID, S, into an equivalent TGUID data structure.

If StringToGUID succeeds it returns the requested GUID. If StringToGUID fails an EConvertError exception is raised.


StrLCat function
 VCL Reference

StrLCat function

See also 	Example

Appends up to a specified maximum number of characters to string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLCat(Dest: PChar; const Source: PChar; MaxLen: Cardinal): PChar;

Description

StrLCat appends at most MaxLen - StrLen(Dest) characters from Source to the end of Dest and returns Dest. That is, MaxLen indicates the maximum length that is allowed in the result string.


StrLComp function
 VCL Reference

StrLComp function

See also 	Example

Compares up to a specified maximum number of characters in two strings.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer;

Description

StrLComp compares Str1 to Str2, up to a maximum length of MaxLen characters. The return value is indicated in the following table:

Return value	Condition

<0	Str1< Str2

=0	Str1= Str2

>0	Str1 > Str2

Note:	When working with international characters, use AnsiStrLComp instead.


StrLCopy function
 VCL Reference

StrLCopy function

See also 	Example

Copies up to a specified maximum number of characters from Source to Dest.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLCopy(Dest: PChar; const Source: PChar; MaxLen: Cardinal): PChar;

Description

StrLCopy copies at most MaxLen characters (plus a null terminator) from Source to Dest and returns Dest. The SizeOf standard function can be used to determine the MaxLen parameter.

Note:	StrLCopy copies a null terminator as well as MaxLen characters. Be sure that Dest is large enough to accomodate the null terminator at the end.


StrLen function
 VCL Reference

StrLen function

See also 	Example

Returns number of characters in a string excluding the null terminator.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLen(const Str: PChar): Cardinal;

Description

StrLen returns the number of characters in Str, not counting the null terminator.


StrLFmt function
 VCL Reference

StrLFmt function

See also

Formats a series of arguments from a specified open array into a buffer.

Unit

SysUtils

Category

string formatting routines

function StrLFmt(Buffer: PChar; MaxLen: Cardinal; Format: PChar; const Args: array of const): PChar;

Description

StrLFmt formats the series of arguments in the open array Args. The null-terminated format string Format controls formatting. The results are returned in Buffer, whose maximum length is given by MaxLen. The function returns a pointer to the destination buffer.

For information on the format strings, see Format Strings.


StrLIComp function
 VCL Reference

StrLIComp function

See also 	Example

Compares strings up to a specified maximum number of characters, without case sensitivity.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLIComp(const Str1, Str2: PChar; MaxLen: Cardinal): Integer;

Description

StrLIComp compares Str1 to Str2, up to a maximum length of MaxLen characters, without case sensitivity. The return value is indicated in the following table:

Return value	Condition

< 0	Str1 < Str2

= 0	Str1 = Str2

> 0	Str1 > Str2

Note:	When working with international characters, use AnsiStrLIComp instead.


StrLower function
 VCL Reference

StrLower function

See also 	Example

Converts a string to lowercase.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrLower(Str: PChar): PChar;

Description

StrLower converts Str to lowercase and returns Str.

Note:	If the source string contains international characters, use AnsiStrLower instead. If the source string is a Pascal string, use LowerCase (or AnsiLowerCase) instead.


StrMove function
 VCL Reference

StrMove function

See also 	Example

Copies specified number of characters to string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrMove(Dest: PChar; const Source: PChar; Count: Cardinal): PChar;

Description

StrMove copies exactly Count characters from Source to Dest and returns Dest. Source and Dest can overlap.


StrNew function
 VCL Reference

StrNew function

See also	Example

Allocates space on and copies a string to the heap; returning a pointer to the string.

Unit

SysUtils

Category

backward compatibility routinesbackward compatibility routines

function StrNew(const Str: PChar): PChar;

Description

StrNew allocates a copy of Str on the heap.

If Str is nil or points to an empty string, StrNew returns a pointer to a new empty string.

Otherwise, StrNew makes a duplicate of Str, obtaining space with a call to StrAlloc, and returns a pointer to the duplicated string.

The allocated space is the length of Str + 5 bytes.


StrNextChar function
 VCL Reference

StrNextChar function

Returns pointer to following character.

Unit

SysUtils

Category

MBCS utilities

function StrNextChar(const Str: PChar): PChar;

Description

StrNextChar returns a pointer to the second character in Str, allowing for multi-byte characters.


StrPas function
 VCL Reference

StrPas function

See also

Converts null-terminated string to a Pascal string.

Unit

SysUtils

Category

backward compatibility routines

function StrPas(const Str: PChar): string;

Description

This function is provided for backwards compatibility only. To convert a null terminated string to a Pascal-type string, use a typecast or an assignment.


StrPCopy function
 VCL Reference

StrPCopy function

See also 	Example

Copies a Pascal string to a null-terminated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrPCopy(Dest: PChar; const Source: string): PChar;

Description

StrPCopy copies a Pascal-type string Source into a null-terminated string Dest. It returns a pointer to Dest.

StrPCopy does not perform any length checking.

The destination buffer must have room for at least Length(Source)+1 characters.


StrPLCopy function
 VCL Reference

StrPLCopy function

Copies characters from a Pascal-style string into a null-terminated string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrPLCopy(Dest: PChar; const Source: string; MaxLen: Cardinal): PChar;

Description

StrPLCopy copies up to a maximum of MaxLen characters from the Pascal-style string Source into the null-terminated string Dest. StrPLCopy returns a pointer to Dest.


StrPos function
 VCL Reference

StrPos function

See also 	Example

Returns a pointer to the first occurrence of STR2 in STR1.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrPos(const Str1, Str2: PChar): PChar;

Description

StrPos returns a pointer to the first occurrence of Str2 in Str1. If Str2 does not occur in Str1, StrPos returns nil.

Note:	If the source string contains international characters, use AnsiStrPos instead.


StrRScan function
 VCL Reference

StrRScan function

See also	Example

Returns a pointer to the last occurrence of a specified character in a string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrRScan(const Str: PChar; Chr: Char): PChar;

Description

StrRScan returns a pointer to the last occurrence of Chr in Str.

If Chr does not occur in Str, StrRScan returns nil. The null terminator is considered to be part of the string.

Note:	If the source string contains international characters, use AnsiStrRScan instead.


StrScan function
 VCL Reference

StrScan function

See also 	Example

Returns a pointer to first occurrence of a specified character in a string.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrScan(const Str: PChar; Chr: Char): PChar;

Description

StrScan returns a pointer to the first occurrence of Chr in Str. If Chr does not occur in Str, StrScan returns nil. The null terminator is considered to be part of the string.

Note:	If the source string contains international characters, use AnsiStrScan instead.


StrToBool function
 VCL Reference

StrToBool function

See also

Converts a string to a boolean value.

Unit

SysUtils

Category

type conversion routines

function StrToBool(const S: string): Boolean;

Description

StrToBool converts the string specified by S to a boolean. If S can be converted to a number, StrToBool returns False if that number is 0, True otherwise. If S can’t be converted to a number, StrToBool returns True if S is any of the strings listed in TrueBoolStrs (or differs from one only by case) and False if it is any of the strings listed in FalseBoolStrs (or differs from one only by case). If S is not a number and not one of the strings listed in TrueBoolStrs or FalseBoolStrs, StrToBool raises an EConvertError exception.

Note:	If you do not assign a value to TrueBoolStrs, it is treated as if it contains the single string ‘TRUE’. Similarly, if you do not assign a value to FalseBoolStrs, it is treated as if it contains the single string ‘FALSE’;


StrToCurr function
 VCL Reference

StrToCurr function

See also

Converts a string to a Currency value.

Unit

SysUtils

Category

floating point conversion routines

function StrToCurr(const S: string): Currency;

Description

Call StrToCurr to convert a string that represents a floating-point value to the corresponding Currency value. The source string, S, must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional 'E' or 'e' followed by a signed integer. Leading and trailing blanks are ignored.

The DecimalSeparator global variable defines the character that is used as a decimal point. Thousand separators and currency symbols are not allowed in the string. If the string doesn't contain a valid value, StrToCurr raises an EConvertError exception.


StrToDate function
 VCL Reference

StrToDate function

See also 	Example

Converts a string to a TDateTime value.

Unit

SysUtils

Category

date/time routines

function StrToDate(const S: string): TDateTime;

Description

Call StrToDate to parse a string that specifies a date. If S does not contain a valid date, StrToDate raises an EConvertError exception.

S must consist of two or three numbers, separated by the character defined by the DateSeparator global variable. The order for month, day, and year is determined by the ShortDateFormat global variable--possible combinations are m/d/y, d/m/y, and y/m/d.

If S contains only two numbers, it is interpreted as a date (m/d or d/m) in the current year.

Year values between 0 and 99 are converted using the TwoDigitYearCenturyWindow global variable. If TwoDigitYearCenturyWindow is 0, year values between 0 and 99 are assumed to be in the current century. If TwoDigitYearCenturyWindow is greater than 0, its value is subtracted from the current year to determine the “pivot”; years on or after the pivot are kept in the current century, while years prior to the pivot are moved to the next century. For example:

Current year	TwoDigitYearCenturyWindow	Pivot	date = mm/dd/03	date = mm/dd/50	date = mm/dd/68
1998	0	1900	1903	1950	1968
2002	0	2000	2003	2050	2068
1998	50	1948	2003	1950	1968
2000	50	1950	2003	1950	1968
2002	50	1952	2003	2050	1968
2020	50	1970	2003	2050	2068
2020	10	2010	2103	2050	2068
Note:	The format of the date string varies when the values of date/time formatting variables are changed.


StrToDateTime function
 VCL Reference

StrToDateTime function

See also	Example

Converts a string to a TDateTime value.

Unit

SysUtils

Category

date/time routines

function StrToDateTime(const S: string): TDateTime;

Description

Call StrToDate to parse a string that specifies a date and time value. If S does not contain a valid date, StrToDate raises an EConvertError exception.

The S parameter must use the current locale’s date/time format. In the US, this is commonly MM/DD/YY HH:MM:SS format. Specifying AM or PM as part of the time is optional, as are the seconds. Use 24-hour time (7:45 PM is entered as 19:45, for example) if AM or PM is not specified.

Y2K issue:	The conversion of two-digit year values is determined by the TwoDigitYearCenturyWindow variable. For more information, see StrToDate.

Note:	The format of the date and time string varies when the values of date/time formatting variables are changed.


StrToFloat function
 VCL Reference

StrToFloat function

See also	Example

Converts a given string to a floating-point value.

Unit

SysUtils

Category

floating point conversion routines

function StrToFloat(const S: string): Extended;

Description

Use StrToFloat to convert astring, S, to a floating-point value. S must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional mantissa. The mantissa consists of 'E' or 'e' followed by an optional sign (+ or -) and a whole number. Leading and trailing blanks are ignored.

The DecimalSeparator global variable defines the character that must be used as a decimal point. Thousand separators and currency symbols are not allowed in the string. If S doesn't contain a valid value, StrToFloat raises an EConvertError exception.


StrToInt function
 VCL Reference

StrToInt function

See also 	Example

Converts a string that represents an integer (decimal or hex notation) to a number.

Unit

SysUtils

Category

type conversion routines

function StrToInt(const S: string): Integer;

Description

StrToInt converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToInt raises an EConvertError exception.


StrToInt64 function
 VCL Reference

StrToInt64 function

See also

Converts a string that represents an integer (decimal or hex notation) to a number.

Unit

SysUtils

Category

type conversion routines

function StrToInt64(const S: string): Int64;

Description

StrToInt64 converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToInt64 raises an EConvertError exception.


StrToInt64Def function
 VCL Reference

StrToInt64Def function

See also

Converts a string that represents an integer (decimal or hex notation) to a number.

Unit

SysUtils

Category

type conversion routines

function StrToInt64Def(const S: string; Default: Int64): Int64;

Description

StrToInt64Def converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToInt64Def returns the number passed in Default.


StrToIntDef function
 VCL Reference

StrToIntDef function

See also 	Example

Converts a string that represents an integer (decimal or hex notation) to a number.

Unit

SysUtils

Category

type conversion routines

function StrToIntDef(const S: string; Default: Integer): Integer;

Description

StrToIntDef converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToIntDef returns the number passed in Default.


StrToTime function
 VCL Reference

StrToTime function

See also 	Example

Converts a string to a TDateTime value.

Unit

SysUtils

Category

date/time routines

function StrToTime(const S: string): TDateTime;

Description

Call StrToTime to parse a string that specifies a time value. If S does not contain a valid time, StrToTime raises an EConvertError exception.

The S parameter must consist of two or three numbers, separated by the character defined by the TimeSeparator global variable, optionally followed by an AM or PM indicator. The numbers represent hour, minute, and (optionally) second, in that order. If the time is followed by AM or PM, it is assumed to be in 12-hour clock format. If no AM or PM indicator is included, the time is assumed to be in 24-hour clock format.

Note:	The format of the date and time string varies when the values of date/time formatting variables are changed.


StrUpper function
 VCL Reference

StrUpper function

See also 	Example

Returns a string in upper case.

Unit

SysUtils

Category

string handling routines (null-terminated)

function StrUpper(Str: PChar): PChar;

Description

StrUpper converts Str to uppercase and returns Str.

Note:	If the source string contains international characters, use AnsiStrUpper instead. If the source string is a Pascal string, use UpperCase (or AnsiUpperCase) instead.


Supports function
 VCL Reference

Supports function

See also

Indicates whether a given object or interface supports a specified interface.

Unit

SysUtils

Category

COM utilities

function Supports(const Instance: IInterface; const IID: TGUID; out Intf): Boolean; overload;

function Supports(const Instance: TObject; const IID: TGUID; out Intf): Boolean; overload;

function Supports(const AClass: TClass; const IID: TGUID): Boolean; overload;

Description

Call Supports to determine whether the object or interface specified by Instance, or the class specified by AClass, supports the interface identified by the IID parameter. If Instance supports the interface, Supports returns the interface as the Intf parameter and returns True. If AClass supports the interface, Supports does not return an interface, but still returns True. If the interface specified by IID is not supported, Supports returns False.

To determine whether the interface specified by IID is supported, Supports calls the QueryInterface method of the supplied interface (or the interface of the supplied object). However, unlike calling QueryInterface directly, Supports lets you pass a nil value as the instance.


SysErrorMessage function
 VCL Reference

SysErrorMessage function

See also

Converts OS error codes into strings.

Unit

SysUtils

Category

exception handling routines

function SysErrorMessage(ErrorCode: Integer): string;

Description

SysErrorMessage returns an error message string that corresponds to the specified OS error code.


SystemTimeToDateTime function
 VCL Reference

SystemTimeToDateTime function

See also 	Example

Converts a _SYSTEMTIMETSystemTime value into a TDateTime objectvalue.

Unit

SysUtils

Category

date/time routines

function SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime;

Description

Call SystemTimeToDateTime to convert a value from Windows 32's TSystemTime_SYSTEMTIME API format to a TDateTime objectvalue.


HoursPerDay constant;MinsPerDay constant;SecsPerDay constant;MSecsPerDay constant
 VCL Reference

Time unit constants

Values useful in time calculations.

Unit

SysUtils

Category

date/time routines

const

  HoursPerDay   = 24;

  MinsPerDay    = HoursPerDay * 60;

  SecsPerDay    = MinsPerDay * 60;

  MSecsPerDay   = SecsPerDay * 1000;

Description

These constants declare the number of hours, minutes, seconds, and milliseconds per day.


Time function
 VCL Reference

Time function

See also 	Example

Returns the current time.

Unit

SysUtils

Category

date/time routines

function Time: TDateTime;

Description

Time returns the current time as a TDateTime value.


TimeStampToDateTime function
 VCL Reference

TimeStampToDateTime function

See also

Converts a TTimeStamp value into the corresponding TDateTime value.

Unit

SysUtils

Category

date/time routines

function TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime;

Description

Call TimeStampToDateTime to convert a TTimeStamp value into a TDateTime value. TTimeStamp values represent time as separate date and time values, where the date is the number of calendar days since the start of the current calendar (that is, January 1, 0001 would have a value of 1), and time is the number of milliseconds since midnight. TDateTime values represent time as the number of days (including fractional days) that have elapsed since 12:00 am on December 30, 1899.


TimeStampToMSecs function
 VCL Reference

TimeStampToMSecs function

See also

Converts a TTimeStamp value into an absolute number of milliseconds.

Unit

SysUtils

Category

date/time routines

function TimeStampToMSecs(const TimeStamp: TTimeStamp): Comp;

Description

Call TimeStampToMSecs to convert TimeStamp, a TTimeStamp value, into the total number of milliseconds that comprise the Date field plus the number of milliseconds given in the Time field.


TimeToStr function
 VCL Reference

TimeToStr function

See also 	Example

Returns a string that represents a TDateTime value.

Unit

SysUtils

Category

date/time routines

function TimeToStr(Time: TDateTime): string;

Description

TimeToStr converts the Time parameter, a TDateTime value, to a string. The conversion uses the format specified by the LongTimeFormat global variable. Change the format of the string by changing the values of some of the date and time variables.


Trim function
 VCL Reference

Trim function

See also

Trims leading and trailing spaces and control characters from a string.

Unit

SysUtils

Category

string handling routines

function Trim(const S: string): string; overload;

function Trim(const S: WideString): WideString; overload;

Description

Trim removes leading and trailing spaces and control characters from the given string S.


TrimLeft function
 VCL Reference

TrimLeft function

See also

Trims leading spaces and control characters from a string.

Unit

SysUtils

Category

string handling routines

function TrimLeft(const S: string): string; overload;

function TrimLeft(const S: WideString): WideString; overload;

Description

TrimLeft returns a copy of the string S with leading spaces and control characters removed.


TrimRight function
 VCL Reference

TrimRight function

See also

Trims trailing spaces and control characters from a string.

Unit

SysUtils

Category

string handling routines

function TrimRight(const S: string): string; overload;

function TrimRight(const S: WideString): WideString; overload;

Description

TrimRight returns a copy of the string S with trailing spaces and control characters removed.


TrueBoolStrs variable
 VCL Reference

TrueBoolStrs variable

See also

Lists strings that can represent the boolean value True.

Unit

SysUtils

Category

type conversion routines

var TrueBoolStrs: array of String;

Description

TrueBoolStrs is an array of strings that are used in conversions between boolean values and strings. When using the BoolToStr function, True values are converted to the first string in the list. When using the StrToBool function, any string in the list is converted to True.


UnixDateDelta constant
 VCL Reference

UnixDateDelta constant

See also

Specifies the difference between TDateTime and TIME_T values.

Unit

SysUtils

Category

date/time routines

const UnixDateDelta = 25569;

Description

UnixDateDelta is number of days between December 31, 1899 and January 1 1970. This value is useful for converting date-time values between TDateTime and the TIME_T data type used in UNIX and Linux systems and in the standard C library.


UnloadPackage procedure
 VCL Reference

UnloadPackage procedure

See also

Unloads a package.

Unit

SysUtils

Category

package support routines

procedure UnloadPackage(Module: HMODULE);

Description

Call UnloadPackage to unload a package that was loaded using the LoadPackage function. UnloadPackage performs any finalization of units contained in the package and then unloads the package BPL.


UpperCase function
 VCL Reference

UpperCase function

See also 	Example

Returns a copy of a string in uppercase.

Unit

SysUtils

Category

string handling routines

function UpperCase(const S: string): string;

Description

UpperCase returns a copy of the string S, with the same text but with all 7-bit ASCII characters between 'a' and 'z' converted to uppercase. To convert 8-bit international characters, use AnsiUpperCase instead.


Win32Check function
 VCL Reference

Win32Check function

See also

Checks the return value of a Windows API call and raises an appropriate exception when it indicates failure.

Unit

SysUtils

Category

exception handling routines

function Win32Check(RetVal: BOOL): BOOL;

Description

Call Win32Check with the return value of a Windows API call that returns a Boolean to indicate success or failure. If the Windows API returns False (indicating failure), Win32Check calls RaiseLastWin32Error to raise an exception.  If the Windows function returns True, Win32Check returns True.


Win32Platform variable
 VCL Reference

Win32Platform variable

Specifies the Win32 platform identifier.

Unit

SysUtils

Category

application-level information

var Win32Platform: Integer = 0;

Description

Win32Platform is used to identify the type of Win32 platform the system is running. This will be one of the following values:

Value	Meaning
VER_PLATFORM_WIN32s	System is Win32s.
VER_PLATFORM_WIN32_WINDOWS	System is Windows 95.
VER_PLATFORM_WIN32_NT	System is Windows NT.
See WINDOWS.PAS for their associated numerical values.


WideCompareStr function
 VCL Reference

WideCompareStr function

See also

Compares Unicode strings based on the current locale with case sensitivity.

Unit

SysUtils

Category

Unicode routines

function WideCompareStr(const S1, S2: WideString): Integer;

Description

WideCompareStr compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is:

Condition	Return Value
S1 > S2	> 0
S1 < S2	< 0
S1 = S2	= 0
Note:	Most locales consider lowercase characters to be less than the corresponding uppercase characters.  This is in contrast to ASCII order, in which lowercase characters are greater than uppercase characters.  Thus,

WideCompareStr('a','A')

returns a value less than zero, while

CompareStr('a','A')

returns a value greater than zero.


WideCompareText function
 VCL Reference

WideCompareText function

See also

Compares Unicode strings based on the current locale without case sensitivity.

Unit

SysUtils

Category

Unicode routines

function WideCompareText(const S1, S2: WideString): Integer;

Description

WideCompareText compares S1 to S2, without case sensitivity. The compare operation is controlled by the current locale. WideCompareText returns a value less than 0 if S1 < S2, a value greater than 0 if S1 > S2, and returns 0 if S1 = S2.


WideFmtStr procedure
 VCL Reference

WideFmtStr procedure

See also

Assembles a formatted Unicode string using a format string and an array of arguments.

Unit

SysUtils

Category

Unicode routines

procedure WideFmtStr(var Result: WideString; const Format: WideString;

   const Args: arrayofconst);

Description

This function formats the series of arguments in the open array Args into a Unicode string. Formatting is controlled by the format string Format; the results are returned in the parameter Result

For information on the format strings, see Format Strings.


WideFormat function
 VCL Reference

WideFormat function

See also

Returns a formatted Unicode string assembled from a format string and an array of arguments.

Unit

SysUtils

Category

string formatting routines

function WideFormat(const Format: WideString;

    const Args: arrayofconst): WideString;

Description

This function formats the series of arguments in the open array Args. Formatting is controlled by the format string Format; the results are returned in the function result as a Unicode string

For information on the format strings, see WideFormat Strings.


WideFormatBuf function
 VCL Reference

WideFormatBuf function

See also

Formats the arguments from an array, placing the result in a buffer.

Unit

SysUtils

Category

string formatting routines

function WideFormatBuf(var Buffer; BufLen: Cardinal; const Format;

    FmtLen: Cardinal; const Args: arrayofconst): Cardinal;

Description

This function formats the series of arguments in the open array Args. Formatting is controlled by the Unicode format string Format (whose length is given by FmtLen); the results are returned in Buffer (whose length is given by BufLen). The function returns the number of Unicode characters in the formatted string.

Note:	Both buffers contain wide (Unicode) characters. BufLen and FmtLen must specify the number of Unicode characters in their respective buffers, not the number of bytes.

For information on the format strings, see Format Strings.


WideLowerCase function
 VCL Reference

WideLowerCase function

See also

Returns Unicode string converted to lower case.

Unit

SysUtils

Category

string handling routines

function WideLowerCase(const S: WideString): WideString;

Description

WideLowerCase returns S converted to lower case. The conversion uses the current locale.


WideSameStr function
 VCL Reference

WideSameStr function

See also

Compares Unicode strings based on the current locale with case sensitivity.

Unit

SysUtils

Category

string handling routines

function WideSameStr(const S1, S2: WideString): Boolean;

Description

WideSameStr compares S1 to S2, with case sensitivity. The compare operation is controlled by the current locale. The return value is True if the two strings have the same value, False otherwise.


WideSameText function
 VCL Reference

WideSameText function

See also

Compares Unicode strings based on the current locale without case sensitivity.

Unit

SysUtils

Category

string handling routines

function WideSameText(const S1, S2: WideString): Boolean;

Description

WideSameText compares S1 to S2, without case sensitivity. The compare operation is controlled by the current locale. The return value is True if the two strings have the same value, False otherwise.


WideUpperCase function
 VCL Reference

WideUpperCase function

See also

Returns Unicode string converted to upper case.

Unit

SysUtils

Category

string handling routines

function WideUpperCase(const S: WideString): WideString;

Description

WideUpperCase returns S converted to upper case. The conversion uses the current locale.


WrapText function
 VCL Reference

WrapText

Splits a string into multiple lines as its length approaches a specified size.

Unit

SysUtils

Category

string handling routines

function WrapText(const Line, BreakStr: string; nBreakChars: TSysCharSet; MaxCol: Integer):string; overload;

function WrapText(const Line, MaxCol: Integer = 45):string; overload;

Description

WrapText scans a string for occurrences of any of the characters specified by nBreakChars and inserts a line-break, specified by BreakStr, at the last occurrence of a character in nBreakChars before MaxCol. Line is the text WrapText scans. MaxCol is the maximum line length.

If the BreakStr and nBreakChars parameters are omitted, WrapText searches for space, hyphen, or tab characters on which to break the line and inserts a carriage return/line feed pair at the break points.

WrapText does not insert a break into an embedded quoted string (both single quotes and double quotes are supported).

For example, the following call wraps the text into two lines at the last space character:

WrapText('The rain in Spain falls mainly on the plain.', #13#10, ['.',' ',#9,'-'], 42);

\rThe result:

The rain in Spain falls mainly on the

plain.


VarAsConvert function
 VCL Reference

VarAsConvert function

See also

Casts an arbitrary Variant so that it is a custom Variant representing a measurement.

Unit

VarConv

Category

Variant support routines

function VarAsConvert(const AValue: Variant; const AType: TConvType!Alink(tconvtype,1,TopicNotFound,main)): Variant; overload;

function VarAsConvert(const AValue: Variant): Variant; overload;

Description

VarAsConvert converts the Variant specified by AValue to a VarConvert custom Variant.

Using the first syntax, AValue is interpreted as the numeric portion (the number of units), and AType identifies the units.

Using the second syntax, AValue should be a Variant that can be parsed into a VarConv custom Variant (for example, a variant whose value is a string such as ‘1.5 miles’).

If VarAsConvert can’t perform the conversion, it raises an EInvalidCast exception.

VarConvert custom Variants represent measurements (that is, a type of measurement units and the number of those units). The units must be registered measurement units such as those used by the ConvUtils unit. You can use the negation operator on VarConv variants, and use the addition, subtraction, multiplication, division, and comparison operators on a VarConv Variant with a real number. You can use the addition, subtraction, division, and comparison operators on two VarConv Variants. VarConv custom Variants also support the following properties:

Value is the numeric portion (the number of units). (read/write)

Type is units. (read-only)

TypeName is the name of the units. (read-only).

Family is the conversion family of the units (the thing measured). (read-only).

FamilyName is the name of the conversion family. (read-only)

Depending on the Family, each Variant has a set of conversion properties with names of the form As<Unit>, where <Unit> is the name of another type of unit in the same conversion family.


VarConvert function
 VCL Reference

VarConvert function

See also

Returns the Variant type code for custom Variants that represent measurements.

Unit

VarConv

Category

Variant support routines

function VarConvert: TVarType;

Description

Use VarConvert to obtain the variant type code for custom Variants that represent measurements. The Variant type codes for custom Variants are dynamically allocated when the application loads the unit that implements them. VarConvert allows the application to identify the Variant type code that is currently used for custom Variants that represent VarConvert custom Variants. This type code, however, may not match the type code used by another application that uses a different set of custom Variant types.

VarConvert custom Variants represent measurements (that is, a type of measurement units and the number of those units). The units must be registered measurement units such as those used by the ConvUtils unit. You can use the negation operator on VarConv variants, and use the addition, subtraction, multiplication, division, and comparison operators on a VarConv Variant with a real number. You can use the addition, subtraction, division, and comparison operators on two VarConv Variants. VarConv custom Variants also support the following properties:

Value is the numeric portion (the number of units). (read/write)

Type is units. (read-only)

TypeName is the name of the units. (read-only).

Family is the conversion family of the units (the thing measured). (read-only).

FamilyName is the name of the conversion family. (read-only)

Depending on the Family, each Variant has a set of conversion properties with names of the form As<Unit>, where <Unit> is the name of another type of unit in the same conversion family.


VarConvertCreate function
 VCL Reference

VarConvertCreate function

See also

Returns a custom Variant that represents a measurement.

Unit

VarConv

Category

Variant support routines

function VarConvertCreate(const AValue: Double; const AType: TConvType!Alink(tconvtype,1,TopicNotFound,main)): Variant; overload;

function VarConvertCreate(const AValue: string): Variant; overload;

Description

Call VarConvertCreate to create a Variant whose value is a measurement.

Using the first syntax, AType indicates the measurement units, and AValue is the number of those units. AType must represent a registered conversion unit.

Using the second syntax, AValue is a string that can be parsed by the TryStrToConvUnit function. (For example ‘1.5 liters’.)

If the string can’t be parsed into a measurement, VarConvertCreate raises an EInvalidCast exception.

VarConvert custom Variants represent measurements (that is, a type of measurement units and the number of those units). The units must be registered measurement units such as those used by the ConvUtils unit. You can use the negation operator on VarConv variants, and use the addition, subtraction, multiplication, division, and comparison operators on a VarConv Variant with a real number. You can use the addition, subtraction, division, and comparison operators on two VarConv Variants. VarConv custom Variants also support the following properties:

Value is the numeric portion (the number of units). (read/write)

Type is units. (read-only)

TypeName is the name of the units. (read-only).

Family is the conversion family of the units (the thing measured). (read-only).

FamilyName is the name of the conversion family. (read-only)

Depending on the Family, each Variant has a set of conversion properties with names of the form As<Unit>, where <Unit> is the name of another type of unit in the same conversion family.


VarIsConvert function
 VCL Reference

VarIsConvert function

See also

Indicates whether a Variant is a custom Variant that represents a measurement.

Unit

VarConv

Category

Variant support routines

function VarIsConvert(const AValue: Variant): Boolean;

Description

VarIsConvert returns True if AValue represents a measurement (that is, if it has a VarType of VarConvert).

VarConvert custom Variants represent measurements (that is, a type of measurement units and the number of those units). The units must be registered measurement units such as those used by the ConvUtils unit. You can use the negation operator on VarConv variants, and use the addition, subtraction, multiplication, division, and comparison operators on a VarConv Variant with a real number. You can use the addition, subtraction, division, and comparison operators on two VarConv Variants. VarConv custom Variants also support the following properties:

Value is the numeric portion (the number of units). (read/write)

Type is units. (read-only)

TypeName is the name of the units. (read-only).

Family is the conversion family of the units (the thing measured). (read-only).

FamilyName is the name of the conversion family. (read-only)

Depending on the Family, each Variant has a set of conversion properties with names of the form As<Unit>, where <Unit> is the name of another type of unit in the same conversion family.


ComplexNumberSymbol variable
 VCL Reference

ComplexNumberSymbol variable

See also

Indicates the symbol used to represent the imaginary part of a complex number.

Unit

VarCmplx

Category

complex numbers

var  ComplexNumberSymbol: string = 'i';

Description

Custom Variants that represent complex numbers use ComplexNumberSymbol when converting between complex values and strings. This identifies the symbol used to signal the imaginary part of a complex number. By default, this value is ‘i’. This allows the custom Variant for complex numbers to interpret or produce strings such as '3.4 + 2i'.


ComplexNumberSymbolBeforeImaginary variable
 VCL Reference

ComplexNumberSymbolBeforeImaginary variable

See also

Indicates the placement of the symbol that represents the imaginary part of a complex number.

Unit

VarCmplx

Category

complex numbers

var ComplexNumberSymbolBeforeImaginary: Boolean = False;;

Description

Custom Variants that represent complex numbers use ComplexNumberSymbolBeforeImaginary when converting between complex values and strings.

When ComplexNumberSymbolBeforeImaginary is False (the default), the symbol appears after the imaginary part, as in '3.4 + 2i'.

When ComplexNumberSymbolBeforeImaginary is True, the symbol appears before the imaginary part, as in '3.4 + i2'.


VarAsComplex function
 VCL Reference

VarAsComplex function

See also

Casts an arbitrary Variant so that it is a custom Variant representing a complex number.

Unit

VarCmplx

Category

Variant support routines

function VarAsComplex(const AValue: Variant): Variant;

Description

VarAsComplex converts the Variant specified by AValue to a custom Variant representing the corresponding complex number. It returns the custom Variant.

If VarAsComplex can’t perform the conversion, it raises an EInvalidCast exception.

Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants.


VarComplex function
 VCL Reference

VarComplex function

See also

Returns the Variant type code for custom Variants that represent complex numbers.

Unit

VarCmplx

Category

Variant support routines

function VarComplex: TVarType;

Description

Use VarComplex to obtain the variant type code for custom Variants that represent complex numbers. The Variant type codes for custom Variants are dynamically allocated when the application loads the unit that implements them. VarComplex allows the application to identify the Variant type code that is currently used for custom Variants that represent complex numbers. This type code, however, may not match the type code used by another application that uses a different set of custom Variant types.

Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants.


VarComplexAbs function
 VCL Reference

VarComplexAbs function

See also

Returns the absolute value of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexAbs(const AValue: Variant): Double;

Description

Use VarComplexAbs to take the absolute value (length) of a complex number.

AValue is a Variant whose value represents the complex number.

VarComplexAbs returns the absolute value of AValue.


VarComplexAbsSqr function
 VCL Reference

VarComplexAbsSqr function

See also

Returns the square of the absolute value of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexAbsSqr(const AValue: Variant): Double;

Description

Use VarComplexAbsSqr to obtain the square of a complex number’s absolute value.

AValue is a Variant whose value represents the complex number.

VarComplexAbs returns the absolute value of AValue, squared.


VarComplexAngle function
 VCL Reference

VarComplexAngle function

See also

Returns the angle made by a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexAngle(const AValue: Variant): Double;

Description

Use VarComplexAngle to obtain the angle of a complex number.

AValue is a Variant whose value represents the complex number.

VarComplexAbs returns the angle that corresponds to AValue.


VarComplexArcCos function
 VCL Reference

VarComplexArcCos function

See also

Returns the inverse cosine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCos(const AValue: Variant): Variant;

Description

VarComplexArcCos computes the inverse cosine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCos returns a Variant whose value is the inverse cosine of AValue.


VarComplexArcCosH function
 VCL Reference

VarComplexArcCosH function

See also

Returns the hyperbolic inverse cosine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCosH(const AValue: Variant): Variant;

Description

VarComplexArcCosH computes the hyperbolic inverse cosine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCosH returns a Variant whose value is the hyperbolic inverse cosine of AValue.


VarComplexArcCot function
 VCL Reference

VarComplexArcCot function

See also

Returns the inverse cotangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCot(const AValue: Variant): Variant;

Description

VarComplexArcCot computes the inverse cotangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCot returns a Variant whose value is the inverse cotangent of AValue.


VarComplexArcCotH function
 VCL Reference

VarComplexArcCotH function

See also

Returns the hyperbolic inverse cotangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCotH(const AValue: Variant): Variant;

Description

VarComplexArcCot computes the hyperbolic inverse cotangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCot returns a Variant whose value is the hyperbolic inverse cotangent of AValue.


VarComplexArcCsc function
 VCL Reference

VarComplexArcCsc function

See also

Returns the inverse cosecant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCsc(const AValue: Variant): Variant;

Description

VarComplexArcCsc computes the inverse cosecant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCsc returns a Variant whose value is the inverse cosecant of AValue.


VarComplexArcCscH function
 VCL Reference

VarComplexArcCscH function

See also

Returns the hyperbolic inverse cosecant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcCscH(const AValue: Variant): Variant;

Description

VarComplexArcCsc computes the hyperbolic inverse cosecant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcCsc returns a Variant whose value is the hyperbolic inverse cosecant of AValue.


VarComplexArcSec function
 VCL Reference

VarComplexArcSec function

See also

Returns the inverse secant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcSec(const AValue: Variant): Variant;

Description

VarComplexArcSec computes the inverse secant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcSec returns a Variant whose value is the inverse secant of AValue.


VarComplexArcSecH function
 VCL Reference

VarComplexArcSecH function

See also

Returns the hyperbolic inverse secant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcSecH(const AValue: Variant): Variant;

Description

VarComplexArcSec computes the hyperbolic inverse secant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcSec returns a Variant whose value is the hyperbolic inverse secant of AValue.


VarComplexArcSin function
 VCL Reference

VarComplexArcSin function

See also

Returns the inverse sine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcSin(const AValue: Variant): Variant;

Description

VarComplexArcSin computes the inverse sine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcSin returns a Variant whose value is the inverse sine of AValue.


VarComplexArcSinH function
 VCL Reference

VarComplexArcSinH function

See also

Returns the hyperbolic inverse sine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcSinH(const AValue: Variant): Variant;

Description

VarComplexArcSinH computes the hyperbolic inverse sine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcSinH returns a Variant whose value is the hyperbolic inverse sine of AValue.


VarComplexArcTan function
 VCL Reference

VarComplexArcTan function

See also

Returns the inverse tangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcTan(const AValue: Variant): Variant;

Description

VarComplexArcTan computes the inverse tangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcTan returns a Variant whose value is the inverse tangent of AValue.


VarComplexArcTanH function
 VCL Reference

VarComplexArcTanH function

See also

Returns the hyperbolic inverse tangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexArcTanH(const AValue: Variant): Variant;

Description

VarComplexArcTanH computes the hyperbolic inverse tangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexArcTanH returns a Variant whose value is the hyperbolic inverse tangent of AValue.


VarComplexConjugate function
 VCL Reference

VarComplexConjugate function

See also

Returns the conjugate of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexConjugate(const AValue: Variant): Variant;

Description

VarComplexConjugate returns the conjugate of a complex number. The conjugate is the value that has the same real part and the inverse of the imaginary part.

AValue is a Variant whose value represents the complex number.

VarComplexConjugate returns a Variant whose value is the conjugate of AValue.


VarComplexCos function
 VCL Reference

VarComplexCos function

See also

Returns the cosine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCos(const AValue: Variant): Variant;

Description

VarComplexCos computes the cosine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCos returns a Variant whose value is the cosine of AValue.


VarComplexCosH function
 VCL Reference

VarComplexCosH function

See also

Returns the hyperbolic cosine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCosH(const AValue: Variant): Variant;

Description

VarComplexCosH computes the hyperbolic cosine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCosH returns a Variant whose value is the hyperbolic cosine of AValue.


VarComplexCot function
 VCL Reference

VarComplexCot function

See also

Returns the cotangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCot(const AValue: Variant): Variant;

Description

VarComplexCot computes the cotangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCot returns a Variant whose value is the cotangent of AValue.


VarComplexCotH function
 VCL Reference

VarComplexCotH function

See also

Returns the hyperbolic cotangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCotH(const AValue: Variant): Variant;

Description

VarComplexCot computes the hyperbolic cotangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCot returns a Variant whose value is the hyperbolic cotangent of AValue.


VarComplexCreate function
 VCL Reference

VarComplexCreate function

See also

Returns a custom Variant that represents a complex number.

Unit

VarCmplx

Category

Variant support routines

function VarComplexCreate(const AReal, AImaginary: Double): Variant; overload;

function VarComplexCreate(const AReal: Double): Variant; overload;

function VarComplexCreate: Variant; overload;

function VarComplexCreate(const AText: string): Variant; overload;

Description

Call VarComplexCreate to create a Variant whose value is a complex number.

AReal is the real part of the complex number.

AImaginary is the imaginary part of the complex number.

Using the first three versions of the constructor, omitting AReal or AImaginary results in a real or imaginary part of 0.

Using the last syntax, AText is parsed using the ComplexNumberSymbol and ComplexNumberSymbolBeforeImaginary global variables and, if the string represents a complex value, that becomes the value of the new Variant. If the string can’t be parsed into a complex number, VarComplexCreate raises an EConvertError exception.

Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants.


VarComplexCsc function
 VCL Reference

VarComplexCsc function

See also

Returns the cosecant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCsc(const AValue: Variant): Variant;

Description

VarComplexCsc computes the cosecant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCsc returns a Variant whose value is the cosecant of AValue.


VarComplexCscH function
 VCL Reference

VarComplexCscH function

See also

Returns the hyperbolic cosecant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexCscH(const AValue: Variant): Variant;

Description

VarComplexCsc computes the hyperbolic cosecant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexCsc returns a Variant whose value is the hyperbolic cosecant of AValue.


VarComplexExp function
 VCL Reference

VarComplexExp function

See also

Returns the exponential of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexExp(const AValue: Variant): Variant;

Description

VarComplexExp returns value of e raised to the power of a specified complex number, where e is the base of the natural logarithms.

AValue is a Variant whose value represents the complex number.

VarComplexExp returns a Variant whose value is the exponential of AValue.


VarComplexFromPolar function
 VCL Reference

VarComplexFromPolar function

See also

Converts a set of polar coordinates to a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexFromPolar(const ARadius, ATheta: Double): Variant;

Description

VarComplexFromPolar returns the complex number that corresponds to the radius (length) and angle specified by the ARadius and ATheta parameters, respectively. The result is returned as a Variant whose value is the corresponding complex number.


VarComplexInverse function
 VCL Reference

VarComplexInverse function

See also

Returns the inverse of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexInverse(const AValue: Variant): Variant;

Description

VarComplexInverse returns the inverse of a complex number. The inverse is the value that results when you divide 1 by the complex number.

AValue is a Variant whose value represents the complex number.

VarComplexInverse returns a Variant whose value is the inverse of AValue.


VarComplexLn function
 VCL Reference

VarComplexLn function

See also

Returns the natural log of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexLn(const AValue: Variant): Variant;

Description

VarComplexLn returns the natural logarithm of a complex number. The natural logarithm is the power to which you must raise e to get the complex number.

AValue is a Variant whose value represents the complex number.

VarComplexLn returns a Variant whose value is the natural log of AValue.


VarComplexPower function
 VCL Reference

VarComplexPower function

See also

Returns the value of a complex number raised to a specified power.

Unit

VarCmplx

Category

complex numbers

function VarComplexPower(const AValue, APower: Variant): Variant;

Description

VarComplexPower returns the result of raising AValue to the power APower.

AValue is a Variant whose value represents the complex number.

APower is a Variant that specifies the power to which you want to raise AValue. It can also be a complex number.

VarComplexPower returns a Variant whose value is AValue raised to the APower power.


VarComplexSec function
 VCL Reference

VarComplexSec function

See also

Returns the secant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSec(const AValue: Variant): Variant;

Description

VarComplexSec computes the secant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexSec returns a Variant whose value is the secant of AValue.


VarComplexSecH function
 VCL Reference

VarComplexSecH function

See also

Returns the hyperbolic secant of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSecH(const AValue: Variant): Variant;

Description

VarComplexSec computes the hyperbolic secant of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexSec returns a Variant whose value is the hyperbolic secant of AValue.


VarComplexSimplify function
 VCL Reference

VarComplexSimplify function

See also

Reduces a Variant that represents a complex number to one that represents a real value, if possible.

Unit

VarCmplx

Category

Variant support routines

function VarComplexSimplify(const AValue: Variant): Variant;

Description

Use VarComplexSimplify to convert a complex number to a real value when possible. VarComplexSimplify checks whether the Variant specified by AValue represents a complex number that has no imaginary part. If so, it returns a Variant whose value is simply a real number. If AValue does not represent a complex number, or if AValue represents a complex number with a nonzero imaginary part, VarComplexSimplify returns AValue.


VarComplexSin function
 VCL Reference

VarComplexSin function

See also

Returns the sine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSin(const AValue: Variant): Variant;

Description

VarComplexSin computes the sine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexSin returns a Variant whose value is the sine of AValue.


VarComplexSinH function
 VCL Reference

VarComplexSinH function

See also

Returns the hyperbolic sine of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSinH(const AValue: Variant): Variant;

Description

VarComplexSinH computes the hyperbolic sine of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexSinH returns a Variant whose value is the hyperbolic sine of AValue.


VarComplexSqr function
 VCL Reference

VarComplexSqr function

See also

Returns the square of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSqr(const AValue: Variant): Variant;

Description

VarComplexSqr returns the square of AValue.

AValue is a Variant whose value represents the complex number.


VarComplexSqrt function
 VCL Reference

VarComplexSqrt function

See also

Returns the square root of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexSqrt(const AValue: Variant): Variant;

Description

VarComplexSqrt returns the square root of AValue.

AValue is a Variant whose value represents the complex number.


VarComplexTan function
 VCL Reference

VarComplexTan function

See also

Returns the tangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexTan(const AValue: Variant): Variant;

Description

VarComplexTan computes the tangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexTan returns a Variant whose value is the tangent of AValue.


VarComplexTanH function
 VCL Reference

VarComplexTanH function

See also

Returns the hyperbolic tangent of a complex number.

Unit

VarCmplx

Category

complex numbers

function VarComplexTanH(const AValue: Variant): Variant;

Description

VarComplexTanH computes the hyperbolic tangent of a complex number and returns the result.

AValue is a Variant whose value represents the complex number.

VarComplexTanH returns a Variant whose value is the hyperbolic tangent of AValue.


VarComplexTimesNegI function
 VCL Reference

VarComplexTimesNegI function

See also

Returns the value of a complex number multiplied by –i.

Unit

VarCmplx

Category

complex numbers

function VarComplexTimesNegI(const AValue: Variant): Variant;

Description

VarComplexTimesNegI returns AValue times –i.

AValue is a Variant whose value represents the complex number.


VarComplexTimesPosI function
 VCL Reference

VarComplexTimesPosI function

See also

Returns the value of a complex number multiplied by i.

Unit

VarCmplx

Category

complex numbers

function VarComplexTimesPosI(const AValue: Variant): Variant;

Description

VarComplexTimesPosI returns AValue times i.

AValue is a Variant whose value represents the complex number.


VarComplexToPolar procedure
 VCL Reference

VarComplexToPolar procedure

See also

Computes the polar coordinates that correspond to a custom Variant that represents a complex number.

Unit

VarCmplx

Category

complex numbers

procedure VarComplexToPolar(const AValue: Variant; var ARadius, ATheta: Double; AFixTheta: Boolean = True);

Description

Call VarComplexToPolar to obtain the polar coordinates for a complex number.

AValue is a Variant whose value represents the complex number.

ARadius returns the radius of the corresponding polar coordinates.

ATheta returns the angle (Theta) of the corresponding polar coordinates.

AFixTheta indicates whether VarComplexToPolar should normalize the angle (ATheta). When AFixTheta is True, VarComplexToPolar always returns an angle between – pi and pi.


VarIsComplex function
 VCL Reference

VarIsComplex function

See also

Indicates whether a Variant stores its data internally as a complex number.

Unit

VarCmplx

Category

Variant support routines

function VarIsComplex(const AValue: Variant): Boolean;

Description

VarIsComplex returns True if AValue represents a complex number (that is, if it has a VarType of VarComplex).

Complex Variants are custom Variants that represent complex numbers. The Variant type supports direct manipulation using the addition, subtraction, multiplication, division (but not integer division), and negation operators. They have 5 published properties: Real, Imaginary, Radius, Theta, and FixedTheta. They can be cast to and from integer types, floating point types, string types, TDateTime values, and boolean values. In addition, the VarCmplx unit implements a number of global functions for operating on complex Variants.


DynArrayFromVariant procedure
 VCL Reference

DynArrayFromVariant procedure

See also

Creates a dynamic array from a Variant.

Unit

Variants

Category

variant support routines

procedure DynArrayFromVariant(var DynArray: Pointer; const V: Variant; TypeInfo: Pointer);

Description

Call DynArrayFromVariant to copy the contents of a variant (V) to an existing dynamic array variable (DynArray).

DynArray is a dynamic array variable whose value is assigned from the Variant.

V is the Variant to copy. Its value must be an array.

TypeInfo points to the runtime type information that identifies the type of array elements. You can obtain this pointer using the TypeInfo function.


DynArrayToVariant procedure
 VCL Reference

DynArrayToVariant procedure

See also

Creates a Variant array from a dynamic array.

Unit

Variants

Category

variant support routines

procedure DynArrayToVariant(var V: Variant; const DynArray: Pointer; TypeInfo: Pointer);

Description

Call DynArrayToVariant to assign the contents of a dynamic array as the value of a Variant variable.

V is the Variant whose value is assigned by DynArrayToVariant.

DynArray is a dynamic array to copy.

TypeInfo points to the runtime type information that identifies the type of array elements. You can obtain this pointer using the TypeInfo function.


EmptyParam function
 VCL Reference

EmptyParam function

See also

Returns an OleVariant that represents an unused optional parameter on a dual interface.

Unit

Variants

Category

variant support routines

function EmptyParam: OleVariant;

Description

When marshaling interface calls that include optional parameters, COM requires a value for those parameters even when they are not used. EmptyParam returns an OleVariant you can pass as that value to indicate that the parameter is not used.


FindCustomVariantType function
 VCL Reference

FindCustomVariantType function

See also

Retrieves the object that implements a custom Variant type.

Unit

Variants

Category

variant support routines

function FindCustomVariantType(const TypeName: string; out CustomVariantType: TCustomVariantType): Boolean; overload;

function FindCustomVariantType(const AVarType: TVarType;  out CustomVariantType: TCustomVariantType): Boolean; overload;

Description

Use FindCustomVariantType to obtain a reference to the object that implements a custom Variant type.

TypeName is the name of the TCustomVariantType descendant class you want to retrieve.

AVarType is the type code of Variant whose implementation class you want to retrieve. If you have an instance of a Variant whose value is a custom Variant Type, you can obtain a value for this parameter using the VarType function.

CustomVariantType returns an instance of the TCustomVariantType descendant that implements the indicated custom Variant type.


Null function
 VCL Reference

Null function

See also

Null returns a null Variant.

Unit

Variants

Category

variant support routines

function Null: Variant;

Description

Use Null to obtain a Null Variant that can indicate unknown or missing data. Null Variants can be assigned to variables in an application that must contain a null value. Assigning Null to a variant variable does not cause an error, and Null can be returned from any function with a variant return value.

Assigning Null to a variable of any type other than Variant causes either a compile-time error or raises an EVariantError exception. For example, in the following code the assignment of v, the Null variant, to variant q is successful; whereas the conversion of variant v, which is now Null, to the integer return type of the Test function, raises an exception.

function Test(v: Variant): Integer;

var

  q: Variant;

  msg: string;

begin

  q := v; { this is ok, since q is a variant }

  if VarIsNull(q) then

    msg := 'q is a null variant'

  else

    msg := 'q is not a null variant';

  ShowMessage(msg);

  Result := v; { this raises an exception!!!}

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  Test(Null);

end;

Expressions involving Null Variants always result in a Null Variant. Thus, Null is said to “propagate” through intrinsic functions that return variant data types. If any part of the expression evaluates to Null, the entire expression evaluates to Null.


Unassigned constant
 VCL Reference

Unassigned constant

See also	Example

Used for a variant not yet assigned a value.

Unit

Variants

Category

variant support routines

const Unassigned: Variant;

Description

The Unassigned constant is used to indicate that a variant has not yet been assigned a value. The initial value of any variant is Unassigned. The Unassigned value disappears as soon as a variant is assigned any other value, including the value 0, a zero-length string, and the Null value.

Use the VarIsEmpty standard function to test whether a variant is Unassigned. When used on an Unassigned variant, the VarType standard function returns varEmpty. An EVariantError exception is raised if an Unassigned variant appears in any other expression or an attempt is made to convert an Unassigned variant to another type (using VarAsType or VarCast).

You can make a variant unassigned by assigning the Unassigned constant to it. This is useful with variants referencing OLE Automation Objects that you want to keep "alive" until another value is assigned to the variant.


VarArrayCreate function
 VCL Reference

VarArrayCreate function

See also 	Example

Creates a variant array.

Unit

Variants

Category

variant support routines

function VarArrayCreate(const Bounds: array of Integer; VarType: TVarType): Variant;

Description

VarArrayCreate creates a variant array with the bounds given by Bounds and the element type given by VarType.

The Bounds parameter must contain an even number of values, where each pair of values specifies the upper and lower bounds of one dimension of the array.

The element type of the array, given by the VarType parameter, is a variant type code. This must be one of the constants defined in the System unit. It cannot include the varArray or varByRef bits. The element type cannot be varString or a custom Variant type. To create a variant array of strings use the varOleStr type code. If the element type is varVariant, the elements of the array are themselves variants and can in turn contain variant arrays.

Note:	Variant arrays with an element type of varByte are the preferred method of passing binary data between OLE Automation controllers and servers. Such arrays are subject to no translation of their data, and can be efficiently accessed using the VarArrayLock and VarArrayUnlock routines.


VarArrayDimCount function
 VCL Reference

VarArrayDimCount function

See also

Returns number of dimensions of a variant array.

Unit

Variants

Category

variant support routines

function VarArrayDimCount(const A: Variant): Integer;

Description

VarArrayDimCount returns the number of dimensions of the given variant. The resulting value is zero if the given variant is not a variant array.


VarArrayGet function
 VCL Reference

VarArrayGet function

See also

Returns a Variant that represents a single value from a multi-dimensional Variant array.

Unit

Variants

Category

variant support routines

function VarArrayGet(const A: Variant; const Indices: array of Integer): Variant;

Description

Use VarArrayGet to obtain the value of a single cell from a multi-dimensional Variant array.

A is the Variant array that contains the desired value.

Indices is an array of index values, one for each dimension of the array.


VarArrayHighBound function
 VCL Reference

VarArrayHighBound function

See also

Returns high bound for a dimension in a variant array.

Unit

Variants

Category

Variant support routines

function VarArrayHighBound(const A: Variant; Dim: Integer): Integer;

Description

VarArrayHighBound returns the high bound of the given dimension in the given variant array. The Dim parameter should be 1 for the leftmost dimension, 2 for the second leftmost dimension, and so on. An EVariantError exception is raised if the variant given by A is not an array, or if the dimension specified by Dim does not exist.


VarArrayLock function
 VCL Reference

VarArrayLock function

See also 	Example

Locks a variant array and returns a pointer to the data.

Unit

Variants

Category

Variant support routines

function VarArrayLock(const A: Variant): Pointer;

Description

VarArrayLock locks the given variant array and returns a pointer to the data stored in the array. While locked, a variant array can not be resized and any calls to VarArrayRedim will fail. Once locked, a variant array must later be unlocked using VarArrayUnlock. An EVariantError exception is raised if the variant given by A is not an array.

The pointer returned by VarArrayLock points to an array of elements in which the leftmost dimension increases first. In other words, the dimensions of the returned array pointer are reversed from the dimensions of the variant array.

Once it is verified that a variant array has the correct bounds and dimensions, VarArrayLock can be used to gain direct access to the array data, which results in improved performance.


VarArrayLowBound function
 VCL Reference

VarArrayLowBound function

See also

Returns the low bound of a dimension in a variant array.

Unit

Variants

Category

Variant support routines

function VarArrayLowBound(const A: Variant; Dim: Integer): Integer;

Description

VarArrayLowBound returns the low bound of the given dimension in the given variant array. The Dim parameter should be 1 for the leftmost dimension, 2 for the second leftmost dimension, and so on. An EVariantError exception is raised if the variant given by A is not an array, or if the dimension specified by Dim does not exist.


VarArrayOf function
 VCL Reference

VarArrayOf function

See also	Example

Creates and fills a one-dimensional variant array.

Unit

Variants

Category

Variant support routines

function VarArrayOf(const Values: array of Variant): Variant;

Description

VarArrayOf returns a one-dimensional variant array with the elements given by the Values parameter.

The low bound of the returned array is zero, the high bound is the number of values given by the Values parameter less one, and the element type is Variant.


VarArrayPut procedure
 VCL Reference

VarArrayPut procedure

See also

Sets the value of a single cell in a multi-dimensional Variant array.

Unit

Variants

Category

variant support routines

procedure VarArrayPut(var A: Variant; const Value: Variant; const Indices: array of Integer);

Description

Use VarArrayPut to set the value of a single cell in a multi-dimensional Variant array.

A is the Variant array that contains the cell to set.

Value is the value to assign to the specified cell.

Indices is an array of index values, one for each dimension of the array.


VarArrayRef function
 VCL Reference

VarArrayRef function

See also

Returns a reference to the specified variant array.

Unit

Variants

Category

Variant support routines

function VarArrayRef(const A: Variant): Variant;

Description

Use VarArrayRef to reference a variant array when a referenced variant array is expected in an API call. VarArrayRef creates a new variant array of the same type as A, but with an extra level of indirection if A does not include the varByRef type bit. The returned variant includes the varByRef type bit.

If A is not an array, VarArrayRef raises an EVariantError exception.


VarArrayUnlock procedure
 VCL Reference

VarArrayUnlock procedure

See also	Example

Unlocks a variant array.

Unit

Variants

Category

Variant support routines

procedure VarArrayUnlock(var A: Variant);

Description

VarArrayUnlock unlocks a variant array that was previously locked by VarArrayLock. An EVariantError exception is raised if the variant given by A is not an array.


VarAsType function
 VCL Reference

VarAsType function

See also

Converts a variant to specified type.

Unit

Variants

Category

Variant support routines

function VarAsType(const V: Variant; VarType: TVarType): Variant;

Description

VarAsType converts a variant to a specified type and returns a new Variant that has the specified type.

V is the Variant to convert.

VarType is a variant type code that indicates the type to which V should be converted. This can be one of the constants defined in the System unit, or it can be the type code for a custom variant type. It cannot include the varArray or varByRef bits.

VarAsType thows an EVariantError exception if the variant cannot be converted to the given type.


VarCheckEmpty procedure
 VCL Reference

VarCheckEmpty procedure

See also

Raises an exception if a specified variant’s value is Unassigned.

Unit

Variants

Category

Variant support routines

procedure VarCheckEmpty(const V: Variant);

Description

Call VarCheckEmpty when your code requires that a Variant have a value, and you want to raise an exception if it doesn’t. VarCheckEmpty checks whether the Variant specified by V has a value of Unassigned. If so, it raises an EVariantError exception.

To check whether the Variant is Unassigned without raising an exception, use the VarIsEmpty function instead. To check whether the Variant’s value is undefined, use the VarIsClear function instead.

Note:	Do not confuse an Unassigned variant with a Variant whose value is Null. A Null variant is still assigned, but has the value Null. Unlike unassigned variants, Null variants can be used in expressions and can be converted to other types of variants.


VarCompareValue function
 VCL Reference

VarCompareValue function

See also

Returns the relationship between Variants.

Unit

Variants

Category

Variant support routines

type TVariantRelationship = (vrEqual, vrLessThan, vrGreaterThan, vrNotEqual);

function VarCompareValue(const A, B: Variant): TVariantRelationship;

Description

Call VarCompareValue to determine the relationship between two Variants. A and B are the values to compare. VarCompareValue returns one of the following values:

Value	Meaning

vrEqual	A is equivalent to B. Note that two NULL Variants are considered equal, and two empty Variants are considered equal, but a NULL Variant does not equal an empty Variant.

vrLessThan	A is less than B.

vrGreaterThan	A is larger than B.

vrNotEqual	Either A or B is empty or NULL, and the other one is not.


VarCopyNoInd procedure
 VCL Reference

VarCopyNoInd procedure

Copies a Variant.

Unit

Variants

Category

Variant support routines

procedure VarCopyNoInd(var Dest: Variant; const Source: Variant);

Description

VarCopyNoInd copies the variant given by Source into the variant given by Dest. The call VarCopyNoInd(Dest, Source) is the same as writing Dest := Source.

Dest can be a Variant or an OleVariant, and it must be possible to assign a value to it (it must be an lvalue).

Source is defined as a Variant, but an OleVariant is also allowed because it is a compatible type. However, Source can’t have a VarType that includes the varByRef bit.

The following table lists the expected behavior when using Variant and OleVariant types as parameters:

Dest 	Source	Behavior

Variant	OleVariant	Fine as is.

Variant	Variant	Fine as is.

OleVariant	OleVariant	Fine as is.

OleVariant	Variant	Source should be implicitly cast to an OleVariant.


VarDispProc variable
 VCL Reference

VarDispProc variable

See also	Example

Provides the support for IDispatch-based Automation.

Unit

Variants

Category

Com utilities

type TVarDispProc = procedure (Dest: PVariant; const Source: Variant; CallDesc: PCallDesc; Params: Pointer); cdecl;

var VarDispProc: TVarDispProc;

Description

VarDispProc points to a routine that is called to execute method (or access properties) of an interface that is assigned to a Variant. The Variants unit assigns a procedure that generates error 222 or raises an EVariantError exception. The ComObj unit reassigns this variable to a procedure that generates the appropriate COM IDispatch calls. The CorbaObj unit assigns a procedure that generates CORBA interface calls instead.

If you do not need Automation, you can assign your own procedure to execute interfaces that are assigned to Variants.


VarEnsureRange function
 VCL Reference

VarEnsureRange function

See also

Returns a Variant with a value in a specified range.

Unit

Variants

Category

Variant support routines

function VarEnsureRange(const AValue, AMin, AMax: Variant): Variant;

Description

VarEnsureRange returns a Variant whose value is guaranteed to be within a specified range.

AValue is a Variant with the value you want as long as it is in range. If AValue is in range, VarEnsureRange returns AValue.

AMin is a Variant with the minimum acceptable value. If AValue is less than AMin, VarEnsureRange returns AMin.

AMax is a Variant with the maximum acceptable value. If AValue is greater than AMax, VarEnsureRange returns AMax.


VarFromDateTime function
 VCL Reference

VarFromDateTime function

See also

Returns a variant containing a specified data and time.

Unit

Variants

Category

Variant support routines

function VarFromDateTime(DateTime: TDateTime): Variant;

Description

VarFromDateTime returns a variant that represents the date and time of the given TDateTime value, DateTime. The type code of the resulting variant is varDate.


VarInRange function
 VCL Reference

VarInRange function

See also

Indicates whether a Variant’s value is in a specified range.

Unit

Variants

Category

Variant support routines

function VarInRange(const AValue, AMin, AMax: Variant): Boolean;

Description

VarInRange checks whether a Variant has a value in a specified range.

AValue is a Variant to check.

AMin is a Variant with the minimum acceptable value.

AMax is a Variant with the maximum acceptable value.

VarInRange returns True if AValue is greater than or equal to AMin and less than or equal to AMax. Otherwise, it returns False.


VarIsArray function
 VCL Reference

VarIsArray function

See also

Indicates whether the specified variant is an array.

Unit

Variants

Category

Variant support routines

function VarIsArray(const A: Variant): Boolean; overload;

function VarIsArray(const A: Variant; AResolveByRef: Boolean): Boolean; overload;

Description

VarIsArray returns True if the given variant is an array. Otherwise, the function result is False.

A is the Variant to check.

AResolveByRef indicates how VarIsArray should handle the case when A is a reference to a Variant (when the VarType of A is varByRef or varVariant).When AResolveByRef is True, VarIsArray checks whether A is an array or A points to an array. When AResolveByRef is False, VarIsArray returns False when A has a VarType of varByRef or varVariant.


VarIsByRef function
 VCL Reference

VarIsByRef function

See also

Indicates whether the specified variant’s value is by reference.

Unit

Variants

Category

Variant support routines

function VarIsByRef(const V: Variant): Boolean;

Description

VarIsByRef returns True if the given variant’s type code includes the includes the varByRef bit. Otherwise, the function result is False.


VarIsClear function
 VCL Reference

VarIsClear function

See also

Indicates whether the specified variant has an undefined value.

Unit

Variants

Category

Variant support routines

function VarIsClear(const V: Variant): Boolean;

Description

VarIsClear returns True if the given variant’s value is undefined. The value can be undefined for any of several reasons:

The Variant may have had its value set to Unassigned.

The Variant’s value may be an interface type that has been set to nil.

The Variant may be a custom variant that returns True from its IsClear method.

In all other cases, the function result is False.

Note:	Do not confuse an unassigned variant with a Null variant. A Null variant is still assigned, but has the value Null. Unlike unassigned variants, Null variants can be used in expressions and can be converted to other types of variants.


VarIsCustom function
 VCL Reference

VarIsCustom function

See also

Indicates whether the specified variant is a custom variant.

Unit

Variants

Category

Variant support routines

function VarIsCustom(const V: Variant): Boolean;

Description

VarIsCustom returns True if the given variant represents a custom variant type. Otherwise, the function result is False.


VarIsEmpty function
 VCL Reference

VarIsEmpty function

See also

Indicates whether the specified variant is unassigned.

Unit

Variants

Category

Variant support routines

function VarIsEmpty(const V: Variant): Boolean;

Description

VarIsEmpty returns True if the given variant contains the value Unassigned. If the variant contains any other value, the function result is False.

Note:	VarIsEmpty does not indicate when a Variant that represents an interface has had the interface pointer cleared or when a custom Variant is clear. If either of these situations may exist, use the VarIsClear method instead.

Note:	Do not confuse an unassigned variant with a Null variant. A Null variant is still assigned, but has the value Null. Unlike unassigned variants, Null variants can be used in expressions and can be converted to other types of variants.


VarIsEmptyParam function
 VCL Reference

VarIsEmptyParam function

See also

Indicates whether the specified variant represents an unassigned optional parameter.

Unit

Variants

Category

Variant support routines

function VarIsEmptyParam(const V: Variant): Boolean;

Description

VarIsEmptyParam returns True if the given variant represents an unassigned optional parameter. If the variant contains any other value, the function result is False.


VarIsFloat function
 VCL Reference

VarIsFloat function

See also

Indicates whether the specified variant represents a floating-point value.

Unit

Variants

Category

Variant support routines

function VarIsFloat(const V: Variant): Boolean;

Description

VarIsFloat returns True if the given variant represents a floating-point value (Single, Double, or Currency). If the variant contains any other type of value, the function result is False.


VarIsNull function
 VCL Reference

VarIsNull function

See also

Indicates whether the specified variant is Null.

Unit

Variants

Category

Variant support routines

function VarIsNull(const V: Variant): Boolean;

Description

VarIsNull returns True if the given variant contains the value Null. If the variant contains any other value, the function result is False.

Note:	Do not confuse a Null variant with an unassigned variant. A Null variant is still assigned, but has the value Null. Unlike unassigned variants, Null variants can be used in expressions and can be converted to other types of variants.


VarIsNumeric function
 VCL Reference

VarIsNumeric function

See also

Indicates whether the specified variant represents a numeric value.

Unit

Variants

Category

Variant support routines

function VarIsNumeric(const V: Variant): Boolean;

Description

VarIsNumeric returns True if the given variant’s type code indicates a numeric value of some sort. This can be either a floating-point value or an ordinal value. If the variant contains any other type of value, the function result is False.


VarIsOrdinal function
 VCL Reference

VarIsOrdinal function

See also

Indicates whether the specified variant represents an ordinal value.

Unit

Variants

Category

Variant support routines

function VarIsOrdinal(const V: Variant): Boolean;

Description

VarIsOrdinal returns True if the given variant represents an ordinal value (such as an integer or boolean type). If the variant contains any other type of value, the function result is False.


VarIsStr function
 VCL Reference

VarIsStr function

See also

Indicates whether the specified variant represents a string value.

Unit

Variants

Category

Variant support routines

function VarIsStr(const V: Variant): Boolean;

Description

VarIsStr returns True if the given variant’s type code is varString or varOleStr. If the variant contains any other type of value, the function result is False.


VarIsType function
 VCL Reference

VarIsType function

See also

Indicates whether the specified variant represents a specified type.

Unit

Variants

Category

Variant support routines

function VarIsType(const V: Variant; AVarType: TVarType): Boolean; overload;

function VarIsType(const V: Variant; const AVarTypes: array ofTVarType): Boolean; overload;

Description

VarIsType checks whether the type code for the Variant specified by V matches the specified type code or one of the type codes in the specified array.

V is the Variant to check.

AVarType is the type code against which to check V.

AVarTypes is an array of valid type codes against which to check V.

VarIsType returns True if the given variant’s type code matches the supplied type code or codes, False otherwise.


VarSameValue function
 VCL Reference

VarSameValue function

See also

Indicates whether two Variants have equivalent values.

Unit

Variants

Category

Variant support routines

function VarSameValue(const A, B: Variant): Boolean;

Description

VarSameValue returns True when A has the same value as B, False if the two values are not equivalent.

If A and B can’t be compared, VarSameValue raises an exception.


VarSupports function
 VCL Reference

VarSupports function

See also

Indicates whether the Variant’s value is an interface that supports a specified interface.

Unit

Variants

Category

Variant support routines

function VarSupports(const V: Variant; const IID: TGUID; out Intf): Boolean; overload;

function VarSupports(const V: Variant; const IID: TGUID): Boolean; overload;

Description

VarSupports returns the lower twelve bits of a variant type code. These indicate the type of the variant. For a list of possible variant type codes, see VarType.

Call VarSupports to determine whether the Variant represents an interface that supports the interface identified by the IID parameter. If V supports the interface, VarSupports returns the interface as the Intf parameter (if using the first syntax) and returns True (both versions). If the interface specified by IID is not supported, VarSupports returns False.

Unlike calling the QueryInterface method of the interface, VarSupports handles the case when the Variant’s value is a nil interface.


VarToDateTime function
 VCL Reference

VarToDateTime function

See also

Converts a specified variant to a TDateTime value.

Unit

Variants

Category

Variant support routines

function VarToDateTime(const V: Variant): TDateTime);

Description

VarToDateTime converts the given variant to a TDateTime value. VarToDateTime raises an EVariantError exception if the conversion fails.


VarToStr function
 VCL Reference

VarToStr function

See also

Converts a variant to a string.

Unit

Variants

Category

Variant support routines

function VarToStr(const V: Variant): string;

Description

VarToStr converts the data in the variant V to a string and returns the result. If the variant has a null value, VarToStr returns an empty string.


VarToStrDef function
 VCL Reference

VarToStrDef function

See also

Converts a variant to a string.

Unit

Variants

Category

Variant support routines

function VarToStrDef(const V: Variant; const ADefault: string): string;

Description

VarToStrDef converts the data in the variant V to a string and returns the result. If the variant has a null value, VarToStrDef returns ADefault.


VarToWideStr function
 VCL Reference

VarToWideStr function

See also

Converts a variant to a WideString.

Unit

Variants

Category

Variant support routines

function VarToWideStr(const V: Variant): WideString;

Description

VarToWideStr converts the data in the variant V to a WideString and returns the result. If the variant has a null value, VarToWideStr returns an empty string.


VarToWideStrDef function
 VCL Reference

VarToWideStrDef function

See also

Converts a variant to a WideString.

Unit

Variants

Category

Variant support routines

function VarToWideStrDef(const V: Variant; const ADefault: WideString): WideString;

Description

VarToWideStrDef converts the data in the variant V to a WideString and returns the result. If the variant has a null value, VarToWideStrDef returns ADefault.


VarType function
 VCL Reference

VarType function

See also

Returns the type code of a specified variant.

Unit

Variants

Category

Variant support routines

function VarType(const V: Variant): TVarType;

Description

VarType returns the type code of the given variant. The resulting value is either the type code for a custom Variant type, or it is constructed from the constants declared in the System unit.

The lower twelve bits of a variant type code (the bits defined by the varTypeMask bit mask) define the type of the variant. The varArray bit is set if the variant is an array of the given type. The varByRef bit is set if the variant is a reference to a value of the given type as opposed to an actual value.

The following table describes the meaning of each of the variant type codes defined in the System unit:

VarType	Contents of variant

varEmpty	The variant is Unassigned.

varNull	The variant is Null.

varSmallint	16-bit signed integer (type Smallint).

varInteger	32-bit signed integer (type Integer).

varSingle	Single-precision floating-point value (type Single).

varDouble	Double-precision floating-point value (type Double).

varCurrency	Currency floating-point value (type Currency).

varDate	Date and time value (type TDateTime).

varOleStr	Reference to a dynamically allocated UNICODE string.

varDispatch	Reference to an Automation object (an IDispatch interface pointer).

varError	Operating system error code.

varBoolean	16-bit boolean (type WordBool).

varVariant	A variant.

varUnknown	Reference to an unknown OLE object (an IInterface or IUnknown interface pointer).

varShortInt	8-bit signed integer (type ShortInt)

varByte	A Byte

varWord	unsigned 16-bit value (Word)

varLongWord	unsigned 32-bit value (LongWord)

varInt64	64-bit signed integer (Int64)

varStrArg	COM-compatible string.

varString	Reference to a dynamically allocated string (not COM compatible).

varAny	A CORBA Any value.

The value returned by VarType corresponds to the VType field of a TVarData record.

The type of a variant can be changed using VarAsType.


VarTypeIsValidArrayType function
 VCL Reference

VarTypeIsValidArrayType function

See also

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.

Unit

Variants

Category

variant support routines

function VarTypeIsValidArrayType(const AVarType: TVarType): Boolean;

Description

VarTypeIsValidArrayType indicates whether AVarType is the type code for a Variant type that can represent the elements of a Variant array. This function is only intended for use with built-in Variant types. It returns False for custom Variant types, although they can be used for the elements of Variant arrays.


VarTypeIsValidElementType function
 VCL Reference

VarTypeIsValidElementType function

See also

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.

Unit

Variants

Category

variant support routines

function VarTypeIsValidElementType(const AVarType: TVarType): Boolean;

Description

VarTypeIsValidElementType indicates whether AVarType is the type code for a Variant type that can represent the elements of a Variant array. Unlike the VarTypeIsValidArrayType function, this function returns True for custom Variant types.


TSaveDialog
 VCL Reference

 TSaveDialog

Hierarchy	Properties	Methods	Events	See also

TSaveDialog displays a "Save As" dialog for saving files.

Unit

Dialogs

Description

TSaveDialog displays a modal Windows dialog box for selecting file names and saving files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Save, the dialog closes and the selected file name is stored in the FileName property.


 VCL Reference

TSaveDialog properties

TSaveDialog	Alphabetically	Legend

Derived from TOpenDialog

DefaultExt

FileEditStyle

FileName

Files

Filter

FilterIndex

HistoryList

InitialDir

Options

OptionsEx

Title

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSaveDialog properties

TSaveDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DefaultExt

DesignInfo

FileEditStyle

FileName

Files

Filter

FilterIndex

Handle

HelpContext

HistoryList

InitialDir

Name

Options

OptionsEx

Owner

Tag

Title

VCLComObject


 VCL Reference

TSaveDialog events

TSaveDialog	Alphabetically	Legend

Derived from TOpenDialog

OnCanClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnTypeChange

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TSaveDialog events

TSaveDialog	By object	Legend

OnCanClose

OnClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnShow

OnTypeChange


 VCL Reference

TSaveDialog methods

TSaveDialog	Alphabetically	Legend

In TSaveDialog

Execute

Derived from TOpenDialog

Create

Destroy

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSaveDialog methods

TSaveDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetStaticRect

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSaveDialog::Execute
 VCL Reference

TSaveDialog::Execute

TSaveDialog

Displays the Save As dialog box.

function Execute: Boolean; override;

Description

Execute opens the Save As dialog, returning true when the user selects a file name and clicks Save. If the user cancels the save operation, Execute returns a false value.

if SaveDialog1.Execute then

  Memo1.Lines.SaveToFile(SaveDialog1.FileName);


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TOpenDialog

TSaveDialog


TSavePictureDialog
 VCL Reference

 TSavePictureDialog

Hierarchy	Properties	Methods	Events	See also

TSavePictureDialog displays a “Save As” dialog for saving graphics files.

Unit

ExtDlgs

Description

TSavePictureDialog displays a modal Windows dialog box for selecting file names and saving graphics files. This component is just like TSaveDialog, except that it includes a rectangular preview region. If the selected image can be read by TPicture, it is displayed in the preview region; supported file types include bitmap (.BMP), icon (.ICO), Windows metafile (.WMF), and enhanced Windows metafile (.EMF). If the selected image cannot be displayed, “(None)” appears in the preview region.


 VCL Reference

TSavePictureDialog properties

TSavePictureDialog	Alphabetically	Legend

Derived from TOpenDialog

DefaultExt

FileEditStyle

FileName

Files

Filter

FilterIndex

HistoryList

InitialDir

Options

OptionsEx

Title

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TSavePictureDialog properties

TSavePictureDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DefaultExt

DesignInfo

FileEditStyle

FileName

Files

Filter

FilterIndex

Handle

HelpContext

HistoryList

InitialDir

Name

Options

OptionsEx

Owner

Tag

Title

VCLComObject


 VCL Reference

TSavePictureDialog events

TSavePictureDialog	Alphabetically	Legend

Derived from TOpenDialog

OnCanClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnTypeChange

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TSavePictureDialog events

TSavePictureDialog	By object	Legend

OnCanClose

OnClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnShow

OnTypeChange


 VCL Reference

TSavePictureDialog methods

TSavePictureDialog	Alphabetically	Legend

In TSavePictureDialog

Execute

In TOpenPictureDialog

Create

Destroy

Execute

Derived from TOpenDialog

GetStaticRect

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSavePictureDialog methods

TSavePictureDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetStaticRect

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

MethodAddress

MethodName

NewInstance

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TSavePictureDialog.Execute
 VCL Reference

TSavePictureDialog.Execute

TSavePictureDialog

Displays the Save As dialog box.

function Execute: Boolean; override;

Description

Execute opens the Save As dialog, returning True when the user selects a file name and clicks Save.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TOpenDialog

TOpenPictureDialog

TSavePictureDialog


TScreen
 VCL Reference

TScreen

Hierarchy	Properties	Methods	Events	See also

TScreen represents the state of the screen in which an application runs.

Unit

Forms

Description

TScreen introduces properties that keep track of

What forms and data modules have been instantiated by the application.

The active form, and the active control within that form.

The size and resolution of the screen.

The cursors and fonts available for the application to use.

The monitors on which the application’s forms can appear, including their dimensions.

There is a global variable, Screen, of type TScreen, which is already instantiated for use by GUI applications. Use Screen to obtain information about the current state of the screen in an application.


 VCL Reference

TScreen properties

TScreen	Alphabetically	Legend

In TScreen

ActiveControl

ActiveCustomForm

ActiveForm

Cursor

Cursors

CustomFormCount

CustomForms

DataModuleCount

DataModules

DefaultIme

DefaultKbLayout

DesktopHeight

DesktopLeft

DesktopRect

DesktopTop

DesktopWidth

Fonts

FormCount

Forms

Height

HintFont

IconFont

Imes

MenuFont

MonitorCount

Monitors

PixelsPerInch

Width

WorkAreaHeight

WorkAreaLeft

WorkAreaRect

WorkAreaTop

WorkAreaWidth

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TScreen properties

TScreen	By object	Legend

ActiveControl

ActiveCustomForm

ActiveForm

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Cursor

Cursors

CustomFormCount

CustomForms

DataModuleCount

DataModules

DefaultIme

DefaultKbLayout

DesignInfo

DesktopHeight

DesktopLeft

DesktopRect

DesktopTop

DesktopWidth

Fonts

FormCount

Forms

Height

HintFont

IconFont

Imes

MenuFont

MonitorCount

Monitors

Name

Owner

PixelsPerInch

Tag

VCLComObject

Width

WorkAreaHeight

WorkAreaLeft

WorkAreaRect

WorkAreaTop

WorkAreaWidth


TScreen.ActiveControl
 VCL Reference

TScreen.ActiveControl

TScreen	See also

Indicates which control currently has input focus on the screen.

property ActiveControl: TWinControl;

Description

Read ActiveControl to learn which windowed control object in the active form currently receives the input from the keyboard.

ActiveControl is a read-only property. To change the ActiveControl, use the SetFocusedControl method of the form that contains the control that should receive focus.

After focus shifts from one control to another, the screen receives an OnActiveControlChange event.


TScreen.ActiveCustomForm
 VCL Reference

TScreen.ActiveCustomForm

TScreen	See also

Indicates the descendant of TCustomForm that currently has focus.

property ActiveCustomForm: TCustomForm;

Description

Read ActiveCustomForm to learn which form or property page has input focus. If the active custom form is a TForm object, ActiveCustomForm is the same as ActiveForm.


TScreen.ActiveForm
 VCL Reference

TScreen.ActiveForm

TScreen	See also 	Example

Indicates which form currently has focus.

property ActiveForm: TForm;

Description

Read ActiveForm to learn which form in the application has input focus. If the application is not currently active, ActiveForm is the form that will have focus when the application becomes active again.

ActiveForm is a read-only property. To change the ActiveForm, use the SetFocus method of the form that should receive focus. ActiveForm also changes if the SetFocusedControl method of an inactive form is called to set focus to a control on that inactive form.

After focus shifts from one form to another, the screen receives an OnActiveFormChange event.

Note:	If the application window with focus is not a TForm descendant (for example, if it is a property page), it will not appear as ActiveForm. To handle such cases, use the ActiveCustomForm property instead.


TScreen.Cursor
 VCL Reference

TScreen.Cursor

TScreen	See also 	Example

Controls the mouse cursor image on a global level.

property Cursor: TCursor;

Description

Set Cursor to override the cursor image associated with individual control objects. When Cursor is crDefault, the individual objects determine the cursor image. Assigning any other value sets the mouse cursor image for all windows belonging to the application. The global mouse cursor image remains in effect until the screen’s Cursor property is changed back to crDefault.

Cursor can be set to any of the cursor values available in the Cursors property. This can be one of the built-in cursor values, or a custom cursor that has been added to the Cursors property.

Note:	Changes to the value of the Cursor property may not show up immediately. Call Application.ProcessMessages to allow the application to respond to a notification that the value has changed.


TScreen.Cursors
 VCL Reference

TScreen.Cursors

TScreen	See also	Example

Lists the cursors available to the application.

property Cursors[Index: Integer]: HCursor;

Description

Use Cursor to access a particular cursor for use by the application or by a control within the application. TScreen includes several built-in cursors that are indexed by symbolic cursor constants. The image associated with the built-in cursors constants can be changed by setting the Cursors property.

Custom cursors can be added to the Cursors property for use by the application or any of its controls. To add a custom cursor to an application:

1	Create the cursor resource using a resource editor.

2	Declare a cursor constant with a value that does not conflict with an existing cursor constant.

3	Use the Windows API function LoadCursor to obtain a handle to the new cursor.

4	Set the Cursors property, indexed by the newly declared cursor constant, to the handle obtained from LoadCursor.

Note:	Don’t call the Windows API function DestroyCursor when finished with a custom cursor; Delphidoes this automatically.


TScreen.CustomFormCount
 VCL Reference

TScreen.CustomFormCount

TScreen	See also	Example

Indicates the number of forms or property pages displayed on the screen.

property CustomFormCount: Integer;

Description

Read CustomFormCount to learn the number of forms or property pages currently displayed on the screen. These forms can be accessed by the CustomForms property. CustomFormCount can be used with CustomForms to iterate over all the forms and property pages in an application.


TScreen.CustomForms
 VCL Reference

TScreen.CustomForms

TScreen	See also 	Example

Lists all the forms and property pages that are currently displayed in the application.

property CustomForms[Index: Integer]: TCustomForm;

Description

Use CustomForms to access a form or property page by index. The value of Index is a number between zero (the first custom form) and CustomFormCount - 1. CustomForms can be used with CustomFormCount when an application needs to iterate over all its forms and property pages.

Unlike the Forms property, CustomForms lists TCustomForm descendants that do not derive from TForm (such as property pages).

Warning:	The order in which CustomForms lists its forms is affected by the Z order of the forms. Do not change the Z order of forms when using CustomForms to iterate over the forms in an application.


TScreen.DataModuleCount
 VCL Reference

TScreen.DataModuleCount

TScreen	See also

Indicates the number of data modules that are currently instantiated in the application.

property DataModuleCount: Integer;

Description

Read DataModuleCount to learn the number of data modules in the DataModules property. DataModuleCount can be used with DataModules when an application needs to iterate over all its data modules.


TScreen.DataModules
 VCL Reference

TScreen.DataModules

TScreen	See also

Lists all the data modules that are currently instantiated in the application.

property DataModules[Index: Integer]: TDataModule;

Description

Use DataModules to access an instantiated data module by index. The value of Index is a number between zero (the first data module) and DataModuleCount - 1. DataModules can be used with DataModuleCount when an application needs to iterate over all its data modules.


TScreen.DefaultIme
 VCL Reference

TScreen.DefaultIme

TScreen	See also

Indicates which input method editor (IME) is active when the TScreen object is created.

property DefaultIme: string;

Description

In applications that support Asian language characters, read DefaultIme to determine the IME that is active when the application starts.

An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the Delphi application. There can be multiple IMEs installed on a single system. They vary in user interface, conversion dictionaries, and input method.

Individual controls can override the default IME. When a control specifies a different IME should be used to enter information into the control, the IME that processes keyboard input changes when the control has focus. When the control loses focus, DefaultIme is restored as the system IME.


TScreen.DefaultKbLayout
 VCL Reference

TScreen.DefaultKbLayout

TScreen	See also

Indicates the Windows handle to the keyboard layout that was active when the application started running.

property DefaultKbLayout: HKL;

Description

Use DefaultKbLayout for making Windows API calls that require a handle to a keyboard layout. For example, if an application changes the keyboard layout to match the settings for another country, the value of DefaultKbLayout can be used as a parameter to the Windows ActivateKeyboardLayout function in order to restore the original layout.

For asian keyboards, the keyboard layout identifies the input method editor (IME) as well as the default language. Use DefaultKbLayout in Windows API calls that work with the IME. DefaultKbLayout is the keyboard layout handle associated with the IME named by the DefaultIme property.


TScreen.DesktopHeight
 VCL Reference

TScreen.DesktopHeight

TScreen	See also

Specifies the height of the entire virtual desktop.

property DesktopHeight: Integer;

Description

Use DesktopHeight to determine the height of the entire desktop. The desktop is defined as the entire virtual desktop, which includes all monitors in the system.

On a single-monitor system, DesktopHeight corresponds to Height.


TScreen.DesktopLeft
 VCL Reference

TScreen.DesktopLeft

TScreen	See also

Specifies the x-coordinate of the desktop’s left edge relative to the upper-left corner of the primary monitor.

property DesktopLeft: Integer;

Description

Use DesktopLeft to determine the x-coordinate of the entire desktop’s left edge relative to the upper-left corner of the primary monitor. The primary monitor is the monitor with its Primary property set to True. The desktop is defined as the entire virtual desktop, which includes all monitors in the system.

On a single-monitor system, DesktopLeft is 0.


TScreen.DesktopRect
 VCL Reference

TScreen.DesktopRect

TScreen	See also

Specifies the boundaries of the virtual desktop relative to the upper-left corner of the primary monitor.

property DesktopRect: TRect;

Description

Use DesktopRect to determine the coordinates of the entire virtual desktop, which includes all monitors in the system. DesktopRect is expressed in coordinates where (0,0) is the upper-left corner of the primary monitor. The primary monitor is the monitor with its Primary property set to True.


TScreen.DesktopTop
 VCL Reference

TScreen.DesktopTop

TScreen	See also

Specifies the y-coordinate of the entire desktop’s top edge relative to the upper-left corner of the primary monitor.

property DesktopTop: Integer;

Description

Use DesktopTop to determine the y-coordinate of the desktop’s top edge relative to the upper-left corner of the primary monitor. The primary monitor is the monitor with its Primary property set to True. The desktop is defined as the entire virtual desktop, which includes all monitors in the system.

On a single-monitor system, DesktopTop is 0.


TScreen.DesktopWidth
 VCL Reference

TScreen.DesktopWidth

TScreen	See also

Specifies the width of the entire virtual desktop.

property DesktopWidth: Integer;

Description

Use DesktopWidth to determine the width of the desktop. The desktop is defined as the entire virtual desktop, which includes all monitors in the system.

On a single-monitor system, DesktopWidth corresponds to Width.


TScreen.Fonts
 VCL Reference

TScreen.Fonts

TScreen	See also 	Example

Lists the face names for all fonts supported by the screen.

property Fonts: TStrings;

Description

Read Fonts to learn what screen fonts are currently installed. Applications can use Fonts to ensure that they do not request a font that is not installed on the user’s system. When an application uses a TFont object to request a font that is not installed, the system substitutes another font, which may not be a font appropriate to the application’s needs.

Note:	Fonts is a list of screen fonts. It does not give any indication of the printer fonts available to the application.


TScreen.FormCount
 VCL Reference

TScreen.FormCount

TScreen	See also 	Example

Indicates the number of forms displayed on the screen.

property FormCount: Integer;

Description

Read FormCount to learn the number of forms currently displayed on the screen. These forms can be accessed by the Forms property. FormCount can be used with Forms to iterate over all the forms in an application.


TScreen.Forms
 VCL Reference

TScreen.Forms

TScreen	See also 	Example

Lists all the forms currently displayed in the application.

property Forms[Index: Integer]: TForm;

Description

Use Forms to access a form by index. The value of Index is a number between zero (the first form) and FormCount - 1. Forms can be used with FormCount when an application needs to iterate over all its forms, including all dialogs.

Forms only lists the TForm descendants in the application. This does not include, for example, property pages. To get a list that includes TCustomForm descendants that do not descend from TForm, use CustomForms instead.

Warning:	The order in which Forms lists its forms is affected by the Z order of the forms. Do not change the Z order of forms when using Forms to iterate over the forms in an application.


TScreen.Height
 VCL Reference

TScreen.Height

TScreen	See also 	Example

Indicates the vertical size of the screen in pixels.

property Height: Integer;

Description

Read Height to learn the size of the user’s screen in pixels. The size or position of objects placed on the screen, can then be set to ensure that the objects fit on screen and don’t look crowded.


TScreen.HintFont
 VCL Reference

TScreen.HintFont

TScreen	See also

Specifies the font used to display help hints.

property HintFont: TFont;

Description

HintFont stores the Windows 95 status font setting. This font is used by default for the help hints that appear when the user pauses the mouse over a control or menu item.


TScreen.IconFont
 VCL Reference

TScreen.IconFont

TScreen	See also

Specifies the font used to display the labels on the icons in file selection dialogs.

property IconFont: TFont;

Description

IconFont stores the Windows 95 icon font setting. This font is used to label the icons on the desktop, and icons in the file selection dialogs.


TScreen.Imes
 VCL Reference

TScreen.Imes

TScreen	See also

Lists all input method editors (IMEs) installed on the system.

property Imes: TStrings;

__property Classes::TStrings* Imes = {read=GetImes};

Description

Read Imes to obtain a list of all IMEs that are listed in the Windows registry. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the Delphi application. IMEs vary in user interface, conversion dictionaries, and input method.

Individual controls can require a specific IME to process the keyboard input when they have focus. To specify an IME, the control sets its ImeName property to one of the strings in Imes.

Each IME name in Imes has an associated keyboard layout handle. A keyboard layout handle is a Windows handle that identifies the primary language and IME used to process keyboard input. Use the keyboard layout handle in Windows API calls for programming the IME. To get the keyboard layout handle for a particular IME, a control can use code such as the following:

HKeyboard := Screen.Imes.Objects(Screen.Imes.IndexOf(ImeName));


TScreen.MenuFont
 VCL Reference

TScreen.MenuFont

TScreen	See also

Specifies the font used for menu commands.

property MenuFont: TFont;

Description

MenuFont stores the Windows 95 menu font setting. This font is used for menu items in main menus or popup menus that do not draw their own menu items in an OnDrawItem event handler.


TScreen.MonitorCount
 VCL Reference

TScreen.MonitorCount

TScreen	See also

Specifies the number of monitors used to comprise the desktop.

property MonitorCount: Integer;

Description

Use MonitorCount to determine the number of monitors used to comprise the desktop.


TScreen.Monitors
 VCL Reference

TScreen.Monitors

TScreen	See also

Provides access to an individual monitor used to comprise the desktop.

property Monitors[Index: Integer]: TMonitor;

Description

Use Monitors to access an individual monitor used to comprise the desktop.

The Monitor with its Primary property set to True is the primary monitor.


TScreen.PixelsPerInch
 VCL Reference

TScreen.PixelsPerInch

TScreen	See also

Indicates the number of screen pixels that make up a logical inch in the vertical direction.

property PixelsPerInch: Integer;

Description

Read PixelsPerInch to convert between measurements in pixels and measurements in logical inches. PixelsPerInch is only accurate for vertical measurements. Most screens have a different scaling factor for horizontal measurements. The value in PixelsPerInch is set from system when the application loads.


TScreen.Width
 VCL Reference

TScreen.Width

TScreen	See also 	Example

Indicates the horizontal size of the screen in pixels.

property Width: Integer;

Description

Read Width to learn the size of the user’s screen in pixels. The size or position of objects placed on the screen, can then be set to ensure that the objects fit on screen and don’t look crowded.


TScreen.WorkAreaHeight
 VCL Reference

TScreen.WorkAreaHeight

TScreen	See also

Specifies the height of the work area on the primary monitor.

property WorkAreaHeight: Integer;

Description

Use WorkAreaHeight to determine the height of the usable space on the primary monitor. WorkAreaHeight differs from the Height property in that it adjusts the work area to subtract any space occupied by the task bar and any tool bars that sit on the desktop.

The primary monitor is the monitor whose Primary property is True.


TScreen.WorkAreaLeft
 VCL Reference

TScreen.WorkAreaLeft

TScreen	See also

Specifies the left edge of the work area on the primary monitor.

property WorkAreaLeft: Integer;

Description

Use WorkAreaLeft to determine the left edge of the usable space on the primary monitor. This value indicates the number of pixels between the left edge of the primary monitor, and the space left after accounting for the task bar and any tool bars that sit on the desktop.

The primary monitor is the monitor whose Primary property is True.


TScreen.WorkAreaRect
 VCL Reference

TScreen.WorkAreaRect

TScreen	See also

Specifies the boundaries of the usable work area on the primary monitor.

property WorkAreaRect: TRect;

Description

Use WorkAreaRect to determine the coordinates of the usable space on the primary monitor. The usable work space is the surface of the primary monitor with the space occupied by the task bar and any tool bars subtracted off.

The primary monitor is the monitor with its Primary property set to True.


TScreen.WorkAreaTop
 VCL Reference

TScreen.WorkAreaTop

TScreen	See also

Specifies the top edge of the work area on the primary monitor.

property WorkAreaTop: Integer;

Description

Use WorkAreaTop to determine the top edge of the usable space on the primary monitor. This value indicates the number of pixels between the top edge of the primary monitor, and the space left after accounting for the task bar and any tool bars that sit on the desktop.

The primary monitor is the monitor whose Primary property is True.


TScreen.WorkAreaWidth
 VCL Reference

TScreen.WorkAreaWidth

TScreen	See also

Specifies the width of the work area on the primary monitor.

property WorkAreaWidth: Integer;

Description

Use WorkAreaWidth to determine the width of the usable space on the primary monitor. WorkAreaWidth differs from the Width property in that it adjusts the work area to subtract any space occupied by the task bar and any tool bars that sit on the desktop.

The primary monitor is the monitor whose Primary property is True.


 VCL Reference

TScreen events

TScreen	Alphabetically	Legend

In TScreen

OnActiveControlChange

OnActiveFormChange


 VCL Reference

TScreen events

TScreen	By object	Legend

OnActiveControlChange

OnActiveFormChange


TScreen.OnActiveControlChange
 VCL Reference

TScreen.OnActiveControlChange

TScreen	See also 	Example

Occurs immediately after input focus changes to a new windowed control.

property OnActiveControlChange: TNotifyEvent;

Description

Write an OnActiveControlChange event handler to take specific action when input focus changes to a new control. The change in focus may be within the active form, or across forms to a new form that then becomes the active form.

When focus moves from one control to another, the following events occur.

1	If the new focused control is in a different form, focus moves to the new form.

2	Focus moves to the new active control.

3	If the active form changed, an OnActiveFormChange event occurs.

4	An OnActiveControlChange event occurs.


TScreen.OnActiveFormChange
 VCL Reference

TScreen.OnActiveFormChange

TScreen	See also 	Example

Occurs immediately after a new form becomes active in a multi-form application.

property OnActiveFormChange: TNotifyEvent;

Description

Write an OnActiveFormChange event handler to take specific action when a new form becomes active. OnActiveFormChange occurs when the active form for the application changes, not when a form becomes active because the application becomes active.


 VCL Reference

TScreen methods

TScreen	Alphabetically	Legend

In TScreen

Create

Destroy

DisableAlign

EnableAlign

MonitorFromPoint

MonitorFromRect

MonitorFromWindow

Realign

ResetFonts

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TScreen methods

TScreen	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

EnableAlign

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

MonitorFromPoint

MonitorFromRect

MonitorFromWindow

NewInstance

Realign

ReferenceInterface

RemoveComponent

RemoveFreeNotification

ResetFonts

SafeCallException

SetSubComponent

UpdateAction


TScreen.Create
 VCL Reference

TScreen.Create

TScreen	See also

Creates an instance of TScreen.

constructor Create(AOwner: TComponent); override;

Description

Do not create separate instances of TScreen. There is a global variable, Screen, of type TScreen, which is already instantiated for use by GUI applications. The properties of Screen are global to the entire application.

AOwner specifies the Owner of the screen, which is responsible for freeing it. For the global TScreen object, this is the application.


TScreen.Destroy
 VCL Reference

TScreen.Destroy

TScreen	See also

Destroys an instance of TScreen.

destructor Destroy; override;

Description

Do not destroy the global object Screen that is automatically instantiated in GUI applications. Many VCL objects use screen.


TScreen.DisableAlign
 VCL Reference

TScreen.DisableAlign

TScreen	See also

Prevents forms from being aligned in the screen.

procedure DisableAlign;

Description

Call DisableAlign to prevent forms from being aligned in the screen. After calling DisableAlign, the Align properties of the screen’s forms are ignored until the call is matched by a call to EnableAlign.


TScreen.EnableAlign
 VCL Reference

TScreen.EnableAlign

TScreen	See also

Allows forms to be aligned in the screen.

procedure EnableAlign;

Description

Call EnableAlign to allow forms to be aligned in the screen. After calling DisableAlign, the Align properties of the screen’s forms are ignored until that call is matched by a call to EnableAlign.


TScreen.::Realign
 VCL Reference

TScreen.Realign

TScreen	See also

Realigns the screen’s forms according to their Align properties.

procedure Realign;

Description

Call Realign to realign the screen’s forms according to their Align properties.


TScreen.ResetFonts
 VCL Reference

TScreen.ResetFonts

TScreen	See also

Reinitializes the fonts listed in the Fonts property.

procedure Realign;

Description

Call ResetFonts to ensure that the fonts listed in the Fonts property are up to date. ResetFonts reinitializes the Fonts property so that its value is reread from the operating system the next time it is needed.

TScreen calls ResetFonts internally in response to messages from Windows that the available fonts have changed.


TScreen.MonitorFromPoint
 VCL Reference

TScreen.MonitorFromPoint

TScreen	See also

Returns the monitor where a specified point is located.

function MonitorFromPoint(const Point: TPoint; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;

Description

Call MonitorFromPoint determine the monitor where a specified point is located.

Point is the coordinates of the point to locate. It is in pixels relative to the upper-left corner of the primary monitor.

MonitorDefault indicates how to select a monitor when the point does not fall clearly on a single monitor.


TScreen.MonitorFromRect
 VCL Reference

TScreen.MonitorFromRect

TScreen	See also

Returns the monitor where a specified rectangle is located.

function MonitorFromRect(const Rect: TRect; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;

Description

Call MonitorFromRect determine the monitor where a specified boundary rectangle falls.

Rect is the coordinates of the rectangle to locate. It is in pixels relative to the upper-left corner of the primary monitor.

MonitorDefault indicates how to select a monitor when the rectangle does not fall entirely on a single monitor.


TScreen.MonitorFromWindow
 VCL Reference

TScreen.MonitorFromWindow

TScreen	See also

Returns the monitor where a specified window is located.

type  THandle = LongWord;

function MonitorFromWindow(const Handle: THandle; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;

Description

Call MonitorFromWindow determine the monitor that displays a specified window.

Handle is the window handle for the window to be located.

MonitorDefault indicates how to select a monitor when the window does not fall entirely on a single monitor.


Hierarchy

TObject

TPersistent

TComponent

TScreen


TSharedImage
 VCL Reference

TSharedImage

Hierarchy	Methods	See also

TSharedImage is the base class for classes that contain images used for graphics objects.

Unit

Graphics

Description

TSharedImage is used as a base class for classes that hold the internal representation of graphical images such as bitmaps and icons. TSharedImage is an abstract class. Its descendant classes are used internally by Delphi graphics objects, and are automatically created by their associated graphics objects.


 VCL Reference

TSharedImage methods

TSharedImage	Alphabetically	Legend

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSharedImage methods

TSharedImage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TSharedImage


TSizeConstraints
 VCL Reference

TSizeConstraints

Hierarchy	Properties	Methods	Events	See also

Contains size constraints for a control.

Unit

Controls

Description

TSizeConstraints is used in the Constraints property of TControl and its descendants. It specifies the minimum and maximum sizes of a control, preventing the control from being resized larger than the maximum or smaller than the minimum.


 VCL Reference

TSizeConstraints properties

TSizeConstraints	Alphabetically	Legend

In TSizeConstraints

Control

MaxHeight

MaxWidth

MinHeight

MinWidth


 VCL Reference

TSizeConstraints properties

TSizeConstraints	By object	Legend

Control

MaxHeight

MaxWidth

MinHeight

MinWidth


TSizeConstraints.Control
 VCL Reference

TSizeConstraints.Control

TSizeConstraints	See also

Specifies the control to which the size constraints apply.

property Control: TControl;

Description

Use Control to determine the control to which the size constraints apply.

Control is set automatically when a TSizeConstraints object is created for the Constraints property of a control.


TSizeConstraints.MaxHeight
 VCL Reference

TSizeConstraints.MaxHeight

TSizeConstraints

Specifies the maximum height for the control.

TConstraintSize = 0..MaxInt;

property MaxHeight: TConstraintSize;

Description

Use MaxHeight to get or set the maximum height for the control.


TSizeConstraints.MaxWidth
 VCL Reference

TSizeConstraints.MaxWidth

TSizeConstraints

Specifies the maximum width for the control.

TConstraintSize = 0..MaxInt;

property MaxWidth: TConstraintSize;

Description

Use MaxWidth to get or set the maximum width for the control.


TSizeConstraints.MinHeight
 VCL Reference

TSizeConstraints.MinHeight

TSizeConstraints

Specifies the minimum height for the control.

TConstraintSize = 0..MaxInt;

property MinHeight: TConstraintSize;;

Description

Use MinHeight to get or set the minimum height for the control.


TSizeConstraints.MinWidth
 VCL Reference

TSizeConstraints.MinWidth

TSizeConstraints

Specifies the minimum width for the control.

TConstraintSize = 0..MaxInt;

property MinWidth: TConstraintSize;;

Description

Use MinWidth to get or set the minimum width for the control.


 VCL Reference

TSizeConstraints events

TSizeConstraints	Alphabetically	Legend

In TSizeConstraints

OnChange


 VCL Reference

TSizeConstraints events

TSizeConstraints	By object	Legend

OnChange


TSizeConstraints.OnChange
 VCL Reference

TSizeConstraints.OnChange

TSizeConstraints

Occurs when the size constraints change.

property OnChange: TNotifyEvent;

Description

Use OnChange to perform actions when the size constraints change.


 VCL Reference

TSizeConstraints methods

TSizeConstraints	Alphabetically	Legend

In TSizeConstraints

AssignTo

Change

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TSizeConstraints methods

TSizeConstraints	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TSizeConstraints.AssignTo
 VCL Reference

TSizeConstraints.AssignTo

TSizeConstraints	See also

Handles assignments for TSizeConstraint objects.

procedure AssignTo(Dest: TPersistent); override;

Description

Call AssignTo to copy the values of one TSizeConstraints object to another.

AssignTo overrides the inherited method in order to handle assignments specific to TSizeConstraints objects.


TSizeConstraints.Change
 VCL Reference

TSizeConstraints.Change

TSizeConstraints

Called when the size constraints change.

procedure Change; virtual;

Description

Override Change in a derived class to perform actions when the size constraints change.

By default, Change calls the OnChange event handler.


TSizeConstraints.Create
 VCL Reference

TSizeConstraints.Create

TSizeConstraints	See also

Creates and initializes an instance of TSizeConstraints.

constructor Create(Control: TControl); virtual;

Description

Do not create instances of TSizeContraints. This object is created automatically by controls to implement their Constraints property.

Create sets the Control property to Control and then calls the inherited constructor.


Hierarchy

TObject

TPersistent

TSizeConstraints


Create, Active, CommonAVI example
 VCL Reference

Create, Active, CommonAVI example

To run this example, create a new project, place a button on the form, and insert the example code to the button click event. Place the button on the bottom of the form to leave room for the TAnimate component that will be created on the fly.

procedure TForm1.Button1Click(Sender: TObject);

var

  TempForm: TForm;

  I: Integer;

begin

  TempForm := TForm.Create(Self);

  with TAnimate.Create(TempForm) do

  try

    Parent := TempForm;

    CommonAVI := aviFindFile;

    Active := True;

    TempForm.Show;

    // Simulate a lengthy process.  Alter this value

    // to accommodate your machine speed.

    for I := 0 to 900000 do Application.ProcessMessages;

  finally

    TempForm.Release;

  end;

end;


Assign, Dormant, FreeImage, Monochrome, ReleaseHandle example
 VCL Reference

Assign, Dormant, FreeImage, Monochrome, ReleaseHandle, LoadFromFile example

procedure TForm1.Button1Click(Sender: TObject);

var

 BitMap1,BitMap2 : TBitMap;

 MyFormat : Word;

begin

   BitMap2 := TBitMap.Create;

   BitMap1 := TBitMap.Create;

try

   BitMap1.LoadFromFile('c:\Program Files\common Files\Borland Shared\Images\Splash\256color\factory.bmp');

   BitMap2.Assign(BitMap1);     // Copy BitMap1 into BitMap2

   BitMap2.Dormant;             // Free up GDI resources

   BitMap2.FreeImage;           // Free up Memory.

   Canvas.Draw(20,20,BitMap2);  // Note that previous calls don't lose the image

   BitMap2.Monochrome := true;

   Canvas.Draw(80,80,BitMap2);

   BitMap2.ReleaseHandle;       // This will actually lose the bitmap;

 finally

   BitMap1.Free;

   BitMap2.Free;

 end;

end;


LoadFromClipboard example
 VCL Reference

LoadFromClipboardFormat example

The following code draws a bitmap image from the Clipboard when a button is pressed.

procedure TForm1.Button1Click(Sender: TObject);

var

  Bitmap : TBitmap;

begin

 Bitmap := TBitMap.create;

 try

   Bitmap.LoadFromClipBoardFormat(cf_BitMap,ClipBoard.GetAsHandle(cf_Bitmap),0);

   Canvas.draw(0,0,Bitmap);

 finally

   Bitmap.free;

 end;

end;


LoadFromResourceName example
 VCL Reference

LoadFromResourceName example

procedure TForm1.Button1Click(Sender: TObject);

var

 BitMap1 : TBitMap;

begin

  BitMap1 := TBitMap.Create;

  try

    BitMap1.LoadFromResourceName(HInstance,'THEBITMAP');

    Canvas.Draw(12,12,BitMap1);

  finally

    BitMap1.Free;

  end;

end;


SaveToClipboardFormat, SetAsHandle example
 VCL Reference

SaveToClipboardFormat, SetAsHandle example

procedure TForm1.Button1Click(Sender: TObject);

var

  MyFormat : Word;

  Bitmap : TBitMap;

  AData,APalette : THandle;

begin

  Bitmap := TBitmap.Create;

  try

    Bitmap.LoadFromFile('c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');

    Bitmap.SaveToClipBoardFormat(MyFormat,AData,APalette);

    ClipBoard.SetAsHandle(MyFormat,AData);

  finally

    Bitmap.Free;

  end;

end;


ScanLine, Height example
 VCL Reference

ScanLine, Height example

procedure TForm1.Button1Click(Sender: TObject);

// This example shows drawing directly to the BitMap

var

  x,y : Integer;

  BitMap : TBitMap;

  P : PByteArray;

begin

  BitMap := TBitMap.create;

  try

    BitMap.LoadFromFile('C:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');

    for y := 0 to BitMap.Height -1 do

    begin

      P := BitMap.ScanLine[y];

      for x := 0 to BitMap.Width -1 do

        P[x] := y;

    end;

    Canvas.Draw(0,0,BitMap);

  finally

    BitMap.Free;

  end;

end;


Canvas,Transparent,TransparentMode,TransparentColor example
 VCL Reference

Canvas, Transparent, TransparentMode, TransparentColor example

procedure TForm1.Button1Click(Sender: TObject);

var

  Bitmap : TBitMap;

begin

  Bitmap := TBitmap.Create;

  try

    with Bitmap do begin

      LoadFromFile('C:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp');

      Transparent := True;

      TransParentColor := BitMap.canvas.pixels[50,50];

      Form1.Canvas.Draw(0,0,BitMap);

      TransparentMode := tmAuto;

      Form1.Canvas.Draw(50,50,BitMap);

    end;

  finally

    Bitmap.Free;

  end;

end;


Bands, Items, Text example
 VCL Reference

Bands, Items, Text example

To run this example, add the example code to a new project. The example code dynamically creates a TCoolbar and three TCoolBand objects populated with a windowed control in each TCoolBand.

procedure AddBand(CoolBar: TCoolBar; Const ControlClasses: array of TControlClass);

var

  CurrentControl: TControl;

  I: Integer;

begin

  for I := 0 to High(ControlClasses) do

    begin

      CurrentControl := ControlClasses[i].Create(CoolBar);

      if (CurrentControl is TWinControl) then

      begin

        { Placing the control onto the CoolBar causes the TCoolBar object to create a TCoolBand and place the control within the band. }

        CurrentControl.Parent := Coolbar;

        { Get the reference of the last TCoolBand created and assign text. }

        with CoolBar.Bands do

          Items[count - 1].Text := CurrentControl.ClassName;

      end;

    end;

end;

procedure TForm1.FormCreate(Sender: TObject);

var

  CoolBar: TCoolBar;

begin

  CoolBar := TCoolBar.Create(Self);

  CoolBar.Parent := Self;

  CoolBar.Align := alClient;

  AddBand(CoolBar, [TCheckBox, TEdit, TButton]);

end;


HeaderSection, OnDrawSection, Sections, Canvas, TextOut example
 VCL Reference

HeaderSection, OnDrawSection, Sections, Canvas, TextOut example

procedure TForm1.FormCreate(Sender: TObject);

var

  HeaderSection: THeaderSection;

  I: Integer;

begin

  for I := 0 to 4 do

  begin

    HeaderSection := HeaderControl1.Sections.Add;

    HeaderSection.Text := 'Text Section ' + IntToStr(I);

    HeaderSection.MinWidth := length(HeaderSection.Text) * Font.Size;

    // Owner draw every other section

    if (I mod 2 = 0) then

      HeaderSection.Style := hsOwnerDraw

    else

      HeaderSection.Style := hsText;

  end;

end;

procedure TForm1.HeaderControl1DrawSection(HeaderControl: THeaderControl;

  Section: THeaderSection; const Rect: TRect; Pressed: Boolean);

begin

  with HeaderControl.Canvas do

  begin

    // highlight pressed sections

    if Pressed then

      Font.Color := clRed

    else

      Font.Color := clBlue;

    TextOut(Rect.Left + Font.Size, Rect.Top + 2, 'Owner Drawn text');

  end;

end;


HotKey example
 VCL Reference

HotKey example

To use this example, create a form with a main menu component and a HotKey component.  At design time, use the Menu designer to add menu items, including a "File" menu with subitems that includes a "New" menu item.  Add the following code to the OnCreate method of the form and the OnClick event of the File menu item.

procedure TForm1.File1Click(Sender: TObject);

begin

  // Assign hotkey to the menu's File "New" item.

  New1.ShortCut := HotKey1.HotKey;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  // Default to "Ctrl + A"

  HotKey1.Modifiers := [hkCtrl];

  // Don't allow shift or alt

  HotKey1.InvalidKeys := [hcShift, hcAlt];

end;


Columns, Caption, Items, SubItems, Add example
 VCL Reference

Columns, Caption, Items, SubItems, Add example

This example requires only a blank form.  All other objects: TListView, TListColumns, TListItems, are created dynamically.  file.You must add comctrls to the uses clause of the unit file.

procedure TForm1.FormCreate(Sender: TObject);

const

  Names: array[0..5, 0..1] ofstring = (

    ('Rubble', 'Barney'),

    ('Michael', 'Johnson'),

    ('Bunny', 'Bugs'),

    ('Silver', 'HiHo'),

    ('Simpson', 'Bart'),

    ('Squirrel', 'Rocky')

    );

var

  I: Integer;

  NewColumn: TListColumn;

  ListItem: TListItem;

  ListView: TListView;

begin

  ListView := TListView.Create(Self);

  with ListView do

  begin

    Parent := Self;

    Align := alClient;

    ViewStyle := vsReport;

    NewColumn := Columns.Add;

    NewColumn.Caption := 'Last';

    NewColumn := Columns.Add;

    NewColumn.Caption := 'First';

    for I := Low(Names) to High(Names) do

    begin

      ListItem := Items.Add;

      ListItem.Caption := Names[I][0];

      ListItem.SubItems.Add(Names[I][1]);

    end;

  end;

end;


Column, Items, ViewStyle, SmallImages, LargeImages, ImageIndex, AddObject, Objects example
 VCL Reference

Column, Items, ViewStyle, SmallImages, LargeImages, ImageIndex, AddObject, Objects example

This example requires a TListView, a TImageList and a TComboBox. You will need to double click the image list and add several images to the image list prior to running the project. You can use *.bmp or *.ico files from the \Images\Icons directory.

During the form’s OnCreate event handler, items for the List View control are created for each image in the Image List and the ImageIndex is assigned the number of the image within the ImageList. Two columns are created so that when ViewStyle is vsReport, you will have columns to view.

Also within the form’s OnCreate event handler assign the ComboBox each of the four TViewStyle constants to the Items’ Objects property. You could also simply code this within a series of OnClick event handlers as, for instance, ListView1.ViewStyle := vsIcon.

procedure TForm1.FormCreate(Sender: TObject);

var

  I: Integer;

  ListItem: TListItem;

  NewColumn: TListColumn;

begin

  // Create a ListView item for each image in the ImageList

  with ListView1 do

  begin

    SmallImages := ImageList1;

    LargeImages := ImageList1;

    for I := 0 to ImageList1.Count - 1 do

    begin

      ListItem := Items.Add;

      Listitem.Caption := 'Image' + IntToStr(I);

      ListItem.ImageIndex := I;

    end;

    // Create two columns to show during viewing as vsReport

    NewColumn := Columns.Add;

    NewColumn.Caption := 'Column 1';

    NewColumn := Columns.Add;

    NewColumn.Caption := 'Column 2';

    // Add View styles and constants to the Combo Box

    ComboBox1.Items.AddObject('vsIcon', TObject(vsIcon));

    ComboBox1.Items.AddObject('vsList', TObject(vsList));

    ComboBox1.Items.AddObject('vsReport', TObject(vsReport));

    ComboBox1.Items.AddObject('vsSmallIcon', TObject(vsSmallIcon));

    // Display first item in the Combo Box

    ComboBox1.ItemIndex := 0;

  end;

end;

procedure TForm1.ComboBox1Click(Sender: TObject);

begin

  with ComboBox1 do

    ListView1.ViewStyle := TViewStyle(Items.Objects[ItemIndex]);

end;


Open, VisibleButtons, Shareable example
 VCL Reference

Open, VisibleButtons, Shareable example

begin

With MediaPlayer1 do begin

     Filename := 'c:\win95\roaring.wav'; //specify sound file

     ShowHint := True; //show buttons hints

     Shareable := True; //allow others to use the same .wav file

     VisibleButtons := [btPlay, btStop]; //limit to just two buttons

     Open; //play it

end;

end;


DeviceType, Display, Open, Play example
 VCL Reference

DeviceType, Display, Open, Play example

var sWinDir: String;

    iLength: Integer;

begin

// Initialize Variable

iLength := 255;

setLength(sWinDir, iLength);

iLength := GetWindowsDirectory(PChar(sWinDir), iLength);

setLength(sWinDir, iLength);

With MediaPlayer1 do begin

     Filename := sWinDir + '\Clock.avi'; //specify video file

     DeviceType := dtAVIVideo; //set Device compatibility to AVI

     Display := Panel1; //Set display device to a TPanel

     Open;

     Play;

end;

end;


ActivePage, PageCount, OnChange example
 VCL Reference

ActivePage, PageCount, OnChange example

This example requires a TPageControl already on the form. Also, you must add pages to the TPageControl by right clicking and selecting New Page.

The example code will allow the user to select the ActivePage property through selection of a ComboBox item.  During the form create, the Combo Box control is loaded with the names of each of the tabs, as well as the instance pointers to the corresponding tab.  When the user selects the Combo Box item, the associated TTabSheet object contained in the Combo Box Objects array is used to set the ActivePage property.

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to PageControl1.PageCount - 1 do

    ComboBox1.Items.AddObject(PageControl1.Pages[i].Name,

      PageControl1.Pages[i]);

  ComboBox1.ItemIndex := 0;

end;

procedure TForm1.ComboBox1Change(Sender: TObject);

begin

  if (Sender is TComboBox) then

    with (Sender as TComboBox) do

      PageControl1.ActivePage := TTabSheet(Items.Objects[ItemIndex]);

end;


PageControl, FindNextPage, OnChange example
 VCL Reference

PageControl, FindNextPage, OnChange example

This example requires a new TPageControl, as-is, with no new pages created at design time.

The form OnCreate event handler adds several new TabSheet controls to the Page Control.  The Page Control’s OnChange event handler displays a message dialog when the user changes tabs.  The message dialog contains the captions for the tabs immediately before and after the active tab.

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 9 do

    with TTabSheet.Create(Self) do

    begin

      PageControl := PageControl1;

      Caption := 'TabSheet #' + IntToStr(i);

    end;

end;

procedure TForm1.PageControl1Change(Sender: TObject);

var

  PrevCaption, NextCaption: ShortString;

begin

  with (Sender as TPageControl) do

  begin

    PrevCaption := FindNextPage(ActivePage, True, False).Caption;

    NextCaption := FindNextPage(ActivePage, False, False).Caption;

  end;

  ShowMessage('Previous tab caption: "' + PrevCaption +

    '"    Next tab Caption: "' + NextCaption + '"');

end;


MultiLine, Checked example
 VCL Reference

MultiLine, Checked example

This example requires a PageControl with no pages created, and a TCheckBox. During the form create, a series of tabs will be created on the Page Control that exceed the Page Control's width.  When the Check Box control is clicked, the setting of the MultiLine property is toggled, alternately stacking the tabs vertically, or along a single line horizontally.

procedure TForm1.CheckBox1Click(Sender: TObject);

begin

  PageControl1.MultiLine := CheckBox1.Checked;

end;

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  Checkbox1.Caption := 'Stack Tabs?';

  for i := 0 to 20 do

    with TTabSheet.Create(Self) do

    begin

      PageControl := PageControl1;

      Caption := 'Tab #' + IntToStr(i);

    end;

end;


OnChange, OnShow example
 VCL Reference

OnChange, OnShow example

This project requires a Page Control.  You will need to  populate the Page Control by right clicking and selecting New Page from the context menu. As the tabs are selected by the user, the Page Control OnChange event fires which causes the form caption to display the captions of each of the TTabSheets attached to the Page Control.

Note the use of the Form’s OnShow event handler to set the caption when the form first appears, before any changes trigger the OnChange event of the Page Control.

procedure TForm1.PageControl1Change(Sender: TObject);

begin

  Caption := ' Now working on tab:  ' + PageControl1.ActivePage.Caption;

end;

procedure TForm1.FormShow(Sender: TObject);

begin

  PageControl1Change(Sender);

end;


OnChanging example
 VCL Reference

OnChanging example

This project requires a TPageControl, several TTabSheets (to add sheets, right click the Page Control and select "New Page" from the context menu), and a TEdit control on the first tab sheet.

The user is not allowed to change to a new page if the active page is "TabSheet1" and there is no text in the Edit Control.

procedure TForm1.PageControl1Changing(Sender: TObject; var AllowChange: Boolean);

begin

  if ((Sender as TPageControl).ActivePage = TabSheet1) then

    AllowChange := (Edit1.Text <> '')

  else

    AllowChange := True;

end;


OnCreate,OnClick, SelectNextPage example
 VCL Reference

OnCreate, OnClick, SelectNextPage example

This example requires a new TPageControl, as-is, with no new pages created at design time, and a TUpDown control, also from the Win95 page of the component palette.

The form OnCreate event handler adds several new TabSheet controls to the Page Control.

The UpDown1Click event handler fires when the user clicks the up or down button on the TUpDown control.  The SelectNextPage method of the Page Control goes forward the comparison (Button = btNext) evaluates as true.  If Button is not btNext, the previous Tab Page is selected.

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 9 do

    with TTabSheet.Create(Self) do

    begin

      PageControl := PageControl1;

      Caption := 'TabSheet #' + IntToStr(i);

    end;

end;

procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);

begin

  PageControl1.SelectNextPage(Button = btNext);

end;


Pages, TabHeight, TabWidth, TextHeight, TextWidth example
 VCL Reference

Pages, TabHeight, TabWidth, TextHeight, TextWidth example

This project requires a TPageControl and several TTabPages. To add new pages, right click the TPageControl and select "New Page".

During the form creation the width and height of all tabs on the Page Control becomes double the largest previous value.  So if there are three tabs with captions that are 12, 23 and 19 characters long, the TabWidth would be the number of pixels required to fit 46 characters.

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  with PageControl1 do

  begin

    for i := 0 to PageCount - 1 do

    begin

      if (Canvas.TextWidth(Pages[i].Caption) * 2) > TabWidth then

        TabWidth := Canvas.TextWidth(Pages[i].Caption) * 2;

      if (Canvas.TextHeight(Pages[i].Caption) * 2) > TabHeight then

        TabHeight := Canvas.TextHeight(Pages[i].Caption) * 2;

    end;

  end;

end;


Create, Align example
 VCL Reference

Create, Align example

// dynamically create a TProgressBar control

// and align it to the bottom of the form.

procedure TForm1.Button1Click(Sender: TObject);

var

  ProgressBar: TProgressBar;

begin

  ProgressBar := TProgressBar.Create(Self);

  with ProgressBar do

  begin

    Parent := Self;

    Align := alBottom;

  end;

end;


Min, Max, Position, RecordCount, First, Next example
 VCL Reference

Min, Max, Position, RecordCount, First, Next example

// Read through all records in a table and updates

// the ProgressBar accordingly.

procedure TForm1.Button1Click(Sender: TObject);

var

  i: Integer;

begin

  with ProgressBar1 do

  begin

    Min := 0;

    Max := Table1.RecordCount;

    Table1.First;

    for i := Min to Max do

    begin

      Position := i;

      Table1.Next;

      // do something with the current record

    end;

  end;

end;


Step, StepIt example
 VCL Reference

Step, StepIt example

This example reads bytes from a file in tenths of the size of the file. The ProgressBar displays the status of each  1/10th step as it's read into the buffer.

The example assumes a TButton and a TProgressBar control already placed on the form.

procedure TForm1.Button1Click(Sender: TObject);

const

  FName = 'c:\autoexec.bat';

var

  F: File;

  MyData: array[1..2048] of byte;

  BytesRead: LongInt;

begin

  AssignFile(F, FName);

  try

    Reset(F);

    ProgressBar1.Max := FileSize(F);

    if (ProgressBar1.Max > 10) then

      // amount to move when StepIt method called

      ProgressBar1.Step := ProgressBar1.Max div 10

    else

      ProgressBar1.Step := ProgressBar1.Max;

    while (ProgressBar1.Position < ProgressBar1.Max) do

    begin

      // read one Step size chunk of data to buffer

      BlockRead(F, MyData, ProgressBar1.Step, BytesRead);

      // move the ProgressBar Position using StepIt

      ProgressBar1.StepIt; // move by Step amount

    end;

  finally;

    CloseFile(F);

  end;

end;


StepBy, CreateForm, Run, Show, Update, Initialize example
 VCL Reference

StepBy, CreateForm, Run, Show, Update, Initialize example

This example shows progress of loading forms as an application starts up. The code example is placed in the project source (*.dpr) file.  To see project source, select the View | Project Source menu item.

You will need to set up your project with the following steps before using the code example:

Add four additional forms to a default project.

Place a TProgressBar on Form5

Take the Project | Options | Forms menu option and place Form5 on the available forms list.

Change the code of your project (*.dpr) file to look like the example.

begin

  Application.Initialize;

  with TForm5.Create(nil) do

  try

    ProgressBar1.Max := 100;

    Show;   // show a splash screen contain ProgressBar control

    Update; // force display of Form5

    Application.CreateForm(TForm1, Form1);

    ProgressBar1.StepBy(25);

    Application.CreateForm(TForm2, Form2);

    ProgressBar1.StepBy(25);

    Application.CreateForm(TForm3, Form3);

    ProgressBar1.StepBy(25);

    Application.CreateForm(TForm4, Form4);

    ProgressBar1.StepBy(25);

  finally

    Free;

  end;

  Application.Run;

end.


Alignment example
 VCL Reference

Alignment example

To use this example, place a Toolbar and a RichEdit on the form. Right click the toolbar and select New Button three times.  Place the ToolButton1Click handling code in the on click event of the first TToolButton, then attach the same OnClick handler for each button.

procedure TForm1.ToolButton1Click(Sender: TObject);

begin

  if (Sender = ToolButton1) then

    RichEdit1.Paragraph.Alignment := taLeftJustify

  elseif (Sender = Toolbutton2) then

    RichEdit1.Paragraph.Alignment := taCenter

  elseif (Sender = Toolbutton3) then

    RichEdit1.Paragraph.Alignment := taRightJustify;

end;


SimplePanel, SimpleText, Add example
 VCL Reference

SimplePanel, SimpleText, Add example

This example requires no additional controls.  All controls are created dynamically within the form's OnCreate event handler.

Note: Be sure to add ComCtrls  to your uses clause to support TRichEdit.

uses ComCtrls;

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  with TStatusBar.Create(Self) do

  begin

    // Display the StatusBar control on the surface

    // of the form.

    Parent := Self;

    // Allow a single line of text -- no panels.

    SimplePanel := True;

    // Provide sample text.

    // Create a new instance of TRichEdit, set it's

    // properties, and display on the form.

    with TRichEdit.Create(Self) do

    begin

      // Display the RichEdit control on the surface

      // of the form.

      Parent := Self;

      // The RichText control takes all space left

      // over from the StatusBar.

      Align := alClient;

      // Add 50 lines to the RichText

      for i := 1 to 50 do

        Lines.Add('Adding line ' + IntToStr(i));

      SelStart := 0; // set text cursor to first character

      SimpleText := 'Number of Lines loaded to RichText: ' +

        IntToStr(Lines.Count);

    end;

  end;

end;


DefAttributes, SelAttributes, Color, Height, Style example
 VCL Reference

DefAttributes, SelAttributes, Color, Height, Style example

This example requires a TRichEdit and a TButton. Leave the default text, usually "RichEdit1", in the lines property. The DefAttributes will apply to this text.

procedure TForm1.Button1Click(Sender: TObject);

begin

  with RichEdit1.SelAttributes do

  begin

    Color := clRed;

    Height := Height + 5;

  end;

  RichEdit1.Lines.Add('This line of text will be red.');

end;

procedure TForm1.Button2Click(Sender: TObject);

begin

  RichEdit1.DefAttributes.Color := clBlue;

  RichEdit1.DefAttributes.Style := [fsBold, fsItalic];

end;


Position, Execute, FindText, OnFind, SelStart, SelLength example
 VCL Reference

Position, Execute, FindText, OnFind, SelStart, SelLength example

This example requires a TRichEdit, a TButton, and a TFindDialog.

Clicking the button click will display a Find Dialog to the right of the edit control.  Filling in the "Find what" text and pressing the Find Next button will select the first matching string in the Rich Edit control that follows the previous selection.

procedure TForm1.Button1Click(Sender: TObject);

begin

  FindDialog1.Position := Point(RichEdit1.Left + RichEdit1.Width, RichEdit1.Top);

  FindDialog1.Execute;

end;

procedure TForm1.FindDialog1Find(Sender: TObject);

var

  FoundAt: LongInt;

  StartPos, ToEnd: Integer;

begin

  with RichEdit1 do

  begin

    { begin the search after the current selection if there is one }

    { otherwise, begin at the start of the text }

    if SelLength <> 0 then

      StartPos := SelStart + SelLength

    else

      StartPos := 0;

    { ToEnd is the length from StartPos to the end of the text in the rich edit control }

    ToEnd := Length(Text) - StartPos;

    FoundAt := FindText(FindDialog1.FindText, StartPos, ToEnd, [stMatchCase]);

    if FoundAt <> -1 then

    begin

      SetFocus;

      SelStart := FoundAt;

      SelLength := Length(FindDialog1.FindText);

    end;

  end;

end;


Font, Name, Fonts example
 VCL Reference

Font, Name, Fonts example

To use this example, place a TComboBox and TRichEdit on a form.

During form creation, a list of font names is loaded into the combo box. When the combo box is clicked, the Rich Edit control font is set to the corresponding font name in the combo box.

procedure TForm1.FormCreate(Sender: TObject);

begin

  ComboBox1.Items := Screen.Fonts;

end;

procedure TForm1.ComboBox1Click(Sender: TObject);

begin

  RichEdit1.Font.Name := ComboBox1.Text;

end;


HideSelection example
 VCL Reference

HideSelection, Height example

This example needs only a blank form.  Three Rich Edit controls are placed vertically on the form, each contain a line of text, and the second form has HideSelection set to false.

Try tabbing between the three Rich Edit controls and observe the effect on the selected text.

uses ComCtrls;

procedure TForm1.FormCreate(Sender: TObject);

var

  I: Integer;

begin

  for I := 0 to 2 do

    with TRichEdit.Create(Self) do

    begin

      Parent := Self;

      Top := Height * I;

      Text := 'This text will take the focus.';

      SelStart := 0;

      SelLength := Length(Text);

      if (I = 1) then

        HideSelection := False;

    end;

end;


OnSelectionChange example
 VCL Reference

OnSelectionChange example

This example requires a TStatusBar and a TRichEdit.  The code within the form's OnCreate will take care of sizing the Rich Edit and setting the OnSelectionChange event to be handled by RichEdit1SelectionChange (or you can paste the code directly into the OnSelectionChange event handler.)

As you type in the Rich Edit control, the current character location the selection begin and end will display in the status bar control.

procedure TForm1.RichEdit1SelectionChange(Sender: TObject);

begin

  with RichEdit1 do

    StatusBar1.SimpleText := '  Selection Start: ' + IntToStr(SelStart) +

      '  Selection End: ' + IntToStr(SelStart + SelLength);

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  with RichEdit1 do

  begin

    Align := alClient;

    OnSelectionChange := RichEdit1SelectionChange;

  end;

  StatusBar1.SimplePanel := True;

end;


Lines, Paragraph, FirstIndent, Numbering example
 VCL Reference

Lines, Paragraph, FirstIndent, Numbering example

This example requires only a form.

A Rich Edit control is created on the form and aligned to take the entire client area of the form.  A series of lines are written to the Rich Edit control's Lines property, and the Paragraph property manipulated such that the first items displayed are bulleted, a second group of lines are unbulleted and centered, and the last group is left justified and indented.

uses ComCtrls;

procedure TForm1.FormCreate(Sender: TObject);

begin

  with TRichEdit.Create(Self) do

  begin

    Parent := Self;

    Align := alClient;

    Lines.Clear;

    // set numbering style

    Paragraph.Numbering := nsBullet;

    Lines.Add('Introduction');

    Lines.Add('New members to our team');

    Lines.Add('New Budget discussion');

    Lines.Add('Facilities');

    Lines.Add('Q & A');

    Paragraph.Numbering := nsNone;

    Paragraph.Alignment := taCenter;

    Lines.Add('');

    Lines.Add('Suggested Topics:');

    Lines.Add('');

    Paragraph.Alignment := taLeftJustify;

    Paragraph.FirstIndent := 10;

    Lines.Add('');

    Lines.Add('Parking lot repair');

    Lines.Add('Cost overruns');

  end;

end;


PlainText, LoadFromFile example
 VCL Reference

PlainText, LoadFromFile example

This example requires two TRichEdit controls placed on the form.

When the form becomes visible, the first Rich Edit control will display the rich text in its raw form, including formatting characters. The second will show the rich text in its intended format.

procedure TForm1.FormCreate(Sender: TObject);

const

  // you may need to change this path to suit your environment

  Path = '..\Demos\RichEdit\OverView.RTF';

begin

  RichEdit1.PlainText := True;

  RichEdit1.Lines.LoadFromFile(Path);

  RichEdit2.PlainText := False;

  RichEdit2.Lines.LoadFromFile(Path);

end;


Print example
 VCL Reference

Print example

procedure TForm1.FormCreate(Sender: TObject);

const

  // The path may need to be changed to accommodate locations of files

  // on your system.

  Path = '..\DEMOS\RICHEDIT\OVERVIEW.RTF';

begin

   RichEdit1.Lines.LoadFromFile(Path);

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  // The parameter string shows in the print queue under "Document   // name".

  RichEdit1.Print('My Document Name');

end;


HideScrollBars, ScrollBars example
 VCL Reference

HideScrollBars, ScrollBars example

This example requires: TRichEdit, TRadioGroup, TCheckBox, TButton. Clicking the Radio Group control sets the ScrollBar style of the RichEdit. Toggling the Check Box turns HideScrollBars on and off.  Clicking the button loads the Rich Edit with a large amount of contiguous text.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  RichEdit1.Lines.Clear;

  for I := 0 to 500 do

    RichEdit1.Text := RichEdit1.Text + 'test line ' + IntToStr(I);

  RichEdit1.SelStart := 0; // move text cursor to top of edit

end;

procedure TForm1.CheckBox1Click(Sender: TObject);

begin

  RichEdit1.HideScrollbars := CheckBox1.Checked;

end;

procedure TForm1.RadioGroup1Click(Sender: TObject);

const

  ScrollBarA: array[0..3] of TScrollStyle = (

    ssBoth,

    ssHorizontal,

    ssNone,

    ssVertical);

begin

  RichEdit1.ScrollBars := ScrollBarA[RadioGroup1.ItemIndex];

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  with RadioGroup1, Items do

  begin

    Caption := 'Scroll Bars';

    Clear;

    Add('ssBoth');

    Add('ssHorizontal');

    Add('ssNone');

    Add('ssVertical');

  end;

  with CheckBox1 do

  begin

    Caption := 'HideScrollBars';

    Checked := True;

  end;

  Button1.Caption := 'Loaded';

end;


TStrings::Assign, TStrings::Add example
 VCL Reference

Assign, Add example

var

  StringList: TStrings;

begin

  StringList := TStringList.Create;

  try

    with StringList do begin

      Add('This example uses A string List.');

      Add('It is the easiest way to add strings');

      Add('to a combobox''s list of strings.');

      Add('Always remember TStrings.Create method');

      Add('is abstract; So use TStringList.Create');

      Add('method instead.');

    end;

    with ComboBox1 do begin

      Width := 210;

      Items.Assign(StringList);

      ItemIndex := 0;

    end;

  finally

    StringList.free;

  end;

end;


Caption example
 VCL Reference

Caption example

This example requires a TPageControl, a TEdit and a TButton. When the button is clicked, the caption of the active tab changes to that of the TEdit.

These lines of code could also be written :

PageControl1.ActivePage.Caption := Edit1.Text;

This would obviate the need for a TTabSheet variable since PageControl1.ActivePage is already of type TTabSheet.

procedure TForm1.Button1Click(Sender: TObject);

var

  TSheet: TTabSheet;

begin

  TSheet := PageControl1.ActivePage;

  TSheet.Caption := Edit1.Text;

end;


PageIndex, TabIndex, TabVisible example
 VCL Reference

PageIndex, TabIndex, TabVisible example

This example creates ten Tab Sheets and sets the captions to display PageIndex and TabIndex for each tab.  Odd numbered tabs have their TabVisible property set off to demonstrate the effect on PageIndex vs TabIndex.  On the series of visible tabs, PageIndex will read 0, 2, 4, 6, 8, and TabIndex will read 0, 1, 2, 3, 4.  PageIndex counts only visible tabs.

{ Note: Pages[i] is of type TTabSheet. }

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  with PageControl1 do

    for i := 0 to 9 do

      with TTabSheet.Create(Self) do

      begin

        PageControl := PageControl1;

        Pages[i].TabVisible := (i mod 2 = 0);

        Caption := 'PageIndex: ' +

        IntToStr(Pages[i].PageIndex) + '  TabIndex: ' +

          IntToStr(Pages[i].TabIndex);

      end;

end;


Visible, OnClick example
 VCL Reference

Visible, OnClick example

This examples requires a TPageControl and a TCheckBox.  The form OnCreate event handler populates each sheet with an edit control placed somewhere on the client area of the sheet.

Clicking the checkbox will cause the client area (not the tab area) of the Tab Control to become invisible when the Check Box is unchecked.

procedure TForm1.PageControl1Change(Sender: TObject);

begin

  CheckBox1.Checked := PageControl1.ActivePage.Visible;

end;

procedure TForm1.CheckBox1Click(Sender: TObject);

begin

  PageControl1.ActivePage.Visible := CheckBox1.Checked;

end;

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

begin

  for i := 0 to 9 do

    with TTabSheet.Create(Self) do

    begin

      PageControl := PageControl1;

      Caption := 'TabSheet' + IntToStr(i);

      with TEdit.Create(Self) do

      begin

        Parent := PageControl1.Pages[i];

        Left := Random(PageControl1.ActivePage.ClientWidth - Width);

        Top := Random(PageControl1.ActivePage.ClientHeight - Height);

      end;

    end;

    PageControl1Change(Sender);

end;


TToolButton, TToolBar, StringList example
 VCL Reference

TToolButton, TToolBar, StringList example

To use this example, create a new application and add the example code to the unit.

procedure AddButtons(ToolBar: TToolBar;

  Const ButtonCaptions: array of String);

var

  I: Integer;

begin

  for I := 0 to High(ButtonCaptions) do

    begin

      with TToolButton.Create(ToolBar) do

      begin

        Parent := ToolBar;

        Caption := ButtonCaptions[I];

        if (ButtonCaptions[I] = '|') then

          Style := tbsSeparator

        else

          Style := tbsButton;

      end;

    end;

end;

procedure TForm1.FormCreate(Sender: TObject);

var

  ToolBar: TToolBar;

begin

  ToolBar := TToolBar.Create(Self);

  ToolBar.Parent := Self;

  AddButtons(ToolBar, ['New', 'Save', '|', 'Cut', 'Copy', 'Paste']);

  ToolBar.ShowCaptions := True;

  ToolBar.Height := 40;

end;


OnClose Example
 VCL Reference

OnClose example

This example displays a message dialog box when the user attempts to close the form. If the user clicks the Yes button, the form closes; otherwise, the form only minimizes.

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);

begin

  if MessageDlg('Close application ?', mtConfirmation,

    [mbYes, mbNo], 0) = mrYes then

    Action := caFree

  else

    Action := caNone;

end;


OnCloseQuery Example
 VCL Reference

OnCloseQuery example

When the user attempts to close the form in this example, a message dialog appears that asks the user if it is OK to close the form. If the user chooses the OK button, the form closes. If the user chooses Cancel, the form doesn't close.

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);

begin

  if MessageDlg('Close the form?', mtConfirmation,

    [mbOk, mbCancel], 0) = mrCancel then

     CanClose := False;

end;


OnPaint Example
 VCL Reference

TForm::OnPaint example

The following code loads a background bitmap onto the Canvas of the main form in the OnPaint event handler.  In Unit 1, add a private member to TForm1 of type TBitmap named TheGraphic.

unit Unit1;

interface

uses

  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs;

type

  TForm1 = class(TForm)

    procedure FormPaint(Sender: TObject);

    procedure FormCreate(Sender: TObject);

  private

    TheGraphic: TBitmap; { Add this declaration for the graphic}

  public

    { Public declarations }

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormPaint(Sender: TObject); { OnPaint event handler}

begin

  Form1.Canvas.Draw(0, 0, TheGraphic); { Draw the graphic on the Canvas }

end;

procedure TForm1.FormCreate(Sender: TObject); { OnCreate event handler }

begin

  TheGraphic := TBitmap.Create; { Create the bitmap object }

  TheGraphic.LoadFromFile('C:\APP\BKGRND.BMP'); { Load the bitmap from a file}

end;

end.


TopIndex Example
 VCL Reference

TopIndex example

The following example uses a list box containing a list of strings, a button, and an edit box on a form. When the user runs the application and clicks the button, the third item in the list becomes the first item, and the index value of that item appears in the edit box. The index value displayed is 2, indicating the third item in the list (the first item in the list has an index value of 0):

procedure TForm1.FormCreate(Sender: TObject);

var

  Number: Integer;

begin

  for Number := 1 to 20 do

    ListBox1.Items.Add('Item ' + IntToStr(Number));

end;

procedure TForm1.Button1Click(Sender: TObject);

begin

  ListBox1.TopIndex := 2;

  Edit1.Text := IntToStr(ListBox1.TopIndex);

end;


OnMeasureItem Example
 VCL Reference

OnMeasureItem example

Here is a typical handler for an OnMeasureItem event. The example assumes that a variable owner-draw list box already has bitmaps associated with each of its strings. It sets the height of the item to the height of the associated bitmap if that height is greater than the default height.

procedure TForm1.ListBox1MeasureItem(Control: TWinControl; Index: Integer; var Height: Integer);

var

  Bitmap: TBitmap;

begin

  with Control as TListBox do

  begin

    Bitmap := TBitmap(Items.Objects[Index]);

    if Bitmap <> nilthen

    if Bitmap.Height > Height then Height := Bitmap.Height;

  end;

end;


CustomSort Example
 VCL Reference

CustomSort example

This example shows how to use the CustomSort method to order a tree view in case-insensitive alphabetical order (either forward or backward). The application must provide a callback function such as CompareFunc below, which calls the global AnsiStrIComp function to perform the actual comparison.

function CustomSortProc(Node1, Node2: TTreeNode; Data: Integer): Integer; stdcall;

begin

  Result := -AnsiStrIComp(PChar(Node1.Text), PChar(Node2.Text));

end;

This procedure can then be used as a parameter to CustomSort to sort the nodes of the tree view:

TreeView1.CustomSort(@CustomSortProc, 0);


GetHitTestInfoAt Example
 VCL Reference

GetHitTestInfoAt example

The following code checks a list of htHitTest types and adds the ones that occur when the mouse was pressed while on the tree view.

procedure TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

  MyHitTest : THitTests;

begin

  MyHitTest := TreeView1.GetHitTestInfoAt(X,Y);

  if htNowhere in MyHitTest then

    ListBox1.Items.Add('NoWhere');

  if htOnItem in MyHitTest then

    ListBox1.Items.Add('OnItem');

  if htOnButton in MyHitTest then

    ListBox1.Items.Add('OnButton');

  if htOnIndent in MyHitTest then

    ListBox1.Items.Add('OnIndent');

  if htOnLabel in MyHitTest then

    ListBox1.Items.Add('OnLabel');

  if htOnRight in MyHitTest then

    ListBox1.Items.Add('OnRight');

end;


GetNodeAt, MoveTo, Selected Example
 VCL Reference

GetNodeAt, MoveTo, Selected example

The following code uses GetNodeAt to add a dragged node as a child of the node under then mouse when it is dropped.

procedure TForm1.TreeView1DragDrop(Sender, Source: TObject; X, Y: Integer);

var

  AnItem: TTreeNode;

  AttachMode: TNodeAttachMode;

  HT: THitTests;

begin

  if TreeView1.Selected = nilthen Exit;

  HT := TreeView1.GetHitTestInfoAt(X, Y);

  AnItem := TreeView1.GetNodeAt(X, Y);

  if (HT - [htOnItem, htOnIcon, htNowhere, htOnIndent] <> HT) then

  begin

    if (htOnItem in HT) or (htOnIcon in HT) then AttachMode := naAddChild

    else if htNowhere in HT then AttachMode := naAdd

    else if htOnIndent in HT then AttachMode := naInsert;

    TreeView1.Selected.MoveTo(AnItem, AttachMode);

  end;

end;


Command Example
 VCL Reference

Command example

The following procedure is a WM_COMMAND message handler. It checks the ItemID field of Msg to see if the message was generated by a menu item called MenuThink. If so, it displays a message dialog. When writing message handlers, remember to call the ancestor’s method afterward, if necessary, so Windows can perform default message processing.

procedure TForm1.WMCommand(var Msg: TWMCommand);

begin

  if Msg.ItemID = MenuThink.Command then

    MessageDlg('This is the Think command', mtInformation, [mbOk], 0);

  Inherited;

end;


Insert Example
 VCL Reference

Insert example

This code inserts a menu item after the first item in a menu named FileMenu:

procedure TForm1.Button1Click(Sender: TObject);

var

  NewItem: TMenuItem;

begin

  NewItem := TMenuItem.Create(FileMenu);

  try

    NewItem.Caption := 'Do this';

    FileMenu.Insert(1, NewItem);

  except

    NewItem.Free;

    raise; { reraise the exception }

  end;

end;


CustomForms Example
 VCL Reference

CustomForms example

The following code adds the name of all forms, dialogs, and property pages on the screen to ListBox1 when Button1 is clicked.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  for I := 0 to Screen.CustomFormCount-1 do

    ListBox1.Items.Add(Screen.CustomForms[I].Name);

end;


Height, Width Example
 VCL Reference

Height, Width example

The following code determines the height of all forms on the screen and resizes any that are taller than the screen height.

with Screen do

  for I := 0 to FormCount-1 do

    begin

    if Forms[I].Height > Height then

      Forms[I].Height := Height;

    if Forms[I].Width > Width then

      Forms[I].Width := Width;

    end;


Item Example
 VCL Reference

Item example

The following code uses Item to add the labels of all child nodes of the selected node to a list box when a button is clicked.

procedure TForm1.Button1Click(Sender: TObject);

var

  I : Integer;

begin

  for I := 0 to (TreeView1.Selected.Count - 1) do

    ListBox1.Items.Add(TreeView1.Selected.Item[I].Text);

end;


CustomSort Example
 VCL Reference

CustomSort example

This example shows how to use the CustomSort method to order a subtree in case-insensitive alphabetical order (either forward or backward). The callback function CompareFunc below calls the global AnsiStrIComp function to perform the actual comparison.

function CustomSortProc(Node1, Node2: TTreeNode; Data: Longint): Integer; stdcall;

begin

  if Data = 0 then

    Result := AnsiStrIComp(Pchar(Node1.Text), PChar(Node2.Text));

  else

    Result := -AnsiStrIComp(PChar(Node1.Text), PChar(Node2.Text));

end;

This procedure can then be used as a parameter to CustomSort to sort the children of a node:

TreeNode1.CustomSort(@CustomSortProc, 0);  { Sorts in ascending order }

TreeNode1.CustomSort(@CustomSortProc, 1);  { Sorts in descending order }


Hint, OnHint, GetLongHint Example
 VCL Reference

Hint, OnHint, GetLongHint example

{ This shows how the OnHint event handler is declared as a public method of the form }

type

  TForm1 = class(TForm)

    Button1: TButton;

    StatusBar1: TStatusBar;

    Edit1: TEdit;

    procedure FormCreate(Sender: TObject);

  private

    { Private declarations }

  public

    procedure DisplayHint(Sender: TObject);

  end;

var

  Form1: TForm1;

implementation

{$R *.DFM}

{ Here is the implementation of the OnHint event handler }

{ It displays the application’s current hint in the status bar }

procedure TForm1.DisplayHint(Sender: TObject);

begin

  StatusBar1.SimpleText := GetLongHint(Application.Hint);

end;

{ Here is the form’s OnCreate event handler. }

{ It assign’s the application’s OnHint event handler at runtime }

{ because the Application is not available in the Object Inspector }

{ at design time }

procedure TForm1.FormCreate(Sender: TObject);

begin

  Application.OnHint := DisplayHint;

end;

Note:	It is not actually necessary to write an OnHint event handler to display hints on the status bar. This can be accomplished more simply by setting the status bar’s AutoHint property.


Cursors, Cursor Example
 VCL Reference

Cursors, Cursor example

This example shows how to add custom cursors to an application.  It assumes that a custom cursor with the name NewCursor has been added to the resources (.RES file) of the application. You can add the cursor using the image editor. (Tools | Image Editor)

The following code makes this cursor available to the application via the constant crMyCursor, and sets it as the global cursor to the application.

const

  crMyCursor = 5;

procedure TForm1.FormCreate(Sender: TObject);

begin

  Screen.Cursors[crMyCursor] := LoadCursor(HInstance, 'NewCursor');

  Cursor := crMyCursor;

end;


Cursor Example
 VCL Reference

Cursor example

Assignments to the Screen object's cursor property are typically guarded by a try...finally statement to ensure that normal cursor behavior is restored. Note that the original cursor is saved and restored.  This allows cursor changes to be nested without accidentally restoring the cursor to a hard-coded value prematurely.

var

  Save_Cursor:TCursor;

Begin

  Save_Cursor := Screen.Cursor;

  Screen.Cursor := crHourGlass;    { Show hourglass cursor }

  try

    { Do some lengthy operation }

  finally

    Screen.Cursor := Save_Cursor;  { Always restore to normal }

  end;

end;


OpenKey, ReadString Example
 VCL Reference

OpenKey, ReadString Example

The following example retrieves a value from a registry entry.

uses Registry;

function GetRegistryValue: string;

var

  Registry: TRegistry;

  S: string;

begin

  Registry:=TRegistry.Create;

  Registry.RootKey:=HKEY_LOCAL_MACHINE;

  {False because we do not want to create it if it doesn’t exist}

  Registry.OpenKey('MYKEY',False);

  Result :=Registry.ReadString('VALUE1');

  Registry.Free;

end;


OnMoved Example
 VCL Reference

OnMoved example

This example uses a splitter and two image controls to create a “slide show” effect. The example displays an image (the current “slide”), which can be hidden behind a screen that looks like a venetian blind. When the blind is pulled down to completely cover the current slide, the slide changes to a different image.  When the blind is raised, the new image appears.

To prepare this example, follow these steps:

1. Place an image control on the form.

Set the picture property to a bitmap of a venetian blind,

Set the Stretch property to True.

Set the Align property to alTop.

2. Add a splitter control to the form.

Set the Align property to alTop.

Set the Cursor property to crVSplit.

Set the OnMoved event handler to the code that appears below.

Set the MinSize property to 1.

3. Add a second image control to the form.

Set the Align property to alClient.

Set the Stretch property to True.

4. Select the form and add the OnCreate and OnDestroy event handlers that appear below.

5. Add the global variables below to the unit.

var

  CurImage: Integer;

  BMPs: Array[1..5] of TBitmap;

procedure TForm1.Splitter1Moved(Sender: TObject);

begin

  { check if the blind is closed }

  if Image2.Height <= 1 then

  begin

    { the blind is closed, change the current slide }

    CurImage := CurImage + 1;

    if CurImage = 6 then

       CurImage := 1;

    Image2.Picture.Bitmap := BMPs[CurImage];

  end;

end;

procedure TForm1.FormCreate(Sender: TObject);

begin

  { Initialize the array of slides.

    These must be freed in the OnDestroy event handler. }

  BMPs[1] := TBitmap.Create;

  BMPs[1].LoadFromFile('c:\windows\Fiddle Head.bmp');

  BMPs[2] := TBitmap.Create;

  BMPs[2].LoadFromFile('c:\windows\Rhododendron.bmp');

  BMPs[3] := TBitmap.Create;

  BMPs[3].LoadFromFile('c:\windows\Furry dog.bmp');

  BMPs[4] := TBitmap.Create;

  BMPs[4].LoadFromFile('c:\windows\Soap bubbles.bmp');

  BMPs[5] := TBitmap.Create;

  BMPs[5].LoadFromFile('c:\windows\Gone Fishing.bmp');

  CurImage := 1;

  Image2.Picture.Bitmap := BMPs[1];

end;

procedure TForm1.FormDestroy(Sender: TObject);

var

  I: Integer;

begin

  { clean up }

  for I := 1 to 5 do

    BMPs[I].Free;

end;


LockList, UnlockList Example
 VCL Reference

LockList, UnlockList example

The following example shows how to use the LockList and UnlockList methods to access a thread-safe version  of a TList object:

with MyThreadList.LockList do

  try

    for X := 0 to Count-1 do

      Something(Items[X]);

  finally

    MyThreadList.UnlockList;

  end;


TThread, Priority, Resume Example
 VCL Reference

Create, Priority, Resume example

This example shows how to create a thread and start it running at a lower priority than the main execution thread. It assumes that the thread’s FreeOnTerminate property is True, so that there is no need to free the thread when it finishes.

var

  SecondProcess: TMyThread; { TMyThread is a custom descendant of TThread }

begin

  SecondProcess := TMyThread.Create(True); { create suspended – secondprocess does not run yet }

  SecondProcess.Priority := tpLower; { set the priority to lower than normal }

  SecondProcess.Resume; { now run the thread }

end;


Synchronize Example
 VCL Reference

Synchronize example

This example shows how to call a button’s click method in a thread-safe manner:

procedure TMyThread.PushTheButton;

begin

  Button1.Click();

end;

procedure TMyThread.Execute;

begin

...

  Synchronize(PushTheButton);

  ...

end;


Execute, Socket, Write, Terminated, Active Example
 VCL Reference

Execute, Socket, Write, Terminated, Active example

This example shows the execute method of a thread used to send requests to a server over a socket connection:

procedure TMyClientThread.Execute;

var

  TheStream: TWinSocketStream;

  buffer: string;

begin

  { create a TWinSocketStream for reading and writing }

  TheStream := TWinSocketStream.Create(ClientSocket1.Socket, 60000);

  try

    { fetch and process commands until the connection or thread is terminated }

    while (not Terminated) and (ClientSocket1.Active) do

    begin

      try

        GetNextRequest(buffer); { GetNextRequest must be a thread-safe method }

        { write the request to the server }

        TheStream.Write(buffer, Length(buffer) + 1);

        { continue the communication (eg read a response from the server) }

        ...

      except

        ifnot(ExceptObject is EAbort) then

          Synchronize(HandleThreadException); { you must write HandleThreadException }

      end;

    end;

  finally

   TheStream.Free;

  end;

end;


Copy, Component Example
 VCL Reference

Copy, Component example

The following Copy method allows a TImage component to copy its picture to the Clipboard. This picture is ignored by the IDE, but can be pasted into other applications.

procedure TComponentEditor.Copy;

var

  AFormat : Word;

  AData,APalette : THandle;

begin

  with Component as TImage do

  begin

    Picture.SaveToClipBoardFormat(AFormat,AData,APalette);

    ClipBoard.SetAsHandle(AFormat,AData);

  end;

end;


Perform example
 VCL Reference

Perform example

The following example demonstrates the use of the Perform method to send a windows message. The EM_SCROLLCARET message scrolls the caret in the rich edit into view. The caret position is set to the contents of the mask edit prior to calling Perform.

procedure TForm1.Button1Click(Sender: TObject);

begin

with RichEdit1 do

  Begin

    SelStart := StrToInt(MaskEdit1.Text);

    RichEdit1.Perform(EM_SCROLLCARET, 0, 0);

  end;

end;


Align, PageControl, TPageControl.Create example
 VCL Reference

Align, PageControl, TPageControl.Create example

This example dynamically creates a Page Control, then a series of Tab Sheets on the Page Control.

procedure TForm1.FormCreate(Sender: TObject);

const

  TabTitles: array[0..3] of ShortString = ('Customer', 'Orders', 'Items', 'Parts' );

var

  i: Integer;

  PageControl1: TPageControl;

begin

  PageControl1 := TPageControl.Create(Self);

  PageControl1.Parent := Self;

  PageControl1.Align := alClient;

  for i := Low(TabTitles) to High(TabTitles) do

    with TTabSheet.Create(PageControl1) do

    begin

      PageControl := PageControl1;

      Name := 'ts' + TabTitles[i];

      Caption := TabTitles[i];

   end;

end;


SaveToStream, LoadFromStream example
 VCL Reference

SaveToStream, LoadFromStream example

This example requires TListBox, TRichEdit, and TButton controls placed on the form. The list box should contain one or more items.

When the form becomes visible, click on the button and the contents of the list box will be transferred to the rich edit control.

procedure TForm1.Button1Click(Sender: TObject);

var

  TempStream : TMemoryStream;

begin

  TempStream := TMemoryStream.Create;

  ListBox1.Items.SaveToStream(TempStream);  // write list box contents to the

                                            // stream

  TempStream.Position := 0;      // reset to the beginning of the stream

  RichEdit1.Lines.LoadFromStream( TempStream); // load stream contents into memorich

                                               // edit control

  TempStream.Free;

end;


DialogHandle Example
 VCL Reference

DialogHandle Example

Here is part of the window procedure for Delphi's encapsulation of the Windows search-and-replace common dialog box:

function SearchAndReplaceWndProc(Wnd: HWnd; Msg, WParam: Word; LParam: Longint): Longint;

begin

  try

    case Msg of

      WM_DESTROY: Application.DialogHandle := 0;	{ clear handle on destroy }

      WM_NCACTIVATE:

        if Bool(WParam) then	{ if it's activating... }

          Application.DialogHandle := Wnd;	{ ...assign the handle... }

        else Application.DialogHandle := 0;	{ ...otherwise clear it }

      ...

    end;

    Result := CallDefDialogProc;

  except

    Application.HandleException(nil);

  end;

end;


Splitter Example
 VCL Reference

Splitter Example

This example shows how to use a splitter to divide a form into resizable panes.  All objects on the form are created dynamically in the OnCreate event handler of the form.  To run this example, add ExtCtrls and FileCtrl to the uses clause of the form’s implementation section.

Note that when creating a splitter dynamically at runtime, it is important to set its position to the appropriate side of the control it will resize.

procedure TForm1.Form1Create(Sender: TObject);

var

  Split: TSplitter;

  Files: TFileListBox;

  Dirs: TDirectoryListBox;

begin

  { first add a directory list box to the form }

  Dirs := TDirectoryListBox.Create(Form1);

  { line it up on the left of the form }

  Dirs.Parent := Form1;

  Dirs.Align := alLeft;

  Dirs.Width := Form1.ClientWidth div 3

{ now add the splitter to divide the directory pane from the file pane }

  Split := TSplitter.Create(Form1);

  Split.Parent := Form1;

  { make sure the splitter is to the right of the directory list box! }

  Split.Left := Dirs.Left + Dirs.Width + 1;

  Split.Align := Dirs.Align; { give it the same alignment as the directory }

  { each pane must be at least one quarter of the form’s width }

  Split.MinSize := Form1.ClientWidth div 4;

  { Finally, create the last pane – a file list box }

  Files := TFileListBox.Create(Form1);

  Files.Parent := Form1;

  Files.Align := alClient;

  Dirs.FileList := Files; { link the file list box to the directory list box }

end;


ClientExecute, ClientSocket, WaitForData, Read, HandleException Example
 VCL Reference

ClientExecute, ClientSocket, WaitForData, Read, HandleException example

The following example shows a typical ClientExecute method for a custom descendant of TServerClientThread. It reads from the socket connection specified by ClientSocket using a thread-local instance of TWinSocketStream.

procedure TMyServerThread.ClientExecute;

var

  Stream : TWinSocketStream;

  Buffer : array[0 .. 9] of Char;

begin

  { make sure connection is active }

  while (not Terminated) and ClientSocket.Connected do

  begin

    try

      Stream := TWinSocketStream.Create(ClientSocket, 60000);

      try

        FillChar(Buffer, 10, 0); { initialize the buffer }

        { give the client 60 seconds to start writing }

        if Stream.WaitForData(60000) then

        begin

          if Stream.Read(Buffer, 10) = 0 then { if can’t read in 60 seconds }

            ClientSocket.Close;               { close the connection }

          { now process the request }

          ...

        end

        else

          ClientSocket.Close; { if client doesn’t start, close }

      finally

        Stream.Free;

      end;

    except

      HandleException;

    end;

  end;

end;


OnUnDock, DockSite, DockClientCount Example
 VCL Reference

OnUnDock, DockSite, DockClientCount example

The following example is taken from the docking demo. It shows how the OnUnDock event handler of the conjoinment docking site re-enables docking in the control that is undocked (if it is a dockable form). In addition, when the next to last docked control is undocked, the conjoinment docking site sends itself a close message so that the last docked control is undocked to its old position and size.

procedure TConjoinDockHost.FormUnDock(Sender: TObject; Client: TControl; NewTarget: TWinControl; var Allow: Boolean);

begin

  //only 2 dock clients means the host must be destroyed and

  //the remaining window undocked to its old position and size.

  //(Recall that OnUnDock gets called before the undocking actually occurs)

  if Client is TDockableForm then

    TDockableForm(Client).DockSite := True;

  if (DockClientCount = 2) and (NewTarget <> Self) then

    PostMessage(Self.Handle, WM_CLOSE, 0, 0);

  UpdateCaption(Client);

end;


OnDockOver, DockRect Example
 VCL Reference

OnDockOver, DockRect example

The following example is taken from the docking demo. It shows how the OnDockOver event handler conditionally accepts controls (only TDockableForm descendants) and specifies the docking rectangle where they may appear.

procedure TDockableForm.FormDockOver(Sender: TObject; Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean);

var

  ARect: TRect;

begin

  Accept := (Source.Control is TDockableForm);

  //Draw dock preview depending on where the cursor is relative to our client area

  if Accept and (ComputeDockingRect(ARect, Point(X, Y)) <> alNone) then

    Source.DockRect := ARect;

end;


OnCustomDraw, Canvas, Bitmap, StretchDraw Example
 VCL Reference

OnCustomDraw, Canvas, Bitmap, StretchDraw example

The following example is taken from the custom draw demo. It shows how the OnCustomDraw event handler draws the background for the tree view before the items and lines are drawn.

procedure TCustomDrawForm.TVCustomDraw(Sender: TCustomTreeView; const ARect: TRect; var DefaultDraw: Boolean);

begin

//This event should be used to draw any background colors or images.

//ARect represents the entire client area of the TreeView.

//Use the TreeView's canvas to do the drawing.

//Note that drawing a background bitmap is not really supported by CustomDraw,

//so scrolling can get messy. Best to subclass the TreeView and handle scrolling

//messages.

  with TV.Canvas do

  begin

    if None1.Checked then //no picture

    begin

      Brush.Color := BkgColorDialog.Color;

      Brush.Style := FBrushStyle;

      FillRect(ARect);

    endelse

      if Tile1.Checked then //tile bitmap

      begin

        Brush.Bitmap := Image1.Picture.Bitmap;

          FillRect(ARect);

        endelse //Stretch across the canvas.

            StretchDraw(ARect, Image1.Picture.Bitmap);

  end;

  DefaultDraw := FDefaultDraw;

  //setting DefaultDraw to false here prevents all calls to OnCustomDrawItem.

end;


OnCustomDrawItem, DisplayRect, Level, Indent Example
 VCL Reference

OnCustomDrawItem, DisplayRect, Level, Indent example

The following example is taken from the custom draw demo. It shows how the OnCustomDrawItem event handler draws items and lines of the tree view after the OnCustomDraw event handler has filled in the background.

procedure TCustomDrawForm.TVCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean);

var

  NodeRect: TRect;

begin

  with TV.Canvas do

  begin

    //If DefaultDraw it is true, any of the node's font properties can be

    //changed. Note also that when DefaultDraw = True, Windows draws the

    //buttons and ignores our font background colors, using instead the

    //TreeView's Color property.

    if cdsSelected in State then

    begin

      Font.Assign(SelectedFontDialog.Font);

      Brush.Color := SelBkgColorDialog.Color;

    end;

    DefaultDraw := FDefaultDrawItem;

    //DefaultDraw = False means you have to handle all the item drawing yourself,

    //including the buttons, lines, images, and text.

    ifnot DefaultDraw then

    begin

      //draw the selection rect.

      if cdsSelected in State then

      begin

        NodeRect := Node.DisplayRect(True);

        FillRect(NodeRect);

      end;

      NodeRect := Node.DisplayRect(False);

      if None1.Checked then

      //no bitmap, so paint in the background color.

      begin

        Brush.Color := BkgColorDialog.Color;

        Brush.Style := FBrushStyle;

        FillRect(NodeRect)

      end

      else

        //don't paint over the background bitmap.

        Brush.Style := bsClear;

      NodeRect.Left := NodeRect.Left + (Node.Level * TV.Indent);

      //NodeRect.Left now represents the left-most portion of the expand button

      DrawButton(NodeRect, Node);

      NodeRect.Left := NodeRect.Left + TV.Indent + FButtonSize;

      //NodeRect.Left is now the leftmost portion of the image.

      DrawImage(NodeRect, Node.ImageIndex);

      NodeRect.Left := NodeRect.Left + ImageList.Width;

      //Now we are finally in a position to draw the text.

      TextOut(NodeRect.Left, NodeRect.Top, Node.Text);

    end;

  end;

end;


Items Example
 VCL Reference

VertScrollBar example

The following example demonstrates form scrolling with the PgUp and PgDn keys.

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;

Shift: TShiftState);

const

  PageDelta = 10;

begin

  With VertScrollbar do

    if Key = VK_NEXT then

      Position := Position + PageDelta

    elseif Key = VK_PRIOR then

      Position := Position - PageDelta;

end;


OnUpdate, Checked Example
 VCL Reference

OnUpdate, Checked example

When the application is idle, the OnUpdate event occurs for every action that is linked to a visible control or menu item that is showing. This provides an opportunity for applications to execute centralized code for enabling and disabling, checking and unchecking, and so on. For example, the following code illustrates the OnUpdate event handler for an action that is “checked” when the toolbar is visible. This example requires a TActionList (with one TAction) and a TToolBar on a form.

procedure TForm1.Action1Update(Sender: TObject);

begin

{ Indicate whether ToolBar1 is currently visible }

(Sender as TAction).Checked := ToolBar1.Visible;

end;


OnExecute Example
 VCL Reference

OnExecute example

When a client component or control is clicked, the OnExecute event occurs for it’s associated action. For example, the following code illustrates the OnExecute event handler for an action that toggles the visibility of a toolbar when the action is executed. This example requires a TActionList (with one TAction) and a TToolBar on a form.

procedure TForm1.Action1Execute(Sender: TObject);

begin

{ Toggle Toolbar1’s visibility }

ToolBar1.Visible := not ToolBar1.Visible;

end;


WriteComponent, Seek, ObjectBinaryToText, DataString, ObjectTextToBinary, ReadComponent Example
 VCL Reference

WriteComponent, Seek, ObjectBinaryToText, DataString, ObjectTextToBinary, ReadComponent Example

This example shows how to use the built-in VCL component streaming support to convert any component into a string and convert that string back into a component.

function ComponentToString(Component: TComponent): string;

var

  BinStream:TMemoryStream;

  StrStream: TStringStream;

  s: string;

begin

  BinStream := TMemoryStream.Create;

  try

    StrStream := TStringStream.Create(s);

    try

      BinStream.WriteComponent(Component);

      BinStream.Seek(0, soFromBeginning);

      ObjectBinaryToText(BinStream, StrStream);

      StrStream.Seek(0, soFromBeginning);

      Result:= StrStream.DataString;

    finally

      StrStream.Free;

    end;

  finally

    BinStream.Free

  end;

end;

function StringToComponent(Value: string): TComponent;

var

  StrStream:TStringStream;

  BinStream: TMemoryStream;

begin

  StrStream := TStringStream.Create(Value);

  try

    BinStream := TMemoryStream.Create;

    try

      ObjectTextToBinary(StrStream, BinStream);

      BinStream.Seek(0, soFromBeginning);

      Result := BinStream.ReadComponent(nil);

    finally

      BinStream.Free;

    end;

  finally

    StrStream.Free;

  end;

end;


DirectoryExists, CreateDir, Exception Example
 VCL Reference

DirectoryExists, CreateDir, Create example

The following example creates a directory ‘C:\temp’ if it does not already exist.

uses FileCtrl;

procedure TForm1.Button1Click(Sender: TObject);

begin

  ifnot DirectoryExists('c:\temp') then

    ifnot CreateDir('C:\temp') then

    raise Exception.Create('Cannot create c:\temp');

end;


Create, OpenKey, RootKey, WriteString, CloseKey Example
 VCL Reference

Create, OpenKey, RootKey, WriteString, CloseKey example

The following example shows how to tell Windows to relaunch your application when Windows starts up if it was running when the system shut down. When Windows starts up, it launches each application listed in the RunOnce key and then deletes the entry for that application.  Therefore, you do not need to remove the entry written here.

procedure TForm1.WMEndSession(var Message: TWMEndSession);

var

  Reg: TRegistry;

begin

  Reg := TRegistry.Create;

  try

    Reg.RootKey := HKEY_CURRENT_USER;

    if Reg.OpenKey('\Software\Microsoft\Windows\CurrentVersion\RunOnce', True) then

   begin

      Reg.WriteString('MyApp','"' + ParamStr(0) + '"');

      Reg.CloseKey;

    end;

  finally

    Reg.Free;

    inherited;

  end;

end;

In order for this method to be called, it must be declared in your main form class as follows:

private

  procedure WMEndSession(var Msg:TWMEndSession); message WM_ENDSESSION;


CopyMode, CopyRect Example
 VCL Reference

CopyMode example

The following example uses the CopyMode of an image’s canvas to blank out the image when the user chooses the “Cut” menu item.

procedure TForm1.Cut1Click(Sender: TObject);

var

  ARect: TRect;

begin

  Copy1Click(Sender); { do the same thing as the copy menu item }

  with Image.Canvas do

  begin

    CopyMode := cmWhiteness;

    ARect := Rect(0, 0, Image.Width, Image.Height);

    CopyRect(ARect, Image.Canvas, ARect);

    CopyMode := cmSrcCopy; { restore the copy mode }

  end;

end;


Copy, Chr, SelStart, SelLength Example
 VCL Reference

Copy, Chr, SelStart, SelLength example

The following example shows how to complete partial strings typed into a combo box. The code represents the OnKeyPress event handler of the combo box, which performs most of the default keystroke handling before finding a matching list item and updating the text.

Note:	This OnKeyPress event handler does not deal with the case when the user types the Delete key. That case must be caught in the OnKeyDown event handler instead.

procedure TForm1.ComboBox1KeyPress(Sender: TObject; var Key: Char);

var

  Found: boolean;

  i,SelSt: Integer;

  TmpStr: string;

begin

  { first, process the keystroke to obtain the current string }

  { This code requires all items in list to be uppercase}

  if Key in ['a'..'z'] then Dec(Key,32); {Force Uppercase only!}

  with (Sender as TComboBox) do

  begin

    SelSt := SelStart;

    if (Key = Chr(vk_Back)) and (SelLength <> 0) then

     TmpStr := Copy(Text,1,SelStart)+Copy(Text,SelLength+SelStart+1,255)

    else if Key = Chr(vk_Back) then {SelLength = 0}

     TmpStr := Copy(Text,1,SelStart-1)+Copy(Text,SelStart+1,255)

    else {Key in ['A'..'Z', etc]}

     TmpStr := Copy(Text,1,SelStart)+Key+Copy(Text,SelLength+SelStart+1,255);

    if TmpStr = '' then Exit;

    { update SelSt to the current insertion point }

    if (Key = Chr(vk_Back)) and (SelSt > 0) then Dec(SelSt)

    else if Key <> Chr(vk_Back) then Inc(SelSt);

    Key := #0; { indicate that key was handled }

    if SelSt = 0 then

    begin

      Text:= '';

      Exit;

    end;

   {Now that TmpStr is the currently typed string, see if we can locate a match }

    Found := False;

    for i := 1 to Items.Count do

      if Copy(Items[i-1],1,Length(TmpStr)) = TmpStr then

      begin

        Text := Items[i-1]; { update to the match that was found }

        ItemIndex := i-1;

        Found := True;

        Break;

      end;

    if Found then { select the untyped end of the string }

   begin

      SelStart := SelSt;

      SelLength := Length(Text)-SelSt;

    end

    else Beep;

  end;

end;


ReadSection, ReadSections, ReadSectionValues Example
 VCL Reference

ReadSection, ReadSections, ReadSectionValues example

The following example reads information from a WIN.INI file into three listboxes on a form.

uses IniFiles;

procedure TForm1.FormActivate(Sender: TObject);

var

  AppIni: TIniFile;

begin

  AppIni := TIniFile.Create('WIN.INI');

  AppIni.ReadSections(ListBox1.Items);

  AppIni.ReadSection('Ports',Listbox2.Items);

  AppIni.ReadSectionValues('Ports',ListBox3.Items);

  AppIni.Free;

end;


FormatFloat, DiskFree Example
 VCL Reference

FormatFloat, DiskFree example

The following example displays in a dialog the disk free space of the current drive with commas as thousand separators.

ShowMessage(FormatFloat('#,##0 bytes', DiskFree(0)));


OleCheck, GuidToString Example
 VCL Reference

OleCheck, GuidToString example

The following example manufactures a GUID and displays it in a dialog box after translating it to a string.

uses ActiveX, ComObj;

procedure TForm1.Button1Click(Sender: TObject);

var

  G: TGUID;

begin

  OleCheck(CoCreateGuid(G));

  ShowMessage(GuidToString(G));

end;


FindComponent Example
 VCL Reference

FindComponent example

The following example creates 20 edit boxes, using FindComponent with the edit box name to access each newly created edit box.

procedure TForm1.Button1Click(Sender: TObject);

var

  i: Integer;

const

  NamePrefix = 'MyEdit';

begin

  for i := 1 to 20 dobegin

    TEdit.Create(Self).Name := NamePrefix + IntToStr(i);

    with TEdit(FindComponent(NamePrefix + IntToStr(i))) do

    begin

      Left := 10;

      Top := i * 20;

      Parent := self;

    end;

  end;

end;


WndProc, WindowProc Example
 VCL Reference

WndProc, WindowProc example

This example shows how to use the WndProc method and the WindowProc property to subclass a custom control’s window procedure.  This example subclasses the window procedure of a TListBox descendant to respond to a user-defined message called WM_STYLEMESSAGE. The subclassed window procedure can be turned on or off by pressing a radio button.

procedure TMyListBoxDescendant.SubClassWndProc(var Message: TMessage);

begin

  if Message.Msg = WM_STYLEMESSAGE then

    Style := TListBoxStyle(Message.WParam)

  else

    WndProc(Message);

end;

procedure TMyListBoxDescendant.ToggleSubClass(On: Boolean);

begin

  if On then

    WindowProc := SubClassWndProc;

  else

    WindowProc := WndProc;

end;

procedure TForm1.SubClassRadioGroup1Click(Sender: TObject);

begin

  MyListBoxDescendant1.ToggleSubClass(SubClassRadioGroup1.ItemIndex = 0);

end;


SaveToFile, Create, Height, Width, Canvas, ChangeFileExt Example
 VCL Reference

SaveToFile, Create, Height, Width, Canvas, ChangeFileExt example

This example converts a specified icon to a bitmap. To run this example, add an image, a button, and an Open dialog to a form. Name the button ConvertIcon2Bitmap, and add the following code as its OnClick event handler.

procedure TForm1.ConvertIcon2BitmapClick(Sender: TObject);

var

  s : string;

  Icon: TIcon;

begin

  OpenDialog1.DefaultExt := '.ICO';

  OpenDialog1.Filter := 'icons (*.ico)|*.ICO';

  OpenDialog1.Options := [ofOverwritePrompt, ofFileMustExist, ofHideReadOnly ];

  if OpenDialog1.Execute then

  begin

    Icon := TIcon.Create;

    try

      Icon.Loadfromfile(OpenDialog1.FileName);

      s:= ChangeFileExt(OpenDialog1.FileName,'.BMP');

      Image1.Width := Icon.Width;

      Image1.Height := Icon.Height;

      Image1.Canvas.Draw(0,0,Icon);

      Image1.Picture.SaveToFile(s);

      ShowMessage(OpenDialog1.FileName + ' Saved to ' + s);

    finally

      Icon.Free;

    end;

  end;

end;


Tabs, TabIndex, OnChange, Assign Example
 VCL Reference

Tabs, TabIndex, OnChange, Assign example

This example uses a tab control to display the contents of several files. To run the example, place a tab control on a form and add a memo control that fits nicely into its client area. Be sure to leave enough room for the tabs when they appear. Then add an OpenDialog and a button to the form.

Place the following code in the button’s OnClick event handler:

procedure TForm1.Button1Click(Sender: TObject);

begin

  OpenDialog1.Options := [ofAllowMultiSelect, ofFileMustExist, ofHideReadOnly ];

  if OpenDialog1.Execute then

  begin

    TabControl1.Tabs.Assign(OpenDialog1.Files);

    Memo1.Lines.LoadFromFile(TabContol1.Tabs[TabControl1.TabIndex]);

  end;

end;

Place the following code in the tab control’s OnChange event handler:

procedure TForm1.TabControl1Change(Sender: TObject);

begin

  with TabControl1 do

    Memo1.Lines.LoadFromFile(Tabs[TabIndex]);

end;


TCanvas.Create, GetDeviceContext, Handle, Palette Example
 VCL Reference

TCanvas.Create, GetDeviceContext, Handle, Palette example

The GetFormImage allows you to easily obtain a bitmap of a form. The following method can be added to a custom TWinControl descendant to save itself as a bitmap.

type

  LogPal = record

  lpal : TLogPalette;

  dummy:Array[0..255] of TPaletteEntry;

  end;

procedure TMyControl.SaveAsBmp(fileName: TFileName);

var

  Source: TComponent;

  SysPal : LogPal;

  tempCanvas: TCanvas;

  sourceRect, destRect: TRect;

  image2save: TImage;

  notUsed: HWND;

begin

  tempCanvas := TCanvas.Create;

  try

    tempCanvas.Handle := GetDeviceContext(notUsed);

    image2save:=TImage.create(self);

    try

      with image2save do

      begin

        Height := Self.Height;

        Width :=  Self.Width;

        destRect := Rect(0,0,Width,Height);

        sourceRect := destRect;

        Canvas.CopyRect(destRect,tempCanvas,sourceRect);

        SysPal.lPal.palVersion:=$300;

        SysPal.lPal.palNumEntries:=256;

        GetSystemPaletteEntries(tempCanvas.Handle,0,256,SysPal.lpal.palPalEntry);

        Picture.Bitmap.Palette:= CreatePalette(Syspal.lpal);

      end;

      image2save.Picture.SaveToFile(fileName);

    finally

     image2save.Free;

    end;

  finally

    tempCanvas.Free;

  end;

end;


GetVerb, GetVerbCount, ExecuteVerb Example
 VCL Reference

GetVerb, GetVerbCount, ExecuteVerb example

This example shows how to use a component editor to create a context menu for a component.

type

  THelloGoodByeComponentEditor = class(TComponentEditor)

    procedure ExecuteVerb(Index: Integer); override;

    function GetVerb(Index: Integer): string; override;

    function GetVerbCount: Integer; override;

  end;

procedure THelloGoodByeComponentEditor.ExecuteVerb(Index: Integer);

begin

  case Index of

    0 : ShowMessage('Hello');

    1 : ShowMessage('Goodbye');

  end;

end;

function THelloGoodByeComponentEditor.GetVerb(Index: Integer): string;

begin

  case Index of

    0: Result := 'Arrive';

    1 : Result := 'Depart';

  end;

end;

function THelloGoodByeComponentEditor.GetVerbCount: Integer;

begin

  Result := 2;

end;


Create, CreateKey, WriteString Example
 VCL Reference

Create, CreateKey, WriteString example

This OnClick event handler adds the value specified in the ValueforKey edit box to the registry key specified by the NameofKey edit box. If the named key does not already exist, it creates one. (Note that if you don’t want to give the user a choice, this could be accomplished more simply by setting the CanCreate parameter of the OpenKey call to True).

procedure TForm1.Button1Click(Sender: TObject);

var

  Reg: TRegIniFile;

begin

  if Length(NameofKey.Text) or Length(ValueforKey.Text) <=0 then

    Showmessage('Either the key name or value is missing.')

  else begin

    Reg:=TRegIniFile.Create('MyApp');

    try

      Reg.RootKey:=HKey_Local_Machine; // Section to look for within the registry

      if not Reg.OpenKey(NameofKey.Text,False) then

        if MessageDlg('The specified key does not exist, create it?'

                 ,Mtinformation,[mbYes,mbNo],0)=mryes then

        begin

          Reg.CreateKey(NameofKey.Text);

          if not Reg.OpenKey(NameofKey.Text,False) then

            ShowMessage('Error in Opening Created Key')

          else

            Reg.WriteString('Main Section','Value1',ValueForKey.Text);

        end

     else

       Reg.WriteString('Main Section','Value1',ValueForKey.Text);

    finally

      Reg.Free;

    end;

  end;

end;


GetValueNames, DeleteKey Example
 VCL Reference

GetValueNames, DeleteKey example

This OnClick event handler deletes all values saved in the registry under they key named in an edit control.

procedure TForm1.Button1Click(Sender: TObject);

var

  Reg: TRegistry;

  Val:TStringList;

  I:Integer;

begin

  Reg:=TRegistry.Create;

  try

    Val:=TStringList.Create;

    try

      Reg.RootKey:=HKEY_LOCAL_MACHINE; // Section to look for within the registry

      if not Reg.OpenKey(Edit1.Text,False) then

        ShowMessage('Error opening key')

      else

      begin

        Reg.GetValueNames(Val);

        for I:=0 to Val.Count-1 do

        begin

          ShowMessage(Edit1.Text + Chr(13) +

                      'has an Entry Called '+Val.Strings[I]+Chr(13)+

                      'With a Value of '+Reg.ReadString(Val.Strings[I]));

        end;

        if MessageDlg('Ok to delete the key and lose all these values?'

                     ,Mtinformation,[mbYes,mbNo],0)=mryes then

           Reg.DeleteKey(Edit1.Text);

      end;

    finally

      Val.Free;

    end;

  finally

    Reg.Free;

  end;

end;


Canvas Example
 VCL Reference

OnDrawItem, Canvas example

Here is a typical handler for an OnDrawItem event. In the example, a list box with the lbOwnerDrawFixed styledraws a bitmap to the left of each string.

procedure TForm1.ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect:TRect;State: TOwnerDrawState);

var

Bitmap: TBitmap;      { temporary variable for the item’s bitmap }

Offset: Integer;      { text offset width }

begin

with (Control as TListBox).Canvas do  { draw on control canvas, not on the form }

begin

FillRect(Rect);       { clear the rectangle }

Offset := 2;          { provide default offset }

Bitmap := TBitmap((Control as TListBox).Items.Objects[Index]);  { get the bitmap }

if Bitmap <> nilthen

begin

BrushCopy(Bounds(Rect.Left + Offset, Rect.Top, Bitmap.Width, Bitmap.Height),

Bitmap, Bounds(0, 0, Bitmap.Width, Bitmap.Height), clRed);  {render bitmap}

Offset := Bitmap.width + 6;    { add four pixels between bitmap and text}

end;

TextOut(Rect.Left + Offset, Rect.Top, (Control as TListBox).Items[Index])  { display the text }

end;

end;


ReadBoolean, WriteBoolean, ReadComponent, WriteComponent, DefineProperties, DefineProperty, Ancestor Example
 VCL Reference

ReadBoolean, WriteBoolean, ReadComponent, WriteComponent, DefineProperties, DefineProperty, Ancestor example

This example shows how to load and save an unpublished property whose value is a component that was created at runtime. It defines two methods, LoadCompProperty and StoreCompProperty that load or save the property value. The also defines an override for the DefineProperties method where these methods are passed to the streaming system. The DefineProperties method checks the filer’s Ancestor property to avoid saving a property value in inherited forms.

procedure TSampleComponent.LoadCompProperty(Reader: TReader);

begin

  if Reader.ReadBoolean then

    MyCompProperty := Reader.ReadComponent(nil);

end;

procedure TSampleComponent.StoreCompProperty(Writer: TWriter);

begin

  Writer.WriteBoolean(MyCompProperty <> nil);

  if MyCompProperty <> nil then

    Writer.WriteComponent(MyCompProperty);

end;

procedure TSampleComponent.DefineProperties(Filer: TFiler);

  function DoWrite: Boolean;

  begin

    if Filer.Ancestor <> nil then { check Ancestor for an inherited value }

    begin

      if TSampleComponent(Filer.Ancestor).MyCompProperty = nil then

        Result := MyCompProperty <> nil

      else if MyCompProperty = nil or

         TSampleComponent(Filer.Ancestor).MyCompProperty.Name <> MyCompProperty.Name then

        Result := True

      else Result := False;

    end

    else { no inherited value -- check for default (nil) value }

      Result := MyCompProperty <> nil;

  end;

begin

  inherited; { allow base classes to define properties }

  Filer.DefineProperty('MyCompProperty', LoadCompProperty, StoreCompProperty, DoWrite);

end;

}


Create Assign, SaveToFile Example
 VCL Reference

Create, Assign, SaveToFile example

This example converts a bitmap image to a jpeg file by using the Assign method.

procedure TForm1.Button1Click(Sender: TObject);

var

  jp: TJPEGImage;  //Requires the "jpeg" unit added to "uses" clause.

begin

  jp := TJPEGImage.Create;

  try

    with jp do

    begin

      Assign(Image1.Picture.Bitmap);

      SaveToFile('c:\oneeye.jpg')

    end;

  finally

    jp.Free;

  end;

end;


EditProperty Example
 VCL Reference

EditProperty example

This example shows how to override the EditProperty method to create a component editor that displays a particular event handler when the user double-clicks.

procedure TMyEditor.EditProperty(PropertyEditor: TPropertyEditor; Continue, FreeEditor: Boolean)

begin

  if (PropertyEditor.ClassName = 'TMethodProperty') and

    (PropertyEditor.GetName = 'OnSpecialEvent') then

    inherited EditProperty(PropertyEditor, Continue, FreeEditor);

end;


OnColumnClick, AlphaSort, OnCompare, CompareText Example
 VCL Reference

OnColumnClick, AlphaSort, OnCompare, CompareText example

This example shows how to use the OnColumnClick and OnCompare events of a list view to let users sort the columns in a report-style list view by clicking on the column headers. This requires a global variable to keep track of the column that was clicked:

var ColumnToSort: Integer;

The OnColumnClick event handler sets the global variable to indicate the column to sort and calls AlphaSort:

procedure TForm1.ListView1ColumnClick(Sender: TObject; Column: TListColumn);

begin

  ColumnToSort := Column.Index;

  (Sender as TCustomListView).AlphaSort;

end;

The OnCompare event handler causes the list view to sort on the selected column:

procedure TForm1.ListView1Compare(Sender: TObject; Item1, Item2: TListItem; Data: Integer; var Compare: Integer);

var

  ix: Integer;

begin

  if ColumnToSort = 0 then

    Compare := CompareText(Item1.Caption,Item2.Caption)

  else begin

   ix := ColumnToSort - 1;

   Compare := CompareText(Item1.SubItems[ix],Item2.SubItems[ix]);

  end;

end;

Note:	This OnCompare event handler uses the global CompareText function. An application may want to use AnsiCompareText, CompareStr, or AnsiCompareStr instead, depending on whether the comparison should be case-sensitive and whether the locale should be considered.


Socket, Connections, SendText Example
 VCL Reference

Socket, Connections, SendText example

This example comes from the Chat demo. It shows how to send the newly inserted line of a memo over the socket connection when the user hits the Enter key.

procedure TChatForm.Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

begin

  if Key = VK_Return then

    if IsServer then

      ServerSocket.Socket.Connections[0].SendText(Memo1.Lines[Memo1.Lines.Count - 1])

    else

      ClientSocket.Socket.SendText(Memo1.Lines[Memo1.Lines.Count - 1]);

end;


TImageList GetBitmap example
 VCL Reference

TImageList GetBitmap example

This example assigns a bitmap contained in an ImageList to an Image component's Picture's Bitmap property and displays the bitmap.

procedure Form1.Button1Click(Sender: TObject);

begin

   ImageList1.GetBitmap(0,Image1.Picture.Bitmap);

end;


Canvas ClipRect example
 VCL Reference

Canvas ClipRect example

This example creates a region and selects this region as the clipping rectangle for the Image component's canvas. It then sets the canvas's brush color to red and calls FillRect using the ClipRect as the area to fill. Lastly, the ClipRect is reset to the original value that it contained by calling SelectClipRect with nil as the second parameter and deletes the region.

procedure Form1.Button1Click(Sender: TObject);

var

    MyRgn: HRGN ;

begin

    MyRgn := CreateRectRgn(100,100,200,200);

    SelectClipRgn(Image1.Canvas.Handle,MyRgn);

    Image1.Canvas.Brush.Color := clRed;

    Image1.Canvas.FillRect(Image1.Canvas.ClipRect);

    Image1.Invalidate;

    SelectClipRgn(Image1.Canvas.Handle,nil);

    DeleteObject(MyRgn);

end;


TPaintBox OnPaint example
 VCL Reference

TPaintBox OnPaint example

When you do custom drawing, such as shown in the code for the Button's OnClick event handler below, this drawing will not be persistent and will be "erased" the first time the PaintBox component needs to repaint.

procedure Form1.Button1Click(Sender: TObject);

begin

   PaintBox1.Canvas.Brush.Color := clRed;

   PaintBox1.Canvas.FillRect(PaintBox1.Canvas.ClipRect);

   PaintBox1.Canvas.Ellipse(0,0,100,100);

end;

In order for the drawing to be persistent, you need to also include an OnPaint event handler that tells the PaintBox how to redraw itself when it needs to. In the code below, an ellipse will be drawn everytime the PaintBox renders itself, but the PaintBox will only paint the client area of the control red after the Button is clicked. This client area will only stay red until it is invalidated, but the ellipse will persist. This behavior is different from the TImage component, because the TImage component maintains an internal bitmap that stores this drawing information for you.

procedure Form1.PaintBox1Paint(Sender: TObject);

begin

   PaintBox1.Canvas.Ellipse(0,0,100,100);

end;


TFont Style example
 VCL Reference

TFont Style example

This example sets a Label's Font Style to fsBold and fsUnderline.

This example demonstrates how to clear any Styles that were previously set.

procedure Form1.Button1Click(Sender: TObject);

begin

   Label1.Font.Style := [];

end;


SetSelTextBuf example
 VCL Reference

SetSelTextBuf example

This example inserts the contents of temp_string at the current location of the cursor.

procedure TForm1.Button1Click(Sender: TObject);

var

  temp_string: array[0..15] of Char;

begin

  temp_string := 'I am now here';

  Memo1->SetSelTextBuf(temp_string);

end;


Rotated Font example
 VCL Reference

Rotated Font example

This example creates a rotated font and displays it on the form by assigning the handle of the rotated to the Form’s Canvas Font via the Font’s Handle property.

Rotating fonts is a straightforward process, so long as the Windows Font Mapper can supply a rotated font based on the font you request. If you are using a TrueType font there is virtually no reason for failure.

procedure TForm1::Button1Click(Sender: TObject);

var

  lf: LOGFONT; // Windows native font structure

begin

  Canvas.Brush.Style := bsClear; // set the brush style to transparent

  FillChar(Addr(lf), SizeOf(lf), Byte(0));

  lf.lfHeight := 20;

  lf.lfEscapement := 10 * 45; // degrees to rotate

  lf.lfOrientation := 10 * 45;

  lf.lfCharSet := DEFAULT_CHARSET;

  StrCpy(lf.lfFaceName, 'Tahoma');

  Canvas.Font.Handle := CreateFontIndirect(Addr(lf));

  Canvas.TextOut(10, 100, 'Rotated text'); // output the rotated font

end;


Adding a TMenuItem to a Popup menu at runtime example
 VCL Reference

Adding a TMenuItem to a Popup menu at runtime example

This example demonstrates how to add and delete menu items to a popup menu at runtime and assign an event handler to the OnClick event.

procedure TForm1.AddButtonClick(Sender: TObject);

var

  index: Integer;

  NewItem: TMenuItem;

begin

  for index := 0 to 3 do

  begin

    NewItem := TMenuItem.Create(PopupMenu1); // create the new item

    PopupMenu1.Items.Add(NewItem);// add it to the Popupmenu

    NewItem.Caption := 'Menu Item ' + IntToStr(index);

    NewItem.Tag := index;

    NewItem.OnClick = PopupMenuItemsClick;// assign it an event handler

  end;

end;

procedure TForm1.PopupMenuItemsClick(Sender: TObject);

begin

  with Sender as TMenuItem do

  begin

    case Tag of

      0:  ShowMessage('first item clicked');

      1:  ShowMessage('second item clicked');

      2:  ShowMessage('third item clicked');

      3:  ShowMessage('fourth item clicked');

    end;

  end;

end;

To edit or destroy an item, grab its pointer via the Items property.

procedure TForm1.EditButtonClick(Sender: TObject);

var

  ItemToEdit: TMenuItem;

begin

  ItemToEdit := PopupMenu.Items[1];

  ItemToEdit.Caption := 'Changed Caption';

}

procedure TForm1.DestroyButtonClick(Sender: TObject);

var

  ItemToDelete: TMenuItem;

begin

  ItemToDelete := PopupMenu.Items[2];

  ItemToDelete.Free;

end;


OnSettingChange, SysLocale, BoolToStr example
 VCL Reference

OnSettingChange, SysLocale, BoolToStr example

procedure TForm1.ApplicationEvents1SettingChange(Sender: TObject; Flag: Integer; const Section: string; var Result: Integer);

begin

  Memo1.Lines.BeginUpdate;

  try

    Memo1.Lines.Add(Format('Section  = %s', [Section]));

    Memo1.Lines.Add(Format('Flags  = %.8x', [Flag]));

    if AnsiSameStr(Section, 'intl') then

    with SysLocale do

    begin

      Memo1.Lines.Add(Format('DefaultLCID  = %.8x', [DefaultLCID]));

      Memo1.Lines.Add(Format('PriLangID  = %.8x', [PriLangID]));

      Memo1.Lines.Add(Format('SubLangID  = %.8x', [SubLangID]));

      Memo1.Lines.Add(Format('FarEast  = %s', [BoolToStr(FarEast, True)]));

      Memo1.Lines.Add(Format('MiddleEast  = %s', [BoolToStr(MiddleEast, True)]));

    end;

    Memo1.Lines.Add('');

  finally

    Memo1.Lines.EndUpdate;

  end;

end;


GetNextItem example
 VCL Reference

GetNextItem example

This example demonstrates how to retrieve all selected items in a ListView component and add the Caption of the selected ListItems to a ListBox component.

procedure TForm1.Button1Click(Sender: TObject);

var

  Item: TListItem;

begin

  Item := ListView1.Selected;

  while Item <> nil do

  begin

    ListBox1.Items.Add(Item.Caption);

    Item := ListView1.GetNextItem(Item, sdAll, [isSelected]);

  end;

end;


SyncProc, ExecuteSyncProc Example
 VCL Reference

SyncProc, ExecuteSyncProc example

This example shows how to use the SyncProc and ExecuteSyncProc methods in subclasses of TClientSocketThread. Assume the new thread class TMyThread is defined as follows:

TMyThread = Class(TClientSocketThread)

protected

  procedure SyncProc; override;

public

  Str: TStrings;

  constructor Create(Sst: TServerSocketThread);

  destructor Destroy; override;

end;

The override of SyncProc is declared as

procedure TMyThread.SyncProc;

begin

  Form1.Memo1.Lines.AddStrings(Str);

end;

Now, the form (which we'll call Form1) has a TMemo object called Memo1, and let's say we want to add lines of text to Memo1 that are to be received from a connection handled by a specified TCustomIpClient object. A method for performing that task is shown below.

procedure TForm1.TcpServer1Accept(Sender: TObject;

  ClientSocket: TCustomIpClient);

var

  s: string;

  MyThread: TMyThread;

begin

  MyThread := ClientSocket.GetThreadObject as TMyThread;

  with MyThread do

  begin

    Str.Clear;

    Str.Add('*** Connection Accepted ***');

    Str.Add('Remote Host: ' + ClientSocket.LookupHostName(ClientSocket.RemoteHost) +

      ' (' + ClientSocket.RemoteHost + ')');

    Str.Add('Begin message ===================');

    s := ClientSocket.Receiveln;

    while s <> '' do

    begin

      Str.Add(s);

      s := ClientSocket.Receiveln;

    end;

    Str.Add('End of message ==================');

    ExecuteSyncProc;

  end;

end;

Note the ExecuteSyncProc command at the end of the method. One might naively replace that call with the contents of the method itself, a single line of code. To do so would cause a synchronization error and an application crash. SyncProc/ExecuteSyncProc is the thread-safe way to add data to an object in another thread.


TSearchAction
 VCL Reference

TSearchAction

Hierarchy	Properties	Methods	Events	Using TSearchAction	See also

TSearchAction is the base class for action objects that display a search or search and replace dialog.

Unit

StdActns

Description

TSearchAction implements the common behavior for actions that display a modeless dialog where the user can enter a search string for searching an edit control. Do not use TSearchAction directly in an application. Instead, use one of the TSearchAction descendants: TSearchFind or TSearchFindFirst for a simple locate dialog, TSearchReplace for a locate-and-replace dialog.

TSearchAction descendants are designed to work with an edit control (TCustomEdit descendant) as a target. They automatically disable themselves if the active control in a form is not an edit control.

Unlike other dialog actions, search actions represent a modeless dialog. As a result, the OnAccept event occurs not when the user exits the dialog, but when the dialog first appears or comes into focus. When the user directs the dialog to search for or replace a string, the search action automatically performs that search, selecting or replacing text in the target edit control.


 VCL Reference

TSearchAction properties

TSearchAction	Alphabetically	Legend

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSearchAction properties

TSearchAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TSearchAction events

TSearchAction	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSearchAction events

TSearchAction	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TSearchAction methods

TSearchAction	Alphabetically	Legend

In TSearchAction

Create

ExecuteTarget

HandlesTarget

Search

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSearchAction methods

TSearchAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

Search

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TSearchAction.Create
 VCL Reference

TSearchAction.Create

TSearchAction	See also

Creates and initializes an instance of TSearchAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TSearchAction constructor because actions are added at design time to action lists or action managers.

The TSearchAction constructor creates an instance of its associated dialog, which descendant classes surface as the Dialog property. It then assigns the Search method as an event handler for the dialog’s OnFind event, so that the action responds automatically when user’s direct the dialog to search for a specified text string.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TSearchAction instance.


TSearchAction.ExecuteTarget
 VCL Reference

TSearchAction.ExecuteTarget

TSearchAction 	See also

Launches the associated dialog.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget first launches its search or search and replace dialog. This is a modeless dialog, so the result of the dialog’s Execute method simply indicates whether the dialog successfully appeared or was brought into focus. This result is set as the value of the ExecuteResult property, and an OnAccept or OnCancel event occurs, depending on whether the dialog was brought into focus.


TSearchAction.HandlesTarget
 VCL Reference

TSearchAction.HandlesTarget

TSearchAction

Indicates whether the action can execute its dialog.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method lets the action object indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

HandlesTarget returns True if the target is an edit control that has keyboard focus.


TSearchAction.Search
 VCL Reference

TSearchAction.Search

TSearchAction 	See also

Selects the next occurrence of the search string in the target edit control.

procedure Search(Sender: TObject); virtual;

Description

Most applications have no need to call the Search method: the TSearchAction constructor automatically assigns Search as the OnFind event handler of its associated dialog. The dialog’s OnFind event occurs when the user directs the dialog to find a specified string.

Search searches the target edit control for the string that is the FindText property of the search dialog, using the options specified by the dialog’s Options property. If it finds the specified string, it selects it in the edit control. Otherwise, it displays a message to the user indicating that the string was not found.

Note:	If the search action is an instance of TSearchFind, Search looks for the first occurrence of FindText after the current selection in the edit control. If the search action is an instance of TSearchFindFirst, Search looks for the first occurrence of FindText, regardless of the current selection.


TSearchAction.UpdateTarget
 VCL Reference

TSearchAction.UpdateTarget

TSearchAction 	See also

Enables or disables the action, depending on the currently active control in the form.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TSearchAction, UpdateTarget checks whether the current target object (specified by the Target parameter) is an edit control. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TSearchAction


TSearchFind
 VCL Reference

TSearchFind

Hierarchy	Properties	Methods	Events	Using TSearchFind	See also

TSearchFind is the standard action for displaying a find dialog.

Unit

StdActns

Description

Add TSearchFind to an action list to add a modeless find dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the find dialog or bring it to the fore.

TSearchFind is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control.

Search actions represent a modeless dialog. As a result, the OnAccept event occurs not when the user exits the dialog, but when the dialog first appears or comes into focus. When the user directs the dialog to search for a string, TSearchFind automatically performs that search, selecting the specified text in the target edit control.


 VCL Reference

TSearchFind properties

TSearchFind	Alphabetically	Legend

In TSearchFind

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSearchFind properties

TSearchFind	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TSearchFind.Dialog
 VCL Reference

TSearchFind.Dialog

TSearchFind 	See also

Provides access the find dialog that the action executes.

property Dialog: TFindDialog;

Description

Use Dialog to configure the find dialog before the action fires or to close the modeless dialog programmatically. For example, you can set the find dialog’s options at design time using the Object Inspector or call the dialog’s CloseDialog method to close it.

When using a search-find action, you do not place a TFindDialog component on the form or data module at design time. Instead, you add the TSearchFind action to your action list and then use the Dialog property. The find dialog component is created by the TSearchFind constructor.


 VCL Reference

TSearchFind events

TSearchFind	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSearchFind events

TSearchFind	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TSearchFind methods

TSearchFind	Alphabetically	Legend

Derived from TSearchAction

Create

ExecuteTarget

HandlesTarget

Search

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSearchFind methods

TSearchFind	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

Search

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TSearchAction

TSearchFind


TStream
 VCL Reference

TStream

Hierarchy	Properties	Methods	See also

TStream is the base class type for stream objects that can read from or write to various kinds of storage media, such as disk files, dynamic memory, and so on.

Unit

Classes

Description

Use specialized stream objects to read from, write to, or copy information stored in a particular medium. Each descendant of TStream implements methods for transferring information to and from a particular storage medium, such as a disk file, dynamic memory, and so on.  In addition to methods for reading, writing, and copying bytes to and from the stream, stream objects permit applications to seek to an arbitrary position in the stream. Properties of TStream provide information about the stream, such as its size and the current position in the stream.

TStream also introduces methods that work in conjunction with components and filers for loading and saving components in simple and inherited forms. These methods are called automatically by global routines that initiate component streaming. They can also be called directly to initiate the streaming process. Note, however, that component streaming always involves two additional objects:

A component object that is passed as a parameter to the stream’s methods.

A filer object that is automatically created by the stream, and associated with the stream.

As an abstract class, TStream should not be instantiated. Descendant stream objects, such as memory and file streams used for component streaming, are created automatically by the global functions ReadComponentRes and WriteComponentRes. For streaming other kinds of information, choose a descendant class according to the specific data and storage needs. These include

TFileStream (for working with files)

TStringStream (for manipulating in-memory strings)

TMemoryStream (for working with a memory buffer)

TBlobStream (for working with BLOB fields)

TWinSocketStream (for reading and writing over a socket connection)

TOleStream (for using a COM interface to read and write)


 VCL Reference

TStream properties

TStream	Alphabetically	Legend

In TStream

Position

Size


 VCL Reference

TStream properties

TStream	By object	Legend

Position

Size


TStream.Position
 VCL Reference

TStream.Position

TStream	See also	Example

Indicates the current offset into the stream for reading and writing.

property Position: Int64;

Description

Use Position to obtain the current position of the stream. This is the number of bytes from the beginning of the streamed data.


TStream.Size
 VCL Reference

TStream.Size

TStream	See also

Indicates the size in bytes of the stream.

property Size: Int64;

Description

Use Size to find the size of the stream. Size is used internally in routines that read and write to and from the stream. Setting the Size property of TStream does nothing. Some descendants of TStream override this property to allow applications to change the size of the resource accessed using the stream.


 VCL Reference

TStream methods

TStream	Alphabetically	Legend

In TStream

CopyFrom

FixupResourceHeader

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

Seek

SetSize

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStream methods

TStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

Seek

SetSize

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TStream.CopyFrom
 VCL Reference

TStream.CopyFrom

TStream 	Example

Copies a specified number of bytes from one stream to another.

function CopyFrom(Source: TStream; Count: Int64): Int64;

Description

Use CopyFrom to copy data to the stream from a different stream. Using CopyFrom eliminates the need for the user to create, read into, write from, and free a buffer when copying data.

CopyFrom copies Count bytes from the stream specified by Source into the stream. It then moves the current position by Count bytes, and returns the number of bytes copied.

If Count is 0, CopyFrom sets Source position to 0 before reading and then copies the entire contents of Source into the stream. If Count is greater than or less than 0, CopyFrom reads from the current position in Source.


TStream.FixupResourceHeader
 VCL Reference

TStream.FixupResourceHeader

TStream 	See also

Patches the resource header for a resource that has been written to the stream.

procedure FixupResourceHeader(FixupInfo: Integer);

Description

Do not call FixupResourceHeader, it is used internally. The WriteDescendentRes method calls FixupResourceHeader after writing a component to the stream. This method then uses the current position to determine the size of the resource just written and adjust the resource header accordingly.

The FixupInfo parameter is the value returned by WriteResourceHeader when it writes the resource header (before WriteDescendentRes streams out the component).


TStream.Read
 VCL Reference

TStream.Read

TStream	See also

Introduces an abstract method responsible for reading from the stream.

function Read(var Buffer; Count: Longint): Longint; virtual; abstract;

Description

Each descendant stream object defines a Read method that reads data from its particular storage medium (such as memory or a disk file).

Read is used in cases where the number of bytes to read from the stream is not necessarily fixed. It attempts to read up to Count bytes into buffer and returns the number of bytes actually read.

All the other data-reading methods of a stream (ReadBuffer, ReadComponent) call Read to do their actual reading.


TStream.ReadBuffer
 VCL Reference

TStream.ReadBuffer

TStream	See also

Reads bytes from the stream into Buffer.

procedure ReadBuffer(var Buffer; Count: Longint);

Description

Use ReadBuffer to read Count bytes from the stream into a buffer in cases where the number of bytes is known and fixed, for example when reading in structures. ReadBuffer is used internally for loading from a stream and copying from a stream.

ReadBuffer calls Read to do the actual reading. If Count bytes cannot be read from the stream, an EReadError exception is raised.


TStream.ReadComponent
 VCL Reference

TStream.ReadComponent

TStream	See also	Example

Initiates streaming of components and their properties.

function ReadComponent(Instance: TComponent): TComponent;

Description

ReadComponent is called indirectly by the global routine ReadComponentRes, by the ReadComponentRes method, or it can be called directly to initiate component streaming.

ReadComponent reads data values from the stream and assigns them to Instance’s properties. It then constructs a reader object and calls the reader’s ReadRootComponent method to read Instance’s property values and construct child objects defined in the stream as children of the Instance. ReadComponent returns the component.

If Instance is nil, ReadComponent constructs a component based on the type information in the stream and returns the newly-constructed component.


TStream.ReadComponentRes
 VCL Reference

TStream.::ReadComponentRes

TStream	See also

Reads components and their properties from a stream in a Windows resource file format.

function ReadComponentRes(Instance: TComponent): TComponent;

Description

ReadComponentRes is called automatically by the global routine ReadComponentResFile. It can also be called directly if the current position of the stream points to a component written using the WriteComponentRes method.

ReadComponentResFile creates a file stream object, which then calls its ReadComponentRes method.

ReadComponentRes first calls the ReadResHeader method to read a resource header from the stream. If the stream does not contain a resource header at the current position, ReadResHeader will raise an EInvalidImage exception. ReadComponentRes then calls ReadComponent to read the properties that must be set on Instance.


TStream.ReadResHeader
 VCL Reference

TStream.::ReadResHeader

TStream	See also

Reads a Windows resource-file header from the stream.

procedure ReadResHeader;

Description

Do not call ReadResHeader directly. It is called automatically by ReadComponentRes before reading a component from a resource file.

After reading the resource-file header, ReadResHeader moves the current position of the stream to just beyond the header. If the stream does not contain a valid resource-file header, ReadResHeader raises an EInvalidImage exception.


TStream.Seek
 VCL Reference

TStream.Seek

TStream	See also

Moves to a specified position in the streamed resource.

function Seek(Offset: Longint; Origin: Word): Longint; overload; virtual;

function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; overload; virtual;

Description

Call Seek to move the current position of the stream in its particular storage medium (such as memory or a disk file).

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:

Value	Meaning

soFromBeginning	Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position in the resource. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file.

Seek returns the new value of the Position property.

Seek is called by the Position and Size properties.

Note:	As implemented in TStream, the two versions (the 32-bit or 64-bit syntax) call each other. Descendant stream classes must override at least one of these versions, and the override must not call the inherited default implementation.


TStream.SetSize
 VCL Reference

TStream.SetSize

TStream

Provides a placeholder for a method to change the size of the streamed resource.

procedure SetSize(NewSize: Longint); overload; virtual;

procedure SetSize(const NewSize: Int64); overload; virtual;

Description

SetSize does nothing in TStream. Descendant stream classes can override this method to set the Size property of their objects. SetSize is the write procedure for the Size property.

Note:	SetSize is introduced in TStream, even though it does nothing, because it is not possible to change the definition of a property in a descendant class. SetSize must therefore be introduced when Size is introduced.


TStream.Write
 VCL Reference

TStream.Write

TStream	See also

Introduces a pure virtual method for writing to the stream.

function Write(const Buffer; Count: Longint): Longint; virtual; abstract;

Description

Each descendant stream object defines a Write method that writes data to its particular storage medium (such as memory or a disk file). Write attempts to write up to Count bytes from Buffer, and returns the number of bytes actually written.

All the other data-writing methods of a stream (WriteBuffer, WriteComponent) call Write to do their actual writing.


TStream.WriteBuffer
 VCL Reference

TStream.WriteBuffer

TStream	See also

Writes Count bytes from Buffer onto the stream and advances the current position of the stream by Count bytes.

procedure WriteBuffer(const Buffer; Count: Longint);

Description

Use WriteBuffer to save data to a stream. WriteBuffer and ReadBuffer are used in cases where the number of bytes is known and required, for example when reading in structures. Use WriteBuffer for standard file I/O streaming.

WriteBuffer is used internally for writing to a stream and copying from a stream. It is used by other objects, such as strings and lists, for writing strings stored in a buffer.

WriteBuffer calls Write to handle the actual writing. If the stream fails to write all the requested bytes, an EWriteError exception is raised.


TStream.WriteComponent
 VCL Reference

TStream.WriteComponent

TStream	See also	Example

Initiates the writing of components and their properties to a stream.

procedure WriteComponent(Instance: TComponent);

Description

WriteComponent is used internally in the Delphi component streaming system, but can also be called directly when writing components to memory streams or database blobs.

WriteComponent constructs a writer object and calls its WriteRootComponent method to write the component specified by Instance, and its owned objects, to the stream.


TStream.WriteComponentRes
 VCL Reference

TStream.::WriteComponentRes

TStream	See also

Writes components and their properties to a stream from a Windows resource file format.

procedure WriteComponentRes(const ResName: string; Instance: TComponent);

Description

WriteComponentRes is used internally in the VCL streaming system, but can also be called directly when sending data to other applications on disk. WriteComponentRes is used for streaming components that need data, such as a bitmap or icon to be stored in a Windows resource-file format.

WriteComponentRes calls WriteDescendentRes, passing in nilNULL as the Ancestor. Therefore, WriteDescendentRes initiates the remainder of the streaming process for a component that, in this case, is not a descendant.

To read a component written with WriteComponentRes, call the ReadComponentRes method.


TStream.WriteDescendent
 VCL Reference

TStream.WriteDescendent

TStream	See also

Streams components and their properties in inherited forms.

procedure WriteDescendent(Instance, Ancestor: TComponent); virtual;

Description

Do not call WriteDescendent directly. WriteDescendent is called automatically by WriteComponent.

WriteDescendent constructs a writer object, then calls the writer object's WriteDescendent method to write the component passed in Instance to the stream. Instance is either an inherited form descended from Ancestor or nil. However, WriteDescendent is never used to write owned components, only to initiate streaming on the root component.


TStream.WriteDescendentRes
 VCL Reference

TStream.::WriteDescendentRes

TStream	See also

Streams components and their properties in inherited forms.

procedure WriteDescendentRes(const ResName: string; Instance, Ancestor: TComponent);

Description

Do not call WriteDescendentRes directly. WriteDescendentRes is called automatically by WriteComponentRes.

WriteDescendentRes writes a standard Windows resource-file header to the stream, using the resource name passed in ResName as the name of the resource. It then calls WriteDescendent to write Instance to the stream as a descendant of Ancestor.


TStream.WriteResourceHeader
 VCL Reference

TStream.::WriteResourceHeader

TStream 	See also

Writes a standard Windows resource-file header to the stream.

procedure WriteResourceHeader(const ResName: string; out FixupInfo: Integer);

Description

Do not call WriteResourceHeader, it is used internally. The WriteDescendentRes method calls WriteResourceHeader before writing a component to the stream. This method writes the standard Windows resource-file header, using the value passed as ResName for the name of the resource. It returns a position in FixupInfo that must be used to adjust the header after the size of the resource is known. WriteDescendentRes calls FixupResourceHeader with the value returned as FixupInfo after streaming out the component.


Hierarchy

TObject

TStream


TStringGridStrings
 VCL Reference

TStringGridStrings

Hierarchy	Properties	Methods	See also

TStringGridStrings maintains a list of the strings that appear in the cells of a string grid.

Unit

Grids

Description

Do not use TStringGridStrings directly in an application. It is tailored to work with a TStringGrid object, and is created by the string grid to represent the strings (and associated objects) in a row or column of the grid.


 VCL Reference

TStringGridStrings properties

TStringGridStrings	Alphabetically	Legend

In TStringGridStrings

Count

Objects

Strings

Derived from TStrings

Capacity

CommaText

DelimitedText

Delimiter

Names

QuoteChar

StringsAdapter

Text

Values


 VCL Reference

TStringGridStrings properties

TStringGridStrings	By object	Legend

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

Values


TStringGridStrings.Count
 VCL Reference

TStringGridStrings.Count

TStringGridStrings	See also

Indicates the number of entries in the Strings property array.

property Count: Integer;

Description

Use Count to determine the number of strings managed by the instance of TStringGridStrings. If the TStringGridStrings object represents the strings in a row of the grid, Count is the number of columns in the grid. If the TStringGridStrings object represents the strings in a column of the grid, Count is the number of rows in the grid.


TStringGridStrings.Objects
 VCL Reference

TStringGridStrings.Objects

TStringGridStrings	See also

Lists the objects associated with the strings listed by the Strings property.

property Objects[Index: Integer]: TObject;

Description

Use Objects to obtain the object associated with a string in the Strings array. Set Objects to associate an object with one of the strings in the Strings array. Each entry in the Objects array points to the same object as the entry for the corresponding cell in the Objects property array of the string grid.

Note:	The TStringGridStrings object does not own the objects in the Objects array. Objects added to the Objects array still exist even if the TStringGridStrings object is destroyed. They must be explicitly destroyed by the application.


TStringGridStrings.Strings
 VCL Reference

TStringGridStrings.Strings

TStringGridStrings	See also

Lists the strings displayed in the row or column of the string grid that is represented by the TStringGridStrings object.

property Strings[Index: Integer]: string;

Description

Use Strings to read or set the string for one of the cells in the row or column represented by the TStringGridStrings object. Each string appears in the corresponding cell of the string grid. To locate the object associated with the string, use the Objects property array.


 VCL Reference

TStringGridStrings methods

TStringGridStrings	Alphabetically	Legend

In TStringGridStrings

Add

Assign

Clear

Create

Delete

Insert

Derived from TStrings

AddObject

AddStrings

Append

BeginUpdate

Destroy

EndUpdate

Equals

Exchange

GetText

IndexOf

IndexOfName

IndexOfObject

InsertObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStringGridStrings methods

TStringGridStrings	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText


TStringGridStrings.Add
 VCL Reference

TStringGridStrings.Add

TStringGridStrings	See also

Replaces the first empty string with a specified string.

function Add(const S: string): Integer; override;

Description

Call Add to add a string to the list. Add searches the list for an empty string and replaces it with S. It then returns the index where it added S to the list. If there are no empty strings in the list, Add does not add S to the list and returns –1.


TStringGridStrings.Assign
 VCL Reference

TStringGridStrings.Assign

TStringGridStrings	See also

Copies the list of strings and objects from another TStrings object.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to copy the strings and objects from a source object of type TStrings. If the source object has more strings than the number of cells in the row or column represented by the TStringGridStrings object, Assign only copies the first Count strings and objects.

If the Source parameter is not a TStrings object, Assign calls the inherited method.


TStringGridStrings.Clear
 VCL Reference

TStringGridStrings.Clear

TStringGridStrings	See also

Replaces all strings in the list with empty strings.

procedure Clear; virtual; abstract;

Description

Call Clear to remove all strings from the list, including any references to associated objects. Clear replaces every string with an empty string and every object reference with nil.

Note that Clear does not free the objects that are associated with strings in the list.


TStringGridStrings.Create
 VCL Reference

TStringGridStrings.Create

TStringGridStrings	See also

Creates an instance of TStringGridStrings.

constructor Create(AGrid: TStringGrid; AIndex: Longint);

Description

Do not create instances of TStringGridStrings. String grids create TStringGridStrings objects for every row and column, to allow quick access of the strings and objects associated with the cells in the grid.

The AGrid parameter specifies the string grid that will use the TStringGridStrings object. The AIndex parameter specifies the index of the row or column associated with the TStringGridStrings object. If AIndex is greater than 0, the TStringGridStrings object represents the row indexed by AIndex. If AIndex is less than 0, the TStringGridStrings object represents the column indexed by the absolute value of AIndex.   If AIndex is 0, the TStringGridStrings object represents an empty row or column.


TStringGridStrings.Delete
 VCL Reference

TStringGridStrings.Delete

TStringGridStrings	See also

Prevents strings from being deleted.

procedure Delete(Index: Integer); override;

Description

Because TStringGridStrings objects represent the rows or columns of a string grid, the number of entries in the list must correspond exactly to the number of cells in the corresponding row or column. Rather than allow entries to be deleted, destroying this correspondence, Delete raises an EInvalidGridOperation exception.


TStringGridStrings.Insert
 VCL Reference

TStringGridStrings.Insert

TStringGridStrings	See also

Prevents strings from being inserted.

procedure Insert(Index: Integer; const S: string); override;

Description

Because TStringGridStrings objects represent the rows or columns of a string grid, the number of entries in the list must correspond exactly to the number of cells in the corresponding row or column. Rather than allow entries to be inserted, destroying this correspondence, Insert raises an EInvalidGridOperation exception.


Hierarchy

TObject

TPersistent

TStrings

TStringGridStrings


TStrings
 VCL Reference

TStrings

Hierarchy	Properties	Methods	Using TStrings	See also

TStrings is the base class for objects that represent a list of strings.

Unit

Classes

Description

Derive a class from TStrings to store and manipulate a list of strings. TStrings contains abstract methods and should not be directly instantiated.

Descendants of TStrings can represent several individual strings, such as the individual lines that appear in a list box. Some objects use descendants of TStrings to represent one long body of text so that it can be manipulated in smaller chunks.

TStrings introduces many properties and methods to

Add or delete strings at specified positions in the list.

Rearrange the strings in the list.

Access the string at a particular location.

Read the strings from or write the strings to a file or stream.

Associate an object with each string in the list.


 VCL Reference

TStrings properties

TStrings	Alphabetically	Legend

In TStrings

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

UpdateCount

Values


 VCL Reference

TStrings properties

TStrings	By object	Legend

Capacity

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

StringsAdapter

Text

UpdateCount

Values


TStrings.Capacity
 VCL Reference

TStrings.Capacity

TStrings	See also

Indicates the number of strings the TStrings object can hold.

property Capacity: Integer;

Description

Read Capacity to determine the currently allocated size of the string list. For the TStrings object, reading Capacity returns the Count property, and setting Capacity does nothing. Descendants of TStrings can override this property to allow a string list to allocate memory for entries that have not been added to the list.


TStrings.CommaText
 VCL Reference

TStrings.CommaText

TStrings	See also

Lists the strings in the TStrings object in system data format (SDF).

property CommaText: string;

Description

Use CommaText to get or set all the strings in the TStrings object in a single comma-delimited string.

When retrieving CommaText, any string in the list that include spaces, commas or quotes will be contained in double quotes, and any double quotes in a string will be repeated. For example, if the list contains the following strings:

Stri,ng 1

Stri"ng 2

String 3

String4

CommaText will return:

"Stri,ng 1","Stri""ng 2","String 3",String4

When assigning CommaText, the value is parsed as SDF formatted text. For SDF format, strings are separated by commas or spaces, and optionally enclosed in double quotes. Double quote marks that are part of the string are repeated to distinguish them from the quotes that surround the string. Spaces and commas that are not contained within double quote marks are delimiters. Two commas next to each other will indicate an empty string, but spaces that appear next to another delimiter are ignored. For example, suppose CommaText is set to:

"Stri,ng 1", "Stri""ng 2" , String 3,String4

The list will then contain:

Stri,ng 1

Stri"ng 2

String

3

String4

Note:	CommaText is the same as the DelimitedText property with a delimiter of ‘,’ and a quote character of ‘”’.


TStrings.Count
 VCL Reference

TStrings.Count

TStrings	See also 	Example

Introduces an abstract property to represent the number of strings in the list.

property Count: Integer;

Description

Descendants of TStrings implement a Count property to indicate the number of strings in the list.

Use the Count property when iterating over all the strings in the list, or when trying to locate the position of a string relative to the last string in the list.


TStrings.DelimitedText
 VCL Reference

TStrings.DelimitedText

TStrings	See also

Represents all the strings in the TStrings object as a single delimited string.

property DelimitedText: string;

Description

Use DelimitedText to get or set all the strings in the TStrings object in a single string.

When reading DelimitedText, the resulting value delimits individual strings in two ways: each string is surrounded (before and after) by the quote character specified by the QuoteChar property. In addition, individual strings are separated by the character specified by the Delimiter property.

When writing DelimitedText, individual strings must be separated using QuoteChar at both ends, using Delimiter as a separator, or using both these methods.

Note:	CommaText is the same as the DelimitedText property when Delimiter is ‘,’ and QuoteChar is ‘”’.


TStrings.Delimiter
 VCL Reference

TStrings.Delimiter

TStrings	See also

Specifies the delimiter used by the DelimitedText property.

property Delimiter: Char;

Description

Use Delimiter to get or set the delimiter used by the DelimitedText property. DelimitedText represents all of the strings in the TStrings object as a single string, with individual strings separated by the character that is the value of Delimiter.


TStrings.Names
 VCL Reference

TStrings.Names

TStrings	See also 	Example

Indicates the name part of strings with the form Name=Value.

property Names[Index: Integer]: string;

Description

When the list of strings for the TStrings object includes strings of the form Name=Value, read Names to access the name part of a string. Names is the name part of the string at the position indicated by Index. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on. If the string at the specified position is not of the form Name=Value, Names returns an empty string.

Strings of the form Name=Value are commonly found in .INI files. For example, here are a few strings taken from a DELPHI.INI file:

DisplayGrid=1

SnapToGrid=1

GridSizeX=8

GridSizeY=8

The strings that make up the Params property of a database component (TDatabase) have this format as well.

The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.


TStrings.Objects
 VCL Reference

TStrings.Objects

TStrings	See also	Example

Represents a set of objects that are associated one with each of the strings in the Strings property.

property Objects[Index: Integer]: TObject;

Description

Setting the Objects property for TStrings does nothing. Reading the Objects property for TStrings returns nil. Descendant classes can associate objects with the strings in the set by implementing the Objects property.

Use the Objects property of a descendant of TStrings to get or set the object associated with the string at the position indicated by Index. Index gives the position of the string associated with the object, where 0 is the first string, 1 is the second string, and so on. If a descendant of TStrings does not support the Objects property, reading this property returns nil.

Note:	The TStrings object does not own the objects in the Objects array. Objects added to the Objects array still exist even if the TStrings object is destroyed. They must be explicitly destroyed by the application.


TStrings.QuoteChar
 VCL Reference

TStrings.QuoteChar

TStrings	See also

Specifies the quote character used by the DelimitedText property.

property QuoteChar: Char;

Description

Use QuoteChar to get or set the quote character that is used to enclose individual strings in the DelimitedText and CommaText properties.


TStrings.Strings
 VCL Reference

TStrings.Strings

TStrings	See also 	Example

References the strings in the list by their positions.

property Strings[Index: Integer]: string; default;

Description

Descendants of TStrings must implement an accessor function for the Strings property to return the string at the position indicated by Index. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on.

Use the Strings property to get or set the string at a particular position. Strings is the default property of TStrings objects. The Strings identifier can be omitted when accessing the Strings property of a descendant of TStrings. For example, the following two lines of code are both acceptable and do the same thing:

MyStrings.Strings[0] := 'This is the first string';

MyStrings[0] := 'This is the first string';


TStrings.StringsAdapter
 VCL Reference

TStrings.StringsAdapter

TStrings	See also

Implements an IStringsAdapter interface that enables the TStrings object to communicate using OLE.

property StringsAdapter: IStringsAdapter;

Description

Do not use the StringsAdapter property. StringsAdapter is used internally by ActiveX controls to communicate information through an OLE interface.


TStrings.Text
 VCL Reference

TStrings.Text

TStrings	See also

Lists the strings in the TStrings object as a single string with the individual strings delimited by carriage returns and line feeds.

property Text: string;

Description

Use Text to get or set all the strings in the TStrings object in a single string delimited by carriage return, line feed pairs.

When reading Text, the strings in the list will be separated by carriage return and line feed. If any of the strings in the list contain a carriage return and line feed, the resulting value of Text will appear to contain more strings than is indicated by the Count property.

When setting Text, the value will be parsed by separating into substrings whenever a carriage return or linefeed is encountered. (The two do not need to form pairs).

If the strings in the list contain carriage return or linefeed characters, a less ambiguous format for the strings is available through the CommaText or DelimitedText property.


TStrings.UpdateCount
 VCL Reference

TStrings.UpdateCount

TStrings	See also

Indicates the number of calls to BeginUpdate that have not been matched by a call to EndUpdate.

property UpdateCount: Integer;

Description

TStrings uses UpdateCount to keep track of calls to the BeginUpdate and EndUpdate methods. Every time a call is made to BeginUpdate, TStrings increments the value of UpdateCount. Every call to EndUpdate causes TStrings to decrement UpdateCount.

When UpdateCount changes from 0 to 1, TStrings calls the SetUpdateState method with a parameter of True. When UpdateCount changes from 1 to 0, TStrings calls the SetUpdateState method with a parameter of False. This allows descendant classes to perform optimizations when handling multiple updates.


TStrings.Values
 VCL Reference

TStrings.Values

TStrings	See also

Represents the value part of a string associated with a given Name, on strings with the form Name=Value.

property Values[const Name: string]: string;

Description

When the list of strings for the TStrings object includes strings of the form Name=Value, use Values to get or set the value part of a string associated with a specific name part. If the list does not contain any strings of the proper Name=Value form, or if none of those strings matches the Name index, Values returns an empty string.

Note:	The Name index is case-insensitive. That is, Values is the value part for the first occurrence of Name or an equivalent string that differs only in case.

Strings of the form Name=Value are commonly found in .INI files. For example, here are a few strings taken from a DELPHI.INI file:

DisplayGrid=1

SnapToGrid=1

GridSizeX=8

GridSizeY=8

The strings that make up the Params property of a database component (TDatabase) have this format as well.

The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.


 VCL Reference

TStrings methods

TStrings	Alphabetically	Legend

In TStrings

Add

AddObject

AddStrings

Append

Assign

BeginUpdate

Clear

CompareStrings

DefineProperties

Delete

Destroy

EndUpdate

Equals

Error

Exchange

ExtractName

Get

GetCapacity

GetCount

GetObject

GetText

GetTextStr

IndexOf

IndexOfName

IndexOfObject

Insert

InsertObject

LoadFromFile

LoadFromStream

Move

Put

PutObject

SaveToFile

SaveToStream

SetCapacity

SetText

SetTextStr

SetUpdateState

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStrings methods

TStrings	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CompareStrings

Create

DefaultHandler

DefineProperties

Delete

Destroy

Dispatch

EndUpdate

Equals

Error

Exchange

ExtractName

FieldAddress

Free

FreeInstance

Get

GetCapacity

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetObject

GetText

GetTextStr

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

Put

PutObject

SafeCallException

SaveToFile

SaveToStream

SetCapacity

SetText

SetTextStr

SetUpdateState


TStrings.Add
 VCL Reference

TStrings.Add

TStrings	See also	Example

Adds a string at the end of the list.

function Add(const S: string): Integer; virtual;

Description

Call Add to add a string to the end of the list. Add returns the index of the new string.


TStrings.AddObject
 VCL Reference

TStrings.AddObject

TStrings	See also 	Example

Adds a string to the list, and associates an object with the string.

function AddObject(const S: string; AObject: TObject): Integer; virtual;

Description

Call AddObject to add a string and its associated object to the list. AddObject returns the index of the new string and object.

Note:	The TStrings object does not own the objects you add this way. Objects added to the TStrings object still exist even if the TStrings instance is destroyed. They must be explicitly destroyed by the application.


TStrings.AddStrings
 VCL Reference

TStrings.AddStrings

TStrings	See also	Example

Adds a group of strings to the list.

procedure AddStrings(Strings: TStrings); virtual;

Description

Call AddStrings to add the strings from another TStrings object to the list. If both the source and destination TStrings objects support objects associated with their strings, references to the associated objects will be added as well.


TStrings.Append
 VCL Reference

TStrings.Append

TStrings	See also	Example

Adds the string S to the list.

procedure Append(const S: string);

Description

Append is the same as the Add method, except that it does not return a value. Use Append when there is no need to know the index of the string after it has been added, or with descendants of TStrings for which the index returned is not meaningful.

For example, the TStrings descendant used by memo objects uses an index to determine where to insert a string, but the inserted string does not necessarily end up as a single string in the list. Part of the inserted text may become part of the previous string, and part may be broken off into a subsequent string. The index returned by Add is not meaningful in this case.

Use Append rather than Add as a parameter for a function requiring a TGetStrProc.


TStrings.Assign
 VCL Reference

TStrings.Assign

TStrings	See also	Example

Sets the strings in the list, and possibly associated objects, from a source object.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to set the value of the TStrings object from another object. If Source is of type TStrings, the list is set to the list of the source TStrings object, and if associated objects are supported, any associated objects are copied from the Source as well.

If Source is not of type TStrings, the inherited Assign will set the value of the list from any object that supports TStrings in its AssignTo method.


TStrings.BeginUpdate
 VCL Reference

TStrings.BeginUpdate

TStrings	See also 	Example

Enables the TStrings object to track when the list of strings is changing.

procedure BeginUpdate;

Description

BeginUpdate is called automatically by any property or method that changes the list of strings. Once the changes are complete, the property or method calls EndUpdate. Call BeginUpdate before directly modifying the strings in the list, and EndUpdate after. When implementing properties or methods that change the list in descendants of TStrings, call BeginUpdate before the changes are made, and EndUpdate when the changes are complete.

TStrings simply keeps track of when the list of strings is being changed. Some descendants of TStrings use this information to perform certain actions, such as telling a control to repaint, when updates are complete.


TStrings.Clear
 VCL Reference

TStrings.Clear

TStrings	See also 	Example

Introduces an abstract method to empty the list and any associated objects.

procedure Clear; virtual; abstract;

Description

Descendants of TStrings implement a Clear method to delete all the strings in the list, and to remove any references to associated objects.


TStrings.CompareStrings
 VCL Reference

TStrings.CompareStrings

TStrings	See also

Compares two strings.

function CompareStrings(const S1, S2: string): Integer; virtual;

Description

TStrings uses CompareStrings internally to compare the values of strings that appear in the list. For example, the IndexOf and IndexOfName methods use CompareStrings to compare a specified string with the strings in the list.

S1 and S2 are the strings to compare.

CompareStrings returns a value less than 0 if S1 < S2, 0 if S1 = S2, and a value greater than 0 if S1 > S2.

As implemented in TStrings, CompareStrings uses the global AnsiCompareText function, which compares strings case insensitively. Some descendant classes override this method to change the way strings are compared (for example, to introduce case sensitivity).


TStrings.DefineProperties
 VCL Reference

TStrings.DefineProperties

TStrings	See also

Reads and writes the Strings property as if it were published.

procedure DefineProperties(Filer: TFiler); override;

Description

TStrings overrides DefineProperties so that the strings in the list can be loaded and saved with a form file as if the Strings property were published.


TStrings.Delete
 VCL Reference

TStrings.Delete

TStrings	See also

Introduces an abstract method to delete a specified string from the list.

procedure Delete(Index: Integer); virtual; abstract;

Description

Descendants of TStrings implement a Delete method to remove a specified string from the list. If an object is associated with the string, the reference to the object is removed as well. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on.


TStrings.Destroy
 VCL Reference

TStrings.Destroy

TStrings	See also

Destroys an instance of TStrings.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TStrings reference is not nil, and only then calls Destroy.


TStrings.EndUpdate
 VCL Reference

TStrings.EndUpdate

TStrings	See also 	Example

Enables the TStrings object to keep track of when the list of strings has finished changing.

procedure EndUpdate;

Description

EndUpdate is called automatically by any property or method that changes the list of strings. Call BeginUpdate before directly modifying the strings in the list, and EndUpdate after. When implementing properties or methods that change the list in descendants of TStrings, call BeginUpdate before the changes are made, and EndUpdate when the changes are complete.

TStrings simply keeps track of when the list of strings is being changed. Some descendants of TStrings use this information to perform certain actions, such as telling a control to repaint, when updates are complete.


TStrings.Equals
 VCL Reference

TStrings.Equals

TStrings	See also

Compares the list of strings to the list from another TStrings object and returns True if the two lists match.

function Equals(Strings: TStrings): Boolean;

Description

Call Equals to compare the lists in two TStrings objects. Equals compares only the strings, not any references to associated objects. Equals returns True if the lists for both TStrings objects have the same number of strings and the strings in each list match when compared using the protected CompareStrings method. Equals returns False if the lists are different in length, if they contain different strings, or if the order of the strings in the two lists differ.


TStrings.Error
 VCL Reference

TStrings.Error

TStrings	See also

Raises an EStringListError exception.

procedure Error(Msg: PResStringRec; Data: Integer); overload;

procedure Error(const Msg: string; Data: Integer); overload;

Description

TStrings calls Error internally to raise an EStringListError exception when it encounters a problem.

Msg specifies the string with a single format specifier for an integer, that appears in the exception message box. It can be either a string, or a pointer to a record that indicates the module and resource identifier for a string.

Data is an integer value that is inserted into Msg.


TStrings.Exchange
 VCL Reference

TStrings.Exchange

TStrings	See also

Swaps the position of two strings in the list.

procedure Exchange(Index1, Index2: Integer); virtual;

Description

Call Exchange to rearrange the strings in the list. The strings are specified by their index values in the Index1 and Index2 parameters. Indexes are zero-based, so the first string in the list has an index value of 0, the second has an index value of 1, and so on.

If either string has an associated object, Exchange changes the position of the object as well.


TStrings.ExtractName
 VCL Reference

TStrings.ExtractName

TStrings	See also

Returns the name portion of a string with the format Name=Value.

function ExtractName(const S: string): string;

Description

TStrings calls ExtractName internally to parse strings of the form Name=Value and obtain the Name portion.

S is the string to parse.

If S has the form Name=Value, ExtractName returns the name portion. Otherwise, ExtractName returns an empty string.


TStrings.Get
 VCL Reference

TStrings.Get

TStrings	See also

Returns a string given its index.

function Get(Index: Integer): string; virtual; abstract;

Description

Get is the protected read implementation of the Strings property.

In TStrings, Get is abstract, meaning it has no implementation. Descendant classes must override this method to return the string with the specified index.


TStrings.GetCapacity
 VCL Reference

TStrings.GetCapacity

TStrings	See also

Returns the currently allocated size of the list of strings.

function GetCapacity: Integer; virtual;

Description

GetCapacity is the protected read implementation of the Capacity property. In TStrings, GetCapacity returns the value of the Count property. Descendants of TStrings can override this property to let a string list allocate memory for entries that have not been added to the list.


TStrings.GetCount
 VCL Reference

TStrings.GetCount

TStrings	See also

Returns the number of strings in the list

function GetCount: Integer; virtual; abstract;

Description

GetCount is the protected read implementation of the Count property.

In TStrings, GetCount is abstract, meaning it has no implementation. Descendant classes must override this method to return the number of strings that have been added to the list.


TStrings.GetObject
 VCL Reference

TStrings.GetObject

TStrings	See also

Returns the object associated with the string at a specified index.

function GetObject(Index: Integer): TObject; virtual;

Description

GetObject is the protected read implementation of the Objects property.

Index is the index of the string with which the object is associated.

In TStrings, GetObject always returns nil. This provides a default implementation for descendants that do not support associating objects with the strings in the list. Descendants that support this feature override GetObject to return the specified object.


TStrings.GetText
 VCL Reference

TStrings.GetText

TStrings	See also

Allocates a text buffer and fills it with the value of the Text property.

function GetText: PChar; virtual;

Description

Call GetText to obtain a dynamically allocated character buffer containing all of the strings in the list. Individual strings are separated by a carriage return and line feed. The caller is responsible for freeing the returned value using the StrDispose procedure.


TStrings.GetTextStr
 VCL Reference

TStrings.GetTextStr

TStrings	See also

Returns the value of the Text property.

function GetTextStr: string; virtual;

Description

GetTextStr is the protected read implementation of the Text property. It returns a string that lists all the strings in the list, with individual strings separated by a carriage return and line feed.


TStrings.IndexOf
 VCL Reference

TStrings.IndexOf

TStrings	See also 	Example

Returns the position of a string in the list.

function IndexOf(const S: string): Integer; virtual;

Description

Call IndexOf to obtain the position of the first occurrence of the string S, or of a string that differs from S only by case. IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string is not in the string list, IndexOf returns -1.

Note:	If the string appears in the list more than once, IndexOf returns the position of the first occurrence.


TStrings.IndexOfName
 VCL Reference

TStrings.IndexOfName

TStrings	See also 	Example

Returns the position of the first string with the form Name=Value with the specified name part.

function IndexOfName(const Name: string): Integer; virtual;

Description

Call IndexOfName to locate the first occurrence of a string with the form Name=Value where the name part is equal to the Name parameter or differs only in case. IndexOfName returns the 0-based index of the string. If no string in the list has the indicated name, IndexOfName returns -1.

Strings of the form Name=Value are commonly found in .INI files. For example, here are a few strings taken from a DELPHI.INI file:

DisplayGrid=1

SnapToGrid=1

GridSizeX=8

GridSizeY=8

The strings that make up the Params property of a database component (TDatabase) have this format as well.

The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.

Note:	If there is more than one string with a name portion matching the Name parameter, IndexOfName returns the position of the first such string.


TStrings.IndexOfObject
 VCL Reference

TStrings.IndexOfObject

TStrings	See also

Returns the index of the first string in the list associated with a given object.

function IndexOfObject(AObject: TObject): Integer;virtual;

Description

Call IndexOfObject to locate the first string in the list associated with the object AObject. Specify the object you want to locate as the value of the AObject parameter. IndexOfObject returns the 0-based index of the string and object. If the object is not associated with any of the strings, IndexOfObject returns -1.


TStrings.Insert
 VCL Reference

TStrings.Insert

TStrings	See also

Introduces an abstract method to insert a string at a specified position.

procedure Insert(Index: Integer; const S: string); virtual; abstract;Description

Descendants of TStrings implement an Insert method to add the string S to the list at the position specified by Index. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on.

All methods that add strings to the list use the Insert method to add the string.

If the string has an associated object, use the InsertObject method instead.


TStrings.InsertObject
 VCL Reference

TStrings.InsertObject

TStrings	See also 	Example

Inserts a string into the list at the specified position, and associates it with an object.

procedure InsertObject(Index: Integer; const S: string; AObject: TObject) virtual;

Description

Call InsertObject to insert the string S into the list at the position identified by Index, and associate it with the object AObject. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on.


TStrings.LoadFromFile
 VCL Reference

TStrings.LoadFromFile

TStrings	See also	Example

Fills the list with the lines of text in a specified file.

procedure LoadFromFile(const FileName: string); virtual;

Description

Call LoadFromFile to fill the list of the TStrings object from the file specified by FileName. Each line in the file, as indicated by carriage return or linefeed characters, is appended as a string in the list.

Note:	LoadFromFile uses the Add method to add the strings that are read from the file.


TStrings.LoadFromStream
 VCL Reference

TStrings.LoadFromStream

TStrings	See also	Example

Fills the list with lines of text read from a stream.

procedure LoadFromStream(Stream: TStream); virtual;

Description

Call LoadFromStream to fill the list of the TStrings object from the stream specified by Stream. The text read from the stream is parsed into strings separated by carriage return or linefeed characters. Thus, LoadFromStream reads the value of the Text property.

If the stream is a file stream, LoadFromStream does the same thing as LoadFromFile, except the application must create and destroy the file stream.


TStrings.Move
 VCL Reference

TStrings.Move

TStrings	See also 	Example

Changes the position of a string in the list.

procedure Move(CurIndex, NewIndex: Integer); virtual;

Description

Use Move to move the string at position CurIndex so that it occupies the position NewIndex. The positions are specified as 0-based indexes. For example, the following line of code moves the string in the first position to the last position.

MyStringsObject.Move(0, MyStringsObject.Count - 1);

If the string has an associated object, the object remains associated with the string in its new position.


TStrings.Put
 VCL Reference

TStrings.Put

TStrings	See also

Changes the value of the string with a specified index.

procedure Put(Index: Integer; const S: string); virtual;

Description

Put is the protected write implementation of the Strings property.

Put changes the value of the string with the index specified by Index to S. Put does not change the object at the specified position. That is, any object associated with the previous string becomes associated with the new string.


TStrings.PutObject
 VCL Reference

TStrings.PutObject

TStrings	See also

Changes the object associated with the string at a specified index.

procedure PutObject(Index: Integer; AObject: TObject); virtual;

Description

PutObject is the protected write implementation of the Objects property.

As implemented in TStrings, PutObject does nothing. This provides a default implementation for descendants that do not support associating objects with the strings in the list. Descendants that support this feature override PutObject to change the specified object.


TStrings.SaveToFile
 VCL Reference

TStrings.SaveToFile

TStrings	See also	Example

Saves the strings in the list to the specified file.

procedure SaveToFile(const FileName: string); virtual;

Description

Call SaveToFile to save the strings in the list to the file specified by FileName. Each string in the list is written to a separate line in the file.


TStrings.SaveToStream
 VCL Reference

TStrings.SaveToStream

TStrings	See also

Writes the value of the Text property to a stream object.

procedure SaveToStream(Stream: TStream); virtual;

Description

Call SaveToStream to save the strings in the list to the stream specified by the Stream parameter. SaveToStream writes the strings delimited by carriage return, line feed pairs. If the stream is a file stream, SaveToStream does the same thing as SaveToFile, except the application must create and destroy the file stream.


TStrings.SetCapacity
 VCL Reference

TStrings.SetCapacity

TStrings	See also

Changes the amount of memory allocated to hold strings in the list.

procedure SetCapacity(NewCapacity: Integer); virtual;

Description

SetCapacity is the protected read implementation of the Capacity property.

Integer is the number of strings the list can hold after the capacity has changed.

In TStrings, SetCapacity does nothing. Descendant classes override this method to change the number of strings that the list can hold. For descendant classes that implement SetCapacity, assigning a value smaller than Count removes strings from the end of the list. Assigning a value greater than Count allocates space for more strings to be added.


TStrings.SetText
 VCL Reference

TStrings.SetText

TStrings	See also

Sets the Text property.

procedure SetText(Text: PChar); virtual;

Description

Call SetText to replace the list with the strings specified by the Text parameter. SetText adds strings one at a time to the list, using the carriage returns or linefeed characters in Text as delimiters indicating when to add a new string.


TStrings.SetTextStr
 VCL Reference

TStrings.SetTextStr

TStrings	See also

Sets the Text property.

procedure SetTextStr(const Value: string); virtual;

Description

GetTextStr is the protected write implementation of the Text property. It replaces the list with the strings specified by the Value parameter. SetTextStr adds strings one at a time to the list, using the carriage returns or linefeed characters in Value as delimiters indicating when to add a new string.


TStrings.SetUpdateState
 VCL Reference

TStrings.SetUpdateState

TStrings	See also

Performs internal adjustments before or after a series of updates.

procedure SetUpdateState(Updating: Boolean); virtual;

Description

SetUpdateState is called at the beginning or end of a series of updates. When the BeginUpdate method is first called and the TStrings object is not already in the middle of an update, TStrings calls SetUpdateState internally, with Updating set to True. When the EndUpdate method is called and it cancels out the last unmatched call to BeginUpdate, TStrings calls SetUpdateState internally, with Updating set to False.

As implemented in TStrings, SetUpdateState does nothing. Descendant classes can override this method to optimize the response to updates.


Hierarchy

TObject

TPersistent

TStrings


TStringStream
 VCL Reference

TStringStream

Hierarchy	Properties	Methods	See also

TStringStream provides file-like access to information stored as a long string.

Unit

Classes

Description

Use TStringStream to store data as a long string enhanced with I/O capabilities. TStringStream is useful as an intermediary object that can hold text as well as read it from or write it to another storage medium. TStringStream provides a mechanism for manipulating text that is obtained from a less accessible medium.


 VCL Reference

TStringStream properties

TStringStream	Alphabetically	Legend

In TStringStream

DataString

Size

Derived from TStream

Position


 VCL Reference

TStringStream properties

TStringStream	By object	Legend

DataString

Position

Size


TStringStream.DataString
 VCL Reference

TStringStream.DataString

TStringStream	See also	Example

Provides direct access to the string that stores the text represented by the TStringStream object.

property DataString: string;

Description

Use DataString to get access to the text of the stream. The text represents the information that is being transferred by means of the string stream. Size is the number of bytes in the string, and Position is the current position within DataString.

Note:	DataString is a read-only property. DataString can be used to change the contents of the string, but applications can’t change the DataString itself.


TStringStream.Size
 VCL Reference

TStringStream.Size

TStringStream	See also

Indicates the length of the string that stores the text.

property Size: Longint;

Description

Read Size to determine how many bytes are used to store the value of DataString. Set Size to truncate the text or to increase the length of DataString. If Size is set to a value greater than the current length of the text, the content of the new bytes is undefined.


 VCL Reference

TStringStream methods

TStringStream	Alphabetically	Legend

In TStringStream

Create

Read

ReadString

Seek

Write

WriteString

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStringStream methods

TStringStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

ReadString

SafeCallException

Seek

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

WriteString


TStringStream.Create
 VCL Reference

TStringStream.Create

TStringStream	See also

Creates an instance of TStringStream.

constructor Create(AString: string);

Description

Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.


TStringStream.Read
 VCL Reference

TStringStream.Read

TStringStream	See also

Reads up to Count bytes from the string stream into Buffer, and advances the current position of the stream by the number of bytes read.

function Read(var Buffer; Count: Longint): Longint; override;

Description

Use Read to read the contents of the string stream into a buffer, starting at the current position. If Count extends beyond the end of the DataString, Read will only transfer the characters up to the end of the DataString, and advances the current position accordingly. If the return value is less than Count, it means that the end of the string was read.

The ReadBuffer method and ReadComponent method call Read to do the actual reading.

Note:	Read treats Count as an upper bound. The ReadBuffer method, by contrast, raises an exception if Count bytes cannot be read.


TStringStream.ReadString
 VCL Reference

TStringStream.ReadString

TStringStream	See also

Returns a string that consists of up to Count bytes from the current position in the string stream, and advances the current position of the stream by the number of bytes read.

function ReadString(Count: Longint): string;

Description

Use Read to read the contents of the string stream into a string, starting at the current position. If Count extends beyond the end of the DataString, the returned string will only contain the characters up to the end of DataString, and the current position is advanced accordingly.

Note:	ReadString does the same thing as Read, except that it returns a string rather than filling a buffer.


TStringStream.Seek
 VCL Reference

TStringStream.Seek

TStringStream	See also	Example

Moves the current position in the stream by Offset bytes, relative to a specified origin.

function Seek(Offset: Longint; Origin: Word): Longint; override;

Description

Use Seek to move the current position within the string stream by the indicated offset. Seek allows an application to read from or write to a particular location within the DataString.

If Offset is a negative number, the seek is backwards from the specified origin. The following table shows the different values of Origin and their meanings for seeking.

Value	Meaning

soFromBeginning	Offset is from the beginning of DataString. Seek moves to the position Offset. Offset must be >= 0.

soFromCurrent	Offset is from the current position. Seek moves to Position + Offset.

soFromEnd	Offset is from the end of Memory. Offset must be <= 0 to indicate a number of bytes before the end of the DataString.

Seek returns the new value of the Position property.


TStringStream.Write
 VCL Reference

TStringStream.Write

TStringStream	See also

Write writes Count bytes from Buffer to the current position in the string stream and updates the current position by Count bytes.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to replace the end of the string from the current position on with the first Count bytes of Buffer. Write will change the Size property to reflect the new length of the DataString.

Write always writes Count bytes from Buffer, even if a null character is included as one of the Count bytes. Thus, Write is equivalent to the WriteBuffer method.


TStringStream.WriteString
 VCL Reference

TStringStream.WriteString

TStringStream	See also

Concatenates a specified string to the current position in the string stream, and updates the current position accordingly.

procedure WriteString(const AString: string);

Description

Use WriteString to replace the end of the string from the current position on with the string specified by the AString parameter. WriteString changes the Size property to reflect the new length of the DataString.


Hierarchy

TObject

TStream

TStringStream


TStreamAdapter
 VCL Reference

TStreamAdapter

Hierarchy	Properties	Methods	See also

TStreamAdapter implements the IStream interface on a TStream object.

Unit

Classes

Description

TStreamAdapter is allows a TStream object to be used as a COM-based IStream interface. TStreamAdapter is an interfaced object that implements the IStream interface. It is associated with a TStream object in the constructor, which it uses to implement the IStream methods.


 VCL Reference

TStreamAdapter properties

TStreamAdapter	Alphabetically	Legend

In TStreamAdapter

Stream

StreamOwnerShip

Derived from TInterfacedObject

RefCount


 VCL Reference

TStreamAdapter properties

TStreamAdapter	By object	Legend

RefCount

Stream

StreamOwnerShip


TStreamAdapter.Stream
 VCL Reference

TStreamAdapter.Stream

TStreamAdapter	See also

Identifies the associated TStream object that TStreamAdapter uses to implement the IStream interface.

property Stream: TStream;

Description

Read Stream to directly access the TStream object that the stream adapter represents. This object is associated with the TStream object in the TStreamAdapter constructor.


TStreamAdapter.StreamOwnership
 VCL Reference

TStreamAdapter.StreamOwnership

TStreamAdapter	See also

Specifies whether the TStreamAdapter should act as the Owner of the associated stream object.

type TStreamOwnership = (soReference, soOwned);

property StreamOwnership: TStreamOwnership;

Description

StreamOwnership indicates whether the TStreamAdapter is responsible for freeing the associated stream object. It can have the following values:

Value	Meaning

soReference	Stream is an independent object with a different Owner. The TStreamAdapter object does not free it when it is destroyed.

soOwned	Stream is owned by the stream adapter (and exists solely for the stream adapter). TStreamAdapter frees the associated stream from its own destructor.


 VCL Reference

TStreamAdapter methods

TStreamAdapter	Alphabetically	Legend

In TStreamAdapter

Clone

Commit

CopyTo

Create

Destroy

LockRegion

Read

Revert

Seek

SetSize

Stat

UnlockRegion

Write

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TStreamAdapter methods

TStreamAdapter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clone

Commit

CopyTo

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LockRegion

MethodAddress

MethodName

NewInstance

Read

Revert

SafeCallException

Seek

SetSize

Stat

UnlockRegion

Write


TStreamAdapter.Clone
 VCL Reference

TStreamAdapter.Clone

TStreamAdapter

Implements the IStream Clone method.

function Clone(out stm: IStream): HResult; virtual; stdcall;

Description

The Clone method defined by IStream returns a second IStream interface that accesses the same bytes as this IStream interface, but which operates independantly (can have its own position).

TStreamAdapter returns E_NOTIMPL to indicate that it does not support the Clone method.


TStreamAdapter.Commit
 VCL Reference

TStreamAdapter.Commit

TStreamAdapter	See also

Implements the IStream Commit method.

function Commit(grfCommitFlags: Longint): HResult; virtual; stdcall;

Description

The Commit method defined by IStream commits any changes written to a stream that is participating in a transaction.

TStreamAdapter does not implement any transaction support, but operates in direct mode. Because of this, Commit returns S_OK to indicate that all changes are already written, but does nothing else.


TStreamAdapter.CopyTo
 VCL Reference

TStreamAdapter.CopyTo

TStreamAdapter	See also

Implements the IStream CopyTo method.

function CopyTo(stm: IStream; cb: Largeint; out cbRead: Largeint; out cbWritten: Largeint): HResult; virtual; stdcall;

Description

CopyTo copies up to cb bytes from the current position in the stream to the stream specified by stm. cbRead returns the number of bytes successfully read from the associated stream. cbWritten returns the number of bytes successfully written to stm.

CopyTo returns S_OK if it successfully copied all the bytes read from Stream to the interface specified by stm. It returns E_FAIL if it could not write all the bytes read from Stream to stm. It returns E_UNEXPECTED if it encountered an exception while attempting to perform the copy operation.


TStreamAdapter.Create
 VCL Reference

TStreamAdapter.Create

TStreamAdapter	See also

Creates an instance of a TStreamAdapter object.

type TStreamOwnership = (soReference, soOwned);

constructor Create(Stream: TStream; Ownership: TStreamOwnership = soReference);

Description

Call Create to instantiate a TStreamAdapter object that implements the IStream interface using the stream object specified by Stream. Ownership initializes the StreamOwnership property, indicating whether the TStreamAdapter object is responsible for freeing the stream specified by Stream from its own destructor.


TStreamAdapter.Destroy
 VCL Reference

TStreamAdapter.Destroy

TStreamAdapter	See also

Frees the instance of TStreamAdapter.

destructor Destroy; override;

Description

Most applications do not need to explicitly free the TStreamAdapter instance. Instead, it is freed automatically when its reference count drops to 0.

If you must explicitly destroy a TStreamAdapter instance, use the Free method instead of Destoy. Free checks that the TStreamAdapter reference is not nil before calling Destroy.

Destroy frees the associated stream object (Stream property) if its StreamOwnership property is True.


TStreamAdapter.LockRegion
 VCL Reference

TStreamAdapter.LockRegion

TStreamAdapter	See also

Implements the IStream LockRegion method.

function LockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; virtual; stdcall;

Description

The LockRegion method defined by IStream restricts access in the associated stream from the position specified by libOffset to the position specified by cb. dwLockType indicates the type of restriction imposed.

TStreamAdapter does not support locking of regions, so LockRegion returns STG_E_INVALIDFUNCTION.


TStreamAdapter.Read
 VCL Reference

TStreamAdapter.Read

TStreamAdapter	See also

Implements the IStream Read method.

function Read(pv: Pointer; cb: Longint; pcbRead: PLongint): HResult; virtual; stdcall;

Description

Read reads up to cb bytes from the current position in the stream into the buffer pointed to by pv. pcbRead returns the number of bytes actually read.

Read returns S_OK if it successfully reads pcbRead bytes into the buffer. It returns STG_E_INVALIDPOINTER it can’t read because pv is nil. It returns S_FALSE if the read operation fails for any other reason.


TStreamAdapter.Revert
 VCL Reference

TStreamAdapter.Revert

TStreamAdapter	See also

Implements the IStream Revert method.

function Revert(grfRevertFlags: Longint): HResult; virtual; stdcall;

Description

The Revert method defined by IStream rolls back any changes written to a stream that is participating in a transaction.

TStreamAdapter does not implement any transaction support, but operates in direct mode. Because of this, Revert returns STG_E_REVERTED, but does nothing else.


TStreamAdapter.Seek
 VCL Reference

TStreamAdapter.Seek

TStreamAdapter	See also

Implements the IStream Seek method.

function Seek(dlibMove: Largeint; dwOrigin: Longint; out libNewPosition: Largeint): HResult; virtual; stdcall;

Description

Seek moves the current position of the stream to the position specified by dlibMove and dwOrigin. The dlibMove parameter indicates a number of bytes, and dwOrigin indicates from where the bytes are measured to locate the new position. The libNewPosition parameter returns the new position of the stream.

Seek returns S_OK if it successfully Seeks to the specified position. It returns STG_E_INVALIDFUNCTION if dlibMove is STREAM_SEEK_SET or STREAM_SEEK_END, because these types of seek operations are not supported by the TStream.Seek method. It returns STG_E_INVALIDPOINTER if the seek operation fails for any other reason.


TStreamAdapter.SetSize
 VCL Reference

TStreamAdapter.SetSize

TStreamAdapter	See also

Implements the IStream SetSize method.

function SetSize(libNewSize: Largeint): HResult; virtual; stdcall;

Description

SetSize sets the size of the stream to the number of bytes specified by libNewSize.

SetSize returns S_OK if it successfully resizes the stream to libNewSize. It returns E_FAIL if it could not resize the stream and the current size of the stream is not libNewSize on exit. It returns E_UNEXPECTED if SetSize encounters an exception while trying to set the size of the stream.


TStreamAdapter.Stat
 VCL Reference

TStreamAdapter.Stat

TStreamAdapter	See also

Implements the IStream Stat method.

type

  tagSTATSTG = record

    pwcsName: POleStr;

    dwType: Longint;

    cbSize: Largeint;

    mtime: TFileTime;

    ctime: TFileTime;

    atime: TFileTime;

    grfMode: Longint;

    grfLocksSupported: Longint;

    clsid: TCLSID;

    grfStateBits: Longint;

    reserved: Longint;

  end;

  TStatStg = tagSTATSTG;

function Stat(out statstg: TStatStg; grfStatFlag: Longint): HResult; virtual; stdcall;

Description

Stat fills out a TStatStg record with information about the stream object The grfStatFlag parameter indicates what information in the record, if any, is not needed.

Stat ignores the grfStatFlag parameter.  It always sets dwType to STGTY_STREAM, grfLocksSupported to LOCK_WRITE, and all of the TFileTime parameters to 0. It sets cbSize to the size of the stream, and leaves the remaining fields unchanged.

Stat returns S_OK if it does not encounter any exceptions filling out statstg, E_UNEXPECTED otherwise.


TStreamAdapter.UnlockRegion
 VCL Reference

TStreamAdapter.UnlockRegion

TStreamAdapter	See also

Implements the IStream UnlockRegion method.

function UnlockRegion(libOffset: Largeint; cb: Largeint; dwLockType: Longint): HResult; virtual; stdcall;

Description

The UnlockRegion method defined by IStream re-enables access in the associated stream that was previously restricted by a call to LockRegion. The region runs from the position specified by libOffset to the position specified by cb. dwLockType indicates the type of restriction to be released.

TStreamAdapter does not support locking of regions, so UnlockRegion returns STG_E_INVALIDFUNCTION.


TStreamAdapter.Write
 VCL Reference

TStreamAdapter.Write

TStreamAdapter	See also

Implements the IStream Write method.

function Write(pv: Pointer; cb: Longint; pcbWritten: PLongint): HResult; virtual; stdcall;

Description

Write writes up to cb bytes from the buffer pointed to by pv into the stream, starting at the current position. pcbWritten returns the number of bytes actually written.

Write returns S_OK if it successfully writes pcbWritten bytes into the stream. It returns STG_E_INVALIDPOINTER it can’t write because pv is nil. It returns STG_E_CANTSAVE if the write operation fails for any other reason.


Hierarchy

TObject

TInterfacedObject

TStreamAdapter


TStringGrid
 VCL Reference

 TStringGrid

Hierarchy	Properties	Methods	Events	Using TStringGrid	See also

TStringGrid represents a grid control designed to simplify the handling of strings and associated objects.

Unit

Grids

Description

Add a TStringGrid object to a form to present textual data in a tabular format. TStringGrid provides many properties to control the appearance of the grid, as well as events and methods that take advantage of the tabular organization of the grid in responding to user actions.

TStringGrid introduces the ability to associate an object with each string in the grid. These objects can encapsulate any information or behavior represented by the strings that are presented to the user.

If the strings to be presented in a grid represent field values from the records in a dataset, use TDBGrid instead.


 VCL Reference

TStringGrid properties

TStringGrid	Alphabetically	Legend

In TStringGrid

Cells

Cols

Objects

Rows

Derived from TCustomGrid

BorderStyle

Col

ColCount

ColWidths

DefaultColWidth

DefaultDrawing

DefaultRowHeight

EditorMode

FixedColor

FixedCols

FixedRows

GridHeight

GridLineWidth

GridWidth

LeftCol

Options

Row

RowCount

RowHeights

ScrollBars

Selection

TabStops

TopRow

VisibleColCount

VisibleRowCount

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStringGrid properties

TStringGrid	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Cells

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Col

ColCount

Color

Cols

ColWidths

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultColWidth

DefaultDrawing

DefaultRowHeight

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditorMode

Enabled

FixedColor

FixedCols

FixedRows

Floating

FloatingDockSiteClass

Font

GridHeight

GridLineWidth

GridWidth

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LeftCol

LRDockWidth

Name

Objects

Options

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Row

RowCount

RowHeights

Rows

ScrollBars

Selection

ShowHint

Showing

TabOrder

TabStop

TabStops

Tag

TBDockHeight

Top

TopRow

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleColCount

VisibleDockClientCount

VisibleRowCount

Width

WindowProc


TStringGrid.Cells
 VCL Reference

TStringGrid.Cells

TStringGrid	See also 	Example

Lists the strings for each cell in the grid.

property Cells[ACol, ARow: Integer]: string;

Description

Use Cells to access the string within a particular cell. ACol is the column coordinate of the cell, and ARow is the row coordinate of the cell. The first row is row zero, and the first column is column zero.

The ColCount and RowCount property values define the size of the array of strings.

To access the objects associated with the strings in the Cells array, use the Objects property.


TStringGrid.Cols
 VCL Reference

TStringGrid.Cols

TStringGrid	See also

Lists strings with their associated objects for each column.

property Cols[Index: Integer]: TStrings;

Description

Use Cols to access all the strings for a single column, along with their associated objects. The number of strings and associated objects is always equal to the value of the ColCount property, the number of columns in the grid. The Index parameter is the number of the column, where the value of the first column in the grid is zero.

To get all the strings and objects for a row, rather than for a column, use the Rows property.


TStringGrid.Objects
 VCL Reference

TStringGrid.Objects

TStringGrid	See also

Lists the objects for each cell in the grid.

property Objects [ACol, ARow: Integer]: TObject;

Description

Use the Objects property to access the object associated with a particular cell. The ColCount and RowCount values define the size of the array of objects. ACol is the column coordinate of the cell, and ARow is the row coordinate of the cell, where the first column is column 0, and the first row is row 0.

Note:	The string grid does not own the objects in the Objects array. Objects added to the Objects array still exist even if the string grid is destroyed. They must be explicitly destroyed by the application.


TStringGrid.Rows
 VCL Reference

TStringGrid.Rows

TStringGrid	See also 	Example

Lists the strings and their associated objects for each row.

property Rows[Index: Integer]: TStrings;

Description

Use Rows to access all the strings for a single row, along with their associated objects. The number of strings and associated objects is always equal to the value of the RowCount property, the number of rows in the grid. The Index parameter is the number of the row, where the value of the first row in the grid is zero.

To get all the strings and objects for a column, rather than for a row, use the Cols property.


 VCL Reference

TStringGrid events

TStringGrid	Alphabetically	Legend

Derived from TCustomDrawGrid

OnColumnMoved

OnDrawCell

OnGetEditMask

OnGetEditText

OnRowMoved

OnSelectCell

OnSetEditText

OnTopLeftChanged

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnStartDock

OnStartDrag


 VCL Reference

TStringGrid events

TStringGrid	By object	Legend

OnClick

OnColumnMoved

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawCell

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetEditMask

OnGetEditText

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheelDown

OnMouseWheelUp

OnRowMoved

OnSelectCell

OnSetEditText

OnStartDock

OnStartDrag

OnTopLeftChanged


 VCL Reference

TStringGrid methods

TStringGrid	Alphabetically	Legend

In TStringGrid

Create

Destroy

Derived from TCustomDrawGrid

CellRect

MouseToCell

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStringGrid methods

TStringGrid	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CellRect

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseToCell

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStringGrid.Create
 VCL Reference

TStringGrid.Create

TStringGrid	See also

Creates an instance of TStringGrid.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TStringGrid at runtime. For string grids placed on forms at design time, Create is called automatically.

AOwner is another component, typically a form, that becomes the grid’s Owner. The Owner is responsible for freeing the grid.


TStringGrid.Destroy
 VCL Reference

TStringGrid.Destroy

TStringGrid	See also

Destroys an instance of TStringGrid.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the string grid is not nil, and only then calls Destroy.

Destroy frees the helper objects used to manage the array of strings and their associated objects.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomDrawGrid

TDrawGrid

TStringGrid


TTextAttributes
 VCL Reference

TTextAttributes

Hierarchy	Properties	Methods	See also 	Example

TTextAttributes represents the font characteristics of a section of text in a rich edit control.

Unit

ComCtrls

Description

TTextAttributes includes a number of properties that describe the font characteristics of some text in a rich text document. TTextAttributes is tailored to allow a descendant of TCustomRichEdit to read and write the default text characteristics (via its DefAttributes property) or the characteristics of the selected text (via its SelAttributes property). The properties of a TTextAttributes object are invalid unless it is owned by a descendant of TCustomRichEdit.

Most of the font characteristics represented by a TTextAttributes object are the same as the properties of a TFont object with the same names. Applications can assign fonts to text attributes and vice versa.


 VCL Reference

TTextAttributes properties

TTextAttributes	Alphabetically	Legend

In TTextAttributes

Charset

Color

ConsistentAttributes

Height

Name

Pitch

Protected

Size

Style


 VCL Reference

TTextAttributes properties

TTextAttributes	By object	Legend

Charset

Color

ConsistentAttributes

Height

Name

Pitch

Protected

Size

Style


TTextAttributes.Charset
 VCL Reference

TTextAttributes.Charset

TTextAttributes	See also

Specifies the character set of the font.

property Charset: TFontCharset;

Description

Set Charset to identify the character set of the font. Each typeface (specified by the Name property) supports one or more character sets. Check the information supplied by the font vendor to determine what values of Charset are valid.


TTextAttributes.Color
 VCL Reference

TTextAttributes.Color

TTextAttributes	See also	Example

Indicates the foreground color of the text.

property Color: TColor;

Description

Use color to indicate the color of the actual characters. the background color is a property of the rich edit control that uses the TTextAttributes object, and should be set by the Color property of the rich edit control.


TTextAttributes.ConsistentAttributes
 VCL Reference

TTextAttributes.ConsistentAttributes

TTextAttributes	See also

Indicates which of the properties of the TTextAttributes object are consistent throughout the text of the current selection in the rich edit object.

type

  TConsistentAttribute = (caBold, caColor, caFace, caItalic, caSize, caStrikeout, caUnderline, caProtected);

  TConsistentAttributes = set of TConsistentAttribute;

property ConsistentAttributes: TConsistentAttributes;

Description

Read the ConsistentAttributes of the SelAttributes property of a rich text object to discover which of the properties of the TTextAttributes are meaningful for the current selection. This information is relevant if you want to then read the text characteristics of the current selection. Setting a property of TTextAttributes will cause that property to become a consistent attribute until the selection changes.

ConsistentAttributes is a set drawn from the following values:

Value	Meaning

caBold	Characters are consistently either bold or not bold throughout the selection.

caColor	The color of character font is consistent throughout the selection.

caFace	The typeface of the character font is consistent throughout the selection.

caItalic	Characters are consistently either italic or not italic throughout the selection.

caSize	The size of the character font is consistent throughout the selection.

caStrikeOut	Characters consistently either have the strikeout style or they do not have the strikeout style throughout the selection.

caUnderline	Characters are consistently either underlined or not underlined throughout the selection.

caProtected	Text is consistently either protected or not protected.

Note:	Use ConsistentAttributes with the SelAttributes property of the rich edit control. The ConsistentAttributes of the DefAttributes property of the rich edit control is the empty set, even though all attributes are consistent in the section of text that has the default attributes.


TTextAttributes.Height
 VCL Reference

TTextAttributes.Height

TTextAttributes	See also	Example

Specifies the height of the font in pixels.

property Height: Integer;

Description

To specify a font height in pixels, use the Height property. To specify the size of the font in points instead, use the Size property. Users usually specify font size in points within an application, while programmers are often concerned with the actual size of the font in pixels when displaying a font on the screen.

The relationship between the Height and Size properties is expressed by the formula:

Height = Size * ScreenPixelsPerInch / 72

Note:	Unlike the Height property of a TFont object, the Height property of a TTextAttributes object always includes the internal leading that appears at the top of the font.


TTextAttributes.Name
 VCL Reference

TTextAttributes.Name

TTextAttributes	See also

Specifies the typeface of the font described by the TTextAttributes object.

type

  TFontName = typestring;

property Name: TFontName;

Description

Use Name to specify the typeface of the font. Typefaces are strings of up to 32 characters used by Windows to identify a font. The Name is the identifier for the font that most font selection controls show.


TTextAttributes.Pitch
 VCL Reference

TTextAttributes.Pitch

TTextAttributes	See also

Specifies whether the characters in the font all have the same width.

type TFontPitch = (fpDefault, fpVariable, fpFixed);

property Pitch: TFontPitch;

Description

Each typeface has an associated pitch. The characters in fixed-pitch fonts are all the same width. The characters in variable-pitch fonts differ in width. Fixed pitch fonts are generally used for representing source code, because they allow the indentation to line up properly. Variable pitch fonts are generally used to give text a more natural appearance.

Here are the possible values for Pitch:

Value	Meaning

fpDefault	The font pitch is set to the default value, which depends on the font specified in the Name property.

fpFixed	The font pitch is set to fixed. All characters in the font have the same width.

fpVariable	The font pitch is set to variable. The characters in the font have different widths.

Note:	Setting the Pitch of a fixed-pitch font to fpVariable or a variable-pitch font to fpFixed will cause Windows to find what it considers the best match to all of the font characteristics that have been specified. This might have no effect on the appearance of a font, or might cause Windows to substitute a different font with the appropriate pitch. For example, setting the pitch of MS Serif (a variable-pitch font) to fpFixed causes Courier to be displayed.


TTextAttributes.Protected
 VCL Reference

TTextAttributes.Protected

TTextAttributes	See also

Indicates whether the text represented by the TTextAttributes object is protected.

property Protected: Boolean;

Description

Protected text can’t be changed by the user. When the user attempts to edit a selection that includes protected text, the rich edit control calls the OnProtectChange event handler. The OnProtectChange event handler can then permit or disallow the editing of the protected text. If there is no OnProtectChange event handler, protected text is read-only.


TTextAttributes.Size
 VCL Reference

TTextAttributes.Size

TTextAttributes	See also

Specifies the height of the font in points.

property Size: Integer;

Description

To specify a font height in points, use the Size property. To specify the size of the font in pixels instead, use the Height property. Users usually specify font size in points within an application, while programmers are usually concerned with the actual size of the font in pixels when displaying a font on the screen.

The relationship between the Height and Size properties is expressed by the formula:

Size = Height * 72 / ScreenPixelsPerInch

Note:	Unlike the Size property of a TFont object, the Size property of a TTextAttributes object always omits the internal leading that appears at the top of the font.


TTextAttributes.Style
 VCL Reference

TTextAttributes.Style

TTextAttributes	See also	Example

Determines whether the font is normal, italic, underlined, bold, or strikeout.

type

  TFontStyle = (fsBold, fsItalic, fsUnderline, fsStrikeOut);

  TFontStyles = set of TFontStyle;

property Style: TFontStyles;

Description

The Style property is a set drawn from the following values:

Value	Meaning

fsBold	The font is boldfaced.

fsItalic	The font is italicized.

fsUnderline	The font is underlined.

fsStrikeOut	The font is displayed with a horizontal line through it.

Because the Style property is a set, it can contain multiple values. For example, a font could be both boldfaced and italicized.


 VCL Reference

TTextAttributes methods

TTextAttributes	Alphabetically	Legend

In TTextAttributes

Assign

AssignTo

Create

InitFormat

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TTextAttributes methods

TTextAttributes	By object	Legend

AfterConstruction

Assign

AssignTo

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitFormat

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TTextAttributes.Assign
 VCL Reference

TTextAttributes.Assign

TTextAttributes	See also 	Example

Sets the properties of a TTextAttributes object to match the properties specified in another TTextAttributes object or in a TFont object.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to change all the text attributes at once. Assign can set the font characteristics of the selected text to match the default font characteristics or vice versa. When the Source is a TTextAttributes object, Assign matches only the Color, Name, Style, and Pitch properties. When the Source is a TFont object, Assign matches the Size as well.

Note:	Assign only succeeds at runtime when the Source is a TTextAttributes object, a TFont object, or an object that has implemented an AssignTo method that deals with the TTextAttributes object. Other source objects will raise an EConvertError exception.


TTextAttributes.AssignTo
 VCL Reference

TTextAttributes.AssignTo

TTextAttributes	See also

Enables the properties of a TTextAttributes object to be assigned to a TFont object.

procedure AssignTo(Dest: TPersistent); override;

Description

TTextAttributes overrides the inherited AssignTo to enable its font properties to be assigned to a TFont object. Applications should not call AssignTo. It is called when the Assign method of the TFont object is called. AssignTo copies the Charset, Color, Name, Style, Size, and Pitch properties to the TFont object.


TTextAttributes.Create
 VCL Reference

TTextAttributes.Create

TTextAttributes	See also

Creates an instance of TTextAttributes.

type TAttributeType = (atSelected, atDefaultText);

constructor Create(AOwner: TCustomRichEdit; AttributeType: TAttributeType);

Description

Do not call the constructor for TTextAttributes. TTextAttributes objects are created from the constructor of the rich edit control. The rich edit control uses an attribute type of atDefaultText to implement its DefAttributes property, and an attribute type of atSelected to implement its SelAttributes property.


TTextAttributes.InitFormat
 VCL Reference

TTextAttributes.InitFormat

TTextAttributes	See also

Initializes a Windows TCharFormat structure.

procedure InitFormat(var Format: TCharFormat);

Description

TTextAttributes uses the TCharFormat structure to communicate with the rich edit control window when it gets and sets properties. InitFormat initializes this structure before any particular properties are read or set. InitFormat is exposed as a protected method so that derived classes can use the TCharFormat structure in the implementation of any other text properties.


Hierarchy

TObject

TPersistent

TTextAttributes


TThreadList
 VCL Reference

TThreadList

Hierarchy	Properties	Methods	See also

TThreadList represents a thread-safe list.

Unit

Classes

Description

A TThreadList object is a thread-safe list. Each TThreadList maintains a private TList (a list of pointers to objects). You can add or remove items in a TThreadList from multiple threads without explicit locks.

To access the actual TList object managed by the thread list, first lock the list by calling the LockList method.  Unlock the list by calling the Unlock method when done.

Tip:	By default, TThreadList ignores attempts to add duplicate entries to the list. If the list is large, this default is computationally expensive. For better performance, you may want to change the Duplicates property to dupAccept where possible.


 VCL Reference

TThreadList properties

TThreadList	Alphabetically	Legend

In TThreadList

Duplicates


 VCL Reference

TThreadList properties

TThreadList	By object	Legend

Duplicates


TThreadList.Duplicates
 VCL Reference

TThreadList.Duplicates

TThreadList	See also

Indicates whether the thread list allows duplicate entries.

property Duplicates: TDuplicates;

Description

Set Duplicates to specify what should happen when an attempt is made to add a duplicate item to the list. The value of Duplicates should be one of the following.

Value	Meaning

dupIgnore	Ignore attempts to add duplicate items to the list.

dupError	Raise an EListError exception when an attempt is made to add duplicate items to the list.

dupAccept	Permit duplicate items in the list.

Set Duplicates before adding any items to the list. Setting Duplicates to dupIgnore or dupError does nothing about duplicates that are already in the list.

Note:	Setting duplicates to dupIgnore (the default) or dupError can be computationally expensive if the list has many items.


 VCL Reference

TThreadList methods

TThreadList	Alphabetically	Legend

In TThreadList

Add

Clear

Create

Destroy

LockList

Remove

UnlockList

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TThreadList methods

TThreadList	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LockList

MethodAddress

MethodName

NewInstance

Remove

SafeCallException

UnlockList


TThreadList.Add
 VCL Reference

TThreadList.Add

TThreadList

Adds an item to the list.

procedure Add(Item: Pointer);

Description

Call Add to insert a new object at the end of the thread-safe list.


TThreadList.Clear
 VCL Reference

TThreadList.Clear

TThreadList	See also

Deletes all items from the list.

procedure Clear;

Description

Clear locks the list, calls the Clear method in TList, then unlocks the list.


TThreadList.Create
 VCL Reference

TThreadList.Create

TThreadList

Creates and initializes a TThreadList instance.

constructor Create;

Description

The Create method generates a TThreadList object.


TThreadList.Destroy
 VCL Reference

TThreadList.Destroy

TThreadList	See also

Destroys the TThreadList and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the thread list is not nil, and only then calls Destroy.


TThreadList.LockList
 VCL Reference

TThreadList.LockList

TThreadList	See also	Example

Locks the thread-safe list and returns a TList object.

function  LockList: TList;

Description

LockList calls the Windows EnterCriticalSection function to lock the thread-safe list. It then returns the TList object that contains the list.


TThreadList.Remove
 VCL Reference

TThreadList.Remove

TThreadList	See also

Removes an item from the list.

procedure Remove(Item: Pointer);

Description

Call Remove to remove a specific item from the list without having to determine its index. Remove locks the list, calls the Remove method in TList, then unlocks the list.


TThreadList.UnlockList
 VCL Reference

TThreadList.UnlockList

TThreadList	See also	Example

Unlocks the thread-safe list.

procedure UnlockList;

Description

UnlockList calls the Windows LeaveCriticalSection function. Use UnlockList after LockList to allow other threads access to the list.


Hierarchy

TObject

TThreadList


TThread
 VCL Reference

TThread

Hierarchy	Properties	Methods	Events	Using TThread	See also	Example

TThread is an abstract class that enables creation of separate threads of execution in an application.

Unit

Classes

Description

Create a descendant of TThread to represent an execution thread in a multi-threaded application.  Each new instance of a TThread descendant is a new thread of execution. Multiple instances of a TThread derived class make a Delphi application multi-threaded.

When an application is run, it is loaded into memory ready for execution. At this point it becomes a process containing one or more threads that contain the data, code and other system resources for the program. A thread executes one part of an application and is allocated CPU time by the operating system. All threads of a process share the same address space and can access the process’s global variables.

Use threads to improve application performance by

Managing input from several communication devices.

Distinguishing among tasks of varying priority.  For example, a high priority thread handles time critical tasks, and a low priority thread performs other tasks.

Following are issues and recommendations to be aware of when using threads:

Keeping track of too many threads consumes CPU time; the recommended limit is 16 active threads per process on single processor systems.

When multiple threads update the same resources, they must be synchronized to avoid conflicts.

Most methods that access a VCL object and update a form must only be called from within the main VCL thread or use a synchronization object such as TMultiReadExclusiveWriteSynchronizer.

To create and use a new thread object:

Choose File | New | Thread Object to create a new unit that contains an object derived from the TThread class.

Define the thread object’s Execute method by inserting the code that should execute when the thread is executed.

Note:	See the Threads demo for multi-threading program samples.

Warning:	Exceptions that are raised but not caught in the TThread descendant’s Execute method may cause access violations when you run the application outside of the IDE.You can guard against this access violation by providing the Execute method with a try.._finally block that includes the body of that method.


 VCL Reference

TThread properties

TThread	Alphabetically	Legend

In TThread

FatalException

FreeOnTerminate

Handle

Priority

ReturnValue

Suspended

Terminated

ThreadID


 VCL Reference

TThread properties

TThread	By object	Legend

FatalException

FreeOnTerminate

Handle

Priority

ReturnValue

Suspended

Terminated

ThreadID


TThread.FatalException
 VCL Reference

TThread.FatalException

TThread	See also

Determines whether the thread object is automatically destroyed when the thread terminates.

property FatalException: TObject;

Description

If the Execute method raises an exception that is not caught and handled within that method, the thread terminates and sets FatalException to the exception object for that exception. Applications can check FatalException from an OnTerminate event handler to determine whether the thread terminated due to an exception.


TThread.FreeOnTerminate
 VCL Reference

TThread.FreeOnTerminate

TThread	See also

Determines whether the thread object is automatically destroyed when the thread terminates.

property FreeOnTerminate: Boolean;

Description

Set FreeOnTerminate to True if you don’t want to explicitly destroy threads after they finish executing. When FreeOnTerminate is False, the thread object must be explicitly destroyed in application code.

Warning:	When FreeOnTerminate is True, the Execute method may run and then free the thread before your application can execute the next line of code. Thus, you should not call any methods of the thread object when FreeOnTerminate is True unless you create the thread in a suspended state.


TThread.Handle
 VCL Reference

TThread.Handle

TThread	See also

Contains the thread's handle.

type THandle = Integer;

property Handle: THandle;

Description

Use Handle when calling Win32 API functions for thread manipulation.


TThread.Priority
 VCL Reference

TThread.Priority

TThread	See also	Example

Determines the thread's scheduling priority relative to other threads in the process.

type  TThreadPriority = (tpIdle, tpLowest, tpLower, tpNormal, tpHigher, tpHighest, tpTimeCritical);

property Priority: TThreadPriority;

Description

Priority indicates the priority used when scheduling the thread. Adjust the priority higher or lower as needed.

TThreadPriority type defines the possible values for the Priority property of the TThread component, as defined in the following table. The system schedules CPU cycles to each thread based on a priority scale; the Priority property adjusts a thread's priority higher or lower on the scale.

Values	Meaning

tpIdle	The thread executes only when the system is idle. The system will not interrupt other threads to execute a thread with tpIdle priority.

tpLowest	The thread's priority is two points below normal.

tpLower	The thread's priority is one point below normal.

tpNormal	The thread has normal priority.

tpHigher	The thread's priority is one point above normal.

tpHighest	The thread's priority is two points above normal.

tpTimeCritical	The thread gets highest priority.

Warning:	Boosting the thread priority of a CPU intensive operation may “starve” the other threads in the application. Only apply priority boosts to threads that spend most of their time waiting for external events.


TThread.ReturnValue
 VCL Reference

TThread.ReturnValue

TThread	See also

Specifies the value returned to other waiting threads when the thread finishes executing.

property ReturnValue: Integer

Description

Use ReturnValue to indicate success/failure or numeric result/output of the thread to the application or other threads. The WaitFor method returns the value stored in ReturnValue.


TThread.Suspended
 VCL Reference

TThread.Suspended

TThread	See also

Indicates whether a thread is suspended.

property Suspended: Boolean;

Description

Set Suspended to True to suspend a thread; set it to False to resume it. Suspended threads do not continue execution until they are resumed.


TThread.Terminated
 VCL Reference

TThread.Terminated

TThread	See also	Example

Indicates whether the thread has been asked to terminate.

property Terminated: Boolean;

Description

The thread's Execute method and any methods that Execute calls should check Terminated periodically and exit when it's True. The Terminate method sets the Terminated property to True.

The Terminate method is the polite way to abort the execution of a thread, but it requires cooperation from the thread’s Execute code. Using Terminate is recommended over the TerminateThread Win32 API call.


TThread.ThreadID
 VCL Reference

TThread.ThreadID

TThread	See also

Identifies the thread throughout the system.

type THandle = Integer;

property ThreadID: THandle;

Description

Use ThreadID, during debugging, to identify the thread in the Threads status box. ThreadID is also useful when calling Win32 API functions for manipulating the thread.

Note:	ThreadID is different than the thread’s handle in the Handle property.


 VCL Reference

TThread events

TThread	Alphabetically	Legend

In TThread

OnTerminate


 VCL Reference

TThread events

TThread	By object	Legend

OnTerminate


TThread.OnTerminate
 VCL Reference

TThread.OnTerminate

TThread	See also

Occurs after the thread's Execute method has returned and before the thread is destroyed.

property OnTerminate: TNotifyEvent;

Description

Write an OnTerminate event handler to execute code after the thread finishes executing. The OnTerminate event handler is called in the context of the main VCL thread, which means VCL methods and properties can be called freely.


 VCL Reference

TThread methods

TThread	Alphabetically	Legend

In TThread

AfterConstruction

Create

Destroy

DoTerminate

Execute

Resume

Suspend

Synchronize

Terminate

WaitFor

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TThread methods

TThread	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

DoTerminate

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Resume

SafeCallException

Suspend

Synchronize

Terminate

WaitFor


TThread.AfterConstruction
 VCL Reference

TThread.AfterConstruction

TThread	See also

Executes the thread when the thread is created with CreateSuspended set to Ffalse.

procedure AfterConstruction; override;

Description

AfterConstruction launches the Execute method when the thread is not created in a suspended state. By calling Execute from the AfterConstruction method rather than the constructor, TThread avoids a race condition where the thread may free itself after Execute finishes but before the main thread calls AfterConstruction.


TThread.Create
 VCL Reference

TThread.Create

TThread	See also	Example

Creates an instance of a thread object.

constructor Create(CreateSuspended: Boolean);

Description

Call Create to create a thread in an application. If CreateSuspended is False, Execute is called immediately. If CreateSuspended is True, Execute won’t be called until after Resume is called.


TThread.Destroy
 VCL Reference

TThread.Destroy

TThread	See also

Destroys the thread object and releases the memory allocated to it.

destructor Destroy; override;

Description

Do not call Destroy in an application. Instead, use Free to destroy a thread when FreeOnTerminate is False.

Destroy signals the thread to terminate and then waits for the thread to return before calling the inherited Destroy method.


TThread.DoTerminate
 VCL Reference

TThread.DoTerminate

TThread	See also

Generates an OnTerminate event.

procedure DoTerminate; virtual;

Description

DoTerminate calls the OnTerminate event handler, but does not terminate the thread.


TThread.Execute
 VCL Reference

TThread.Execute

TThread	See also	Example

Provides an abstract method that contains the code which executes when the thread is run.

procedure Execute; virtual; abstract;

Description

Override Execute and insert the code that should be executed when the thread runs. Execute is responsible for checking the value of the Terminated property to determine if the thread needs to exit.

A thread executes when Create is called if CreateSuspended set to False, or when Resume is first called after the thread is created if CreateSuspended set to True.

Note:	Do not use the properties and methods of other objects directly in the Execute method of a thread.  Instead, separate the use of other objects into a separate procedure call, and call that procedure by passing it as a parameter to the Synchronize method.


TThread.Resume
 VCL Reference

TThread.Resume

TThread	See also	Example

Restarts the execution of a suspended thread.

procedure Resume;

Description

Call Resume to cause a suspended thread to start running again. Calls to Suspend can be nested; Resume must be called the same number of times Suspend was called before the thread will resume execution.


TThread.Suspend
 VCL Reference

TThread.Suspend

TThread	See also

Pauses a running thread.

procedure Suspend;

Description

Call Suspend to temporarily halt execution of the thread. To resume execution after a call to Suspend, call Resume. Calls to Suspend can be nested; Resume must be called the same number of times Suspend was called before the thread will resume execution.


TThread.Synchronize
 VCL Reference

TThread.Synchronize

TThread	See also	Example

Executes a method call within the main VCL thread.

type TThreadMethod = procedure of object;

procedure Synchronize(Method: TThreadMethod);

Description

Synchronize causes the call specified by Method to be executed using the main VCL thread, thereby avoiding multi-thread conflicts. If you are unsure whether a method call is thread-safe, call it from within the main VCL thread by passing it to the Synchronize method.

Execution of the thread is suspended while Method is executing in the main VCL thread.

Note:	You can also protect unsafe methods using critical sections or the multi-read exclusive-write synchronizer.


TThread.Terminate
 VCL Reference

TThread.Terminate

TThread	See also

Signals the thread to terminate by setting the Terminated property to True.

procedure Terminate;

Description

Terminate sets the thread’s Terminated property to True, signaling that the thread should be terminated as soon as possible. Unlike the Windows API TerminateThread, which forces the thread to terminate immediately, the Terminate method merely requests that the thread terminate. This allows the thread to perform any cleanup before it shuts down.

For Terminate to work, the thread's Execute method and any methods that Execute calls should check Terminated periodically and exit when it's True.


TThread.WaitFor
 VCL Reference

TThread.WaitFor

TThread	See also

Waits for the thread to terminate and then returns the value of the ReturnValue property.

function WaitFor: LongWord;

Description

Call WaitFor to obtain the value of ReturnValue when the thread finishes executing. WaitFor doesn't return until the thread terminates, so the thread must exit either by finishing the Execute method or by exiting when the Terminated property is True.


Hierarchy

TObject

TThread


TTimer
 VCL Reference

 TTimer

Hierarchy	Properties	Methods	Events	Using TTimer

TTimer encapsulates the Windows API timer functions.

Unit

ExtCtrls

Description

TTimer is used to simplify calling the Windows API timer functions SetTimer and KillTimer, and to simplify processing the WM_TIMER messages. Use one timer component for each timer in the application.

The execution of the timer occurs through its OnTimer event. TTimer has an Interval property that determines how often the timer’s OnTimer event occurs. Interval corresponds to the parameter for the Windows API SetTimer function.

Caution:	Limitations on the total number of timers system-wide are system dependent.


 VCL Reference

TTimer properties

TTimer	Alphabetically	Legend

In TTimer

Enabled

Interval

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTimer properties

TTimer	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Enabled

Interval

Name

Owner

Tag

VCLComObject


TTimer.Enabled
 VCL Reference

TTimer.Enabled

TTimer	See also	Example

Controls whether the timer generates OnTimer events periodically.

property Enabled: Boolean;

Description

Use Enabled to enable or disable the timer. If Enabled is True, the timer responds normally. If Enabled is False, the timer does not generate OnTimer events. The default is True.


TTimer.Interval
 VCL Reference

TTimer.Interval

TTimer	See also 	Example

Determines the amount of time, in milliseconds, that passes before the timer component initiates another OnTimer event.

property Interval: Cardinal;

Description

Interval determines how frequently the OnTimer event occurs. Each time the specified interval passes, the OnTimer event occurs.

Use Interval to specify any cardinal value as the interval between OnTimer events. The default value is 1000 (one second).

Note:	A 0 value is valid, however the timer will not call an OnTimer event for a value of 0.


 VCL Reference

TTimer events

TTimer	Alphabetically	Legend

In TTimer

OnTimer


 VCL Reference

TTimer events

TTimer	By object	Legend

OnTimer


TTimer.OnTimer
 VCL Reference

TTimer.OnTimer

TTimer	See also 	Example

Occurs when a specified amount of time, determined by the Interval property, has passed.

property OnTimer: TNotifyEvent;

Description

Write an OnTimer event handler to execute an action at regular intervals.

The Interval property of a timer determines how frequently the OnTimer event occurs. Each time the specified interval passes, the OnTimer event occurs.


 VCL Reference

TTimer methods

TTimer	Alphabetically	Legend

In TTimer

Create

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTimer methods

TTimer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TTimer.Create
 VCL Reference

TTimer.Create

TTimer	See also

Instantiates a timer object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a timer at runtime. Timers added to forms or data modules at design time are created automatically.

AOwner specifies the component, typically a form or data module, that is responsible for freeing the timer.


TTimer.Destroy
 VCL Reference

TTimer.Destroy

TTimer	See also

Disposes of a timer object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, an application should call Free. Free verifies that the timer is not nil before it calls Destroy.

Destroy deactivates the timer by setting Enabled to False before freeing the resources required by the timer.


Hierarchy

TObject

TPersistent

TComponent

TTimer


TToolButtonActionLink
 VCL Reference

TToolButtonActionLink

Hierarchy	Properties	Methods	Events

TToolButtonActionLink is an action link designed for tool button control clients.

Unit

ComCtrls

Description

TToolButtonActionLink is designed to link actions to tool button control clients. It overrides methods to determine whether the action and client are linked, and to ensure that action events are appropriate for properties and events of tool button control clients.

TToolButtonActionLink inherits, from its ancestors, support for linking actions with the properties of components, generic controls, and windowed controls. TToolButtonActionLink adds support for linking the following properties to the appropriate behavior for a tool button control:

Checked

ImageIndex

Not all actions correspond to properties and events of the same name. For example, the tool button ‘down’ property is linked to the ‘checked’ action.


 VCL Reference

TToolButtonActionLink properties

TToolButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TToolButtonActionLink properties

TToolButtonActionLink	By object	Legend

Action


 VCL Reference

TToolButtonActionLink events

TToolButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TToolButtonActionLink events

TToolButtonActionLink	By object	Legend

OnChange


 VCL Reference

TToolButtonActionLink methods

TToolButtonActionLink	Alphabetically	Legend

In TToolButtonActionLink

AssignClient

IsCheckedLinked

IsImageIndexLinked

SetChecked

SetImageIndex

Derived from TBasicActionLink

Create

Destroy

Execute

Derived from TBasicActionLink

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TToolButtonActionLink methods

TToolButtonActionLink	By object	Legend

AfterConstruction

AssignClient

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsCheckedLinked

IsImageIndexLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetChecked

SetImageIndex

Update


TToolButtonActionLink.AssignClient
 VCL Reference

TToolButtonActionLink.AssignClient

TToolButtonActionLink	See also

Assigns a client tool button that is linked to the associated action.

procedure AssignClient(AClient: TObject); override;

Description

TToolButtonControlActionLink overrides AssignClient to ensure that the client for the link is a tool button control.


TToolButtonActionLink.IsCheckedLinked
 VCL Reference

TToolButtonActionLink.IsCheckedLinked

TToolButtonActionLink	See also

Indicates whether the checked state for the action and the client are linked.

function IsCheckedLinked: Boolean; override;

Description

IsCheckedLinked indicates whether the Checked property is linked to the appropriate client property. IsCheckedLinked returns True if the client requests that the action control this property, False otherwise.


TToolButtonActionLink.IsImageIndexLinked
 VCL Reference

TToolButtonActionLink.IsImageIndexLinked

TToolButtonActionLink	See also

Indicates whether the image index for the action and the client are linked.

function IsImageIndexLinked: Boolean; override;

Description

IsImageIndexLinked indicates whether the ImageIndex property is linked to the appropriate client property. IsImageIndexLinked returns True if the client requests that the action control this property, False otherwise.


TToolButtonActionLink.SetChecked
 VCL Reference

TToolButtonActionLink.SetChecked

TToolButtonActionLink	See also

Sets the checked state of a tool button control if the client is linked to the action for this event.

procedure SetChecked(Value: Boolean); override;

Description

SetChecked sets the checked state of a tool button control, and is called only if the client is linked for this event. Value specifies whether the checked state should be set.


TToolButtonActionLink.SetImageIndex
 VCL Reference

TToolButtonActionLink.SetImageIndex

TToolButtonActionLink	See also

Sets the image index of a tool button control if the client is linked to the action for this event.

procedure SetImageIndex(Value: Integer); override;

Description

SetImageIndex sets the image index of a tool button control, and is called only if the client is linked for this event. Value specifies what the image index should be.


Hierarchy

TObject

TBasicActionLink

TActionLink

TControlActionLink

TToolButtonActionLink


TToolBar
 VCL Reference

 TToolBar

Hierarchy	Properties	Methods	Events	Using TToolBar	See also	Example

TToolBar manages tool buttons and other controls, arranging them in rows and automatically adjusting their sizes and positions.

Unit

ComCtrls

Description

TToolBar is a container for tool buttons (TToolButton). It provides an easy way to arrange and manage visual controls.

All tool buttons on a toolbar maintain a uniform width and height.

Other controls can sit on a toolbar. These controls (which are held in place by invisible tool buttons) maintain a uniform height.

Controls can automatically wrap around and start a new row when they do not fit horizontally on the toolbar.

The Flat property allows the background to show through the toolbar and gives pop-up borders to the tool buttons.

Spaces and dividers (which are in fact specially configured tool buttons) can group controls on the toolbar both visually and functionally.

Typically, the tool buttons correspond to items in an application’s menu and give the user more direct access to the application’s commands.


 VCL Reference

TToolBar Properties

TToolBar	Alphabetically	Legend

In TToolBar

ButtonCount

ButtonHeight

Buttons

ButtonWidth

Canvas

Customizable

CustomizeKeyName

CustomizeValueName

DisabledImages

Flat

HotImages

Images

Indent

List

Menu

RowCount

ShowCaptions

Transparent

Wrapable

Derived from TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TToolBar Properties

TToolBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoSize

BiDiMode

BorderWidth

BoundsRect

Brush

ButtonCount

ButtonHeight

Buttons

ButtonWidth

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

Customizable

CustomizeKeyName

CustomizeValueName

DesignInfo

DisabledImages

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Flat

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotImages

Images

Indent

Left

List

LRDockWidth

Menu

Name

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

RowCount

ShowCaptions

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc

Wrapable


TToolBar.ButtonCount
 VCL Reference

 TToolBar.ButtonCount

TToolBar	See also

Indicates the number of buttons in the toolbar.

property ButtonCount: Integer;

Description

ButtonCount gives the number of buttons in the Buttons array.


TToolBar.ButtonHeight
 VCL Reference

 TToolBar.ButtonHeight

TToolBar	See also

Specifies the height of the controls in the toolbar.

property ButtonHeight: Integer;

Description

ButtonHeight represents the height, in pixels, of the controls in the toolbar.


TToolBar.Buttons
 VCL Reference

 TToolBar.Buttons

TToolBar	See also

Lists the tool buttons (TToolButton) in the toolbar.

property Buttons[Index: Integer]: TToolButton;

Description

Buttons maintains a list of TToolButton instances. All tool buttons that share a TToolBar parent have the same height and (except for separators and dividers) the same width. Other controls on a toolbar are held in place by invisible separators, which are automatically created and destroyed.

To add tool buttons to the toolbar at design time, select the toolbar, right-click, and choose New Button. To create a space (separator) between one button and the next, select New Separator. To create a divider between buttons, add a button and set its Style property to tbsDivider. Other controls may be added to the toolbar directly from the Component palette.


TToolBar.ButtonWidth
 VCL Reference

 TToolBar.ButtonWidth

TToolBar	See also

Specifies the width of the tool buttons (TToolButton) in the toolbar.

property ButtonWidth: Integer;

Description

ButtonWidth represents the width, in pixels, of the TToolButton components on the toolbar. It has no effect on tool buttons whose Style property is set to tbsSeparator or tbsDivider.


TToolBar.Canvas
 VCL Reference

 TToolBar.Canvas

TToolBar	See also

Specifies the drawing surface for the toolbar.

property Canvas: TCanvas;

Description

Use Canvas to draw or paint on the surface of the toolbar in an OnCustomDraw or OnCustomDrawItem event handler. The TCanvas object provides the properties and methods needed for drawing and painting.


TToolBar.Customizable
 VCL Reference

 TToolBar.Customizable

TToolBar	See also

Specifies whether the user can customize the toolbar at runtime.

property Customizable: Boolean;

Description

Set Customizable to True to allow the user to add, delete, and move toolbar buttons at runtime. There are two ways the user can change a customizable toolbar:

By holding the shift key, the user can drag a button to a new position on the tool bar, or drag it off the toolbar entirely to delete the button.

By double-clicking on the toolbar, the user can display the toolbar customize dialog. The toolbar customize dialog shows all the possible buttons in two list boxes, one that contains buttons not on the tool bar, and one that contains buttons currently on the tool bar. The user can use this dialog to add or remove buttons and to change their order.

Note:	When Customizable is True, a number of events inform the tool bar component when the user makes changes.


TToolBar.CustomizeKeyName
 VCL Reference

 TToolBar.CustomizeKeyName

TToolBar	See also

Specifies the registry key where the tool bar saves its current button configuration before the user changes it using the toolbar customize dialog.

property CustomizeKeyName: string;

Description

Use CustomizeKeyName to specify where the toolbar saves its button configuration when the user first displays the toolbar customize dialog. This is a subkey of HKEY_CURRENT_USER.

When the user double-clicks the tool bar to display the toolbar customize dialog, the tool bar receives an OnCustomizing event and then automatically saves its current configuration to this key using the name specified by the CustomizeValueName property. If the user instructs the dialog to restore this configuration, the toolbar fetches the saved configuration from this registry key.


TToolBar.CustomizeValueName
 VCL Reference

 TToolBar.CustomizeValueName

TToolBar	See also

Specifies the registry value under which the tool bar saves its current button configuration before the user changes it using the toolbar customize dialog.

property CustomizeValueName: string;

Description

Use CustomizeValueName to specify the name that the toolbar uses to save its button configuration when the user first displays the toolbar customize dialog. This is a value under the registry key specified by the CustomizeKeyName property.

When the user double-clicks the tool bar to display the toolbar customize dialog, the tool bar receives an OnCustomizing event and then automatically saves its current configuration to the Registry using this value. If the user instructs the dialog to restore this configuration, the toolbar fetches this saved configuration.


TToolBar.DisabledImages
 VCL Reference

 TToolBar.DisabledImages

TToolBar	See also

Lists the images that can appear on disabled tool buttons.

property DisabledImages: TCustomImageList;

Description

DisabledImages contains a list of images that can appear on tool buttons when they are disabled. Each tool button’s ImageIndex property determines the specific image displayed on it. If DisabledImages is unassigned, disabled tool buttons display grayed versions of their regular images (specified by the Images property).


TToolBar.Flat
 VCL Reference

 TToolBar.Flat

TToolBar	See also

Makes the toolbar transparent and eliminates tool-button borders.

property Flat: Boolean;

Description

If Flat is set to True, the toolbar and its tool buttons are transparent; background colors and graphics show through them. In addition, when Flat is True, tool buttons (TToolButton) on the toolbar have pop-up borders that appear only when the mouse is passed over the button.

Note:	If Flat is set to True, TToolBar requires version 4.70 or later of COMCTL32.DLL at both design time and runtime.


TToolBar.HotImages
 VCL Reference

 TToolBar.HotImages

TToolBar	See also

Lists the images that can appear on tool buttons when the mouse points to them.

property HotImages: TCustomImageList;

Description

HotImages contains a list of images that can appear on tool buttons when the mouse passes over them at runtime. Each tool button’s ImageIndex property determines the specific image displayed when the mouse points to it. If HotImages is unassigned, tool buttons retain their regular images (specified by the Images property) when pointed to.


TToolBar.Images
 VCL Reference

 TToolBar.Images

TToolBar	See also

Lists the images that can appear on tool buttons.

property Images: TCustomImageList;

Description

Images contains a list of images that can appear on the toolbar’s tool buttons. Each tool button’s ImageIndex property determines the specific image displayed on it. If Images is unassigned, no images are displayed on the tool buttons.

Images in the list should be 16x16. To accommodate every system on which your application runs, it is recommended that you do not use 256 colors.


TToolBar.Indent
 VCL Reference

 TToolBar.Indent

TToolBar

Specifies the margin on the left side of the toolbar.

property Indent: Integer;

Description

Indent specifies, in pixels, the margin that separates the left edge of the toolbar from the controls within it.


TToolBar.List
 VCL Reference

 TToolBar.List

TToolBar	See also

Aligns captions on the right and images on the left in tool buttons.

property List: Boolean;

Description

When List is False, tool buttons (TToolButton) appear in the toolbar with their images (if any) centered and their captions (if visible) underneath. Setting List to True aligns captions to the right and images to the left.


TToolBar.Menu
 VCL Reference

 TToolBar.Menu

TToolBar	See also

Causes the toolbar to populate itself with buttons that correspond to items in a menu.

property Menu: TMainMenu;

Description

Use the menu property to populate the tool bar to match a menu component. Setting Menu causes the toolbar to delete all of its current buttons and replace them with tool buttons that match the items in the specified menu component.

In applications that use Menu to populate the toolbar, do not change the Buttons property by adding, deleting, or editing toolbar buttons.

Note:	The toolbar does not dynamically track any changes to the menu specified by Menu. That is, it sets the tool buttons to reflect the set of items in the menu at the point when the application sets this property, and ignores any subsequent changes.


TToolBar.RowCount
 VCL Reference

 TToolBar.RowCount

TToolBar	See also

Indicates the number of rows in the toolbar.

property RowCount: Integer;

Description

Reading RowCount returns the number of rows in which the tool buttons are arranged.


TToolBar.ShowCaptions
 VCL Reference

 TToolBar.ShowCaptions

TToolBar	See also	Example

Determines whether text captions are displayed on tool buttons.

property ShowCaptions: Boolean;

Description

If ShowCaptions is set to True, tool buttons appear in the toolbar with their captions displayed. Setting ShowCaptions to True may increase the size of the tool buttons.


TToolBar.Transparent
 VCL Reference

TToolBar.Transparent

TToolBar	Properties

Specifies whether the toolbar is transparent.

property Transparent: Boolean;

Description

Use Transparent to get or set whether the toolbar is transparent. Note the Transparent property applies only to the toolbar itself—not its buttons.

Tip:	To avoid painting problems, set the Transparent property before the toolbar becomes visible.


TToolBar.Wrapable
 VCL Reference

 TToolBar.Wrapable

TToolBar	See also

Enables automatic line-wrap for components in the toolbar.

property Wrapable: Boolean;

Description

If Wrapable is True, components automatically wrap around and form new rows when they do not fit horizontally in the toolbar.


 VCL Reference

TToolBar Events

TToolBar	Alphabetically	Legend

In TToolBar

OnAdvancedCustomDraw

OnAdvancedCustomDrawButton

OnCustomDraw

OnCustomDrawButton

OnCustomizeAdded

OnCustomizeCanDelete

OnCustomizeCanInsert

OnCustomized

OnCustomizeDelete

OnCustomizeNewButton

OnCustomizeReset

OnCustomizing

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TToolBar Events

TToolBar	By Object	Legend

OnAdvancedCustomDraw

OnAdvancedCustomDrawButton

OnClick

OnContextPopup

OnCustomDraw

OnCustomDrawButton

OnCustomizeAdded

OnCustomizeCanDelete

OnCustomizeCanInsert

OnCustomized

OnCustomizeDelete

OnCustomizeNewButton

OnCustomizeReset

OnCustomizing

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


TToolBar.OnCustomDraw
 VCL Reference

 TToolBar.OnCustomDraw

TToolBar	See also

Occurs when the toolbar must be painted.

type TTBCustomDrawEvent = procedure(Sender: TToolBar; const ARect: TRect; var DefaultDraw: Boolean) of object;

property OnCustomDraw: TTBCustomDrawEvent;

Description

Write an OnCustomDraw event handler to enhance or replace the automatic painting of the toolbar. Use the toolbar’s Canvas property to render the toolbar’s image. OnCustomDraw is for painting the background of the toolbar. The painting of individual buttons on the toolbar should be handled in an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler.

Sender is the toolbar that needs to be painted.

ARect indicates the dimensions of the toolbar on the canvas.

Leave DefaultDraw as True if the toolbar should continue with the normal painting process. Set DefaultDraw to Ffalse if the OnCustomDraw event handler has completely painted the toolbar.

Note:	OnCustomDraw only occurs prior to painting the toolbar’s background. To respond at other points in the paint process (when the background is erased, or after the default painting of the toolbar’s background), use OnAdvancedCustomDraw instead.


TToolBar.OnCustomDrawButton
 VCL Reference

 TToolBar.OnCustomDrawButton

TToolBar	See also

Occurs when one of the buttons in the toolbar must be painted.

type TTBCustomDrawBtnEvent = procedure(Sender: TToolBar; Button: TToolButton; State: TCustomDrawState; var DefaultDraw: Boolean) of object;

property OnCustomDrawButton: TTBCustomDrawBtnEvent;

Description

Write an OnCustomDrawButton event handler to enhance or replace the automatic painting of the toolbar’s buttons. Use the toolbar’s Canvas property to render the button’s image. OnCustomDrawButton is for painting individual buttons on the toolbar. The painting of the toolbar itself should be handled in an OnCustomDraw or OnAdvancedCustomDraw event handler.

Sender is the toolbar that contains the button.

Button is the button that needs to be painted. Use its properties to determine what to paint and where the button sits on the toolbar’s canvas.

State provides information that you may want to visually represent when painting the button.

Leave DefaultDraw as True if the button should be painted using the normal process after the event handler exists. Set DefaultDraw to Ffalse if the OnCustomDrawButton event handler has completely painted the tool button.

Note:	OnCustomDrawButton only occurs prior to painting the button. To respond at other points in the process of painting a button (when the background is erased, or after the default painting of the button), use OnAdvancedCustomDrawButton instead.


TToolBar.OnAdvancedCustomDraw
 VCL Reference

 TToolBar.OnAdvancedCustomDraw

TToolBar	See also

Occurs at discrete stages during the painting of the toolbar’s background.

type TTBAdvancedCustomDrawEvent = procedure(Sender: TToolBar; const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean) of object;

property OnAdvancedCustomDraw: TTBAdvancedCustomDrawEvent;

Description

Write an OnAdvancedCustomDraw event handler to enhance or replace the automatic painting of the toolbar. Use the toolbar’s Canvas property to render the toolbar’s image. OnAdvancedCustomDraw is for painting the background of the toolbar. The painting of individual buttons on the toolbar should be handled in an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler.

Sender is the toolbar that needs to be painted.

ARect indicates the dimensions of the toolbar on the canvas.

Stage indicates the current stage of the drawing process.

Leave DefaultDraw as True if the toolbar should continue with the normal painting process. Set DefaultDraw to Ffalse if the OnAdvancedCustomDraw event handler has completely painted the toolbar. DefaultDraw is only meaningful when Stage is cdPrePaint.

Note:	OnAdvancedCustomDraw occurs at several points during the painting of the toolbar’s background. If you only need to respond immediately prior to the default painting of the toolbar, use OnCustomDraw instead.


TToolBar.OnAdvancedCustomDrawButton
 VCL Reference

 TToolBar.OnAdvancedCustomDrawButton

TToolBar	See also

Occurs at discrete stages during the painting of the toolbar’s buttons.

type TTBAdvancedCustomDrawBtnEvent = procedure(Sender: TToolBar; Button: TToolButton; State: TCustomDrawState; Stage: TCustomDrawStage; var Flags TTBCustomDrawFlags; var DefaultDraw: Boolean) of object;

property OnAdvancedCustomDrawButton: TTBAdvancedCustomDrawBtnEvent;

Description

Write an OnAdvancedCustomDrawButton event handler to enhance or replace the automatic painting of the toolbar’s buttons. Use the toolbar’s Canvas property to render the button’s image. OnAdvancedCustomDrawButton occurs during the erasure and painting of individual buttons on the toolbar. The painting of the toolbar itself should be handled in an OnCustomDraw or OnAdvancedCustomDraw event handler.

Sender is the toolbar that contains the button.

Button is the button that needs to be painted. Use its properties to determine what to paint and where the button sits on the toolbar’s canvas.

State provides information that you may want to visually represent when painting the button.

Stage indicates the current stage of the drawing process.

Flags is used only when Stage is cdPrePaint. It influences how the button is subsequently rendered by the default drawing process. Return the set of flags that indicate how you want the tool button to be drawn.

DefaultDraw is used only when Stage is cdPrePaint. Leave DefaultDraw as True if the button should be painted using the normal process after the event handler exists. Set DefaultDraw to False if the OnAdvancedCustomDrawButton event handler has completely painted the tool button.

Note:	OnAdvancedCustomDrawButton occurs at several points during the painting of the toolbar’s buttons. If you only need to respond immediately prior to the default painting of each button and are not using the Flags parameter, use OnCustomDrawButton instead.


TToolBar.OnCustomizeAdded
 VCL Reference

 TToolBar.OnCustomizeAdded

TToolBar	See also

Occurs when the user adds a button to the toolbar.

property OnCustomizeAdded: TTBButtonEvent;

Description

Write an OnCustomizeAdded handler to respond when the user adds a new button to the toolbar using the toolbar customize dialog.

This event occurs after the new button is already added to the toolbar. To respond before the button is added, possibly even preventing the user from adding the button, use the OnCustomizeCanInsert event instead.


TToolBar.OnCustomizeCanDelete
 VCL Reference

 TToolBar.OnCustomizeCanDelete

TToolBar	See also

Occurs when user tries to delete one of the buttons on the toolbar.

property OnCustomizeCanDelete: TTBCustomizeQueryEvent;

Description

When the Customizable property is True, the user can remove buttons from the toolbar by dragging them off the toolbar when the Shift key is pressed or using the toolbar customize dialog. OnCustomizeCanDelete occurs when the user tries to delete a button in one of these ways, and allows the application to reject the deletion. If the OnCustomizeCanDelete event handler sets its Allow parameter to False, the tool button returns to the position it occupied before the user tried to delete it.


TToolBar.OnCustomizeCanInsert
 VCL Reference

 TToolBar.OnCustomizeCanInsert

TToolBar	See also

Occurs when user tries to add a button to the toolbar.

property OnCustomizeCanInsert: TTBCustomizeQueryEvent;

Description

When the Customizable property is True, the user can add buttons to the toolbar using the toolbar customize dialog. OnCustomizeCanInsert occurs when the user tries to add a button, and allows the application to reject the insertion. If the OnCustomizeCanInsert event handler sets its Allow parameter to False, the toolbar customize dialog rejects the insertion.


TToolBar.OnCustomized
 VCL Reference

 TToolBar.OnCustomized

TToolBar	See also

Occurs when the user finishes making changes to the toolbar.

property OnCustomized: TNotifyEvent;

Description

Write an OnCustomized event handler to take action after the user has finished making changes to the toolbar. This event occurs when the user finishes a drag operation (with the Shift key down) that moves or deletes a tool button, and when the user exits the toolbar customize dialog.


TToolBar.OnCustomizeDelete
 VCL Reference

 TToolBar.OnCustomizeDelete

TToolBar	See also

Occurs when the user deletes a button from the toolbar.

property OnCustomizeDelete: TTBButtonEvent;

Description

Write an OnCustomizeDelete event handler to respond when the user deletes a tool button by dragging it off the toolbar when the Shift key is depressed or by using the toolbar customize dialog.

This event occurs after the button has been removed from the toolbar. To respond before the button is deleting, possibly preventing the user from deleting the button, use the OnCustomizeCanDelete event instead.


TToolBar.OnCustomizeNewButton
 VCL Reference

 TToolBar.OnCustomizeNewButton

TToolBar	See also

Occurs when the user tries to add a new button to the tool bar.

type TTBNewButtonEvent = procedure(Sender: TToolBar; Index: Integer; var Button: TToolButton) of object;

property OnCustomizeNewButton: TTBNewButtonEvent ;

Description

Write an OnCustomizeNewButton event handler to supply your own TToolButton objects to represent the tool buttons that a user adds in the toolbar customize dialog.

Sender is the toolbar to which the user is adding a button.

Index is the index in the Buttons property where the new button will appear. This should be assigned as the Index property of the new button.

Button returns a TToolButton object that the event handler creates and initializes. It is used to represent the new tool button in the Buttons property. If the event handler does not return a TToolButton object, the add operation fails.


TToolBar.OnCustomizeReset
 VCL Reference

 TToolBar.OnCustomizeReset

TToolBar	See also

Occurs when the user cancels a customization to the toolbar.

property OnCustomizeReset: TNotifyEvent;

Description

Write an OnCustomizeReset event handler to respond when the user cancels changes made in the toolbar customize dialog.


TToolBar.OnCustomizing
 VCL Reference

 TToolBar.OnCustomizing

TToolBar	See also

Occurs when the user displays the toolbar customize dialog in order to make changes to the toolbar.

property OnCustomizeReset: TNotifyEvent;

Description

Write an OnCustomizing event handler to take action when the user first displays the toolbar customize dialog.


 VCL Reference

TToolBar Methods

Legend

In TToolBar

AlignControls

CanAutoSize

CancelMenu

ChangeScale

CheckMenuDropdown

ClickButton

Create

CreateParams

CreateWnd

CustomDraw

CustomDrawButton

Destroy

DoQueryDelete

DoQueryInsert

FindButtonFromAccel

FlipChildren

GetChildren

InitMenu

IsCustomDrawn

Loaded

Notification

RepositionButton

RepositionButtons

TrackMenu

WndProc

WrapButtons

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TToolBar Methods

TToolBar	By Object	Legend

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanAutoSize

CancelMenu

CanFocus

ChangeScale

CheckMenuDropdown

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClickButton

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

CustomDraw

CustomDrawButton

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoQueryDelete

DoQueryInsert

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindButtonFromAccel

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InitMenu

InsertComponent

InsertControl

InstanceSize

Invalidate

IsCustomDrawn

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RepositionButton

RepositionButtons

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TrackMenu

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc

WrapButtons


TToolBar.AlignControls
 VCL Reference

TToolBar.AlignControls

TToolBar	See also

Aligns any child controls of the toolbar within a specified area of the control.

procedure AlignControls(AControl: TControl; var Rect: TRect); override;

Description

The protected AlignControls method is called automatically to align all controls within an area of container control (in this case the tool bar). In TToolBar, AlignControls takes into account the special needs of a tool bar in arranging its buttons.

Control is a child control that should have precedence when laying out the child controls. If Control is nil, none of the child controls has precedence.

Rect is the area in which to align the child controls.


TToolBar.CanAutoSize
 VCL Reference

TToolBar.CanAutoSize

TToolBar	See also

Indicates whether the toolbar can resize itself automatically to accommodate its contents.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanAutoSize is called automatically when the AutoSize property is True and an attempt is made to resize the control. It allows the toolbar to implement the AutoSize property before the resize sequence that ends with the OnResize event.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the toolbar. CanAutoSize adjusts these values so that the toolbar’s size adjusts to its buttons. If the adjustment results in values of NewWidth and NewHeight that differ from the control’s current width and height, CanAutoSize returns True, indicating that the resize sequence should proceed. If, after adjustment, NewWidth and NewHeight equal Width and Height, CanAutoSize returns False, and the resize sequence is aborted.


TToolBar.CancelMenu
 VCL Reference

TToolBar.CancelMenu

TToolBar	See also

Called when the menu associated with a toolbar button is canceled.

procedure CancelMenu; dynamic;

Description

Override CancelMenu in a derived class to handle the canceling of a menu on one of the tool buttons.

By default, CancelMenu clears the highlighting and hot item in the menu.


TToolBar.ChangeScale
 VCL Reference

TToolBar.ChangeScale

TToolBar	See also

Repositions and resizes the toolbar by a specified ratio.

procedure ChangeScale(M, D: Integer); override;

Description

Use ChangeScale to change the scale of the toolbar.

ChangeScale modifies the position and size of a toolbar as well as rescaling the buttons. Thus, ChangeScale modifies the Top, Left, Width, and Height properties.

The M and D parameters define a fraction by which to scale the control. The M parameter is the multiplier and the D parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of M as 3, and the value of D as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%.


TToolBar.CheckMenuDropdown
 VCL Reference

TToolBar.CheckMenuDropdown

TToolBar	See also

Displays a toolbar button’s drop-down menu.

function CheckMenuDropdown(Button: TToolButton): Boolean; dynamic;

Description

CheckMenuDropdown is called automatically when the drop-down arrow portion of a toolbutton is clicked or if a toolbutton has an assigned MenuItem property.

Button is the drop-down toolbar button that was clicked.

CheckMenuDropdown has no effect unless the button’s Style property contains tbsDropDown.


TToolBar.ClickButton
 VCL Reference

TToolBar.ClickButton

TToolBar

Simulates the clicking of a toolbar button.

procedure ClickButton(Button: TToolButton); dynamic;

Description

Call ClickButton to simulate the clicking of a toolbar button.

Button is the toolbar button to click.


TToolBar.Create
 VCL Reference

 TToolBar.Create

TToolBar 	See also	Example

Creates and initializes a TToolBar instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a toolbar at runtime. Toolbars added to forms at design time are created automatically.

AOwner is the component, typically the form, that is responsible for freeing the toolbar instance. It becomes the value of the Owner property.


TToolBar.CreateParams
 VCL Reference

TToolBar.CreateParams

TToolBar	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams is called automatically to initialize the window-creation parameters whenever the window for the toolbar needs to be created. CreateParams overrides the inherited method to implement those properties that require a specialize window style.


TToolBar.CreateWnd
 VCL Reference

TToolBar.CreateWnd

TToolBar	See also

Creates the window that implements the toolbar.

procedure CreateWnd; override;

Description

The Windows control for the toolbar can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. TToolBar calls CreateWnd to create this Windows control when necessary.


TToolBar.CustomDraw
 VCL Reference

TToolBar.CustomDraw

TToolBar	See also

Generates OnCustomDraw and OnAdvancedCustomDraw events.

function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual;

Description

CustomDraw is called automatically at discrete stages during the drawing process to generate the OnCustomDraw and OnAdvancedCustomDraw events.

ARect specifies the boundaries of the toolbar on the toolbar’s Canvas.

Stage indicates the current stage of the paint process. When Stage is cdPrePaint, CustomDraw generates an OnCustomDraw event followed by an OnAdvancedCustomDraw event. At all other stages, CustomDraw generates only the OnAdvancedCustomDraw event.

CustomDraw returns True if the toolbar should continue with its default painting sequence, False if the painting sequence should end after the call.


TToolBar.CustomDrawButton
 VCL Reference

TToolBar.CustomDrawButton

TToolBar	See also

Generates OnCustomDrawButton and OnAdvancedCustomDrawButton events.

function CustomDrawButton(Button: TToolButton; State: TCustomDrawState; Stage: TCustomDrawStage; var Flags: TTBCustomDrawFlags): Boolean; virtual;

Description

CustomDrawButton is called automatically at discrete stages during the drawing process to generate the OnCustomDrawButton and OnAdvancedCustomDrawButton events.

Button specifies the tool button that needs to be drawn.

State describes the state of the button, so that the event handler can reflect that state in the button’s image.

Stage indicates the current stage of the paint process. When Stage is cdPrePaint, CustomDrawButton generates an OnCustomDrawButton event followed by an OnAdvancedCustomDrawButton event. At all other stages, CustomDrawButton generates only the OnAdvancedCustomDrawButton event.

Flags is used only when Stage is cdPrePaint. It influences how the button is subsequently rendered by the default drawing process. CustomDrawButton returns the set of flags that indicates how the toolbar should proceed with rendering the button.


TToolBar.Destroy
 VCL Reference

 TToolBar.Destroy

TToolBar	See also

Destroys the TToolBar instance and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TToolBar reference is not nil, and only then calls Destroy.


TToolBar.DoQueryDelete
 VCL Reference

TToolBar.DoQueryDelete

TToolBar	See also

Generates an OnCustomizeCanDelete event.

function DoQueryDelete(Index: Integer): Boolean; virtual;

Description

DoQueryDelete is called automatically when the user tries to delete a button from a customizable tool bar. It generates an OnCustomizeCanDelete event, allowing the application to block the deletion.

Index is the index (in the Buttons property) of the button that the user is trying to delete.


TToolBar.DoQueryInsert
 VCL Reference

TToolBar.DoQueryInsert

TToolBar	See also

Generates an OnCustomizeCanInsert event.

function DoQueryInsert(Index: Integer): Boolean; virtual;

Description

DoQueryInsert is called automatically when the user tries to add a button to a customizable tool bar. It generates an OnCustomizeCanInsert event, allowing the application to block the insertion.

Index is the index (in the Buttons property) where the user is trying to insert a new button.


TToolBar.FindButtonFromAccel
 VCL Reference

TToolBar.FindButtonFromAccel

TToolBar	See also

Returns the toolbar button with the specified accelerator.

function FindButtonFromAccel(Accel: Word): TToolButton;

Description

Use FindButtonFromAccel to determine which toolbar button has the specified accelerator.

If the accelerator is not found, FindButtonFromAccel returns nilNULL.


TToolBar.FlipChildren
 VCL Reference

TToolBar.FlipChildren

TToolBar	See also

Prevents the toolbar buttons from reversing position when the parent control is flipped.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren overrides the inherited method in order to prevent the flipping of the toolbar’s children.


TToolBar.GetChildren
 VCL Reference

TToolBar.GetChildren

TToolBar	See also

Allows the streaming system to load and save child controls in the order they appear in the toolbar.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is introduced in TComponent for the streaming system that loads and saves VCL components. It executes the callback specified by Proc for all the button in the toolbar, as well as any other controls that have the toolbar as a parent and the component specified by Root as an Owner.

Proc is a callback that the streaming system uses to load or save persistent objects on a form.

Root is the the top-level component (such as a form or data module) that is currently being loaded or saved.


TToolBar.InitMenu
 VCL Reference

TToolBar.InitMenu

TToolBar	See also

Called when the menu associated with a drop-down toolbar button is about to be displayed.

procedure InitMenu(Button: TToolButton); dynamic;

Description

InitMenu initializes the highlighting and hot-tracking for the drop-down menu associated with the tool button that Button specifies.

Override InitMenu in a derived class to perform other initializations to the toolbar button’s menu.


TToolBar.IsCustomDrawn
 VCL Reference

TToolBar.IsCustomDrawn

TToolBar	See also

Indicates whether an event handler exists to respond at a particular stage in the paint process.

function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean; virtual;

Description

TToolBar uses IsCustomDrawn internally to determine whether it needs generate the various custom draw events.

Target indicates what object is currently being painted. If Target is dtControl, it is the background of the toolbar, and IsCustomDrawn checks whether there is an OnCustomDraw or OnAdvancedCustomDraw event handler. If Target is dtItem, it is one of the tool buttons, and IsCustomDrawn checks for an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler. TToolBar does not use dtSubItem as a target.

Stage indicates the current stage of the paint process. If stage is not cdPrePaint, then the tool bar only generates an event if it has one of the advanced custom draw event handlers.

IsCustomDrawn returns True if the toolbar should generate an event (there is an event handler to respond.) IsCustomDrawn returns False if there is no need to generate a custom draw event.


TToolBar.Loaded
 VCL Reference

TToolBar.Loaded

TToolBar	See also

Initializes the component after the form file has been read into memory.

procedure Loaded; override;

Description

TToolBar overrides Loaded in order to managed the ButtonWidth property.


TToolBar.Notification
 VCL Reference

TToolBar.Notification

TToolBar	See also

Responds to a notification that a component has been added or is about to be deleted.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called automatically when a component has just been added to the form or is about to be deleted.

AComponent is the component that was just added or that is about to be deleted.

Operation indicates whether AComponent was added or is about to be deleted.

As implemented in TToolBar, Notification checks whether the image list that is the value of the  Images, HotImages, or DisabledImages property is about to be deleted. If so, it resets the property to nil.


TToolBar.RepositionButton
 VCL Reference

TToolBar.RepositionButton

TToolBar	See also

Updates the position of a specified button in the toolbar.

procedure RepositionButton(Index: Integer);

Description

TToolBar uses RepositionButton internally when laying out the buttons in the toolbar. RepositionButton calculates where to place the button with the specified index, given the positions of all previous buttons in the toolbar. It then changes the position and size of the specified tool button.


TToolBar.RepositionButtons
 VCL Reference

TToolBar.RepositionButtons

TToolBar	See also

Updates the positions of all buttons in the toolbar from a specified button on.

procedure RepositionButtons(Index: Integer);

Description

TToolBar uses RepositionButtons internally when laying out the buttons in the toolbar. RepositionButtons calculates where to place all the buttons with the specified index or greater, and updates their positions and sizes.


TToolBar.TrackMenu
 VCL Reference

TToolBar.TrackMenu

TToolBar	See also

Called when the accelerator for a toolbar button is pressed.

function TrackMenu(Button: TToolButton): Boolean; dynamic;

Description

TrackMenu is called automatically in response to the accelerator on a toolbar button. It initializes the menu of a drop-down menu button, and forwards a click to the underlying Windows control.

Button is the toolbar button for which an accelerator was pressed.

Override TrackMenu in a derived class to perform additional actions when the accelerator for a toolbar button is pressed.


TToolBar.WndProc
 VCL Reference

TToolBar.::WndProc

TToolBar	See also

Provides specific message responses for the toolbar.

procedure WndProc(var Message: TMessage); override;

Description

WndProc overrides the WndProc for TWinControl to handle mouse messages, and sends all others to the inherited WndProc.

Derived classes that override WndProc to provide specialized responses to messages should call the inherited WndProc at the end to dispatch any other messages.


TToolBar.WrapButtons
 VCL Reference

TToolBar.::WrapButtons

TToolBar

Rearranges the toolbar’s buttons so they fit in the toolbar.

function WrapButtons(var NewWidth, NewHeight: Integer): Boolean;

Description

Call WrapButtons to rearrange the toolbar’s buttons.

NewWidth is the width in which the buttons must fit.

NewHeight is the height in which the buttons must fit.

WrapButtons returns True if the buttons fit; otherwise, WrapButtons returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow

TToolBar


TToolButton
 VCL Reference

TToolButton

Hierarchy	Properties	Methods	Events	See also	Example

TToolButton is a button control in a TToolBar object.

Unit

ComCtrls

Description

Use TToolButton to implement buttons on a toolbar. While other controls (including TButton and TSpeedButton) can be placed on toolbars, TToolButton utilizes special toolbar features to simplify the configuration of buttons and offers added display options such as pop-up borders and transparency.

To place tool buttons on a toolbar at design time, select the toolbar, right-click, and choose New Button.


 VCL Reference

TToolButton Properties

TToolButton	Alphabetically	Legend

In TToolButton

AllowAllUp

AutoSize

Down

DropDownMenu

Grouped

ImageIndex

Indeterminate

Index

Marked

MenuItem

Style

Wrap

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TToolButton Properties

TToolButton	By Object	Legend

Action

Align

AllowAllUp

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Down

DragCursor

DragKind

DragMode

DropDownMenu

Enabled

Floating

FloatingDockSiteClass

Grouped

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImageIndex

Indeterminate

Index

Left

LRDockWidth

Marked

MenuItem

Name

Owner

Parent

ParentShowHint

PopupMenu

ShowHint

Style

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

Wrap


TToolButton.AllowAllUp
 VCL Reference

TToolButton.AllowAllUp

TToolButton	See also

Indicates whether all the tool buttons in a group can be unselected at the same time.

property AllowAllUp: Boolean;

Description

If AllowAllUp is set to True, all of the tool buttons in the group can be unselected. If AllowAllUp is set to False, at least one tool button in the group must be selected at any time. (Determine which tool button is initially selected by setting its Down property to True.)

AllowAllUp is effective only when Grouped is True and Style is set to tbsCheck. Changing the value of AllowAllUp for one button in a group automatically changes the value for all buttons in the group.


TToolButton.AutoSize
 VCL Reference

TToolButton.AutoSize

TToolButton	Properties

Specifies whether the tool button automatically sizes itself to accommodate its text and image.

property AutoSize: Boolean;

Description

If AutoSize is True, the tool button sizes itself automatically; otherwise, the tool button keeps a fixed size.


TToolButton.Down
 VCL Reference

TToolButton.Down

TToolButton	See also

Specifies whether the button is selected (down) or unselected (up).

property Down: Boolean;

Description

Read Down to determine whether a tool button is selected. Setting Down to True at design time causes the button to be initially selected.

Tool buttons can remain Down only if Style is tbsCheck.


TToolButton.DropDownMenu
 VCL Reference

TToolButton.DropdownMenu

TToolButton	See also

Identifies a pop-up menu associated with the tool button.

property DropdownMenu: TPopupMenu;

Description

Assign a value to DropdownMenu to make a menu appear when the button is pressed. (To display the menu programmatically, call the tool button’s Click method.) If the menu’s AutoPopup property is set to True, the menu appears automatically. If AutoPopup is False, display the menu by calling the menu’s Popup method in the tool button’s OnClick event handler.

When associating a drop-down menu with the tool button, set the Style to tbsDropDown.


TToolButton.Grouped
 VCL Reference

TToolButton.Grouped

TToolButton	See also	Example

Aggregates a sequence of adjacent tbsCheck buttons.

property Grouped: Boolean;

Description

When an unbroken sequence of adjacent tool buttons each has its Grouped property set to True and Style set to tbsCheck, then no more than one of the buttons can be selected at the same time. Selecting a grouped button at runtime unselects the other buttons in its group.

To create distinct groups of buttons within a toolbar, separate the groups with any of the following: tool buttons whose Grouped property is False, tool buttons whose Style property is not tbsCheck (tbsSeparator and tbsDivider buttons are useful for this), or controls other than tool buttons.


TToolButton.ImageIndex
 VCL Reference

TToolButton.ImageIndex

TToolButton	See also

Determines which image appears on the tool button.

property ImageIndex: TImageIndex;

Description

The ImageIndex property determines which image—from TToolBar’s Images list—appears on the tool button. If the toolbar’s DisabledImages and HotImages properties are set, different images appear when the button is disabled and when the mouse pointer passes over the button.

These lists are zero-based; the first image is indexed by 0, the second by 1, and so forth. Since ImageIndex holds only a single integer value, the positions of the selected images must coincide on the different lists. For example, if ImageIndex = 2, the button displays the third image in each list.


TToolButton.Indeterminate
 VCL Reference

TToolButton.Indeterminate

TToolButton	See also

Indicates that the tool button is neither selected nor unselected.

property Indeterminate: Boolean;

Description

Indeterminate provides a third state for tool buttons that are neither selected nor unselected. Set this property in program code to indicate that a button is inapplicable in a particular context. Buttons with the Indeterminate property set to True appear grayed.

When Indeterminate is set to True, Down is automatically set to False.


TToolButton.Index
 VCL Reference

TToolButton.Index

TToolButton	See also

Specifies the index of the tool button.

property Index: Integer;

Description

Use Index to get the index of the tool button. This index identifies the position of the tool button in its parent toolbar’s Buttons property array.


TToolButton.Marked
 VCL Reference

TToolButton.Marked

TToolButton	See also

Specifies whether the button is marked.

property Marked: Boolean;

Description

Use Marked to get or set whether the button is marked. A marked button has a shaded surface.


TToolButton.MenuItem
 VCL Reference

TToolButton.MenuItem

TToolButton	See also	Example

Specifies the menu item corresponding to the button.

property MenuItem: TMenuItem;

Description

Use MenuItem to get or set the menu item corresponding to the button.

Note: To use the tool button as a menu item, the Style property must be tbsDropDown. If you are using multiple drop-down tool buttons, set the Grouped property to True.


TToolButton.Style
 VCL Reference

TToolButton.Style

TToolButton	See also	Example

Determines the style of the tool button.

type TToolButtonSyle = (tbsButton, tbsCheck, tbsDropDown, tbsSeparator, tbsDivider);

property Style: TToolButtonStyle;

Description

These are the possible values of Style:

Value	Meaning

tbsButton	The button appears and functions like a normal speed button.

tbsCheck	Clicking the button toggles the Down property. Once selected, the button remains selected until clicked again.

tbsDropDown	The button displays a downward-pointing arrow (suitable for accessing a drop-down menu).

tbsSeparator	The button appears as an empty space on the toolbar (used to separate other controls).

tbsDivider	The button appears as a vertical line on the toolbar (used to separate other controls).


TToolButton.Wrap
 VCL Reference

TToolButton.Wrap

TToolButton	See also

Forces a new row after the tool button.

property Wrap: Boolean;

Description

Set Wrap to True to make the tool button the last in its row. Wrap is disabled when the toolbar’s Wrapable property is True.


 VCL Reference

TToolButton Events

TToolButton	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TToolButton Events

TToolButton	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TToolButton Methods

TToolButton	Alphabetically	Legend

In TToolButton

ActionChange

AssignTo

BeginUpdate

CheckMenuDropDown

Click

Create

EndUpdate

GetActionLinkClass

MouseDown

MouseMove

MouseUp

Notification

Paint

RefreshControl

SetAutoSize

SetBounds

SetToolBar

UpdateControl

ValidateContainer

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TToolButton Methods

TToolButton	By Object	Legend

ActionChange

AfterConstruction

Assign

AssignTo

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

CheckMenuDropDown

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

EndUpdate

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

MouseWheelHandler

NewInstance

Notification

Paint

ParentToClient

Perform

ReferenceInterface

Refresh

RefreshControl

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetAutoSize

SetBounds

SetSubComponent

SetTextBuf

SetToolBar

Show

Update

UpdateAction

UpdateControl

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidateContainer


TToolButton.ActionChange
 VCL Reference

TToolButton.ActionChange

TToolButton	See also

Called when the action associated with the button changes.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;

Description

ActionChange is called automatically when the action object specified by the Action property, or any of its properties, changes. ActionChange updates the control properties that correspond to properties of the associated action. These properties include the Down, ImageIndex, Caption, Enabled, Hint, and Visible properties and the OnClick event handler.

The Sender parameter is the action object that changed. The CheckDefaults parameter indicates whether the control’s properties should all be updated or only those that have not been explicitly changed from their default values. When CheckDefaults is True, only those properties and event handlers that have not been changed from the default values are updated.


TToolButton.AssignTo
 VCL Reference

TToolButton.AssignTo

TToolButton	See also

Called when a button is used in an assignment.

procedure AssignTo(Dest: TPersistent); override;

Description

The Assign method of the destination object specified by Dest calls AssignTo if it doesn’t know how to copy the methods of a tool button. AssignTo copies properties if Dest is a TCustomAction descendant.


TToolButton.BeginUpdate
 VCL Reference

TToolButton.BeginUpdate

TToolButton	See also

Suspends screen repainting.

procedure BeginUpdate; virtual;

Description

The BeginUpdate method prevents the tool bar that contains the button from adjusting to changes in the buttons size and position until the EndUpdate method is called. Use BeginUpdate to speed processing and avoid flicker while making changes to the tool button’s properties.


TToolButton.CheckMenuDropdown
 VCL Reference

TToolButton.CheckMenuDropdown

TToolButton	See also

Displays a button’s drop-down menu.

function CheckMenuDropdown: Boolean; dynamic;

Description

Call CheckMenuDropdown to manually display a button’s pop-up menu. It returns True and displays the menu if the tool button has an associated menu. It returns False if there is no menu to display.


TToolButton.Click
 VCL Reference

TToolButton.Click

TToolButton	See also

Generates an OnClick event.

procedure Click; override;

Description

Click calls any event handler attached to the OnClick event. Override Click to provide other responses in addition to the inherited event-handler call when the user clicks the control or the application simulates a user click.

A control calls Click whenever it receives a left-button mouse-up message (WM_LBUTTONUP) if that message indicates that the mouse up occurred near the corresponding mouse-down. Many controls call Click in other circumstances, such as when a user types the shortcut key for a button or menu item.


TToolButton.Create
 VCL Reference

TToolButton.Create

TToolButton	See also	Example

Creates and initializes a TToolButton instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TToolButton object at runtime. Tool buttons added at design time are created automatically.

AOwner is the component, typically the form, that is responsible for freeing the button. It becomes the value of the Owner property.


TToolButton.EndUpdate
 VCL Reference

TToolButton.EndUpdate

TToolButton	See also

Re-enables screen repainting.

procedure EndUpdate; virtual;

Description

Use EndUpdate to enable the associated tool bar to adjust to changes in the button’s size and position, after this was turned off by the BeginUpdate method. Calls to BeginUpdate and EndUpdate can be nested. The tool bar will not adjust to changes in the tool button until every call to BeginUpdate has been matched to a corresponding call to EndUpdate.


TToolButton.GetActionLinkClass
 VCL Reference

TToolButton.GetActionLinkClass

TToolButton	See also

Returns TToolButtonActionLink.

type TControlActionLinkClass = class ofTControlActionLink;

function GetActionLinkClass: TControlActionLinkClass; override;

Description

GetActionLinkClass returns the appropriate class type for the action link used with a tool button. This class is used internally to create an action link object for the tool button when it has an associated action. Each Action link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports.

As implemented in TToolButton, GetActionLinkClass returns the TToolButtonActionLink class type, which associates the Down, ImageIndex, ShowHint, Caption, Enabled and Visible properties and the OnClick event handler.


TToolButton.MouseDown
 VCL Reference

TToolButton.MouseDown

TToolButton	See also

Responds when the user clicks the button with the mouse.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);  override;

Description

Do not call MouseDown. It is called automatically when the user clicks the tool button with the mouse. As implemented in TToolButton, MouseDown first toggles the Down property if the button’s style is tbsDropDown and the user clicked the left mouse button. Then it generates an OnMouseDown event.

The Button parameter determines which mouse button the user pressed. Shift indicates which shift keys (Shift, Ctrl, or Alt) were down when the user pressed the mouse button. X and Y are the pixel coordinates of the mouse pointer within the client area of the control.

MouseDown helps ensure that the tool button’s behavior remains unchanged, regardless of the version of ComCtl32.dll that is installed on the users system.


TToolButton.MouseMove
 VCL Reference

TToolButton.MouseMove

TToolButton	See also

Responds when the user moves the mouse over the tool button.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

Do not call MouseMove. It is called automatically when the user moves the mouse over the tool button or when the tool button has captured the mouse. As implemented in TToolButton, MouseMove ensures that the Down property is False if the button’s style is tbsDropDown and the user moved the mouse off the tool button. Then it generates an OnMouseMove event.

The Shift parameter indicates which keys (Shift, Ctrl, and Alt) were down when the mouse moved. X and Y indicate the new position of the mouse pointer.

MouseDown helps ensure that the tool button’s behavior remains unchanged, regardless of the version of ComCtl32.dll that is installed on the users system.


TToolButton.MouseUp
 VCL Reference

TToolButton.MouseUp

TToolButton	See also

Responds when the user releases the mouse.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

Do not call MouseUp. It is called automatically when the user releases the mouse. As implemented in TToolButton, MouseUp first generates an OnMouseUp event. Then, if the left mouse button while over the tool button and the button’s style is tbsDropDown, MouseUp sets the Down property to False. Finally, MouseUp generates an OnClick event.

The Button parameter determines which mouse button the user released. Shift indicates which shift keys (Shift, Ctrl, or Alt) were down when the user released the mouse button. X and Y are the pixel coordinates of the mouse pointer within the client area of the control.

MouseUp helps ensure that the tool button’s behavior remains unchanged, regardless of the version of ComCtl32.dll that is installed on the users system.


TToolButton.Notification
 VCL Reference

TToolButton.Notification

TToolButton	See also

Responds to notifications that components are being created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification allows TToolButton to update its DropDownMenu or MenuItem property when the menu or menu item to which it refers is destroyed.

Override the Notification method to respond to notifications that other components are about to be destroyed or have just been created.


TToolButton.Paint
 VCL Reference

TToolButton.Paint

TToolButton	See also

Renders the image of the tool button.

procedure Paint; override;

Description

Paint draws the edges of the tool button to reflect the value of the Style property. If the tool button is not contained by a tool bar, Paint does nothing.


TToolButton.RefreshControl
 VCL Reference

TToolButton.RefreshControl

TToolButton	See also

Repaints the button if necessary.

procedure RefreshControl; virtual;

Description

Use RefreshControl to repaint the button if necessary. Use RefreshControl rather than the Refresh method to ensure that the tool button honors the BeginUpdate method.

RefreshControl is called when the button is aligned, wrapped, or changed in style.


TToolButton.SetAutoSize
 VCL Reference

TToolButton.SetAutoSize

TToolButton	See also

Sets the value of the AutoSize property.

procedure SetAutoSize(Value: Boolean); override;

Description

SetAutoSize is the protected write implementation of the AutoSize property. TToolButton overrides the inherited method so that it can force the parent toolbar to update its layout if the tool button resizes in response to changing AutoSize to True.


TToolButton.SetBounds
 VCL Reference

TToolButton.SetBounds

TToolButton	See also

Changes the position and size of the button in a single operation.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Call SetBounds to set the Left, Top, Width, and Height properties at once. By calling SetBounds, you guard against a paint operation occurring after one property is set and before the next, which can cause screen flicker.

SetBounds also provides the underlying implementation for setting these four properties.

As implemented in TToolButton, SetBounds ensures that the new position and dimensions of the tool button fit within the constraints imposed by its parent toolbar, and cause the parent toolbar to resize, if necessary, to accommodate the changes in the tool button.


TToolButton.SetToolBar
 VCL Reference

TToolButton.SetToolBar

TToolButton	See also

Associates the tool button with a tool bar.

procedure SetToolBar(AToolBar: TToolBar);

Description

Call SetToolBar to add the tool button to a tool bar. Specify the tool bar as the AToolBar parameter.

If the tool button is already contained by a tool bar, SetToolBar removes the button from its current tool bar before moving it to the new tool bar.


TToolButton.UpdateControl
 VCL Reference

TToolButton.UpdateControl

TToolButton	See also

Ensures the associated tool bar responds to changes in the tool button.

procedure UpdateControl; virtual;

Description

Tool buttons call UpdateControl after any property changes that could affect the layout of the tool bar that contains the button. UpdateControl informs the tool bar that the button has changed so that it can make any necessary adjustments.


TToolButton.ValidateContainer
 VCL Reference

TToolButton.ValidateContainer

TToolButton	See also

Updates the tool button’s width and height when it is inserted into a tool bar.

procedure ValidateContainer(AComponent: TComponent); override;

Description

ValidateContainer is called when the tool button is about to be inserted into the container specified by the AComponent parameter. After calling the ValidateContainer method of TComponent to ensure that the insertion is legal, ValidateContainer checks whether AComponent is a tool bar. If so, it updates the Height and Width properties to reflect the tool bar’s ButtonHeight and ButtonWidth properties.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TToolButton


TToolDockForm
 VCL Reference

TToolDockForm

Hierarchy	Properties	Methods

TToolDockForm is a default floating dock site class for tool buttons.

Unit

ToolWin

Description

Assign TToolDockForm to the FloatingDockSiteClass property of tool buttons to get appropriate docking behavior.


 VCL Reference

TToolDockForm properties

TToolDockForm	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveOleControl

BorderStyle

Canvas

ClientRect

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

KeyPreview

Menu

ModalResult

Monitor

OleFormObject

Parent

PixelsPerInch

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TToolDockForm properties

TToolDockForm	By object	Legend

Action

Active

ActiveControl

ActiveOleControl

Align

AlignDisabled

Anchors

AutoScroll

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

KeyPreview

Left

LRDockWidth

Menu

ModalResult

Monitor

Name

OleFormObject

Owner

Parent

ParentWindow

PixelsPerInch

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc

WindowState


 VCL Reference

TToolDockForm methods

TToolDockForm	Alphabetically	Legend

In TToolDockForm

CanResize

Create

CreateParams

DoAddDockClient

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

CreateNew

DefaultHandler

DefocusControl

Destroy

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TToolDockForm methods

TToolDockForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanResize

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DoAddDockClient

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TToolDockForm.CanResize
 VCL Reference

TToolDockForm.CanResize

TToolDockForm

Specifies whether the control can resize itself.

function CanResize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanResize is called automatically when an attempt is made to resize the control, after any autosizing has occurred. The NewWidth and NewHeight parameters specify the attempted new values for the control’s height and width. CanResize optionally adjusts the values of NewWidth and NewHeight, and returns True if the control can be resized to the returned values. CanResize returns False if the control can’t be resized.


TToolDockForm.Create
 VCL Reference

TToolDockForm.Create

TToolDockForm	See also

Creates an instance of TToolDockForm.

constructor Create(AOwner: TComponent); override;

Description

AOwner is the dock form’s owner, which is responsible for freeing the tool dock form.

The constructor initializes the BorderWidth property to 1.


TToolDockForm.CreateParams
 VCL Reference

TToolDockForm.CreateParams

TToolDockForm

Initializes the window-creation parameter record when the form window is created.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams calls the inherited CreateParams method, and then adds WS_POPUP to the Style property.


TToolDockForm.DoAddDockClient
 VCL Reference

TToolDockForm.DoAddDockClient

TToolDockForm

Performs actions when a control is docked to the form.

procedure DoAddDockClient(Client: TControl; const ARect: TRect); override;

Description

DoAddDockClient sets the client’s Align property to alNone and its BoundsRect property to ClientRect. Then DoAddDockClient calls the inherited DoAddDockClient method and sets the form’s AutoSize property to True.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TCustomDockForm

TToolDockForm


TToolDockObject
 VCL Reference

TToolDockObject

Hierarchy	Properties	Methods	See also

Handles drag-and-dock operations for toolbar controls.

Unit

ToolWin

Description

Use TToolDockObject to handle drag-and-dock operations for toolbar controls that are docked to a TControlBar object.

Note:	TToolDockObject is designed for tool bars that are docked to TControlBar. It may not work as expected when the application is docking a tool bar to a form or panel.


 VCL Reference

TToolDockObject properties

TToolDockObject	Alphabetically	Legend

Derived from TDragDockObject

Brush

DockRect

DropAlign

DropOnControl

Floating

FrameWidth

Derived from TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

MouseDeltaX

MouseDeltaY


 VCL Reference

TToolDockObject properties

TToolDockObject	By object	Legend

Brush

Cancelling

Control

DockRect

DragHandle

DragPos

DragTarget

DragTargetPos

DropAlign

DropOnControl

Floating

FrameWidth

MouseDeltaX

MouseDeltaY


 VCL Reference

TToolDockObject methods

TToolDockObject	Alphabetically	Legend

In TToolDockObject

AdjustDockRect

DrawDragDockImage

EraseDragDockImage

Derived from TDragDockObject

Assign

Create

Destroy

Derived from TDragObject

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TToolDockObject methods

TToolDockObject	By object	Legend

AdjustDockRect

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

DrawDragDockImage

EraseDragDockImage

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TToolDockObject.AdjustDockRect
 VCL Reference

TToolDockObject.AdjustDockRect

TToolDockObject	See also

Adjusts the value of DockRect to reflect the dragged control’s current status.

procedure AdjustDockRect(ARect: TRect); override;

Description

AdjustDockRect is called automatically at points during the drag operation to adjust the value of the DockRect property. The adjustment ensures that the position where the control is docked reflects the current mouse position, and, if the control is floating, reflects the size and shape of the control’s floating dock site.


TToolDockObject.DrawDragDockImage
 VCL Reference

TToolDockObject.DrawDragDockImage

TToolDockObject	Methods

Called when the dock image for a toolbar control is drawn.

procedure DrawDragDockImage; override;

Description

DrawDragDockImage draws a control that is moved in a toolbar.


TToolDockObject.EraseDragDockImage
 VCL Reference

TToolDockObject.EraseDragDockImage

TToolDockObject	Methods

Called when the dock image for a toolbar control is erased.

procedure EraseDragDockImage; override;

Description

EraseDragDockImage erases a control that is moved in a toolbar.


Hierarchy

TObject

TDragObject

TBaseDragControlObject

TDragDockObject

TToolDockObject


TTrackBar
 VCL Reference

 TTrackBar

Hierarchy	Properties	Methods	Events	Using TTrackBar	See also

TTrackBar is a wrapper for a Windows track bar control.

Unit

ComCtrls

Description

Use TTrackBar to put a track bar on a form. A track bar represents a position along a continuum using a slider and, optionally, tick marks. A track bar can also display a selected range marked by triangular ticks at the starting and ending positions of the selection.

During program execution, the slider can be moved to the desired position by dragging it with the mouse or by clicking the mouse on the bar. To use the keyboard to move the slider, press the arrow keys or the PageUp and PageDown keys.


 VCL Reference

TTrackBar Properties

TTrackBar	Alphabetically	Legend

In TTrackBar

Frequency

LineSize

Max

Min

Orientation

PageSize

Position

SelEnd

SelStart

SliderVisible

ThumbLength

TickMarks

TickStyle

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTrackBar Properties

TTrackBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderWidth

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Frequency

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LineSize

LRDockWidth

Max

Min

Name

Orientation

Owner

PageSize

Parent

ParentCtl3D

ParentShowHint

ParentWindow

PopupMenu

Position

SelEnd

SelStart

ShowHint

Showing

SliderVisible

TabOrder

TabStop

Tag

TBDockHeight

ThumbLength

TickMarks

TickStyle

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TTrackBar.Frequency
 VCL Reference

TTrackBar.Frequency

TTrackBar	See also

Specifies the increment between tick marks on the track bar.

property Frequency: Integer;

Description

Use Frequency to specify the spacing of the tick marks, using the logical units used by the Position property. For example, a Frequency of 5 sets a tick mark at every fifth possible increment. To provide visual feedback about the units used by the track bar, set Frequency to LineSize or PageSize.

Note:	If the value of the TickStyle property is not set to tsAuto, the value of Frequency is ignored.


TTrackBar.LineSize
 VCL Reference

 TTrackBar.LineSize

TTrackBar	See also

Indicates the amount the value of Position changes when the user presses the arrow keys.

property LineSize: Integer;

Description

Use LineSize to specify the distance along the slider that represents a single unit. The current Position is marked by a slider. The right and down arrow keys increment the value of Position by LineSize, and the left and up arrow keys decrement the value of Position by LineSize.

Use the PageSize property to set the number of ticks moved using the PageUp and PageDown keys.


TTrackBar.Max
 VCL Reference

 TTrackBar.Max

TTrackBar	See also

Specifies the maximum Position of a TTrackBar.

property Max: Integer;

Description

Use Max to set an upper limit to the value that can be represented using the track bar. A slider indicates the current Position in a range between Min and Max.


TTrackBar.Min
 VCL Reference

 TTrackBar.Min

TTrackBar	See also

Specifies the minimum Position of a TTrackBar.

property Min: Integer;

Description

Use Min to set a lower limit to the value that can be represented using the track bar. A slider indicates the current Position in a range between Min and Max.


TTrackBar.Orientation
 VCL Reference

 TTrackBar.Orientation

TTrackBar	See also

Specifies whether the track bar is horizontal or vertical.

type TTrackBarOrientation = (trHorizontal, trVertical;

property Orientation: TTrackBarOrientation;

Description

Set Orientation to the desired orientation of the track bar. Orientation has these possible values:

Value	Meaning

tbHorizontal	The long edge of the track is parallel to the top of the form. The Min position is on the left and the Max position is on the right.

tbVertical	The long edge of the track is parallel to the side of the form. The Min position is on the top and the Max position is on the bottom.


TTrackBar.PageSize
 VCL Reference

 TTrackBar.PageSize

TTrackBar	See also

Specifies the amount Position is changed when the PageUp or PageDown key is pressed, or when the bar is clicked.

property PageSize: Integer;

Description

Set PageSize to the distance along the track bar that corresponds to a single view. A slider marks the current Position. The PageUp key increments the value of Position by PageSize, and PageDown key decrements the value of Position by PageSize.

Use the LineSize property to set the number of ticks moved using the arrow keys.


TTrackBar.Position
 VCL Reference

TTrackBar.Position

TTrackBar	See also

Contains the current position of the slider of a TTrackBar.

property Position: Integer;

Description

Read Position to determine the current value represented by the track bar. Position is a value in the range between Min and Max (inclusive). Set Position to programmatically move the slider of the track bar to a new value.


TTrackBar.SelEnd
 VCL Reference

 TTrackBar.SelEnd

TTrackBar	See also

Specifies the position of the end point of the selection range.

property SelEnd: Integer;

Description

Set SelEnd to determine the length of a selection that begins at SelStart. The track bar indicates a selection range on the bar by placing special tick marks at the positions specified by the SelStart and SelEnd properties and highlighting the selected portion of the bar.

SelEnd must be greater than or equal to Position. If SelEnd is set to a value less than Position, Position changes to SelEnd. SelEnd must be greater than or equal to SelStart. If SelEnd is the same as SelStart, there is no selection, and the value of Position is the same as SelStart and SelEnd.


TTrackBar.SelStart
 VCL Reference

TTrackBar.SelStart

TTrackBar	See also

Specifies the position of the starting point of the selection range.

property SelStart: Integer;

Description

Set SelStart to determine the beginning of a selection that runs to SelEnd. The track bar indicates a selection range on the bar by placing special tick marks at the positions specified by the SelStart and SelEnd properties and highlighting the selected portion of the bar.

SelStart must be less than or equal to Position. If SelStart is set to a value greater than Position, Position changes to SelStart. SelStart must be less than or equal to SelEnd. If SelStart is the same as SelEnd, there is no selection, and the value of Position is the same as SelStart and SelEnd.


TTrackBar.SliderVisible
 VCL Reference

TTrackBar.SliderVisible

TTrackBar

Specifies whether the track bar’s slider is visible.

property SliderVisible: Boolean;

Description

Use SliderVisible to get or set whether the track bar’s slider is visible.


TTrackBar.ThumbLength
 VCL Reference

TTrackBar.ThumbLength

TTrackBar

Specifies the length of the track bar’s slider.

property ThumbLength: Integer;

Description

Use ThumbLength to get or set the length of the track bar’s slider.


TTrackBar.TickMarks
 VCL Reference

  TTrackBar.TickMarks

TTrackBar	See also

Specifies the location of the tick marks.

type TTickMark = (tmBottomRight, tmTopLeft, tmBoth);

property TickMarks: TTickMark;

Description

Set TickMarks to specify where the tick marks should be drawn. TickMarks has these possible values:

Value	Meaning

tmBottomRight	Tick marks are on the bottom or right of the track bar, depending of the value of Orientation.

tmTopLeft	Tick marks are on the top or left of the track bar, depending of the value of Orientation.

tmBoth	Tick marks are on both sides of the track bar.

If the TickStyle property is tsNone, the value of TickMarks is ignored.


TTrackBar.TickStyle
 VCL Reference

 TTrackBar.TickStyle

TTrackBar	See also

Specifies how tick marks are placed on the track bar.

type TTickStyle = (tsNone, tsAuto, tsManual);

property TickStyle: TTickStyle;

Description

Set TickStyle to specify whether the track bar should display tick marks, and if so, how those tick marks are set. TickStyle has these possible values:

Value	Meaning

tsAuto	Tick marks are automatically displayed at increments equal to the value of the Frequency property.

tsManual	Tick marks are displayed at the Min and Max values. Additional tick marks can be set using the SetTick method.

tsNone	No tick marks are displayed.


 VCL Reference

TTrackBar Events

TTrackBar	Alphabetically	Legend

In TTrackBar

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TTrackBar Events

TTrackBar	By Object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnStartDock

OnStartDrag


TTrackBar.OnChange
 VCL Reference

TTrackBar.OnChange

TTrackBar	See also

Occurs immediately after the value of Position changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever the position of the slider may have changed. For example, if the track bar is being used to control another object, update the other object from an OnChange event handler.


 VCL Reference

TTrackBar Methods

TTrackBar	Alphabetically	Legend

In TTrackBar

Create

SetTick

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTrackBar Methods

TTrackBar	By Object	Legend

Create

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

SetTick

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TTrackBar.Create
 VCL Reference

TTrackBar.Create

TTrackBar	See also

Creates and initializes an instance of TTrackBar.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TTrackBar object at runtime. Track bars placed on forms at design time are created automatically.

Create allocates memory and initializes the following properties:

ControlStyle is set to [csCaptureMouse, csClickEvents, csSetCaption].

Frequency is set to 1.

Height is set to 45 and Width to 150.

LineSize is set to 1 and PageSize to 2.

Max is set to 10 and Min to 0.

Orientation is set to trHorizontal.

TickMarks is set to tbBottomRight and TickStyle to tsAuto.

TabStop is set to True.


TTrackBar.SetTick
 VCL Reference

 TTrackBar.SetTick

TTrackBar	See also

Adds a tick mark to the track bar at a specified location.

procedure SetTick(Value: Integer);

Description

Use SetTick to place a tick mark on the bar at the position that corresponds to the Value parameter. Tick marks specified in this manner are only displayed when the TickStyle is set to tsManual.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TTrackBar


TUpDown
 VCL Reference

 TUpDown

Hierarchy	Properties	Methods	Events	Using TUpDown	See also

TUpDown is a wrapper for a Windows up-down control.

Unit

ComCtrls

Description

Use TUpDown to add an up-down control to a form. Up-down controls consist of a pair of arrow buttons, such as the arrows that appear in a spin box. Up-down controls allow users to change the size of a numerical value by clicking on arrow buttons.


 VCL Reference

TUpDown properties

TUpDown	Alphabetically	Legend

Derived from TCustomUpDown

AlignButton

ArrowKeys

Associate

Increment

Max

Min

Orientation

Position

Thousands

Wrap

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TUpDown properties

TUpDown	By object	Legend

Action

Align

AlignButton

AlignDisabled

Anchors

ArrowKeys

Associate

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Increment

Left

LRDockWidth

Max

Min

Name

Orientation

Owner

Parent

ParentShowHint

ParentWindow

PopupMenu

Position

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Thousands

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc

Wrap


 VCL Reference

TUpDown events

TUpDown	Alphabetically	Legend

Derived from TCustomUpDown

OnChanging

OnChangingEx

OnClick

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TUpDown events

TUpDown	By object	Legend

OnChanging

OnChangingEx

OnClick

OnContextPopup

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TUpDown methods

TUpDown	Alphabetically	Legend

Derived from TCustomUpDown

CreateTCustomUpDown_Create>main

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TUpDown methods

TUpDown	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomUpDown

TUpDown


TWinControlActionLink
 VCL Reference

TWinControlActionLink

Hierarchy	Properties	Methods	Events

TWinControlActionLink is an action link used by descendents of TWinControl.

Unit

Controls

Description

TWinControlActionLink is designed to link actions to controls based on TWinControl. TWinControlActionLink inherits support for linking actions with the properties of components and controls and adds support for linking the help context.


 VCL Reference

TWinControlActionLink properties

TWinControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TWinControlActionLink properties

TWinControlActionLink	By object	Legend

Action


 VCL Reference

TWinControlActionLink events

TWinControlActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TWinControlActionLink events

TWinControlActionLink	By object	Legend

OnChange


 VCL Reference

TWinControlActionLink methods

TWinControlActionLink	Alphabetically	Legend

In TWinControlActionLink

AssignClient

IsHelpContextLinked

SetHelpContext

Derived from TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWinControlActionLink methods

TWinControlActionLink	By object	Legend

AfterConstruction

AssignClient

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsHelpContextLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetHelpContext

Update


TWinControlActionLink.AssignClient
 VCL Reference

TWinControlActionLink.AssignClient

TWinControlActionLink

Specifies the client control.

procedure AssignClient(AClient: TObject); override;

Description

TWinControlActionLink overrides AssignClient to ensure that the client is a TWinControl object.


TWinControlActionLink.IsHelpContextLinked
 VCL Reference

TWinControlActionLink.IsHelpContextLinked

TWinControlActionLink	See also

Indicates whether the Help context for the action and the client are linked.

function IsHelpContextLinked: Boolean; override;

Description

IsHelpContextLinked indicates whether HelpContext property is linked to the appropriate client property. IsHelpContextLinked returns True if the client requests that the action control this property, False otherwise.


TWinControlActionLink.SetHelpContext
 VCL Reference

TWinControlActionLink.SetHelpContext

TWinControlActionLink	See also

Sets the Help context of a windowed control if the client is linked to the action for this event.

procedure SetHelpContext(Value: THelpContext); override;

Description

SetHelpContext sets the help context of a client windowed control, and is called only if the client is linked for this event. Value specifies whether what the help context should be.


TWinControlActionLinkTWinControlActionLink.Create
 VCL Reference

TWinControlActionLink.Create

TWinControlActionLink

Instantiates and initializes a TWinControlActionLink object.

Description

Applications do not need to call the constructor directly. Instances of TWinControlActionLink are created automatically when you connect an action with a client in the action list editor. The AClient parameter is the client for the link. The link connects this client to its action.


Hierarchy

TObject

TBasicActionLink

TActionLink

TControlActionLink

TWinControlActionLink


TWinControl
 VCL Reference

TWinControl

Hierarchy	Properties	Methods	Events	See also

TWinControl is the base class for all controls that are wrappers for Microsoft Windows screen objectss.

Unit

Controls

Description

TWinControl provides the common functionality for all controls that act as wrappers for Microsoft Windows screen objects (“windows”). Controls that are wrap underlying windows have the following features:

The control can incorporate the functionality of an underlying window. For example, if the underlying screen object is a text editor, the control can incoporate the editor ability to manage and display a text buffer.

The control can receive user input focus. The focused control can handle keyboard input events. Some controls change their appearance when they have the focus. For example, button controls typically indicate the focus by drawing a rectangle around the caption.

The control can serve as a container for other controls, referred to as child controls. This relationship is signified by the child's Parent property. Container controls provide important services to their children, including display services for controls that do not implement their own canvases. Examples of container controls include forms, panels, and toolbars.

Controls based on TWinControl can display standard screen objects provided by Microsoft Windows, or customized screen objects developed by the VCL programmer.

Descendants of TWinControl include abstract base classes that support most kinds of user interface objects. The most significant descendant is TCustomControl, which provides code to implement a canvas and handle paint messages. Other important abstract descendants include TScrollingWinControl, TButtonControl, TCustomComboBox, TCustomEdit, and TCustomListBox. When defining new control classes, consider these descendants before deriving directly from TWinControl.

Every TWinControl object has a Handle property which returns the window handle for the underlying Microsoft Windows screen object. Use the Handle property to bypass the VCL API and directly access the underlying window.


 VCL Reference

TWinControl Properties

TWinControl	Alphabetically	Legend

In TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DefWndProc

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

WindowHandle

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWinControl Properties

TWinControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderWidth

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefWndProc

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

Left

LRDockWidth

Name

Owner

Parent

ParentCtl3D

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UseDockManager

VCLComObject

Visible

VisibleDockClientCount

Width

WindowHandle

WindowProc


TWinControl.AlignDisabled
 VCL Reference

TWinControl.AlignDisabled

TWinControl	See also

Indicates child control realignment disabled.

property AlignDisabled: Boolean;

Description

AlignDisabled returns True if child control realignment has been temporarily disabled by a call to DisableAlign.


TWinControl.BevelEdges
 VCL Reference

TWinControl.BevelEdges

TWinControl	Properties 	See also

Specifies which edges of the control are beveled.

property BevelEdges: TBevelEdges;

Description

Use BevelEdges to get or set which edges of the control are beveled. The BevelInner, BevelOuter, and BevelKind properties determine the appearance of the specified edges.


TWinControl.BevelInner
 VCL Reference

TWinControl.BevelInner

TWinControl	Properties 	See also

Specifies the cut of the inner bevel.

property BevelInner: TBevelCut;

Description

Use BevelInner to specify whether the inner bevel has a raised, lowered, or flat look.

The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (BevelOuter is bvNone), the inner bevel appears immediately inside the border.


TWinControl.BevelKind
 VCL Reference

TWinControl.BevelKind

TWinControl	Properties 	See also

Specifies the control’s bevel style.

property BevelKind: TBevelKind;

Description

Use BevelKind to modify the appearance of a bevel. BevelKind influences how sharply the bevel stands out.

BevelKind, in combination with BevelWidth and the cut of the bevel specified by BevelInner or BevelOuter, can create a variety of effects. Experiment with various combinations to get the look you want.


TWinControl.BevelOuter
 VCL Reference

TWinControl.BevelOuter

TWinControl	Properties 	See also

Specifies the cut of the outer bevel.

property BevelOuter: TBevelCut;

Description

Use BevelInner to specify whether the outer bevel has a raised, lowered, or flat look.

The outer bevel appears immediately inside the border and outside the inner bevel.


TWinControl.BevelWidth
 VCL Reference

TWinControl.BevelWidth

TWinControl	Properties 	See also

Specifies the width of the inner and outer bevels.

property BevelWidth: TBevelWidth;

Description

Use BevelWidth to specify the width, in pixels, of the inner and outer bevels.


TWinControl.BorderWidth
 VCL Reference

TWinControl.BorderWidth

TWinControl 	See also

Specifies the width of the control’s border.

property BorderWidth: TBorderWidth;

Description

Use BorderWidth to get or set the width of the control’s border. Graphics or text drawn by the control is clipped to the area within the border.


TWinControl.Brush
 VCL Reference

TWinControl.Brush

TWinControl	See also

Determines the color and pattern used for painting the background of the control.

property Brush: TBrush;

Description

The Brush property accesses the TBrush object that determines pattern and color for the control background. Brush is a read-only property, but an application can manipulate the TBrush object by setting its properties or by using its Assign method.


TWinControl.ClientOrigin
 VCL Reference

TWinControl.ClientOrigin

TWinControl	See also

Indicates the screen coordinates (in pixels) of the top left corner of the client area of the control.

property ClientOrigin: TPoint;

Description

Read ClientOrigin to discover where the top-left corner of the control is on the screen. ClientOrigin returns X and Y coordinates in a record of type TPoint. The TPoint type defines a pixel location onscreen, with the origin in the top left corner of the control. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.


TWinControl.ClientRect
 VCL Reference

TWinControl.ClientRect

TWinControl	See also 	Example

Indicates the size (in pixels) of a control’s client area.

property ClientRect: TRect;

Description

Read ClientRect to learn the size of the client area of a control. ClientRect returns a rectangle defining the client area of the control. It is equivalent to Rect(0, 0, ClientWidth, ClientHeight).

Note:	ClientRect is the size of the physical client area of the control, not its logical client area. If the control supports scrolling, the ClientRect is not the entire scrolling range, but only the region that is available at any time.


TWinControl.ControlCount
 VCL Reference

TWinControl.ControlCount

TWinControl	See also 	Example

Returns the number of child controls.

property ControlCount: Integer;

Description

Read ControlCount when iterating over all the children of this control. The children of the control are listed in the Controls property array.

ControlCount is a read-only property.

Note:	The value of ControlCount is always 1 greater than the highest Controls index, because the first Controls index is 0.


TWinControl.Controls
 VCL Reference

TWinControl.Controls

TWinControl	See also 	Example

Lists all child controls.

property Controls[Index: Integer]: TControl;

Description

Controls is an array of all the child controls. These are all controls that list this control as their Parent property. The Controls property is convenient for referring to the children of a control by number rather than name. For example, Controls may be used to iterate over all the child controls.

Don't confuse the Controls property with the Components property. The Controls property lists all the controls that are child windows of the control, while the Components property lists all components that it owns. The form owns all components put on it, and therefore, they appear in the form's Components property list, even when they are child windows of a control on the form.

Controls is a read-only property. To add or delete a child control, use the InsertControl or RemoveControl methods. To move a child control from one parent to another, set the Parent of the child control, as that will handle both the RemoveControl from the original parent and the InsertControl to the new parent.


TWinControl.Ctl3D
 VCL Reference

TWinControl.Ctl3D

TWinControl	See also

Determines whether a control has a three-dimensional (3-D) or two-dimensional look.

property Ctl3D: Boolean;

Description

Ctl3D is provided for backward compatibility. It is not used by 32-bit versions of Windows or NT4.0 and later.

On earlier platforms, Ctl3D controlled whether the control had a flat or beveled appearance.


TWinControl.DefWndProc
 VCL Reference

TWinControl.DefWndProc

TWinControl	See also

Specifies the default window procedure for the windowed control.

property DefWndProc: Pointer;

Description

Windowed controls use the Windows API function CallWindowProc with DefWndProc to invoke the standard Windows message handling for a window message. Using DefWndProc instead of the WndProc method bypasses any message processing introduced by the WndProc method.

DefWndProc fills the role for windowed controls that DefaultHandler fills for all objects. The DefaultHandler for TWinControl uses DefWndProc to pass messages to Windows for processing.

For windowed controls, DefWndProc is initially set to the window procedure of the window class specified in the Params parameter in the CreateParams method. Change DefWndProc to subclass the window class of a windowed control.


TWinControl.DockClientCount
 VCL Reference

TWinControl.DockClientCount

TWinControl	See also	Example

Specifies the number of controls that are docked on the windowed control.

property DockClientCount: Integer;

Description

Use DockClientCount to get the number of controls that are docked to the windowed control. This value can be used as an upper bound when iterating through the DockClients property.

Note:	The DockClients property can contain controls that are not visible. To get the number of docked clients that are visible, use the VisibleDockClientCount property instead.


TWinControl.DockClients
 VCL Reference

TWinControl.DockClients

TWinControl	See also

Lists the controls that are docked to the windowed control.

property DockClients[Index: Integer]: TControl;

Description

Use DockClients to access any control that is docked to the windowed control.


TWinControl.DockManager
 VCL Reference

TWinControl.DockManager

TWinControl	See also

Specifies the control’s docking manager interface.

property DockManager: IDockManager;

Description

Use DockManager to specify the control’s docking manager. The docking manager handles the layout of docking zones (where controls are docked) and any painting associated with docking zones.

If you set DockSite and UseDockManager to True, but do not assign a value to DockManager, the windowed control generates a default docking manager, using the global DefaultDockTreeClass variable.


TWinControl.DockSite
 VCL Reference

TWinControl.DockSite

TWinControl	Example

Specifies whether the control can be the target of drag-and-dock operations.

property DockSite: Boolean;

Description

Set DockSite to True to allow other controls to be docked to this windowed control.


TWinControl.DoubleBuffered
 VCL Reference

TWinControl.DoubleBuffered

TWinControl	See also

Determines whether the control’s image is rendered directly to the window or painted to an in-memory bitmap first.

property DoubleBuffered: Boolean;

Description

When DoubleBuffered is False, the windowed control paints itself directly to the window. When DoubleBuffered is True, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive.

When a windowed control is a dock site and has an associated dock manager, it must be double-buffered.

Note:	Some controls, such as TRichEdit, can’t paint themselves into a bitmap. For such controls, DoubleBuffered must be set to False.


TWinControl.Handle
 VCL Reference

TWinControl.Handle

TWinControl	See also	Example

Provides access to the underlying Windows screwn object for the control.

property Handle: HWND;

Description

The Handle property returns the window handle for the underlying Microsoft Windows screen object. Use the Handle property to bypass the VCL API and directly access the underlying window.

Do not refer to the Handle property during component creation or streaming. The underlying window does not exist until the first time the Handle property is referenced. When this occurs, the HandleNeeded method is called automatically.

Handle is a read-only property.


TWinControl.ImeMode
 VCL Reference

TWinControl.ImeMode

TWinControl	See also

Determines the behavior of the input method editor (IME).

property ImeMode: TImeMode;

Description

Set ImeMode to configure the way an IME processes user keystrokes. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the Delphi application.

ImeMode allows a control to influence the type of conversion performed by the IME so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an ImeMode of imClose, as no conversion is necessary for numeric input.

Note:	The value of ImeMode only takes effect when the control receives focus. To change the value of ImeMode when the control already has input focus, call the SetIme method.


TWinControl.ImeName
 VCL Reference

TWinControl.ImeName

TWinControl	See also

Specifies the input method editor (IME) to use for converting keyboard input to Asian language characters.

type TImeName = type string;

property ImeName: TImeName;

Description

Set ImeName to specify which IME to use for converting keystrokes. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the Delphi application.

ImeName must specify one of the IMEs that has been installed through the Windows control panel. The property inspector provides a drop-down list of all currently installed IMEs on the system. At runtime, applications can obtain a list of currently installed IMEs from the global Screen variable.

If ImeName specifies an unavailable IME, the IME that was active when the application started is used instead. No exception is generated.

Note:	The value of ImeName only takes effect when the control receives focus. To change the value of ImeName after the control has input focus, call the SetIme method.


TWinControl.ParentCtl3D
 VCL Reference

TWinControl.ParentCtl3D

TWinControl	See also

Determines where a component looks to determine if it should appear three dimensional.

property ParentCtl3D: Boolean;

Description

ParentCtl3D is provided for backwards compatibility. It has no effect on 32-bit versions of Windows or NT 4.0 and later.

ParentCtl3D determines whether the control uses its parent’s Ctl3D property.


TWinControl.ParentWindow
 VCL Reference

TWinControl.ParentWindow

TWinControl	See also

Reference to parent’s underlying control.

property ParentWindow: HWnd;

Description

ParentWindow refers to the window handle that underlies the parent control. To designate a non-VCL control as a parent, assign that control’s handle to ParentWindow. This assignment causes the control to be moved into the parent’s screen area. Setting ParentWindow has no effect if Parent is not nil

TActiveXControl objects use ParentWindow to insert a control in an ActiveX container window. ParentWindow is set automatically when a control is created using the CreateParented method.

Use ParentWindow with windowed controls that are packaged in a DLL. This allows references to the control by applications based on other applications.


TWinControl.Showing
 VCL Reference

TWinControl.Showing

TWinControl	See also

Indicates whether the control is showing on the screen.

property Showing: Boolean;

Description

Showing is used internally to optimize the allocation of Windows resources. Use Showing to determine when you must allocate resources that are required when the control is visible. When Showing is False, the control is not visible and you can delay the allocation of resources.

If the Visible properties of a component and all the parents in its parent hierarchy are True, Showing is guaranteed to be True. If one of the parents containing the control has a Visible property value of False, Showing may be either True or False.

Showing is a read-only property.


TWinControl.TabOrder
 VCL Reference

TWinControl.TabOrder

TWinControl	See also

Indicates the position of the control in its parent's tab order.

type TTabOrder = -1..32767;

property TabOrder: TTabOrder;

Description

TabOrder is the order in which child windows are visited when the user presses the Tab key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears.

Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property.

Each control has a unique tab-order value within its parent. If you change the TabOrder property value of one control to be the same as the value of a second control, the TabOrder value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's TabOrder property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth.

Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that assures the control is the last in the tab order.

TabOrder is meaningful only if the TabStop property is True and if the control has a parent. (The TabOrder property of a form is not used unless the form is the child of another form.) A control with a TabOrder of -1 has no parent, and therefore cannot be reached by pressing the Tab key. To remove a parented control from the Tab order, set its TabStop property to False.


TWinControl.TabStop
 VCL Reference

TWinControl.TabStop

TWinControl	See also

Determines if the user can tab to a control.

property TabStop: Boolean;

Description

Use the TabStop to allow or disallow access to the control using the Tab key.

If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user can't press the Tab key to move to the control.

Note:	TabStop is not meaningful for a form unless the form assigns another form to be its parent.


TWinControl.UseDockManager
 VCL Reference

TWinControl.UseDockManager

TWinControl	See also

Specifies whether the docking manager is used in drag-and-dock operations.

property UseDockManager: Boolean;

Description

Use UseDockManager to get or set whether a docking manager is used in drag-and-dock operations.

The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control.


TWinControl.VisibleDockClientCount
 VCL Reference

TWinControl.VisibleDockClientCount

TWinControl	See also

Specifies the number of visible controls that are docked on the windowed control.

property VisibleDockClientCount: Integer;

Description

Use VisibleDockClientCount to determine the number of controls in the DockClients list that have a Visible property value of True. This value is less than or equal to the value of DockClientCount.


TWinControl.WindowHandle
 VCL Reference

TWinControl.WindowHandle

TWinControl	See also

Provides access to a window handle for the control.

property WindowHandle: Hwnd;

Description

The WindowHandle property provides access to the same window handle as the Handle property, but WindowHandle is protected, and therefore only accessible to code inside the control.

The advantage to using WindowHandle is that it can be written to, while the Handle property is read-only. Use WindowHandle when implementing methods that need to change the value of the control’s window handle. Unlike the Handle property, reading the value of WindowHandle doesn’t automatically create a valid handle. Reading WindowHandle can return a zero value.


 VCL Reference

TWinControl Events

TWinControl	Alphabetically	Legend

In TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnUnDock


 VCL Reference

TWinControl Events

TWinControl	By Object	Legend

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnUnDock


TWinControl.OnDockDrop
 VCL Reference

TWinControl.OnDockDrop

TWinControl	See also

Occurs when another control is docked to the control.

property OnDockDrop: TDockDropEvent;

Description

Write code in the OnDockDrop event to perform actions when another control is docked on the control.

OnDockDrop can only occur if DockSite is True.


TWinControl.OnDockOver
 VCL Reference

TWinControl.OnDockOver

TWinControl	See also	Example

Occurs when another control is dragged over the control.

property OnDockOver: TDockOverEvent;

Description

Write code in the OnDockOver event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. OnDockOver occurs after the TDragDockObject has been initialized by an OnGetSiteInfo event.

OnDockOver occurs only if DockSite is True.


TWinControl.OnEnter
 VCL Reference

TWinControl.OnEnter

TWinControl	See also 	Example

Occurs when a control receives the input focus.

property OnEnter: TNotifyEvent;

Description

Use the OnEnter event handler to cause any special processing to occur when a control becomes active.

The OnEnter event does not occur when switching between forms or between another application and the application that includes the control.

When switching between controls in separate container controls such as the TPanel and the TGroupBox controls, an OnEnter event occurs for the container before the OnEnter event of the contained control.

Similarly, an OnExit event of the container occurs after the OnExit event of the control in a container when focus moves to another control outside the container.

For example, consider a form with an OK button and a group box that contains three radio buttons, where focus is currently on the OK button. When the user clicks one of the radio buttons, an OnExit event of the button occurs, followed by an OnEnter event on the group box, and finally an OnEnter event on the radio button that was clicked. If the user then clicks on the OK button, an OnExit event for the radio button occurs followed by an OnExit event for the group box, and then the button’s OnEnter event occurs.


TWinControl.OnExit
 VCL Reference

TWinControl.OnExit

TWinControl	See also 	Example

Occurs when the input focus shifts away from one control to another.

property OnExit: TNotifyEvent;

Description

Use the OnExit event handler to provide special processing when the control ceases to be active.

The OnExit event does not occur when switching between forms or between another application and your application.

When switching between controls in separate container controls such as the TPanel and the TGroupBox controls, an OnExit event occurs for the control inside the container before the OnExit event of the container.

Similarly, an OnEnter event of the container occurs before the OnEnter event of the control in a container when focus moves to a control inside a container.

For example, consider a form with an OK button and a group box that contains three radio buttons, where focus is currently on the OK button. When the user clicks one of the radio buttons, an OnExit event of the button occurs, followed by an OnEnter event on the group box, and finally an OnEnter event on the radio button that was clicked. If the user then clicks on the OK button, an OnExit event for the radio button occurs followed by an OnExit event for the group box, and then the button’s OnEnter event occurs.

Note:	The value of TCustomForm.ActiveControl and TScreen.ActiveControl updates before the OnExit event occurs.


TWinControl.OnGetSiteInfo
 VCL Reference

TWinControl.OnGetSiteInfo

TWinControl	See also

Returns the control’s docking information.

property OnGetSiteInfo: TGetSiteInfoEvent;

Description

Write code in the OnGetSiteInfo event handler to initialize a TDragDockObject with information about where a dragged object can be docked, if at all. OnGetSiteInfo occurs before the OnDockOver event.

OnGetSiteInfo occurs only if DockSite is True.


TWinControl.OnKeyDown
 VCL Reference

TWinControl.OnKeyDown

TWinControl	See also 	Example

Occurs when a user presses any key while the control has focus.

type

  TKeyEvent = procedure (Sender: TObject; var Key: Word; Shift: TShiftState) of object;

property OnKeyDown: TKeyEvent;

Description

Use the OnKeyDown event handler to specify special processing to occur when a key is pressed. The OnKeyDown handler can respond to all keyboard keys, including function keys and keys combined with the Shift, Alt, and Ctrl keys, and pressed mouse buttons.

The TKeyEvent type points to a method that handles keyboard events.

The Key parameter is the key on the keyboard. For non-alphanumeric keys, use virtual key codes to determine the key pressed. For more information, see Virtual Key codes.

The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.


TWinControl.OnKeyPress
 VCL Reference

TWinControl.OnKeyPress

TWinControl	See also 	Example

Occurs when key pressed.

type TKeyPressEvent = procedure (Sender: TObject; var Key: Char) of object;

property OnKeyPress: TKeyPressEvent;

Description

Use the OnKeyPress event handler to make something happen as a result of a single character key press.

The Key parameter in the OnKeyPress event handler is of type Char; therefore, the OnKeyPress event registers the ASCII character of the key pressed. Keys that don't correspond to an ASCII Char value (Shift or F1, for example) don't generate an OnKeyPress event. Key combinations (such as Shift+A), generate only one OnKeyPress event (for this example, Shift+A results in a Key value of “A” if Caps Lock is off). To respond to non-ASCII keys or key combinations, use the  OnKeyDown or OnKeyUp event handlers.


TWinControl.OnKeyUp
 VCL Reference

TWinControl.OnKeyUp

TWinControl	See also 	Example

Occurs when the user releases a key that has been pressed.

type

  TKeyEvent = procedure (Sender: TObject; var Key: Word; Shift: TShiftState) of object;

property OnKeyUp: TKeyEvent;

Description

Use the OnKeyUp event handler to provide special processing that occurs when a key is released. The OnKeyUp handler can respond to all keyboard keys, including function keys and keys combined with the Shift, Alt, and Ctrl keys.

The TKeyEvent type points to a method that handles keyboard events. The Key parameter is the key on the keyboard. For non-alphanumeric keys, you must use virtual key codes to determine the key pressed. For more information, see Virtual Key codes.

The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.


TWinControl.OnUnDock
 VCL Reference

TWinControl.OnUnDock

TWinControl	See also	Example

Occurs when the application tries to undock a control that is docked to the windowed control.

property OnUnDock: TUnDockEvent;

Description

Write an OnUnDock event handler to adjust the windowed control when a dock client is undocked. The OnUnDock event handler can make any necessary adjustments, or it can block the undock attempt by setting the Allow parameter to False.


 VCL Reference

TWinControl Methods

TWinControl	Alphabetically	Legend

In TWinControl

ActionChange

AddBiDiModeExStyle

AdjustClientRect

AdjustSize

AlignControls

AssignTo

Broadcast

CanAutoSize

CanFocus

CanResize

ChangeScale

ConstrainedResize

ContainsControl

ControlAtPos

Create

CreateDockManager

CreateHandle

CreateParams

CreateParented

CreateParentedControl

CreateSubClass

CreateWindowHandle

CreateWnd

CustomAlignInsertBefore

CustomAlignPosition

DefaultHandler

Destroy

DestroyHandle

DestroyWindowHandle

DestroyWnd

DisableAlign

DoAddDockClient

DockDrop

DockOver

DoDockOver

DoEnter

DoExit

DoFlipChildren

DoKeyDown

DoKeyPress

DoKeyUp

DoRemoveDockClient

DoUnDock

EnableAlign

FindChildControl

FindNextControl

FixupTabList

FlipChildren

Focused

GetActionLinkClass

GetChildren

GetClientOrigin

GetClientRect

GetControlExtents

GetDeviceContext

GetParentHandle

GetSiteInfo

GetTabOrderList

GetTopParentHandle

HandleAllocated

HandleNeeded

InsertControl

Invalidate

IsControlMouseMsg

KeyDown

KeyPress

KeyUp

MainWndProc

NotifyControls

PaintControls

PaintHandler

PaintTo

PaintWindow

PaletteChanged

ReadState

Realign

RecreateWnd

ReloadDockedControl

RemoveControl

Repaint

ResetIme

ResetImeComposition

ScaleBy

ScaleControls

ScrollBy

SelectFirst

SelectNext

SetBounds

SetChildOrder

SetFocus

SetIme

SetImeCompositionWindow

SetZOrder

ShowControl

Update

UpdateControlState

WndProc

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWinControl Methods

TWinControl	By Object	Legend

ActionChange

AddBiDiModeExStyle

AdjustClientRect

AdjustSize

AfterConstruction

AlignControls

Assign

AssignTo

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanAutoSize

CanFocus

CanResize

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToScreen

ConstrainedResize

ContainsControl

ControlAtPos

Create

CreateDockManager

CreateHandle

CreateParams

CreateParented

CreateParentedControl

CreateSubClass

CreateWindowHandle

CreateWnd

CustomAlignInsertBefore

CustomAlignPosition

DefaultHandler

Destroy

DestroyComponents

DestroyHandle

Destroying

DestroyWindowHandle

DestroyWnd

DisableAlign

Dispatch

DoAddDockClient

Dock

DockDrop

DockOver

DoDockOver

DoEnter

DoExit

DoFlipChildren

DoKeyDown

DoKeyPress

DoKeyUp

DoRemoveDockClient

DoUnDock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindNextControl

FixupTabList

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetChildren

GetClientOrigin

GetClientRect

GetControlExtents

GetControlsAlignment

GetDeviceContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetParentHandle

GetSiteInfo

GetTabOrderList

GetTextBuf

GetTextLen

GetTopParentHandle

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsControlMouseMsg

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

KeyUp

MainWndProc

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

NotifyControls

PaintControls

PaintHandler

PaintTo

PaintWindow

PaletteChanged

ParentToClient

Perform

ReadState

Realign

RecreateWnd

ReferenceInterface

Refresh

ReloadDockedControl

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

ResetIme

ResetImeComposition

SafeCallException

ScaleBy

ScaleControls

ScreenToClient

ScrollBy

SelectFirst

SelectNext

SendToBack

SetBounds

SetChildOrder

SetFocus

SetIme

SetImeCompositionWindow

SetSubComponent

SetTextBuf

SetZOrder

Show

ShowControl

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TWinControl.ActionChange
 VCL Reference

TWinControl.ActionChange

TWinControl	See also

Updates the control to reflect changes in its associated action.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;

Description

ActionChange is called automatically when the associated action changes. It updates the control to reflect the action’s current Caption, Enabled, Hint, Visible, and HelpContext properties and its OnClick event handler.

The Sender parameter is the associated action. The CheckDefaults parameter specifies whether properties and event handlers should be changed if they differ from the default values. When CheckDefaults is True, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When CheckDefaults is False, properties and event handlers are changed, regardless of their current values.


TWinControl.AddBiDiModeExStyle
 VCL Reference

TWinControl.AddBiDiModeExStyle

TWinControl	See also

Sets control’s window style according to its bi-directional support.

procedure AddBiDiModeExStyle(var ExStyle: DWORD);

Description

The CreateParams method calls AddBiDiModeExStyle to update the control’s style flags (passed as the ExStyle parameter) according the control’s bi-directional support. AddBiDiModeExStyle uses the UseRightToLeftReading, UseRightToLeftScrollbar, UseRightToLeftAlignment, and GetControlsAlignment methods to determine the current bi-directional support.


TWinControl.AdjustClientRect
 VCL Reference

TWinControl.AdjustClientRect

TWinControl	See also

Provides the interface that adjusts the ClientRect property for idiosyncrasies of the window.

procedure AdjustClientRect(var Rect: TRect); virtual;

Description

AdjustClientRect is called internally when the control needs accurate information on where to place child controls within the client area. As implemented in TWinControl, AdjustClientRect does nothing. Override this method in descendants such as TTabControl where the ClientRect property is not the same as the region in which child objects can appear.


TWinControl.AdjustSize
 VCL Reference

TWinControl.AdjustSize

TWinControl	See also

Adjusts the control’s size according to its contents and constraints.

procedure AdjustSize; override;

Description

If the AutoSize property is True, AdjustSize is called automatically when the control needs to automatically resize itself to its contents. As implemented in TWinControl, AdjustSize calls SetBounds with the values of its Left, Top, Width, and Height properties. This call can result in a change of size if these values are altered in the control’s OnCanResize or OnConstrainedResize event handlers, or if the control’s OnResize event handler makes any final adjustments.

Descendant classes override AdjustSize to change the size of the control to adjust to its contents.

Component writers may call AdjustSize when making changes to a control’s contents.


TWinControl.AlignControls
 VCL Reference

TWinControl.AlignControls

TWinControl	See also

Aligns any controls for which the control is the parent within a specified area of the control.

procedure AlignControls(AControl: TControl; var Rect: TRect); virtual;

Description

Use AlignControls to align all controls within an area of a form, panel, group box, scroll box, or any container control. Specify the area in which to align the controls as the value of the Rect parameter.

AlignControls uses the Align property value for each child control to determine how to align it. The AControl parameter can be nil. If you specify a control in AControl, that control takes precedence in alignment over other, similarly-aligned controls.


TWinControl.AssignTo
 VCL Reference

TWinControl.AssignTo

TWinControl	See also

Copies the properties of the windowed control to another object.

procedure AssignTo(Dest: TPersistent); override;

Description

Do not call the protected AssignTo method. Instead, applications call the Assign method to copy the properties of another object. If the object’s Assign method does not include the ability to copy from the source object, the Assign method calls the source object’s protected AssignTo method, to copy the source objects properties to the object specified by the Dest parameter. This allows objects to expand the abilities of another object’s Assign method to copy from additional sources.

The AssignTo method implemented in TWinControl copies the Caption, Enabled, Hint, Visible, and HelpContext properties and the OnClick event handler to a TCustomAction object.


TWinControl.Broadcast
 VCL Reference

TWinControl.Broadcast

TWinControl	See also

Sends a message to each of the child controls.

procedure Broadcast(var Message);

Description

Use Broadcast when you want to send the same message to each of the child controls contained within the windowed control. Specify the message to be passed as the value of the Message parameter.


TWinControl.CanAutoSize
 VCL Reference

TWinControl.CanAutoSize

TWinControl	See also

Indicates how the control can be resized.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

virtual bool __fastcall CanAutoSize(int &NewWidth, int &NewHeight);

Description

CanAutoSize is called automatically when the AutoSize property is Truetrue and an attempt is made to resize the control. It allows controls to implement the AutoSize property before the resize sequence that begins with the OnCanResize and OnConstrainedResize events and ends with the OnResize event.

When CanAutoSize is called, the NewWidth and NewHeight parameters indicate the proposed new dimensions of the control. CanAutoSize adjusts these values so that the control’s size adjusts to its contents. If the adjustment results in values of NewWidth and NewHeight that differ from the control’s current width and height, CanAutoSize returns Truetrue, indicating that the resize sequence should proceed. If, after adjustment, NewWidth and NewHeight equal Width and Height, CanAutoSize returns Falsefalse, and the resize sequence is aborted.

As implemented in TWinControl, CanAutoSize returns Truetrue, adjusting NewWidth and NewHeight so that all the control’s children fit.


TWinControl.CanFocus
 VCL Reference

TWinControl.CanFocus

TWinControl	See also

Indicates whether a control can receive focus.

function CanFocus: Boolean; dynamic;

Description

Call CanFocus to find out if the control can receive input from the user.

CanFocus returns True if both the control and its parent(s) have their Visible and Enabled properties set to True. If any of the Visible and Enabled properties of the control or the controls in which it is contained are not True, then CanFocus returns False.


TWinControl.CanResize
 VCL Reference

TWinControl.CanResize

TWinControl	See also

Indicates how the control can respond to a resize attempt.

function CanResize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanResize is called automatically when an attempt is made to resize the control. The NewWidth and NewHeight parameters specify the attempted new values for the control’s height and width. CanResize returns True if the control can be resized to the returned values of NewWidth and NewHeight. CanResize returns False if the control can’t be resized.

CanResize generates an OnCanResize event. An OnCanResize event handler may change the values of NewHeight and NewWidth.


TWinControl.ChangeScale
 VCL Reference

TWinControl.ChangeScale

TWinControl	See also

Resize and reposition children and self.

procedure ChangeScale(M, D: Integer); override;

Description

ChangeScale rescales the control in the same manner as TControl.ChangeScale. If the control contains any children, their ChangeScale methods are called before the parent itself is rescaled.

To rescale the control’s children without rescaling the control itself, use ScaleControls. To rescale the control without repositioning, use ScaleBy.


TWinControl.ConstrainedResize
 VCL Reference

TWinControl.ConstrainedResize

TWinControl	See also

Generates an OnConstrainedResize event.

procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); override;

Description

ConstrainedResize is called automatically as part of a control’s resize sequence. It generates an OnConstrainedResize event, passing in the MinWidth, MinHeight, MaxWidth, and MaxHeight parameters, which can be altered by the event handler before they are applied to the attempted resize.


TWinControl.ContainsControl
 VCL Reference

TWinControl.ContainsControl

TWinControl	See also

Indicates whether a specified control exists within the control.

function ContainsControl(Control: TControl): Boolean;

Description

Use ContainsControl to find out if a particular control exists within this control. ContainsControl returns True if the specified value of the Control parameter is a child control of this control. The Control parameter need not be an immediate child (in the Controls property), but may be contained in a child of the control, or in a child of a child of the control, for indefinitely many levels deep.

If the method returns False, the specified control is not within the control.


TWinControl.ControlAtPos
 VCL Reference

TWinControl.ControlAtPos

TWinControl	See also

Returns the child control located at a specified position within the control.

function ControlAtPos(const Pos: TPoint; AllowDisabled: Boolean, AllowWinControls:Boolean=False): TControl;

Description

Use ControlAtPos to determine which child control is at the specified location within the control. ControlAtPos returns an immediate child of the control; that is, one of the entries of the Controls property, that has this control for its Parent property.

Specify the position in client coordinates as the value of the Pos parameter. Pos can be anywhere within the boundaries of the child control, not just the upper left corner.

The AllowDisabled parameter determines whether the search for controls includes disabled controls.

The AllowWinControls parameter determines whether descendants of TWinControl are considered when looking for the child control.

If there is no control that matches the AllowDisabled and AllowWinControls parameters at the specified position, ControlAtPos returns nil.


TWinControl.Create
 VCL Reference

TWinControl.Create

TWinControl	See also

Creates an instance of TWinControl.

constructor Create(AOwner: TComponent); override;

Description

Call Create to construct and initialize a new control and insert the newly-constructed control into its owner, as specified by the AOwner parameter. Create inserts the control in the owner by calling the owner's InsertComponent method.

Most controls override Create to initialize their unique properties. Objects that override the Create method must always call the inherited Create method first, and then proceed with the component-specific initialization. Specify the override directive when overriding the Create method.

If a component's Create method allocates resources or memory, override the Destroy method to free those resources.


TWinControl.CreateDockManager
 VCL Reference

TWinControl.CreateDockManager

TWinControl	See also

Creates the dock manager for the control.

function CreateDockManager: IDockManager; dynamic;

Description

CreateDockManager is called automatically during drag-and-dock operations when the UseDockManager property is True. CreateDockManager creates the object that implements the DockManager property.

Override CreateDockManager to create a custom dock manager for the control.


TWinControl.CreateHandle
 VCL Reference

TWinControl.CreateHandle

TWinControl	See also

Creates underlying screen object.

procedure CreateHandle; virtual;

Description

CreateHandle creates the Microsoft Windows screen object that underlies the control. if it does not already exist. The new window handle becomes the value of the Handle property.

CreateHandle creates or locates the parent control’s window before it creates a window for the control itself.

Note:	If the Parent property is nil, CreateHandle raises an exception.


TWinControl.CreateParams
 VCL Reference

TWinControl.CreateParams

TWinControl	See also

Initializes a window-creation parameter record passed as the Params parameter.

procedure CreateParams(var Params: TCreateParams); virtual;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. Override CreateParams to customize the way a control creates its Windows representation. When overriding CreateParams, always call the inherited method first to set the default values, then make any desired adjustments.

CreateParams fills in the parameter record that is passed as the value of the Params parameter. This data structure holds information needed when telling Windows to create a window handle. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function.

TWinControl implements CreateParams by setting all the fields of Params to generic base values. A number of the standard controls override CreateParams to change one or more of the default values in Params.


TWinControl.CreateParented
 VCL Reference

TWinControl.CreateParented

TWinControl	See also

Creates and initializes a control as the child of a specified non-VCL container.

constructor CreateParented(ParentWindow: HWnd);

Description

Call CreateParented to embed a new control in a non- VCL parent window. TActiveXControl objects call CreateParented to create an ActiveX control as a child of the host application’s client site window.


TWinControl.CreateParentedControl
 VCL Reference

TWinControl.CreateParentedControl

TWinControl	See also

Creates and initializes a control as the child of a specified non-VCL window.

classfunction CreateParentedControl(ParentWindow: HWnd): TWinControl;

Description

Call CreateParentedControl to embed a new control in a non-VCL parent.

CreateParentedControl allocates memory for a new instance of the same class as the windowed control, sets its ParentWindow property to ParentWindow, and calls the constructor, passing in nil for the Owner parameter. CreateParentedControl returns the newly created control.

CreateParentedControl has the same purpose as CreateParented, but is a simple class function instead of a constructor. Unlike CreateParented, CreateParentedControl can be called from C++ code.


TWinControl.CreateSubClass
 VCL Reference

TWinControl.CreateSubClass

TWinControl	See also

Creates a windowed control derived from an existing Windows window class.

procedure CreateSubClass(var Params: TCreateParams; ControlClassName: PChar);

Description

Call CreateSubClass in the CreateParams method of a subclassed control, after calling the inherited CreateParams. Specify the parameter record as the value of the Params parameter. CreateSubClass allows VCL controls to create registered Windows controls.


TWinControl.CreateWindowHandle
 VCL Reference

TWinControl.CreateWindowHandle

TWinControl	See also

Creates a Windows control to represent the control.

procedure CreateWindowHandle(const Params: TCreateParams); virtual;

Description

The CreateWnd method calls CreateWindowHandle to create the window for a control. CreateWindowHandle creates the window by calling the CreateWindowEx API function, passing parameters from the record passed in the Params parameter. Once the window is created, its handle is available as the Handle property.


TWinControl.CreateWnd
 VCL Reference

TWinControl.CreateWnd

TWinControl	See also

Creates the underlying window.

procedure CreateWnd; virtual;

Description

CreateWnd is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override CreateWnd to pass additional initialization messages to the screen object when it is created.


TWinControl.CustomAlignInsertBefore
 VCL Reference

TWinControl.CustomAlignInsertBefore

TWinControl	See also

Returns placement order of custom-aligned child control.

function CustomAlignInsertBefore(C1, C2: TControl): Boolean; virtual;

Description

CustomAlignInsertBefore determines the order in which custom-aligned child controls are placed The control calls CustomAlignInsertBefore once for each pair of child controls with an Align property of alCustom.. CustomAlignInsertBefore returns true if C2 should be presented before C1, and false otherwise.

Once the custom-aligned child controls are sorted, their specific positions are determined by calls to CustomAlignPosition.

As implemented in TWinControl, CustomAlignInsertBefore always returns false, so the controls are placed in the order they appear in the Controls property.


TWinControl.CustomAlignPosition
 VCL Reference

TWinControl.CustomAlignPosition

TWinControl

Returns aligned position of custom-aligned child control.

procedure CustomAlignPosition(Control: TControl; var NewLeft, NewTop, NewWidth,

    NewHeight: Integer; var AlignRect: TRect); virtual;

Description

CustomAlignPosition determines the specific position of custom-aligned child controls. CustomAlignPosition is called once for each child control with an Align property of alCustom, in an order previously determined by calls to CustomAlignInsertBefore. These are the parameters:

Control	The child control being placed.
NewLeft NewTop NewWidth NewHeight	Location and size of child control, as determined by container’s size and the Anchors constraints for the control. CustomAlignPosition can modify these values to reposition the control.
AlignRect	The client area in which the control is aligned. CustomAlignPosition can modify this value.
As implemented in TWinControl, CustomAlignPosition does nothing.


TWinControl.DefaultHandler
 VCL Reference

TWinControl.DefaultHandler

TWinControl	See also

Provides message handling for all messages that the control does not fully process itself.

procedure DefaultHandler(var Message); virtual;

Description

Override DefaultHandler to change the default message handling for the control. The Message parameter can be cast to a TMessage type, to obtain the WParam, LParam, and Result of the message. If the Result of the message is non-zero, the message has already been handled. Set the Result field to a non-zero value to prevent further processing of the message by the inherited method.

Calling inherited in a message-handling method results in a call to the ancestor's DefaultHandler method unless that ancestor specifies an explicit handler for the message.

TWinControl overrides the TControl DefaultHandler method to handle messages for all its descendant types. DefaultHandler passes any otherwise-unhandled messages to the control's window procedure using the CallWindowProc API function.


TWinControl.DestroyWin
 VCL Reference

TWinControl.Destroy

TWinControl	See also

Destroys an instance of TWinControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TWinControl reference is not nil, and only then calls Destroy.


TWinControl.DestroyHandle
 VCL Reference

TWinControl.DestroyHandle

TWinControl	See also

Destroys the control's window without destroying the control.

procedure DestroyHandle;

Description

Call DestroyHandle to dispose of the window, but leave the control intact. The control can later recreate the window if needed. DestroyHandle is the converse operation to CreateHandle. Applications should call the high-level CreateHandle and DestroyHandle methods, rather than the lower-level methods of CreateWnd and DestroyWnd, whenever possible.

If the control has TWinControl objects as child controls, DestroyHandle calls each of their DestroyHandle methods before calling DestroyWnd to destroy its own handle.


TWinControl.DestroyWindowHandle
 VCL Reference

TWinControl.DestroyWindowHandle

TWinControl	See also

Destroys the window created in the CreateWindowHandle method.

procedure DestroyWindowHandle; virtual;

Description

Call DestroyWindowHandle to dispose of the window for the control.

TWinControl's Destroy method calls DestroyWindowHandle to destroy any window associated with a windowed control before destroying the object. The DestroyWnd method also calls DestroyWindowHandle.


TWinControl.DestroyWnd
 VCL Reference

TWinControl.DestroyWnd

TWinControl	See also

Destroys the control's window.

procedure DestroyWnd; virtual;

Description

DestroyWnd is called when the control needs to replace its window.  For example, changing properties that are implemented by window parameter settings require the control to be destroyed and then recreated using the CreateWnd method.

Before the window is destroyed, DestroyWnd saves a copy of the control's text in memory,frees any device contexts, and finally calls DestroyWindowHandle.  When the window is recreated, the stored copy of the control’s text is assigned to the new window.


TWinControl.DisableAlign
 VCL Reference

TWinControl.DisableAlign

TWinControl	See also

Disables the realignment of child controls.

procedure DisableAlign;

Description

Call DisableAlign to temporarily prevent child controls from realigning. For example, while performing multiple manipulations of controls, such as reading from a form file or scaling, performance improves if child controls are not realigned until all manipulations are complete. The EnableAlign method restores normal child realignment.

Every call to DisableAlign must be followed by a matching call to EnableAlign. If an exception could be raised after the call to DisableAlign, use a try .. finally statement to ensure that EnableAlign will always be called.

DisableAlign/EnableAlign call sequences can be nested. An internal counter records the level of nesting. As long as the counter is positive, realignment is disabled and the AlignDisabled property returns True. Once the counter returns to zero, realignment is enabled and AlignDisabled returns False.


TWinControl.DoAddDockClient
 VCL Reference

TWinControl.DoAddDockClient

TWinControl	See also

Performs actions when a control is docked to the windowed control.

procedure DoAddDockClient(Client: TControl; const ARect: TRect); dynamic;

Description

DoAddDockClient is called automatically when a client control is docked to the windowed control.  As implemented in TWinControl, DoAddDockClient sets the client’s Parent property to the control.

Client is the control that has been docked.

ARect describes the boundaries of the region where Client has been docked.

Override DoAddDockClient to perform actions when a control is docked to the windowed control.

Note:	DoAddDockClient is called in response to a message sent by the DockDrop method, before the OnDockDrop event.


TWinControl.DockDrop
 VCL Reference

TWinControl.DockDrop

TWinControl	See also

Generates an OnDockDrop event.

procedure DockDrop(Source: TDragDockObject; X, Y: Integer); dynamic;

Description

DockDrop is called automatically when a control is docked to the windowed control. It instructs the control that is being dropped to prepare for the dock operation and then generates an OnDockDrop event.

Although you can override DockDrop to perform actions in addition to the generated OnDockDrop event, typically descendant classes override the DoAddDockClient method instead. This is because DoAddDockClient is called by the client after it has performed its own preparations, but before the OnDockDrop event.

DockDrop is called only if DockSite is True.


TWinControl.DockOver
 VCL Reference

TWinControl.DockOver

TWinControl	See also

Responds when a docking client is dragged over the windowed control.

procedure DockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean); dynamic;

Description

DockOver is called automatically for dock sites when a dockable object is dragged over them. As implemented in TWinControl, DockOver positions the docking rectangle and then calls DoDockOver to generate an OnDockOver event.

Override DockOver to perform additional actions when another control is dragged over the control.

DockOver is called only if DockSite is True.


TWinControl.DoDockOver
 VCL Reference

TWinControl.DoDockOver

TWinControl	See also

Generates an OnDockOver event.

procedure DoDockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean); dynamic;

Description

DoDockOver is called by the DockOver method to generate an OnDockOver event when the user drags a dockable control over the windowed control. Override this method to perform some other action or to suppress the event.


TWinControl.DoEnter
 VCL Reference

TWinControl.DoEnter

TWinControl	See also

Respond to receiving  input focus.

procedure DoEnter; dynamic;

Description

DoEnter is called automatically when the control receives the input focus. As implemented in TWinControl, DoEnter calls the OnEnter event handler, if defined.

Descendent classes that override DoEnter should always call the inherited method.


TWinControl.DoExit
 VCL Reference

TWinControl.DoExit

TWinControl	See also

Respond to losing input focus

procedure DoExit; dynamic;

Description

DoExit is called automatically when the control receives the input focus. As implemented in TWinControl, DoExit calls the OnExit event handler, if defined.

Descendent classes that override DoExit should always call the inherited method.


TWinControl.DoFlipChildren
 VCL Reference

TWinControl.DoFlipChildren

TWinControl	See also

Flips the control’s children.

procedure DoFlipChildren; dynamic;

Description

The FlipChildren method calls DoFlipChildren to reverse the positions of child controls. DoFlipChildren moves the control’s children to opposite positions on the control; that is, children on the left side of the control are moved to the right side of the control and vice versa.

Override FlipChildren to control how the control’s children are flipped.

Note:	DoFlipChildren is a protected helper method for the public FlipChildren method. Unlike FlipChildren, DoFlipChildren does not adjust the alignment of controls that are aligned to one of the edges of the windowed control.


TWinControl.DoKeyDown
 VCL Reference

TWinControl.DoKeyDown

TWinControl	See also

Performs some preprocessing before generating an OnKeyDown event.

function DoKeyDown(var Message: TWMKey): Boolean;

Description

The return value from DoKeyDown determines if the control should continue processing key-down messages passed in the Message parameter. A return value of True indicates that the key-down occurrence has been handled completely, and no further processing is needed. A return value of False indicates that the application should continue passing the key-down message through the inherited processing.

DoKeyDown checks whether the KeyPreview property of the parent form is True; if so, it allows the form to preemptively process key-down messages before they are handled by the windowed control. If the form does not handle the message, DoKeyDown translates the message parameters into the appropriate types and calls KeyDown, which in turn calls the OnKeyDown event handler, if any.


TWinControl.DoKeyPress
 VCL Reference

TWinControl.DoKeyPress

TWinControl	See also

Performs some preprocessing before generating an OnKeyPress event.

function DoKeyPress(var Message: TWMKey): Boolean;

Description

The return value from DoKeyPress determines whether the control should continue processing the key-press message passed in the Message parameter. A return value of True indicates that the key-press occurrence has been handled completely, and no further processing is needed. A return value of False indicates that the application should continue passing the key-press message through the inherited processing.

DoKeyPress checks whether the KeyPreview property of the parent form is True, and if so, allows the form to preemptively process key-press messages before they are handled by the windowed control. If the form does not handle the message, DoKeyPress translates the message parameters into the appropriate types and calls KeyPress, which in turn calls the OnKeyPress event handler, if any.


TWinControl.DoKeyUp
 VCL Reference

TWinControl.DoKeyUp

TWinControl	See also

Performs some preprocessing before generating an OnKeyUp event.

function DoKeyUp(var Message: TWMKey): Boolean;

Description

The return value from DoKeyUp determines whether the control should continue processing the key-up message passed in the Message parameter. A return value of True indicates that the key-up occurrence has been handled completely, and no further processing is needed. A return value of False indicates that the application should continue passing the key-up message through the inherited processing.

DoKeyUp checks whether the KeyPreview property of the parent form is True, and if so, allows the form to preemptively process key-up messages before they are handled by the windowed control. If the form does not handle the message, DoKeyUp translates the message parameters into the appropriate types and calls KeyUp, which in turn calls the OnKeyUp event handler, if any.


TWinControl.DoRemoveDockClient
 VCL Reference

TWinControl.DoRemoveDockClient

TWinControl	See also

Responds when a control is undocked from the windowed control.

procedure DoRemoveDockClient(Client: TControl); dynamic;

Description

DoRemoveDockClient is called automatically when a client control is undocked from the windowed control.  As implemented in TWinControl, DoRemoveDockClient does nothing.

Client is the control that has been undocked.

Override DoRemoveDockClient to perform any necessary adjustments when a control is undocked from the windowed control.

Note:	DoRemoveDockClient occurs at the end of the undocking process. To make changes when undocking starts, override the DoUnDock method instead.


TWinControl.DoUnDock
 VCL Reference

TWinControl.DoUnDock

TWinControl	See also

Undocks a control that is currently docked to the windowed control.

function DoUnDock(NewTarget: TWinControl; Client: TControl): Boolean; dynamic;

Description

DoUnDock is called automatically when a control is undocked from the windowed control. It handles all necessary changes to the windowed control to accomplish the undocking. These are

1.	Generates an OnUnDock event.

2.	If there is no OnUnDock event handler, or if the event handler indicates that the client can be undocked, it removes the client from the DockClients property list.

The NewTarget parameter indicates the new host to which the undocked control is moving.

The Client parameter indicates the control to be undocked from the windowed control.

DoUnDock returns True if the client is successfully undocked, False if the undocking attempt was blocked by an OnUnDock event handler.

Override DoUnDock to change the way controls are undocked from the windowed control.

Note:	DoUnDock occurs at the start of the undocking process. To handle changes when undocking is complete, override the DoRemoveDockClient method instead.


TWinControl.EnableAlign
 VCL Reference

TWinControl.EnableAlign

TWinControl	See also

Decrements the reference count incremented by the DisableAlign method, eventually realigning the child controls.

procedure EnableAlign;

Description

Call EnableAlign to allow child controls within the control to realign again after they were prevented from realigning by a call to DisableAlign.

Each time the DisableAlign method is called, it increments a reference count. Each time EnableAlign is called, it decrements the same reference count. When the reference count reaches zero, EnableAlign calls the Realign method to perform any pending realignments.

Be sure to pair each call to DisableAlign with a call to EnableAlign. If an exception could be raised after the call to DisableAlign, use a try .. finally statement to ensure that the corresponding call to EnableAlign is executed.


TWinControl.FindChildControl
 VCL Reference

TWinControl.FindChildControl

TWinControl	See also

Returns a child control given its name.

function FindChildControl(const ControlName: string): TControl;

Description

Call FindChildControl to locate a specified child control. FindChildControl searches the control’s children and returns the control with the specified name. If no child controls match the specified name, FindChildControl returns nil.

Note:	FindChildControl only locates immediate children of the control. It can’t find a control that is a child of one of the control’s children.


TWinControl.FindNextControl
 VCL Reference

TWinControl.FindNextControl

TWinControl	See also

Returns the control's next child in the tab order after the specified control.

function FindNextControl(CurControl: TWinControl; GoForward, CheckTabStop, CheckParent: Boolean): TWinControl;

Description

Call FindNextControl to find the next child control in the tab order after CurControl. If CurControl is not a child of the control, FindNextControl returns the first child control in the tab order.

The GoForward parameter controls the direction of the search. If GoForward is True, FindNextControl searches forward through the child controls in tab order. If Go Forward is False, FindNextControl searches backward through the controls.

The CheckTabStop and CheckParent parameters control whether FindNextControl performs certain checks on the controls it finds. If CheckTabStop is True, the returned control must have its TabStop property set to True. If CheckParent is True, the returned control's Parent property must indicate the parent control.

FindNextControl calls the GetTabOrderList method to build its list of possible "next" controls.


TWinControl.FixupTabList
 VCL Reference

TWinControl.FixupTabList

TWinControl	See also

Sorts the child controls by their tab order.

procedure FixupTabList;

Description

Applications should not call FixupTabList directly. The ReadState method calls FixupTabList to initialize the tab order list based on the TabOrder properties of the child controls being read from a stream.


TWinControl.FlipChildren
 VCL Reference

TWinControl.FlipChildren

TWinControl	See also

Reverses the positions of child controls.

procedure FlipChildren(AllLevels: Boolean); dynamic;

Description

Call FlipChildren to flip the control’s children; that is, to move children on the left side of the control to the right side and vice versa. FlipChildren reverses the position of all child controls and adjusts their Align properties, if necessary, to enforce the new position.

AllLevels specifies whether FlipChildren should be called recursively on the control’s children.

FlipChildren can be used to reverse the layout of an application when it is running in Middle Eastern locales where users read from right to left instead of left to right: Call UseRightToLeftAlignment to determine whether the BiDiMode property dictates a reversal of alignment based on the system locale.

Note:	FlipChildren does the same thing as the Flip Children command on the control’s context menu in the IDE.


TWinControl.Focused
 VCL Reference

TWinControl.Focused

TWinControl	See also 	Example

Determines whether the control has input focus.

function Focused: Boolean; dynamic;

Description

Use the Focused method to see if the control is the active control. When Focused returns True, the control has the input focus. If Focused returns False, the user cannot interact with the control.


TWinControl.GetActionLinkClass
 VCL Reference

TWinControl.GetActionLinkClass

TWinControl	See also

Returns the associated action link class.

function GetActionLinkClass: TControlActionLinkClass; reintroduce; dynamic;

Description

GetActionLinkClass returns the appropriate class type for the action link used with a control. This class is used internally to create an action link object for the control when it has an associated action. The action link links the action to the control client. Each Action link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports.

As implemented in TWinControl, GetActionLinkClass returns the TWinControlActionLink class type, which associates the HelpContext, ShowHint, Caption, Enabled and Visible properties and the OnClick event handler. Descendants of TWinControl override this method to specify a descendant of TControlActionLink that handles their configuration of properties and events.


TWinControl.GetChildren
 VCL Reference

TWinControl.GetChildren

TWinControl	See also

Calls a specified method for each child of the control.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is called by the streaming system that loads and saves components. Applications seldom need to call this routine.

GetChildren executes the callback specified by the Proc parameter for every child control listed by the Controls property that lists the Root parameter as its Owner.

Override GetChildren to limit or augment which child controls are saved with the control. When overriding GetChildren, call the procedure passed as the Proc parameter for every child control that should be saved. The Root parameter indicates the component (usually a form) that owns the control.


TWinControl.GetClientOrigin
 VCL Reference

TWinControl.GetClientOrigin

TWinControl	See also

Returns the value of the ClientOrigin property.

function GetClientOrigin: TPoint; override;

Description

GetClientOrigin is the protected implementation of the ClientOrigin property.

GetClientOrigin returns a point indicating the position of the top-left corner of the control in screen coordinates.


TWinControl.GetClientRect
 VCL Reference

TWinControl.GetClientRect

TWinControl	See also

Returns the value of the ClientRect property.

function GetClientRect: TRect; override;

Description

GetClientRect is the protected implementation of the ClientRect property. GetClientRect returns a rectangle with the rectangle’s Top and Left fields set to zero, and its Bottom and Right fields set to the control's ClientHeight and ClientWidth, respectively.


TWinControl.GetControlExtents
 VCL Reference

TWinControl.GetControlExtents

TWinControl	See also

Returns the smallest rectangle in which all the control’s children fit.

function GetControlExtents: TRect; virtual;

Description

Call GetControlExtents to determine the smallest rectangle in which all the control’s children fit. Windowed controls call GetControlExtents when implementing the AutoSize property.


TWinControl.GetDeviceContext
 VCL Reference

TWinControl.GetDeviceContext

TWinControl	See also	Example

Provides access to a device context for the control.

function GetDeviceContext(var WindowHandle: HWnd): HDC; override;

Description

Call GetDeviceContext to obtain a handle to a device context for the control.

GetDeviceContext calls the Windows API function GetDC, passing the windowed control's Handle property. It returns the window’s handle in the WindowHandle parameter and the HDC as the return value. If the call is unsuccessful, the EOutOfResources exception is raised.


TWinControl.GetParentHandle
 VCL Reference

TWinControl.GetParentHandle

TWinControl	See also

Returns the window handle for the window of the control’s parent.

function GetParentHandle: HWnd;

Description

Use the handle returned by GetParentHandle as a parameter to Windows API function calls that need the window handle for the parent window of the control. If the Parent property is not nil, GetParentHandle returns the Handle property of the parent control. If the Parent property is nil, GetParentHandle returns the value of ParentWindow.


TWinControl.GetSiteInfo
 VCL Reference

TWinControl.GetSiteInfo

TWinControl	See also

Generates an OnGetSiteInfo event

procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean); dynamic;

Description

GetSiteInfo is called automatically during drag-and-dock operations to initialize a TDragDockObject with information about where a dragged object can be docked, if at all.

Client is a potential docking client.

InfluenceRect returns the area in which the client would be docked.

MousePos is the current mouse position.

CanDock returns whether the client can dock to the windowed control.

As implemented in TWinControl, GetSiteInfo generates an influence rectangle equal to BoundsRect expanded by 10 pixels on every side, and then calls the OnGetSiteInfo event handler.


TWinControl.GetTabOrderList
 VCL Reference

TWinControl.GetTabOrderList

TWinControl	See also

Builds a list of controls in tab order.

procedure GetTabOrderList(List: TList);

Description

Call GetTabOrderList to construct a list of child controls in tab order.

GetTabOrderList iterates through the control's internal tab-order list, adding each of the child controls to List, including any controls contained in those controls. The result is a list of all the controls and their owned controls, in tab order.

The FindNextControl method calls GetTabOrderList to build a complete list of the controls that FindNextControl uses to locate the next control in the tab order.


TWinControl.GetTopParentHandle
 VCL Reference

TWinControl.GetTopParentHandle

TWinControl	See also

Returns the window handle of the first window not associated with a VCL control that contains the windowed control.

function GetTopParentHandle: HWnd;

Description

Use GetTopParentHandle to access the handle of the window that is hosting the windowed control. GetTopParentHandle walks up the containers of the windowed control until it finds a control whose Parent property is nil. If that topmost parent is contained in a non-VCL window (its ParentWindow is nonzero), GetTopParentHandle returns the non-VCL window. If the windowed control is not contained in a non-VCL window, GetTopParentHandle returns the windowed control’s own window handle.


TWinControl.HandleAllocated
 VCL Reference

TWinControl.HandleAllocated

TWinControl	See also

Reports whether a screen object handle exists for the control.

function HandleAllocated: Boolean;

Description

Query HandleAllocated to find out if the control’s underlying screen object has been generated.

If the screen object exists, HandleAllocated returns True. If the screen object does not exist, HandleAllocated returns False. Testing the Handle property of a control directly causes the window to be created if it does not already exist. Call the HandleAllocated method to determine whether a window exists without creating one as a side effect.


TWinControl.HandleNeeded
 VCL Reference

TWinControl.HandleNeeded

TWinControl	See also

Creates a screen object for the control if it doesn't already exist.

procedure HandleNeeded;

Description

Call HandleNeeded to create a screen object for the control.

If the screen object does not exist, HandleNeeded calls the CreateHandle method for the parent of the control before it creates a screen object for this control.


TWinControl.InsertControl
 VCL Reference

TWinControl.InsertControl

TWinControl	See also 	Example

Inserts a control into the Controls array property.

procedure InsertControl(AControl: TControl);

Description

Applications should not need to call InsertControl directly. Child controls are automatically inserted and removed when added or deleted at design time. At runtime, use the Parent property of the child control to insert it in the Controls array. If the child control is already the child of another control, setting the Parent property ensures that the child is removed from the Controls of the original parent.

InsertControl makes the inserted control a child, and the containing control the parent. The AControl parameter is the child control that is inserted into the Controls array.


TWinControl.Invalidate
 VCL Reference

TWinControl.Invalidate

TWinControl	See also

Schedules a control repaint.

procedure Invalidate; override;

Description

Invalidate informs a control that its entire surface needs to be repainted. Calling Invalidate can prevent flicker caused by a series of partial repaints. There is no performance penalty for calling Invalidate multiple times before the control is actually repainted.

The actual repaint does not occur until the control is updated. To force an immediate repaint, call Repaint instead.


TWinControl.IsControlMouseMsg
 VCL Reference

TWinControl.IsControlMouseMsg

TWinControl	See also

Indicates whether a specified mouse message is directed to one of the windowed control’s child controls.

function IsControlMouseMsg(var Message: TWMMouse): Boolean;

Description

Call IsControlMouseMsg to find out if a mouse message is directed to one of the control’s child controls. Specify the mouse message as the value of the Message parameter.

Windows takes care of sending messages to windowed child controls, but for nonwindowed child controls, Windows sends the messages to the parent control, which must then determine which, if any, of its child controls should receive the message.

The WndProc method of a windowed control calls IsControlMouseMsg to process all mouse message sent to the windowed control.


TWinControl.KeyDown
 VCL Reference

TWinControl.KeyDown

TWinControl	See also

Respond to key press events.

procedure KeyDown(var Key: Word; Shift: TShiftState); dynamic;

Description

When a windowed control receives a key-down message (WM_KEYDOWN) from Windows, its message handler calls the DoKeyDown method. If DoKeyDown determines that the control should, in fact, process the character, it calls KeyDown, passing the key code and shift-key state in the Key and Shift parameters, respectively.

KeyDown calls any event handler attached to the OnKeyDown event. Override KeyDown to provide other responses in addition to the event-handler call.

The Key parameter is the key on the keyboard. For non-alphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information, search for virtual key codes in the Win32 Developer's Reference (WIN32.HLP).

The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.

Either KeyDown or the OnKeyDown event handler it calls can suppress further processing of a key by setting the Key parameter to zero.


TWinControl.KeyPress
 VCL Reference

TWinControl.KeyPress

TWinControl	See also

Respond to keyboard input.

procedure KeyPress(var Key: Char); dynamic;

Description

When a windowed control receives a key-press message (WM_CHAR) from Windows, its message handler calls the DoKeyPress method. If DoKeyPress determines that the control should, in fact, process the character, it calls KeyPress, passing the key code in the Key parameter.

KeyPress calls any event handler attached to the OnKeyPress event. Override KeyPress to provide other responses in addition to the event-handler call.

Either KeyPress or the OnKeyPress event handler it calls can suppress further processing of a character by setting the Key parameter to zero.

Note:	The Key parameter is the character represented by the key that is pressed, not a Windows virtual key code.


TWinControl.KeyUp
 VCL Reference

TWinControl.KeyUp

TWinControl	See also

Respond to released key.

procedure KeyUp(var Key: Word; Shift: TShiftState); dynamic;

Description

When a windowed control receives a key-up message (WM_KEYUP) from Windows, its message handler calls the DoKeyUp method. If DoKeyUp determines that the control should, in fact, process the character, it calls KeyUp, passing the key code and shift-key state to KeyUp in the Key and Shift parameters, respectively.

KeyUp calls any event handler attached to the OnKeyUp event. Override KeyUp to provide other responses in addition to the event-handler call.

Either KeyUp or the OnKeyUp event handler it calls can suppress further processing of a key by setting the Key parameter to zero.

The Key parameter is the key on the keyboard. For non-alphanumeric keys, use WinAPI virtual key codes to determine the key pressed. For more information, search virtual key codes in the Win32 Developer's Reference (WIN32.HLP).

The Shift parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke.


TWinControl.MainWndProc
 VCL Reference

TWinControl.MainWndProc

TWinControl	See also

Receives Windows messages for the control.

procedure MainWndProc(var Message: TMessage);

Description

MainWndProc is the window procedure for the control that is associated with the control’s window when it is created. When Windows sends a message to the control’s window, MainWndProc receives it.

MainWndProc does not process or dispatch the messages itself, but rather calls the method specified by WindowProc to do that. MainWndProc provides an exception-handling block around WindowProc, ensuring that if any unhandled exceptions occur during the processing of a message, the application’s HandleException method will handle them.


TWinControl.NotifyControls
 VCL Reference

TWinControl.NotifyControls

TWinControl	See also

Sends a message to all the child controls.

procedure NotifyControls(Msg: Word);

Description

NotifyControls sends a message with the message ID passed in the Msg parameter to all the controls in the windowed control's Controls array property. NotifyControls is used to update all the controls in a form of such occurrences as changes in the parent color or font.

NotifyControls constructs a generic message record, filling its message ID field with the value of Msg and setting its parameter and result fields to zeros, then calls the Broadcast method to send the message to all the child controls.


TWinControl.PaintControls
 VCL Reference

TWinControl.PaintControls

TWinControl	See also

Paints each of the child controls in a windowed control using the specified device context.

procedure PaintControls(DC: HDC; First: TControl);

Description

Call PaintControls to paint all the child controls of this control. Pass the device context as the value of the DC parameter. The First parameter indicates the starting point in the windowed control's child-control list to paint. If First is nil or does not indicate one of the child controls, PaintControls paints all the child controls.

The Repaint method calls PaintControls for the control's parent, passing the control in First to repaint the control and any controls it might intersect. PaintHandler also calls PaintControls after calling PaintWindow.


TWinControl.PaintHandler
 VCL Reference

TWinControl.PaintHandler

TWinControl	See also

Responds to WM_PAINT messages.

procedure PaintHandler(var Message: TWMPaint);

Description

PaintHandler is called automatically when the control receives a WM_PAINT message. It calls the BeginPaint and EndPaint API functions, and between them paints the control's background by calling PaintWindow and any child controls by calling PaintControls.


TWinControl.PaintTo
 VCL Reference

TWinControl.PaintTo

TWinControl	See also 	Example

Draws the windowed control to a device context.

procedure PaintTo(DC: HDC; X, Y: Integer);

Description

Call PaintTo to draw the control on a device context. Specify the device context as the value of the DC parameter and specify the X and Y coordinates on the device context where the top-left corner of the windowed control is to be drawn. PaintTo first erases the background of the device context and then paints the control.

PaintTo is useful for drawing an image of the control into a bitmap DC.

Warning:	When using PaintTo to draw on a canvas, you must lock the canvas first (and unlock it after the call to PaintTo. If you do not lock the canvas, Windows calls that occur while the control is painting can cause the canvas to lose its handle.


TWinControl.PaintWindow
 VCL Reference

TWinControl.PaintWindow

TWinControl	See also

Renders the image of a windowed control.

procedure PaintWindow(DC: HDC); virtual;

Description

Call PaintWindow to repaint the control. PaintWindow sends a WM_PAINT message to the windowed control's DefaultHandler method, setting the message record's WParam field to the value passed in DC and the other parameter and result fields to zeros.


TWinControl.PaletteChanged
 VCL Reference

TWinControl.PaletteChanged

TWinControl	See also

Responds to changes in the system's palette by realizing the control's palette and the palette for each child control.

function PaletteChanged(Foreground: Boolean): Boolean; dynamic;

Description

PaletteChanged is called automatically when the Windows system palette changes. TWinControl responds to these notifications by trying to realize the windowed control’s palette, if any, into the current device context, and then passing on the PaletteChanged notification to each of the child controls in turn. If the change in the system palette causes the actual value of the control’s palette to change, PaletteChanged will invalidate the control so that it can repaint with the new palette.

Windows paints the active window with a foreground palette, while other windows are forced to use background palettes. Background palettes are approximate matches to the colors specified by the control’s logical palette, given the limitations imposed by implementing the foreground palette. Windows only allows a single foreground palette.

PaletteChanged allows the control to obtain a new realization of its palette when the system palette changes. When Foreground is True, the form has been activated and the control is specifying the new foreground palette. When Foreground is False, another application or form has changed the foreground palette, and controls that are sensitive to the available palette should realize new background palettes to best match their logical palettes.

If the control does not have a logical palette to be realized into the current device context, GetPalette will return a handle of 0, and PaletteChanged will not try to realize a palette for the windowed control. Instead, it simply passes the notification on to the child controls. If the windowed control or any of its child controls realize a palette into the current device context in response to PaletteChanged, this method returns True.

Override PaletteChanged to change the way in which controls are given an opportunity to realize a new palette when the Windows system palette changes. For example, override PaletteChanged to change the order in which child controls realize their palettes, giving a particular control the foreground palette when the form is activated, or to pass palette change notification to custom controls implemented outside of the VCL such as in DLLs.

Override GetPalette instead to affect whether the windowed control actually has a palette to realize, or to change the value of the control’s logical palette.

Note:	PaletteChanged is called only when the run-time video mode requires palette support, such as for 256 color mode, but not 16 million color mode.


TWinControl.ReadState
 VCL Reference

TWinControl.ReadState

TWinControl	See also

Prepares the control for having its properties assigned values from a stream.

procedure ReadState(Reader: TReader); override;

Description

Override ReadState to change the preparations the control makes as it readies itself to have its property values assigned from a stream. For example, acontrol might destroy temporary internal data structures or objects before new instances are loaded from the stream. Be sure to include a call to the inherited method when overriding ReadState.

As implemented in TWinControl, ReadState disables control alignment until all the child controls have been read from the stream, calls the inherited ReadState method, and re-enables the alignment of all the controls. The method then builds the tab order list of controls and synchronizes its visibility with that of its parent control.


TWinControl.Realign
 VCL Reference

TWinControl.Realign

TWinControl	See also

Forces the control to realign children.

procedure Realign;

Description

The EnableAlign method calls Realign when the reference count reaches zero. It adjusts the size and position of any child controls according to their Align properties.

If all of the child controls have their Align properties set to alNone, Realign has no effect.


TWinControl.RecreateWnd
 VCL Reference

TWinControl.RecreateWnd

TWinControl	See also

Recreate underlying Windows screen object.

procedure RecreateWnd;

Description

Call RecreateWnd to recreate the control from scratch. RecreateWnd destroys the underlying Windows screen object. The next time the Handle property is referenced (when the object is repainted, for example), a new Windows screen object is created. Some changes in control properties are not implemented until this re-creation occurs.


TWinControl.ReloadDockedControl
 VCL Reference

TWinControl.ReloadDockedControl

TWinControl	See also

Reloads a docked control.

procedure ReloadDockedControl(const AControlName: string; var AControl: TControl); dynamic;

Description

Use ReloadDockedControl to obtain a reference to control given its name. The AControlName parameter is the name of the child control. The corresponding control is returned as the AControl parameter. ReloadDockedControl can only locate a control if it has the same Owner as the windowed control.

The dock manager calls ReloadDockedControl to obtain a control reference that it then docks to the windowed control.


TWinControl.RemoveControl
 VCL Reference

TWinControl.RemoveControl

TWinControl	See also 	Example

Removes a specified control from the Controls array.

procedure RemoveControl(AControl: TControl);

Description

RemoveControl removes a child control from the Controls property. After calling RemoveControl, the control is no longer the parent of the child specified by the AControl parameter.

Applications should not call RemoveControl directly. Child controls are automatically inserted and removed when added or deleted at design time. At runtime, use the Parent property of the child control to remove it from the Controls array.


TWinControl.Repaint
 VCL Reference

TWinControl.Repaint

TWinControl	See also

Repaints the entire control.

procedure Repaint; override;

Description

Call Repaint to repaint the control.

As implemented in TWinControl, Repaint calls the Invalidate method and then the Update method to repaint the control.


TWinControl.ResetIme
 VCL Reference

TWinControl.ResetIme

TWinControl	See also

Restores the input method editor (IME) that was active when the application started.

procedure ResetIme;

Description

For controls that specify the ImeName property, call ResetIme to revert to the IME that was active when the application started. If the IME was deactivated by setting the ImeMode property to imDisable, ResetIme restarts the default IME.

Applications cannot call ResetIme. ResetIme is called automatically when the control loses input focus. It is exposed as a protected method so descendant objects can restore the default IME at other times.


TWinControl.ResetImeComposition
 VCL Reference

TWinControl.ResetImeComposition

TWinControl	See also

Directs the composition window of the input method editor (IME) to perform a specific action.

function ResetImeComposition(Action: DWORD): Boolean;

Description

Call ResetImeComposition to direct what the composition window does with the input typed by the user. The composition window is the window displayed by the IME that provides feedback to the user about what keystrokes have been typed, and how they are converted into asian characters.

The Action parameter indicates what the composition window should do with its current contents. Action can have one of the following values:

Value	Meaning

CPS_CANCEL	Clear the composition string and set the status to no composition string.

CPS_COMPLETE	Set the composition string as the result string.

CPS_CONVERT	Convert the composition string.

CPS_REVERT	Cancel the current composition string and revert to the unconverted string.

ResetImeComposition returns True if the composition window performs the requested action.


TWinControl.ScaleBy
 VCL Reference

TWinControl.ScaleBy

TWinControl	See also

Rescale control and its children, but preserve position.

procedure ScaleBy(M, D: Integer);

Description

Call ScaleBy to rescale the control and all its children. ScaleBy modifies the Height and Width properties of the controls, but it does not change the Top and Left properties; therefore, the size of the controls changes, but not the coordinates of the top-left corners of the controls. The parameters have the same meaning as in TControl.ChangeScale.

To rescale the control without preserving position, use ChangeScale. To rescale the control’s children without rescaling the control itself, use ScaleControls.


TWinControl.ScaleControls
 VCL Reference

TWinControl.ScaleControls

TWinControl	See also

Rescale child controls only.

procedure ScaleControls(M, D: Integer);

Description

Call ScaleControls to rescale only the children of the control, while leaving the control itself the same size. The parameters have the same meaning as in TControl.ChangeScale.

To rescale the control and children together, use ChangeScale or ScaleBy.


TWinControl.ScrollBy
 VCL Reference

TWinControl.ScrollBy

TWinControl	See also

Scroll control contents.

procedure ScrollBy(DeltaX, DeltaY: Integer);

Description

Call ScrollBy to scroll the contents within the control. While ScrollBy can be used for any TWinControl, it makes the most sense to use it for descendants of TScrollingWinControl.

Applications seldom need to call the ScrollBy method unless they implement their own scrolling interface rather than relying on a scroll bar.

The DeltaX parameter is the change in pixels along the X axis. A positive DeltaX value scrolls the contents to the right; a negative value scrolls the contents to the left. The DeltaY parameter is the change in pixels along the Y axis. A positive DeltaY value scrolls the contents down; a negative value scrolls the contents up.


TWinControl.SelectFirst
 VCL Reference

TWinControl.SelectFirst

TWinControl	See also

Locates first selectable child control.

procedure SelectFirst;

Description

Call SelectFirst to find the first child that can be selected within the control’s tab order. SelectFirst calls the FindNextControl method, passing nil as the current control. Once the first selectable control is found, SelectFirst makes the control the active control on the form.


TWinControl.SelectNext
 VCL Reference

TWinControl.SelectNext

TWinControl	See also

Moves the input focus from the current child control to the next one in the tab order.

procedure SelectNext(CurControl: TWinControl; GoForward, CheckTabStop: Boolean);

Description

Call SelectNext to find the next child control in the control’s tab order. Specify the current control from which to begin the search as the value of the CurControl parameter. The GoForward parameter controls the direction of the search. If GoForward is True, FindNextControl searches forward through the child controls in tab order. If GoForward is False, FindNextControl searches backward through the controls.

The CheckTabStop parameter controls whether the control SelectNext finds must be a tab stop. If CheckTabStop is True, the returned control must have its TabStop property set to True, or the search for the next control continues.

If SelectNext doesn’t locate an appropriate control (as defined by the GoForward and the CheckTabStop parameters), the focus remains with CurControl.


TWinControl.SetBounds
 VCL Reference

TWinControl.SetBounds

TWinControl	See also

Sets the windowed control's boundary properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Use SetBounds to change all of the control’s boundary properties at once. The same effect can be achieved by setting the Left, Top, Width, and Height properties separately. By setting all four properties at once, SetBounds ensures that the control will not repaint between changes

Specify the values for the Left, Top, Width, and Height properties as the value of the ALeft, ATop, AWidth, and AHeight parameters, respectively.


TWinControl.SetChildOrder
 VCL Reference

TWinControl.SetChildOrder

TWinControl	See also

Changes the order in which the child component appears in the list of child components returned by the GetChildren method.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

Use SetChildOrder when you want to change the order in which child objects are streamed in. Specify the child component whose order you want to change as the value of the Child parameter. Indicate the position you want the component to be in as the value of the Order parameter.

When SetChildOrder is called, items previously below the child's old position move up, and those below the new position move down.


TWinControl.SetFocus
 VCL Reference

TWinControl.SetFocus

TWinControl	See also 	Example

Gives the input focus to the control.

procedure SetFocus; virtual;

Description

Use SetFocus to change input focus to the control. When a control has focus, it receives keyboard events.


TWinControl.SetIme
 VCL Reference

TWinControl.SetIme

TWinControl	See also

Activates an input method editor (IME) using the values specified by the ImeMode and ImeName properties.

procedure SetIme;

Description

Applications cannot call SetIme. SetIme is called automatically when the control receives input focus. It is exposed as a protected method so that descendant objects can cause the ImeMode and ImeName properties to take effect at other times.


TWinControl.SetImeCompositionWindow
 VCL Reference

TWinControl.SetImeCompositionWindow

TWinControl	See also

Sets the position and font of the composition window.

function SetImeCompositionWindow( Font: TFont; XPos, YPos: Integer): Boolean;

Description

Call SetImeComposition to change the position or font of the composition window. The composition window is the window displayed by the input method editor (IME) that provides feedback to the user about what keystrokes have been typed, and how they are converted into asian characters.

The Font parameter describes the font that the composition window should use. Setting the Font parameter to nil repositions the composition window without changing the font. XPos and YPos specify the desired global coordinates for the composition window.

SetImeCompositionWindow returns True if the font and position are successfully assigned.


TWinControl.SetZOrder
 VCL Reference

TWinControl.SetZOrder

TWinControl	See also

Moves the control to the top or bottom of the parent control’s (or screen’s) list of TWinControl controls.

procedure SetZOrder(TopMost: Boolean); override;

Description

Use SetZOrder to rearrange overlapping controls within a parent control or (if the control has no parent) overlapping windows on the screen. If the TopMost parameter is True, the control becomes the top control; otherwise, it becomes the bottom control.

TWinControl controls always stack on top of other controls, regardless of the z-order.

After changing the order, SetZOrder invalidates the control to ensure repainting to reflect the new order.


TWinControl.ShowControl
 VCL Reference

TWinControl.ShowControl

TWinControl	See also

Ensures that a specified child control is visible.

procedure ShowControl(AControl: TControl); virtual;

Description

Call ShowControl to display a child control. Specify the control you want to ensure will be visible as the value of the AControl parameter.

As implemented in TWinControl, ShowControl simply calls the ShowControl method of the control’s parent. Derived objects override ShowControl to perform whatever actions are necessary to allow the indicated child object to be visible. Possible actions include scrolling the particular child object into view, or changing to the appropriate notebook page.

ShowControl is used in the implementation of the TControl.Show method.


TWinControl.Update
 VCL Reference

TWinControl.Update

TWinControl	See also 	Example

Force control to update.

procedure Update; override;

Description

Update repaints any part of the control surface that is out of date. Normally, updates occur automatically, but an Update call may be neccesary before lengthy processing that might interfere with automatic updates. Calling Update unnecessarily can increase overhead and cause screen flicker.

Update only repaints areas of the control the have been determined to be out of date. To force immediate repainting of the entire control, call Repaint. To notify a control that it is out of date (without forcing an immediate repaint), call Invalidate.


TWinControl.UpdateControlState
 VCL Reference

TWinControl.UpdateControlState

TWinControl	See also

Respond to state change.

procedure UpdateControlState;

Description

UpdateControlState is called automatically when any display change occurs that might affect the internal state of the control.

As implemented in TWinControl, UpdateControlState climbs the chain of parent controls to verify that each control in the chain has Showing equal to true. If this is the case, UpdateControlState makes sure that the Showing property is accurate for this control and for all its descendents. Descendant classes can extend this behavior.


TWinControl.WndProc
 VCL Reference

TWinControl.WndProc

TWinControl 	See also	Example

Provides specific message responses for the control.

procedure WndProc(var Message: TMessage); override;

Description

Override WndProc to change the initial Windows message handler for the control. The WindowProc property is initialized to point to the WndProc method.

WndProc for TWinControl overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited WndProc.

When overriding WndProc to provide specialized responses to messages, call the inherited WndProc at the end to dispatch any unhandled messages.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl


TWindowAction
 VCL Reference

TWindowAction

Hierarchy	Properties	Methods	Events	Using TWindowAction	See also

TWindowAction is the base class for action objects that work with MDI forms.

Unit

StdActns

Description

TWindowAction implements the common behavior for actions that work on MDI forms. Each descendant class performs a specific task, such as arranging, cascading, closing, tiling, or minimizing MDI child forms. Do not use TWindowAction directly in an application. Instead, use a TWindowAction descendant such as TWindowClose, TWindowCascade, TWindowMinimizeAll, TWindowArrange, TWindowTileHorizontal, or TWindowTileVertical.

TWindowAction ensures that the action is enabled as long as the target is an MDI parent form. TWindowAction descendants override the ExecuteTarget method to execute their specific function on the targets child forms.


 VCL Reference

TWindowAction properties

TWindowAction	Alphabetically	Legend

In TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowAction properties

TWindowAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TWindowAction.Form
 VCL Reference

TWindowAction.Form

TWindowAction 	See also

Provides access to the target of the action.

property Form: TForm;

Description

Form is the MDI parent form on which the action performs its function.


 VCL Reference

TWindowAction events

TWindowAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowAction events

TWindowAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowAction methods

TWindowAction	Alphabetically	Legend

In TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowAction methods

TWindowAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowAction.HandlesTarget
 VCL Reference

TWindowAction.HandlesTarget

TWindowAction	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

As implemented in TWindowAction, HandlesTarget makes sure that the target is an MDI parent form. If the target is appropriate, HandlesTarget sets the Form property.


TWindowAction.UpdateTarget
 VCL Reference

TWindowAction.UpdateTarget

TWindowAction 	See also

Enables or disables the action, depending on whether the target form has MDI children.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TWindowAction, UpdateTarget checks that the target object is an MDI parent form with an MDIChildCount property greater than 0. If so, UpdateTarget sets the Enabled property to True. Otherwise, it sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction


TWindowArrange
 VCL Reference

TWindowArrange

Hierarchy	Properties	Methods	Events	Using TWindowArrange	See also

TWindowArrange arranges the icons of minimized MDI child forms.

Unit

StdActns

Description

Add TWindowArrange to an action list to allow users to arrange the icons that represent minimized MDI child forms. Controls such as menu items and tool buttons linked to this action cause the application to call the ArrangeIcons method of the MDI parent form.

TWindowArrange is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no MDI children.


 VCL Reference

TWindowArrange properties

TWindowArrange	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowArrange properties

TWindowArrange	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowArrange events

TWindowArrange	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowArrange events

TWindowArrange	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowArrange methods

TWindowArrange	Alphabetically	Legend

In TWindowArrange

ExecuteTarget

Derived from TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowArrange methods

TWindowArrange	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowArrange.ExecuteTarget
 VCL Reference

TWindowArrange.ExecuteTarget

TWindowArrange	See also

Arranges the icons of minimized MDI child forms

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active form when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then calls that form’s ArrangeIcons method to arrange the icons of minimized MDI children.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowArrange


TWindowClose
 VCL Reference

TWindowClose

Hierarchy	Properties	Methods	Events	Using TWindowClose	See also

TWindowClose closes the active MDI child form.

Unit

StdActns

Description

Add TWindowClose to an action list to allow users to close the active MDI child form. Controls such as menu items and tool buttons linked to this action cause the application to call the Close method of the active MDI child.

TWindowClose is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no active MDI child.


 VCL Reference

TWindowClose properties

TWindowClose	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowClose properties

TWindowClose	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowClose events

TWindowClose	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowClose events

TWindowClose	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowClose methods

TWindowClose	Alphabetically	Legend

In TWindowClose

ExecuteTarget

UpdateTarget

Derived from TWindowAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowClose methods

TWindowClose	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowClose.ExecuteTarget
 VCL Reference

TWindowClose.ExecuteTarget

TWindowClose	See also

Closes the active MDI child.

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then obtains a reference to the active MDI child by reading the form’s ActiveMDIChild property. It calls this child form’s Close method to close the active child form.


TWindowClose.UpdateTarget
 VCL Reference

TWindowClose.UpdateTarget

TWindowClose 	See also

Enables or disables the action, depending on whether the target form an active child.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TWindowClose, UpdateTarget checks that the target object is an MDI parent form with a non-nil ActiveMDIChild property. If so, UpdateTarget sets the Enabled property to True. Otherwise, it sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowClose


TWindowMinimizeAll
 VCL Reference

TWindowMinimizeAll

Hierarchy	Properties	Methods	Events	Using TWindowMinimizeAll	See also

TWindowMinimizeAll minimizes all MDI child forms.

Unit

StdActns

Description

Add TWindowMinimizeAll to an action list to allow users to minimize the MDI child forms in an MDI application. Controls such as menu items and tool buttons linked to this action cause the application to iterate through the MDI child forms, setting their WindowState to wsMinimized.

TWindowMinimizeAll is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no MDI children.


 VCL Reference

TWindowMinimizeAll properties

TWindowMinimizeAll	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowMinimizeAll properties

TWindowMinimizeAll	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowMinimizeAll events

TWindowMinimizeAll	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowMinimizeAll events

TWindowMinimizeAll	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowMinimizeAll methods

TWindowMinimizeAll	Alphabetically	Legend

In TWindowMinimizeAll

ExecuteTarget

Derived from TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowMinimizeAll methods

TWindowMinimizeAll	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowMinimizeAll.ExecuteTarget
 VCL Reference

TWindowMinimizeAll.ExecuteTarget

TWindowMinimizeAll	See also

Minimizes all MDI child forms of the target MDI parent.

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active form when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then iterates through that form’s MDI children, setting each child form’s WindowState to wsMinimized.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowMinimizeAll


TWindowTileHorizontal
 VCL Reference

TWindowTileHorizontal

Hierarchy	Properties	Methods	Events	Using TWindowTileHorizontal	See also

TWindowTileHorizontal arranges MDI child forms so that they are all the same size, tiled horizontally.

Unit

StdActns

Description

Add TWindowTileHorizontal to an action list to allow users to tile the MDI child forms horizontally. Controls such as menu items and tool buttons linked to this action cause the MDI parent form to tile its children horizontally.

TWindowTileHorizontal is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no MDI children.


 VCL Reference

TWindowTileHorizontal properties

TWindowTileHorizontal	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowTileHorizontal properties

TWindowTileHorizontal	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowTileHorizontal events

TWindowTileHorizontal	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowTileHorizontal events

TWindowTileHorizontal	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowTileHorizontal methods

TWindowTileHorizontal	Alphabetically	Legend

In TWindowTileHorizontal

ExecuteTarget

Derived from TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowTileHorizontal methods

TWindowTileHorizontal	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowTileHorizontal.ExecuteTarget
 VCL Reference

TWindowTileHorizontal.ExecuteTarget

TWindowTileHorizontal	See also

Tiles the child forms of the target MDI parent horizontally.

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active form when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then instructs the form to tile its child forms horizontally.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowTileHorizontal


TWindowTileVertical
 VCL Reference

TWindowTileVertical

Hierarchy	Properties	Methods	Events	Using TWindowTileVertical	See also

TWindowTileVertical arranges MDI child forms so that they are all the same size, tiled vertically.

Unit

StdActns

Description

Add TWindowTileVertical to an action list to allow users to tile the MDI child forms vertically. Controls such as menu items and tool buttons linked to this action cause the MDI parent form to tile its children vertically.

TWindowTileVertical is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no MDI children.


 VCL Reference

TWindowTileVertical properties

TWindowTileVertical	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowTileVertical properties

TWindowTileVertical	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowTileVertical events

TWindowTileVertical	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowTileVertical events

TWindowTileVertical	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowTileVertical methods

TWindowTileVertical	Alphabetically	Legend

In TWindowTileVertical

ExecuteTarget

Derived from TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowTileVertical methods

TWindowTileVertical	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowTileVertical.ExecuteTarget
 VCL Reference

TWindowTileVertical.ExecuteTarget

TWindowTileVertical	See also

Tiles the child forms of the target MDI parent vertically.

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active form when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then instructs the form to tile its child forms vertically.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowTileVertical


TWorkArea
 VCL Reference

TWorkArea

Hierarchy	Properties	Methods	See also

TWorkArea represents a rectangular subregion of a list view’s client area.

Unit

ComCtrls

Description

Use TWorkArea to describe the dimensions and display characteristics of one work area of a list view component. Work areas divide the client area of a list view into logical subregions. The icons of the list view are then arranged within each work area, to provide an additional layer of organization.

Each list item in the list view belongs to a single work area. This association is based on whether the position of the list item falls within the bounding rectangle specified by the work area’s Rect property.

In addition, If the list view’s ShowWorkAreas property is True, the list view draws the work area, using its Color and DisplayName properties.

Note:	Work areas are only used when the list view has a ViewStyle of vsIcon or vsSmallIcon.


 VCL Reference

TWorkArea properties

TWorkArea	Alphabetically	Legend

In TWorkArea

Color

Rect

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TWorkArea properties

TWorkArea	By object	Legend

Collection

Color

DisplayName

ID

Index

Rect


TWorkArea.Color
 VCL Reference

TWorkArea.Color

TWorkArea	See also

Specifies the background color of the work area.

property Color: TColor;

Description

Use Color to specify the color in which the list view paints the portion of its client area circumscribed by the Rect property. Color is not used unless the list view’s ShowWorkAreas property is True.


TWorkArea.Rect
 VCL Reference

TWorkArea.Rect

TWorkArea	See also

Indicates the portion of the list view’s client area covered by the work area.

property Rect: TRect;

Description

Set Rect to specify the sphere of influence of a work area. Rect is the bounding rectangle of a portion of the list view’s client area. If Rect specifies a region larger than the list view’s client area, the list view introduces scroll bars to support the logical size specified by Rect.

List items are assigned to the work area when they fall into the region of the list view bounded by Rect. If a list item falls into a region that is contained by more than one work area, it is assigned to the list item with the lowest Index property.

If the list view paints itself to display work areas, it paints the portion of its client area that is outlined by Rect using the color specified by the Color property.


 VCL Reference

TWorkArea methods

TWorkArea	Alphabetically	Legend

In TWorkArea

Create

GetDisplayName

SetDisplayName

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWorkArea methods

TWorkArea	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetDisplayName


TWorkArea.Create
 VCL Reference

TWorkArea.Create

TWorkArea	See also

Creates an instance of TWorkArea.

constructor Create(Collection: TCollection); override;

Description

It is seldom necessary to call the constructor for TWorkArea directly.  Instead, create TWorkArea objects indirectly by calling the Add method of TWorkAreas.


TWorkArea.GetDisplayName
 VCL Reference

TWorkArea.GetDisplayName

TWorkArea	See also

Returns the value of the DisplayName property.

function GetDisplayName: string; override;

Description

GetDisplayName is the read implementer of the DisplayName property. The DisplayName indicates the name that appears as a label for the work area in the list view when the list view’s ShowWorkAreas property is True.


TWorkArea.SetDisplayName
 VCL Reference

TWorkArea.SetDisplayName

TWorkArea	See also

Sets the value of the DisplayName property.

procedure SetDisplayName(const Value: string); override;

Description

SetDisplayName is the write implementer of the DisplayName property. The DisplayName indicates the name that appears as a label for the work area in the list view when the list view’s ShowWorkAreas property is True.


Hierarchy

TObject

TPersistent

TCollectionItem

TWorkArea


TAction
 VCL Reference

TAction

Hierarchy	Properties	Methods	Events	Using TAction	See also

TAction is the generic class for action objects that implement user commands across a range of different controls.

Unit

ActnList

Description

TAction is a generic action component. It can be added to action managers or action lists when there is no predefined action class that implements the desired response to user commands. Unlike predefined action classes, which have built-in methods that respond when users click the client controls, TAction has no built-in response to user commands. Instead, when using TAction, you can provide the response when the action “fires” by writing an OnExecute event handler, and configure the properties of TAction to reflect current conditions by writing an OnUpdate event handler.

Action objects are used to centralize the response to user commands (actions) and to represent user interface elements in applications that use action bands.

TAction can also act as a base class for predefined action classes. You can derive from TAction if you wish to retain the published scope of TCustomAction members, or derive from TCustomAction if you wish to modify their scope.

For predefined actions that augment the behavior of TAction, see the action classes in the StdActns, DBActns, and ExtActns units.


 VCL Reference

TAction properties

TAction	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TAction properties

TAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TAction events

TAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TAction events

TAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TAction methods

TAction	Alphabetically	Legend

In TAction

Create

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

HandlesTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TAction methods

TAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TAction.Create
 VCL Reference

TAction.Create

TAction	See also

Creates and initializes a TAction object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not usually create action objects explicitly. Actions are created automatically when you add them to an action manager or action list component at design time. When instantiating TAction at runtime, assign a TActionList or TActionManager component to the new action’s ActionList property after calling Create.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction


TApplicationEvents
 VCL Reference

 TApplicationEvents

Hierarchy	Properties	Methods	Events	See also

TApplicationEvents intercepts application-level events.

Unit

AppEvnts

Description

Use TApplicationEvents to intercept the events of the global Application object. When you add a TApplicationEvents object to a form, the Application object forwards all events to the TApplicationEvents object. Thus, each event of the TApplicationEvents object is the same as the event with the same name on the Application object.

Each form in an application can have its own TApplicationEvents object. Each application event occurs for all the TApplicationEvents objects in the project. To change the order in which the different TApplicationEvents objects receive events, use the Activate method. To prevent other TApplicationEvents objects from receiving a specific event, use the CancelDispatch method.


 VCL Reference

TApplicationEvents properties

TApplicationEvents	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TApplicationEvents properties

TApplicationEvents	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TApplicationEvents events

TApplicationEvents	Alphabetically	Legend

Derived from TCustomApplicationEvents

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


 VCL Reference

TApplicationEvents events

TApplicationEvents	By object	Legend

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


 VCL Reference

TApplicationEvents methods

TApplicationEvents	Alphabetically	Legend

Derived from TCustomApplicationEvents

Activate

CancelDispatch

Create

Derived from TComponent

BeforeDestruction

Destroy

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TApplicationEvents methods

TApplicationEvents	By object	Legend

Activate

AfterConstruction

Assign

BeforeDestruction

CancelDispatch

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomApplicationEvents

TApplicationEvents


TApplication
 VCL Reference

TApplication

Hierarchy	Properties	Methods	Events	Using TApplication	See also

TApplication is the type used for a GUI windowed application.

Unit

Forms

Description

TApplication encapsulates a windowed application. The methods and properties introduced in TApplication reflect the fundamentals established in the Windows operating system to create, run, sustain, and destroy an application. TApplication thereby simplifies the interface between the developer and the Windows environment. For this purpose TApplication encapsulates behavior for

Windows message processing.

Context-sensitive online help.

Menu accelerator and key processing.

Exception handling.

Managing the fundamental parts defined by the Windows operating system for an application, such as MainWindow, WindowClass, and so on

Each GUI application automatically declares an Application variable as the instance of the application. If the Delphi application is not a Web server application, control panel applet, or NT service application, this variable is of type TApplication.

TApplication does not appear on the Component palette, nor is it available in the form designer to visually manipulate; so it has no published properties. Nevertheless, some of its public properties can be set or modified at design time in the Forms and Application pages of the Project|Options dialog box. In addition, you can add a TApplicationEvents component to any form in the project to intercept the application’s events, and supply event handlers using the IDE.

Note:	 For application-wide properties and methods that affect the display, see TScreen.


 VCL Reference

TApplication properties

TApplication	Alphabetically	Legend

In TApplication

Active

AllowTesting

AutoDragDocking

BiDiKeyboard

BiDiMode

CurrentHelpFile

DialogHandle

ExeName

Handle

HelpFile

HelpSystem

Hint

HintColor

HintHidePause

HintPause

HintShortCuts

HintShortPause

Icon

MainForm

NonBiDiKeyboard

ShowHint

ShowMainForm

Terminated

Title

UpdateFormatSettings

UpdateMetricSettings

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TApplication properties

TApplication	By object	Legend

Active

AllowTesting

AutoDragDocking

BiDiKeyboard

BiDiMode

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

CurrentHelpFile

DesignInfo

DialogHandle

ExeName

Handle

HelpFile

HelpSystem

Hint

HintColor

HintHidePause

HintPause

HintShortCuts

HintShortPause

Icon

MainForm

Name

NonBiDiKeyboard

Owner

ShowHint

ShowMainForm

Tag

Terminated

Title

UpdateFormatSettings

UpdateMetricSettings

VCLComObject


TApplication.Active
 VCL Reference

TApplication.Active

TApplication	See also

Specifies whether the application is active and has focus.

property Active: Boolean;

Description

Active is True while the application is active and False if it is not. Active is set to True in the constructor.

An application is active if the form or application has focus. An application becomes inactive when a window from a different application is about to become activated. When the application closes, Active is set to False in the destructor.

Note:	Active is read-only.


TApplication.AllowTesting
 VCL Reference

TApplication.AllowTesting

TApplication

Represents information for the IDE.

property AllowTesting: Boolean;

Description

Do not use AllowTesting; it is for internal use only.


TApplication.AutoDragDocking
 VCL Reference

TApplication.AutoDragDocking

TApplication

Indicates whether dragged windows are automatically docked.

property AutoDragDocking: Boolean;

Description

Set AutoDragDocking to enable drag-and-dock behavior when windows are dragged. When AutoDragDocking is True, dragged windows are automatically docked when the mouse is released over a docking site. When AutoDragDocking is False, dragged windows are only docked when the Ctrl key is pressed.


TApplication.BiDiKeyboard
 VCL Reference

TApplication.BiDiKeyboard

TApplication	See also

Specifies the name of the keyboard map that should be used in middle-east locales when text reads from right to left.

property BiDiKeyboard: string;

Description

This name is a string composed of the hexadecimal value of the language identifier (low word) and a device identifier (high word). For example, Saudi Arabian Arabic has a language identifier of 0x0401, so its primary layout is named "00000401".

This keyboard layout is only used when the application runs in a middle-eastern locale and the value of BiDiMode indicates that text should read from right to left.


TApplication.BiDiMode
 VCL Reference

TApplication.BiDiMode

TApplication	See also

Indicates the layout of the application when running under Middle Eastern versions of Windows.

property BiDiMode: TBiDiMode;

Description

Use BiDiMode to specify the bi-directional mode for the application. The bi-directional mode controls the direction in which text appears (left-to-right or right-to-left), the placement of vertical scrollbars, and the default alignment of text when the application runs in Middle Eastern locales.

The application’s BiDiMode is used in the ShowMessage procedure and the MessageBox method. It also serves as the ParentBiDiMode for forms and for popup menus that are not activated by a control.


TApplication.CurrentHelpFile
 VCL Reference

TApplication.CurrentHelpFile

TApplication	See also

Indicates the current help file.

property CurrentHelpFile: string;

Description

Read CurrentHelpFile to determine the name of the help file that is currently used by the application when it executes a help command (via the HelpCommand method) or brings up context sensitive help (via the HelpContext or HelpJump method). If CurrentHelpFile is an empty string, the application ignores attempts to display Help.

If the active form has an associated help file, this is the value of CurrentHelpFile. Otherwise, CurrentHelpFile reflects the value of the application’s HelpFile property.


TApplication.DialogHandle
 VCL Reference

TApplication.DialogHandle

TApplication	See also

Provides a mechanism for using non-VCL dialog boxes in a DelphiC++Builder application.

property DialogHandle: HWnd;

Description

Use DialogHandle when displaying a modeless dialog box that was created using the CreateDialog API function. Assigning the handle of the modeless dialog box to DialogHandle allows the dialog to see messages from the application's message loop.

Assign the handle of the modeless dialog box to DialogHandle when it receives an activation message (WM_NCACTIVATE) and set DialogHandle to zero when the dialog box receives a deactivation message.


TApplication.ExeName
 VCL Reference

TApplication.ExeName

TApplication	See also	Example

Contains the file name of the application’s executable file including path information.

property ExeName: string;

Description

Use ExeName to obtain the name of the executable file for the application. ExeName is the fully-qualified name, including the path to the application’s executable.

The name of the application is the root name of the project with an .EXE extension. By default this name is PROJECT1.EXE. To change the ExeName, save the project by the desired new root name and rebuild the application. ExeName will reflect the change to the project filename.

ExeName is a read-only property.


TApplication.Handle
 VCL Reference

TApplication.Handle

TApplication	See also

Provides access to the window handle of the main form (window) of the application.

property Handle: HWND;

Description

Use Handle when calling Windows API functions that require a parent window handle. For example, a DLL that displays its own top-level pop-up windows needs a parent window to display its windows in the application. Using the Handle property makes such windows part of the application, so that they are minimized, restored, enabled, and disabled with the application.

Note:	When writing a DLL that uses VCL forms, assign the window handle of the host EXE’s main window to the DLL’s Application.HandleApplication->Handle property. This makes the DLL’s form part of the host application. Never assign to the Handle property in an EXE.


TApplication.HelpFile
 VCL Reference

TApplication.HelpFile

TApplication	See also 	Example

Specifies the name of the default file the application uses to display Help.

property HelpFile: string;

Description

Use HelpFile to specify a default help file for applications that use the Help system. Either assign a filename to the HelpFile property at runtime, or specify a Help File on the Application page of the Project|Options dialog box at design time.

The Help system specified by HelpSystem displays help topics from the file specified by CurrentHelpFile. HelpFile supplies the value of CurrentHelpFile unless there is a help file associated with the active form.

By default, HelpFile is a null string, and the application's Help method ignores attempts to display Help unless the active form has an associated help file.


TApplication.HelpSystem
 VCL Reference

TApplication.HelpSystem

TApplication	See also

Provides access to the interface for working with the help system.

property HelpSystem: IHelpSystem;

Description

TApplication uses IHelpSystem to interact with a Help system manager. This interface includes methods for displaying help topics based on a keyword or topic ID.

Applications can use the HelpSystem property to interact directly with the Help system manager, or they can use the application’s help-oriented methods such as HelpCommand and HelpJump.


TApplication.Hint
 VCL Reference

TApplication.Hint

TApplication	See also 	Example

Specifies the text string that appears in the Help Hint box.

property Hint: string;

Description

TApplication’s Hint property is assigned the Hint value of the control or menu item that the mouse is currently moving over. It can also be assigned a string value that informs the user of some action, error, or other type of information. Therefore, use Hint either to:

Transfer hints from controls to another area of display, such as a status bar, using the OnHint event handler. This reads the Hint property.

Indicate the status of the application while it is processing some action. This sets the Hint property.

Help Hints appear when the OnHint event occurs. Therefore, if TApplication’s Hint property is assigned to the status bar’s caption, for example, the caption of the status bar control displays the current string value of the Hint property during an OnHint event.

There are two parts to the Hint string: short and long. Short hints are used by pop-up tool tips. Long hints are used by the status bar, separated by the | character. Use the global functions GetShortHint and GetLongHint, from the Controls unit to extract the long and short hints from a hint string.

Note:	When setting Hint to a message informing the user of an event occuring in the application, remember that, by default, the Hint string is reset to a control’s Hint when the mouse cursor moves over a control.


TApplication.HintColor
 VCL Reference

TApplication.HintColor

TApplication	See also

Determines the color of the hint boxes for the Help Hints for the application.

property HintColor: TColor;

Description

Use HintColor to specify the hint box color. A default color value of clInfoBk is set for the HintColor property in the constructor when the application is created. To change the HintColor assign it a new TColor value at runtime.

Tip:	To further customize the hint window, create a custom descendant of THintWindow and assign it to the global HintWindowClass variable.


TApplication.HintHidePause
 VCL Reference

TApplication.HintHidePause

TApplication	See also

Specifies the time interval to wait before hiding the Help Hint if the mouse has not moved from the control or menu item.

property HintHidePause: Integer;

Description

Use HintHidePause to specify a wait time in milliseconds, which is different from the default value of 2500 ms or 2 1/2 seconds that is set in the constructor. The Help Hint for the control or menu item is specified in the Hint property.

Note:	The default is a predefined constant value that is several times longer than HintPause.


TApplication.HintPause
 VCL Reference

TApplication.HintPause

TApplication	See also

Specifies the time interval that passes before the control's Help Hint appears when the user places the mouse pointer on a control or menu item.

property HintPause: Integer;

Description

Use HintPause to change the default pause time of 500 ms or 1/2 second that is set in the constructor. When assigning a value to HintPause, specify the interval in milliseconds. The Help Hint displayed at the end of the pause is specified in the Hint property.


TApplication.HintShortCuts
 VCL Reference

TApplication.HintShortCuts

TApplication

Specifies whether the application’s pop-up hints include shortcut information.

property HintShortCuts: Boolean;

Description

Use HintShortCuts to specify whether the application’s pop-up hints include shortcut information. If HintShortCuts is True, the shortcut information is displayed. For example, if HintShortCuts is True, the hint for the Cut command might be “Cut (Ctrl+X)” instead of “Cut”.


TApplication.HintShortPause
 VCL Reference

TApplication.HintShortPause

TApplication	See also

Specifies the time period to wait before bringing up a hint if another hint has already been shown.

property HintShortPause: Integer;

Description

Use HintShortPause to reduce the flicker when moving the mouse quickly over a set of buttons that all have help hints on. Specify a value in milliseconds that is different from the default value of 50 ms that is set in the constructor.


TApplication.Icon
 VCL Reference

TApplication.Icon

TApplication	See also 	Example

Determines which icon represents the application on the Windows task bar.

property Icon: TIcon;

Description

Use Icon to assign a specific icon to represent the application. Set the Icon property by either:

Assigning it a TIcon at runtime.

Loading an icon on the Application pages of the Project|Options dialog box at design time.

Icon represents the application when it is minimized and appears either on the Windows desktop or task bar.


TApplication.MainForm
 VCL Reference

TApplication.MainForm

TApplication	See also

Identifies which form in the application is the main window.

property MainForm: TForm;

Description

Use MainForm to determine the form that acts as the application’s main window. The main form is the first form created in the main body of the application. When the main form closes, the application terminates.

When a new project is created, Form1 automatically becomes the value of the MainForm property. To assign a different form to the MainForm property, use the Forms page of the Project|Options dialog box at design time. MainForm cannot be modified at runtime; it is read-only.


TApplication.NonBiDiKeyboard
 VCL Reference

TApplication.NonBiDiKeyboard

TApplication	See also

Specifies the name of the keyboard map that should be used unless text reads from right to left.

property NonBiDiKeyboard: string;

Description

Use NonBiDiKeyboard to specify the keyboard map that should be used. This name is a string composed of the hexadecimal value of the language identifier (low word) and a device identifier (high word). For example, U.S. English has a language identifier of 0x0409, so the primary U.S. English layout is named "00000409". Variants of U.S. English layout (such as the Dvorak layout) are named "00010409", "00020409", and so on.

If the application is running in a middle-eastern locale and the value of BiDiMode indicates that text should read from right to left, the application uses BiDiKeyboard instead.


TApplication.ShowHint
 VCL Reference

TApplication.ShowHint

TApplication	See also 	Example

Determines whether Help Hints are enabled or disabled for the entire application.

property ShowHint: Boolean;

Description

Use ShowHints to choose when to display Help Hints. If ShowHint is True, Help Hints are enabled; if ShowHint is False, Help Hints are disabled. The default value is True. Help Hints are specified in the Hint property.

Setting ShowHint for the application to False disables all Help Hints, regardless of the value of the ShowHint properties for individual controls.

Tip:	You can customize the hint window by creating a custom descendant of THintWindow and assigning it to the global HintWindowClass variable.


TApplication.ShowMainForm
 VCL Reference

TApplication.ShowMainForm

TApplication	See also

Determines whether the application shows its main form on startup.

property ShowMainForm: Boolean;

Description

Use ShowMainForm to control whether and when the application shows its main form.

The default value of True is set in the constructor. When ShowMainForm is True the main window shows automatically when the application starts. The MainForm property specifies which form is the main form.

To hide the main form at startup, set ShowMainForm to False in the main project file before the call to Application.Run. Make sure that the Visible property of the form is also False.


TApplication.Terminated
 VCL Reference

TApplication.Terminated

TApplication	See also

Reports whether the application is in the process of shutting down.

property Terminated: Boolean;

Description

Terminated is used when calling the ProcessMessages method so that the application doesn't perform unnecessary actions after the shut-down process has been triggered. ProcessMessages sets Terminated to True when it receives a WM_QUIT message.

An application usually receives a WM_QUIT message because the main window of the application has closed, or because the Terminate method has been called.

Note:	For applications using calculation-intensive loops, call ProcessMessages periodically, and also check Terminated to determine whether to abort the calculation and allow the application to terminate.


TApplication.Title
 VCL Reference

TApplication.Title

TApplication	See also

Contains the text that appears below the icon representing the application when it is minimized.

property Title: string;

Description

Use the Title property to modify the name of this text string appearing below the icon of the application. The default value is taken from the DLL or EXE file name at runtime.

Set the Title at runtime, or enter the value of the Title property on the Application page of the Project | Options dialog box.


TApplication.UpdateFormatSettings
 VCL Reference

TApplication.UpdateFormatSettings

TApplication	See also

Specifies whether format settings are updated automatically when the user alters the system configuration.

property UpdateFormatSettings: Boolean;

Description

Use UpdateFormatSettings to control automatic updating of format settings. The default of True is set in the constructor. UpdateFormatSettings is checked when the application receives a WM_WININICHANGE message.

Using the default format settings is recommended. These settings are initialized to the Windows local settings. However, to prevent the settings from changing during the execution of the application when altering the format settings in a Delphi application, UpdateFormatSettings can be set to False.


TApplication.UpdateMetricSettings
 VCL Reference

TApplication.UpdateMetricSettings

TApplication

Specifies whether the settings used for the hint window font and the icon title font are updated.

property UpdateMetricSettings: Boolean;

Description

Use UpdateMetricSettings to specify whether or not the hint window font and the icon title font on the desk top should be updated to reflect the system settings when those settings are changed.

The initial value of True is set in the constructor.


 VCL Reference

TApplication events

TApplication	Alphabetically	Legend

In TApplication

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


 VCL Reference

TApplication events

TApplication	By object	Legend

OnActionExecute

OnActionUpdate

OnActivate

OnDeactivate

OnException

OnHelp

OnHint

OnIdle

OnMessage

OnMinimize

OnRestore

OnSettingChange

OnShortCut

OnShowHint


TApplication.OnActionExecute
 VCL Reference

TApplication.OnActionExecute

TApplication	See also

Occurs when an action’s Execute method is called and its action list has not already handled it.

property OnActionExecute: TActionEvent;

Description

Use the OnExecute event handler to respond when a user invokes actions whose action lists do not have OnExecute event handlers.

If the action list that contains the action does not handle it in an OnExecute event handler, then the action is routed to the Application object’s ExecuteAction method, which invokes the OnActionExecute event handler. (The application’s ExecuteAction method applies to all actions in the application.)

The Handled parameter of the event handler returns False by default. If the handler handles the event, it should change Handled to True, thereby preventing further attempts to handle the action. When the event handler exits with Handled set to False, the action’s OnExecute event occurs. If the action remains unhandled after that, the active control’s ExecuteAction method is called to allow the action to execute with an identified target. Finally, the active form’s ExecuteAction method is called if all other handlers do not handle the action.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnActionUpdate
 VCL Reference

TApplication.OnActionUpdate

TApplication	See also

Occurs when an action’s Update method is called and its action list has not already handled it.

property OnActionUpdate: TActionEvent;

Description

Use the OnActionUpdate event handler to update the properties of an action when the application is idle if the action’s action list does not handle it in an OnUpdate event handler.

If the action list that contains the action does not update it in an OnUpdate event handler, the action is routed to the Application object’s UpdateAction method, which invokes the OnActionUpdate event handler. (The application’s UpdateAction method applies to all actions in the application.)

The Handled parameter of the event handler returns False by default. If the handler updates the event, it should change Handled to True, thereby ending the processing of the action. When the event handler exits with Handled set to False, the action’s OnUpdate event occurs. If the action is not updated after that, the active control’s UpdateAction method is called to allow the target to update the action. Finally, the active form’s UpdateAction method is called if all other handlers do not handle the action.

Note:	OnActionUpdate occurs after the application’s OnIdle event.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnActivate
 VCL Reference

TApplication.OnActivate

TApplication	See also

Occurs when an application becomes active.

property OnActivate: TNotifyEvent;

Description

Write an OnActivate event handler to perform special processing when the application becomes active.

An application becomes active when it is initially run or when focus moves from another Windows application back to any window of the application.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnDeactivate
 VCL Reference

TApplication.OnDeactivate

TApplication	See also 	Example

Occurs when an application becomes inactive.

property OnDeactivate: TNotifyEvent;

Description

Write an OnDeactivate event handler to perform any special processing that should occur immediately before the application is deactivated. The OnDeactivate event occurs when the user switches from the application to another Windows application.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnException
 VCL Reference

TApplication.OnException

TApplication	See also 	Example

Occurs when an unhandled exception occurs in the application.

type TExceptionEvent = procedure (Sender: TObject; E: Exception) of object;

property OnException: TExceptionEvent;

Description

Use OnException to change the default behavior that occurs when an exception is not handled by application code. The OnException event handler is called automatically in the HandleException method.

OnException only handles exceptions that occur during message processing. Exceptions that occur before or after the execution of the application’s Run method do not generate OnException events.

If an exception passes through the try blocks in the application code, the application automatically calls the HandleException method. Unless the exception object is EAbort, HandleException calls the OnException handler, if one exists. Otherwise, it calls ShowException to display a message box indicating an error occurred.

TExceptionEvent is the type of the OnException event. It points to a method that handles exceptions in the application. The Sender parameter is the object that raised the exception, and E is the exception object.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnHelp
 VCL Reference

TApplication.OnHelp

TApplication	See also	Example

Occurs when the application receives a request for help.

type THelpEvent = function (Command: Word; Data: Longint; var CallHelp: Boolean): Booleanof object;

property OnHelp: THelpEvent;

Description

Write an OnHelp event handler to perform special processing when the user requests help. The HelpContext and the HelpJump methods automatically trigger the OnHelp event.

Set CallHelp to True if the application should still invoke the help system after the event. Set CallHelp to False to prevent the default response by the help system. All application help methods go through OnHelp. The application calls the help system only if OnHelp’s CallHelp parameter returns True or if no OnHelp event handler is assigned.

To find the possible values of the Command and Data parameters, search for WinHelp in the Win32 Developer's Reference Help (Win32.HLP) file, which explains the WinHelp API (application programming interface). The possible values for the Data parameter depend upon the value of the Command parameter.

The event handler returns True if it succeeds, False if it fails.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnHint
 VCL Reference

TApplication.OnHint

TApplication	See also 	Example

Occurs when the mouse pointer moves over a control or menu item that can display a Help Hint.

property OnHint: TNotifyEvent;

Description

Write an OnHint event handler to perform special processing when the mouse pauses over a control or menu item whose Hint property is not an empty string (‘’).

A common use of the OnHint event is to display the value of a control or menu item's Hint property in another control. Note that it is not necessary to use an OnHint event handler to display hints on a status bar (TStatusBar): TStatusBar will automatically display hints if you set its AutoHint property to True.

The Hint property of a control can specify both a short Help Hint and a (usually) longer hint that appears elsewhere because of code in an OnHint event handler.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.

Tip:	Component writers can respond to the automatically-fired THintAction action in a component’s ExecuteAction method rather than relying on an OnHint event handler.


TApplication.OnIdle
 VCL Reference

TApplication.OnIdle

TApplication 	See also	Example

Occurs when an application becomes idle.

type TIdleEvent = procedure (Sender: TObject; var Done: Boolean) of object;

property OnIdle: TIdleEvent;

Description

Write an OnIdle event handler to perform special processing when an application is idle. An application is idle when it is not processing code. For example, an application is idle when it is waiting for input from the user.

The TIdleEvent type is the type of the OnIdle event. TIdleEvent has a Boolean parameter Done that is True by default. When Done is True, the application allows all action components to update themselves after the OnIdle event handler returns. After updating the actions, the application calls the Windows API WaitMessage, which yields control to other applications until a new message appears in the message queue of the application. When Done is False, the application actions do not receive an OnUpdate event and the application does not yield control to other applications while it is not busy.

OnIdle is called only once, as the application transitions into an idle state. It is not called continuously unless Done is set to False. Applications that set Done to False consume an inordinate amount of CPU time, which affects overall system performance.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnMessage
 VCL Reference

TApplication.OnMessage

TApplication	See also 	Example

Occurs when the application receives a Windows message.

type TMessageEvent = procedure (var Msg: TMsg; var Handled: Boolean) of object;

property OnMessage: TMessageEvent;

Description

Use OnMessage to trap any or all Windows messages posted to all windows in the application. The OnMessage event occurs when an application receives a Windows message. An OnMessage event handler allows an application to respond to messages other than those declared in the events for TApplication. If the application doesn't have a specific handler for an incoming message, the message is dispatched to the window for which it was intended, and Windows handles the message.

The TMessageEvent type is the type of the OnMessage event. The Msg parameter identifies the Windows message, and the Handled parameter indicates whether the event handler responded to the message. Set Handled to True if the message has been completely handled, to prevent subsequent processing of the message.

Note:	OnMessage only receives messages that are posted to the message queue, not those sent directly with the Windows API SendMessage function.

Caution:	Thousands of messages per second flow though this event. Be careful when coding the handler, because it can affect the performance of the entire application.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnMinimize
 VCL Reference

TApplication.OnMinimize

TApplication	See also 	Example

Occurs when an application is minimized.

property OnMinimize: TNotifyEvent;

Description

Write an OnMinimize event handler to perform special processing when the application is minimized. The application is minimized, either because the user minimizes the main window, or because of a call to the Minimize method. The Icon property determines the icon that represents the minimized application.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnRestore
 VCL Reference

TApplication.OnRestore

TApplication	See also

Occurs when the previously minimized application is restored to its normal size.

property OnRestore: TNotifyEvent;

Description

Write an OnRestore event handler to perform special processing when the application is restored from the minimized state in which it appears as an icon. An application is restored either because the user restores the application, or because the application calls the Restore method.

Note:	Don't confuse restoring an application with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of the WindowState property.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnSettingChange
 VCL Reference

TApplication.OnSettingChange

TApplication	See also

Occurs when Windows notifies the application that a system-wide setting has changed.

type TSettingChangeEvent = procedure (Sender: TObject; Flag: Integer; const Section: string; var Result: Longint) of object;

property OnSettingChange: TSettingChangeEvent;

Description

Use OnSettingChange to respond when Windows informs the application that a system-wide setting or policy has changed.

Sender is the application object.

Section indicates the area that contains the system parameter that changed. Typically, this is a registry key or the name of a section in Win.ini. If the notification indicates a policy change, Section is the string ‘Policy’. If the notification indicates a change in locale settings, Section is the string ‘intl’.

Result is the value returned to Windows. It should be 0 if the event handler responded to the setting change, nonzero otherwise.

Flag indicates what setting changed. The following table lists the possible values:

Value	Meaning

0	A user policy was applied or a user locale setting changed.

1	A computer policy was applied.

SPI_SETDESKWALLPAPER	The bitmap for the desktop wallpaper changed.

SPI_SETCURSORS	The system cursors changed.

SPI_SETDESKPATTERN	The desktop pattern was reloaded from Win.ini.

SPI_SETFONTSMOOTING	The font smoothing feature was enabled or disabled.

SPI_SETWORKAREA	The size of the work area (the portion of the screen not obscured by the system taskbar or desktop toolbars) changed.

SPI_ICONHORIZONTALSPACING	The width, in pixels, of an icon cell changed. This affects the arrangement of icons in large icon view.

SPI_ICONVERTICALSPACING	The height, in pixels, of an icon cell changed. This affects the arrangement of icons in large icon view.

SPI_SETICONMETRICS	The metrics associated with system icons changed.

SPI_SETICONS	The system icons were reloaded.

SPI_SETICONTITLELOGFONT	The font for icon titles changed.

SPI_SETICONTITLEWRAP	Icon title-wrapping was turned on or off.

SPI_SETBEEP	The warning beeper was turned on or off.

SPI_SETDEFAULTINPUTLANG	The default input language for the system shell changed

SPI_SETDOUBLECLICKTIME	The double-click time for the mouse changed.

SPI_SETDOUBLECLICKHEIGHT	The height of the double-click rectangle changed.

SPI_SETDOUBLECLICKWIDTH	The width of the double-click rectangle changed.

SPI_SETKEYBOARDCUES	The setting for whether Menu access key letters appear always or only when the menu is activated from the keyboard changed.

SPI_SETKEYBOARDDELAY	The keyboard repeat-delay setting changed.

SPI_SETKEYBOARDPREF	The keyboard preference changed. This indicates whether the user wants applications to display hidden keyboard interfaces.

SPI_SETKEYBOARDSPEED	The keyboard repeat-speed setting changed.

SPI_SETLANGTOGGLE	The hotkey for switching input languages changed.

SPI_SETMOUSE	The mouse threshold values or acceleration changed.

SPI_SETMOUSEBUTTONSWRAP	The meaning of left and right mouse buttons changed.

SPI_SETMOUSEHOVERHEIGHT	The height of the rectangle in which the mouse must stay for mouse hover messages changed.

SPI_SETMOUSEHOVERTIME	The time the mouse must stay in the hover rectangle to generate mouse hover messages changed.

SPI_SETMOUSEHOVERWIDTH	The width of the rectangle in which the mouse must stay for mouse hover messages changed.

SPI_SETMOUSESPEED	The mouse speed changed.

SPI_SETMOUSETRAILS	Mouse trails were turned on or off.

SPI_SETSNAPTODEFBUTTON	The automatic snapping of the mouse to the default button was turned on or off.

SPI_SETWHEELSCROLLLINES	The number of lines to scroll when the mouse wheel rotates changed.

SPI_SETMENUDROPALIGNMENT	Popup menus changed between left- and right-alignment.

SPI_SETMENUFADE	Menu fade animation was turned on or off (Windows 2K)

SPI_SETMENUSHOWDELAY	The delay before displaying a shortcut menu when the mouse is over a submenu item changed.

SPI_SETLOWPOWERACTIVE	The low-power phase of screen saving was activated or deactivated.

SPI_SETLOWPOWERTIMEOUT	The time period before the low-power phase of screen saving is activated changed.

SPI_SETPOWEROFFACTIVE	The power-off phase of screen saving came on or off.

SPI_SETPOWEROFFTIMEOUT	The delay before activating the power-off phase of screen saving changed.

SPI_SETSCREENSAVEACTIVE	The screen saver was activated or deactivated.

SPI_SETSCREENSAVETIMEOUT	The delay before the screen saver appears changed.

SPI_SETCOMBOBOXANIMATION	The slide-open effect for combo boxes was turned on or off.

SPI_SETCURSORSHADOW	The cursor shadow was turned on or off (WIndows 2K).

SPI_SETGRADIENTCAPTIONS	The gradient effect on window title bars was turned on or off.

SPI_SETHOTTRACKING	Hot-tracking was enabled or disabled.

SPI_SETLISTBOXSMOOTHSCROLLING	Smooth scrolling of list boxes was enabled or disabled.

SPI_SETMENUANIMATION	Menu animation was enabled or disabled.

SPI_SETMENUUNDERLINES	Same as SPI_SETKEYBOARDCUES.

SPI_SETSELECTIONFADE	The menu selection fade feature was enabled or disabled. (Windows 2K)

SPI_SETTOOLTIPANIMATION	ToolTip animation was enabled or disabled. (Windows 2K)

SPI_SETTOOLTIPFADE	ToolTip animation changed between a fade and a slide effect. (Windows 2K)

SPI_SETUIEFFECTS	UI effects were enabled or disabled. (Windows 2K)

SPI_SETACTIVEWINDOWTRACKING	Active window tracking (where the active window follows the mouse) was enabled or disabled.

SPI_SETACTIVEWNDTRKZORDER	Active window tracking changed whether the active window was brought to the top.

SPI_SETANIMATION	Parameters to the animation effects for user actions changed.

SPI_SETBORDER	The width of a window’s sizing border changed.

SPI_SETCARETWIDTH	The width of the caret in edit controls changed (Windows 2K)

SPI_SETDRAGFULLWINDOWS	Dragging of full windows was turned on or off.

SPI_SETDRAGHEIGHT	The height of the rectangle used to detect drag operations changed.

SPI_SETDRAGWIDTH	The width of the rectangle used to detect drag operations changed.

SPI_SETFOREGROUNDFLASHCOUNT	The number of times a taskbar button flashes when rejecting a foreground switch request changed.

SPI_SETFOREGROUNDLOCKTIMEOUT	The time after user input during which applications can’t force themselves into the foreground changed.

SPI_SETMINIMIZEDMETRICS	The metrics for minimized windows changed.

SPI_SETNONCLIENTMETRICS	The metrics for the nonclient area of nonminimized windows changed.

SPI_SETSHOWIMEUI	The ability of the IME window to be visible on a per-user basis changed.

SPI_SETPENWINDOWS	Pen windows was loaded or unloaded. (Windows 9x)

SPI_SETACCESSTIMEOUT	The time-out period for accessibility features changed.

SPI_SETFILTERKEYS	The parameters to the FilterKeys accessibility feature changed.

SPI_SETHIGHCONTRAST	The parameters to the HighContrast accessibility feature changed.

SPI_SETMOUSECLICKLOCK	The mouse ClickLock state was turned on or off. (Windows Me)

SPI_SETMOUSECLICKLOCKTIME	The time delay for locking the primary mouse button changed. (Windows Me)

SPI_SETMOUSEKEYS	The parameters for the MouseKeys accessibility feature changed.

SPI_SETMOUSESONAR	The mouse Sonar feature was turned on or off. (Windows Me)

SPI_SETMOUSEVANISH	The mouse Vanish feature was turned on or off. (Windows Me)

SPI_SETSCREENREADER	A screen reviewer utility (such as a speech synthesizer or Braille display utility) started or stopped running.

SPI_SETSERIALKEYS	The parameters to the SerialKeys accessibility feature changed. (Windows 9x)

SPI_SETSHOWSOUNDS	The Show Sounds accessibility feature toggled.

SPI_SETSOUNDSENTRY	The parameters to the SoundSentry accessibility feature changed.

SPI_SETSTICKYKEYS	The parameters to the StickyKeys feature changed.

SPI_SETTOGGLEKEYS	The parameters to the ToggleKeys feature changed.


TApplication.OnShortCut
 VCL Reference

TApplication.OnShortCut

TApplication	See also

Occurs when the user presses a key (before the OnKeyDown event).

property OnShortCut: TShortCutEvent;

Description

Use OnShortCut to dispatch shortcut keystrokes before the form or its controls handle them. When the user presses a key, the application can dispatch it as a shortcut key instead of allowing the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp). Built-in shortcut processing is provided for menu shortcuts and actions associated with the form. OnShortCut lets the application implement additional shortcuts.

If the OnShortCut event handler responds to the keystroke, set its Handled parameter to True. This prevents the keystroke from being passed on to menus or actions associated with the application. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


TApplication.OnShowHint
 VCL Reference

TApplication.OnShowHint

TApplication	See also 	Example

Occurs when the application is about to display the hint window for a Help Hint.

type TShowHintEvent = procedure (var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo) of object;

property OnShowHint: TShowHintEvent;

Description

Write an OnShowHint event handler to change the appearance and behavior of Help Hints.

The TShowHintEvent is the type of the OnShowHint event. The HintStr parameter sets the text of the Help Hint. To obtain the text of a hint for a particular control, call the GetLongHint or GetShortHint function, assigning the result to HintStr. To change the text, change the value of this string.

Use the CanShow parameter to permit or prevent the Help Hint from displaying. If CanShow is True, the Help Hint displays. If it is False, the Help Hint does not appear.

The HintInfo parameter is a record that contains information about the appearance and behavior of the Help window. Change its fields to customize the way the Help Hint is displayed.

Note:	You can also respond to this event using the TApplicationEvents component, which allows you to assign an event handler using the IDE.


 VCL Reference

TApplication methods

TApplication	Alphabetically	Legend

In TApplication

ActivateHint

BringToFront

CancelHint

ControlDestroyed

Create

CreateForm

CreateHandle

Destroy

ExecuteAction

HandleException

HandleMessage

HelpCommand

HelpContext

HelpJump

HelpKeyword

HideHint

HintMouseMessage

HookMainWindow

HookSynchronizeWakeup

Initialize

IsRightToLeft

MessageBox

Minimize

NormalizeAllTopMosts

NormalizeTopMosts

ProcessMessages

Restore

RestoreTopMosts

Run

ShowException

Terminate

UnhookMainWindow

UnhookSynchronizeWakeup

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TApplication methods

TApplication	By object	Legend

ActivateHint

AfterConstruction

Assign

BeforeDestruction

BringToFront

CancelHint

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ControlDestroyed

Create

CreateForm

CreateHandle

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandleException

HandleMessage

HasParent

HelpCommand

HelpContext

HelpJump

HelpKeyword

HideHint

HintMouseMessage

HookMainWindow

HookSynchronizeWakeup

InheritsFrom

Initialize

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsRightToLeft

MessageBox

MethodAddress

MethodName

Minimize

NewInstance

NormalizeAllTopMosts

NormalizeTopMosts

ProcessMessages

ReferenceInterface

RemoveComponent

RemoveFreeNotification

Restore

RestoreTopMosts

Run

SafeCallException

SetSubComponent

ShowException

Terminate

UnhookMainWindow

UnhookSynchronizeWakeup

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TApplication.ActivateHint
 VCL Reference

TApplication.ActivateHint

TApplication	See also

Displays a hint window for the control at a specified position.

procedure ActivateHint(CursorPos: TPoint);

Description

ActivateHint locates the control or menu item at the position specified by CursorPos, where CursorPos represents a screen coordinates in pixels. After locating the control, ActivateHint displays the control’s Hint in a hint window.


TApplication.BringToFront
 VCL Reference

TApplication.BringToFront

TApplication	See also

Sets the last active window as the topmost window on the desktop above all other applications.

procedure BringToFront;

Description

Use BringToFront to find the window owned by the MainForm that was last active and bring it to the foreground. BringToFront also tests to see if the window is visible and enabled before making it the topmost window.


TApplication.CancelHint
 VCL Reference

TApplication.CancelHint

TApplication	See also

Cancels the display of a hint for a control.

procedure CancelHint;

Description

Applications rarely, if ever, call CancelHint directly. CancelHint is used internally to cancel the display of hints at appropriate times, such as when a window is not valid or when the application closes. CancelHint calls a series of routines that clean up the display and timing issues of the hint window for a control.


TApplication.ControlDestroyed
 VCL Reference

TApplication.ControlDestroyed

TApplication	See also

Notifies the application when a control is destoyed.

procedure ControlDestroyed(Control: TControl);

Description

ControlDestroyed is for internal use and is called automatically by TControl. Do not call it directly.

ControlDestroyed notifies the application that the control passed as the Control parameter has been destroyed, so that the properties which refer to controls, such as MainForm and ActiveCustomForm, can be updated to specify a valid object or nil.


TApplication.Create
 VCL Reference

TApplication.Create

TApplication	See also

Creates a new application.

constructor Create(AOwner: TComponent); override;

Description

Do not call Create directly. Each Delphi application automatically creates an instance of an application object.

For TApplication, the Create method initializes default values for some of its properties. It also prepares the application to run by setting up objects such as hint windows, the application icon, the main window handle, the instance handle, lists for managing child windows of the main window (form), and so on.


TApplication.CreateForm
 VCL Reference

TApplication.CreateForm

TApplication	See also	Example

Creates a new form.

procedure CreateForm(FormClass: TFormClass; var Reference);

Description

Call CreateForm to dynamically create a form at runtime. Developers do not need to add code for creating most forms, because typically one or more calls to CreateForm are added automatically to the Delphi project's main statement part when using the form designer.

CreateForm creates a new form of the type specified by the FormClass parameter and assigns it to the variable given by the Reference parameter. The owner of the new form is the Application object.

Note:	By default the form created by the first call to CreateForm in a project becomes the application’s main form.


TApplication.CreateHandle
 VCL Reference

TApplication.CreateHandle

TApplication	See also

Generates a main window for the application if it does not already have one.

procedure CreateHandle;

Description

Do not call CreateHandle directly. In EXEs, the application’s constructor calls CreateHandle. In DLLs it does not.

CreateHandle encapsulates much of what traditional Windows programs write in WinMain. For example, CreateHandle registers the Window Class, creates the application window and determines how the application window is shown.


TApplication.Destroy
 VCL Reference

TApplication.Destroy

TApplication	See also

Destroys the application instance and all of its associated memory.

destructor Destroy; override;

Description

Never call Application.Destroy or Application.Free. Instead, use the application’s Terminate method to end the application.

Destroy signals that the application has been deactivated before calling the inherited destructor. It then frees memory for hooked windows, the application instance, other object instances and lists that were created at application startup or that accumulated during execution

Since the Application owns all forms (usually), it destroys these forms in its destructor.


TApplication.ExecuteAction
 VCL Reference

TApplication.ExecuteAction

TApplication	See also

Generates an OnActionExecute event.

function ExecuteAction(Action: TBasicAction): Boolean; reintroduce;

Description

When the user invokes an action, a series of calls ensues to respond to that action. First, the action list that contains the action generates an OnExecute event. If the action list does not handle the OnExecute event, then the action is routed to the Application object’s ExecuteAction method, which invokes the OnActionExecute event handler. (The application’s ExecuteAction method responds to all unhandled actions in the application.) If the OnActionExecute event handler does not handle the action, then it is routed to the action’s OnExecute event handler. If that does not handle the action, the active control’s ExecuteAction method is called, followed (if necessary) by the active form’s ExecuteAction method.

Do not call ExecuteAction. It is called automatically when the user invokes an action. The Action parameter specifies the action that was invoked. ExecuteAction checks whether the application knows how to perform its function, and if so, executes the action and returns True. Otherwise, ExecuteAction returns False, and the default processing for the action continues.


TApplication.HandleException
 VCL Reference

TApplication.HandleException

TApplication	See also

Provides default handling of exceptions for the application.

procedure HandleException(Sender: TObject);

Description

If an exception passes through all the try blocks in the application code, the application automatically calls HandleException, which displays a dialog box indicating an error occurred. Unless the exception object is EAbort, HandleException calls the OnException event handler, if one exists. Otherwise, it calls ShowException to display a message dialog box indicating an error occurred.

To assign other exception handling code for the application, use the OnException event handler.


TApplication.HandleMessage
 VCL Reference

TApplication.HandleMessage

TApplication	See also 	Example

Interrupts the execution of an application while Windows processes a message in the Windows message queue.

procedure HandleMessage;

Description

HandleMessage interrupts the execution of the application so that Windows can process a single message from the Windows message queue before returning control to the application. If the message queue is empty, HandleMessage generates an OnIdle event and starts the process of updating the actions in the application.

Note:	If the application goes idle, HandleMessage may take a long time to return. Therefore, do not call HandleMessage when waiting for something message-based while priority actions are also being processed. Instead, call ProcessMessages when processing more than just messages.


TApplication.HelpCommand
 VCL Reference

TApplication.HelpCommand

TApplication	See also 	Example

Provides quick access to any of the Help commands in the WinHelp API (application programming interface).

function HelpCommand(Command: Word; Data: Longint): Boolean;

Description

Use HelpCommand to send a command to WinHelp. Before sending the help command to the Windows help engine, HelpCommand generates an OnHelp event on the active form or on TApplication. Finally, the command is forwarded to WinHelp if there is no OnHelp event handler or if the OnHelp event handler indicates that WinHelp should be called.

For information about Windows help commands and the data passed to them, see the WinHelp topic in the Windows Help system.


TApplication.HelpContext
 VCL Reference

TApplication.HelpContext

TApplication	See also 	Example

Displays a specified help topic.

function HelpContext(Context: THelpContext): Boolean;

Description

Use HelpContext to bring up the help topic specified by the Context parameter from the file specified in the CurrentHelpFile property. HelpContext generates an OnHelp event (either on the active form or on the application object itself). If there is no OnHelp event handler, or if the event handler indicates that WinHelp should be called, then HelpContext invokes the Windows help engine, passing it the context ID.

For example, if the Context value is 714, the HelpContext method displays the screen with the context help ID of 714 in the help file specified by CurrentHelpFile.

HelpContext returns False if CurrentHelpFile is an empty string, meaning the application has no help file assigned. In all other cases, HelpContext returns True.


TApplication.HelpJump
 VCL Reference

TApplication.HelpJump

TApplication	See also 	Example

Displays a specified help topic.

function HelpJump(const JumpID: string): Boolean;

Description

Call HelpJump to bring up a topic identified by its symbolic name. HelpJump displays the topic identified by the JumpID parameter from the file specified in the Current HelpFile property. HelpJump generates an OnHelp event (either on the active form or on the application object itself). If there is no OnHelp event handler, or if the event handler indicates that WinHelp should be called, then HelpJump invokes the Windows help engine, passing it the topic name.

For example, if the JumpID value is “'TApplication_HelpJump'” and the HelpFile property specifies the Delphi VCL help file, then HelpJump displays this screen (which has the context string “'TApplication_HelpJump'”).

HelpJump returns False if CurrentHelpFile is an empty string, meaning the application has no help file assigned. In all other cases, HelpJump returns True.


TApplication.HelpKeyword
 VCL Reference

TApplication.HelpKeyword

TApplication	See also

Displays a specified help topic.

function HelpKeyword(const Keyword: string): Boolean;

Description

Use HelpKeyword to bring up the help topic specified by the Keyword parameter from the file specified in the CurrentHelpFile property. HelpKeyword invokes the current help system, passing it the string specified by Keyword. If the current system is WinHelp, this displays the topic that has an Alink of Keyword.

HelpKeyword returns False if the current help system does not support the keyword lookups.


TApplication.HideHint
 VCL Reference

TApplication.HideHint

TApplication	See also

Hides the current hint.

procedure HideHint;

Description

Applications rarely, if ever, call HideHint directly. HideHint is used internally to hide the hint window at the appropriate times according to predetermined conditions and timer values. For example, CancelHint calls HideHint.


TApplication.HintMouseMessage
 VCL Reference

TApplication.HintMouseMessage

TApplication	See also

Regulates the display of hint windows.

procedure HintMouseMessage(Control: TControl; var Message: TMessage);

Description

This method is called automatically when the mouse passes over a control with a Hint. Applications rarely, if ever, call HintMouseMessage directly. HintMouseMessage is used internally to manage the display of the hint windows.


TApplication.HookMainWindow
 VCL Reference

TApplication.HookMainWindow

TApplication	See also

Enables a non-VCL dialog box to receive messages sent to the application’s main window.

procedure HookMainWindow(Hook: TWindowHook);

Description

Use HookMainWindow to ensure that a non-VCL dialog box behaves correctly as a child of the application, not as a standalone window. For example, switching among applications with Alt+Tab treats the application as a single task after calling HookMainWindow, rather than treating the non-VCL dialog box as a separate task.

When the window identified by the Handle property receives relevant dialog messages, it passes them to the dialog procedure passed as the Hook parameter.

There is no problem with leaving a dialog box hooked into the main window, even for extended periods. However, should the dialog box close, call the UnhookMainWindow method to release the hook.


TApplication.HookSynchronizeWakeup
 VCL Reference

TApplication.HookSynchronizeWakeup

TApplication	See also

Assigns a method to the WakeMainThread variable.

procedure HookSynchronizeWakeup;

Description

Applications rarely, if ever, call HookSynchronizeWakeup directly. HookSynchronizeWakeup is called from the TApplication constructor to initialize the method that gets called when a thread initially synchronizes with the application’s main thread.


TApplication.Initialize
 VCL Reference

TApplication.Initialize

TApplication 	See also	Example

Provides an opportunity to initialize subsystems.

procedure Initialize;

Description

Initialize is the first method called by the project source file. It calls the InitProc procedure pointer. By default, the call to Initialize for the application does nothing because the default InitProc pointer is nil .

To use Initialize, the InitProc pointer must be predefined. This can be accomplished in one of two ways:

Include a unit that assigns a procedure to InitProc in its initialization section, such as the ComObj unit. You can make this assignment in the initialization section of any of your units.

Create a custom initialization procedure that assigns a value to the InitProc pointer, and add a call to this procedure to the project source prior to the call to Initialize (that is, add it to the initialization section of the unit in which it is declared).

Warning:	Only one instance of InitProc can be defined in an application. If more than one unit assigns a value to InitProc, only the last assignment will work. You can, however, call the previous value of InitProc from an initialization procedure, so that all initialization procedures are executed.

For projects that do not assign a value to InitProc, the call to Initialize can be safely deleted from the project source.

Note:	Although Initialize is the first method called in the main project source code, it is not the first code that is executed in an application. The application first executes the “initialization” section of all the units used by the application.


TApplication.IsRightToLeft
 VCL Reference

TApplication.IsRightToLeft

TApplication	See also

Specifies whether the application adjusts its interface for Middle Eastern locales.

function IsRightToLeft: Boolean;

Description

Use IsRightToLeft to determine whether the application makes any adjustments of control alignment, text direction, or scrollbar placement. IsRightToLeft returns True if the application’s BiDiMode indicates that any of these should be reversed and the application is running on a system with a Middle Eastern locale.


TApplication.MessageBox
 VCL Reference

TApplication.MessageBox

TApplication 	See also	Example

Displays a specified message to the user.

function MessageBox(const Text, Caption: PChar; Flags: Longint = MB_OK): Integer;

Description

Use MessageBox to display a generic dialog box a message and one or more buttons. Caption is the caption of the dialog box and is optional.

MessageBox is an encapsulation of the Windows API MessageBox function. TApplication’s encapsulation of MessageBox automatically supplies the missing window handle parameter needed for the Windows API function.

The value of the Text parameter is the message, which can be longer than 255 characters if necessary. Long messages are automatically wrapped in the message box.

The value of the Caption parameter is the caption that appears in the title bar of the dialog box. Captions can be longer than 255 characters, but don't wrap. A long caption results in a wide message box.

The Flags parameter specifies what buttons appear on the message box and the behavior (possible return values). The following table lists the possible values. These values can be combined to obtain the desired effect.

Value	Meaning

MB_ABORTRETRYIGNORE	The message box contains three push buttons: Abort, Retry, and Ignore.

MB_OK	The message box contains one push button: OK. This is the default.

MB_OKCANCEL	The message box contains two push buttons: OK and Cancel.

MB_RETRYCANCEL	The message box contains two push buttons: Retry and Cancel.

MB_YESNO	The message box contains two push buttons: Yes and No.

MB_YESNOCANCEL	The message box contains three push buttons: Yes, No, and Cancel.

MessageBox returns 0 if there isn’t enough memory to create the message box. Otherwise it returns one of the following values:

Value	Numeric value	Meaning

IDOK	1	The user chose the OK button.

IDCANCEL	2	The user chose the Cancel button.

IDABORT	3	The user chose the Abort button.

IDRETRY	4	The user chose the Retry button.

IDIGNORE	5	The user chose the Ignore button.

IDYES	6	The user chose the Yes button.

IDNO	7	The user chose the No button.


TApplication.Minimize
 VCL Reference

TApplication.Minimize

TApplication	See also 	Example

Shrinks an application to the Windows task bar.

procedure Minimize;

Description

Call Minimize to minimize the application. When the user minimizes the application, the Minimize method is automatically called.

Note:	Don't confuse the Minimize method, which minimizes an entire application, with minimizing a form or window. To minimize, maximize, or restore a window or form, change the value of its WindowState property.


TApplication.NormalizeAllTopMosts
 VCL Reference

TApplication.NormalizeAllTopMosts

TApplication	See also

Makes forms that have been designated as topmost forms (their FormStyle is fsStayOnTop) behave as if they were not topmost forms.

procedure NormalizeAllTopMosts;

Description

Use NormalizeAllTopMosts to allow other windows appear on top of a topmost form. Normally, topmost forms remain on top of other windows, and so may obscure other windows.

NormalizeAllTopMosts behaves like the NormalizeTopMosts method, except that it also includes the application’s Main Window.


TApplication.NormalizeTopMosts
 VCL Reference

TApplication.NormalizeTopMosts

TApplication	See also 	Example

Makes forms that have been designated as topmost forms (their FormStyle is fsStayOnTop) behave as if they were not topmost forms.

procedure NormalizeTopMosts;

Description

Use NormalizeTopMosts to allow a message box or dialog box that is displayed using the Windows API functions (such as MessageBox and MessageDlg) directly, appear on top of a topmost form. Otherwise the topmost form remains on top, and may obscure the message box.

Calling NormalizeTopMosts is not necessary when using VCL methods and functions to display message boxes.

To return the forms designated as fsStayOnTop to be topmost again, call RestoreTopMosts.


TApplication.ProcessMessages
 VCL Reference

TApplication.ProcessMessages

TApplication	See also 	Example

Interrupts the execution of an application so that it can process the message queue.

procedure ProcessMessages;

Description

Call ProcessMessages to permit the application to process messages that are currently in the message queue. ProcessMessages cycles the Windows message loop until it is empty, and then returns control to the application.

Note:	Neglecting message processing affects only the application calling ProcessMessages, not other applications. In lengthy operations, calling ProcessMessages periodically allows the application to respond to paint and other messages.

Note:	ProcessMessages does not allow the application to go idle, whereas HandleMessage does.


TApplication.Restore
 VCL Reference

TApplication.Restore

TApplication	See also 	Example

Restores a minimized application to its normal size.

procedure Restore;

Description

Use Restore to restore the application to its previous size before it was minimized. When the user restores the application to normal size, Restore is automatically called.

Note:	Don't confuse the Restore method, which restores the entire application, with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of its WindowState property.


TApplication.RestoreTopMosts
 VCL Reference

TApplication.RestoreTopMosts

TApplication	See also 	Example

Restores forms designated as fsStayOnTop to be topmost again.

procedure RestoreTopMosts;

Description

Use RestoreTopMosts to return forms that were originally designated as topmost forms (FormStyle is fsStayOnTop), then temporarily changed to be non-topmost forms with the NormalizeTopMosts or NormalizeAllTopMosts method, to a topmost position.


TApplication.Run
 VCL Reference

TApplication.Run

TApplication	See also	Example

Executes the application.

procedure Run;

Description

Do not call Run. When creating a new project, The IDE automatically creates a main program block in the project file that calls the Run method. When the application is executed, the application’s Run method is called.

Run contains the application’s main message loop. The call to Run does not return until the application’s message loop terminates.


TApplication.ShowException
 VCL Reference

TApplication.ShowException

TApplication	See also 	Example

Displays a message box for exceptions that are not caught by application code.

procedure ShowException(E: Exception);

Description

The HandleException method calls ShowException by default if no handler is specified for the OnException event. If an exception handler filters exceptions, ShowException is called for those exceptions that are not filtered out.

To specify how exceptions are handled for an application, write a handler for the OnException event.

Note:	Calling ShowException is rarely necessary in a VCL-based application, since the default VCL exception handler calls ShowException automatically.


TApplication.Terminate
 VCL Reference

TApplication.Terminate

TApplication	See also 	Example

Ends application execution.

procedure Terminate;

Description

Call Terminate to end the application programmatically. By calling Terminate rather than freeing the application object, you allow the application to shut down in an orderly fashion.

Terminate calls the Windows API PostQuitMessage function to perform an orderly shutdown of the application. Terminate is not immediate.

Terminate is called automatically on a WM_QUIT message and when the main form closes.


TApplication.UnhookMainWindow
 VCL Reference

TApplication.UnhookMainWindow

TApplication	See also

Releases a dialog procedure previously hooked by a call to the HookMainWindow method.

type TWindowHook = function(var Message: TMessage): Booleanof object;

procedure UnhookMainWindow(Hook: TWindowHook);

Description

Use UnhookMainWindow to release the hooked window. Specify the dialog procedure as the value of the Hook parameter.

The TWindowHook type is the parameter type used for UnhookMainWindow. It is a method-pointer type used for the dialog-procedures of non-VCL dialog boxes. The dialog procedure is similar to a window procedure for a window, in that it processes messages for the dialog box, but its syntax is somewhat different.

For more information about Windows hooks see the SetWindowsEx and UnhookWindowsEx functions in the Windows Help File.


TApplication.UnhookSynchronizeWakeup
 VCL Reference

TApplication.UnhookSynchronizeWakeup

TApplication	See also

Removes the method that was assigned to the WakeMainThread variable by HookSynchronizeWakeup.

procedure UnhookSynchronizeWakeup;

Description

Applications rarely, if ever, call UnhookSynchronizeWakeup directly. UnhookSynchronizeWakeup is called from the TApplication destructor. It resets the WakeMainThread variable to nil if that variable was set by the HookSynchronizeWakeup method.


TApplication.UpdateAction
 VCL Reference

TApplication.UpdateAction

TApplication	See also

Generates an OnActionUpdate event.

function UpdateAction(Action: TBasicAction): Boolean; reintroduce;

Description

When the application is idle, it makes a series of calls to update the properties (such as whether it is enabled, checked, and so on) of every action that is linked to a visible control or menu item. First, that action list that contains the action generates an OnUpdate event. If the action list does not handle the OnUpdate event, then the action is routed to the Application object’s UpdateAction method, which invokes the OnActionUpdate event handler. (The application’s UpdateAction method responds to all unhandled actions in the application.) If the OnActionUpdate event handler does not update the action, then it is routed to the action’s OnUpdate event handler. If that does not update the action, the active control’s UpdateAction method is called, followed (if necessary) by the active form’s UpdateAction method.

Do not call UpdateAction. It is called automatically when the application is idle. The Action parameter specifies the action to be updated. UpdateAction returns True if the action’s properties are updated and require no further processing. Otherwise, UpdateAction returns False, and the default action processing continues.


TApplication.UseRightToLeftAlignment
 VCL Reference

TApplication.UseRightToLeftAlignment

TApplication	See also

Specifies whether the application object is in a right-to-left alignment mode.

function UseRightToLeftAlignment: Boolean;

Description

Use IsRightToLeft to determine whether the application’s controls alignment is reversed so that they are aligned from right to left. UseRightToLeftAlignment returns True for Middle Eastern locales if the BiDiMode property is bdRightToLeft. Otherwise, it returns False.


TApplication.UseRightToLeftReading
 VCL Reference

TApplication.UseRightToLeftReading

TApplication	See also

Specifies whether the application object is in a right-to-left text mode.

function UseRightToLeftReading: Boolean;

Description

Call UseRightToLeftReading to determine which style and text drawing flags (used in ExTextOut or DrawText) to set for the application’s controls.

UseRightToLeftReading returns True for for Middle Eastern locales if the BiDiMode property is not bdLeftToRight. Otherwise, it returns False.

Note:	UseRightToLeftReading is identical to the IsRightToLeft method.


TApplication.UseRightToLeftScrollBar
 VCL Reference

TApplication.UseRightToLeftScrollBar

TApplication	See also

Specifies whether the vertical scroll bar appears on the left side controls.

function UseRightToLeftScrollBar: Boolean;

Description

Call UseRightToLeftScrollBar to determine whether the vertical scroll bars appear on the left sides of the application’s controls. When UseRightToLeftScrollBar returns True, the vertical scroll bars appear on the left sides of the controls. When UseRightToLeftScrollBar returns False, the vertical scroll bars appear on the right.

UseRightToLeftReading returns True for Middle Eastern locales if BiDiMode is bdRightToLeft or bdRightToLeftNoAlign.


Hierarchy

TObject

TPersistent

TComponent

TApplication


TBasicActionLink
 VCL Reference

TBasicActionLink

Hierarchy	Properties	Methods	Events

TBasicActionLink is the base class for action link classes, which handle the communication between actions and clients.

Unit

Classes

Description

TBasicActionLink is the base class from which all other action link classes ultimately descend. TBasicAction link lays the foundation for the connection between action and the client. The client is a parameter to the TBasicActionLink constructor, and the action object is indicated by the Action property. TBasicActionLink sets up the link between the action and client execution and updating events.


 VCL Reference

TBasicActionLink properties

TBasicActionLink	Alphabetically	Legend

In TBasicActionLink

Action


 VCL Reference

TBasicActionLink properties

TBasicActionLink	By object	Legend

Action


TBasicActionLink.Action
 VCL Reference

TBasicActionLink.Action

TBasicActionLink	See also

Indicates which action the link connects to its client.

property Action: TBasicAction;

Description

Action is the action object that the link associates with its client.


 VCL Reference

TBasicActionLink events

TBasicActionLink	Alphabetically	Legend

In TBasicActionLink

OnChange


 VCL Reference

TBasicActionLink events

TBasicActionLink	By object	Legend

OnChange


TBasicActionLink.OnChange
 VCL Reference

TBasicActionLink.OnChange

TBasicActionLink	See also

Occurs when an OnChange event is triggered on the action.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler when you want to respond to a change that occurs when the associated action fires an OnChange event.


 VCL Reference

TBasicActionLink methods

TBasicActionLink	Alphabetically	Legend

In TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBasicActionLink methods

TBasicActionLink	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Update


TBasicActionLink.Create
 VCL Reference

TBasicActionLink.Create

TBasicActionLink	See also

Instantiates and initializes a TBasicActionLink object.

constructor Create(AClient: TObject); virtual;

Description

Applications do not need to call the constructor directly. Instances of TBasicActionLink are created automatically when you connect an action with a client in the action list editor. The AClient parameter is the client for the link. The link connects this client to its action.

Create ensures that the client is of the appropriate type for the particular type of link. Descendant classes can progressively specify more customized client types. For example, there are action link classes for controls, for windowed controls, and for button controls.


TBasicActionLink.Destroy
 VCL Reference

TBasicActionLink.Destroy

TBasicActionLink	See also

Destroys an instance of an action link object.

destructor Destroy; override;

Description

You do not need to destroy the action link; it is automatically destroyed by the client that was passed to its constructor when it was created.

If you want to destroy the action link manually, do not call the destructor directly. Call Free instead. Free checks that the link is not nil, and only then invokes the destructor.


TBasicActionLink.Execute
 VCL Reference

TBasicActionLink.Execute

TBasicActionLink	See also

Invokes the action’s Execute method.

function Execute(AComponent: TComponent = nil): Boolean; virtual;

Description

Execute calls the action’s Execute method and returns True if the action has an assigned OnExecute event handler, False otherwise.

AComponent is the client component that the user clicked to execute the action.


TBasicActionLink.Update
 VCL Reference

TBasicActionLink.Update

TBasicActionLink	See also

Invokes the action’s Update method.

function Update: Boolean; virtual;

Description

Update calls the action’s Update method and returns True if the action has an assigned OnUpdate event handler, False otherwise. The action link’s Update method is called if the client is linked to the action for this event.


Hierarchy

TObject

TBasicActionLink


TBasicAction
 VCL Reference

TBasicAction

Hierarchy	Properties	Methods	Events

TBasicAction is the ancestor class for all action objects.

Unit

Classes

Description

TBasicAction introduces the fundamental behavior for an action. Descendants of TBasicAction add functionality for containment in an action list, for being categorized, and for specializing their behavior tailored to particular clients such as controls or menu items. Use TBasicAction if you want to create an action for an object that is neither a menu item nor a control.


 VCL Reference

TBasicAction properties

TBasicAction	Alphabetically	Legend

In TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TBasicAction properties

TBasicAction	By object	Legend

ActionComponent

ComObject

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


TBasicAction.ActionComponent
 VCL Reference

TBasicAction.ActionComponent

TBasicAction	See also

Indicates the client component that caused this action to execute.

property ActionComponent: TComponent;

Description

Use ActionComponent to discern which client component caused this action to execute. For example, examine ActionComponent from an OnExecute event handler if you need to know what user action triggered this action.

When the user clicks a client control, that client sets ActionComponent before calling the action’s Execute method. After the action executes, the action resets ActionComponent to nil.


 VCL Reference

TBasicAction events

TBasicAction	Alphabetically	Legend

In TBasicAction

OnChange

OnExecute

OnUpdate


 VCL Reference

TBasicAction events

TBasicAction	By object	Legend

OnChange

OnExecute

OnUpdate


TBasicAction.OnChange
 VCL Reference

TBasicAction.OnChange

TBasicAction

Occurs when one of the action’s properties changes.

property OnChange: TNotifyEvent;

Description

Applications can’t use the protected OnChange event. It is used internally to manage the relationship between the properties of the action and the corresponding properties of the action’s clients.

Component writers can use OnChange in descendant objects to respond when the action’s properties change.


TBasicAction.OnExecute
 VCL Reference

TBasicAction.OnExecute

TBasicAction	See also	Example

Occurs when the client event that is linked to it fires.

property OnExecute: TNotifyEvent;

Description

Write an OnExecute event handler when you want to respond when the user triggers the client object’s default event (typically an OnClick event). For most target clients, OnExecute is triggered on a Click method, and is associated with the OnClick event.

OnExecute also occurs when the user types the shortcut (or one of the secondary shortcuts) associated with the action or its client.

Warning:	If you assign an OnExecute event handler to a predefined action, the default behavior of that action will not occur.


TBasicAction.OnUpdate
 VCL Reference

TBasicAction.OnUpdate

TBasicAction	See also	Example

Occurs when the application is idle or when the action list updates.

property OnUpdate: TNotifyEvent;

Description

Write an OnUpdate event handler to execute centralized code while an application is idle. For example, actions may want to update enabling and disabling, or checking and unchecking of client targets.


 VCL Reference

TBasicAction methods

TBasicAction	Alphabetically	Legend

In TBasicAction

Create

Destroy

Execute

ExecuteTarget

HandlesTarget

Notification

RegisterChanges

SetOnExecute

UnRegisterChanges

Update

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBasicAction methods

TBasicAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

Notification

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetOnExecute

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TBasicAction.Create
 VCL Reference

TBasicAction.Create

TBasicAction	See also

Instantiates and initializes a TBasicAction object.

constructor Create(AOwner: TComponent); override;

Description

Applications do not need to instantiate TBasicAction directly. Actions are created automatically when you choose New Action in the action list editor. If you want to create an action at runtime, call Create and assign a TActionList component to its ActionList property.

Create calls the inherited constructor and then creates its sub-objects, which includes a list of clients that are action links.


TBasicAction.Destroy
 VCL Reference

TBasicAction.Destroy

TBasicAction	See also

Disposes of an instance of a TBasicAction object.

destructor Destroy; override;

Description

You do not need to call the destructor for an action. An action is a component and is automatically destroyed by its owner, which was passed to the constructor when it is created. If you must destroy an action manually, call Free instead, which safely invokes the destructor.


TBasicAction.Execute
 VCL Reference

TBasicAction.Execute

TBasicAction	See also

Indicates whether an OnExecute event handler was called.

function Execute: Boolean; dynamic;

Description

Execute calls the OnExecute event handler, if one is assigned, with the action as the Sender. Execute returns True if an event handler is called, False otherwise.


TBasicAction.ExecuteTarget
 VCL Reference

TBasicAction.ExecuteTarget

TBasicAction	See also

Introduces an interface for invoking an action on a target client component or control.

procedure ExecuteTarget(Target: TObject); virtual;

Description

ExecuteTarget does nothing in TBasicAction. ExecuteTarget was introduced in TBasicAction so that descendants can override it to initiate the action on the target. For example, an edit action that performs copying might copy the contents of an edit control to the clipboard.


TBasicAction.HandlesTarget
 VCL Reference

TBasicAction.HandlesTarget

TBasicAction	See also

Introduces an interface for verifying that the type, and state, of a target component or control are appropriate for the action.

function HandlesTarget(Target: TObject): Boolean; virtual;

Description

HandlesTarget does nothing in TBasicAction. HandlesTarget was introduced in TBasicAction so that descendants can override it to check the type and state of a target. Handles target can verify any information about a target that is relevant for the action. HandlesTarget returns True if the target meets the specified criteria, False otherwise.


TBasicAction.Notification
 VCL Reference

TBasicAction.Notification

TBasicAction	See also

Responds when components are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Do not call the Notification method in an application.  Notification is called automatically when the component specified by AComponent is about to be inserted or removed, as specified by Operation.

TBasicAction overrides the Notification method to check whether the component that is the value of the ActionComponent property is about to be freed. If so, it sets the ActionComponent property to nil.


TBasicAction.RegisterChanges
 VCL Reference

TBasicAction.RegisterChanges

TBasicAction	See also

Associates the action with an action link.

procedure RegisterChanges(Value: TBasicActionLink);

Description

RegisterChanges is called when the action and link are connected, for example, when a link sets a new action. Value is the action link with which the action associates itself. The link is added to the action’s client list.


TBasicAction.SetOnExecute
 VCL Reference

TBasicAction.SetOnExecute

TBasicAction	See also

Assigns an OnExecute event handler.

procedure SetOnExecute(Value: TNotifyEvent); virtual;

Description

SetOnExecute is the property write method for the OnExecute event. In addition to assigning the value of OnExecute, SetOnExecute propagates the event handler to all client objects and generates an OnChange event.


TBasicAction.UnRegisterChanges
 VCL Reference

TBasicAction.UnRegisterChanges

TBasicAction	See also

Breaks the association between the action and the action link.

procedure UnRegisterChanges(Value: TBasicActionLink);

Description

UnRegisterChanges is called when the action and link should no longer be associated. UnRegisterChanges is called, for example, in the destructor or when a link sets a new action. Value is the action link with which the association is broken.


TBasicAction.Update
 VCL Reference

TBasicAction.Update

TBasicAction	See also

Provides an opportunity to execute centralized code when an application is idle.

function Update: Boolean; virtual;

Description

Update triggers the OnUpdate event handler. Update returns True if a handler was found for that event, False otherwise. When the application is idle, the OnUpdate event occurs for every action. This provides an opportunity for applications to execute centralized code for enabling and disabling, checking and unchecking, and so on.


TBasicAction.UpdateTarget
 VCL Reference

TBasicAction.UpdateTarget

TBasicAction	See also

UpdateTarget introduces an interface for a method of notifying a client when the action updates itself.

procedure UpdateTarget(Target: TObject); virtual;

Description

UpdateTarget does nothing in TBasicAction. UpdateTarget was introduced in TBasicAction so that descendants can override it to correspondingly update a target when the action updates. For examples, see the TEditAction objects in the stdactns unit.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction


TBaseDragControlObject
 VCL Reference

TBaseDragControlObject

Hierarchy	Properties	Methods	See also

TBaseDragControlObject object provides support for drag-and-drop or drag-and-dock operations.

Unit

Controls

Description

Do not create instances of TBaseDragControlObject. TBaseDragControlObject, like its immediate ancestor TDragObject, handles operations common to both drag-and-drop and drag-and-dock behavior. TBaseDragControlObject adds support for associating a control with the drag object.

TBaseDragControlObject has two descendants: TDragControlObject, which is specialized for drag-and-drop operations, and TDragDockObject, which is specialized for drag-and-dock operations.


 VCL Reference

TBaseDragControlObject Properties

TBaseDragControlObject	Alphabetically	Legend

In TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TBaseDragControlObject Properties

TBaseDragControlObject	By Object	Legend

Cancelling

Control

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


TBaseDragControlObject.Control
 VCL Reference

TBaseDragControlObject.Control

TBaseDragControlObject	See also

Indicates the control that is being dragged.

property Control: TControl;

Description

Use Control to gain access to the object that is being dragged. Depending on the operation, its properties can affect the appearance of the drag cursor and whether a drag target accepts the control.


 VCL Reference

TBaseDragControlObject Methods

TBaseDragControlObject	Alphabetically	Legend

In TBaseDragControlObject

Assign

Create

EndDrag

Finished

Derived from TDragObject

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBaseDragControlObject Methods

TBaseDragControlObject	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

EndDrag

FieldAddress

Finished

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TBaseDragControlObject.Assign
 VCL Reference

TBaseDragControlObject.Assign

TBaseDragControlObject	See also

Copies the properties of another drag control object.

procedure Assign(Source: TDragObject); override;

Description

Call Assign to copy the properties of another drag object. Assign changes the DragTarget, DragHandle, DragPos, DragTargetPos, MouseDeltaX and MouseDeltaY properties to match a drag object supplied as the Source parameter. If Source is a descendant of TBaseDragControlObject (normally the case), assign copies the Control property as well.


TBaseDragControlObject.Create
 VCL Reference

TBaseDragControlObject.Create

TBaseDragControlObject	See also

Creates an instance of the TBaseDragControlObject and stores a reference to the control that is being dragged.

constructor Create(AControl: TControl); virtual;

Description

Call Create to instantiate a specialized descendant of TBaseDragControlObject from the OnStartDrag event handler of a control that can be dragged. Pass the control that is about to be dragged as the AControl parameter. This control becomes the value of the Control property.


TBaseDragControlObject.EndDrag
 VCL Reference

TBaseDragControlObject.EndDrag

TBaseDragControlObject	See also

Generates an OnEndDrag event for the control that is being dragged.

procedure EndDrag(Target: TObject; X, Y: Integer); virtual;

Description

EndDrag is called automatically when the user drops the control or cancels the drag operation. It calls the DoEndDrag method of the control specified by the Control property. By default, this method generates an OnEndDrag event for that control.

The Target parameter indicates the object that accepted the control. If the drag operation was canceled or the control was dragged to a floating position (in a drag-and-dock operation), Target is nil. The X and Y parameters indicate where the control is dropped.


TBaseDragControlObject.Finished
 VCL Reference

TBaseDragControlObject.Finished

TBaseDragControlObject	See also

Finished ends a drag and drop operation.

procedure Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); override;

Description

Finished is called automatically when the user drops the control or cancels the drag operation. Accepted indicates whether the Target control at X, Y position accepts the drag and drop or drag and dock operation. If a target does not accept the dragged object, its DragCanceled method is called before the EndDrag method generates an OnEndDrag event.


Hierarchy

TObject

TDragObject

TBaseDragControlObject


TBasePropertyEditor
 VCL Reference

TBasePropertyEditor

Hierarchy	Properties	Methods	See also

TBasePropertyEditor is the base class for all property editors.

Unit

DesignIntf

Description

Use TBasePropertyEditor or one of its descendants as a base class when defining a property editor for a specialized property in a new component class. All property editors must descend from TBasePropertyEditor and, in addition, they must support the IProperty interface.

TBasePropertyEditor defines two abstract protected methods that the Object Inspector calls to inform the property editor of information it may find useful. It does not implement any support for the IProperty interface. This support must be supplied by descendant classes. For example, TBasePropertyEditor has an immediate descendant, TPropertyEditor, which supplies a default implementation of the IProperty interface as well as support for fetching property values of different types. Typically, component writers use TPropertyEditor as a base class when defining new property editors. However, you can derive a property editor directly from TBasePropertyEditor, and avoid the overhead of all methods that handle types that are not needed for your particular property.

Property editors can be associated with all properties of a specified type, or with a particular property of a particular component class. To create the association between a property editor and a property type, call RegisterPropertyEditor. Once the property editor is registered, it appears when the user attempts to edit an appropriate property using the Object Inspector.


 VCL Reference

TBasePropertyEditor properties

TBasePropertyEditor	Alphabetically 	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TBasePropertyEditor properties

TBasePropertyEditor	By object 	Legend

RefCount


 VCL Reference

TBasePropertyEditor methods

TBasePropertyEditor	Alphabetically 	Legend

In TBasePropertyEditor

Create

Initialize

SetPropEntry

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TBasePropertyEditor methods

TBasePropertyEditor	By object 	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetPropEntry


TBasePropertyEditor.Create
 VCL Reference

TBasePropertyEditor.Create

TBasePropertyEditor	See also

Creates a new TBasePropertyEditor object.

constructor Create(const ADesigner: IDesigner; APropCount: Integer); virtual;

Description

Do not create instances of a property editor. Registered property editors are created automatically for selected objects in the form designer.

ADesigner is an interface that the property editor can use to interact with the forms designer.

APropCount indicates the number of components whose properties are to be edited using the property editor.


TBasePropertyEditor.Initialize
 VCL Reference

TBasePropertyEditor.Initialize

TBasePropertyEditor	See also

Initializes the property editor after it is created but before it is used.

procedure Initialize; virtual; abstract;

Description

Do not call the Initialize method. It is called automatically by the Object Inspector to allow property editors to perform any necessary initialization before they are used.

In TBasePropertyEditor, Initialize is abstract. Descendant classes must override the Initialize method to provide an implementation. This method can be used to perform any special initialization, such as the creation of helper objects.

Property editors are often created and discarded without being used because they do not represent a common property across all selected components. Since Initialize is called only after it is determined that the property editor will be used, it is more efficient to initialize property values and create helper objects in the Initialize method rather than the constructor.


TBasePropertyEditor.SetPropEntry
 VCL Reference

TBasePropertyEditor.SetPropEntry

TBasePropertyEditor	See also

Informs the property editor of a particular object whose property is to be edited.

procedure SetPropEntry(Index: Integer; AInstance: TPersistent; APropInfo: PPropInfo); virtual; abstract;

Description

The Object Inspector calls SetPropEntry for each object that has a property that the property editor is editing. This allows the property editor to store information about the objects being edited so that it can get and set property values.

Index is the index of the object being edited. This value can range from 0 to one less than the APropCount parameter that is passed to the constructor.

AInstance is a reference to the object being edited.

APropInfo is a pointer to the property information record for the property on AInstance. This can be used to access the methods that get or set the property value.

In TBasePropertyEditor, SetPropEntry is abstract. Descendant classes must override this method to provide an implementation.


Hierarchy

TObject

TInterfacedObject

TBasePropertyEditor


TBevel
 VCL Reference

 TBevel

Hierarchy	Properties	Methods	See also

TBevel represents a beveled outline.

Unit

ExtCtrls

Description

Use TBevel to create beveled boxes, frames, or lines. The bevel can appear raised or lowered.


 VCL Reference

TBevel properties

TBevel	Alphabetically	Legend

In TBevel

Shape

Style

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBevel properties

TBevel	By object	Legend

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentShowHint

Shape

ShowHint

Style

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TBevel.Shape
 VCL Reference

TBevel.Shape

TBevel	See also

Determines the shape of the bevel.

type TBevelShape = (bsBox, bsFrame, bsTopLine, bsBottomLine, bsLeftLine, bsRightLine, bsSpacer);

property Shape: TBevelShape;

Description

Set Shape to specify whether the bevel appears as a line, box, frame, or space. The default value for Shape is bsBox. The are the possible values of Shape are:

Value	Meaning

bsBox	The entire client area appears raised or lowered, depending on the value of Style.

bsFrame	The client area is outlined by a raised or lowered frame.

bsTopLine	The bevel displays a line at the top of the client area.

bsBottomLine	The bevel displays a line at the bottom of the client area.

bsLeftLine	The bevel displays a line at the left side of the client area.

bsRightLine	The bevel displays a line at the right side of the client area.

bsSpacer	The bevel is an empty space.


TBevel.Style
 VCL Reference

TBevel.Style

TBevel	See also

Determines whether the bevel appears raised or lowered.

type TBevelStyle = (bsLowered, bsRaised);

property Style: TBevelStyle;

Description

Set Style to indicate whether the bevel should create a raised or a lowered effect. When the Shape property is bsBox, the entire client area appears raised or lowered. For all other values of Shape, the bevel displays a raised or lowered line along the edge or edges of the client area. The default value of Style is bsLowered. These are the possible values of Style:

Value	Meaning

bsLowered	The bevel is lowered.

bsRaised	The bevel is raised.


 VCL Reference

TBevel methods

TBevel	Alphabetically	Legend

In TBevel

Create

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBevel methods

TBevel	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TBevel.Create
 VCL Reference

TBevel.Create

TBevel	See also

Creates and initializes an instance of TBevel.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a bevel at runtime. Bevels placed on forms at design time are created automatically.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TBevel


TBitBtn
 VCL Reference

 TBitBtn

Hierarchy	Properties	Methods	Events	Using TBitBtn	See also

TBitBtn is a push button control that can include a bitmap on its face.

Unit

Buttons

Description

Bitmap buttons exhibit the same behavior as button controls. Use them to initiate actions from forms and dialog boxes.

Bitmap buttons implement properties that specify the bitmap images, along with their appearance and placement on the button. You can choose from predefined bitmap buttons styles or use your own customized bitmap for the button. Although the button can be associated with only one bitmap, the bitmap (glyph property) can be subdivided into four equal-sized portions, which are displayed based on the state of the button: up, down, disabled, and clicked.

The Kind property of TBitBtn provides commonly used buttons, such as OK, Cancel, Help, and so on. These predefined button types have corresponding graphical images and default behaviors, so you can easily add them to your application with little or no coding necessary.

The recommended way to implement the response of other button kinds to user clicks is to assign an action from an action list as the value of the Action property. By setting the Action property, you make the button a client of the action, and the action handles updating the button’s properties and responding when the user clicks the button.

If you are not using the built-in response to a specific kind of button or an action to respond when the user clicks the button, then you can specify the button’s response by writing an OnClick event handler.


 VCL Reference

TBitBtn properties

TBitBtn	Alphabetically	Legend

In TBitBtn

Glyph

Kind

Layout

Margin

NumGlyphs

Spacing

Style

Derived from TButton

Cancel

Default

ModalResult

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UnDockHeight

UnDockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TBitBtn properties

TBitBtn	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Cancel

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Default

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Glyph

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Kind

Layout

Left

LRDockWidth

Margin

ModalResult

Name

NumGlyphs

Owner

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

Spacing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UnDockHeight

UnDockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TBitBtn.Glyph
 VCL Reference

TBitBtn.Glyph

TBitBtn	See also

Specifies the bitmap that appears on the bitmap button.

property Glyph: TBitmap;

Description

Use the Open dialog box that appears as an editor in the Object Inspector to choose a bitmap file (with a .BMP extension) to use on the button, or specify a TBitmap object at runtime.

You can provide up to four images within a single bitmap. All images must be the same size and next to each other in a row. Bit buttons display one of these images depending on their state.

Image position	Button state	Description

First	Up	This image appears when the button is up (unselected). This image is also used when the button has focus (for example, if the user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, bit buttons also use this image for all other states.

Second	Disabled	This image usually appears dimmed to indicate that the button can't be selected.

Third	Clicked	This image appears when the button is clicked. The Up image reappears when the user releases the mouse button.

Fourth	Down	This image appears when the button stays down (indicating that it remains selected).

If only one image is present, bit buttons attempt to represent the other states by altering the image slightly for the different states, although the Down state is always the same as the Up state. If you aren't satisfied with the results, you can provide additional images in the bitmap.

If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property.

Note:	The lower left pixel of the bitmap is reserved for the “transparent” color. Any pixel in the bitmap which matches that lower left pixel will be transparent.


TBitBtn.Kind
 VCL Reference

TBitBtn.Kind

TBitBtn	See also 	Example

Specifies the kind of bitmap button.

type TBitBtnKind = (bkCustom, bkOK, bkCancel, bkHelp, bkYes, bkNo, bkClose, bkAbort, bkRetry, bkIgnore, bkAll);

property Kind: TBitBtnKind;

Description

These are the possible values and their meanings:

Value	Meaning

bkCustom	The button uses the Glyph property to determine the image that appears. As with push buttons, select a ModalResult for the button, or supply the code to respond using an action or an OnClick event.

bkOK	A green check mark and the text “OK” appear on the button face. The button becomes the default button (the Default property is automatically set to True). When the user chooses the button, the dialog box closes. The resulting ModalResult value of the bitmap button is mrOk.

bkCancel	A red Xand the text “Cancel” appear on the button face. The button becomes the Cancel button (the Cancel property is automatically set to True). When the user chooses the button, the dialog box closes. The resulting ModalResult value of the bitmap button is mrCancel.

bkYes	A green check mark and the text “Yes” appear on the button face. The button becomes the default button (the Default property is automatically set to True) When the user chooses the button, any changes the user made in the dialog box are accepted and the dialog box closes. The resulting ModalResult value of the bitmap button is mrYes.

bkNo	A red no symbol and and the “No” appear on the button face. The button becomes the Cancel button (the Cancel property is automatically set to True). When the user chooses the button, any changes the user made in the dialog box are canceled and the dialog box closes. The resulting ModalResult value of the bitmap button is mrNo.

bkHelp	A cyan question mark and the text “Help” appear on the button face. When the user chooses the button, a Help screen in the application's Help file appears. The Help file that appears is the file specified as the value of the application's HelpFile property. The value of the HelpContext property of the button specifies which Help screen in the Help file appears.

bkClose	A door with a green exit sign over it and the text “Close” appear on the button face. When the user chooses the button, the form closes. The Default property of the button is True.

bkAbort	A red X and and the “Abort” appear on the button face.

bkRetry	A green circular arrow and the text “Retry” appear on the button face.

bkIgnore	A green man walking away and the text “Ignore” appear on the button face. Use it to allow the user to continue after an error has occurred.

bkAll	A double green check mark and the text “Yes to All” appear on the button face.


TBitBtn.Layout
 VCL Reference

TBitBtn.Layout

TBitBtn	See also	Example

Specifies where the image appears on the bitmap button.

property Layout: TButtonLayout;

Description

Layout indicates whether the text appears on the left of the button (blGlyphLeft), the right of the button (blGlyphRight), the top (blGlyphTop) or the bottom (blGlyphBottom).


TBitBtn.Margin
 VCL Reference

TBitBtn.Margin

TBitBtn	See also

Specifies the number of pixels between the edge of the image (specified in the Glyph property) and the edge of the button.

property Margin: Integer;

Description

The margin is the space between the image edge and the button edge. The format of the edges depends on the layout of the image and text (specified in the Layout property). For example, if Layout is blGlyphLeft, the margin appears between the left edge of the image and the left edge of the button. If Margin is 3, three pixels separate the image and the button edges. If Margin is 0, there is no space between the image and the button edges.

If Margin is -1 (the default value), the image and text (specified in the Caption property) are centered. The number of pixels between the image and button edge is equal to the number of pixels between the opposite edge of the button and the text.


TBitBtn.NumGlyphs
 VCL Reference

TBitBtn.NumGlyphs

TBitBtn	See also

Indicates the number of images that are in the graphic specified in the Glyph property for use on a bitmap button or speed button.

type TNumGlyphs = 1..4;

property NumGlyphs: TNumGlyphs;

Description

If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property. Valid NumGlyphs values are 1 to 4. The default value is 1.


TBitBtn.Spacing
 VCL Reference

TBitBtn.Spacing

TBitBtn	See also

Determines where the image and text appear on a bitmap or speed button.

property Spacing: Integer;

Description

Spacing determines the number of pixels between the image (specified in the Glyph property) and the text (specified in the Caption property). The default value is 4 pixels.

If Spacing is a positive number, its value is the number of pixels between the image and text. If Spacing is 0, no pixels will be between the image and text. If Spacing is -1, the text appears centered between the image and the button edge. The number of pixels between the image and text is equal to the number of pixels between the text and the button edge opposite the glyph.


TBitBtn.Style
 VCL Reference

TBitBtn.Style

TBitBtn	See also

Determines the appearance of a bitmap button.

type TButtonStyle = (bsAutoDetect, bsWin31, bsNew);

property Style: TButtonStyle;

Description

The TButtonStyle type contains the values the Style property of bitmap buttons can assume. These are the possible values:

Value	Meaning

bsAutoDetect	When using Windows 3.x, the bitmap button uses the standard Windows 3.x look. When using a later version of Windows, the bitmap button uses a newer look.

bsWin31	Uses the standard Windows 3.1 look, regardless of which version of Windows is running.

bsNew	Uses a new bitmap button look, regardless of which version of Windows is running.


 VCL Reference

TBitBtn events

TBitBtn	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TBitBtn events

TBitBtn	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TBitBtn methods

TBitBtn	Alphabetically	Legend

In TBitBtn

Click

Create

Destroy

Derived from TButton

UseRightToLeftAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DockDrop

DisableAlign

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TBitBtn methods

TBitBtn	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TBitBtn.Click
 VCL Reference

TBitBtn.Click

TBitBtn	See also

Simulates a mouse click, as if the user had clicked the button.

procedure Click;

Description

Use Click to simulate a mouse click. Click performs the following tasks:

1. If the value of the Kind property is bkClose, Click closes the form. If the value of Kind is bkHelp, Click displays the Help screen assigned with the HelpContext property.

2. Any associated action fires, or, if there is no associated action, any code attached to the OnClick event is executed.


TBitBtn.Create
 VCL Reference

TBitBtn.Create

TBitBtn	See also

Constructs an instance of the button control and initializes its values.

constructor Create(AOwner: TComponent); override;

Description

Use Create to programmatically instantiate a button. Buttons added using the form designer are created automatically.

The AOwner parameter specifies the component, typically a form, that is responsible for freeing the button.


TBitBtn.Destroy
 VCL Reference

TBitBtn.Destroy

TBitBtn	See also

Destroys the bitmap button object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application.  Instead, call Free.  Free checks that the bitmap button is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TButton

TBitBtn


TBitmap
 VCL Reference

TBitmap

Hierarchy	Properties	Methods	Events	See also	Example

TBitmap is an encapsulation of a Windows bitmap (HBITMAP), including its palette (HPALETTE).

Unit

Graphics

Description

A bitmap is a powerful graphics object used to create, manipulate (scale, scroll, rotate, and paint), and store images in memory and as files on a disk.

TBitmap contains an internal image of the bitmap graphic and automatically manages realization of the palette when drawn.

To draw a bitmap on a canvas, call the Draw or StretchDraw methods of a TCanvas object, passing a TBitmap as a parameter.

Creating copies of a TBitmap is very fast since the handle is copied rather than the image. If the image is modified and the handle is shared by more than one TBitmap object, the image is copied before the modification is performed (that is, copy on write).


 VCL Reference

TBitmap Properties

TBitmap	Alphabetically	Legend

In TBitmap

Canvas

Empty

Handle

HandleType

Height

IgnorePalette

MaskHandle

Monochrome

Palette

PixelFormat

ScanLine

TransparentColor

TransparentMode

Width

Derived from TGraphic

Modified

PaletteModified

Transparent


 VCL Reference

TBitmap Properties

TBitmap	By Object	Legend

Canvas

Empty

Handle

HandleType

Height

IgnorePalette

MaskHandle

Modified

Monochrome

Palette

PaletteModified

PixelFormat

ScanLine

Transparent

TransparentColor

TransparentMode

Width


TBitmap.Canvas
 VCL Reference

TBitmap.Canvas

TBitmap	See also

Provides access to a drawing surface that represents the bitmap.

property Canvas: TCanvas;

Description

Canvas allows drawing on the bitmap by providing a TCanvas object for this purpose. Drawing on the canvas effectively modifies the underlying bitmap image pixels. Any canvas operation is valid on a bitmap  not just Draw and StretchDraw  including line drawing, rectangles, and circles. The bitmap object is passed as a parameter to these methods.

A canvas object is created automatically for the bitmap and the property is read-only.


TBitmap.Empty
 VCL Reference

TBitmap.Empty

TBitmap	See also	Example

Specifies whether the bitmap object contains a bitmap.

property Empty: Boolean;

Description

Use Empty to determine if a bitmap has been loaded into the bitmap object or drawn using its canvas property. If the bitmap image is empty, that is, if the bitmap object does not contain a bitmap, then Empty is True. If the bitmap image is not empty, that is, if the bitmap contains a bitmap, then Empty is False.


TBitmap.Handle
 VCL Reference

TBitmap.Handle

TBitmap 	See also

Provides access to the Windows GDI bitmap handle for accessing the GDI bitmap object.

property Handle: HBitmap;

Description

Use Handle to call a Windows API function that requires the handle of a bitmap object. Pass Handle as the bitmap handle parameter to these functions.

Handle is the HBITMAP encapsulated by the bitmap object. Avoid grabbing the handle directly since it causes the HBITMAP to be copied if more than one TBitmap shares the handle.

Warning:	Be careful when giving the handle to an object or routine. If the receiver takes ownership (and destroys) the bitmap handle, call TBitmap.::ReleaseHandle.


TBitmap.HandleType
 VCL Reference

TBitmap.HandleType

TBitmap 	See also

Indicates whether the bitmap is a DDB, Device Dependent Bitmap, or a DIB, Device Independent Bitmap.

type TBitmapHandleType = (bmDIB, bmDDB);

property HandleType: TBitmapHandleType;

Description

HandleType is used to find or modify the type of the bitmap. DDBs may be faster to draw on the screen, but may be stored in memory in a device-specific format. DIBs are stored in memory in a standard format supported by all devices (including printers).


TBitmap.Height
 VCL Reference

TBitmap.Height

TBitmap	See also 	Example

Specifies the vertical size in pixels of the bitmap.

property Height: Integer;

Description

Use Height to find or set the height of the bitmap image. If the Height property is changed, the bitmap image is copied to a new image with the new Height. Any new area added to the bitmap is filled with white. If the new Height value is smaller than the current one, the bitmap image is cropped.


TBitmap.IgnorePalette
 VCL Reference

TBitmap.IgnorePalette

TBitmap	See also

Determines whether the bitmap realizes its palette when drawing its image.

property IgnorePalette: Boolean;

Description

Use IgnorePalette when speed of drawing is a priority. When IgnorePalette is True, the bitmap does not realize its palette when drawing itself, resulting in lower picture quality on 256-color video drivers, but faster drawing of the bitmap image.

Note:	Delphi uses IgnorePalette only when a TDBImage is replicated in a TDBCtrlGrid.


TBitmap.::MaskHandle
 VCL Reference

TBitmap.MaskHandle

TBitmap 	See also

Provides access to the Windows GDI bitmap handle for accessing the GDI bitmap object.

property MaskHandle: HBitmap;

Description

Use MaskHandle to call a Windows API function that requires the handle of a bitmap object. Pass MaskHandle as the bitmap handle parameter to these functions. MaskHandle is the HBITMAP encapsulated by the bitmap object's mask.


TBitmap.Monochrome
 VCL Reference

TBitmap.Monochrome

TBitmap	Example

Determines whether the bitmap displays its image in monochrome.

property Monochrome: Boolean

Description

If Monochrome is True if the bitmap displays as a monochrome bitmap. Monochrome is False if the bitmap displays in color, that is, if it contains more than one bit per pixel.

Note: Setting a color bitmap's Monochrome property to True changes the image to monochrome. Note that this operation is irreversible.


TBitmap.Palette
 VCL Reference

TBitmap.Palette

TBitmap	Example

Controls a bitmap’s color mapping.

property Palette: HPalette;

Description

Use Palette to read or change the palette for a 256-color bitmap.

Palette is the HPALETTE realized by the bitmap. Grabbing this handle directly should be avoided since it causes the HPALETTE to be copied if more than one TBitmap shares the handle.

Use Palette to assign custom palettes created with CreatePalette to this property. Palette contains up to 256 colors that can be used to display the bitmap on screen.

When running in a 256-color video mode, and if the bitmap is drawn by an application running in the foreground, all colors of Palette are added to the Windows system palette. If the bitmap is drawn by an application running in the background and another application has loaded the system palette with its own colors, the bitmap's colors are mapped to the system palette. Palette=0 if the bitmap has no palette.

Another (although rare) use of Palette is to assign custom palettes created with CreatePalette to this property. Palette contains up to 256 colors that can be used to display the bitmap on screen.


TBitmap.PixelFormat
 VCL Reference

TBitmap.PixelFormat

TBitmap 	See also

Indicates the bit format of the bitmap image, specifying how the image is displayed and how the pixels of the bitmap image are stored in memory.

type TPixelFormat = (pfDevice, pf1bit, pf4bit, pf8bit, pf15bit, pf16bit, pf24bit, pf32bit, pfCustom);

property PixelFormat: TPixelFormat;

Description

Use PixelFormat to change a TBitmap's internal image to a particular memory format and color depth, or to find out what memory format and color depth a TBitmap is using.

For example, PixelFormat can be used to set the pixel format of the bitmap image to 8-bit for video drivers that cannot display the native format of a bitmap image.

Note: The PixelFormat of a JPEG image object applies to the bitmap if the JPEG image is copied to it.

Changing the pixel format is most commonly used with ScanLine, because your code must decode the pixel data accessed by ScanLine. Image-editing tools usually use one pixel for all internal image operations and copy the results to the screen (in whatever format) as the last step.


TBitmap.ScanLine
 VCL Reference

TBitmap.ScanLine

TBitmap	See also	Example

Provides indexed access to each line of pixels.

property ScanLine[Row: Integer]: Pointer;

Description

ScanLine is used only with DIBs (Device Independent Bitmaps) for image editing tools that do low-level pixel work.


TBitmap.TransparentColor
 VCL Reference

TBitmap.TransparentColor

TBitmap	See also	Example

Determines which color of the bitmap is to be transparent when the bitmap is drawn.

property TransparentColor: TColor;

Description

Use TransparentColor to determine how to draw the bitmap transparently. When the TransparentMode property is set to tmAuto (default), TransparentColor returns the color of the first pixel in the bitmap image data. For "bottom-up" bitmaps, the first pixel is the bottom leftmost pixel shown onscreen. For "top-down" bitmaps (less common), the first pixel is in the top left corner shown onscreen.

If TransparentColor is assigned, the TransparentMode is automatically set to tmFixed so that the new transparent color can be used later. If you want TransparentColor to disregard any assignments and return the bottom leftmost pixel color again, set TransparentMode to tmAuto.


TBitmap.TransparentMode
 VCL Reference

TBitmap.TransparentMode

TBitmap	See also	Example

Determines whether the TransparentColor property's value is automatically calculated or stored with the bitmap object.

type TTransparentMode = (tmAuto, tmFixed);

property Transparent: TTransparentMode;

Description

When TransparentMode is set to tmAuto (the default), the TransparentColor property returns the color of the bottom-leftmost pixel of the bitmap image.  When TransparentMode is set to tmFixed, the TransparentColor property refers to the color stored in the bitmap object.


TBitmap.Width
 VCL Reference

TBitmap.Width

TBitmap	See also

Specifies the width in pixels of the bitmap.

property Width: Integer;

Description

Use Width to find or set the width of the bitmap. Enlargements are filled with white. Shrinkage crops the image.


 VCL Reference

TBitmap events

TBitmap	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 VCL Reference

TBitmap events

TBitmap	By object	Legend

OnChange

OnProgress


 VCL Reference

TBitmap Methods

TBitmap	Alphabetically	Legend

In TBitmap

Assign

Create

Destroy

Dormant

FreeImage

HandleAllocated

LoadFromClipboardFormat

LoadFromResourceID

LoadFromResourceName

LoadFromStream

Mask

ReleaseHandle

ReleaseMaskHandle

ReleasePalette

SaveToClipboardFormat

SaveToStream

Derived from TGraphic

LoadFromFile

SaveToFile

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBitmap Methods

TBitmap	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Dormant

FieldAddress

Free

FreeImage

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

LoadFromResourceID

LoadFromResourceName

LoadFromStream

Mask

MethodAddress

MethodName

NewInstance

QueryInterface

ReleaseHandle

ReleaseMaskHandle

ReleasePalette

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TBitmap.Assign
 VCL Reference

TBitmap.Assign

TBitmap	See also	Example

Copies a new bitmap image to the bitmap object.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the bitmap image contained in Source to the bitmap object. Assign then calls the inherited Assign.. If the bitmap needs to be changed, the actual bitmap image is copied before the changes are made (copy on write).

Note:	An object of one type can always be assigned to another object of the same type. Also, the Source can be of type TPicture if the Graphic property of the picture is a bitmap.


TBitmap.Create
 VCL Reference

TBitmap.Create

TBitmap	See also 	Example

Instantiates a bitmap object.

constructor Create; override;

Description

Call Create to instantiate a bitmap object at runtime. Create is also called automatically when a bitmap image is loaded into a TImage.

Create allocates memory for a bitmap object, and calls the inherited Create. Then it creates a TBitmapImage as the internal image that represents the bitmap.


TBitmap.Destroy
 VCL Reference

TBitmap.Destroy

TBitmap	See also

Disposes of the instance of the bitmap object.

destructor Destroy; override;

Description

Destroy is the destructor for a TBitmap object.

Do not call the destructor directly in an application. Instead, call Free. Free verifies that the bitmap object is not nil before it calls Destroy.

Destroy releases the internal bitmap image (TBitmapImage object) and frees the canvas before calling the inherited destructor.


TBitmap.Dormant
 VCL Reference

TBitmap.Dormant

TBitmap	See also	Example

Creates a memory bitmap image in order to release the bitmap handle, forcing the image into DIB format to save resources.

procedure Dormant;

Description

Use Dormant to change the format of the bitmap in memory thereby reducing the amount of GDI resources used by the application.

Dormant creates a bitmap image in memory using a memory stream object. This preserves the image so that the bitmap can then free the HBITMAP (accessed through the Handle property) that was assigned to it.

DIB handles may use fewer Win95 GDI resources than DDB, but DIBs may also use more memory than DDBs, depending on the current video driver and mode.


TBitmap.FreeImage
 VCL Reference

TBitmap.FreeImage

TBitmap	Example

Frees the cached file image stored in memory by the bitmap.

procedure FreeImage;

Description

Use FreeImage to reduce the memory requirements of an application when color depth and pixel format are not an issue. Freeing the image releases the memory allocated for the bitmap image when it was originally loaded to disk. Consequently, some of the original pixel format of the bitmap is lost (for example, if you changed its format to a DIB) as well as the color depth of the bitmap.

When a bitmap is loaded into a bitmap object, Delphi creates an image of the loaded bitmap in memory. If the bitmap isn't changed, the memory image is used when saving the bitmap, to verify that the bitmap has not lost color depth or changed the pixel format.


TBitmap.LoadFromClipboardFormat
 VCL Reference

TBitmap.LoadFromClipboardFormat

TBitmap	See also 	Example

Loads a bitmap from the Clipboard into the bitmap object.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;

Description

LoadFromClipboardFormat is called if the bitmap is registered with the TPicture object using the RegisterClipboardFormat method.

LoadFromClipboardFormat replaces the current image with the data pointed to by the AData parameter. The palette for the bitmap is specified by the APalette parameter.


TBitmap.HandleAllocated
 VCL Reference

TBitmap.HandleAllocated

TBitmap	See also

Indicates whether the TBitmap object has acquired a handle to the underlying GDI object.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine whether the Handle property is set to an HBITMAP value. HandleAllocated indicates whether the underlying GDI object has already been created. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, it automatically creates a bitmap and returns its handle if the underlying GDI object does not already exist.


TBitmap.LoadFromResourceID
 VCL Reference

TBitmap.LoadFromResourceID

TBitmap	See also

Loads a bitmap from a resource into the bitmap object.

procedure LoadFromResourceID(Instance: THandle; ResID: Integer);

Description

Use LoadFromResourceID to load a specified bitmap resource along with palette information from a module's executable file.

Instance is the handle of the module that contains the resource.

ResID is the resource ID for the bitmap.


TBitmap.LoadFromResourceName
 VCL Reference

TBitmap.LoadFromResourceName

TBitmap	See also	Example

Loads a bitmap resource into the bitmap object.

procedure LoadFromResourceName(Instance: THandle; const ResName: string);

Description

LoadFromResourceName loads the specified bitmap resource along with palette information from a module's executable file.

Instance is the handle of the module that contains the resource.

ResName is the name of the resource to load.

Note:	Use this routine to load bitmaps from RES files instead of the LoadBitmap API. LoadBitmap does not support 256-color images.


TBitmap.LoadFromStream
 VCL Reference

TBitmap.LoadFromStream

TBitmap	See also

Loads the bitmap from a stream into the bitmap object.

procedure LoadFromStream(Stream: TStream); override;

Description

Use LoadFromStream to load the bitmap image from a stream. The Stream parameter specifies the stream from which to read the bitmap image. For example, use LoadFromStream to load a bitmap image from a TBlobStream object that reads from a graphic field in a dataset.


TBitmap.Mask
 VCL Reference

TBitmap.Mask

TBitmap 	See also

Converts the current bitmap image into a monochrome mask, replacing TransparentColor with white and every other color with black.

procedure Mask(TransparentColor: TColor);

Description

Use Mask to produce a monochrome mask bitmap based on a given transparent color. Mask produces the same image that MaskHandle does, except that the resulting mask image replaces the image in the TBitmap object, so it only makes sense to call Mask once. Use MaskHandle when only a bitmap handle of the mask image is needed.


TBitmap.ReleaseHandle
 VCL Reference

TBitmap.ReleaseHandle

TBitmap 	See also	Example

Returns the handle to the bitmap so that the TBitmap object no longer knows about the handle.

function ReleaseHandle: HBitmap;

Description

Use ReleaseHandle to disassociate the bitmap from the bitmap handle. Use it when you need to give a bitmap handle to a routine or object that will assume ownership (or destroy) the bitmap handle.


TBitmap.ReleaseMaskHandle
 VCL Reference

TBitmap.ReleaseMaskHandle

TBitmap 	See also

Returns the handle to the bitmap's mask so that the TBitmap object no longer knows about the mask handle.

function ReleaseMaskHandle: HBitmap;

Description

Use ReleaseMaskHandle to disassociate the bitmap object from the bitmap mask handle.


TBitmap.ReleasePalette
 VCL Reference

TBitmap.ReleasePalette

TBitmap

Returns the handle to the bitmap's palette and disassociates the palette from the TBitmap object.

function ReleasePalette: HPalette;

Description

Use ReleasePalette to disassociate the palette from the bitmap image.


TBitmap.SaveToClipboardFormat
 VCL Reference

TBitmap.SaveToClipboardFormat

TBitmap	See also	Example

Creates a local copy of the bitmap in Clipboard format.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); override;

Description

Use SaveToClipboardFormat to copy the bitmap to a Clipboard format. The bitmap’s palette is returned in the APalette parameter, the format in the AFormat parameter, and a handle to the data in the AData parameter. Before the bitmap can be saved, an application must have registered the format with the TBitmap object using the RegisterClipboardFormat method.


TBitmap.SaveToStream
 VCL Reference

TBitmap.SaveToStream

TBitmap 	See also

Saves the bitmap to a stream.

procedure SaveToStream(Stream: TStream); override;

Description

Use SaveToStream to write the bitmap image to the stream specified by the Stream parameter. For example, specify a TBlobStream object as the Stream parameter to save the bitmap image to a graphic field in a dataset.


Hierarchy

TObject

TPersistent

TInterfacedPersistent

TGraphic

TBitmap


TButtonActionLink
 VCL Reference

TButtonActionLink

Hierarchy	Properties	Methods	Events

TButtonActionLink is an action link designed specifically for button control clients.

Unit

StdCtrls

Description

TButtonActionLink is designed to specifically link actions to button control clients. TButtonActionLink overrides methods to determine whether the action and client are linked, and to ensure that action events are appropriate for properties of button control clients.

TButtonActionLink inherits, from its ancestors, support for linking actions with the properties of components, generic controls, and windowed controls. TButtonActionLink adds support for linking the checked property to the appropriate property of a button control.


 VCL Reference

TButtonActionLink properties

TButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TButtonActionLink properties

TButtonActionLink	By object	Legend

Action


 VCL Reference

TButtonActionLink events

TButtonActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TButtonActionLink events

TButtonActionLink	By object	Legend

OnChange


 VCL Reference

TButtonActionLink methods

TButtonActionLink	Alphabetically	Legend

In TButtonActionLink

AssignClient

IsCheckedLinked

SetChecked

Derived from TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TButtonActionLink methods

TButtonActionLink	By object	Legend

AfterConstruction

AssignClient

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsCheckedLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetChecked

Update


TButtonActionLink.AssignClient
 VCL Reference

TButtonActionLink.AssignClient

TButtonActionLink	See also

Assigns a client button that is linked to the associated action.

procedure AssignClient(AClient: TObject); override;

Description

TButtonActionLink overrides AssignClient to ensure that the client for the action is a button control.


TButtonActionLink.IsCheckedLinked
 VCL Reference

TButtonActionLink.IsCheckedLinked

TButtonActionLink	See also

Indicates whether the checked state for the action and the client are linked.

function IsCheckedLinked: Boolean; override;

Description

IsCheckedLinked indicates whether the Checked property is linked to the appropriate client property. IsCheckedLinked returns True if the client requests that the action control this property, False otherwise.


TButtonActionLink.SetChecked
 VCL Reference

TButtonActionLink.SetChecked

TButtonActionLink	See also

Sets the checked state of a button control if the client is linked to the action for this property.

procedure SetChecked(Value: Boolean); override;

Description

SetChecked sets the checked state of a button control, and is called only if the client is linked for this property. Value specifies whether the checked state should be set.


Hierarchy

TObject

TBasicActionLink

TActionLink

TControlActionLink

TWinControlActionLink

TButtonActionLink


TBucketList
 VCL Reference

TBucketList

Hierarchy	Properties	Methods	See also

TBucketList is a simple hash table that stores pointers indexed by pointers.

Unit

Contnrs

Description

Use TBucketList as a simple hash table to store data pointers using identifiers that can be represented as pointers. TBucketList includes methods to add, remove, and locate items in the list, as well as a method that executes a callback for every item in the list.


 VCL Reference

TBucketList properties

TBucketList	Alphabetically	Legend

Derived from TCustomBucketList

Data


 VCL Reference

TBucketList properties

TBucketList	By object	Legend

Data


 VCL Reference

TBucketList methods

TBucketList	Alphabetically	Legend

In TBucketList

BucketFor

Create

Derived from TCustomBucketList

Add

Assign

Clear

Destroy

Exists

Find

ForEach

Remove

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TBucketList methods

TBucketList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BucketFor

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

Exists

FieldAddress

Find

ForEach

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException


TBucketList.Create
 VCL Reference

TBucketList.Create

TBucketList

Creates and initializes a TBucketList object.

type TBucketListSizes = (bl2, bl4, bl8, bl16, bl32, bl64, bl128, bl256);

constructor Create(ABuckets: TBucketListSizes = bl16);

Description

Call Create to create a bucket list at runtime.

ABuckets indicates the number of buckets to include in the bucket list. The following table lists the possible values:

Value	Number of buckets

bl2	2

bl4	4

bl8	8

bl16	16

bl32	32

bl64	64

bl128	128

bl256	256


TBucketList.BucketFor
 VCL Reference

TBucketList.BucketFor

TBucketList	See also

Returns the index of the bucket in which a specified item belongs.

function BucketFor(AItem: Pointer): Integer; override;

Description

TBucketList uses BucketFor internally to determine the bucket into which an arbitrary item belongs.

AItem is the identifier of the item for which you want to find a bucket.

BucketFor returns the index of the bucket in the Buckets property array.


Hierarchy

TObject

TBucketList


TButton
 VCL Reference

 TButton

Hierarchy	Properties	Methods	Events	Using TButton	See also

TButton is a push button control.

Unit

StdCtrls

Description

Use TButton to put a standard push button on a form. TButton introduces several properties to control its behavior in a dialog box setting. Users choose button controls to initiate actions.

To use a button that displays a bitmap instead of a label, use TBitBtn. To use a button that can remain in a depressed position, use TSpeedButton.

Note:	Since the TButton caption is always centered, changing the BiDi alignment has no effect.


 VCL Reference

TButton properties

TButton	Alphabetically	Legend

In TButton

Cancel

Default

ModalResult

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TButton Properties

TButton	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Cancel

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Default

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

ModalResult

Name

Owner

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TButton.Cancel
 VCL Reference

TButton.Cancel

TButton	See also

Determines whether the button’s OnClick event handler executes when the Escape key is pressed.

property Cancel: Boolean;

Description

If Cancel is True, the button’s OnClick event handler executes when the user presses Esc. Although an application can have more than one Cancel button, the form calls the OnClick event handler only for the first visible button in the tab order.


TButton.Default
 VCL Reference

TButton.Default

TButton	See also

Determines whether the button’s OnClick event handler executes when the Enter key is pressed.

property Default: Boolean;

Description

If Default is True, the button’s OnClick event handler executes when the user presses Enter.

Although an application can have more than one Default button, the form calls the OnClick event handler only for the first visible button in the tab order. Moreover, any button that has focus becomes the Default button temporarily; hence, if the user selects another button before pressing Enter, the selected button’s OnClick event handler executes instead.


TButton.ModalResult
 VCL Reference

TButton.ModalResult

TButton

Determines whether and how the button closes its (modal) parent form.

property ModalResult: TModalResult;

Description

Setting the TButton component’s ModalResult property is an easy way to make clicking the button close a modal form. When a button is clicked, the ModalResult property of its parent form is set to the same value as the button’s ModalResult property.

For example, if a dialog box has OK and Cancel buttons, their ModalResult properties could be set at design time to mrOk and mrCancel, respectively. At runtime, clicking the OK button then changes the dialog’s ModalResult property to mrOk, and clicking the Cancel button changes the dialog’s ModalResult property to mrCancel. Unless further processing is required, no OnClick event handlers are required for the buttons.


 VCL Reference

TButton events

TButton	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TButton Events

TButton	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TButton Methods

TButton	Alphabetically	Legend

In TButton

Click

Create

UseRightToLeftAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TButton Methods

TButton	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TButton.Click
 VCL Reference

TButton.Click

TButton	See also

Simulates a mouse click, as if the user had clicked the button.

procedure Click; override;

Description

Calling Click assigns the value of the button’s ModalResult property to the ModalResult property of its parent form, and then generates an OnClick event.


TButton.Create
 VCL Reference

TButton.Create

TButton	See also

Creates and initializes a TButton instance.

constructor Create(AOwner: TComponent); override;

Description

Use Create to programmatically instantiate a button. Buttons added in the form designer are created automatically.

Create

Calls the inherited Create method.

Sets the ControlStyle of the button to include the values csSetCaption, csOpaque, csDoubleClicks.

Sets Width to 75 pixels, and Height to 25 pixels.

Sets the TabStop property to True.


TButton.UseRightToLeftAlignment
 VCL Reference

TButton.UseRightToLeftAlignment

TButton	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean; override;

Description

For TButton, UseRightToLeftAlignment always returnsFalse. This is because the alignment of a button should never be reversed automatically when running in Middle Eastern locales.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TButton


TCanvas
 VCL Reference

TCanvas

Hierarchy	Properties	Methods	Events	Using TCanvas	See also

TCanvas provides an abstract drawing space for objects that must render their own images.

Unit

Graphics

Description

Use TCanvas as a drawing surface for objects that draw an image of themselves. Standard window controls such as edit controls or list boxes do not require a canvas, as they are drawn by the system.

TCanvas provides properties, events and methods that assist in creating an image by

Specifying the type of brush, pen and font to use.

Drawing and filling a variety of shapes and lines.

Writing text.

Rendering graphic images.

Enabling a response to changes in the current image.

TCanvas has two descendants, TControlCanvas and TMetafileCanvas, which assist in drawing images of controls and in creating metafile images for objects.


 VCL Reference

TCanvas properties

TCanvas	Alphabetically	Legend

In TCanvas

Brush

CanvasOrientation

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


 VCL Reference

TCanvas properties

TCanvas	By object	Legend

Brush

CanvasOrientation

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


TCanvas.Brush
 VCL Reference

TCanvas.Brush

TCanvas	See also	Example

Determines the color and pattern for filling graphical shapes and backgrounds.

property Brush: TBrush;

Description

Set the Brush property to specify the color and pattern to use when drawing the background or filling in graphical shapes. The value of Brush is a TBrush object. Set the properties of the TBrush object to specify the color and pattern or bitmap to use when filling in spaces on the canvas.

Note:	Setting the Brush property assigns the specified TBrush object, rather than replacing the current TBrush object.


TCanvas.CanvasOrientation
 VCL Reference

TCanvas.CanvasOrientation

TCanvas	See also

Determines the orientation of the canvas as left-to-right or right-to-left.

TCanvasOrientation = (coLeftToRight, coRightToLeft);

property CanvasOrientation: TCanvasOrientation;

Description

CanvasOrientation is a read-only property used for bi-directional support. It indicates whether the orientation of the canvas is left-to-right (coLeftToRight) or right-to-left (coRightToLeft). The default is coLeftToRight, meaning that the 0,0 coordinate is at the top left corner of the canvas. In Middle-eastern locales the orientation may be coRightToLeft, meaning that the 0,0 coordinate is at the top right corner of the canvas. This property is important for grid controls because it changes the grid’s canvas orientation during drawing.


TCanvas.ClipRect
 VCL Reference

TCanvas.ClipRect

TCanvas	See also	Example

Specifies the boundaries of the clipping rectangle.

property ClipRect: TRect;

Description

Use ClipRect to determine where the canvas needs painting. ClipRect limits the drawing region of the canvas so that any drawing that occurs at coordinates outside the ClipRect is clipped and doesn’t appear in the image.

When handling a form’s OnPaint event, the canvas' ClipRect property is set to the rectangle that needs to be painted. Portions of the image that do not overlap the ClipRect do not need to be drawn. Thus, OnPaint routines can use the value of ClipRect to optimize painting, speeding the overall performance of the application.


TCanvas.CopyMode
 VCL Reference

TCanvas.CopyMode

TCanvas	See also	Example

Specifies how a graphical image is copied onto the canvas.

type TCopyMode = Longint;

property CopyMode: TCopyMode default cmSrcCopy;

Description

Set CopyMode to affect the way graphical images are drawn onto the canvas. The CopyMode is used when copying an image from another canvas using the CopyRect method. CopyMode is also used by TBitmap objects when they draw themselves to a canvas.

Use CopyMode to achieve a variety of affects when rendering an image. Achieve special effects like merged images and making parts of a bitmap transparent by combining multiple images with different CopyModes.

The following table shows the possible values of CopyMode. (These are constants defined in the Windows unit.)

Value	Meaning

cmBlackness	Fills the destination rectangle on the canvas with black.

cmDstInvert	Inverts the image on the canvas and ignores the source.

cmMergeCopy	Combines the image on the canvas and the source bitmap by using the Boolean AND operator.

cmMergePaint	Combines the inverted source bitmap with the image on the canvas by using the Boolean OR operator.

cmNotSrcCopy	Copies the inverted source bitmap to the canvas.

cmNotSrcErase	Combines the image on the canvas and the source bitmap by using the Boolean OR operator, and inverts the result.

cmPatCopy	Copies the source pattern to the canvas.

cmPatInvert	Combines the source pattern with the image on the canvas using the Boolean XOR operator

cmPatPaint	Combines the inverted source bitmap with the source pattern by using the Boolean OR operator. Combines the result of this operation with the image on the canvas by using the Boolean OR operator.

cmSrcAnd	Combines the image on the canvas and source bitmap by using the Boolean AND operator.

cmSrcCopy	Copies the source bitmap to the canvas.

cmSrcErase	Inverts the image on the canvas and combines the result with the source bitmap by using the Boolean AND operator.

cmSrcInvert	Combines the image on the canvas and the source bitmap by using the Boolean XOR operator.

cmSrcPaint	Combines the image on the canvas and the source bitmap by using the Boolean OR operator.

cmWhiteness	Fills the destination rectangle on the canvas with white.


TCanvas.Font
 VCL Reference

TCanvas.Font

TCanvas	See also

Specifies the font to use when writing text on the image.

property Font: TFont;

Description

Set Font to specify the font to use for writing text on the image. The value of Font is a TFont object. Set the properties of the TFont object to specify the font face, color, size, style, and any other aspects of the font.

Note:	Setting the Font property assigns the specified TFont object, rather than replacing the current TFont object.


TCanvas.Handle
 VCL Reference

TCanvas.Handle

TCanvas	See also	Example

Specifies the handle for this canvas.

property Handle: HDC;

Description

The Handle property specifies the Windows GDI handle to the device context for this canvas.

Set Handle to the HDC for the device context the canvas must draw into. When a windowed control responds to a Windows paint message, the HDC for drawing is passed in to the PaintWindow method. In other cases, an HDC can be obtained for a window by calling the GetDeviceContext method of a control. Additionally, Windows provides API calls to obtain an HDC for a printer or for a memory image.

Read the Handle property to supplement the drawing services provided by the TCanvas object with API calls that require a handle to a device context. Most of the Windows GDI calls require an HDC.

TCanvas does not own the HDC. Applications must create an HDC and set the Handle property. Applications must release the HDC when the canvas no longer needs it. Setting the Handle property of a canvas that already has a valid HDC will not automatically release the initial HDC.

Note:	Some descendants of TCanvas, such as TControlCanvas, do own the HDC. Do not set the Handle property for these objects. They fetch and free their own Handle.


TCanvas.LockCount
 VCL Reference

TCanvas.LockCount

TCanvas	See also

Indicates the number of times the canvas has been locked to prevent interference from other threads.

property LockCount: Integer;

Description

Read LockCount to determine whether the canvas is locked. Whenever the Lock method is called to block other threads from interfering with the canvas, LockCount increases. Whenever the Unlock method is called at the end of a critical section, LockCount decreases. When LockCount is 0, other threads may draw on the canvas.


TCanvas.Pen
 VCL Reference

TCanvas.Pen

TCanvas	See also 	Example

Specifies the kind of pen the canvas uses for drawing lines and outlining shapes.

property Pen: TPen;

Description

Set Pen to specify the pen to use for drawing lines and outlining shapes in the image. The value of Pen is a TPen object. Set the properties of the TPen object to specify the color, style, width, and mode of the pen.

Note:	Setting the Pen property assigns the specified TPen object, rather than replacing the current TPen object.


TCanvas.PenPos
 VCL Reference

TCanvas.PenPos

TCanvas	See also

Specifies the current drawing position of the Pen.

property PenPos: TPoint;

Description

Read PenPos to learn the current drawing position of the Pen. This is the starting point of a line drawn by the LineTo method. Setting the PenPos property is equivalent to calling the MoveTo method.


TCanvas.Pixels
 VCL Reference

TCanvas.Pixels

TCanvas	See also 	Example

Specifies the color of the pixels within the current ClipRect.

property Pixels[X, Y: Integer]: TColor;

Description

Read Pixels to learn the color on the drawing surface at a specific pixel position within the current clipping region. If the position is outside the clipping rectangle, reading the value of Pixels returns -1.

Write Pixels to change the color of individual pixels on the drawing surface. Use Pixels for detailed effects on an image. Pixels may also be used to determine the color that should be used for the FillRect method.

Not every device context supports the Pixels property. Reading the Pixels property for such a device context will return a value of -1. Setting the Pixels property for such a device context does nothing.


TCanvas.TextFlags
 VCL Reference

TCanvas.TextFlags

TCanvas	See also

Specifies how text is written to the canvas.

property TextFlags: LongInt;

Description

Use TextFlags to influence the way text is drawn when calling the TextOut or TextRect method. TextFlags is an integer made by combining any of the following constants:

Constant	Meaning
ETO_CLIPPED	Only the text that fits within a specified rectangle is displayed. This flag is automatically added when calling the TextRect method. When writing text using TextOut method, this flag has no effect because the drawing boundaries are determined by the TextExtent property.
ETO_OPAQUE	The text is drawn with an opaque background color. Using this flag improves performance but does not allow images behind the text rectangle to show.
ETO_RTLREADING	Text strings are displayed from right to left. This is available only with Mideast versions of Windows, where text is written from right to left. Often this is used in combination with a CanvasOrientation of coRightToLeft.
ETO_GLYPH_INDEX	The text is an array of character placement codes that are parsed directly by the Windows GDI. Glyph indexing only applies to TrueType fonts, but the flag can be used with other fonts to indicate that the GDI should process the text string directly without language processing. See the Windows GDI documentation for more details.
ETO_IGNORELANGUAGE	This is an undocumented Microsoft flag. Check updates of Microsoft documentation for when information is provided.
ETO_NUMERICSLOCAL	All numbers in the text are displayed using digits specific to the current locale.
ETO_NUMERICSLATIN	All numbers in the text are displayed using European digits.
ETO_PDY	This flag is only relevant when using the Windows API ExtTextOut. When this is set, the array pointed to by lpDx contains pairs of values. The first value of each pair is, as usual, the distance between origins of adjacent character cells, but the second value is the displacement along the vertical direction of the font.


 VCL Reference

TCanvas events

TCanvas	Alphabetically	Legend

In TCanvas

OnChange

OnChanging


 VCL Reference

TCanvas events

TCanvas	By object	Legend

OnChange

OnChanging


TCanvas.OnChange
 VCL Reference

TCanvas.OnChange

TCanvas	See also

Occurs when the image has just changed.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action whenever the image on the canvas changes. When an application calls one of the drawing methods of TCanvas, the following steps occur.

1	An OnChanging event occurs.

2	The TCanvas method makes a change to the image.

3	An OnChange event occurs.

OnChange events occur on changes to the image, not changes to the properties of the canvas. Applications can respond to changes in the Font, Brush, and Pen properties by assigning OnChange event handlers to the corresponding TFont, TBrush, and TPen objects. However, TCanvas assigns its own OnChange event handlers for those objects. Before assigning an OnChange event handler to one of these objects, read the existing event handler. Use that value to call the TCanvas event handler from the new event handler.


TCanvas.OnChanging
 VCL Reference

TCanvas.OnChanging

TCanvas	See also

Occurs just before a change is made to the image.

property OnChanging: TNotifyEvent;

Description

Write an OnChanging event handler to take specific action before the image on the canvas changes. When an application calls one of the drawing methods of TCanvas, the following steps occur.

1	An OnChanging event occurs.

2	The TCanvas method makes a change to the image.

3	An OnChange event occurs.


 VCL Reference

TCanvas methods

TCanvas	Alphabetically	Legend

In TCanvas

Arc

BrushCopy

Chord

CopyRect

Create

Destroy

Draw

DrawFocusRect

Ellipse

FillRect

FloodFill

FrameRect

HandleAllocated

LineTo

Lock

MoveTo

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCanvas methods

TCanvas	By object	Legend

AfterConstruction

Arc

Assign

BeforeDestruction

BrushCopy

Chord

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyRect

Create

DefaultHandler

Destroy

Dispatch

Draw

DrawFocusRect

Ellipse

FieldAddress

FillRect

FloodFill

FrameRect

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LineTo

Lock

MethodAddress

MethodName

MoveTo

NewInstance

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

SafeCallException

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock


TCanvas.Arc
 VCL Reference

TCanvas.Arc

TCanvas	See also 	Example

Draws an arc on the image along the perimeter of the ellipse bounded by the specified rectangle.

procedure Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);

Description

Use Arc to draw an elliptically curved line with the current Pen. The arc traverses the perimeter of an ellipse that is bounded by the points (X1,Y1) and (X2,Y2). The arc is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X3,Y3). The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and (X4, Y4).

Note:	On Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.

On NT, the drawing direction can be changed to clockwise using the Windows API call SetArcDirection.


TCanvas.BrushCopy
 VCL Reference

TCanvas.BrushCopy

TCanvas	See also 	Example

Copies a portion of a bitmap onto a rectangle on the canvas, replacing one of the colors of the bitmap with the brush of the canvas.

procedure BrushCopy(const Dest: TRect; Bitmap: TBitmap; const Source: TRect; Color: TColor);

Description

Use BrushCopy to achieve special effects such as making the copied image partially transparent. BrushCopy is provided mainly for backward compatibility. Use a TImageList instead of BrushCopy.

Dest specifies the rectangular portion of the canvas that will receive the copy of the bitmap. Bitmap specifies the graphic to copy from. Source specifies the rectangular area of Bitmap to copy. Color specifies the color in Bitmap to replace with the Brush of the canvas.

To use BrushCopy to make the copied image partially transparent, specify the color of the surface of the canvas (clBackground for example) as the Color of the Brush property, then call BrushCopy.


TCanvas.Chord
 VCL Reference

TCanvas.Chord

TCanvas	See alsoExample

Draws a closed figure represented by the intersection of a line and an ellipse.

procedure Chord(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);

Description

Use Chord to create a shape that is defined by an arc and a line that joins the endpoints of the arc. The chord consists of a portion of an ellipse that is bounded by the points (X1,Y1) and (X2,Y2). The ellipse is bisected by a line that runs between the points (X3,Y3) and (X4,Y4).

The perimeter of the chord runs counter clockwise from (X3, Y3), counterclockwise along the ellipse to (X4,Y4), and straight back to (X3,Y3). If (X3,Y3) and (X4,Y4) are not on the surface of the ellipse, the corresponding corners on the chord are the closest points on the perimeter that intersect the line. The outline of the chord is drawn using the value of Pen, and the shape is filled using the value of Brush.

Note:	On Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.

On NT, the drawing direction can be changed to clockwise using the Windows API call SetArcDirection.


TCanvas.CopyRect
 VCL Reference

TCanvas.CopyRect

TCanvas	See also	Example

Copies part of an image from another canvas into the canvas.

procedure CopyRect(const Dest: TRect; Canvas: TCanvas; const Source: TRect);

Description

Use CopyRect to transfer part of the image on another canvas to the image of the TCanvas object. Dest specifies the rectangle on the canvas where the source image will be copied. The Canvas parameter specifies the canvas with the source image. Source specifies a rectangle bounding the portion of the source canvas that will be copied.

The portion of the source canvas is copied using the mode specified by CopyMode.


TCanvas.Create
 VCL Reference

 TCanvas.Create

TCanvas	See also	Example

Creates an instance of TCanvas.

constructor Create;

Description

Call Create to instantiate a TCanvas object at runtime. Create allocates memory for the instance of TCanvas and creates the TFont, TBrush and TPen objects for the Font, Brush, and Pen properties. Create also initializes the CopyMode to cmSrcCopy.


TCanvas.Destroy
 VCL Reference

 TCanvas.Destroy

TCanvas	See also

Destroys an instance of TCanvas.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCanvas object is not nil and only then calls Destroy.

Destroy frees the TBrush, TFont, and TPen objects that were created for the Brush, Font, and Pen properties. Destroy then frees the memory for the TCanvas object.


TCanvas.Draw
 VCL Reference

TCanvas.Draw

TCanvas 	See also 	Example

Renders the graphic specified by the Graphic parameter on the canvas at the location given by the coordinates (X, Y).

procedure Draw(X, Y: Integer; Graphic: TGraphic);

Description

Call Draw to draw a graphic on the canvas. Draw calls the Draw method of the graphic. The image is rendered into a rectangle determined by the size of the graphic, with the upper left corner at the point (X, Y).

Graphics can be bitmaps, icons, or metafiles. If the graphic is a TBitmap object, the bitmap is rendered using the value of CopyMode.


TCanvas.DrawFocusRect
 VCL Reference

TCanvas.DrawFocusRect

TCanvas	See also 	Example

Draws a rectangle in the style used to indicate that the object inside the rectangle has focus.

procedure DrawFocusRect(const Rect: TRect);

Description

Call DrawFocusRect for the perimeter of the image of a control when the control gets or loses input focus. Because DrawFocusRect uses an XOR function, calling it a second time while specifying the same rectangle removes the rectangle from the screen.

The rectangle this function draws cannot be scrolled. To scroll an area containing a rectangle drawn by DrawFocusRect, call DrawFocusRect to remove the rectangle from the screen, scroll the area, and then call DrawFocusRect to draw the rectangle in the new position.


TCanvas.Ellipse
 VCL Reference

TCanvas.Ellipse

TCanvas	See also 	Example

Draws the ellipse defined by a bounding rectangle on the canvas.

procedure Ellipse(X1, Y1, X2, Y2: Integer); overload;

procedure Ellipse(const Rect: TRect); overload;

Description

Call Ellipse to draw a circle or ellipse on the canvas. Specify the bounding rectangle either by giving

The top left point at pixel coordinates (X1, Y1) and the bottom right point at (X2, Y2).

A TRect value.

If the bounding rectangle is a square, a circle is drawn.

The ellipse is outlined using the value of Pen, and filled using the value of Brush.

Note:	On Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.


TCanvas.FillRect
 VCL Reference

TCanvas.FillRect

TCanvas	See also 	Example

Fills the specified rectangle on the canvas using the current brush.

procedure FillRect(const Rect: TRect);

Description

Use FillRect to fill a rectangular region using the current brush. The region is filled including the top and left sides of the rectangle, but excluding the bottom and right edges.


TCanvas.FloodFill
 VCL Reference

TCanvas.FloodFill

TCanvas	See also	Example

Fills an area of the canvas using the current brush.

type TFillStyle = (fsSurface, fsBorder);

procedure FloodFill(X, Y: Integer; Color: TColor; FillStyle: TFillStyle);

Description

Use FloodFill to fill a possibly non-rectangular region of the image with the value of Brush. The boundaries of the region to be filled are determined by moving outward from the point (X,Y) until a color boundary involving the Color parameter is encountered.

FillStyle determines what type of color changes define the boundaries, as indicated in the following table.

Value	Meaning

fsSurface	Fill all area that has the color indicated by the Color parameter. Stop when another color is encountered.

fsBorder	Fill all area that does not have the color indicated by the Color parameter. Stop when Color is encountered.

Use the Pixels property to get the exact value of the color at the point (X,Y) when using a FillStyle of fsSurface. Similarly, when FillStyle is fsBorder, use Pixels to get the exact value of the boundary color if a point on the boundary is known.


TCanvas.FrameRect
 VCL Reference

TCanvas.FrameRect

TCanvas	See also 	Example

Draws a rectangle using the Brush of the canvas to draw the border.

procedure FrameRect(const Rect: TRect);

Description

Use FrameRect to draw a 1 pixel wide border around a rectangular region. FrameRect does not fill the interior of the rectangle with the Brush pattern.

To draw a boundary using the Pen instead, use the Polygon method.


TCanvas.HandleAllocated
 VCL Reference

TCanvas.HandleAllocated

TCanvas	See also

Indicates whether the TCanvas object has acquired a handle to a device context.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine whether the Handle property is set to an HDC value. HandleAllocated indicates whether the canvas has acquired a device context. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, TCanvas automatically allocates a new device context and returns its handle if the property had not been previously set.


TCanvas.LineTo
 VCL Reference

TCanvas.LineTo

TCanvas	See also 	Example

Draws a line on the canvas from PenPos to the point specified by X and Y, and sets the pen position to (X, Y).

procedure LineTo(X, Y: Integer);

Description

Use LineTo to draw a line from PenPos up to, but not including the point (X,Y). LineTo changes the value of PenPos to (X,Y).

The line is drawn using Pen.

Note:	If the current Pen does not have a style of psSolid, the line is drawn with a background specified by the current brush.


TCanvas.Lock
 VCL Reference

TCanvas.Lock

TCanvas	See also

Prevents other threads from drawing on the canvas.

procedure Lock;

Description

Call Lock in a multithreaded application to prevent other threads from drawing on the canvas. Lock prevents other cooperating threads in the application from executing until the Unlock method is called. Nested calls to Lock increment the LockCount property so that the canvas is not unlocked until the last lock is released.

In multi-threaded applications that use Lock to protect a canvas, all calls that use the canvas must be protected by a call to Lock.  Any thread that does not lock the canvas before using it will introduce potential bugs.

Because Lock prevents other threads from executing, it can adversely affect performance. Do not call Lock unless there is a danger that another thread might interfere with drawing on the canvas.


TCanvas.MoveTo
 VCL Reference

TCanvas.MoveTo

TCanvas	See also 	Example

Changes the current drawing position to the point (X,Y).

procedure MoveTo(X, Y: Integer);

Description

Use MoveTo to set the value of PenPos before calling LineTo. Calling MoveTo is equivalent to setting the PenPos property.


TCanvas.Pie
 VCL Reference

TCanvas.Pie

TCanvas	See also

Draws a pie-shaped the section of the ellipse bounded by the rectangle (X1, Y1) and (X2, Y2) on the canvas.

procedure Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer);

Description

Use Pie to draw a pie-shaped wedge on the image. The wedge is defined by the ellipse bounded by the rectangle determined by the points (X1, Y1) and X2, Y2). The section drawn is determined by two lines radiating from the center of the ellipse through the points (X3, Y3) and (X4, Y4).

The wedge is outlined using Pen, and filled using Brush.

Note:	On Windows 95, the sums X1 + X2 and Y1 + Y2 cannot exceed 32768. Also, the sum X1 + X2 + Y1 + Y2 cannot exceed 32768.


TCanvas.PolyBezier
 VCL Reference

TCanvas.PolyBezier

TCanvas	See also

Draws a set of Bézier curves.

procedure PolyBezier(const Points: array ofTPoint);

Description

Use PolyBezier to draw cubic Bézier curves using the endpoints and control points specified by the Points parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point.

The Points parameter gives the endpoints to use when generating the Bézier curves.

This procedure draws lines by using the current pen.

Tip:	Use the Slice function to pass a portion of an array of points to the PolyBezier method. For example, to form a Bézier curve using the first ten points from an array of 100 points, use the Slice function as follows:

Canvas.PolyBezier(Slice(PointArray, 10));

Control points after a[Index+3] are ignored. Nothing happens if there aren't enough control points.


TCanvas.PolyBezierTo
 VCL Reference

TCanvas.PolyBezierTo

TCanvas	See also

Draws a set of Bézier curves and updates the value of PenPos.

procedure PolyBezierTo(const Points: array ofTPoint);

Description

Use PolyBezierTo to draw cubic Bézier curves using the endpoints and control points specified by the Points parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point.

The Points parameter gives the endpoints to use when generating the Bézier curves.

This procedure draws lines by using the current pen and updates the value of PenPos to the value of the last endpoint.

Tip:	Use the Slice function to pass a portion of an array of points to the PolyBezierTo method. For example, to form a Bézier curve using the first ten points from an array of 100 points, use the Slice function as follows:

Canvas.PolyBezierTo(Slice(PointArray, 10));


TCanvas.Polygon
 VCL Reference

TCanvas.Polygon

TCanvas	See also 	Example

Draws a series of lines on the canvas connecting the points passed in and closing the shape by drawing a line from the last point to the first point.

procedure Polygon(Points: array ofTPoint);

Description

Use Polygon to draw a closed, many-sided shape on the canvas, using the value of Pen. After drawing the complete shape, Polygon fills the shape using the value of Brush.

The Points parameter is an array of points that give the vertices of the polygon.

The first point is always connected to the last point.

Tip:	Use the Slice function to pass a portion of an array of points to the Polygon method. For example, to form a polygon from the first ten points from an array of 100 points, use the Slice function as follows:

Canvas.Polygon(Slice(PointArray, 10));

To draw a polygon on the canvas, without filling it, use the Polyline method, specifying the first point a second time at the end.


TCanvas.Polyline
 VCL Reference

TCanvas.Polyline

TCanvas	See also 	Example

Draws a series of lines on the canvas with the current pen, connecting each of the points passed to it in Points.

procedure Polyline(Points: array ofTPoint);

Description

Use Polyline to connect a set of points on the canvas. If you specify only two points, Polyline draws a single line.

The Points parameter is an array of points to be connected.

Tip:	Use the Slice function to pass a portion of an array of points to the Polygon method. For example, to form a polygon from the first ten points from an array of 100 points, use the Slice function as follows:

Canvas.Polyline(Slice(PointArray, 10));

Calling the MoveTo function with the value of the first point, and then repeatedly calling LineTo with all subsequent points will draw the same image on the canvas. However, unlike LineTo, Polyline does not change the value of PenPos.


TCanvas.Rectangle
 VCL Reference

TCanvas.Rectangle

TCanvas	See also 	Example

Draws a rectangle on the canvas.

procedure Rectangle(X1, Y1, X2, Y2: Integer); overload;

procedure Rectangle(const Rect: TRect); overload;

Description

Use Rectangle to draw a rectangle using Pen and fill it with Brush. Specify the rectangle’s coordinates in one of two ways:

Giving four coordinates that define the upper left corner at the point (X1, Y1) and the lower right corner at the point (X2, Y2).

Using a TRect type.

To fill a rectangular region without drawing the boundary in the current pen, use FillRect. To outline a rectangular region without filling it, use FrameRect or Polygon. To draw a rectangle with rounded corners, use RoundRect.


TCanvas.Refresh
 VCL Reference

TCanvas.Refresh

TCanvas	See also

Deselects the Pen, Brush, and Font from the device context.

procedure Refresh;

Description

Call Refresh to return the HDC used by the canvas to a default state. Refresh does not change the values of the Font, Brush, or Pen properties. Calling any of the drawing methods of the canvas after calling Refresh will reselect the Font, Brush, or Pen into the HDC if it is used by the drawing method.


TCanvas.RoundRect
 VCL Reference

TCanvas.RoundRect

TCanvas	See also 	Example

Draws a rectangle with rounded corners on the canvas.

procedure RoundRect(X1, Y1, X2, Y2, X3, Y3: Integer);

Description

Use RoundRect to draw a rounded rectangle using Pen and fill it with Brush. The rectangle will have edges defined by the points (X1,Y1), (X2,Y1), (X2,Y2), (X1,Y2), but the corners will be shaved to create a rounded appearance. The curve of the rounded corners matches the curvature of an ellipse with width X3 and height Y3.

To draw an ellipse instead, use Ellipse. To draw a true rectangle, use Rectangle.


TCanvas.StretchDraw
 VCL Reference

TCanvas.StretchDraw

TCanvas	See also	Example

Draws the graphic specified by the Graphic parameter in the rectangle specified by the Rect parameter.

procedure StretchDraw(const Rect: TRect; Graphic: TGraphic);

Description

Call StretchDraw to draw a graphic on the canvas so that the image fits in the specified rectangle. StretchDraw calls the Draw method of the graphic. The graphic object determines how to fit into the rectangle. This may involve changing magnification and/or aspect ratio.

To render the graphic in its natural size, use the Draw method, instead.

If the graphic is a TBitmap object, the bitmap is rendered using the value of CopyMode.

Note:	If the graphic is an icon, it is not stretched.


TCanvas.TextExtent
 VCL Reference

TCanvas.TextExtent

TCanvas	See also

Returns the width and height, in pixels, of a string rendered in the current font.

type

  TSize = record

    cx: Longint;

    cy: Longint;

  end;

function TextExtent(const Text: string): TSize;

Description

Use TextExtent to determine the space a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the size of the text. TextExtent returns the width and height of the rectangle that bounds the text on the canvas.

To check only the height, call TextHeight. To check only the width, call TextWidth.


TCanvas.TextHeight
 VCL Reference

TCanvas.TextHeight

TCanvas	See also 	Example

Returns the height, in pixels, of a string rendered in the current font.

function TextHeight(const Text: string): Integer;

Description

Use TextHeight to determine the height a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the height of the text.

TextHeight returns the same value as TextExtent(Text).cy.


TCanvas.TextOut
 VCL Reference

TCanvas.TextOut

TCanvas	See also 	Example

Writes a string on the canvas, starting at the point (X,Y), and then updates the PenPos to the end of the string.

procedure TextOut(X, Y: Integer; const Text: string);

Description

Use TextOut to write a string onto the canvas. The string will be written using the current value of Font. Use the TextExtent method to determine the space occupied by the text in the image. To write only the text that fits within a clipping rectangle, use TextRect instead.


TCanvas.TextRect
 VCL Reference

TCanvas.TextRect

TCanvas	See also 	Example

Writes a string inside a clipping rectangle.

procedure TextRect(Rect: TRect; X, Y: Integer; const Text: string);

Description

Use TextRect to write a string within a limited rectangular region. Any portions of the string that fall outside the rectangle passed in the Rect parameter are clipped and don't appear. The upper left corner of the text is placed at the point (X, Y).


TCanvas.TextWidth
 VCL Reference

TCanvas.TextWidth

TCanvas	See also 	Example

Returns the width, in pixels, of a string rendered in the current font.

function TextWidth(const Text: string): Integer;

function TextWidth(const Text: WideString): Integer;

Description

Use TextWidth to determine the length a string will occupy in the image. TextWidth indicates whether a given string will fit in the available space. Other graphical elements in the image such as lines, or additional strings can be positioned to accommodate the width of the text.

TextWidth returns the same value as TextExtent(Text).cx.


TCanvas.TryLock
 VCL Reference

TCanvas.TryLock

TCanvas	See also

Locks the canvas if it is currently unlocked.

function TryLock: Boolean;

Description

Call TryLock to prevent other threads from writing on the surface of the canvas until the Unlock method is called. Unlike calls to the Lock method, which nest so that every call to Lock must be matched with a subsequent call to Unlock, TryLock need only be matched by a call to Unlock if the canvas was not already locked.

If the canvas is unlocked, TryLock locks the canvas, sets the LockCount property to 1, and returns True. If the canvas is already locked, TryLock returns False without making any changes.

Use TryLock before attempting changes to the canvas that could interfere with other code that is protected by a Lock ... Unlock pair of method calls.


TCanvas.Unlock
 VCL Reference

TCanvas.Unlock

TCanvas	See also

Decreases the LockCount property, allowing other threads to execute when LockCount reaches 0.

procedure Unlock;

Description

Call Unlock at the end of a critical section begun with a call to the Lock method. Every call to Lock must be matched by a call to Unlock.


Hierarchy

TObject

TPersistent

TCanvas


TCheckBox
 VCL Reference

 TCheckBox

Hierarchy	Properties	Methods	Events	Using TCheckBox	See also

TCheckBox represents a check box that can be on (checked) or off (unchecked)

Unit

StdCtrls

Description

A TCheckBox component presents an option for the user. The user can check the box to select the option, or uncheck it to deselect the option.


 VCL Reference

TCheckBox properties

TCheckBox	Alphabetically	Legend

Derived from TCustomCheckBox

Alignment

AllowGrayed

Checked

State

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCheckBox Properties

TCheckBox	By Object	Legend

Action

Align

AlignDisabled

Alignment

AllowGrayed

Anchors

BiDiMode

BoundsRect

Brush

Caption

Checked

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

State

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TCheckBox events

TCheckBox	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TCheckBox Events

TCheckBox	By Object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TCheckBox methods

TCheckBox	Alphabetically	Legend

Derived from TCustomCheckBox

Create

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCheckBox Methods

TCheckBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TCustomCheckBox

TCheckBox


TChangeLink
 VCL Reference

TChangeLink

Hierarchy	Properties	Methods	Events	See also

The TImageList component uses TChangeLink internally to notify other objects when changes are made to the image list.

Unit

ImgList

Description

A TImageList keeps a list of its TChangeLink objects. Each is associated with a particular component, such as a tree view or list view control. A component can register its change link with an image list by calling the image list’s RegisterChanges method. Before destruction, the component should then call the UnregisterChanges method.

Component writers can use the change link object to receive notification when changes are made to an image list that a control uses. Use the OnChange event of the change link to execute some code when the image list changes. For example, the tree view control uses a change link object to know when its image list has changed.


 VCL Reference

TChangeLink properties

TChangeLink	Alphabetically	Legend

In TChangeLink

Sender


 VCL Reference

TChangeLink properties

TChangeLink	By object	Legend

Sender


TChangeLink.Sender
 VCL Reference

TChangeLink.Sender

TChangeLink	See also

Specifies which image list component notifies the change link object of changes.

property Sender : TCustomImageList;

Description

Use Sender to access the image list that has changed. The TImageList automatically sets this property when a call to RegisterChanges is made.


 VCL Reference

TChangeLink events

TChangeLink	Alphabetically	Legend

In TChangeLink

OnChange


 VCL Reference

TChangeLink events

TChangeLink	By object	Legend

OnChange


TChangeLink.OnChange
 VCL Reference

TChangeLink.OnChange

TChangeLink	See also

Occurs when there's a change in any of the images stored in the associated image list.

property OnChange: TNotifyEvent;

Description

Use the OnChange event to notify a control when the image list that it’s using changes. Specify any special processing to occur at that time in the OnChange event handler.


 VCL Reference

TChangeLink methods

TChangeLink	Alphabetically	Legend

In TChangeLink

Change

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TChangeLink methods

TChangeLink	By object	Legend

AfterConstruction

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TChangeLink.Change
 VCL Reference

TChangeLink.Change

TChangeLink	See also

Generates an OnChange event.

procedure Change;

Description

Use the Change method to trigger the OnChange event handler of the change link object.


TChangeLink.Destroy
 VCL Reference

TChangeLink.Destroy

TChangeLink	See also

Destroys the change link object and releases the memory allocated to it.

destructor Destroy;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the change link is not nil before calling Destroy.

Before freeing the memory for the change link, Destroy first calls the image list’s UnRegisterChanges method to unregister itself from receiving notification when the image list changes.


Hierarchy

TObject

TChangeLink


TClassList
 VCL Reference

TClassList

Hierarchy	Properties	Methods	See also

TClassList maintains a list of classes.

Unit

Contnrs

Description

Use a TClassList object to store and maintain a list of classes.


 VCL Reference

TClassList properties

TClassList	Alphabetically	Legend

In TClassList

Items

Derived from TList

Capacity

Count

List


 VCL Reference

TClassList properties

TClassList	By object	Legend

Capacity

Count

Items

List


TClassList.Items
 VCL Reference

TClassList.Items

TClassList	See also

Lists the classes in the TClassList.

property Items[Index: Integer]: TClass;

Description

Use Items to access classes in the list. Items is a zero-based array: The first class is indexed as 0, the second class is indexed as 1, and so forth. You can read or change the value at a specific index, or use Items with the Count property to iterate through the list.

Items can contain empty class references. To remove empty references and reduce the size of the array, call the Pack method.


 VCL Reference

TClassList methods

TClassList	Alphabetically	Legend

In TClassList

Add

Extract

First

IndexOf

Insert

Last

Remove

Derived from TList

Assign

Clear

Delete

Destroy

Error

Exchange

Expand

Move

Pack

Sort

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TList methods

TClassList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Error

Exchange

Expand

Extract

FieldAddress

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

MethodAddress

MethodName

Move

NewInstance

Pack

Remove

SafeCallException

Sort


TClassList.Add
 VCL Reference

TClassList.Add

TClassListClass	See also

Inserts a new class at the end of the list.

function Add(aClass: TClass): Integer;

Description

Call Add to insert a new class at the end of the Items array. Add returns the index of the new class, where the first class in the list has an index of 0.

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity.


TClassList.Extract
 VCL Reference

TClassList.Extract

TClassListClass	See also

Removes a class from the list.

functionExtract(Item: TClass): TClass;

Description

Call Extract to remove a class from the list. After the class is removed, all the classes that follow it are moved up in index position and Count is decremented.

In TClassList, Extract does the same thing as the Delete method, except that it returns the class that was removed from the list.

To remove the reference to a class without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil.


TClassList.First
 VCL Reference

TClassList.First

TClassListClass	See also

Returns Items[0].

function First: TClass);

Description

Call First to retrieve the first class in the Items array.


TClassList.IndexOf
 VCL Reference

TClassList.IndexOf

TClassList	See also

Returns the index of the first occurrence in the list of a specified class.

function IndexOf(aClass: TClass): Integer;

Description

Call IndexOf to get the index for a class in the Items array. The first class in the array has index 0, the second class has index 1, and so on.

If a class is not in the list, IndexOf returns -1. If a class appears more than once in the list, IndexOf returns the index of the first appearance.


TClassList.Insert
 VCL Reference

TClassList.Insert

TClassList	See also

Firsts a class to the list at a specified position.

procedure Insert(Index: Integer; aClass: TClass);

Description

Call Insert to First a class at a specified position in the list, shifting the item that previously occupied that position (and all subsequent items) up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity.

The Index parameter is zero-based, so the first position in the list has an index of 0.

To replace an empty reference with a new class without growing the array, set the Items property directly.


TClassList.Last
 VCL Reference

TClassList.Last

TClassListClass	See also

Returns the last class listed in the Items array.

function Last: TClass);

Description

Call Last to retrieve the last class in the Items array.


TClassList.Remove
 VCL Reference

TClassList.Remove

TClassList	See also

Removes the first occurrence of a specified class from the list.

function Remove(aClass: TClass): Integer;

Description

Call Remove to delete a specific class from the list when its index is unknown. The value returned is the index of the class in the Items array before it was removed. If the specified object is not found on the list, Remove returns –1.

After a class is deleted, all the classes that follow it are moved up in index position and Count is decremented. If a class appears more than once on the list, Remove deletes only the first appearance.

To use an index position (rather than an object reference) to specify the class to be removed, call Delete.


Hierarchy

TObject

TList

TClassList


TClipboard
 VCL Reference

TClipboard

Hierarchy	Properties	Methods	Using TClipboard	See also

TClipboard represents the system clipboard.

Unit

Clipbrd

Description

TClipboard is a wrapper for the system clipboard, which contains information that has been cut or copied from an application.

Do not instantiate separate TClipboard objects by calling the constructor. Instead, use the global instance of TClipboard returned by the Clipboard function. This allows applications to share a single instance of TClipboard and safeguards against accidental deletion of the clipboard. Before calling Clipboard, be sure the uses clause includes the Clipbrd unit.

TClipboard’s properties provide information about the formats that the clipboard is registered to handle.

TClipboard’s methods

store and retrieve data in appropriate formats.

open and close the clipboard, maintaining a reference count.

manage formats for objects in the clipboard.


 VCL Reference

TClipboard properties

TClipboard	Alphabetically	Legend

In TClipboard

AsText

FormatCount

Formats


 VCL Reference

TClipboard properties

TClipboard	By object	Legend

AsText

FormatCount

Formats


TClipboard.AsText
 VCL Reference

TClipboard.AsText

TClipboard	See also	Example

Represents the contents of the clipboard as a string.

property AsText: string;

Description

Use the AsText property to place text in and retrieve text from the clipboard. The clipboard must contain a string or an exception occurs. To determine if the clipboard contains a string, pass CF_TEXT to the HasFormat method


TClipboard.FormatCount
 VCL Reference

TClipboard.FormatCount

TClipboard	See also 	Example

Specifies the number of formats in the Formats array property.

property FormatCount: Integer;

Description

Use FormatCount to find the number of different format types used to encode the information currently stored in the clipboard. FormatCount is read-only.

To find out if a particular format is available on the clipboard, use the HasFormat method.


TClipboard.Formats
 VCL Reference

TClipboard.Formats

TClipboard	See also 	Example

Provides indexed access to all the formats the clipboard contains.

property Formats[Index: Integer]: Word;

Description

Read Formats to determine what formats encode the information currently on the clipboard. Each format can be accessed by its position in the array.

Usually, when an application copies or cuts something to the clipboard, it places it there in multiple formats. An application can place items of a particular format on the clipboard and retrieve items with a particular format from the clipboard if the format is in the Formats array. To find out if a particular format is available on the clipboard, use the HasFormat method.

When reading information from the clipboard, use the Formats array to choose the best possible encoding for information that can be encoded in several ways.

Before you can write information to the clipboard in a particular format, the format must be registered. To register a new format, use the RegisterClipboardFormat method of TPicture.


 VCL Reference

TClipboard methods

TClipboard	Alphabetically	Legend

In TClipboard

Assign

Clear

Close

GetAsHandle

GetComponent

GetTextBuf

HasFormat

Open

SetAsHandle

SetComponent

SetTextBuf

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TClipboard methods

TClipboard	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Close

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetAsHandle

GetComponent

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetTextBuf

HasFormat

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Open

SafeCallException

SetAsHandle

SetComponent

SetTextBuf


TClipboard.Assign
 VCL Reference

TClipboard.Assign

TClipboard	See also	Example

Copies an object to the clipboard.

procedure Assign(Source: TPersistent);

Description

Use Assign to copy pictures to and from the clipboard. For example, the following code copies the bitmap from a TBitmap instance (Bitmap1) to the clipboard.

Clipboard.Assign(Bitmap1);

If a bitmap is on the clipboard, the following code copies it to Bitmap1.

Bitmap1.Assign(Clipboard);

The Formats property lists the formats used by the clipboard. Different kinds of graphic object (such as bitmaps and metafiles) have their own formats. Use the HasFormat method to determine whether the information on the clipboard is stored in a format compatible with the object you want to assign it to.


TClipboard.Clear
 VCL Reference

TClipboard.Clear

TClipboard

Deletes the contents of the clipboard.

procedure Clear;

Description

Call Clear to empty the clipboard.

Clear is called automatically by TClipboard operations that add data to the clipboard.


TClipboard.Close
 VCL Reference

TClipboard.Close

TClipboard	See also 	Example

Closes the clipboard if it is open.

procedure Close;

Description

Call Close when you are finished adding items to the clipboard.

The clipboard can be opened with multiple calls to the Open method before being closed. Open and Close maintain a count of the number of times the clipboard has been opened and will not close it until Close has been called the same number of times.


TClipboard.GetAsHandle
 VCL Reference

TClipboard.GetAsHandle

TClipboard	See also 	Example

Returns a Windows handle to data from the clipboard in the specified format.

function GetAsHandle (Format: Word): THandle;

Description

GetAsHandle retrieves data from the clipboard using Windows handles.

The handle returned by GetAsHandle is not owned by the application and is valid only as long as the clipboard is open. If you need it for longer, copy the data to another handle.

The Format parameter can specify any of the formats listed under the HasFormat method. Applications can also define and register their own formats. See the Windows API Help for more information.


TClipboard.GetComponent
 VCL Reference

TClipboard.GetComponent

TClipboard	See also 	Example

Retrieves a component from the clipboard.

function GetComponent(Owner, Parent: TComponent): TComponent;

Description

Use GetComponent to retrieve a component that is stored on the clipboard.

Owner becomes the owner of the retrieved component and Parent becomes its parent. Owner is usually a form, but both parameters can be nil.

Before a class is read from the clipboard, it must be registered by a call to RegisterClasses. If you try to read an unregistered class, you’ll get an EClassNotFound exception.


TClipboard.GetTextBuf
 VCL Reference

TClipboard.GetTextBuf

TClipboard	See also

Retrieves text from the clipboard and copies it to a buffer.

function GetTextBuf(Buffer: PChar; BufSize: Integer): Integer;

Description

Use GetTextBuf to retrieve text from the clipboard and copy it into the buffer pointed to by Buffer. GetTextBuf copies up to the number of characters given by BufSize and returns the number of characters copied. The resulting text in Buffer is a null-terminated string.


TClipboard.HasFormat
 VCL Reference

TClipboard.HasFormat

TClipboard 	See also	Example

Indicates whether the clipboard contains data in a specified format.

procedure HasFormat(Format: Word): Boolean;

Description

Use HasFormat to find out whether the clipboard contains data encoded in a specific format. HasFormat returns True if the format is present and False otherwise. TClipboard keeps a list of available formats in the Formats array property.

Some of the possible values of the Format parameter follow. HasFormat supports additional formats provided by Windows or by other applications as well as custom formats registered with TPicture.RegisterClipboardFormat.

Value	Meaning

CF_TEXT	Text with a CR-LF combination at the end of each line. A null character identifies the end of the text.

CF_BITMAP	A Windows bitmap graphic.

CF_METAFILEPICT	A Windows metafile graphic.

CF_PICTURE	An object of type TPicture.

CF_COMPONENT	Any persistent object.


TClipboard.Open
 VCL Reference

Clipboard.Open

TClipboard	See also 	Example

Opens the clipboard, preventing other applications from changing its contents until the clipboard is closed.

procedure Open;

Description

Call Open before adding a series of items to the clipboard. This prevents other applications from overwriting the clipboard until it is closed. (When adding a single item to the clipboard, there is no need to call Open.)

When an application has finished adding items to the clipboard, it should call the Close method. The clipboard can be opened with multiple calls to the Open method before being closed. Open and Close maintain a count of the number of times the clipboard has been opened and will not close it until Close has been called the same number of times.


TClipboard.SetAsHandle
 VCL Reference

TClipboard.SetAsHandle

TClipboard 	See also	Example

Places data represented by a specified handle on the clipboard.

procedure SetAsHandle (Format: Word; Value: THandle);

Description

SetAsHandle writes data represented by the specified handle (Value) to the clipboard using the specified format.

Do not delete a handle after passing it to SetAsHandle. The handle belongs to the clipboard, which will free it.

The Format parameter can specify any of the formats listed under the HasFormat method. Applications can also define and register their own formats. See the Windows API Help for more information.


TClipboard.SetComponent
 VCL Reference

TClipboard.SetComponent

TClipboard	See also 	Example

Copies a component to the clipboard.

procedure SetComponent(Component: TComponent);

Description

Use SetComponent to copy a component to the clipboard.


TClipboard.SetTextBuf
 VCL Reference

Clipboard.SetTextBuf

TClipboard	See also

Writes a text buffer to the Clipboard.

procedure SetTextBuf(Buffer: PChar);

Description

Use SetTextBuf to copy text to the clipboard from a buffer. Buffer must point to a null-terminated string.


Hierarchy

TObject

TPersistent

TClipboard


TComboBoxEx
 VCL Reference

TComboBoxEx

Hierarchy	Properties	Methods	Events	See also

TComboBoxEx represents a combo box that supports extended combo box features such as images on the list entries.

Unit

StdCtrls

Description

Add TComboBoxEx to a form when you want to include a combo box that uses the images in an image list or when you want to control how far the items in the drop-down list are indented. TComboBoxEx provides greater support of items than the TComboBox control, but omits certain features as well (owner-drawn items, sorting of list items, and so on).


 VCL Reference

TComboBoxEx properties

TComboBoxEx	Alphabetically	Legend

Derived from TCustomComboBoxEx

DropDownCount

Images

ItemHeight

ItemsEx

SelText

Style

StyleEx

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

MaxLength

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TComboBoxEx Properties

TComboBoxEx	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropDownCount

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpKeyword

HelpType

Hint

HostDockSite

Images

ImeMode

ImeName

ItemHeight

ItemIndex

Items

ItemsEx

Left

LRDockWidth

MaxLength

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

SelLength

SelStart

SelText

ShowHint

Showing

Style

StyleEx

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TComboBoxEx events

TComboBoxEx	Alphabetically	Legend

Derived TCustomComboBoxEx

OnBeginEdit

OnEndEdit

Derived from TCustomCombo

OnChange

OnDropDown

OnSelect

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TComboBoxEx Events

TComboBoxEx	By Object	Legend

OnBeginEdit

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDropDown

OnEndDock

OnEndDrag

OnEndEdit

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnSelect

OnStartDock

OnStartDrag


 VCL Reference

TComboBoxEx methods

TComboBoxEx	Alphabetically	Legend

Derived from TCustomComboBoxEx

Create

Destroy

Focused

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TComboBoxEx Methods

TComboBoxEx	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBoxEx

TBiDiComboBoxEx

TComboBoxEx


TComboExItems
 VCL Reference

TComboExItems

Hierarchy	Properties	Methods	Events	See also

TComboExItems manages a collection of TComboExItem objects.

Unit

ComCtrls

Description

TComboExItems manages the collection of items that appear in an extended combo box (TComboBoxEx).

Use the properties and methods of TComboExItems to:

Access a specific item.

Add or delete items from the collection.

Find out how many items are in the collection.

Sort the items in the collection.


 VCL Reference

TComboExItems properties

TComboExItems	Alphabetically	Legend

In TComboExItems

ComboItems

Derived from TListControlItems

CaseSensitive

Items

SortType

Derived from TCollection

Count

ItemClass


 VCL Reference

TComboExItems properties

TComboExItems	By object	Legend

CaseSensitive

ComboItems

Count

ItemClass

Items

SortType


TComboExItems.ComboItems
 VCL Reference

TComboExItems.ComboItems

TComboExItems	See also

Lists the items in the collection.

property ComboItems[const Index: Integer]: TComboExItem;

Description

Use ComboItems to access the items in this collection.

Index indicates the item to access, where 0 is the index of the first item, 1 is the index of the second item, and so on. The Count property indicates the maximum number of items.

Note:	ComboItems is the same as the Items property, except that the type of the property is TComboExItem instead of TListControlItem, which is the base class for TComboExItem.


 VCL Reference

TComboExItems events

TComboExItems	Alphabetically	Legend

Derived from TListControlItems

OnCompare


 VCL Reference

TComboExItems Events

TComboExItems	By object	Legend

OnCompare


 VCL Reference

TComboExItems methods

TComboExItems	Alphabetically	Legend

In TComboExItems

Add

AddItem

Insert

Derived from TListControlItems

CustomSort

Sort

Derived from TOwnedCollection

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TComboExItems methods

TComboExItems	By object	Legend

Add

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Sort


TComboExItems.Add
 VCL Reference

TComboExItems.Add

TComboExItems	See also

Adds a new item to the collection.

function Add: TComboExItem;

Description

Call Add to add a new item to the collection. Add instantiates an object of the type that was specified when the TListControlItems instance was created. It returns the newly created object so that you can specify its properties.


TComboExItems.AddItem
 VCL Reference

TComboExItems.AddItem

TComboExItems	See also

Adds a new item to the collection and initializes its properties.

function AddItem(const Caption: String; const ImageIndex, SelectedImageIndex, OverlayImageIndex, Indent: Integer; Data: Pointer): TComboExItem;

Description

Call AddItem to add a new item to the collection. Add instantiates an object of the type that was specified when the TListControlItems instance was created. It then assigns the values of the Caption, ImageIndex, SelectedImageIndex, OverlayImageIndex, Indent, and Data parameters to the TComboExItem properties of the same names.


TComboExItems.Insert
 VCL Reference

TComboExItems.Insert

TComboExItems	See also

Inserts a new item at a specified position.

function Insert(Index: Integer): TComboExItem;

Description

Call Insert to insert a new item into the collection at a specified position.

Insert instantiates an object of the type that was specified when the TListControlItems instance was created and inserts it into the collection at the position specified by Index. An index of 0 specifies the first position, 1 specifies the second position, and so on.

Insert returns the newly created object so that you can specify its properties.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TListControlItems

TComboExItems


TCoolBands
 VCL Reference

TCoolBands

Hierarchy	Properties	Methods	See also

TCoolBands is a container for TCoolBand objects.

Unit

ComCtrls

Description

Each TCoolBands holds a collection of TCoolBand objects in a TCoolBar. TCoolBands maintains an index of the TCoolBand objects in its Items array. The Count property contains the number of bands in the collection.


 VCL Reference

TCoolBands properties

TCoolBands	Alphabetically	Legend

In TCoolBands

CoolBar

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TCoolBands properties

TCoolBands	By object	Legend

CoolBar

Count

ItemClass

Items


TCoolBands.CoolBar
 VCL Reference

TCoolBands.CoolBar

TCoolBands	See also

Provides access to the TCoolBar component that owns the TCoolBands.

property CoolBar: TCoolBar;

Description

CoolBar is the TCoolBar instance to which the TCoolBands belongs.


TCoolBands.Items
 VCL Reference

TCoolBands.Items

TCoolBands	See also 	Example

Lists the bands in the TCoolBands.

property Items[Index: Integer]: TCoolBand; default;

Description

Use Items to access indivicual cool bands. The value of the Index parameter corresponds to the Index property of TCoolBand. It represents the position of the band in the TCoolBands collection.


 VCL Reference

TCoolBands methods

TCoolBands	Alphabetically	Legend

In TCoolBands

Add

Create

FindBand

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCoolBands methods

TCoolBands	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindBand

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TCoolBands.Add
 VCL Reference

TCoolBands.Add

TCoolBands

Adds a cool band to the collection.

function Add: TCoolBand;

Description

Call Add to add a cool band to the collection. Add returns the new TCoolBand object so that you can set its properties.


TCoolBands.::TCoolBands
 VCL Reference

TCoolBands.Create

TCoolBands

Creates and initializes a TCoolBands instance.

constructor Create(CoolBar: TCoolBar);

Description

Create generates a TCoolBands instance and initializes its properties.

Typically, applications have no need to instantiate TCoolBands. Instead, this object is created by the TCoolBar object that uses it to manage its bands.

CoolBar is the cool bar that owns the TCoolBands object and uses it to manage its bands.


TCoolBands.FindBand
 VCL Reference

TCoolBands.FindBand

TCoolBands

Returns the band that contains a specified control.

function FindBand(AControl: TControl): TCoolBand;

Description

Call FindBand to obtain the band containing the specified control.

AControl is the control.


Hierarchy

TObject

TPersistent

TCollection

TCoolBands


TControlCanvas
 VCL Reference

TControlCanvas

Hierarchy	Properties	Methods	Events	See also

TControlCanvas is a specialized canvas object associated with a control.

Unit

Controls

Description

TControlCanvas provides a graphics context for controls that render their own images.

Not all controls need a canvas. Many controls rely on rely on underlying Windows screen objects to provide rendering logic.

TControlCanvas is descended from TCanvas, which provides many properties, events, and methods to aid in the creation of rich images. TControlCanvas adds properties and methods to interact with a control object, and to manage the device context associated with the control.


 VCL Reference

TControlCanvas Properties

TControlCanvas	Alphabetically	Legend

In TControlCanvas

Control

Derived from TCanvas

Brush

CanvasOrientation

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


 VCL Reference

TControlCanvas Properties

TControlCanvas	By Object	Legend

Brush

CanvasOrientation

ClipRect

Control

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


TControlCanvas.Control
 VCL Reference

TControlCanvas.Control

TControlCanvas	See also

Specifies the control associated with the control canvas object.

property Control: TControl;

Description

Read Control to gain access to the control associated with the control canvas object. Descendants of TWinControl that use a control canvas set the Control property to form the association. The control canvas object uses the Control property to get information from its associated control.


 VCL Reference

TControlCanvas events

TControlCanvas	Alphabetically	Legend

Derived from TCanvas

OnChange

OnChanging


 VCL Reference

TControlCanvas events

TControlCanvas	By object	Legend

OnChange

OnChanging


 VCL Reference

TControlCanvas Methods

TControlCanvas	Alphabetically	Legend

In TControlCanvas

Destroy

FreeHandle

UpdateTextFlags

Derived from TCanvas

Arc

BrushCopy

Chord

CopyRect

Create

Draw

DrawFocusRect

Ellipse

FillRect

FloodFill

FrameRect

HandleAllocated

LineTo

Lock

MoveTo

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TControlCanvas Methods

TControlCanvas	By Object	Legend

AfterConstruction

Arc

Assign

BeforeDestruction

BrushCopy

Chord

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyRect

Create

DefaultHandler

Destroy

Dispatch

Draw

DrawFocusRect

Ellipse

FieldAddress

FillRect

FloodFill

FrameRect

Free

FreeHandle

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LineTo

Lock

MethodAddress

MethodName

MoveTo

NewInstance

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

SafeCallException

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock

UpdateTextFlags


TControlCanvas.Destroy
 VCL Reference

TControlCanvas.Destroy

TControlCanvas	See also

Destroys an instance of TControlCanvas.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The controls that use a TControlCanvas object destroy it by calling Free from their own destructors. Free verifies that the TControlCanvas object is not nil and only then calls Destroy.

Destroy releases the handle to a device context (HDC) the control canvas uses before freeing the memory associated with the object.


TControlCanvas.FreeHandle
 VCL Reference

TControlCanvas.FreeHandle

TControlCanvas	See also

Releases the handle to a device context (HDC) used by the control canvas object.

procedure FreeHandle;

Description

Call FreeHandle to free the HDC used by the control canvas. FreeHandle sets the Handle property to NULL. After calling FreeHandle, an HDC will be reacquired if any of the drawing methods are called.

Note:	Setting the Handle property to NULL does not free the HDC. Set the Handle property to NULL rather than call FreeHandle if the HDC is release by the application.


TControlCanvas.UpdateTextFlags
 VCL Reference

TControlCanvas.::UpdateTextFlags

TControlCanvas	See also

Updates the canvas’ text flags to reflect the associated control’s BiDiMode property.

void __fastcall UpdateTextFlags(void);

procedure UpdateTextFlags;

Description

UpdateTextFlags is used internally to update the text flags that the canvas passes to Windows when drawing text. UpdateTextFlags uses the associated control’s UseRightToLeftReading method to ensure that it reflects the control’s BiDiMode property on the current system. If UseRightToLeftReading returns Truetrue and the application is running on a Middle Eastern system, UpdateTextFlags adds ETO_RTLREADING to the TextFlags property. Otherwise, UpdateTextFlags removes ETO_RTLREADING from TextFlags.


Hierarchy

TObject

TPersistent

TCanvas

TControlCanvas


TCustomActiveForm
 VCL Reference

 TCustomActiveForm

Hierarchy	Properties	Methods	Events

TCustomActiveForm is the base class for ActiveForms.

Unit

Forms

Description

TCustomActiveForm is used in code that is generated automatically by the ActiveForm wizard. For more information, see Generating an ActiveX control based on a VCL form.


 VCL Reference

TCustomActiveForm properties

TCustomActiveForm	Alphabetically	Legend

In TCustomActiveForm

AxBorderStyle

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

BorderStyle

Canvas

ClientHeight

ClientRect

ClientWidth

Designer

DropTarget

Floating

FormState

HelpFile

KeyPreview

Menu

ModalResult

Monitor

OldCreateOrder

OleFormObject

Parent

PixelsPerInch

PrintScale

Scaled

Visible

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomActiveForm properties

TCustomActiveForm	By object	Legend

Action

Active

ActiveControl

ActiveOleControl

Align

AlignDisabled

Anchors

AutoScroll

AutoSize

AxBorderStyle

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

KeyPreview

Left

LRDockWidth

Menu

ModalResult

Monitor

Name

OldCreateOrder

OleFormObject

Owner

Parent

ParentWindow

PixelsPerInch

PopupMenu

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc

WindowState


TCustomActiveForm.AxBorderStyle
 VCL Reference

TCustomActiveForm.AxBorderStyle

TCustomActiveForm	See also

Sets the active form's border style.

property AxBorderStyle: TActiveFormBorderStyle;

Description

AxBorderStyle takes one of the following values:

Values	Meaning

afbNone	No border appears around the active form.

afbSingle	A single line border appears around the active form.

afbSunken	The active form gets a sunken border.

afbRaised	The active form gets a raised border and no caption.


 VCL Reference

TCustomActiveForm events

TCustomActiveForm	Alphabetically	Legend

Derived from TCustomForm

OnActivate

OnCreate

OnDeactivate

OnDestroy

OnPaint

Derived from TWinControl

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TCustomActiveForm events

TCustomActiveForm	By object	Legend

OnActivate

OnClick

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDragDrop

OnDragOver

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnPaint


 VCL Reference

TCustomActiveForm methods

TCustomActiveForm	Alphabetically	Legend

In TCustomActiveForm

Create

CreateParams

WantChildKey

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

CreateNew

DefaultHandler

DefocusControl

Destroy

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomActiveForm methods

TCustomActiveForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TCustomActiveForm.Create
 VCL Reference

TCustomActiveForm.Create

See also

Creates a new TCustomActiveForm object.

constructor Create(AOwner: TComponent); override;

Description

Create is the TCustomActiveForm constructor.

AOwner specifies a component, typically the global application object, that becomes the value of the Owner property. The owner is responsible for initiating streaming of the active form and for freeing it.


TCustomActiveForm.Create
 VCL Reference

TCustomActiveForm.CreateParams

See also

Updates the active form's creation parameters according to the value of the AxBorderStyle property.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams performs the following tasks:

Calls the inherited CreateParams method.

Removes the WS_CAPTION flag from Params.Style.

Adds flags to Params.Style and Params.ExStyle according to the value of the AxBorderStyle property, as shown in the following table:

AxBorderStyle	Style	ExStyle

afbNone	Nothing	Nothing

afbSingle	WS_BORDER	Nothing

afbSunken	Nothing	WS_EX_CLIENTEDGE

afbRaised	WS_DLGFRAME	WS_EX_WINDOWEDGE

Note:	The creation parameters are not updated when the form is in design mode.


TCustomActiveForm.WantChildKey
 VCL Reference

TCustomActiveForm.WantChildKey

See also

Overrides TCustomForm.WantChildKey in order to provide ActiveX functionality.

function WantChildKey(Child: TControl; var Message: TMessage): Boolean; override;

Description

Do not call WantChildKey. It is used internally to ensure that keyboard events sent to child objects are handled correctly.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TCustomActiveForm


TCustomBucketList
 VCL Reference

TCustomBucketList

Hierarchy	Properties	Methods	See also

TCustomBucketList is the base class for lists that store items under a limited number of categories.

Unit

Contnrs

Description

Use TCustomBucketList as a base class for lists of items that fit into a limited number of categories (or buckets). Each bucket can contain multiple items, and there is a well-defined function (the protected BucketFor method) that determines the bucket into which an item belongs. TCustomBucketList descendants can include lists of items that fall into natural categories, or implementations of a hash table.

Do not create instances of TCustomBucketList. In TCustomBucketList, the BucketFor method is abstract, meaning that descendant classes must override it and provide an implementation.


 VCL Reference

TCustomBucketList properties

TCustomBucketList	Alphabetically	Legend

In TCustomBucketList

BucketCount

Buckets

Data


 VCL Reference

TCustomBucketList properties

TCustomBucketList	By object	Legend

BucketCount

Buckets

Data


TCustomBucketList.BucketCount
 VCL Reference

TCustomBucketList.BucketCount

TCustomBucketList	See also

Indicates the number of buckets in the bucket list.

property BucketCount: Integer;

Description

Use BucketCount to determine the number of buckets, or categories, that can hold items in the list. BucketCount determines the number of buckets that are listed by the Buckets property.


TCustomBucketList.Buckets
 VCL Reference

TCustomBucketList.Buckets

TCustomBucketList	See also

Lists the buckets in the bucket list

property Buckets: TBucketArray;

Description

Use Buckets to access the buckets in the bucket list. Buckets is a dynamic array of TBucket records, each of which can hold a set of items.


TCustomBucketList.Data
 VCL Reference

TCustomBucketList.Data

TCustomBucketList	See also

Represents the data associated with a specified item in the bucket list.

property Data[AItem: Pointer]: Pointer; default;

Description

Use Data to get or set the data associated with an item in the bucket list.

AItem points to an item currently in the bucket list. If AItem does not specify an item in one of the buckets of the bucket list, trying to read or set Data causes TCustomBucketList to raise an EListError exception.


 VCL Reference

TCustomBucketList methods

TCustomBucketList	Alphabetically	Legend

In TCustomBucketList

Add

AddItem

Assign

BucketFor

Clear

DeleteItem

Destroy

Exists

Find

FindItem

ForEach

Remove

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomBucketList methods

TCustomBucketList	By object	Legend

Add

AddItem

AfterConstruction

Assign

BeforeDestruction

BucketFor

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

DeleteItem

Destroy

Dispatch

Exists

FieldAddress

Find

FindItem

ForEach

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException


TCustomBucketList.Destroy
 VCL Reference

TCustomBucketList.Destroy

TCustomBucketList	See also

Destroys an instance of TCustomBucketList.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the component list is not nil before calling Destroy.

Before destroying the TCustomBucketList, Destroy calls Clear, which deletes all of the items from all of the buckets in the list.


TCustomBucketList.Add
 VCL Reference

TCustomBucketList.Add

TCustomBucketList	See also

Inserts an item and its associated data into the bucket list.

function Add(AItem, AData: Pointer): Pointer;

Description

Call Add to add an item and its associated data into the bucket list. Add locates the bucket into which the specified item belongs. If the item is already in the bucket, Add raises an EListError exception. Otherwise, it adds the item to the correct bucket and returns AData.


TCustomBucketList.AddItem
 VCL Reference

TCustomBucketList.AddItem

TCustomBucketList	See also

Inserts an item and its associated data into a specified bucket.

function AddItem(ABucket: Integer; AItem, AData: Pointer): Pointer; virtual;

Description

TCustomBucketList uses AddItem internally to add items into buckets. AddItem does not check whether the specified item correctly belongs in the specified bucket; it simply handles the mechanics of adding the item into the bucket. If you need to determine the bucket in which an item belongs, use the Add method instead.

ABucket is the index of the bucket in which the item belongs.

AItem is the item to add to ABucket.

AData is the data to associate with AItem.

AddItem returns the value of AData.


TCustomBucketList.Assign
 VCL Reference

TCustomBucketList.Assign

TCustomBucketList

Replaces all the items in this list with the items from another bucket list.

procedure Assign(AList: TCustomBucketList);

Description

Assign empties the bucket list of any items it currently holds and then adds in all the items in the bucket list specified by the AList parameter.

Note:	Assign merely copies the items from another bucket list, not the organization of the bucket list. Thus, the items may end up in entirely different buckets.


TCustomBucketList.BucketFor
 VCL Reference

TCustomBucketList.BucketFor

TCustomBucketList	See also

Returns the index of the bucket in which a specified item belongs.

function BucketFor(AItem: Pointer): Integer; virtual; abstract;

Description

TCustomBucketList uses BucketFor internally to determine the bucket into which an arbitrary item belongs. TCustomBucketList introduces BucketFor as an abstract method, which means it has no implementation. Descendant classes must override BucketFor to provide an implementation that determines the bucket for an arbitrary item.

AItem is the item for which you want to find a bucket.

BucketFor returns the index of the bucket in the Buckets property array.


TCustomBucketList.Clear
 VCL Reference

TCustomBucketList.Clear

TCustomBucketList	See also

Empties the bucket list of all its items.

procedure Clear;

Description

Call Clear to empty the bucket list. Clear deletes all of the items from all of the buckets in the bucket list.

Note:	Clearing the bucket list does not free any of the items in the list, it merely removes them from the bucket list.


TCustomBucketList.DeleteItem
 VCL Reference

TCustomBucketList.DeleteItem

TCustomBucketList	See also

Deletes an item from a bucket in the bucket list.

function DeleteItem(ABucket: Integer; AIndex: Integer): Pointer; virtual;

Description

TCustomBucketList uses DeleteItem to remove items from the bucket list. DeleteItem removes the specified item from the specified bucket and moves all items that came after the deleted item up by one position within the bucket.

ABucket is the bucket that contains the item to delete.

AIndex is the index of the item to delete within the bucket specified by ABucket.

DeleteItem returns the data associated with the deleted item.


TCustomBucketList.Exists
 VCL Reference

TCustomBucketList.Exists

TCustomBucketList	See also

Indicates whether the bucket list contains a specified item.

function Exists(AItem: Pointer): Boolean;

Description

Call Exists to determine whether the item specified by AItem is already in the bucket list. Exists returns True if the bucket list contains AItem, False if AItem is not in the list.


TCustomBucketList.Find
 VCL Reference

TCustomBucketList.Find

TCustomBucketList	See also

Returns the data associated with a specified item.

function Find(AItem: Pointer; out AData: Pointer): Boolean;

Description

Call Find to retrieve the data associated with an item in the list. Calling the Find method differs from reading the Data property in that it does not raise an exception if the item is not in the bucket list.

AItem is the item to find in the bucket list.

AData returns the data associated with AItem.

Find returns True if AItem is in the bucket list, False otherwise. The value of AData is not set if Find returns False.


TCustomBucketList.FindItem
 VCL Reference

TCustomBucketList.FindItem

TCustomBucketList	See also

Returns the location of an item in the bucket list.

function FindItem(AItem: Pointer; out ABucket, AIndex: Integer): Boolean; virtual;

Description

TCustomBucketList uses FindItem internally to locate items in the bucket list.

AItem is the item to find in the bucket list.

ABucket returns the index of the bucket that contains the item.

AIndex returns the index of the item in the bucket specified by ABucket.

FindItem returns True if AItem is in the bucket list, False otherwise.


TCustomBucketList.ForEach
 VCL Reference

TCustomBucketList.ForEach

TCustomBucketList

Executes a callback for every item in the bucket list.

type TBucketProc = procedure(AInfo, AItem, AData: Pointer; out AContinue: Boolean);

function ForEach(AProc: TBucketProc; AInfo: Pointer=nil): Boolean;

Description

Call ForEach to execute the procedure specified by AProc for each item in the bucket list. ForEach iterates through all the items in the bucket list, passing in each item and its associated data to the specified callback.

AProc is the callback to execute.

AInfo has no predefined meaning. It is passed to the AInfo parameter of the callback.

On the callback,

AInfo is value supplied as the AInfo parameter of ForEach.

AItem is the current item.

AData is the data associated with AItem.

The callback returns True as the value of AContinue if ForEach should continue on to the next item. It returns False if ForEach should abort the process without continuing on through the rest of the items.

ForEach returns True if it executes the callback for every item in the bucket list. It returns False if the callback set AContinue to False for some item, causing any subsequent items to be skipped.


TCustomBucketList.Remove
 VCL Reference

TCustomBucketList.Remove

TCustomBucketList	See also

Removes a specified item from the list and returns its data.

function Remove(AItem: Pointer): Pointer;

Description

Call Remove to delete a specific item from the list.

AItem is the item to remove.

Remove returns the data associated with AItem. If AItem is not in the bucket list, Remove returns nil.


Hierarchy

TObject

TCustomBucketList


TCustomComboBoxStrings
 VCL Reference

TCustomComboBoxStrings

Hierarchy	Properties	Methods	See also

TCustomComboBoxStrings represents the strings in the drop-down list of a combo box.

Unit

StdCtrls

Description

TCustomComboBoxStrings is the base class for objects that represent the items in the drop-down list of a combo box. Each type of combo box (TComboBox or TComboBoxEx) uses its own TCustomComboBoxStrings descendant to manage the list of items.

Do not create instances of TCustomComboBoxStrings. This class is designed to work only with a combo box. TCustomCombo creates the TCustomComboBoxStrings descendant it uses to implement its Items property.


 VCL Reference

TCustomComboBoxStrings properties

TCustomComboBoxStrings	Alphabetically	Legend

In TCustomComboBoxStrings

ComboBox

Count

Objects

Strings

Derived from TStrings

Capacity

CommaText

DelimitedText

Delimiter

Names

QuoteChar

Strings

StringsAdapter

Text

Values


 VCL Reference

TCustomComboBoxStrings properties

TCustomComboBoxStrings	By object	Legend

Capacity

ComboBox

CommaText

Count

DelimitedText

Delimiter

Names

Objects

QuoteChar

Strings

Strings

StringsAdapter

Text

Values


TCustomComboBoxStrings.ComboBox
 VCL Reference

TCustomComboBoxStrings.ComboBox

TCustomComboBoxStrings	See also

Identifies the combo box whose items this object represents.

property ComboBox: TCustomCombo;

Description

TCustomComboBoxStrings uses ComboBox internally so that the strings in the list and the items in the drop-down list of the combo box remain synchronized.


TCustomComboBoxStrings.Count
 VCL Reference

TCustomComboBoxStrings.Count

TCustomComboBoxStrings	See also

Indicates the number of strings in the list.

property Count: Integer;

Description

Use Count when iterating over all the strings in the list, or when trying to locate the position of a string relative to the last string in the list.


TCustomComboBoxStrings.Objects
 VCL Reference

TCustomComboBoxStrings.Objects

TCustomComboBoxStrings	See also

Lists a set of objects associated one with each of the strings in the Strings property.

property Objects[Index: Integer]: TObject;

Description

Associate an object with an existing string by setting the Objects property using the same index as that of the string in the Strings property. Look up the object associated with a string by reading the Objects property with the index of the string. Index gives the position of the string associated with the object, where 0 is the first string, 1 is the second string, and so on. Use the IndexOf method to find the index of the string.

Note:	The TCustomComboBoxStrings object does not own the objects in the Objects array. Objects added to the Objects array still exist even if the string list is destroyed. They must be explicitly destroyed by the application.


TCustomComboBoxStrings.Strings
 VCL Reference

TCustomComboBoxStrings.Strings

TCustomComboBoxStrings	See also

Lists the strings the represent items in the drop-down list of the combo box.

property Strings[Index: Integer]: string; default;

Description

Use Strings to read or modify the string at a particular position. Index gives the position of the string, where 0 is the position of the first string, 1 is the position of the second string, and so on. To locate a particular string in the list, call the IndexOf method.

Strings is the default property of TCustomComboBoxStrings. The Strings identifier can be omitted when accessing the Strings property. For example, the following two lines of code are both acceptable and do the same thing:

ComboBox1.Items.Strings[0] := 'First Item';

ComboBox1.Items[0] := 'First Item';


 VCL Reference

TCustomComboBoxStrings methods

TCustomComboBoxStrings	Alphabetically	Legend

In TCustomComboBoxStrings

Clear

Delete

Get

GetCount

GetObject

IndexOf

PutObject

SetUpdateState

Derived from TStrings

Add

AddObject

AddStrings

Append

Assign

BeginUpdate

Destroy

EndUpdate

Equals

Exchange

GetText

IndexOfName

IndexOfObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TCustomComboBoxStrings methods

TCustomComboBoxStrings	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Free

FreeInstance

Get

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetObject

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

PutObject

SafeCallException

SaveToFile

SaveToStream

SetText

SetUpdateState


TCustomComboBoxStrings.Clear
 VCL Reference

TCustomComboBoxStrings.Clear

TCustomComboBoxStrings	See also

Deletes all the strings from the list.

procedure Clear; override;

Description

Call clear to empty the drop-down list of the combo box. All references to associated objects are also removed. However, the objects themselves are not freed.


TCustomComboBoxStrings.Delete
 VCL Reference

TCustomComboBoxStrings.Delete

TCustomComboBoxStrings	See also

Removes the item specified by the Index parameter.

procedure Delete(Index: Integer); override;

Description

Call Delete to remove a single item from the list. If an object is associated with the string, the reference to the object is removed as well. Index gives the position of the string in the drop-down list, where 0 is the first string, 1 is the second string, and so on.


TCustomComboBoxStrings.Get
 VCL Reference

TCustomComboBoxStrings.Get

TCustomComboBoxStrings	See also

Returns a string given its index.

function Get(Index: Integer): string; override;

Description

Get is the protected read implementation of the Strings property. It fetches the specified string from the combo box identified by the ComboBox property.

Index identifies the string to return, where 0 is the index of the first string, 1 is the index of the second string, and so on.


TCustomComboBoxStrings.GetCount
 VCL Reference

TCustomComboBoxStrings.GetCount

TCustomComboBoxStrings	See also

Returns the number of strings in the list

function GetCount: Integer; override;

Description

GetCount is the protected read implementation of the Count property. It fetches the number of items from the combo box identified by the ComboBox property.


TCustomComboBoxStrings.GetObject
 VCL Reference

TCustomComboBoxStrings.GetObject

TCustomComboBoxStrings	See also

Returns the object associated with the item at a specified index.

function GetObject(Index: Integer): TObject; override;

Description

GetObject is the protected read implementation of the Objects property. It fetches the associated object for the identified item from the combo box identified by the ComboBox property.

Index is the index of the item with which the object is associated.


TCustomComboBoxStrings.IndexOf
 VCL Reference

TCustomComboBoxStrings.IndexOf

TCustomComboBoxStrings	See also

Returns the position of a string in the list.

function IndexOf(const S: string): Integer; override;

Description

Call IndexOf to obtain the position of the first occurrence of a string that matches S. The string must be an exact match (S can’t be the prefix of a string in the combo box).

IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string does not have a match in the string list, IndexOf returns -1.


TCustomComboBoxStrings.PutObject
 VCL Reference

TCustomComboBoxStrings.PutObject

TCustomComboBoxStrings	See also

Changes the object associated with the string at a specified index.

procedure PutObject(Index: Integer; AObject: TObject); override;

Description

PutObject is the protected write implementation of the Objects property. It associates the object specified by AObject with the item identified by Index.

Index identifies an item in the drop-down list of the combo box, where 0 is the index of the first item, 1 is the index of the second item, and so on.

AObject is the object to associated with the specified item.


TCustomComboBoxStrings.SetUpdateState
 VCL Reference

TCustomComboBoxStrings.SetUpdateState

TCustomComboBoxStrings	See also

Performs internal adjustments before or after a series of updates.

procedure SetUpdateState(Updating: Boolean); virtual;

Description

SetUpdateState is called at the beginning or end of a series of updates. When the BeginUpdate method is first called and the TCustomComboBoxStrings object is not already in the middle of an update, SetUpdateState is called with Updating set to True. When the EndUpdate method is called and it cancels out the last unmatched call to BeginUpdate, SetUpdateState is called with Updating set to False.

SetUpdateState refreshes the combo box when Updating is False, so that the combo box reflects the new set of strings.


Hierarchy

TObject

TPersistent

TStrings

TCustomComboBoxStrings


TCustomCheckBox
 VCL Reference

TCustomCheckBox

Hierarchy	Properties	Methods	See also

TCustomCheckBox is the ancestor of all check-box components.

Unit

StdCtrls

Description

TCustomCheckBox is an abstract class from which check-box components, including TCheckBox and TDBCheckBox, descend. Check boxes present the user with options that can be selected (checked) or deselected (unchecked).


 VCL Reference

TCustomCheckBox properties

TCustomCheckBox	Alphabetically	Legend

In TCustomCheckBox

Alignment

AllowGrayed

Checked

State

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomCheckBox Properties

TCustomCheckBox	By Object	Legend

Action

Align

AlignDisabled

Alignment

AllowGrayed

Anchors

BiDiMode

BoundsRect

Brush

Checked

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

State

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomCheckBox.Alignment
 VCL Reference

TCustomCheckBox.Alignment

TCustomCheckBox

Controls the position of the check box’s caption.

type TLeftRight = taLeftJustify..taRightJustify;

property Alignment: TLeftRight;

Description

If Alignment is set to taRightJustify, the caption appears to the right of the check box. If Alignment is set to taLeftJustify, the caption appears to the left of the check box.


TCustomCheckBox.AllowGrayed
 VCL Reference

TCustomCheckBox.AllowGrayed

TCustomCheckBox	See also 	Example

Determines whether check box can be in a “grayed” state.

property AllowGrayed: Boolean;

Description

If AllowGrayed is set to True, the check box has three possible states: checked, unchecked, and grayed. If AllowGrayed is set to False, the check box has only two possible states: checked and unchecked.


TCustomCheckBox.Checked
 VCL Reference

TCustomCheckBox.Checked

TCustomCheckBox	See also	Example

Specifies whether the check box is checked.

property Checked: Boolean;

Description

Use Checked to determine whether the check box is in the checked state.

Note:	If the AllowGrayed property is True, you may find it more useful to use the State property.


TCustomCheckBox.State
 VCL Reference

TCustomCheckBox.State

TCustomCheckBox	See also 	Example

Indicates whether the check box is selected, deselected, or grayed.

type TCheckBoxState = (cbUnchecked, cbChecked, cbGrayed);

property State: TCheckBoxState;

Description

Following are the possible values of State:

Value	Meaning

cbUnchecked	The check box has no check mark, indicating that the user has not selected the option.

cbChecked	The check box has a check mark in it, indicating that the user has selected the option.

cbGrayed	The check box has a check mark in it, but it is grayed.


 VCL Reference

TCustomCheckBox methods

TCustomCheckBox	Alphabetically	Legend

In TCustomCheckBox

Click

Create

CreateParams

CreateWnd

GetChecked

GetControlsAlignment

SetChecked

Toggle

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomCheckBox Methods

TCustomCheckBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChecked

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetChecked

SetFocus

SetSubComponent

SetTextBuf

Show

Toggle

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomCheckBox.Click
 VCL Reference

TCustomCheckBox.Click

TCustomCheckBox 	See also

Click generates an OnClick event.

procedure Click; override;

Description

The protected Click method is called automatically when the check box is clicked with the mouse. In addition to generating an OnClick event, it sends a message to the parent control’s window to indicate that the state of the check box has changed.


TCustomCheckBox.Create
 VCL Reference

TCustomCheckBox.Create

TCustomCheckBox	See also

Creates and initializes a TCustomCheckBox instance.

constructor Create(AOwner: TComponent); override;

Description

Call Create to generate a check box at runtime. Check boxes placed on forms at design time, Create is called automatically.

AOwner is a component, typically the form, that is responsible for freeing the check box instance.


TCustomCheckBox.CreateParams
 VCL Reference

TCustomCheckBox.::CreateParams

TCustomCheckBox	See also

Initializes a window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams calls theinherited constructor, then makes specific adjustments for check boxes.


TCustomCheckBox.CreateWnd
 VCL Reference

TCustomCheckBox.CreateWnd

TCustomCheckBox	See also

Creates a Windows control corresponding to the check box.

procedure CreateWnd; override;

Description

CreateWndWidget calls the inherited method, then sends a BM_SETCHECK message to set the check state of the control.


TCustomCheckBox.GetChecked
 VCL Reference

TCustomCheckBox.GetChecked

TCustomCheckBox	See also

Returns the value of the Checked property.

function GetChecked: Boolean; override;

Description

GetChecked is the protected implementation of the Checked property. Override this method and the SetChecked method to change the Checked property in descendant classes.


TCustomCheckBox.GetControlsAlignment
 VCL Reference

TCustomCheckBox.GetControlsAlignment

TCustomCheckBox	See also

Returns the alignment of the check box caption.

function GetControlsAlignment: TAlignment; override;

Description

GetControlsAlignment indicates the alignment of the check box caption. Usually, the caption is right-justified, but if the UseRightToLeftAlignment method returnsTrue and the check mark is on the left, then GetControlsAlignment indicates that the caption should be left-justified.


TCustomCheckBox.SetChecked
 VCL Reference

TCustomCheckBox.SetChecked

TCustomCheckBox	See also

Sets the value of the Checked property.

function SetChecked: Boolean; override;

Description

SetChecked is the protected implementation of the Checked property. Override this method and the GetChecked method to change the Checked property in descendant classes.


TCustomCheckBox.Toggle
 VCL Reference

TCustomCheckBox.Toggle

TCustomCheckBox	See also

Changes the state of the check box.

procedure Toggle; virtual;

Description

Use the Toggle method to select or deselect the check box programmatically. Toggle switches among the valid check-box states—from checked to unchecked to grayed, or from checked to unchecked.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TCustomCheckBox


TCustomColorBox
 VCL Reference

TCustomColorBox

Hierarchy	Properties	Methods	See also

TCustomColorBox represents a combo box that lets users select a color.

Unit

ExtCtrls

Description

TCustomColorBox is the base class for drop-down combo boxes that display a list of colors. The combo box displays a list of all the colors for which the Graphics unit defines a constant. For a list of these colors, see TColor. Each color is displayed next to a small square that is drawn in the corresponding color.

Do not use TCustomColorBox in applications. It is intended to act as a base class for color selection controls. Rather, to add a drop-down combo box that lets users select a color, use the TColorBox component, which appears on the Additional page of the component palette.


 VCL Reference

TCustomColorBox properties

TCustomColorBox	Alphabetically	Legend

In TCustomColorBox

ColorNames

Colors

DefaultColorColor

NoneColorColor

Selected

Style

Derived from TCustomComboBox

AutoComplete

AutoDropDown

CharCase

SelText

Derived from TCustomCombo

Canvas

DroppedDown

ItemIndex

Items

SelLength

SelStart

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomColorBox properties

TCustomColorBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

AutoDropDown

BiDiMode

BoundsRect

Brush

Canvas

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColorNames

Colors

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultColorColor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DroppedDown

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Items

Left

LRDockWidth

Name

NoneColorColor

Owner

Parent

ParentWindow

Selected

SelLength

SelStart

SelText

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomColorBox.ColorNames
 VCL Reference

TCustomColorBox.ColorNames

TCustomColorBox	See also

Lists the names of the colors in the color box.

property ColorNames[Index: Integer]: string;

Description

Use ColorNames to obtain the name of one of the colors listed in the color box.

Index is the index of the name, where 0 is the index of the first color in the box, 1 is the index of the second color, and so on.

The value of each name is either the name of a color constant defined in the Graphics unit (such as clBlack), or it is the name of the color with the “cl” stripped off (Black). The Style property determines which name is used for each color.

The Style property also controls which colors are included in the list.


TCustomColorBox.Colors
 VCL Reference

TCustomColorBox.Colors

TCustomColorBox	See also

Lists the colors in the color box.

property Colors[Index: Integer]: TColor;

Description

Use Colors to obtain the value of a color in the color box.

Index is the index of the color, where 0 is the index of the first color in the box, 1 is the index of the second color, and so on.

Note:	The Style property controls which colors are included in the list.


TCustomColorBox.DefaultColorColor
 VCL Reference

TCustomColorBox.DefaultColorColor

TCustomColorBox	See also

Specifies the color displayed in the color box for clDefault.

property DefaultColorColor: TColor;

Description

Set DefaultColorColor to indicate what color the color box should use when drawing the icon for clDefault. This property only affects the color box if the Style property includes cbSystemColors and cbIncludeDefault.

Note:	DefaultColorColor only affects the way clDefault appears in the color box. When you assign clDefault to a control, the control determines its own default color.


TCustomColorBox.NoneColorColor
 VCL Reference

TCustomColorBox.NoneColorColor

TCustomColorBox	See also

Specifies the color displayed in the color box for clNone.

property NoneColorColor: TColor;

Description

Set NoneColorColor to indicate what color the color box should use when drawing the icon for clNone. This property only affects the color box if the Style property includes cbSystemColors and cbIncludeNone.

Note:	NoneColorColor only affects the way clNone appears in the color box. When you assign clNone to a control, the control determines how to interpret clNone.


TCustomColorBox.Selected
 VCL Reference

TCustomColorBox.Selected

TCustomColorBox	See also

Specifies the currently selected color.

property Selected: TColor;

Description

Use Selected to get or set the selected color as a TColor value.


TCustomColorBox.Style
 VCL Reference

TCustomColorBox.Style

TCustomColorBox	See also

Controls what colors are listed and how their names are formatted.

type

  TColorBoxStyles = (cbStandardColors, cbExtendedColors, cbSystemColors, cbIncludeNone, cbIncludeDefault, cbCustomColor, cbPrettyNames);

  TColorBoxStyle = set of TColorBoxStyles;

property Style: TColorBoxStyle;

Description

Use Style to configure what colors appear in the list and how the names appear. Style is a set that includes 0 or more of the following:

Style	Meaning when included

cbStandardColors	The color box lists the first 16 color constants from the Graphics unit. These are the constants such as clRed or clBlack, that represent fixed RGB values.

cbExtendedColors	The color box includes clMoneyGreen, clSkyBlue, clCream, and clMedGray.

cbSystemColors	The color box includes the symbolic color constants that reflect the values specified in the Windows control panel.

cbIncludeNone	The color box includes clNone. This option only has an effect if Style includes cbSystemColors.

cbIncludeDefault	The color box includes clNone. This option only has an effect if Style includes cbSystemColors.

cbCustomColor	The first entry in the color box represents a custom color. When the user selects the Custom entry, the color box displays the Color selection dialog, where the user can specify a custom color.

cbPrettyNames	The color box lists the names as words rather than as the color constant strings. (for example ‘Black’ rather than ‘clBlack’).


 VCL Reference

TCustomColorBox methods

TCustomColorBox	Alphabetically	Legend

In TCustomColorBox

CloseUp

Create

CreateWnd

DrawItem

KeyDown

KeyPress

PickCustomColor

PopulateList

Select

SetStyle

Derived from TCustomComboBox

Destroy

Derived from TCustomCombo

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

Focused

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomColorBox methods

TCustomColorBox	By object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

CloseUp

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawItem

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

PickCustomColor

PopulateList

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

Select

SelectAll

SendToBack

SetBounds

SetFocus

SetStyle

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomColorBox.CloseUp
 VCL Reference

TCustomColorBox.CloseUp

TCustomColorBox	See also

Generates an OnCloseUp event.

procedure CloseUp; override;

Description

Applications can’t call this protected method. It is called automatically when the drop-down list of the combo box closes.

CloseUp generates an OnCloseUp event so that applications can respond when the list closes.


TCustomColorBox.Create
 VCL Reference

TCustomColorBox.Create

TCustomColorBox	See also

Creates a new TCustomColorBox object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a color box at runtime. TCustomColorBox objects placed on a form at design time are created automatically.

AOwner specifies the owner of the color box. This component (typically the form) is responsible for freeing the color box.


TCustomColorBox.CreateWnd
 VCL Reference

TCustomColorBox.CreateWnd

TCustomColorBox	See also

Creates the window used to implement the color box.

procedure CreateWnd; override;

Description

Applications can’t call this protected method. It is called automatically when the color box is first created or when the window must be destroyed and recreated to reflect property changes.

TCustomColorBox overrides the inherited CreateWnd method to populate the combo box with the colors specified by the Style property.


TCustomColorBox.DrawItem
 VCL Reference

TCustomColorBox.DrawItem

TCustomColorBox	See also

Renders an individual item in the color box.

procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); override;

Description

Applications can’t call this protected method. It is called automatically when the color box needs to paint one of the items in the list. DrawItem draws a small box that displays the color that the item represents, followed by the name of the color.

Index is the index of the item to draw, where 0 specifies the first item, 1 specifies the second item, and so on.

Rect indicates the boundaries of the item on the color box’s canvas, in client coordinates.

State indicates state information that can affect the way the item is drawn. In TCustomColorBox, DrawItem uses State to determine whether an item is selected, but ignores all other state information.


TCustomColorBox.KeyDown
 VCL Reference

TCustomColorBox.KeyDown

TCustomColorBox	See also

Generates an OnKeyDown event.

procedure KeyDown(var Key: Char; Shift: TShiftState); override;

Description

Applications can’t call this protected method. It is called automatically when the user first presses a key while the color box has focus.

Key is the key code of the key that was pressed.

Shift indicates the state of the Ctrl, Shift, and Alt keys when Key was pressed.

TCustomColorBox overrides the inherited KeyDown method to prepare for the selection of a new color. It then calls the inherited method, which generates an OnKeyDown event.


TCustomColorBox.KeyPress
 VCL Reference

TCustomColorBox.KeyPress

TCustomColorBox	See also

Generates an OnKeyPress event.

procedure KeyPress(var Key: Char); override;

Description

Applications can’t call this protected method. It is called automatically when the user presses a key while the color box has focus.

Key is the key code of the key that was pressed.

TCustomColorBox overrides the inherited KeyPress method to display a color selection dialog if the user presses the Enter key while the custom color item has focus. Otherwise, KeyPress calls the inherited method, which generates an OnKeyPress event.


TCustomColorBox.PickCustomColor
 VCL Reference

TCustomColorBox.PickCustomColor

TCustomColorBox	See also

Displays the color selection dialog so that the user can select a custom color.

function PickCustomColor: Boolean; virtual;

Description

Applications can’t call this protected method. It is called automatically when the user selects the custom color item. PickCustomColor displays the color selection dialog, with the selected color initialized to the last-selected custom color. If the user selects a color in this dialog, PickCustomColor updates the image of the item to display the selected color and returns True. If the user cancels from the color selection dialog, PickCustomColor returns False.

Override PickCustomColor to provide a different response when the user selects the custom color item.


TCustomColorBox.PopulateList
 VCL Reference

TCustomColorBox.PopulateList

TCustomColorBox	See also

Fills the color box with items that reflect the colors specified by the Style property.

procedure PopulateList;

Description

Applications can’t call this protected method. It is called automatically when the color box needs to fill itself with items. (For example, when the color box is first created or when the Style property changes)

PopulateList fills the color box with the items indicated by the Style property.


TCustomColorBox.Select
 VCL Reference

TCustomColorBox.Select

TCustomColorBox	See also

Generates an OnSelect event.

procedure Select; override;

Description

Applications can’t call this protected method. It is called automatically when the user selects a color.

TCustomColorBox overrides the inherited method to display a color selection dialog if the user selects the custom color item. After checking for a custom color, TCustomColorBox calls the inherited method, which generates an OnSelect event.


TCustomColorBox.SetStyle
 VCL Reference

TCustomColorBox.SetStyle

TCustomColorBox	See also

Sets the Style property.

procedure SetStyle;

Description

SetStyle is the protected write implementation of the Style property. It repopulates the list to reflect the new value of Style, and disables the color box if the new value for Style results in an empty color box.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomCombo

TCustomComboBox

TCustomColorBox


TCustomDockForm
 VCL Reference

TCustomDockForm

Hierarchy	Properties	Methods	See also

TCustomDockForm is the default floating dock site class for TControl objects.

Unit

Forms

Description

When a control is created, TCustomDockForm is the type assigned to its FloatingDockSiteClass property. You can use TCustomDockForm as the basis for your own floating dock site class, and then assign the new class to the a control’s FloatingDockSiteClass property.


 VCL Reference

TCustomDockForm properties

TCustomDockForm	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveOleControl

BorderStyle

Canvas

ClientRect

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

KeyPreview

Menu

ModalResult

Monitor

OleFormObject

Parent

PixelsPerInch

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

HelpContext

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomDockForm properties

TCustomDockForm	By object	Legend

Action

Active

ActiveControl

ActiveOleControl

Align

AlignDisabled

Anchors

AutoScroll

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Designer

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

KeyPreview

Left

LRDockWidth

Menu

ModalResult

Monitor

Name

OleFormObject

Owner

Parent

ParentWindow

PixelsPerInch

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc

WindowState


 VCL Reference

TCustomDockForm methods

TCustomDockForm	Alphabetically	Legend

In TCustomDockForm

Create

DoAddDockClient

DoRemoveDockClient

GetSiteInfo

Loaded

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

CreateNew

DefaultHandler

DefocusControl

Destroy

Dock

FocusControl

GetFormImage

Hide

IsShortCut

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomDockForm methods

TCustomDockForm	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

DoAddDockClient

Dock

DockDrop

DoRemoveDockClient

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSiteInfo

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TCustomDockForm.Create
 VCL Reference

TCustomDockForm.Create

TCustomDockForm	See also

Creates an instance of TCustomDockForm.

constructor Create(AOwner: TComponent); override;

Description

Typically, applications do not create instances of TCustomDockForm. Instead, this class is instantiated automatically as needed by controls that specify it as the value of their FloatingDockSiteClass property.

AOwner is the dock form’s owner.


TCustomDockForm.DoAddDockClient
 VCL Reference

TCustomDockForm.DoAddDockClient

TCustomDockForm	See also

Performs actions when a control is docked to the dock form.

procedure DoAddDockClient(Client: TControl; const ARect: TRect); override;

Description

Client is the control being docked on the dock form.

ARect is the area in which Client is being docked.

DoAddDockClient sets the dock form’s caption to the client’s caption, if it is the first client. Then DoAddDockClient sets the Align property of the client to alClient and calls the inherited DoAddDockClient method.


TCustomDockForm.DoRemoveDockClient
 VCL Reference

TCustomDockForm.DoRemoveDockClient

TCustomDockForm	See also

Performs actions when a control is undocked from the dock form.

procedure DoRemoveDockClient(Client: TControl); override;

Description

Client is the control being undocked.

DoRemoveDockClient calls the inherited DoRemoveDockClient method. Then, if the dock form contains no more clients, DoRemoveDockClient calls the Release method.


TCustomDockForm.GetSiteInfo
 VCL Reference

TCustomDockForm.GetSiteInfo

TCustomDockForm	See also

Returns docking information for the dock form.

procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; MousePos: TPoint); var CanDock: Boolean); override;

Description

GetSiteInfo overrides the inherited method, setting CanDock to True if the dock form contains one or more clients.


TCustomDockForm.Loaded
 VCL Reference

TCustomDockForm.Loaded

TCustomDockForm

Specifies actions to perform when the dock form is loaded.

procedure Loaded; override;

Description

Loaded calls the inherited method. Then Loaded sets the dock form’s active control, if possible.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TCustomDockForm


TCustomImageList
 VCL Reference

TCustomImageList

Hierarchy	Properties	Methods	Events	See also

TCustomImageList is the base class for collections of same-sized images, each of which can be referred to by its index.

Unit

ImgList

Description

Image lists are used to efficiently manage large sets of icons or bitmaps. All images in an image list are contained in a single, wide bitmap in screen device format. An image list may also include a monochrome bitmap that contains masks that are combined with the images to produce a transparent effect such as is common in icons.


 VCL Reference

TCustomImageList properties

TCustomImageList	Alphabetically	Legend

In TCustomImageList

AllocBy

BkColor

BlendColor

Count

DrawingStyle

Handle

Height

ImageType

Masked

ShareImages

Width

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TCustomImageList properties

TCustomImageList	By object	Legend

AllocBy

BkColor

BlendColor

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

DrawingStyle

Handle

Height

ImageType

Masked

Name

Owner

ShareImages

Tag

VCLComObject

Width


TCustomImageList.AllocBy
 VCL Reference

TCustomImageList.AllocBy

TCustomImageList	See also

Sets the number of images by which the image list grows when it needs to make room for new images.

property AllocBy: Integer;

Description

Use the AllocBy method to specify the number of new images that can be added to the resized image list.


TCustomImageList.BkColor
 VCL Reference

TCustomImageList.BkColor

TCustomImageList	See also

Determines which background color to use when drawing an image.

property BkColor: TColor;

Description

Use BkColor to specify the color used for the masked regions of the images in the list.  When BkColor is clNone, the image is drawn transparently using the mask to define the transparent areas. Otherwise, the value of BkColor appears in the masked out portions.

Note:	BkColor has no effect when the Masked property is False.


TCustomImageList.BlendColor
 VCL Reference

TCustomImageList.::BlendColor

TCustomImageList	See also

Determines which foreground color to use when drawing an image.

property BlendColor: TColor;

Description

Set BlendColor to cause the images in the list to be combined with the specified color when the DrawingStyle is dsFocus or dsSelected.  More of BlendColor is combined with the images when DrawingStyle is dsSelected.  clNone specifies no blend color while clDefault specifies the system highlight .


TCustomImageList.Count
 VCL Reference

TCustomImageList.Count

TCustomImageList	See also

Indicates the number of images in the image list.

property Count: Integer;

Description

Use Count when iterating through the images in the image list.  Retrieve the individual images using the GetBitmap method.  Draw individual images using the Draw method.


TCustomImageList.DrawingStyle
 VCL Reference

TCustomImageList.DrawingStyle

TCustomImageList	See also

Specifies the style to be used when the image list is drawing an image.

property DrawingStyle: TDrawingStyle;

Description

Use the DrawingStyle property to control how the image is to appear. DrawingStyle controls how much of the blend color specified by BlendColor is combined with the foreground, or what background color to use.


TCustomImageList.Handle
 VCL Reference

TCustomImageList.::Handle

TCustomImageList	See also

Designates the handle for the image list.

property Handle: HImageList;

Description

Handle is the Windows image list object handle. Use this handle when calling Windows API functions that require it.


TCustomImageList.Height
 VCL Reference

TCustomImageList.Height

TCustomImageList	See also

Specifies the height of images within the image list.

property Height: Integer;

Description

Use the Height property to specify the height of images before any are added to the image list. The image list is cleared when this value changes.


TCustomImageList.ImageType
 VCL Reference

TCustomImageList.ImageType

TCustomImageList	See also

Determines whether the image list uses the associated mask when drawing.

property ImageType: TImageType;

Description

Use the ImageType property to control how the image is to appear. These are the possible values:

Value	Meaning

itImage	Draws the image.

itMask	Draws the image using the image mask.


TCustomImageList.Masked
 VCL Reference

TCustomImageList.Masked

TCustomImageList	See also

Specifies whether the image list includes masks that can be combined with the images.

property Masked: Boolean;

Description

Set the Masked property to True to combine the images with masks.  The masked portion of the bitmap is drawn transparently, or replaced by the color specified by the BkColor property.

Masked indicates whether the image list stores masks to combine with the images. To use those masks, the ImageType property indicates whether to draw the image or the mask.


TCustomImageList.ShareImages
 VCL Reference

TCustomImageList.ShareImages

TCustomImageList	See also

Specifies whether the image list destroys its handle when the image list is destroyed.

property ShareImages: Boolean;

Description

Set the ShareImages property to False to ensure that the handle to the image list is freed when the image list is destroyed.


TCustomImageList.Width
 VCL Reference

TCustomImageList.Width

TCustomImageList	See also

Specifies the width of all images within the image list.

property Width: Integer;

Description

Use the Width property to specify the width of images before any are added to the image list. The image list is cleared when this value changes.


 VCL Reference

TCustomImageList events

TCustomImageList	Alphabetically	Legend

In TCustomImageList

OnChange


 VCL Reference

TCustomImageList events

TCustomImageList	By object	Legend

OnChange


TCustomImageList.OnChange
 VCL Reference

TCustomImageList.OnChange

TCustomImageList	See also

Occurs when the image list changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to execute code when the image list changes. Any objects registered with the RegisterChanges method will also be notified.


 VCL Reference

TCustomImageList methods

TCustomImageList	Alphabetically	Legend

In TCustomImageList

Add

AddIcon

AddImages

AddMasked

Assign

AssignTo

Change

Clear

Create

CreateSize

DefineProperties

Delete

Destroy

DoDraw

Draw

DrawOverlay

FileLoad

GetBitmap

GetHotSpot

GetIcon

GetImageBitmap

GetImages

GetInstRes

GetMaskBitmap

GetResource

HandleAllocated

HandleNeeded

Initialize

Insert

InsertIcon

InsertMasked

Move

Overlay

RegisterChanges

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomImageList methods

TCustomImageList	By object	Legend

Add

AddIcon

AddImages

AddMasked

AfterConstruction

Assign

AssignTo

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateSize

DefaultHandler

DefineProperties

Delete

Destroy

DestroyComponents

Destroying

Dispatch

DoDraw

Draw

DrawOverlay

ExecuteAction

FieldAddress

FileLoad

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetBitmap

GetHotSpot

GetIcon

GetImageBitmap

GetImages

GetInstRes

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMaskBitmap

GetNamePath

GetParentComponent

GetResource

HandleAllocated

HandleNeeded

HasParent

InheritsFrom

Initialize

InitInstance

Insert

InsertComponent

InsertIcon

InsertMasked

InstanceSize

IsImplementorOf

MethodAddress

MethodName

Move

NewInstance

Overlay

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

SafeCallException

SetSubComponent

UnRegisterChanges

UpdateAction


TCustomImageList.Add
 VCL Reference

TCustomImageList.Add

TCustomImageList	See also

Adds an Image and its Mask to the image list object.

function Add(Image, Mask: TBitmap): Integer;

Description

Use the Add method to add images with their masks to an image list. It returns the index of the added image, or -1 if it fails. When the Masked property of the image list is False, the second bitmap is ignored; it can be set to nil.


TCustomImageList.AddIcon
 VCL Reference

TCustomImageList.AddIcon

TCustomImageList	See also

Adds an icon to the image list object.

function AddIcon(Image: TIcon): Integer;

Description

Use the AddIcon method to add the icon specified by the Image parameter to an image list. AddIcon returns the index of the added image, or -1 if it fails.


TCustomImageList.AddImages
 VCL Reference

TCustomImageList.AddImages

TCustomImageList	See also

Adds images from another image list to the image list object.

procedure AddImages(Value: TCustomImageList);

Description

Use the AddImages method to add the images from another image list. Value specifies the source image list. AddImages returns -1 if it fails, 0 if it’s successful.


TCustomImageList.AddMasked
 VCL Reference

TCustomImageList.AddMasked

TCustomImageList	See also

Adds an image to the image list along with a color which is used to generate the transparent mask.

function AddMasked(Image: TBitmap; MaskColor: TColor): Integer;

Description

AddMasked is similar to Add except that a mask bitmap is not specified. Instead, a color that can be used to automatically generate the masks is specified. Each pixel of the specified color in the image bitmap is changed to black, and the corresponding bit in the mask is set to one. As a result, any pixel in the image that matches the specified color is transparent when the image is drawn. AddMasked returns -1 if it fails, 0 if it’s successful.


TCustomImageList.Assign
 VCL Reference

TCustomImageList.Assign

TCustomImageList	See also

Copies the information from one image list to another.

procedure Assign(Source: TPersistent); override;

Description

Use this method to copy another object's information to the image list.

If Source is another image list (TCustomImageList descendant), Assign discards any current image information and replaces it with the information from Source.

If Source is nil, Assign clears the image list.

If Source is any other type of object, Assign calls its inherited method, which can copy from any source object that implements a way to copy to an image list in its AssignTo method.


TCustomImageList.AssignTo
 VCL Reference

TCustomImageList.AssignTo

TCustomImageList	See also

Copies the image list’s properties to another image list.

procedure AssignTo(Dest: TPersistent); override;

Description

Applications do not call the protected AssignTo method. Instead, call the public Assign method of the destination image list. AssignTo is called when the image list is passed as the Source parameter of another object’s Assign method and that Assign method can’t copy information to the image list. The object whose Assign method was called is passed as the Dest parameter. AssignTo gives the image list an opportunity to copy properties to objects that were not created with the image list in mind.


TCustomImageList.Change
 VCL Reference

TCustomImageList.Change

TCustomImageList	See also

Generates an OnChange event.

procedure change;

Description

Change calls the OnChange event handler if it is assigned.  Override Change to block this event or provide additional responses to changes in the image list.


TCustomImageList.Clear
 VCL Reference

TCustomImageList.Clear

TCustomImageList	See also

Clears all images from the image list.

procedure Clear;

Description

Use the Clear method to remove all images from the image list. Use the Delete method to delete one image from the image list.


TCustomImageList.Create
 VCL Reference

TCustomImageList.Create

TCustomImageList	See also

Creates an empty image list.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an image list at runtime. ImageLists placed on forms or data modules at design time are created automatically.  Specify the owner of the new imagelist using the AOwner parameter.

The new image list contains no images and has a default size of 16 by 16 pixels.


TCustomImageList.CreateSize
 VCL Reference

TCustomImageList.CreateSize

TCustomImageList	See also

Creates an empty image list of a specified size.

constructor CreateSize(AWidth, AHeight: Integer);

Description

Use CreateSize to create an image list object at runtime with an image size other than the default of 16 x 16 pixels. The initial size of the image list is determined by the AHeight and AWidth parameters. The height and width can be altered after the image list has been created using the Width and Height properties.


TCustomImageList.DefineProperties
 VCL Reference

TCustomImageList.DefineProperties

TCustomImageList	See also

Allows bitmap data to be saved and loaded.

procedure DefineProperties(Filer: TFiler)override;

Description

DefineProperties allows the image list to create pseudo properties that are loaded and saved with the image list. TCustomImageList overrides the inherited method to save or load the bitmap image in addition to the other published properties.


TCustomImageList.Delete
 VCL Reference

TCustomImageList.Delete

TCustomImageList	See also

Deletes a particular image from the image list.

procedure Delete(Index: Integer);

Description

Use the Delete method to delete an image specified by Index in the image list. Use the Clear method to delete all images in the image list.


TCustomImageList.Destroy
 VCL Reference

TCustomImageList.Destroy

TCustomImageList	See also

Destroys the image list and releases the memory allocated to it.

destructor Destroy;

Description

Destroy first calls UnRegisterChanges to unregister any objects registered to receive notification when the image list changed, and frees all helper objects associated with the image list.

Destroy seldom needs to be called. However, when an image list is constructed without an owner by the Create or CreateSize method, call Free to release memory and dispose of the object. Free checks to see if the pointer is nil before calling Destroy.


TCustomImageList.DoDraw
 VCL Reference

TCustomImageList.::DoDraw

TCustomImageList	See also

Draws the specified image onto the provided Canvas in the indicated style.

procedure DoDraw(Index: Integer; Canvas: TCanvas; X, Y: Integer; Style: Cardinal; Enabled: Boolean = True); virtual;

Description

Applications can’t call the protected DoDraw method. It provides the underlying implementation of the public Draw method.

Index specifies an image to draw.

Canvas indicates the drawing surface on which the image is rendered.

X and Y specify the top-left corner of the image on Canvas.

Style encodes how the image blends color or uses a mask (the DrawingStyle and ImageType).

Enabled indicates whether the image appears as a gray-mapped image. If Enabled is False, DoDraw renders a gray-mapped version of the image.


TCustomImageList.Draw
 VCL Reference

TCustomImageList.Draw

TCustomImageList	See also	Example

Draws the image specified by the Index parameter onto the provided Canvas.

procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; Enabled: Boolean=True); overload;

procedure Draw(Canvas: TCanvas; X, Y, Index: Integer; ADrawingStyle: TDrawingStyle; AImageType: TImageType; Enabled: Boolean=True); overload;

Description

Use the Draw method to draw one of the images in the image list onto a specified canvas.

Canvas is the drawing surface on which to render the image.

X and Y specify the location where the top-left corner should appear on Canvas.

Index indicates which image to draw, where 0 specifies the first image, 1 specifies the second image, and so on.

ADrawingStyle indicates how the color of the image may be altered. If this parameter is not specified, Draw uses the value of the DrawingStyle property.

AImageType indicates whether to draw the image or its associated mask. If this parameter is not specified, Draw uses the value of the ImageType property.

Enabled indicates whether the image appears as a gray-mapped image. If Enabled is False, Draw renders a gray-mapped version of the image. Because Enabled has a default value of True, this parameter can be omitted if the image should not be grayed.


TCustomImageList.DrawOverlay
 VCL Reference

TCustomImageList.DrawOverlay

TCustomImageList	See also

Draws an image and an overlay onto the provided Canvas.

type TOverlay = 0..3;

procedure DrawOverlay(Canvas: TCanvas; X, Y: Integer; ImageIndex: Integer; Overlay: TOverlay; Enabled: Boolean = True); overload;

procedure DrawOverlay(Canvas: TCanvas; X, Y: Integer; ImageIndex: Integer; Overlay: TOverlay; ADrawingStyle: TDrawingStyle; AImageType: TImageType; Enabled: Boolean = True); overload;

Description

An overlay mask is an image drawn transparently over another image. Any image can be used as an overlay mask. To draw an overlay mask over an image use the DrawOverlay method with the index of the overlay mask.

Canvas is the drawing surface on which to draw the overlay.

X and Y specify the location where the top-left corner should appear on Canvas.

ImageIndex indicates which image to draw, where 0 specifies the first image, 1 specifies the second image, and so on.

Overlay specifies the index of the overlay mask to use. This index is assigned to the image that is used as an overlay mask by calling the Overlay method.

ADrawingStyle indicates how the color of the image may be altered. If this parameter is not specified, Draw uses the value of the DrawingStyle property.

AImageType indicates whether to draw the image or its associated mask. If this parameter is not specified, Draw uses the value of the ImageType property.

Enabled indicates whether the image appears as a gray-mapped image. If Enabled isFalse, DoDraw renders a gray-mapped version of the image. Because Enabled has a default value of True, this parameter can be omitted if the image should not be grayed.


TCustomImageList.FileLoad
 VCL Reference

TCustomImageList.::FileLoad

TCustomImageList	See also

Loads a resourced image into the image list.

function FileLoad(ResType: TResType; const Name: string; MaskColor: TColor): Boolean;

Description

Use the FileLoad method to load a bitmap, cursor, or icon from a resource file. Use ResType to specify the type of resource. Use Name to identify the resource by name. Use MaskColor to set the transparent color for the images. FileLoad returns True if successful.

Note:	Within a package, FileLoad returns an error. GetInstRes must be used to load a resource from within a package.


TCustomImageList.GetBitmap
 VCL Reference

TCustomImageList.GetBitmap

TCustomImageList	See also	Example

Retrieves a specified image as a bitmap.

procedure GetBitmap(Index: Integer; Image: TBitmap);

Description

Use the GetBitmap method to obtain a particular image in the image list as a bitmap object. Index denotes the index of the image. GetBitmap assigns the image to the TBitmap object passed in as the Image parameter.


TCustomImageList.GetHotSpot
 VCL Reference

TCustomImageList.GetHotSpot

TCustomImageList	See also

Returns the hot spot location associated with the current drag image.

function GetHotSpot: TPoint; virtual;

Description

Use the GetHotSpot method to obtain the position of the hot spot of the current drag image.


TCustomImageList.GetIcon
 VCL Reference

TCustomImageList.GetIcon

TCustomImageList	See also

Returns the image specified by Index as an icon into the Image parameter.

procedure GetIcon(Index: Integer; Image: TIcon); overload;

procedure GetIcon(Index: Integer; Image: TIcon; ADrawingStyle: TDrawingStyle, AImageType: TImageType); overload;

Description

Call GetIcon to obtain a particular image in the image list as an icon.

Index identifies the desired image, where 0 specifies the first image, 1 specifies the second image, and so on.

Image is a TIcon object that receives the new image.

ADrawingStyle specifies the amount of color that is blended with the image to achieve various affects. When GetIcon is called using the version that does not take an ADrawingStyle parameter, it uses the value of the DrawingStyle property.

AImageType specifies whether the image is rendered using a mask. When GetIcon is called using the version that does not take an AImageType parameter, it uses the value of the ImageType property.


TCustomImageList.GetImageBitmap
 VCL Reference

TCustomImageList.GetImageBitmap

TCustomImageList	See also

Returns a handle to a bitmap containing all of the images in the image list.

function GetImageBitmap: HBITMAP;

Description

Use the GetImageBitmap method to obtain a Windows handle for the bitmap that contains all images in the image list. GetImageBitmap returns 0 if unsuccessful.


TCustomImageList.GetImages
 VCL Reference

TCustomImageList.GetImages

TCustomImageList	See also

Returns a specified image and its mask as bitmaps.

procedure GetImages(Index: Integer; Image, Mask: TBitmap);

Description

Use GetImages to obtain the image (and its mask) identified by the Index parameter.

Index specifies the image (and mask) to return, where 0 identifies the first image, 1 the second image, and so on.

Image is a TBitmap object that receives the image of the bitmap.

Mask is a TBitmap object that receives the image of the mask.


TCustomImageList.GetInstRes
 VCL Reference

TCustomImageList.GetInstRes

TCustomImageList	See also

Loads a specified bitmap, cursor, or icon resource into the image list.

type

  TLoadResource = (lrDefaultColor, lrDefaultSize, lrFromFile, lrMap3DColors, lrTransparent, lrMonoChrome);

  TLoadResources = set of TLoadResource;

function GetInstRes(Instance: THandle; ResType: TResType; const Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; overload;

function GetInstRes(Instance: THandle; ResType: TResType; ResID: DWORD; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean; overload;

Description

Use the GetInstRes method to load bitmap, cursor, or icon resource into an image list.

Use Instance to specify the instance handle of the resource module. Use ResType to indicate the type of resource (rtBitmap, rtCursor or rtIcon). Use Name or ResID to identify the resource by name or ID, respectively. Use MaskColor to set the transparent color for the image. LoadFlags specifies how to load the image. A combination of the following values can be used.

Value	Meaning

lrDefaultColor	Use the color format of the display.

lrDefaultSize	Use system metrics for Height and Width if the Width parameter to GetResource is 0. If the Width parameter is 0 and this option is not specified for cursors and icons, the resources width and height will be used.

lrFromFile	Loads the resource from the specified file.

lrMap3DColors	Replaces the images gray shades with the 3D windows colors.

lrTransparent	Replaces the color table entry for the first pixel of the resource with the default window color (COLOR_WINDOW). This applies only to images with color tables.

lrMonoChrome	Loads the resource as black and white.

Note:	GetInstRes must be used to load a resource from within a package. Within a package, GetResource or FileLoad returns an error.


TCustomImageList.GetMaskBitmap
 VCL Reference

TCustomImageList.GetMaskBitmap

TCustomImageList	See also

Returns a handle to a bitmap containing all masks for images in the image list.

function GetMaskBitmap: HBITMAP;

Description

Use the GetMaskBitmap to obtain a bitmap that contains all masks in the image list. GetMaskBitmap returns 0 if unsuccessful.


TCustomImageList.GetResource
 VCL Reference

TCustomImageList.GetResource

TCustomImageList	See also

Loads the specified bitmap, cursor, or icon resource into the image list.

type

  TLoadResource = (lrDefaultColor, lrDefaultSize, lrFromFile, lrMap3DColors, lrTransparent, lrMonoChrome);

  TLoadResources = set of TLoadResource;

function GetResource(ResType: TResType; const Name: string; Width: Integer; LoadFlags: TLoadResources; MaskColor: TColor): Boolean;

Description

Use the GetResource method to load bitmap, cursor, or icon resource into an image list.

Note:	Within a package, GetResource returns an error. GetInstRes must be used to load a resource from within a package.

ResType specifies the type of graphical resource that is to be loaded into the image list and can be rtBitmap, rtCursor or rtIcon. Use Name to identify the resource by name. Use MaskColor to set the transparent color for the images in the file. LoadFlags specifies how to load the image. A combination of the following values can be used.

Value	Meaning

lrNone	No specific resource flags.

lrDefaultColor	Use the color format of the display.

lrDefaultSize	Use system metrics for Height and Width if the Width parameter to GetResource is 0. If the Width parameter is 0 and this option is not specified for cursors and icons, the resources width and height will be used.

lrFromFile	Loads the resource from the specified file.

lrMap3DColors	Replaces the images gray shades with the 3D windows colors.

lrTransparent	Replaces the color table entry for the first pixel of the resource with the default window color (COLOR_WINDOW). This applies only to images with color tables.

lrMonoChrome	Loads the resource as black and white.


TCustomImageList.HandleAllocated
 VCL Reference

TCustomImageList.HandleAllocated

TCustomImageList	See also

Indicates whether a window handle exists for the image list.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine if a handle exists for the image list. HandleAllocated returns True if the Windows image list has been created and a handle is available, False otherwise. HandleAllocated doesn’t create a handle if it doesn’t already exist.

Note:	Getting the Handle property of creates the Windows image list automatically if it didn't previously exist, and returns the resulting handle.


TCustomImageList.HandleNeeded
 VCL Reference

TCustomImageList.HandleNeeded

TCustomImageList	See also

Creates an image list handle for the image list if one doesn't already exist.

procedure HandleNeeded;

Description

Use HandleNeeded to create a Windows image list for the image list component when one doesn’t already exist. This method is called automatically when an image list’s handle property is accessed.


TCustomImageList.Initialize
 VCL Reference

TCustomImageList.Initialize

TCustomImageList	See also

Initializes a newly allocated image list.

procedure Initialize; virtual;

Description

Initialize is called from the constructor of the image list. It sets numerous image list properties to their default values and creates instances of helper objects used internally.


TCustomImageList.Insert
 VCL Reference

TCustomImageList.Insert

TCustomImageList	See also

Inserts a bitmap and its mask into the image list following a specified image.

procedure Insert(Index: Integer; Image, Mask: TBitmap);

Description

Use the Insert method to insert a bitmap and its mask into the image list.  The image is inserted following the image specified by Index.


TCustomImageList.InsertIcon
 VCL Reference

TCustomImageList.::InsertIcon

TCustomImageList	See also

Inserts an icon at a specified position in the image list.

procedure InsertIcon(Index: Integer; Image: TIcon);

Description

Use the InsertIcon method to insert an icon into the image list. The icon is inserted following the image specified by Index.


TCustomImageList.InsertMasked
 VCL Reference

TCustomImageList.InsertMasked

TCustomImageList	See also

Inserts a bitmap at a specified position, creating the mask from a specified transparent color.

procedure InsertMasked(Index: Integer; Image: TBitmap; MaskColor: TColor);

Description

Use the InsertMasked method to insert a masked image into the image list. The new image is inserted following the image specified by Index. Use MaskColor to identify the color in the image used to generate the Mask.


TCustomImageList.Move
 VCL Reference

TCustomImageList.Move

TCustomImageList	See also

Moves a specified image to another position.

procedure Move(CurIndex, NewIndex: Integer);

Description

Use the Move method to move an image to another position in the image list. Specify the current position using CurIndex, and the new position using NewIndex.


TCustomImageList.Overlay
 VCL Reference

TCustomImageList.::Overlay

TCustomImageList	See also

Identifies an image in the list as an image that can be used as an overlay mask.

type TOverlay = 0..3;

function Overlay(ImageIndex: Integer; Overlay: TOverlay): Boolean;

Description

Use Overlay to assign an overlay index to one of the images in the list. Once an image has an overlay index, it can be used as an overlay mask. An overlay mask is an image drawn transparently over another image.

ImageIndex identifies the image that can act as an overlay mask.

Overlay is the overlay index to assign to that image. It must be a value between 0 and 3 (inclusive). Note that this means at most four images can be used as overlay masks.

If successful, Overlay returns True.

To draw an overlay mask over an image use the DrawOverlay method with the index of the overlay mask.


TCustomImageList.RegisterChanges
 VCL Reference

TCustomImageList.RegisterChanges

TCustomImageList	See also

Registers an object to be notified when changes occur in the image list.

procedure RegisterChanges(Value: TChangeLink);

Description

Use the RegisterChanges method to have an object notified whenever changes occur in the image list. The TChangeLink's OnChange event is called whenever a change in the image list occurs.

Create a change link object for each object that should be notified of changes. Register each object by calling RegisterChanges and passing its change link object as the Value parameter. The OnChange event of all registered change link objects is then triggered when a change occurs in the image list. Any code assigned to the OnChange event handlers will execute.


TCustomImageList.Replace
 VCL Reference

TCustomImageList.Replace

TCustomImageList	See also

Replaces an image in the image list with a new image and mask.

procedure Replace(Index: Integer; Image, Mask: TBitmap);

Description

Use the Replace method to replace the image at the Index position in the image list with a new Image and overlay Mask.


TCustomImageList.ReplaceIcon
 VCL Reference

TCustomImageList.ReplaceIcon

TCustomImageList	See also

Replaces an image in the image list with an icon.

procedure ReplaceIcon(Index: Integer; Image: TIcon);

Description

Use the ReplaceIcon method to replace the Image at the Index position in the image list with a new icon.


TCustomImageList.ReplaceMasked
 VCL Reference

TCustomImageList.ReplaceMasked

TCustomImageList	See also

Replaces an image in the image list with a new image and automatically-generated mask.

procedure ReplaceMasked(Index: Integer; NewImage: TBitmap; MaskColor: TColor);

Description

Use the ReplaceMasked method to replace the image at Index position within the image list specified by NewImage and the mask generated from NewImage by masking out all pixels of the color specified by MaskColor.


TCustomImageList.ResInstLoad
 VCL Reference

TCustomImageList.ResInstLoad

TCustomImageList	See also

Loads a resource into the image list.

function ResInstLoad(Instance: THandle; ResType: TResType; const Name: string; MaskColor: TColor): Boolean;

Description

Use the ResoInstLoad method to load a resource of type TResType into the image list. Use Instance to specify the instance handle of the resource module, and Name to identify the resource within that module. MaskColor is used to create the mask for the resulting image. ResInstLoad should be used rather than ResourceLoad to load a resource from within a package.

ResInstLoad returns True if it is successful, False otherwise.


TCustomImageList.ResourceLoad
 VCL Reference

TCustomImageList.ResourceLoad

TCustomImageList	See also

Loads a resource into the image list.

function ResourceLoad(ResType: TResType; const Name: string; MaskColor: TColor): Boolean;

Description

Use the ResourceLoad method to load a resource of type TResType into the image list. Use Name to identify the resource. MaskColor is used to create the mask for the resulting image. ResourceLoad returns True if successful, False otherwise.

Note:	Within a package, use ResInstLoad instead of ResourceLoad. ResourceLoad returns an error when called from within a package.


TCustomImageList.UnRegisterChanges
 VCL Reference

TCustomImageList.UnRegisterChanges

TCustomImageList	See also

Removes an object from the list of objects to be notified when the image list changes.

procedure UnRegisterChanges(Value: TChangeLink);

Description

Use the UnRegisterChanges method to unregister a TChangeLink object. The object will no longer receive notification when the image list changes.


Hierarchy

TObject

TPersistent

TComponent

TCustomImageList


TCustomLabel
 VCL Reference

TCustomLabel

Hierarchy	Properties	Methods	Events	See also

TCustomLabel is the base class for non-windowed controls that display text  on a form.

Unit

StdCtrls

Description

Use TCustomLabel as a base class when defining objects that display text  that users can’t edit. TCustomLabel introduces several new properties and methods to control the appearance of the text.

TCustomLabel is not a descendant of TWinControl, so it does not have its own window and can’t receive direct input from the keyboard. To define an object that responds to direct keyboard input in addition to displaying text, use TCustomStaticText as a base class.

Do not create instances of TCustomLabel. To put a label on a form, use a TLabel object.


 VCL Reference

TCustomLabel properties

TCustomLabel	Alphabetically	Legend

In TCustomLabel

Alignment

AutoSize

FocusControl

Layout

ShowAccelChar

Transparent

WordWrap

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomLabel Properties

TCustomLabel	By Object	Legend

Action

Align

Alignment

Anchors

AutoSize

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Enabled

Floating

FloatingDockSiteClass

FocusControl

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Layout

Left

LRDockWidth

Name

Owner

Parent

ShowAccelChar

ShowHint

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

WordWrap


TCustomLabel.Alignment
 VCL Reference

TCustomLabel.Alignment

TCustomLabel	See also

Controls the horizontal placement of the text within the label.

property Alignment: TAlignment;

Description

Set Alignment to specify how the text of the label is justified within the ClientRect of the label control.

The effect of the Alignment property is more obvious if the WordWrap property is True and the label includes more than one line of text.


TCustomLabel.AutoSize
 VCL Reference

TCustomLabel.AutoSize

TCustomLabel	See also 	Example

Determines whether the size of the label automatically resizes to accommodate the text.

property AutoSize: Boolean;

Description

Use AutoSize to make the label adjust its size automatically so the client area accommodates the height and width of the text. When AutoSize is False, the label is fixed in size. When AutoSize is True, the size of the label readjusts whenever the text changes. The size of the label is also readjusts when the Font property changes.

When WordWrap is True, the width of the label is fixed. If AutoSize is also True, changes to the text cause the label to change in height. When AutoSize is True and WordWrap is False, the font determines the height of the label, and changes to the text cause the label to change in width.


TCustomLabel.FocusControl
 VCL Reference

TCustomLabel.FocusControl

TCustomLabel	See also

Designates a windowed control associated with the label.

property FocusControl: TWinControl;

Description

Set FocusControl to the windowed control that should receive focus when the user presses the accelerator key specified by the label. Specify an accelerator key by preceding a character in the label text with an ampersand (&) and setting the ShowAccelChar property to True.


TCustomLabel.Layout
 VCL Reference

TCustomLabel.Layout

TCustomLabel	See also

Specifies the vertical placement of the text within the label.

type TTextLayout = (tlTop, tlCenter, tlBottom);

property Layout: TTextLayout;

Description

Set Layout to specify how the text of the label is placed within the ClientRect of the label control. Layout is the vertical analog to the Alignment property.

Layout can be one of the following values:

Value	Meaning

tlTop	The text appears at the top of the label.

tlCenter	The text is vertically centered in the label.

tlBottom	The text appears along the bottom of the label.


TCustomLabel.ShowAccelChar
 VCL Reference

TCustomLabel.ShowAccelChar

TCustomLabel	See also	Example

Determines how an ampersand in the label text is displayed.

property ShowAccelChar: Boolean;

Description

Set ShowAccelChar to True to allow the label to display an underlined accelerator key value. When ShowAccelChar is True, any character preceded by an ampersand (&) appears underlined. If the FocusControl property is set, the windowed control specified by the FocusControl property receives input focus when the user types that underlined character. To display an ampersand when ShowAccelChar is True, use two ampersands (&&) to stand for the single ampersand that is displayed.

Set ShowAccelChar to False to display the label text with all ampersands appearing as ampersands. When ShowAccelChar is False, the value of the FocusControl property is not used.


TCustomLabel.Transparent
 VCL Reference

TCustomLabel.Transparent

TCustomLabel	See also

Specifies whether controls that sit below the label on a form can be seen through the label.

property Transparent: Boolean;

Description

Set Transparent to True to prevent the label from obscuring other controls on the form. For example, if the label is used to add text to a graphic, set Transparent to True so that the label does not stand out as a separate object.

Writing text so that the background is transparent is slower than writing text when Transparent is False. If the label is not obscuring a complicated image, performance can be improved by setting the background color of the label to match the object beneath it and setting Transparent to False.


TCustomLabel.WordWrap
 VCL Reference

TCustomLabel.WordWrap

TCustomLabel	See also

Specifies whether the label text wraps when it is too long for the width of the label.

property WordWrap: Boolean;

Description

Set WordWrap to True to allow the label to display multiple line of text. When WordWrap is True, text that is too wide for the label control wraps at the right margin and continues in additional lines.

Set WordWrap to False to limit the label to a single line. When WordWrap is False, text that is too wide for the label appears truncated.


 VCL Reference

TCustomLabel Events

TCustomLabel	Alphabetically	Legend

In TCustomLabel

OnMouseEnter

OnMouseLeave


 VCL Reference

TCustomLabel Events

TCustomLabel	By Object	Legend

OnMouseEnter

OnMouseLeave


TCustomLabel.OnMouseEnter
 VCL Reference

TCustomLabel.::OnMouseEnter

TCustomLabel 	See also

Occurs when the mouse pointer moves over the label.

property OnMouseEnter: TNotifyEvent;

Description

Write an OnMouseEnter event handler to take specific action when the user moves the mouse over the label. For example, you can use this event to change the font color when the mouse is over the label, and then use the OnMouseLeave event to change it back when the mouse moves off the label.


TCustomLabel.OnMouseLeave
 VCL Reference

TCustomLabel.::OnMouseLeave

TCustomLabel  	See also

Occurs when the mouse pointer moves off from over the label.

property OnMouseLeave: TNotifyEvent;

Description

Write an OnMouseLeave event handler to take specific action when the user moves the mouse off the label. For example, you can use this event to undo changes that were made in an OnMouseEnter event handler.


 VCL Reference

TCustomLabel methods

TCustomLabel	Alphabetically	Legend

In TCustomLabel

AdjustBounds

Create

DoDrawText

GetLabelText

Loaded

Notification

Paint

SetAutoSize

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomLabel Methods

TCustomLabel	By Object	Legend

AdjustBounds

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DoDrawText

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLabelText

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

Paint

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetAutoSize

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomLabel.AdjustBounds
 VCL Reference

TCustomLabel.AdjustBounds

TCustomLabel	See also

Resizes the label when the text changes.

procedure AdjustBounds; dynamic;

Description

When the text in the label or the font changes, AdjustBounds is implicitly called. It redraws the text in the client area, and then resizes the label if the AutoSize property is True.

When WordWrap is True, the width of the label is fixed. If AutoSize is also True, changes to the text cause the label to change in height. When AutoSize is True and WordWrap is False, the height of the label is determined by the font, and changes to the text cause the label to change in width.

Override AdjustBounds to make additional adjustments when the text changes.


TCustomLabel.Create
 VCL Reference

TCustomLabel.Create

TCustomLabel	See also

Creates and initializes an instance of TCustomLabel.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TCustomLabel at runtime. Labels placed on forms at design time are created automatically.

AOwner is a component, typically the form, that is responsible for freeing the label.


TCustomLabel.DoDrawText
 VCL Reference

TCustomLabel.DoDrawText

TCustomLabel	See also

Renders the text in the client area.

procedure DoDrawText(var Rect: TRect;Flags: Longint); dynamic;

Description

When the label needs to draw itself, DoDrawText is implicitly called. DoDrawText uses the Windows API function, DrawText, to render the caption in the client area.

The first parameter, Rect, specifies the boundaries of the text within the client area. The second parameter, Flags, specifies how the text is aligned within those boundaries, how tab characters are handled, etc. See the Microsoft Windows API DrawText function for all the possible values of Flags.

Override DoDrawText to render text differently.


TCustomLabel.GetLabelText
 VCL Reference

TCustomLabel.GetLabelText

TCustomLabel	See also

Returns the value of the Caption property.

function GetLabelText: string; virtual;

Description

Call GetLabelText to obtain the string that appears as the text of the label.


TCustomLabel.Loaded
 VCL Reference

TCustomLabel.Loaded

TCustomLabel	See also

Adjusts the size of the label when it is first loaded. .

procedure Loaded; override;

Description

The protected Loaded method is called immediately after a saved version of the form that contains the label is loaded into memory. TCustomLabel uses this method to adjust the size of the label to the text it contains if the AutoSize property is True.


TCustomLabel.Notification
 VCL Reference

TCustomLabel.Notification

TCustomLabel	See also

Responds to notifications when objects are about to be created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

Notification is called automatically when components are created or destroyed. After calling the inherited method, Notification checks whether the windowed control specified by the FocusControl property is about to be destroyed. If the windowed control is going away, Notification sets the FocusControl property to nil.


TCustomLabel.Paint
 VCL Reference

TCustomLabel.Paint

TCustomLabel	See also

Draws the image of the label.

procedure Paint; override;

Description

Paint is called automatically when the label receives a WM_PAINT message from its Parent. Paint writes the text returned by the GetLabelText method.


TCustomLabel.SetAutoSize
 VCL Reference

TCustomLabel.SetAutoSize

TCustomLabel	See also

Sets the AutoSize property.

procedure SetAutoSize(Value: Boolean); override;

Description

SetAutoSize is the protected access method for the AutoSize property. It is exposed as a protected method so descendants can override it to change the implementation of the AutoSize property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomLabel


TCustomListAction
 VCL Reference

TCustomListAction

Hierarchy	Properties	Methods	Events	Using TCustomListAction	See also

TCustomListAction is the base class for action objects that provide items to client controls.

Unit

ListActns

Description

TCustomListAction implements the common behavior for actions that supply the items to a list view, list box or combo box.

When an application sets the Active property of a list action to True, the action fills all client list boxes and combo boxes with items. Each item may include information such as a text caption, an image, and a pointer to data.

When the user selects an item in one of the client controls, the client “executes” the list action, which causes it to generate an OnItemSelected event.

When a TCustomListAction is added to an action manager, it uses the action to generate a drop-down list on a tool bar.


 VCL Reference

TCustomListAction properties

TCustomListAction	Alphabetically	Legend

In TCustomListAction

Active

Count

Images

ItemIndex

Loading

Strings

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomListAction properties

TCustomListAction	By object	Legend

ActionComponent

ActionList

Active

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Images

Index

ItemIndex

Loading

Name

Owner

SecondaryShortCuts

ShortCut

Strings

Tag

VCLComObject

Visible


TCustomListAction.Active
 VCL Reference

TCustomListAction.Active

TCustomListAction 	See also

Indicates whether the list action has supplied items to its client controls.

property Active: Boolean;

Description

Set Active to True to cause the list action to fill all client controls with the items. These Items are supplied by calling the GetItem method, iterating over every index from 0 to Count.


TCustomListAction.Count
 VCL Reference

TCustomListAction.Count

TCustomListAction 	See also

Indicates the number of items this list action represents.

property Count: Integer;

Description

Read Count to determine the number of items the list action supplies to client controls. This value provides an upper limit to the index that is supplied to the GetItem method or the Strings property in order to fetch individual items.

In TCustomListAction, the value of Count is supplied by the OnGetItemCount event handler. If there is no OnGetItemCount event handler, the value of Count is –1. Thus, a Count of –1 indicates that Count is not defined, as opposed to 0, which indicates that there are no items.

Note:	TCustomListAction descendants can override the Count property access method to supply a value to Count that does not rely on an event handler. For example, TStaticListAction stores all of its items in an internal list, and overrides GetCount to indicate the number of items in that list.


TCustomListAction.Images
 VCL Reference

TCustomListAction.Images

TCustomListAction 	See also

Lists the images that the list action supplies along with items.

property Images: TCustomImageList;

Description

For each item that the list action supplies to clients, it can supply an image index along with other information such as the text value. The supplied image index refers to an image in the Images property.

Note:	List actions do not supply images to all clients. The Images property controls the SmallImages property of a list view or the Images property of a TComboBoxEx descendant.


TCustomListAction.ItemIndex
 VCL Reference

TCustomListAction.ItemIndex

TCustomListAction 	See also

Specifies the index of the selected item.

property ItemIndex: Integer;

Description

ItemIndex represents the index of the selected item in all client controls that descend from TCustomListControl. Setting ItemIndex causes these clients to change their selection. When the user updates the selection using one of these clients, TCustomListAction automatically updates the others so that they select the same item.

Note:	List actions do not supply ItemIndex to all clients. The ItemIndex property controls only the ItemIndex property of clients that descend from TCustomListControl.


TCustomListAction.Loading
 VCL Reference

TCustomListAction.Loading

TCustomListAction 	See also

Indicates whether the action is currently adding items to client controls.

property Loading: Boolean;

Description

Loading is used internally to detect when the list action is in the process of supplying client controls with items.


TCustomListAction.Strings
 VCL Reference

TCustomListAction.Strings

TCustomListAction 	See also

Lists the strings that are the values of the items this action supplies.

property Strings[Index: Integer]: String; default;

Description

Read Strings to get or set the text value for any of the items this action supplies to clients.

Index is the index of the item. It is a value from 0 to Count – 1.

In TCustomListAction, Strings is not implemented. Reading Strings always returns an empty string, and setting Strings has no effect.

Descendant classes can override the protected GetString and SetString methods to provide an implementation for this property. However, there is no guarantee that Strings is implemented for any particular TCustomListAction descendant.


 VCL Reference

TCustomListAction events

TCustomListAction	Alphabetically	Legend

In TCustomListAction

OnGetItemCount

OnItemSelected

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TCustomListAction events

TCustomListAction	By object	Legend

OnExecute

OnGetItemCount

OnHint

OnItemSelected

OnUpdate


TCustomListAction.OnGetItemCount
 VCL Reference

TCustomListAction.OnGetItemCount

TCustomListAction 	See also

Occurs when the list action needs to determine the number of items it supplies to client controls.

type

  TGetItemCountEvent = procedure(Sender: TCustomListAction; var Count: Integer) of object;

property OnGetItemCount: TGetItemCountEvent;

Description

The GetCount method generates an OnGetItemCount event to supply the value of the Count property. Write an OnGetItemCount event handler to indicate the number of items for which you are supplying values in the OnGetItem event handler.

Sender is the list action that is supplying data to client controls.

Count returns the number of items this list action supplies to client controls.


TCustomListAction.OnItemSelected
 VCL Reference

TCustomListAction.OnItemSelected

TCustomListAction 	See also

Occurs when a client control executes the action because a user selected one of the items.

type TItemSelectedEvent = procedure(Sender: TCustomListAction; Control: TControl) of object;

property OnItemSelected: TItemSelectedEvent;

Description

Write an OnItemSelected event handler to respond when the user selects one of the items supplied to client controls. Before this event is called, the list action first updates the ItemIndex property of any client controls that descend from TCustomListControl.

Sender is the list action that supplies items to the control in which an item was selected.

Control is the control in which the user selected an item.


 VCL Reference

TCustomListAction methods

TCustomListAction	Alphabetically	Legend

In TCustomListAction

Create

ExecuteTarget

GetCount

GetString

HandlesTarget

Loaded

SetString

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomListAction methods

TCustomListAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCount

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetString

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetString

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TCustomListAction.Create
 VCL Reference

TCustomListAction.Create

TCustomListAction	See also

Creates an instance of TCustomListAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TCustomListAction constructor because actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TCustomListAction instance.


TCustomListAction.ExecuteTarget
 VCL Reference

TCustomListAction.ExecuteTarget

TCustomListAction 	See also

Generates an OnItemSelected event.

procedure ExecuteTarget(Target: TObject); override;

Description

ExecuteTarget is called automatically when the user selects one of the items that the list action supplies to a client list box or combo box.

Target is the control whose item was selected.

ExecuteTarget updates the ItemIndex property of all client controls that descend from  TCustomListControl, and then generates an OnItemSelected event, where your application can respond to the user’s selection.


TCustomListAction.GetCount
 VCL Reference

TCustomListAction.GetCount

TCustomListAction 	See also

Returns the value of the Count property.

function GetCount: Integer; virtual;

Description

GetCount is the protected read implementation of the Count property.

In TCustomListAction, GetCount generates an OnGetItemCount event to determine the number of items that the list action supplies to clients. If there is no OnGetItemCount event handler, GetCount returns –1.

Override GetCount to specify the number of items in some other way. For example, TStaticListAction overrides GetCount to return the number of items in its internal list of items.


TCustomListAction.GetString
 VCL Reference

TCustomListAction.GetString

TCustomListAction 	See also

Returns the value of the Strings property.

function GetString(Index: Integer): String; virtual;

Description

GetString is the protected read implementation of the Strings property.

In TCustomListAction, GetString always returns an empty string.

Override GetString to provide a more meaningful value to the Strings property. For example, TStaticListAction overrides GetString to return the caption of the specified item.


TCustomListAction.HandlesTarget
 VCL Reference

TCustomListAction.HandlesTarget

TCustomListAction 	See also

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget always returns True because the list action’s ability to perform its function is not dependant on any particular target.


TCustomListAction.Loaded
 VCL Reference

TCustomListAction.Loaded

TCustomListAction 	See also

Initializes the action after it is loaded into memory.

procedure Loaded; override;

Description

Loaded is called automatically when the form or data module containing the action has been completely loaded into memory. TCustomListAction overrides the inherited method to set Active and Images properties now that the other components involved (the client controls whose items are set when Active becomes True and the image list component that is the value of Images) are known to be loaded into memory.


TCustomListAction.SetString
 VCL Reference

TCustomListAction.SetString

TCustomListAction 	See also

Sets the value of the Strings property.

function SetString(Index: Integer): String; virtual;

Description

SetString is the protected write implementation of the Strings property.

In TCustomListAction, SetString does nothing.

Override SetString to provide a more meaningful value to the Strings property. For example, TStaticListAction overrides SetString to set the caption of the specified item.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCustomListAction


TCustomListView
 VCL Reference

TCustomListView

Hierarchy	Properties	Methods	Events	See also

TCustomListView is the base type for all list view components, including TListView.

Unit

ComCtrls

Description

Use TCustomListView as a base class when defining a control that displays a list of items. TCustomListView allows a list of items to be displayed in columns with column headers and sub-items, or vertically or horizontally, with small or large icons.

Do not create instances of TCustomListView. To put a list view on a form, use a descendant of TCustomListView, such as TListView.


 VCL Reference

TCustomListView Properties

TCustomListView	Alphabetically	Legend

In TCustomListView

AllocBy

BorderStyle

BoundingRect

Canvas

Checkboxes

Column

ColumnClick

Columns

DropTarget

FlatScrollBars

FullDrag

GridLines

HideSelection

HotTrack

HotTrackStyles

HoverTime

IconOptions

ItemFocused

ItemIndex

Items

LargeImages

MultiSelect

OwnerData

OwnerDraw

ReadOnly

RowSelect

SelCount

Selected

ShowColumnHeaders

ShowWorkAreas

SmallImages

SortType

StateImages

TopItem

ViewOrigin

ViewStyle

VisibleRowCount

WorkAreas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomListView Properties

TCustomListView	By Object	Legend

Action

Align

AlignDisabled

AllocBy

Anchors

BiDiMode

BorderStyle

BoundingRect

BoundsRect

Brush

Canvas

Checkboxes

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Column

ColumnClick

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

FlatScrollBars

Floating

FloatingDockSiteClass

FullDrag

GridLines

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

HotTrack

HotTrackStyles

HoverTime

IconOptions

ItemFocused

ItemIndex

Items

LargeImages

Left

LRDockWidth

MultiSelect

Name

Owner

OwnerData

OwnerDraw

Parent

ParentWindow

ReadOnly

RowSelect

SelCount

Selected

ShowColumnHeaders

ShowHint

Showing

ShowWorkAreas

SmallImages

SortType

StateImages

TabOrder

TabStop

Tag

TBDockHeight

Top

TopItem

UndockHeight

UndockWidth

VCLComObject

ViewOrigin

ViewStyle

Visible

VisibleDockClientCount

VisibleRowCount

Width

WindowProc

WorkAreas


TCustomListView.AllocBy
 VCL Reference

TCustomListView.AllocBy

TCustomListView	See also

Indicates the number of items the list view can store in memory.

property AllocBy: Integer;

Description

Set AllocBy to the total number of items in the list before adding a large number of items to the list view. AllocBy allows the list view to allocate the memory for items in a single block at once rather than bit by bit as items are added.


TCustomListView.BorderStyle
 VCL Reference

TCustomListView.BorderStyle

TCustomListView

Determines whether the list view displays a single line border.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to affect the sharpness with which the list view control stands out on a form. BorderStyle can have a value of either bsSingle or bsNone. If BorderStyle is bsSingle, the list view is drawn with a single-line border. If BorderStyle is bsNone, there will be no border.


TCustomListView.BoundingRect
 VCL Reference

TCustomListView.BoundingRect

TCustomListView	See also

Denotes the bounding rectangle for the items in the list view.

property BoundingRect: TRect;

Description

Read BoundingRect to obtain the screen coordinates of a rectangle that encloses all the items in the list view. BoundingRect allows an application to adjust the size of the control to fit the items or to determine whether the mouse is over any of the list items.

Note:	To use BoundingRect, the list view’s ViewStyle property must be either vsIcon or vsSmallIcon.


TCustomListView.Canvas
 VCL Reference

TCustomListView.Canvas

TCustomListView	See also

Gives access to the list view's canvas.

property Canvas: TCanvas;

Description

Use the Canvas property to paint to the list view's canvas during custom draw events such as OnDrawItem, OnCustomDraw, OnCustomDrawItem, OnCustomDrawSubItem, OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, and OnAdvancedCustomDrawSubItem.


TCustomListView.Checkboxes
 VCL Reference

TCustomListView.CheckBoxes

TCustomListView	See also

Specifies whether check boxes appear next to the items in the list view.

property Checkboxes: Boolean;

Description

Set CheckBoxes to True to make check boxes appear next to the list items when ViewStyle is vsList or vsReport. Each line in the list displays a single check box.


TCustomListView.Column
 VCL Reference

TCustomListView.Column

TCustomListView	See also	Example

Describes the column specified by the Index parameter.

property Column[Index: Integer]: TListColumn;

Description

Read Column to access the TListColumn object that describes the column attributes of a column in a report style list view. The Index parameter is the index of the column in the Columns property array.

Note:	Column is only relevant when the value of the ViewStyle property is vsReport.


TCustomListView.ColumnClick
 VCL Reference

TCustomListView.ColumnClick

TCustomListView	See also

Determines whether the column header behaves like a button.

property ColumnClick: Boolean;

Description

Use ColumnClick to specify whether the OnColumnClick event should occur when the user clicks on the column header. When ColumnClick is True, the OnColumnClick occurs when the column header is clicked with the mouse. When ColumnClick is False, the OnColumnClick event never occurs.

Note:	For column clicks to work, the column headers must be displayed. To display the headers set the ShowColumnHeaders property to True and the ViewStyle property to vsReport.


TCustomListView.Columns
 VCL Reference

TCustomListView.Columns

TCustomListView	See also 	Example

Describes the properties of the columns in the list view.

property Columns: TListColumns;

Description

Use Columns to add or delete columns in the list view, or to edit their display properties. When setting Columns at design time a ListView Columns Editor dialog appears. This dialog allows columns to be added or deleted, and the display properties of individual columns to be changed. At runtime use the Caption, Alignment, and Width properties of the TListColumn objects accessed by the Columns property to change the appearance of the column headers.

Note:	To display the columns, set the ViewStyle property to vsReport and the ShowColumnHeaders property to True.


TCustomListView.DropTarget
 VCL Reference

TCustomListView.DropTarget

TCustomListView	See also

Specifies which item in the list is the target of a drag and drop operation.

property DropTarget: TListItem;

Description

Read DropTarget to determine whether an item in the list is the target of a drag and drop operation. Set DropTarget to change whether a particular item in the list can be the drop target of a dragged item.

Note:	DropTarget only indicates the list item that appears to the user as a drop target. The application must still implement the drag-and-drop behavior for the item.


TCustomListView.FlatScrollBars
 VCL Reference

TCustomListView.FlatScrollBars

TCustomListView

Specifies whether the list view's scroll bars are flat.

property FlatScrollBars: Boolean;

Description

Use FlatScrollBars to get or set whether the list view's scroll bars are flat. Flat scroll bars do not have the beveled borders used for the three-dimensional effect.

Note:	List views only support flat scroll bars if the system has version 472 or later of comctl32.dll.


TCustomListView.FullDrag
 VCL Reference

TCustomListView.FullDrag

TCustomListView	See also

Specifies whether headers are repainted when they are dragged.

property FullDrag: Boolean;

Description

Use FullDrag to get or set whether headers are repainted when they are dragged.

Note:	To display the column headers, set the ViewStyle property to vsReport and the ShowColumnHeaders property to True.


TCustomListView.GridLines
 VCL Reference

TCustomListView.GridLines

TCustomListView	See also

Determines whether lines are drawn separating items in the list.

property GridLines: Boolean;

Description

Set GridLines to True to add lines that separate the items in the list view. The value of GridLines is ignored unless ViewStyle is vsReport.


TCustomListView.::HideSelection
 VCL Reference

TCustomListView.HideSelection

TCustomListView	See also

Determines whether the list view gives a visual indication of which item is selected when focus shifts to another control.

property HideSelection: Boolean;

Description

Set HideSelection to False to provide visual feedback of the selected item in the list even when the list view does not have focus. Set HideSelection to True to show the selection only when the list view has focus. HideSelection does not affect the actual value of the selection, only the visual indication. Always setting HideSelection to False can make forms with many list views look too busy.


TCustomListView.::HotTrack
 VCL Reference

TCustomListView.HotTrack

TCustomListView	See also

Specifies whether list items are highlighted when the mouse passes over them.

property HotTrack: Boolean;

Description

Set HotTrack to True to provide visual feedback about which item is under the mouse. When HotTrack is True, the HoverTime property controls whether pausing the mouse over an item causes it to be selected. When HotTrack is False, there is no visual feedback when the mouse passes over items and users can’t select items by pausing the mouse.

To specify hot tracking styles, use the HotTrackStyles property.


TCustomListView.::HotTrackStyles
 VCL Reference

TCustomListView.HotTrackStyles

TCustomListView	See also

Specifies the hot tracking styles.

property HotTrackStyles: TListHotTrackStyles;

Description

Use HotTrackStyles to specify the hot tracking styles. The hot tracking style indicates the type of feedback that the list view gives when the mouse passes over list items. This feedback can be a change of the mouse cursor or underline of the list items.

To turn hot tracking on, set HotTrack to True.


TCustomListView.::HoverTime
 VCL Reference

TCustomListView.HoverTime

TCustomListView	See also

Specifies how long the user must pause with the mouse before an item is selected.

property HoverTime: Integer;

Description

Use HoverTime to indicate how long (in milliseconds) the user must pause with the mouse before an item is selected. If HoverTime is –1 (the default value), a default time period must elapse.

HoverTime has no effect unless the HotTrack property is True.


TCustomListView.::IconOptions
 VCL Reference

TCustomListView.IconOptions

TCustomListView	See also

Determines how icons displayed in the list view are arranged.

property IconOptions: TIconOptions;

Description

Set the properties of the TIconOptions object that is the value of IconOptions to specify how the icons in the list view should be arranged. The ViewStyle of the list view must be set to either vsIcon or vsSmallIcons for these options to affect the control.


TCustomListView.::ItemFocused
 VCL Reference

TCustomListView.ItemFocused

TCustomListView	See also

Indicates which item, if any, has focus.

property ItemFocused: TListItem;

Description

Read ItemFocused to determine which item, if any, can be edited by the user. Set ItemFocused to set focus to an item in the list. When an item has focus, it appears surrounded by a standard focus rectangle. If no item has focus, ItemFocused returns nil. Only one item can have focus at a time.


TCustomListView.ItemIndex
 VCL Reference

TCustomListView.ItemIndex

TCustomListView

Specifies the index of the selected item.

property ItemIndex: Integer;

Description

Read ItemIndex to determine which item is selected. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1. If the list control supports multiple selected items, ItemIndex is the index of the selected item that has focus.

Set ItemIndex programmatically to select an item by passing in the index value.


TCustomListView.Items
 VCL Reference

TCustomListView.Items

TCustomListView	See also	Example

Contains the list of items displayed by the list view.

property Items: TListItems;

Description

Use Items to directly access the TListItem objects that represent the items in the list. Setting this property at design time brings up the ListView Items Editor. Use this dialog to add or delete items or subitems, and to edit their display properties. At runtime, use each item's Caption, ImageIndex and StateIndex properties to change the appearance of the list items.

Warning:	Items is read-only if the application is running in virtual mode.


TCustomListView.::LargeImages
 VCL Reference

TCustomListView.LargeImages

TCustomListView	See also 	Example

Provides a list of icon images to display for each item in the list when ViewStyle is vsIcon.

property LargeImages: TCustomImageList;

Description

Set LargeImages to specify the bitmaps that should be displayed next to items in the list when ViewStyle is vsIcon. Each item in the Items list can be associated with a bitmap in this image list by setting its ImageIndex property.


TCustomListView.MultiSelect
 VCL Reference

TCustomListView.MultiSelect

TCustomListView	See also

Determines whether the user can select more than one list item at a time.

property MultiSelect: Boolean;

Description

Set MultiSelect to specify whether users can multiselect items in the list. If MultiSelect is True, the user can select multiple items. If MultiSelect if False, only one item can be selected at a time.


TCustomListView.OwnerData
 VCL Reference

TCustomListView.OwnerData

TCustomListView	See also

Specifies whether the list view control is virtual.

property OwnerData: Boolean;

Description

Set OwnerData to True to specify that the list view is virtual. A virtual list view can contain a huge number of items (specifically, up to a DWORD). However, you must manage the items of a virtual list view using the OnData, OnDataFind, OnDataHint, and OnDataStateChange event handlers. For example, you must explicitly provide a value to a list item’s StateIndex property if it is to display a check box.

When creating a virtual list view, you must set the Count property for the Items to the number of items in the virtual list.

The only information contained in a virtual list view control is the selection and focus information.

To improve the peformance of a virtual list view control, cache items for quick retrieval. The OnDataHint event can help optimize retrieval from the cache.

Note:	Virtual list views need not be owner-drawn. The OnData, OnDataFind, OnDataHint, and OnDataStateChange events enable the list view’s default drawing, if desired.


TCustomListView.OwnerDraw
 VCL Reference

TCustomListView.OwnerDraw

TCustomListView	See also

Specifies whether the list view receives an OnDrawItem event.

property OwnerDraw: Boolean;

Description

Set OwnerDraw to True to allow the list view to receive the OnDrawItem event instead of the default rendering of list items.

Note:	This property is independent of the custom draw events such as OnCustomDraw, OnCustomDrawItem, OnAdvancedCustomDraw, and so on. The custom draw events always occur.


TCustomListView.ReadOnly
 VCL Reference

TCustomListView.ReadOnly

TCustomListView	See also

Determines whether the user can change the contents of the control.

property ReadOnly: Boolean;

Description

Use ReadOnly to determine whether the list view can be used to enter data. If ReadOnly is True, the list view displays values that the user can’t edit. If ReadOnly is False, the user can modify the contents. If ReadOnly is False, the OnEditing and OnEdited events occur when the user begins and finishes editing the list item, respectively.


TCustomListView.RowSelect
 VCL Reference

TCustomListView.RowSelect

TCustomListView	See also

Determines whether an entire row in the list view can be selected.

property RowSelect: Boolean;

Description

Set RowSelect to True to allow entire rows to be selected when the ViewStyle property is vsReport. To allow multiple rows to be selected, use the MultiSelect property.


TCustomListView.SelCount
 VCL Reference

TCustomListView.SelCount

TCustomListView	See also

Specifies the number of selected items in the list view.

property SelCount: Integer;

Description

Read SelCount to determine the number of items that are currently selected. When SelCount is 1, use the Selected property to access the selected item. To locate the selected items when SelCount is greater than one, check the Selected property of the list items, beginning with the item specified by the Selected property.

Note:	SelCount can only exceed 1 if the MultiSelect property is True.


TCustomListView.Selected
 VCL Reference

TCustomListView.Selected

TCustomListView	See also 	Example

Indicates the first selected item in the list view.

property Selected: TListItem;

Description

Read Selected to access the properties of the first selected item in the list. If SelCount is 0, Selected is nil. If SelCount is greater than 1, subsequent selected items can be located by checking the Selected property of the items found using the GetNextItem method.

Set the Selected property to select an item in the list. If MultiSelect is True, setting Selected adds an item to the selection. If MultiSelect is False, setting Selected changes the selection. Setting Selected to nil deselects all items in the list.

When an item is selected, the OnChanging and OnChange events are generated.


TCustomListView.ShowColumnHeaders
 VCL Reference

TCustomListView.ShowColumnHeaders

TCustomListView	See also

Determines whether the column headers are displayed.

property ShowColumnHeaders: Boolean;

Description

Set ShowColumnHeaders to specify whether the columns in the list view should display column headers. A column header is a panel with a caption that identifies the category of items in the column of the list view. Headers are useful for labeling columns of subitems that provide additional information in a list view. Use the Columns property to create or add headers.

Note:	To use columns in a list view, the ViewStyle property must be set to vsReport.


TCustomListView.ShowWorkAreas
 VCL Reference

TCustomListView.ShowWorkAreas

TCustomListView	See also

Determines whether the visual properties of work areas are displayed.

property ShowWorkAreas: Boolean;

Description

Set ShowWorkAreas to specify whether the list view should paint each work area in its own color and labeled by its display name. If the list view’s WorkAreas property includes any work areas, the icons in the list view are always grouped visually by these work areas. ShowWorkAreas determines whether the properties of individual work area components are used to make each area stand out visually.

When ShowWorkAreas is True, each work area is painted in the color specified by its Color property and labeled by the string in its DisplayName property. When ShowWorkAreas is False, icons appear grouped by work areas, but there is no other visual indication.

Note:	To use work areas in a list view, the ViewStyle property must be set to vsIcon or vsSmallIcon.

Warning:	Work areas are not supported if the application is running in virtual mode.


TCustomListView.SmallImages
 VCL Reference

TCustomListView.SmallImages

TCustomListView	See also 	Example

Provides a list of icon images to display for each item in the list when ViewStyle is not vsIcon.

property SmallImages: TCustomImageList;

Description

Set SmallImages to specify the icons that should be displayed next to items in the list when ViewStyle is vsSmallIcon, vsList, or vsReport. Each item in the Items list can be associated with an icon in this image list by setting its ImageIndex property.


TCustomListView.SortType
 VCL Reference

TCustomListView.SortType

TCustomListView 	See also

Determines if and how the items in the list are automatically sorted.

property SortType: TSortType;

Description

Set SortType to specify the order of items in the list. If SortType is not stNone, the list items in the Items property are automatically sorted. Once a list view is sorted, the original order is lost. That is, setting the SortType back to stNone will not restore the original order of items.

Note:	If SortType is stData or stBoth, you must provide an OnCompare event handler to compare data values.

Note:	If the list view uses work areas, sorting items only compares each item to the other items in its work area.


TCustomListView.StateImages
 VCL Reference

TCustomListView.StateImages

TCustomListView	See also

Provides a list of additional icon images to display next to each item in the list view.

property StateImages: TCustomImageList;

Description

Set StateImages to specify the icons that should be displayed next to items in the list. Each item in the Items list can be associated with an icon in this image list by setting its StateIndex property.


TCustomListView.TopItem
 VCL Reference

TCustomListView.TopItem

TCustomListView	See also

Indicates the topmost visible item in the list view.

property TopItem: TListItem;

Description

Read TopItem to determine the first item in the list view that the user can see. TopItem reflects how far the list view has been scrolled.

TopItem is only implemented when ViewStyle is vsReport or vsList. For vsIcon and vsSmallIcon view styles, use the ViewOrigin property to determine the scroll position.


TCustomListView.ViewOrigin
 VCL Reference

TCustomListView.ViewOrigin

TCustomListView	See also

Designates the coordinates of the upper left corner of the list, relative to the visible area of the list view control.

property ViewOrigin: TPoint;

Description

Read ViewOrigin to determine the logical origin of the list image. When the list view is not scrolled, ViewOrigin is (0,0). Otherwise, use the x coordinate to determine the number of pixels the view is scrolled horizontally, and the y coordinate to determine the number of pixels the view is scrolled vertically.

ViewOrigin is only implemented when ViewStyle is vsIcon or vsSmallIcon. For vsReport or vsList, use the TopItem property instead.


TCustomListView.ViewStyle
 VCL Reference

TCustomListView.ViewStyle

TCustomListView	See also	Example

Determines how the list items are displayed.

type TViewStyle = (vsIcon, vsSmallIcon, vsList, vsReport);

property ViewStyle: TViewStyle;

Description

Set ViewStyle to control the visual display of items in a list view. The items can be displayed as a set of movable icons, or as columns of text. These are the possible values:

Value	Meaning

vsIcon	Each item appears as a full-sized icon with a label below it. The user can drag the items to any location in the list view window.

vsSmallIcon	Each item appears as a small icon with the label to the right of it. The user can drag the items to any location.

vsList	Each item appears as a small icon with a label to the right of it. Items are arranged in columns and cannot be dragged by the user.

vsReport	Each item appears on its own line with information arranged in columns. The leftmost column contains the small icon and label, and subsequent columns contain subitems as specified by the application. Unless ShowColumnHeaders is False, each column has a header.


TCustomListView.VisibleRowCount
 VCL Reference

TCustomListView.VisibleRowCount

TCustomListView	See also

Indicates number of items that can fit vertically in the visible area of a list view.

property VisibleRowCount: Integer;

Description

Read VisibleRowCount to determine the number of items from a single column that can appear in the visible area of a list view when the ViewStyle is either vsList or vsReport. Only fully visible items are counted. If VisibleRowCount is less than the total number of items in a column, use the TopItem property to determine if the list view is scrolled.


TCustomListView.WorkAreas
 VCL Reference

TCustomListView.WorkAreas

TCustomListView	See also

Defines separate working areas that divide the list view’s client area.

property WorkAreas: TWorkAreas;

Description

Use WorkAreas to define separate work areas that divide the client area of the list view when the ViewStyle property is vsIcon or vsSmallIcon. Work areas are rectangular regions that the list view uses to arrange its icons. Each icon falls into a single work area, which is specified by its WorkArea property. Within each work area, icons are arranged in rows (or columns), wrapping at the right (or bottom) edge of the work area. If a work area is larger than the client area of the list view, the list view adds a scroll bar.

If WorkAreas contains no TWorkArea objects, the list view arranges icons based on its client area.

Note:	It is possible to create overlapping work areas, but this is not recommended. Icons that fall in the intersection of two or more work areas become members of the work area with the lowest index.

Warning:	Work areas are not supported if the application is running in virtual mode.


 VCL Reference

TCustomListView Events

TCustomListView	Alphabetically	Legend

In TCustomListView

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnAdvancedCustomDrawSubItem

OnChange

OnChanging

OnColumnClick

OnColumnDragged

OnColumnRightClick

OnCompare

OnCreateItemClass

OnCustomDraw

OnCustomDrawItem

OnCustomDrawSubItem

OnData

OnDataFind

OnDataHint

OnDataStateChange

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnGetSubItemImage

OnInfoTip

OnInsert

OnSelectItem


 VCL Reference

TCustomListView Events

TCustomListView	By Object	Legend

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnAdvancedCustomDrawSubItem

OnChange

OnChanging

OnColumnClick

OnColumnDragged

OnColumnRightClick

OnCompare

OnCreateItemClass

OnCustomDraw

OnCustomDrawItem

OnCustomDrawSubItem

OnData

OnDataFind

OnDataHint

OnDataStateChange

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnGetSubItemImage

OnInfoTip

OnInsert

OnSelectItem


TCustomListView.OnAdvancedCustomDraw
 VCL Reference

TCustomListView.OnAdvancedCustomDraw

TCustomListView	See also

Occurs at discrete points during the rendering of the list view.

type TLVAdvancedCustomDrawEvent = procedure(Sender: TCustomListView; const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean) ofobject;

property OnAdvancedCustomDraw: TLVAdvancedCustomDrawEvent;

Description

Write an OnAdvancedCustomDraw event handler to customize the painting of the list view at various stages before its items are drawn. Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False.

Sender is the list view that is about to be painted.

ARect indicates the dimensions of the list view on its Canvas.

Stage indicates the current stage in the drawing process. Note that the cdPreErase and cdPostErase stages do not receive event notification. The background must be drawn when the item is rendered.

DefaultDraw is used only when Stage is cdPrePaint. It indicates whether the list view should continue with the default painting after the event handler exits. Set DefaultDraw to False to prevent the drawing of the list view after event handler exits. If DefaultDraw remains set to True, the list view continues with the default painting process.

Note:	OnAdvancedCustomDraw occurs at various stages during the paint process. If you are only writing code to execute immediately prior to rendering the list view, it is more efficient to use the OnCustomDraw event.


TCustomListView.OnAdvancedCustomDrawItem
 VCL Reference

TCustomListView.OnAdvancedCustomDrawItem

TCustomListView	See also

Occurs at discrete stages during the painting of an item in an owner-draw list view.

type TLVAdvancedCustomDrawItemEvent = procedure(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean) of object;

property OnAdvancedCustomDrawItem: TLVAdvancedCustomDrawItemEvent;

Description

Write an OnAdvancedCustomDrawItem event handler to customize the drawing of individual items on the list view's canvas (using the Canvas property). OnAdvancedCustomDrawItem occurs at various stages in the rendering of a list item.

Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False. The OnAdvancedCustomDrawItem event handler provides slightly different state information than the OnDrawItem event and occurs after the default rendering as well as before.

Sender is the list view whose item is drawn.

Item is the item that is currently being painted.

State indicates the state of the item, so that the event handler can adjust the image to reflect whether the item is selected, disabled, hot, and so on.

Stage indicates the current stage in drawing the list item. Note that the cdPreErase and cdPostErase stages do not receive event notification. The background must be drawn when the item is rendered.

DefaultDraw is used only when Stage is cdPrePaint. Set DefaultDraw to False if you don't want the control to paint the item’s text after the event handler exits. If DefaultDraw remains True, the list view adds the item’s text to the image on the canvas.

Note:	OnAdvancedCustomDrawItem occurs at various stages during the paint process. If you are only writing code to execute immediately prior to rendering the list item, it is more efficient to use the OnCustomDrawItem event.


TCustomListView.OnAdvancedCustomDrawSubItem
 VCL Reference

TCustomListView.OnAdvancedCustomDrawSubItem

TCustomListView	See also

Occurs at discrete stages during the painting of a subitem in an owner-drawn list view.

type TLVAdvancedCustomDrawSubItemEvent = procedure(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; Stage: TCustomDrawStage; var DefaultDraw: Boolean) of object;

property OnAdvancedCustomDrawSubItem: TLVAdvancedCustomDrawSubItemEvent

Description

Write an OnCustomDrawSubItem event handler to customize the drawing of subitems that appear in additional columns to the right of each item when ViewStyle is vsReport. Use the list view’s Canvas property as a drawing surface. OnAdvancedCustomDrawItem occurs at various stages in the rendering of a subitems. Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False.

The Sender Parameter specifies the list view that owns the subitems.

The Item parameter is the current Item being drawn.

The SubItem parameter is the index of the subitem of that list item in its SubItems property.

The State property indicates various attributes that can affect the way the subitem is drawn.

The Stage property indicates the current stage in the painting process. Note that the cdPreErase and cdPostErase stages do not receive event notification. The background must be drawn when the item is rendered.

DefaultDraw is only used when Stage is cdPrepaint. Set DefaultDraw to False to prevent the list view from adding the subitem’s text after the event handler exits.

Note:	OnAdvancedCustomDrawSubItem occurs at various stages during the paint process. If you are only writing code to execute immediately prior to rendering the subitem, it is more efficient to use the OnCustomDrawSubItem event.


TCustomListView.OnChange
 VCL Reference

TCustomListView.OnChange

TCustomListView	See also

Occurs immediately after an item in the list changes.

type TLVChangeEvent = procedure(Sender: TObject; Item: TListItem; Change: TItemChange) of object;

property OnChange: TLVChangeEvent;

Description

Write an OnChange event handler to respond to changes in the list items. OnChange allows a response once the list has been successfully changed.

The Item parameter is the list item that just changed. The Change parameter indicates the type of change that just occurred. Change is ctText if the Caption property of the item changed. Change is ctImage if the ImageIndex property of the item changed or the appropriate image list changed in the list view. Change is ctState if the Cut, Focused, or Selected property of the item changed.


TCustomListView.OnChanging
 VCL Reference

TCustomListView.OnChanging

TCustomListView	See also

Occurs when an item in the list is about to change.

type TLVChangingEvent = procedure(Sender: TObject; Item: TListItem; Change: TItemChange; var AllowChange: Boolean) of object;

property OnChanging: TLVChangingEvent;

Description

Write an OnChanging event handler to conditionally block changes to an item in the list. Set the AllowChange parameter to False to prevent the change from taking place. The Item parameter is the list item that is about to change. The Change parameter indicates the type of change that is about to happen.


TCustomListView.OnColumnClick
 VCL Reference

 KTCustomListView.OnColumnClick

TCustomListView	See also	Example

Occurs when the user clicks on a column header in a list view.

type TLVColumnClickEvent = procedure(Sender: TObject; Column: TListColumn) of object;

property OnColumnClick: TLVColumnClickEvent;

Description

Write an OnColumnClick event handler to respond to clicks made in the column header when ViewStyle is vsReport. The Column parameter is the TListColumn object from the Columns property that describes the column that was clicked.

OnColumnClick only occurs when ViewStyle is vsReport and ShowColumnHeaders is True.


TCustomListView.OnColumnDragged
 VCL Reference

TCustomListView.OnColumnDragged

TCustomListView	See also

Occurs when a column is dragged to a new position.

property  property OnColumnDragged: TNotifyEvent;

Description

Write an OnColumnDragged event handler to respond when the user drags a column to a new position. OnColumnDragged occurs after all columns are in their new positions but before the list view repaints to reflect the change.

OnColumnClick only occurs when ViewStyle is vsReport and ShowColumnHeaders is True.

Tip:	To uniquely identify columns so that you can recognize them after they are repositioned, use the list column’s Tag property.


TCustomListView.OnColumnRightClick
 VCL Reference

 KTCustomListView.OnColumnRightClick

TCustomListView	See also

Occurs when the user right clicks on a column header in a list view.

type TLVColumnRClickEvent = procedure(Sender: TObject; Column: TListColumn; Point: TPoint) of object;

property OnColumnRightClick: TLVColumnRClickEvent;

Description

Write an OnColumnRightClick event handler to respond to right clicks made in the column header when ViewStyle is vsReport.

The Sender parameter is the list view that the user clicked.

The Column parameter is the TListColumn object from the Columns property for the column that was clicked.

The point parameter indicates where the user clicked the mouse, in client coordinates.

OnColumnRightClick only occurs when ViewStyle is vsReport, and ShowColumnHeaders is True, and ColumnRightClick is True.


TCustomListView.OnCompare
 VCL Reference

TCustomListView.OnCompare

TCustomListView	See also	Example

Occurs to when two items need to be compared during a sort of the list.

type TLVCompareEvent = procedure(Sender: TObject; Item1, Item2: TListItem; Data: Integer; var Compare: Integer) of object;

property OnCompare: TLVCompareEvent;

Description

Write an OnCompare event handler to implement a sort order for the list. An OnCompare event handler is called when the SortType property is stData or stBoth, when the AlphaSort method is called, or when the CustomSort method is called without a SortProc parameter.

The OnCompare event handler compares the list items passed as the Item1 and Item2 parameters. If Item1 is the same as Item2 in the sort order, set the Compare parameter to 0. If Item1 is less than Item2, set the Compare parameter to a value less than 0. If Item1 is greater than Item2, set the Compare parameter to a value greater than 0. The Data parameter is 0 when the event handler is called to maintain the sort order of a list view with a SortType of stData or stBoth. Similarly, when OnCompare occurs in response to the AlphaSort method, the Data parameter is 0. When OnCompare occurs in response to the CustomSort method, the Data parameter is the value of the LParam parameter of CustomSort.


TCustomListView.OnCreateItemClass
 VCL Reference

TCustomListView.OnCreateItemClass

TCustomListView

Occurs when a list item object is about to be created.

type TLVCreateItemClassEvent = procedure(Sender: TCustomListView; var ItemClass: TListClass) ofobject;

property OnCreateItemClass: TLVCreateNodeClassEvent;

Description

OnCreateItemClass occurs when a new item object is about to be created.

Sender is the list view object that needs to add a new panel.

Item class returns a class reference that is instantiated to create a new item object.


TCustomListView.OnCustomDraw
 VCL Reference

TCustomListView.OnCustomDraw

TCustomListView	See also

Occurs when an owner-draw list view must be rendered.

type TLVCustomDrawEvent = procedure(Sender: TCustomListView; const ARect: TRect; var DefaultDraw: Boolean) ofobject;

property OnCustomDraw: TLVCustomDrawEvent;

Description

Write an OnCustomDraw event handler to draw to the list view's Canvas before its items are painted. Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False.

Sender is the list view that is about to be painted.

ARect indicates the dimensions of the list view on its Canvas.

DefaultDraw indicates whether the list view should continue with the default painting after the event handler exits. Set DefaultDraw to False to prevent the drawing of the list view after event handler exits. If DefaultDraw remains set to True, the list view continues with the default painting process.

Note:	OnCustomDraw occurs immediately prior to the rendering of the list view control. To augment the default drawing process at other stages (such as when the background is erased or after the list view is drawn), use the OnAdvancedCustomDraw event instead.


TCustomListView.OnCustomDrawItem
 VCL Reference

TCustomListView.OnCustomDrawItem

TCustomListView	See also

Occurs when an item in an owner-draw list view must be rendered.

type TLVCustomDrawItemEvent = procedure(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean) of object;

property OnCustomDrawItem: TLVCustomDrawItemEvent;

Description

Write code in an OnCustomDrawItem handler to draw individual items on the list view's canvas (using the Canvas property) before an item is painted.

Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False. The OnCustomDrawItem event handler provides slightly different state information than the OnDrawItem event.

Sender is the list view whose item is to be drawn.

Item is the item that should be rendered.

State indicates the state of the item, so that the event handler can adjust the image to reflect whether the item is selected, disabled, hot, and so on.

Set DefaultDraw to False if you don't want the control to paint the item’s text after the event handler exits. If DefaultDraw remains True, the list view adds the item’s text to the image on the canvas.

Note:	OnCustomDrawItem occurs immediately prior to the rendering of each list item. To augment the default drawing process at other stages (such as after the list item is drawn), use the OnAdvancedCustomDrawItem event instead.


TCustomListView.OnCustomDrawSubItem
 VCL Reference

TCustomListView.OnCustomDrawSubItem

TCustomListView	See also

Occurs when a subitem must be rendered in an owner-draw list view.

type TLVCustomDrawSubItemEvent = procedure(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean) of object;

property OnCustomDrawSubItem: TLVCustomDrawSubItemEvent

Description

Write code in an OnCustomDrawSubItem handler to draw to the subitems that appear in additional columns to the right of each item when ViewStyle is vsReport. Use the list view’s Canvas property as a drawing surface. Unlike the OnDrawItem event, the list view receives this event even if the OwnerDraw property is False.

The Sender Parameter specifies the list view that owns the subitems. The Item parameter is the current Item being drawn. The SubItem parameter is the index of the subitem of that list item in its SubItems property. The State property indicates various attributes that can affect the way the subitem is drawn. Set DefaultDraw to False to prevent the list view from adding the subitem’s text after the event handler exits.

Note:	OnCustomDrawSubItem occurs immediately prior to the rendering of each subitem. To augment the default drawing process at other stages (such as after the subitem is drawn), use the OnAdvancedCustomDrawSubItem event instead.


TCustomListView.OnData
 VCL Reference

TCustomListView.OnData

TCustomListView	See also

Occurs immediately before an item is displayed in the list view control.

property OnData: TLVOwnerDataEvent;

Description

Use OnData to customize an item before it is displayed in the list view control. Set the properties of the list item in the event handler so that they appear correctly when the item is drawn.

OnData occurs only if OwnerData is True.


TCustomListView.OnDataFind
 VCL Reference

TCustomListView.OnDataFind

TCustomListView	See also

Occurs when the list view control receives a search request, such as when the FindData and FindCaption methods are called.

property OnDataFind: TLVOwnerDataFindEvent;

Description

Use OnDataFind to locate an item and return custom data associated with it.

OnDataFind occurs only if OwnerData is True.


TCustomListView.OnDataHint
 VCL Reference

TCustomListView.OnDataHint

TCustomListView	See also

Occurs when the contents of the list view change, such as when the user scrolls the list view.

property OnDataHint: TLVOwnerDataHintEvent;

Description

Use OnDataHint to update a range of items before the OnData event occurs. This method of updating items is more efficient than individually updating items in the OnData event handler. The range of items specified in the OnDataHint does not always match the range of items for which the OnData event handler is called; therefore, you must be prepared to update individual items in the OnData event handler as well.

OnDataHint occurs only if OwnerData is True.


TCustomListView.OnDataStateChange
 VCL Reference

TCustomListView.OnDataStateChange

TCustomListView	See also

Occurs when a range of items change states.

property OnDataStateChange: TLVOwnerDataStateChangeEvent;

Description

Use OnDataStateChange to respond when an item’s state changes.

OnDataStateChange occurs only if OwnerData is True.


TCustomListView.OnDeletion
 VCL Reference

TCustomListView.OnDeletion

TCustomListView	See also

Occurs when an item in the list view is about to be deleted.

type TLVDeletedEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnDeletion: TLVDeletedEvent;

Description

Write an OnDeletion event handler to respond when an item in the list is about to be deleted. The Item parameter is the TListItem object from the Items property that is about to be deleted.


TCustomListView.OnDrawItem
 VCL Reference

TCustomListView.OnDrawItem

TCustomListView	See also

Occurs when an item should be drawn in the list view.

property OnDrawItem: TLVDrawItemEvent;

Description

Write code in an OnDrawItem handler to manually draw items in the list view. This event occurs only if OwnerDraw is True.

Note:	List views receive several other custom draw events, including OnCustomDraw, OnCustomDrawItem, OnCustomDrawSubItem, OnAdvancedCustomDraw, OnAdvancedCustomDrawItem, and OnAdvancedCustomDrawSubItem. These other events, unlike OnDrawItem, occur regardless of the value of the OwnerDraw property. They provide slightly different information about the state of the item to be drawn, and the OnAdvancedXXX events occur at more points during the paint process.


TCustomListView.OnEdited
 VCL Reference

TCustomListView.OnEdited

TCustomListView	See also

Occurs immediately after the user edits an item’s Caption property.

type TLVEditedEvent = procedure(Sender: TObject; Item: TListItem; var S: string) of object;

property OnEdited: TLVEditedEvent;

Description

Write an OnEdited event to take specific action when a user has finished editing the text of a list item. An OnEdited event handler can respond to the value the user typed, or change the value that is assigned to the list item’s Caption property. For example, if an OnEdited event handler can check the validity of the string typed by the user, and only allow the Caption property to be changed if the new value is valid.

The Item parameter is the list item that was just edited. The S parameter is the new value the user typed for the item’s Caption property. Change the value of S to override the value the user typed. When OnEdited occurs, the item’s Caption property has not yet been changed, so S can still be compared to the original value of Caption.

This event can occur only if ReadOnly is set to False.


TCustomListView.OnEditing
 VCL Reference

TCustomListView.OnEditing

TCustomListView	See also

Occurs when the user starts to edit a list item’s Caption property.

type TLVEditingEvent = procedure(Sender: TObject; Item: TListItem; var AllowEdit: Boolean) of object;

property OnEditing: TLVEditingEvent;

Description

Write an OnEditing event handler to take specific action just before a user edits a list item’s Caption property. To prevent the user from editing the item specified by the ListItem parameter, set the AllowEdit parameter to False.

This event can occur only if the ReadOnly property is set to False.


TCustomListView.OnGetImageIndex
 VCL Reference

TCustomListView.OnGetImageIndex

TCustomListView	See also

Occurs when an item is about to be displayed in the list view control.

property OnGetImageIndex: TLVNotifyEvent;

Description

Use OnGetImageIndex to dynamically assign an ImageIndex to the item before it is displayed in the list view control.


TCustomListView.OnGetSubItemImage
 VCL Reference

TCustomListView.OnGetSubItemImage

TCustomListView	See also

Occurs when a subitem is about to be displayed in the column of a list view control.

type TLVSubItemImageEvent = procedure(Sender: TObject; Item: TListItem; SubItem: Integer; var ImageIndex: Integer) of object;

property OnGetSubItemImage: TLVSubItemImageEvent;

Description

Use OnGetSubItemImage to dynamically assign an image to a subitem before it is displayed in the column of a list view control. This event overrides the value specified by the list item’s SubItemImages property.

The Sender parameter is the list view that is being painted.

The Item parameter is the item whose subitem is being painted.

The SubItem parameter identifies the subitem from the list item’s SubItems property.

The ImageIndex parameter is an index into the list view’s SmallImages property. On entry to the event handler, ImageIndex is initialized to the value specified by the list item’s SubItemImages property for the subitem. Use this event handler to change that value or to suppress the image by setting ImageIndex to –1.

Note:	OnGetSubItemImage only occurs if the list view’s ViewStyle property is vsReport and the current list item’s SubItems property contains subitems.


TCustomListView.OnInfoTip
 VCL Reference

TCustomListView.OnInfoTip

TCustomListView	See also

Occurs when the user pauses the mouse over an item in the list view.

type TLVInfoTipEvent = procedure(Sender: TObject; Item: TListItem; var InfoTip: string) of object;

property OnInfoTip: TLVInfoTipEvent;

Description

Use OnInfoTip to provide help hints that are specific to individual items in the list view.

By default, when Help hints are enabled (that is, when ShowHint is True), the list view displays the hint specified by its Hint property. OnInfoTip allows the list view to override this value to specify a hint that is specific to the item under the mouse.

The Sender parameter is the list view under the mouse.

The Item parameter is the list item under the mouse.

The InfoTip parameter returns a string that appears in a help hint window.  On entry to the event handler, InfoTip is the item’s Caption. If the event handler assigns an empty string, no hint is displayed.  Otherwise, a hint window appears that displays the value of InfoTip.


TCustomListView.OnInsert
 VCL Reference

TCustomListView.OnInsert

TCustomListView	See also

Occurs immediately after a new item is inserted into the list view.

type TLVDeletedEvent = procedure(Sender: TObject; Item: TListItem) of object;

property OnInsert: TLVDeletedEvent;

Description

Write an OnInsert event handler to respond when an item has just been added to the list. The Item parameter is the TListItem object that was added to the Items property.


 VCL Reference

 $TCustomListView.OnSelectItem

TCustomListView	See also

Occurs when an item is selected in the list view control.

property OnSelectItem: TLVSelectItemEvent;

Description

Use OnSelectItem to perform actions when an item is selected.


 VCL Reference

TCustomListView Methods

TCustomListView	Alphabetically	Legend

In TCustomListView

ActionChange

AddItem

AlphaSort

Arrange

CanChange

CanEdit

Change

ChangeScale

Clear

ClearSelection

ColClick

ColRightClick

ColumnsShowing

CopySelection

Create

CreateListItem

CreateListItems

CreateParams

CreateWnd

CustomDraw

CustomDrawItem

CustomDrawSubItem

CustomSort

Delete

DeleteSelected

Destroy

DestroyWnd

DoEndDrag

DoInfoTip

DoStartDrag

DrawItem

Edit

FindCaption

FindData

GetActionLinkClass

GetCount

GetDragImages

GetHitTestInfoAt

GetItemAt

GetItemIndex

GetNearestItem

GetNextItem

GetSearchString

GetSelCount

InsertItem

IsCustomDrawn

IsEditing

MouseUp

Notification

OwnerDataFetch

OwnerDataFind

OwnerDataHint

OwnerDataStateChange

Scroll

SelectAll

SetItemIndex

SetMultiSelect

SetViewStyle

StringWidth

UpdateColumn

UpdateColumns

UpdateItems

WndProc

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomListView Methods

TCustomListView	By Object	Legend

ActionChange

AddItem

AfterConstruction

AlphaSort

Arrange

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanChange

CanEdit

CanFocus

Change

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ColClick

ColRightClick

ColumnsShowing

ContainsControl

ControlAtPos

CopySelection

Create

CreateListItem

CreateListItems

CreateParams

CreateParented

CreateParentedControl

CreateWnd

CustomDraw

CustomDrawItem

CustomDrawSubItem

CustomSort

DefaultHandler

Delete

DeleteSelected

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DoEndDrag

DoInfoTip

DoStartDrag

DragDrop

Dragging

DrawItem

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

Edit

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindCaption

FindChildControl

FindComponent

FindData

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetActionLinkClass

GetControlsAlignment

GetCount

GetDragImages

GetHitTestInfoAt

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemAt

GetItemIndex

GetNamePath

GetNearestItem

GetNextItem

GetParentComponent

GetSearchString

GetSelCount

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InsertItem

InstanceSize

Invalidate

IsCustomDrawn

IsEditing

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseUp

MouseWheelHandler

MoveSelection

NewInstance

Notification

OwnerDataFetch

OwnerDataFind

OwnerDataHint

OwnerDataStateChange

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetItemIndex

SetMultiSelect

SetSubComponent

SetTextBuf

SetViewStyle

Show

StringWidth

Update

UpdateAction

UpdateColumn

UpdateColumns

UpdateControlState

UpdateItems

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TCustomListView.ActionChange
 VCL Reference

TCustomListView.ActionChange

TCustomListView	See also

Responds when the action for which this list view is a client changes.

procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); override;

Description

ActionChange is called automatically when the action object specified by the Action property, or any of its properties, changes.

In TCustomListView, ActionChange  updates the action's SmallImages and ItemIndex properties, as appropriate. It then calls the inherited method, which updates the Caption, Enabled, Hint, and Visible properties and the OnClick event handler.

The Sender parameter is the action object that changed. The CheckDefaults parameter indicates whether the control’s properties should all be updated or only those that have not been explicitly changed from their default values. When CheckDefaults is True, only those properties and event handlers that have not been changed from the default values are updated.


TCustomListView.AddItem
 VCL Reference

TCustomListView.AddItem

TCustomListView	See also

Adds an item to the list control.

procedure AddItem(Item: String; AObject: TObject); virtual; override;

Description

AddItem adds an item to the end of the list view, possibly associating it with a specified object.

Item is the caption of the item in the list view. that is the item’s value. This becomes the value of the new TListItem object’s Caption property.

AObject is an object that you can associated with the item. It becomes the value of the new TListItem object’s Data property.


TCustomListView.AlphaSort
 VCL Reference

TCustomListView.AlphaSort

TCustomListView	See also	Example

Sorts the items in the list view.

function AlphaSort: Boolean;

Description

Call AlphaSort to sort the items in the manner maintained automatically when the SortType property is not stNone. If an OnCompare event handler is assigned, AlphaSort uses that event handler to define the sort order. Otherwise, AlphaSort sorts all list items alphabetically in ascending order. If successful, the method returns True.


TCustomListView.Arrange
 VCL Reference

TCustomListView.Arrange

TCustomListView 	See also

Arranges icons in a list view that has a ViewStyle of vslcon or vsSmallIcon.

type TListArrangement = (arAlignBottom, arAlignLeft, arAlignRight, arAlignTop, arDefault, arSnapToGrid);

procedure Arrange(Code: TListArrangement);

Description

Call Arrange to clean up the arrangement of the icons when the ViewStyle property is vslcon or vsSmallIcon. The Code parameter specifies how to arrange the icons. These are the possible values for the Code parameter:

Value	Meaning

arAlignBottom	Aligns items along the bottom edge of the list view.

arAlignLeft	Aligns items along the left edge of the window.

arAlignRight	Aligns items along the right edge of the window.

arAlignTop	Aligns items along the top edge of the window.

arDefault	Aligns items according to the style associated with the list view when the window was created. For TCustomListView, this is aligned along the top.

arSnapToGrid	Snaps all icons to the nearest grid position. This value is not supported if the application is running in virtual mode.


TCustomListView.CanChange
 VCL Reference

TCustomListView.CanChange

TCustomListView	See also

Specifies whether the properties of a list item can be changed.

function CanChange(Item: TListItem; Change: Integer): Boolean; dynamic;

Description

CanChange is called automatically when an attempt is made to change the item specified by the Item parameter. The Change parameter is a Windows-defined constant that specifies the type of change that was attempted. CanChange generates an OnChanging event to determine whether the change should be permitted. CanChange returns True if the change can proceed. CanChange returns False if the change should be blocked. CanChange always returns True if there is no OnChanging event handler.

Override CanChange to add additional logic to determine whether a change should proceed or to block the OnChanging event.


TCustomListView.CanEdit
 VCL Reference

TCustomListView.CanEdit

TCustomListView	See also

Specifies whether the text of a list item can be changed by the user.

function CanEdit(Item: TListItem): Boolean; dynamic;

Description

CanEdit is called automatically when the user attempts to edit the text of the list item specified by the Item parameter. CanEdit generates an OnEditing event to determine whether to allow the user to edit the item. CanEdit returns True if the user can proceed. CanEdit returns False if the user should be blocked from editing the item. CanEdit always returns True if there is no OnEditing event handler.

Override CanEdit to add additional logic to determine whether an item can be edited or to block the OnEditing event.


TCustomListView.Change
 VCL Reference

TCustomListView.Change

TCustomListView	See also

Generates an OnChange event.

procedure Change(Item: TListItem; Change: Integer); dynamic;

Description

Change is called automatically after the properties of the item specified by the Item parameter change. The Change parameter is a Windows-defined constant that specifies the type of change that occurred.

Override Change to perform other actions when the list items change or to block the OnChange event.


TCustomListView.ChangeScale
 VCL Reference

TCustomListView.ChangeScale

TCustomListView	See also

Repositions and resizes the list view by a specified ratio.

procedure ChangeScale(M, D: Integer); override;

Description

Use ChangeScale to rescale a list view. ChangeScale modifies the position as well as the size of the list view. Thus, ChangeScale modifies the Top, Left, Width, and Height properties.

The M and D parameters define a fraction by which to scale the list view. The M parameter is the multiplier and the D parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of M as 3, and the value of D as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%.

To scale the list view to be 33% larger than its previous size, specify the value of M as 133, and the value of D as 100 (133/100). Alternately, specify the value of M as 4, and the value of D as 3 (4/3), as the fraction 133/100 is approximately equal to 4/3.

Note:	Because control sizes and coordinates are integers, scaling them by the M/D ratio incurs some degree of roundoff error. Calling ChangeScale repeatedly means that at some point the control may disappear (when the roundoff errors make the control smaller), or creep off the form (when the roundoff errors move the location of control). When rescaling a control repeatedly, consider destroying and reloading the form after several rescalings so that the coordinates are rescaled without most of the accumulating roundoff error.


TCustomListView.Clear
 VCL Reference

TCustomListView.Clear

TCustomListView	See also

Deletes all of the items from the list control.

procedure Clear; override;

Description

Clear empties the list control so that it contains no items.


TCustomListView.ClearSelection
 VCL Reference

TCustomListView.ClearSelection

TCustomListView	See also

Removes the selection, leaving all items unselected.

procedure ClearSelection; override;

Description

Call ClearSelection to deselect any selected items in the list control. ClearSelection removes the selection, but leaves the items in the list.


TCustomListView.ColClick
 VCL Reference

TCustomListView.ColClick

TCustomListView	See also

Generates an OnColumnClick event.

procedure ColClick(Column: TListColumn); dynamic;

Description

ColClick is called automatically when the user clicks on a column header if the ColumnClick and ShowColumnHeaders properties are True and the ViewStyle property is vsReport. Override ColClick to take additional action when the user clicks on a column header or to conditionally block the OnColumnClick event.


TCustomListView.ColRightClick
 VCL Reference

TCustomListView.ColRightClick

TCustomListView	See also

Generates an OnColumnRightClick event.

procedure ColRightClick(Column: TListColumn, Point:TPoint); dynamic;

Description

ColRightClick is called automatically when the user clicks on a column header with the right mouse button if the ShowColumnHeaders properties is True and the ViewStyle property is vsReport. Override ColRightClick to take additional action when the user right clicks on a column header or to conditionally block the OnColumnRightClick event.


TCustomListView.ColumnsShowing
 VCL Reference

TCustomListView.ColumnsShowing

TCustomListView	See also

Indicates whether the ViewStyle property is vsReport.

function ColumnsShowing: Boolean;

Description

Call ColumnsShowing to determine whether the list view displays its items in columns. ColumnsShowing returns True if the value of ViewStyle is vsReport, False otherwise.


TCustomListView.CopySelection
 VCL Reference

TCustomListView.CopySelection

TCustomListView	See also

Copies the selected item or items to another TCustomListControl descendant.

procedure CopySelection(Destination: TCustomListControl); override;

Description

CopySelection adds all selected items to another TCustomListControl descendant.

Destination is the list control that receives the items.


TCustomListView.Create
 VCL Reference

TCustomListView.Create

TCustomListView	See also	Example

Creates and initializes an instance of TCustomListView.

constructor Create(AOwner: TListItems);

Description

Call Create to instantiate a list view at runtime. List view controls placed on forms at design time are created automatically.

After calling the inherited constructor, Create initializes the list view’s properties.


TCustomListView.CreateListItem
 VCL Reference

TCustomListView.CreateListItem

TCustomListView	See also

Creates a list item for the collection specified by the Items property.

function CreateListItem: TListItem; virtual;

Description

Call CreateListItem to create a TListItem object that will be added to the Items collection. CreateListItem creates the list item but does not insert it into the collection.


TCustomListView.CreateListItems
 VCL Reference

TCustomListView.CreateListItems

TCustomListView	See also

Creates the TListItems object that implements the Items property.

function CreateListItems: TListItems; virtual;

Description

TCustomListView calls CreateListItem internally to create the object that implements the Items property. As implemented in TCustomListView, CreateListItems creates and returns a TListItems instance. Override this method to use a specialized TListItems descendant instead.


TCustomListView.CreateParams
 VCL Reference

TCustomListView.CreateParams

TCustomListView	See also

Initializes the window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams is called automatically to initialize the window-creation parameters when the list view needs to create its window. CreateParams overrides the inherited method to specify a list view window that implements the property settings of the list view control.

When overriding the CreateParams method, be sure to call the inherited method before changing any of the values in the Params parameter.


TCustomListView.CreateWnd
 VCL Reference

TCustomListView.CreateWnd

TCustomListView	See also

Creates the window used by the list view.

procedure CreateWnd; override;

Description

CreateWnd creates the list view’s window, based on the parameter values provided by the CreateParams method. CreateWnd then sends messages to the newly created window so that it reflects the current property settings of the list view object.


TCustomListView.CustomDraw
 VCL Reference

TCustomListView.CustomDraw

TCustomListView	See also

Generates an OnCustomDraw or OnAdvancedCustomDraw event.

function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual;

Description

CustomDraw generates an OnCustomDraw or OnAdvancedCustomDraw event (depending on the drawing stage and the existence of the event handler). It returns a value indicating whether the list view should continue with the default drawing behavior (True) or not (False).


TCustomListView.CustomDrawItem
 VCL Reference

TCustomListView.CustomDrawItem

TCustomListView	See also

Generates an OnCustomDrawItem or OnAdvancedCustomDrawItem event.

function CustomDrawItem(Item: TListItem; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; virtual;

Description

CustomDraw generates an OnCustomDrawItem or OnAdvancedCustomDrawItem event (depending on the drawing stage and the existence of the event handler) It returns a value indicating whether the list view should continue by drawing the text of the item (True) or not (False).


TCustomListView.CustomDrawSubItem
 VCL Reference

TCustomListView.CustomDrawSubItem

TCustomListView	See also

Generates an OnCustomDrawSubItem or OnAdvancedCustomDrawSubItem event.

function CustomDrawSubItem(Item: TListItem; SubItem: Integer; State: TCustomDrawState; Stage: TCustomDrawStage): Boolean; virtual;

Description

CustomDrawSubItem generates an OnCustomDrawSubItem  or OnAdvancedCustomDrawSubItem event, depending on the current painting stage and the existence of an event handler. It returns a value indicating whether the list view should continue by drawing the text of the subitem (True) or not (False).


TCustomListView.CustomSort
 VCL Reference

TCustomListView.CustomSort

TCustomListView	See also 	Example

Sorts the items in the list using the specified ordering function.

type TLVCompare = function(lParam1, lParam2, lParamSort: Integer): Integer stdcall;

function CustomSort(SortProc: TLVCompare; lParam: Longint): Boolean;

Description

Call CustomSort to sort the items in the list using the ordering function defined by the SortProc parameter. The SortProc parameter specifies an ordering function that compares the list items passed as lParam1 and lParam2. The ordering function returns an integer that indicates whether lParam1 is the same as lParam2 (return value is 0), lParam1 is greater than lParam2 (return value is greater than 0), or lParam1 is less than lParam2 (return value is less than 0). The lParam parameter of CustomSort is an optional value that is passed as the third parameter to the ordering function.

If the SortProc parameter is nil, CustomSort compares the list items by generating an OnCompare event. This allows the OnCompare event handler to provide different ordering criteria (such as ascending vs. descending order), based on the value of the lParam parameter.

If the ordering function is not provided and there is no OnCompare event handler, CustomSort sorts items alphabetically by their Caption values.

CustomSort returns True if the list is successfully sorted.

Warning:	CustomSort does not work if the application is running in virtual mode.


TCustomListView.Delete
 VCL Reference

TCustomListView.Delete

TCustomListView	See also

Removes an item from the list view and frees the associated memory.

procedure Delete(Item: TListItem); dynamic;

Description

Call Delete to remove an item from the list view. Delete generates an OnDeletion event before freeing the list item.


TCustomListView.DeleteSelected
 VCL Reference

TCustomListView.DeleteSelected

TCustomListView	See also

Deletes all the selected items.

procedure DeleteSelected; override;

Description

Call DeleteSelected to remove all selected items from the list control. DeleteSelected deletes only the item or items that are selected.


TCustomListView.Destroy
 VCL Reference

TCustomListView.Destroy

TCustomListView	See also

Destroys an instance of TCustomListView.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which checks that the list item is not nil before calling Destroy


TCustomListView.DestroyWnd
 VCL Reference

TCustomListView.DestroyWnd

TCustomListView	See also

Destroys the window referenced by the list view’s window handle.

procedure DestroyWnd; override;

Description

Before the window is destroyed, DestroyWnd saves a copy of the list view in internal storage. The inherited method then frees any device contexts, and destroys the window.


TCustomListView.DoEndDrag
 VCL Reference

TCustomListView.DoEndDrag

TCustomListView	See also

Generates an OnEndDrag event.

procedure DoEndDrag(Target: TObject; X, Y: Integer); override;

Description

After generating an OnEndDrag event, DoEndDrag clears the internal variables used to track which item is the drop target.


TCustomListView.DoInfoTip
 VCL Reference

TCustomListView.DoInfoTip

TCustomListView	See also

Generates an OnInfoTip event.

procedure DoInfoTip(Item: TListItem; var InfoTip: string); virtual;

Description

DoInfoTip is called automatically when the mouse pauses over the list item specified by the Item parameter. It generates an OnInfoTip event, allowing the event handler to change the value of the InfoTip parameter.


TCustomListView.DoStartDrag
 VCL Reference

TCustomListView.DoStartDrag

TCustomListView	See also

Generates an OnStartDrag event and begins tracking the drop target.

procedure DoStartDrag(var DragObject: TDragObject); override;

Description

DoStartDrag is called automatically when the user starts dragging a list item with the mouse. After generating an OnStartDrag event, DoStartDrag generates a drag image and begins calculating drop target positions.


TCustomListView.DrawItem
 VCL Reference

TCustomListView.DrawItem

TCustomListView	See also

Paints a list view item when the OwnerDraw property is True.

procedure DrawItem(Item: TListItem; Rect: TRect; State: TOwnerDrawState); virtual;

Description

DrawItem generates an OnDrawItem event if there is an OnDrawItem event handler. Otherwise, it paints the text of the list view item. This method is only called if the OwnerDraw property is True.


TCustomListView.Edit
 VCL Reference

TCustomListView.Edit

TCustomListView	See also

Sets the Caption property of a list item after the user has edited it.

procedure Edit(const Item: TLVItem); dynamic;

Description

Edit is called automatically when the user finishes editing the label of a list item. Edit obtains the newly edited value from the Windows list item and generates an OnEdited event. After allowing the OnEdited event handler to change the value supplied by the user, Edit sets the Caption property of the list item.


TCustomListView.FindCaption
 VCL Reference

TCustomListView.FindCaption

TCustomListView	See also

Returns a list view item, if any, with the specified caption.

function FindCaption(StartIndex: Integer; Value: string; Partial, Inclusive, Wrap: Boolean): TListItem;

Description

Call FindCaption to search for a list view item labeled by the string specified as the Value parameter. If the Inclusive parameter is True, the list item specified by StartIndex is the first item checked. Otherwise, the search starts on the next item. If the Wrap parameter is True, the search continues at the top of the list if a match has not been found before reaching the bottom. FindCaption returns the first item with the Caption property equal to Value. If the Partial parameter is True, a Caption matches if it starts with the substring Value. If Partial is False, the Caption must match Value exactly. If no item is found, FindCaption returns nil.


TCustomListView.FindData
 VCL Reference

TCustomListView.FindData

TCustomListView	See also

Returns a list view item, if any, associated with the specified data.

function FindData(StartIndex: Integer; Value: Pointer; Inclusive, Wrap: Boolean): TListItem;

Description

Call FindData to locate a list view item with its Data property equal to the Value parameter. If the Inclusive parameter is True, the list item specified by StartIndex is the first item checked. Otherwise, the search starts on the next item. If the Wrap parameter is True, the search continues at the top of the list if a match has not been found before reaching the bottom. FindData returns the first item with a Data property equal to the Value parameter. If no item is found, FindData returns nil.


TCustomListView.GetActionLinkClass
 VCL Reference

TCustomListView.GetActionLinkClass

TCustomListView	See also

Returns the action link class that is associated with list view controls.

type TControlActionLinkClass = class ofTControlActionLink;

function GetActionLinkClass: TControlActionLinkClass; override;

Description

GetActionLinkClass returns the class type for the action link that manages communication between the list view and the action specified by the Action property. Each Action link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports.


TCustomListView.GetCount
 VCL Reference

TCustomListView.GetCount

TCustomListView

Returns the number of items in the list.

function GetCount: Integer; override;

Description

Call GetCount to determine the number of items in the list control.


TCustomListView.GetDragImages
 VCL Reference

TCustomListView.GetDragImages

TCustomListView	See also

Returns a drag cursor if a list item is being dragged.

function GetDragImages: TCustomImageList; override;

Description

GetDragImages is called automatically to obtain a list of drag images when the user drags the mouse with the button held down. If the user is dragging a list item, GetDragImages returns the drag image list that is created when the user starts dragging a list item. If the user did not start dragging the mouse over a list item, GetDragImages returns nil.


TCustomListView.GetHitTestInfoAt
 VCL Reference

TCustomListView.GetHitTestInfoAt

TCustomListView	See also

Returns information about the specified point in the list view’s client area.

function GetHitTestInfoAt(X, Y: Integer): THitTests;

Description

Use GetHitTestInfoAt to determine what elements of the list view lie under the point specified by the X and Y parameters.

X is the x-coordinate of the point.

Y is the y-coordinate of the point.


TCustomListView.GetItemAt
 VCL Reference

TCustomListView.GetItemAt

TCustomListView	See also

Returns the list item at the specified position.

function GetItemAt(X, Y: Integer): TListItem;

Description

Call GetItemAt to obtain the TListItem object for the list item found at the position specified by the X and Y parameters. X and Y specify the coordinates of the position, in pixels, relative to the top left corner of the list view. If there is no item at the location, GetItemAt returns nil.


TCustomListView.GetItemIndex
 VCL Reference

TCustomListView.GetItemIndex

TCustomListView	See also

Returns the index of the specified item in the Items property array.

function GetItemIndex(Value: TListItem): Integer; reintroduce; overload;

function GetItemIndex: Integer; reintroduce; overload; override;

Description

Call GetItemIndex to determine the position of a list item, where 0 is the index of the first item, 1 is the index of the second item, and so on. If the item specified by the Value parameter is not in the list view, GetItemIndex returns -1. If the Value parameter is omitted, the index of the Selected item is returned.


TCustomListView.GetNearestItem
 VCL Reference

TCustomListView.GetNearestItem

TCustomListView	See also

Returns the list item nearest a specified point, in a particular direction.

function GetNearestItem(Point: TPoint; Direction: TSearchDirection): TListItem;

Description

Call GetNearestItem to locate a list item from a position specified in pixel coordinates relative to the top left corner of the list view. GetNearestItem starts looking at the position specified by the Point parameter, and moves in the direction indicated by the Direction parameter until it locates a list item.

If no item is found, GetNearestItem returns nil.


TCustomListView.GetNextItem
 VCL Reference

TCustomListView.GetNextItem

TCustomListView 	See also	Example

Returns the next list item after the StartItem in the specified direction.

function GetNextItem(StartItem: TListItem; Direction: TSearchDirection; States: TItemStates): TListItem;

Description

Call GetNextItem to find the next list item after StartItem in the direction given by the Direction parameter. Only items in the state indicated by the States parameter are considered.


TCustomListView.GetSearchString
 VCL Reference

TCustomListView.GetSearchString

TCustomListView	See also

Returns the incremental search string of a list view control.

function GetSearchString: string;

Description

Call GetSearchString to obtain the character sequence typed by the user while the list view has input focus. Each time the user types a character, the list view appends the character to the search string and searches for a matching item. A timeout period of less than a second is associated with each character that the user types. If the timeout period elapses before the user types another character, the incremental search string is reset. If the system finds a match, it selects the item and, if necessary, scrolls it into view.


TCustomListView.GetSelCount
 VCL Reference

TCustomListView.GetSelCount

TCustomListView	See also

Returns the value of the SelCount property.

function GetSelCount: Integer; override;

Description

Override GetSelCount to provide the read implementation for the SelCount property. GetSelCount returns the number of items that are currently selected.


TCustomListView.InsertItem
 VCL Reference

TCustomListView.InsertItem

TCustomListView	See also

Generates an OnInsert event.

procedure InsertItem(Item: TListItem); dynamic;

Description

List view objects call InsertItem internally when new items are added to the Items property list. Override the InsertItem method to cause descendant classes to take specific action in addition to this event when new items are inserted, or to block the OnInsert event from occurring.


TCustomListView.IsCustomDrawn
 VCL Reference

TCustomListView.IsCustomDrawn

TCustomListView	See also

Determines when custom draw event handlers are called.

function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean;

Description

TCustomListView checks IsCustomDrawn to determine when to generate the OnCustomDraw, OnAdvancedCustomDraw, OnCustomDrawItem, OnAdvancedCustomDrawItem, OnCustomDrawSubItem, and OnAdvancedCustomDrawSubItem events. IsCustomDrawn returns True when the list view should generate an event.

The Target parameter indicates whether the list view is about to draw the entire control, an item, or a subitem. IsCustomDrawn does not return True unless the list view has an appropriate event handler for the target.

The Stage parameter indicates the current stage in the process of painting the list view. IsCustomDrawn returns True if the stage is cdPrePaint or if there is an Advanced custom draw event handler for the Target.


TCustomListView.IsEditing
 VCL Reference

TCustomListView.IsEditing

TCustomListView	See also

Indicates whether any item in the list view is being edited.

function IsEditing: Boolean;

Description

Call IsEditing to determine whether the user is editing the caption of any of the items in the list.  IsEditing returns True if the user is editing an item, False otherwise.


TCustomListView.MouseUp
 VCL Reference

TCustomListView.MouseUp

TCustomListView	See also

Generates an OnMouseUp event.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

TCustomListView overrides the protected MouseUp method to suppress the OnMouseUp event when a click is not on a list item.

MouseUp is called internally in response to any of the Windows mouse-up messages (WM_LBUTTONUP, WM_MBUTTONUP, WM_RBUTTONUP), decoding the message parameters into the shift-key state and position, which it passes in the Shift, X, and Y parameters, respectively. The value of the Button parameter depends on which of the Windows messages triggered the event.


TCustomListView.Notification
 VCL Reference

TCustomListView.Notification

TCustomListView	See also

Responds to notifications that components are about to be created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the image list specified by the LargeImages, SmallImages, or StateImages property is about to be destroyed. If so, Notification sets the appropriate property to nil.


TCustomListView.OwnerDataFetch
 VCL Reference

TCustomListView.OwnerDataFetch

TCustomListView	See also

Customizes a list view item before it is displayed.

type

  TItemRequests = (irText, irImage, irParam, irState, irIndent);

  TItemRequest = set of TItemRequests;

function OwnerDataFetch(Item: TListItem; Request: TItemRequest): Boolean; virtual;

Description

OwnerDataFetch initializes an item before it is drawn in a list view control. The Item parameter specifies the item that is about to be drawn. The Request parameter indicates the type of information that should be initialized. OwnerDataFetch returns True if the specified item should be displayed, and False if the item should not be drawn.

As implemented in TCustomListView, OwnerDataFetch generates an OnData event, passing the Item parameter to the event handler and ignoring the Request parameter.

OwnerDataFetch is called only if OwnerData is True.


TCustomListView.OwnerDataFind
 VCL Reference

TCustomListView.OwnerDataFind

TCustomListView	See also

Searches for an item in the list view control.

function OwnerDataFind(Find: TItemFind; const FindString: string; const FindPosition: TPoint; FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean): Integer; virtual;

Description

Override OwnerDataFind in a derived class to implement the searching capabilities of a virtual list view control (that is, when OwnerData is True).

OwnerDataFind is called when the virtual list view must find an item; for example, OwnerDataFind is called when a user attempts an incremental search.

Find specifies the type of search to perform (any of ifData, ifPartialString, ifExactString, ifNearest).

FindString specifies the item text to search for. FindString is ignored unless Find contains ifPartialString or ifExactString.

FindPosition specifies the point from which to start the search. FindPosition is ignored unless Find contains ifNearest

FindData specifies the item data to search for. FindData is ignored unless Find contains ifData.

StartIndex specifies the index of the item from which the search should start.

Direction specifies the direction for the search (sdLeft, sdRight, sdAbove, sdBelow, or sdAll).

Wrap specifies whether the search should continue from the start of the list view control if no match is found.

OwnerDataFind should return the index of the found item. If no item is found, OwnerDataFind should return –1.


TCustomListView.OwnerDataHint
 VCL Reference

TCustomListView.OwnerDataHint

TCustomListView	See also

Specifies a range of items that might be fetched.

function OwnerDataHint(StartIndex, EndIndex: Integer): Boolean; virtual;

Description

Override OwnerDataHint in a derived class to customize a range of items before OwnerDataFetch is called on them.

This method of customizing items is more efficient than individually updating items in the OwnerDataFetch method. However, the range of items does not always match what is handled by the OwnerDataFetch method; therefore, you must be prepared to update individual items in the OwnerDataFetch method as well.

StartIndex is the index of the first item that might be fetched.

EndIndex is the index of the last item that might be fetched.

OwnerDataHint is called only if OwnerData is True.


TCustomListView.OwnerDataStateChange
 VCL Reference

TCustomListView.OwnerDataStateChange

TCustomListView	See also

Specifies items that have changed states.

function OwnerDataStateChange(StartIndex, EndIndex: Integer; OldState, NewState: TItemStates): Boolean; virtual;

Description

Override OwnerDataStateChange in a derived class to update items in a virtual list view control with their new states.

StartIndex is the index of the first item that has changed.

EndIndex is the index of the last item that has changed.

OldState is the old state of the items.

NewState is the new state of the items.

OwnerDataStateChange is called only if OwnerDataFetch is True.


TCustomListView.Scroll
 VCL Reference

TCustomListView.Scroll

TCustomListView	See also

Scrolls the content of a list view by the indicated amount.

procedure Scroll(DX, DY: Integer);

Description

Call Scroll to scroll the content of a list view by DX pixels horizontally and DY pixels vertically.


TCustomListView.SelectAll
 VCL Reference

TCustomListView.SelectAll

TCustomListView	See also

Selects all items or all text in the selected item.

procedure SelectAll; override;

Description

SelectAll selects all items in the view.


TCustomListView.SetItemIndex
 VCL Reference

TCustomListView.SetItemIndex

TCustomListView	See also

Sets the value of the ItemIndex property.

procedure SetItemIndex(const Value: Integer); override;

Description

Override SetItemIndex to provide the write implementation for the ItemIndex property.

Value represents the index of the item to select, where the first item in the list has index 0, the second item has index 1, and so on. If Value is –1, SetItemIndex deselects all items (the same as the ClearSelection method).


TCustomListView.SetMultiSelect
 VCL Reference

TCustomListView.SetMultiSelect

TCustomListView	See also

Sets the value of the MultiSelect property.

procedure SetMultiSelect(Value: Boolean); virtual; override;

Description

Override SetMultiSelect to provide the write implementation for the MultiSelect property.

Value is True if the control should allow the user to select more than one item at a time, False if the control should support at most one selected item.


TCustomListView.SetViewStyle
 VCL Reference

TCustomListView.SetViewStyle

TCustomListView	See also

Sets the value of the ViewStyle property.

type TViewStyle = (vsIcon, vsSmallIcon, vsList, vsReport);

procedure SetViewStyle(Value: TViewStyle); virtual;

Description

Override SetViewStyle to provide a different write implementation for the ViewStyle property.

Value indicates the new value of ViewStyle, which controls how the list view displays its items.


TCustomListView.StringWidth
 VCL Reference

TCustomListView.StringWidth

TCustomListView	See also

Returns the width of a string, using the list view’s current font.

function StringWidth(S: string): Integer;

Description

Call StringWidth to determine the space, in pixels, required to display a string using the list view’s current font.


TCustomListView.UpdateColumn
 VCL Reference

TCustomListView.UpdateColumn

TCustomListView	See also

Updates the image of the column indicated by Index.

procedure UpdateColumn(AnIndex: Integer);

Description

UpdateColumn is called automatically when the display properties of a column in the list view change. UpdateColumn adjusts the image of the column to match the properties of the TListColumn object indexed by the AnIndex parameter in the Columns property.

UpdateColumn does nothing if ColumnsShowing returns False.


TCustomListView.UpdateColumns
 VCL Reference

TCustomListView.UpdateColumns

TCustomListView	See also

Causes the list view control to update the image of all columns.

procedure UpdateColumns;

Description

UpdateColumns is called automatically when the properties of several columns in the list view change. UpdateColumn adjusts the image of every column to match the properties of the corresponding TListColumn object listed in the Columns property.

UpdateColumns does nothing if ColumnsShowing returns False.


TCustomListView.UpdateItems
 VCL Reference

TCustomListView.UpdateItems

TCustomListView	See also

Redraws a range of items, starting at FirstIndex and ending at LastIndex.

procedure UpdateItems(FirstIndex, LastIndex: Integer);

Description

Call UpdateItems after making changes that affect the display image of the list items in the specified range.


TCustomListView.WndProc
 VCL Reference

TCustomListView.WndProc

TCustomListView	See also

Provides specific message responses for the list view.

procedure WndProc(var Message: TMessage); override;

Description

WndProc overrides the inherited method to prevent the list view from redrawing while the items are being updated.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListView


TCustomMaskEdit
 VCL Reference

TCustomMaskEdit

Hierarchy	Properties	Methods	See also

TCustomMaskEdit is the base type for edit controls that provide a mask for checking the validity of text typed into the control.

Unit

Mask

Description

TCustomMaskEdit introduces new properties and methods to expand the capabilities of TCustomEdit for validity checking using an edit mask. To create an edit control that takes advantage of the masking capabilities of TCustomMaskEdit, use a TMaskEdit object. To create an edit control that does not validate the input, use the TEdit object instead.

Do not create instances of TCustomMaskEdit. Use TCustomMaskEdit as a base class when declaring control objects that implement a masked edit control. Properties and methods of TCustomMaskEdit provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomMaskEdit Properties

TCustomMaskEdit	Alphabetically	Legend

In TCustomMaskEdit

EditMask

EditText

IsMasked

MaskState

MaxLength

Text

Derived from TCustomEdit

CanUndo

Modified

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomMaskEdit Properties

TCustomMaskEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CanUndo

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditMask

EditText

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IsMasked

Left

LRDockWidth

MaskState

MaxLength

Modified

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomMaskEdit.EditMask
 VCL Reference

TCustomMaskEdit.EditMask

TCustomMaskEdit	See also	Example

Specifies the mask that represents what text is valid for the masked edit control.

property EditMask: TEditMask;

Description

Use EditMask to restrict the characters a user can enter into the masked edit control to valid characters and formats. If the user attempts to enter an invalid character, the edit control does not accept the character. Validation is performed on a character-by-character basis by the ValidateEdit method.

Setting EditMask to an empty string removes the mask.


TCustomMaskEdit.EditText
 VCL Reference

TCustomMaskEdit.EditText

TCustomMaskEdit	See also

Specifies the text that appears in the window of the masked edit control.

property EditText: string;

Description

EditText is the value of the text for the edit control after it is formatted using the EditMask. Before the text is fully entered into a masked edit control, the EditText includes a blank character for each unentered character. As characters are entered, the blank characters in the EditText are replaced by the values that the user types.

If literal mask characters are included in the text, and no character is substituted for blanks, the values of EditText and Text are the same.

Note:	EditText only applies at runtime.


TCustomMaskEdit.IsMasked
 VCL Reference

TCustomMaskEdit.IsMasked

TCustomMaskEdit	See also 	Example

Indicates whether a mask exists for the edit control.

property IsMasked: Boolean;

Description

Read IsMasked to determine whether the EditMask property has been set. If IsMasked is True, the control has a mask, and input is validated at runtime. If IsMasked is False, the control does not restrict editing at runtime.


TCustomMaskEdit.MaskState
 VCL Reference

TCustomMaskEdit.MaskState

TCustomMaskEdit	See also

Indicates state information about how the mask is being applied.

type TMaskedState = set of (msMasked, msReEnter, msDBSetText);

property MaskState: TMaskedState;

Description

MaskState is used internally to determine appropriate actions based on how the mask is currently being applied. MaskState is a set drawn from among the following values:

Value	Meaning

msMasked	A mask has been assigned. MaskState includes msMasked when IsMasked is True.

msReEnter	An invalid character has been rejected and the next edit should be a valid replacement character.

msDBSetText	The text comes from a database field and should not be validated.

MaskState is exposed as a protected property so that derived classes can maintain and use this state information in the implementation of properties and methods.


TCustomMaskEdit.MaxLength
 VCL Reference

TCustomMaskEdit.MaxLength

TCustomMaskEdit	See also

Specifies the maximum number of characters that can appear in the edit control.

property MaxLength: Integer;

Description

MaxLength is the length of the EditText. Set MaxLength to limit the number of characters that can appear in the edit control when there is no EditMask. If there is an EditMask, MaxLength is implied by the mask itself, and cannot be changed. The EditText contains blank characters for each character that has not been entered, padding the end or beginning of every optional section, so it remains constant in length.


TCustomMaskEdit.Text
 VCL Reference

TCustomMaskEdit.Text

TCustomMaskEdit	See also

Denotes the underlying text for the masked edit control before the mask has been applied.

type

  TMaskedText = typestring;

property Text: TMaskedText;

Description

Use Text to determine the underlying value of the text before it has been formatted by the mask. Text may differ from the EditText visible in the masked edit control if the mask specifies that literal characters should be removed, if the mask includes spaces, or if the mask includes characters that have not yet been filled in by the user. Text will not contain the blank characters, spaces will not be replaced by _, and literal characters in the mask will be removed if the mask indicates they should be.

When setting Text, the value of the text is formatted using the mask, and the resulting EditText is used to update the window.

If there is no mask, Text is the text that appears in the edit control.


 VCL Reference

TCustomMaskEdit Methods

TCustomMaskEdit	Alphabetically	Legend

In TCustomMaskEdit

CheckCursor

Clear

Create

EditCanModify

GetFirstEditChar

GetLastEditChar

GetMaxChars

GetNextEditChar

GetPriorEditChar

GetSel

GetTextLen

KeyDown

KeyPress

KeyUp

ReformatText

Reset

SetCursor

SetSel

Validate

ValidateEdit

ValidateError

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomMaskEdit Methods

TCustomMaskEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CheckCursor

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EditCanModify

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFirstEditChar

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLastEditChar

GetMaxChars

GetNamePath

GetNextEditChar

GetParentComponent

GetPriorEditChar

GetSel

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

KeyUp

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

ReformatText

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Reset

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetCursor

SetFocus

SetSel

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Validate

ValidateEdit

ValidateError


TCustomMaskEdit.CheckCursor
 VCL Reference

TCustomMaskEdit.CheckCursor

TCustomMaskEdit	See also

Moves the cursor to the closest editable character and selects it if nothing is currently selected.

procedure CheckCursor;

Description

CheckCursor is called whenever the position of the cursor may have changed. It ensures that at least one character is always selected. Because editing a masked edit control consists of replacing the blank characters in the mask, there must always be a selection to replace. The selection corresponds to one or more nonliteral characters in the mask, which are either blank or contain characters for the user to reenter.


TCustomMaskEdit.Clear
 VCL Reference

TCustomMaskEdit.Clear

TCustomMaskEdit	See also

Sets the Text property to an empty string.

procedure Clear; override;

Description

Use Clear to remove all text that was entered into the masked edit control. Clear sets the value of Text to an empty string. It does not clear the EditMask. If the edit control has a mask, EditText is not empty, but has all non-literal characters replaced by blanks.


TCustomMaskEdit.Create
 VCL Reference

TCustomMaskEdit.Create

TCustomMaskEdit	See also

Creates an instance of TCustomMaskEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a masked edit control at runtime. AOwner is the component that is responsible for freeing the masked edit control (typically the form). It becomes the value of the Owner property.


TCustomMaskEdit.EditCanModify
 VCL Reference

TCustomMaskEdit.EditCanModify

TCustomMaskEdit	See also

Permits the user to edit the Text.

function EditCanModify: Boolean; virtual;

Description

The EditCanModify method defined by TCustomMaskEdit always returns True, allowing the Text to be edited. EditCanModify exists primarily to provide an interface for a method that can conditionally disallow changes to the Text by returning False.


TCustomMaskEdit.GetFirstEditChar
 VCL Reference

TCustomMaskEdit.GetFirstEditChar

TCustomMaskEdit	See also

Returns the index in the EditMask of the first nonliteral character.

function GetFirstEditChar: Integer;

Description

Use GetFirstEditChar to find the first position of the EditMask where the user can modify the EditText. 0 specifies the first character, 1 the second character, and so on. If there is no mask, GetFirstEditChar returns zero.

Use GetFirstEditChar as a starting point for programmatically processing all the nonliteral characters in the EditText. Use GetNextEditChar to continue to loop through the editable characters in the EditText, and GetLastEditChar to determine when all nonliteral characters have been processed.


TCustomMaskEdit.GetLastEditChar
 VCL Reference

TCustomMaskEdit.GetLastEditChar

TCustomMaskEdit	See also

Returns the index in the EditMask of the last nonliteral character.

function GetLastEditChar: Integer;

Description

Use GetLastEditChar to find the last position of the EditMask where the user can modify the EditText. 0 specifies the first character, 1 the second character, and so on. If there is no mask, GetLastEditChar returns the length of the text.


TCustomMaskEdit.GetMaxChars
 VCL Reference

TCustomMaskEdit.GetMaxChars

TCustomMaskEdit	See also

Returns the length of the EditText.

function GetMaxChars: Integer;

Description

If there is a mask, GetMaxChars returns the length of the EditText, including all blanks. This is the same as MaxLength, because editing in a masked edit control consists of replacing nonliteral characters. If there is no mask, GetMaxChars returns the length of the text in the window. In this case, the value returned by GetMaxChars may be less than MaxLength, which is the maximum number of characters that can be entered into the edit control.


TCustomMaskEdit.GetNextEditChar
 VCL Reference

TCustomMaskEdit.GetNextEditChar

TCustomMaskEdit	See also

Returns the first index of a nonliteral character equal to or greater than an offset.

function GetNextEditChar(Offset: Integer): Integer;

Description

Call GetNextEditChar to find the first position of the EditMask at or following Offset where the user can modify the EditText. 0 specifies the first character, 1 the second character, and so on. If there is no nonliteral character at or following Offset, GetNextEditChar returns MaxLength.

Use GetNextEditChar to loop through the editable characters in the EditText, starting with the value returned by GetFirstEditChar and using GetLastEditChar to determine when all nonliteral characters have been processed.


TCustomMaskEdit.GetPriorEditChar
 VCL Reference

TCustomMaskEdit.GetPriorEditChar

TCustomMaskEdit	See also

Returns the first index of a nonliteral character equal to or less than an offset.

function GetPriorEditChar(Offset: Integer): Integer;

Description

Call GetPriorEditChar to find the first position of the EditMask at or preceding Offset, where the user can modify the EditText. 0 specifies the first character, 1 the second character, and so on. If there is no nonliteral character at or preceding Offset, GetPriorEditChar returns the index of the first editable character following Offset.


TCustomMaskEdit.GetSel
 VCL Reference

TCustomMaskEdit.GetSel

TCustomMaskEdit	See also

Returns the endpoints of the current selection in the EditText.

procedure GetSel(var SelStart: Integer; var SelStop: Integer);

Description

Use GetSel to obtain the indexes of the first and last selected characters of the EditText, where 0 is the index of the first character. Not all the characters in the selection will necessarily be editable, if the mask contains literal characters. Do not use the resulting indexes on the Text property if there is a mask, because the EditText may contain blanks or nonliteral characters not found in the Text.

To programmatically change the selected text, use GetNextEditChar to cycle through the editable characters of the selection from SelStart to SelStop.


TCustomMaskEdit.GetTextLen
 VCL Reference

TCustomMaskEdit.GetTextLen

TCustomMaskEdit	See also

Returns the length of the underlying text.

function GetTextLen: Integer;

Description

Use GetTextLen to determine the length of the underlying text for the masked edit control. The underlying text has not been formatted for display by the mask, and may differ from the EditText that appears in the window of the control.


TCustomMaskEdit.KeyDown
 VCL Reference

TCustomMaskEdit.KeyDown

TCustomMaskEdit	See also

Supplements the inherited KeyDown to process navigation keys and the Delete key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

After calling the inherited KeyDown, KeyDown ensures that moving the cursor within the masked edit control places the cursor on an editable character, and that deleting the current selection replaces nonliteral characters with blanks. Derived objects can override this method to further supplement the processing that takes place when the user presses a key down.


TCustomMaskEdit.KeyPress
 VCL Reference

TCustomMaskEdit.KeyPress

TCustomMaskEdit	See also

Supplements the inherited method to process the Esc and Enter keys.

procedure KeyPress(var Key: Char); override;

Description

After calling the inherited method, KeyPress calls the Reset method in response to the Esc key, or calls the ValidateEdit method in response to the Enter key. Derived classes can override this method to further supplement the processing of specific keystrokes.


TCustomMaskEdit.KeyUp
 VCL Reference

TCustomMaskEdit.KeyUp

TCustomMaskEdit	See also

Supplements the inherited method to process the Ctrl+Left and Ctrl+Right key combinations.

procedure KeyUp(var Key: Word; Shift: TShiftState); override;

Description

After calling the inherited method, KeyUp makes sure that selection using the Ctrl+Left and Ctrl+Right key combinations ends with an editable selection in the edit window. Derived classes can override this method to further supplement the processing that takes place when the user releases a key.


TCustomMaskEdit.ReformatText
 VCL Reference

TCustomMaskEdit.ReformatText

TCustomMaskEdit	See also

Applies the mask NewMask to the underlying text, and updates the internal representation of the mask.

procedure ReformatText(const NewMask: string);

Description

ReformatText does the bulk of the work of setting the EditMask property at runtime. ReformatText should not be used in place of the EditMask property, however, as it does not deal with the MaskState property or the positioning of the cursor.


TCustomMaskEdit.Reset
 VCL Reference

TCustomMaskEdit.Reset

TCustomMaskEdit	See also

Returns the EditText to its value at the time when the edit control last lost focus.

procedure Reset; virtual;

Description

Reset cancels the most recent edits to the masked edit control. The EditText returns to the value at the time the control last lost focus, not the time when it first regained focus. Thus, any changes to the EditText that occurred programmatically while the edit control did not have focus are also discarded.


TCustomMaskEdit.SetCursor
 VCL Reference

TCustomMaskEdit.SetCursor

TCustomMaskEdit	See also

Moves the cursor to the first editable character at or before Pos, and selects that character.

procedure SetCursor(Pos: Integer);

Description

SetCursor handles positioning of the cursor within the EditText so that it is always on an editable character. It also ensures that at least one character is always selected. Because editing a masked edit control consists of replacing the blank characters in the mask, there must always be a selection to replace. The selection corresponds to one or more nonliteral characters in the mask, which are either blank or contain characters for the user to reenter.


TCustomMaskEdit.SetSel
 VCL Reference

TCustomMaskEdit.SetSel

TCustomMaskEdit	See also

Selects characters in the EditText from SelStart to SelStop.

procedure SetSel(SelStart: Integer; SelStop: Integer);

Description

SetSel selects the indicated range of characters in the EditText, regardless of whether any of them are editable. If SelStart is the same as SelStop, SetSel positions the cursor at the SelStart character. When using SetSel, leave the cursor in an editable position if the intent is to create a selection for the user to replace.

SetSel can be used to select non-editable characters that can then be captured by using the SelText property or by copying to the Clipboard. Once the selection has been captured, return the cursor to an editable position by calling CheckCursor.


TCustomMaskEdit.Validate
 VCL Reference

TCustomMaskEdit.Validate

TCustomMaskEdit	See also

Validates a specified string against the current mask.

function Validate(const Value: string; var Pos: Integer): Boolean; virtual;

Description

The ValidateEdit method calls Validate to perform the actual validation of the current text against the edit mask. It returns True if the string specified by Value is consistent with the edit mask, False if it detects an invalid character. If ValidateEdit returns False, it returns the position of the invalid character as the Pos parameter.


TCustomMaskEdit.ValidateEdit
 VCL Reference

TCustomMaskEdit.ValidateEdit

TCustomMaskEdit	See also

Validates the EditText against the current mask.

procedure ValidateEdit; virtual;

Description

ValidateEdit attempts to validate the EditText after each keystroke, and when the user attempts to leave the masked edit field. If the EditText does not match the specifications of the EditMask, ValidateEdit calls ValidateError to raise an exception, and returns the cursor to the first position where the EditText did not comply with the EditMask.


TCustomMaskEdit.ValidateError
 VCL Reference

TCustomMaskEdit.ValidateError

TCustomMaskEdit	See also

Beeps and raises an EDBEditError exception.

procedure ValidateError; virtual;

Description

ValidateEdit calls ValidateError when the EditText fails to comply with the EditMask.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMaskEdit


TCustomMemo
 VCL Reference

TCustomMemo

Hierarchy	Properties	Methods	See also

TCustomMemo is the base type for memo components, which are multiline edit boxes, including TMemo and TDBMemo.

Unit

StdCtrls

Description

TCustomMemo introduces new properties and methods to expand the capabilities of TCustomEdit for handling multiline edit boxes.

Do not create instances of TCustomMemo. Use TCustomMemo as a base class when declaring control objects that implement a multiline edit control. Properties and methods of TCustomMemo provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomMemo properties

TCustomMemo	Alphabetically	Legend

In TCustomMemo

Alignment

CaretPos

Lines

ScrollBars

WantReturns

WantTabs

WordWrap

Derived from TCustomEdit

CanUndo

Modified

SelLength

SelStart

SelText

Derived from TWinControl

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomMemo Properties

TCustomMemo	By Object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BiDiMode

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

Lines

LRDockWidth

Modified

Name

Owner

Parent

ParentWindow

ScrollBars

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WantReturns

WantTabs

Width

WindowProc

WordWrap


TCustomMemo.Alignment
 VCL Reference

TCustomMemo.Alignment

TCustomMemo	See also

Determines how the text is aligned within the memo control.

property Alignment: TAlignment;

Description

Use Alignment to change the way the text is formatted by the memo control. Alignment can take one of the following values:

Value	Meaning

taLeftJustify	Align text to the left side of the control

taCenter	Center text horizontally in the control.

taRightJustify	Align text to the right side of the control.


TCustomMemo.CaretPos
 VCL Reference

TCustomMemo.CaretPos

TCustomMemo	See also

Indicates the position of the caret in the client area of the memo.

property CaretPos: TPoint;

Description

Use CaretPos to determine the coordinates of the cursor. TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate. CaretPos indicates the X and Y position relative to the client origin of the memo.

To determine the position of the caret in terms of characters of text only (rather than X/Y location), use the SelStart property.


TCustomMemo.Lines
 VCL Reference

TCustomMemo.Lines

TCustomMemo	See also	Example

Contains the individual lines of text in the memo control.

property Lines: TStrings;

Description

Use Lines to manipulate text in an memo control on a line-by-line basis. Lines is a TStrings object, so the TStrings methods may be used for Lines to perform manipulations such as counting the lines of text, adding new lines, deleting lines, or replacing lines with new text.

To work with all the text at once, use the Text property. To manipulate individual lines of text, the Lines property works better.

Note:	Although Lines is implemented as a TStrings descendant, it does not implement the support for associating objects with the strings in the list.


TCustomMemo.ScrollBars
 VCL Reference

TCustomMemo.ScrollBars

TCustomMemo	See also	Example

Determines whether the memo control has scroll bars.

property ScrollBars: TScrollStyle;

Description

Use ScrollBars to give a multiline edit control horizontal or vertical scroll bars. ScrollBars can take one of the following values:

Value	Meaning

ssNone	The control has no scroll bars.

ssHorizontal	The control has a single scroll bar on the bottom edge.

ssVertical	The control has a single scroll bar on the right edge.

ssBoth	The control has a scroll bar on both the bottom and right edges.


TCustomMemo.WantReturns
 VCL Reference

TCustomMemo.WantReturns

TCustomMemo	See also

Determines whether the user can insert return characters into the text.

property WantReturns: Boolean;

Description

Set WantReturns to True to allow users to enter return characters into the text. Set WantReturns to False to allow the form to handle return characters instead.

For example, in a form with a default button (such as an OK button) and a memo control, if WantReturns is False, pressing Enter chooses the default button. If WantReturns is True, pressing Enter inserts a return character in the text.

Note:	If WantReturns is False, users can still enter return characters into the text by pressing Ctrl+Enter.


TCustomMemo.WantTabs
 VCL Reference

TCustomMemo.WantTabs

TCustomMemo	See also

Determines whether the user can insert tab characters into the text.

property WantTabs: Boolean;

Description

Set WantTabs to True to allow users to enter tab characters into the text. Set WantTabs to False if you want the tab character to select the next control on the form instead.

Note:	If WantTabs is True, users can tab into the edit control, but they can’t tab out.


TCustomMemo.WordWrap
 VCL Reference

TCustomMemo.WordWrap

TCustomMemo	See also

Determines whether the edit control inserts soft carriage returns so text wraps at the right margin.

property WordWrap: Boolean;

Description

Set WordWrap to True to make the edit control wrap text at the right margin so it fits in the client area. The wrapping is cosmetic only--the text does not include any return characters that were not explicitly entered. Set WordWrap to False to have the edit control show a separate line only where return characters were explicitly entered into the text.

Note:	There should be no use for a horizontal scroll bar if WordWrap is True.


 VCL Reference

TCustomMemo methods

TCustomMemo	Alphabetically	Legend

In TCustomMemo

Create

CreateParams

CreateWindowHandle

Destroy

GetCaretPos

GetControlsAlignment

KeyPress

Loaded

SetAlignment

SetCaretPos

SetLines

SetScrollBars

SetWordWrap

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomMemo Methods

TCustomMemo	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParams

CreateParented

CreateParentedControl

CreateWindowHandle

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCaretPos

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyPress

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetAlignment

SetBounds

SetCaretPos

SetFocus

SetLines

SetScrollBars

SetSelTextBuf

SetSubComponent

SetTextBuf

SetWordWrap

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomMemo.Create
 VCL Reference

TCustomMemo.Create

TCustomMemo	See also

Creates and initializes an instance of TCustomMemo.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TCustomMemo object.

AOwner is the component, typically the form, that is responsible for freeing the memo object. This becomes the value of the Owner property.

Derived objects that override the Create method should call the inherited Create before making any additional initializations.


TCustomMemo.CreateParams
 VCL Reference

TCustomMemo.CreateParams

TCustomMemo	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TCustomMemo overrides the inherited method to specify a scrollable multiline edit control. The Params parameter is updated to reflect the current values of the Alignment, ScrollBars, and WordWrap properties, in addition to the BorderStyle, HideSelection, PasswordChar, and ReadOnly properties that the inherited method specifies.


TCustomMemo.CreateWindowHandle
 VCL Reference

TCustomMemo.CreateWindowHandle

TCustomMemo	See also

Creates a window based on the window-creation parameter record.

procedure CreateWindowHandle(const Params: TCreateParams); override

Description

The CreateWnd method calls CreateWindowHandle to create the edit control window once it has been specified in the window-creation parameters. CreateWindowHandle creates the window by calling the CreateWindowEx API function, passing parameters from the record passed in the Params parameter. CreateWindowHandle overrides the inherited method to interpret the Caption in Params as the initial text rather than as the window caption.


TCustomMemo.Destroy
 VCL Reference

TCustomMemo.Destroy

TCustomMemo	See also

Destroys an instance of TCustomMemo.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the TCustomMemo reference is not nil, and only then calls Destroy.

Destroy frees the TStrings object that implements the Lines property before calling the inherited destructor.


TCustomMemo.::GetCaretPos
 VCL Reference

TCustomMemo.::GetCaretPos

TCustomMemo	See also

Returns the value of the CaretPos property.

function GetCaretPos: TPoint; virtual;

Description

CaretPos represents the coordinates of the cursor. GetCaretPos is the protected implementation of the CaretPos property. Override this method to change the way the caret position is computed.


TCustomMemo.GetControlsAlignment
 VCL Reference

TCustomMemo.GetControlsAlignment

TCustomMemo	See also

Returns the alignment of the memo’s text.

function GetControlsAlignment: TAlignment; override;

Description

GetControlsAlignment indicates the alignment of the memo’s text. It returns the value of the Alignment property.


TCustomMemo.KeyPress
 VCL Reference

TCustomMemo.KeyPress

TCustomMemo	See also

Ensures that return characters are not entered into the text when WantReturns is False.

procedure KeyPress(var Key: Char); override;

Description

KeyPress is called automatically when the user presses a key. After calling the inherited KeyPress, which calls the OnKeyPress event handler, KeyPress discards return characters when WantReturns isFalse.


TCustomMemo.Loaded
 VCL Reference

TCustomMemo.Loaded

TCustomMemo	See also

Initializes the memo control when it is first loaded into memory.

procedure Loaded; override;

Description

Loaded overrides the inherited method so that the Modified property is set to False when the form containing the memo is first loaded into memory. Derived classes can override the Loaded method to perform additional initializations after the memo’s form is loaded.


TCustomMemo.::SetAlignment
 VCL Reference

TCustomMemo.SetAlignment

TCustomMemo	See also

Sets the Alignment property.

procedure SetAlignment(Value: TAlignment);

Description

SetAlignment is exposed as a protected method so derived classes can customize their implementation of the Alignment property.


TCustomMemo.::SetCaretPos
 VCL Reference

TCustomMemo.SetCaretPos

TCustomMemo	See also

Sets the CaretPos property.

procedure SetCaretPos (const Value: TPoint); virtual;

Description

SetCaretPos is the property write access method for the CaretPos property. The CaretPos property returns the coordinates of the cursor. SetCaretPos sets the cursor position to Value.


TCustomMemo.SetLines
 VCL Reference

TCustomMemo.SetLines

TCustomMemo	See also

Sets the Lines property.

procedure SetLines(Value: TStrings);

Description

SetLines is the protected write implementation for the Lines property.

SetLines is exposed as a protected method so derived classes can customize their implementation of the Lines property.


TCustomMemo.::SetScrollBars
 VCL Reference

TCustomMemo.SetScrollBars

TCustomMemo	See also

Sets the ScrollBars property.

procedure SetScrollBars(Value: TScrollStyle);

Description

SetScrollBars is the property access method for the ScrollBars property.

SetScrollBars is exposed as a protected method so derived classes can customize their implementation of the ScrollBars property.


TCustomMemo.::SetWordWrap
 VCL Reference

TCustomMemo.::SetWordWrap

TCustomMemo	See also

Sets the WordWrap property.

procedure SetWordWrap(Value: Boolean);

Description

SetWordWrap is the property access method for the WordWrap property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo


TCustomRichEdit
 VCL Reference

TCustomRichEdit

Hierarchy	Properties	Methods	Events	See also

TCustomRichEdit is the base type for rich edit controls such as TRichEdit.

Unit

ComCtrls

Description

TCustomRichEdit introduces new properties and methods to expand the capabilities of TCustomMemo for rich text.

Do not create instances of TCustomRichEdit. Use TCustomRichEdit as a base class when declaring control objects that implement rich text capabilities in an edit control. Properties and methods of TCustomRichEdit provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior.


 VCL Reference

TCustomRichEdit properties

TCustomRichEdit	Alphabetically	Legend

In TCustomRichEdit

DefAttributes

DefaultConverter

HideScrollBars

HideSelection

Lines

PageRect

Paragraph

PlainText

SelAttributes

SelLength

SelStart

SelText

Derived from TCustomMemo

CaretPos

Derived from TCustomEdit

CanUndo

Modified

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomRichEdit properties

TCustomRichEdit	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefAttributes

DefaultConverter

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

HideScrollBars

HideSelection

Hint

HostDockSite

Left

Lines

LRDockWidth

Modified

Name

Owner

PageRect

Paragraph

Parent

ParentWindow

PlainText

SelAttributes

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomRichEdit.DefAttributes
 VCL Reference

TCustomRichEdit.DefAttributes

TCustomRichEdit	See also	Example

Describes the rich text characteristics of the default font for the rich edit control

property DefAttributes: TTextAttributes;

Description

Use DefAttributes to discover or set the default font characteristics that the rich edit control uses for newly inserted text. These are the characteristics of the text before any special attributes have been applied. Once any special attributes are applied to a portion of text, no text from that point on is considered to have the default attributes, even if the attributes match the DefAttributes.

For example, if a rich edit control has had no attributes applied, the entire text has the default attributes. Selecting a portion of text in the middle and applying a specific attribute (such as a font change) results in three sections: a first section with the default attributes, a middle section with the applied attribute, and a final section with a non-default set of attributes that match the default attributes. Changing the DefAttributes property affects only the first section.

When inserting new text, the font characteristics of the new text will match the font characteristics at the cursor position, or, if the typing replaces a selection, the font characteristics of the selected text. New text will only have the default attributes when typed into the section of text that has the default attributes.

Note:	DefAttributes is available only at runtime.


TCustomRichEdit.DefaultConverter
 VCL Reference

TCustomRichEdit.DefaultConverter

TCustomRichEdit	See also

Specifies the class of the TConversion object that is used to convert between native file format and the internal format of a rich text control when working with files that do not have a registered extension.

type TConversionClass = class ofTConversion;

property DefaultConverter: TConversionClass;

Description

Use DefaultConverter to specify the type of conversion to use when streaming text to or from files that do not have a registered extension. If DefaultConverter is not set, TCustomRichEdit uses TConversion, which performs no actual conversion. TCustomRichEdit encodes text attributes in rich-text format (RTF). Thus, unrecognized file extensions lead to no conversion, which works for files that contain plain text or any subset of RTF format.

To support streaming to or from files that encode rich text characteristics in some other format, register a conversion format with the file extension used by those files. Use DefaultConverter only to change the conversion that is used for unrecognized file extensions.

Note:	Use the Lines property to stream the text to or from a file.


TCustomRichEdit.HideScrollBars
 VCL Reference

TCustomRichEdit.HideScrollBars

TCustomRichEdit	See also	Example

Determines whether the scroll bars disappear when not needed.

property HideScrollBars;

Description

Use HideScrollBars to determine whether the scroll bars disappear from the edit control when the text appears completely within the edit window. Set HideScrollBars to False to prevent the scroll bars from flashing on and off when the contents of the rich edit control change.

HideScrollBars does nothing when the ScrollBars property is set to ssNone (The default for TRichEdit).


TCustomRichEdit.HideSelection
 VCL Reference

TCustomRichEdit.HideSelection

TCustomRichEdit	See also	Example

Determines whether the visual indication of the selected text remains when focus shifts to another control.

property HideSelection: Boolean;

Description

Set HideSelection to False when it is important to provide visual feedback of the selected portion of the text even when the edit control does not have focus. Set HideSelection to True to make the visual indication of selection appear only when the edit control has focus. HideSelection does not affect the actual value of the selection, only the visual indication. Always setting HideSelection to False can make forms containing many edit controls look busy.


TCustomRichEdit.Lines
 VCL Reference

TCustomRichEdit.Lines

TCustomRichEdit	See also	Example

Contains the individual lines of text in the rich text edit control.

property Lines: TStrings;

Description

Use Lines to manipulate the text in the rich text edit control on a line by line basis. Lines is a TStrings object, so TStrings methods may be used for Lines to perform manipulations such as counting the lines of text, adding lines, deleting lines, or replacing the text in lines.

To work with the text as one chunk, use the Text property. To manipulate individual lines of text, the Lines property works better.

Warning:	If you paste formatted text into the Lines property at design time, the formatting is lost when the form is saved (it does not appear at runtime). To set the value of a rich edit control at design time, you must save the formatted text in some other manner and use the LoadFromStream or LoadFromFile method of the Lines property to load the value in the OnShow method of the parent form.


TCustomRichEdit.PageRect
 VCL Reference

TCustomRichEdit.PageRect

TCustomRichEdit	See also

Specifies the dimensions, in pixels, of the logical page size used when printing the contents of a rich text edit control.

property PageRect: TRect;

Description

Use PageRect to specify the logical page size used when formatting the contents of the rich edit control for printing. Specify the dimensions in pixels.


TCustomRichEdit.Paragraph
 VCL Reference

TCustomRichEdit.Paragraph

TCustomRichEdit	See also	Example

Specifies the formatting information for the current paragraphs.

property Paragraph: TParaAttributes;

Description

Read Paragraph to get the TParaAttributes object used by the rich edit control to specify paragraph formatting information. Use the TParaAttributes object to read or write the paragraph formatting information for the current paragraph. Paragraph formatting information includes alignment, indentation, numbering, and tabs.

Paragraph is a read-only property, because a TCustomRichEdit object has only one TParaAttributes object, which cannot be changed. The attributes of the current paragraphs, however, can be changed, by setting the properties of the TParaAttributes object. These can be set one by one, or all can be set to the value of an existing TParaAttributes object by using Paragraph.Assign.

The current paragraphs are the paragraphs that contain the selected text. If no text is selected, the current paragraph is the one containing the cursor.

Note:	Paragraph is available only at runtime.


TCustomRichEdit.PlainText
 VCL Reference

TCustomRichEdit.PlainText

TCustomRichEdit	See also	Example

Controls whether the rich edit control treats the text as plain text or rich text when streaming to or from a file.

property PlainText: Boolean;

Description

To write the rich text in the control to a plain text file, set PlainText to True before streaming the text to a file. To ignore the rich text information encoded in a file, set PlainText to True before streaming the text to the control. To stream in the rich text attributes encoded in a file, or save the encoding of the rich text attributes to a file, set PlainText to False.

If the rich text attributes of a file are encoded in some format other than rich text format (RTF), it is necessary to use a converter on the text, even when PlainText is True.

Note:	Rich edit controls do not directly support streaming. Use the Lines property to stream to or from a file.


TCustomRichEdit.SelAttributes
 VCL Reference

TCustomRichEdit.SelAttributes

TCustomRichEdit	See also	Example

Describes the rich text characteristics of the selected text in the rich edit control.

property SelAttributes: TTextAttributes;

Description

Use SelAttributes to discover or set the font characteristics of the currently selected text. SelAttributes is a TTextAttributes object, which specifies characteristics such as font face, color, size, style, and pitch. To change a single attribute of the currently selected text, read SelAttributes, and set one of its properties. To change all of the attributes of the currently selected text, set SelAttributes to a TTextAttributes object that represents the desired configuration of attributes. If no text is selected, SelAttributes represents the attributes of the cursor position.

When inserting new text, the font characteristics of the new text will match SelAttributes.

Note:	SelAttributes is available only at runtime.


TCustomRichEdit.SelLength
 VCL Reference

TCustomRichEdit.SelLength

TCustomRichEdit	See also	Example

Specifies the number of characters (bytes) that are selected.

property SelLength: Integer;

Description

Read SelLength to determine the length, in bytes, of the selected text. This is the same as the number of characters unless you are using a multi-byte character set. Set SelLength to change the selection to consist of the first SelLength bytes starting at SelStart.

Note:	Setting SelLength to a value greater than the number of characters from SelStart to the end of the text results in the selection of all characters from SelStart to the end of the text. Reading SelLength immediately after setting it to a value greater than the number of available characters returns the number of characters actually selected, not the value that was just set.


TCustomRichEdit.SelStart
 VCL Reference

TCustomRichEdit.SelStart

TCustomRichEdit	See also	Example

Specifies the position of the first selected character in the text.

property SelStart: Integer;

Description

Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Set SelStart to remove the current selection and position the cursor just before the indicated character.

To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection.


TCustomRichEdit.SelText
 VCL Reference

TCustomRichEdit.SelText

TCustomRichEdit	See also

Denotes the selected portion of the edit control’s text.

property SelText: string;

Description

Read SelText to determine the value of the selected text. Set SelText to replace the selected text with a new string. If there is no selection, but the edit control has focus, set SelText to insert a new string into the text at the cursor.


 VCL Reference

TCustomRichEdit events

TCustomRichEdit	Alphabetically	Legend

In TCustomRichEdit

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange


 VCL Reference

TCustomRichEdit events

TCustomRichEdit	By object	Legend

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange


TCustomRichEdit.OnProtectChange
 VCL Reference

TCustomRichEdit.OnProtectChange

TCustomRichEdit	See also

Occurs when a user attempts to modify text that is marked as protected.

type TRichEditProtectChange = procedure(Sender: TObject; StartPos, EndPos: Integer; var AllowChange: Boolean) of object;

property OnProtectChange: TRichEditProtectChange;

Description

Write an OnProtectChange event handler to allow modification of text with the protected attribute. The StartPos and EndPos parameters indicate the beginning and end of the range of text that would be affected by the modification, where 0 is the first character in the text. To allow modification of protected text, set AllowChange to True.

To set or unset the protected attribute for a section of text, select the text and use the Protected property of the rich edit control’s SelAttributes property. To cause text to have the protected attribute by default, use the Protected property of the rich edit object’s DefAttributes property.


TCustomRichEdit.OnResizeRequest
 VCL Reference

TCustomRichEdit.OnResizeRequest

TCustomRichEdit	See also 	Example

Occurs when the text has grown either smaller or larger than the control's window size.

type TRichEditResizeEvent = procedure(Sender: TObject; Rect: TRect) of object;

property OnResizeRequest: TRichEditResizeEvent;

Description

Write an OnResizeRequest event handler to respond to notifications that the edit control is trying to resize due to changes in the text. The Rect parameter gives the desired bounding rectangle that will display all the text, in screen coordinates.


TCustomRichEdit.OnSaveClipboard
 VCL Reference

TCustomRichEdit.OnSaveClipboard

TCustomRichEdit	See also

Occurs when the window of the edit control is about to be destroyed and the edit control has delayed rendering of text copied to the clipboard..

type TRichEditSaveClipboard = procedure(Sender: TObject; NumObjects, NumChars: Integer; var SaveClipboard: Boolean) of object;

property OnSaveClipboard: TRichEditSaveClipboard;

Description

Write an OnSaveClipboard event handler to respond to notifications that the window of the edit control is about to be destroyed and the Clipboard needs information from the edit control. The parameter NumObjects is the number of objects on the Clipboard, and NumChars is the number of characters on the Clipboard. To clear all information about the edit control from the Clipboard, set SaveClipboard to False.


TCustomRichEdit.OnSelectionChange
 VCL Reference

TCustomRichEdit.OnSelectionChange

TCustomRichEdit	See also	Example

Occurs when the current selection changes.

property OnSelectionChange: TNotifyEvent;

Description

Write an OnSelectionChange event handler to respond to changes in the selected text. Changes in selection can occur when the user changes the selection using the mouse or keyboard, or when the selection is changed through the SelText property. Portions of the selection can be changed through the Lines property.


 VCL Reference

TCustomRichEdit methods

TCustomRichEdit	Alphabetically	Legend

In TCustomRichEdit

Clear

Create

CreateParams

CreateWnd

Destroy

DestroyWnd

DoSetMaxLength

FindText

GetCaretPos

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

Print

RegisterConversionFormat

RequestSize

SelectionChange

SetCaretPos

SetSelLength

SetSelStart

Derived from TCustomMemo

GetControlsAlignment

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetTextBuf

GetTextLen

Hide

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomRichEdit methods

TCustomRichEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DoSetMaxLength

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindText

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCaretPos

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelLength

GetSelStart

GetSelText

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Print

Realign

ReferenceInterface

Refresh

RegisterConversionFormat

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RequestSize

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SelectionChange

SendToBack

SetBounds

SetCaretPos

SetFocus

SetSelLength

SetSelStart

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomRichEdit.Clear
 VCL Reference

TCustomRichEdit.Clear

TCustomRichEdit	See also

Deletes all text from the rich edit control.

procedure Clear; override;

Description

Use Clear to replace the Text property with an empty string. Clear removes all text, not just the selected text. To remove just the selected text, use ClearSelection.


TCustomRichEdit.Create
 VCL Reference

TCustomRichEdit.Create

TCustomRichEdit	See also

Creates an instance of TCustomRichEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TCustomRichEditat runtime. Rich edit controls added to forms at design time are created automatically.

AOwner is a component, typically the form, that becomes the value of the Owner property.


TCustomRichEdit.CreateParams
 VCL Reference

TCustomRichEdit.CreateParams

TCustomRichEdit	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TCustomRichEdit overrides the inherited method to specify a Windows rich edit control.


TCustomRichEdit.CreateWnd
 VCL Reference

TCustomRichEdit.CreateWnd

TCustomRichEdit	See also

Creates a Windows control corresponding to the edit control.

procedure CreateWnd; override;

Description

The CreateWnd method is called when the rich edit control is created, and whenever a change to the rich edit control requires the window to be recreated. CreateWnd first calls the inherited CreateWnd, and then sends the newly created window messages to request notification of Windows events, and, if the window is being recreated, reloads the rich text from a memory stream.


TCustomRichEdit.Destroy
 VCL Reference

TCustomRichEdit.Destroy

TCustomRichEdit	See also

Destroys an instance of TCustomRichEdit.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TCustomRichEdit reference is not nil and only then calls Destroy.

Destroy overrides the inherited method to destroy all the helper objects that were allocated to manage the rich text, before calling the inherited destructor.


TCustomRichEdit.DestroyWnd
 VCL Reference

TCustomRichEdit.DestroyWnd

TCustomRichEdit	See also

Destroys the rich edit control’s window.

procedure DestroyWnd; override;

Description

DestroyWnd is called automatically when the rich edit control is destroyed or when its window must be temporarily destroyed and recreated to implement a property change. Before the window is destroyed, DestroyWnd saves a copy of the control's text in a memory stream, frees any device contexts, and finally calls DestroyWindowHandle.


TCustomRichEdit.DoSetMaxLength
 VCL Reference

TCustomRichEdit.DoSetMaxLength

TCustomRichEdit	See also

Sets the MaxLength property.

procedure DoSetMaxLength(Value: Integer); override;

Description

DoSetMaxLength overrides the inherited method to implement the MaxLength property for a rich edit window. DoSetMaxLength sends an EM_EXLIMITTEXT message to the window of the rich edit control.


TCustomRichEdit.FindText
 VCL Reference

TCustomRichEdit.FindText

TCustomRichEdit	See also 	Example

Searches a given range in the text for a target string.

type

  TSearchType = (stWholeWord, stMatchCase);

  TSearchTypes = set of TSearchType;

function FindText(const SearchStr: string; StartPos, Length: Integer; Options: TSearchTypes): Integer;

Description

Use FindText to search a range of text in a rich edit control for the string specified by the SearchStr parameter. Only the text in the range starting at the position StartPos and continuing through the next Length positions will be searched. Use Options to specify whether the search should match whole words only and whether the search should be case sensitive.  FindText returns the position of the search string, where 0 is the position of the first character in the rich edit control (as opposed to the first position in the search range).  If the search string does not appear in the indicated range, FindText returns -1.

Use FindText rather than programmatically searching through the text of the control, to keep from being thrown off by the encoding of rich text characteristics.


TCustomRichEdit.GetCaretPos
 VCL Reference

TCustomRichEdit.GetCaretPos

TCustomRichEdit	See also

Returns the cursor position.

function GetCaretPos: TPoint; override;

Description

GetCaretPos is the read implementation of the CaretPos property.


TCustomRichEdit.GetSelLength
 VCL Reference

TCustomRichEdit.GetSelLength

TCustomRichEdit	See also

Returns the SelLength property.

function GetSelLength: Integer; override;

Description

GetSelLength overrides the inherited method to implement the SelLength property for a rich edit window. GetSelLength sends an EM_EXGETSEL message to the window of the edit control and returns the difference between the starting position and the ending position.


TCustomRichEdit.GetSelStart
 VCL Reference

TCustomRichEdit.GetSelStart

TCustomRichEdit	See also

Returns the SelStart property.

function GetSelStart: Integer; override;

Description

GetSelStart overrides the inherited method to implement the SelStart property for a rich edit window. GetSelLength sends an EM_EXGETSEL message to the window of the edit control and returns the starting position.


TCustomRichEdit.GetSelText
 VCL Reference

TCustomRichEdit.GetSelText

TCustomRichEdit	See also

Returns the SelText property.

function GetSelText: string; override;

Description

GetSelText overrides the inherited method to implement the SelText property for a rich edit window. GetSelText sends an EM_GETSELTEXT message to the window of the rich edit control.


TCustomRichEdit.GetSelTextBuf
 VCL Reference

TCustomRichEdit.GetSelTextBuf

TCustomRichEdit	See also

Copies the selected text into a buffer and returns the number of characters copied.

function GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; override;

Description

Use GetSelTextBuf to copy the selected text into a character buffer. If there is no selection, the buffer receives an empty string. If the selection contains more than (BufSize - 1) characters, only the first (BufSize - 1) characters are copied. GetSelTextBuf returns the number of characters that were actually copied into the buffer.


TCustomRichEdit.Print
 VCL Reference

TCustomRichEdit.Print

TCustomRichEdit	See also	Example

Formats and prints the contents of the rich edit control.

procedure Print(const Caption: string); virtual;

Description

Use Print to print the contents of a rich edit control. The Caption parameter specifies the title that appears in the print manager and on network title pages.


TCustomRichEdit.RegisterConversionFormat
 VCL Reference

TCustomRichEdit.RegisterConversionFormat

TCustomRichEdit	See also

Registers an association between a file extension and a TConversion object that can convert between the native file format and rich text format (RTF).

type TConversionClass = class ofTConversion;

classprocedure RegisterConversionFormat(const AExtension: string; AConversionClass: TConversionClass);

Description

Rich edit controls encode text attributes in RTF format. To read from or write to files that encode text attributes in some other format, a converter is required. The converter is a descendant of TConversion that translates between the native file format and RTF when the text is streamed in or out. RegisterConversionFormat sets up an association between a file extension and a converter, so that all attempts to stream between a file with that extension and a rich edit control automatically invoke the appropriate converter.

Note:	Use the Lines property to stream the text to or from a file.


TCustomRichEdit.RequestSize
 VCL Reference

TCustomRichEdit.RequestSize

TCustomRichEdit	See also

Responds to messages from Windows when the text has grown either smaller or larger than the window size.

procedure RequestSize(const Rect: TRect); virtual;

Description

RequestSize merely calls the OnResizeRequest event handler. RequestSize is exposed as a protected method so that derived classes can change the response to Windows messages about an impending window resize. When overriding RequestSize, include a call to the OnResizeRequest event handler.


TCustomRichEdit.SelectionChange
 VCL Reference

TCustomRichEdit.SelectionChange

TCustomRichEdit	See also

Responds to messages from Windows that the selection has changed.

procedure SelectionChange; dynamic;

Description

SelectionChange merely calls the OnSelectionChange event handler. SelectionChange is exposed as a protected method so that derived classes can change the response to Windows messages about selection changes. When overriding SelectionChange, include a call to the OnSelectionChange event handler.


TCustomRichEdit.SetCaretPos
 VCL Reference

TCustomRichEdit.SetCaretPos

TCustomRichEdit	See also

Sets the cursor position in the text.

procedure SetCaretPos(const Value: TPoint); override;

Description

SetCaretPos is the write implementation of the CaretPos property.

Value is the new position of the text cursor.


TCustomRichEdit.SetSelLength
 VCL Reference

TCustomRichEdit.SetSelLength

TCustomRichEdit	See also

Sets the SelLength property.

procedure SetSelLength(Value: Integer); override;

Description

SetSelLength overrides the inherited method to implement the SelLength property for a rich edit window. SetSelLength sends an EM_EXSETSEL message to the window of the edit control, specifying a selection that begins at SelStart and ends at SelStart + Value.


TCustomRichEdit.SetSelStart
 VCL Reference

TCustomRichEdit.SetSelStart

TCustomRichEdit	See also

Returns the SelStart property.

procedure SetSelStart(Value: Integer); override;

Description

SetSelStart overrides the inherited method to implement the SelStart property for a rich edit window. SetSelLength sends an EM_EXSETSEL message to the window of the edit control to position the cursor on the position indicated by Value.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo

TCustomRichEdit


TCustomStatusBar
 VCL Reference

TCustomStatusBar

Hierarchy	Properties	Methods	Events	Using TCustomStatusBar	See also

TCustomStatusBar is the base class for objects that represent status bars.

Unit

ComCtrls

Description

TCustomStatusBar component is the base class for status bar controls. Status bars consist of a row of panels, usually aligned at the bottom of a form, that display information about an application as it runs. Each panel is represented by a TStatusPanel object listed in the Panels property.

TCustomStatusBar is intended only as a base class. To add a status bar to a form, use a TCustomStatusBar descendant such as TStatusBar.


 VCL Reference

TCustomStatusBar Properties

TCustomStatusBar	Alphabetically	Legend

In TCustomStatusBar

AutoHint

Canvas

Panels

Parent

SimplePanel

SimpleText

SizeGrip

UseSystemFont

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomStatusBar Properties

TCustomStatusBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoHint

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Panels

Parent

ParentWindow

ShowHint

Showing

SimplePanel

SimpleText

SizeGrip

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UseSystemFont

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomStatusBar.AutoHint
 VCL Reference

TCustomStatusBar.AutoHint

TCustomStatusBar	See also

Specifies whether the status bar’s text is set automatically to the current hint.

property AutoHint: Boolean;

Description

Use AutoHint to specify whether the status bar’s text is set automatically to the current hint. When AutoHint is True, the status bar automatically responds to hint actions by displaying the long version of the hint’s text in the first panel.


TCustomStatusBar.Canvas
 VCL Reference

TCustomStatusBar.Canvas

TCustomStatusBar	See also

Provides runtime access to the status bar’s drawing surface.

property Canvas: TCanvas;

Description

The read-only Canvas property provides access to the status bar’s drawing surface that you can use when implementing a handler for the OnDrawPanel event.


TCustomStatusBar.Panels
 VCL Reference

TCustomStatusBar.Panels

TCustomStatusBar	See also

Lists the panels (TStatusPanel objects) in the status bar.

property Panels: TStatusPanels;

Description

The Panels property holds a TStatusPanels—that is, a collection of TStatusPanel objects. At design time, you can add, remove, or modify panels with the Panels editor. To open the Panels editor, select the Panels property in the Object Inspector, then double-click in the Value column to the right or click the ellipsis (...) button.


TCustomStatusBar.Parent
 VCL Reference

TCustomStatusBar.Parent

TCustomStatusBar	See also

Indicates the parent of the status bar.

property Parent: TWinControl;

Description

Use the Parent property to get or set the parent of the status bar. The parent of a control is the control that contains the control. For a status bar, this is typically the form.

When creating a new status bar at runtime, you must assign the Parent property or the status bar will not be drawn.

Changing the value of Parent moves the status bar onscreen so that it is displayed within the new parent. When the parent control moves, the child moves with the parent.


TCustomStatusBar.SimplePanel
 VCL Reference

TCustomStatusBar.SimplePanel

TCustomStatusBar	See also

Determines whether the status bar displays a single panel or multiple panels.

property SimplePanel: Boolean;

Description

If SimplePanel is set to True, the status bar consists of a single panel displaying the text in SimpleText. If SimplePanel is set to False, the status bar displays a separate panel for each item in its Panels property.

Note:	When SimplePanel is False, you can’t use the SimpleText property to display text in the status bar. Instead, you must set the Text property on one of the panel objects.


TCustomStatusBar.SimpleText
 VCL Reference

TCustomStatusBar.SimpleText

TCustomStatusBar	See also

Contains the string that is displayed in the status bar when SimplePanel is set to True.

property SimpleText: string;

Description

SimpleText contains a text string to be displayed in the status panel when SimplePanel is True.


TCustomStatusBar.::SizeGrip
 VCL Reference

TCustomStatusBar.::SizeGrip

TCustomStatusBar	See also

Determines whether the status bar is resizable at runtime.

property SizeGrip: Boolean;

Description

If SizeGrip is set to True, the status bar has a triangular grip on the lower right corner. The user can resize the status bar by dragging the grip with the mouse.

A size grip will not be drawn unless the Parent property refers to the child of a TCustomForm descendant with a BorderStyle of bsSizeable or bsSizeToolWin.

Note:	If Align is set to alBottom, alRight, or alClient, the sizing grip will not work. If the Alignment property of the last panel in the status bar is set to taRightJustify, the sizing grip will truncate the panel’s text.


TCustomStatusBar.UseSystemFont
 VCL Reference

TCustomStatusBar.UseSystemFont

TCustomStatusBar	See also

Specifies whether the status bar uses the system font.

property UseSystemFont: Boolean;

Description

UseSystemFont specifies whether the status bar uses the system font. To change fonts, use the Font property.


 VCL Reference

TCustomStatusBar Events

TCustomStatusBar	Alphabetically	Legend

In TCustomStatusBar

OnCreatePanelClass

OnDrawPanel

OnHint


 VCL Reference

TCustomStatusBar Events

TCustomStatusBar	By Object	Legend

OnCreatePanelClass

OnDrawPanel

OnHint


TCustomStatusBar.OnCreatePanelClass
 VCL Reference

TCustomStatusBar.OnCreatePanelClass

TCustomStatusBar	See also

Occurs when a status panel needs to be created.

type

  TStatusPanelClass = class ofTStatusPanel;

  TSBCreatePanelClassEvent = procedure(Sender: TCustomStatusBar; var PanelClass: TStatusPanelClass) of object;

property OnCreatePanelClass: TSBCreatePanelClassEvent;

Description

Write an OnCreatePanelClass event handler to specify a custom TStatusPanel descendant that the status bar should use to implement its panels.

Sender is the status bar object that needs to add a new panel.

PanelClass returns a class reference to the TStatusPanel descendant that should be used to implement the new panel.


TCustomStatusBar.OnDrawPanel
 VCL Reference

TCustomStatusBar.OnDrawPanel

TCustomStatusBar	See also

Occurs when a status panel needs to be redrawn.

type TCustomDrawPanelEvent = procedure(StatusBar: TCustomStatusBar; Panel: TStatusPanel; const Rect: TRect) of object;

property OnDrawPanel: TCustomDrawPanelEvent;

Description

The OnDrawPanel event occurs when a status panel needs to be redisplayed—for example, when the user resizes the status bar. OnDrawPanel occurs only if the status panel’s Style property is set to psOwnerDraw.

StatusBar is the status bar object that contains the panel.

Panel is the panel that needs to be redrawn.

Rect gives the (new) dimensions of the status panel.


TCustomStatusBar.::OnHint
 VCL Reference

TCustomStatusBar.::OnHint

TCustomStatusBar	SeeAlso

Occurs when the AutoHint property is True and the status bar receives a hint action.

property OnHint: TNotifyEvent;

Description

Write an OnHint event handler to customize the way the status bar displays hints when the AutoHint property is True. When AutoHint is True and the status bar needs to display a hint, it generates an OnHint event. If the status bar has an OnHint event handler, then the status bar assumes that the event handler displays the hint and does not set the panel text to the value of the application’s current hint. If there is no OnHint event handler (and AutoHint is True), the status bar displays the text of the hint in the first panel.

OnHint does not occur if the AutoHint property is False.


 VCL Reference

TCustomStatusBar methods

TCustomStatusBar	Alphabetically	Legend

In TCustomStatusBar

ChangeScale

Create

CreatePanel

CreatePanels

CreateParams

CreateWnd

Destroy

DoHint

DrawPanel

ExecuteAction

FlipChildren

GetPanelClass

IsFontStored

SetBounds

SetParent

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomStatusBar methods

TCustomStatusBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreatePanel

CreatePanels

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoHint

DragDrop

Dragging

DrawPanel

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPanelClass

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsFontStored

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetParent

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomStatusBar.Create
 VCL Reference

TCustomStatusBar.Create

TCustomStatusBar	See also

Creates and initializes a TCustomStatusBar component.

constructor Create(AOwner: TComponent); override;

Description

The Create method creates a status bar along with its canvas and status panels.

AOwner is a component, typically the form, that becomes the value of the Owner property.


TCustomStatusBar.Destroy
 VCL Reference

TCustomStatusBar.Destroy

TCustomStatusBar	See also

Destroys TCustomStatusBar and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use the Free method, which checks for a nil object before calling Destroy.

The Destroy method destroys the status bar along with its canvas and status panels.


TCustomStatusBar.ChangeScale
 VCL Reference

TCustomStatusBar.ChangeScale

TCustomStatusBar	See also

Repositions and resizes the status bar by a specified ratio.

procedure ChangeScale(M, D: Integer); override;

Description

ChangeScale is called automatically when the form that contains the status bar is rescaled. ChangeScale modifies the position as well as the size of a control. Thus, ChangeScale modifies the control’s Top, Left, Width, and Height properties.

The M and D parameters define a fraction by which to scale the control. The M parameter is the multiplier and the D parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of M as 3, and the value of D as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%.

TCustomStatusBar overrides the inherited method to ensure that the new size of the status bar matches the system font if the UseSystemFont property is True.


TCustomStatusBar.CreatePanel
 VCL Reference

TCustomStatusBar.CreatePanel

TCustomStatusBar	See also

Creates a new panel that can be added to the Panels property.

function CreatePanel: TStatusPanel; virtual;

Description

The TStatusPanels object that implements the Panels property calls CreatePanel when it needs to add a new panel. CreatePanel generates an OnCreatePanelClass event to determine the class of the new TStatusPanel object, and then creates an instance of that class. CreatePanel returns the new status panel instance.


TCustomStatusBar.CreatePanels
 VCL Reference

TCustomStatusBar.CreatePanels

TCustomStatusBar	See also

Creates the TStatusPanels object that implements the Panels property.

function CreatePanels: TStatusPanels; virtual;

Description

TCustomStatusBar calls CreatePanels internally generate the implementation object for the Panels property.

Override this method to substitute a TStatusPanels descendant as the implementation of the Panels property or to provide special initializations to the TStatusPanels instance.


TCustomStatusBar.CreateParams
 VCL Reference

TCustomStatusBar.CreateParams

TCustomStatusBar	See also

Initializes the window-creation parameter record when the status bar window is created.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TCustomStatusBar overrides CreateParams to customize the parameters to specify a status bar control that reflects the properties of TCustomStatusBar.

The fields of the Params parameter become the parameters to a call to the CreateWindowEx API function.


TCustomStatusBar.CreateWnd
 VCL Reference

TCustomStatusBar.CreateWnd

TCustomStatusBar	See also

Creates the Windows control that represents the status bar.

procedure CreateWnd; override;

Description

The CreateHandle method calls CreateWnd to handle the particulars of creating the status bar window. TCustomStatusBar overrides the inherited method to ensure that the newly-created window and the TCustomStatusBar properties correctly reflect each other.

The Windows control for the status bar can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, CreateWnd may be called more than once during the lifetime of the TCustomStatusBar instance.


TCustomStatusBar.DoHint
 VCL Reference

TCustomStatusBar.DoHint

TCustomStatusBar	See also

Generates an OnHint event.

function DoHint: Boolean; virtual;

Description

DoHint is called automatically when the value of AutoHint is True and the status bar receives notification that it should display a hint.

If there is an OnHint event handler, DoHint calls the event handler and returns True. If no OnHint event handler is assigned, DoHint returns False.


TCustomStatusBar.DrawPanel
 VCL Reference

TCustomStatusBar.DrawPanel

TCustomStatusBar 	See also

Draws an owner-drawn panel.

procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); dynamic;

Description

DrawPanel is called automatically for each status panel that has a Style of psOwnerDraw. If there is an event handler for the OnDrawPanel event, DrawPanel calls the OnDrawPanel event handler. Otherwise, it fills the panel background using the color specified by the Color property.

Panel is the owner drawn status panel that needs to be drawn.

Rect indicates the dimensions of that panel on the status bar’s canvas.


TCustomStatusBar.ExecuteAction
 VCL Reference

TCustomStatusBar.ExecuteAction

TCustomStatusBar	See also

Processes actions for the status bar.

function ExecuteAction(Action: TBasicAction): Boolean; override;

Description

When an action executes, the application makes a series of calls to respond to that action. If, in the course of that processing, the application identifies the status bar as a potential target of the action, it calls the status bar’s ExecuteAction method.

If the action in a hint action (THintAction), ExecuteAction checks the AutoHint property, and if it is True, displays the hint and returns True. Otherwise, it allows the inherited method to respond to any other actions.

The Action parameter specifies the action that was invoked.

ExecuteAction returns True if the action was successfully dispatched, and False if the component could not handle the action.


TCustomStatusBar.FlipChildren
 VCL Reference

TCustomStatusBar.FlipChildren

TCustomStatusBar	See also

Reverses the positions of the status bar’s panels.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren iterates through the panels of the status bar, reversing their order but otherwise leaving their properties intact.

AllLevels specifies whether FlipChildren should be called recursively on the control’s children. TCustomStatusBar ignores this parameter when reversing the panels.


TCustomStatusBar.GetPanelClass
 VCL Reference

TCustomStatusBar.GetPanelClass

TCustomStatusBar	See also

Returns the class to use for implementing the panels of the status bar.

type TStatusPanelClass = class ofTStatusPanel;

function GetPanelClass: TStatusPanelClass; virtual;

Description

The CreatePanel method calls GetPanelClass to determine the default class to use when creating new panels for the status bar. This class can then be changed by an OnCreatePanelClass event handler.

TCustomStatusBar returns TStatusPanel as the default class for status bar panels. Descendants that use a TStatusPanel descendant by default can override this method to indicate a different default class.


TCustomStatusBar.IsFontStored
 VCL Reference

TCustomStatusBar.IsFontStored

TCustomStatusBar	See also

Indicates whether the value of the Font property should be saved in the form file.

function IsFontStored: Boolean;

Description

TCustomStatusBar uses IsFontStored internally to determine whether the value of the Font property should be stored in a form file with the other properties of the status bar object. IsFontStored checks the UseSystemFont, ParentFont, and DesktopFont properties. If any of these is True, the status bar gets its font from an external source, and the value of the Font property does not need to be saved.


TCustomStatusBar.SetBounds
 VCL Reference

TCustomStatusBar.SetBounds

TCustomStatusBar	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

TCustomStatusBar overrides SetBounds in order to update the size grip.

ALeft, ATop, AWidth, and AHeight specify the new values for the Left, Top, Width, and Height properties, respectively.


TCustomStatusBar.SetParent
 VCL Reference

TCustomStatusBar.SetParent

TCustomStatusBar	See also

Sets the value of the Parent property.

procedure SetParent(AParent: TWinControl); override;

Description

SetParent is the protected write implementation of the Parent property.

AParent is the new parent of the status bar.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomStatusBar


TCustomTreeView
 VCL Reference

TCustomTreeView

Hierarchy	Properties	Methods	Events	See also

TCustomTreeView is the base type for tree-view components such as TTreeView.

Unit

ComCtrls

Description

Use TCustomTreeView as a base class when defining controls that present information in a hierarchical structure with nodes that can be expanded or collapsed. Most of the properties defined in TCustomTreeView are protected so that you can choose whether to publish them in your own tree view components.

Do not create instances of TCustomTreeView. Use the generic descendent TTreeView, or create your own descendent class.


 VCL Reference

TCustomTreeView Properties

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

AutoExpand

BorderStyle

Canvas

ChangeDelay

DropTarget

HideSelection

HotTrack

Images

Indent

Items

MultiSelect

MultiSelectStyle

ReadOnly

RightClickSelect

RowSelect

Selected

SelectionCount

Selections

ShowButtons

ShowLines

ShowRoot

SortType

StateImages

ToolTips

TopItem

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomTreeView Properties

TCustomTreeView	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoExpand

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ChangeDelay

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DropTarget

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

HotTrack

Images

Indent

Items

Left

LRDockWidth

MultiSelect

MultiSelectStyle

Name

Owner

Parent

ParentWindow

ReadOnly

RightClickSelect

RowSelect

Selected

SelectionCount

Selections

ShowButtons

ShowHint

Showing

ShowLines

ShowRoot

SortType

StateImages

TabOrder

TabStop

Tag

TBDockHeight

ToolTips

Top

TopItem

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TCustomTreeView.AutoExpand
 VCL Reference

TCustomTreeView.AutoExpand

TCustomTreeView	See also

Specifies whether the nodes in the tree view automatically expand and collapse depending on the selection.

property AutoExpand: Boolean;

Description

Set AutoExpand to True to cause the selected item to expand and the unselected items to collapse.


TCustomTreeView.BorderStyle
 VCL Reference

TCustomTreeView.BorderStyle

TCustomTreeView	See also

Determines whether the tree view control has a border.

property BorderStyle: TBorderStyleTBorderStyle;

Description

Set BorderStyle to specify whether the tree view control should be outlined with a single-line border. These are the possible values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border


TCustomTreeView.Canvas
 VCL Reference

TCustomTreeView.Canvas

TCustomTreeView	See also	Example

Provides access to the canvas.

property Canvas: TCanvas;

Description

Use the Canvas property to paint to the canvas from the OnCustomDraw and OnCustomDrawItem event handlers.


TCustomTreeView.ChangeDelay
 VCL Reference

TCustomTreeView.ChangeDelay

TCustomTreeView	See also

Specifies the delay between when a node is selected and when the OnChange event occurs.

property ChangeDelay: Integer;

Description

Use ChangeDelay to get or set the delay, in milliseconds, between when a node is selected and when the OnChange event occurs.

Set the ChangeDelay to 50 milliseconds to emulate the behavior of the tree-view control used in Windows Explorer.


TCustomTreeView.DropTarget
 VCL Reference

TCustomTreeView.DropTarget

TCustomTreeView	See also

Specifies which item in the tree view appears as the target of a drag and drop operation.

property DropTarget: TTreeNode;

Description

Read DropTarget to determine whether a node in the tree view is drawn as the target of a drag and drop operation. Set DropTarget when specifying a particular node in the tree view as the drop target of a dragged item.

Note:	When DropTarget is set, the application must still handle the actual logic of accepting the dragged object by the indicated node.


TCustomTreeView.HideSelection
 VCL Reference

TCustomTreeView.HideSelection

TCustomTreeView	See also

Determines whether a selected node appears selected when the focus shifts to another control.

property HideSelection: Boolean;

Description

Use HideSelection to specify whether the user is given visual feedback about the current selection in the tree view when it does not have focus. If True, the selected node is not visually distinct from other nodes until focus returns to the control. If False, the node always appears selected.


TCustomTreeView.HotTrack
 VCL Reference

TCustomTreeView.HotTrack

TCustomTreeView	See also

Specifies whether list items are highlighted when the mouse passes over them.

property HotTrack: Boolean;

Description

Set HotTrack to True to provide visual feedback about which item is under the mouse. Set HotTrack to False to suppress the visual feedback about which item is under the mouse.


TCustomTreeView.Images
 VCL Reference

TCustomTreeView.Images

TCustomTreeView	See also

Determines which image list is associated with the tree view.

property Images: TCustomImageList;

Description

Use Images to provide a customized list of bitmaps that can be displayed to the left of a node’s label. Individual nodes specify the image from this list that should appear by setting their ImageIndex property.


TCustomTreeView.Indent
 VCL Reference

TCustomTreeView.Indent

TCustomTreeView	See also	Example

Specifies the amount of indentation in pixels when a list of child nodes is expanded.

property Indent: Integer;

Description

Use Indent to determine how far child nodes are indented from their parent nodes when the parent is expanded.


TCustomTreeView.Items
 VCL Reference

TCustomTreeView.Items

TCustomTreeView	See also 	Example

Lists the individual nodes that appear in the tree view control.

property Items: TTreeNodes;

Description

Individual nodes in a tree view are TTreeNode objects. These individual nodes can be accessed by using the Items property along with the item's index into the tree view. For example, to access the second item in the tree view, you could use the following code.

MyTreeNode := TreeView1.Items[1];

When setting this property at design-time in the Object Inspector the TreeView Items Editor appears. Use the New Item and New SubItem buttons to add items to the tree view. Use the Text property to modify what text is displayed in the label of the item.

At run-time nodes can be added and inserted by using the TTreeNodes methods AddChildFirst, AddChild, AddChildObjectFirst, AddChildObject, AddFirst, Add, AddObjectFirst, AddObject and Insert.

Note:	Accessing tree view items by index can be time-intensive, particularly when the tree view contains many items. For optimal performance, try to design your application so that it has as few dependencies on the tree view’s item index as possible.


TCustomTreeView.MultiSelect
 VCL Reference

TCustomTreeView.MultiSelect

TCustomTreeView

Determines whether the user can select more than one tree node at a time.

property MultiSelect: Boolean;

Description

Set MultiSelect to specify whether users can select multiple nodes using the Control and Shift keys. A selection style must also be chosen in MultiSelectStyle.


TCustomTreeView.MultiSelectStyle
 VCL Reference

TCustomTreeView.MultiSelectStyle

TCustomTreeView

Determines how multiple node selections work.

type

  TMultiSelectStyles = (msControlSelect, msShiftSelect, msVisibleOnly, msSiblingOnly);

  TMultiSelectStyle = setof TMultiSelectStyles;

property MultiSelectStyle: TMultiSelectStyle default [msControlSelect];

Description

MultiSelectStyle determines how mutiple selections are made when MultiSelect is True. MultiSelectStyle must include at least one of the following values.

Value	Meaning

msControlSelect	Clicking on any node with the Control key pressed toggles the selection of that node.

msShiftSelect	Clicking on any node with the Shift key press selects that node, the last single node selected, and the nodes in between. All other nodes are deselected.

msVisibleOnly	Multiple selections with the Shift key do not include child nodes of collapsed nodes.

msSiblingOnly	Selected nodes are restricted to a single set of siblings.

If msControlSelect or msShiftSelect are in effect, the last singly-selected node becomes the primary selection, referenced by Selections[0]. The primary selection is the anchor for extended selections using the Shift key.


TCustomTreeView.ReadOnly
 VCL Reference

TCustomTreeView.ReadOnly

TCustomTreeView	See also

Determines whether the user can edit the node labels.

property ReadOnly: Boolean;

Description

Use ReadOnly to specify whether the user can edit the nodes of the tree view. If ReadOnly is True, the user can expand and collapse nodes, but can’t edit their labels. If ReadOnly is False, the user can edit the labels as well. The default value is False.


TCustomTreeView.RightClickSelect
 VCL Reference

TCustomTreeView.RightClickSelect

TCustomTreeView	See also

Determines whether the Selected property returns nodes that are selected using the right mouse button.

property RightClickSelect: Boolean;

Description

Use RightClickSelect to allow the Selected property to indicate nodes the user clicks with the right mouse button.  If RightClickSelect is True, the value of Selected is the value of the node last clicked with either the right or left mouse button.  If RightClickSelect is False, the value of Selected is the node last clicked using the left mouse button.

RightClickSelect affects only the value of the Selected property.  It does not cause the tree view to highlight a new node if the node is selected using the right mouse button.

Note:	RightClickSelect must be set to True before the user right-clicks the tree view for it to affect the value of the Selected property.


TCustomTreeView.RowSelect
 VCL Reference

TCustomTreeView.RowSelect

TCustomTreeView	See also

Specifies whether the entire row of the selected item is highlighted.

property RowSelect: Boolean;

Description

Set RowSelect to True to cause the entire row of the selected item to be highlighted.

RowSelect is ignored if ShowLines is True.


TCustomTreeView.Selected
 VCL Reference

TCustomTreeView.Selected

TCustomTreeView	See also	Example

Specifies the selected node in the tree view.

property Selected: TTreeNode;

Description

Read Selected to access the selected node of the tree view. If there is no selected node, the value of Selected is nil.

Set Selected to set a node in the tree view. When a node becomes selected, the tree view's OnChanging and OnChanged events occur. Also, if the specified node is the child of a collapsed parent item, the parent's list of child items is expanded to reveal the specified node. In this case, the tree views OnExpanded and OnExpanding events occur as well.

If the RightClickSelect property is True, the value of Selected is the last node that was clicked in the tree view, even if it was clicked with the right mouse button.  This may differ from the node that is highlighted to indicate selection.

If the MultiSelect property is True and the MultiSelectStyle property includes msControlSelect, then Selected returns the last node clicked on, even if that click deselected the node. For a current selection status when MultiSelect is True, refer to the Selections property.


TCustomTreeView.SelectionCount
 VCL Reference

TCustomTreeView.SelectionCount

TCustomTreeView

Returns number of nodes selected.

property SelectionCount: Cardinal;

Description

SelectionCount returns the number of nodes currently selected.


TCustomTreeView.Selections
 VCL Reference

TCustomTreeView.Selections

TCustomTreeView

Returns nodes selected.

property Selections[Index: Integer]: TTreeNode;

Description

Selections returns one of selected nodes. The maximum value of Index is SelectionCount-1. If more than one node is selected, Selections[0] is the primary selected node. This node is the starting point for extended selections if MultiSelectStyle includes msShiftSelect.


TCustomTreeView.ShowButtons
 VCL Reference

TCustomTreeView.ShowButtons

TCustomTreeView	See also

Specifies whether to display plus (+) and minus (-) buttons to the left side of each parent item.

property ShowButtons: Boolean;

Description

If ShowButtons is True, a button will appear to the left of each parent item. The user can click the button to expand or collapse the child items as an alternative to double-clicking the parent item.


TCustomTreeView.ShowLines
 VCL Reference

TCustomTreeView.ShowLines

TCustomTreeView	See also

Specifies whether to display the lines that link child nodes to their corresponding parent nodes.

property ShowLines: Boolean;

Description

If ShowLines is True, lines linking child nodes to their parent nodes are displayed. Nodes at the root of the hierarchy are not automatically linked. To link nodes at the root, the ShowRoot property must also be set to True.


TCustomTreeView.ShowRoot
 VCL Reference

TCustomTreeView.ShowRoot

TCustomTreeView	See also

Specifies whether lines connecting top-level nodes are displayed.

property ShowRoot: Boolean;

Description

To show lines connecting top-level nodes to a single root, set the tree view's ShowRoot and ShowLines properties to True.


TCustomTreeView.SortType
 VCL Reference

TCustomTreeView.SortType

TCustomTreeView	See also

Determines if and how the nodes in a tree view are automatically sorted.

property SortType: TSortType;

Description

Once a tree view is sorted, the original hierarchy is lost. That is, setting the SortType back to stNone will not restore the original order of items. These are the possible values:

Value	Meaning

stNone	No sorting is done.

stData	The items are sorted when the Data object or SortType is changed.

stText	The items are sorted when the Caption or SortType is changed.

stBoth	The items are sorted when either the Data object, the Caption or SortType is changed

Optionally, the OnCompare event can be hooked to handle comparisons. The OnCompare event will be called to compare two nodes for sorting.


TCustomTreeView.StateImages
 VCL Reference

TCustomTreeView.StateImages

TCustomTreeView	See also

Determines which image list to use for state images.

property StateImages: TCustomImageList;

Description

Use StateImages to provide a set of bitmaps that reflect the state of tree view nodes. The state image appears as an additional image to the left of the item's icon.


TCustomTreeView.ToolTips
 VCL Reference

TCustomTreeView.ToolTips

TCustomTreeView	See also

Specifies whether the items in the tree view have tooltips.

property ToolTips: Boolean;

Description

Set ToolTips to True to specify that items in the tree view control have tooltips (Help Hints).

Specify the ToolTip text in an OnHint event handler using the Hint property.


TCustomTreeView.TopItem
 VCL Reference

TCustomTreeView.TopItem

TCustomTreeView	See also

Specifies the topmost node that appears in the tree view.

property TopItem: TTreeNode;

Description

When TopItem is changed, the tree view scrolls vertically so that the specified node is topmost in the list view.


 VCL Reference

TCustomTreeView Events

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

OnAddition

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnCancelEdit

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnCompare

OnCreateNodeClass

OnCustomDraw

OnCustomDrawItem

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex


 VCL Reference

TCustomTreeView Events

TCustomTreeView	By Object	Legend

OnAddition

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnCancelEdit

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnCompare

OnCreateNodeClass

OnCustomDraw

OnCustomDrawItem

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex


TCustomTreeView.OnAddition
 VCL Reference

TCustomTreeView.OnAddition

TCustomTreeView

Occurs when new node is added.

property OnAddition: TTVExpandedEvent;

Description

OnAddition occurs when a new node is added to the control.


TCustomTreeView.OnAdvancedCustomDraw
 VCL Reference

TCustomTreeView.OnAdvancedCustomDraw

TCustomTreeView	See also

Occurs at discrete stages during the painting of the tree view control.

property OnAdvancedCustomDraw: TTVAdvancedCustomDrawEvent;

Description

Write an OnAdvancedCustomDraw event handler to paint an owner-drawn tree view. Use the Canvas property as a drawing surface when painting the image of the tree view.

To paint individual items, use the OnAdvancedCustomDrawItem or OnCustomDrawItem event instead.

Note:	OnAdvancedCustomDraw occurs at several stages during the paint process, not just immediately prior to the default rendering. If you only need to use the cdPrePaint stage, it is more efficient to use the OnCustomDraw event.


TCustomTreeView.OnAdvancedCustomDrawItem
 VCL Reference

TCustomTreeView.OnAdvancedCustomDrawItem

TCustomTreeView	See also

Occurs at discrete stages during the painting of tree view nodes.

property OnCustomDrawItem: TTVCustomDrawItemEvent;

Description

Write an OnAdvancedCustomDrawItem event handler to customize the painting of individual items in the tree view.

Note:	OnAdvancedCustomDrawItem occurs at several stages during the paint process and allows you to suppress the default painting of tree node images while still allowing the default painting of the node. If you only need to use the cdPrePaint stage and do not want to suppress only the painting of tree node images, it is more efficient to use the OnCustomDrawItem event.


TCustomTreeView.OnCancelEdit
 VCL Reference

TCustomTreeView.OnCancelEdit

TCustomTreeView

Occurs when user cancels caption edit..

property OnCancelEdit: TTVChangedEvent;

Description

The OnCancelEdit event occurs when a user cancels a node editing operation.


TCustomTreeView.OnChange
 VCL Reference

TCustomTreeView.OnChange

TCustomTreeView	See also

Occurs whenever the selection has changed from one node to another.

type TTVChangedEvent = procedure(Sender: TObject; Node: TTreeNode) of object;

property OnChange: TTVChangedEvent;

Description

Write an OnChange event handler to take specific action when the selected node changes. The Sender parameter is the tree view whose selected node changes, and the Node parameter is the newly selected node.

Note:	The OnChange event does not occur for nodes selected using the right mouse button when RightClickSelect is True.  To respond to changes in the value of the Selected property when RightClickSelect is True, use the OnMouseUp event.


TCustomTreeView.OnChanging
 VCL Reference

TCustomTreeView.OnChanging

TCustomTreeView	See also

Occurs when the selection is about to change from one node to another.

type TTVChangingEvent = procedure(Sender: TObject; Node: TTreeNode; var AllowChange: Boolean) of object;

property OnChanging: TTVChangingEvent;

Description

Write an OnChanging event handler to selectively prevent selection from moving to specific nodes.

The TTVChangingEvent type points to a method that is called when the selection is about to be changed from one node to another. Set AllowChange to False, to prevent selection from moving to a new node. The Node parameter specifies the node that is about to be selected.


TCustomTreeView.OnCollapsed
 VCL Reference

TCustomTreeView.OnCollapsed

TCustomTreeView	See also

Occurs after a node has been collapsed.

property OnCollapsed: TTVExpandedEvent;

Description

Write an OnCollapsed event handler to respond after a node in the tree view collapses. The Node parameter is the node whose children are no longer visible.


TCustomTreeView.OnCollapsing
 VCL Reference

TCustomTreeView.OnCollapsing

TCustomTreeView	See also

Occurs when a node is about to be collapsed.

type TTVCollapsingEvent = procedure(Sender: TObject; Node: TTreeNode; var AllowCollapse: Boolean) of object;

property OnCollapsing: TTVCollapsingEvent;

Description

The TTVCollapsingEvent type points to a method that is called when a node is about to be collapsed. Set the AllowCollapse parameter to False to prevent the node specified by the Node parameter from being collapsed.


TCustomTreeView.OnCompare
 VCL Reference

TCustomTreeView.OnCompare

TCustomTreeView	See also

Occurs when two nodes must be compared during a sort of the nodes in the tree view.

type TTVCompareEvent = procedure(Sender: TObject; Node1, Node2: TTreeNode; Data: Integer; var Compare: Integer) of object;

property OnCompare: TTVCompareEvent;

Description

Write an OnCompare event handler to customize the sort order of the nodes in the tree view. Set the Compare parameter to a value less than 0 if Node1 is less than Node2. Set Compare to 0 if Node1 is equivalent to Node2, and set Compare to a value greater than 0 if Node1 is greater than Node2. If an OnCompare event handler is not provided, tree view nodes are sorted alphabetically, based on their labels.


TCustomTreeView.OnCreateNodeClass
 VCL Reference

TCustomTreeView.OnCreateNodeClass

TCustomTreeView

Occurs when a status panel object is about to be created.

type TTVCreateNodeClassEvent = procedure(Sender: TCustomTreeView; var NodeClass: TTreeNodeClass) ofobject;

property OnCreateNodeClass: TTVCreateNodeClassEvent;

Description

OnCreateNodeClass occurs when a new node object is about to be created.

Sender is the status bar object that needs to add a new panel.

PanelClass returns a class reference that is instantiated to create a new node object.


TCustomTreeView.OnCustomDraw
 VCL Reference

TCustomTreeView.OnCustomDraw

TCustomTreeView	See also	Example

Occurs immediately prior to painting the tree view control.

property OnCustomDraw: TTVCustomDrawEvent;

Description

Write an OnCustomDraw event handler to paint an owner-drawn tree view. Use the Canvas property as a drawing surface when painting the image of the tree view.

To paint individual items, use the OnCustomDrawItem event instead.

Note:	OnCustomDraw only occurs prior to painting the tree view control. To customize the painting at other stages of the paint process (such as after the default drawing), use OnAdvancedCustomDraw instead.


TCustomTreeView.OnCustomDrawItem
 VCL Reference

TCustomTreeView.OnCustomDrawItem

TCustomTreeView	See also	Example

Occurs immediately prior to painting a node in a tree view control.

property OnCustomDrawItem: TTVCustomDrawItemEvent;

Description

Write an OnCustomDrawItem event handler to paint individual items in the tree view, or to provide a background to the item before the default rendering of the item.

Note:	OnCustomDrawItem only occurs prior to painting individual tree items. To customize the painting of items at other stages of the paint process (such as after the item is painted), use OnAdvancedCustomDrawItem instead.


TCustomTreeView.OnDeletion
 VCL Reference

TCustomTreeView.OnDeletion

TCustomTreeView	See also

Occurs when a node in the tree view is deleted.

property OnDeletion: TTVExpandedEvent;

Description

Write an OnDeletion event handler to respond when a node is deleted from the tree view control.


TCustomTreeView.OnEdited
 VCL Reference

TCustomTreeView.OnEdited

TCustomTreeView	See also

Occurs after the user edits the Text property of a node.

type TTVEditedEvent = procedure(Sender: TObject; Node: TTreeNode; var S: string) of object;

property OnEdited: TTVEditedEvent;

Description

Write an OnEdited event handler to respond to changes the user makes to the node labels. The Node parameter is the node whose label was edited. The S parameter is the new value of the node’s Text property. The node’s label can be changed in an OnEdited event handler before the user’s edits are committed. This event can occur only if ReadOnly is set to False.


TCustomTreeView.OnEditing
 VCL Reference

TCustomTreeView.OnEditing

TCustomTreeView	See also

Occurs when the user starts to edit the Text property of a node.

type TTVEditingEvent = procedure(Sender: TObject; Node: TTreeNode; var AllowEdit: Boolean) of object;

property OnEditing: TTVEditingEvent;

Description

Write an OnEditing event handler to determine whether the user is allowed to edit the label of a specific node in the tree view. Set the AllowEdit parameter to False to prevent the user from editing the node specified by the Node parameter. To disallow editing of all nodes in the tree view, use the ReadOnly property instead.


TCustomTreeView.OnExpanded
 VCL Reference

TCustomTreeView.OnExpanded

TCustomTreeView	See also

Occurs after a node is expanded.

property OnExpanded: TTVExpandedEvent;

Description

Write an OnExpanded event handler to respond when a node in the tree view is expanded. The Node parameter specifies the node whose children are now displayed to the user.


TCustomTreeView.OnExpanding
 VCL Reference

TCustomTreeView.OnExpanding

TCustomTreeView	See also

Occurs when a node is about to be expanded.

type TTVExpandingEvent = procedure(Sender: TObject; Node: TTreeNode; var AllowExpansion: Boolean) of object;

property OnExpanding: TTVExpandingEvent;

Description

Write an OnExpanding event handler to determine whether a node can be expanded. Set the AllowExpansion parameter to False to prevent the node from expanding.


TCustomTreeView.OnGetImageIndex
 VCL Reference

TCustomTreeView.OnGetImageIndex

TCustomTreeView	See also

Occurs when the tree view looks up the ImageIndex of a node.

property OnGetImageIndex: TTVExpandedEvent;

Description

Write an OnGetImageIndex event handler to change the image index for the particular node before it is drawn. For example, the bitmap of a node can be changed to indicate a different state for the node.


TCustomTreeView.OnGetSelectedIndex
 VCL Reference

TCustomTreeView.OnGetSelectedIndex

TCustomTreeView	See also

Occurs when the tree view looks up the SelectedIndex of a node.

property OnGetSelectedIndex: TTVExpandedEvent;

Description

Write an OnGetSelectedIndex event handler to change the selected image index of a node before it is drawn.


 VCL Reference

TCustomTreeView Methods

TCustomTreeView	Alphabetically	Legend

In TCustomTreeView

AlphaSort

CanChange

CanCollapse

CanEdit

CanExpand

Change

ClearSelection

Collapse

Create

CreateNode

CreateParams

CreateWnd

CustomDraw

CustomDrawItem

CustomSort

Delete

Deselect

Destroy

DestroyWnd

DoEndDrag

DoStartDrag

Edit

Expand

FindNextToSelect

FullCollapse

FullExpand

GetDragImages

GetHitTestInfoAt

GetImageIndex

GetNodeAt

GetSelectedIndex

GetSelections

IsCustomDrawn

IsEditing

Loaded

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

Select

SetDragMode

Subselect

WndProc

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomTreeView Methods

TCustomTreeView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanChange

CanCollapse

CanEdit

CanExpand

CanFocus

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearSelection

ClientToParent

ClientToScreen

Collapse

ContainsControl

ControlAtPos

Create

CreateNode

CreateParams

CreateParented

CreateParentedControl

CreateWnd

CustomDraw

CustomDrawItem

CustomSort

DefaultHandler

Delete

Deselect

Destroy

DestroyComponents

Destroying

DestroyWnd

DisableAlign

Dispatch

Dock

DockDrop

DoEndDrag

DoStartDrag

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

Edit

EnableAlign

EndDrag

ExecuteAction

Expand

FieldAddress

FindChildControl

FindComponent

FlipChildren

FindNextToSelect

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

FullCollapse

FullExpand

GetControlsAlignment

GetDragImages

GetHitTestInfoAt

GetImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNodeAt

GetParentComponent

GetSelectedIndex

GetSelections

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsCustomDrawn

IsEditing

IsImplementorOf

IsRightToLeft

Loaded

LoadFromFile

LoadFromStream

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

Select

SendToBack

SetBounds

SetDragMode

SetFocus

SetSubComponent

SetTextBuf

Show

Subselect

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WndProc


TCustomTreeView.AlphaSort
 VCL Reference

TCustomTreeView.AlphaSort

TCustomTreeView	See also

Sort tree nodes.

function AlphaSort([ARecurse: Boolean]): Boolean;

Description

AlphaSort triggers node sorting or resorting. If an OnCompare event handler is defined, that routine determines sort order. If no OnCompare handler is defined, nodes are sorted by a simple case-sensitive compare of their captions.

The optional ARecurse parameter (default True) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

Calling AlphaSort is equivalent to calling CustomSort with a Nil procedure parameter and a data parameter of 0.

Custom TCustomTreeView.AlphaSort is equivalent to calling AlphaSort for the Items property, except that TTreeNodes.AlphaSort is not recursive by default.

To sort a subtree, use TTreeNode.AlphaSort.


TCustomTreeView.CanChange
 VCL Reference

TCustomTreeView.CanChange

TCustomTreeView	See also

Generates an OnChanging event.

function CanChange(Node: TTreeNode): Boolean; dynamic;

Description

CanChange is called automatically whenever an attempt is made to change the selected node. The Node parameter indicates the currently selected node. CanChange returns True if selection can move away from the specified node, False otherwise.

If there is no OnChanging event handler, CanChange returns True.

Override this method to make additional, class-specific responses in addition to the OnChanging event or to suppress the OnChanging event.


TCustomTreeView.CanCollapse
 VCL Reference

TCustomTreeView.CanCollapse

TCustomTreeView	See also

Generates an OnCollapsing event.

function CanCollapse(Node: TTreeNode): Boolean; dynamic;

Description

CanCollapse is called automatically whenever an attempt is made to collapse the node specified by the Node parameter. CanCollapse returns True if node can be collapsed, False otherwise.

If there is no OnCollapsing event handler, CanCollapse returns True.

Override this method to make additional, class-specific responses in addition to the OnCollapsing event or to suppress the OnCollapsing event.


TCustomTreeView.CanEdit
 VCL Reference

TCustomTreeView.CanEdit

TCustomTreeView	See also

Generates an OnEditing event.

function CanEdit(Node: TTreeNode): Boolean; dynamic;

Description

CanEdit is called automatically whenever an attempt is made to edit the node specified by the Node parameter. CanEdit returns True if the user can edit the specified node, False otherwise.

If there is no OnEditing event handler, CanEdit returns True.

Override this method to make additional, class-specific responses in addition to the OnEditing event or to suppress the OnEditing event.


TCustomTreeView.CanExpand
 VCL Reference

TCustomTreeView.CanExpand

TCustomTreeView	See also

Generates an OnExpanding event.

function CanExpand(Node: TTreeNode): Boolean; dynamic;

Description

CanExpand is called automatically whenever an attempt is made to expand the node specified by the Node parameter. CanExpand returns True if node can be expanded, False otherwise.

If there is no OnExpanding event handler, CanExpand returns True.

Override this method to make additional, class-specific responses in addition to the OnExpanding event or to suppress the OnExpanding event.


TCustomTreeView.Change
 VCL Reference

TCustomTreeView.Change

TCustomTreeView	See also

Generates an OnChange event.

procedure Change(Node: TTreeNode); dynamic;

Description

Change is called automatically whenever the selected node changes. The Node parameter indicates the newly selected node.

Override this method to make additional, class-specific responses in addition to the OnChange event or to suppress the OnChange event.


TCustomTreeView.ClearSelection
 VCL Reference

TCustomTreeView.ClearSelection

TCustomTreeView

Deselect all selected nodes, optionally excluding primary selection.

procedure ClearSelection(KeepPrimary: Boolean = False); virtual;

Description

ClearSelection deselects all selected nodes. If the KeepPrimary parameter is True, the primary selection (Selections[0]) is not toggled.


TCustomTreeView.Collapse
 VCL Reference

TCustomTreeView.Collapse

TCustomTreeView	See also

Generates an OnCollapsed event.

procedure Collapse(Node: TTreeNode); dynamic;

Description

Collapse is called automatically after the node specified by the Node parameter collapses.

Override this method to make additional, class-specific responses in addition to the OnCollapsed event or to suppress the OnCollapsed event.


TCustomTreeView.Create
 VCL Reference

TCustomTreeView.Create

TCustomTreeView	See also

Creates an instance of a TTreeView control.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a tree view at runtime. Tree view controls placed on forms at design time are created automatically. After calling the inherited constructor, Create initializes many properties the control, including setting BorderStyle to bsSingle and setting ShowButtons, ShowRoot, and ShowLines, and HideSelection to True.


TCustomTreeView.CreateNode
 VCL Reference

TCustomTreeView.CreateNode

TCustomTreeView	See also

Creates a new TTreeNode instance with the TTreeNodes specified by Items as its Owner.

function CreateNode: TTreeNode; virtual;

Description

Do not call CreateNode. The TTreeNodes object specified by the Items property uses this method in the implementation of its Add, AddFirst, AddChild, AddChildFirst, AddObject, AddObjectFirst, AddChildObject, and AddChildObjectFirst methods. To create a new node for the tree view, use one of these methods instead. These methods ensure that the node is inserted properly and its properties reflect its position in the tree view.


TCustomTreeView.CreateParams
 VCL Reference

TCustomTreeView.CreateParams

TCustomTreeView	See also

Initializes a window-creation parameter record.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle.

CreateParams fills in the parameter record that is passed as the value of the Params parameter. This data structure holds information needed when telling Windows to create a window handle. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function.

CreateParams sets the value of the Params parameter to reflect the current property settings of the tree view.


TCustomTreeView.CreateWnd
 VCL Reference

TCustomTreeView.CreateWnd

TCustomTreeView	See also

Creates the window used by the tree view component.

procedure CreateWnd; override;

Description

CreateWnd is called automatically when the tree view is first created or when the window must be destroyed and recreated to reflect property changes.

CreateWnd first calls the CreateParams method to initialize the window-creation parameters, then calls CreateWindowHandle to create the window for the control. If the tree view’s window was temporarily destroyed and recreated, CreateWnd reads various property settings from an in-memory cache where they were stored while there was no window. CreateWnd then sends a series of Windows messages to the newly-created tree view control to initialize its property settings.


 VCL Reference

 $TCustomTreeView.CustomDraw

TCustomTreeView	See also

Generates an OnCustomDraw or OnAdvancedCustomDraw event.

function CustomDraw(const ARect: TRect; Stage: TCustomDrawStage): Boolean; virtual;

Description

CustomDraw is called automatically at discrete stages in the painting process. It determines what event handlers, if any, are appropriate for the current drawing stage, and generates the appropriate events.

ARect is the boundaries of the tree view in the coordinates of the Canvas property.

Stage is the current stage of the painting process.

CustomDraw returns True if the tree view should continue with the default painting process, False if the method has completely rendered the tree view and there is no more painting to be done.


TCustomTreeView.CustomDrawItem
 VCL Reference

TCustomTreeView.CustomDrawItem

TCustomTreeView	See also

Generates an OnCustomDrawItem or OnAdvancedCustomDrawItem event.

function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStagevar PaintImages: Boolean): Boolean; virtual;

Description

CustomDrawItem is called automatically at discrete stages during the painting of tree nodes. It determines what event handlers, if any, are appropriate for the current drawing stage, and generates the appropriate events.

Node is the item that is about to be painted.

State is the item's current state: one or more of cdsSelected, cdsGrayed, cdsDisabled, cdsChecked, cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate.

Stage is the current stage of the painting process.

PaintImages returns a value that indicates whether the tree view should paint the images associated with the current node. This value is only meaningful when Stage is csPrePaint.

CustomDrawItem returns True if the tree view should continue with the default rendering of the item, False if the method completely handled painting the item and there is nothing left to paint.


TCustomTreeView.CustomSort
 VCL Reference

TCustomTreeView.CustomSort

TCustomTreeView	See also 	Example

Sorts the nodes in the tree view into a customized sort order.

type TTVCompare = function(lParam1, lParam2, lParamSort: Longint): Integerstdcall;

function CustomSort(SortProc: TTVCompare; Data: Longint): Boolean;

Description

CustomSort triggers node sorting or resorting, using a comparison routine indicated by the SortProc parameter. The Data parameter is passed to the comparison routine. The optional ARecurse parameter (default True) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

If SortProc is Nil, a default comparison routine is used. The default routine uses the OnCompare event handler, if defined. If the OnCompare event handler is not defined, the default routine uses a simple case-sensitive compare of node captions.

In the comparison routine, the lParam1 and lParam2 parameters refer to two nodes when cast to TTreeNode. The lParamSort parameter is the value previously passed to the Data parameter of CustomSort. The return value of the comparison routine indicates the relative sort order of IParam1 and IParam2:

Return Value	Meaning

< 0	IParam1 comes before IParam2

0	IParam1 and IParam2 are equivalent

> 0	IParam2 comes before IParam1

TCustomTreeView.CustomSort is equivalent to calling CustomSort for the Items property, except that TTreeNodes.CustomSort is not recursive by default.

To sort a subtree, use TTreeNode.CustomSort


TCustomTreeView.Delete
 VCL Reference

TCustomTreeView.Delete

TCustomTreeView	See also

Generates an OnDeletion event.

procedure Delete(Node: TTreeNode); dynamic;

Description

Delete is called automatically immediately before the node specified by the Node parameter is deleted.

Override this method to make additional, class-specific responses in addition to the OnDeletion event or to suppress the OnDeletion event.


TCustomTreeView.Deselect
 VCL Reference

TCustomTreeView.Deselect

TCustomTreeView	See also

Deselect node.

procedure Deselect(Node: TTreeNode); virtual;

Description

Deselect removes the selection from Node. This method has no effect unless MultiSelect is True and MultiSelectStyle includes msControlSelect.


TCustomTreeView.Destroy
 VCL Reference

TCustomTreeView.Destroy

TCustomTreeView	See also

Destroys the tree view control and is called by the Delete method.

destructor Destroy; override;

Description

Do not call the destructor directly in an application. Instead, use the Free method. Free checks that the tree view is not nil, and only then calls Destroy.


TCustomTreeView.DestroyWnd
 VCL Reference

TCustomTreeView.DestroyWnd

TCustomTreeView	See also

Destroys the control's window.

procedure DestroyWnd; override;

Description

DestroyWnd is called when the tree view needs to replace its window.  For example, changing properties that are implemented by window parameter settings require the tree view to be destroyed and then recreated using the CreateWnd method.

Before the window is destroyed, DestroyWnd saves information about the tree view’s items in memory, frees any device contexts, and finally calls DestroyWindowHandle.  When the window is recreated, the stored items are added to the new window.


TCustomTreeView.DoEndDrag
 VCL Reference

TCustomTreeView.DoEndDrag

TCustomTreeView	See also

Generates an OnEndDrag event.

procedure DoEndDrag(Target: TObject; X, Y: Integer); override;

Description

DoEndDrag is called automatically when the user stops dragging the tree view or one of its items. The drag operation may end either because the treeview was dropped on the object specified by Target, or because the user canceled the drag operation (if Target is nil).

Override DoEndDrag to perform any additional adjustments when the user stops dragging the tree view.


TCustomTreeView.DoStartDrag
 VCL Reference

TCustomTreeView.DoStartDrag

TCustomTreeView	See also

Generates an OnStartDrag event.

procedure DoStartDrag(DragObject: TDragObject); override;

Description

DoStartDrag is called automatically when the user starts dragging the tree view or one of its items. It generates an OnStartDrag event, and then identifies the node (if any) that is being dragged. If the user is dragging a node (as opposed to the entire tree view), DoStartDrag generates an image for the node drag.

Override DoStartDrag to perform any additional adjustments when the user starts a drag-and-drop operation.


TCustomTreeView.Edit
 VCL Reference

TCustomTreeView.Edit

TCustomTreeView	See also

Generates an OnEdited event.

procedure Edit(const Item: TTVItem); dynamic;

Description

Edit is called automatically when the user edits the text of a tree view node. The Item parameter is the record supplied by the Windows control that identifies the node that was edited and the new value of its text. Edit unpacks this information into the parameters of an OnEdited event handler, and allows the event handler to change the value of the node’s text.


TCustomTreeView.Expand
 VCL Reference

TCustomTreeView.Expand

TCustomTreeView	See also

Generates an OnExpanded event.

procedure Expand(Node: TTreeNode); dynamic;

Description

Expand is called automatically after the node specified by the Node parameter expands.

Override this method to make additional, class-specific responses in addition to the OnExpanded event or to suppress the OnExpanded event.


TCustomTreeView.FindNextToSelect
 VCL Reference

TCustomTreeView.FindNextToSelect

TCustomTreeView

Returns next selectable node.

function FindNextToSelect: TTreeNode; virtual;

Description

Starting with the node indicated by the Selected property, FindNextToSelect searches for a deselected node, with preference given to subsequent siblings. If the Selected node and all its siblings are selected, the search proceeds to the parent node and its siblings, and so on up the tree. If the top level is reached without finding a deselected node, nil is returned.

Note that the Selected property can refer to a deselected node when MultiSelect is True. In this case, FindNextToSelect returns that node.


TCustomTreeView.FullCollapse
 VCL Reference

TCustomTreeView.FullCollapse

TCustomTreeView	See also

Collapses all the nodes within a tree view control.

procedure FullCollapse;

Description

Call FullCollapse to hide all the nodes in the tree view except those at the first level.


TCustomTreeView.FullExpand
 VCL Reference

TCustomTreeView.FullExpand

TCustomTreeView	See also

Expands all nodes within the tree view control.

procedure FullExpand;

Description

Call FullExpand to display all the nodes in the tree view. If ShowButtons is True, all buttons will change from '+' to '-'.


TCustomTreeView.GetDragImages
 VCL Reference

TCustomTreeView.GetDragImages

TCustomTreeView	See also

Returns the image list to be displayed during drag operations.

function GetDragImages: TDragImageList; override;

Description

GetDragImages is called automatically during drag-and-drop operations to allow the tree view to supply an image that is displayed while the tree view or one of its items is dragged. If an item (and not the entire tree view) is being dragged, GetDragImages returns the image for the node that was generated by the DoStartDrag method.


TCustomTreeView.GetHitTestInfoAt
 VCL Reference

TCustomTreeView.GetHitTestInfoAt

TCustomTreeView	See also 	Example

Returns information about the location of a point relative to the client area of the tree view control.

function GetHitTestInfoAt(X, Y: Integer): THitTests;

Description

Call GetHitTestInfoAt to determine what portion of the tree view, if any, sits under the point specified by the X and Y parameters. For example, use GetHitTestInfoAt to provide feedback about how to expand or collapse nodes when the mouse is over the relevant portions of the tree view.

GetHitTestInfo returns a THitTests type. This set describes the possible tree view elements under the mouse.


TCustomTreeView.GetImageIndex
 VCL Reference

TCustomTreeView.GetImageIndex

TCustomTreeView	See also 	Example

Generates an OnGetImageIndex event.

procedure GetImageIndex(Node: TTreeNode); virtual;

Description

Call GetImageIndex to set the image index of a tree node. GetImageIndex as implemented in TCustomTreeView does nothing except invoke the handler for the OnGetImageIndex event, if one is assigned.

Descendants can override GetImageIndex to provide a class-specific implementation for setting the tree node’s image index.

Node is the tree node in which the image index is set.


TCustomTreeView.GetNodeAt
 VCL Reference

TCustomTreeView.GetNodeAt

TCustomTreeView	See also	Example

Returns the node that is found at the specified position.

function GetNodeAt(X, Y: Integer): TTreeNode;

Description

Call GetNodeAt to access the node at the position specified by the X and Y parameters. X and Y specify the position in pixels relative to the top left corner of the tree view. If there is no node at the location, GetNodeAt returns nil.


TCustomTreeView.GetSelectedIndex
 VCL Reference

TCustomTreeView.GetSelectedIndex

TCustomTreeView	See also 	Example

Generates an OnGetSelectedIndex event.

procedure GetSelectedIndex(Node: TTreeNode); virtual;

Description

Call GetSelectedIndex to set the image index of a tree node when the tree node is selected. GetSelectedIndex invokes the handler for the OnGetSelectedIndex event, if one is assigned.

Descendants can override GetSelectedIndex to implement a class-specific method of setting the selected tree node’s image index.

Node is the tree node in which the image index is set.


TCustomTreeView.GetSelections
 VCL Reference

TCustomTreeView.GetSelections

TCustomTreeView

Generates an OnGetSelections event.

function GetSelections(AList: TList): TTreeNode;

Description

GetSelections sets clears AList and copies all selected node objects to it. The return value is the Selected property.


TCustomTreeView.IsCustomDrawn
 VCL Reference

TCustomTreeView.IsCustomDrawn

TCustomTreeView	See also

Specifies when the control should generate custom draw events.

function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean; virtual;

Description

TCustomTreeView checks IsCustomDrawn to determine when to generate an OnCustomDraw, OnAdvancedCustomDraw, OnCustomDrawItem, or OnAdvancedCustomDrawItem event. IsCustomDrawn returns True when the tree view should generate an event.

The Target parameter indicates whether the tree view is about to draw the entire tree or about to draw a node. IsCustomDrawn does not return True unless the tree view has an appropriate event handler for the target.

The Stage parameter indicates the current stage in the process of painting the tree view. IsCustomDrawn returns True if the stage is cdPrePaint or if there is an advanced custom draw event handler for the target.


TCustomTreeView.IsEditing
 VCL Reference

TCustomTreeView.IsEditing

TCustomTreeView	See also

Indicates whether a node is currently being edited by the user.

function IsEditing: Boolean;

Description

IsEditing returns True if any node label in the tree view is being edited.


TCustomTreeView.Loaded
 VCL Reference

TCustomTreeView.Loaded

TCustomTreeView	See also

Initializes the tree view after it is loaded from a stream.

procedure Loaded; override;

Description

Do not call Loaded. The VCL streaming system calls Loaded automatically after the tree view’s form is loaded into memory so that the tree view can complete any initializations that depend on other objects in the form.

Loaded ensures that the tree view appears fully expanded when it is first loaded into the designer.


TCustomTreeView.LoadFromFile
 VCL Reference

TCustomTreeView.LoadFromFile

TCustomTreeView	See also

Reads the file specified in FileName and loads the data into the tree view.

procedure LoadFromFile(const FileName: string);

Description

Use the LoadFromFile method to retrieve tree view nodes from a file and add them to the tree view. FileName should reference a file that was saved using the SaveToFile method. Tree view files are text files that list the Text property of each node in a tree view, one node per line. Each node text value is preceded by spaces to indicate the depth of nesting.

Note:	Tree view files contain only the text of the tree view nodes. They do not contain any data associated with the nodes.


TCustomTreeView.LoadFromStream
 VCL Reference

TCustomTreeView.LoadFromStream

TCustomTreeView	See also

Reads tree view data from a stream and stores the contents in the tree view.

procedure LoadFromStream(Stream: TStream);

Description

Use LoadFromStream to read the nodes of the tree view from the specified stream. LoadFromStream adds the nodes in the stream data to the tree view.

The format for tree view data used by the SaveToStream and LoadFromStream methods lists the Text property for each node. Data associated with the nodes is not saved or loaded.

For example, an application can save the information displayed in a tree view as the data in a Binary Large Object (BLOB) field of a dataset using the SaveToStream method. LoadFromStream can later retrieve the data using a BLOB stream.


TCustomTreeView.SaveToFile
 VCL Reference

TCustomTreeView.SaveToFile

TCustomTreeView	See also

Saves a the tree view to the file specified in FileName.

procedure SaveToFile(const FileName: string);

Description

Use the SaveToFile method to store tree view data to a text file. The nodes can later be reloaded from the file into a new tree view object using the LoadFromFile method.

Tree view files are text files that list the Text property of each node in a tree view, one node per line. Each node text value is preceded by spaces to indicate the depth of nesting.

Note:	Tree view files contain only the text of the tree view nodes. They do not contain any data associated with the nodes.


TCustomTreeView.SaveToStream
 VCL Reference

TCustomTreeView.SaveToStream

TCustomTreeView	See also

Writes the data in the tree view to the stream passed as the Stream parameter.

procedure SaveToStream(Stream: TStream);

Description

Use the SaveToStream method to stream out the nodes in a tree view. It can be streamed back in to another tree view object using the LoadFromStream method.

The format for tree view data used by the SaveToStream and LoadFromStream methods lists the Text property for each node. Data associated with the nodes is not saved or loaded.


TCustomTreeView.Select
 VCL Reference

TCustomTreeView.Select

TCustomTreeView

Select specified nodes.

procedure Select(const Nodes: arrayofTTreeNode); overload; virtual;

procedure Select(Nodes: TList); overload; virtual;

procedure Select(Node: TTreeNode; ShiftState: TShiftState = []); overload; virtual;

Description

The select method selects one or more tree nodes.

In the first two forms, all nodes in the Nodes parameter are selected. Any other selected nodes are deselected.

In the third form, Node is selected as if clicked with the mouse. To achieve the effect of using the Control key, the Shift key, or the right mouse button, include ssCtrl, ssShift, or ssRight in the ShiftState parameter.


TCustomTreeView.SetDragMode
 VCL Reference

TCustomTreeView.SetDragMode

TCustomTreeView	See also

Sets the drag mode for the tree view.

procedure SetDragMode(Value: TDragMode); override;

Description

SetDragMode is the protected write implementation for the DragMode property. It sends a message to the tree view window to suppress automatic drag behavior when DragMode is set to dmManual.


TCustomTreeView.Subselect
 VCL Reference

TCustomTreeView.Subselect

TCustomTreeView

Toggle node selection.

procedure Subselect(Node: TTreeNode; Validate: Boolean = False); virtual;

Description

Subselect toggles the selection state of Node. If Validate is True, Subselect ensures that the selection state information in view, list, and node objects are consistent, and that only those nodes allowed by MultiSelectStyle are actually selected.

If Subselection is called when MultiSelect is False, ETreeViewError is raised.


TCustomTreeView.WndProc
 VCL Reference

TCustomTreeView.WndProc

TCustomTreeView	See also

Provides specific message responses for the control.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the initial Windows message handler for the control. The WindowProc property is initialized to point to the WndProc method.

WndProc adjusts for some Windows message idiosyncrasies before calling the WndProc method inherited from TWinControl.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTreeView


TCustomUpDown
 VCL Reference

TCustomUpDown

Hierarchy	Properties	Methods	Events	See also

TCustomUpDown is the base type for up-down size controls such as TUpDown.

Unit

ComCtrls

Description

Use TCustomUpDown as a base class when defining up-down controls such as the arrows that appear in a spin box. Up-down controls allow users to change the size of a numerical value by clicking on arrow buttons. TCustomUpDown introduces several properties, events, and methods to associate an up-down control with another control in a form and to communicate the size changes specified by the user.

Do not create instances of TCustomUpDown. To put an up-down control in a form, use TUpDown.


 VCL Reference

TCustomUpDown properties

TCustomUpDown	Alphabetically	Legend

In TCustomUpDown

AlignButton

ArrowKeys

Associate

Increment

Max

Min

Orientation

Position

Thousands

Wrap

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UnDockHeight

UnDockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TCustomUpDown properties

TCustomUpDown	By object	Legend

Action

Align

AlignButton

AlignDisabled

Anchors

ArrowKeys

Associate

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Increment

Left

LRDockWidth

Max

Min

Name

Orientation

Owner

Parent

ParentWindow

Position

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Thousands

Top

UnDockHeight

UnDockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc

Wrap


TCustomUpDown.AlignButton
 VCL Reference

TCustomUpDown.AlignButton

TCustomUpDown	See also

Specifies the position of the up-down control relative to its companion control.

type TUDAlignButton = (udLeft, udRight);

property AlignButton: TUDAlignButton;

Description

Set AlignButton to indicate where to position the up-down control. The up-down control appears attached to the outer edge of the control specified by the Associate property. These are the possible values:

Value	Meaning

udLeft	Position the up-down control on the left edge of the companion control.

udRight	Position the up-down control on the right edge of the companion control.

The up-down control resizes itself to the height of the companion control.


TCustomUpDown.ArrowKeys
 VCL Reference

TCustomUpDown.ArrowKeys

TCustomUpDown	See also

Determines whether the up-down control receives input from the Up arrow and Down arrow keys.

property ArrowKeys: Boolean;

Description

Use ArrowKeys to specify whether the up-down control responds to keyboard input. ArrowKeys is used only when the up-down control is associated with a companion control. When ArrowKeys is True, the up-down control responds to the Up arrow and Down arrow keys, even when its companion control has input focus. When ArrowKeys is False, the user must click the buttons of the up-down control with the mouse. To set a companion control use the Associate property.

Note:	Up-down controls can respond to only the Up and Down arrow keys, even when the value of Orientation is udHorizontal.


TCustomUpDown.Associate
 VCL Reference

TCustomUpDown.Associate

TCustomUpDown	See also

Specifies a companion control for the up-down control.

property Associate: TWinControl;

Description

Use Associate to link the up-down control to a companion control (sometimes called a buddy window). The up-down control automatically positions itself on the outer edge of the companion control and adjusts its height to match the companion control.

At design-time the companion control does not move with the up-down control. To keep the up-down control and its companion control together at design time, either multi-select both controls before moving them, or first move the companion control and then reset the Associate property for the up-down control.


TCustomUpDown.Increment
 VCL Reference

TCustomUpDown.Increment

TCustomUpDown	See also

Specifies the amount the Position value changes each time the up or down button is pressed.

property Increment: Integer;

Description

Use Increment to control the granularity of changes the up-down control can make. Set Increment to indicate the number of units between Min and Max the Position moves whenever the user clicks on one of the arrow buttons. Increment represents the mapping between the units used to specify Min, Max, and Position, and the logical units represented by the up-down control.


TCustomUpDown.Max
 VCL Reference

TCustomUpDown.Max

TCustomUpDown	See also

Specifies the maximum value of the Position property.

property Max: SmallInt;

Description

Use Max to provide an upper limit to the range of values the Position property can assume.


TCustomUpDown.Min
 VCL Reference

TCustomUpDown.Min

TCustomUpDown	See also

Specifies the minimum value of the Position property.

property Min: SmallInt;

Description

Use Min to provide a lower limit to the range of values the Position property can assume.


TCustomUpDown.Orientation
 VCL Reference

TCustomUpDown.Orientation

TCustomUpDown	See also

Specifies the direction that the arrow keys point.

type TUDOrientation = (udHorizontal, udVertical);

property Orientation: TUDOrientation;

Description

Use Orientation to determine the orientation of the arrow buttons. These are the possible values:

Value	Meaning

udHorizontal	The arrow buttons point to the left and right, and appear side by side.

udVertical	The arrow buttons point up and down and are stacked vertically.

Note:	Even when the Orientation is udHorizontal, the up-down control can respond only to the Up and Down arrow keys.


TCustomUpDown.Position
 VCL Reference

TCustomUpDown.Position

TCustomUpDown	See also

Specifies the current value represented by the up-down control.

property Position: SmallInt;

_Description

Use Position to get or change the value the up-down control represents. Position must be a value between Min and Max.

When the Associate property specifies an edit control, its text is automatically set to the value of Position. When Position changes, the text of the edit control is updated. If the Associate property is nil, use the OnClick event to respond to changes in the value of Position.


TCustomUpDown.Thousands
 VCL Reference

TCustomUpDown.Thousands

TCustomUpDown	See also

Determines whether a thousands separator appears between every three digits of a decimal string.

property Thousands: Boolean;

Description

Use Thousands to control the formatting of the text of the companion control of the up-down control. If Thousands is True, a separator appears between every three digits. The numeric value that is displayed by the companion control is given by the Position property.


TCustomUpDown.Wrap
 VCL Reference

TCustomUpDown.Wrap

TCustomUpDown 	See also

Specifies how the up-down control handles attempts to exceed the value of Max or Min.

property Wrap: Boolean;

Description

Use Wrap to specify whether the up-down control treats the range determined by the Max and Min properties as a continuous loop. If Wrap is True, the value of Position becomes the value of the Min property when the user increments Position beyond the value of Max, and becomes the value of Max when the user decrements Position beyond the value of Min.


 VCL Reference

TCustomUpDown events

TCustomUpDown	Alphabetically	Legend

In TCustomUpDown

OnChanging

OnChangingEx

OnClick


 VCL Reference

TCustomUpDown events

TCustomUpDown	By object	Legend

OnChanging

OnChangingEx

OnClick


TCustomUpDown.OnChanging
 VCL Reference

TCustomUpDown.OnChanging

TCustomUpDown	See also

Occurs when the position of an up-down control is about to change.

type TUDChangingEvent = procedure (Sender: TObject; var AllowChange: Boolean) of object;

property OnChanging: TUDChanginEvent;

Description

Write an OnChanging event handler to conditionally disallow changes to the value of Position. Set the AllowChange parameter to False to prevent a change to the current value of Position.

OnChanging occurs both when the user clicks the arrow buttons of the up-down control and when an attempt is made to change the value of Position programmatically. To determine which button the user clicked, use the OnChangingEx event or the OnClick event, both of which follow the OnChanging event.


TCustomUpDown.OnChangingEx
 VCL Reference

TCustomUpDown.OnChangingEx

TCustomUpDown	See also

Occurs when the position of an up-down control is about to change.

type

  TUDChangingEventEx = procedure (Sender: TObject; var AllowChange: Boolean; NewValue: SmallInt; Direction: TUpDownDirection) of object;

property OnChangingEx: TUDChanginEventEx;

Description

Write an OnChangingEx event handler to conditionally disallow changes to the value of Position. Set the AllowChange parameter to False to prevent a change to the current value of Position.

Sender is the updown control that received the event. This may be in response to a user click on the arrow buttons or an attempt to change the value of Position programmatically.

AllowChange returns a value that indicates whether the change is permitted.

NewValue indicates the new value of Position if the change is allowed.

Direction indicates whether the value of Position is to be increased or decreased.


TCustomUpDown.OnClick
 VCL Reference

TCustomUpDown.OnClick

TCustomUpDown	See also 	Example

Occurs when the user clicks an arrow button.

type

  TUDBtnType = (btNext, btPrev);

  TUDClickEvent = procedure (Sender: TObject; Button: TUDBtnType) of object;

property OnClick: TUDClickEvent

Description

Write an OnClick event handler to take specific action when the user clicks one of the arrow buttons. If the Associate property is not used to automatically update the text of an edit control when the value of Position changes, use the OnClick event handler to respond to changes just before the value of Position is changed.

The Button parameter specifies how the value of Position is about to change. When Button is btNext, the Up or Right arrow was clicked, and the value of Position is about to increase by Increment. When Button is btPrev, the Down or Left arrow was clicked, and the value of Position is about to decrease by Increment.


 VCL Reference

TCustomUpDown methods

TCustomUpDown	Alphabetically	Legend

In TCustomUpDown

CanChange

Click

Create

CreateParams

CreateWnd

DoCanChange

Notification

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TCustomUpDown methods

TCustomUpDown	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanChange

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoCanChange

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Notification

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TCustomUpDown.CanChange
 VCL Reference

TCustomUpDown.CanChange

TCustomUpDown	See also

Indicates whether the value of Position can be changed.

function CanChange: Boolean;

Description

CanChange is called automatically when the user clicks the arrow buttons or an attempt is made to change the value of Position programmatically. CanChange generates an OnChanging event followed by an OnChangingEx event. It allows the change unless an OnChanging or OnChangingEx event handler prevents it.


TCustomUpDown.Click
 VCL Reference

TCustomUpDown.Click

TCustomUpDown	See also

Generates an OnClick event.

type TUDBtnType = (btNext, btPrev);

procedure Click(Button: TUDBtnType); reintroduce; dynamic;

Description

Click is called automatically when the user clicks an arrow button or presses an Up or Down arrow key. Override this method to specify special processing that should occur before the OnClick event handler executes, or to block the OnClick event. The Button parameter specifies which button was clicked: btNext refers to the Up or Right arrow, and btPrev refers to the Down or Left arrow.


TCustomUpDown.Create
 VCL Reference

TCustomUpDown.Create

TCustomUpDown	See also

Creates and initializes an instance of TCustomUpDown.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate an up-down control at runtime. Up-down controls placed on forms at design time are created automatically.AOwner is a component, typically the form, that is responsible for freeing the up-down control. It becomes the value of the Owner property.


TCustomUpDown.CreateParams
 VCL Reference

TCustomUpDown.CreateParams

TCustomUpDown	See also

Initializes the window creation parameters for the up-down control.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams is called automatically before the window for an up-down control is created. CreateParams calls the inherited method, then sets the Params parameter to reflect the values of the AlignButton, ArrowKeys, Orientation, Thousands, and Wrap properties.


TCustomUpDown.CreateWnd
 VCL Reference

TCustomUpDown.CreateWnd

TCustomUpDown	See also

Creates the window used by the up-down control.

procedure CreateWnd; override;

Description

After calling the inherited method to create the up-down control’s window, CreateWnd sends the newly created windows messages so that it reflects the current values of the Associate, Increment, Max, Min, and Position properties.


TCustomUpDown.DoCanChange
 VCL Reference

TCustomUpDown.DoCanChange

TCustomUpDown	See also

Indicates whether the value of Position can be changed.

function DoCanChange(NewVal: SmallInt; Delta: SmallInt): Boolean;

Description

DoCanChange is called automatically when the user clicks the arrow buttons or an attempt is made to change the value of Position programmatically. DoCanChange stores the value of the NewVal and Delta parameters and then calls CanChange to generate an OnChanging event followed by an OnChangingEx event. It allows the change to position unless an OnChanging or OnChangingEx event handler prevents it.

NewVal specifies the proposed new value of Position if the change is allowed.

Delta indicates the size of the change, where positive values increase Position and negative values decrease Position.

DoCanChange returns True if the change is allowed, False otherwise.


TCustomUpDown.Notification
 VCL Reference

TCustomUpDown.Notification

TCustomUpDown	See also

Responds to notifications when components are about to be created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

After calling the inherited method, Notification checks whether the control specified by the Associate property is about to be destroyed, and if so, sets the Associate property to nil.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomUpDown


TDataModule
 VCL Reference

TDataModule

Hierarchy	Properties	Methods	Events	Using TDataModule	See also

TDataModule centralizes the handling of nonvisual components in an application.

Unit

Classes

Description

Use a TDataModule object in an application to provide a location for centralized handling of nonvisual components. Typically these are data access components, such as TSQLDataSet, and TSQLConnection. DataModules are not limited to data access components, they can also contain other nonvisual components, such as TTimer, TOpenDialog, TImageList, or TOleContainer).

At design time a TDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. To create a data module at design time, choose File | New Data Module.

In the unit file for the data module a developer may also place any business rules that are to be applied to the application.

To make the data module available to another unit in the application, select that unit, then choose File|Use Unit to add the data module to the uses clause for the unit.


 VCL Reference

TDataModule properties

TDataModule	Alphabetically	Legend

In TDataModule

DesignOffset

DesignSize

OldCreateOrder

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDataModule properties

TDataModule	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DesignOffset

DesignSize

Name

OldCreateOrder

Owner

Tag

VCLComObject


TDataModule.DesignOffset
 VCL Reference

TDataModule.DesignOffset

TDataModule	See also

Specifies the design offset for the data module at design time.

property DesignOffset: TPoint;

Description

An application should never need to set this value. It is used to control the position of the data module at design time.


TDataModule.DesignSize
 VCL Reference

TDataModule.DesignSize

TDataModule	See also

Specifies the design size for the data module at design time.

property DesignSize: TPoint;

Description

An application should never need to set this value. It controls the size of the data module window at design time.


TDataModule.OldCreateOrder
 VCL Reference

TDataModule.OldCreateOrder

TDataModule	See also

Specifies when OnCreate and OnDestroy events occur.

property OldCreateOrder: Boolean;

Description

When OldCreateOrder is False (the default) the OnCreate event occurs after all constructors are finished (from the AfterConstruction method) and the OnDestroy event occurs before any destructors are called (from the BeforeDestruction method).

This timing differs from Delphi version 3 and previous, where the OnCreate event occurred when the TDataModule constructor executed and the OnDestroy event occurred when the TDataModule destructor executed. Applications that require the OnCreate event and OnDestroy events to occur from the constructor and destructor of the data module can set OldCreateOrder to True.


 VCL Reference

TDataModule events

TDataModule	Alphabetically	Legend

In TDataModule

OnCreate

OnDestroy


 VCL Reference

TDataModule events

TDataModule	By object	Legend

OnCreate

OnDestroy


TDataModule.OnCreate
 VCL Reference

TDataModule.OnCreate

TDataModule	See also

Occurs when an application instantiates a data module.

property OnCreate: TNotifyEvent;

Description

Write an OnCreate event handler to take specific actions when an application instantiates a data module. For example, if a data module contains database and dataset components, an application may establish a database connection immediately. If the data module contains timers, the application may initialize them.


TDataModule.OnDestroy
 VCL Reference

TDataModule.OnDestroy

TDataModule	See also

Occurs when the data module is about to be destroyed.

property OnDestroy: TNotifyEvent;

Description

Write an OnDestroy event handler to take specific actions when an application frees a data module. For example, if the unit code for the data module instantiates any objects of its own, such as string lists, the OnDestroy event handler can be used to free those objects.


 VCL Reference

TDataModule methods

TDataModule	Alphabetically	Legend

In TDataModule

AfterConstruction

BeforeDestruction

Create

CreateNew

Destroy

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDataModule methods

TDataModule	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateNew

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDataModule.AfterConstruction
 VCL Reference

TDataModule.AfterConstruction

TDataModule	See also

Generates an OnCreate event.

procedure AfterConstruction; override;

Description

AfterConstruction is called after the data module’s constructor has finished. Do not call it explicitly in applications.

TDataModule overrides AfterConstruction to generate an OnCreate event when OldCreateOrder is False.


TDataModule.BeforeDestruction
 VCL Reference

TDataModule.BeforeDestruction

TDataModule	See also

Generates an OnDestroy event.

procedure BeforeDestruction; override;

Description

BeforeDestruction is called immediately before the data module’s destructor. Do not call it explicitly in applications.

TDataModule overrides BeforeDestruction to generate an OnDestroy event when OldCreateOrder is False.


TDataModule.Create
 VCL Reference

TDataModule.Create

TDataModule	See also

Creates an instance of a data module.

constructor Create(AOwner: TComponent);

Description

Call Create to instantiate a data module at runtime if it was not created at design time. Create calls CreateNew. If an error occurs, an exception is raised. Otherwise, if OldCreateOrder is True, Create calls the OnCreate event handler for the data module if one is assigned to it.


TDataModule.CreateNew
 VCL Reference

TDataModule.CreateNew

TDataModule	See also

Creates an instance of a data module and registers with the global screen object.

constructor CreateNew(AOwner: TComponent; Dummy: Integer = 0); virtual;

Description

Use CreateNew instead of Create to create a data module without using the associated .DFM file to initialize it.

Warning:	Using CreateNew instead of Create can cause unpredictable results because most data modules are written assuming their controls will be created from the .DFM file.

CreateNew calls the inherited constructor, and then informs the global screen object of the existence of the data module.

The first argument, AOwner, is the owner of the data module (usually the application). The second argument, Dummy, defaults to 0 and is not used by this constructor. The system passes 0 by default if this constructor is passed only the first argument, AOwner.

CreateNew bypasses the streaming in of the previously associated .DFM file. Therefore, you must stream in an external .DFM to bind the visual components with their classes. You can stream in the previously associated .DFM file by calling InitInheritedComponent. To stream in a different .DFM  file, bracket the call to CreateNew with calls to WriteComponentResFile and ReadComponentResFile. The following code sequence

1. streams out an external .DFM  file.

2. creates a new data module disassociated from any .DFM resource file;

3. streams in the external .DFM file and binds it to this new data module.

WriteComponentResFile('Temp.dfm', DataModule1);

…

DataModule2 := TDataModule.CreateNew(Application);

ReadComponentResFile('Temp.dfm', DataModule2);


TDataModule.Destroy
 VCL Reference

TDataModule.Destroy

TDataModule	See also

Destroys the instance of the data module.

destructor Destroy;

Description

Do not call Destroy directly. Instead call Free, which checks that the data module reference is not nil before calling Destroy.

Before calling the inherited destructor, Destroy removes any fixup references, calls its OnDestroy event handler (if one is defined and OldCreateOrder isTrue), and informs the global screen variable that the data module is going away.


Hierarchy

TObject

TPersistent

TComponent

TDataModule


TDdeClientConv
 VCL Reference

 TDdeClientConv

Hierarchy	Properties	Methods	Events	Using TDdeClientConv	See also

TDdeClientConv represents a DDE conversation with a DDE server application.

Unit

DdeMan

Description

Use TDdeClientConv with a TDdeClientItem object to enable an application to act as a DDE client. TDdeClientConv provides many properties, events, and methods that provide services to

Link to a specified DDE server with a specified DDE topic.

Send data or macro commands to the DDE server after a link has been established.

Specify a format for the data that is sent to the DDE server.

Allow event handlers to respond when the DDE link is opened or closed.

TDdeClientItem objects are associated with a TDdeClientConv by setting their DdeConv property.


 VCL Reference

TDdeClientConv properties

TDdeClientConv	Alphabetically	Legend

In TDdeClientConv

ConnectMode

Conv

DataMode

DdeFmt

DdeService

DdeTopic

FormatChars

ServiceApplication

WaitStat

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDdeClientConv properties

TDdeClientConv	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectMode

Conv

DataMode

DdeFmt

DdeService

DdeTopic

DesignInfo

FormatChars

Name

Owner

ServiceApplication

Tag

VCLComObject

WaitStat


TDdeClientConv.ConnectMode
 VCL Reference

TDdeClientConv.ConnectMode

TDdeClientConv	See also

Determines whether the link to the DDE server is established automatically when the form is opened.

type TDataMode = (ddeAutomatic, ddeManual);

property ConnectMode: TDataMode;

Description

Use ConnectMode to change the way a DDE conversation is established. If ConnectMode is ddeAutomatic, the link is established when it is defined by SetLink. If ConnectMode is ddeManual, the application must call the OpenLink method or the PasteLink method to establish the DDE conversation.


TDdeClientConv.Conv
 VCL Reference

TDdeClientConv.Conv

TDdeClientConv	See also

Indicates the handle for the current DDE conversation.

property Conv: HConv;

Description

Read Conv to get a handle to the DDE conversation when it is required for a Windows API function call. Conv is available once a DDE conversation has been established by OpenLink or PasteLink.


TDdeClientConv.DataMode
 VCL Reference

TDdeClientConv.DataMode

TDdeClientConv	See also

Governs whether portions of the DDE conversation execute automatically.

type TDataMode = (ddeAutomatic, ddeManual);

property DataMode: TDataMode;

Description

DataMode is not implemented for TDdeClientConv. Derived objects can use this property to automatically execute portions of a DDE conversation, such as a RequestData or PokeData call.

Note:	To determine the way the DDE conversation is established, use ConnectMode instead.


TDdeClientConv.DdeFmt
 VCL Reference

TDdeClientConv.DdeFmt

TDdeClientConv	See also

Represents the clipboard format used for submitting or requesting a data item.

property DdeFmt: Integer;

Description

Use DdeFmt to specify the format of DDE data items when it has not been specified by the server.


TDdeClientConv.DdeService
 VCL Reference

TDdeClientConv.DdeService

TDdeClientConv	See also	Example

Specifies the DDE server application to be linked to a DDE client.

property DDEService: string;

Description

Use DdeService to specify the server application to link to. Typically, DdeService is the file name (with path, if necessary) of the DDE server application's main executable file without the .EXE extension. If the DDE server is a Delphi application, DdeService is the project name without the .DPR or .EXE extension. For example, to link to a TDdeServerConv component in PROJ1.DPR, set DdeService to PROJ1.

At design time, specify DdeService by typing the DDE server application name in the object inspector or by choosing Paste Link in the DDE Info dialog box. To establish a link at runtime, specify the service and topic with the SetLink method.

Note:	The necessary value for DdeService depends on the individual server application. See the documentation of the DDE server application for specific information about how to specify the server application.


TDdeClientConv.DdeTopic
 VCL Reference

TDdeClientConv.DdeTopic

TDdeClientConv	See also 	Example

Specifies the topic of a DDE conversation

property DDETopic: string;

Description

Use DdeTopic to indicate the server-defined topic name of the DDE conversation. Typically, DdeTopic is a file name (with path, if necessary) used by the server application. If the DDE server is a Delphi application, by default DdeTopic is the caption of the form containing the linked component. If the DDE client is linked to a TDdeServerConv component, DdeTopic is the name of the server conversation component rather than the form caption.

At design time, specify DdeTopic either by typing the DdeTopic name in the object inspector or by choosing Paste Link in the DDE Info dialog box. To establish a link at runtime, specify the service and topic with the SetLink method.

Note:	The server application defines the topic names available for a DDE conversation. See the documentation for the DDE server application for specific information about the names of available topics.


TDdeClientConv.FormatChars
 VCL Reference

TDdeClientConv.FormatChars

TDdeClientConv	See also

Determines if certain characters are filtered out of text data transferred from a DDE server application.

property FormatChars: Boolean;

Description

Use FormatChars with DDE server applications that transfer backspaces, linefeeds, carriage returns, and tabs with the text data. These formatting characters can cause incorrect spacing, line breaks, or characters in the DDE client data. To prevent the formatting characters from interfering with the formatting of the client data, set FormatChars to False. To include the formatting characters sent by the DDE server, set FormatChars to True.


TDdeClientConv.ServiceApplication
 VCL Reference

TDdeClientConv.ServiceApplication

TDdeClientConv	See also

Specifies the main executable file name (with path, if necessary) of a DDE server application, without the .EXE extension.

property ServiceApplication: string;

Description

Set ServiceApplication to the name of the server application. Typically, this is the same value as the DdeService property. Sometimes, however, DdeService is a value other than the DDE server application's executable file name.

If the server application is not running when the TDdeClientConv tries to establish a DDE conversation, OpenLink uses the ServiceApplication property to launch the server.


TDdeClientConv.WaitStat
 VCL Reference

TDdeClientConv.WaitStat

TDdeClientConv	See also

Indicates whether the server is in the process of servicing a DDE macro that prohibits asynchronous DDE transactions.

property WaitStat: Boolean;

Description

Read WaitStat to learn whether a DDE transaction can be started. When WaitStat is True, the server is processing the last macro, and attempts to execute a macro, request data, or poke data will fail. When WaitStat is False, the server is free to execute the next transaction in the DDE conversation.


 VCL Reference

TDdeClientConv events

TDdeClientConv	Alphabetically	Legend

In TDdeClientConv

OnClose

OnOpen


 VCL Reference

TDdeClientConv events

TDdeClientConv	By object	Legend

OnClose

OnOpen


TDdeClientConv.OnClose
 VCL Reference

TDdeClientConv.OnClose

TDdeClientConv	See also 	Example

Occurs when the DDE conversation terminates.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler to take specific action when the DDE conversation ends. The DDE conversation will end if the server terminates the conversation, if the link is closed or changed, or if the TDdeClientConv object is destroyed.


TDdeClientConv.OnOpen
 VCL Reference

TDdeClientConv.OnOpen

TDdeClientConv	See also 	Example

Occurs immediately after the DDE link to the server has been established.

property OnOpen: TNotifyEvent;

Description

Write an OnOpen event handler to take specific action whenever a link is established to the DDE server. The DDE link is established by the OnOpen method or the PasteLink method. SetLink will also establish a DDE link if the ConnectMode is ddeAutomatic. OnOpen will not be called if the link fails, such as when the server application can’t be launched.


 VCL Reference

TDdeClientConv methods

TDdeClientConv	Alphabetically	Legend

In TDdeClientConv

CloseLink

Create

Destroy

ExecuteMacro

ExecuteMacroLines

OpenLink

PasteLink

PokeData

PokeDataLines

RequestData

SetLink

StartAdvise

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDdeClientConv methods

TDdeClientConv	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseLink

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

ExecuteMacro

ExecuteMacroLines

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

OpenLink

PasteLink

PokeData

PokeDataLines

ReferenceInterface

RemoveComponent

RemoveFreeNotification

RequestData

SafeCallException

SetLink

SetSubComponent

StartAdvise

UpdateAction


TDdeClientConv.CloseLink
 VCL Reference

TDdeClientConv.CloseLink

TDdeClientConv	See also

Terminates an ongoing DDE conversation.

procedure CloseLink;

Description

Use CloseLink when all communication with the DDE server is finished. After a link is closed, no DDE communication can take place between the DDE client and server until another link is opened.


TDdeClientConv.Create
 VCL Reference

TDdeClientConv.Create

TDdeClientConv	See also

Creates an instance of TDdeClientConv.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TDdeClientConv. After calling the inherited constructor, Create creates the helper objects used to manage individual DDE client items.


TDdeClientConv.Destroy
 VCL Reference

TDdeClientConv.Destroy

TDdeClientConv	See also

Destroys an instance of TDdeClientConv.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDdeClientConv reference is not nil, and only then calls Destroy.

Destroy closes the link to the server and frees up all helper objects before calling the inherited destructor.


TDdeClientConv.ExecuteMacro
 VCL Reference

TDdeClientConv.ExecuteMacro

TDdeClientConv	See also 	Example

Sends a macro command string to the DDE server application.

function ExecuteMacro(Cmd: PChar; WaitFlg: Boolean): Boolean;

Description

Call ExecuteMacro to send a single macro command to the server application. To send multiple macro commands, use ExecuteMacroLines instead. ExecuteMacro returns True if the macro was successfully passed to the DDE server application. If ExecuteMacro was unable to send a command string, ExecuteMacro returns False.

Cmd is a null-terminated string that contains the macro to be executed by the DDE server application. The actual value of Cmd depends on the DDE server application. See the documentation of the DDE server application for the command strings it will accept.

WaitFlg determines if this DDE client should wait until the DDE server application finishes executing the macro before allowing another DDE transaction to succeed. If WaitFlg is set to True, subsequent calls to ExecuteMacro, ExecuteMacroLines, PokeData, PokeDataLines, and RequestData will fail until the DDE server application completes the macro.

Attempting to execute a macro or poke data before a DDE server application completes a currently executing macro may cause the executing macro to fail or to produce unpredictable results. See the documentation of the DDE server application for the results of sending command strings or poking data before macro execution has completed.

Note:	ExecuteMacro returns True if the macro command was successfully passed to the DDE server. A True value does not ensure that the macro command will execute successfully once it has been accepted by the server.


TDdeClientConv.ExecuteMacroLines
 VCL Reference

TDdeClientConv.ExecuteMacroLines

TDdeClientConv	See also

Sends a list of several macro commands to a DDE server application.

function ExecuteMacroLines(Cmd: TStrings; WaitFlg: Boolean): Boolean;

Description

Call ExecuteMacroLines to send several macro commands to the server application. To send a single macro command, use ExecuteMacro instead. ExecuteMacroLines returns True if the macro list was successfully passed to the DDE server application. If ExecuteMacroLines is unable to send a list of command strings, it returns False.

Cmd contains the list of macros to be executed by the DDE server application. WaitFlg determines if this DDE client should wait until the DDE server application finishes executing all the macros before allowing another DDE transaction to be sent. If WaitFlg is set to True, subsequent calls to ExecuteMacro, ExecuteMacroLines, PokeData, PokeDataLines, and RequestData will fail until the DDE server application completes all of the macros.


TDdeClientConv.OpenLink
 VCL Reference

TDdeClientConv.OpenLink

TDdeClientConv	See also 	Example

Initiates a new DDE conversation.

function OpenLink: Boolean;

Description

Call OpenLink to establish a new DDE conversation with the DdeService. If the server application is not running, OpenLink will launch the ServiceApplication. If the conversation is successfully opened, an OnOpen event occurs and OpenLink returns True. If the conversation isn't successfully opened, OpenLink returns False.

Note:	If ConnectMode is ddeAutomatic, OpenLink is called automatically when the DdeTopic and DdeService are specified by SetLink.


TDdeClientConv.PasteLink
 VCL Reference

TDdeClientConv.PasteLink

TDdeClientConv	See also

Opens a DDE conversation with the current Clipboard object.

function PasteLink: Boolean;

Description

Call PasteLink to establish a DDE link to an object on the Clipboard. PasteLink sets the DdeTopic or DdeService properties from the Clipboard. PasteLink returns True if the link is successfully established.


TDdeClientConv.PokeData
 VCL Reference

TDdeClientConv.PokeData

TDdeClientConv	See also 	Example

Sends data to a DDE server application.

function PokeData(Item: string; Data: PChar): Boolean;

Description

Use PokeData to transfer text data to a DDE server that supports poked data. Item specifies the linked item in the DDE server. Data is a null-terminated string that specifies the text data to transfer.

The value of the DDE item depends on the linked DDE server application. Item is typically a selectable portion of text, such as a spreadsheet cell or a database field in an edit box. If the DDE server is a Delphi application, Item is the name of the linked DDE server component.

The usual direction of data flow is from the DDE server to the DDE client application. Some DDE server applications won't accept poked data. PokeData returns True if the data was successfully transferred, False if the data was not successfully transferred.

To poke a string list rather than a single string, use the PokeDataLines method.

Note:	If either the ExecuteMacro or ExecuteMacroLines method was called with its WaitFlg parameter set to True, PokeData will automatically fail until the server application has completed executing the macro. The WaitStat property indicates when PokeData will attempt to poke data to the server.


TDdeClientConv.PokeDataLines
 VCL Reference

TDdeClientConv.PokeDataLines

TDdeClientConv	See also 	Example

Sends multiple lines of data to a DDE server application.

function PokeDataLines(Item: string; Data: TStrings): Boolean;

Description

Use PokeDataLines to transfer multiple lines of text data to a DDE server that supports poked data. Item specifies the linked item in the DDE server. Data is a set of strings that specifies the text data to transfer.

The value of the DDE item depends on the linked DDE server application. Item is typically a selectable portion of text, such as a spreadsheet cell or a database field in an edit box. If the DDE server is a Delphi application, Item is the name of the linked DDE server component.

The usual direction of data flow is from the DDE server to the DDE client application. Some DDE server applications won't accept poked data. PokeData returns True if the data was successfully transferred, False if the data was not successfully transferred.

To poke a single string rather than a string list, use the PokeData method.

Note:	If either the ExecuteMacro or ExecuteMacroLines method was called with its WaitFlg parameter set to True, PokeData will automatically fail until the server application has completed executing the macro. The WaitStat property indicates when PokeData will attempt to poke data to the server.


TDdeClientConv.RequestData
 VCL Reference

TDdeClientConv.RequestData

TDdeClientConv	See also 	Example

Requests data from a DDE server.

function RequestData(const Item: string): PChar;

Description

Call RequestData to send a request to the DDE server for the data named by Item. RequestData returns the value of the named DDE server item.

Note:	RequestData automatically allocates memory to store the returned data, but applications must dispose of this string after processing it. This is done with the StrDispose procedure.

If the DDE server contains DDE items that can be continually updated, data can be received and updated automatically by creating TDdeClientItem objects for those items.

The value of the DDE item depends on the linked DDE server application. Item is typically a selectable portion of text, such as a spreadsheet cell or a database field in an edit box. If the DDE server is a Delphi application, Item is the name of the linked DDE server component.

Note:	See the documentation for the DDE server application for specific information about specifying a DDE item.


TDdeClientConv.SetLink
 VCL Reference

TDdeClientConv.SetLink

TDdeClientConv	See also 	Example

Specifies the service and topic of a DDE conversation and attempts to open the link if ConnectMode is ddeAutomatic.

function SetLink(Service: string; Topic: string): Boolean;

Description

Call SetLink to fully specify a DDE conversation. If ConnectMode is ddeManual, calling SetLink is equivalent to setting the DdeTopic and DdeService properties, and clearing all data from any associated TDdeClientItem objects. If ConnectMode is ddeAutomatic, SetLink opens the link to the DDE server as well.

The Service and Topic parameters specify the values for the DdeTopic and DdeService properties, respectively.


TDdeClientConv.StartAdvise
 VCL Reference

TDdeClientConv.StartAdvise

TDdeClientConv	See also

Starts an advise loop for all of the TDdeClientItems associated with the current DDE conversation.

function StartAdvise: Boolean;

Description

Call StartAdvise to start an advise loop for all of the TDdeClientItems associated with the current DDE conversation. StartAdvise returns True if loop startup is successful.


Hierarchy

TObject

TPersistent

TComponent

TDdeClientConv


TDdeServerItem
 VCL Reference

 TDdeServerItem

Hierarchy	Properties	Methods	Events	Using TDdeServerItem	See also

TDdeServerItem defines the item of a DDE conversation.

Unit

DdeMan

Description

Use TDdeServerItem by itself, or, optionally, with a TDdeServerConv object to enable an application to function as a DDE server. DDE clients link to an individual DDE server item by referring to the Name property. Once a link to a DDE client is established, the DDE server item can update the client to changes in the item data, or receive data that the DDE client pokes to the item.


 VCL Reference

TDdeServerItem properties

TDdeServerItem	Alphabetically	Legend

In TDdeServerItem

Fmt

Lines

ServerConv

Text

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDdeServerItem properties

TDdeServerItem	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Fmt

Lines

Name

Owner

ServerConv

Tag

Text

VCLComObject


TDdeServerItem.Fmt
 VCL Reference

TDdeServerItem.Fmt

TDdeServerItem	See also

Indicates the clipboard format the DDE client item uses to pass data to the DDE client.

property Fmt: Integer;

Description

Set Fmt in an OnChange event handler to specify a clipboard format for the data that is passed to the DDE client if it is not text. The DDE data that is sent to the DDE client includes this format so that clients can correctly interpret the data. Read Fmt when the client pokes data to the DDE server item to determine the clipboard format the client used to format the data.


TDdeServerItem.Lines
 VCL Reference

TDdeServerItem.Lines

TDdeServerItem	See also 	Example

Contains the data to exchange in a DDE conversation.

property Lines: TStrings;

Description

Set Lines to the data the DDE server item sends to the DDE client. Whenever the Lines property changes, an OnChange event occurs and then the new value is sent to the DDE client. If the DDE server item accepts poked data, Lines receives the data whenever the DDE client pokes data to this item. When Lines is changed by a DDE client poking data, an OnPokeData event occurs after the OnChange event.

Usually Lines contains text, and setting Lines sets the Fmt property to CF_TEXT. However, Delphi strings can contain non-text data. If Lines does not specify text data, Fmt must be changed to indicate the format of the data in an OnChange event handler.

Lines corresponds to the Text property. Whenever the value of Lines or Text is changed, the other is updated so that the first line of Lines is always equal to Text.


TDdeServerItem.ServerConv
 VCL Reference

TDdeServerItem.ServerConv

TDdeServerItem

Specifies the DDE server conversation to associate with the DDE server item.

property ServerConv: TDdeServerConv;

Description

Set ServerConv to associate the DDE server item with a DDE topic represented by the DDE server conversation. If ServerConv is not set, the DDE topic of the conversation is the value of the Caption property of the form containing the TDdeServerItem component.


TDdeServerItem.Text
 VCL Reference

TDdeServerItem.Text

TDdeServerItem	See also 	Example

Contains the data to exchange in a DDE conversation.

property Text: string;

Description

Set Text to the data the DDE server item sends to the DDE client. Whenever the Text property changes, an OnChange event occurs and then the new value is sent to the DDE client. If the DDE server item accepts poked data, Text receives the data whenever the DDE client pokes data to this item. When Text is changed by a DDE client poking data, an OnPokeData event occurs after the OnChange event.

Usually Text contains text, and setting Text sets the Fmt property to CF_TEXT. However, Delphi strings can contain non-text data. If Text does not specify text data, Fmt must be changed to indicate the format of the data in an OnChange event handler.

Text corresponds to the Lines property. Whenever the value of Lines or Text is changed, the other is updated so that the first line of Lines is always equal to Text.


 VCL Reference

TDdeServerItem events

TDdeServerItem	Alphabetically	Legend

In TDdeServerItem

OnChange

OnPokeData


 VCL Reference

TDdeServerItem events

TDdeServerItem	By object	Legend

OnChange

OnPokeData


TDdeServerItem.OnChange
 VCL Reference

TDdeServerItem.OnChange

TDdeServerItem	See also

Occurs when the Lines property changes, before the changes have been sent to the DDE client.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action when the DDE server item is about to update the DDE client. The new value for the DDE client item can be found by reading the Lines or Text property.

If the value of Lines does not contain text data, an OnChange event handler must be assigned to change the value of Fmt. OnChange is called after Fmt gets set to CF_TEXT by setting the Lines property, but before the data gets sent to the client.


TDdeServerItem.OnPokeData
 VCL Reference

TDdeServerItem.OnPokeData

TDdeServerItem	See also 	Example

Occurs after a DDE client changes the value of the Lines property.

property OnPokeData: TNotifyEvent;

Description

Write an OnPokeData event handler to take specific action when the DDE client pokes data to this DDE server item. The new value for the item can be found by reading the Lines or Text property.

When a DDE client pokes data to a DDE server items, the PokeData method is called. PokeData causes the following events.

1	First, the new value is assigned to the Lines (Text) property.

2	An OnChange event occurs.

3	The new value is sent back to the DDE client.

4	An OnPokeData event occurs.


 VCL Reference

TDdeServerItem methods

TDdeServerItem	Alphabetically	Legend

In TDdeServerItem

Change

CopyToClipboard

Create

Destroy

PokeData

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDdeServerItem methods

TDdeServerItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyToClipboard

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

PokeData

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDdeServerItem.Change
 VCL Reference

TDdeServerItem.Change

TDdeServerItem	See also

Generates an OnChange event.

procedure Change; dynamic;

Description

Call Change to trigger an OnChange event when not setting the Lines or Text property. Use Change in conjunction with the OnChange event to enable the DDE server item to exchange data that is not compatible with the strings used by the Lines and Text properties.


TDdeServerItem.CopyToClipboard
 VCL Reference

TDdeServerItem.CopyToClipboard

TDdeServerItem	See also

Copies the data specified in the Text or Lines property to the Windows Clipboard, along with DDE link information.

procedure CopyToClipboard;

Description

Use CopyToClipboard to enable DDE clients to link to the DDE server item by executing an Edit | Paste Link command, or its equivalent in the command structure of the DDE client application.

CopyToClipboard can be used to create a DDE link at runtime only. To create a link at design time, select the TDdeServerItem object and choose Edit | Copy from the menu. Then, activate the DDE client application and paste the link according to the rules of the DDE client application. See the documentation for the DDE client application for specific information about pasting the link.


TDdeServerItem.Create
 VCL Reference

TDdeServerItem.Create

TDdeServerItem	See also

Creates an instance of TDdeServerItem.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a DDE server item at runtime. TDdeServerItem objects placed on forms at design time are created automatically.

After calling the inherited constructor, Create initializes the Fmt property to CF_TEXT, and creates a helper object to manage the Lines property.


TDdeServerItem.Destroy
 VCL Reference

TDdeServerItem.Destroy

TDdeServerItem	See also

Destroys an instance of TDdeServerItem.

destructor Destroy; override;

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDdeServerItem is not nil, and only then calls Destroy.

Destroy frees the memory associated with the Lines property before calling the inherited destructor.


TDdeServerItem.PokeData
 VCL Reference

TDdeServerItem.PokeData

TDdeServerItem	See also

Processes data that has been poked to the DDE server item by a DDE client.

function PokeData(Data: HDdeData): LongInt;

Description

Call PokeData to inform the DDE server item that the DDE conversation holds data that has been poked from a DDE client. Data is the DDE handle to the poked data.

PokeData does the following:

1	Uses the Data handle to obtain the data that was poked.

2	Sets the Lines property to the new data value.

3	Triggers an OnChange event.

4	Sends the new value of the data back to the DDE client.

5	Triggers an OnPokeData event.


Hierarchy

TObject

TPersistent

TComponent

TDdeServerItem


TDdeServerConv
 VCL Reference

 TDdeServerConv

Hierarchy	Properties	Methods	Events	Using TDdeServerConv	See also

TDdeServerConv represents a DDE topic of conversation with a DDE client.

Unit

DdeMan

Description

Use TDdeServerConv to establish a DDE topic with a DDE client application. Individual items under the DDE topic are represented by TDdeServerItem objects. These items are linked to the DDE server conversation by setting their ServerConv property.

Using a TDdeServerConv component is optional. Without a TDdeServerConv object, the client can still enter into a DDE conversation and receive an update directly from a TDdeServerItem object. However, a DDE server conversation is required to handle any macros that the DDE client may send.

The Name property of the DDE server conversation provides the topic used by DDE clients to establish a link to the DDE server conversation. DDE server items that are not associated with a DDE server conversation use the Caption property of the form for the topic name. Use a TDdeServerConv object when establishing multiple DDE topics in a single form, or when the Caption of the form may not be unique or constant at runtime.


 VCL Reference

TDdeServerConv properties

TDdeServerConv	Alphabetically	Legend

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDdeServerConv properties

TDdeServerConv	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDdeServerConv events

TDdeServerConv	Alphabetically	Legend

In TDdeServerConv

OnClose

OnExecuteMacro

OnOpen


 VCL Reference

TDdeServerConv events

TDdeServerConv	By object	Legend

OnClose

OnExecuteMacro

OnOpen


TDdeServerConv.OnClose
 VCL Reference

TDdeServerConv.OnClose

TDdeServerConv	See also

Occurs when the DDE client terminates the DDE conversation.

property OnClose: TNotifyEvent;

Description

Write an OnClose event handler to take specific action when the DDE conversation ends. The DDE conversation will end if the client terminates the conversation. It does not end if the TDdeServerConv object is destroyed. In that case, the DDE server items simply remove themselves from the DDE server conversation, and continue the link to the DDE client.

The Sender parameter is the DDE server conversation, not the DDE client.


TDdeServerConv.OnExecuteMacro
 VCL Reference

TDdeServerConv.OnExecuteMacro

TDdeServerConv	See also 	Example

Occurs when the DDE client sends a macro to the DDE server conversation.

type TMacroEvent = procedure(Sender: TObject; Msg: TStrings) of object;

property OnExecuteMacro: TMacroEvent;

Description

Write an OnExecuteMacro event handler to implement a response to macros sent by the DDE client. The Sender parameter is the DDE server conversation. The Msg parameter gives the macro string to execute.


TDdeServerConv.OnOpen
 VCL Reference

TDdeServerConv.OnOpen

TDdeServerConv	See also

Occurs immediately after the DDE link to the client has been established.

property OnOpen: TNotifyEvent;

Description

Write an OnOpen event handler to take specific action whenever a link is established to a DDE client. The Sender parameter is the DDE server conversation, not the DDE client.


 VCL Reference

TDdeServerConv methods

TDdeServerConv	Alphabetically	Legend

In TDdeServerConv

Create

Destroy

ExecuteMacro

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDdeServerConv methods

TDdeServerConv	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

ExecuteMacro

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TDdeServerConv.Create
 VCL Reference

TDdeServerConv.Create

TDdeServerConv	See also

Creates an instance of TDdeServerConv.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TDdeServerConv at runtime. For TDdeServerConv objects placed on forms at design time, Create is called automatically.


TDdeServerConv.Destroy
 VCL Reference

TDdeServerConv.Destroy

TDdeServerConv	See also

Destroys an instance of TDdeServerConv.

destructor Destroy; override;

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TDdeServerConv reference is not nil and only then calls Destroy.

Destroy removes the DDE server conversation topic from the application, but does not terminate any currently open DDE conversations. Instead, the DDE server items that were associated with the DDE server conversation become associated with the form instead, and continue their link to the DDE client.


TDdeServerConv.ExecuteMacro
 VCL Reference

TDdeServerConv.ExecuteMacro

TDdeServerConv	See also

Responds to macros sent by the DDE client.

function ExecuteMacro(Data: HDdeData): LongInt;

Description

ExecuteMacro provides the only way for a Delphi application to respond to macros sent by DDE clients. ExecuteMacro is called when the DDE client sends a Macro over the DDE link. Data is the handle to the DDE data that contains the macro.

ExecuteMacro retrieves the strings of the macro from Data, and calls the OnExecuteMacro event handler. If there is no OnExecuteMacro event handler, the macro is ignored. Whether or not there is an OnExecuteMacro event handler, the DDE client always receives notification that the macro was successfully transmitted, unless Data contains no macro.


Hierarchy

TObject

TPersistent

TComponent

TDdeServerConv


TDockTree
 VCL Reference

TDockTree

Hierarchy	Properties	Methods	See also

TDockTree is the default docking manager for TWinControl.

Unit

Controls

Description

TDockTree handles the tasks of inserting and removing controls when they are docked to or undocked from a windowed control, including details such as positioning controls and any painting that is associated with docking operations. TDockTree implements the type of docking zones that appear in the IDE, with splitters that let users resize the docking zones, and grab regions where users must click to start an undock operation.

If an application does not explicitly assign a value to a windowed control’s DockManager property, then the windowed control uses TDockTree to handle docking operations (if the UseDockManager property is True).

TDockTree implements the IDockManager interface.


 VCL Reference

TDockTree properties

TDockTree	Alphabetically 	Legend

In TDockTree

DockSite

Derived from TInterfacedObject

RefCount


 VCL Reference

TDockTree properties

TDockTree	By object 	Legend

DockSite

RefCount


TDockTree.DockSite
 VCL Reference

TDockTree.DockSite

TDockTree 	See also

Specifies the windowed control that uses this dock tree to manage docking operations.

property DockSite: TWinControl;

Description

Applications can’t use the protected DockSite property. TDockTree uses this property internally when it needs to interact with the windowed control for which it manages docking operations.

DockSite is set in the TDockTree constructor.


 VCL Reference

TDockTree methods

TDockTree	Alphabetically	Legend

In TDockTree

AdjustDockRect

BeginUpdate

Create

Destroy

EndUpdate

GetControlBounds

HitTest

InsertControl

LoadFromStream

PaintDockFrame

PaintSite

PositionDockRect

RemoveControl

ResetBounds

SaveToStream

SetReplacingControl

UpdateAll

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TDockTree methods

TDockTree	By object	Legend

AdjustDockRect

AfterConstruction

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetControlBounds

GetInterface

GetInterfaceEntry

GetInterfaceTable

HitTest

InheritsFrom

InitInstance

InsertControl

InstanceSize

LoadFromStream

MethodAddress

MethodName

NewInstance

PaintDockFrame

PaintSite

PositionDockRect

RemoveControl

ResetBounds

SafeCallException

SaveToStream

SetReplacingControl

UpdateAll


TDockTree.AdjustDockRect
 VCL Reference

TDockTree.AdjustDockRect

TDockTree	See also

Adjusts the boundaries of the docking zone where a specified control is docked.

procedure AdjustDockRect(Control: TControl; var ARect: TRect); virtual;

Description

Applications can’t call the protected AdjustDockRect method. It is called automatically to make any final adjustments to the rectangle where a client control is docked.

Control is the control that is docked.

On entry, ARect indicates the boundaries of Control when it is docked to the windowed control specified by the DockSite property.  AdjustDockRect changes this to make any final adjustments to the space in which Control is docked.

In TDockTree, AdjustDockRect expands the ARect parameter to make room for the “grab region” around a docked control. (The grab region is indicated by a double bevel, and is where the user can click with the mouse to start an undocking operation.) AdjustDockRect checks the Align property of the dock site to determine whether the grab region should appear on the side or the top of the docked control.


TDockTree.BeginUpdate
 VCL Reference

TDockTree.BeginUpdate

TDockTree	See also

Responds when the docked controls are about to change.

procedure BeginUpdate;

Description

BeginUpdate implements the BeginUpdate method of the IDockManager interface. This method is called before controls are docked or undocked. For example, TDockTree calls BeginUpdate internally from the LoadFromStream method, before docking the controls it reads from a stream.

Once all docking or undocking is complete, the EndUpdate method is called so that the dock tree can make any final adjustments. Every call to BeginUpdate should be paired with a call to EndUpdate. BeginUpdate/EndUpdate pairs can be nested.


TDockTree.Create
 VCL Reference

TDockTree.Create

TDockTree	See also

Creates and initializes a TDockTree object.

constructor Create(DockSite: TWinControl); virtual;

Description

Createinstantiates a new TDockTree object to manage docking operations for the control specified by the DockSite parameter. Typically, applications do not create TDockTree objects. Instead, the windowed control that is the value of the DockSite parameter creates the dock tree when an application sets its UseDockManager property to True.

DockSite is the windowed control that uses the dock tree to manage the docking of child controls. It becomes the value of the DockSite property.

Createinitializes the new dock tree to reflect any controls currently docked in DockSite. It then replaces the WindowProc property of DockSite with a method that handles all docking-related messages, passing any other messages on to DockSite’s previous window procedure.


TDockTree.Destroy
 VCL Reference

TDockTree.Destroy

TDockTree	See also

Frees the memory associated with the TDockTree object.

destructor Destroy; override;

Description

Do not explicitly destroy TDockTree objects. As interfaced objects, dock trees are destroyed automatically when the reference count of their IDockManager interface drops to zero.

Destroy detaches the dock tree from the windowed control specified by the DockSite property, restoring its WindowProc property to the value it had when it called the TDockTree constructor.


TDockTree.EndUpdate
 VCL Reference

TDockTree.EndUpdate

TDockTree	See also

Responds when the docked controls have finished changing.

procedure EndUpdate;

Description

EndUpdate implements the EndUpdate method of the IDockManager interface. This method is called after controls are docked or undocked. For example, TDockTree calls EndUpdate internally from the LoadFromStream method, after docking the controls it reads from a stream.

EndUpdate checks that every previous call to the BeginUpdate method has been matched with an EndUpdate call. If so, it calls the UpdateAll method to perform any final adjustments to the docked controls, now that they are all in place.

Each call to EndUpdate should be paired by a call to BeginUpdate, which is made before docking or undocking controls. BeginUpdate/EndUpdate pairs can be nested.


TDockTree.GetControlBounds
 VCL Reference

TDockTree.GetControlBounds

TDockTree	See also

Returns the dimensions allotted to a control that is already docked.

procedure GetControlBounds(Control: TControl; out CtlBounds: TRect);

Description

GetControlBounds returns the dimensions of the zone in which a control is currently docked.

Control is the currently docked control.

CtlBounds returns the dimensions of the zone in which control is docked. If Control does not specify an object that is currently docked in the associated dock site, CtlBounds returns (0,0,0,0).


TDockTree.HitTest
 VCL Reference

TDockTree.HitTest

TDockTree	See also

Indicates which docked control is at a specified mouse position.

function HitTest(const MousePos: TPoint; out HTFlag: Integer): TControl; virtual;

Description

Applications can’t call this protected method. TDockTree uses HitTest internally to determine how to respond to mouse clicks.

MousePos indicates the position of the mouse pointer.

HTFlag indicates where the mouse pointer is relative to the docked control that is the return value. It is one of the following values:

Value	Meaning

HTNOWHERE	The mouse pointer is not anywhere in the docking region.

HTCLIENT	The mouse pointer is over the client area of the docked control.

HTBORDER	The mouse pointer is over the splitter that allows docking zones to be resized.

HTCAPTION	The mouse pointer is over the grab region where users can start to drag a docked control out of its docked position.

HTCLOSE	The mouse pointer is over the portion of the grab region that contains the “close” button for closing the docked control window.

HitTest returns the docked client that is under the mouse.


TDockTree.InsertControl
 VCL Reference

TDockTree.InsertControl

TDockTree	See also

Handles the docking of a control into the associated DockSite.

procedure InsertControl(Control: TControl; InsertAt: TAlign; DropCtl: TControl); virtual;

Description

InsertControl is called immediately after the windowed control that uses the dock tree adds a new control to its list of docked controls.

Control is the newly docked control.

InsertAt indicates where Control was docked within the windowed control.

DropCtl is the windowed control in which Control was docked. It should be the same as the value of the DockSite property.

InsertControl sets up the docking zone for the control (including a splitter for resizing the zone and a grab region so that the control can be undocked. It then invalidates the windowed control in which Control was docked so that it can repaint itself to display the new docking region and docked object.


TDockTree.LoadFromStream
 VCL Reference

TDockTree.LoadFromStream

TDockTree	See also

Creates docking zones for a set of docked controls read from a stream.

procedure LoadFromStream(Stream: TStream); virtual;

Description

LoadFromStream updates the dock tree to reflect the set of docked controls it reads from a stream. The stream must reflect the same format as is written by the SaveToStream method.

Stream is the stream object to use for reading the docked controls.


TDockTree.PaintDockFrame
 VCL Reference

TDockTree.PaintDockFrame

TDockTree	See also

Paints the elements of a docking zone that surround a docked control.

procedure PaintDockFrame(Canvas: TCanvas; Control: TControl; const ARect: TRect); virtual;

Description

Application’s can’t call the protected PaintDockFrame method. It is used by the PaintSite method to render the grab lines and close buttons that make up the grab region of a docking zone.

Canvas is the drawing surface on which to paint.

Control is the control that is docked in the zone being rendered.

ARect indicates the boundaries of the entire docking zone.

Note:	Descendants classes can override this method to change the way a dock tree paints docking zones. The descendant class should only paint in the portions of ARect that are not occupied by Control.


TDockTree.PaintSite
 VCL Reference

TDockTree.PaintSite

TDockTree	See also

Paints the elements that surround all docked controls.

procedure PaintSite(DC: HDC); virtual;

Description

Windowed controls that use a docking manager call PaintSite when they need to paint their docked child controls.

DC is the handle to the device context to use when rendering those elements of the docking zones other than the docked controls themselves.

PaintSite iterates through the docked controls, and for each one, calls the PaintDockFrame method to perform the actual painting.


TDockTree.PositionDockRect
 VCL Reference

TDockTree.PositionDockRect

TDockTree	See also

Computes the dimensions of a new docking zone.

procedure PositionDockRect(Client, DropCtl: TControl; DropAlign: TAlign; var DockRect: TRect); virtual;

Description

The control that is being docked calls PositionDockRect from its own PositionDockRect method when it is being docked to a windowed control that uses a dock manager. It allows the dock tree to indicate where a specified control would appear if the user released the mouse.

Client is the control that is being dragged to a docking position.

DropCtl is the windowed control into which Client will be docked. It should be the same as the value of DockSite.

DropAlign indicates where Control is to be docked within the windowed control.

DockRect returns the boundaries of the docking zone where Control can be docked.


TDockTree.RemoveControl
 VCL Reference

TDockTree.RemoveControl

TDockTree	See also

Handles the undocking of a control from the associated DockSite.

procedure RemoveControl(Control: TControl; virtual;

Description

The windowed control that uses the dock tree calls RemoveControl when one of its docked controls is undocked.

Control is the control that was just undocked.

RemoveControl adjusts the dock tree’s internal structures to indicate that the control is no longer docked, changes the control’s DockOrientation property to doNoOrient, and calls DockSite’s Invalidate method so that the region will be repainted.


TDockTree.ResetBounds
 VCL Reference

TDockTree.ResetBounds

TDockTree	See also

Recomputes the layout of docked controls.

procedure ResetBounds(Force: Boolean); virtual;

Description

ResetBounds updates the layout of the docked controls and their surrounding docking zones, based on the current dimensions of DockSite. It is used to update the dock tree to reflect current conditions (for example, when DockSite is resized).

Force indicates whether ResetBounds should recompute the layout if the dimensions of DockSite have not changed. When Force is False, ResetBounds only updates the layout of docked controls if the dimensions of DockSite have changed. When Force is True, ResetBounds updates the layout of docked controls even if the dimensions of DockSite have not changed.


TDockTree.SaveToStream
 VCL Reference

TDockTree.SaveToStream

TDockTree	See also

Saves a list of the set of docked controls and their positions to a stream.

procedure SaveToStream(Stream: TStream); virtual;

Description

SaveToStream writes enough information to a stream that the dock tree can reconstruct the docking zone structure when it reads that information back at a later time.

Stream is the stream object to use for writing the information.

Note:	To reconstruct the docking structure at a later time, use the LoadFromStream method.


TDockTree.SetReplacingControl
 VCL Reference

TDockTree.SetReplacingControl

TDockTree	See also

Prepares the dock tree for replacing one docked control with another.

procecure SetReplacingControl(Control: TControl);

Description

SetReplacingControl is called from a control’s ReplaceDockedControl method. It informs the dock tree that the next control that is removed will be immediately replaced by a different control. It allows the dock tree to optimize the work of the RemoveControl and InsertControl methods.


TDockTree.UpdateAll
 VCL Reference

TDockTree.UpdateAll

TDockTree	See also

Makes any internal adjustments to reflect the current state of the docked controls.

procecure UpdateAll;

Description

Applications can’t call the protected UpdateAll method. It is called by the EndUpdate method when a series of updates to the dock tree have been completed.

UpdateAll adjusts the internal structures of the dock tree to reflect the current layout of all docked controls.


Hierarchy

TObject

TInterfacedObject

TDockTree


TDragObject
 VCL Reference

TDragObject

Hierarchy	Properties	Methods	See also

TDragObject is a base class used for managing drag operations.

Unit

Controls

Description

Use TDragObject as a base class when creating a custom drag object to manage drag-and-drop operations or drag-and-dock operations. If the drag operation is associated with a single control that is dragged, derive the custom drag object from TBaseDragControlObject instead. Create the custom drag object in the OnStartDrag event of the dragged control. Use the public IsDragObject function within a target’s OnDragOver event when accepting a drag drop.

Note:	TDragObject is not automatically freed at the end of a drag operation. To work with a drag object that is freed at the end of the drag operation, use TDragObjectEx instead.

In Applications that do not need to override the virtual methods of TDragObject, a drag object is created automatically to manage drag operations.

TDragObject allows more flexible drag operation handling. Normally, the Source parameter of the OnDragOver and OnDragDrop events is the control that starts the drag operation. If multiple controls of differing kinds need to start a drag of the same kind of data (for example, a file name, text, or a dollar amount), the source would need support for each kind of control. A drag object allows the target to handle drag sources as a single class of object, because each source control creates the same kind of drag object in their OnStartDrag events. The OnDragOver and OnDragDrop event handlers can tell if the source is a drag object, as opposed to the control, by calling IsDragObject.

Drag objects can be dragged between multiple .DLLs as well as inside the main .EXE. This is useful if you are not using packages but still want drag operations to function from forms implemented in .EXEs to forms implemented in .DLLs.


 VCL Reference

TDragObject Properties

TDragObject	Alphabetically	Legend

In TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragObject Properties

TDragObject	By Object	Legend

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


TDragObject.Cancelling
 VCL Reference

TDragObject.Cancelling

TDragObject	See also

Specifies whether the drag operation is being canceled.

property Cancelling: Boolean;

Description

Use Cancelling to specify whether the drag operation is being canceled. Cancelling is set to True in the global CancelDrag procedure to prevent the canceling code from being executed more than once.


TDragObject.DragHandle
 VCL Reference

TDragObject.DragHandle

TDragObject	See also

Specifies the window handle of the dragged object.

property DragHandle: HWND;

Description

Use DragHandle to get or set the window handle of the dragged object.


TDragObject.DragPos
 VCL Reference

TDragObject.DragPos

TDragObject 	See also

Specifies the position of the dragged object.

property DragPos: TPoint;

Description

Use DragPos to get the position of the dragged object.


TDragObject.DragTarget
 VCL Reference

TDragObject.DragTarget

TDragObject 	See also

Specifies the dragged object’s target.

property DragTarget: Pointer;

Description

Use DragTarget to get the control (if any) that is the current drop target of the drag operation. If there is no control that will accept the dragged object if it is released, DragTarget is nil.


TDragObject.DragTargetPos
 VCL Reference

TDragObject.DragTargetPos

TDragObject 	See also

Specifies the position of the drag object relative to the drag target.

property DragTargetPos: TPoint;

Description

Use DragTargetPos to get the position of the dragged object relative to the upper left corner of the drag target. To get the position of the dragged object in screen coordinates, use the DragPos property instead.


TDragObject.Dropped
 VCL Reference

TDragObject.Dropped

TDragObject

Drag ended with drop.

property Dropped: Boolean;

Description

The Dropped property returns True if the last drag operation ended with a successful drop.


TDragObject.MouseDeltaX
 VCL Reference

TDragObject.MouseDeltaX

TDragObject 	See also

Specifies the x-coordinate of the mouse position relative to the position of the dragged object’s target.

property MouseDeltaX: Double;

Description

Use MouseDeltaX to determine the x-coordinate of the mouse position relative to the position where the dragged object would appear if released on the current target.


TDragObject.MouseDeltaY
 VCL Reference

TDragObject.MouseDeltaY

TDragObject 	See also

Specifies the y-coordinate of the mouse position relative to the position of the dragged object’s target.

property MouseDeltaY: Double;

Description

Use MouseDeltaY to determine the y-coordinate of the mouse position relative to the position where the dragged object would appear if released on the current target.


 VCL Reference

TDragObject Methods

TDragObject	Alphabetically	Legend

In TDragObject

Assign

Finished

GetDragCursor

GetDragImages

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragObject Methods

TDragObject	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Finished

Free

FreeInstance

GetDragCursor

GetDragImages

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragObject.Assign
 VCL Reference

TDragObject.Assign

TDragObject	See also

Copies the properties of another drag control object.

procedure Assign(Source: TDragObject); virtual;

Description

Call Assign to copy the properties of another drag object. Assign changes the DragTarget, DragHandle, DragPos, DragTargetPos, MouseDeltaX and MouseDeltaY properties of the drag object to match those supplied by the Source parameter.


TDragObject.Finished
 VCL Reference

TDragObject.Finished

TDragObject	See also

Responds when the mouse is released indicating the drag operation is complete.

procedure Finished(Target: TObject; X, Y: Integer; Accepted: Boolean); virtual;

Description

Finished does nothing as implemented in TDragObject. Override this method to provide more meaningful behavior. The Target is the object that accepted the drag. If the drag operation is canceled or a drag-and-dock operation ends with the dragged object in a free-floating position, Target is nil. X and Y indicate the position where the drag ended. Accepted is True if the Target accepted the dragged object.

Finished is overridden and implemented in TBaseDragControlObject.


TDragObject.GetDragCursor
 VCL Reference

TDragObject.GetDragCursor

TDragObject	See also

Indicates which cursor should be displayed in response to mouse moves.

function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; virtual;

Description

When the mouse is moved, GetDragCursor is called automatically.  The Accepted parameter indicates whether the object under the mouse accepts the drag. The X and Y parameters represent the current position of the mouse. The TCursor value returned by GetDragCursor is used to indicate the current drag cursor.

GetDragCursor returns crDrag to when Accepted is True, crNoDrop otherwise.


TDragObject.GetDragImages
 VCL Reference

TDragObject.GetDragImages

TDragObject	See also

Returns an image list containing the image to be displayed while dragging.

function GetDragImages: TDragImageList; virtual;

Description

GetDragImages is called at the beginning of a drag and drop operation. As implemented in TDragObject, GetDragImages returns nil, meaning that only the cursor is used to indicate the drag operation.

In descendant classes, the image list normally contains only one image, and the drag object automatically creates and maintains the image list.


TDragObject.GetName
 VCL Reference

TDragObject.GetName

TDragObject	See also

Returns a string that identifies the drag operation.

function GetName: string; virtual;

Description

By default GetName returns the name of the drag object class, but can be overridden to return a more meaningful string.


TDragObject.HideDragImage
 VCL Reference

TDragObject.HideDragImage

TDragObject	See also

Provides the interface for a method that hides the current drag image.

procedure HideDragImage; virtual;

Description

Because TDragObject does not implement drag images (relying only on the cursor) HideDragImage does nothing. Descendant classes override HideDragImage to hide the drag image provided by the GetDragImages method.


TDragObject.Instance
 VCL Reference

TDragObject.Instance

TDragObject	See also

Returns the instance (module) handle of the EXE or DLL that created the drag object.

type THandle = Integer;

function Instance: THandle; virtual;

Description

Use Instance to obtain the instance handle for loading a resource, such as a cursor, associated with the drag object.  See the example for the Cursors property of TScreen for an example of using the instance handle to load a cursor.


TDragObject.ShowDragImage
 VCL Reference

TDragObject.ShowDragImage

TDragObject	See also

Provides the interface for a method that hides the current drag image.

procedure ShowDragImage; virtual;

Description

Because TDragObject does not implement drag images (relying only on the cursor) ShowDragImage does nothing. Descendant classes override ShowDragImage to show the drag image.


Hierarchy

TObject

TDragObject


TDragObjectEx
 VCL Reference

TDragObjectEx

Hierarchy	Properties	Methods	See also

TDragObjectEx is a base class used for managing drag operations.

Unit

Controls

Description

Use TDragObjectEx as a base class when creating a custom drag object to manage drag-and-drop operations or drag-and-dock operations. Unlike its immediate ancestor, TDragObject, TDragObjectEx and its descendants are automatically freed at the end of a drag operation.

Applications can create the custom drag object in the OnStartDrag event of the dragged control. Use the public IsDragObject function within a target’s OnDragOver event when accepting a drag drop.

In Applications that do not need to override the virtual methods of TDragObjectEx, a drag object is created automatically to manage drag operations.

Drag objects allow more flexible drag operation handling. Normally, the Source parameter of the OnDragOver and OnDragDrop events is the control that starts the drag operation. If multiple controls of differing kinds need to start a drag of the same kind of data (for example, a file name, text, or a dollar amount), the source would need support for each kind of control. A drag object allows the target to handle drag sources as a single class of object, because each source control creates the same kind of drag object in their OnStartDrag events. The OnDragOver and OnDragDrop event handlers can tell if the source is a drag object, as opposed to the control, by calling IsDragObject.

Drag objects can be dragged between multiple .DLLs as well as inside the main .EXE. This is useful if you are not using packages but still want drag operations to function from forms implemented in .EXEs to forms implemented in .DLLs.


 VCL Reference

TDragObjectEx Properties

TDragObjectEx	Alphabetically	Legend

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragObjectEx Properties

TDragObjectEx	By Object	Legend

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragObjectEx Methods

TDragObjectEx	Alphabetically	Legend

In TDragObjectEx

BeforeDestruction

Derived from TDragObject

Assign

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragObjectEx Methods

TDragObjectEx	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragObjectEx.BeforeDestruction
 VCL Reference

TDragObjectEx.BeforeDestruction

TDragObjectEx

Allows the application to detect that the drag object needs to be freed.

procedure BeforeDestruction; override;

Description

Do not call BeforeDestruction. This method is called automatically before any TDragObjectEx destructors are called. It suppresses the inherited method, which prevents the drag object from being freed at the end of a drag operation.


Hierarchy

TObject

TDragObject

TDragObjectEx


TDragControlObject
 VCL Reference

TDragControlObject

Hierarchy	Properties	Methods	See also

TDragControlObject object provides for normal drag and drop operations.

Unit

Controls

Description

TDragControlObject object performs normal drag and drop operations. When TDragControlObject is used, the OnDragOver and OnDragDrop events receive the control being dragged as the Sender, instead of the drag object itself.

Note:	TDragControlObject is not automatically freed at the end of a drag operation. For a drag object that is automatically freed, use TDragControlObjectEx instead.


 VCL Reference

TDragControlObject Properties

TDragControlObject	Alphabetically	Legend

Derived from TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragControlObject Properties

TDragControlObject	By Object	Legend

Cancelling

Control

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragControlObject Methods

TDragControlObject	Alphabetically	Legend

In TDragControlObject

GetDragCursor

GetDragImages

HideDragImage

ShowDragImage

Derived from TBaseDragControlObject

Assign

Create

Derived from TDragObject

GetName

Instance

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragControlObject Methods

TDragControlObject	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDragCursor

GetDragImages

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragControlObject.GetDragCursor
 VCL Reference

TDragControlObject.GetDragCursor

TDragControlObject	See also

Returns the correct drag cursor to display at the X, Y position for the drag and drop operation.

function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; override;

Description

If the control at the X, Y position accepts the drag (in an OnDragOver event handler), the drag object sets the drag cursor to the control's DragCursor property; otherwise, it displays the crNoDrop cursor.


TDragControlObject.GetDragImages
 VCL Reference

TDragControlObject.GetDragImages

TDragControlObject	See also

Returns the control's image list containing the image to be displayed while dragging.

function GetDragImages: TDragImageList; override;

Description

GetDragImages calls the associated control’s GetDragImages method. The image list normally contains only one image, which the control creates and maintains. For many controls in the VCL, GetDragImages returns nil.


TDragControlObject.HideDragImage
 VCL Reference

TDragControlObject.HideDragImage

TDragControlObject	See also

Hides the image used in the drag cursor.

procedure HideDragImage; override;

Description

If the control being dragged contains an image list containing an image for dragging, it will be hidden. This allows control over when a drag image is displayed.


TDragControlObject.ShowDragImage
 VCL Reference

TDragControlObject.ShowDragImage

TDragControlObject	See also

Shows the image used in the drag cursor.

procedure ShowDragImage; override;

Description

If the control being dragged contains an image list containing an image for dragging, it will be shown. This allows control over when a drag image is shown.


Hierarchy

TObject

TDragObject

TBaseDragControlObject

TDragControlObject


TDragControlObjectEx
 VCL Reference

TDragControlObjectEx

Hierarchy	Properties	Methods	See also

TDragControlObjectEx object provides for normal drag and drop operations.

Unit

Controls

Description

TDragControlObjectEx object performs normal drag and drop operations. When TDragControlObjectEx is used, the OnDragOver and OnDragDrop events receive the control being dragged as the Sender, instead of the drag object itself.

Note:	Unlike its immediate ancestor (TDragControlObject), TDragControlObjectEx is automatically freed at the end of a drag operation.


 VCL Reference

TDragControlObjectEx Properties

TDragControlObjectEx	Alphabetically	Legend

Derived from TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragControlObjectEx Properties

TDragControlObjectEx	By Object	Legend

Cancelling

Control

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragControlObjectEx Methods

TDragControlObjectEx	Alphabetically	Legend

In TDragControlObjectEx

BeforeDestruction

Derived from TDragControlObject

HideDragImage

ShowDragImage

Derived from TBaseDragControlObject

Assign

Derived from TDragObject

GetName

Instance

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragControlObjectEx Methods

TDragControlObjectEx	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragControlObjectEx.BeforeDestruction
 VCL Reference

TDragControlObjectEx.BeforeDestruction

TDragControlObjectEx

Allows the application to detect that the drag object needs to be freed.

procedure BeforeDestruction; override;

Description

Do not call BeforeDestruction. This method is called automatically before any TDragControlObjectEx destructors are called. It suppresses the inherited method, which prevents the drag object from being freed at the end of a drag operation.


Hierarchy

TObject

TDragObject

TBaseDragControlObject

TDragControlObject

TDragControlObjectEx


TDragDockObjectEx
 VCL Reference

TDragDockObjectEx

Hierarchy	Properties	Methods	See also

Contains drag-and-dock information for a control.

Unit

Controls

Description

TDragDockObjectEx is used in several events and methods that use drag-and-dock information, including the OnDockDrop and OnDockOver events of TWinControl. Unlike its immediate ancestor, TDragDockObject, TDragDockObjectEx is automatically freed at the end of a drag-and-dock operation.


 VCL Reference

TDragDockObjectEx properties

TDragDockObjectEx	Alphabetically	Legend

Derived from TDragDockObject

Brush

DockRect

DropAlign

DropOnControl

Floating

FrameWidth

Derived from TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragDockObjectEx properties

TDragDockObjectEx	By object	Legend

Brush

Cancelling

Control

DockRect

DragHandle

DragPos

DragTarget

DragTargetPos

DropAlign

DropOnControl

Dropped

Floating

FrameWidth

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragDockObjectEx methods

TDragDockObjectEx	Alphabetically	Legend

In TDragDockObjectExEx

BeforeDestruction

Derived from TDragDockObject

Assign

Create

Destroy

Derived from TDragObject

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragDockObjectEx methods

TDragDockObjectEx	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragDockObjectEx.BeforeDestruction
 VCL Reference

TDragDockObjectEx.BeforeDestruction

TDragDockObjectEx

Allows the application to detect that the drag object needs to be freed.

procedure BeforeDestruction; override;

Description

Do not call BeforeDestruction. This method is called automatically before any TDragDockObjectEx destructors are called. It suppresses the inherited method, which prevents the drag object from being freed at the end of a drag operation.


Hierarchy

TObject

TDragObject

TBaseDragControlObject

TDragDockObject

TDragDockObjectEx


TDragDockObject
 VCL Reference

TDragDockObject

Hierarchy	Properties	Methods	See also

Contains drag-and-dock information for a control.

Unit

Controls

Description

TDragDockObject is used in several events and methods that use drag-and-dock information, including the OnDockDrop and OnDockOver events of TWinControl.

Note:	TDragDockObject is not automatically freed at the end of a drag-and-dock operation. To work with a drag object that is freed at the end of the drag-and-dock operation, use TDragDockObjectEx instead.


 VCL Reference

TDragDockObject properties

TDragDockObject	Alphabetically	Legend

In TDragDockObject

Brush

DockRect

DropAlign

DropOnControl

Floating

FrameWidth

Derived from TBaseDragControlObject

Control

Derived from TDragObject

Cancelling

DragHandle

DragPos

DragTarget

DragTargetPos

Dropped

MouseDeltaX

MouseDeltaY


 VCL Reference

TDragDockObject properties

TDragDockObject	By object	Legend

Brush

Cancelling

Control

DockRect

DragHandle

DragPos

DragTarget

DragTargetPos

DropAlign

DropOnControl

Dropped

Floating

FrameWidth

MouseDeltaX

MouseDeltaY


TDragDockObject.Brush
 VCL Reference

TDragDockObject.Brush

TDragDockObject

Specifies the brush used to draw the dock image.

property Brush: TBrush;

Description

Use Brush to specify the brush used to draw the dock image.


TDragDockObject.DockRect
 VCL Reference

TDragDockObject.DockRect

TDragDockObject	Example

Specifies the rectangle on which the control is docked if released.

property DockRect: TRect;

Description

Use DockRect to determine the rectangle on which the control is docked if released.


TDragDockObject.DropAlign
 VCL Reference

TDragDockObject.DropAlign

TDragDockObject

Specifies how the control will be aligned when docked.

property DropAlign: TAlign;

Description

Use DropAlign to determine how the control will be aligned when docked.


TDragDockObject.DropOnControl
 VCL Reference

TDragDockObject.DropOnControl

TDragDockObject

Specifies the control on which the dragged control will be docked if released.

property DropOnControl: TControl;

Description

Use DropOnControl to determine the control on which the dragged control would be dropped if released.


TDragDockObject.Floating
 VCL Reference

TDragDockObject.Floating

TDragDockObject

Specifies whether the control is floating.

property Floating: Boolean;

Description

Use Floating to determine whether the control is floating.


TDragDockObject.FrameWidth
 VCL Reference

TDragDockObject.FrameWidth

TDragDockObject	See also

Specifies the border width, in pixels, of the frame drawn around the drag image.

property FrameWidth: Integer;

Description

Read FrameWidth to determine the size of the frame drawn around the drag image. As implemented in TDragDockObject, this value is always 4 pixels.


 VCL Reference

TDragDockObject methods

TDragDockObject	Alphabetically	Legend

In TDragDockObject

AdjustDockRect

Assign

Create

Destroy

DrawDragDockImage

EndDrag

EraseDragDockImage

GetDragCursor

GetFrameWidth

Derived from TDragObject

GetName

HideDragImage

Instance

ShowDragImage

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TDragDockObject methods

TDragDockObject	By object	Legend

AdjustDockRect

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

DrawDragDockImage

EndDrag

EraseDragDockImage

FieldAddress

Free

FreeInstance

GetDragCursor

GetFrameWidth

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetName

HideDragImage

InheritsFrom

InitInstance

Instance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

ShowDragImage


TDragDockObject.AdjustDockRect
 VCL Reference

TDragDockObject.AdjustDockRect

TDragDockObject	See also

Adjusts the value of DockRect to reflect the dragged control’s current status.

procedure AdjustDockRect(ARect: TRect); virtual;

Description

AdjustDockRect is called automatically at points during the drag operation to adjust the value of the DockRect property. The adjustment ensures that the position where the control is docked reflects the current mouse position.


TDragDockObject.Assign
 VCL Reference

TDragDockObject.Assign

TDragDockObject

Enables assignments of TDragDockObject objects.

procedure Assign(Source: TDragObject); override;

Description

Assign calls the inherited Assign method and then handles the assignment of TDragDockObject objects.


TDragDockObject.Create
 VCL Reference

TDragDockObject.Create

TDragDockObject

Creates and initializes an instance of TDragDockObject.

constructor Create(AControl: TControl); override;

Description

Create calls the inherited constructor and allocates memory for the Brush property.


TDragDockObject.Destroy
 VCL Reference

TDragDockObject.Destroy

TDragDockObject

Destroys an instance of TDragDockObject.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free.

Destroy frees the memory associated with the Brush property and then calls the inherited destructor.


TDragDockObject.DrawDragDockImage
 VCL Reference

TDragDockObject.DrawDragDockImage

TDragDockObject

Called when the dock image for a control is drawn.

procedure DrawDragDockImage; virtual;

Description

Override DrawDragDockImage in a derived class to change the way the dock image is drawn.


TDragDockObject.EndDrag
 VCL Reference

TDragDockObject.EndDrag

TDragDockObject

Called when a control is released from dragging.

procedure EndDrag(Target: TObject; X, Y: Integer); override;

Description

Override EndDrag in a derived class to perform actions when a control is released from dragging.

By default, EndDrag calls the control’s DoEndDock method.

Target is the object in which the control is docked. If the control is not docked, Target is nil.

X and Y are the coordinates of the control.


TDragDockObject.EraseDragDockImage
 VCL Reference

TDragDockObject.EraseDragDockImage

TDragDockObject

Called when the dock image for a control is erased.

procedure EraseDragDockImage; virtual;

Description

Override EraseDragDockImage in a derived class to perform actions when the dock image for a control is erased.

By default, EndDrag calls the control’s EraseDragDockImage method.


TDragDockObject.GetDragCursor
 VCL Reference

TDragDockObject.GetDragCursor

TDragDockObject	See also

Returns the cursor used during dragging.

function GetDragCursor(Accepted: Boolean; X, Y: Integer): TCursor; override;

Description

Override GetDragCursor to specify the cursor used during dragging.

By default, GetDragCursor returns crDefault.


TDragDockObject.GetFrameWidth
 VCL Reference

TDragDockObject.GetFrameWidth

TDragDockObject	See also

Returns the value of the FrameWidth property.

function GetFrameWidth: Integer); virtual;

Description

Override GetFrameWidth to change the width of the frame that is drawn around the drag image. As implemented in TDragDockObject, GetFrameWidth returns 4.


Hierarchy

TObject

TDragObject

TBaseDragControlObject

TDragDockObject


TDragImageList
 VCL Reference

TDragImageList

Hierarchy	Properties	Methods	Events	See also

TDragImageList represents a set of images that appear during drag operations.

Unit

Controls

Description

TDragImageList is used to hold images that are displayed during drag and drop or drag and dock operations. It is created by the control that is dragged, which returns the drag image list in its GetDragImages method.  During a drag operation, a TDragControlObject instance uses the drag image list to display or hide the images in the list.


 VCL Reference

TDragImageList properties

TDragImageList	Alphabetically	Legend

In TDragImageList

DragCursor

Dragging

Derived from TCustomImageList

AllocBy

BkColor

BlendColor

Count

DrawingStyle

Handle

Height

ImageType

Masked

ShareImages

Width

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TDragImageList properties

TDragImageList	By object	Legend

AllocBy

BkColor

BlendColor

ComObject

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

Count

DesignInfo

DragCursor

Dragging

DrawingStyle

Handle

Height

ImageType

Masked

Name

Owner

ShareImages

Tag

VCLComObject

Width


TDragImageList.DragCursor
 VCL Reference

TDragImageList.DragCursor

TDragImageList	See also

Specifies the current drag cursor that is associated with the image list.

property DragCursor: TCursor;

Description

Use DragCursor to determine which cursor should be displayed when an image in the image list is dragged. When an image is dragged, a new drag image is created by combining the given image (typically a mouse cursor image) with the current drag cursor.


TDragImageList.Dragging
 VCL Reference

TDragImageList.Dragging

TDragImageList	See also

Indicates whether an image in the image list is being dragged.

property Dragging: Boolean;

Description

When Dragging returns True, an image in the image list is being dragged. When Dragging returns False, no image is being dragged.


 VCL Reference

TDragImageList events

TDragImageList	Alphabetically	Legend

Derived from TCustomImageList

OnChange


 VCL Reference

TDragImageList events

TDragImageList	By object	Legend

OnChange


 VCL Reference

TDragImageList methods

TDragImageList	Alphabetically	Legend

In TDragImageList

BeginDrag

DragLock

DragMove

DragUnlock

EndDrag

GetHotSpot

HideDragImage

Initialize

SetDragImage

ShowDragImage

Derived from TCustomImageList

Add

AddIcon

AddImages

AddMasked

Assign

Clear

Create

CreateSize

Delete

Destroy

Draw

DrawOverlay

FileLoad

GetBitmap

GetIcon

GetImageBitmap

GetInstRes

GetMaskBitmap

GetResource

HandleAllocated

Insert

InsertIcon

InsertMasked

Move

Overlay

RegisterChanges

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TDragImageList methods

TDragImageList	By object	Legend

Add

AddIcon

AddImages

AddMasked

AfterConstruction

Assign

BeforeDestruction

BeginDrag

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateSize

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

Dispatch

DragLock

DragMove

DragUnlock

Draw

DrawOverlay

EndDrag

ExecuteAction

FieldAddress

FileLoad

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetBitmap

GetHotSpot

GetIcon

GetImageBitmap

GetInstRes

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMaskBitmap

GetNamePath

GetParentComponent

GetResource

HandleAllocated

HasParent

HideDragImage

InheritsFrom

Initialize

InitInstance

Insert

InsertComponent

InsertIcon

InsertMasked

InstanceSize

IsImplementorOf

MethodAddress

MethodName

Move

NewInstance

Overlay

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

SafeCallException

SetDragImage

SetSubComponent

ShowDragImage

UnRegisterChanges

UpdateAction


TDragImageList.BeginDrag
 VCL Reference

TDragImageList.BeginDrag

TDragImageList	See also

Starts the dragging of an image list.

function BeginDrag(Window: HWND; X, Y: Integer): Boolean;

Description

Use BeginDrag to start dragging the image set by SetDragImage. The image starts at the position specified by X and Y, which are the coordinates of the drag image relative to the window whose handle is specified by the Window parameter. BeginDrag returns True if it was successful in starting the drag of the image.


TDragImageList.DragLock
 VCL Reference

TDragImageList.DragLock

TDragImageList	See also

Associates the drag image with the given Window handle and draws it at the position given by the parameters XPos and YPos while the window is in drag mode.

function DragLock(Window: HWND; XPos, YPos: Integer): Boolean;

Description

Call DragLock to use an image in the image list as a drag image when a particular window is dragged. DragLock returns True if successful.


TDragImageList.DragMove
 VCL Reference

TDragImageList.DragMove

TDragImageList	See also

Moves the drag image set by SetDragImage to a new position specified by X and Y within its currently associated window while the window is in drag mode.

function DragMove(X,Y: Integer): Boolean;

Description

Use the DragMove method to move the image that is being dragged during a drag-and-drop operation. DragMove returns True if successful.


TDragImageList.DragUnlock
 VCL Reference

TDragImageList.DragUnlock

TDragImageList	See also

Removes the association between the drag image and a window.

procedure DragUnlock;

Description

Call DragUnlock when an image is no longer needed as a drag image for a particular window. DragUnlock removes the association started by the DragLock method.


TDragImageList.EndDrag
 VCL Reference

TDragImageList.EndDrag

TDragImageList	See also

Ends the drag operation.

function EndDrag: Boolean;

Description

Use EndDrag after BeginDrag has been called to end the drag operation.  EndDrag returns True if successful.


TDragImageList.GetHotSpot
 VCL Reference

TDragImageList.GetHotSpot

TDragImageList

Returns the hot spot location associated with the current drag image.

function GetHotSpot: TPoint; override;

Description

Use the GetHotSpot method to obtain the position of the hot spot of the current drag image. The hot spot represents the current mouse position.


TDragImageList.HideDragImage
 VCL Reference

TDragImageList.HideDragImage

TDragImageList	See also

Hides the current drag image if it was previously shown.

procedure HideDragImage;

Description

Most applications do not need to use HideDragImage to hide the current drag image. The drag control object calls this method when it is needed.


TDragImageList.Initialize
 VCL Reference

TDragImageList.Initialize

TDragImageList

Sets numerous image list properties to their default values and creates instances of objects used internal to the image list.

procedure Initialize; override;

Description

Initialize is called from the constructors of the image list.


TDragImageList.SetDragImage
 VCL Reference

TDragImageList.SetDragImage

TDragImageList	See also

Sets an image within the image list to be shown during a drag and drop operation.

function SetDragImage(Index, HotSpotX, HotSpotY: Integer): Boolean;

Description

Use the SetDragImage method to set the image specified by Index within the image list to be shown when the image list is being used for drag and drop. The hot spot of the image is specified by HotSpotX and HotSpotY.


TDragImageList.ShowDragImage
 VCL Reference

TDragImageList.ShowDragImage

TDragImageList	See also

Shows the current drag image if it was previously hidden.

procedure ShowDragImage;

Description

Most applications do not need to use ShowDragImage to display the current drag image. The drag control object calls this method when it is needed.


Hierarchy

TObject

TPersistent

TComponent

TCustomImageList

TDragImageList


EAccessViolation
 VCL Reference

EAccessViolation

Hierarchy	Properties	Methods	See also

EAccessViolation is the exception class for invalid memory access errors.

Unit

SysUtils

Description

EAccessViolation is raised when an application

Dereferences a nil pointer.

Writes to memory reserved for executable code.

Attempts to access a memory address for which there is no virtual memory allocated to the application.

Run-time exception information is saved in fields provided by EExternal.

Note:	Applications should not raise EAccessViolation directly, but should instead rely on the runtime to raise this exception.


 VCL Reference

EAccessViolation properties

EAccessViolation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EAccessViolation properties

EAccessViolation	By object	Legend

HelpContext

Message


 VCL Reference

EAccessViolation methods

EAccessViolation	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EAccessViolation methods

EAccessViolation	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EAccessViolation


EBitsError
 VCL Reference

EBitsError

Hierarchy	Properties	Methods	See also

EBitsError is the exception class for invalid attempts to access an array of boolean values.

Unit

Classes

Description

EBitsError is raised when an application attempts to access a boolean array (an instance of the TBits class) using an index value that is too large or too small. This can occur when the value of the Index parameter of the Bits property is

Less than zero.

Equal to or greater than the Size property.


 VCL Reference

EBitsError properties

EBitsError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EBitsError properties

EBitsError	By object	Legend

HelpContext

Message


 VCL Reference

EBitsError methods

EBitsError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EBitsError methods

EBitsError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EBitsError


EClassNotFound
 VCL Reference

EClassNotFound

Hierarchy	Properties 	Methods 	See also

EClassNotFound is the exception class for the failure to find a specified component when reading from a stream.

Unit

Classes

Description

EClassNotFound is raised if a class name that has not been linked into the current application is encountered when reading a component from a stream. This can happen when a component exists on a form, but has been removed from the type declaration.


 VCL Reference

EClassNotFound properties

EClassNotFound	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EClassNotFound properties

EClassNotFound	By object	Legend

HelpContext

Message


 VCL Reference

EClassNotFound methods

EClassNotFound	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EClassNotFound methods

EClassNotFound	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFilerError

EClassNotFound


EConvertError
 VCL Reference

EConvertError

Hierarchy	Properties	Methods	See also

EConvertError is the exception class for string and object conversion errors.

Unit

SysUtils

Description

EConvertError is raised when

An application makes an unsuccessful attempt to convert an integer, float, date, or time to a string, or to convert a string to one of these other types.

An application passes an invalid argument to a formatting routine.

An application attempts to assign one type of component derived from TPersistent to another component derived from TPersistent when such an assignment is not possible. For example, EConvertError is raised by the attempted assignment of a TButton control to a TEdit control.

In the example below, an EConvertError exception is raised on the attempt to convert a String to a TDateTime and the date in the String is invalid. The type of exception and the error message are displayed.

const

  CRLF = #13 + #10;

var

  TempDate: TDateTime;

begin

  try

    TempDate := StrToDateTime('99/99/1998');

  except

    on E: EConvertError do

      ShowMessage(E.ClassName + CRLF + E.Message);

end;


 VCL Reference

EConvertError properties

EConvertError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EConvertError properties

EConvertError	By object	Legend

HelpContext

Message


 VCL Reference

EConvertError methods

EConvertError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EConvertError methods

EConvertError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EConvertError


ECommonCalendarError
 VCL Reference

ECommonCalendarError

Hierarchy	Properties	Methods	See also

ECommonCalendarError is the exception class for invalid entries in a TCommonCalendar component.

Unit

ComCtrls

Description

Exceptions derived from ECommonCalendarError are raised by TCommonCalendar descendants when an invalid date or time is entered.


 VCL Reference

ECommonCalendarError properties

ECommonCalendarError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ECommonCalendarError properties

ECommonCalendarError	By object	Legend

HelpContext

Message


 VCL Reference

ECommonCalendarError methods

ECommonCalendarError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ECommonCalendarError methods

ECommonCalendarError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception


 VCL Reference


EComponentError
 VCL Reference

EComponentError

Hierarchy	Properties	Methods	See also

EComponentError is the exception class for registering and renaming components.

Unit

Classes

Description

EComponentError is raised when:

Delphi cannot register a component.

An application cannot rename a component.

A request is made to retrieve the COM interface of a component that doesn’t support COM.

To register a component, write a procedure called “Register”, declared in the interface section of the component’s unit file. Note that unlike most procedure names in Object Pascal, the name of the Register procedure is case-sensitive. Register must call RegisterComponents for each component you want to register.

Failure to rename a component occurs when an application tries to rename the component at runtime, and the new name is the same as the name of another component with the same Owner or is not a valid Object Pascal identifier.


 VCL Reference

EComponentError properties

EComponentError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EComponentError properties

EComponentError	By object	Legend

HelpContext

Message


 VCL Reference

EComponentError methods

EComponentError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EComponentError methods

EComponentError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EComponentError


EConversionError
 VCL Reference

EConversionError

Hierarchy	Properties	Methods	See also

EConversionError is the exception class for measurement conversion errors.

Unit

SysUtils

Description

EConversionError is raised by the global Convert function when

The specified units (TConvType values) are not compatible with each other.

The specified units are not registered with any conversion family.

It is also thrown by the RegisterConversionType function when an application tries to register a conversion type with an unregistered conversion family.


 VCL Reference

EConversionError properties

EConversionError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EConversionError properties

EConversionError	By object	Legend

HelpContext

Message


 VCL Reference

EConversionError methods

EConversionError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstanceT

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EConversionError methods

EConversionError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EConversionError


TEditDelete
 VCL Reference

TEditDelete

Hierarchy	Properties	Methods	Events	Using TEditDelete	See also

TEditDelete deletes the selected text in a target edit control.

Unit

StdActns

Description

Add TEditDelete to an action list to let users delete selected text using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to delete the currently selected text in an active text control.

TEditDelete is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control or if the active edit control does not have any selected text.


 VCL Reference

TEditDelete properties

TEditDelete	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditDelete properties

TEditDelete	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditDelete events

TEditDelete	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditDelete events

TEditDelete	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditDelete methods

TEditDelete	Alphabetically	Legend

In TEditDelete

ExecuteTarget

UpdateTarget

Derived from TEditAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditDelete methods

TEditDelete	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditDelete.ExecuteTarget
 VCL Reference

TEditDelete.ExecuteTarget

TEditDelete 	See also

Deletes selected text in the target control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a TCustomEdit descendant, and if so, calls its ClearSelection method, deleting the selected text.


TEditDelete.UpdateTarget
 VCL Reference

TEditDelete.UpdateTarget

TEditDelete 	See also

Enables or disables the action, depending on the currently active control in the form.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the application is idle so that actions can update themselves according to current conditions.

In TEditDelete, UpdateTarget checks whether the current target object (specified by the Target parameter) is an edit control that has some of its text selected. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditDelete


TEditPaste
 VCL Reference

TEditPaste

Hierarchy	Properties	Methods	Events	Using TEditPaste	See also

TEditPaste pastes text from the clipboard into the active edit control.

Unit

StdActns

Description

Add TEditPaste to an action list to enable users to paste text from the clipboard using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to paste text from the clipboard into an active text control.

TEditPaste is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the clipboard does not contain text.


 VCL Reference

TEditPaste properties

TEditPaste	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditPaste properties

TEditPaste	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditPaste events

TEditPaste	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditPaste events

TEditPaste	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditPaste methods

TEditPaste	Alphabetically	Legend

In TEditPaste

ExecuteTarget

UpdateTarget

Derived from TEditAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditPaste methods

TEditPaste	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditPaste.ExecuteTarget
 VCL Reference

TEditPaste.ExecuteTarget

TEditPaste 	See also

Pastes text from the clipboard into the target edit control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a TCustomEdit descendant, and if so, calls its PasteFromClipboard method, pasting in any text on the clipboard.


TEditPaste.UpdateTarget
 VCL Reference

TEditPaste.UpdateTarget

TEditPaste 	See also

Enables or disables the action, depending on the contents of the clipboard.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TEditPaste, UpdateTarget checks whether the clipboard contains text. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditPaste


TEditSelectAll
 VCL Reference

TEditSelectAll

Hierarchy	Properties	Methods	Events	Using TEditSelectAll	See also

TEditSelectAll selects all text in an active text control.

Unit

StdActns

Description

Add TEditSelectAll to an action list to allow users to select all the text in a text control using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to select all text in an active text control.

TEditSelectAll is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control or if the edit control does not have any text.


 VCL Reference

TEditSelectAll properties

TEditSelectAll	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditSelectAll properties

TEditSelectAll	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditSelectAll events

TEditSelectAll	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditSelectAll events

TEditSelectAll	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditSelectAll methods

TEditSelectAll	Alphabetically	Legend

In TEditSelectAll

ExecuteTarget

UpdateTarget

Derived from TEditAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditSelectAll methods

TEditSelectAll	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditSelectAll.ExecuteTarget
 VCL Reference

TEditSelectAll.ExecuteTarget

TEditSelectAll 	See also

Selects all text in the target edit control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a TCustomEdit descendant, and if so, calls its SelectAll method, selecting all of its text.


TEditSelectAll.UpdateTarget
 VCL Reference

TEditSelectAll.UpdateTarget

TEditSelectAll 	See also

Enables or disables the action, depending on the contents of the target edit control.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TEditSelectAll, UpdateTarget checks whether Target is a text control that contains text. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditSelectAll


TEditUndo
 VCL Reference

TEditUndo

Hierarchy	Properties	Methods	Events	Using TEditUndo	See also

TEditUndo backs out the last change in an edit control.

Unit

StdActns

Description

Add TEditUndo to an action list to allow users to back out edits using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to undo the last edit in an active text control.

TEditUndo is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control that can back out the last edit.


 VCL Reference

TEditUndo properties

TEditUndo	Alphabetically	Legend

Derived from TEditAction

Control

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TEditUndo properties

TEditUndo	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Control

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TEditUndo events

TEditUndo	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TEditUndo events

TEditUndo	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TEditUndo methods

TEditUndo	Alphabetically	Legend

In TEditUndo

ExecuteTarget

UpdateTarget

Derived from TEditAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TEditUndo methods

TEditUndo	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TEditUndo.ExecuteTarget
 VCL Reference

TEditUndo.ExecuteTarget

TEditUndo 	See also

Backs out the last edit from the target control.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget checks that Target is a TCustomEdit descendant, and if so, calls its Undo method, backing out the last change.


TEditUndo.UpdateTarget
 VCL Reference

TEditUndo.UpdateTarget

TEditUndo 	See also

Enables or disables the action, depending on the currently active control in the form.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In TEditUndo, UpdateTarget checks whether the current target object (specified by the Target parameter) is an edit control that is in a state where it can back out changes. If so, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TEditAction

TEditUndo


EExternalException
 VCL Reference

EExternalException

Hierarchy	Properties	Methods	See also

EExternalException is the exception class for invalid exception codes.

Unit

SysUtils

Description

EExternalException is raised when the run time library detects an unrecognized exception code. The RTL recognizes the following exception codes:

STATUS_INTEGER_DIVIDE_BY_ZERO

STATUS_ARRAY_BOUNDS_EXCEEDED

STATUS_FLOAT_OVERFLOW

STATUS_FLOAT_INEXACT_RESULT

STATUS_FLOAT_INVALID_OPERATION

STATUS_FLOAT_STACK_CHECK

STATUS_FLOAT_DIVIDE_BY_ZERO

STATUS_INTEGER_OVERFLOW

STATUS_FLOAT_UNDERFLOW

STATUS_FLOAT_DENORMAL_OPERAND

STATUS_ACCESS_VIOLATION

STATUS_PRIVILEGED_INSTRUCTION

STATUS_CONTROL_C_EXIT

STATUS_STACK_OVERFLOW

Any exception code that is not on the list above raises an EExternalException.

As a descendant of EExternal, EExternalException saves the exception record (when the OS generates one) in its ExceptionRecord data structure.


 VCL Reference

EExternalException properties

EExternalException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EExternalException properties

EExternalException	By object	Legend

HelpContext

Message


 VCL Reference

EExternalException methods

EExternalException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EExternalException methods

EExternalException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EExternalException


EExternal
 VCL Reference

EExternal

Hierarchy	Properties	Methods	See also

EExternal is the exception class that captures Windows exception records.

Unit

SysUtils

Description

EExternal is the ancestor of all exception classes that represent Win32 exception codes. EExternal has a public member, ExceptionRecord that points to a TExceptionRecord data structure:

type

PExceptionRecord = ^TExceptionRecord;

TExceptionRecord = record

  ExceptionCode: Cardinal;

  ExceptionFlags: Cardinal;

  ExceptionRecord: PExceptionRecord;

  ExceptionAddress: Pointer;

  NumberParameters: Cardinal;

  ExceptionInformation: array[0..14] of Cardinal;

end;

ExceptionRecord: PExceptionRecord;


 VCL Reference

EExternal properties

EExternal	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EExternal properties

EExternal	By object	Legend

HelpContext

Message


 VCL Reference

EExternal methods

EExternal	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EExternal methods

EExternal	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal


EFCreateError
 VCL Reference

EFCreateError

Hierarchy	Properties	Methods	See also

EFCreateError is the exception class for streaming file-creation errors.

Unit

Classes

Description

EFCreateError is raised when an application unsuccessfully attempts to create a file. This can occur, for example, if a user specifies an invalid file name, or specifies the name of an existing file that cannot be overwritten because the user lacks appropriate access permission.


 VCL Reference

EFCreateError properties

EFCreateError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EFCreateError properties

EFCreateError	By object	Legend

HelpContext

Message


 VCL Reference

EFCreateError methods

EFCreateError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EFCreateError methods

EFCreateError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError

EFCreateError


EFOpenError
 VCL Reference

EFOpenError

Hierarchy	Properties	Methods	See also

EFOpenError is the exception class for file-opening errors during streaming.

Unit

Classes

Description

EFOpenError is raised when an application cannot open a specified file. This can occur, for example, because the file doesn’t exist or is not in the directory where the application is searching for it.


 VCL Reference

EFOpenError properties

EFOpenError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EFOpenError properties

EFOpenError	By object	Legend

HelpContext

Message


 VCL Reference

EFOpenError methods

EFOpenError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EFOpenError methods

EFOpenError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallExceptionTObject_SafeCallException>main


Hierarchy

TObject

Exception

EStreamError

EFOpenError


EHeapException
 VCL Reference

EHeapException

Hierarchy	Properties	Methods	See also

EHeapException is the exception class for errors related to heap-allocated memory.

Unit

SysUtils

Description

EHeapException’s descendants—EOutOfMemory and EInvalidPointer—are used to handle failed allocations of dynamic memory and invalid pointer operations.

Note:	Memory for these exceptions is preallocated whenever an application starts and remains allocated as long as the application is running. Never raise EHeapException or its descendants directly.


 VCL Reference

EHeapException properties

EHeapException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EHeapException properties

EHeapException	By object	Legend

HelpContext

Message


 VCL Reference

EHeapException methods

EHeapException	Alphabetically	Legend

In EHeapException

FreeInstance

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EHeapException methods

EHeapException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


EHeapException.FreeInstance
 VCL Reference

EHeapException::FreeInstance

EHeapException

Deallocates the memory occupied by an EHeapException instance.

procedure FreeInstance; override;

Description

FreeInstance is called internally when a Delphi application shuts down. Do not call this method directly or attempt to create or destroy instances of EHeapException.


Hierarchy

TObject

Exception

EHeapException


EIntfCastError
 VCL Reference

EIntfCastError

Hierarchy	Properties	Methods	See also

EIntfCastError is the exception class for interface casting errors.

Unit

SysUtils

Description

EIntfCastError is raised when an application tries to typecast an interface illegally using the as operator.


 VCL Reference

EIntfCastError properties

EIntfCastError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EIntfCastError properties

EIntfCastError	By object	Legend

HelpContext

Message


 VCL Reference

EIntfCastError methods

EIntfCastError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EIntfCastError methods

EIntfCastError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EIntfCastError


EIntError
 VCL Reference

EIntError

Hierarchy	Properties	Methods	See also

EIntError is the base class for integer math error exceptions.

Unit

SysUtils

Description

EIntError is a generic integer math exception. Although it is never raised in the runtime library, it is the base from which other integer math exceptions descend. These are the integer math exceptions:

Exception	Meaning

EDivByZero	An attempt was made to divide by zero

ERangeError	Number or expression out of range

EIntOverflow	Integer operation overflowed

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EIntError properties

EIntError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EIntError properties

EIntError	By object	Legend

HelpContext

Message


 VCL Reference

EIntError methods

EIntError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EIntError methods

EIntError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EIntError


EIntOverflow
 VCL Reference

EIntOverflow

Hierarchy	Properties	Methods	See also

EIntOverflow is the exception class for integer calculations whose results are too large to fit in the allocated register.

Unit

SysUtils

Description

EIntOverflow is an integer math exception that occurs when a calculated result is too large to fit in the register allocated for it and data is therefore lost.

EIntOverflow is raised only if overflow checking is turned on. To turn on overflow checking, include the $Q+ directive in project source code, or select Project|Options, choose the Compiler tab, and check the Overflow-checking option in the dialog box.

Run-time exception information is saved in fields provided by EExternal.

Floating-point register overflows raise the EOverflow exception.


 VCL Reference

EIntOverflow properties

EIntOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EIntOverflow properties

EIntOverflow	By object	Legend

HelpContext

Message


 VCL Reference

EIntOverflow methods

EIntOverflow	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EIntOverflow methods

EIntOverflow	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EIntError

EIntOverflow


EInvalidOp
 VCL Reference

EInvalidOp

Hierarchy	Properties	Methods	See also

EInvalidOp is the exception class for undefined floating-point operations.

Unit

SysUtils

Description

EInvalidOp is raised when the CPU encounters an undefined instruction, invalid operation, or floating-point stack overflow.

Run-time exception information is saved in fields provided by EExternal.

Note:	Do not confuse EInvalidOp with EInvalidOperation, the exception class for invalid component operations.


 VCL Reference

EInvalidOp properties

EInvalidOp	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidOp properties

EInvalidOp	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidOp methods

EInvalidOp	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidOp methods

EInvalidOp	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError

EInvalidOp


EInvalidCast
 VCL Reference

EInvalidCast

Hierarchy	Properties	Methods	See also

EInvalidCast is the exception class for typecasting errors.

Unit

SysUtils

Description

EInvalidCast is raised when an application tries to typecast an object illegally using the as operator. For example, the following expression generates an EInvalidTypecast exception if AnObject is of a type incompatible with TObjectType:

AnObject as TObjectType


 VCL Reference

EInvalidCast properties

EInvalidCast	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidCast properties

EInvalidCast	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidCast methods

EInvalidCast	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidCast methods

EInvalidCast	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInvalidCast


EInvalidGridOperation
 VCL Reference

EInvalidGridOperation

Hierarchy	Properties	Methods	See also

EInvalidGridOperation is the exception class for illegal grid operations.

Unit

Grids

Description

EInvalidGridOperation is raised when an application attempts an illegal operation on a grid. For example, EInvalidGridOperation is raised if an application tries to access a cell or column that does not exist within the grid.


 VCL Reference

EInvalidGridOperation properties

EInvalidGridOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidGridOperation properties

EInvalidGridOperation	By object	Legend

Message

HelpContext


 VCL Reference

EInvalidGridOperation methods

EInvalidGridOperation	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidGridOperation methods

EInvalidGridOperation	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInvalidGridOperation


EInvalidGraphicOperation
 VCL Reference

EInvalidGraphicOperation

Hierarchy	Properties	Methods	See also

EInvalidGraphicOperation is the exception class for illegal operations on graphics.

Unit

Graphics

Description

EInvalidGraphicOperation is raisedwhen an illegal operation is attempted on a graphic. For example, an EInvalidGraphicOperation exception is raised when an application attempts to resize an icon or copy an icon to the Clipboard.


 VCL Reference

EInvalidGraphicOperation properties

EInvalidGraphicOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidGraphicOperation properties

EInvalidGraphicOperation	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidGraphicOperation methods

EInvalidGraphicOperation	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidGraphicOperation methods

EInvalidGraphicOperation	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInvalidGraphicOperation


EInvalidGraphic
 VCL Reference

EInvalidGraphic

Hierarchy	Properties	Methods

EInvalidGraphic is the exception class for unrecognized graphic files.

Unit

Graphics

Description

EInvalidGraphic is raised when

An application attempts to load a file that is not a valid bitmap, icon, metafile, or user-defined graphic type into a picture.

An application attempts to load a file with an unrecognized extension.

An image does not match the format specified in a call to LoadFromClipboardFormat or SaveToClipboardFormat.


 VCL Reference

EInvalidGraphic properties

EInvalidGraphic	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidGraphic properties

EInvalidGraphic	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidGraphic methods

EInvalidGraphic	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidGraphic methods

EInvalidGraphic	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInvalidGraphic


EInvalidArgument
 VCL Reference

EInvalidArgument

Hierarchy	Properties	Methods	See also

EInvalidArgument is the exception class for out-of-range parameters in specialized math and accounting functions.

Unit

Math

Description

EInvalidArgument is raised by some functions in the Math unit (mostly financial functions) when one of the parameters is out of range or makes the calculation impossible.

As a descendant of EExternal, EInvalidArgument saves the Windows exception record (if there is one) in its ExceptionRecord data structure.


 VCL Reference

EInvalidArgument properties

EInvalidArgument	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidArgument properties

EInvalidArgument	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidArgument methods

EInvalidArgument	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidArgument methods

EInvalidArgument	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError

EInvalidArgument


EInvalidOperation
 VCL Reference

EInvalidOperation

Hierarchy	Properties	Methods	See also

EInvalidOperation is the exception class for invalid operations on a component.

Unit

Classes

Description

EInvalidOperation is raised when an application attempts an operation that requires a window handle on a component does not have a parent (Parent = nil). This exception can also occur if a drag-and-drop operation is attempted from a form (for example, Form1.BeginDrag).

Note:	Do not confuse this object with EInvalidOp.


 VCL Reference

EInvalidOperation properties

EInvalidOperation	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EInvalidOperation properties

EInvalidOperation	By object	Legend

HelpContext

Message


 VCL Reference

EInvalidOperation methods

EInvalidOperation	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EInvalidOperation methods

EInvalidOperation	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EInvalidOperation


EMathError
 VCL Reference

EMathError

Hierarchy	Properties	Methods	See also

EMathError is the base exception class for floating-point math errors.

Unit

SysUtils

Description

EMathError is the base class for floating-point math exception classes. EMathError itself is never raised.

The following exceptions descend from EMathError:

Exception	Meaning

EInvalidArgument	Parameter out of range

EInvalidOp	Processor encountered an undefined instruction

EOverflow	Floating-point operation overflowed

EUnderflow	Floating-point operation underflowed

EZeroDivide	Attempt to divide by zero

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EMathError properties

EMathError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EMathError properties

EMathError	By object	Legend

HelpContext

Message


 VCL Reference

EMathError methods

EMathError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EMathError methods

EMathError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError


EMonthCalError
 VCL Reference

EMonthCalError

Hierarchy	Properties	Methods	See also

EMonthCalError is the exception class for invalid entries in a TMonthCalendar component.

Unit

ComCtrls

Description

EMonthCalError is raised by TMonthCalendar when an invalid date is entered.


 VCL Reference

EMonthCalError properties

EMonthCalError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EMonthCalError properties

EMonthCalError	By object	Legend

HelpContext

Message


 VCL Reference

EMonthCalError methods

EMonthCalError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EMonthCalError methods

EMonthCalError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ECommonCalendarError

EMonthCalError


EMCIDeviceError
 VCL Reference

EMCIDeviceError

Hierarchy	Properties	Methods	See also

EMCIDeviceError is the exception class for devices that provide a Media Control Interface (MCI) driver.

Unit

MPlayer

Description

EMCIDeviceError is raised if an error occurs when accessing a multimedia device. The most common cause for the exception is trying to access a multimedia device before it has been opened with the TMediaPlayer.Open method.


 VCL Reference

EMCIDeviceError properties

EMCIDeviceError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EMCIDeviceError properties

EMCIDeviceError	By object	Legend

Message

HelpContext


 VCL Reference

EMCIDeviceError methods

EMCIDeviceError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelpException_CreateResHelp>main

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EMCIDeviceError methods

EMCIDeviceError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EMCIDeviceError


EOSError
 VCL Reference

 EOSError

Hierarchy	Properties	Methods	See also

EOSError is the exception class for operating system errors.

Unit

SysUtils

Description

EOSError is raised by the RaiseLastOSError procedure if the operating system returns an error code. The exception dialog contains the error number and the message associated with the error.

EOSError replaces EWin32Error, which is now deprecated.


 VCL Reference

EOSError properties

EOSError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOSError properties

EOSError	By object	Legend

HelpContext

Message


 VCL Reference

EOSError methods

EOSError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOSError methods

EOSError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EOSError


EOutlineError
 VCL Reference

EOutlineError

Hierarchy	Properties	Methods	See also

EOutlineError is the exception class for outline components.

Unit

Outline

Description

EOutlineError is raised when an error occurs as an application works with an outline component. For example, an EOutlineError exception occurs when an application

Attempts to access an outline using an invalid node index.

Attempts to expand a node whose parent isn’t expanded.

Attempts to load items from a file using an invalid file extension.

Note

EOutlineError is raised by the TOutline component, which is maintained for compatibility with older versions of Delphi only.


 VCL Reference

EOutlineError properties

EOutlineError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOutlineError properties

EOutlineError	By object	Legend

HelpContext

Message


 VCL Reference

EOutlineError methods

EOutlineError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOutlineError methods

EOutlineError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EOutlineError


EOutOfMemory
 VCL Reference

EOutOfMemory

Hierarchy	Properties	Methods	See also

EOutOfMemory is the exception class for unsuccessful attempts to allocate memory.

Unit

SysUtils

Description

EOutOfMemory occurs when an application attempts to allocate dynamic memory, but there is not enough free memory in the system to meet the request.

Memory for the EOutOfMemory exception is preallocated whenever an application starts and remains allocated as long as the application is running.

Note:	Never raise EOutOfMemory directly. Instead, call the global OutOfMemoryError procedure.


 VCL Reference

EOutOfMemory properties

EOutOfMemory	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOutOfMemory properties

EOutOfMemory	By object	Legend

HelpContext

Message


 VCL Reference

EOutOfMemory methods

EOutOfMemory	Alphabetically	Legend

Derived from EHeapException

FreeInstance

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOutOfMemory methods

EOutOfMemory	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EHeapException

EOutOfMemory


EOutOfResources
 VCL Reference

EOutOfResources

Hierarchy	Properties	Methods	See also

EOutOfResources is the exception class for unsuccessful attempts to allocate Windows handles.

Unit

Classes

Description

EOutOfResources is raised when an application attempts to create a Windows handle and there are no more handles to allocate.


 VCL Reference

EOutOfResources properties

EOutOfResources	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOutOfResources properties

EOutOfResources	By object	Legend

HelpContext

Message


 VCL Reference

EOutOfResources methods

EOutOfResources	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOutOfResources methods

EOutOfResources	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EHeapException

EOutOfMemory

EOutOfResources


EOverflow
 VCL Reference

EOverflow

Hierarchy	Properties	Methods	See also

EOverflow is the exception class for floating-point register overflows.

Unit

SysUtils

Description

EOverflow is raised when a calculated result is too large to fit in the floating-point register allocated for it and data is therefore lost.

Run-time exception information is saved in fields provided by EExternal.

Note:	Integer register overflows raise the EIntOverflow exception.


 VCL Reference

EOverflow properties

EOverflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EOverflow properties

EOverflow	By object	Legend

HelpContext

Message


 VCL Reference

EOverflow methods

EOverflow	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EOverflow methods

EOverflow	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError

EOverflow


EParserError
 VCL Reference

EParserError

Hierarchy	Properties	Methods	See also

EParserError is the exception class for text-to-binary streaming conversion errors.

Unit

Classes

Description

EParserError is raised when an error occurs during text-to-binary conversion, usually due to a syntax error in the source text.


 VCL Reference

EParserError properties

EParserError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EParserError properties

EParserError	By object	Legend

HelpContext

Message


 VCL Reference

EParserError methods

EParserError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EParserError methods

EParserError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EParserError


EPackageError
 VCL Reference

EPackageError

Hierarchy	Properties	Methods

EPackageError is the exception class for package-related errors.

Unit

SysUtils

Description

EPackageError is raised at design time only, when an error occurs loading or utilizing a package.


 VCL Reference

EPackageError properties

EPackageError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPackageError properties

EPackageError	By object	Legend

HelpContext

Message


 VCL Reference

EPackageError methods

EPackageError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPackageError methods

EPackageError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPackageError


EPrinter
 VCL Reference

EPrinter

Hierarchy	Properties	Methods

EPrinter is the exception class for printing errors.

Unit

Printers

Description

EPrinter is raised when a printing error occurs. For example, if an application attempts to use a printer that doesn’t exist, or if a job can’t be sent to the printer for some other reason, an EPrinter exception is raised.


 VCL Reference

EPrinter properties

EPrinter	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPrinter properties

EPrinter	By object	Legend

HelpContext

Message


 VCL Reference

EPrinter methods

EPrinter	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPrinter methods

EPrinter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EPrinter


EPrivilege
 VCL Reference

EPrivilege

Hierarchy	Properties	Methods	See also

EPrivilege is the exception class for processor privilege violations.

Unit

SysUtils

Description

EPrivilege is raised when an application tries to execute a processor instruction that is invalid for the current processor privilege level.

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EPrivilege properties

EPrivilege	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EPrivilege properties

EPrivilege	By object	Legend

HelpContext

Message


 VCL Reference

EPrivilege methods

EPrivilege	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EPrivilege methods

EPrivilege	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EPrivilege


EResNotFound
 VCL Reference

EResNotFound

Hierarchy	Properties	Methods	See also

EResNotFound is the exception class for unlocatable resources.

Unit

Classes

Description

EResNotFound is raised when Delphi cannot find a specified resource (such as a form, bitmap, or icon) in a .dfm or .RES file, or when the resource is not linked into the application.

If you receive this exception on startup of an application, or when you create a form, check the form’s .PAS file for the {$R *.DFM} compiler directive. If this directive is missing or commented out, the .DFM file will not be included in the executable and an EResNotFound exception will be generated.


 VCL Reference

EResNotFound properties

EResNotFound	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EResNotFound properties

EResNotFound	By object	Legend

HelpContext

Message


 VCL Reference

EResNotFound methods

EResNotFound	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EResNotFound methods

EResNotFound	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EResNotFound


ESafecallException
 VCL Reference

ESafecallException

Hierarchy	Properties	Methods	See also

ESafecallException is the exception for problems with the safecall calling convention.

Unit

SysUtils

Description

ESafecallException is raised when the safecall error handler has not been set up and a safecall routine returns a non-0 HResult, or if the safecall error handler does not raise an exception.

If this exception occurs, the Comobj unit is probably missing from the application’s uses list. You may want to consider removing the safecall calling convention from the routine that gave rise to the exception.


 VCL Reference

ESafecallException properties

ESafecallException	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ESafecallException properties

ESafecallException	By object	Legend

HelpContext

Message


 VCL Reference

ESafecallException methods

ESafecallException	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ESafecallException methods

ESafecallException	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ESafecallException


EStreamError
 VCL Reference

EStreamError

Hierarchy	Properties	Methods	See also

EStreamError is the exception class for streaming errors.

Unit

Classes

Description

EStreamError is the ancestor from which all streaming exception classes descend. EStreamError is itself raised when resources cannot be allocated for a memory stream.


 VCL Reference

EStreamError properties

EStreamError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EStreamError properties

EStreamError	By object	Legend

HelpContext

Message


 VCL Reference

EStreamError methods

EStreamError	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EStreamError methods

EStreamError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EStreamError


EThread
 VCL Reference

EThread

Hierarchy	Properties	Methods	See also

EThread is the exception class for thread synchronization errors.

Unit

Classes

Description

EThread is never raised. It is defined for backward compatibility.


 VCL Reference

EThread properties

EThread	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EThread properties

EThread	By object	Legend

HelpContext

Message


 VCL Reference

EThread methods

EThread	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EThread methods

EThread	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EThread


ETreeViewError
 VCL Reference

ETreeViewError

Hierarchy	Properties	Methods	See also

ETreeViewError is the exception class for tree view errors.

Unit

ComCtrls

Description

ETreeViewError is raised when an error is made in a TCustomTreeView or TTreeNode object.


 VCL Reference

ETreeViewError properties

ETreeViewError	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

ETreeViewError properties

ETreeViewError	By object	Legend

HelpContext

Message


 VCL Reference

ETreeViewError methods

ETreeViewError	By Object	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

ETreeViewError methods

ETreeViewError	By Object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

ETreeViewError


EUnderflow
 VCL Reference

EUnderflow

Hierarchy	Properties	Methods	See also

EUnderflow is the exception class for values that are too small to be represented with a floating-point variable.

Unit

SysUtils

Description

When a floating-point math operation produces a value that is too small to be represented in a floating-point variable, the result ordinarily becomes zero. However, an application can change the numeric coprocessor's control word to unmask underflow hardware exceptions. In this case, EUnderflow is raised when the coprocessor reports an underflow hardware exception. The control word is reset after the exception.

Run-time exception information is saved in fields provided by EExternal.


 VCL Reference

EUnderflow properties

EUnderflow	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EUnderflow properties

EUnderflow	By object	Legend

HelpContext

Message


 VCL Reference

EUnderflow methods

EUnderflow	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EUnderflow methods

EUnderflow	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError


 VCL Reference


Exception
 VCL Reference

Exception

Hierarchy	Properties	Methods

Exception is the base class for all runtime exceptions.

Unit

SysUtils

Description

Exception encapsulates the fundamental properties and methods for all exceptions. Use Exception as the base class for creating custom exceptions.

All methods introduced for the Exception object are constructors that provide alternative ways to create exception messages. Some constructors also create help context IDs. Typically, an application calls these constructors dynamically when an exception occurs.

Exception messages can be hard-coded strings, formatted strings, or strings (including formatted strings ) loaded from an application resource.

Exceptions are raised when a runtime error occurs in an application, such as attempting to divide by zero. When an exception is raised, typically an exception instance displays a dialog box describing the error condition. If an application does not handle the exception condition, then the default exception handler is called. This handler also displays a dialog box with an OK button that usually permits an application to continue processing when the user clicks OK.

The Exception object provides a consistent interface for error conditions, and enables applications to handle error conditions in a graceful manner. Applications can

Trap for and handle specific exceptions in try...except blocks.

Protect code that allocates resources from exception conditions by embedding the code in try...finally blocks.

Raise exceptions or custom exceptions in response to program conditions.

Note:	Standard practice is to name all derived exceptions beginning with “E”, followed by an abbreviated, descriptive name.


 VCL Reference

Exception properties

Exception	Alphabetically	Legend

In Exception

HelpContext

Message


 VCL Reference

Exception properties

Exception	By object	Legend

HelpContext

Message


Exception.HelpContext
 VCL Reference

Exception.HelpContext

Exception	See also

Indicates the context ID number for context-sensitive online help associated with the exception.

type THelpContext = -MaxLongint..MaxLongint;

property HelpContext: THelpContext;

Description

HelpContext provides storage for the help context ID number associated with the exception object. The context ID number determines the contents of the help screen that appears when a user presses F1 in response to an exception error message.

Note

Not all Exception constructors provide a value for HelpContext. To provide a help context for custom exceptions, use the constructors listed in the See also list.


Exception.Message
 VCL Reference

Exception.Message

Exception	See also

Message contains the text string to display in the exception dialog box when the exception is raised.

property Message: string

Description

Message stores the error-message string to display when the exception is raised. All Exception constructors expect a string parameter to store in Message. Message text can be hard-coded as a parameter to an Exception constructor, created as dynamic parameter, or loaded from a resource file as a static or dynamically formatted parameter.


 VCL Reference

Exception methods

Exception	Alphabetically	Legend

In Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

Exception methods

Exception	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Exception.Create
 VCL Reference

Exception.Create

Exception	See also	Example

Instantiates an instance of an exception with a simple message string.

constructor Create (const Msg: string);

Description

Call Create to construct an exception with a simple message string.

Msg is the string containing the runtime error message to display in the exception dialog box. Msg can be a hard-coded string, or can be a function call that returns a string.


Exception.CreateFmt
 VCL Reference

Exception.CreateFmt

Exception	See also

Instantiates an instance of an exception with a formatted message string.

constructor CreateFmt (const Msg: string; const Args: array of const)

Description

Call CreateFmt to construct an exception with a formatted message string. Msg is a string constant containing format specifiers to be replaced with values from Args. Args is an array of constants containing values to format according to format specifiers in Msg, and insert into Msg. CreateFmt calls the Format function to transform Msg with the values in Arg.


Exception.CreateFmtHelp
 VCL Reference

Exception.CreateFmtHelp

Exception	See also

Instantiates an instance of an exception with a formatted message string and a help-context ID.

constructor CreateFmtHelp (const Msg: string; const Args: arrayofconst; AHelpContext: Integer);

Description

Call CreateFmtHelp to construct an exception with a formatted message string and a help context ID. Msg is a string constant containing format specifiers to be replaced with values from Args. Args is an array of constants containing values to format according to format specifiers in Msg, and insert into Msg. CreateFmt calls the Format function to transform Msg with the values in Arg.

AHelpContext is an integer that specifies the context-sensitive help ID for the exception.


Exception.CreateHelp
 VCL Reference

Exception.CreateHelp

Exception	See also

Creates an instance of an exception with a simple message string and a help- context ID.

constructor CreateHelp (const Msg: string; AHelpContext: Integer);

Description

Call CreateHelp to construct an exception with a simple message string and a help-context ID. Msg is the string containing the runtime error message to display in the exception dialog box. Msg can be a hard-coded string, or can be a function call that returns a string.

AHelpContext is an integer that specifies the context-sensitive help ID for the exception.


Exception.CreateRes
 VCL Reference

Exception.CreateRes

Exception	See also

Creates an instance of an exception with a simple message string that is loaded from the application’s resources.

constructor CreateRes (Ident: Integer); overload;

constructor CreateRes(ResStringRec: PResStringRec); overload;

Description

Call CreateRes to construct an exception with a simple message string loaded from an application’s resources. Resources are bound into the application executable at compile time, but at design time they exist in a separate RES file.

Ident is the unique ID of the resource as specified in the RES file. If Ident is not a valid resource ID, CreateRes creates an empty message string for the exception.

ResStringRec is a pointer to a resource string. This syntax appears as follows:

resourcestring sMyNewErrorMessage = 'You shouldn''t have done that';

...

Exception.Create(@sMyNewErrorMessage);


Exception.CreateResFmt
 VCL Reference

Exception.CreateResFmt

Exception	See also

Creates an instance of an exception with a message string that is loaded from the application’s resources and then formatted.

constructor CreateResFmt(Ident: Integer; const Args: arrayofconst); overload;

constructor CreateResFmt(ResStringRec: PResStringRec; const Args: arrayofconst); overload;

Description

Call CreateResFmt to construct an exception with a message string loaded from an application’s resources and then formatted with additional information. Resources are bound into the application executable at compile time, but at design time they exist in a separate RES file.

Ident is the unique ID of the resource as specified in the RES file. If Ident is not a valid resource ID, CreateResFmt creates an empty message string for the exception.

ResStringRec is a pointer to a resource string. This syntax appears as follows:

resourcestring sMyNewErrorMessage = 'Illegal value: %s';

...

Exception.CreateResFmt(@sMyNewErrorMessage, [-1]);

Args is an array of constants containing values to:

1	Format according to format specifiers embedded in the string, and

2	Insert into the message string.

CreateResFmt calls the Format function to transform the message string with the values in Arg.


Exception.CreateResFmtHelp
 VCL Reference

Exception.CreateResFmtHelp

Exception	See also

Creates an instance of an exception with a help-context ID and a formatted message string loaded from the application resources

constructor CreateResFmtHelp(Ident: Integer; const Args: arrayofconst; AHelpContext: Integer); overload;

constructor CreateResFmtHelp(ResStringRec: PResStringRec; const Args: arrayofconst; AHelpContext: Integer); overload;

Description

Call CreateResFmtHelp to construct an exception with a:

1	Message string loaded from an application’s resources and formatted with additional information.

2	Help-context ID.

Resources are bound into the application executable at compile time, but at design time they exist in a separate RES file. Ident is the unique ID of the resource as specified in the RES file. If Ident is not a valid resource ID, CreateResFmt creates an empty message string.

ResStringRec is a pointer to a resource string. This syntax appears as follows:

resourcestring sMyNewErrorMessage = 'Illegal value: %s';

const IDH_MYNEWERROR: Integer = 30000;

...

Exception.CreateResFmt(@sMyNewErrorMessage, [-1], IDH_MYNEWERROR);

Args is an array of constants containing values to:

1	Format according to format specifiers embedded in the string, and

2	Insert into the message string.

CreateResFmtHelp calls the Format function to transform the message string with the values in Arg.

AHelpContext is an integer that specifies the context-sensitive help ID for the exception.


Exception.CreateResHelp
 VCL Reference

Exception.CreateResHelp

Exception	See also

Creates an instance of an exception with a help-context ID and a simple message string that is loaded from the application’s resources.

constructor CreateResHelp(Ident: Integer; AHelpContext: Integer); overload;

constructor CreateResHelp(ResStringRec: PResStringRec; AHelpContext: Integer); overload;

Description

Call CreateResHelp to construct an exception with a help-context ID and a simple message string loaded from an application’s resources. Resources are bound into the application executable at compile time, but at design time they exist in a separate RES file.

Ident is the unique ID of the resource as specified in the RES file. If Ident is not a valid resource ID, CreateResHelp creates an empty message string for the exception.

AHelpContext is an integer that specifies the context-sensitive help ID for the exception.

ResStringRec is a pointer to a resource string. Its syntax appears as follows:

resourcestring sMyNewErrorMessage = 'You shouldn''t have done that';

const IDH_MYNEWERROR: Integer = 30000;

...

Exception.Create(@sMyNewErrorMessage, IDH_MYNEWERROR);


Hierarchy

TObject

Exception


EZeroDivide
 VCL Reference

EZeroDivide

Hierarchy	Properties	Methods	See also

EZeroDivide is the exception class for floating-point divide-by-zero errors.

Unit

SysUtils

Description

EZeroDivide exception is raised when an application attempts to divide a floating-point value by zero.

Run-time exception information is saved in fields provided by EExternal.

Note

Integer divide-by-zero errors raise the EDivByZero exception.


 VCL Reference

EZeroDivide properties

EZeroDivide	Alphabetically	Legend

Derived from Exception

HelpContext

Message


 VCL Reference

EZeroDivide properties

EZeroDivide	By object	Legend

HelpContext

Message


 VCL Reference

EZeroDivide methods

EZeroDivide	Alphabetically	Legend

Derived from Exception

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

EZeroDivide methods

EZeroDivide	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

CreateFmt

CreateFmtHelp

CreateHelp

CreateRes

CreateResFmt

CreateResFmtHelp

CreateResHelp

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

Exception

EExternal

EMathError


 VCL Reference


TFileAction
 VCL Reference

TFileAction

Hierarchy	Properties	Methods	Events	Using TFileAction	See also

TFileAction is the base class for action objects that display a file selection dialog.

Unit

StdActns

Description

TFileAction implements the FileName property that is common to action objects that display a file selection object.


 VCL Reference

TFileAction properties

TFileAction	Alphabetically	Legend

In TFileAction

FileName

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileAction properties

TFileAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

ExecuteResult

FileName

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFileAction.FileName
 VCL Reference

TFileAction.FileName

TFileAction 	See also

Specifies the file name for the file selection dialog.

property FileName: TFileName;

Description

Applications can’t use the protected FileName property. To access the name of the file selected by the user, use the Dialog property of a TFileAction descendant.

FileName is the same as the FileName property of the associated dialog.


 VCL Reference

TFileAction events

TFileAction	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileAction events

TFileAction	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileAction methods

TFileAction	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileAction methods

TFileAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TCommonDialogAction

TFileAction


TFileExit
 VCL Reference

TFileExit

Hierarchy	Properties	Methods	Events	Using TFileExit	See also

TFileExit is the standard action for shutting down an application.

Unit

StdActns

Description

Add TFileExit to an action list to let users shut down the application using a menu or tool bar. Controls linked to this action cause the application to shut down by closing the main form.


 VCL Reference

TFileExit properties

TFileExit	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileExit properties

TFileExit	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TFileExit events

TFileExit	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileExit events

TFileExit	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileExit methods

TFileExit	Alphabetically	Legend

In TFileExit

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileExit methods

TFileExit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TFileExit.ExecuteTarget
 VCL Reference

TFileExit.ExecuteTarget

TFileExit 	See also

Shuts down the main form of the application.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget ignores the Target parameter and calls the Close method of the application’s main form. This causes the application to shut down.


TFileExit.HandlesTarget
 VCL Reference

TFileExit.HandlesTarget

TFileExit

Indicates whether the action can execute.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget always returns True, because shutting down the application does not depend on any target object.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TFileExit


TFileListBox
 VCL Reference

 TFileListBox

Hierarchy	Properties	Methods	Events	See also

TFileListBox is a specialized list box that lists all the files in a specified directory.

Unit

FileCtrl

Description

Add TFileListBox to a form to allow users to select a file. Use TFileListBox along with TDriveComboBox, TFilterComboBox, and TDirectoryListBox to add full file selection capabilities to a form.

Note:	To add a standard Windows file open or save dialog to an application, use TOpenDialog or TSaveDialog instead.


 VCL Reference

TFileListBox properties

TFileListBox	Alphabetically	Legend

In TFileListBox

Directory

Drive

FileEdit

FileName

FileType

Mask

ShowGlyphs

Derived from TCustomListBox

AutoComplete

Canvas

Count

ExtendedSelect

IntegralHeight

ItemHeight

ItemIndex

Items

MultiSelect

ScrollWidth

SelCount

Selected

TopIndex

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileListBox properties

TFileListBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Ctl3D

Cursor

DesignInfo

Directory

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Drive

Enabled

ExtendedSelect

FileEdit

FileName

FileType

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IntegralHeight

ItemHeight

ItemIndex

Items

Left

LRDockWidth

Mask

MultiSelect

Name

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ScrollWidth

SelCount

Selected

ShowGlyphs

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TFileListBox.Directory
 VCL Reference

TFileListBox.Directory

TFileListBox	See also 	Example

Specifies the directory that contains all the files listed in the file list box.

property Directory: string;

Description

Set Directory to update the file list box so that it displays the files in a new directory. If the form includes a TDirectoryListBox object, set the FileList property of the directory list box to have the Directory property updated automatically when the user selects a new directory.


TFileListBox.Drive
 VCL Reference

TFileListBox.Drive

TFileListBox	See also 	Example

Specifies the drive which contains the files listed in the list box.

property Drive: Char;

Description

Set the value of Drive to the drive that contains the files that the list box should display. When the value of Drive changes, the Directory value also changes to the current directory on the specified drive.

If the form includes a TDirectoryListBox object, set the FileList property of the directory list box to have the Drive property updated automatically when the Drive property of the directory list box changes.


TFileListBox.FileEdit
 VCL Reference

TFileListBox.FileEdit

TFileListBox	See also 	Example

Links the directory list box to an edit control that displays the currently selected file.

property FileEdit: TEdit;

Description

Set FileEdit to an edit control that displays the selected file from the file list box, as is commonly done in Open and Save dialog boxes. If no file is selected in the file list box, the text of the edit control is the current value of the file list box’s Mask property.

Note:	If the user changes the text of the edit control, the results are not automatically reflected in the file list box. Use the ApplyFilePath method to update the file list box when the edit control’s text changes.


TFileListBox.FileName
 VCL Reference

TFileListBox.FileName

TFileListBox	See also

Indicates the name of the selected file in the list box, including the path name.

property FileName: string;

Description

Set FileName to initialize the file list box to a particular file. Read FileName to obtain the name of the file the user selected.

If the FileEdit property is set, the linked edit control displays the value of FileName whenever the FileName property changes.


TFileListBox.FileType
 VCL Reference

TFileListBox.FileType

TFileListBox	See also

Determines which files are displayed in the file list box based on the attributes of the files.

type

  TFileAttr = (ftReadOnly, ftHidden, ftSystem, ftVolumeID, ftDirectory, ftArchive, ftNormal);

  TFileType = set of TFileAttr;

property FileType: TFileType;

Description

Set FileType to the type of files the list box should display. FileType can specify more than one type of file. For example, if the value of FileType is a set containing the values ftReadOnly and ftHidden, files that have either the read-only or the hidden attributes are displayed in the list box. These are the values that can occur in the FileType property:

Value	Meaning

ftReadOnly	The list box displays files with the read-only attribute.

ftHidden	The list box displays files with the hidden attribute.

ftSystem	The list box displays system files.

ftVolumeID	The list box displays the volume name.

ftDirectory	The list box displays directories.

ftArchive	The list box displays files with archive attribute.

ftNormal	The list box displays files with no special attributes.

To set the FileType property using the Object Inspector, click the FileType property to see the attribute values. Then set each value to True or False to specify whether it is included in the FileType set.

Note:	The files that are listed can also be limited by the form of their names. To restrict the files to particular names, use the Mask property or include a TFilterComboBox on the form.


TFileListBox.Mask
 VCL Reference

TFileListBox.Mask

TFileListBox	See also 	Example

Limits which files are displayed in the file list box.

property Mask: string;

Description

Set Mask to a regular expression to limit the list box to files that match the mask. The value of the mask is a file name that may include wildcards. The asterisk (*) is a wildcard which matches any number of arbitrary characters. The question mark (?) is a wildcard which matches a single arbitrary character. The file mask *.* displays all files, which is the default value.

To specify multiple file masks, separate the file mask specifications with semicolons. For example, *.PAS; *.EXE.

If the form includes a TFilterComboBox object, set the FileList property of the filter combo box to have the Mask property updated automatically when the Mask property of the filter combo box changes.


TFileListBox.ShowGlyphs
 VCL Reference

TFileListBox.ShowGlyphs

TFileListBox

Determines whether glyphs (bitmaps) appear next to the file names listed in the file list box.

property ShowGlyphs: Boolean;

Description

Set ShowGlyphs to True to display icons next to the files in the list that indicate the file type. Set ShowGlyphs to False to list only the file names.


 VCL Reference

TFileListBox events

TFileListBox	Alphabetically	Legend

In TFileListBox

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 VCL Reference

TFileListBox events

TFileListBox	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


TFileListBox.OnChange
 VCL Reference

TFileListBox.OnChange

TFileListBox	See also

Occurs immediately after the user changes the selected file in the list.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action when the FileName property changes. If the FileEdit property has been set, the edit control is updated before the OnChange event.


 VCL Reference

TFileListBox methods

TFileListBox	Alphabetically	Legend

In TFileListBox

ApplyFilePath

Create

Destroy

Update

Derived from TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

DeleteSelected

SelectAll

ItemAtPos

ItemRect

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileListBox methods

TFileListBox	By object	Legend

AddItem

AfterConstruction

ApplyFilePath

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TFileListBox.ApplyFilePath
 VCL Reference

TFileListBox.ApplyFilePath

TFileListBox	See also 	Example

Updates the file list box to represent a fully qualified file name.

procedure ApplyFilePath(const EditText: string);

Description

Call ApplyFilePath to change the Directory, Drive, FileName, and Mask properties so that they match the values implied by the EditText parameter. For example, if an edit control is linked to the file list box using the FileEdit property, call ApplyFilePath from the OnChange event handler of the edit control to update the file list box whenever the user types a value in the edit control.

ApplyFilePath updates the Mask property only if the EditText parameter includes wildcards. If the form contains a TDirectoryListBox object that specifies this file list box object in its FileList property, the Directory and Drive properties of the directory list box object are updated as well. If the form also includes a TDriveComboBox object that specifies the directory list box in its DirList property, the Drive property of the drive combo box will also be updated. However, the Mask property of any TFilterComboBox will not be updated.


TFileListBox.Create
 VCL Reference

TFileListBox.Create

TFileListBox	See also

Creates an instance of TFileListBox.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a TFileListBox object at runtime. File list boxes placed on a form at design time are created automatically.

After allocating the memory for the list box, Create

Initializes the Mask property to *.*.

Initializes the FileType property to [ftNormal].

Initializes the Drive and Directory properties to the current directory and fills the list box with all the files in the directory.

Initializes the MultiSelect property to False.

Initializes the Sorted property to True.

Initializes the Width property to 145.


TFileListBox.Destroy
 VCL Reference

TFileListBox.Destroy

TFileListBox	See also

Destroys an instance of TFileListBox.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free checks that the file list box reference is not nil, and only then calls Destroy.


TFileListBox.Update
 VCL Reference

TFileListBox.Update

TFileListBox	See also

Refreshes the directory list for the file list box.

procedure Update; reintroduce;

Description

Call Update whenever the files listed by the file list box may be out of date. For example, if an application creates, renames, or deletes files, calling Update will ensure that those changes are reflected in the file list box.

The list box is updated automatically when the Drive, Directory, FileType, or Mask property is changed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomMultiSelectListControl

TCustomListBox

TFileListBox


TFileOpen
 VCL Reference

TFileOpen

Hierarchy	Properties	Methods	Events	Using TFileOpen	See also

TFileOpen is the standard action for displaying a file open dialog.

Unit

StdActns

Description

Add TFileOpen to an action list to add a common file open dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display a file open dialog when invoked. Use the OnAccept event to respond after the user selects a file name in the file open dialog or the OnCancel event to respond when the user cancels from the dialog. In the event handler for these events, you can read the file name from the dialog specified by the Dialog property.


 VCL Reference

TFileOpen properties

TFileOpen	Alphabetically	Legend

In TFileOpen

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFileOpen properties

TFileOpen	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFileOpen.Dialog
 VCL Reference

TFileOpen.Dialog

TFileOpen 	See also

Provides access the open dialog that the action executes.

property Dialog: TOpenDialog;

Description

Use Dialog to configure the open dialog before the action fires. For example, you can set the open dialog’s default extension or initially selected file at design time using the Object Inspector. From an OnAccept event handler, use Dialog to read the selected file name.

When using a file open action, you do not place a TOpenDialog component on the form or data module at design time. Instead, you add the TFileOpen action to your action list and then use the Dialog property. The open dialog component is created by the TFileOpen constructor.


 VCL Reference

TFileOpen events

TFileOpen	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFileOpen events

TFileOpen	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFileOpen methods

TFileOpen	Alphabetically	Legend

In TFileOpen

Create

Derived from TCommonDialogAction

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFileOpen methods

TFileOpen	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TFileOpen.Create
 VCL Reference

TFileOpen.Create

TFileOpen	See also

Creates an instance of TFileOpen.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TFileOpen constructor because actions are added at design time to an action manager or action list.

The TFileOpen constructor creates an instance of its associated dialog and assigns that component as the value of the Dialog property.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TFileOpen instance.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TFileAction

TFileOpen


TFontDialog
 VCL Reference

 TFontDialog

Hierarchy	Properties	Methods	Events

TFontDialog displays a font-selection dialog.

Unit

Dialogs

Description

TFontDialog displays a modal Windows dialog box for selecting fonts. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user selects a font and clicks OK, the dialog closes and the selected font is stored in the Font property.


 VCL Reference

TFontDialog properties

TFontDialog	Alphabetically	Legend

In TFontDialog

Device

Font

MaxFontSize

MinFontSize

Options

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TFontDialog properties

TFontDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DesignInfo

Device

Font

Handle

HelpContext

MaxFontSize

MinFontSize

Name

Options

Owner

Tag

VCLComObject


TFontDialog:Device
 VCL Reference

TFontDialog::.Device

TFontDialog

Specifies the device from which to retrieve the list of available fonts.

type TFontDialogDevice = (fdScreen, fdPrinter, fdBoth);

property Device: TFontDialogDevice;

Description

These are the possible values of Device:

Value	Meaning

fdScreen	Retrieve from the screen.

fdPrinter	Retrieve from the printer.

fdBoth	Retrieve from both the screen and the printer.


TFontDialog.Font
 VCL Reference

TFontDialog.Font

TFontDialog	See also	Example

Indicates the selected font.

property Font: TFont;

Description

When the user selects a font in the dialog box and clicks OK, the selected font becomes the value of the Font property. To make a default font appear in the dialog when it opens, assign a value to Font in the Object Inspector or in program code.

FontDialog1.Font := Form1.Font;

if FontDialog1.Execute then

  for i := 0 to (Form1.ControlCount - 1) do

    if (Form1.Controls[i] is TButton) then

      (Form1.Controls[i] as TButton).Font :=

        FontDialog1.Font


TFontDialog:MaxFontSize
 VCL Reference

TFontDialog.MaxFontSize

TFontDialog	See also 	Example

Determines the largest font size available in the Font dialog.

property MaxFontSize: Integer;

Description

Assign a value to MaxFontSize to limit the font sizes available in the dialog.

MaxFontSize is inoperative unless the fdLimitSize flag is set in Options.


TFontDialog:MinFontSize
 VCL Reference

TFontDialog.MinFontSize

TFontDialog	See also 	Example

Determines the smallest font size available in the Font dialog.

property MinFontSize: Integer;

Description

Assign a value to MinFontSize to limit the font sizes available in the dialog.

MinFontSize is inoperative unless the fdLimitSize flag is set in Options.


TFontDialog:Options
 VCL Reference

TFontDialog.Options

TFontDialog	See also 	Example

Determines the appearance and behavior of the Font dialog.

type

  TFontDialogOption = (fdAnsiOnly, fdTrueTypeOnly, fdEffects, fdFixedPitchOnly, fdForceFontExist, fdNoFaceSel, fdNoOEMFonts, fdNoSimulations, fdNoSizeSel, fdNoStyleSel, fdNoVectorFonts, fdShowHelp, fdWysiwyg, fdLimitSize, fdScalableOnly, fdApplyButton);

  TFontDialogOptions = set of TFontDialogOption;

property Options: TFontDialogOptions;

Description

Use the Options property to customize the appearance and functionality of the dialog. The possible values of Options are:

Value	Meaning

fdAnsiOnly	Displays only fonts that use the Windows character set. Symbol fonts are not listed in the dialog.

fdApplyButton	Displays an Apply button in the dialog, whether or not there is an OnApply event handler.

fdEffects	Displays the Effects check boxes (Strikeout and Underline) and the Color list box in the dialog.

fdFixedPitchOnly	Displays only monospaced fonts in the dialog. Proportionally spaced fonts are not listed, nor are TrueType fonts that do not have the fixed-pitch flag set in the style header.

fdForceFontExist	Allows the user to enter only fonts that are displayed in the dialog (that is, listed in the Font combo box). If the user tries to enter another font name, an error message appears.

fdLimitSize	Enables the MaxFontSize and MinFontSize properties, limiting the range of font sizes that appear in the dialog if these properties have values.

fdNoFaceSel	Causes the dialog to open without a preselected font name in the Font combo box.

fdNoOEMFonts	Removes OEM fonts from the dialog’s combo box. Lists only non-OEM fonts.

fdScalableOnly	Displays only scalable fonts in the dialog. Non-scalable (bitmap) fonts are removed from the list.

fdNoSimulations	Displays only fonts and font styles that are directly supported by the font definition file. GDI-synthesized bold and italic styles (for bitmap fonts) are not listed.

fdNoSizeSel	Causes the dialog to open without a preselected size in the Size combo box.

fdNoStyleSel	Causes the dialog to open without a preselected style in the Font Style combo box.

fdNoVectorFonts	Removes vector fonts from the dialog’s combo box; lists only non-vector fonts. (Vector fonts are Windows 1.0 fonts, such as Roman or Script, which resemble pen-plotter output.)

fdShowHelp	Displays a Help button in the dialog.

fdTrueTypeOnly	Displays only TrueType fonts in the dialog. Other fonts are not listed.

fdWysiwyg	Displays only fonts that are available to both the printer and the screen. Device-specific fonts are not listed in the dialog.

By default, all options except fdEffects are off.


 VCL Reference

TFontDialog events

TFontDialog	Alphabetically	Legend

In TFontDialog

OnApply

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TFontDialog events

TFontDialog	By object	Legend

OnApply

OnClose

OnShow


TFontDialog:OnApply
 VCL Reference

TFontDialog.OnApply

TFontDialog	See also 	Example

Occurs when the user clicks the Apply button.

type TFDApplyEvent = procedure(Sender: TObject; Wnd: HWND) of object;

property OnApply: TFDApplyEvent;

Description

The Apply button appears in the dialog if an event handler is assigned to OnApply or if the fdApplyButton flag is set in Options. Use an OnApply event handler to apply the selected font without closing the Font dialog box.

The Wnd parameter is the Font dialog’s window handle. Wnd has the same value as the Handle property and is maintained for backward compatibility.


 VCL Reference

TFontDialog methods

TFontDialog	Alphabetically	Legend

In TFontDialog

Create

Destroy

Execute

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance


 VCL Reference

TFontDialog methods

TFontDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TFontDialog.Create
 VCL Reference

TFontDialog.Create

TFontDialog 	See also

Creates and initializes a TFontDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TFontDialog instance, but the new dialog does not appear on the form at runtime until the Execute method is called.

After calling the inherited constructor, Create performs the following action:

Initializes a TFont object for its Font property.


TFontDialog.Create
 VCL Reference

TFontDialog.Destroy

TFontDialog	See also

Destroys the TFontDialog and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the TFontDialog reference is not nil before calling Destroy.

As the dialog is destroyed, it:

Frees the TFont object in its Font property.


TFontDialog:Execute
 VCL Reference

TFontDialog.Execute

TFontDialog 	Example

Displays the Font dialog.

function Execute: Boolean; override;

Description

Execute opens the Font dialog, returning true when the user selects a font and clicks OK.

FontDialog1.Font := Form1.Font;

if FontDialog1.Execute then

  for i := 0 to (Form1.ControlCount - 1) do

    if (Form1.Controls[i] is TButton) then

      (Form1.Controls[i] as TButton).Font :=

        FontDialog1.Font


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TFontDialog


TFontEdit
 VCL Reference

TFontEdit

Hierarchy	Properties	Methods	Events	Using TFontEdit	See also

TFontEdit is the standard action for displaying a font selection dialog.

Unit

StdActns

Description

Add TFontEdit to an action list to add a modal font selection dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display a font dialog when invoked. Use the OnAccept event to respond after the user selects a font in the dialog or the OnCancel event to respond when the user cancels from the dialog. In the event handler, you can read the selected font from the dialog specified by the Dialog property.


 VCL Reference

TFontEdit properties

TFontEdit	Alphabetically	Legend

In TFontEdit

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFontEdit properties

TFontEdit	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFontEdit.Dialog
 VCL Reference

TFontEdit.Dialog

TFontEdit 	See also

Provides access the font selection dialog that the action executes.

property Dialog: TFontDialog;

Description

Use Dialog to configure the font selection dialog before the action fires or to read the selected font after the action executes the dialog. For example, you can set the font dialog’s target device or limit the available font sizes at design time using the Object Inspector or read the Font property in an OnAccept event handler to make use of the font that the user selects.

When using a font edit action, you do not place a TFontDialog component on the form or data module at design time. Instead, you add the TFontEdit to your action list and then use the Dialog property. The font selection dialog component is created by the TFontEdit constructor.


 VCL Reference

TFontEdit events

TFontEdit	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFontEdit events

TFontEdit	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFontEdit methods

TFontEdit	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFontEdit methods

TFontEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TFontEdit


TForm
 VCL Reference

TForm

Hierarchy 	Properties	Methods	Events	Using TForm	See also

TForm represents a standard application window (form).

Unit

Forms

Description

When you create forms in the Form designer at design time, they are implemented as descendants of TForm. Forms can represent the application’s main window, dialog boxes, or MDI children. A form can contain other objects, such as TButton, TCheckBox, and TComboBox objects.

Examples of forms include TLoginDialog and TPasswordDialog objects.

Note:	When working with form objects, do not explicitly call the Free or Destroy method to free them. Instead, use the Release method, which waits until all event handlers have finished executing.


 VCL Reference

TForm properties

TForm	Alphabetically	Legend

Derived from TCustomForm

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

AlphaBlend

AlphaBlendValue

BorderIcons

BorderStyle

Canvas

ClientHandle

ClientHeight

ClientRect

ClientWidth

DefaultMonitor

Designer

DropTarget

Floating

FormState

FormStyle

HelpFile

Icon

KeyPreview

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

ObjectMenuItem

OldCreateOrder

OleFormObject

Parent

ParentBiDiMode

PixelsPerInch

Position

PrintScale

Scaled

TileMode

TransparentColor

TransparentColorValue

Visible

WindowMenu

WindowState

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragKind

DragMode

Enabled

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentFont

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TForm properties

TForm	By object	Legend

Action

Active

ActiveControl

ActiveMDIChild

ActiveOleControl

Align

AlignDisabled

AlphaBlend

AlphaBlendValue

Anchors

AutoScroll

AutoSize

BiDiMode

BorderIcons

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

Caption

ClientHandle

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefaultMonitor

Designer

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

DragKind

DragMode

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

FormState

FormStyle

Handle

Height

HelpContext

HelpFile

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Icon

KeyPreview

Left

LRDockWidth

MDIChildCount

MDIChildren

Menu

ModalResult

Monitor

Name

ObjectMenuItem

OldCreateOrder

OleFormObject

Owner

Parent

ParentBiDiMode

ParentFont

ParentWindow

PixelsPerInch

PopupMenu

Position

PrintScale

Scaled

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

TileMode

Top

TransparentColor

TransparentColorValue

UndockHeight

UndockWidth

UseDockManager

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowMenu

WindowProc

WindowState


 VCL Reference

TForm events

TForm	By object	Legend

OnActivate

OnCanResize

OnClick

OnClose

OnCloseQuery

OnConstrainedResize

OnContextPopup

OnCreate

OnDblClick

OnDeactivate

OnDestroy

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnGetSiteInfo

OnHelp

OnHide

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnPaint

OnResize

OnShortCut

OnShow

OnStartDock

OnUnDock


 VCL Reference

TForm methods

TForm	Alphabetically	Legend

In TForm

ArrangeIcons

Cascade

Next

Previous

Tile

Derived from TCustomForm

AfterConstruction

BeforeDestruction

Close

CloseQuery

Create

CreateNew

DefocusControl

Destroy

FocusControl

GetFormImage

Hide

IsShortCut

MakeFullyVisible

MouseWheelHandler

Print

Release

SendCancelMode

SetFocus

SetFocusedControl

Show

ShowModal

WantChildKey

Derived from TScrollingWinControl

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TForm methods

TForm	By object	Legend

AfterConstruction

ArrangeIcons

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

Cascade

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

CloseQuery

ContainsControl

ControlAtPos

Create

CreateNew

CreateParented

CreateParentedControl

DefaultHandler

DefocusControl

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

FocusControl

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetFormImage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

IsShortCut

MakeFullyVisible

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Next

PaintTo

ParentToClient

Perform

Previous

Print

Realign

ReferenceInterface

Refresh

Release

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendCancelMode

SendToBack

SetBounds

SetFocus

SetFocusedControl

SetSubComponent

SetTextBuf

Show

ShowModal

Tile

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

WantChildKey


TForm.ArrangeIcons
 VCL Reference

TForm.ArrangeIcons

TForm	See also 	Example

Arranges the icons of minimized MDI child forms.

procedure ArrangeIcons;

Description

Use ArrangeIcons to arrange the icons of minimized MDI child forms so they are evenly spaced and don't overlap.

ArrangeIcons works only if the form is an MDI parent form (that is, if the form’s FormStyle property is fsMDIForm).


TForm.Cascade
 VCL Reference

TForm.Cascade

TForm	See also	Example

Arranges MDI child forms so they overlap.

procedure Cascade;

Description

Use Cascade to arrange MDI child forms so they overlap.

Cascade works only if the form is an MDI parent form (that is, if the form’s FormStyle property is fsMDIForm).


TForm.Next
 VCL Reference

TForm.Next

TForm	See also

Activates the next child form in the form sequence.

procedure Next;

Description

Use Next to change the active child form of an MDI parent. For example, if you have three child forms within a parent form and Form2 is the active form, the Next method makes Form3 the active form. Calling Next again makes Form4 active. The next time your application calls Next, the sequence starts over again and Form2 becomes the active form once again.

The Next method applies only to forms that are MDI parent forms (have a FormStyle property value of fsMDIForm).


TForm.Previous
 VCL Reference

TForm.Previous

TForm	See also

Activates the previous MDI child form in the form sequence.

procedure Previous;

Description

Use Previous to change the active child form of an MDI parent. For example, if you have three child forms within a parent form and Form4 is the active form, the Previous method makes Form3 the active form. Calling Previous again makes Form2 active. The next time your application calls Previous, the sequence starts over again and Form4 becomes the active form once again.

The Previous method applies only to forms that are MDI parent forms (have a FormStyle property value of fsMDIForm).


TForm.Tile
 VCL Reference

TForm.Tile

TForm	See also	Example

Arranges MDI child forms so that they are all the same size.

procedure Tile;

Description

Use Tile to arrange MDI child forms so that they are all the same size. Tiled forms completely fill up the client area of the parent form. How the forms arrange themselves depends upon the values of their TileMode properties.

Tile works only if the form is an MDI parent form (that is, if the form’s FormStyle property is fsMDIForm).


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomForm

TForm


TFilePrintSetup
 VCL Reference

TFilePrintSetup

Hierarchy	Properties	Methods	Events	Using TFilePrintSetup	See also

TFilePrintSetup is the standard action for displaying a printer setup dialog.

Unit

StdActns

Description

Add TFilePrintSetup to an action list to add a common printer setup dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the printer setup dialog when invoked. Because the printer setup dialog automatically configures the printers as specified when the user clicks OK, there is usually no need to write an OnAccept or OnCancel event handler to continue processing after the dialog shuts down.


 VCL Reference

TFilePrintSetup properties

TFilePrintSetup	Alphabetically	Legend

In TFilePrintSetup

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFilePrintSetup properties

TFilePrintSetup	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TFilePrintSetup.Dialog
 VCL Reference

TFilePrintSetup.Dialog

TFilePrintSetup 	See also

Provides access the printer setup dialog that the action executes.

property Dialog: TPrinterSetupDialog;

Description

When using a file print setup action, you do not place a TPrinterSetupDialog component on the form or data module at design time. Instead, you add the TFilePrintSetup action to your action list. If you want to configure the dialog, for example to assign a help context, you can access the dialog component using the Dialog property. The printer setup dialog component is created by the TFilePrintSetup constructor.


 VCL Reference

TFilePrintSetup events

TFilePrintSetup	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TFilePrintSetup events

TFilePrintSetup	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TFilePrintSetup methods

TFilePrintSetup	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFilePrintSetup methods

TFilePrintSetup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TFilePrintSetup


TFrame
 VCL Reference

 TFrame

Hierarchy	Properties	Methods	Events	Using TFrame	See also

TFrame is a container for components; it can be nested within forms or other frames.

Unit

Forms

Description

When you create frames, they are implemented as descendants of TFrame.

A frame, like a form, is a container for other components. It uses the same ownership mechanism as forms for automatic instantiation and destruction of the components on it, and the same parent-child relationships for synchronization of component properties. But frames can be nested within forms or other frames, and they can be saved on the Component palette for easy reuse. After a frame is created and saved, it continues to function as a unit and to inherit changes from the components (including other frames) it contains. Moreover, an embedded frame continues to inherit changes made to the frame from which it is derived.


 VCL Reference

TFrame properties

TFrame	Alphabetically	Legend

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TCustomFrame

Parent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TFrame properties

TFrame	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoScroll

AutoSize

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TFrame events

TFrame	Alphabetically	Legend

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TFrame events

TFrame	By object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TFrame methods

TFrame	Alphabetically	Legend

In TCustomFrame

Create

Derived from TScrollingWinControl

Destroy

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TFrame methods

TFrame	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TCustomFrame

TFrame


TGraphic
 VCL Reference

TGraphic

Hierarchy	Properties	Methods	Events	See also

TGraphic is the abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images.

Unit

Graphics

Description

TGraphic is an abstract class that cannot be instantiated. Descendant graphics objects override many of the methods of TGraphic to address the needs of their particular file format and graphical characteristics. TGraphic also introduces methods that work with TPicture objects and the Clipboard. Properties of TGraphic provide information about the state and size of the graphic image.

When the type of graphic is known, store the graphic in its specific type object. Otherwise, use a TPicture object that can hold any type of TGraphic.


 VCL Reference

TGraphic properties

TGraphic	Alphabetically	Legend

In TGraphic

Empty

Height

Modified

Palette

PaletteModified

Transparent

Width


 VCL Reference

TGraphic properties

TGraphic	By object	Legend

Empty

Height

Modified

Palette

PaletteModified

Transparent

Width


TGraphic.Empty
 VCL Reference

TGraphic.Empty

TGraphic 	Example

Indicates whether the graphics object contains a graphic.

property Empty: Boolean;

Description

Use Empty to determine whether the graphic is bound to an image. Each descendant graphic object defines its own Get method to access the Empty property.


TGraphic.Height
 VCL Reference

TGraphic.Height

TGraphic

Specifies the vertical size of the graphic in pixels.

property Height: Integer;

Description

Use Height to determine the height of the graphic image. Each descendant graphic object defines its own Get and Set methods to access the Height property.


TGraphic.Modified
 VCL Reference

TGraphic.Modified

TGraphic

Indicates whether the graphics object has been changed or edited.

property Modified: Boolean;

Description

If Modified is True, the graphic object has changed. If Modified is False, the graphics object is in the same state as when the object was loaded.

The Modified property indicates only if bitmap objects have been modified. Modified is not True if the graphics object contains an icon or metafile graphic, even if they have been modified.

If the graphics object was modified, save the changes to a file with the SaveToFile method. The next time the application runs, it can load the graphic from the file with the LoadFromFile method.


TGraphic.Palette
 VCL Reference

TGraphic.Palette

TGraphic

Indicates the color palette of the graphical image.

property Palette: HPALETTE;

Description

Use Palette to get the color palette of a graphical image. If the graphic does not need or does not use a palette, the Palette property is zero.


TGraphic.PaletteModified
 VCL Reference

TGraphic.PaletteModified

TGraphic

Indicates whether the palette has changed.

property PaletteModified: Boolean;

Description

Use PaletteModified to determine if the palette used for a graphical image has changed. PaletteModified is used in the OnChange event. PaletteModified remains True until whoever's responsible for realizing this new palette (for example, TImage) sets it to False.


TGraphic.Transparent
 VCL Reference

TGraphic.Transparent

TGraphic 	Example

Indicates whether the image covers its rectangular area.

property Transparent: Boolean;

Description

Use Transparent to specify that the graphic be drawn transparently. Some descendants of TGraphic such as TIcon and TMetafile are always transparent, so setting the property for those objects does not change their behavior. However, the TBitmap graphic's drawing is affected by this property. The TImage component sets this property to be the same as its Transparent property to achieve transparent painting.


TGraphic.Width
 VCL Reference

TGraphic.Width

TGraphic

Determines the maximum width of the graphics object in pixels.

property Width: Integer;

Description

Each descendant graphic object defines its own Get and Set methods to access the Width property.


 VCL Reference

TGraphic events

TGraphic	Alphabetically	Legend

In TGraphic

OnChange

OnProgress


 VCL Reference

TGraphic events

TGraphic	By object	Legend

OnChange

OnProgress


TGraphic.OnChange
 VCL Reference

TGraphic.OnChange

TGraphic

Occurs whenever a graphical image changes.

property OnChange: TNotifyEvent;

Description

Use OnChange to write a handler to perform an action then the graphical image changes.


TGraphic.OnProgress
 VCL Reference

TGraphic.OnProgress

TGraphic	See also

Occurs when a graphical image is in the process of changing.

type

  TProgressStage = (psStarting, psRunning, psEnding);

  TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string) of object;

property OnProgress: TProgressEvent;

Description

For certain descendants of TGraphic, OnProgress occurs during slow processes such as loading, storing, or transforming image data. OnProgress allows applications to provide feedback to the user about the progress of the slow process.

Component writers can generate OnProgress events for new descendants of TGraphic by calling the protected Progress method. These events are propagated to the TPicture and TImage objects.

The Stage parameter indicates whether the operation is beginning, continuing, or ending. If the OnProgress event handler displays an indicator such as a progress bar, the indicator can be created when Stage is psStarting, updated while Stage is psRunning, and removed when Stage is psEnding. The PercentDone parameter is an approximation of how much of the operation has completed. Use PercentDone to update the position of a progress bar or other indicator.

The RedrawNow parameter indicates whether the image can safely be drawn on screen at this point. The R parameter specifies the portion of the image that has changed and needs to be redrawn.

The Msg parameter contains one or two words that describe what operation is occurring. For example, the value of Msg could be a string such as Loading, Storing, or Reducing colors. The Msg string can also be empty.


 VCL Reference

TGraphic methods

TGraphic	Alphabetically	Legend

In TGraphic

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

SaveToClipboardFormat

SaveToFile

SaveToStream

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TGraphic methods

TGraphic	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

QueryInterface

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TGraphic.LoadFromClipboardFormat
 VCL Reference

TGraphic.LoadFromClipboardFormat

TGraphic	See also

Introduces an abstract method that loads the image from a variable in Clipboard format.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); virtual; abstract;

Description

Each descendant graphic object defines a LoadFromClipboardFormat method that replaces the current graphic image with the graphic indicated by AData, which it loads from the Clipboard.

The format for the new graphic object must be registered with the Clipboard in the RegisterClipboardFormat method, or an exception is raised.


TGraphic.LoadFromFile
 VCL Reference

TGraphic.LoadFromFile

TGraphic 	See also	Example

Loads a graphic image stored in a file.

procedure LoadFromFile(const FileName: string); virtual;

Description

LoadFromFile reads the file specified in FileName and loads the data into the graphics object.


TGraphic.LoadFromStream
 VCL Reference

TGraphic.LoadFromStream

TGraphic 	See also

Introduces an abstract method that loads the image from a stream.

procedure LoadFromStream(Stream: TStream); virtual; abstract;

Description

Each descendant graphic object defines a LoadFromStream method that loads a graphics object from Stream.


TGraphic.SaveToClipboardFormat
 VCL Reference

TGraphic.SaveToClipboardFormat

TGraphic	See also

Introduces an abstract method that assigns the graphic to a variable in clipboard format.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); virtual; abstract;

Description

Each descendant graphic object defines a SaveToClipboardFormat method that saves that particular graphic image type to a Clipboard format. An application must have registered the format with the TGraphic object using the RegisterClipboardFormat method.


TGraphic.SaveToFile
 VCL Reference

TGraphic.SaveToFile

TGraphic	Example

Saves a graphics image to a file.

procedure SaveToFile(const FileName: string); virtual;

Description

SaveToFile writes the graphic to a file, specified by FileName.


TGraphic.SaveToStream
 VCL Reference

TGraphic.SaveToStream

TGraphic

Introduces an abstract method that saves the graphic image to a stream.

procedure SaveToStream(Stream: TStream); virtual; abstract;

Description

Each descendant graphic object defines a SaveToStream method that saves the object to a Stream.


Hierarchy

TObject

TPersistent

TInterfacedPersistent

TGraphic


TGraphicsObject
 VCL Reference

TGraphicsObject

Hierarchy	Properties	Methods	Events	See also

TGraphicsObject is the abstract base class for objects which encapsulate a system graphics object: TBrush, TFont, and TPen.

Unit

Graphics

Description

Create descendants of TGraphicsObject when drawing an image to a canvas (TCanvas). Each TGraphicsObject object describes a system graphics object that is selected into the device context of the canvas.

TGraphicsObject introduces a mechanism for responding to changes in the properties of the graphics object.


 VCL Reference

TGraphicsObject properties

TGraphicsObject	Alphabetically	Legend

In TGraphicsObject

OwnerCriticalSection


 VCL Reference

TGraphicsObject properties

TGraphicsObject	By object	Legend

OwnerCriticalSection


TGraphicsObject.OwnerCriticalSection
 VCL Reference

TGraphicsObject.OwnerCriticalSection

TGraphicsObject	See also

Points to the TRTLCriticalSectionthat the canvas which draws with this graphics object uses to lock out other threads.

type

  PRTLCriticalSection = ^TRTLCriticalSection;

  TRTLCriticalSection = _RTL_CRITICAL_SECTION;

  _RTL_CRITICAL_SECTION = record

    DebugInfo: PRTLCriticalSectionDebug;

    LockCount: Longint;

    RecursionCount: Longint;

    OwningThread: THandle;

    LockSemaphore: THandle;

    Reserved: DWORD;

  end;

property OwnerCriticalSection: PRTLCriticalSection;

Description

Use OwnerCriticalSection to obtain information about the thread locking state of the canvas that draws with this graphics object. The canvas sets OwnerCriticalSection when it creates the graphics object. Do not change this property while the canvas is using the graphics object.

If the graphics object is created on behalf of a drawing surface that is not a canvas, set OwnerCriticalSection to an initialized TRTLCriticalSection that is maintained by the drawing surface.

To use OwnerCriticalSection to block other execution threads, use the Lock method.


 VCL Reference

TGraphicsObject events

TGraphicsObject	Alphabetically	Legend

In TGraphicsObject

OnChange


 VCL Reference

TGraphicsObject events

TGraphicsObject	By object	Legend

OnChange


TGraphicsObject.OnChange
 VCL Reference

TGraphicsObject.OnChange

TGraphicsObject	See also

Occurs immediately after the graphics object changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to take specific action when the graphics object changes. The properties of the graphics object reflect the new settings when OnChange occurs.


 VCL Reference

TGraphicsObject methods

TGraphicsObject	Alphabetically	Legend

In TGraphicsObject

Changed

HandleAllocated

Lock

Unlock

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TGraphicsObject methods

TGraphicsObject	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

Lock

MethodAddress

MethodName

NewInstance

SafeCallException

Unlock


TGraphicsObject.Changed
 VCL Reference

TGraphicsObject.Changed

TGraphicsObject	See also

Generates an OnChange event when the properties of the graphics object change.

procedure Changed; dynamic;

Description

Descendants of TGraphicsObject call Changed after making changes to the properties encapsulated by the TGraphicsObject object.


TGraphicsObject.HandleAllocated
 VCL Reference

TGraphicsObject.HandleAllocated

TGraphicsObject	See also

Indicates whether the TGraphicsObject object has acquired a handle to the underlying GDI object.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine whether the Handle property is set for the graphics object. HandleAllocated indicates whether the underlying GDI object has been acquired. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, TGraphicsObject descendants automatically create the underlying GDI object and return its handle if the property had not been previously set.


TGraphicsObject.Lock
 VCL Reference

TGraphicsObject.Lock

TGraphicsObject	See also

Blocks other execution threads from using the associated canvas until the Unlock method is called.

procedure Lock;

Description

Call Lock in a multithreaded application before using the graphics object in a section of code that would not otherwise be thread-safe. Lock prevents other cooperating threads in the application from using the associated canvas until the Unlock method is called. Calls to Lock can be nested so that the canvas is not unlocked until the last lock is released.

Because Lock prevents other threads from executing, it can adversely affect performance. Do not call Lock unless there is a danger that another thread might interfere with the drawing.

Note:	Lock will do nothing unless the drawing surface sets the OwnerCriticalSection property. TCanvas objects automatically set the OwnerCriticalSection property when they use graphics objects.


TGraphicsObject.Unlock
 VCL Reference

TGraphicsObject.Unlock

TGraphicsObject	See also

Releases the lock on execution threads set by the Lock method.

procedure Unlock;

Description

Call Unlock at the end of a thread-sensitive section of code that was started with a call to the Lock method. When every call to Lock is balanced by a call to Unlock, other threads are allowed to lock the associated canvas.


Hierarchy

TObject

TPersistent

TGraphicsObject


TGroupBox
 VCL Reference

 TGroupBox

Hierarchy	Properties	Methods	Events	Using TGroupBox	See also

TGroupBox represents a Windows group box.

Unit

StdCtrls

Description

The TGroupBox component represents a standard Windows group box, used to group related controls on a form. When another control component is placed within a group box, the group box becomes the parent of that component.


 VCL Reference

TGroupBox properties

TGroupBox	Alphabetically	Legend

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TGroupBox Properties

TGroupBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TGroupBox events

TGroupBox	Alphabetically	Legend

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TGroupBox Events

TGroupBox	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TGroupBox methods

TGroupBox	Alphabetically	Legend

Derived from TCustomGroupBox

Create

Derived from TCustomControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TGroupBox Methods

TGroupBox	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGroupBox

TGroupBox


TGraphicControl
 VCL Reference

TGraphicControl

Hierarchy	Properties	Methods	See also

TGraphicControl is the base class for all lightweight controls.

Unit

Controls

Description

TGraphicControl supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls. Since lightweight controls do not wrap Windows screen objects, they are faster and user fewer resources than controls based on TWinControl.

TGraphicControl provides a Canvas property for access to the control's drawing surface and a virtual Paint method called in response to paint requests received by the parent control.


 VCL Reference

TGraphicControl Properties

TGraphicControl	Alphabetically	Legend

In TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TGraphicControl Properties

TGraphicControl	By Object	Legend

Action

Align

Anchors

BiDiMode

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ShowHint

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TGraphicControl.Canvas
 VCL Reference

TGraphicControl.Canvas

TGraphicControl	See also	Example

Provides the drawing surface used by the graphic control.

property Canvas: TCanvas;

Description

Use the properties of the TCanvas object to draw or paint on the surface of the control.

Since TGraphicControl does not have its own Windows screen object, it obtains its device context from its parent control.


 VCL Reference

TGraphicControl Methods

TGraphicControl	Alphabetically	Legend

In TGraphicControl

Create

Destroy

Paint

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TGraphicControl Methods

TGraphicControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TGraphicControl.Create
 VCL Reference

TGraphicControl.Create

TGraphicControl	See also

Creates an instance of TGraphicControl.

constructor Create(AOwner: TComponent); override;

Description

Calling Create constructs and initializes an instance of TGraphicControl. However, you should never attempt to instantiate a TGraphicControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendents.

After calling the inherited constructor, Create initializes the control, including the following property settings:

Initializes the TCanvas object for its Canvas property.

When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method.

Note:	If a component's constructor allocates resources or memory, also override the destructor to free those resources.


TGraphicControl.Destroy
 VCL Reference

TGraphicControl.Destroy

TGraphicControl	See also

Destroys an instance of TGraphicControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the graphic control reference is not nil, and only then calls Destroy.

Applications should only free controls explicitly when the constructor was called without assigning an owner to the control.

As the control is destroyed, it:

Frees the TCanvas object in its Canvas property.

Override Destroy to free any memory or resources allocated in the Create method. When declaring a Destroy method in a descendant control type, always add the override directive to the declaration and call the inherited Destroy as the last statement in the redeclared method.

When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents.


TGraphicControl.Paint
 VCL Reference

TGraphicControl.Paint

TGraphicControl	See also

Render control surface.

procedure Paint; virtual;

Description

The Paint method is called automatically when a lightweight control needs update its display area. Code in the Paint method uses the Canvas property to render the control surface.

As implemented in TGraphicControl, Paint does nothing. Specific rendering logic is provided by Paint methods in descendent control classes.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl


THashedStringList
 VCL Reference

THashedStringList

Hierarchy	Properties	Methods	Events	Using THashedStringList	See also

THashedStringList maintains a list of strings using an internal hash table.

Unit

IniFiles

Description

THashedStringList is a string list that uses a hash table internally to speed the process of locating strings. It is used internally by TMemIniFile to manage the strings from an INI file, but can be used in the same way as any other string list. By using THashedStringList instead of TStringList, you can improve performance when the list contains a large number of strings.


 VCL Reference

THashedStringList properties

THashedStringList	Alphabetically	Legend

Derived from TStringList

Capacity

CaseSensitive

Count

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

DelimitedText

Delimiter

Names

QuoteChar

StringsAdapter

Text

Values


 VCL Reference

THashedStringList properties

THashedStringList	By object	Legend

Capacity

CaseSensitive

CommaText

Count

DelimitedText

Delimiter

Duplicates

Names

Objects

QuoteChar

Sorted

Strings

StringsAdapter

Text

Values


 VCL Reference

THashedStringList events

THashedStringList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 VCL Reference

THashedStringList events

THashedStringList	By object	Legend

OnChange

OnChanging


 VCL Reference

THashedStringList methods

THashedStringList	Alphabetically	Legend

In THashedStringList

Destroy

IndexOf

IndexOfName

Derived from TStringList

Add

AddObject

Clear

CustomSort

Delete

Exchange

Find

Insert

InsertObject

Sort

Derived from TStrings

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THashedStringList methods

THashedStringList	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort


THashedStringList.Destroy
 VCL Reference

THashedStringList.Destroy

THashedStringList	See also

Destroys an instance of THashedStringList.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the THashedStringList reference is not nil and only then calls Destroy.


THashedStringList.IndexOf
 VCL Reference

THashedStringList.IndexOf

THashedStringList	See also

Returns the position of a string in the list.

function IndexOf(const S: string): Integer; override;

Description

Call IndexOf to obtain the position of the first occurrence of a string that matches S. A string matches S if it is identical to S or differs only in case.

IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string does not have a match in the string list, IndexOf returns -1.


THashedStringList.IndexOfName
 VCL Reference

THashedStringList.IndexOfName

THashedStringList	See also

Returns the position of the first string with the form Name=Value with the specified name part.

function IndexOfName(const Name: string): Integer; override;

Description

Call IndexOfName to locate the first occurrence of a string with the form Name=Value where the name part is equal to the Name parameter or differs only in case. IndexOfName returns the 0-based index of the string. If no string in the list has the indicated name, IndexOfName returns -1.

The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.

Note:	If there is more than one string with a name portion matching the Name parameter, IndexOfName returns the position of the first such string.


Hierarchy

TObject

TPersistent

TStrings

TStringList

THashedStringList


THeaderControl
 VCL Reference

 THeaderControl

Hierarchy	Properties	Methods	Events	See also

THeaderControl is a container for THeaderSection objects. It provides a set of resizable column headers.

Unit

ComCtrls

Description

A THeaderControl is a set of column headers that the user can resize at runtime. Each header is represented by a THeaderSection object listed in the Sections property.

The header sections can be positioned above columns or fields of information. For example, header sections could be placed over a list box (TListBox). Because THeaderControl provides a generic header element that can be paired with virtually any other visual component, runtime manipulation of the header sections is not automatically extended to the components beneath it. If, for example, you want the column beneath a header section to be resized whenever the header section is resized, you will have to write a custom OnSectionResize event handler to accomplish this.


 VCL Reference

THeaderControl Properties

THeaderControl	Alphabetically	Legend

Derived from TCustomHeaderControl

Canvas

DragReorder

FullDrag

HotTrack

Images

Sections

Style

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THeaderControl Properties

THeaderControl	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderWidth

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DragReorder

Enabled

Floating

FloatingDockSiteClass

Font

FullDrag

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotTrack

Images

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Sections

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

THeaderControl Events

THeaderControl	Alphabetically	Legend

In THeaderControl

OnDrawSection

OnSectionClick

OnSectionResize

OnSectionTrack

Derived from TCustomHeaderControl

OnCreateSectionClass

OnSectionDrag

OnSectionEndDrag

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

THeaderControl Events

THeaderControl	By Object	Legend

OnContextPopup

OnCreateSectionClass

OnDragDrop

OnDragOver

OnDrawSection

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnSectionClick

OnSectionDrag

OnSectionEndDrag

OnSectionTrack

OnStartDock

OnStartDrag


THeaderControl.OnDrawSection
 VCL Reference

THeaderControl.OnDrawSection

THeaderControl	See also	Example

Occurs when a header section needs to be redrawn.

type TDrawSectionEvent = procedure (HeaderControl: THeaderControl; Section: THeaderSection; const Rect: TRect; Pressed: Boolean) of object;

property OnDrawSection: TDrawSectionEvent;

Description

The OnDrawSection event occurs when a header section needs to be redisplayed—for example, when the user selects or resizes a section. OnDrawSection occurs only if the header section’s Style property is set to hsOwnerDraw.

TDrawSectionEvent is the type of the OnDrawSection property.


THeaderControl.OnSectionClick
 VCL Reference

THeaderControl.OnSectionClick

THeaderControl	See also

Occurs when one of the header control’s sections is clicked.

type TSectionNotifyEvent = procedure(HeaderControl: THeaderControl; Section: THeaderSection) of object;

property OnSectionClick: TSectionNotifyEvent;

Description

The OnSectionClick event occurs when a header section is clicked at runtime. To disable a section from being clicked set its AllowClick property to False.

TSectionNotifyEvent is the type of the OnSectionClick and OnSectionResize events.


THeaderControl.OnSectionDrag
 VCL Reference

THeaderControl.OnSectionDrag

THeaderControl	See also

Occurs when the user drags a header section to a new position.

property OnSectionDrag: TSectionDragEvent;

Description

Write an OnSectionDrag event handler to respond when a user tries to reorder the sections in the header control. The OnSectionDrag event handler can conditionally prevent the user from dragging a header to a new position.

If the AllowDrag parameter is True on exit from the event handler, the header control reorders the sections and generates an OnSectionEndDrag event when the reorder is complete.

Note:	OnSectionDrag only occurs if the DragReorder property is True.


THeaderControl.OnSectionEndDrag
 VCL Reference

THeaderControl.OnSectionEndDrag

THeaderControl	See also

Occurs after the header control rearranges its sections in response to a drag operation.

property OnSectionEndDrag: TNotifyEvent;

Description

Write an OnSectionEndDrag event handler to respond after a user reorders the sections in the header control.

Note:	OnSectionEndDrag only occurs if the DragReorder property is True.


THeaderControl.OnSectionResize
 VCL Reference

THeaderControl.OnSectionResize

THeaderControl	See also

Occurs when one of the header control’s sections is resized.

type TSectionNotifyEvent = procedure(HeaderControl: THeaderControl; Section: THeaderSection) of object;

property OnSectionResize: TSectionNotifyEvent;

Description

The OnSectionResize event occurs when a header section is resized at runtime. This happens when the user positions the mouse pointer between two sections and drags their border to the right or left.

TSectionNotifyEvent is the type of the OnSectionClick and OnSectionResize events.


THeaderControl.OnSectionTrack
 VCL Reference

THeaderControl.OnSectionTrack

THeaderControl	See also

Occurs as one of the header control’s sections is being resized.

type

  TSectionTrackState = (tsTrackBegin, tsTrackMove, tsTrackEnd);

  TSectionTrackEvent = procedure(HeaderControl: THeaderControl; Section: THeaderSection; Width: Integer; State: TSectionTrackState) of object;

property OnSectionTrack: TSectionTrackEvent;

Description

The OnSectionTrack event tracks the dragging of a header section’s border as it happens. OnSectionTrack occurs when the mouse pointer is positioned between two header sections and the left mouse button is depressed.

OnSectionTrack is of type TSectionTrackEvent, whose Width and State parameters indicate the size of the header section (in pixels) and the status of the event. The State property can take three values:

Value	Meaning

tsTrackBegin	The border has not yet been dragged.

tsTrackMove	The border is being dragged.

tsTrackEnd	The border is no longer being dragged.

Use OnSectionTrack when you want something to happen at runtime as a header section is being resized.


 VCL Reference

THeaderControl Methods

THeaderControl	Alphabetically	Legend

Derived from TCustomHeaderControl

Create

Destroy

FlipChildren

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THeaderControl Methods

THeaderControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


THeaderControl.Create
 VCL Reference

THeaderControl.Create

THeaderControl	See also

Creates and initializes a THeaderControl component.

constructor Create(AOwner: TComponent); override;

Description

The Create method creates a header control along with its canvas and header sections.


THeaderControl.FlipChildren
 VCL Reference

THeaderControl.FlipChildren

THeaderControl	Methods

Reverses the order in which sections are displayed.

procedure FlipChildren(AllLevels: Boolean); override;

Description

FlipChildren flips the order of the header control’s sections; then calls the inherited FlipChildren method to reverse the order of any other child controls.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

THeaderControl


THeaderSection
 VCL Reference

THeaderSection

Hierarchy	Properties	Methods	See also

THeaderSection represents a section of a header control.

Unit

ComCtrls

Description

THeaderControl objects use THeaderSection objects to maintain collections of THeaderSection objects. These THeaderSection objects represent resizable column headers. Each column header includes a text label and possibly a graphic image.


 VCL Reference

THeaderSection Properties

THeaderSection	Alphabetically	Legend

In THeaderSection

Alignment

AllowClick

AutoSize

BiDiMode

DisplayName

ImageIndex

Left

MaxWidth

MinWidth

ParentBiDiMode

Right

Style

Text

Width

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

THeaderSection Properties

THeaderSection	By Object	Legend

Alignment

AllowClick

AutoSize

BiDiMode

Collection

DisplayName

ID

ImageIndex

Index

Left

MaxWidth

MinWidth

ParentBiDiMode

Right

Style

Text

Width


THeaderSection.Alignment
 VCL Reference

THeaderSection.Alignment

THeaderSection	See also

Specifies how text is aligned within the header section.

property Alignment: TAlignment;

Description

Use Alignment to specify whether the header section text should be left-justified, right-justified, or centered.

These are the possible values of Alignment:

Value	Meaning

taLeftJustify	Align text on the left side of the header section.

taCenter	Center text in the header section.

taRightJustify	Align text on the right side of the header section.


THeaderSection.AllowClick
 VCL Reference

THeaderSection.AllowClick

THeaderSection	See also

Allows the section to respond to mouse clicks at runtime.

property AllowClick: Boolean;

Description

If AllowClick is set to True (the default), the header section can be clicked with the mouse at runtime. Header sections behave like buttons when clicked: They loose their raised borders and appear depressed on the form. To attach functionality to the clicking of header sections, write an event handler for the header control’s OnSectionClick event.


THeaderSection.AutoSize
 VCL Reference

THeaderSection.AutoSize

THeaderSection

Indicates whether the header section should size itself to exactly hold its contents.

property AutoSize: Boolean;

Description

When AutoSize is True, the header section (and the header control that contains it) automatically resizes to adjust to changes. When AutoSize is False, the header section size is fixed unless changed programmatically.


THeaderSection.BiDiMode
 VCL Reference

THeaderSection.BiDiMode

THeaderSection

Specifies the bi-directional mode for the header section.

property BiDiMode: TBiDiMode;

Description

Use BiDiMode to specify the bi-directional mode for the header section.


THeaderSection.DisplayName
 VCL Reference

THeaderSection.DisplayName

THeaderSection	See also

The name displayed in the Sections editor.

property DisplayName: string;

Description

DisplayName is the string that represents the item in the Sections property editor.


THeaderSection.ImageIndex
 VCL Reference

THeaderSection.ImageIndex

THeaderSection	See also

Identifies the image that appears next to the text on the header section.

property ImageIndex: TImageIndex;

Description

Use ImageIndex to specify an image that appears next to the text on the header section. ImageIndex is the (0-offset) index of the image in the TCustomImageList component that is available through the header control’s Images property.


THeaderSection.Left
 VCL Reference

THeaderSection.Left

THeaderSection	See also

Specifies the horizontal position of the header section’s left edge.

property Left: Integer;

Description

The Left property is the horizontal coordinate of the header section’s left edge, relative to the left border of the header control and measured in pixels.


THeaderSection.MaxWidth
 VCL Reference

THeaderSection.MaxWidth

THeaderSection	See also

Specifies the maximum width of the header section.

property MaxWidth: Integer;

Description

Sets the maximum width, in pixels, for the header section. If MaxWidth = MinWidth, the header section cannot be resized at runtime.


THeaderSection.MinWidth
 VCL Reference

THeaderSection.MinWidth

THeaderSection	See also 	Example

Specifies the minimum width of the header section.

property MinWidth: Integer;

Description

Sets the minimum width, in pixels, for the header section. If MinWidth = MaxWidth, the header section cannot be resized at runtime.


THeaderSection.ParentBiDiMode
 VCL Reference

THeaderSection.ParentBiDiMode

THeaderSection

Specifies whether the header section uses its parent’s bi-directional mode.

property ParentBiDiMode: Boolean;

Description

Use BiDiMode to specify whether the header section uses its parent’s bi-directional mode.


THeaderSection.Right
 VCL Reference

THeaderSection.Right

THeaderSection	See also

Specifies the horizontal position of the header section’s right edge.

property Right: Integer;

Description

The Right property is the horizontal coordinate of the header section’s right edge, relative to the left border of the header control and measured in pixels. The Right value is the value of Left plus the value of Width.


THeaderSection.Style
 VCL Reference

THeaderSection.Style

THeaderSection	See also 	Example

Determines how the header section’s text is displayed.

type THeaderSectionStyle = (hsText, hsOwnerDraw);

property Style: THeaderSectionStyle;

Description

If Style is set to hsText (the default), the string contained in the Text property is displayed in the header section, using the alignment specified by Alignment. The font is determined by the header control’s Font property. A graphic image can appear beside the text if the ImageIndex property is set.

If Style is set to hsOwnerDraw, the content displayed in the header section is drawn at run time on the header control’s canvas by code in an OnDrawSection event handler.


THeaderSection.Text
 VCL Reference

THeaderSection.Text

THeaderSection	See also

Specifies the header section’s caption.

property Text: string;

Description

The Text property contains a string that identifies the header section or the column beneath it. If Style is set to hsText, the value of Text appears in the header section.


THeaderSection.Width
 VCL Reference

THeaderSection.Width

THeaderSection	See also

Specifies the width of the header section.

property Width: Integer;

Description

The Width property determines the default width of the header section, in pixels. Header sections can be resized at runtime by dragging their borders.


 VCL Reference

THeaderSection Methods

THeaderSections	Alphabetically	Legend

In THeaderSection

Assign

Create

ParentBiDiModeChanged

UseRightToLeftAlignment

UseRightToLeftReading

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THeaderSection Methods

THeaderSection	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ParentBiDiModeChanged

SafeCallException

UseRightToLeftAlignment

UseRightToLeftReading


THeaderSection.Assign
 VCL Reference

THeaderSection.Assign

THeaderSection	See also

Copies the contents of the source header section to a new header section.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the values of the source object’s Alignment, AllowClick, MaxWidth, MinWidth, Style, Text, and Width properties to another header section.


THeaderSection.Create
 VCL Reference

THeaderSection.Create

THeaderSection	See also

Creates and initializes a header section.

constructor Create(Collection: TCollection); override;

Description

Description

Do not instantiate a THeaderSection object. Header sections are created automatically by the THeaderSections objects that use them. To add a section to a THeaderSections object, use its Add method instead.

Create takes a THeaderSections instance as its argument.


THeaderSection.ParentBiDiModeChanged
 VCL Reference

THeaderSection.ParentBiDiModeChanged

THeaderSection

Synchronizes the header section’s BiDiMode with the associated header control’s BiDiMode.

procedure ParentBiDiModeChanged;

Description

Use ParentBiDiModeChanged to synchronize the header section’s BiDiMode with the associated header control’s BiDiMode.


THeaderSection.UseRightToLeftAlignment
 VCL Reference

THeaderSection.UseRightToLeftAlignment

THeaderSection	See also

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the control’s alignment is in a right-to-left mode. This information can be used when painting the control, or when responding to mouse events.

UseRightToLeft alignment returns True if SysLocale.MiddleEast is True and BiDiMode is bdRightToLeft


THeaderSection.UseRightToLeftReading
 VCL Reference

THeaderSection.UseRightToLeftReading

THeaderSection	See also

Specifies whether the control is using a right-to-left reading order.

function UseLeftToRightAlignment: Boolean;

Description

Call UseRightToLeftReading to determine which style flags to set for the control when it is created and which flags to set for drawing text (for example, when calling ExTextOut or DrawText).

UseRightToLeftReading returns True if SysLocale.MiddleEast = True and BiDiMode is not bdLeftToRight.


Hierarchy

TObject

TPersistent

TCollectionItem

THeaderSection


THeaderSections
 VCL Reference

THeaderSections

Hierarchy	Properties	Methods	See also

THeaderSections is a container for THeaderSection objects.

Unit

ComCtrls

Description

Each THeaderSections objects holds a collection of THeaderSection objects displayed in a specific THeaderControl object. THeaderSections object maintains an index of the header sections in its Items array. The Count property contains the number of header sections in the collection. At design time, use the header control’s Sections editor to add, remove, or modify header sections.


 VCL Reference

THeaderSections Properties

THeaderSections	Alphabetically	Legend

In THeaderSections

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

THeaderSections Properties

THeaderSections	By Object	Legend

Count

ItemClass

Items


THeaderSections.Items
 VCL Reference

THeaderSections.Items

THeaderSections	See also

Lists the header sections in the collection.

property Items[Index: Integer]: THeaderSection; default;

Description

The value of the Index parameter corresponds to the Index property of THeaderSection. It represents the position of the header section in the header.


 VCL Reference

THeaderSections Methods

THeaderSections	Alphabetically	Legend

In THeaderSections

Add

AddItem

Create

Insert

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

THeaderSections Methods

THeaderSections	By Object	Legend

Add

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


THeaderSections.Add
 VCL Reference

THeaderSections.Add

THeaderSections	See also	Example

Creates a new THeaderSection instance and adds it to the Items array.

function Add: THeaderSection;

Description

Add returns the new header section. At design time, use the header control’s Sections editor to add sections to the header.


THeaderSections.AddItem
 VCL Reference

THeaderSections.AddItem

THeaderSections	See also

Add section object to collection.

function AddItem(Item: THeaderSection; Index: Integer): THeaderSection;

Description

The AddItem method is similar to the Add method, but is more flexible.

The Item parameter specifies the section object to add. If Item is nil, then a new panel object is created automatically. To determine the object type at runtime, define the status bar's OnCreateSectionClass event handler. If this event handler is not defined, the new section object is an instance of THeaderSection.

The Index parameter determines the Index property of the panel object. If Index is negative, the panel object is added at the end of the collection.

AddItem returns the panel object added.


THeaderSections.Create
 VCL Reference

THeaderSections.Create

THeaderSections	See also

Creates and initializes a THeaderSections object.

constructor Create(HeaderControl: THeaderControl);

Description

The Create method takes a THeaderControl instance as a parameter.


THeaderSections.Insert
 VCL Reference

THeaderSections.Insert

THeaderSections	See also

Add new section object to collection.

function Insert(Index: Integer): TStatusPanel;

Description

The Insert method creates a new section object and adds it the the collection. To determine the object type at runtime, define the header control's OnCreateSectionClass event handler. If this event handler is not defined, the new section object is an instance of THeaderSection.

The Index parameter determines the Index property of the panel object. If Index is negative, the panel object is added at the end of the collection.

Insert returns the new panel object.


Hierarchy

TObject

TPersistent

TCollection

THeaderSections


THeader
 VCL Reference

 THeader

Hierarchy	Properties	Methods	Events

THeader is a sectioned visual control that displays text and allows each section to be resized with the mouse.

Unit

ExtCtrls

Description

THeader is provided for backward compatibility. New applications should use THeaderControl instead.


 VCL Reference

THeader properties

THeader	Alphabetically	Legend

In THeader

AllowResize

BorderStyle

Sections

SectionWidth

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Parent

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject

WindowProc


 VCL Reference

THeader properties

THeader	By object	Legend

Action

Align

AlignDisabled

AllowResize

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Sections

SectionWidth

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


THeader.AllowResize
 VCL Reference

THeader.AllowResize

THeader

Determines if the user can modify the size of the header at runtime with the mouse.

property AllowResize: Boolean;

Description

If AllowResize is False, the sections within a header can't be resized. If AllowResize is True, clicking a border of a header section and dragging it left or right changes the width of the section. The default value is True.


THeader.BorderStyle
 VCL Reference

THeader.BorderStyle

THeader

Determines whether the header control has a border.

property BorderStyle: TBorderStyle;

Description

These are the possible values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border


THeader.Sections
 VCL Reference

THeader.Sections

THeader

Lists the strings that contain the text for the sections of a header.

property Sections: TStrings;

Description

The number of lines of the string list determines the number of sections of the header. If the string list is empty, the header has one blank section. If this string list contains one or more lines, the text of each line is in its own section. The first line is in the leftmost section, the second line is in the next section to the right, and so on.


THeader.SectionWidth
 VCL Reference

THeader.SectionWidth

THeader

Determines the width, in pixels, of the sections of a header.

property SectionWidth[X: Integer]: Integer;

Description

Use SectionWidth to specify the width of each header section. X is an index into the sections, from 0 to the number of sections - 1. For example, the index of the first section is 0, the second section is 1, and so on.


 VCL Reference

THeader events

THeader	Alphabetically	Legend

In THeader

OnSized

OnSizing

Derived from TControl

OnContextPopup


 VCL Reference

THeader events

THeader	By object	Legend

OnContextPopup

OnSized

OnSizing


THeader.OnSized
 VCL Reference

THeader.OnSized

THeader	See also

Occurs after the header has been resized.

type TSectionEvent = procedure(Sender: TObject; ASection, AWidth: Integer) of object;

property OnSized: TSectionEvent;

Description

Write an OnSized event handler to perform special processing after the header has been resized. Sender is the header control, ASection is the index of the section that was resized, and AWidth is the width of the section before it was resized. Use the SectionWidth property to determine the new size of the section.


THeader.OnSizing
 VCL Reference

THeader.OnSizing

THeader	See also

Occurs before the header is resized.

type TSectionEvent = procedure(Sender: TObject; ASection, AWidth: Integer) of object;

property OnSizing: TSectionEvent;

Description

Write an OnSizing event handler to perform special processing immediately before the header is resized. Sender is the header control, ASection is the index of the section that is being resized, and AWidth is the width that the section will have after it is resized. Use the SectionWidth property to determine the current size of the section.


 VCL Reference

THeader methods

THeader	Alphabetically	Legend

In THeader

Create

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THeader methods

THeader	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


THeader.Destroy
 VCL Reference

THeader.Destroy

THeader	See also

Frees the memory associated with the THeader object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use the Free method, which checks whether the THeader reference is nil before calling Destroy.


THeader.Create
 VCL Reference

THeader.Create

THeader	See also

Creates a new THeader object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a header at runtime. Headers added to forms at design time are created automatically.

The AOwner parameter initializes the Owner property of the header.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

THeader


THelpAction
 VCL Reference

THelpAction

Hierarchy	Properties	Methods	Events	Using THelpAction	See also

THelpAction is the base class for action objects that interact with the help system.

Unit

StdActns

Description

THelpAction implements the common behavior for actions that work the help system. Each descendant class performs a specific help function. Do not use THelpAction directly in an application. Instead, use a THelpAction descendant such as THelpContents, THelpContextAction, THelpOnHelp, or THelpTopicSearch.

THelpAction ensures that the action is enabled as long as there is an application object to pass commands on to a registered help system. THelpAction descendants override the ExecuteTarget method to execute their specific help command.


 VCL Reference

THelpAction properties

THelpAction	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THelpAction properties

THelpAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THelpAction events

THelpAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THelpAction events

THelpAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THelpAction methods

THelpAction	Alphabetically	Legend

In THelpAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

ExecuteTarget

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THelpAction methods

THelpAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THelpAction.HandlesTarget
 VCL Reference

THelpAction.HandlesTarget

THelpAction

Indicates whether the action can execute its function.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

As implemented in THelpAction, HandlesTarget ignores the Target parameter and always returns True, because the help actions do not rely on a specific target object.


THelpAction.UpdateTarget
 VCL Reference

THelpAction.UpdateTarget

THelpAction 	See also

Enables or disables the action, depending on the availability of the Application object.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In THelpAction, UpdateTarget checks whether the global Application variable is assigned, because this object is required to pass help commands on to WinHelp. If Application is assigned, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

THelpAction


THelpContents
 VCL Reference

THelpContents

Hierarchy	Properties	Methods	Events	Using THelpContents	See also

THelpContents brings up the contents for the default help system.

Unit

StdActns

Description

Add THelpContents to an action list to allow users to bring up the help contents by using menu items or toolbar buttons. Controls such as menu items and tool buttons linked to this action cause the application to send the default help system a command to show the help contents.

On WinHelp, THelpContents displays the Help Topics dialog on the tab (Contents, Index or Find) that was last used.


 VCL Reference

THelpContents properties

THelpContents	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THelpContents properties

THelpContents	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THelpContents events

THelpContents	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THelpContents events

THelpContents	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THelpContents methods

THelpContents	Alphabetically	Legend

In THelpContents

ExecuteTarget

Derived from THelpAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THelpContents methods

THelpContents	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THelpContents.ExecuteTarget
 VCL Reference

THelpContents.ExecuteTarget

THelpContents 	See also

Displays a dialog that lists the help topics.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget calls the application’s HelpCommand method, telling it to list the help topics.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

THelpContents


THelpContextAction
 VCL Reference

THelpContextAction

Hierarchy	Properties	Methods	Events	Using THelpContextAction	See also

THelpContextAction brings up the help topic for the active control.

Unit

StdActns

Description

Add THelpContextAction to an action list to allow users to bring up the help for an active control. Controls such as menu items and tool buttons linked to this action cause the application to send WinHelp a command to display the help topic specified by the active control’s HelpContext property.


 VCL Reference

THelpContextAction properties

THelpContextAction	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THelpContextAction properties

THelpContextAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THelpContextAction events

THelpContextAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THelpContextAction events

THelpContextAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THelpContextAction methods

THelpContextAction	Alphabetically	Legend

In THelpContextAction

ExecuteTarget

UpdateTarget

Derived from THelpAction

HandlesTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THelpContextAction methods

THelpContextAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THelpContextAction.ExecuteTarget
 VCL Reference

THelpContextAction.ExecuteTarget

THelpContextAction 	See also

Displays the help topic associated with the active control’s HelpContext property.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget calls the application’s HelpCommand method, telling it to display the topic specified by the active control’s HelpContext property. ExecuteTarget gets the active control from the global Screen object rather than using the Target parameter.


THelpContextAction.UpdateTarget
 VCL Reference

THelpContextAction.UpdateTarget

THelpContextAction 	See also

Enables or disables the action, depending on whether there is an active object.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically so that actions can update themselves according to current conditions.

In THelpContextAction, UpdateTarget checks whether the global Screen object’s ActiveConrol property is assigned. If there is an active control, UpdateTarget sets Enabled to True. If not, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

THelpContextAction


THelpOnHelp
 VCL Reference

THelpOnHelp

Hierarchy	Properties	Methods	Events	Using THelpOnHelp	See also

THelpOnHelp brings up a help topic on how to use Help.

Unit

StdActns

Description

Add THelpOnHelp to an action list to allow users to bring up the help system that describes how to use help. Controls such as menu items and tool buttons linked to this action cause the application to send the default help system a command to display its help.

Note that on recent versions of Windows with a default help system of WinHelp, this brings up an HTML help file that does not describe the WinHelp system.


 VCL Reference

THelpOnHelp properties

THelpOnHelp	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THelpOnHelp properties

THelpOnHelp	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THelpOnHelp events

THelpOnHelp	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THelpOnHelp events

THelpOnHelp	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THelpOnHelp methods

THelpOnHelp	Alphabetically	Legend

In THelpOnHelp

ExecuteTarget

Derived from THelpAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THelpOnHelp methods

THelpOnHelp	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THelpOnHelp.ExecuteTarget
 VCL Reference

THelpOnHelp.ExecuteTarget

THelpOnHelp 	See also

Brings up the help system’s help file.

procedure ExecuteTarget(Target: TObject); override;

Description

This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget calls the application’s HelpCommand method, telling it to display the Help system’s own help file.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

THelpOnHelp


THelpTopicSearch
 VCL Reference

THelpTopicSearch

Hierarchy	Properties	Methods	Events	Using THelpTopicSearch	See also

THelpTopicSearch brings up the help index.

Unit

StdActns

Description

Add THelpTopicSearch to an action list to allow users to bring up the help index. Controls such as menu items and tool buttons linked to this action cause the application to send the default help system a command to display the help index.


 VCL Reference

THelpTopicSearch properties

THelpTopicSearch	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THelpTopicSearch properties

THelpTopicSearch	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THelpTopicSearch events

THelpTopicSearch	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THelpTopicSearch events

THelpTopicSearch	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THelpTopicSearch methods

THelpTopicSearch	Alphabetically	Legend

In THelpTopicSearch

ExecuteTarget

Derived from THelpAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

HasParent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THelpTopicSearch methods

THelpTopicSearch	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THelpTopicSearch.ExecuteTarget
 VCL Reference

THelpTopicSearch.ExecuteTarget

THelpTopicSearch 	See also

Displays the Help Topics dialog with the index tab selected.

procedure ExecuteTarget(Target: TObject); override;

Description

This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget calls the application’s HelpCommand method, telling it to display the Help index.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

THelpTopicSearch


THintAction
 VCL Reference

THintAction

Hierarchy	Properties	Methods	Events	Using THintAction	See also

THintAction is the action that executes when the user pauses the mouse over a control or menu item that has a hint.

Unit

StdActns

Description

Do not use THintAction in an action manager or action list the way you would use other predefined actions. THintAction is not intended to work with a client control. Rather, it is used by the application object.

When the user pauses the mouse over a control or menu item that defines its Hint property, the application responds in one of two ways:

If the application has an OnHint event handler, it generates an OnHint event.

If there is no OnHint event handler, the application executes a THintAction object.

When THintAction executes, it calls the ExecuteAction method of potential target controls until a control is found to respond to the action. Some controls, such as TStatusBar, override the ExecuteAction method to respond to THintAction.

Component writers can override the ExecuteAction method of a new component to respond to THintAction by displaying hint messages. Such an ExecuteAction method might look like the following:

function TMyControl.ExecuteAction(Action: TBasicAction): Boolean;

var

  HintText: string;

begin

  if Action is THintAction then

  begin

    HintText := THintAction(Action).Hint;

    { do something to display the hint text }

    Result := True;

  end

  else Result := inherited ExecuteAction(Action);

end;


 VCL Reference

THintAction properties

THintAction	Alphabetically	Legend

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THintAction properties

THintAction	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

THintAction events

THintAction	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

THintAction events

THintAction	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

THintAction methods

THintAction	Alphabetically	Legend

In THintAction

Create

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

ExecuteTarget

HandlesTarget

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THintAction methods

THintAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


THintAction.Create
 VCL Reference

THintAction.Create

THintAction	See also

Creates an instance of THintAction.

constructor Create(AOwner: TComponent); override;

Description

Typically, you do not need to create THintAction instances. THintAction is created by the application object when it detects the need to display a hint.

You can, however, create a THintAction object, set its Hint property, and then call its Execute method to cause other controls in the application (such as status bars) to display a message for some application-generated condition (such as a status message).

AOwner is the component, typically the application object, that is responsible for freeing the THintAction object.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

THintAction


THintWindow
 VCL Reference

THintWindow

Hierarchy	Properties	Methods	See also

THintWindow implements the small pop-up window that appears over a control at runtime when the control has its ShowHint property set to True.

Unit

Controls

Description

Use THintWindow to display a Help Hint pop-up window directly from an application. Override THintWindow to customize the window that appears automatically for controls with their ShowHint property set to True. After overriding THintWindow to create a new derived type, assign the new type to the global HintWindowClass variable at application startup, so that the new hint window type is used for Help Hints.

The hint window’s BiDiMode is always set to the BiDiMode of the control that activates it. If the mode is bdRightToLeft, then the hint is left-aligned to the cursor.


 VCL Reference

THintWindow Properties

THintWindow	Alphabetically	Legend

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THintWindow Properties

THintWindow	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

THintWindow methods

THintWindow	Alphabetically	Legend

In THintWindow

ActivateHint

ActivateHintData

CalcHintRect

Create

IsHintMsg

ReleaseHandle

Derived from TCustomControl

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THintWindow methods

THintWindow	By object	Legend

ActivateHint

ActivateHintData

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CalcHintRect

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsHintMsg

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

ReleaseHandle

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


THintWindow.ActivateHint
 VCL Reference

THintWindow.ActivateHint

THintWindow	See also

Displays the hint window.

procedure ActivateHint(Rect: TRect; const AHint: string); virtual;

Description

Call ActivateHint to display the hint window at the coordinates provided by the Rect parameter. If the Rect parameter appears off screen, ActivateHint moves the hint window to the closest approximation to the coordinates supplied by Rect that appears entirely on screen. ActivateHint sets the Caption property to the AHint parameter before showing the window, so that the AHint string appears to the user.

After an application displays a hint window, it automatically deactivates it after a time period has elapsed, or when it receives a message that requires hiding the hint message. To hide the hint window that is brought up automatically by the application, use the HideHint method of the global Application object. To hide a hint window that is activated directly by calling ActivateHint, use the ReleaseHandle method.


THintWindow.ActivateHintData
 VCL Reference

THintWindow.ActivateHintData

THintWindow	See also

Displays the hint window using a provided data value.

procedure ActivateHintData(Rect: TRect; const AHint: string; AData: Pointer); virtual;

Description

Call ActivateHintData to display the hint window at the coordinates provided by the Rect parameter. The ActivateHintData method for THintWindow sets the Caption property to the AHint parameter and ignores the AData parameter. Descendant classes can override this method to combine the AHint and AData parameters into a customized Hint value.

After an application displays a hint window, it automatically deactivates it after a time period has elapsed, or when it receives a message that requires hiding the hint message. To hide the hint window that is brought up automatically by the application, use the HideHint method of the global Application object. To hide a hint window that is activated directly by calling ActivateHint, use the ReleaseHandle method.


THintWindow.CalcHintRect
 VCL Reference

THintWindow.CalcHintRect

THintWindow	See also

Returns the size needed to display a given hint.

function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; virtual;

Description

Call CalcHintRect to determine the size needed to display a hint window for the string and data supplied by the AHint and AData parameters. The MaxWidth parameter limits how wide the Hint window can grow before the text wraps to a new line.


THintWindow.Create
 VCL Reference

THintWindow.Create

THintWindow	See also

Creates and initializes an instance of THintWindow.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a hint window at runtime. Hint windows activated by the application in response to the ShowHint property of a control are created automatically.


THintWindow.IsHintMsg
 VCL Reference

THintWindow.IsHintMsg

THintWindow	See also

Determines whether an application message requires hiding the hint window.

type

  TMsg = packed record

    hwnd: HWND;

    message: UINT;

    wParam: WPARAM;

    lParam: LPARAM;

    time: DWORD;

    pt: TPoint;

  end;

function IsHintMsg(var Msg: TMsg): Boolean; virtual;

Description

Call IsHintMsg to determine whether the message specified by the Msg parameter requires hiding the hint window. Upon seeing a mouse, keyboard, command, or activation message, IsHintMsg returns True. The global Application object calls IsHintMsg to check messages while the hint window is on the screen, and hides the window if IsHintMsg returns True.


THintWindow.ReleaseHandle
 VCL Reference

THintWindow.ReleaseHandle

THintWindow	See also

Destroys the window displayed by THintWindow.

procedure ReleaseHandle;

Description

Call ReleaseHandle to destroy a hint window that was activated by directly calling the ActivateHint method. Hint windows activated automatically by the application object are deactivated by the application as well.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

THintWindow


THotKey
 VCL Reference

 THotKey

Hierarchy	Properties	Methods	Events	Using THotKey	Example

THotKey is a wrapper for a Windows Common Control hot key.

Unit

ComCtrls

Description

THotKey implements the generic behavior introduced in TCustomHotKey. THotKey publishes many of the properties inherited from TCustomHotKey, but does not introduce any new behavior.

Use THotKey to create key combinations that can be used as a shortcut.


 VCL Reference

THotKey properties

THotKey	Alphabetically	Legend

Derived from TCustomHotKey

AutoSize

HotKey

InvalidKeys

Modifiers

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

THotKey properties

THotKey	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoSize

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotKey

InvalidKeys

Left

LRDockWidth

Modifiers

Name

Owner

Parent

ParentBiDiMode

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

THotKey events

THotKey	Alphabetically	Legend

Derived from TCustomHotKey

OnChange

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

THotKey events

THotKey	By object	Legend

OnChange

OnContextPopup

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

THotKey methods

THotKey	Alphabetically	Legend

Derived from TCustomHotKey

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

THotKey methods

THotKey	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomHotKey

THotKey


TIconOptions
 VCL Reference

TIconOptions

Hierarchy	Properties	Methods	See also

TIconOptions describes how the icons in a list view should be arranged.

Unit

ComCtrls

Description

Use TIconOptions with a list view object that has a ViewStyle of vsIcon or vsSmallIcon. The IconOptions property of the view contains a TIconOptions object that determines the arrangement of the icons.


 VCL Reference

TIconOptions properties

TIconOptions	Alphabetically	Legend

In TIconOptions

Arrangement

AutoArrange

WrapText


 VCL Reference

TIconOptions properties

TIconOptions	By object	Legend

Arrangement

AutoArrange

WrapText


TIconOptions.Arrangement
 VCL Reference

TIconOptions.Arrangement

TIconOptions	See also

Determines where the items are to be aligned in the view.

type TIconArrangement = (iaTop, iaLeft);

property Arrangement: TIconArrangement;

Description

Set Arrangement to indicate whether the view should display icon entries in rows or columns. Arrangement has no effect on the arrangement of entries in the view when the ViewStyle is not vsIcon or vsSmallIcon. These are the possible values of Arrangement:

Value	Meaning

iaTop	Items are aligned left to right in rows at the top of the view control

iaLeft	Items are aligned in columns top to bottom at the left of the view control


TIconOptions.AutoArrange
 VCL Reference

TIconOptions.AutoArrange

TIconOptions	See also

Determines if icons in a view are automatically rearranged when an item is added, removed, or moved.

property AutoArrange: Boolean;

Description

Set AutoArrange to specify whether the view should rearrange its items whenever changes are made. If AutoArrange is True, the icons are automatically arranged. If AutoArrange is False, the icons are not arranged until the Arrange method of the view is called.


TIconOptions.WrapText
 VCL Reference

TIconOptions.WrapText

TIconOptions	See also

Determines whether the icon caption is displayed all on one line, or if it can wrap.

property WrapText: Boolean;

Description

Set WrapText to True to have the caption of icons wrap rather than display on one line when it exceeds the width of the icon.


 VCL Reference

TIconOptions methods

TIconOptions	Alphabetically	Legend

In TIconOptions

Create

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIconOptions methods

TIconOptions	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TIconOptions.Create
 VCL Reference

TIconOptions.Create

TIconOptions	See also

Creates an instance of TIconOptions.

constructor Create(AOwner: TCustomListView);

Description

Do not call Create directly in an application. The properties of TIconOptions are only valid when it is owned by a view object. The view instantiates a TIconOptions object to represent the arrangement properties of its icon views.

After calling the inherited constructor, Create initializes

Arrangement to iaTop.

AutoArrange to False.

WrapText to True.


Hierarchy

TObject

TPersistent

TIconOptions


IComponentEditor
 VCL Reference

IComponentEditor

Hierarchy	Methods	See also

IComponentEditor is the interface that the form designer uses to communicate with component editors.

Unit

DesignIntf

Description

When you create your own component editors, they must meet two criteria:

They must be descendants of TBaseComponentEditor.

They must implement the IComponentEditor interface.

The forms designer uses the methods on the IComponentEditor interface to interact with component editors.

Typically, component editors are derived from TComponentEditor, which supplies a default implementation for IComponentEditor, or TDefaultEditor, which also supplies a default implementation of the edit method to bring up an event handler in the edit window.


 VCL Reference

IComponentEditor methods

IComponentEditor	Alphabetically	Legend

In IComponentEditor

Copy

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

PrepareItem

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IComponentEditor methods

IComponentEditor	By object	Legend

_AddRef

_Release

Copy

Edit

ExecuteVerb

GetComponent

GetDesigner

GetVerb

GetVerbCount

IsInInlined

PrepareItem

QueryInterface


IComponentEditor.Copy
 VCL Reference

IComponentEditor.Copy

IComponentEditor	See also

Provides an opportunity to copy the component to the clipboard in custom formats.

procedure Copy;

Description

The forms designer calls Copy when the user tries to copy the component to the clipboard.  When Copy is called, the component's filed image is already on the Clipboard.

Implement Copy to copy a different clipboard format, which is ignored by the designer but might be recognized by another application.


IComponentEditor.Edit
 VCL Reference

IComponentEditor.Edit

IComponentEditor	See also

Responds when the user double-clicks the component in the form designer.

procedure Edit;

Description

The form designer calls Edit when the user double-clicks the component.

Implement the Edit method to provide a response when the user double-clicks the component.  For example, the Edit method can bring up a dialog or design expert.


IComponentEditor.ExecuteVerb
 VCL Reference

IComponentEditor.ExecuteVerb

IComponentEditor	See also

Performs the action of a specified verb.

procedure ExecuteVerb(Index: Integer);

Description

The form designer calls ExecuteVerb when the user selects the verb that is returned by GetVerb(Index).  This verb is the string that appears in the corresponding position of the component’s context menu.

Implement GetVerb to provide a set of verbs, or menu strings, that are added to the context menu which appears when the user right-clicks the component.  Implement ExecuteVerb to provide a response to each of these verbs.


IComponentEditor.GetComponent
 VCL Reference

IComponentEditor.GetComponent

IComponentEditor	See also

Returns a reference to the component on which the editor operates.

function GetComponent: TComponent;

Description

A component editor is created for each instance of the registered component class when it is selected in the form designer.  GetComponent returns the selected instance. This component is associated with a component editor through its constructor.


IComponentEditor.GetDesigner
 VCL Reference

IComponentEditor.GetDesigner

IComponentEditor	See also

Returns the interface for the form designer.

function GetDesigner: IDesigner;

Description

GetDesigner returns the interface of the form designer. This interface is supplied to a component editor as a parameter to the constructor.


IComponentEditor.GetVerb
 VCL Reference

IComponentEditor.GetVerb

IComponentEditor	See also

Returns the string that corresponds to a specified position of the component’s context menu.

function GetVerb(Index: Integer): string;

Description

The form designer calls GetVerb iteratively to build the context menu that appears when the user right-clicks the component.

When implementing GetVerb, add an ampersand (&) to a verb to cause the following character to appear underlined in the context menu and to act as a shortcut key for selecting the menu item.  Be sure to add ellipsis (...) to the end of a verb if its corresponding action is to bring up a dialog.


IComponentEditor.GetVerbCount
 VCL Reference

IComponentEditor.GetVerbCount

IComponentEditor	See also

Returns the number of menu strings that the component editor adds to the context menu.

function GetVerbCount: Integer;

Description

The form designer calls GetVerbCount when the user right-clicks the component in order to determine the number of menu items that should be added to the context menu.  It then adds the menu items by calling GetVerb for every value from 0 to GetVerbCount - 1.


IComponentEditor.IsInInlined
 VCL Reference

IComponentEditor.IsInInlined

IComponentEditor	See also

Indicates whether the component has the csInline flag set in its ComponentState property.

function IsInInlined: Integer;

Description

IsInInlined indicates whether the component being edited is inside a top-level component that can be modified at design time and also embedded in a form.

For instance, when a component is used on a Frame and that Frame is dropped on a Form, IsInInlined returns True for the component when it is embedded in the Frame on the Form, but returns False when the component that is only on the Frame.


IComponentEditor.PrepareItem
 VCL Reference

IComponentEditor.:PrepareItem

IComponentEditor	See also

Allows the component editor to modify menu items as they are added to the context menu.

procedure PrepareItem(Index: Integer; const AItem: IMenuItem); virtual;

Description

The form designer calls PrepareItem for each verb when it constructs the context menu. This method lets the component editor make any modifications to the menu item for each verb, including adding subitems or removing the item from the context menu.

Index identifies the current verb that the form designer is adding to the context menu. This is the same index as appears for the command in the GetVerb and ExecuteVerb methods.

AItem is an interface to the menu item created by the form designer for the current verb. To add subitems, call the AddItem method of this interface. To disable the item, set the Enabled property to False. To suppress the menu item altogether, set its Visible property to False.


Hierarchy

IInterface

IComponentEditor


TIcon
 VCL Reference

TIcon

Hierarchy	Properties	Methods	Events	See also

TIcon is an encapsulation of a Windows icon.

Unit

Graphics

Description

Use TIcon to represent one of the icons in an image list. Assign an icon to objects that have an Icon property, such as TForm or TPicture.

Icon objects represent the value loaded from a Windows icon file (.ICO file). Draw an icon on a canvas, using the Draw method of the TCanvas object. Icons do not stretch, so do not use TCanvas.StretchDraw with an icon.

Note:	TIcon can be used to display the value of a multi-resolution (>16 color) icon. However, it can not support the creation of multi-resolution icons, nor the resizing of the image after it is loaded from a file or stream.


 VCL Reference

TIcon properties

TIcon	Alphabetically	Legend

In TIcon

Empty

Handle

Height

Transparent

Width

Derived from TGraphic

Modified

Palette

PaletteModified


 VCL Reference

TIcon properties

TIcon	By object	Legend

Empty

Handle

Height

Modified

Palette

PaletteModified

Transparent

Width


TIcon.Empty
 VCL Reference

TIcon.Empty

TIcon

Indicates whether the icon object contains an icon.

property Empty: Boolean;

Description

If Empty is True, no icon has been loaded into the icon object. If Empty is False, the icon object contains an icon.


TIcon.Handle
 VCL Reference

TIcon.Handle

TIcon	See also

Provides access to the Windows GDI icon handle.

property Handle: HIcon;

Description

Use Handle to specify the icon when using a Windows API function that requires the handle of an icon object. The Handle property is nil if the icon has not been loaded.

Call the ReleaseHandle method before changing the icon image by setting the Handle property. The icon image can also be loaded by assigning another icon object or using the LoadFromClipboardFormat, LoadFromFile, or LoadFromStream method.


TIcon.Height
 VCL Reference

TIcon.Height

TIcon	See also	Example

Specifies the vertical size of the icon in pixels.

property Height: Integer;

Description

Read Height to determine the height of the icon.

When setting Height, the value is used as a “suggestion” rather than an absolute. This allows the TIcon object to optimize the resolution of the underlying image to most closely match the desired height and width.

Note:	TIcon does not support the creation of multi-resolution icons, nor resizing the image after the Windows resource is loaded into memory. Thus, it is only meaningful to set Height before a multi-resolution icon is loaded from a file or stream.


TIcon.Transparent
 VCL Reference

TIcon.Transparent

TIcon

Indicates whether the icon covers its rectangular area.

property Transparent: Boolean;

Description

Transparent specifies whether that the icon be drawn transparently. TIcon overrides the write method of the Transparent property to essentially make the property read-only, so setting the property for this object does not change their behavior.


TIcon.Width
 VCL Reference

TIcon.Width

TIcon	See also	Example

Specifies the horizontal size of the icon in pixels.

property Width: Integer;

Description

Read Width to determine the width of the icon.

When setting Width, the value is used as a “suggestion” rather than an absolute. This allows the TIcon object to optimize the resolution of the underlying image to most closely match the desired height and width.

Note:	TIcon does not support the creation of multi-resolution icons, nor resizing the image after the Windows resource is loaded into memory. Thus, it is only meaningful to set Width before a multi-resolution icon is loaded from a file or stream.


 VCL Reference

TIcon events

TIcon	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 VCL Reference

TIcon events

TIcon	By object	Legend

OnChange

OnProgress


 VCL Reference

TIcon methods

TIcon	Alphabetically	Legend

In TIcon

Assign

Create

Destroy

HandleAllocated

LoadFromClipboardFormat

LoadFromStream

ReleaseHandle

SaveToClipboardFormat

SaveToStream

Derived from TGraphic

LoadFromFile

SaveToFile

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIcon methods

TIcon	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

QueryInterface

ReleaseHandle

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TIcon.Assign
 VCL Reference

TIcon.Assign

TIcon	See also

Copies an icon image from another TIcon object.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to copy another icon object. Assign copies the icon image from the Source parameter if it is another TIcon object. Otherwise, Assign calls the inherited method, which copies the icon image from any source object that specifies how to copy to a TIcon in its AssignTo method.


TIcon.Create
 VCL Reference

TIcon.Create

TIcon	See also	Example

Creates an instance of TIcon.

constructor Create; override;

Description

Call Create to create an empty icon object. Once an image has been read into the icon from a file or stream, or by assigning another icon object, the icon can be drawn on a canvas or added to an image list. Do not create an icon object for setting the icon property of a form or picture. These objects create a TIcon object in their own constructors. Instead, use the LoadFromFile, LoadFromStream, or LoadFromClipboardFormat method on the TIcon object returned when reading the Icon property.


TIcon.Destroy
 VCL Reference

TIcon.Destroy

TIcon	See also

Destroys an instance of TIcon.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TIcon reference is not nil, and only then calls Destroy.

Destroy releases the Windows icon handle before the object is freed.


TIcon.HandleAllocated
 VCL Reference

TIcon.HandleAllocated

TIcon	See also

Indicates whether the TIcon object has acquired a handle to the underlying GDI object.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine whether the Handle property is set to an HICON value. HandleAllocated indicates whether the underlying GDI object has already been created. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, it automatically creates an icon and returns its handle if the underlying GDI object does not already exist.


TIcon.LoadFromClipboardFormat
 VCL Reference

TIcon.LoadFromClipboardFormat

TIcon	See also

Prevents applications from loading icons from the clipboard.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;

Description

LoadFromClipboardFormat is overridden in TIcon because the clipboard format is not supported.


TIcon.LoadFromStream
 VCL Reference

TIcon.LoadFromStream

TIcon	See also

Loads the icon from a stream.

procedure LoadFromStream(Stream: TStream);

Description

Use LoadFromStream to read the icon image from a stream. Set the Stream parameter to a stream object that provides access to the memory image of the icon. To load the icon from a .ico file, use the LoadFromFile method. To load the icon from the Clipboard, use the LoadFromClipboardFormat method.


TIcon.ReleaseHandle
 VCL Reference

TIcon.ReleaseHandle

TIcon	See also

Releases the Windows GDI object represented by the icon.

function ReleaseHandle: HIcon;

Description

Call ReleaseHandle to release the resources used to represent the icon. ReleaseHandle sets the Handle property to nil.

ReleaseHandle informs the TIcon instance that it is no longer responsible for destroying the icon handle.


TIcon.SaveToClipboardFormat
 VCL Reference

TIcon.SaveToClipboardFormat

TIcon	See also

Prevents applications from saving icons to the clipboard.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); override;

Description

SaveToClipboardFormat is overridden in TIcon because the format is not supported for the Clipboard.


TIcon.SaveToStream
 VCL Reference

TIcon.SaveToStream

TIcon	See also

Saves the icon to a stream.

procedure SaveToStream(Stream: TStream);

Description

Use SaveToStream to write the icon image to a stream. Specify the Stream parameter as the stream object that receives the memory image of the icon. To write the icon to a .ico file, use the SaveToFile method. To write the icon to the Clipboard, use the SaveToClipboardFormat method.


Hierarchy

TObject

TPersistent

TInterfacedPersistent

TGraphic

TIcon


TIconImage
 VCL Reference

TIconImage

Hierarchy	Methods	See also

TIconImage is the internal representation of the bitmap image for a TIcon object.

Unit

Graphics

Description

TIconImage is used for internal implementation only in Delphi. It represents the internal image of the bitmap encapsulated by the TIcon object. All of the data and methods introduced in TIconImage are private. They contain information about the specific icon resource, including pointers to the standard HICON structures defined by Windows. TIconImage is referenced in the constructor of the TIcon object when the icon image is created.


 VCL Reference

TIconImage methods

TIconImage	Alphabetically	Legend

In TIconImage

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIconImage methods

TIconImage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TIconImage.Destroy
 VCL Reference

TIconImage.Destroy

TIconImage	See also

Destroys the TIconImage instance and frees its memory.

destructor Destroy; override;

Description

You do not need to destroy the icon image. The TIconImage object is automatically destroyed by the icon object.


Hierarchy

TObject

TSharedImage

TIconImage


IDockManager
 VCL Reference

IDockManager

Hierarchy	Methods	See also

IDockManager is the interface for docking managers.

Unit

Controls

Description

IDockManager handles the tasks of inserting and removing controls when they are docked to or undocked from a windowed control, including details such as positioning controls and any painting that is associated with docking operations. IDockManager is the type of a windowed control’s DockManager property.

Each docking manager is associated with a single TWinControl object. To use a docking manager, set the windowed control’s UseDockManager property to True.  An application can explicitly assign an object that implements the IDockManager interface as the value of a windowed control’s DockManager property, or it can let the windowed control create its own docking manager.


 VCL Reference

IDockManager methods

IDockManager	Alphabetically	Legend

In IDockManager

BeginUpdate

EndUpdate

GetControlBounds

InsertControl

LoadFromStream

PaintSite

PositionDockRect

RemoveControl

ResetBounds

SaveToStream

SetReplacingControl

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDockManager methods

IDockManager	By object	Legend

_AddRef

_Release

BeginUpdate

EndUpdate

GetControlBounds

InsertControl

LoadFromStream

PaintSite

PositionDockRect

QueryInterface

RemoveControl

ResetBounds

SaveToStream

SetReplacingControl


IDockManager.BeginUpdate
 VCL Reference

IDockManager.BeginUpdate

IDockManager	See also

Responds when the docked controls are about to change.

procedure BeginUpdate;

Description

BeginUpdate is called before controls are docked or undocked.

Once all docking or undocking is complete, the EndUpdate method is called so that the dock manager can make any final adjustments to reflect the final set of docked controls. Every call to BeginUpdate should be paired with a call to EndUpdate. BeginUpdate/EndUpdate pairs can be nested.


IDockManager.EndUpdate
 VCL Reference

IDockManager.EndUpdate

IDockManager	See also

Responds when the docked controls have finished changing.

procedure EndUpdate;

Description

EndUpdate is called after a series of changes to the docked controls is completed. It checks that every previous call to the BeginUpdate method has been matched with an EndUpdate call. If so, it performs any final adjustments to the docked controls, now that they are all in place.

Each call to EndUpdate should be paired by a call to BeginUpdate, which is made before docking or undocking controls. BeginUpdate/EndUpdate pairs can be nested.


IDockManager.GetControlBounds
 VCL Reference

IDockManager.GetControlBounds

IDockManager	See also

Returns the dimensions allotted to a control that is already docked.

procedure procedure GetControlBounds(Control: TControl; out CtlBounds: TRect);

Description

GetControlBounds returns the dimensions of the zone in which a control is currently docked.

Control is the currently docked control.

CtlBounds returns the dimensions of the zone in which Control is docked. If Control does not specify an object that is currently docked in the windowed control that uses this dock manager, CtlBounds returns (0,0,0,0).


IDockManager.InsertControl
 VCL Reference

IDockManager.InsertControl

IDockManager	See also

Handles the docking of a control into the associated windowed control.

procedure InsertControl(Control: TControl; InsertAt: TAlign; DropCtl: TControl); virtual;

Description

InsertControl is called immediately after the windowed control that uses the dock manager adds a new control to its list of docked controls.

Control is the newly docked control.

InsertAt indicates where Control was docked within the windowed control.

DropCtl is the windowed control in which Control was docked.

InsertControl handles any tasks the dock manager needs to manage the layout and appearance of docked controls, forcing a repaint of the windowed control if necessary.


IDockManager.LoadFromStream
 VCL Reference

IDockManager.LoadFromStream

IDockManager	See also

Lays out a set of docked controls read from a stream.

procedure LoadFromStream(Stream: TStream); virtual;

Description

LoadFromStream updates the dock manager to reflect the set of docked controls it reads from a stream. The stream must reflect the same format as is written by the SaveToStream method.

Stream is the stream object to use for reading the docked controls.


IDockManager.PaintSite
 VCL Reference

IDockManager.PaintSite

IDockManager	See also

Paints the elements that surround all docked controls.

procedure PaintSite(DC: HDC); virtual;

Description

Windowed controls that use a docking manager call PaintSite when they need to paint their docked child controls.

DC is the handle to the device context to use when rendering the visual elements that surround the docked controls.

PaintSite paints the visual elements associated with the docked controls other than the docked controls themselves.


IDockManager.PositionDockRect
 VCL Reference

IDockManager.PositionDockRect

IDockManager	See also

Computes the dimensions of a new docking zone.

procedure PositionDockRect(Client, DropCtl: TControl; DropAlign: TAlign; var DockRect: TRect); virtual;

Description

The control that is being dragged calls PositionDockRect from its own PositionDockRect method when it is being docked to a windowed control that uses a dock manager. It allows the dock manager to indicate where a specified control would appear if the user released the mouse.

Client is the control that is being dragged to a docking position.

DropCtl is the windowed control into which Client will be docked.

DropAlign indicates where Control is to be docked within the windowed control.

DockRect returns the boundaries of the docking zone where Control can be docked.


IDockManager.RemoveControl
 VCL Reference

IDockManager.RemoveControl

IDockManager	See also

Handles the undocking of a control from the associated windowed control.

procedure RemoveControl(Control: TControl; virtual;

Description

The windowed control that uses the dock manager calls RemoveControl when one of its docked controls is undocked.

Control is the control that was just undocked.

RemoveControl performs any internal adjustments that are needed now that the control is no longer docked, forcing a repaint of the windowed control if necessary.


IDockManager.ResetBounds
 VCL Reference

IDockManager.ResetBounds

IDockManager

Recomputes the layout of docked controls.

procedure ResetBounds(Force: Boolean); virtual;

Description

ResetBounds updates the layout of the docked controls and their surrounding docking zones, based on the current dimensions of the associated windowed control. It is used to update the dock manager to reflect current conditions (for example, when the windowed control that uses the dock manager is resized).

Force indicates whether ResetBounds should recompute the layout if the dimensions of the associated windowed control have not changed. When Force is False, ResetBounds only updates the layout of docked controls if the dimensions of DockSite have changed. When Force is True, ResetBounds updates the layout of docked controls even if the dimensions of the associated windowed control have not changed.


IDockManager.SaveToStream
 VCL Reference

IDockManager.SaveToStream

IDockManager	See also

Saves a list of the set of docked controls and their positions to a stream.

procedure SaveToStream(Stream: TStream); virtual;

Description

SaveToStream writes enough information to a stream that the dock manager can reconstruct the docking zone structure when it reads that information back at a later time.

Stream is the stream object to use for writing the information.

Note:	To reconstruct the docking structure at a later time, use the LoadFromStream method.


IDockManager.SetReplacingControl
 VCL Reference

IDockManager.SetReplacingControl

IDockManager	See also

Prepares the dock manager for replacing one docked control with another.

procecure SetReplacingControl(Control: TControl);

Description

SetReplacingControl is called from a control’s ReplaceDockedControl method. It informs the dock manager that the next control that is removed will be immediately replaced by a different control. It allows the dock manager to optimize the work of the RemoveControl and InsertControl methods.


Hierarchy

TObject

TInterfacedObject

IDockManager


IDesignerHook
 VCL Reference

IDesignerHook

Hierarchy	Properties	Methods	See also

IDesignerHook is an interface that allows component writers to interact with the form designer in the IDE.

Unit

Forms

Description

IDesignerHook provides access to the form currently under construction in the form designer, and influences the behavior of the designer by specifying whether the object under construction is a form (as opposed to a composite component), drawing the grid that assists in layout, and so on.

Component writers can access the current IDesignerHook interface using the Designer property of a form.


 VCL Reference

IDesignerHook properties

IDesignerHook	Alphabetically	Legend

In IDesignerHook

Form

IsControl


 VCL Reference

IDesignerHook properties

IDesignerHook	By object	Legend

Form

IsControl


IDesignerHook.Form
 VCL Reference

IDesignerHook.Form

IDesignerHook	See also

Provides a reference to the form currently being designed.

property Form: TCustomForm;

Description

Use Form to access the form, if any, that is being designed. When the user specifies changes in the form designer, the changes can be made to the form specified by the Form property.

Note:	Not every designer has a form.  For example, when the designer is used for a data module, remote data module, or active form, the Form property should not be used. Instead, use the object returned by GetRoot.


IDesignerHook.IsControl
 VCL Reference

IDesignerHook.IsControl

IDesignerHook	See also

Specifies whether the form is in its form state or its control state.

property IsControl: Boolean;

Description

If the designer is used to create a control, rather than a form, set IsControl to True when the user finishes designing the control.


 VCL Reference

IDesignerHook methods

IDesignerHook	Alphabetically	Legend

In IDesignerHook

GetCustomForm

GetIsControl

GetRoot

IsDesignMsg

PaintGrid

SetCustomForm

SetIsControl

UniqueName

ValidateRename

Derived from IDesignerNotify

Modified

Notification

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDesignerHook methods

IDesignerHook	By object	Legend

_AddRef

_Release

GetCustomForm

GetIsControl

GetRoot

IsDesignMsg

Modified

Notification

PaintGrid

QueryInterface

SetCustomForm

SetIsControl

UniqueName

ValidateRename


IDesignerHook.GetCustomForm
 VCL Reference

IDesignerHook.GetCustomForm

IDesignerHook	See also

Specifies the value returned when the Form property is read.

function GetCustomForm: TCustomForm;

Description

Implement GetCustomForm to specify the value returned when the Form property is read.


IDesignerHook.GetIsControl
 VCL Reference

IDesignerHook.GetIsControl

IDesignerHook	See also

Specifies the value returned when the IsControl property is read.

function GetIsControl: Boolean;

Description

Implement GetIsControl to specify the value returned when the IsControl property is read.


IDesignerHook.GetRoot
 VCL Reference

IDesignerHook.GetRoot

IDesignerHook	See also

Returns the current entity being edited by the form designer.

function GetRoot: TComponent;

Description

Call GetRoot to obtain the object the form designer is working on. If this object is a descendant of TCustomForm, GetRoot returns the value of the Form property.

Use GetRoot rather than the Form property, to ensure that code works even when editing a data module, remote data module, active form, or other entity that is not a descendant of TCustomForm.


IDesignerHook.IsDesignMsg
 VCL Reference

IDesignerHook.::IsDesignMsg

IDesignerHook	See also

Determines when the designer should handle a Windows message.

function IsDesignMsg(Sender: TControl; var Message: TMessage): Boolean;

Description

IsDesignMsg is called for each message sent to a component in the designer. This method returns True if the message is a design message, meaning one the designer should handle for the component.


IDesignerHook.PaintGrid
 VCL Reference

IDesignerHook.PaintGrid

IDesignerHook	See also

Paints the alignment grid on the form's canvas.

procedure PaintGrid;

Description

Forms that are associated with a designer call the PaintGrid method in response to Windows paint messages. If there is no designer associated with the form, the form’s Paint method is called instead.


IDesignerHook.SetCustomForm
 VCL Reference

IDesignerHook.::SetCustomForm

IDesignerHook	See also

Specifies what happens when the Form property is set.

procedure SetCustomForm(Value: TCustomForm);

Description

Implement SetCustomForm to specify what happens when the Form property is set.


IDesignerHook.SetIsControl
 VCL Reference

IDesignerHook.::SetIsControl

IDesignerHook	See also

Specifies what happens when the IsControl property is set.

procedure SetIsControl(Value: Boolean);

Description

Implement SetIsControl specify what happens when the IsControl property is set.


IDesignerHook.UniqueName
 VCL Reference

IDesignerHook.UniqueName

IDesignerHook

Generates a unique name from a specified base string.

function UniqueName(const BaseName: string): string;

Description

Call UniqueName to automatically generate a unique name for a component. Specify the base string for the name by the BaseName parameter. UniqueName appends a number to BaseName to ensure that there are no name-space conflicts.


IDesignerHook.ValidateRename
 VCL Reference

IDesignerHook.ValidateRename

IDesignerHook	See also

Restricts the names that can be given to components on the form that is being designed.

ValidateRename(AComponent: TComponent; const CurName, NewName: string);

Description

Call ValidateRename to determine if the component specified by AComponent, which currently has the name specified by CurName, can be renamed to the string specified by NewName. This method is usually called by the form's ValidateRename method to provide tighter restrictions on renaming, such as prohibiting reserved words.


Hierarchy

IInterface

IDesignerNotify

IDesignerHook


IDesignerSelections
 VCL Reference

IDesignerSelections

Hierarchy	Properties	Methods	See also

IDesignerSelections represents a list of persistent objects.

Unit

DesignIntf

Description

The form designer uses IDesignerSelections to get or set a list of those objects that are selected.

IDesignerSelections provides properties and methods to

Add objects to the list.

Compare two lists of objects.

Access individual objects in the list.


 VCL Reference

IDesignerSelections properties

IDesignerSelections	Alphabetically	Legend

In IDesignerSelections

Count

Items


 VCL Reference

IDesignerSelections properties

IDesignerSelections	By object	Legend

Count

Items


IDesignerSelections.Count
 VCL Reference

IDesignerSelections.Count

IDesignerSelections	See also

Indicates the number of entries in the list.

property Count: Integer;

Description

Read Count to determine the number of entries in the Items array.  Use Count as an upper limit when iterating over all the objects in the list.

Count is a read-only property.  To increase the number of objects in the list, use the Add method.  Objects can not be removed from the list once they have been added.


IDesignerSelections.Items
 VCL Reference

IDesignerSelections.Items

IDesignerSelections	See also

Provides indexed access to the objects in the list.

property Items[Index: Integer]: TPersistent; default;

Description

Use Items to access a specific object in the list. The Index parameter indicates the index of the object, where 0 is the index of the first object, 1 is the index of the second object, and so on. Use Items with the Count property to iterate through all of the objects in the list.

To add objects to the Items array, use the Add method.  Once objects have been added, they can’t be deleted or rearranged.


 VCL Reference

IDesignerSelections methods

IDesignerSelections	Alphabetically	Legend

In IDesignerSelections

Add

Equals

Get

GetCount

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IDesignerSelections methods

IDesignerSelections	By object	Legend

_AddRef

_Release

Add

Equals

Get

GetCount

QueryInterface


IDesignerSelections.Add
 VCL Reference

IDesignerSelections.Add

IDesignerSelections	See also

Adds a new object to the end of the list.

function Add(const Item: TPersistent): Integer;

Description

Call Add to insert a new object at the end of the Items array. Add returns the index of the new item, where the first item in the list has an index of 0. Add increases the value of Count to reflect the addition of a new object.


IDesignerSelections.Equals
 VCL Reference

IDesignerSelections.Equals

IDesignerSelections	See also

Indicates whether the selections list is identical to another selections list.

function Equals(const List: IDesignerSelections): Boolean;

Description

Call Equals to determine whether the list specified by the List parameter contains exactly the same objects in the same order as this list. Equals returns False if the other list

Contains objects not in the Items array.

Contains a subset of the objects in the Items array.

Contains the same objects but in a different order.


IDesignerSelections.Get
 VCL Reference

IDesignerSelections.Get

IDesignerSelections	See also

Returns a specified item from the list.

function Get(Index: Integer): TPersistent;

Description

Get is the protected read access method for the Items property.

Index identifies the desired object by its position in the list, where 0 identifies the first position. Get returns the specified object.


IDesignerSelections.GetCount
 VCL Reference

IDesignerSelections.GetCount

IDesignerSelections	See also

Returns the value of the Count property.

function GetCount: Integer;

Description

GetCount is the protected read access method for the Count property.


Hierarchy

IInterface

IDesignerSelections

IDesignerSelections


IInterfaceList
 VCL Reference

IInterfaceList

Hierarchy	Properties	Methods	See also

IInterfaceList provides access to a list of interfaces.

Unit

Classes

Description

Use IInterfaceList to manage a list of interfaces. Typically, IInterfaceList is implemented by the TInterfaceList class.


 VCL Reference

IInterfaceList properties

IInterfaceList	Alphabetically	Legend

In IInterfaceList

Capacity

Count

Items


 VCL Reference

IInterfaceList properties

IInterfaceList	By object	Legend

Capacity

Count

Items


IInterfaceList.Capacity
 VCL Reference

IInterfaceList.Capacity

IInterfaceList	See also

Specifies the list capacity.

property Capacity: Integer;

Description

Use Capacity to determine the list capacity. Before adding many interfaces to the list, you can improve performance by setting Capacity to the final number of interfaces. This prevents the interface list from having to reallocate the list every time an interface is added.


IInterfaceList.Count
 VCL Reference

IInterfaceList.Count

IInterfaceList	See also

Specifies the number of interfaces in the list.

property Count: Integer;

Description

Use Count to determine the number of interfaces in the list.


IInterfaceList.Items
 VCL Reference

IInterfaceList.Items

IInterfaceList	See also

Provides direct access to an interface in the list.

property Items[Index: Integer]: IInterface; default;

Description

Use Items to directly access an interface in the list. Index identifies each interface by its position in the list, where 0 is the first item, 1 is the second item, and so on.


 VCL Reference

IInterfaceList methods

IInterfaceList	Alphabetically	Legend

In IInterfaceList

Add

Clear

Delete

Exchange

First

Get

GetCapacity

GetCount

IndexOf

Insert

Last

Lock

Put

Remove

SetCapacity

SetCount

Unlock

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IInterfaceList methods

IInterfaceList	By object	Legend

_AddRef

_Release

Add

Clear

Delete

Exchange

First

Get

GetCapacity

GetCount

IndexOf

Insert

Last

Lock

Put

QueryInterface

Remove

SetCapacity

SetCount

Unlock


IInterfaceList.Add
 VCL Reference

IInterfaceList.Add

IInterfaceList	See also

Adds an interface to the list.

function Add(const Item: IInterface): Integer;

Description

Call Add to add an interface to the list.


IInterfaceList.Clear
 VCL Reference

IInterfaceList.Clear

IInterfaceList	See also

Clears the interface list.

procedure Clear;

Description

Call Clear to remove all interfaces from the list.


IInterfaceList.Delete
 VCL Reference

IInterfaceList.Delete

IInterfaceList	See also

Deletes an interface from the list.

procedure Delete(Index: Integer);

Description

Call Delete to delete an interface from the list.


IInterfaceList.Exchange
 VCL Reference

IInterfaceList.Exchange

IInterfaceList	See also

Swaps the position of two interfaces in the list.

procedure Exchange(Index1, Index2: Integer);

Description

Call Exchange to move the interface at position Index1 so that it appears at position Index2 and move the interface at position Index2 so that it appears at position Index1. Index1 and Index2 identify two positions (zero offset) in the Items property array.


IInterfaceList.First
 VCL Reference

IInterfaceList.First

IInterfaceList	See also

Returns the first interface in the list.

function First: IInterface;

Description

Call First to obtain the first interface in the list.


IInterfaceList.Get
 VCL Reference

IInterfaceList.Get

IInterfaceList	See also

Returns a specified interface from the list.

function Get(Index: Integer): IInterface;

Description

Get is the read implementation of the Items property.

Index identifies which interface to return, where 0 is the first interface, 1 is the second interface, and so on.


IInterfaceList.GetCapacity
 VCL Reference

IInterfaceList.GetCapacity

IInterfaceList	See also

Returns the value of the Capacity property.

function GetCapacity: Integer;

Description

GetCapacity is the read implementation of the Capacity property.


IInterfaceList.GetCount
 VCL Reference

IInterfaceList.GetCount

IInterfaceList	See also

Returns the value of the Count property.

function GetCount: Integer;

Description

GetCount is the read implementation of the Count property.


IInterfaceList.IndexOf
 VCL Reference

IInterfaceList.IndexOf

IInterfaceList	See also

Returns the index of an interface.

function IndexOf(const Item: IInterface): Integer;

Description

Call IndexOf to obtain the index of an interface.


IInterfaceList.Insert
 VCL Reference

IInterfaceList.Insert

IInterfaceList	See also

Inserts an interface into the list at a specified position.

procedure Insert(Index: Integer; const Item: IInterface);

Description

Call Insert to insert an interface into the list. Item is the interface to insert, and Index indicates the position (zero-offset) where the interface should be added.


IInterfaceList.Last
 VCL Reference

IInterfaceList.Last

IInterfaceList	See also

Returns the last interface in the list.

function Last: IInterface;

Description

Call Last to obtain the last interface in the list.


IInterfaceList.Lock
 VCL Reference

IInterfaceList.Lock

IInterfaceList	See also

Prevents other threads from accessing the list.

procedure Lock;

Description

Call Lock to lock the list, preventing other threads from accessing the list.


IInterfaceList.Put
 VCL Reference

IInterfaceList.Put

IInterfaceList	See also

Replaces an interface in the list with a specified interface.

procedure Put(Index: Integer; const Item: IInterface);

Description

Put is the write implementation of the Items property.

Index is the index of the interface to replace.

Item is the interface that replaces the interface identified by Index.


IInterfaceList.Remove
 VCL Reference

IInterfaceList.Remove

IInterfaceList	See also

Removes an interface from the list.

function Remove(const Item: IInterface): Integer;

Description

Call Remove to remove an interface from the list.

Remove returns the index of the removed interface, or –1 if the interface was not found.


IInterfaceList.SetCapacity
 VCL Reference

IInterfaceList.SetCapacity

IInterfaceList	See also

Sets the value of the Capacity property.

procedure SetCapacity(NewCapacity: Integer);

Description

SetCapacity is the write implementation of the Capacity property.

NewCapacity is the new capacity for the interface list.


IInterfaceList.SetCount
 VCL Reference

IInterfaceList.SetCount

IInterfaceList	See also

Sets the value of the Count property.

procedure SetCount(NewCount: Integer);

Description

SetCount is the write implementation of the Count property.

NewCount is the new number of interfaces in the list.


IInterfaceList.Unlock
 VCL Reference

IInterfaceList.Unlock

IInterfaceList	See also

Unlocks the list, allowing other threads to access it.

procedure Unlock;

Description

Call Unlock to unlock the list so that other threads can have access to the interfaces it contains.


Hierarchy

IInterface

IInterfaceList


IInterface
 VCL Reference

IInterface

Hierarchy	Methods	Using IInterface	See also

IInterface is the base class for all Object Pascal interfaces.

Unit

System

Description

All Object Pascal interfaces descend from IInterface. It introduces three methods:

_AddRef and _Release, which handle reference counting for the interface. In Object Pascal code, the compiler automatically adds calls to these methods when you use interfaces.

QueryInterface, which returns the interface pointer for any specified interface if it is supported by the object that implements IInterface.

A default implementation for IInterface is provided by the TInterfacedObject class.


 VCL Reference

IInterface methods

IInterface	Alphabetically	Legend

In IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IInterface methods

IInterface	By object	Legend

_AddRef

_Release

QueryInterface


IInterface._AddRef
 VCL Reference

IInterface._AddRef

IInterface	See also

Increments the reference count for this interface.

function _AddRef: Integer; stdcall;

Description

The Object Pascal compiler automatically generates a call to _AddRef for every reference to this interface. For most implementations, _AddRef increments the reference count for the interface and returns the new reference count. When the caller is through with the interface, the compiler generates a call to the _Release method, which decrements the reference count. When the reference count drops to zero, the object is automatically freed.

Note:	Implementation objects can implement _AddRef and _Release so that they do not perform any reference counting. For such objects, the reference count never drops to zero and the object is not automatically freed. In these cases, it is the application’s responsibility to free the object.


IInterface._Release
 VCL Reference

IInterface._Release

IInterface	See also

Decrements the reference count for this interface.

function _Release: Integer; stdcall;

Description

The Object Pascal compiler automatically generates a call to _Release whenever a reference to this interface goes out of scope. For most implementations, _Release decrements the reference count for the interface and returns the new reference count. When the reference count drops to zero, the object is automatically freed.

Note:	Implementation objects can implement _Release so that it does not perform any reference counting. For such objects, the reference count never drops to zero and the object is not automatically freed. In these cases, it is the application’s responsibility to free the object.


IInterface.QueryInterface
 VCL Reference

IInterface.QueryInterface

IInterface	See also

Returns a reference to a specified interface if the object supports that interface.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;

Description

QueryInterface checks whether the object that implements this interface supports the interface specified by IID. If so, QueryInterface

increments the reference count.

sets the Obj parameter so that it points to an instance of the specified interface.

returns 0 to indicate success.

If the object does not support the interface, QueryInterface returns a nonzero error code such as E_NoInterface.


Hierarchy

IInterface

IInterface


TImage
 VCL Reference

 TImage

Hierarchy	Properties	Methods	Events	Using TImage	See also

TImage displays a graphical image.

Unit

ExtCtrls

Description

Use TImage to display a graphical image on a form. Use the TPicture object in the Picture property to specify the actual bitmap, icon, metafile, or other graphic object displayed by TImage. Properties and methods of TPicture can be used for such things as loading an image from file, clearing the image in the TImage, and assigning an image for another control. TImage introduces several properties to determine how the image is displayed within the boundaries of the TImage object.

To add an image to a form or data module so that it is available for display by other controls, such as action lists and bitmap buttons, use a TImageList control instead.


 VCL Reference

TImage properties

TImage	Alphabetically	Legend

In TImage

Canvas

Center

IncrementalDisplay

Picture

Proportional

Stretch

Transparent

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TImage properties

TImage	By object	Legend

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Canvas

Center

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IncrementalDisplay

Left

LRDockWidth

Name

Owner

Parent

ParentShowHint

Picture

PopupMenu

Proportional

ShowHint

Stretch

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TImage.Canvas
 VCL Reference

TImage.Canvas

TImage	See also 	Example

Provides a drawing surface for embellishing bitmap images.

property Canvas: TCanvas;

Description

Canvas is the TCanvas object on which the image for the TImage component is drawn. The painting of the image specified in the Picture property is automatic and does not require manual intercession for the picture to appear.

You can use properties and methods of TCanvas to do such things as draw lines, draw images, and write text to the TImage control's canvas.

Note:	Canvas is only available if the Picture property represents a TBitmap object. Trying to read Canvas when Picture represents another type of graphic image causes TImage to raise an EInvalidOperation exception.


TImage.Center
 VCL Reference

TImage.Center

TImage	See also

Indicates whether the image is centered in the image control.

property Center: Boolean;

Description

When the image does not fit perfectly within the image control, use Center to specify how the image is positioned. When Center is True, the image is centered in the control. When Center is False, the upper left corner of the image is positioned at the upper left corner of the control.

The default value for Center is False.

Note:	Center has no effect if the AutoSize property is True or if the Stretch property is True and Picture does not specify an icon.


TImage.IncrementalDisplay
 VCL Reference

TImage.IncrementalDisplay

TImage	See also

Specifies whether successive approximations of the image should be drawn during slow operations.

property IncrementalDisplay: Boolean;

Description

Set IncrementalDisplay to True on large compressed images that take a long time to load or on images that may be altered by a computationally slow process. When IncrementalDisplay is True, partial renderings of the image are drawn periodically during slow operations such as loading. Set IncrementalDisplay to False to wait until the entire operation is complete before drawing the image.

For some classes of graphic objects, an OnProgress event occurs at various points during slow operations. If IncrementalDisplay is True, the OnProgress event occurs immediately after the approximate image is drawn. If IncrementalDisplay is False, OnProgress occurs but the image is not updated until the entire image has been loaded.

The default value for IncrementalDisplay is False.


TImage.Picture
 VCL Reference

TImage.Picture

TImage	See also	Example

Specifies the image that appears on the image control.

property Picture: TPicture;

Description

Use Picture to specify the image for the TImage component. Picture is a reference to a TPicture object. Use properties and methods of TPicture to specify a bitmap, icon, metafile, or user-defined graphic to be displayed by the image control.

Setting Picture at design time brings up the Picture Editor, which can be used to specify the file that contains the image.


TImage.Proportional
 VCL Reference

TImage.Proportional

TImage	See also

Indicates whether the image should be changed, without distortion, so that it fits the bounds of the image control.

property Proportional: Boolean;

Description

Set Proportional to True to ensure that the image can be fully displayed in the image control without any distortion such as occurs with the Stretch property. When Proportional is True, images that are too large to fit in the image control are scaled down (while maintaining the same aspect ratio) until they fit in the image control. Images that are too small are displayed normally. That is, Proportional can reduce the magnification of the image, but does not increase it.

When the image control resizes, the image resizes also.

To resize the image so that it fits exactly in the image control, even if that causes distortion, use the Stretch property instead.

To resize the control to the image rather than resizing the image to the control, use the AutoSize property instead.

The default value for Proportional is False.

Note:	Proportional has no effect if the Picture property contains an icon.


TImage.Stretch
 VCL Reference

TImage.Stretch

TImage	See also

Indicates whether the image should be changed so that it exactly fits the bounds of the image control.

property Stretch: Boolean;

Description

Set Stretch to True to cause the image to assume the size and shape of the image control. When the image control resizes, the image resizes also. Stretch resizes the height and width of the image independently. Thus, unlike a simple change in magnification, Stretch can distort the image if the image control is not the same shape as the image.

To resize the image without any distortion, use the Proportional property instead.

To resize the control to the image rather than resizing the image to the control, use the AutoSize property instead.

The default value for Stretch is False.

Note:	Stretch has no effect if the Picture property contains an icon.


TImage.Transparent
 VCL Reference

TImage.Transparent

TImage	See also

Specifies whether the background of the image obscures objects below the image object.

property Transparent: Boolean;

Description

Set Transparent to True to allow objects behind the TImage object to show through the background of the image. Set Transparent to False to make the background of the image opaque. Setting Transparent sets the Transparent property of the Picture.

Note:	Transparent has no effect unless the Picture property specifies a TBitmap object.


 VCL Reference

TImage events

TImage	Alphabetically	Legend

In TImage

OnProgress

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TImage events

TImage	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnProgress

OnStartDock

OnStartDrag


TImage.OnProgress
 VCL Reference

TImage.OnProgress

TImage	See also

Occurs periodically during slow operations that affect the image.

type

  TProgressStage = (psStarting, psRunning, psEnding);

  TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: String) of object;

property OnProgress: TProgressEvent

Description

Write an OnProgress event handler to provide the user with feedback during slow operations such as loading large compressed images.

The Stage parameter indicates whether the operation is beginning, continuing, or ending. If the OnProgress event handler displays an indicator such as a progress bar, the indicator can be created when Stage is psStarting, updated while Stage is psRunning, and removed when Stage is psEnding. The PercentDone parameter is an approximation of how much of the operation has completed. Use PercentDone to update the position of a progress bar or other indicator.

The RedrawNow parameter indicates whether the image can safely be drawn on screen at this point. If the IncrementalDisplay property is True, an approximate image is drawn immediately before the OnProgress event when RedrawNow is True. The R parameter specifies the portion of the image that has changed and needs to be redrawn.

The Msg parameter contains one or two words that describe what operation is occurring. For example, the value of Msg could be a string such as Loading, Storing, or Reducing colors. The Msg string can also be empty.

Note:	The PercentDone parameter is only an approximation. With some image formats, the value of PercentDone may actually decrease from the value in previous events, as the graphic object discovers there is more work to do.


 VCL Reference

TImage methods

TImage	Alphabetically	Legend

In TImage

Create

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TImage methods

TImage	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TImage.Create
 VCL Reference

TImage.TImage

TImage	See also

Creates and initializes an instance of TImage.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TImage object at runtime. Images placed on forms at design time are created automatically.


TImageTImage.Destroy
 VCL Reference

TImage.Destroy

TImage	See also

Destroys an instance of TImage.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TImage reference is not nil, and only then calls Destroy.

As the control is destroyed, it frees the TPicture object in the Picture property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TImage


TImageList
 VCL Reference

 TImageList

Hierarchy	Properties	Methods	Events	See also

TImageList represents a collection of same-sized images, each of which can be referred to by its index.

Unit

Controls

Description

Image lists are used to efficiently manage large sets of icons or bitmaps. All images in an image list are contained in a single, wide bitmap in screen device format. An image list may also include a monochrome bitmap that contains masks used to draw images transparently (icon style).

The image list is capable of holding a large number of same sized images and retrieving them via their index within the range 0 to n - 1. The image list also has methods to facilitate storing, retrieving, and drawing of the stored images.

To add images to an image list at design time, right click and choose Image List Editor

Note:	Image lists depend on Comctl32.dll. If the system does not have the latest version installed, there may be problems getting images to appear.


 VCL Reference

TImageList properties

TImageList	Alphabetically	Legend

Derived from TDragImageList

DragCursor

Dragging

Derived from TCustomImageList

AllocBy

BkColor

BlendColor

Count

DrawingStyle

Handle

Height

ImageType

Masked

ShareImages

Width

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TImageList properties

TImageList	By object	Legend

AllocBy

BkColor

BlendColor

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

DragCursor

Dragging

DrawingStyle

Handle

Height

ImageType

Masked

Name

Owner

ShareImages

Tag

VCLComObject

Width


 VCL Reference

TImageList events

TImageList	Alphabetically	Legend

Derived from TCustomImageList

OnChange


 VCL Reference

TImageList events

TImageList	By object	Legend

OnChange


 VCL Reference

TImageList methods

TImageList	Alphabetically	Legend

Derived from TDragImageList

BeginDrag

DragLock

DragMove

DragUnlock

EndDrag

GetHotSpot

HideDragImage

SetDragImage

ShowDragImage

Derived from TCustomImageList

Add

AddIcon

AddImages

AddMasked

Assign

Clear

Create

CreateSize

Delete

Destroy

Draw

DrawOverlay

FileLoad

GetBitmap

GetIcon

GetImageBitmap

GetInstRes

GetMaskBitmap

GetResource

HandleAllocated

Insert

InsertIcon

InsertMasked

Move

Overlay

RegisterChanges

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TImageList methods

TImageList	By object	Legend

Add

AddIcon

AddImages

AddMasked

AfterConstruction

Assign

BeforeDestruction

BeginDrag

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CreateSize

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

Dispatch

DragLock

DragMove

DragUnlock

Draw

DrawOverlay

EndDrag

ExecuteAction

FieldAddress

FileLoad

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetBitmap

GetHotSpot

GetIcon

GetImageBitmap

GetInstRes

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetMaskBitmap

GetNamePath

GetParentComponent

GetResource

HandleAllocated

HasParent

HideDragImage

InheritsFrom

InitInstance

Insert

InsertComponent

InsertIcon

InsertMasked

InstanceSize

IsImplementorOf

MethodAddress

MethodName

Move

NewInstance

Overlay

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

Replace

ReplaceIcon

ReplaceMasked

ResInstLoad

ResourceLoad

SafeCallException

SetDragImage

SetSubComponent

ShowDragImage

UnRegisterChanges

UpdateAction


Hierarchy

TObject

TPersistent

TComponent

TCustomImageList

TDragImageList

TImageList


TIniFile
 VCL Reference

TIniFile

Hierarchy	Properties	Methods	Using TIniFile	See also

TIniFile stores and retrieves application-specific information and settings from INI files.

Unit

IniFiles

Description

TIniFile enables handling the storage and retrieval of application-specific information and settings in a standard INI file. The INI file text format is a standard introduced in Windows 3.x for storing and retrieving application settings from session to session. An INI file stores information in logical groupings, called “sections.” For example, the WIN.INI file contains a section called “[Desktop]”. Within each section, actual data values are stored in named keys. Keys take the form:

<keyname>=<value>

A FileName is passed to the TIniFile constructor and identifies the INI file that the object accesses.

A related object, TMemIniFile, works the same way as TIniFile, but buffers writes in memory to minimize disk access.

Tip:	You may choose to store information using the system registry instead of INI files. In this case, you can use TRegistryIniFile (which shares a common ancestor with TIniFile and so can be used in common code) or TRegistry.


 VCL Reference

TIniFile properties

TIniFile	Alphabetically	Legend

Derived from TCustomIniFile

FileName


 VCL Reference

TIniFile properties

TIniFile	By object	Legend

FileName


 VCL Reference

TIniFile methods

TIniFile	Alphabetically	Legend

In TIniFile

DeleteKey

EraseSection

ReadSection

ReadSections

ReadSectionValues

ReadString

UpdateFile

WriteString

Derived from TCustomIniFile

Create

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadTime

SectionExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteTime

ValueExists

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TIniFile methods

TIniFile	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DeleteKey

Destroy

Dispatch

EraseSection

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

SafeCallException

SectionExists

UpdateFile

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime


TIniFile.DeleteKey
 VCL Reference

TIniFile.DeleteKey

TIniFile	See also 	Example

Removes an INI file entry for a specified key value.

procedure DeleteKey(const Section, Ident: String); override;

Description

Call DeleteKey to erase an INI file entry. Section is string containing the name of an INI file section, and Ident is a string containing the name of the key from for which to set a nil value.

Note:	Attempting to delete a key in a nonexistent section or attempting to delete a nonexistent key are not errors. In these cases, DeleteKey does nothing.


TIniFile.EraseSection
 VCL Reference

TIniFile.EraseSection

TIniFile	See also

Erases an entire section of an INI file.

procedure EraseSection(const Section: String); override;

Description

Call EraseSection to remove a section, all its keys, and their data values from an INI file. Section identifies the INI file section to remove. If a section cannot be removed, an exception is raised.


TIniFile.ReadSection
 VCL Reference

TIniFile.ReadSection

TIniFile	See also	Example

Reads all the key names from a specified section of an INI file into a string list.

procedure ReadSection (const Section: String; Strings: TStrings); override;

Description

Call ReadSection to retrieve the names of all keys within a specified section of an INI file into a string list object.

Section identifies the section from which to retrieve a list of key names. Strings specifies the TStrings descendant to hold the retrieved names. Strings can point to a TStrings descendant such as a string list (TStringList), or to a component property that is of type TStrings, such as the Items property of TListBox.


TIniFile.ReadSections
 VCL Reference

TIniFile.ReadSections

TIniFile	See also 	Example

Reads the names of all sections in an INI file into a string list.

procedure ReadSections(Strings: TStrings); override;

Description

Call ReadSections to retrieve the names of all sections in an INI file into a string list object.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings object, or to a component property, such as Items for a TListBox component.


TIniFile.ReadSectionValues
 VCL Reference

TIniFile.ReadSectionValues

TIniFile	See also 	Example

Reads the values from all keys within a section of an INI file into a string list.

procedure ReadSectionValues(const Section: String; Strings: TStrings); override;

Description

Call ReadSectionValues to read the keys, and the values from all keys, within a specified section of an INI file into a string list object (TStrings descendant). Section identifies the section in the file from which to read key values. Strings is the string list object into which to read the values.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings object, or to a component property, such as Items for a TListBox component, that is a TStrings object itself.


TIniFile.ReadString
 VCL Reference

TIniFile.ReadString

TIniFile	See also 	Example

Retrieves a string value from an INI file.

function ReadString(const Section, Ident, Default: String): String; override;

Description

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.


TIniFile.UpdateFile
 VCL Reference

TIniFile.UpdateFile

TIniFile	See also

Flushes buffered INI file data to disk.

function UpdateFile; override;

Description

Call UpdateFile to flush buffered reads from and writes to the INI file to disk. UpdateFile is useful under Windows9x, but has no effect under Windows NT because NT does not buffer INI file reads and writes.


TIniFile.WriteString
 VCL Reference

TIniFile.WriteString

TIniFile	See also 	Example

Writes a string value to an INI file.

procedure WriteString(const Section, Ident, Value: String); override;

Description

Call WriteString to write a string value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the string value to write.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteString creates the section and key and sets its initial value to Value.


Hierarchy

TObject

TCustomIniFile

TIniFile


TInplaceEdit
 VCL Reference

TInplaceEdit

Hierarchy	Properties	Methods	See also

TInPlaceEdit provides text editing capabilities for grid controls.

Unit

Grids

Description

TInPlaceEdit is a helper object tailored to work with grid controls. It provides a multiline editing window that appears in the appropriate cell of a grid control. TInPlaceEdit provides services so that the grid can influence the response of the control to user actions, and can move or resize the editing window as cells are moved or resized.

The TInPlaceEdit window has no border, so it does not stand out as a separate control. TInPlaceEdit is not a data-aware control, but can work with a data-aware grid such as TDBGrid, allowing the grid to fetch or post the text, and allowing the grid to impose a mask to limit the text of the edit control to data that is valid.


 VCL Reference

TInplaceEdit properties

TInplaceEdit	Alphabetically	Legend

In TInplaceEdit

Grid

Derived from TCustomMaskEdit

EditText

IsMasked

Text

Derived from TCustomEdit

CanUndo

Modified

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TInplaceEdit properties

TInplaceEdit	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

CanUndo

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EditText

Enabled

Floating

FloatingDockSiteClass

Grid

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

IsMasked

Left

LRDockWidth

Modified

Name

Owner

Parent

ParentWindow

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TInplaceEdit.Grid
 VCL Reference

TInplaceEdit.Grid

TInplaceEdit	See also

Specifies the grid object that owns and controls this TInplaceEdit.

property Grid: TCustomGrid;

Description

Read Grid to obtain the grid object for which TInplaceEdit provides editing services. TInplaceEdit uses the Grid property so that it can receive information about the text to be edited and so that it can pass on relevant events.


 VCL Reference

TInplaceEdit methods

TInplaceEdit	Alphabetically	Legend

In TInplaceEdit

BoundsChanged

Create

CreateParams

DblClick

Deselect

DoMouseWheel

EditCanModify

Hide

Invalidate

KeyDown

KeyPress

KeyUp

Move

PosEqual

SetFocus

UpdateContents

UpdateLoc

WndProc

Derived from TCustomMaskEdit

Clear

GetTextLen

ValidateEdit

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TInplaceEdit methods

TInplaceEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BoundsChanged

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParams

CreateParented

CreateParentedControl

CutToClipboard

DblClick

DefaultHandler

Deselect

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoMouseWheel

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EditCanModify

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

KeyPress

KeyUp

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

Move

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

PosEqual

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateContents

UpdateControlState

UpdateLoc

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidateEdit

WndProc


TInplaceEdit.BoundsChanged
 VCL Reference

TInplaceEdit.BoundsChanged

TInplaceEdit	See also

Indents the text area of the window slightly after the grid repositions the edit control.

procedure BoundsChanged; virtual;

Description

BoundsChanged reinitializes the editing window after the control has been moved or resized. It creates a slight indentation in the text formatting area so that the contents of the editor do not appear to crowd the edges of the cell.

BoundsChanged is exposed as a protected method so that derived objects can add further enhancements when the editing window changes size or location.


TInplaceEdit.Create
 VCL Reference

TInplaceEdit.Create

TInplaceEdit	See also

Creates an instance of TInplaceEdit.

constructor Create(AOwner: TComponent); override;

Description

Do not create instances of TInplaceEdit. These are created automatically by the grid that uses the editor.

AOwner specifies the Owner for the editor. This is the component that is responsible for freeing the TInplaceEdit instance.

Create overrides the default constructor to make sure that the control has no border to provide a visual indication that the control exists.


TInplaceEdit. CreateParams
 VCL Reference

TInplaceEdit.CreateParams

TInplaceEdit	See also

Initializes a window-creation parameter record passed in the Params parameter.

procedure CreateParams( var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. TInplaceEdit overrides the inherited method to specify a multiline edit control.


TInplaceEdit.DblClick
 VCL Reference

TInplaceEdit.DblClick

TInplaceEdit	See also

Informs the grid when the user double-clicks in the edit window.

procedure DblClick; override;

Description

DblClick is called when the user double-clicks in the edit window. DblClick simply passes the event on to the grid. The grid must interpret and respond to the double-click. If the edit window needs to respond to the double-click, the grid must trigger the response by calling a method or setting a property of the TInplaceEdit.


TInplaceEdit.Deselect
 VCL Reference

TInplaceEdit.Deselect

TInplaceEdit	See also

Removes the selection from the edit window.

procedure Deselect;

Description

Use Deselect to cause all text in the edit window to be unselected. Deselect simply changes the selection, it does not change the actual text.


TInplaceEdit.DoMouseWheel
 VCL Reference

TInplaceEdit.DoMouseWheel

TInplaceEdit	See also

Delegates mouse wheel messages to the associated grid.

function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; const MousePos: TPoint): Boolean; override;

Description

TInplaceEdit overrides the inherited DoMouseWheel method so that it can pass any mouse wheel messages on to the grid specified by the Grid property. This causes the grid’s OnMouseWheel event handler to execute even though the inplace edit control has focus.


TInplaceEdit.EditCanModify
 VCL Reference

TInplaceEdit.EditCanModify

TInplaceEdit	See also

Determines whether the user can edit the Text.

function EditCanModify: Boolean; override;

Description

EditCanModify is called automatically when the user tries to edit the value of Text. EditCanModify calls the CanEditModify method of the grid to determine whether the current cell of the grid should be edited. When EditCanModify returns True, the user is permitted to edit the text. When EditCanModify returns False, the user is prevented from editing the text.


TInplaceEdit.Hide
 VCL Reference

TInplaceEdit.Hide

TInplaceEdit	See also

Hides the edit control window and moves input focus to the grid.

procedure Hide;

Description

Hide makes the edit control window invisible without destroying it. Hide also moves the input focus from the editor window to the grid, so that the invisible window does not swallow keyboard events.

The grid calls Hide to hide the edit window when changing out of edit mode. It also calls Hide when scrolling the cell that is being edited out of the grid window.


TInplaceEdit.Invalidate
 VCL Reference

TInplaceEdit.Invalidate

TInplaceEdit	See also

Invalidates the edit window and the corresponding portion of the grid window.

procedure Invalidate; reintroduce;

Description

Invalidate ensures that the portion of the grid window under the edit control is invalidated at the same time as the edit window. This is important when the edit window is hidden or destroyed so that the grid window can repaint the cell that was covered by the edit window.


TInplaceEdit.KeyDown
 VCL Reference

TInplaceEdit.KeyDown

TInplaceEdit	See also

Responds when the user presses a key.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

When the user presses a key, KeyDown checks whether the edit control or grid should process the KeyDown event. The Enter key is always passed on to the grid. The F2 key calls Deselect to remove the current selection. Navigation keystrokes are passed on to the grid when the movement cannot be accommodated within the text window. For example, if the user types Left when the cursor is already at the left edge of the edit window, the keystroke is passed to the grid which moves focus to the previous cell. If the cursor is in the middle of a line, the keystroke is processed by the edit window, which moves left a single character.

KeyDown calls the OnKeyDown event handler for the grid, if there is one, before calling the inherited KeyDown for the edit control.


TInplaceEdit.KeyPress
 VCL Reference

TInplaceEdit.KeyPress

TInplaceEdit	See also

Responds when the user types a key.

procedure KeyPress(var Key: Char); override;

Description

KeyPress allows the grid to handle the keystroke, and only processes keystrokes that the grid does not fully handle. If the grid is not in edit mode after handling the keystroke, KeyPress throws away the keystroke. Keystroke processes the Return Key and calls the inherited method to handle all other unprocessed keystrokes.

Pressing the Return key causes KeyPress to select all the text, unless it is already selected, in which case it causes KeyPress to deselect all the text.


TInplaceEdit.KeyUp
 VCL Reference

TInplaceEdit.KeyUp

TInplaceEdit	See also

Responds when the user releases a key.

procedure KeyUp(var Key: Word; Shift: TShiftState); override;

Description

The inplace edit control does not process the KeyUp event at all. It simply passes this event on to the grid, which may or may not process the event.


TInplaceEdit.Move
 VCL Reference

TInplaceEdit.Move

TInplaceEdit	See also

Changes the position of the edit window and repaints the contents.

procedure Move(const Loc: TRect);

Description

The grid calls Move to move the edit window to the indicated rectangle when the corresponding cell moves or resizes. The position of Loc is relative to the grid’s client area.


TInplaceEdit.PosEqual
 VCL Reference

TInplaceEdit.PosEqual

TInplaceEdit	See also

Indicates whether the edit window has the size and position indicated by Rect.

function PosEqual(const Rect: TRect): Boolean;

Description

Use PosEqual to determine if the edit window occupies a particular rectangle, where Rect is given in global coordinates. PosEqual can be used to determine whether the inplace edit control represents a particular cell in the grid, by checking the bounding rectangle of the cell.


TInplaceEdit.SetFocus
 VCL Reference

TInplaceEdit.SetFocus

TInplaceEdit	See also

Gives the editor window input focus if it is visible.

procedure SetFocus; reintroduce;

Description

Use SetFocus to cause keyboard events to go to the editor window. Focus will not move to the window if it is hidden by a call to the Hide method.


TInplaceEdit.UpdateContents
 VCL Reference

TInplaceEdit.UpdateContents

TInplaceEdit	See also

Sets the EditMask and Text properties to values specified by the grid.

procedure UpdateContents; virtual;

Description

UpdateContents calls the GetEditMask and GetEditText methods of the grid, and sets the EditMask and Text properties accordingly. UpdateContents allows the grid to bring up the inplace edit control with the contents of a particular cell, and to impose a mask to restrict the editor to valid input for the particular cell.


TInplaceEdit.UpdateLoc
 VCL Reference

TInplaceEdit.UpdateLoc

TInplaceEdit	See also

Changes the position of the edit window but does not repaint the contents.

procedure UpdateLoc(const Loc: TRect);

Description

The grid calls UpdateLoc to move the edit window when the grid is moved. Unlike the Move method, UpdateLoc does not invalidate the edit window to cause a repaint.


TInplaceEdit.WndProc
 VCL Reference

TInplaceEdit.WndProc

TInplaceEdit	See also

Supplements the inherited method to add special processing to some Windows messages.

procedure WndProc(var Message: TMessage); override;

Description

WndProc is the first method that receives messages for a Delphi control.

WndProc for TInplaceEdit passes focus events on to the grid. It calls the inherited method for all other Windows messages. WndProc converts mouse clicks to double clicks when the grid receives the first click within the double-click time period.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMaskEdit

TInplaceEdit


TInterfaceList
 VCL Reference

TInterfaceList

Hierarchy	Properties	Methods

TInterfaceList represents a list of interfaces.

Unit

Classes

Description

Use TInterfaceList to manage a list of interfaces.


 VCL Reference

TInterfaceList properties

TInterfaceList	Alphabetically	Legend

In TInterfaceList

Capacity

Count

Items

Derived from TInterfacedObject

RefCount


 VCL Reference

TInterfaceList properties

TInterfaceList	By object	Legend

Capacity

Count

Items

RefCount


TInterfaceList.Capacity
 VCL Reference

TInterfaceList.Capacity

TInterfaceList	See also

Specifies the list capacity.

property Capacity: Integer;

Description

Use Capacity to determine the list capacity. Before adding many interfaces to the list, you can improve performance by setting Capacity to the final number of interfaces. This prevents the interface list from having to reallocate the list every time an interface is added.


TInterfaceList.Count
 VCL Reference

TInterfaceList.Count

TInterfaceList	See also

Specifies the number of interfaces in the list.

property Count: Integer;

Description

Use Count to determine the number of interfaces in the list.


TInterfaceList.Items
 VCL Reference

TInterfaceList.Items

TInterfaceList	See also

Provides direct access to an interface in the list.

property Items[Index: Integer]: IInterface;

Description

Use Items to directly access an interface in the list. Index identifies each interface by its position in the list.


 VCL Reference

TInterfaceList methods

TInterfaceList	Alphabetically	Legend

In TInterfaceList

Add

Clear

Create

Delete

Destroy

Exchange

Expand

First

IndexOf

Insert

Last

Lock

Remove

Unlock

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TInterfaceList methods

TInterfaceList	By object	Legend

Add

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Exchange

Expand

FieldAddress

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

Lock

MethodAddress

MethodName

NewInstance

Remove

SafeCallException

Unlock


TInterfaceList.Add
 VCL Reference

TInterfaceList.Add

TInterfaceList	See also

Adds an interface to the list.

function Add(const Item: IInterface): Integer;

Description

Call Add to add an interface to the list.


TInterfaceList.Clear
 VCL Reference

TInterfaceList.Clear

TInterfaceList	See also

Clears the interface list.

procedure Clear;

Description

Call Clear to remove all interfaces from the list.


TInterfaceList.Create
 VCL Reference

TInterfaceList.Create

TInterfaceList

Creates an interface list.

constructor Create;

Description

Call Create to create an interface list.


TInterfaceList.Delete
 VCL Reference

TInterfaceList.Delete

TInterfaceList	See also

Deletes an interface from the list.

procedure Delete(Index: Integer);

Description

Call Delete to delete an interface from the list.


TInterfaceList.Destroy
 VCL Reference

TInterfaceList.Destroy

TInterfaceList	See also

Destroys the interface list.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call the Free method.


TInterfaceList.Exchange
 VCL Reference

TInterfaceList.Exchange

TInterfaceList	See also

Swaps the position of two interfaces in the list.

procedure Exchange(Index1, Index2: Integer);

Description

Call Exchange to move the interface at position Index1 so that it appears at position Index2 and move the interface at position Index2 so that it appears at position Index1. Index1 and Index2 identify two positions (zero offset) in the Items property array.


TInterfaceList.Expand
 VCL Reference

TInterfaceList.Expand

TInterfaceList	See also

Increases the capacity of the interface list.

function Expand: TInterfaceList;

Description

If Capacity is greater than 64, then Capacity is increased by Capacity / 4. If Capacity is between eight and 64, Capacity is increased by 16. If Capacity is less than eight, Capacity is increased by four.


TInterfaceList.First
 VCL Reference

TInterfaceList.First

TInterfaceList	See also

Returns the first interface in the list.

function First: IInterface;

Description

Call First to obtain the first interface in the list.


TInterfaceList.IndexOf
 VCL Reference

TInterfaceList.IndexOf

TInterfaceList	See also

Returns the index of an interface.

function IndexOf(const Item: IInterface): Integer;

Description

Call IndexOf to obtain the index of an interface.


TInterfaceList.Insert
 VCL Reference

TInterfaceList.Insert

TInterfaceList	See also

Inserts an interface into the list at a specified position.

procedure Insert(Index: Integer; const Item: IInterface);

Description

Call Insert to insert an interface into the list. Item is the interface to insert, and Index indicates the position (zero-offset) where the interface should be added.


TInterfaceList.Last
 VCL Reference

TInterfaceList.Last

TInterfaceList	See also

Returns the last interface in the list.

function Last: IInterface;

Description

Call Last to obtain the last interface in the list.


TInterfaceList.Lock
 VCL Reference

TInterfaceList.Lock

TInterfaceList	See also

Prevents other threads from accessing the list.

procedure Lock;

Description

Call Lock to lock the list, preventing other threads from accessing the list.


TInterfaceList.Remove
 VCL Reference

TInterfaceList.Remove

TInterfaceList	See also

Removes an interface from the list.

function Remove(const Item: IInterface): Integer;

Description

Call Remove to remove an interface from the list.

Remove returns the index of the removed interface, or –1 if the interface was not found.


TInterfaceList.Unlock
 VCL Reference

TInterfaceList.Unlock

TInterfaceList	See also

Unlocks the list, allowing other threads to access it.

procedure Unlock;

Description

Call Unlock to unlock the list so that other threads can have access to the interfaces it contains.


Hierarchy

TObject

TInterfacedObject

TInterfaceList


TInterfacedPersistent
 VCL Reference

TInterfacedPersistent

Hierarchy	Methods	See also

TInterfacedPersistent is the ancestor for persistent objects that implement interfaces.

Unit

Classes

Description

TInterfacedPersistent, like all persistent objects, supports the ability to read and write its properties to and from a stream. In addition, it supplies a default implementation of the IInterface methods (_AddRef, _Release, and QueryInterface). This default implementation simply passes these calls on to the interface of the persistent object’s Owner, if any.

Do not create instances of TInterfacedPersistent. Use TInterfacedPersistent as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects, and that support interfaces.


 VCL Reference

TInterfacedPersistent methods

TInterfacedPersistent	Alphabetically	Legend

In TInterfacedPersistent

_AddRef

_Release

AfterConstruction

QueryInterface

Derived from TPersistent

Assign

Destroy

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPersistent methods

TPersistent	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

QueryInterface

SafeCallException


TInterfacedPersistent.AfterConstruction
 VCL Reference

TInterfacedPersistent.AfterConstruction

TInterfacedPersistent	See also

Obtains a reference to the Owner’s interface.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the object’s last constructor executes. Do not call it explicitly in your applications.

As implemented in TInterfacedPersistent, AfterConstruction calls the GetOwner method to determine whether this object has an Owner. If so, it obtains a reference to the Owner’s interface, to which it can delegate IInterface calls.


TInterfacedPersistent.QueryInterface
 VCL Reference

TInterfacedPersistent.QueryInterface

TInterfacedPersistent	See also

Returns a reference to a specified interface if the object supports that interface.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;

Description

QueryInterface implements the IInterface method, QueryInterface. This method checks whether the interfaced persistent object supports the interface identified by IID. If so, it returns a reference as the Obj parameter, automatically incrementing the reference count for the interface. If the object does not support the specified interface, it returns a non-zero value.


TInterfacedPersistent._AddRef
 VCL Reference

TInterfacedPersistent._AddRef

TInterfacedPersistent	See also

Increments the reference count for the interfaced object’s interface.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IInterface method, _AddRef, which increments the reference count of an interface and returns the current reference count.

 If the interfaced persistent object has an Owner and that owner supports an interface, then _AddRef simply calls the _AddRef method of the Owner. Otherwise, it simply returns –1.


TInterfacedPersistent.__Release
 VCL Reference

TInterfacedPersistent.__Release

TInterfacedPersistent	See also

Decrements the reference count for the interfaced object’s interface.

function __Release: Integer; stdcall;

Description

__Release implements the IInterface method, __Release, which decrements the reference count of an interface and returns the current reference count. For some interfaces, when this causes the reference count to drop to zero, the object frees itself.

If the interfaced persistent object has an Owner and that owner supports an interface, then __Release simply calls the __Release method of the Owner. Otherwise, it simply returns –1.


Hierarchy

TObject

TPersistent

TInterfacedPersistent


TInterfacedObject
 VCL Reference

TInterfacedObject

Hierarchy	Properties	Methods

TInterfacedObject implements the IInterface (IUnknown) interface and can be used as a base for simple COM-compatible classes that benefit from having the IInterface methods implemented.

Unit

System

Description

TInterfacedObject is a base class for classes that support interfaces. Unlike COM classes, TInterfacedObject does not have a class factory or a registered CLSID. This means that it must be instantiated by calling a constructor directly.

TInterfacedObject serves as a convenient base class for classes that implement interfaces because it implements the methods of IInterface. TInterfaceObject descendants use the IInterface reference-counting methods to handle lifetime management. That is, when the reference count on a TInterfaceObject descendant drops to zero, the object is automatically freed.

Variables declared to be of type TInterfacedObject have dynamic-binding, meaning that an instance of a descendant class can be assigned to that variable at runtime. This is because TInterfacedObject implements QueryInterface, which is called at runtime to query whether the instantiated object supports the requested interface. If it does, then the descendant object is successfully assigned to the variable. The same assignment of a descendant COM object to a variable declared as a base class type will generate a compile-time error if that base class does not implement IUnknownIInterface.

There is no class factory for TInterfacedObject.

Implemented methods of IInterface

QueryInterface, AddRef, and Release.


 VCL Reference

TInterfacedObject properties

TInterfacedObject	Alphabetically	Legend

In TInterfacedObject

RefCount


 VCL Reference

TInterfacedObject properties

TInterfacedObject	By object	Legend

RefCount


TInterfacedObject.RefCount
 VCL Reference

TInterfacedObject.RefCount

TInterfacedObject

Indicates the number of interface pointers currently dependent upon the object.

property RefCount: Integer;

Description

RefCount defines the lifetime of the object. When RefCount is zero, the object is destroyed.

RefCount is incremented by calls to the _AddRef method and decremented by the _Release method.


 VCL Reference

TInterfacedObject methods

TInterfacedObject	Alphabetically	Legend

In TInterfacedObject

_AddRef

AfterConstruction

BeforeDestruction

NewInstance

QueryInterface

_Release

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TInterfacedObject methods

TInterfacedObject	By object	Legend

_AddRef

_Release

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

QueryInterface

SafeCallException


TInterfacedObject._AddRef
 VCL Reference

TInterfacedObject._AddRef

TInterfacedObject 	See also

Implements the IInterface AddRef method.

function _AddRef: Integer; stdcall;

Description

Do not call the protected _AddRef method directly. _AddRef is called through the IInterface or IUnknown interface to indicate that another object is using the interfaced object’s interface pointer. When the other object is through with the interface, it calls _Release through the same interface. This allows the interfaced object to free itself when it is no longer used (when the reference count goes to zero).

_AddRef increments the RefCount property.


TInterfacedObject.AfterConstruction
 VCL Reference

TInterfacedObject.AfterConstruction

TInterfacedObject	See also

Responds after the last constructor executes.

procedure AfterConstruction; override;

Description

AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.

When an instance of TInterfacedObject is allocated, RefCount is incremented to prevent its destruction while processing the constructor. AfterConstruction decrements that RefCount to re-establish the correct reference count after all constructors have executed.


TInterfacedObject.BeforeDestruction
 VCL Reference

TInterfacedObject.BeforeDestruction

TInterfacedObject 	See also

Checks that the reference count is zero before allowing the interfaced object to be destroyed.

procedure BeforeDestruction; override;

Description

BeforeDestruction is called automatically immediately before the interfaced object’s destructor. It checks that the reference count is zero, and, if it is not, raises an exception.


TInterfacedObject.NewInstance
 VCL Reference

TInterfacedObject.NewInstance

TInterfacedObject	See also

Allocates memory for each instance of an interfaced object.

class function NewInstance: TObject; override;

Description

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory to allocate from the heap to contain a particular instance. Do not call NewInstance directly.

TInterfacedObject overrides NewInstance to increment the reference count when a new instance is created. This prevents any constructor from accidentally deleting the instance due to a RefCount of zero. The AfterConstruction method decrements the value of RefCount after all constructors have executed.


TInterfacedObject.QueryInterface
 VCL Reference

TInterfacedObject.QueryInterface

TInterfacedObject 	See also

Implements the IInterface QueryInterface method.

function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;

Description

Do not call the protected QueryInterface method directly. QueryInterface is called through the IInterface interface to obtain an interface pointer for the interface identified by the IID parameter. If the object supports the requested interface, it is returned in the Obj parameter and QueryInterface returns S_OK. If the object does not support the interface, QueryInterface returns E_NOINTERFACE.

If QueryInterface successfully returns an interface pointer, it automatically increments the reference count.


TInterfacedObject._Release
 VCL Reference

TInterfacedObject._Release

TInterfacedObject 	See also

Implements the IInterface Release method.

function _Release: Integer; stdcall;

Description

Do not call the protected _Release method directly. _Release is called through the IInterface interface to indicate that another object is through with the interfaced object’s interface pointer. This allows the interfaced object to free itself when it is no longer used (when the reference count goes to zero).

_Release decrements the RefCount property.


Hierarchy

TObject

TInterfacedObject


TInvokeableVariantType
 VCL Reference

TInvokeableVariantType

Hierarchy	Properties	Methods	Using TInvokeableVariantType	See also

TInvokeableVariantType is the base class for custom Variant types that implement custom Variants with properties and methods.

Unit

Variants

Description

Use TInvokeableVariantType to define new data types for Object Pascal Variants that have properties and methods. TInvokeableVariantType descendants do not represent the Variants themselves. Rather, they act as utility classes that the custom Variants call on to perform their operations.

To create a Variant type that supports properties and methods,

1. Map the storage of the Variant’s data on to the TVarDatarecord.

2. Write a method that creates instances of your custom Variant. This fills in the Variant’s data as defined in step 1.

3. Declare a class that descends from TInvokeableVariantType.

4. Implement all required behavior (including type conversion rules) in the new class. This involves overriding the appropriate virtual methods (typically DoFunction, DoProcedure, GetProperty, SetProperty, BinaryOp, UnaryOp, CompareOp or Compare, Cast, CastTo, Clear, Copy, IsClear, LeftPromotion, and RightPromotion).

5. In the initialization section of the unit that defines your TInvokeableVariantType descendant, create an instance of your class. When you instantiate your object, it automatically registers itself with the Variant-handling system so that the new Variant type is enabled.

6. In the finalization section of the unit that defines your TInvokeableVariantType descendant, free the instance of your class. This automatically unregisters the Variant type.

For an example, see the VarConv unit, which implements a custom Variant type for measurements.

Tip:	If the custom Variant type uses an object instance to store its data, you can automatically implement the published properties of that object by deriving your custom Variant type from TPublishableVariantType instead.


 VCL Reference

TInvokeableVariantType properties

TInvokeableVariantType	Alphabetically	Legend

Derived from TCustomVariantType

VarType


 VCL Reference

TInvokeableVariantType properties

TInvokeableVariantType	By object	Legend

VarType


 VCL Reference

TInvokeableVariantType methods

TInvokeableVariantType	Alphabetically	Legend

In TInvokeableVariantType

DispInvoke

DoFunction

DoProcedure

GetProperty

SetProperty

Derived from TCustomVariantType

BinaryOp

Cast

CastTo

CastToOle

Clear

Compare

CompareOp

Copy

Create

Destroy

IsClear

UnaryOp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TInvokeableVariantType methods

TInvokeableVariantType	By object	Legend

AfterConstruction

BeforeDestruction

BinaryOp

Cast

CastTo

CastToOle

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Compare

CompareOp

Copy

Create

DefaultHandler

Destroy

Dispatch

DispInvoke

DoFunction

DoProcedure

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetProperty

InheritsFrom

InitInstance

InstanceSize

IsClear

MethodAddress

MethodName

NewInstance

SafeCallException

SetProperty

UnaryOp


TInvokeableVariantType.DispInvoke
 VCL Reference

TInvokeableVariantType.DispInvoke

TInvokeableVariantType	See also

Invokes a method call by dispatching it to the appropriate TInvokeableVariantType method.

procedure DispInvoke(var Dest: TVarData; const Source: TVarData; CallDesc: PCallDesc; Params: Pointer); override;

Description

When the application tries to call a method, set a property, or read a property using a Variant of the custom Variant type, the system automatically generates a call to DispInvoke. TInvokeableVariantType responds by generating a call to the GetProperty, SetProperty, DoProcedure, or DoFunction method, as appropriate.

Dest is a TVarData record that receives the return value of any function calls.

Source is the TVarData record that holds the data from the custom Variant whose property or method was invoked.

CallDesc identifies the method that was called, including the type and number of its arguments.

Params points to an array of parameter values that were passed in the method call.


TInvokeableVariantType.DoFunction
 VCL Reference

TInvokeableVariantType.DoFunction

TInvokeableVariantType	See also

Implements all the functions that this Variant type supports.

type TVarDataArray = array of TVarData;

function DoFunction(var Dest: TVarData; const V: TVarData; const Name: string; const Arguments: TVarDataArray): Boolean; virtual;

Description

Override DoFunction to provide the implementation for function calls made against instances of the invokable Variant type. Then, when the application contains a line such as

ReturnValue := MyInvokeableVariant.SpecialFunction(a,b,c);

a call is automatically generated to DoFunction that allows the TInvokeableVariant descendant to implement the call.

Dest is a TVarData record that receives the value that the function returns.

V is the TVarData record from the Variant instance that was used to call the function.

Name is the name of the function.

Arguments is a dynamic array of TVarData records, where each one represents the value of an argument passed to the function.

DoFunction returns True if it executes the function call, False if it does not implement the specified function.

As implemented in TInvokeableVariant, DoFunction always returns False, because it does not implement any function calls.


TInvokeableVariantType.DoProcedure
 VCL Reference

TInvokeableVariantType.DoProcedure

TInvokeableVariantType	See also

Implements all the procedures that this Variant type supports.

type TVarDataArray = array of TVarData;

function DoProcedure(const V: TVarData; const Name: string; const Arguments: TVarDataArray): Boolean; virtual;

Description

Override DoProcedure to provide the implementation for procedure calls made against instances of the invokable Variant type. Then, when the application contains a line such as

MyInvokeableVariant.SpecialProcedure(a,b,c);

a call is automatically generated to DoProcedure that allows the TInvokeableVariant descendant to implement the call.

V is the TVarData record from the Variant instance that was used to call the procedure.

Name is the name of the procedure.

Arguments is a dynamic array of TVarData records, where each one represents the value of an argument passed to the procedure.

DoProcedure returns True if it executes the procedure call, False if it does not implement the specified procedure.

As implemented in TInvokeableVariant, DoProcedure always returns False, because it does not implement any procedure calls.


TInvokeableVariantType.GetProperty
 VCL Reference

TInvokeableVariantType.GetProperty

TInvokeableVariantType	See also

Returns the value for any property this Variant type supports.

function GetProperty(var Dest: TVarData; const V: TVarData; const Name: string): Boolean; virtual;

Description

Override GetProperty to provide the implementation for reading the properties of instances of the invokable Variant type. Then, when the application contains a line such as

PropValue := MyInvokeableVariant.SpecialProperty;

a call is automatically generated to GetProperty that allows the TInvokeableVariant descendant to implement the call.

Dest is a TVarData record that receives the property value.

V is the TVarData record from the Variant instance whose property is being read.

Name is the name of the property.

GetProperty returns True if it returns a property value, False if it does not implement the specified property.

As implemented in TInvokeableVariant, GetProperty always returns False, because it does not implement any properties.


TInvokeableVariantType.SetProperty
 VCL Reference

TInvokeableVariantType.SetProperty

TInvokeableVariantType	See also

Sets the value for any property this Variant type supports.

function SetProperty(const V: TVarData; const Name: string; const Value: TVarData): Boolean; virtual;

Description

Override SetProperty to provide the write implementation for the properties of instances of the invokable Variant type. Then, when the application contains a line such as

MyInvokeableVariant.SpecialProperty := NewValue;

a call is automatically generated to SetProperty that allows the TInvokeableVariant descendant to implement the call.

V is the TVarData record from the Variant instance whose property is being set.

Name is the name of the property.

Value is a TVarData record that contains the new property value.

GetProperty returns True if it sets a property value, False if it does not implement the specified property or if the specified property is read-only.

As implemented in TInvokeableVariant, GetProperty always returns False, because it does not implement any properties.


Hierarchy

TObject

TCustomVariantType

TInvokeableVariantType


IProperty
 VCL Reference

IProperty

Hierarchy	Methods	See also

IProperty is the interface that the Object Inspector uses to communicate with property editors.

Unit

DesignIntf

Description

When you create your own property editors, they must meet two criteria:

They must be descendants of TBasePropertyEditor.

They must implement the IProperty interface.

The Object Inspector uses the methods on the IProperty interface to interact with property editors.

Typically, property editors are derived from TPropertyEditor, which supplies a default implementation for IProperty.


 VCL Reference

IProperty methods

IProperty	Alphabetically 	Legend

In IProperty

Activate

AllEqual

AutoFill

Edit

GetAttributes

GetEditLimit

GetEditValue

GetName

GetProperties

GetPropInfo

GetPropType

GetValue

GetValues

HasInstance

Revert

SetValue

ValueAvailable

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IProperty methods

IProperty	By object 	Legend

_AddRef

_Release

Activate

AllEqual

AutoFill

Edit

GetAttributes

GetEditLimit

GetEditValue

GetName

GetProperties

GetPropInfo

GetPropType

GetValue

GetValues

HasInstance

QueryInterface

Revert

SetValue

ValueAvailable


IProperty.Activate
 VCL Reference

IProperty.Activate

IProperty	See also

Responds when the property is selected in the Object Inspector.

procedure Activate;

Description

The Object Inspector calls Activate when the property is selected. This method lets a property editor determine attributes of the property dynamically when it is displayed in the Object Inspector.

Before Activate is called, the GetAttributes method does not need to provide accurate information about any attributes other than paSubProperties, paVCL, and paMultiSelect. Any other attributes can be computed in the Activate method and stored so that subsequent calls to GetAttributes can provide accurate information.


IProperty.AllEqual
 VCL Reference

IProperty.AllEqual

IProperty	See also

Indicates whether all selected components have the same value for the property.

function AllEqual: Boolean;

Description

The Object Inspector calls AllEqual when there is more than one component selected to determine whether a value should appear for this property. If this method returns True, the Object Inspector displays a value for the property. If this method returns False, the line for the property in the Object Inspector remains blank.

Note:	AllEqual is called only when the value returned by GetAttributes includes paMultiSelect.


IProperty.AutoFill
 VCL Reference

IProperty.AutoFill

IProperty	See also

Returns True to indicate that values can be typed incrementally—and automatically completed—in the Object Inspector.

function AutoFill: Boolean;

If GetAttributes returns paValueList, the Object Inspector calls AutoFill to verify that automatic typing completion should be permitted. If AutoFill returns True, the Object Inspector uses the values provided by GetValues to fill in partially typed entries. For example, if the legal values for a property are prSmall and prLarge, the user can type “prS” and the Object Inspector automatically fills in “prSmall.”


IProperty.Edit
 VCL Reference

IProperty.Edit

IProperty	See also

Responds when the user double-clicks the property in the Object Inspector.

procedure Edit;

Description

The Object Inspector calls Edit when the ellipsis button (...) is pressed or the property is double-clicked. Property editors implement this method to respond. For example, the Edit method can bring up a dialog for editing the property or it can change the value to some default.


IProperty.GetAttributes
 VCL Reference

IProperty.GetAttributes

IProperty	See also

Describes the property so the Object Inspector provides the appropriate controls.

type

  TPropertyAttribute = (paValueList, paSubProperties, paDialog, paMultiSelect, paAutoUpdate, paSortList, paReadOnly, paRevertable, paFullWidthName, paVolatileSubProperties, paVCL, paNotNestable);

  TPropertyAttributes = set of TPropertyAttribute;

function GetAttributes: TPropertyAttributes;

Description

The Object Inspector calls GetAttributes to determine what controls to display for the property and what property editor methods to call. GetAttributes returns a set drawn from the following values.

Value	Meaning
paValueList	The property editor can return an enumerated list of values for the property. When paValueList is set, the GetValues method should be overridden to provide the enumerated values. When paValueList is set, the Object Inspector displays a drop-down button to the right of the property.
paSortList	The Object Inspector should sort the list returned by GetValues.
paSubProperties	The property has subproperties that are displayed indented and below the current property in standard outline format. If paSubProperties is set, the GetProperties method should be overridden to provide subproperties.
paDialog	The Edit method brings up a dialog. When paDialog is set, the Object Inspector displays an ellipsis button to the right of the property.
paMultiSelect	The property can be displayed when more than one component is selected.
paAutoUpdate	The SetValue method is called on each change made to the editor rather than after the change has been approved.
paReadOnly	Value is not allowed to change.
paRevertable	The property editor can restore the property value to the original value. Properties that shouldn't be reverted are nested properties such as fonts and elements of composite properties such as set element values.
paFullWidthName	The property value does not appear in the Object Inspector. Instead, the Object Inspector uses its full width (name and value columns) to display the property name.
paVolatileSubProperties	Any change of property value causes any shown subproperties to be recomputed (collapsed and re-expanded).
paVCL	The property editor is a VCL component (as opposed to a CLX component).
paNotNestable	The Object Inspector does not show the property when displaying the properties of an expanded reference.
Before the Object Inspector calls the Activate method, GetAttributes does not need to provide accurate information about any attributes other than paSubProperties, paVCL, and paMultiSelect.


IProperty.GetEditLimit
 VCL Reference

IProperty.GetEditLimit

IProperty

Returns the maximum length, in characters, of the value.

function GetEditLimit: Integer;

Description

The Object Inspector calls GetEditLimit to determine how many characters the user can type when entering a value for the property.


IProperty.GetEditValue
 VCL Reference

IProperty.GetEditValue

IProperty	See also

Retrieves a string to represent the property’s value, or, if the value is not available, an error message.

function GetEditValue(out Value: string): Boolean;

Description

The Object Inspector calls GetEditValue to obtain the string it displays as the property value.

GetValue formats the string displayed in the Object Inspector to represent the property value and returns it as the Value parameter. Unlike the GetValue method, GetEditValue does not raise an exception when the property value is unavailable. Instead, it assigns an error message to Value and returns False.

GetValue returns True if Value returns a string representation of the property value.


IProperty.GetName
 VCL Reference

IProperty.GetName

IProperty

Returns the name of the property.

function GetName: string;

Description

The Object Inspector calls GetName to obtain the property name that it displays in the left column.


IProperty.GetProperties
 VCL Reference

IProperty.GetProperties

IProperty	See also

Provides the subproperties of the property to a callback procedure.

type

  TGetPropProc = procedure(const Prop: IProperty) of object;

procedure GetProperties(Proc: TGetPropProc);

Description

The Object Inspector calls GetProperties when the property is expanded to show subproperties. Property editors that return paSubProperties from the GetAttributes method should implement GetProperties to create an appropriate property editor and pass its IProperty interface to the Proc parameter for every subproperty (or nested property) of the property.


IProperty.GetPropInfo
 VCL Reference

IProperty.GetPropInfo

IProperty	See also

Returns the property information record for the object being edited.

function GetPropInfo: PPropInfo;

Description

Call GetPropInfo to access the property information record that describes the property being edited, including its access functions. If more than one object is being edited, GetPropInfo returns the property information record for a representative component.


IProperty.GetPropType
 VCL Reference

IProperty.GetPropType

IProperty	See also

Returns the type information record for the object being edited.

function GetPropType: PTypeInfo;

Description

Call GetPropType to obtain access to the type information record that describes the type of the property being edited.  If more than one object is being edited, GetPropType returns the type information record for a representative component.


IProperty.GetValue
 VCL Reference

IProperty.GetValue

IProperty	See also

Returns the property value formatted as a string.

function GetValue: string;

Description

GetValue formats the value of the property, formatted as a string. If the value is not available, GetValue raises an exception.


IProperty.GetValues
 VCL Reference

IProperty.GetValues

IProperty	See also

Provides the enumerated values of the property to a callback procedure.

procedure GetValues(Proc: TGetStrProc);

Description

The Object Inspector calls GetValues when the drop-down button is clicked to show enumerated values. Property editors that return paValueList from the GetAttributes method implement GetValues to call the Proc parameter for every string that can represent a valid enumerated value. Even if the GetAttributes method does not return paValueList, property editors for enumerated types should still implement GetValues to enumerate all possible values.


IProperty.HasInstance
 VCL Reference

IProperty.HasInstance

IProperty

Indicates whether a specified object is currently being edited by the property editor.

function HasInstance(Instance: TPersistent): Boolean;

Description

HasInstance returns True if the Instance parameter references one of the objects that the property editor is currently editing, False otherwise.


IProperty.Revert
 VCL Reference

IProperty.Revert

IProperty	See also

Restores all object properties to their original values.

procedure Revert;

Description

Call Revert to restore the original property values that each of the edited objects had before the user began making modification with the Object Inspector. Revert may not work if GetAttributes returns paAutoUpdate.


IProperty.SetValue
 VCL Reference

IProperty.SetValue

IProperty	See also

Responds when the user changes the value of the property.

procedure SetValue(const Value: string);

Description

The Object Inspector calls SetValue when the user has finished changing the property value. SetValue applies the value specified by the Value parameter to all components that it is currently editing. If the value can’t be set, SetValue raises an exception that describes the problem.

Note:	If the property is changed only through a dialog brought up by the Edit method, the Object Inspector does not call SetValue. Rather, the Edit method should handle the setting of the value on all components.


IProperty.ValueAvailable
 VCL Reference

IProperty.ValueAvailable

IProperty	See also

Indicates whether all components being edited have a value for the property if their ComponentStyle includes csCheckPropAvail.

function ValueAvailable: Boolean;

Description

The Object Inspector calls ValueAvailable to determine which components can be edited for a particular property or which properties can be displayed for a particular component.


Hierarchy

IInterface

IProperty


IUnknown
 VCL Reference

IUnknown

Hierarchy	Methods

IUnknown is the base class COM interfaces.

Unit

System

Description

Use IUnknown as a base interface when defining COM interfaces. IUnknown is identical to the base interface IInterface, except that it is reserved for working with COM interfaces.


 VCL Reference

IUnknown methods

IUnknown	Alphabetically	Legend

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IUnknown methods

IUnknown	By object	Legend

_AddRef

_Release

QueryInterface


Hierarchy

IInterface

IUnknown

IUnknown


IVarStreamable
 VCL Reference

IVarStreamable

Hierarchy	Methods	Using IVarStreamable	See also

IVarStreamable is the interface for loading and saving the values of Variants.

Unit

Classes

Description

Implement IVarStreamable on a custom Variant type class to allow Variants of that type to load or save their values. When a TCustomVaraintType descendant implements the IVarStreamable interface, then when Variants of that custom type are used as the values of published properties, their values are loaded from and saved to form files using the IVarStreamable methods. Without the IVarStreamable interface, the value of the Variant is loaded from and saved to form files as a string.

IVarStreamable defines two methods, StreamIn, and StreamOut, for reading and writing the Variant’s value.


 VCL Reference

IVarStreamable methods

IVarStreamable	Alphabetically	Legend

In IVarStreamable

StreamIn

StreamOut

Derived from IInterface

_AddRef

_Release

QueryInterface


 VCL Reference

IVarStreamable methods

IVarStreamable	By object	Legend

_AddRef

_Release

StreamIn

StreamOut

QueryInterface


IVarStreamable.StreamIn
 VCL Reference

IVarStreamable.StreamIn

IVarStreamable	See also

Reads in the value of the Variant from a stream.

procedure StreamIn(var Dest: TVarData; const Stream: TStream);

Description

StreamIn reads the Variant’s value from a stream and fills in a TVarData record to reflect the value.

Dest is the TVarData record that is filled in by StreamIn.

Stream is a stream that is positioned so that the next value that can be read from the stream is the value of the Variant.


IVarStreamable.StreamOut
 VCL Reference

IVarStreamable.StreamOut

IVarStreamable	See also

Writes the value of the Variant to a stream.

procedure StreamOut(const Source: TVarData; const Stream: TStream);

Description

StreamIn writes the value from a TVarData record to a specified stream.

Source is the TVarData record that stores the data for the Variant that needs to write its value.

Stream is a stream to which StreamOut writes the value stored in Source.


Hierarchy

IInterface

IVarStreamable


TJPEGData
 VCL Reference

TJPEGData

Hierarchy	Methods	See also

TJPEGData encapsulates the compressed file that contains the data source for the original compressed jpeg image used by a TJPEGImage object.

Unit

Jpeg

Description

TJPEGData is used for the internal implementation of TJPEGImage. TJPEGData is created automatically by the TJPEGImage object when that image object is created.

TJPEGData owns the file handle to the jpeg data source. Thus, TJPEGData implements how TJPEGImage does reference counting and handle sharing. When a jpeg image object is copied using the Assign method, those multiple instances of the image object refer to the same TJPEGData object.

The TJPEGData file itself is never modified. Each TJPEGImage instance that shares it has its own properties that determine how this data is decompressed into its own internal, local bitmap representation. However, if a TJPEGImage needs to modify the actual jpeg data, it breaks its link to that particular TJPEGData instance and creates a new one.


 VCL Reference

TJPEGData methods

TJPEGData	Alphabetically	Legend

In TJPEGData

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TJPEGData methods

TJPEGData	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TJPEGData.Destroy
 VCL Reference

TJPEGData.Destroy

TJPEGData	See also

Destroys of an instance of a jpeg data object.

destructor Destroy; override;

Description

The jpeg data object is automatically destroyed by the jpeg image object that uses it. It is not necessary to call Destroy or to directly access the jpeg data object.

The Destroy method of a jpeg data object handles the freeing of the data.


Hierarchy

TObject

TSharedImage

TJPEGData


TJPEGImage
 VCL Reference

TJPEGImage

Hierarchy	Properties	Methods	Events	See also 	Example

TJPEGImage encapsulates a jpeg graphic.

Unit

Jpeg

Description

Use TJPEGImage to read and write jpeg compressed image data. TJPEGImage handles the digital compression and decompression of still images for use in computer systems. It uses the data from an instance of TJPEGData, which contains the actual jpeg data source and is never modified. Each jpeg image object may share its TJPEGData object with other instances of a jpeg image by creating copies using the Assign method. The jpeg data source handles reference counting for the jpeg image objects that are linked to it.

TJPEGImage has an internal bitmap that represents the jpeg image. This internal image and the original source of the jpeg image are read only. TJPEGImage has properties that determine how each instance will handle color conversion, compression, decompression, performance, and so on.

The following are characteristics of this object. A TJPEGImage object:

Has no canvas (so it cannot draw onto a canvas). However, TJPEGImage implements the protected Draw method introduced in TGraphic, so it can draw itself on the canvas of another object.

Provides no access to the internal bitmap image that it creates for the JPEG image.

Performs reference counting and handle sharing by means of the TJPEGData object. Multiple instances can refer to the same TJPEGData image. TJPEGData is the actual owner of the file handle to the jpeg data source.


 VCL Reference

TJPEGImage properties

TJPEGImage	Alphabetically	Legend

In TJPEGImage

CompressionQuality

Empty

Grayscale

Height

Palette

Performance

PixelFormat

ProgressiveDisplay

ProgressiveEncoding

Scale

Smoothing

Width

Derived from TGraphic

Modified

PaletteModified

Transparent


 VCL Reference

TJPEGImage properties

TJPEGImage	By object	Legend

CompressionQuality

Empty

Grayscale

Height

Modified

Palette

PaletteModified

Performance

PixelFormat

ProgressiveDisplay

ProgressiveEncoding

Scale

Smoothing

Transparent

Width


TJPEGImage.CompressionQuality
 VCL Reference

TJPEGImage.CompressionQuality

TJPEGImage

Indicates the trade-off ratio between the image quality and the file size.

type TJPEGQualityRange = 1..100;

property CompressionQuality: TJPEGQualityRange;

Description

Use CompressionQuality to set the compression quality of the JPEG image when writing out a jpeg image. Higher compression results in a poorer picture quality, but a smaller file size. This property is not used for reading in files.

TJPEGQualityRange is the type of the CompressionQuality property. The higher the TJPEGQualityRange value (up to a maximum of 100), the better the image quality, but the larger the file size. The lower the TJPEGQualityRange value (to a minimum of 1), the smaller the resulting file size, but at the expense of picture quality.


TJPEGImage.Empty
 VCL Reference

TJPEGImage.Empty

TJPEGImage

Specifies whether the JPEG image object contains a graphic.

property Empty: Boolean;

Description

Use Empty to determine if a image has been loaded into the jpeg image object. Empty is True if the jpeg image contains an image, and False if it does not.


TJPEGImage.Grayscale
 VCL Reference

TJPEGImage.Grayscale

TJPEGImage

Determines whether the image output of a JPEG image is black and white, or color.

property Grayscale: Boolean;

Description

Use GrayScale for reading in and writing out, that is, for decompressing and compressing, a jpeg image. This property affects how the image is displayed.

GrayScale is used for speed in output optimization. When GrayScale is set to True, the color is separated from luminosity. Color takes the most time to decompress, so for previewing the image, GrayScale can be set to True for speed. The output then contains 255 shades of gray.


TJPEGImage.Height
 VCL Reference

TJPEGImage.Height

TJPEGImage

Indicates the vertical size (in pixels) of the jpeg image.

property Height: Integer;

Description

Use Height to find the vertical size in pixels of the jpeg image.


TJPEGImage.Palette
 VCL Reference

TJPEGImage.Palette

TJPEGImage	See also

Specifies the color palette of the JPEG image.

property Palette: HPALETTE;

Description

Use Palette to get or set the color palette of a jpeg image. If the jpeg image does not need or does not use a palette, the Palette property is zero. Changing the Palette property sets PaletteModified to True only if an image has been loaded into the TJPEGImage object.


TJPEGImage.Performance
 VCL Reference

TJPEGImage.Performance

TJPEGImage

Controls the trade-off between color quality and speed of decompression.

type TJPEGPerformance = (jpBestQuality, jpBestSpeed);

property Performance: TJPEGPerformance;

Description

Use Performance to set the performance of the jpeg image when reading, that is, for decompressing files. This property is not used for writing out files.

Performance affects the display of the internal bitmap image. This image is a 256-color bitmap. Setting Performance to jpBestSpeed may cause some dithering in the bitmap image.


TJPEGImage.PixelFormat
 VCL Reference

TJPEGImage.PixelFormat

TJPEGImage

Determines whether the JPEG image is displayed in 24 or 8-bit format.

type TJPEGPixelFormat = (jf24Bit, jf8Bit);

property PixelFormat: TJPEGPixelFormat;

Description

Use PixelFormat to set the pixel format of the jpeg image to 8-bit for video drivers that cannot display 24-bit. The native format of a jpeg image is 24-bit. PixelFormat is used for decompression, that is, for reading in files. PixelFormat will also apply to a bitmap if the image is copied to it.


TJPEGImage.ProgressiveDisplay
 VCL Reference

TJPEGImage.ProgressiveDisplay

TJPEGImage	See also

Controls how the image is displayed when decompressing files.

property ProgressiveDisplay: Boolean;

Description

Use ProgressiveDisplay to turn on or off the incremental display of an image when reading in files. For example, if the jpeg data source file is on the hard drive, progressively displaying it slows down the display time: in this case setting ProgressiveDisplay to False speeds up the displaying of the image. If the file must be downloaded, set ProgressiveDisplay to True if the downloading process will take as long as the progressive displaying of the image.

ProgressiveDisplay is used only for decompression, but is affected by the manner in which the image was compressed. Images that were compressed with ProgressiveEncoding set to False cannot take advantage of ProgressiveDisplay. Setting ProgressiveDisplay to True for these images has no effect.


TJPEGImage.ProgressiveEncoding
 VCL Reference

TJPEGImage.ProgressiveEncoding

TJPEGImage	See also

Determines whether an image can be progressively displayed when it is decompressed.

property ProgressiveEncoding: Boolean;

Description

Use ProgressiveEncoding to compress an image when writing out files, so that it can be progressively displayed when it is decompressed. Setting the ProgressiveDisplay property to True has no effect if ProgressiveEncoding was not set to True when the image was compressed.


TJPEGImage.Scale
 VCL Reference

TJPEGImage.Scale

TJPEGImage

Determines the size of the JPEG image when it is displayed.

type TJPEGScale = (jsFullSize, jsHalf, jsQuarter, jsEighth);

property Scale: TJPEGScale;

Description

Use Scale to optimize performance for previewing an image. jsFullSize displays the image as maximum size, whereas jsEighth displays an eighth of the image size, but 8 times faster.

TJPEGScale is the type of the Scale property. The following table lists the values of TJPEGScale:

Value	Meaning

jsFullSize	Displays a full-sized image.

jsHalf	Displays a half-size image in half the time it takes to display a full-sized image.

jsQuarter	Displays a quarter-size image in a quarter of the time it takes to display a full-sized image.

jsEighth	Displays an eighth-size image in an eighth of the time it takes to display a full-sized image.

Scale it used for reading in files, that is, for decompression.


TJPEGImage.Smoothing
 VCL Reference

TJPEGImage.Smoothing

TJPEGImage	See also

Determines whether the jpeg image displays in blocks or with blurred edges.

property Smoothing: Boolean;

Description

Smoothing is used if ProgressiveDisplay is True, to determine whether the jpeg image is displayed in small blocks or with blurred edges. If Smoothing is True, the edges are blurred during progressive displaying of the image. If Smoothing is False, raw blocks of color are used to display the image.


TJPEGImage.Width
 VCL Reference

TJPEGImage.Width

TJPEGImage

Specifies the horizontal size in pixels of the jpeg image.

property Width: Integer;

Description

Use Width to find the vertical size in pixels of the jpeg image.


 VCL Reference

TJPEGImage events

TJPEGImage	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 VCL Reference

TJPEGImage events

TJPEGImage	By object	Legend

OnChange

OnProgress


 VCL Reference

TJPEGImage methods

TJPEGImage	Alphabetically	Legend

In TJPEGImage

Assign

Compress

Create

Destroy

DIBNeeded

JPEGNeeded

LoadFromClipboardFormat

LoadFromStream

SaveToClipboardFormat

SaveToStream

Derived from TGraphic

LoadFromFile

SaveToFile

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TJPEGImage methods

TJPEGImage	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Compress

Create

DefaultHandler

Destroy

DIBNeeded

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

JPEGNeeded

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TJPEGImage.Assign
 VCL Reference

TJPEGImage.Assign

TJPEGImage	See also	Example

Copies the jpeg image object and creates a new reference to the internal data source object.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the jpeg image contained in Source to the jpeg image object. Assign then calls the inherited Assign. Assign creates a new link to the internal jpeg data source by which the jpeg image objects do reference counting and handle sharing.

Tip:	To draw on a jpeg image, Assign the jpeg image to a bitmap, and then draw on that.

Note:	An object of one type can always be assigned to another object of the same type. Also, the Source can be of type TPicture if the Graphic property of the picture is a jpeg image or a bitmap.


TJPEGImage.Create
 VCL Reference

TJPEGImage.Create

TJPEGImage	See also	Example

Instantiates a JPEG image object.

type

  TJPEGDefaults = record

    CompressionQuality: TJPEGQualityRange;

    Grayscale: Boolean;

    Performance: TJPEGPerformance;

    PixelFormat: TJPEGPixelFormat;

    ProgressiveDisplay: Boolean;

    ProgressiveEncoding: Boolean;

    Scale: TJPEGScale;

    Smoothing: Boolean;

  end;

constructor Create; override;

Description

Call Create to instantiate a jpeg image object at runtime.

Create allocates memory for a jpeg image object, and then uses a TJPEGDefaults type record to initialize values for the following properties:

CompressionQuality

Grayscale

Performance

PixelFormat

ProgressiveDisplay

ProgressiveEncoding

Scale

Smoothing

After the jpeg is loaded from a file, an internal bitmap is created of the image.


TJPEGImage.Compress
 VCL Reference

TJPEGImage.Compress

TJPEGImage	See also

Forces the action of compression.

procedure Compress;

Description

Call Compress to compress for optimization, such as before streaming out when assigning a bitmap to a jpeg. Changing properties like CompressionQuality does not force compression. To force compression, call Compress.


TJPEGImage.DIBNeeded
 VCL Reference

TJPEGImage.DIBNeeded

TJPEGImage	See also

Decompress the jpeg image into a bitmap.

procedure DIBNeeded;

Description

DIBNeeded is used when the jpeg image needs a bitmap representation of its image. Call DIBNeeded just before drawing rather than while drawing for optimization.


TJPEGImage.Destroy
 VCL Reference

TJPEGImage.Destroy

TJPEGImage	See also

Destroys of an instance of a jpeg image object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TJPEGImage reference is not nil before it calls Destroy.

Destroy handles the freeing of the internal bitmap image and decrements the reference count on the jpeg data source to which it was linked.


TJPEGImage.JPEGNeeded
 VCL Reference

TJPEGImage.JPEGNeeded

TJPEGImage	See also

Creates a new TJPEGData object if the jpeg image only has a bitmap and a jpeg is needed.

procedure JPEGNeeded;

Description

Call JPEGNeeded to create a new jpeg data source when the jpeg image has thrown away the jpeg data and only has an internal bitmap. JPEGNeeded creates a new jpeg data source. The SaveToStream method uses JPEGNeeded.


TJPEGImage.LoadFromClipboardFormat
 VCL Reference

TJPEGImage.LoadFromClipboardFormat

TJPEGImage	See also

Reads in a jpeg image from the Clipboard into the jpeg image object.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;

Description

LoadFromClipboardFormat is called if the jpeg image is registered with the TPicture object using the RegisterClipboardFormat method. LoadFromClipboardFormat can also recognize, and supports, a bitmap format on the Clipboard.

LoadFromClipboardFormat replaces the current image with the data pointed to by the AData parameter. The palette for the jpeg image is specified by the APalette parameter.


TJPEGImage.LoadFromStream
 VCL Reference

TJPEGImage.LoadFromStream

TJPEGImage	See also

Loads the jpeg image from a stream.

procedure LoadFromStream(Stream: TStream); override;

Description

Use LoadFromStream by specifying the stream from which the jpeg image is loaded as the value of Stream. LoadFromStream reads a jpeg data source from a stream and replaces the current image with it.


TJPEGImage.SaveToClipboardFormat
 VCL Reference

TJPEGImage.SaveToClipboardFormat

TJPEGImage	See also

Writes a jpeg image to a variable in Clipboard format.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); override;

Description

Use SaveToClipboardFormat to save the jpeg image to a variable. The palette is returned as the APalette parameter, the format as the Aformat parameter, and the data as the AData parameter. Before the jpeg image can be saved, an application must have registered the format with the TJPEGImage object using the RegisterClipboardFormat method.


TJPEGImage.SaveToStream
 VCL Reference

TJPEGImage.SaveToStream

TJPEGImage	See also

Writes the jpeg data to a stream.

procedure SaveToStream(Stream: TStream); override;

Description

Use SaveToStream to save the jpeg data to the stream specified by the Stream parameter. SaveToStream expects jpeg image data and may incur overhead of a compression cycle if the source is a bitmap.


Hierarchy

TObject

TPersistent

TGraphic

TJPEGImage


TLabel
 VCL Reference

 TLabel

Hierarchy	Properties	Methods	Events	Using TLabel	See also

TLabel is a nonwindowed control that displays text  on a form.

Unit

StdCtrls

Description

Use TLabel to add text  that the user can’t edit to a form. This text  can be used to label another control, and can set focus to that control when the user types an accelerator key.

Because TLabel is not a descendant of TWinControl, it does not have its own window and can’t receive direct input from the keyboard. To add an object to a form that can respond to keyboard input (other than setting focus to another object when an accelerator key is typed) in addition to displaying text, use TStaticText.

To add an object to a form that displays text that a user can scroll or edit, use TEdit.


 VCL Reference

TLabel properties

TLabel	Alphabetically	Legend

Derived from TCustomLabel

Alignment

AutoSize

FocusControl

Layout

ShowAccelChar

Transparent

WordWrap

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TLabel Properties

TLabel	By Object	Legend

Action

Align

Alignment

Anchors

AutoSize

BiDiMode

BoundsRect

Canvas

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

FocusControl

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Layout

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowAccelChar

ShowHint

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc

WordWrap


 VCL Reference

TLabel events

TLabel	Alphabetically	Legend

Derived from TCustomLabel

OnMouseEnter

OnMouseLeave

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TLabel Events

TLabel	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TLabel methods

TLabel	Alphabetically	Legend

Derived from TCustomLabel

Create

Derived from TGraphicControl

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLabel Methods

TLabel	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TCustomLabel

TLabel


TLabeledEdit
 VCL Reference

TLabeledEdit

Hierarchy	Properties	Methods	Events	See also

TLabeledEdit is an edit control that has an associated label.

Unit

ExtCtrls

Description

Use TLabeledEdit to add an edit control with a label to a form. TLabeledEdit works with an associated label control, which is the value of its EditLabel property. The position of that label relative to the edit control is determined by the LabelPosition and LabelSpacing properties.

Use the Text property to work with the text in the control, and the label’s Caption property to work with the text in the label.


 VCL Reference

TLabeledEdit Properties

TLabeledEdit	Alphabetically	Legend

Derived from TCustomLabeledEdit

EditLabel

LabelPosition

LabelSpacing

Derived from TCustomEdit

AutoSelect

AutoSize

BorderStyle

CanUndo

CharCase

HideSelection

MaxLength

Modified

OEMConvert

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

PasswordChar

ReadOnly

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TLabeledEdit Properties

TLabeledEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoSelect

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditLabel

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

ImeMode

ImeName

LabelPosition

LabelSpacing

Left

LRDockWidth

MaxLength

Modified

Name

OEMConvert

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PasswordChar

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TLabeledEdit events

TLabeledEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TLabeledEdit events

TLabeledEdit	By object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TLabeledEdit Methods

TLabeledEdit	Alphabetically	Legend

Derived from TCustomLabeledEdit

Create

SetBounds

SetupInternalLabel

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TLabeledEdit Methods

TLabeledEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

SetupInternalLabel

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TLabeledEdit.CMBidiModeChanged
 VCL Reference

TLabeledEdit.CMBidiModeChanged

TLabeledEdit	See also

Responds when the BiDiMode property changes.

procedure CMBidimodechanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the BiDiMode property.

Message is a CM_BIDIMODECHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the BiDiMode property of the associated label to the value of its own BiDiMode property.


TLabeledEdit.CMEnabledchanged
 VCL Reference

TLabeledEdit.CMEnabledchanged

TLabeledEdit	See also

Responds when the Enabled property changes.

procedure CMEnabledchanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the Enabled property.

Message is a CM_ENABLEDCHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the Enabled property of the associated label to the value of its own Enabled property.


TLabeledEdit.CMVisiblechanged
 VCL Reference

TLabeledEdit.CMVisiblechanged

TLabeledEdit	See also

Responds when the Visible property changes.

procedure CMVisiblechanged(var Message: TMessage);

Description

CMBidiModeChanged is called automatically when an application changes the Visible property.

Message is a CM_VISIBLECHANGED message that notifies the labeled edit of the change.

The labeled edit control responds by changing the Visible property of the associated label to the value of its own Visible property.


TLabeledEdit.Create
 VCL Reference

TLabeledEdit.Create

TLabeledEdit	See also

Creates an instance of TLabeledEdit.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a labeled edit control. AOwner specifies a component, typically the form, that is responsible for freeing the labeled edit control.


TLabeledEdit.Notification
 VCL Reference

TLabeledEdit.Notification

TLabeledEdit	See also

Responds to notifications when objects are created or destroyed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

This protected method is called automatically immediately after objects are created and immediately before they are destroyed. TLabeledEdit overrides this method to update the EditLabel property when it receives a notification that the label component is about to be destroyed.

AComponent is the component that was just created or that is about to be destroyed.

Operation indicates whether the notification indicates the creation or destruction of AComponent.


TLabeledEdit.SetBounds
 VCL Reference

TLabeledEdit.SetBounds

TLabeledEdit	See also

Sets the Left, Top, Width, and Height properties all at once.

procedure SetBounds(ALeft: Integer; ATop: Integer; AWidth: Integer; AHeight: Integer); override;

Description

Use SetBounds to change all of the labeled edit control’s boundary properties at one time. The same effect can be achieved by setting the Left, Top, Width, and Height properties separately, but SetBounds changes all four properties at once, ensuring that the control will not repaint between changes. After changing the boundaries of the edit control, SetBounds adjusts the position of the label if necessary.

Specify the values for the Left, Top, Width, and Height properties as the value of the ALeft, ATop, AWidth, and AHeight parameters, respectively.

Note:	Calling SetBounds does not necessarily result in the Left, Top, Width, and Height properties changing to the specified values. Before the properties are changed, the AutoSize or Constraints property may limit the changes.


TLabeledEdit.SetName
 VCL Reference

TLabeledEdit.SetName

TLabeledEdit	See also

Sets the Name property.

procedure SetName(const Value: TComponentName); override;

Description

SetName is the protected property setter for the Name property. TLabeledEdit overrides SetName to keep the Name property in sync with the label’s Caption property, as long as the Caption property has not been explicitly set to another value.

Value is the new name to set.


TLabeledEdit.SetParent
 VCL Reference

TLabeledEdit.SetParent

TLabeledEdit	See also

Sets the value of the Parent property.

procedure SetParent(AParent: TWinControl); override;

Description

SetParent is the protected property setter for the Parent property. TLabeledEdit overrides SetParent to ensure that the label has the same parent as the edit control.


TLabeledEdit.SetupInternalLabel
 VCL Reference

TLabeledEdit.SetupInternalLabel

TLabeledEdit	See also

Initializes the control that implements the EditLabel property.

procedure SetupInternalLabel;

Description

Applications do not need to call SetupInternalLabel because this method is called when you set the EditLabel property.

SetupInternalLabel ensures that there is a control to implement the EditLabel property, adds the labeled edit control to the list of components that should be notified when the label is freed, and sets the label’s FocusControl property to the labeled edit control.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomLabeledEdit

TLabeledEdit


TLanguages
 VCL Reference

TLanguages

Hierarchy	Properties	Methods	See also

TLanguages lists all available Windows locales.

Unit

SysUtils

Description

The Languages function returns a TLanguages instance that lists the Windows locales supported by the current system. For each locale, TLanguages indicates the locale ID (LCID), standard name, and recommended file-name extension. This information is obtained from the operating system; all TLanguages properties are read-only.


 VCL Reference

TLanguages properties

TLanguages	Alphabetically	Legend

In TLanguages

Count

Ext

ID

LocaleID

Name

NameFromLCID

NameFromLocaleID


 VCL Reference

TLanguages properties

TLanguages	By object	Legend

Count

Ext

ID

LocaleID

Name

NameFromLCID

NameFromLocaleID


TLanguages.Count
 VCL Reference

TLanguages.Count

TLanguages	See also

The number of locales listed in the TLanguages object.

property Count: Integer;

Description

Read Count to determine the number of locales supported by the current system.


TLanguages.Ext
 VCL Reference

TLanguages.Ext

TLanguages	See also

Returns the standard file-name extension at the specified position in the array.

property Ext[Index: Integer]: string;

Description

Read Ext to get the standard three-letter file-name extension for a locale. For example, Ext[IndexOf($0409)] returns the string ENU.

Ext is a zero-based array.


TLanguages.ID
 VCL Reference

TLanguages.ID

TLanguages	See also

Returns a locale ID as a string.

property ID[Index: Integer]: string;

Description

Read ID to get the locale ID at a specified position in the array as a string. (To get the same ID as an integer, use the LocaleID property.) For example, if U.S. English is the first locale listed in TLanguages, then ID[0] returns the string $00000409. You can iterate through the ID array (from 0 to Count - 1) to determine whether a specific locale is in the array.


TLanguages.LocaleID
 VCL Reference

TLanguages.LocaleID

TLanguages	See also

Returns a locale ID as an integer.

property LocaleID[Index: Integer]: LCID;

Description

Read LocaleID to get the locale ID at a specified position in the array as an integer. (To get the same ID as a string, use the ID property.) For example, if U.S. English is the first locale listed in TLanguages, then LocaleID[0] returns the integer $409. You can iterate through the LocaleID array (from 0 to Count - 1) to determine whether a specific locale is in the array.


TLanguages.Name
 VCL Reference

TLanguages.Name

TLanguages	See also

Returns the locale name at the specified position in the array.

property Name[Index: Integer]: string;

Description

Read Name to get the standard Windows name for a locale. For example, Name[IndexOf($0409)] returns the string English (United States).

Name is a zero-based array.


TLanguages.NameFromLCID
 VCL Reference

TLanguages.NameFromLCID

TLanguages	See also

Returns the locale name specified by a string representation of a locale ID.

property NameFromLCID[const ID: string]: string;

Description

Read NameFromLCID to get the standard Windows name for a locale using a locale ID represented by a string. For example, NameFromLCID['$0409'] returns the string English (United States).


TLanguages.NameFromLocaleID
 VCL Reference

TLanguages.NameFromLocaleID

TLanguages	See also

Returns the locale name specified by an integer locale ID.

property NameFromLocaleID[ID: LCID]: string;

Description

Read NameFromLocaleID to get the standard Windows name for a locale using an integer locale ID. For example, NameFromLCID[$0409] returns the string English (United States).


 VCL Reference

TLanguages methods

TLanguages	Alphabetically	Legend

In TLanguages

Create

IndexOf

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TLanguages methods

TLanguages	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TLanguages.IndexOf
 VCL Reference

TLanguages.IndexOf

TLanguages	See also

Returns the index of the first locale in the array with the specified LCID.

function IndexOf(ID: LCID): Integer;

Description

Call IndexOf to get the position in the array of a specified locale ID. For example, if U.S. English is the first locale listed in TLanguages, then IndexOf($0409) returns 0.

If the specified LCID is not found, IndexOf returns -1.


TLanguages.Create
 VCL Reference

TLanguages.Create

TLanguages	See also

Creates a new TLanguages object.

constructor Create;

Description

Do not construct a TLanguages object directly. Instead, call the Languages function, which returns an instance of TLanguages with locale information obtained from Windows.


Hierarchy

TObject

TLanguages


TList
 VCL Reference

TList

Hierarchy	Properties	Methods	See also

TList stores an array of pointers.

Unit

Classes

Description

TList, which stores an array of pointers, is often used to maintain lists of objects. TList introduces properties and methods to

Add or delete the objects in the list.

Rearrange the objects in the list.

Locate and access objects in the list.

Sort the objects in the list.


 VCL Reference

TList properties

TList	Alphabetically	Legend

In TList

Capacity

Count

Items

List


 VCL Reference

TList properties

TList	By object	Legend

Capacity

Count

Items

List


TList.Capacity
 VCL Reference

TList.Capacity

TList	See also

Specifies the allocated size of the array of pointers maintained by the TList object.

property Capacity: Integer;

Description

Set Capacity to the number of pointers the list will need to contain. When setting the Capacity property, an EOutOfMemory exception occurs if there is not enough memory to expand the list to its new size.

Read Capacity to learn number of objects the list can hold without reallocating memory. Do not confuse Capacity with the Count property, which is the number of entries in the list that are in use. The value of Capacity is always greater than or equal to the value of Count. When Capacity is greater than Count, the unused memory can be reclaimed by setting Capacity to Count.

When an object is added to a list that is already filled to capacity, the Capacity property is automatically increased. Setting Capacity before adding objects can reduce the number of memory reallocations and thereby improve performance. For example,

List.Clear;

List.Capacity := Count;

for I := 1 to Count do List.Add(...);

The assignment to Capacity before the for loop ensures that each of the following Add operations doesn't cause the list to be reallocated. Avoiding reallocations on the calls to Add improves performance and ensures that the Add operations never raise an exception.


TList.Count
 VCL Reference

TList.Count

TList	See also 	Example

Indicates the number of entries in the list that are in use.

property Count: Integer;

Description

Read Count to determine the number of entries in the Items array.

Increasing the size of Count will add the necessary number of nil pointers to the end of the Items array. Decreasing the size of Count will remove the necessary number of entries from the end of the Items array.

Count is not always the same as the number of objects referenced in the list. Some of the entries in the Items array may contain nil pointers. To remove the nil pointers and set Count to the number of entries that contain references to objects, call the Pack method.


TList.Items
 VCL Reference

TList.Items

TList	See also 	Example

Lists the object references.

property Items[Index: Integer]: Pointer;

Description

Use Items to obtain a pointer to a specific object in the array. The Index parameter indicates the index of the object, where 0 is the index of the first object, 1 is the index of the second object, and so on. Set Items to change the reference at a specific location.

Use Items with the Count property to iterate through all of the objects in the list.

Not all of the entries in the Items array need to contain references to objects. Some of the entries may be nil pointers. To remove the nil pointers and reduce the size of the Items array to the number of objects, call the Pack method.


TList.List
 VCL Reference

TList.List

TList	See also

Specifies the array of pointers that make up the Items array.

type

  TPointerList = array[0..MaxListSize-1] ofPointer;

  PPointerList = ^TPointerList;

property List: PPointerList;

Description

Use List to gain direct access to the Items array.


 VCL Reference

TList methods

TList	Alphabetically	Legend

In TList

Add

Assign

Clear

Delete

Destroy

Error

Exchange

Expand

Extract

First

IndexOf

Insert

Last

Move

Pack

Remove

Sort

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TList methods

TList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Error

Exchange

Expand

Extract

FieldAddress

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

MethodAddress

MethodName

Move

NewInstance

Pack

Remove

SafeCallException

Sort


TList.Add
 VCL Reference

TList.Add

TList	See also 	Example

Inserts a new item at the end of the list.

function Add(Item: Pointer): Integer;

Description

Call Add to insert a new object at the end of the Items array. Add returns the index of the new item, where the first item in the list has an index of 0.

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity.

Note:	Add always inserts the Item pointer at the end of the Items array, even if the Items array contains nil pointers.


TList.Assign
 VCL Reference

TList.Assign

TList	See also

Copies elements of one list to another.

procedure Assign(ListA: TList; AOperator: TListAssignOp = laCopy; ListB: TList = nil);

Description

Call Assign to assign the elements of another list to this one. Assign combines the source list with this one using the logical operator specified by the AOperator parameter.

If the ListB parameter is specified, then Assign first replaces all the elements of this list with those in ListA, and then merges ListB into this list using the operator specified by AOperator.

If the ListB parameter is not specified, then Assign merges ListA into this list using the operator specified by AOperator.


TList.Clear
 VCL Reference

TList.Clear

TList	See also

Deletes all items from the list.

procedure Clear; virtual;

Description

Call Clear to empty the Items array and set the Count to 0. Clear also frees the memory used to store the Items array and sets the Capacity to 0.


TList.Delete
 VCL Reference

TList.Delete

TList	See also

Removes the item at the position given by the Index parameter.

procedure Delete(Index: Integer);

Description

Call Delete to remove the item at a specific position from the list. The index is zero-based, so the first item has an Index value of 0, the second item has an Index value of 1, and so on. Calling Delete moves up all items in the Items array that follow the deleted item, and reduces the Count.

In TList, the Extract and Delete methods behave exactly the same way. Descendant classes (including TObjectList and TComponentList) distinguish the two methods.

To remove the reference to an item without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil.

Note:	Delete does not free any memory associated with the item. To free the memory that was used to store a deleted item, set the Capacity property.


TList.Destroy
 VCL Reference

TList.Destroy

TList	See also

Destroys an instance of TList.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free. Free verifies that the TList reference is not nil, and only then calls Destroy.

Destroy frees the memory used to store the list of items.

Note:	Destroy does not free the memory pointed to by the elements of the list.


TList.Error
 VCL Reference

TList.Error

TList	See also

Raises an EListError exception.

classprocedure Error(const Msg: string; Data: Integer); overload; virtual;

class procedure Error(Msg: PResStringRec; Data: Integer); overload;

Description

Call Error to raise an exception when an error occurs working with a TList object. Error assembles an error message from the format string (or resourcestring) passed as the Msg parameter and the data value passed as the Data parameter, and then raises an EListError exception.

Call Error rather than adding a line such as

raise EListError.CreateFmt(MyMsg, iBadValue);

or

resourcestring sBadValueMessage = '%s not a valid list value';

...

EListError.Create(@sBadValueMessage, iBadValue);

to reduce the code size of an application.


TList.Exchange
 VCL Reference

TList.Exchange

TList	See also

Swaps the position of two items in the Items array.

procedure Exchange(Index1, Index2: Integer);

Description

Call Exchange to swap the positions of the items at positions Index1 and Index2 of the Items array. The indexes are zero-based, so the first item in the list has an index value of 0, the second item has an index value of 1, and so on.


TList.Expand
 VCL Reference

TList.Expand

TList	See also

Increases the Capacity of the list.

function Expand: TList;

Description

Call Expand to create more space for adding new items to the list. Expand does nothing if the list is not already filled to Capacity.

If Count = Capacity, Expand increases the Capacity of the list as follows. If the value of Capacity is greater than 8, Expand increases the Capacity of the list by 16. If the value of Capacity is greater than 4, but less than 9, the Capacity of the list increases by 8. If the value of Capacity is less than 4, the Capacity of the list grows by 4.

The returned value is the expanded list object.


TList.Extract
 VCL Reference

TList.Extract

TList	See also

Removes a specified item from the list.

function Extract(Item: Pointer): Pointer;

Description

Call Extract to remove an item from the list. After the item is removed, all the objects that follow it are moved up in index position and Count is decremented.

In TList, the Extract and Delete methods behave exactly the same way. Descendant classes (including TObjectList and TComponentList) distinguish the two methods.

To remove the reference to an item without deleting the entry from the Items array and changing the Count, set the Items property for Index to nil.


TList.First
 VCL Reference

TList.First

TList	See also

Returns Items[0].

function First: Pointer;

Description

Call First to get the first pointer in the Items array.


TList.IndexOf
 VCL Reference

TList.IndexOf

TList	See also	Example

Returns the index of the first entry in the Items array with a specified value.

function IndexOf(Item: Pointer): Integer;

Description

Call IndexOf to get the index for a pointer in the Items array. Specify the pointer as the Item parameter.

The first item in the array has index 0, the second item has index 1, and so on. If an item is not in the list, IndexOf returns -1. If a pointer appears more than once in the array, IndexOf returns the index of the first appearance.


TList.Insert
 VCL Reference

TList.Insert

TList	See also

Adds an object to the Items array at the position specified by Index.

procedure Insert(Index: Integer; Item: Pointer);

Description

Call Insert to add Item to the middle of the Items array. The Index parameter is a zero-based index, so the first position in the array has an index of 0. Insert adds the item at the indicated position, shifting the item that previously occupied that position, and all subsequent items, up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity.

To replace a nil pointer in the array with a new item, without growing the Items array, set the Items property.


TList.Last
 VCL Reference

TList.Last

TList	See also 	Example

Returns Items[Count - 1].

function Last: Pointer;

Description

Call Last to retrieve the last pointer in the Items array.


TList.Move
 VCL Reference

TList.Move

TList	See also

Changes the position of an item in the Items array.

procedure Move(CurIndex, NewIndex: Integer);

Description

Call Move to move the item at the position CurIndex so that it occupies the position NewIndex. CurIndex and NewIndex are zero-base indexes into the Items array.


TList.Pack
 VCL Reference

TList.Pack

TList	See also 	Example

Deletes all nil items from the Items array.

procedure Pack;

Description

Call Pack to move all non-nil items to the front of the Items array and reduce the Count property to the number of items actually used. Pack does not free up the memory used to store the nil pointers. To free up the memory for the unused entries removed by Pack, set the Capacity property to the new value of Count.


TList.Remove
 VCL Reference

TList.Remove

TList	See also 	Example

Deletes the first reference to the Item parameter from the Items array.

function Remove(Item: Pointer): Integer;

Description

Call Remove to remove a specific item from the Items array when its index is unknown. The value returned is the index of the item in the Items array before it was removed. After an item is removed, all the items that follow it are moved up in index position and the Count is reduced by one.

If the Items array contains more than one copy of the pointer, only the first copy is deleted.


TList.Sort
 VCL Reference

TList.Sort

TList	See also	Example

Performs a QuickSort on the list based on the comparison function Compare.

type TListSortCompare = function (Item1, Item2: Pointer): Integer;

procedure Sort(Compare: TListSortCompare);

Description

Call Sort to sort the items in the Items array. Compare is a comparison function that indicates how the items are to be ordered. Compare returns < 0 if Item1 is less and Item2, 0 if they are equal and > 0 if Item1 is greater than Item2.


Hierarchy

TObject

TList


TListBox
 VCL Reference

 TListBox

Hierarchy	Properties	Methods	Events	Using TListBox

TListBox is a wrapper for a Windows list box control.

Unit

StdCtrls

Description

Use TListBox to display a scrollable list of items that users can select, add or delete. For specialized list boxes use other descendant classes of TCustomListBox or derive from it.

TListBox implements the generic behavior introduced in TCustomListBox. TListBox publishes many of the properties inherited from TCustomListBox, but does not introduce any new behavior.


 VCL Reference

TListBox Properties

TListBox	By Object	Legend

Derived from TCustomListBox

AutoComplete

BorderStyle

Canvas

Columns

Count

ExtendedSelect

IntegralHeight

ItemHeight

ItemIndex

Items

MultiSelect

ScrollWidth

SelCount

Selected

Sorted

Style

TabWidth

TopIndex

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListBox Properties

TListBox	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoComplete

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Count

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

ExtendedSelect

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IntegralHeight

ItemHeight

ItemIndex

Items

Left

LRDockWidth

MultiSelect

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ScrollWidth

SelCount

Selected

ShowHint

Showing

Sorted

Style

TabOrder

TabStop

TabWidth

Tag

TBDockHeight

Top

TopIndex

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TListBox Events

TListBox	By Object	Legend

Derived from TCustomListBox

OnDrawItem

OnMeasureItem

OnData

OnDataFind

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TListBox Events

TListBox	By Object	Legend

OnClick

OnContextPopup

OnData

OnDataFind

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMeasureItem

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TListBox methods

TListBox	Alphabetically	Legend

Derived from TCustomListBox

AddItem

Clear

ClearSelection

CopySelection

Create

DeleteSelected

Destroy

ItemAtPos

ItemRect

SelectAll

Derived from TCustomListControl

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListBox Methods

TListBox	By Object	Legend

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListBox

TListBox


TListItem
 VCL Reference

TListItem

Hierarchy	Properties	Methods	See also

TListItem is an individual item of a TListView control.

Unit

ComCtrls

Description

Use TListItem to specify the appearance and data associations of an item in a list view. All the list items of the list view are collected by a TListItems object to make up the Items property of the TListView control.


 VCL Reference

TListItem Properties

TListItem	Alphabetically	Legend

In TListItem

Caption

Checked

Cut

Data

Deleting

DropTarget

Focused

Handle

ImageIndex

Indent

Index

Left

ListView

OverlayIndex

Owner

Position

Selected

StateIndex

SubItemImages

SubItems

Top


 VCL Reference

TListItem Properties

TListItem	By Object	Legend

Caption

Checked

Cut

Data

Deleting

DropTarget

Focused

Handle

ImageIndex

Indent

Index

Left

ListView

OverlayIndex

Owner

Position

Selected

StateIndex

SubItemImages

SubItems

Top


TListItem.Caption
 VCL Reference

TListItem.Caption

TListItem	See also 	Example

Specifies the text that labels the item in the list.

property Caption: string;

Description

Use Caption to name the list item. The Caption appears with an associated image that depends on the ViewStyle property of the list view.

If the ReadOnly property of the list view is False, the user can edit the caption.


TListItem.Checked
 VCL Reference

TListItem.Checked

TListItem	See also

Determines whether a check mark appears next to the list item.

property Checked: Boolean;

Description

Use Checked to indicate whether the list item represents a selected option by displaying a check mark next to the item in the list view. When Checked is True, a check mark appears next to the item. When Checked is False, no check mark appears.

Note:	Set the CheckBoxes property of the ListView to True before using the Checked property.


TListItem.Cut
 VCL Reference

TListItem.Cut

TListItem	See also

Determines if the list item is drawn as if it is selected for a cut operation.

property Cut: Boolean;

Description

Set the Cut property to give the list item the grayed-out appearance of an item selected for cutting. Cut does not copy the item to the Clipboard or remove it from the list: the application must still perform these operations.


TListItem.Data
 VCL Reference

TListItem.Data

TListItem	See also

Specifies any application-specific data associated with the list item.

property Data: Pointer;

Description

Use Data to associate arbitrary data structure with the list item. When the user selects or deletes the list item, Data allows the application to quickly access information about the meaning of the list item to implement the appropriate response.


TListItem.Deleting
 VCL Reference

TListItem.Deleting

TListItem	See also

Indicates whether an item's Destroy method has been called and the item is in the process of being deleted.

property Deleting: Boolean;

Description

Deleting returns True  if the item object is in the process of being deleted. Use Deleting to prevent infinite recursion in event handlers.


TListItem.DropTarget
 VCL Reference

TListItem.DropTarget

TListItem	See also

Determines whether the list item appears selected as a drag and drop target.

property DropTarget: Boolean;

Description

Use DropTarget to display the list item as the current drop target of the object the user is dragging. Setting DropTarget to True sets the DropTarget property of all other items in the list view to False.


TListItem.Focused
 VCL Reference

TListItem.Focused

TListItem	See also

Indicates whether the list item has input focus.

property Focused: Boolean;

Description

Set Focused to True to allow the user to edit the Caption.

Note:	Only one item in the view should have focus at a time.  When setting Focused to True, be sure to set the Focused property of all other items in the list view to False. When the list item is Focused, it appears surrounded by a standard focus rectangle.


TListItem.Handle
 VCL Reference

TListItem.Handle

TListItem	See also

Indicates the window handle of the list view that displays the list item.

property Handle: HWND;

Description

A window handle identifies a the window to the underlying API. Handle is a read-only property containing the handle of the list view that displays the list item.


TListItem.ImageIndex
 VCL Reference

TListItem.ImageIndex

TListItem	See also 	Example

Determines which image is displayed as the icon for the list item.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to associate the list item with one of the images in the LargeImages or SmallImages property of the list view. If the ViewStyle of the list view is vsIcon, ImageIndex is the index of the image in the LargeImages property of the list view, where 0 specifies the first image. If the ViewStyle of the list view is vsSmallIcon, vsList, or vsReport, ImageIndex is the index of the image in the SmallImages property of the list view.


TListItem.Index
 VCL Reference

TListItem.Index

TListItem	See also 	Example

Indicates the position of the list item in the TListItems collection.

property Index: Integer;

Description

Use Index to locate the item in the list view. The first item has an index of 0, the second item has an index of 1, and so on.


TListItem.Indent
 VCL Reference

TListItem.Indent

TListItem	See also

Specifies how far the list item is indented.

property Indent: Integer;

Description

Use Indent to get or set how far the list item is indented when the listview’s ViewStyle property is vsReport. Indent specifies the factor times which the Width property of the SmallImages image list is multiplied to obtain the indent in a report style list view. That is, items are indented by

Indent*ListView.SmallImages.Width.


TListItem.Left
 VCL Reference

TListItem.Left

TListItem	See also

Specifies the distance, in pixels, from the left edge of the list view to the left edge of the list item.

property Left: Integer;

Description

Use Left to horizontally position the list item within the list view. Only use the Left property when the ViewStyle property of the list view is vsIcon or vsSmallIcon.


TListItem.ListView
 VCL Reference

TListItem.ListView

TListItem	See also

Indicates the list view control that displays the list item.

property ListView: TCustomListView;

Description

Read ListView to access the list view object that displays the item. Use the properties and methods of the list view object to make changes that affect the list item or to manipulate other items in the list.

Do not confuse the ListView that displays the item with the Owner of the item. The Owner is the TListItems object that manages the collection of all list items. The list view is the Owner of that TListItems object.


TListItem.OverlayIndex
 VCL Reference

TListItem.OverlayIndex

TListItem	See also

Determines which image from the image list is used as an overlay mask.

property OverlayIndex: TImageIndex;

Description

Use OverlayIndex to display an overlay mask on an item in the list when the ViewStyle of the list view is vsIcon or vsSmallIcon. OverlayIndex is the index of the overlay image in the StateImages property of the list view.

An overlay mask is an image drawn transparently over the icon for the item in the list view. For example, to indicate that an item is no longer available, an application could use an overlay image of an X over the item's image.


TListItem.Owner
 VCL Reference

TListItem.Owner

TListItem	See also

Specifies the TListItems object that owns the list item.

property Owner: TListItems;

__propertyTListItems* Owner = {read=FOwner};

Description

Use Owner to access the TListItems object that manages all the list items for the list view. Use the methods of the Owner object to temporarily prevent updates to the image of the list item while it is changed or to add or delete list items.

Do not confuse the Owner property with the list view control that displays the item. The ListView property specifies the list view control that owns the TListItems object.


TListItem.Position
 VCL Reference

TListItem.Position

TListItem	See also

Specifies the position of the list item.

property Position: TPoint;

Description

Use Position to get or set the position of the list item. Position indicates the position, in client coordinates, of the list item’s icon in the client area of the parent list view.

Note:	Position has no effect unless the list view has a ViewStyle of vsIcon or vsSmallIcon.


TListItem.Selected
 VCL Reference

TListItem.Selected

TListItem	See also

Indicates whether the list item is selected.

property Selected: Boolean;

Description

Use Selected to select or unselect the list item. If the MultiSelect property of the list view is False, setting Selected to True sets the Selected property of all other list items in the list view to False. The appearance of a selected item depends on whether it has focus and whether the system colors are used for selection.


TListItem.StateIndex
 VCL Reference

TListItem.StateIndex

TListItem	See also

Specifies which image from the StateImages image list to display for the item.

property StateIndex: TImageIndex;

Description

Set StateIndex to associate the list item with one of the images in the StateImages property of the list view, where 0 specifies the first image. Change StateIndex to display a different image when the state of the item changes.

The state image appears to the left of the normal list item.


TListItem.SubItemImages
 VCL Reference

TListItem.SubItemImages

TListItem	See also

Indicates which images (if any) should appear next to subitems of the item.

property SubItemImages[Index: Integer]: Integer;

Description

Use SubItemImages to associate the subitems of this list item with images from the list view’s SmallImages property, where 0 identifies the first image in SmallImages, 1 identifies the second image, and so on.

The Index parameter identifies the subitem. It corresponds to the index of each subitem string in the SubItems property.

The value of any subitem image index can be overridden in an OnGetSubItemImage event handler.

Note:	Subitems are only visible when the list view's ViewStyle property is set to vsReport.


TListItem.SubItems
 VCL Reference

TListItem.SubItems

TListItem	See also 	Example

Contains any strings that appear as subitems to the list item.

property SubItems: TStrings;

Description

Use SubItems to add strings that appear in the additional columns to the right of the list view item when the list view’s ViewStyle property is vsReport. The TStrings object that implements the SubItems property is created when the list item is created. To the methods of the SubItems object to add or delete subitems.

Note:	Subitems are only visible when the list view's ViewStyle property is set to vsReport.


TListItem.Top
 VCL Reference

TListItem.Top

TListItem	See also

Specifies the distance, in pixels, from the top of the list view to the top of the list item.

property Top: Integer;

Description

Use Top to vertically position the list item within the list view. Only use the Top property when the ViewStyle property of the list view is vsIcon or vsSmallIcon.


 VCL Reference

TListItem Methods

TListItem	Alphabetically	Legend

In TListItem

Assign

CancelEdit

Create

Delete

Destroy

DisplayRect

EditCaption

GetPosition

MakeVisible

SetPosition

Update

WorkArea

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListItem Methods

TListItem	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

CancelEdit

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Delete

Destroy

Dispatch

DisplayRect

EditCaption

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPosition

InheritsFrom

InitInstance

InstanceSize

MakeVisible

MethodAddress

MethodName

NewInstance

SafeCallException

SetPosition

Update

WorkArea


TListItem.Assign
 VCL Reference

TListItem.Assign

TListItem	See also

Copies the properties of another list item.

procedure Assign(Source: TPersistent); override;

Description

It the Source parameter is a TListItem object, Assign copies its Caption, Data, ImageIndex, OverlayIndex, StateIndex, and SubItems properties. Otherwise, Assign calls the inherited method so that any object that copies properties to a list item in its AssignTo method can do so.


TListItem.CancelEdit
 VCL Reference

TListItem.CancelEdit

TListItem	See also

Cancels the editing of the list item's caption.

procedure CancelEdit;

Description

Call CancelEdit to end the editing of the item’s caption, discarding any changes made by the user.


TListItem.Create
 VCL Reference

TListItem.Create

TListItem	See also

Creates an instance of TListItem.

constructor Create(AOwner: TListItems);

Description

Call Create to instantiate a TListItem object at runtime. List items added to the list view at design time are created automatically. At runtime, use the Add method of the TListItems object to create a list item and add it to the list view.


TListItem.Delete
 VCL Reference

TListItem.Delete

TListItem	See also

Deletes the list item from its list view.

procedure Delete;

Description

Use the Delete method to delete a list item. Delete removes the item from the image of the list view before freeing all associated memory by calling the Free method.


TListItem.Destroy
 VCL Reference

TListItem.Destroy

TListItem	See also

Destroys an instance of TListItem.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use Delete, which removes the item from the list view windows before freeing the associated memory.


TListItem.DisplayRect
 VCL Reference

TListItem.DisplayRect

TListItem	See also

Returns the bounding rectangle of the list item.

type TDisplayCode = (drBounds, drIcon, drLabel, drSelectBounds);

function DisplayRect(Code: TDisplayCode): TRect;

Description

Use DisplayRect to get the coordinates of the list item in the client coordinates of the containing listview. The Code parameter specifies what part of the item the bounding rectangle surrounds. These are the possible values for the Code parameter.

Value	Meaning

drBounds	Returns the bounding rectangle of the entire list item, including the icon and label.

drIcon	Returns the bounding rectangle of the icon or small icon

drLabel	Returns the bounding rectangle of the item text

drSelectBounds	Returns the union of the icon and label rectangles, but excludes columns in report view


TListItem.EditCaption
 VCL Reference

TListItem.EditCaption

TListItem	See also

Begins in-place editing of the list item's caption.

function EditCaption: Boolean;

Description

Call EditCaption to put the list item into edit mode. Before bringing up the in-place editor for the item’s caption, EditCaption makes the item the only selected item in the list view and gives it input focus.


TListItem.GetPosition
 VCL Reference

TListItem.GetPosition

TListItem	See also

Returns the position of the list item as a point.

function GetPosition: TPoint;

Description

Call GetPosition to obtain the upper left coordinate of the list item. GetPosition returns a point with the x coordinate set to the value of Left and the y coordinate set to the value of Top.


TListItem.MakeVisible
 VCL Reference

TListItem.MakeVisible

TListItem	See also

Scrolls the list view, if necessary, to ensure a list item is in view.

procedure MakeVisible(PartialOK: Boolean);

Description

Call MakeVisible to ensure that the user can see the list item in the list view. The PartialOK parameter specifies whether the item must be entirely visible. If PartialOK is True, no scrolling occurs if the item is at least partially visible. If PartialOK is False, MakeVisible ensures that the entire list item is visible in the list view.


TListItem.SetPosition
 VCL Reference

TListItem.SetPosition

TListItem	See also

Positions the list item in its list view control.

procedure SetPosition(const Value: TPoint);

Description

Call SetPosition to move the list item to a specified position. The Value parameter specifies the desired coordinates of the upper left corner of the list item.

Note:	The list view control must have its ViewStyle property set to either vsIcon or vsSmallIcon.


TListItem.Update
 VCL Reference

TListItem.Update

TListItem	See also

Updates the image of the list item in the list view display.

procedure Update;

Description

Call Update to update the image of the list view to reflect any changes made to the list item. Changing the Caption, position, or state of the list item automatically updates the list item’s image.


TListItem.WorkArea
 VCL Reference

TListItem.WorkArea

TListItem	See also

Returns the work area (if any) that contains the list item.

function WorkArea: Integer;

Description

When the list view that contains the list item organizes its client area into separate rectangular work areas, each list item is associated with a single work area. WorkArea returns the index of this work area in the list maintained by the list view’s WorkAreas property. If the list view does not use work areas, WorkArea returns –1.

To change the work area of a list item, move it into a position of the list view’s client area that is covered by a different work area.

Note:	Work areas are not supported if the application is running in virtual mode.


Hierarchy

TObject

TPersistent

TListItem


TListView
 VCL Reference

 TListView

Hierarchy	Properties	Methods	Events	Using TListView	See also

TListView displays a list of items in various ways.

Unit

ComCtrls

Description

Use TListView to manage and display a list of items in a form. The items can be displayed in columns with column headers and sub-items, or vertically or horizontally, with small or large icons.

TListView publishes many of the properties, events, and methods of TCustomListView, but does not introduce any new behavior.


 VCL Reference

TListView Properties

TListView	Alphabetically	Legend

Derived from TCustomListView

AllocBy

BorderStyle

BoundingRect

Canvas

Checkboxes

Column

ColumnClick

Columns

DropTarget

FlatScrollBars

FullDrag

GridLines

HideSelection

HotTrack

HotTrackStyles

HoverTime

IconOptions

ItemFocused

ItemIndex

Items

LargeImages

MultiSelect

OwnerData

OwnerDraw

ReadOnly

RowSelect

SelCount

Selected

ShowColumnHeaders

ShowWorkAreas

SmallImages

SortType

StateImages

TopItem

ViewOrigin

ViewStyle

VisibleRowCount

WorkAreas

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TListView Properties

TListView	By Object	Legend

Action

Align

AlignDisabled

AllocBy

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundingRect

BoundsRect

Brush

Canvas

Checkboxes

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Column

ColumnClick

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

DropTarget

Enabled

FlatScrollBars

Floating

FloatingDockSiteClass

Font

FullDrag

GridLines

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

HotTrack

HotTrackStyles

HoverTime

IconOptions

ItemFocused

ItemIndex

Items

LargeImages

Left

LRDockWidth

MultiSelect

Name

Owner

OwnerData

OwnerDraw

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

RowSelect

SelCount

Selected

ShowColumnHeaders

ShowHint

Showing

ShowWorkAreas

SmallImages

SortType

StateImages

TabOrder

TabStop

Tag

TBDockHeight

Top

TopItem

UndockHeight

UndockWidth

VCLComObject

ViewOrigin

ViewStyle

Visible

VisibleDockClientCount

VisibleRowCount

Width

WindowProc

WorkAreas


 VCL Reference

TListView Events

TListView	Alphabetically	Legend

Derived from TCustomListView

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnAdvancedCustomDrawSubItem

OnChange

OnChanging

OnColumnClick

OnColumnDragged

OnColumnRightClick

OnCompare

OnCustomDraw

OnCustomDrawItem

OnCustomDrawSubItem

OnData

OnDataFind

OnDataHint

OnDataStateChange

OnDeletion

OnDrawItem

OnEdited

OnEditing

OnGetImageIndex

OnGetSubItemImage

OnInfoTip

OnInsert

OnSelectItem

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TListView Events

TListView	By Object	Legend

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnAdvancedCustomDrawSubItem

OnChange

OnChanging

OnClick

OnColumnClick

OnColumnDragged

OnColumnRightClick

OnCompare

OnContextPopup

OnCustomDraw

OnCustomDrawItem

OnCustomDrawSubItem

OnData

OnDataFind

OnDataHint

OnDataStateChange

OnDblClick

OnDeletion

OnDragDrop

OnDragOver

OnDrawItem

OnEdited

OnEditing

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnGetSubItemImage

OnInfoTip

OnInsert

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnSelectItem

OnStartDock

OnStartDrag


 VCL Reference

TListView Methods

TListView	Alphabetically	Legend

Derived from TCustomListView

AlphaSort

Arrange

Clear

ClearSelection

CopySelection

Create

CustomSort

DeleteSelected

Destroy

FindCaption

FindData

GetHitTestInfoAt

GetItemAt

GetNearestItem

GetNextItem

GetSearchString

IsEditing

Scroll

SelectAll

StringWidth

UpdateItems

Derived from TCustomListControl

AddItem

MoveSelection

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TListView Methods

TListView	By Object	Legend

AddItem

AfterConstruction

AlphaSort

Arrange

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopySelection

Create

CreateParented

CreateParentedControl

CustomSort

DefaultHandler

DeleteSelected

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindCaption

FindChildControl

FindComponent

FindData

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetHitTestInfoAt

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItemAt

GetNamePath

GetNearestItem

GetNextItem

GetParentComponent

GetSearchString

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsEditing

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

MoveSelection

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

StringWidth

Update

UpdateAction

UpdateControlState

UpdateItems

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomListControl

TCustomMultiSelectListControl

TCustomListView

TListView


TListColumn
 VCL Reference

TListColumn

Hierarchy	Properties	Methods	See also

TListColumn represents a column in a report-style list view.

Unit

ComCtrls

Description

TListView objects use TListColumns to maintain a collection of TListColumn objects.


 VCL Reference

TListColumn Properties

TListColumn	Alphabetically	Legend

In TListColumn

Alignment

AutoSize

Caption

DisplayName

ImageIndex

Index

MaxWidth

MinWidth

Tag

Width

WidthType

Derived from TCollectionItem

Collection

ID


 VCL Reference

TListColumn Properties

TListColumn	By Object	Legend

Alignment

AutoSize

Caption

Collection

DisplayName

ID

ImageIndex

Index

MaxWidth

MinWidth

Tag

Width

WidthType


TListColumn.Alignment
 VCL Reference

TListColumn.Alignment

TListColumn	See also

Specifies how all text is aligned within the list column.

property Alignment: TAlignment;

Description

Use Alignment to specify the horizontal placement of text in the column. The text includes the Caption that appears at the top of the column and the text labels of individual list items that appear in the column.


TListColumn.AutoSize
 VCL Reference

TListColumn.AutoSize

TListColumn

Specifies whether the list column automatically sizes itself to the width of its text.

property AutoSize: Boolean;

Description

Use AutoSize to get or set whether the list column automatically sizes itself to the width of its text.


TListColumn.Caption
 VCL Reference

TListColumn.Caption

TListColumn	See also 	Example

Specifies the text that appears at the top of the column.

property Caption: string;

Description

Use Caption to label the type of item that appears in the column. If the listview control’s ViewStyle and ShowColumnHeaders properties are set to vsReport and True, respectively, the value of Caption appears at the top of the column.


TListColumn.DisplayName
 VCL Reference

TListColumn.DisplayName

TListColumn	See also

DisplayName is a string that names an individual list view column within a collection of columns.

property DisplayName: string;

Description

Use DisplayName to specify the name of the column as it should appear in the columns editor at design time. If the Caption property is set, the value of DisplayName is the same as Caption. Otherwise, DisplayName is the name of the list column class.


TListColumn.ImageIndex
 VCL Reference

TListColumn.ImageIndex

TListColumn	See also

Specifies the index of the image displayed in the column.

property ImageIndex: TImageIndex;

Description

Use ImageIndex to get or set the index of the image displayed in the column. This index identifies an image in the list view’s SmallImages property.


TListColumn.Index
 VCL Reference

TListColumn.Index

TListColumn

Indicates the position of the list item in the TListColumns collection.

property Index: Integer;

Description

Use Index to locate the column in the collection. The first item has an index of 0, the second item has an index of 1, and so on.


TListColumn.MaxWidth
 VCL Reference

TListColumn.MaxWidth

TListColumn	See also

Specifies the maximum column width.

type TWidth = ColumnHeaderWidth..MaxInt;

property MaxWidth: TWidth;

Description

Use MaxWidth to get or set the maximum column width.


TListColumn.MinWidth
 VCL Reference

TListColumn.MinWidth

TListColumn	See also

Specifies the minimum column width.

type TWidth = ColumnHeaderWidth..MaxInt;

property MinWidth: TWidth;

Description

Use MinWidth to get or set the minimum column width.


TListColumn.Tag
 VCL Reference

TListColumn.Tag

TListColumn

Stores an arbitrary integer value with the column.

property Tag: Integer;

Description

Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.


TListColumn.Width
 VCL Reference

TListColumn.Width

TListColumn	See also

Specifies the width of the column.

type TWidth = ColumnHeaderWidth..MaxInt;

property Width: TWidth;

Description

Use Width to specify the width of the list column, in pixels. If Width is assigned the value -1, the list column is automatically resized to accommodate the text in the column. If Width is assigned the value -2, the list column is automatically resized to accommodate the column header (that is, the text in the Caption property). For more readable code, use the global ColumnTextWidth and ColumnHeaderWidth constants when assigning negative values to Width:

Constant	Value	Meaning

ColumnTextWidth	-1	Column is resized to fit text of items.

ColumnHeaderWidth	-2	Column is resized to fit header only.

For example, the following statement causes the leftmost column of ListView1 to be resized automatically to accommodate its text:

ListView1.Columns[0].Width := ColumnTextWidth;

In the form designer, the same thing can be accomplished by opening the Columns editor for ListView1, selecting the first list column, and typing -1 next to Width in the Object Inspector.

When a column is automatically resized, the value of Width changes to indicate the actual column width. The read-only WidthType property, however, retains its value of -1 or -2.


TListColumn.WidthType
 VCL Reference

TListColumn.WidthType

TListColumn	See also

Indicates whether the column is sized automatically.

type TWidth = ColumnHeaderWidth..MaxInt;

property WidthType: TWidth;

Description

The read-only WidthType property indicates how the column width is determined. WidthType is set to the same value as Width. WidthType, however, retains its negative value when Width changes automatically.

If WidthType returns -1, the list column is automatically resized to accommodate the text in the column. If WidthType returns -2, the list column is automatically resized to accommodate the column header. If WidthType returns a nonnegative value, the column is not resized automatically; in this case, the value of Width and WidthType should be the same.

To enable automatic column resizing, assign the value -1 or -2 directly to Width.


 VCL Reference

TListColumn Methods

TListColumn	Alphabetically	Legend

In TListColumn

Assign

Create

Destroy

Derived from TCollectionItem

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListColumn Methods

TListColumn	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TListColumn.Assign
 VCL Reference

TListColumn.Assign

TListColumn	See also

Copies the properties of the source list column.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to copy the display attributes of another list column. Assign sets the Alignment, Width, and Caption values to match the source object. If the Source parameter is not a list column, Assign calls the inherited method to allow assignment from any object that can copy to a list column in its AssignTo method.


TListColumn.Create
 VCL Reference

TListColumn.Create

TListColumn	See also

Creates and initializes a list column.

constructor Create(Collection: TCollection); override;

Description

Description

Do not call Create to create an instance of TListColumn at runtime. Columns added to list view objects at design time are created automatically. At runtime, create list columns indirectly using the Add method of the TListColumns object.

The Collection parameter specifies the TListColumns object that represents the list columns for the list view that uses this column. Create initializes the Alignment property to taLeftJustify and the Width property to 50.


TListColumn.Destroy
 VCL Reference

TListColumn.Destroy

TListColumn 	See also

Destroys the list column and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy. TListColumn objects are destroyed by the TListColumns object that contains them.

Destroy eliminates the TListColumn instance and, if necessary, deletes the column from the listview control.


Hierarchy

TObject

TPersistent

TCollectionItem

TListColumn


TListColumns
 VCL Reference

TListColumns

Hierarchy	Properties	Methods	See also

TListColumns is a collection of TListColumn objects.

Unit

ComCtrls

Description

Each TListColumns represents a collection of TListColumn objects in a TListView. At design time, use the listview control’s Columns editor to add, remove, or modify columns.


 VCL Reference

TListColumns Properties

TListColumns	Alphabetically	Legend

In TListColumns

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TListColumns Properties

TListColumns	By Object	Legend

Count

ItemClass

Items


TListColumns.Items
 VCL Reference

TListColumns.Items

TListColumns	See also

Lists the columns in the collection.

property Items[Index: Integer]: TListColumn; default;

Description

Use Items to directly access the list column objects in the collection. The value of the Index parameter corresponds to the Index property of TListColumn. It represents the position of the column in the list view.


 VCL Reference

TListColumns Methods

TListColumns	Alphabetically	Legend

In TListColumns

Add

Create

Owner

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListColumns Methods

TListColumns	By Object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TListColumns.Add
 VCL Reference

TListColumns.Add

TListColumns	See also 	Example

Creates a new TListColumn instance and adds it to the Items array.

function Add: TListColumn;

Description

Call Add to add a new list column to the end of the items array. Add returns the new list column. At design time, use the listview control’s Columns editor to add columns to the list view.


TListColumns.Create
 VCL Reference

TListColumns.Create

TListColumns	See also

Creates and initializes a TListColumns object.

constructor Create(AOwner: TCustomListView);

Description

Applications should not need to call the Create method directly. Instances of TListView create the TListColumns object from their own constructors. The AOwner parameter is the TListVew instance that uses the TListColumns object to implement its Columns property.


TListColumns.Owner
 VCL Reference

TListColumns.Owner

TListColumns

Returns the Owner of the collection.

function Owner: TCustomListView;

Description

Call Owner to obtain a reference to the list view that owns this collection.


Hierarchy

TObject

TPersistent

TCollection

TListColumns


TListControlItem
 VCL Reference

TListControlItem

Hierarchy	Properties	Methods	See also

TListControlItem represents an item with a text value, an image, and a data pointer.

Unit

ListActns

Description

TListControlItem represents a single item in a control that lists items. TListControlItem objects are used by TStaticListAction to represent the items in a variety of client controls such as list views, list boxes, and combo boxes. In addition, TListControlItem is the base class for TComboExItem, which is specialized to work with the TComboBoxEx control.

Each TListControlItem has

A text value, which it stores as the Caption property.

An associated image, which is identified by the ImageIndex property.

A data pointer, which it stores as the Data property.


 VCL Reference

TListControlItem properties

TListControlItem	Alphabetically	Legend

In TListControlItem

Caption

Data

ImageIndex

Derived from TCollectionItem

Collection

DisplayName

ID

Index


 VCL Reference

TListControlItem properties

TListControlItem	By object	Legend

Caption

Collection

Data

DisplayName

ID

ImageIndex

Index


TListControlItem.Caption
 VCL Reference

TListControlItem.Caption

TListControlItem	See also

Specifies the text value of the item.

property Caption: String;

Description

Set Caption to provide the item with a text value. This is the value that appears in list boxes or combo boxes, or which labels items in list view controls.


TListControlItem.Data
 VCL Reference

TListControlItem.Data

TListControlItem	See also

Points to user-defined data associated with the control.

property Data: Pointer;

Description

Set Data to associate this item with application-specific data. Data has no predefined meaning, although it is used for sorting items when the managing collection’s SortType property is stData.


TListControlItem.ImageIndex
 VCL Reference

TListControlItem.ImageIndex

TListControlItem	See also

Identifies the image associated with this item.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to associate this item with an image. ImageIndex is an index into the Images property of the component that uses this TListControlItem object to represent one of its items.


 VCL Reference

TListControlItem methods

TListControlItem	Alphabetically	Legend

In TListControlItem

Changed

Create

GetDisplayName

SetCaption

SetData

SetImageIndex

Derived from TCollectionItem

DestroyTCollectionItem_Destroy>main

GetNamePath

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListControlItem methods

TListControlItem	By object	Legend

AfterConstruction

Assign

BeforeDestruction

Changed

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetCaption

SetData

SetImageIndex


TListControlItem.Changed
 VCL Reference

TListControlItem.Changed

TListControlItem	See also

Responds when any of the item’s properties changes.

procedure Changed;

Description

Changed is called automatically when the item’s properties change. It calls the Update method of the corresponding TListControlItems object, so that the collection can perform any necessary adjustments.


TListControlItem.Create
 VCL Reference

TListControlItem.Create

TCollectionItem	See also

Creates and initializes a TListControlItem instance.

constructor Create(Collection: TCollection); override;

Description

Do not call the constructor to create a TListControlItem instance. Instead, use the collection’s Add method to create a new list control item.

Collection is the collection object that owns and manages this list control item.


TListControlItem.GetDisplayName
 VCL Reference

TListControlItem.GetDisplayName

TListControlItem	See also

Specifies the name of the item as it appears in the Object Inspector.

function GetDisplayName: string; override;

Description

GetDisplayName returns the string that represents the item in the Collection editor and the Object Inspector.

GetDisplayName returns the value of the Caption if it is set. Otherwise, it returns the class name of the TListControlItem descendant for which this is an instance, with a number added to ensure uniqueness.


TListControlItem.SetCaption
 VCL Reference

TListControlItem.SetCaption

TListControlItem	See also

Sets the value of the Caption property.

procedure SetCaption(const Value: String); virtual;

Description

SetCaption is the protected write implementation of the Caption property. It sets the Caption property to Value, and then calls the Changed method so that the collection can update itself.


TListControlItem.SetData
 VCL Reference

TListControlItem.SetData

TListControlItem	See also

Sets the value of the Data property.

procedure SetData(const Value: Pointer); virtual;

Description

SetData is the protected write implementation of the Data property. It sets the Data property to Value, and then calls the Changed method so that the collection can update itself.


TListControlItem.SetImageIndex
 VCL Reference

TListControlItem.SetImageIndex

TListControlItem	See also

Sets the value of the ImageIndex property.

procedure SetImageIndex(const Value: TImageIndex); virtual;

Description

SetImageIndex is the protected write implementation of the ImageIndex property. It sets the ImageIndex property to Value, and then calls the Changed method so that the collection can update itself.


Hierarchy

TObject

TPersistent

TCollectionItem

TListControlItem


TListControlItems
 VCL Reference

TListControlItems

Hierarchy	Properties	Methods	Events	See also

TListControlItems manages a collection of TListControlItem objects.

Unit

ListActns

Description

TListControlItems manages a collection of items that each include a text value, associated image, and a data pointer.

Use the properties and methods of TListControlItems to:

Access a specific item.

Add or delete items from the collection.

Find out how many items are in the collection.

Sort the items in the collection.

Although TListControlItems can be used on its own, it also acts as a base class to classes that manage the items for a specific component. TListControlItems descendants include TComboExItems, which manages the items of a TComboBoxEx control, and TStaticListItems, which manages items for a list action component.


 VCL Reference

TListControlItems properties

TListControlItems	Alphabetically	Legend

In TListControlItems

CaseSensitive

Items

SortType

Derived from TCollection

Count

ItemClass


 VCL Reference

TListControlItems properties

TListControlItems	By object	Legend

CaseSensitive

Count

ItemClass

Items

SortType


TListControlItems.CaseSensitive
 VCL Reference

TListControlItems.CaseSensitive

TListControlItems	See also

Controls whether items are sorted in a case-sensitive or case-insensitive manner.

property CaseSensitive: Boolean;

Description

Use CaseSensitive to indicate whether the case of item captions should be considered when sorting the items in the list.


TListControlItems.Items
 VCL Reference

TListControlItems.Items

TListControlItems	See also

Lists the items in the collection.

property Items[const Index: Integer]: TListControlItem; default;

Description

Use Items to access the items in this collection.

Index indicates the item to access, where 0 is the index of the first item, 1 is the index of the second item, and so on. The Count property indicates the maximum number of items.

Items is the default property for TListControlItems. This means that the property name can be omitted when using the Items property. For example,

StaticListAction.Items.Items[0].Caption := Edit1.Text;

can also be written

StaticListAction.Items[0].Caption := Edit1.Text;

Note:	Items is a read-only property. To add or delete items from the collection, use the Add and Delete methods.


TListControlItems.SortType
 VCL Reference

TListControlItems.SortType

TListControlItems	See also

Indicates how the items should be sorted.

type TListItemsSortType = (stNone, stData, stText, stBoth);

property SortType: TSortType;

Description

Use SortType to indicate how you want the items sorted, if at all. The following table lists the possible values:

Value	Meaning

stNone	Items are not automatically sorted. You can still sort the items explicitly by calling the Sort or CustomSort method.

stData	Items are sorted based on the value of their Data property. You must supply an OnCompare event handler to specify the sort order.

stText	Items are sorted base on the value of their Caption property. The CaseSensitive property specifies whether comparisons are case-sensitive.

stBoth	Items are sorted based on an OnCompare event handler if one is assigned, otherwise based on the value of their Caption property.


 VCL Reference

TListControlItems events

TListControlItems	Alphabetically	Legend

In TListControlItems

OnCompare


 VCL Reference

TListControlItems Events

TListControlItems	By object	Legend

OnCompare


TListControlItems.::OnCompare
 VCL Reference

TListControlItems.OnCompare

TListControlItems	See also

Occurs to when two items need to be compared for sorting the collection.

type TListCompareEvent = function(List: TListControlItems; Item1, Item2: TListControlItem) : Integer of object;

property OnCompare: TListCompareEvent;

Description

Write an OnCompare event handler to indicate the sort order when the SortType property is stData or stBoth.

The OnCompare event handler compares the items passed as the Item1 and Item2 parameters. If Item1 is the same as Item2 in the sort order, the event handler should return 0. If Item1 is less than Item2, the event handler should return a value less than 0. If Item1 is greater than Item2, the event handler should return value greater than 0.


 VCL Reference

TListControlItems methods

TListControlItems	Alphabetically	Legend

In TListControlItems

Add

CompareItems

CustomSort

Sort

Derived from TOwnedCollection

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListControlItems methods

TListControlItems	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CompareItems

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Sort


TListControlItems.Add
 VCL Reference

TListControlItems.Add

TListControlItems	See also

Adds a new item to the collection.

function Add: TListControlItem;

Description

Call Add to add a new item to the collection. Add instantiates an object of the type that was specified when the TListControlItems instance was created. It returns the newly created object.


TListControlItems.CompareItems
 VCL Reference

TListControlItems.CompareItems

TListControlItems	See also

Returns the relative order of two items in the collection.

function CompareItems(I1, I2: TListControlItem): Integer; virtual;

Description

CompareItems is used internally to provide the default sort order for items in the list. It is used when the SortType property is not stNone. The Sort method also uses this as a comparison function.

If I1 is greater than I2, CompareItems returns a value greater than 0. If I1 is the same as I2, CompareItems returns 0. If I1 is less than I2, CompareItems returns a value less than 0.

CompareItems always uses an OnCompare event handler if it is assigned. Otherwise, it compares the captions of the items, taking into account the CaseSensitive property. Descendant classes can override CompareItems to provide a different default sort order.


TListControlItems.CustomSort
 VCL Reference

TListControlItems.CustomSort

TListControlItems	See also

Sorts the items in the collection using a specified comparison function.

type TListItemsCompare = function(List: TListControlItems; Index1, Index2: Integer): Integer;

procedure CustomSort(Compare: TListItemsCompare);

Description

Call Sort to sort the items in the collection based on the comparison function that is the value of the Compare parameter.

Compare is a function that compares two items in the list. Its List parameter is this TListControlItems object. The Index1 and Index2 parameters are the indexes of the items to compare in the Items property array. This comparison function should return a value less than 0 if the first item is less than the second, a value greater than 0 if it is greater than the second, and 0 if the two items are equivalent.

Note:	CustomSort sorts the items in the list, but does not maintain the sort order when new items are added. To provide a custom sort order that persists when new items are added, set the SortType property to stData and supply an OnCompare event handler.


TListControlItems.Sort
 VCL Reference

TListControlItems.Sort

TListControlItems	See also

Sorts the items in the collection.

procedure Sort;

Description

Call Sort to sort the items in the collection. Sort uses the comparison function specified by the protected CompareItems method to determine the sort order.

Note:	Sort sorts the items in the list, but does not maintain the sort order when new items are added. To impose a sort order that persists when new items are added, set the SortType property to a value other than stNone and, if desired, supply an OnCompare event handler.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TListControlItems


TListItems
 VCL Reference

TListItems

Hierarchy	Properties	Methods	See also

TListItems maintains the collection of items that appear in a list view control.

Unit

ComCtrls

Description

Use the properties and methods of TListItems to manipulate the list of items displayed by a list view control. TListItems only lists the main items in the list view. Subitems are specified using a property of the individual TListItem objects.


 VCL Reference

TListItems Properties

TListItems	Alphabetically	Legend

In TListItems

Count

Handle

Item

Owner


 VCL Reference

TListItems Properties

TListItems	By Object	Legend

Count

Handle

Item

Owner


TListItems.Count
 VCL Reference

TListItems.Count

TListItems	See also

Indicates the number of items in the Item property array.

property Count: Integer;

Description

Use Count to determine the number of items displayed by the list view. Count provides an upper bound when iterating through the individual TListItem objects in the Item property array.

Set the Count when the list view's OwnerData property is False to make the control allocate its internal data structures for the specified number of items. This prevents the control from having to allocate the data structures every time an item is added.

Set the Count when the list view's OwnerData property is True to set the virtual number of items that the control contains.


TListItems.Handle
 VCL Reference

TListItems.Handle

TListItems	See also

Specifies the window handle for the list view that displays the items managed by TListItems.

property Handle; HWND;

Description

Use Handle as a parameter for calls to the underlying API that require a window handle.


TListItems.Item
 VCL Reference

TListItems.Item

TListItems	See also

Lists all list items managed by the TListItems object.

property Item[Index: Integer]: TListItem;

Description

Use Item to directly access a list item, given its position in the list view. The first item has an index of 0, the second an index of 1, and so on.


TListItems.Owner
 VCL Reference

TListItems.Owner

TListItems	See also

Indicates the list view object that uses the list items object to manage its items.

property Owner: TCustomListView;

Description

Use Owner to access the list view object that uses this TListItems object to implement its Items property.


 VCL Reference

TListItems Methods

Legend

In TListItems

Add

Assign

BeginUpdate

Clear

Create

DefineProperties

Delete

Destroy

EndUpdate

IndexOf

Insert

SetCount

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TListItems Methods

TListItems	By Object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

DefineProperties

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SetCount


TListItems.Add
 VCL Reference

TListItems.Add

TListItems	See also 	Example

Creates a new list item and adds it to the list view control.

function Add: TListItem;

Description

Call Add to add a new list item to the end of the list. Add returns the newly created TListItem object.

To create an item and insert it into the beginning or middle of the list, use the Insert method instead.


TListItems.Assign
 VCL Reference

TListItems.Assign

TListItems	See also

Copies the list of list items from another TListItems object.

procedure Assign(Source: TPersistent); override;

Description

Call Assign to copy the list of items from another object. If the Source parameter specifies another TListItems object, Assign discards the current value of Item and rebuilds the list by copying the items maintained by Source. If Source is any other type of object, Assign calls the inherited method, which will copy the list from any object that specifies how to copy to a TListItems object in its AssignTo method.


TListItems.BeginUpdate
 VCL Reference

TListItems.BeginUpdate

TListItems	See also

Prevents updating of the list view until the EndUpdate method is called.

procedure BeginUpdate;

Description

Call BeginUpdate before making multiple changes to the list of items. When all changes are complete, call EndUpdate so that the changes can be reflected on screen. BeginUpdate and EndUpdate prevent excessive redraws and speed processing time when new items are added, deleted, or inserted.


TListItems.Clear
 VCL Reference

TListItems.Clear

TListItems	See also

Removes all items from the list.

procedure Clear;

Description

Call Clear to empty the list view of all items. Clear frees all memory associated with the list items and updates the image of the list view.


TListItems.Create
 VCL Reference

TListItems.Create

TListItems	See also

Creates an instance of TListItems.

constructor Create(AOwner: TCustomListView);

Description

Call Create to instantiate a TListItems object at runtime. The TListItems object used by TListView to implement its Items property is created automatically from the constructor of the list view.


TListItems.DefineProperties
 VCL Reference

TListItems.DefineProperties

TListItems	See also

Provides an interface for a method that reads and writes otherwise unpublished data.

procedure DefineProperties(Filer: TFiler); override;

Description

TListItems overrides DefineProperties in order to persist individual items.


TListItems.Delete
 VCL Reference

TListItems.Delete

TListItems	See also

Deletes a specified item and updates the list view accordingly.

procedure Delete(Index: Integer);

Description

The Delete method deletes the item in the list view specified with the Index parameter. The first item has an index of 0, the second item has an index of 1, and so on.


TListItems.Destroy
 VCL Reference

TListItems.Destroy

TListItems	See also

Destroys an instance of TListItems.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which verifies that the TListItems reference is not nil before calling Destroy.

Destroy frees the list before calling the inherited destructor.


TListItems.EndUpdate
 VCL Reference

TListItems.EndUpdate

TListItems	See also

Reenables screen repainting that was turned off with the BeginUpdate method.

procedure EndUpdate;

Description

Call EndUpdate after completing changes to the list that were begun with a call to the BeginUpdate method. When every call to BeginUpdate is matched by a subsequent call to EndUpdate, the list view image updates to reflect all changes that occurred while repaints were disabled.


TListItems.IndexOf
 VCL Reference

TListItems.IndexOf

TListItems	See also

Returns the position of a list item in the list view window.

function IndexOf(Value: TListItem): Integer;

Description

Call IndexOf to determine the position of the list item specified by the Value parameter. IndexOf returns -1 if the list item is not in the list view.


TListItems.Insert
 VCL Reference

TListItems.Insert

TListItems	See also 	Example

Creates a new list item and inserts it into the list view.

function Insert(Index: Integer): TListItem;

Description

Call Insert to insert a new TListItem object into the list view at the specified Index. Insert returns the list item that is inserted.


TListItems.SetCount
 VCL Reference

TListItems.SetCount

TListItems

Sets the number of list items.

procedure SetCount(Value: Integer);

Description

Call SetCount to set the number of list items.


Hierarchy

TObject

TPersistent

TListItems


TMainMenu
 VCL Reference

 TMainMenu

Hierarchy	Properties	Methods	Events	Using TMainMenu	See also

TMainMenu encapsulates a menu bar and its accompanying drop-down menus for a form.

Unit

Menus

Description

Use TMainMenu to provide the main menu for a form. To begin designing a menu, add a main menu to a form, and double-click the component.

TMainMenu introduces properties and methods for merging the drop-down menus of the main menu with the main menu of another form.

TMainMenu introduces properties and methods for assisting in the menu negotiation process of an OLE container.


 VCL Reference

TMainMenu properties

TMainMenu	Alphabetically	Legend

In TMainMenu

AutoMerge

Handle

Derived from TMenu

AutoHotkeys

AutoLineReduction

BiDiMode

Images

Items

OwnerDraw

ParentBiDiMode

WindowHandle

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMainMenu Properties

TMainMenu	By Object	Legend

AutoHotkeys

AutoLineReduction

AutoMerge

BiDiMode

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

Images

Items

Name

Owner

OwnerDraw

ParentBiDiMode

Tag

VCLComObject

WindowHandle


TMainMenu.AutoMerge
 VCL Reference

TMainMenu.AutoMerge

TMainMenu	See also

Determines if the main menus of secondary forms merge with the main menu of the main form in non-MDI applications at runtime.

property AutoMerge: Boolean;

Description

To merge a form's menus with the main menu in the main form, set the AutoMerge property of each main menu you want merged to True. Make sure that the AutoMerge property of the main menu of the main form (the one other menus are merged into) remains False. How menus merge depends on the value of the GroupIndex property for each menu item.

If the application is an MDI application (the FormStyle properties are set so the main form is a parent form and subsequent forms are child forms), menu merging occurs automatically without using the AutoMerge property.


TMainMenu.Handle
 VCL Reference

TMainMenu.Handle

TMainMenu	See also

Provides access to the menu’s handle.

property Handle: HMENU;

Description

Use the Handle property to call a Windows API function that requires a Windows menu handle.

For example, the following line uses the Windows API function HiliteMenuItem to highlight the first menu item in MainMenu1 on Form1.

HiliteMenuItem(Form1.Handle, MainMenu1.Handle, 0, MF_BYPOSITION+MF_HILITE);

If the menu has an associated OLE menu handle, Handle is the OLE2 menu handle. Otherwise, Handle is the Windows menu handle for the menu that contains exactly the elements described in the Items property.


 VCL Reference

TMainMenu events

TMainMenu	Alphabetically	Legend

Derived from TMenu

OnChange


 VCL Reference

TMainMenu events

TMainMenu	By Object	Legend

OnChange


 VCL Reference

TMainMenu methods

TMainMenu	Alphabetically	Legend

In TMainMenu

GetOle2AcceleratorTable

Merge

PopulateOle2Menu

SetOle2MenuHandle

Unmerge

Derived from TMenu

Create

Destroy

DispatchCommand

DispatchPopup

FindItem

GetHelpContext

IsRightToLeft

IsShortCut

ParentBiDiModeChanged

ProcessMenuChar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMainMenu Methods

TMainMenu	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchCommand

DispatchPopup

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

FreeOnRelease

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOle2AcceleratorTable

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsRightToLeft

IsShortCut

Merge

MethodAddress

MethodName

NewInstance

ParentBiDiModeChanged

PopulateOle2Menu

ProcessMenuChar

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetOle2MenuHandle

SetSubComponent

Unmerge

UpdateAction


TMainMenu.GetOle2AcceleratorTable
 VCL Reference

TMainMenu.GetOle2AcceleratorTable

TMainMenu	See also

Returns the main menu’s accelerator table.

procedure GetOle2AcceleratorTable(var AccelTable: HAccel; var AccelCount: Integer; const Groups: array of Integer);

Description

Call GetOle2AcceleratorTable to obtain a handle to an accelerator table for all menu items with a GroupIndex value that appears in the Groups parameter. The AccelTable parameter is set to the accelerator table handle, and the AccelCount is set to the number of entries in the table. GetOle2AcceleratorTable is used by OLE containers when merging menus.


TMainMenu.Merge
 VCL Reference

TMainMenu.Merge

TMainMenu	See also

Combines the main menu of one form with the main menu of another in non-MDI applications.

procedure Merge(Menu: TMainMenu);

Description

Call Merge to merge another main menu with this one. Specify the menu you want merged with this menu as the Menu parameter.

For example, to use the main menu of the first form in an application as the main menu for the application, call Merge to merge the main menu of any additional forms in the application with the main menu of the first form.

Depending on the value of the GroupIndex property of menu items on the main menu, the merged menu items can replace menu items on the menu bar, or insert menu items into the menu bar. See GroupIndex for information on how to do these things.

To merge and unmerge main menus automatically when other forms are displayed, change the value of the AutoMerge property to True on all forms whose menus should be merged in.


TMainMenu.PopulateOle2Menu
 VCL Reference

TMainMenu.PopulateOle2Menu

TMainMenu	See also

Populates an OLE menu with items from the main menu.

procedure PopulateOle2Menu(SharedMenu: HMenu; const Groups: array ofInteger; var Widths: array of Longint);

Description

Call PopulateOle2Menu to merge the menu items with GroupIndex values specified by the Groups parameter into the menu that uses the SharedMenu handle. PopulateOle2Menu appends all menu items in the specified groups to the menu, and increments the corresponding entries in the Widths array for every menu item appended. PopulateOle2Menu is used by OLE containers when merging menus.

Note:	PopulateOle2Menu populates the menu specified by the SharedMenu parameter but does not set this as the OLE menu associated with the menu.


TMainMenu.SetOle2MenuHandle
 VCL Reference

TMainMenu.SetOle2MenuHandle

TMainMenu	See also

Associates the handle for an OLE menu with the main menu.

procedure SetOle2MenuHandle(Handle: HMENU);

Description

Call SetOle2MenuHandle to temporarily replace the menu of a form with the menu represented by the Handle parameter. To restore the original menu, call SetOle2MenuHandle with the Handle parameter set to 0. SetOle2MenuHandle allows an OLE container to use menu items provided by an OLE server.


TMainMenu.Unmerge
 VCL Reference

TMainMenu.Unmerge

TMainMenu	See also

Reverses the merging of two menus in a non-MDI application.

procedure Unmerge(Menu: TMainMenu);

Description

Call Unmerge to remove items from another main menu that were added using the Merge method. The Menu parameter is the merged menu whose items should be removed from the main menu.


Hierarchy

TObject

TPersistent

TComponent

TMenu

TMainMenu


TMaskEdit
 VCL Reference

 TMaskEdit

Hierarchy	Properties	Methods	Events	See also

TMaskEdit implements a generic masked edit control.

Unit

Mask

Description

Use a TMaskEdit object to put a masked edit control on your form. Masked edit controls validate the text the user enters against a mask that encodes the valid forms the text can take. The mask can also format text that is displayed to the user.

TMaskEdit implements the generic behavior introduced in TCustomMaskEdit. TMaskEdit publishes many of the properties and methods inherited from TCustomMaskEdit, but does not introduce any new behavior.


 VCL Reference

TMaskEdit Properties

TMaskEdit	Alphabetically	Legend

Derived from TCustomMaskEdit

EditMask

EditText

IsMasked

MaxLength

Text

Derived from TCustomEdit

AutoSelect

AutoSize

BorderStyle

CanUndo

CharCase

Modified

PasswordChar

ReadOnly

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TMaskEdit Properties

TMaskEdit	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoSelect

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CharCase

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

EditMask

EditText

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

IsMasked

Left

LRDockWidth

MaxLength

Modified

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PasswordChar

PopupMenu

ReadOnly

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TMaskEdit Events

TMaskEdit	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TMaskEdit Events

TMaskEdit	By Object	Legend

OnChange

OnClick

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TMaskEdit Methods

TMaskEdit	Alphabetically	Legend

Derived from TCustomMaskEdit

Clear

Create

GetTextLen

ValidateEdit

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMaskEdit Methods

TMaskEdit	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

ValidateEdit


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMaskEdit

TMaskEdit


TMediaPlayer
 VCL Reference

 TMediaPlayer

Hierarchy	Properties	Methods	Events	Using TMediaPlayer	See also

TMediaPlayer controls devices that provide a Media Control Interface (MCI) driver.

Unit

MPlayer

Description

The TMediaPlayer component includes a set of buttons (Play, Stop, Eject, and so on) that control a multimedia device such as a CD-ROM drive, MIDI sequencer, or VCR. A multimedia device may be hardware or software.

The media player component contains of multiple buttons. These buttons can be clicked with the mouse, but are not separate objects or button components.

Button	Value	Action

Play	btPlay	Plays the media player

Pause	btPause	Pauses playing or recording. If already paused when clicked, resumes playing or recording.

Stop	btStop	Stops playing or recording

Next	btNext	Skips to the next track, or to the end if the medium doesn’t use tracks

Prev	btPrev	Skips to the previous track, or to the beginning if the medium doesn’t use tracks

Step	btStep	Moves forward a number of frames

Back	btBack	Moves backward a number of frames

Record	btRecord	Starts recording

Eject	btEject	Ejects the medium

The multimedia device is played, paused, stopped, and so on when the user clicks the corresponding button on the TMediaPlayer component. The device can also be controlled by the control methods that correspond to the buttons (Play, Pause, Stop, Next, Previous, Step, Back, StartRecording, and Eject).

The type of multimedia device (such as dtWaveAudio or dtVideodisc) is specified by the DeviceType property. If the device stores its media in a file, the name of the media file is specified by the FileName property. If DeviceType is dtAutoSelect, the media player attempts to determine the type of device from the extension of the file specified by FileName.

To have the media player attempt to open the device specified by DeviceType automatically when the media player component is created at runtime, set the AutoOpen property to True.


 VCL Reference

TMediaPlayer properties

TMediaPlayer	Alphabetically	Legend

In TMediaPlayer

AutoEnable

AutoOpen

AutoRewind

Capabilities

ColoredButtons

DeviceID

DeviceType

Display

DisplayRect

EnabledButtons

EndPos

Error

ErrorMessage

FileName

Frames

Length

Mode

Notify

NotifyValue

Position

Shareable

Start

StartPos

TimeFormat

TrackLength

TrackPosition

Tracks

VisibleButtons

Wait

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TMediaPlayer properties

TMediaPlayer	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoEnable

AutoOpen

AutoRewind

BiDiMode

BoundsRect

Brush

Capabilities

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ColoredButtons

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DeviceID

DeviceType

Display

DisplayRect

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

EnabledButtons

EndPos

Error

ErrorMessage

FileName

Floating

FloatingDockSiteClass

Frames

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

Length

LRDockWidth

Mode

Name

Notify

NotifyValue

Owner

Parent

ParentShowHint

ParentWindow

PopupMenu

Position

Shareable

ShowHint

Showing

Start

StartPos

TabOrder

TabStop

Tag

TBDockHeight

TimeFormat

Top

TrackLength

TrackPosition

Tracks

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleButtons

VisibleDockClientCount

Wait

Width

WindowProc


TMediaPlayer.AutoEnable
 VCL Reference

TMediaPlayer.AutoEnable

TMediaPlayer	See also 	Example

Determines whether the media player automatically enables and disables individual buttons in the component.

property AutoEnable: Boolean;

Description

Use AutoEnable to automatically enable or disable the control buttons on the media player. If AutoEnable is True, the media player automatically enables or disables its control buttons. The media player determines which buttons to enable or disable by the current mode specified in the Mode property, and the current multimedia device type specified in the DeviceType property.

AutoEnable overrides the EnabledButtons property. The buttons enabled or disabled automatically by the media player supersede any buttons enabled or disabled with EnabledButtons.

If AutoEnable is False, the media player does not enable or disable buttons. The buttons must enabled or disabled with the EnabledButtons property.

The following table shows whether buttons are automatically enabled or disabled for each device mode:

Button	Play	Record	Pause	Stop	Not Open
Back	Enabled	Enabled	Enabled	Enabled	Disabled
Eject	Enabled	Enabled	Enabled	Enabled	Disabled
Next	Enabled	Enabled	Enabled	Enabled	Disabled
Pause	Enabled	Enabled	Enabled	Disabled	Disabled
Play	Disabled	Disabled	Enabled	Enabled	Disabled
Prev	Enabled	Enabled	Enabled	Enabled	Disabled
Record	Disabled	Disabled	Enabled	Enabled	Disabled
Step	Enabled	Enabled	Enabled	Enabled	Disabled
Stop	Enabled	Enabled	Disabled	Disabled	Disabled


TMediaPlayer.AutoOpen
 VCL Reference

TMediaPlayer.AutoOpen

TMediaPlayer	See also

Determines if the media player is opened automatically when the application is run.

property AutoOpen: Boolean;

Description

Use AutoOpen to have the media player automatically open at runtime.

If AutoOpen is True, the media player attempts to open the multimedia device specified by the DeviceType property (or FileName if DeviceType is dtAutoSelect) when the form containing the media player component is created at runtime.

If AutoOpen is False, the device must be opened with a call to the Open method.

If an error occurs when opening the device, an exception of type EMCIDeviceError exception is raised that contains the error message. Upon completion, a numerical error code is stored in the Error property, and the corresponding error message is stored in the ErrorMessage property.

The Wait property determines whether control is returned to the application before opening the multimedia device. The Notify property determines whether opening the device generates an OnNotify event.


TMediaPlayer.AutoRewind
 VCL Reference

TMediaPlayer.AutoRewind

TMediaPlayer	See also 	Example

Determines if the media player control rewinds before playing or recording.

property AutoRewind: Boolean;

Description

If AutoRewind is True and the current position is at the end of the medium, Play or StartRecording moves the current position to the beginning of the medium before playing or recording. If AutoRewind is False, the user must click the Prev button or write code to call Previous to move to the beginning.

If values have been assigned to StartPos or EndPos or if the multimedia device uses tracks, AutoRewind has no effect on playing or recording. When calling Play or StartRecording, the current position remains at the end of the medium.


TMediaPlayer.Capabilities
 VCL Reference

TMediaPlayer.Capabilities

TMediaPlayer	See also 	Example

Determines the capabilities of the open multimedia device.

type

  TMPDevCaps = (mpCanStep, mpCanEject, mpCanPlay, mpCanRecord, mpUsesWindow);

  TMPDevCapsSet = set of TMPDevCaps;

property Capabilities: TMPDevCapsSet;

Description

The various capabilities specified in Capabilities are determined when the device is opened with the Open method. The following table lists the capabilities a device can have:

Value	Capability

mpCanEject	Can eject media

mpCanPlay	Can play media

mpCanRecord	Can record media

mpCanStep	Can step forward or backward within media

mpUsesWindow	Uses a window for displaying output

Note:	Currently, there is no way to check whether a device can step forward or backward. Capabilities includes mpCanStep only if the device type (specified in the DeviceType property) is Animation, AVI Video, Digital Video, Overlay, or VCR.


TMediaPlayer.ColoredButtons
 VCL Reference

TMediaPlayer.ColoredButtons

TMediaPlayer	See also

Determines which buttons on the media player control have color.

property ColoredButtons: TButtonSet;

Description

ColoredButtons controls which buttons on the media player are colored.

If a button is not colored with ColoredButtons, it appears in black-and-white when visible. All media player control buttons are colored by default.


TMediaPlayer.DeviceID
 VCL Reference

TMediaPlayer.DeviceID

TMediaPlayer	See also

Specifies the device ID for the currently open multimedia device.

property DeviceID: Word;

Description

The value of DeviceID is determined when a device is opened with the Open method. If no device is open, DeviceID is 0.


TMediaPlayer.DeviceType
 VCL Reference

TMediaPlayer.DeviceType

TMediaPlayer	See also 	Example

Specifies a multimedia device type to open the media player.

type TMPDeviceTypes = (dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT, dtDigitalVideo, dtMMMovie, dtOther, dtOverlay, dtScanner, dtSequencer, dtVCR, dtVideodisc, dtWaveAudio);

property DeviceType: TMPDeviceTypes;

Description

DeviceType specifies a multimedia device type to open with the Open method.

TMPDeviceTypes type contains the multimedia device types that can be opened by a TMediaPlayer component. The valid values for TMPDeviceTypes are dtAutoSelect, dtAVIVideo, dtCDAudio, dtDAT, dtDigitalVideo, dtMMMovie, dtOther, dtOverlay, dtScanner, dtSequencer, dtVCR, dtVideodisc, or dtWaveAudio. The default is dtAutoSelect.

If DeviceType is dtAutoSelect, the device type is determined by the file extension specified in the FileName property. If no device type is associated with the extension, the correct device type must be explicitly specified by setting DeviceType to a value other than dtAutoSelect.

A multimedia device is typically associated with an appropriate file name extension when the device is installed. Associations are specified in the registry or SYSTEM.INI file. See the documentation for the specific device for instructions about how to associate file name extensions with the device.


TMediaPlayer.Display
 VCL Reference

TMediaPlayer.Display

TMediaPlayer 	See also	Example

Specifies the display window for an multimedia device that uses a window for output.

property Display: TWinControl;

Description

To use Display, assign the name of a windowed control such as a form or panel to Display to display output in that control.

The default value of Display is nil, meaning that the device creates its own window to display output. Also, by freeing the control assigned to Display after the device has been opened, video output will be in its own default window.

Examples of multimedia devices that use a window to display output are Animation, AVI Video, Digital Video, Overlay, and VCR.


TMediaPlayer.DisplayRect
 VCL Reference

TMediaPlayer.DisplayRect

TMediaPlayer	See also

Specifies a rectangular area in the control specified by the Display property that is used to display output from a multimedia device.

property DisplayRect: TRect;

Description

To display output in a specific rectangle area on a form assign a TRect record to DisplayRect. The Rect function can be used to create a TRect record.

Media that use a rectangle to display output usually perform best if the default DisplayRect size is used. To set DisplayRect to the default size, position the rectangle in the upper left corner and use 0, 0 for the lower right corner.

DisplayRect is ignored if Display is nil.

Examples of multimedia devices that use a window to display output are Animation, AVI Video, Digital Video, Overlay, and VCR.

Note:	DisplayRect can be set only after the media device is opened.


TMediaPlayer.EnabledButtons
 VCL Reference

TMediaPlayer.EnabledButtons

TMediaPlayer	See also 	Example

Determines which buttons on the media player are usable.

property EnabledButtons: TButtonSet;

Description

EnabledButtons controls which buttons on the media player are enabled and usable.

An enabled button is colored and usable. A disabled button is dimmed and not usable. If a button is not enabled with EnabledButtons, it is disabled. By default, all buttons are enabled.

If the AutoEnable property is True, AutoEnable supersedes EnabledButtons. The buttons automatically enabled or disabled by the media player override any buttons enabled or disabled with the EnabledButtons property.


TMediaPlayer.EndPos
 VCL Reference

TMediaPlayer.EndPos

TMediaPlayer	See also 	Example

Specifies the position within the currently loaded medium at which to stop playing or recording.

property EndPos: Longint;

Description

EndPos is specified using the current time format, which is specified in the TimeFormat property.

The EndPos property affects only the next Play or StartRecording method called after setting EndPos. Reset EndPos to affect any subsequent calls to Play or StartRecording.


TMediaPlayer.Error
 VCL Reference

TMediaPlayer.Error

TMediaPlayer	See also 	Example

Specifies the MCI error code returned by the media control method.

property Error: Longint;

Description

Error specifies the MCI error code returned by the most recent media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop). The ErrorMessage property describes the Error.

The error code returned by media control methods are the same error code returned by the mciSendCommand function. The message describing the error code is stored in the ErrorMessage property.

The value of Error is zero if the most recent media control method didn't cause an error. If a method results in an error, a value other than zero is stored in Error. If the error occurs during the opening of the device, an EMCIDeviceError exception occurs.


TMediaPlayer.ErrorMessage
 VCL Reference

TMediaPlayer.ErrorMessage

TMediaPlayer	See also 	Example

Describes the error code stored in the Error property.

property ErrorMessage: string;

Description

ErrorMessage specifies the error message that describes the error code returned from the most recent media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop).

The error code described by the message is stored in the Error property.


TMediaPlayer.FileName
 VCL Reference

TMediaPlayer.FileName

TMediaPlayer	See also 	Example

Specifies the opened or saved media file.

property FileName: string;

Description

FileName specifies the media file to be opened by the Open method, or the file to save by the Save method.

At design time, use a file open dialog box to specify the FileName property by clicking the ellipsis button (...) in the Object Inspector.


TMediaPlayer.Frames
 VCL Reference

TMediaPlayer.Frames

TMediaPlayer	See also

Specifies the number of frames moved forward or backward.

property Frames: Longint;

Description

Frames specifies the number of frames the Step method steps forward or the Back method steps backward. Frames defaults to ten percent of the length of the currently loaded medium, which is specified by the Length property.

The definition of a frame varies by multimedia device. For display media, a frame is one still image.


TMediaPlayer.Length
 VCL Reference

TMediaPlayer.Length

TMediaPlayer	See also 	Example

Specifies the length of the medium in the open multimedia device.

property Length: Longint;

Description

Length is specified using the current time format, which is specified by the TimeFormat property.


TMediaPlayer.Mode
 VCL Reference

TMediaPlayer.Mode

TMediaPlayer 	See alsoExample

Indicates the state of the currently open multimedia device.

type TMPModes = (mpNotReady, mpStopped, mpPlaying, mpRecording, mpSeeking, mpPaused, mpOpen);

property Mode: TMPModes;

Description

Mode specifies the current state or mode of the currently open multimedia device.

The TMPModes type defines the modes for a multimedia device used with a TMediaPlayer.

The following table lists the possible values for of the TMPModes type:

Value	Mode

mpNotReady	Not ready

mpStopped	Stopped

mpPlaying	Playing

mpRecording	Recording

mpSeeking	Seeking

mpPaused	Paused

mpOpen	Open


TMediaPlayer.Notify
 VCL Reference

TMediaPlayer.Notify

TMediaPlayer	See also	Example

Determines whether an OnNotify event is generated.

property Notify: Boolean;

Description

Notify determines whether the next call to a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) generates an OnNotify event when the method has completed.

If Notify is True, the next media control method generates OnNotify event upon completion and stores the notification message in the NotifyValue property. If Notify is False, the method does not generate an OnNotify event and NotifyValue remains unchanged.

Notify affects only the next call to a media control method. After an OnNotify event, Notify must be reset to affect any subsequent media control methods.

By default, Play and StartRecording function as if Notify is True. Set Notify to False before calling Play or StartRecording to prevent an OnNotify event from being generated when playing or recording has finished. By default, all other media control methods function as if Notify is False.

Tip:	Set Notify to True if the next media control is expected to take a long time, so the application is notified when the media control method has completed. If Notify is set to True, it is recommended to set Wait to False so that control returns to the application before the media control method is finished.

Note:	When trying to resume a device that doesn't support Resume, the device is resumed as if the Play method was called. If Notify was assigned True before calling Resume (or any other media control method), Notify doesn't affect the call to Resume. Resume does not generate an OnNotify event upon completion, and NotifyValue remains unchanged.


TMediaPlayer.NotifyValue
 VCL Reference

TMediaPlayer.NotifyValue

TMediaPlayer 	See alsoExample

Indicates the result of the last media control method that requested a notification.

type TMPNotifyValues = (nvSuccessful, nvSuperseded, nvAborted, nvFailure);

property NotifyValue: TMPNotifyValues;

Description

NotifyValue reports the result of the last media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) that requested a notification.

To request notification, set Notify to True before calling a media control method.

The TMPNotifyValues type defines the notification values for a multimedia device used with a TMediaPlayer. The possible values for the TMPNotifyValues type are as follows.

Value	Result

nvSuccessful	Command completed successfully

nvSuperseded	Command was superseded by another command

nvAborted	Command was aborted by the user

nvFailure	Command failed


TMediaPlayer.Position
 VCL Reference

TMediaPlayer.Position

TMediaPlayer	See also

Specifies the current position within the currently loaded medium.

property Position: Longint;

Description

The value of Position is specified according to the current time format, which is specified in the TimeFormat property.

Position defaults to the beginning of the medium. If the medium supports multiple tracks, Position defaults to the beginning of the first track.


TMediaPlayer.Shareable
 VCL Reference

TMediaPlayer.Shareable

TMediaPlayer	See also 	Example

Determines whether more than one application can share a multimedia device.

property Shareable: Boolean;

Description

If Shareable is False, no other components or applications can access the device. If Shareable is True, more than one component or application can access the device. Shareable defaults to False.

Be sure to set Shareable before opening a device.

Some devices are not shareable. If Shareable is set to True for a device that isn't shareable, the Open method fails and the error code is returned to the Error property.


TMediaPlayer.Start
 VCL Reference

TMediaPlayer.Start

TMediaPlayer	See also

Specifies the starting position within the currently loaded medium.

property Start: Longint;

Description

Start is the beginning of the medium for devices that don't use tracks, or the beginning of the first track for devices that use tracks. Start is defined when a multimedia device is opened with the Open method. Start is specified according to the current time format, which is stored in the TimeFormat property. Start is read-only at runtime and is unavailable at design time.


TMediaPlayer.StartPos
 VCL Reference

TMediaPlayer.StartPos

TMediaPlayer	See also

Specifies the position within the currently loaded medium from which to begin playing or recording.

property StartPos: Longint;

Description

StartPos is specified using the current time format, which is specified in the TimeFormat property.

The StartPos property affects only the next Play or StartRecording method called after setting StartPos. Reset must be set to StartPos to affect any subsequent calls to Play or StartRecording.

StartPos does not affect the current position of the medium (specified in the Position property) until the next Play or StartRecording method is called.


TMediaPlayer.TimeFormat
 VCL Reference

TMediaPlayer.TimeFormat

TMediaPlayer	See also 	Example

Determines the format used to specify position information.

type TMPTimeFormats = (tfMilliseconds, tfHMS, tfMSF, tfFrames, tfSMPTE24, tfSMPTE25, tfSMPTE30, tfSMPTE30Drop, tfBytes, tfSamples, tfTMSF);

property TimeFormat: TMPTimeFormats;

Description

TimeFormat determines how the StartPos, Length, Position, Start, and EndPos properties are interpreted. For example, if Position is 180 and TimeFormat is tfMilliseconds, the current position is 180 milliseconds into the medium. If Position is 180 and TimeFormat is tfMSF, the current position is 180 minutes into the medium.

Not all formats are supported by every device. When trying to set an unsupported format, the assignment is ignored.

The current timing information is always passed in a 4-byte integer. In some formats, the timing information returned is not really one integer, but single bytes of information packed in the long integer.

The TMPTimeFormats type defines the time formats for a multimedia device used with a TMediaPlayer. The following table lists the possible values for the TMPTimeFormats type:

Value	Time format

tfMilliseconds	Milliseconds are stored as a 4-byte integer variable.

tfHMS	Hours, minutes, and seconds packed into a 4-byte integer. From least significant to most significant byte, the data values are

  Hours (least significant byte)

  Minutes

  Seconds

  Unused (most significant byte)

tfMSF	Minutes, seconds, and frames packed into a 4-byte integer. From least significant to most significant byte, the data values are

  Minutes (least significant byte)

  Seconds

  Frames

  Unused (most significant byte)

tfFrames	Frames are stored as a 4-byte integer variable.

tfSMPTE24	24-frame SMPTE packs values in a 4-byte variable. From least significant to most significant byte, the data values are

  Hours (least significant byte)

  Minutes

  Seconds

  Frames (most significant byte)

SMPTE (Society of Motion Picture and Television Engineers) time is an absolute time format expressed in hours, minutes, seconds, and frames. The standard SMPTE division types are 24, 25, and 30 frames per second.

tfSMPTE25	25-frame SMPTE packs data into a 4-byte variable in the same order as 24-frame SMPTE.

tfSMPTE30	30-frame SMPTE packs data into the 4-byte variable in the same order as 24-frame SMPTE.

tfSMPTE30Drop	30-drop-frame SMPTE packs data into the 4-byte variable in the same order as 24-frame SMPTE.

tfBytes	Bytes are stored as a 4-byte integer variable.

tfSamples	Samples are stored as a 4-byte integer variable.

tfTMSF	Tracks, minutes, seconds, and frames are packed in the 4-byte variable. From least significant to most significant byte, the data values are

  Tracks (least significant byte)

  Minutes

  Seconds

  Frames (most significant byte)

Note that MCI uses continuous track numbering.

Note:	Functions provided with MCI to help decoding the 4-byte integer specified in a given time format are documented under MCI Macros for Encoding and Decoding Time Data in the MMSYSTEM.HLP Help file.


TMediaPlayer.TrackLength
 VCL Reference

TMediaPlayer.TrackLength

TMediaPlayer	See also 	Example

Reports the length of the track.

property TrackLength[TrackNum: Integer]: Longint;

Description

TrackLength reports the length of the track specified by the TrackNum index.

The value of TrackLength is specified according to the current time format, which is specified in the TimeFormat property.


TMediaPlayer.TrackPosition
 VCL Reference

TMediaPlayer.TrackPosition

TMediaPlayer	See also

Reports the starting position of the track.

property TrackPosition[TrackNum: Integer]: Longint;

Description

TrackPosition reports the starting position of the track specified by the TrackNum index.

The value of TrackPosition is specified according to the current time format, which is specified in the TimeFormat property.


TMediaPlayer.Tracks
 VCL Reference

TMediaPlayer.Tracks

TMediaPlayer 	See also

Specifies the number of playable tracks on the open multimedia device.

property Tracks: Longint;

Description

Tracks indicates how many of playable tracks are available on the open multimedia device.

Tracks is undefined for devices that don't use tracks.


TMediaPlayer.VisibleButtons
 VCL Reference

TMediaPlayer.VisibleButtons

TMediaPlayer	See also 	Example

Indicates which of the buttons on the media player are visible.

property VisibleButtons: TButtonSet;

Description

VisibleButtons determines which buttons on the media player that are visible. If a button is not made visible with VisibleButtons, it does not appear on the media player control. By default, all buttons are visible when a media player component is added to a form.


TMediaPlayer.Wait
 VCL Reference

TMediaPlayer.Wait

TMediaPlayer 	See also	Example

Determines whether a media control method returns control to the application only after it has been completed.

property Wait: Boolean;

Description

Wait determines whether a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) returns control to the application only after it has been completed.

Wait is unavailable at design time.

If Wait is True, the media player component waits until the next media control method has completed before returning control to the application. If Wait is False, the application won't wait for the next media control method to finish before continuing.

Wait affects only the next media control method called after setting Wait. Wait must be reset to affect any subsequent call to a media control method.

By default, Play and StartRecording function as if Wait is False. Wait must be set to True before calling Play or StartRecording to prevent control from returning to the application before playing or recording has finished. By default, all other media control methods function as if Wait is True.

Note:	Wait is usually set to False only if the next media control is expected to take a long time, so that the application can execute other code before the media control method has completed. If Wait is set to False, you should set Notify to True so the application is notified when the media control method completes.


 VCL Reference

TMediaPlayer events

TMediaPlayer	Alphabetically	Legend

In TMediaPlayer

OnClick

OnNotify

OnPostClick

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup


 VCL Reference

TMediaPlayer events

TMediaPlayer	By object	Legend

OnClick

OnContextPopup

OnEnter

OnExit

OnNotify

OnPostClick


TMediaPlayer.OnClick
 VCL Reference

TMediaPlayer.OnClick

TMediaPlayer	See also 	Example

Occurs when the user presses and releases the mouse button while the mouse pointer is over one of the control buttons, or when the user presses Spacebar while the media player control has focus.

type

  EMPNotify = procedure (Sender: TObject; Button: TMPBtnType; var DoDefault: Boolean) of object;

property OnClick: EMPNotify;

Description

When the media player control has focus and the Spacebar is pressed, the user can use the Left Arrow or Right Arrow keys to select which control button to click.

The EMPNotify type is a method pointer that is called when an OnClick event for a TMediaPlayer components occurs. The Button argument can be one of the following values: btBack, btEject, btNext, btPause, btPlay, btPrev, btRecord, btStep, or btStop.

The default value of the DoDefault argument is True. If DoDefault is True, the media player control calls the method that corresponds to the clicked button. For example, if the user clicks the Play button (btPlay), the Play method is called.

If DoDefault is False, the user must write code that executes when a media player control button is clicked in the OnClick event handler. The following table lists the default methods corresponding to the media player control buttons:

Control button	Button value	Method called

Play	btPlay	Play

Record	btRecord	StartRecording

Stop	btStop	Stop

Next	btNext	Next

Prev	btPrev	Previous

Step	btStep	Step

Back	btBack	Back

Pause	btPause	Pause

Eject	btEject	Eject


TMediaPlayer.OnNotify
 VCL Reference

TMediaPlayer.OnNotify

TMediaPlayer	See also	Example

Occurs upon the completion of a media control method.

property OnNotify: TNotifyEvent;

Description

OnNotify occurs upon the completion of a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, Resume, Rewind, StartRecording, Step, or Stop) when the Notify property is set to True before the call to the media control method. After an OnNotify event, the Notify property must be reset to True for the next OnNotify event to occur.


TMediaPlayer.OnPostClick
 VCL Reference

TMediaPlayer.OnPostClick

TMediaPlayer	See also

Occurs after the OnClick event handler is called.

type

  EMPPostNotify = procedure (Sender: TObject; Button: TMPBtnType) of object;

property OnPostClick: EMPPostNotify;

Description

OnPostClick is generated after the code of the OnClick event handler has been called. If Wait is True when the media player was clicked, OnPostClick won't be called until the completion of the OnClick code. If Wait is False, control can return to the application before completion of the OnClick code; therefore, the OnPostClick event may occur before the actions initiated by the OnClick event have completed.

For example, if the user clicks the Play button and the DoDefault parameter of the OnClick event handler for the media player is True, the media is played. If the media is long enough, it will still be playing when the OnPostClick event is generated if Wait is True. If Wait is False, however, OnPostClick won't occur until the media has finished playing.

The EMPPostNotify type is a method that is called when an OnPostClick event for a TMediaPlayer component occurs. The Button argument can be one of the following values: btBack, btEject, btNext, btPause, btPlay, btPrev, btRecord, btStep, or btStop.


 VCL Reference

TMediaPlayer methods

TMediaPlayer	Alphabetically	Legend

In TMediaPlayer

AutoButtonSet

Back

Click

Close

Create

Destroy

DoNotify

Eject

KeyDown

Loaded

MMNotify

Next

Notification

Open

Paint

Pause

PauseOnly

Play

PostClick

Previous

Resume

Rewind

Save

StartRecording

Step

Stop

Updated

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMediaPlayer methods

TMediaPlayer	By object	Legend

AfterConstruction

Assign

AutoButtonSet

Back

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Close

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoNotify

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

Eject

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

KeyDown

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MMNotify

MouseWheelHandler

NewInstance

Next

Notification

Open

Paint

PaintTo

ParentToClient

Pause

PauseOnly

Perform

Play

PostClick

Previous

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Resume

Rewind

SafeCallException

Save

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

StartRecording

Step

Stop

Update

UpdateAction

UpdateControlState

Updated

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TMediaPlayer.AutoButtonSet
 VCL Reference

TMediaPlayer.AutoButtonSet

TMediaPlayer	See also

Enables or Disables the media player’s buttons.

procedure AutoButtonSet(Btn: TMPBtnType); dynamic;

Description

AutoButtonSet implements the automatic enabling and disabling of the media player's buttons when the AutoEnable property is True. The Btn parameter indicates which of the media player's buttons the user pressed.


TMediaPlayer.Back
 VCL Reference

TMediaPlayer.Back

TMediaPlayer	See also 	Example

Steps backward a number of frames (determined by the value of the Frames property) in the currently loaded medium.

procedure Back;

Description

Back is called when the Back button on the media player control is clicked at runtime.

Upon completion, Back stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Back method has been completed. The Notify property determines whether Back generates an OnNotify event.


TMediaPlayer.Click
 VCL Reference

TMediaPlayer.Click

TMediaPlayer	See also

Generates an OnClick event.

procedure Click(Button: TMPBtnType; var DoDefault: Boolean); reintroduce; dynamic;

Description

Click for media-player components is the implementation method for the OnClick event. By default, Click does nothing other than call any event handler attached to the media player's OnClick event.Click can be overridden in descendant classes to customize responses to clicks.


TMediaPlayer.Close
 VCL Reference

TMediaPlayer.Close

TMediaPlayer	See also 	Example

Closes the open multimedia device.

procedure Close;

Description

Upon completion, Close stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Close method is completed. The Notify property determines whether Close generates an OnNotify event.

Close is called automatically when the application is terminated.


TMediaPlayer.Create
 VCL Reference

TMediaPlayer.Create

TMediaPlayer	See also

Creates a media player object.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a media player at runtime. For media players created at design time, Create is called automatically.

Create allocates memory for a media player and calls the inherited Create. Then it loads the bitmaps for the media player’s buttons and initializes its properties, setting AutoEnable, AutoRewind, Colored, Enabled, and Visible to True, AutoOpen to False, and DeviceType to dtAutoSelect.


TMediaPlayer.Destroy
 VCL Reference

TMediaPlayer.Destroy

TMediaPlayer	See also

Destroys an instance of the media player.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free checks that the TMediaPlayer reference is not nil before it calls Destroy.

Destroy first verifies that no device is open, then destroys the bitmaps used for the media player’s buttons and calls the inherited Destroy.


TMediaPlayer.DoNotify
 VCL Reference

TMediaPlayer.DoNotify

TMediaPlayer	See also

Generates an OnNotify event.

procedure DoNotify; dynamic;

Description

DoNotify is the implementation method for a media-player component's OnNotify event. The media player's MMNotify method calls DoNotify after correcting the enabling and disabling of buttons and setting internal flags from the values passed in the notification message parameters.

By default, DoNotify does nothing except call any event handler attached to the media player's OnNotify event. DoNotify can be overridden to provide other responses in addition to the inherited event-handler call.


TMediaPlayer.Eject
 VCL Reference

TMediaPlayer.Eject

TMediaPlayer	See also 	Example

Releases the loaded medium from the open multimedia device.

procedure Eject;

Description

Eject is called when the Eject button on the media player control is clicked at runtime. It ejects the loaded medium from the open multimedia device.

Upon completion, Eject stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Eject method has been completed. The Notify property determines whether Eject generates an OnNotify event.


TMediaPlayer.KeyDown
 VCL Reference

TMediaPlayer.KeyDown

TMediaPlayer	See also

Provides responses when the user types arrow keys or the space bar.

procedure KeyDown(var Key: Word; Shift: TShiftState); override;

Description

KeyDown overrides the inherited method to implement the media player’s response to certain keystrokes. It changes the current button when the user types the left or right arrow keys. When the user presses the space bar, KeyDown simulates a click on the current button.


TMediaPlayer.Loaded
 VCL Reference

TMediaPlayer.Loaded

TMediaPlayer	See also

Initializes the media player after it is loaded from a stream.

procedure Loaded; override;

Description

Loaded provides an opportunity for a component to initialize itself after all its parts have loaded from a stream. TMediaPlayer overrides the inherited method to implement the AutoOpen property.


TMediaPlayer.Next
 VCL Reference

TMediaPlayer.Next

TMediaPlayer	See also 	Example

Moves to the beginning of the next track of the currently loaded medium.

procedure Next;

Description

If the current position is at the last track when Next is called, Next makes the current position the beginning of the last track. If the multimedia device doesn't use tracks, Next goes to the end of the medium. Next is called when the Next button on the media player control is clicked at runtime.

Upon completion, Next stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Next method has completed. The Notify property determines whether Next generates an OnNotify event.


TMediaPlayer.MMNotify
 VCL Reference

TMediaPlayer.MMNotify

TMediaPlayer	See also

Responds to a notification that the MCI device has completed an operation.

procedure MMNotify(var Message: TMessage); message MM_MCINOTIFY;

Description

MMNotify responds to a notification message from Windows that a multimedia command completed by updating button states if the AutoEnable property is True, setting internal flags to reflect the outcome of the command, then calling the DoNotify method to trigger the OnNotify event and any other special responses.


TMediaPlayer.Notification
 VCL Reference

TMediaPlayer.Notification

TMediaPlayer	See also

Responds when components are about to be inserted or removed.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

By default, components pass along the notification to their owned components, if any. Notification calls the inherited Notification and then, if the Display window is deleted at runtime, it sets the video display back to original window.


TMediaPlayer.Open
 VCL Reference

TMediaPlayer.Open

TMediaPlayer	See also 	Example

Opens a multimedia device.

procedure Open;

Description

Use Open to open a multimedia device. The multimedia device type must be specified in the DeviceType property before a device can be opened.

Upon completion, Open stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Open method is completed. The Notify property determines whether Open generates an OnNotify event.


TMediaPlayer.Paint
 VCL Reference

TMediaPlayer.Paint

TMediaPlayer 	See also

Renders the image of the media player.

procedure Paint; override;

Description

When the media player component receives a WM_PAINT message, like other custom controls, it responds by initializing the control's canvas and calling Paint. Paint draws the frame and all visible buttons.

When creating a descendant media player class, Paint can be overridden to draw the image of the corresponding media player object.


TMediaPlayer.PostClick
 VCL Reference

TMediaPlayer.PostClick

TMediaPlayer	See also

Determines the action that takes place when an OnPostClick event occurs.

procedure PostClick(Button: TMPBtnType); dynamic;

Description

PostClick is the implementation method for the OnPostClick event. By default, PostClick does nothing other than call any event handler attached to the media player's OnPostClick event. PostClick can be overridden in descendant types to customize responses to clicks.


TMediaPlayer.Pause
 VCL Reference

TMediaPlayer.Pause

TMediaPlayer	See also 	Example

Toggles the open multimedia device on or off.

procedure Pause;

Description

If the device is already paused when Pause is called, the device resumes playing or recording by calling the Resume method. Pause is called when the Pause button on the media player control is clicked at runtime.

Upon completion, Pause stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Pause method has completed. The Notify property determines whether Pause generates an OnNotify event.


TMediaPlayer.PauseOnly
 VCL Reference

TMediaPlayer.PauseOnly

TMediaPlayer	See also 	Example

Pauses the open multimedia device.

procedure PauseOnly;

Description

If the device is already paused when PauseOnly is called, the device will remain paused.

Upon completion, PauseOnly stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the PauseOnly method has completed. The Notify property determines whether PauseOnly generates an OnNotify event.


TMediaPlayer.Play
 VCL Reference

TMediaPlayer.Play

TMediaPlayer	See also 	Example

Plays the media loaded in the open multimedia device.

procedure Play;

Description

Play is called when the Play button on the media player control is clicked at runtime.

Upon completion, Play stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Play method has completed. The Notify property determines whether Play generates an OnNotify event.

If the StartPos property is set, playing starts at the position specified in StartPos. Otherwise, playing starts at the current position, specified in the Position property. Similarly, if the EndPos property is set, playing stops at the position specified in EndPos. Otherwise, playing stops at the end of the medium.

Whether the medium (specified in the Position property) is rewound before playing starts depends on the AutoRewind property.


TMediaPlayer.Previous
 VCL Reference

TMediaPlayer.Previous

TMediaPlayer	See also 	Example

Sets the current position to the beginning of the previous track if the position was at the beginning of a track when Previous was called.

procedure Previous;

Description

If the position is at the first track or somewhere other than the beginning of a track when Previous was called, Previous sets the current position to the beginning of the current track. If the device doesn't use tracks, Previous sets the current position to the beginning of the medium, which is specified in the Start property. Previous is called when the Previous button on the media player control is clicked at runtime.

Upon completion, Previous stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Previous method has completed. The Notify property determines whether Previous generates an OnNotify event.


TMediaPlayer.Resume
 VCL Reference

TMediaPlayer.Resume

TMediaPlayer	See also

Resumes playing or recording the currently paused multimedia device.

procedure Resume;

Description

Resume is called when the Pause button on the media player control is clicked at runtime, when the device is paused.

Upon completion, Resume stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Resume method has completed. The Notify property determines whether Resume generates an OnNotify event.


TMediaPlayer.Rewind
 VCL Reference

TMediaPlayer.Rewind

TMediaPlayer	See also 	Example

Sets the current position to the beginning of the the medium, which is stored in the Start property.

procedure Rewind;

Description

Upon completion, Rewind stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Rewind method has completed. The Notify property determines whether Rewind generates an OnNotify event.


TMediaPlayer.Save
 VCL Reference

TMediaPlayer.Save

TMediaPlayer	See also

Saves the currently loaded medium to the file specified in the FileName property.

procedure Save;

Description

Save is ignored for devices that don't use media stored in files (videodiscs, for example).

Upon completion, Save stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Save method has completed. The Notify property determines whether Save generates an OnNotify event.


TMediaPlayer.StartRecording
 VCL Reference

TMediaPlayer.StartRecording

TMediaPlayer	See also

Begins recording from the current Position or from the position specified in StartPos.

procedure StartRecording;

Description

StartRecording is called when the Record button on the media player control is clicked at runtime.

Upon completion, StartRecording stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the StartRecording method has completed. The Notify property determines whether StartRecording generates an OnNotify event.

By default, the Notify property becomes True, and the Wait property becomes False upon completion of the StartRecording method. However, if these properties have been set to specific values prior to calling StartRecording, they remain unchanged.


TMediaPlayer.Step
 VCL Reference

TMediaPlayer.Step

TMediaPlayer	See also

Moves forward a number of frames (determined by the Frames property) in the currently loaded medium.

procedure Step;

Description

Step is called when the Step button on the media player control is clicked at runtime.

Upon completion, Step stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Step method has completed. The Notify property determines whether Step generates an OnNotify event.


TMediaPlayer.Stop
 VCL Reference

TMediaPlayer.Stop

TMediaPlayer	See also

Halts playing or recording.

procedure Stop;

Description

Stop is called when the Stop button on the media player control is clicked at runtime.

Upon completion, Stop stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property.

The Wait property determines whether control is returned to the application before the Stop method has completed. The Notify property determines whether Stop generates an OnNotify event.


TMediaPlayer.Updated
 VCL Reference

TMediaPlayer.Updated

TMediaPlayer	See also

Signals that the media player has finished updating.

procedure Updated; override;

Description

Updated calls the inherited Updated before it modifies the layout of the media player buttons and forces a repaint.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TMediaPlayer


TMemIniFile
 VCL Reference

TMemIniFile

Hierarchy	Properties	Methods	See also

TMemIniFile enables buffered storage and retrieval of application-specific information and settings in an INI file.

Unit

IniFiles

Description

Use TMemIniFile to store and retrieve application-specific information and settings in a Windows INI file. The INI file text format, introduced in Windows 3.x, lets applications store and retrieve settings from session to session. An INI file stores information in logical groupings, called “sections.” For example, the WIN.INI file contains a section called “[Desktop]”. Within each section, actual data values are stored in named keys. Keys take the form:

<keyname>=<value>

Unlike the TIniFile object, which also encapsulates INI file data, TMemIniFile buffers all changes to the INI file. The INI file is read once, when the object is first created. Data from the INI file is stored in nested string lists. Each section in the INI file occupies one element in the top-most string list, and each element in this may itself contain a string list. Each element in each of the contained string list represents a key within the section. After the data is read, any changes to the data are stored in memory. To write the data from memory back to the associated INI file, call the UpdateFile method.

All TMemIniFile methods to read, write, and erase sections, keys, and values operate on the in-memory copy of the INI file.

This buffering of INI file data is important under the Windows NT environment, where INI file writes are not buffered. In applications where there is a significant amount of reading from or writing to an INI file, this buffering prevents degradation of the application’s performance.

The FileName passed to a TIniFile object when it is created is the name of the INI file the object accesses. Because , and not the operating system, writes the data to the INI file, saving data changes is faster in all supported versions of Windows.

Tip:	You may choose to store information using the system registry instead of INI files. In this case, you can use TRegistryIniFile (which shares a common ancestor with TMemIniFile and so can be used in common code) or TRegistry.


 VCL Reference

TMemIniFile properties

TMemIniFile	Alphabetically	Legend

In TMemIniFile

CaseSensitive

Derived from TCustomIniFile

FileName


 VCL Reference

TMemIniFile properties

TMemIniFile	By object	Legend

CaseSensitive

FileName


TMemIniFile.CaseSensitive
 VCL Reference

TMemIniFile.CaseSensitive

TMemIniFile 	See also

Controls whether section and key names are handled in a case-sensitive manner.

property CaseSensitive: Boolean;

Description

Use CaseSensitive to indicate whether the names of sections and keys should be treated in a case-sensitive or case-insensitive manner. Set CaseSensitive to True to allow multiple sections or keys that differ only based on case. Set CaseSensitive to False to treat names that differ only by case as the same.


 VCL Reference

TMemIniFile methods

TMemIniFile	Alphabetically	Legend

In TMemIniFile

Clear

Create

DeleteKey

Destroy

EraseSection

GetStrings

ReadSection

ReadSections

ReadSectionValues

ReadString

Rename

SetStrings

UpdateFile

WriteString

Derived from TCustomIniFile

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadTime

SectionExists

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteTime

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMemIniFile methods

TMemIniFile	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

DeleteKey

Destroy

Dispatch

EraseSection

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetStrings

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ReadBinaryStream

ReadBool

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

Rename

SafeCallException

SectionExists

SetStrings

UpdateFile

ValueExists

WriteBinaryStream

WriteBool

WriteDate

WriteDateTime

WriteFloat

WriteInteger

WriteString

WriteTime


TMemIniFile.Clear
 VCL Reference

TMemIniFile.Clear

TMemIniFile	See also

Erases all data from the INI file in memory.

procedure Clear;

Description

Call Clear to erase all data from the INI file that is currently buffered in memory. All sections, keys, and values are erased.

Warning:	No exception is generated when using Clear and the data has not been saved to the INI file with the UpdateFile method.


TMemIniFile.Create
 VCL Reference

TMemIniFile.Create

TMemIniFile	See also	Example

Creates a TMemIniFile object for an application.

constructor Create(const FileName String);

Description

Call Create to instantiate a TMemIniFile object for an application. Create sets the FileName property, and loads a copy of the INI file into memory, in an internal string list.

FileName is the name of the INI file the TMemIniFile uses.

Note:	Typically, INI files are stored in the \WINDOWS directory or the application’s directory. To work with an INI file in another location, specify the full path name of the file in FileName.


TMemIniFile.DeleteKey
 VCL Reference

TMemIniFile.DeleteKey

TMemIniFile	See also	Example

Deletes a specified entry from the .ini file.

procedure DeleteKey(const Section, Ident: String); override;

Description

Call DeleteKey to erase .ini file entry. Section is string containing the name of a .ini file section, and Ident is a string containing the name of the key to remove.

Note:	Attempting to erase a key in a nonexistent section or attempting to erase a nonexistent key are not errors. In these cases, DeleteKey does nothing.

DeleteKey only affects the in-memory copy of the .ini file, not the copy on disk. The change is not written to disk until you call UpdateFile.


TMemIniFile.Destroy
 VCL Reference

TMemIniFile.Destroy

TMemIniFile	See also

Frees the memory associated with the TMemIniFile object.

destructor Destroy; override;

Description

Do not call Destroy directly; instead call Free.

Warning:	The destructor does not write the current memory image to disk. Be sure to save changes made to TMemIniFile by calling UpdateFile before destroying a TMemIniFile instance.


TMemIniFile.EraseSection
 VCL Reference

TMemIniFile.EraseSection

TMemIniFile	See also

Erases an entire section of the INI file.

procedure EraseSection(const Section: String); override;

Description

Call EraseSection to remove a section, all its keys, and their data values from an INI file. Section identifies the INI file section to remove. If a section cannot be removed, an exception is raised.

EraseSection only affects the in-memory copy of the INI file, not the copy on disk. The change is not written to disk until you call UpdateFile.


TMemIniFile.GetStrings
 VCL Reference

TMemIniFile.GetStrings

TMemIniFile	See also

Populates a string list with INI file data.

procedure GetStrings(List: TStrings);

Description

Call GetStrings to copy the INI file data currently stored in memory into a pre-existing string list.

List is a string list object, created and maintained by the application, into which the INI file data is copied.


TMemIniFile.ReadSection
 VCL Reference

TMemIniFile.ReadSection

TMemIniFile	See also

Reads all the key names from a specified section of an INI file into a string list.

procedure ReadSection (const Section: string; Strings: TStrings); override;

Description

Call ReadSection to retrieve the names of all keys within a specified section of an INI file into a string list.

Section identifies the section from which to retrieve a list of key names. Strings specifies the string to hold the retrieved names. Strings can point to a TStrings descendant such as a string list, or to a component property, such as Items for a TListBox component.

Data read by ReadSection comes from the in-memory copy of the INI file, not the copy on disk.


TMemIniFile.ReadSections
 VCL Reference

TMemIniFile.ReadSections

TMemIniFile	See also

Reads the names of all sections in an INI file into a string list.

procedure ReadSections(Strings: TStrings); override;

Description

Call ReadSections to retrieve the names of all sections in an INI file into a string list.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings descendant, or to a component property, such as Items for a TListBox component.

Data read by ReadSections comes from the in-memory copy of the INI file, not the copy on disk.


TMemIniFile.ReadSectionValues
 VCL Reference

TMemIniFile.ReadSectionValues

TMemIniFile	See also 	Example

Reads the values from all keys within a section of an INI file into a string list.

procedure ReadSectionValues(const Section: String; Strings: TStrings); override;

Description

Call ReadSectionValues to read the values from all keys within a specified section of an INI file into a string list object. Section identifies the section in the file from which to read key values. Strings is the string list object into which to read the values.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings descendant, or to a component property, such as Items for a TListBox component.

Data read by ReadValues comes from the in-memory copy of the INI file, not the copy on disk.


TMemIniFile.ReadString
 VCL Reference

TMemIniFile.ReadString

TMemIniFile	See also 	Example

Retrieves a string value from the INI file.

function ReadString(const Section, Ident, Default: String): string; override;

Description

Call ReadString to read a string value from an INI file. Section identifies the section in the file that contains the desired key. Ident is the name of the key from which to retrieve the value. Default is the string value to return if the:

Section does not exist.

Key does not exist.

Data value for the key is not assigned.

The ReadString method inherited from TCustomIniFile is modified to operate on the in-memory copy of the INI file data. The read methods for all other data types use ReadString internally and then translate to the appropriate data type.


TMemIniFile.Rename
 VCL Reference

TMemIniFile.Rename

TMemIniFile	See also

Associates the TMemIniFile with a different INI file.

procedure Rename(const FileName: String; Reload: Boolean);

Description

Call Rename to change the INI file used by the TMemIniFile object to a file other than the one specified when the object was created.

FileName is name of the new INI file to use.

Reload determines whether data is immediately loaded into memory from the INI file specified in FileName. When Reload is True, the TMemIniFile object is repopulated with the data from the specified file. When Reload is False, the in-memory image is unchanged. This is useful, for example, when copying the data from one INI file to another file.


TMemIniFile.SetStrings
 VCL Reference

TMemIniFile.SetStrings

TMemIniFile	See also

Populates the memory buffer with contents of a string list.

procedure SetStrings(List: TStrings);

Description

Call SetStrings to populate the in-memory copy of the INI file data with the contents of a string list.

List is a string list object, created and maintained by the application, from which the INI file data is copied.

SetStrings uses the Clear method to erase any existing INI file data prior to copying the new data.

SetStrings can be used to reread data from the INI file from disk after it is erased with the Clear method. The LoadFromFile method of a string list can be used to retrieve the contents of the INI file and then SetStrings can copy the data into the memory buffer.


TMemIniFile.UpdateFile
 VCL Reference

TMemIniFile.UpdateFile

TMemIniFile	See also

Flushes buffered INI file data to disk.

function UpdateFile; override;

Description

Call UpdateFile to copy INI file data stored in memory to the copy of the INI file on disk UpdateFile overwrites all data in the disk copy of the INI file with the INI file data stored in memory.

If the Rename method is used to change the INI file the TMemIniFile uses, UpdateFile copies the INI file data in memory to a file of the new name. If the file does not already exist, it is created. If the new file already exists, it is overwritten.


TMemIniFile.WriteString
 VCL Reference

TMemIniFile.WriteString

TMemIniFile	See also	Example

Writes a string value to an INI file.

procedure WriteString(const Section, Ident, Value: String); override;

Description

Call WriteString to write a string value to an INI file. Section identifies the section in the file that contain the key to which to write. Ident is the name of the key for which to set a value. Value is the string value to write.

The WriteString method inherited from TCustomIniFile is modified to operate on the in-memory copy of the INI file data. The write methods for all other data types use WriteString internally after data values are translated from the original data type.

Note:	Attempting to write a data value to a nonexistent section or attempting to write data to a nonexistent key are not errors. In these cases, WriteString creates the section and key and sets its initial value to Value.


Hierarchy

TObject

TCustomIniFile

TMemIniFile


TMemo
 VCL Reference

 TMemo

Hierarchy	Properties	Methods	Events	Using TMemo	See also

TMemo is a wrapper for a Windows multiline edit control.

Unit

StdCtrls

Description

Use TMemo to put a standard Windows multiline edit control on a form. Multiline edit boxes allow the user to enter more than one line of text. They are appropriate for representing lengthy information.

TMemo implements the generic behavior introduced in TCustomMemo. TMemo publishes many of the properties inherited from TCustomMemo, but does not introduce any new behavior.

Note:	Under Win 9x, there is a limit of 64k of text for this control.


 VCL Reference

TMemo properties

TMemo	Alphabetically	Legend

Derived from TCustomMemo

Alignment

CaretPos

Lines

ScrollBars

WantReturns

WantTabs

WordWrap

Derived from TCustomEdit

BorderStyle

CanUndo

HideSelection

MaxLength

Modified

OEMConvert

ReadOnly

SelLength

SelStart

SelText

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Text

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TMemo Properties

TMemo	By Object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BorderStyle

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

ImeMode

ImeName

Left

Lines

LRDockWidth

MaxLength

Modified

Name

OEMConvert

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

ScrollBars

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WantReturns

WantTabs

Width

WindowProc

WordWrap


 VCL Reference

TMemo events

TMemo	Alphabetically	Legend

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TMemo Events

TMemo	By Object	Legend

OnChange

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TMemo methods

TMemo	Alphabetically	Legend

Derived from TCustomMemo

Create

Destroy

GetControlsAlignment

Derived from TCustomEdit

Clear

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

DefaultHandler

GetSelTextBuf

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMemo Methods

TMemo	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo

TMemo


TMemoryStream
 VCL Reference

TMemoryStream

Hierarchy	Properties	Methods	See also	Example

TMemoryStream is a stream that stores its data in dynamic memory.

Unit

Classes

Description

Use TMemoryStream to store data in a dynamic memory buffer that is enhanced with file-like access capabilities. TMemoryStream provides the general I/O capabilities of a stream object while introducing methods and properties to manage a dynamic memory buffer.

Memory streams are useful as intermediary objects that can hold information as well as read it from or write it to another storage medium. They provide a useful format for comparing the contents of streams, or for manipulating data that is stored in a less accessible medium.


 VCL Reference

TMemoryStream properties

TMemoryStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TMemoryStream properties

TMemoryStream	By object	Legend

Memory

Position

Size


 VCL Reference

TMemoryStream methods

TMemoryStream	Alphabetically	Legend

In TMemoryStream

Clear

Destroy

LoadFromFile

LoadFromStream

SetSize

Write

Derived from TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMemoryStream methods

TMemoryStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

CopyFrom

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

SetSize

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TMemoryStream.Clear
 VCL Reference

TMemoryStream.Clear

TMemoryStream	See also

Frees the memory buffer, discarding all data associated with the memory stream.

procedure Clear;

Description

Use Clear to empty the memory buffer for the memory stream and free all associated memory. In addition to freeing the memory associated with the memory buffer, Clear

Sets the Memory property to nil.

Sets the Position property to 0.

Sets the Size property to 0.


TMemoryStream.Destroy
 VCL Reference

TMemoryStream.Destroy

TMemoryStream	See also

Destroys an instance of TMemoryStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMemoryStream reference is not nil, and only then calls Destroy.

Destroy a TMemoryStream object when it is no longer needed to store or write data. Destroy calls Clear to free the memory buffer before calling the inherited destructor.


TMemoryStream.LoadFromFile
 VCL Reference

TMemoryStream.LoadFromFile

TMemoryStream	See also

Loads the entire contents of a file into the memory buffer.

procedure LoadFromFile(const FileName: string);

Description

Use LoadFromFile to fill the memory stream with the contents of a file. Pass the name of the file as the FileName parameter. LoadFromFile allows an application to read the contents of a file into the memory stream without having to explicitly create and free a file stream object.

LoadFromFile reallocates the memory buffer so that the contents of the file will exactly fit. It sets the Size property accordingly, and then reads the entire contents of the file into the memory buffer. Thus, LoadFromFile will discard any pre-existing data stored in the memory stream.


TMemoryStream.LoadFromStream
 VCL Reference

TMemoryStream.LoadFromStream

TMemoryStream	See also

Loads the entire contents of a stream into the memory buffer.

procedure LoadFromStream(Stream: TStream);

Description

Use LoadFromStream to fill the memory stream with the contents of the stream specified by the Stream parameter. LoadFromStream always sets the Position of the source stream to 0, before streaming in the number of bytes indicated by the source stream’s Size property.

LoadFromStream reallocates the memory buffer so that the contents of the source stream will exactly fit. It sets the Size property accordingly, and then reads the entire contents of the source stream into the memory buffer. Thus, LoadFromStream will discard any pre-existing data stored in the memory stream.

If the source stream is a TFileStream object, LoadFromStream does the same thing as LoadFromFile, except that the application must create and free the TFileStream object. LoadFromStream also allows applications to fill a memory stream object from other types of stream objects.


TMemoryStream.SetSize
 VCL Reference

TMemoryStream.SetSize

TMemoryStream	See also

Sets the Size property of the memory stream.

procedure SetSize(NewSize: Longint); override;

Description

Use SetSize to set the Size of a memory stream before filling it with data. SetSize allocates the memory buffer to hold NewSize bytes, preserving as much of the existing data as possible.

Use SetSize before filling the memory buffer with data from various sources, or from a portion of another stream. If the intended contents of the memory stream is exactly the same as the contents of another stream or file, use LoadFromStream or LoadFromFile instead.


TMemoryStream.Write
 VCL Reference

TMemoryStream.Write

TMemoryStream	See also

Writes Count bytes from Buffer to the current position in the memory buffer and updates the current position by Count bytes.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Use Write to insert Count bytes into the memory buffer of the memory stream, starting at the current position. Write will increase the size of the memory buffer, if necessary, to accommodate the data being written in. If the current position is not the end of the memory buffer, Write will overwrite the data following the current position.

Write updates the Size property to Position + Count, and sets the Position property to the new value of Size. Thus, any data that was stored in the memory stream in the Count bytes after the current position is lost when calling Write.

Write always writes the Count bytes in the Buffer, unless there is a memory failure. Thus, for TMemoryStream, Write is equivalent to the WriteBuffer method.

All other data-writing methods of a memory stream (WriteBuffer, WriteComponent) call Write to do the actual writing.


Hierarchy

TObject

TStream

TCustomMemoryStream

TMemoryStream


TMenu
 VCL Reference

TMenu

Hierarchy	Properties	Methods	Events	Using TMenu	See also	Example 1	Example 2

TMenu is the base type for menu components such as TMainMenu and TPopupMenu.

Unit

Menus

Description

Use TMenu as a base class when defining a component that represents a collection of menu items. TMenu introduces properties and methods to create a Windows menu that represents a set of menu items, dispatch commands associated with those menu items, and locate the help context id for any of those menu items.


 VCL Reference

TMenu properties

TMenu	Alphabetically	Legend

In TMenu

AutoHotkeys	AutoLineReduction

BiDiMode

Handle

Images

Items

OwnerDraw

ParentBiDiMode

WindowHandle

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMenu properties

TMenu	By object	Legend

AutoHotkeys

AutoLineReduction

BiDiMode

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Handle

Images

Items

Name

Owner

OwnerDraw

ParentBiDiMode

Tag

VCLComObject

WindowHandle


TMenu.AutoHotkeys
 VCL Reference

TMenu.AutoHotkeys

TMenu	See also

Determines whether the accelerator keys for menu items can be reset automatically.

property AutoHotkeys: TMenuAutoFlag;

Description

Set AutoHotkeys to indicate whether the menu should automatically ensure that accelerator keys for its items are reset if necessary so that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that menu items added dynamically at runtime can have accelerator keys that do not introduce conflicts.  TMenu tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator.

Before the menu is displayed, the menu checks and adjusts the accelerator key mappings if AutoHotkeys is maAutomatic. When AutoHotkeys is maManual, the menu does not alter the top-level menu items, but may adjust the accelerator keys for submenus, depending on the AutoHotkeys property of the menu item that is the parent of the submenu.

When AutoHotkeys is maManual, an application can still adjust the menu items by calling the Items property’s RethinkHotkeys method. AutoHotkeys merely controls whether this adjustment occurs automatically.

Note:	The AutoHotkeys property of a menu is linked to the AutoHotkeys property of the TMenuItems object that implements its Items property. Setting one sets the other.


TMenu.AutoLineReduction
 VCL Reference

TMenu.AutoLineReduction

TMenu	See also

Determines whether redundant separator bars are automatically removed from the menu.

__property TMenuAutoFlag AutoLineReduction = {read=GetAutoLineReduction, write=SetAutoLineReduction, default=maAutomatic};

Description

Set AutoLineReduction to indicate whetherDelphishould automatically ensure that the menu does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions.

Before the menu is displayed, Delphiremoves superfluous separator bars when AutoLineReduction is maAutomatic. When AutoLineReduction is maManual, Delphidoes not remove separators from the top-level menu items, but may remove superfluous separators from submenus, depending on the AutoLineReduction property of the menu item that is the parent of the submenu.

When AutoLineReduction is maManual, an application can still remove superfluous separators by calling the Items property’s RethinkLines method. AutoLineReduction merely determines whether this adjustment occurs automatically.

Note:	The AutoLineReduction property of a menu is linked to the AutoLineReduction property of the TMenuItems object that implements its Items property. Setting one sets the other.


TMenu.BiDiMode
 VCL Reference

TMenu.BiDiMode

TMenu	See also

Determines the layout of the menu in Middle East locales.

__property Classes::TBiDiMode BiDiMode = {read=FBiDiMode, write=SetBiDiMode, stored=IsBiDiModeStored, nodefault};

Description

Set BiDiMode to control the layout of menu items. BiDiMode controls whether the menu items read from left to right or right to left.


TMenu.Handle
 VCL Reference

TMenu.Handle

TMenu	See also

Provides access to the Windows menu handle for the menu.

property Handle: HMENU;

Description

Use Handle to call a Windows API function that requires a menu handle. Handle is the handle for the menu that contains only the items described by the Items property. If no other menus have been merged with this menu, this is the same as the WindowHandle property.


TMenu.Images
 VCL Reference

TMenu.Images

TMenu	See also

Lists the images that can appear beside individual menu items.

property Images: TCustomImageList;

Description

Use Images to hold the set of images that can appear beside menu items in the menu. Individual menu items set their ImageIndex property to indicate which image in the list appears to the left of the menu item caption.

Images in the list should be 16x16. To accommodate every system on which your application runs, it is recommended that you do not use 256 colors.

Tip:	If the application uses action lists, this property should be the value of the action list’s Images property. This way, menu items and buttons that do the same thing can display the same image.


TMenu.Items
 VCL Reference

TMenu.Items

TMenu	See also	Example

Describes the elements of the menu.

property Items: TMenuItem; default;

Description

Use Items to access information about the elements in the menu. Items is a single TMenuItem object that describes the elements of the menu in its own Items property. Because Items is the default property of TMenuItem, the Items property of TMenu can be treated as an indexed array of menu items that describe the individual items in the menu. That is, instead of writing

FirstItem := Menu1.Items.Items[0];

you can use

FirstItem := Menu1.Items[0];

Set the Items property at design time by clicking on the Items property in the Property Inspector. The Menu Designer automatically inserts a menu item. As each menu item is entered, outlined regions appear at the possible locations of additional menu items. Click in those regions to specify additional menu items. At runtime, create a TMenuItem that describes the elements of the menu programmatically, and set the Items property of the menu.


TMenu.OwnerDraw
 VCL Reference

TMenu.OwnerDraw

TMenu	See also

Specifies whether the menu items are drawn by the application.

__property bool OwnerDraw = {read=FOwnerDraw, write=SetOwnerDraw, default=0};

Description

Set OwnerDraw to True to indicate that the application will draw menu items in an OnDrawItem event handler. When OwnerDraw is True, menu items receive an OnMeasureItem and an OnDrawItem event when they need to be rendered on screen.

Set OwnerDraw to False to accept the default drawing. When OwnerDraw is False, menu items display the caption with an optional image to the left (If the Images and ImageIndex properties are set).

Owner-draw menus are useful for displaying the value that appears when selecting a menu item. For example, in a menu that allows users to choose a color, an owner-draw menu could display rectangles drawn in the designated color, rather than color names.


TMenu.ParentBiDiMode
 VCL Reference

TMenu.ParentBiDiMode

TMenu	See also

Indicates whether the BiDiMode property is inherited from the control that uses the menu.

__property bool ParentBiDiMode = {read=FParentBiDiMode, write=SetParentBiDiMode, default=1};

Description

By default, ParentBiDiMode is True, indicating that the layout of menu items follows the BiDiMode setting of the associated form or control. Change ParentBiDiMode to False to override the default BiDiMode setting and control the menu’s layout independently.


TMenu.WindowHandle
 VCL Reference

TMenu.WindowHandle

TMenu	See also

Provides access to the handle of the window that uses the menu.

property WindowHandle: HWnd;

Description

Read WindowHandle to get the window handle of the control that receives WM_COMMAND messages when the user clicks on an item in the menu. When menu items are selected, use this handle in an OnClick event handler to send messages to the control that uses the menu or to make Windows API calls that affect the control.

Set WindowHandle to associate the menu with a control.


 VCL Reference

TMenu events

TMenu	Alphabetically	Legend

In TMenu

OnChange


 VCL Reference

TMenu events

TMenu	By object	Legend

OnChange


TMenu.OnChange
 VCL Reference

TMenu.OnChange

TMenu	See also

Occurs when the menu changes.

type TMenuChangeEvent = procedure (Sender: TObject; Source: TMenuItem; Rebuild: Boolean) of object;

property OnChange: TMenuChangeEvent;

Description

Write an OnChange event handler to respond to changes in the menu’s structure. OnChange occurs when the menu is loaded into memory, and in response to property changes that affect the menu’s structure.

The Sender parameter is the menu that changed. The Source parameter indicates the menu item (if any) whose properties changed. Rebuild indicates whether the menu will be rebuilt to reflect the change (for example when items are added or deleted).


 VCL Reference

TMenu methods

TMenu	Alphabetically	Legend

In TMenu

AdjustBiDiBehavior

Create

Destroy

DispatchCommand

DispatchPopup

DoBiDiModeChanged

DoChange

DoGetMenuString

FindItem

GetChildren

GetHandle

GetHelpContext

IsOwnerDraw

IsRightToLeft

IsShortCut

Loaded

MenuChanged

Notification

ParentBiDiModeChanged

ProcessMenuChar

SetChildOrder

UpdateItems

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMenu methods

TMenu	By object	Legend

AdjustBiDiBehavior

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DispatchCommand

DispatchPopup

DoBiDiModeChanged

DoChange

DoGetMenuString

ExecuteAction

FieldAddress

FindComponent

FindItem

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetHandle

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

IsOwnerDraw

IsRightToLeft

IsShortCut

Loaded

MenuChanged

MethodAddress

MethodName

NewInstance

Notification

ParentBiDiModeChanged

ProcessMenuChar

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetChildOrder

SetSubComponent

UpdateAction

UpdateItems


TMenu.AdjustBiDiBehavior
 VCL Reference

TMenu.AdjustBiDiBehavior

TMenu	See also

Applies the BiDiMode property to the menu when the Windows control is created.

procedure AdjustBiDiBehavior;

Description

AdjustBiDiBehavior is called automatically when the Windows control for the menu is created. It ensures that the BiDiMode property is properly reflected in the menu if the application is running in a Middle Eastern locale.


TMenu.Create
 VCL Reference

TMenu.Create

TMenu	See also

Creates an instance of TMenu.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a menu at runtime. Menus placed on forms at design time are created automatically. Create calls the inherited Create method, then sets the initial values for the menu component, including creating an Items property.

The AOwner parameter indicates the component (usually a form) that is responsible for managing the memory associated with the menu.


TMenu.Destroy
 VCL Reference

TMenu.Destroy

TMenu	See also

Destroys the menu component.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMenu reference is not nil, and only then calls Destroy. Destroy frees the Items property, and then calls the inherited Destroy method.


TMenu.DispatchCommand
 VCL Reference

TMenu.DispatchCommand

TMenu	See also

Calls the Click method of the menu item with the specified value as its Command property.

function DispatchCommand(ACommand: Word): Boolean; dynamic;

Description

Call DispatchCommand to simulate a click on the menu item associated with a command ID. If DispatchCommand locates a menu item that matches the command ID, it calls the Click method for that menu item and returns True. If there is no such item, DispatchCommand returns False.


TMenu.DispatchPopup
 VCL Reference

TMenu.DispatchPopup

TMenu	See also

Dispatches a pop-up menu command.

function DispatchPopup(AHandle: HMENU): Boolean;

Description

Call DispatchPopup to simulate a click on the menu item associated with the pop-up menu handle. If DispatchPopup locates a menu item that matches the pop-up menu handle, it calls the Click method for that menu item and returns True. If there is no such item, DispatchPopup returns False.


TMenu.DoBiDiModeChanged
 VCL Reference

TMenu.DoBiDiModeChanged

TMenu	See also

Updates the menu when the BiDiMode property changes.

procedure DoBiDiModeChanged;

Description

Do not call DoBiDiModeChanged. It is called automatically when the menu’s BiDiMode property changes to update the menu to reflect the current setting.


TMenu.DoChange
 VCL Reference

TMenu.DoChange

TMenu	See also

Generates an OnChange event.

procedure DoChange(Source: TMenuItem; Rebuild: Boolean); virtual;

Description

DoChange is called automatically when the properties of any menu items change. The Source parameter specifies the menu item (if any) that changed. The Rebuild parameter indicates whether the change requires the menu to regenerate its items.


TMenu.DoGetMenuString
 VCL Reference

TMenu.DoGetMenuString

TMenu	See also

Returns the caption for an item in the menu.

function DoGetMenuString(Menu: HMENU; ItemID: UINT; Str: PChar; MaxCount: Integer; Flag: UINT): Integer;

Description

DoGetMenuString is used internally to obtain menu item captions, given the Windows menu handle. The Menu parameter indicates the menu’s handle. The ItemID parameter specifies the menu item whose caption is desired. If the Flag parameter is MF_BYCOMMAND, ItemID is the Command property of the menu item. If Flag is MF_BYPOSITION, ItemID is the 0-based index of the menu item. The caption is returned in a buffer pointed to by the Str parameter. MaxCount indicates the size of that buffer.

Unlike the Windows API function GetMenuString, DoGetMenuString returns the correct caption for owner-draw menu items.


TMenu.FindItem
 VCL Reference

TMenu.FindItem

TMenu	See also

Locates and returns a menu item.

type TFindItemKind = (fkCommand, fkHandle, fkShortCut);

function FindItem(Value: Integer; Kind: TFindItemKind): TMenuItem;

Description

Call FindItem to locate a menu item in the menu or one of its submenus. The menu item is identified by either a pop-up menu handle, command ID, or menu shortcut value. The Kind parameter specifies how the menu item is to be identified. It can be any of these values:

Value	Meaning

fkCommand	Command ID used by Windows WM_COMMAND message matches the Value parameter.

fkHandle	Pop-up menu handle matches the Value parameter.

fkShortCut	Menu shortcut key code matches the Value parameter.


TMenu.GetChildren
 VCL Reference

TMenu.GetChildren

TMenu	See also

Executes a callback for child menu items.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

GetChildren is called automatically by the streaming system so that child menu items are saved and read with their parent menu.


TMenu.GetHandle
 VCL Reference

TMenu.GetHandle

TMenu	See also

Returns the value of the Handle property.

function GetHandle: HMENU; virtual;

Description

GetHandle is the protected implementation of the Handle property. Override this method to change the implementation of the handle property. For example, TMainMenu overrides GetHandle to adjust for menus added by embedded OLE objects.


TMenu.GetHelpContext
 VCL Reference

TMenu.GetHelpContext

TMenu	See also

Returns the help context ID associated with a menu item.

function GetHelpContext(Value: Integer; ByCommand: Boolean): THelpContext;

Description

Call GetHelpContext to obtain the ID for context-sensitive help on a particular menu item. Identify the menu item as the item that matches the Value property. If ByCommand is True, Value is the Command property of the TMenuItem. If ByCommand is False, Value is the Handle property.


TMenu.IsOwnerDraw
 VCL Reference

TMenu.IsOwnerDraw

TMenu	See also

Indicates whether menu items can contain more than simple captions.

function IsOwnerDraw: Boolean;

Description

IsOwnerDraw returns True when the OwnerDraw property is True or the Images property is not nil. This is used internally to determine how the menu should be painted.


TMenu.IsRightToLeft
 VCL Reference

TMenu.IsRightToLeft

TMenu	See also

Indicates whether menu items read from right to left.

function IsRightToLeft: Boolean;

Description

Call IsRightToLeft to determine the layout of main menu items. IsRightToLeft returns True if the application is running on a system with a Middle Eastern locale and the BiDiMode property is not bdLeftToRight.


TMenu.IsShortCut
 VCL Reference

TMenu.IsShortCut

TMenu	See also

Dispatches a key message if it represents a shortcut key for an item in the menu.

function IsShortCut(var Message: TWMKey): Boolean; dynamic;

Description

Call IsShortCut when processing a keydown message to identify shortcut keys and trigger the appropriate menu action. IsShortCut decodes the key message passed in the Message parameter. It then encodes the state of the Shift, Control, and Alt keys with the value of the character that was typed to obtain the ShortCut property of a menu item. If IsShortCut locates a menu item associated with the shortcut key combination, it calls the item's Click method and returns True. If no item in the menu has a shortcut corresponding to the message, IsShortCut returns False.


TMenu.Loaded
 VCL Reference

TMenu.Loaded

TMenu	See also

Calls the DoChange method when the menu is first loaded into memory.

procedure Loaded; override;

Description

Loaded is called automatically immediately after the menu is loaded into memory. It calls the DoChange method to allow any necessary fixup.


TMenu.MenuChanged
 VCL Reference

TMenu.MenuChanged

TMenu	See also

Responds when the menu changes.

procedure MenuChanged(Sender: TObject; Source: TMenuItem; Rebuild: Boolean); virtual;

Description

MenuChanged is called automatically when changes occur that affect the structure of the menu. The Sender parameter indicates the object that originates the change. It’s value can be nil. Source indicates which menu item is affected. Rebuild indicates whether the menu must be rebuilt to reflect the change (for example when items are added or deleted).

MenuChanged calls the DoChange method, which generates an OnChange event.

Note:	Changes that affect individual items rather than the menu as a whole trigger the UpdateItems method instead of MenuChanged. For example, when the Images property changes, UpdateItems is called rather than MenuChanged.


TMenu.Notification
 VCL Reference

TMenu.Notification

TMenu	See also

Responds when components are added or deleted.

procedure Notification(AComponent: TComponent; Operation: TOperation); override;

Description

TMenu overrides the inherited method to set the Images property to nil if the ImageList is deleted.


TMenu.ParentBiDiModeChanged
 VCL Reference

TMenu.ParentBiDiModeChanged

TMenu	See also

Ensures that the menu’s layout follows the current settings of the BiDiMode and ParentBiDiMode properties.

procedure ParentBiDiModeChanged; overload;

procedure ParentBiDiModeChanged(AControl: TObject); overload;

Description

ParentBiDiMode changed is called when the menu’s BiDiMode property must be updated to reflect the bi-directional mode of its associated control.


TMenu.ProcessMenuChar
 VCL Reference

TMenu.ProcessMenuChar

TMenu	See also

Responds to keyboard input for the menu.

procedure ProcessMenuChar(var Message: TWMMenuChar);

Description

ProcessMenuChar handles keyboard messages from Windows. It checks whether the character typed is an accelerator character from one of the menu’s items. If so, ProcessMenuChar executes the menu item (or, if the item is disabled, selects it). If the key is not an accelerator, ProcessMenuChar checks for captions that begin with the character. If there is only one, it is treated like an accelerator. Otherwise, the first item beginning with that character is selected.

When calling ProcessMenuChar programmatically, the User, MenuFlag, and Menu fields of Message parameter must be supplied.


TMenu.SetChildOrder
 VCL Reference

TMenu.SetChildOrder

TMenu	See also

Ensures that the menu item indexes reflect the order in which they are loaded and saved.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

SetChildOrder is called automatically when menus are loaded into memory. The Child parameter specifies the child object that was just loaded. The Order parameter specifies the order in which it was loaded. SetChildOrder assigns the MenuIndex for each child to match the order in which the items are loaded.


TMenu.UpdateItems
 VCL Reference

TMenu.UpdateItems

TMenu	See also

Causes all menu items to update themselves.

procedure UpdateItems;

Description

UpdateItems is called automatically when changes occur that must be reflected by individual menu items. Changes that affect the menu as a whole trigger the MenuChanged method instead.


Hierarchy

TObject

TPersistent

TComponent

TMenu


TMenuActionLink
 VCL Reference

TMenuActionLink

Hierarchy	Properties	Methods	Events

TMenuActionLink links menu item clients to the corresponding menu action.

Unit

Menus

Description

TMenuActionLink is designed to link actions to menu item clients. TMenuActionLink overrides methods to determine whether the action and client are linked, and to ensure that action events are appropriate for properties of and events of menu item clients.

TMenuActionLink overrides methods to support linking the following properties and events with menu item client properties or events, most of which have the same name:

Caption

Checked

Enabled

HelpContext

Hint

ImageIndex

ShortCut

Visible

OnExecute


 VCL Reference

TMenuActionLink properties

TMenuActionLink	Alphabetically	Legend

Derived from TBasicActionLink

Action


 VCL Reference

TMenuActionLink properties

TMenuActionLink	By object	Legend

Action


 VCL Reference

TMenuActionLink events

TMenuActionLink	Alphabetically	Legend

Derived from TBasicActionLink

OnChange


 VCL Reference

TMenuActionLink events

TMenuActionLink	By object	Legend

OnChange


 VCL Reference

TMenuActionLink methods

TMenuActionLink	Alphabetically	Legend

In TMenuActionLink

AssignClient

IsAutoCheckLinked

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsGroupIndexLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsOnExecuteLinked

IsShortCutLinked

IsVisibleLinked

SetAutoCheck

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetOnExecute

SetShortCut

SetVisible

Derived from TBasicActionLink

Create

Destroy

Execute

Update

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMenuActionLink methods

TMenuActionLink	By object	Legend

AfterConstruction

AssignClient

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Execute

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

IsAutoCheckLinked

IsCaptionLinked

IsCheckedLinked

IsEnabledLinked

IsGroupIndexLinked

IsHelpLinked

IsHintLinked

IsImageIndexLinked

IsOnExecuteLinked

IsShortCutLinked

IsVisibleLinked

MethodAddress

MethodName

NewInstance

SafeCallException

SetAutoCheck

SetCaption

SetChecked

SetEnabled

SetHelpContext

SetHelpKeyword

SetHelpType

SetHint

SetImageIndex

SetOnExecute

SetShortCut

SetVisible

Update


TMenuActionLink.AssignClient
 VCL Reference

TMenuActionLink.AssignClient

TMenuActionLink	See also

Assigns a client menu item that is linked to the associated action.

procedure AssignClient(AClient: TObject); override;

Description

TMenuActionLink overrides AssignClient to ensure that the client for the link is a menu item.


TMenuActionLink.IsAutoCheckLinked
 VCL Reference

TMenuActionLink.IsAutoCheckLinked

TMenuActionLink	See also

Indicates whether the AutoCheck state for the action and the client are linked.

function IsAutoCheckLinked: Boolean; override;

Description

IsAutoCheckLinked indicates whether the AutoCheck property is linked to the appropriate client property. IsAutoCheckLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsCaptionLinked
 VCL Reference

TMenuActionLink.IsCaptionLinked

TMenuActionLink	See also

Indicates whether the caption for the action and the client are linked.

function IsCaptionLinked: Boolean; override;

Description

IsCaptionLinked indicates whether the Caption property is linked to the appropriate client property. IsCaptionLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsCheckedLinked
 VCL Reference

TMenuActionLink.IsCheckedLinked

TMenuActionLink	See also

Indicates whether the checked state for the action and the client are linked.

function IsCheckedLinked: Boolean; override;

Description

IsCheckedLinked indicates whether the Checked property is linked to the appropriate client property. IsCheckedLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsEnabledLinked
 VCL Reference

TMenuActionLink.IsEnabledLinked

TMenuActionLink	See also

Indicates whether the enabled state for the action and the client are linked.

function IsEnabledLinked: Boolean; override;

Description

IsEnabledLinked indicates whether the Enabled property is linked to the appropriate client property. IsEnabledLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsGroupIndexLinked
 VCL Reference

TMenuActionLink.IsGroupIndexLinked

TMenuActionLink	See also

Indicates whether the GroupIndex property for the action and the client are linked.

function IsGroupIndexLinked: Boolean; override;

Description

IsGroupIndexLinked indicates whether the GroupIndex property is linked to the menu item’s GroupIndex property. IsGroupIndexLinked returns True if the client menu item has a RadioItem property of True and the client requests that the action control this property. It returns False if the client menu item has a RadioItem property of False or has severed its GroupIndex property from the action.


TMenuActionLink.IsHelpLinked
 VCL Reference

TMenuActionLink.IsHelpLinked

TMenuActionLink	See also

Indicates whether the help properties for the action and the client are linked.

function IsHelpLinked: Boolean; override;

Description

IsHelpLinked indicates whether the HelpContext, HelpKeyword, and HelpType properties are linked to the appropriate client property. IsHelpLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsHintLinked
 VCL Reference

TMenuActionLink.IsHintLinked

TMenuActionLink	See also

Indicates whether the Hint property for the action and the client are linked.

function IsHintLinked: Boolean; override;

Description

IsHintLinked indicates whether the Hint property is linked to the appropriate client property. IsHintLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsImageIndexLinked
 VCL Reference

TMenuActionLink.IsImageIndexLinked

TMenuActionLink	See also

Indicates whether the image index for the action and the client are linked.

function IsImageIndexLinked: Boolean; override;

Description

IsImageIndexLinked indicates whether the ImageIndex property is linked to the appropriate client property. IsImageIndexLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsOnExecuteLinked
 VCL Reference

TMenuActionLink.IsOnExecuteLinked

TMenuActionLink	See also

Indicates whether the OnExecute event handler for the action and the client are linked.

function IsOnExecuteLinked: Boolean; override;

Description

IsOnExecuteLinked indicates whether the OnExecute event handler is linked to the appropriate client event. IsOnExecuteLinked returns True if the client requests that the action control this event, False otherwise.


TMenuActionLink.IsShortCutLinked
 VCL Reference

TMenuActionLink.IsShortCutLinked

TMenuActionLink	See also

Indicates whether the ShortCut property for the action and the client are linked.

function IsShortCutLinked: Boolean; override;

Description

IsShortCutLinked indicates whether the ShortCut property is linked to the appropriate client property. IsVisibleLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.IsVisibleLinked
 VCL Reference

TMenuActionLink.IsVisibleLinked

TMenuActionLink	See also

Indicates whether the visible state for the action and the client are linked.

function IsVisibleLinked: Boolean; override;

Description

IsVisibleLinked indicates whether the Visible property is linked to the appropriate client property. IsVisibleLinked returns True if the client requests that the action control this property, False otherwise.


TMenuActionLink.SetAutoCheck
 VCL Reference

TMenuActionLink.SetAutoCheck

TMenuActionLink	See also

Sets the AutoCheck property of a menu item if the client is linked to the action for this property.

procedure SetAutoCheck(Value: Boolean); override;

Description

SetAutoCheck sets the AutoCheck property of a menu item, and is called only if the client is linked for this event. Value specifies the AutoCheck new value of AutoCheck.


TMenuActionLink.SetCaption
 VCL Reference

TMenuActionLink.SetCaption

TMenuActionLink	See also

Sets the caption of a menu item if the client is linked to the action for this property.

procedure SetCaption(const Value: string); override;

Description

SetCaption sets the caption of a menu item, and is called only if the client is linked for this event. Value is the string to which the caption should be set.


TMenuActionLink.SetChecked
 VCL Reference

TMenuActionLink.SetChecked

TMenuActionLink	See also

Sets the checked state of a menu item if the client is linked to the action for this property.

procedure SetChecked(Value: Boolean); override;

Description

SetChecked sets the checked state of a menu item, and is called only if the client is linked for this event. Value specifies whether the checked state should be set.


TMenuActionLink.SetEnabled
 VCL Reference

TMenuActionLink.SetEnabled

TMenuActionLink	See also

Sets the enabled state of a menu item if the client is linked to the action for this property.

procedure SetEnabled(Value: Boolean); override;

Description

SetEnabled sets the enabled state of a menu item, and is called only if the client is linked for this event. Value specifies whether the enabled state should be set.


TMenuActionLink.SetHelpContext
 VCL Reference

TMenuActionLink.SetHelpContext

TMenuActionLink	See also

Sets the Help context of a menu item that is the client of this action link.

procedure SetHelpContext(Value: THelpContext); override;

Description

SetHelpContext sets the help context of a client menu item, and is called only if the client is linked for this property. Value specifies what the help context should be.


TMenuActionLink.SetHelpKeyword
 VCL Reference

TMenuActionLink.SetHelpKeyword

TMenuActionLink	See also

Sets the Help keyword of a menu item that is the client of this action link.

procedure SetHelpKeyword(const Value: string); override;

Description

SetHelpKeyword sets the help keyword of a client menu item, and is called only if the client is linked for this property. Value specifies what the help keyword should be.


TMenuActionLink.SetHelpType
 VCL Reference

TMenuActionLink.SetHelpType

TMenuActionLink	See also

Sets whether client menu items use the HelpContext or HelpKeyword property for context sensitive help.

procedure SetHelpType(Value: THelpType ); override;

Description

SetHelpType sets the HelpType property of a client menu item, and is called only if the client is linked for this property. Value specifies what the help type should be.


TMenuActionLink.SetHint
 VCL Reference

TMenuActionLink.SetHint

TMenuActionLink	See also

Sets the hint of a menu item if the client is linked to the action for this property.

procedure SetHint(const Value: string); override;

Description

SetHint sets the hint of a menu item, and is called only if the client is linked for this event. Value is the string that to which the hint should be set.


TMenuActionLink.SetImageIndex
 VCL Reference

TMenuActionLink.SetImageIndex

TMenuActionLink	See also

Sets the image index of a menu item if the client is linked to the action for this property.

procedure SetImageIndex(Value: Integer); override;

Description

SetImageIndex sets the image index of a menu item, and is called only if the client is linked for this event. Value specifies what the image index should be.


TMenuActionLink.SetOnExecute
 VCL Reference

TMenuActionLink.SetOnExecute

TMenuActionLink	See also

Sets the execution event handler for a menu item if the client is linked to the action for this property.

procedure SetOnExecute(Value: TNotifyEvent); override;

Description

SetOnExecute sets the appropriate execution event handler of a menu item, and is called only if the client is linked for this event. Value specifies the procedure that should be used for this event.


TMenuActionLink.SetShortCut
 VCL Reference

TMenuActionLink.SetShortCut

TMenuActionLink	See also

Sets the shortcut of a menu item if the client is linked to the action for this property.

procedure SetShortCut(Value: TShortCut); override;

Description

SetShortCut sets the shortcut of a menu item, and is called only if the client is linked for this event. Value specifies what the shortcut should be.


TMenuActionLink.SetVisible
 VCL Reference

TMenuActionLink.SetVisible

TMenuActionLink	See also

Sets the visible state of a menu item if the client is linked to the action for this property.

procedure SetVisible(Value: Boolean); override;

Description

SetVisible sets the visible state of a menu item, and is called only if the client is linked for this event. Value specifies whether the visible state should be set.


Hierarchy

TObject

TBasicActionLink

TActionLink

TMenuActionLink


TMenuItem
 VCL Reference

TMenuItem

Hierarchy	Properties	Methods	Events	Using TMenuItem	See also

TMenuItem describes the properties of an item in a menu.

Unit

Menus

Description

Use TMenuItem to specify the appearance and behavior of an item in a menu. Each TMainMenu or TPopupMenu component can contain multiple menu items. When a menu is defined at design time, the Menu Designer automatically creates menu item objects for each command on the menu.


 VCL Reference

TMenuItem properties

TMenuItem	Alphabetically	Legend

In TMenuItem

Action

AutoCheck

AutoHotkeys

AutoLineReduction

Bitmap

Break

Caption

Checked

Command

Count

Default

Enabled

GroupIndex

Handle

HelpContext

Hint

ImageIndex

Items

MenuIndex

Parent

RadioItem

ShortCut

SubMenuImages

Visible

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TMenuItem properties

TMenuItem	By object	Legend

Action

AutoCheck

AutoHotkeys

AutoLineReduction

Bitmap

Break

Caption

Checked

Command

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

Default

DesignInfo

Enabled

GroupIndex

Handle

HelpContext

Hint

ImageIndex

Items

MenuIndex

Name

Owner

Parent

RadioItem

ShortCut

SubMenuImages

Tag

VCLComObject

Visible


TMenuItem.Action
 VCL Reference

TMenuItem.Action

TMenuItem

Designates the action associated with the menu item.

property Action: TBasicAction;

Description

Action designates the action object that is associated with the menu item. Actions can be associated with a menu item by using the action list editor at design-time. Actions are a way of centralizing user responses to commands.


TMenuItem.AutoCheck
 VCL Reference

TMenuItem.AutoCheck

TMenuItem	See also

Indicates whether the menu item’s checked state toggles automatically when the item is clicked.

property AutoCheck: Boolean;

Description

When AutoCheck is True, then every time the menu item is clicked, the value of the Checked property toggles automatically before the OnClick event occurs. When AutoCheck is False, the application must explicitly set the value of the Checked property (for example, in an OnClick event handler).


TMenuItem.AutoHotkeys
 VCL Reference

TMenuItem.AutoHotkeys

TMenuItem	See also

Determines whether the accelerator keys for submenu items can be reset automatically.

property AutoHotkeys: TMenuItemAutoFlag;

Description

Set AutoHotkeys to indicate whether the accelerator keys for the items in the Items property can be reset if necessary to ensure that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that menu items added dynamically at runtime can have accelerator keys that do not introduce conflicts.  Delphi tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator.

Before the menu is displayed, Delphi checks and adjusts the accelerator key mappings if AutoHotkeys is maAutomatic or if AutoHotkeys is maParent and the parent menu item adjusts accelerator key mappings. Otherwise, Delphi does not alter the items listed in the Items property, but may adjust the accelerator keys for submenus, depending on the AutoHotkeys property of the menu item that is the parent of the submenu.

Note:	When AutoHotkeys disallows automatic adjustment of accelerator keys, an application can still adjust the menu items by calling the RethinkHotkeys method. AutoHotkeys merely controls whether this adjustment occurs automatically.


TMenuItem.AutoLineReduction
 VCL Reference

TMenuItem.AutoLineReduction

TMenuItem	See also

Determines whether redundant separator bars are automatically removed from the submenu.

property AutoLineReduction: TMenuItemAutoFlag;

Description

Set AutoLineReduction to indicate whether Delphi should automatically ensure that the submenu defined by the Items property does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions.

Before the menu is displayed, Delphi removes superfluous separator bars if AutoLineReduction is maAutomatic or AutoLineReduction is maParent and the parent menu item removes superfluous separator bars. Otherwise, Delphi does not remove separators from the Items property, but may remove superfluous separators from submenus, depending on the AutoLineReduction property of the menu item that is the parent of the submenu.

Note:	When AutoLineReduction disallows automatic removal of separator bars, an application can still remove superfluous separators by calling the RethinkLines method. AutoLineReduction merely controls whether this adjustment occurs automatically.


TMenuItem.Bitmap
 VCL Reference

TMenuItem.Bitmap

TMenuItem	See also

Designates a bitmap that is drawn for the menu item.

property Bitmap: TBitmap;

Description

Use Bitmap to provide a custom image that appears next to the caption in the menu item. On owner-draw menus, Bitmap can be used from an OnDrawItem event handler to represent the entire menu item or a portion of the menu item.

Note:	If the ImageIndex property is set and the parent menu has a non-nil Images property, the image identified by ImageIndex is used instead of Bitmap.


TMenuItem.Break
 VCL Reference

TMenuItem.Break

TMenuItem	See also

Determines whether the menu item starts a new column in the menu.

type TMenuBreak = (mbNone, mbBreak, mbBarBreak);

property Break: TMenuBreak;

Description

Set Break to break a long menu into columns at the item described by this menu item. These are the possible values:

Value	Meaning

mbNone	No menu breaking occurs. This is the default value.

mbBarBreak	The Parent menu breaks into another column with the menu item appearing at the top of the new column. A bar separates the new and the old columns.

mbBreak	The Parent menu breaks into another column with the menu item appearing at the top of the new column. Only space separates the new and the old columns.


TMenuItem.Caption
 VCL Reference

TMenuItem.Caption

TMenuItem	See also 	Example

Specifies the text of the menu item.

property Caption: string;

Description

Set Caption to the string the user sees for this item in the menu. To underline a character in a string, include an ampersand (&) before the character. This type of character is called an accelerator character. If Caption includes an accelerator character, the user can select the menu item by pressing Alt while typing the underlined character.

Tip:	To automatically assign or adjust the accelerator characters in menu item captions, use the RethinkHotkeys method.

Use the Caption property to identify the menu item as a line that separates the menu into parts. Specify a hyphen character (-) as the value of Caption for the menu item to indicate that the menu item is a separator. To separate the menu into multiple columns, use the Break property instead.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.Checked
 VCL Reference

TMenuItem.Checked

TMenuItem	See also

Specifies whether a check mark should appear beside the Caption.

property Checked: Boolean;

Description

Use Checked to allow a menu item to work like a check box. If Checked is True, the menu item appears checked. If Checked is False, the menu item remains unchecked.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.Command
 VCL Reference

TMenuItem.Command

TMenuItem	See also	Example

Specifies the Windows Command ID associated with the menu item.

property Command: Word;

Description

Use Command in an application that directly handles WM_COMMAND messages. When the user selects the menu item, Windows sends a WM_COMMAND to the window associated with the menu. The ItemID of the message contains the value of the Command property of the menu item that was selected.


TMenuItem.Count
 VCL Reference

TMenuItem.Count

TMenuItem	See also 	Example

Indicates the number of subitems of the menu item.

property Count: Integer;

Description

Read Count to determine the number of subitems listed in the Items property array. When the user clicks on a menu item that has subitems, a dropdown menu appears which displays those subitems. Each subitem can, in turn, contain additional subitems. The Count property counts only the immediate subitems of the menu item.


TMenuItem.Default
 VCL Reference

TMenuItem.Default

TMenuItem	See also

Specifies whether the menu item is invoked when the parent item is double clicked.

property Default: Boolean;

Description

Set Default to specify whether a menu item is the default item in a submenu. Default menu items are executed when the parent item is double-clicked, allowing users to avoid navigating the submenus that contain them.

The default item appears in boldface. A submenu can have only one default item. If the Items list of the parent menu item already contains a default menu item, setting the Default property to True sets the Default property of the previous default item to False..


TMenuItem.Enabled
 VCL Reference

TMenuItem.Enabled

TMenuItem	See also 	Example

Specifies whether the menu item is enabled.

property Enabled: Boolean;

Description

Use Enabled to enable or disable a menu item. If Enabled is True, the Click method is called when the user selects the item with the mouse. If Enabled is False, the menu item appears dimmed and the user cannot select it. However, calling the Click method works even when Enabled is False.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.GroupIndex
 VCL Reference

TMenuItem.GroupIndex

TMenuItem	See also

Identifies the logical group to which the menu item belongs.

property GroupIndex: Byte;

Description

Use GroupIndex to control how menus are merged. In applications that contain multiple forms, items from the menus of secondary forms can be merged into the application’s main menu as those forms become active. MDI applications always merge the menus of child windows with the main menu of the parent window.

By default, all menu items in a menu bar (main menu) have the same GroupIndex value. To use GroupIndex to merge menus, set the GroupIndex value of each successive menu item to a value equal to or greater than that of the previous menu item.

When a menu item in a menu bar that is merged into the application’s main menu has the same GroupIndex value as a menu item in the main menu, the menu item in the application’s main menu is replaced by the corresponding menu item. If multiple menu items in the application’s main menu have the same GroupIndex value, they can be replaced only by separate menu items from the other form’s menu that also have repeated GroupIndex values. Thus, the first main menu item with a given value is replaced by the first item in the second form with that value, the second item in the main form is replaced by the second item in the second form, and so on.

When a menu item in a menu bar that is merged into the application’s main menu has a GroupIndex that falls between the GroupIndex values of two adjacent items on the application’s main menu, that menu item is inserted between the two adjacent items. If the item’s GroupIndex value is greater than all other GroupIndex values in the application’s main menu, the item appears at the end of the main menu. If the GroupIndex value is less than all other GroupIndex values in the application’s main menu, the menu item appears at the beginning of the main menu bar.

When an object created by an OLE 2.0 server application is activated, the server can try to merge its menus with the menus of the container application. The GroupIndex property is used to replace up to three main menu items with items from the server, in the manner described above. The server application uses the following predefined GroupIndex values to locate menu items to replace:

Group	Index	Description

Edit	1	Server menu items for editing the active OLE object

View	3	Server menu items for modifying the view of the OLE object.

Help	5	Server menu items for accessing the server’s online Help.

Note:	 See the documentation for the OLE server for information about whether it attempts menu merge during in-place activation.

GroupIndex can also be used to define groups of menu items that act like radio buttons. To allow menu items to behave like radio buttons, set the RadioItem property to all menu items in the group to True, and assign each menu item the same value of GroupIndex. Checking any menu item in the group will then uncheck the others.


TMenuItem.Handle
 VCL Reference

TMenuItem.Handle

TMenuItem	See also

Indicates the Windows menu handle of the drop-down menu associated with the menu item.

property Handle: HMENU;

Description

Use Handle when calling a Windows API function that requires a menu handle. Handle is only valid if the Count property is greater than 0.


TMenuItem.HelpContext
 VCL Reference

TMenuItem.HelpContext

TMenuItem	See also

Specifies the help context ID associated with the menu item.

property HelpContext: THelpContext;

Description

Use HelpContext to associate the menu item with a screen in the Help system of the application. Each screen in the Help system should have a unique context ID. When a menu item is selected using the keyboard, pressing F1 displays a Help screen. Which Help screen appears depends on the value of the HelpContext property.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.Hint
 VCL Reference

TMenuItem.Hint

TMenuItem	See also

Specifies the text string that can appear when the user moves the mouse pointer over a menu item.

property Hint: string;

Description

Set Hint to a string that provides more information about the meaning of the menu item than the Caption. The hint text appears in a Help Hint window when the user pauses with the mouse over the menu item if Help Hints are enabled (that is, if the Form’s and the Application’s ShowHint properties are True). It is also available for the code in the application’s OnHint event handler.

The value of Hint can specify both a short value for the Help Hint window and a longer string to be used by the OnHint event handler. To provide both a short and a long hint, set Hint to the short string, followed by a vertical bar (|), followed by the long string.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.ImageIndex
 VCL Reference

TMenuItem.ImageIndex

TMenuItem	See also

Indicates which image maintained by the parent menu appears next to the menu item.

property ImageIndex: TImageIndex;

Description

Set ImageIndex to designate an image that should appear next to the caption when the menu item is drawn. On top-level menu items, ImageIndex specifies a zero-offset index into the Images property of the parent menu (TMenu or TPopupMenu). On submenu items, ImageIndex is the zero-offset index into the parent item’s SubMenuImages property.

If the parent menu or item does not maintain a list of images, use the Bitmap property to provide an image for a single menu item. However, any image specified by ImageIndex takes precedence over the Bitmap property. Bitmap is only used when ImageIndex has a negative value or the parent’s Images or SubMenuImages property isnil.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.Items
 VCL Reference

TMenuItem.Items

TMenuItem	See also 	Example

Lists the menu items in the submenu of the menu item.

property Items[Index: Integer]: TMenuItem; default;

Description

Use Items to access to a subitem by its position in the list of subitems. The value of Index is the position of the subitem within the Items array. For example, if an application has a File drop-down menu that contains the menu items New, Open, and Save, in that order, FileMenu.Items[2] refers to the Save command.


TMenuItem.MenuIndex
 VCL Reference

TMenuItem.MenuIndex

TMenuItem	See also

Indicates the index of the menu item within its parent menu.

property MenuIndex: Integer;

Description

Use MenuIndex to locate the menu item in the Items property of its parent menu item. Changing this value moves the menu item within its menu.

Note:	MenuIndex may not correspond to the position of the item in the menu the user sees. The menu can include items that are not visible.


TMenuItem.Parent
 VCL Reference

TMenuItem.Parent

TMenuItem	See also

Identifies the parent menu item of this menu item.

property Parent: TMenuItem;

Description

Read Parent to determine the menu item that represents the dropdown menu that contains this menu item. If the menu item is a top level menu item in a main menu or pop-up menu, Parent is the value of that menu’s Items property.


TMenuItem.RadioItem
 VCL Reference

TMenuItem.RadioItem

TMenuItem	See also

Specifies whether the menu item is mutually exclusive with other menu items in its group.

property RadioItem: Boolean;

Description

Use RadioItem to make the menu item behave like a radio button with a group of other menu items. The group of menu items is the set of all menu items in a pop-up or drop-down menu that have the same value of GroupIndex. When RadioItem is True, only one menu item in the group that contains the menu item can be checked at a time. The single selected menu item in the group is indicated by a round dot next to the Caption.

Note:	RadioItem does not automatically select the item when the user clicks it at runtime: you must still explicitly set the Checked property to True in response to the OnClick event. RadioItem simply changes the appearance of the Checked state (from a check mark to a round dot) and automatically unchecks other menu items in the same group when you set the Checked property to True.

RadioItem does not work for the top-level items in a main menu.

Note:	Under Windows NT 3.51, the round dot indicator only appears if the “new shell” has been installed.


TMenuItem.ShortCut
 VCL Reference

TMenuItem.ShortCut

TMenuItem	See also

Specifies the key combination users can type to quickly access the menu item.

property ShortCut: TShortCut

Description

Use ShortCut to allow the user to type a key combination instead of selecting the item using the menu. This key combination appears to the right of the menu item in the menu.

When setting menu shortcuts at design time, the Object Inspector provides a long list of key combinations to choose from. To create menu shortcuts at runtime, use the global ShortCut or TextToShortCut function. For example, the following line creates a shortcut, Ctrl+C and assigns it to a menu item named CloseCommand.

CloseCommand.ShortCut := ShortCut(Word('C'), [ssCtrl]);

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.SubMenuImages
 VCL Reference

TMenuItem.SubMenuImages

TMenuItem	See also

Lists the images that can appear beside individual items in a submenu of this menu item.

property SubMenuImages: TCustomImageList;

Description

Use SubMenuImages to supply a set of images that can appear beside items listed in the Items property. Individual menu items set their ImageIndex property to indicate which image in the list appears to the left of the menu item caption.

Tip:	If the application uses action lists, this property can be the value of the command list’s Images property. This way, menu items and buttons that do the same thing can display the same image.


TMenuItem.Visible
 VCL Reference

TMenuItem.Visible

TMenuItem	See also

Specifies whether the menu item appears in the menu.

property Visible: Boolean;

Description

Use Visible to prevent the user from seeing an item in the menu. For example, remove menu items that do not apply to the current component of a pop-up menu in an OnPopup event handler.

If Visible is True, the menu item appears. If Visible is False, the menu item is hidden.

Note:	This property is not stored with the menu item if it is supplied by a TAction object.


 VCL Reference

TMenuItem events

TMenuItem	Alphabetically	Legend

In TMenuItem

OnAdvancedDrawItem

OnClick

OnDrawItem

OnMeasureItem


 VCL Reference

TMenuItem events

TMenuItem	By object	Legend

OnAdvancedDrawItem

OnClick

OnDrawItem

OnMeasureItem


TMenuItem.OnAdvancedDrawItem
 VCL Reference

TMenuItem.OnAdvancedDrawItem

TMenuItem	See also

Occurs when an owner-draw menu needs to be drawn.

type TAdvancedMenuDrawItemEvent = procedure (Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState) of object;

property OnAdvancedDrawItem: TAdvancedMenuDrawItemEvent;

Description

Write an OnAdvancedDrawItem event handler to render the image of a menu item in an owner-draw menu. The ACanvas parameter provides a drawing surface on which to draw the menu item. The ARect parameter indicates the boundaries (in pixels) of the menu item on that canvas. The State parameter is a set indicating various aspects of the menu items state such as whether it is selected, checked, grayed, and so on.

Use the Bitmap property or the ImageIndex property to access a bitmap that represents the menu item.

Note:	OnAdvancedDrawItem will only occur if the parent menu’s OwnerDraw property is True or the parent menu has a non-nil Images property.


TMenuItem.OnClick
 VCL Reference

TMenuItem.OnClick

TMenuItem	See also	Example

Occurs when the user clicks menu item.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to implement the desired behavior for when the user selects the menu item. An advantage of using the OnClick event handler over directly handling WM_COMMAND messages sent when the user selects the menu item, is that only the OnClick event occurs when the Click method is called.

Note:	This event handler is not stored with the menu item if it is supplied by a TAction object.


TMenuItem.OnDrawItem
 VCL Reference

TMenuItem.OnDrawItem

TMenuItem	See also

Occurs when an owner-draw menu needs to be drawn.

type TMenuDrawItemEvent = procedure (Sender: TObject; ACanvas: TCanvas; ARect: TRect; Selected: Boolean) of object;

property OnDrawItem: TMenuDrawItemEvent;

Description

Write an OnDrawItem event handler to render the image of a menu item in an owner-draw menu. The ACanvas parameter provides a drawing surface on which to draw the menu item. The ARect parameter indicates the boundaries (in pixels) of the menu item on that canvas. The Selected parameter indicates whether the menu item is selected (that is, if it will be clicked if the user presses return).

Use the Bitmap property or the ImageIndex property to access a bitmap that represents the menu item.

Note:	OnDrawItem will only occur if the parent menu’s OwnerDraw property is True or the parent menu has a non-nil Images property.

Tip:	For more precise information about the menu item’s state, use the OnAdvancedDrawItem event instead.


TMenuItem.OnMeasureItem
 VCL Reference

TMenuItem.OnMeasureItem

TMenuItem	See also

Occurs on owner-draw menu items to determine menu item size before the menu is drawn.

type TMenuMeasureItemEvent = procedure (Sender: TObject; ACanvas: TCanvas; var Width, Height: Integer) of object;

property OnMeasureItem: TMenuMeasureItemEvent;

Description

Write an OnMeasureItem event handler to indicate the size of owner-draw menu items. The ACanvas property represents the canvas where the menu item will be drawn. Use its methods, if necessary, to determine the size of the menu item. Return the size of the menu item as the Width and Height parameters.

If the menu item is using a bitmap image, use the Bitmap property or the ImageIndex property to access the bitmap to determine its size.

Note:	OnMeasureItem will only occur if the parent menu’s OwnerDraw property is True or the parent menu has a non-nil Images property.


 VCL Reference

TMenuItem methods

TMenuItem	Alphabetically	Legend

In TMenuItem

Add

Clear

Click

Create

Delete

Destroy

Find

GetImageList

GetParentComponent

GetParentMenu

HasParent

IndexOf

InitiateAction

Insert

InsertNewLineAfter

InsertNewLineBefore

IsLine

NewBottomLine

NewTopLine

Remove

RethinkHotkeys

RethinkLines

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMenuItem methods

TMenuItem	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Click

Create

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

Dispatch

ExecuteAction

FieldAddress

Find

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetImageList

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetParentMenu

HasParent

IndexOf

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertNewLineAfter

InsertNewLineBefore

InstanceSize

IsImplementorOf

IsLine

MethodAddress

MethodName

NewBottomLine

NewInstance

NewTopLine

ReferenceInterface

Remove

RemoveComponent

RemoveFreeNotification

RethinkHotkeys

RethinkLines

SafeCallException

SetSubComponent

UpdateAction


TMenuItem.Add
 VCL Reference

TMenuItem.Add

TMenuItem	See also 	Example

Adds one or more menu items to the end of the Items property array.

procedure Add(Item: TMenuItem); overload;

procedure Add(const AItems: array of TMenuItem); overload;

Description

Use Add to add new menu items to the dropdown menu for this menu item. If this menu item is the value of the Items property of a main menu or pop-up menu, Add adds the items to the end of the menu.

Specify a single new menu item to add as the value of the Item parameter, or an array of new menu items as the value of the AItems parameter.


TMenuItem.Clear
 VCL Reference

TMenuItem.Clear

TMenuItem	See also

Removes and frees all menu items listed in the Items property.

procedure Clear;

Description

Use Clear to free all the items listed in the Items property array.


TMenuItem.Click
 VCL Reference

TMenuItem.Click

TMenuItem	See also

Simulates a mouse click.

procedure Click; virtual;

Description

Click generates an OnClick event, as if the user had clicked the menu item. Unlike a real mouse click, Click does not generate a WM_COMMAND message to the window associated with the menu.

Component writers can override click to provide a different response when the user selects the menu item.


TMenuItem.Create
 VCL Reference

TMenuItem.Create

TMenuItem	See also 	Example

Creates an instance of TMenuItem.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create a menu item at runtime.

Menu items defined at design time using the Menu designer are created automatically. After calling the inherited constructor, Create initializes the Visible and Enabled properties to True, and generates a unique value for the Command property.

The Component parameter is the Owner component that is responsible for freeing the menu item.


TMenuItem.Delete
 VCL Reference

TMenuItem.Delete

TMenuItem	See also

Removes a menu item from the Items property array.

procedure Delete(Index: Integer);

Description

Call Delete to remove a menu item and all its submenus from a menu. The Index parameter is the index of the item to be deleted, where 0 specifies the first item in the menu, 1 specifies the second item, and so on.

Delete does not free the removed item's memory. To remove an item from the menu and free its memory, call the Free method in the item you want to remove.

To temporarily hide a menu item, without deleting it, use the Visible property.


TMenuItem.Destroy
 VCL Reference

TMenuItem.Destroy

TMenuItem	See also

Destroys an instance of TMenuItem.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMenuItem reference is not nil, and only then calls Destroy.


TMenuItem.Find
 VCL Reference

TMenuItem.Find

TMenuItem	See also

Locates a menu item in the Items property array given its caption.

function Find(ACaption: string): TMenuItem;

Description

Use  Find to locate the menu item in the Items property array with the caption specified by the ACaption parameter. Find ignores accelerator characters when comparing item captions to the ACaption parameter.

Find returns the first menu item in the Items property array with the specified caption, or, if no item is found, nil.


TMenuItem.GetImageList
 VCL Reference

TMenuItem.GetImageList

TMenuItem	See also

Returns the Image list that supplies an image for the menu item.

function GetImageList: TCustomImageList;

Description

Use GetImageList to access the list of images that contains the image for this menu item. The ImageIndex property identifies a specific image from the list that GetImageList returns.

GetImageList first checks the Parent of this menu item for a SubMenuImages property. If the parent menu item does not maintain a list of images, it checks that menu item’s parent, and so on until reaching a top-level menu item (a menu item where Parent is nil). If none of the parent menu items has a SubMenuImages property, GetImageList checks the top-level menu for an Images property.

GetImageList returns the first image list it finds, or nil if it doesn’t find an image list.


TMenuItem.GetParentComponent
 VCL Reference

TMenuItem.GetParentComponent

TMenuItem

Returns the parent component of the menu item.

function GetParentComponent: TComponent; override;

Description

GetParentComponent is called by the streaming system that loads and saves VCL components. It ensures that objects are loaded and saved with their parent objects. GetParentComponent is overridden in descendant classes to return the appropriate parent for their particular type of component. TMenuItem overrides it to identify its associated menu, if it has one, as its parent.


TMenuItem.GetParentMenu
 VCL Reference

TMenuItem.GetParentMenu

TMenuItem	See also

Returns the main menu of which the menu item is part.

function GetParentMenu: TMenu;

Description

GetParentMenu returns the menu that contains the menu item.


TMenuItem.HasParent
 VCL Reference

TMenuItem.HasParent

TMenuItem	See also

Indicates that the menu item has a parent that is responsible for loading and saving its data.

function HasParent: Boolean; override;

Description

TMenuItem overrides HasParent to return True, indicating that menu items have a parent. Applications seldom call the HasParent method. It is used by the streaming system that loads and saves VCL objects to determine when another object is responsible for writing a component to a stream.


TMenuItem.IndexOf
 VCL Reference

TMenuItem.IndexOf

TMenuItem	See also

Returns the position of a menu item within the Items array.

function IndexOf(Item: TMenuItem): Integer;

Description

Call IndexOf to locate a menu item in the submenu headed by this menu item. IndexOf returns 0 for the first menu item, 1 for the second menu item, and so on. If the menu item is not in the submenu, IndexOf returns -1.

Note:	IndexOf may not correspond to the position of the item in the menu the user sees if the menu includes some items that are not visible.


TMenuItem.InitiateAction
 VCL Reference

TMenuItem.InitiateAction

TMenuItem	See also

Calls the action link’s Update method if the menu item is associated with an action link.

procedure InitiateAction; virtual;

Description

InitiateAction calls the action link, if there is one for the menu item, to update the association between the action and the menu item.


TMenuItem.Insert
 VCL Reference

TMenuItem.Insert

TMenuItem	See also 	Example

Inserts a menu item into a specified position in the Items array.

procedure Insert(Index: Integer; Item: TMenuItem);

Description

Use Insert to insert a new menu item to the dropdown menu for this menu item. If this menu item is the value of the Items property of a main menu or pop-up menu, Insert inserts an item into that menu. Specify the new menu item to add as the value of the Item parameter, and the position in the Items array as the value of the Index parameter.


TMenuItem.InsertNewLineAfter
 VCL Reference

TMenuItem.InsertNewLineAfter

TMenuItem	See also

Inserts a separator bar after a specified item from the Items property array.

function InsertNewLineAfter(AItem: TMenuItem): Integer;

Description

Use InsertNewLineAfter to insert a separator bar after the menu item specified by AItem. If AItem is not an item in the Items property array, InsertNewLineAfter raises an exception.

InsertNewLineAfter returns the index of the newly inserted separator item in the Items property array.

Tip:	When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to True so that superfluous separators can be automatically removed.


TMenuItem.InsertNewLineBefore
 VCL Reference

TMenuItem.InsertNewLineBefore

TMenuItem	See also

Inserts a separator bar before a specified item from the Items property array.

function InsertNewLineBefore(AItem: TMenuItem): Integer;

Description

Use InsertNewLineBefore to insert a separator bar before the menu item specified by AItem. If AItem is not an item in the Items property array, InsertNewLineBefore raises an exception.

InsertNewLineBefore returns the index of the newly inserted separator item in the Items property array.

Tip:	When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to True so that superfluous separators can be automatically removed.


TMenuItem.IsLine
 VCL Reference

TMenuItem.IsLine

TMenuItem	See also

Indicates whether the menu item represents a separator bar.

function IsLine: Boolean;

Description

Call IsLine to determine whether the menu item is a separator bar. IsLine checks the Caption of the menu item and returns True if the value of Caption is ‘-‘. Menu items with this Caption appear as separator bars.


TMenuItem.NewBottomLine
 VCL Reference

TMenuItem.NewBottomLine

TMenuItem	See also

Inserts a separator bar at the end of the Items property array.

function NewBottomLine: Integer;

Description

Use NewBottomLine to insert a separator bar at the end of the items property array. This is useful when building up submenus dynamically at runtime.

NewBottomLine returns the index of the newly inserted separator item in the Items property array.

Tip:	When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to True so that superfluous separators can be automatically removed.


TMenuItem.NewTopLine
 VCL Reference

TMenuItem.NewTopLine

TMenuItem	See also

Inserts a separator bar at the beginning of the Items property array.

function NewTopLine: Integer;

Description

Use NewTopLine to insert a separator bar at the beginning of the items property array. This is useful when building up submenus dynamically at runtime.

NewTopLine returns the index of the newly inserted separator item in the Items property array.

Tip:	When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to True so that superfluous separators can be automatically removed.


TMenuItem.Remove
 VCL Reference

TMenuItem.Remove

TMenuItem	See also

Removes a menu item from the Items property array

procedure Remove(Item: TMenuItem);

Description

Call Remove to remove a menu item and all its submenus from a menu. The Item parameter is the item to be removed. If Item is not a menu item in the Items array, Remove raises an exception.

Remove does not free the item's memory. To remove an item from the menu and free its memory, call the Free method in the item you want to remove.

To temporarily hide a menu item, without deleting it, use the Visible property.


TMenuItem.RethinkHotkeys
 VCL Reference

TMenuItem.RethinkHotkeys

TMenuItem	See also

Adjusts the captions of subitems so that every item has an accelerator and there are no duplicate accelerator keys.

function RethinkHotkeys: Boolean;

Description

Call RethinkHotkeys to adjust the accelerator keys for the items in the Items property and in any submenu of those items. RethinkHotkeys checks for items that do not have an accelerator key or that have duplicate accelerator keys. It then replaces any duplicate accelerators with unique characters and adds accelerator keys to items that don’t have them. RethinkHotkeys gives first priority to existing accelerator key mappings, but may change them if necessary to ensure uniqueness.

RethinkHotkeys lets a menu adjust the accelerator keys when the AutoHotkeys property is False. For any menu or submenu that has AutoHotkeys set to True, this adjustment occurs automatically.

RethinkHotkeys returns True if RethinkHotkeys changed the Caption property of any menu items, False otherwise.


TMenuItem.RethinkLines
 VCL Reference

TMenuItem.RethinkLines

TMenuItem	See also

Removes superfluous separator lines from the Items property array.

function RethinkLines: Boolean;

Description

Call RethinkLines to remove superfluous separators from the items in the Items property and in any submenu of those items. RethinkLines removes separators that appear at the very beginning or end of a submenu and separators that immediately follow another separator.

RethinkLines lets a menu remove superfluous separators when the AutoLineReduction property is False. For any menu or submenu that has AutoLineReduction set to True, this adjustment occurs automatically.

RethinkLines returns True if RethinkLines removed any menu items, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TMenuItem


TMetafile
 VCL Reference

TMetafile

Hierarchy	Properties	Methods	Events	See also

TMetafile is an encapsulation of the Win32 Enhanced metafile.

Unit

Graphics

Description

TMetafile contains a metafile graphic (EMF file format).

Properties of TMetafile indicate the size and characteristics of the metafile.

To draw a metafile on a canvas, call the Draw or StretchDraw methods of a TCanvas object, passing a TMetafile as a parameter. The Enhanced property determines how the metafile will be stored on disk. If Enhanced is True, the metafile is stored as an .EMF (Win32 Enhanced Metafile) file. If Enhanced is False, the metafile is stored as a .WMF (Windows 3.1 Metafile, with Aldus header).


 VCL Reference

TMetafile properties

TMetafile	Alphabetically	Legend

In TMetafile

CreatedBy

Description

Empty

Enhanced

Handle

Height

Inch

MMHeight

MMWidth

Palette

Transparent

Width

Derived from TGraphic

Modified

PaletteModified


 VCL Reference

TMetafile properties

TMetafile	By object	Legend

CreatedBy

Description

Empty

Enhanced

Handle

Height

Inch

MMHeight

MMWidth

Modified

Palette

PaletteModified

Transparent

Width


TMetafile.CreatedBy
 VCL Reference

TMetafile.CreatedBy

TMetafile	See also

Specifies the name of the author or application used to create the metafile.

property CreatedBy: string;

Description

Use CreatedBy to set the string to an optional name of the author or application used to create the metafile. To set the CreatedBy string of a new metafile, call the CreateWithComment method of TMetafileCanvas.


TMetafile.Description
 VCL Reference

TMetafile.Description

TMetafile	See also

Provides an optional text description that is embedded in the metafile.

property Description: string;

Description

Set the Description string of a new metafile by calling the CreateWithComment method of TMetafileCanvas.


TMetafile.Empty
 VCL Reference

TMetafile.Empty

TMetafile

Specifies whether the metafile object contains a metafile.

property Empty: Boolean;

Description

Empty is True if no metafile has been loaded into the metafile object and False if the metafile object contains a metafile.


TMetafile.Enhanced
 VCL Reference

TMetafile.Enhanced

TMetafile

Determines how the metafile will be stored on disk.

property Enhanced: Boolean;

Description

Use Enhanced to determine how the metafile is stored on disk. If Enhanced is True, the metafile is stored as an .EMF (Win32 Enhanced Metafile). If Enhanced is False, the metafile is stored as a .WMF (Windows 3.1 Metafile, with Aldus header).

The in-memory format is always EMF. WMF has very limited capabilities; storing as WMF will lose information that would be retained by EMF. This property is set to match the metafile type when loaded from a stream or file. If loaded as WMF, then save as WMF.


TMetafile.Handle
 VCL Reference

TMetafile.Handle

TMetafile 	See also

Provides access to the Windows GDI metafile handle, for accessing the GDI metafile object.

property Handle: HMetafile;

Description

Use Handle when calling a Windows API function that requires the handle of a metafile object. Pass the handle from the Handle property of the metafile object to the function.


TMetafile.Height
 VCL Reference

TMetafile.Height

TMetafile	See also

Specifies the vertical size in pixels of the metafile.

property Height: Integer;

Description

Use Height to find or set the vertical height of the metafile.


TMetafile.Inch
 VCL Reference

TMetafile.Inch

TMetafile

Returns the units per inch that are used for the metafile's coordinate mapping.

property Inch: Word;

Description

Use Inch to find the units per inch assumed by a WMF metafile, and to alter scale when writing as WMF, but otherwise this property is obsolete. Enhanced metafiles maintain complete scale information internally. For example, if the metafile was created in a Twips coordinate system (using MM_TWIPS mapping), the value of Inch is 1440.


TMetafile.MMHeight
 VCL Reference

TMetafile.MMHeight

TMetafile	See also

Contains the height of the metafile image in 0.01 millimeter units, the native scale used by enhanced metafiles.

property MMHeight: Integer;

Description

MMHeight is used for a more accurate reading of the vertical size of the graphic. The Height property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with MMHeight.


TMetafile.MMWidth
 VCL Reference

TMetafile.MMWidth

TMetafile	See also

Contains the width of the metafile image in 0.01 millimeter units, the native scale used by enhanced metafiles.

property MMWidth: Integer;

Description

MMWidth is used for a more accurate reading of the horizontal size of the graphic. The Width property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with MMWidth.

The MMWidth property is always in screen device pixel units.


TMetafile.Palette
 VCL Reference

TMetafile.Palette

TMetafile

Controls a metafile's color mapping.

property Palette: HPalette;

Description

Use Palette to assign custom palettes created with the Windows API CreatePalette function to this property.

The Palette of a metafile contains up to 256 colors that can be used to display the metafile on screen. When running in a 256-color video mode, and if the metafile is drawn by an application running in the foreground, all colors of Palette are added to the Windows system palette. If the metafile is drawn by an application running in the background and another application has loaded the system palette with its own colors, the metafile's colors are mapped to the system palette. Palette=0 if the metafile has no palette.


TMetafile.Transparent
 VCL Reference

TMetafile.Transparent

TMetafile

Indicates whether the image covers its rectangular area.

property Transparent: Boolean;

Description

Transparent specifies whether that the metafile be drawn transparently. TMetafile overrides the write method of the Transparent property to essentially make the property read-only, so setting the property for this object does not change their behavior.


TMetafile.Width
 VCL Reference

TMetafile.Width

TMetafile	See also

Specifies the horizontal size in pixels of the metafile.

property Width: Integer;

Description

Use Width to find the horizontal size in pixels of the metafile.


 VCL Reference

TMetafile events

TMetafile	Alphabetically	Legend

Derived from TGraphic

OnChange

OnProgress


 VCL Reference

TMetafile events

TMetafile	By object	Legend

OnChange

OnProgress


 VCL Reference

TMetafile methods

TMetafile	Alphabetically	Legend

In TMetafile

Assign

Clear

Create

Destroy

HandleAllocated

LoadFromClipboardFormat

LoadFromStream

ReleaseHandle

SaveToClipboardFormat

SaveToFile

SaveToStream

Derived from TGraphic

LoadFromFile

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMetafile methods

TMetafile	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

LoadFromStream

MethodAddress

MethodName

NewInstance

QueryInterface

ReleaseHandle

SafeCallException

SaveToClipboardFormat

SaveToFile

SaveToStream


TMetafile.Assign
 VCL Reference

TMetafile.Assign

TMetafile	See also

Copies an object to the metafile.

procedure Assign(Source: TPersistent);

Description

Assign copies the Enhanced and Palette properties of an object to the metafile. If the metafile is nil, Assign creates one. Otherwise, Assign calls the inherited method. For assignment, metafiles are polymorphic with other TGraphic objects, and with TPicture.


TMetafile.Clear
 VCL Reference

TMetafile.Clear

TMetafile	See also

Deletes the metafile image.

procedure Clear;

Description

Use Clear to release the old metafile image, create a new image, and increment a reference count on it.


TMetafile.Create
 VCL Reference

TMetafile.Create

TMetafile	See also	Example

Instantiates a metafile object.

constructor Create; override;

Description

Call Create to instantiate a metafile at runtime.

Create allocates memory for a metafile object, and calls the inherited Create. Then sets the Enhanced and Transparent properties to True.

To create a metafile image from scratch, draw the image in a metafile canvas.  When the metafile canvas is destroyed, it transfers the image into the metafile object provided to the metafile canvas constructor. After the image is drawn on the canvas and the canvas is destroyed, the image is 'playable' in the metafile object.


TMetafile.Destroy
 VCL Reference

TMetafile.Destroy

TMetafile	See also

Destroys an instance of a metafile object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, an application should call Free. Free verifies that the TMetafile reference is not nil before it calls Destroy.

Destroy releases the image, which frees the image and the handle when the reference count on the metafile image is zero. Then Destroy calls the inherited Destroy.


TMetafile.HandleAllocated
 VCL Reference

TMetafile.HandleAllocated

TMetafile	See also

Indicates whether the TMetafile object has acquired a handle to the underlying GDI object.

function HandleAllocated: Boolean;

Description

Use HandleAllocated to determine whether the Handle property is set to an HMETAFILE value. HandleAllocated indicates whether the underlying GDI object has already been created. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, it automatically creates a metafile and returns its handle if the underlying GDI object does not already exist.


TMetafile.LoadFromClipboardFormat
 VCL Reference

TMetafile.LoadFromClipboardFormat

TMetafile	See also

Loads a metafile from the Clipboard.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE); override;

Description

LoadFromClipboardFormat replaces the current image with the data in the clipboard. LoadFromClipboardFormat ignores the AData and APalette parameters.


TMetafile.LoadFromStream
 VCL Reference

TMetafile.LoadFromStream

TMetafile	See also

Loads the metafile from a stream.

procedure LoadFromStream(Stream: TStream); override;

Description

Use LoadFromStream by specifying the stream from which the metafile is loaded as the value of Stream. LoadFromStream reads a metafile from a stream and replaces the current image with it.


TMetafile.ReleaseHandle
 VCL Reference

TMetafile.ReleaseHandle

TMetafile	See also

Releases the Windows GDI object represented by the metafile.

function ReleaseHandle: HENHMETAFILE;

Description

Call ReleaseHandle to release the resources used to represent the metafile. ReleaseHandle sets the Handle property to nil.

Call ReleaseHandle before setting the Handle property, so that the resources associated with the metafile are not lost.


TMetafile.SaveToClipboardFormat
 VCL Reference

TMetafile.SaveToClipboardFormat

TMetafile	See also

Saves a metafile to a Clipboard format.

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE); override;

Description

Use SaveToClipboardFormat to copy the metafile to a Clipboard format. The resulting values can then be copied to the Windows clipboard using the clipboard’s SetAsHandle method.

The metafile’s palette is returned in the APalette parameter, the format in the AFormat parameter, and a handle to the data in the AData parameter. Before the metafile can be saved, an application must have registered the format with the metafile object using the RegisterClipboardFormat method.

To save a metafile to a file, call SaveToFile.


TMetafile.SaveToFile
 VCL Reference

TMetafile.SaveToFile

TMetafile	See also

Writes the metafile to disk.

procedure SaveToFile(const Filename: String); override;

Description

Use SaveToFile to save the metafile to a file provided by the Filename parameter. To load a metafile from a file, call the LoadFromFile method.


TMetafile.SaveToStream
 VCL Reference

TMetafile.SaveToStream

TMetafile	See also

Writes the metafile to a stream.

procedure SaveToStream(Stream: TStream); override;

Description

Use SaveToStream to save the metafile to the stream specified by the value of the Stream parameter.


Hierarchy

TObject

TPersistent

TGraphic

TMetafile


TMonitor
 VCL Reference

TMonitor

Hierarchy	Properties	Methods	See also

TMonitor represents a monitor on which an application runs.

Unit

Forms

Description

TMonitor represents a monitor that displays the user interface of an application. It introduces properties to describe the dimensions of a single monitor. In addition, the Primary property distinguishes the primary property from other monitors on the system.

When writing multi-monitor applications, use TMonitor to help lay out forms and dialogs so that they are not split over several monitors.

Applications do not create instances of TMonitor. Instead, monitor components for all available monitors are listed by the Monitors property of the global Screen variable. The global Screen variable also provides global information about the monitors on which the application runs, such as screen resolution, available fonts, and so on.


 VCL Reference

TMonitor properties

TMonitor	Alphabetically	Legend

In TMonitor

BoundsRect

Handle

Height

Left

MonitorNum

Primary

Top

Width

WorkareaRect


 VCL Reference

TMonitor properties

TMonitor	By object	Legend

BoundsRect

Handle

Height

Left

MonitorNum

Primary

Top

Width

WorkareaRect


TMonitor.BoundsRect
 VCL Reference

TMonitor.BoundsRect

TMonitor	See also

Indicates the dimensions of the monitor in pixels.

property BoundsRect: TRect;

Description

Read BoundsRect to learn the dimensions of the monitor. BoundsRect gives the dimensions of the monitor in pixels, where (0,0) represents the top-left corner of the primary monitor.

The top of BoundsRect is given by the Top property, the left edge by the Left property, and the height and width by the Height and Width properties respectively.

Note:	The BoundsRect property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.


TMonitor.Handle
 VCL Reference

TMonitor.Handle

TMonitor	See also

Indicates the Windows handle for the monitor.

type

  HMONITOR = type Integer;

property Handle: HMONITOR;

Description

Read Monitor to obtain a Windows handle for the monitor represented by this TMonitor component. Use this handle for Windows API calls such as GetMonitorInfo.


TMonitor.Height
 VCL Reference

TMonitor.Height

TMonitor	See also

Indicates the vertical size of the monitor in pixels.

property Height: Integer;

Description

Read Height to learn the size of the monitor in pixels. Use this value along with the Top property to calculate how to position objects vertically in multi-monitor applications.

Note:	The Height property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.


TMonitor.Left
 VCL Reference

TMonitor.Left

TMonitor	See also

Indicates the logical position of the left edge of the monitor.

property Left: Integer;

Description

In multi-monitor applications, the available screen space can span multiple monitors from left to right. Read Left to determine where, in the entire available screen space, this monitor appears. The value of Left is in pixels relative to the left edge of the primary monitor.


TMonitor.MonitorNum
 VCL Reference

TMonitor.MonitorNum

TMonitor	See also

Specifies the index of the monitor in the global screen object’s Monitors list.

property MonitorNum: Integer;

Description

The global screen variable maintains a list of all monitors in a multi-monitor application. MonitorNum is the index of this monitor in the list object that is the screen’s Monitors property.

Use MonitorNum to identify a specific monitor when working with multiple monitors.


TMonitor.Primary
 VCL Reference

TMonitor.Primary

TMonitor	See also

Indicates whether this is the primary monitor.

property Primary: Boolean;

Description

Read Primary to determine whether a monitor is the primary monitor in a multi-monitor application. When Primary is True, the monitor is the primary monitor. The coordinates of other monitors are given in terms of the primary monitor.


TMonitor.Top
 VCL Reference

TMonitor.Top

TMonitor	See also

Indicates the logical position of the top edge of the monitor.

property Top: Integer;

Description

In multi-monitor applications, the available screen space can span multiple monitors from top to bottom. Read Top to determine where, in the entire available screen space, this monitor appears. The value of Top is in pixels relative to the top edge of the primary monitor.


TMonitor.Width
 VCL Reference

TMonitor.Width

TMonitor	See also

Indicates the horizontal size of the monitor in pixels.

property Width: Integer;

Description

Read Width to learn the size of the monitor in pixels. Use this value along with the Left property to calculate vertical positions for objects in multi-monitor applications.

Note:	The Width property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the WorkareaRect property.


TMonitor.WorkareaRect
 VCL Reference

TMonitor.WorkareaRect

TMonitor	See also

Indicates the dimensions of the usable area on the monitor.

property WorkareaRect: TRect;

Description

Read WorkareaRect to learn the dimensions of the monitor, minus any space taken by task bars or tool bars. WorkareaRect gives the dimensions of the work area in pixels, where (0,0) represents the top-left corner of the primary monitor.


 VCL Reference

TMonitor methods

TMonitor	Alphabetically	Legend

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMonitor methods

TMonitor	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

TMonitor


TMonthCalendar
 VCL Reference

 TMonthCalendar

Hierarchy	Properties	Methods	Events

TMonthCalendar is stand-alone calendar in which a user can select a date or range of dates.

Unit

ComCtrls

Description

Use TMonthCalendar to allow a user to specify a date or range of dates using a standard calendar user interface.

TMonthCalendar displays dates according to the system locale (ignoring the BiDiMode setting).


 VCL Reference

TMonthCalendar properties

TMonthCalendar	Alphabetically	Legend

Derived from TCommonCalendar

CalColors

Date

EndDate

FirstDayOfWeek

MaxDate

MaxSelectRange

MinDate

MultiSelect

ShowToday

ShowTodayCircle

WeekNumbers

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TMonthCalendar properties

TMonthCalendar	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoSize

BiDiMode

BorderWidth

BoundsRect

Brush

CalColors

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

Date

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

EndDate

FirstDayOfWeek

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ImeMode

ImeName

Left

LRDockWidth

MaxDate

MaxSelectRange

MinDate

MultiSelect

Name

Owner

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

ShowToday

ShowTodayCircle

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WeekNumbers

Width

WindowProc


 VCL Reference

TMonthCalendar events

TMonthCalendar	Alphabetically	Legend

Derived from TCommonCalendar

OnGetMonthInfo

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TMonthCalendar events

TMonthCalendar	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetMonthInfo

OnKeyDown

OnKeyPress

OnKeyUp

OnStartDock

OnStartDrag


 VCL Reference

TMonthCalendar methods

TMonthCalendar	Alphabetically	Legend

In TMonthCalendar

CanAutoSize

ConstrainedResize

Create

CreateParams

GetCalendarHandle

MsgSetCalColors

MsgSetDateTime

MsgSetRange

Derived from TCommonCalendar

BoldDays

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TMonthCalendar methods

TMonthCalendar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BoldDays

BringToFront

Broadcast

CanAutoSize

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ConstrainedResize

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetCalendarHandle

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MsgSetCalColors

MsgSetDateTime

MsgSetRange

NewInstance

PaintTo

ParentToClient

Perform

Realign

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TMonthCalendar.CanAutoSize
 VCL Reference

TMonthCalendar.CanAutoSize

TMonthCalendar	See also

Specifies whether the control can size itself automatically to display a full month.

function CanAutoSize(var NewWidth, NewHeight: Integer): Boolean; override;

Description

CanAutoSize is called automatically when the AutoSize property is True and an attempt is made to resize the calendar. It implements the AutoSize property by ensuring that NewWidth and NewHeight represent the width and height required to display a full month.

If the values of NewWidth and NewHeight are adjusted to reflect the size needed to display a month, CanAutoSize returns True. Otherwise, it returns False, aborting the resize attempt.


TMonthCalendar.ConstrainedResize
 VCL Reference

TMonthCalendar.ConstrainedResize

TMonthCalendar	See also

Overrides the inherited ConstrainedResize method.

procedure ConstrainedResize(var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer); override;

Description

Assures that the size constraints allow a full month to be displayed in the calendar. Then calls the inherited ConstrainedResize method.

The MinWidth, MinHeight, MaxWidth, and MaxHeight parameters are passed to an OnConstrainedResize event handler, where they can be altered before they are applied to the attempted resize.


TMonthCalendar.Create
 VCL Reference

TMonthCalendar.Create

TMonthCalendar	See also

Creates and initializes an instance of TMonthCalendar.

constructor Create(AOwner: TComponent); override;

Description

Create performs the following tasks:

Sets CalExceptionClass to EMonthCalError.

Sets Width to 176.

Sets Height to 153.

The AOwner parameter assigns an Owner, which is responsible for freeing the calendar’s memory.


TMonthCalendar.CreateParams
 VCL Reference

TMonthCalendar.CreateParams

TMonthCalendar	See also

Overrides the inherited CreateParams method.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams incorporates the TMonthCalendar window styles and then calls the inherited CreateParams method.


TMonthCalendar.Destroy
 VCL Reference

TMonthCalendar.Destroy

TMonthCalendar	See also

Destroys the TMonthCalendar instance.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free. Free verifies that the TMonthCalendar reference is not nil, and only then calls Destroy.

Destroy frees the memory used to store the TMonthCalendar instance.


TMonthCalendar.GetCalendarHandle
 VCL Reference

TMonthCalendar.GetCalendarHandle

TMonthCalendar

Returns the calendar control’s window handle.

function GetCalendarHandle: HWND; override;

Description

Use GetCalendarHandle to get the calendar control’s window handle, which can be used for direct Windows API calls.


TMonthCalendar.MsgSetCalColors
 VCL Reference

TMonthCalendar.MsgSetCalColors

TMonthCalendar	See also

Sets the calendar’s colors.

function MsgSetCalColors(ColorIndex: Integer; ColorValue: TColor): Boolean; override;

Description

MsgSetCalColors is used to implement the CalColors property. This protected method sets the calendar’s colors using the Windows API call MonthCal_SetColor function.

ColorIndex indicates the area in the calendar for which a new color is specified. It is one of the following values:

Value	CalColors subproperty	Area

0	BackColor	Background (displayed between months).

1	TextColor	Dates in the current month and text labels.

2	TitleBackColor	Background of the title bar.

3	TitleTextColor	Text label in the title bar.

4	MonthBackColor	Background of the calendar (each month).

5	TrailingTextColor	Dates on non-current month.

ColorValue is the new color.

MsgSetCalColors returns True if the colors are successfully applied, False otherwise.


TMonthCalendar.MsgSetDateTime
 VCL Reference

TMonthCalendar.MsgSetDateTime

TMonthCalendar	See also

Sets the calendar’s current date.

function MsgSetDateTime(Value: TSystemTime): Boolean; override;

Description

MsgSetCalColors is used to implement the Date property. This protected method sets the calendar’s current date using the Windows API call MonthCal_SetCurSel function.

Value is the date and time to set, expressed as a TSystemTime value.

MsgSetDateTime returns True if the date is set successfully, False otherwise.


TMonthCalendar.MsgSetRange
 VCL Reference

TMonthCalendar.MsgSetRange

TMonthCalendar	See also

Selects a range of dates.

function MsgSetRange(Flags: Integer; SysTime: PSystemTime): Boolean; override;

Description

MsgSetCalColors is used to implement the range specified by the Date and MaxDate properties. This protected method sets the selected dates using the Windows API call MonthCal_SetRange function.

The Flags parameter indicates what type of information is included in the SysTime array. It includes the GDTR_MIN flag if a minimum date is supplied and GDTR_MAX if a maximum date is supplied.

The SysTime parameter is a two-element array containing the minimum date as the first element and the maximum date as the second element. These values can be obtained from the MinDate and MaxDate properties by calling DateTimeToSystemTime.

MsgSetRange returns True if the range is set successfully, False otherwise.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCommonCalendar

TMonthCalendar


TMonthCalColors
 VCL Reference

TMonthCalColors

Hierarchy	Properties	Methods	See also

TMonthCalColors defines a color scheme for TDateTimePicker or TMonthCalenar’s drop-down calendar.

Unit

ComCtrls

Description

The CalColors property of TDateTimePicker or TMonthCalendar holds a TMonthCalColors object. TMonthCalColors determines the colors of a calendar display.


 VCL Reference

TMonthCalColors properties

TMonthCalColors	Alphabetically	Legend

In TMonthCalColors

BackColor

MonthBackColor

TextColor

TitleBackColor

TitleTextColor

TrailingTextColor


 VCL Reference

TMonthCalColors properties

TMonthCalColors	By object	Legend

BackColor

MonthBackColor

TextColor

TitleBackColor

TitleTextColor

TrailingTextColor


TMonthCalColors.BackColor
 VCL Reference

TMonthCalColors.BackColor

TMonthCalColors	See also

The background color displayed between months in the calendar.

property BackColor: TColor;

Description

BackColor may not be implemented in some Windows versions.


TMonthCalColors.MonthBackColor
 VCL Reference

TMonthCalColors.MonthBackColor

TMonthCalColors	See also

The background color of the calendar.

property MonthBackColor: TColor;

Description

MonthBackColor determines the background color of the main section of the calendar, where the dates are displayed.


TMonthCalColors.TextColor
 VCL Reference

TMonthCalColors.TextColor

TMonthCalColors	See also

The color of the font used for dates that fall within the displayed month.

property TextColor: TColor;

Description

TextColor determines the color of the numerals for dates that fall within the displayed month. To set the color of dates in the last week of the preceding month and the first week of the the next month, use TrailingTextColor.


TMonthCalColors.TitleBackColor
 VCL Reference

TMonthCalColors.TitleBackColor

TMonthCalColors	See also

The background color of the calendar’s title bar.

property TitleBackColor: TColor;

Description

TitleBackColor determines the color of the title bar (above the main section of the calendar), where the month and year are displayed.


TMonthCalColors.TitleTextColor
 VCL Reference

TMonthCalColors.TitleTextColor

TMonthCalColors	See also

The color of the font used for the calendar’s title bar.

property TitleTextColor: TColor;

Description

TitleTextColor determines the color in which the month and year are displayed on the calendar’s title bar.


TMonthCalColors.TrailingTextColor
 VCL Reference

TMonthCalColors.TrailingTextColor

TMonthCalColors	See also

The color of the font used for dates not in the currently displayed month.

property TrailingTextColor: TColor;

Description

TrailingTextColor determines the color of the numerals for dates that fall in the last week of the preceding month or the first week of the next month.


 VCL Reference

TMonthCalColors methods

TMonthCalColors	Alphabetically	Legend

In TMonthCalColors

Assign

Create

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMonthCalColors methods

TMonthCalColors	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TMonthCalColors.Assign
 VCL Reference

TMonthCalColors.Assign

TMonthCalColors	See also

Copies the properties from another TMonthCalColors instance.

procedure Assign(Source: TPersistent); override;

Description

Call the Assign method to duplicate the contents of another TMonthCalColors in a new object. If the source parameter is not a TMonthCalColors instance (or nil), Assign raises an EConvertError exception.


TMonthCalColors.Create
 VCL Reference

TMonthCalColors.Create

TMonthCalColors

Creates and initializes a TMonthCalColors instance.

constructor Create(AOwner: TCommonCalendar);

Description

Applications do not need to instantiate TMonthCalColors. This object is created by the calendar display control that uses it. That calendar display control is passed as the AOwner parameter.


Hierarchy

TObject

TPersistent

TMonthCalColors


TMouse
 VCL Reference

TMouse

Hierarchy	Properties	Methods	See also

TMouse surfaces information about the mouse and specifies how the application responds to mouse messages.

Unit

Controls

Description

Use the global Mouse variable, which is a TMouse object, to get information about the mouse.

TControl descendants surface several events that let you respond to actions users make with the mouse. Typically, the event handlers for these events provide most of the information about the mouse that you need and you do not need to use the global Mouse variable. Instead, use the Mouse variable to obtain similar information outside of a mouse-related event or to specify more global aspects of how your application responds to mouse messages, such as how much the user must move the mouse to start a drag operation.


 VCL Reference

TMouse Properties

TMouse	Alphabetically	Legend

In TMouse

Capture

CursorPos

DragImmediate

DragThreshold

IsDragging

MousePresent

RegWheelMessage

WheelPresent

WheelScrollLines


 VCL Reference

TMouse Properties

TMouse	By Object	Legend

Capture

CursorPos

DragImmediate

DragThreshold

IsDragging

MousePresent

RegWheelMessage

WheelPresent

WheelScrollLines


TMouse.Capture
 VCL Reference

TMouse.Capture

TMouse	See also

Specifies the handle of the window  that is capturing mouse events.

property Capture: HWND;

Description

Read Capture to get the handle of the window that receives all mouse messages. This is the window that is currently responding to the user’s mouse actions.

Set Capture to the Handle property of a control to let it “capture” the mouse. When a window captures the mouse, it receives all mouse messages until it releases the mouse.

Typically, applications do not need to explicitly set the Capture property. Individual controls automatically capture the mouse in response to mouse clicks. They then translate incoming mouse message into events such as OnMouseDown or OnMouseMove. You only need to set Capture to override this default behavior. For example, when writing an object that creates a child control in response to a mouse click, you might set Capture to the child control’s Handle property so that it receives subsequent mouse messages until the mouse button is released.


TMouse.CursorPos
 VCL Reference

TMouse.CursorPos

TMouse

Specifies the position of the mouse cursor.

property CursorPos: TPoint;

Description

Use CursorPos to get the position of the mouse cursor in global coordinates. Use this position to position UI elements in relation to the mouse. For example, the position of popup menus or the display of the drag rectangle during drag-and-dock operations is based on the value of CursorPos.


TMouse.DragImmediate
 VCL Reference

TMouse.DragImmediate

TMouse	See also

Specifies whether clicking the left mouse button starts a drag event immediately.

property DragImmediate: Boolean;

Description

Use DragImmediate to determine whether clicking the left mouse button starts a drag event immediately. If DragImmediate is False, then drag events are delayed until the mouse cursor is moved the number of pixels specified in the DragThreshold property.


TMouse.DragThreshold
 VCL Reference

TMouse.DragThreshold

TMouse	See also

Specifies the number of pixels that the left mouse button must be moved in order to cause a drag operation.

property DragThreshold: Integer;

Description

Use DragThreshold to specify the number of pixels that the mouse cursor must be moved with the left mouse button down in order to initiate a drag operation. DragThreshold only has an effect if the DragImmediate property is False.

Note:	DragThreshold must be greater than or equal to zero. Negative values are treated as 0.


TMouse.IsDragging
 VCL Reference

TMouse.IsDragging

TMouse

Is there an active dragging operation?

property IsDragging: Boolean;

Description

Use IsDragging to determine whether a dragging operation is in progress.


TMouse.MousePresent
 VCL Reference

TMouse.MousePresent

TMouse	See also

Specifies whether a mouse is present on the system.

property MousePresent: Boolean;

Description

Use MousePresent to determine whether a mouse is present on the system.


TMouse.RegWheelMessage
 VCL Reference

TMouse.RegWheelMessage

TMouse	See also

Indicates the windows message that is sent when the user scrolls the mouse wheel.

type UINT = LongWord;

property RegWheelMessage: UINT;

Description

Use RegWheelMessage to get the windows message that is sent when the user scrolls the mouse wheel. Typically, applications do not need to use RegWheelMessage. TWinControl checks for this value when it receives window messages, and translates it into appropriate Mouse Wheel events.

RegWheelMessage is used in Windows 95, but not NT or later versions of Windows. (Mouse support is built into the later operating systems.)


TMouse.WheelPresent
 VCL Reference

TMouse.WheelPresent

TMouse	See also

Specifies whether the mouse has a wheel.

property WheelPresent: Boolean;

Description

Use WheelPresent to determine whether the mouse has a wheel.


TMouse.WheelScrollLines
 VCL Reference

TMouse.WheelScrollLines

TMouse	See also

Specifies the number of lines that are scrolled for each notch that the mouse wheel is rotated.

property WheelScrollLines: Integer;

Description

Use WheelScrollLines to get the number of lines that are scrolled for each notch that the mouse wheel is rotated.

WheelScrollLines can be set under Mouse in the Windows Control Panel.


 VCL Reference

TMouse methods

TMouse	Alphabetically	Legend

In TMouse

Create

Destroy

SettingChanged

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMouse methods

TMouse	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

SettingChanged


TMouse.Create
 VCL Reference

TMouse.Create

TMouse

Creates and initializes a TMouse object.

constructor Create;

Description

Do not create instances of TMouse. A single instance of TMouse is available as the global Mouse variable.

Create initializes DragImmediate to True and DragThreshold to 5.


TMouse.Destroy
 VCL Reference

TMouse.Destroy

TMouse

Destroys an instance of TMouse.

destructor Destroy; override;

Description

Do not destroy the global instance of TMouse. This object is automatically destroyed when the application shuts down.

Destroy sets Capture to 0, ensuring that no object has the mouse captured when the application shuts down.


TMouse.SettingChanged
 VCL Reference

TMouse.SettingChanged

TMouse

Responds when a Mouse setting is changed.

procedure SettingChanged(Setting: Integer);

Description

SettingChanged is called automatically when the application receives notification from Windows that the control panel settings have changed. It updates the Mouse object to reflect the current control panel settings.

Applications should not need to call this method.


Hierarchy

TObject

TMouse


TMultiReadExclusiveWriteSynchronizer
 VCL Reference

TMultiReadExclusiveWriteSynchronizer

Hierarchy	Properties	Methods	Using TMultiReadExclusiveWriteSynchronizer	See also

TMultiReadExclusiveWriteSynchronizer protects memory in a multi-threaded application.

Unit

SysUtils

Description

Use TMultiReadExclusiveWriteSynchronizer to guard access to memory in a multi-threaded application. Unlike a critical section, which blocks all other threads from reading or writing its associated memory, TMultiReadExclusiveWriteSynchronizer allows multiple threads to read from the protected memory simultaneously, while ensuring that any thread writing to the memory has exclusive access.

In applications where threads read from an object or variable frequently and only write to it occasionally, using the multi-read exclusive-write synchronizer instead of a critical section can result in considerable performance improvement.

All access to the protected memory must be bracketed by calls to the BeginRead and EndRead or BeginWrite and EndWrite methods. Any thread that reads from or writes to this memory without using these calls can introduce thread conflicts.


 VCL Reference

TMultiReadExclusiveWriteSynchronizer Properties

TMultiReadExclusiveWriteSynchronizer	Alphabetically	Legend

In TMultiReadExclusiveWriteSynchronizer

RevisionLevel

Derived from TInterfacedObject

RefCount


 VCL Reference

TMultiReadExclusiveWriteSynchronizer Properties

TMultiReadExclusiveWriteSynchronizer	By Object	Legend

RefCount

RevisionLevel


TMultiReadExclusiveWriteSynchronizer.RevisionLevel
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.RevisionLevel

TMultiReadExclusiveWriteSynchronizer

Returns revision level of protected memory.

property RevisionLevel: Cardinal;

Description

RevisionLevel changes each time a write lock is granted.  This property should be used for identity comparisons only, not for determining revision sequence.


 VCL Reference

TMultiReadExclusiveWriteSynchronizer methods

TMultiReadExclusiveWriteSynchronizer	Alphabetically	Legend

In TMultiReadExclusiveWriteSynchronizer

BeginRead

BeginWrite

Create

Destroy

EndRead

EndWrite

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMultiReadExclusiveWriteSynchronizer methods

TMultiReadExclusiveWriteSynchronizer	By object	Legend

AfterConstruction

BeforeDestruction

BeginRead

BeginWrite

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

EndRead

EndWrite

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TMultiReadExclusiveWriteSynchronizer.BeginRead
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.BeginRead

TMultiReadExclusiveWriteSynchronizer	See also

Allows a thread to read from the protected memory when it is safe to do so.

procedure BeginRead;

Description

Call BeginRead before reading from the memory protected by the multi-read exclusive-write synchronizer. BeginRead does not return until there are no other threads writing to the memory. After calling BeginRead, other threads can be granted read access to the protected memory by the BeginRead method. However, any thread asking for write permission by calling BeginWrite must wait until all reading threads have called EndRead.


TMultiReadExclusiveWriteSynchronizer.BeginWrite
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.BeginWrite

TMultiReadExclusiveWriteSynchronizer 	See also

Allows a thread to write to the protected memory when it is safe to do so.

function BeginWrite: Boolean;

Description

BeginWrite obtains an exclusive write lock on the memory protected by the synchronizer object. Call BeginWrite before writing to this memory. BeginWrite does not return until no other threads are reading from or writing to the memory. After a thread calls BeginWrite, any other thread asking to access that memory by calling BeginRead or BeginWrite must wait until the writing thread calls EndWrite.

Note that a write lock operation is not atomic. Data in protected memory will always be in a consistent state when BeginWrite returns, but is not necessarily in the same state as when BeginWrite was called. As a rule, a thread should always discard previous samples from protected memory after promoting a read lock to a write lock. However, the calling thread can determine whether a state change has occurred by examining return value of BeginWrite: True if protected memory has not be written to by another thread, False if another thread may have modified protected memory.


TMultiReadExclusiveWriteSynchronizer.Create
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.Create

TMultiReadExclusiveWriteSynchronizer

Creates and initializes an instance of TMultiReadExclusiveWriteSynchronizer.

constructor Create;

Description

Call Create to instantiate TMultiReadExclusiveWriteSynchronizer. The synchronizer must be created in the same thread as the memory it protects, so that it is accessible to all threads that need to access that memory.


TMultiReadExclusiveWriteSynchronizer.Destroy
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.Destroy

TMultiReadExclusiveWriteSynchronizer 	See also

Destroys an instance of TMultiReadExclusiveWriteSynchronizer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMultiReadExclusiveWriteSynchronizer reference is not nil, and only then calls Destroy.


TMultiReadExclusiveWriteSynchronizer.EndRead
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.EndRead

TMultiReadExclusiveWriteSynchronizer	See also

Removes a thread from the internal list of threads that are accessing the protected memory.

procedure EndRead;

Description

Call EndRead after reading from the memory protected by the multi-read exclusive-write synchronizer. Each call to BeginRead must be matched by a call to EndRead, or other threads can never return from the BeginWrite method.


TMultiReadExclusiveWriteSynchronizer.EndWrite
 VCL Reference

TMultiReadExclusiveWriteSynchronizer.EndWrite

TMultiReadExclusiveWriteSynchronizer 	See also

Allows other threads to access the associated memory.

procedure EndWrite;

Description

Call EndWrite after writing to the memory that is protected by the multi-read exclusive-write synchronizer. Each call to BeginWrite must be matched by a call to EndWrite, or other threads can never return from the BeginRead or BeginWrite methods.


Hierarchy

TObject

TMultiReadExclusiveWriteSynchronizer


TMetafileCanvas
 VCL Reference

TMetafileCanvas

Hierarchy	Properties	Methods	Events	See also

TMetafileCanvas allows applications to create metafile images from scratch.

Unit

Graphics

Description

Use TMetafileCanvas as a surface on which to draw a metafile image. When the canvas is destroyed, it transfers the image into the metafile object provided to the canvas constructor. After the image is drawn on the canvas and the canvas is destroyed, the image is 'playable' in the metafile object.


 VCL Reference

TMetafileCanvas properties

TMetafileCanvas	Alphabetically	Legend

Derived from TCanvas

Brush

CanvasOrientation

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


 VCL Reference

TMetafileCanvas properties

TMetafileCanvas	By object	Legend

Brush

CanvasOrientation

ClipRect

CopyMode

Font

Handle

LockCount

Pen

PenPos

Pixels

TextFlags


 VCL Reference

TMetafileCanvas events

TMetafileCanvas	Alphabetically	Legend

Derived from TCanvas

OnChange

OnChanging


 VCL Reference

TMetafileCanvas events

TMetafileCanvas	By object	Legend

OnChange

OnChanging


 VCL Reference

TMetafileCanvas methods

TMetafileCanvas	Alphabetically	Legend

In TMetafileCanvas

Create

CreateWithComment

Destroy

Derived from TCanvas

Arc

BrushCopy

Chord

CopyRect

Draw

DrawFocusRect

Ellipse

FillRect

FloodFill

FrameRect

HandleAllocated

LineTo

Lock

MoveTo

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMetafileCanvas methods

TMetafileCanvas	By object	Legend

AfterConstruction

Arc

Assign

BeforeDestruction

BrushCopy

Chord

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyRect

Create

CreateWithComment

DefaultHandler

Destroy

Dispatch

Draw

DrawFocusRect

Ellipse

FieldAddress

FillRect

FloodFill

FrameRect

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

LineTo

Lock

MethodAddress

MethodName

MoveTo

NewInstance

Pie

PolyBezier

PolyBezierTo

Polygon

Polyline

Rectangle

Refresh

RoundRect

SafeCallException

StretchDraw

TextExtent

TextHeight

TextOut

TextRect

TextWidth

TryLock

Unlock


TMetafileCanvas.Create
 VCL Reference

TMetafileCanvas.Create

TMetafileCanvas	See also	Example

Creates an instance of TMetafileCanvas and acquires a handle to a metafile device context.

constructor Create(AMetafile: TMetafile; ReferenceDevice: HDC);

Description

Call Create to create an instantiate a TMetafileCanvas object. Pass in the associated metafile whose image is about to be drawn as the AMetafile parameter. Pass in a handle to a device context on which to base the metafile’s device context as the ReferenceDevice parameter. In most cases, this is the device context for a window on which the image is normally drawn.

Create sets the size of the TMetafile object from ReferenceDevice if it does not already have the MMHeight and MMWidth properties set. Create then creates a metafile device context, and sets the Handle property to its handle. All subsequent drawing methods will draw to the metafile device context.

When the TMetafileCanvas is destroyed, The CreatedBy and Description strings will be used to set the properties of the same name in the TMetafile object.


TMetafileCanvas.CreateWithComment
 VCL Reference

TMetafileCanvas.CreateWithComment

TMetafileCanvas	See also

Creates an instance of TMetafileCanvas and acquires a handle to a metafile device context with a comment string.

constructor CreateWithComment(AMetafile: TMetafile; ReferenceDevice: HDC; const CreatedBy, Description: String);

Description

Call CreateWithComment to create an instantiate a TMetafileCanvas object for a metafile that will receive the CreatedBy and Description strings. CreateWithComment sets the size of the TMetafile object from the ReferenceDevice if it does not already have the MMHeight and MMWidth properties set. Create then creates a metafile device context using the CreatedBy and Description strings as a description, and sets the Handle property to its handle. All subsequent drawing methods will draw to the metafile device context.

When the TMetafileCanvas is destroyed, the CreatedBy and Description strings are used to set the properties of the same name in the TMetafile object.


TMetafileCanvas.Destroy
 VCL Reference

TMetafileCanvas.Destroy

TMetafileCanvas	See also

Destroys an instance of the TMetafileCanvas after transferring the image to the TMetaFile object that was passed to the constructor.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMetafileCanvas reference is not nil, and only then calls Destroy.

Destroy sets the Handle property of the TMetafile object that was passed to the constructor before freeing the memory associated with the object.


Hierarchy

TObject

TPersistent

TCanvas

TMetafileCanvas


TMetafileImage
 VCL Reference

TMetafileImage

Hierarchy	Methods	See also

TMetafileImage is the internal representation of the metafile image for a TMetafile object.

Unit

Graphics

Description

TMetafileImage is used for internal implementation only. It represents the internal image of the metafile encapsulated by the TMetafile object. All of the data and methods introduced in TMetafileImage are private. They contain information about the specific metafile image, including pointers to the standard HENHMETAFILE (enhanced metafile handle) and HPALETTE (handle to palette) structures defined by Windows.


 VCL Reference

TMetafileImage methods

TMetafileImage	Alphabetically	Legend

In TMetafileImage

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TMetafileImage methods

TMetafileImage	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TMetafileImage.Destroy
 VCL Reference

TMetafileImage.Destroy

TMetafileImage	See also

Disposes of the instance of a metafile image.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMetaFileImage reference is not nil before it calls Destroy.

Destroy frees the metafile handle and palette before calling the inherited Destroy.


Hierarchy

TObject

TSharedImage

TMetafileImage


TNotebook
 VCL Reference

TNotebook

Hierarchy	Properties	Methods	Events

TNotebook displays multiple pages, each with its own set of controls.

Unit

ExtCtrls

Description

Notebook components are frequently used with tab set controls (TTabSet) to let the user select pages in the notebook by clicking a tab.  TNotebook is provided for backward compatibility. New applications should use TPageControl instead.


 VCL Reference

TNotebook properties

TNotebook	Alphabetically	Legend

In TNotebook

ActivePage

PageIndex

Pages

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TNotebook properties

TNotebook	By object	Legend

Action

ActivePage

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

PageIndex

Pages

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TNotebook.ActivePage
 VCL Reference

TNotebook.ActivePage

TNotebook	See also

Determines which page displays in the notebook.

property ActivePage: string;

Description

ActivePage determines which page displays in the notebook. The value of ActivePage must be one of the strings contained in the Pages property.

To get or set the active page by index rather than string, use the PageIndex property instead.


TNotebook.PageIndex
 VCL Reference

TNotebook.PageIndex

TNotebook	See also

Determines which page displays in the notebook control.

property PageIndex: Integer;

Description

The value of PageIndex determines which page displays in the notebook. Changing the PageIndex value changes the page in the control.

Each string in the Pages property is automatically assigned a PageIndex value when the page is created. The first page receives a value of 0, the second has a value of 1, and so on. If you delete a string from the Pages property, the PageIndex values are reassigned so that the values always begin with 0 and continue to increase without any gaps between values.

To get or set the current page using its string rather than its index, use the ActivePage property instead.


TNotebook.Pages
 VCL Reference

TNotebook.Pages

TNotebook	See also

Contains the strings that identify the individual pages of the notebook control.

property Pages: TStrings;

Description

The Pages property contains the strings that identify the individual pages of the notebook control. Both these controls create a separate page for each string in the Pages property. For example, if Pages contains three strings, First, Second, and Third, the control has three separate pages.

You can access the various pages in a notebook or tabbed notebook control with either the ActivePage or PageIndex property.


 VCL Reference

TNotebook events

TNotebook	Alphabetically	Legend

In TNotebook

OnPageChanged

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TNotebook events

TNotebook	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnPageChanged

OnStartDock

OnStartDrag


TNotebook.OnPageChanged
 VCL Reference

TNotebook.OnPageChanged

TNotebook

Occurs when the user selects a new page in the notebook.

property OnPageChanged: TNotifyEvent;

Description

Use the OnPageChanged event when you want special processing to occur when the active page changes.


 VCL Reference

TNotebook methods

TNotebook	Alphabetically	Legend

In TNotebook

Create

Destroy

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TNotebook methods

TNotebook	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TNotebook.Destroy
 VCL Reference

TNotebook.Destroy

TNotebook	See also

Destroys the TNotebook component.

Description

Do not call Destroy directly in an application. Instead, use Free, which checks that the TNotebook reference is not nil before calling Destroy.


TNotebook.Create
 VCL Reference

TNotebook.Create

TNotebook

Constructs a TNotebook component.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a notebook at runtime. Notebook components placed in forms at design time are created automatically.

The AOwner parameter specifies the component (usually the form) that is responsible for freeing the notebook.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TNotebook


TObjectBucketList
 VCL Reference

TObjectBucketList

Hierarchy	Properties	Methods	See also

TObjectBucketList is a simple hash table that stores objects that are identified by other objects.

Unit

Contnrs

Description

Use TObjectBucketList as a simple hash table to store objects that are indexed by other objects. TObjectBucketList includes methods to add, remove, and locate items in the list, as well as a method that executes a callback for every item in the list.


 VCL Reference

TObjectBucketList properties

TObjectBucketList	Alphabetically	Legend

Derived from TCustomBucketList

Data


 VCL Reference

TObjectBucketList properties

TObjectBucketList	By object	Legend

Data


TObjectBucketList.Data
 VCL Reference

TObjectBucketList.Data

TObjectBucketList	See also

Represents the data associated with a specified item in the object bucket list.

property Data[AItem: TObject]: TObject; default;

Description

Use Data to get or set the data object associated with an item in the bucket list.

AItem is the identifier of an item currently in the object bucket list. If AItem does not specify an item in one of the buckets of the bucket list, trying to read or set Data causes TObjectBucketList to raise an EListError exception.


 VCL Reference

TObjectBucketList methods

TObjectBucketList	Alphabetically	Legend

In TObjectBucketList

Add

Remove

Derived from TBucketList

Create

Derived from TCustomBucketList

Assign

Clear

Destroy

Exists

Find

ForEach

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TObjectBucketList methods

TObjectBucketList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Destroy

Dispatch

Exists

FieldAddress

Find

ForEach

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Remove

SafeCallException


TObjectBucketList.Add
 VCL Reference

TObjectBucketList.Add

TObjectBucketList	See also

Inserts an item and its associated data into the object bucket list.

function Add(AItem, AData: TObject): TObject;

Description

Call Add to add an item and its associated data into the object bucket list. Add locates the bucket into which the specified item belongs. If the item is already in the bucket, Add raises an EListException exception. Otherwise, it adds the item to the correct bucket and returns AData.


TObjectBucketList.Remove
 VCL Reference

TObjectBucketList.Remove

TObjectBucketList	See also

Removes a specified item from the list and returns its data.

function Remove(AItem: TObject): TObject;

Description

Call Remove to delete a specific item from the list.

AItem is the item to remove.

Remove returns the data associated with AItem. If AItem is not in the object bucket list, Remove returns nil.


Hierarchy

TObject

TCustomBucketList

TBucketList

TObjectBucketList


TObjectList
 VCL Reference

TObjectList

Hierarchy	Properties	Methods	See also

TObjectList maintains a list of (owned) objects.

Unit

Contnrs

Description

Use TObjectList to store and maintain a list of objects. TObjectList provides properties and methods to add, delete, rearrange, locate, access, and sort objects. If the OwnsObjects property is set to True (the default), TObjectList controls the memory of its objects, freeing an object when its index is reassigned; when it is removed from the list with the Delete, Remove, or Clear method; or when the TObjectList instance is itself destroyed.


 VCL Reference

TObjectList properties

TObjectList	Alphabetically	Legend

In TObjectList

Items

OwnsObjects

Derived from TList

Capacity

Count

List


 VCL Reference

TObjectList properties

TObjectList	By object	Legend

Capacity

Count

Items

List

OwnsObjects


TObjectList.Items
 VCL Reference

TObjectList.Items

TObjectList	See also

Lists the object references.

property Items[Index: Integer]: TObject; default;

Description

Use Items to access objects in the list. Items is a zero-based array: The first object is indexed as 0, the second object is indexed as 1, and so forth. You can read or change the value at a specific index, or use Items with the Count property to iterate through the list.

If OwnsObjects is True, reassigning an Items index frees the object that previously occupied that position in the list.

Items can contain nil references. To remove nil references and reduce the size of the array, call the Pack method.


TObjectList.OwnsObjects
 VCL Reference

TObjectList.OwnsObjects

TObjectList	See also

Allows TObjectList to free objects when they are deleted from the list or the list is destroyed.

property OwnsObjects: Boolean;

Description

OwnsObjects allows TObjectList to control the memory of its objects. If OwnsObjects is True (the default),

calling Delete or Remove frees the deleted object in addition to removing it from the list.

calling Clear frees all the objects in the list in addition to emptying the list.

calling the destructor frees all the objects in the list in addition to destroying the TObjectList itself.

assigning a new value to an index in Items frees the object that previously occupied that position in the list.

Even if OwnsObjects is True, the Extract method can be used to remove objects from the list without freeing them.


 VCL Reference

TObjectList methods

TObjectList	Alphabetically	Legend

In TObjectList

Add

Create

Extract

First

FindInstanceOf

IndexOf

Insert

Last

Remove

Derived from TList

Assign

Clear

Delete

Destroy

Error

Exchange

Expand

Move

Pack

Sort

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TObjectList methods

TObjectList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Error

Exchange

Expand

Extract

FieldAddress

FindInstanceOf

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

MethodAddress

MethodName

Move

NewInstance

Pack

Remove

SafeCallException

Sort


TObjectList.Add
 VCL Reference

TObjectList.Add

TObjectList	See also

Inserts an object at the end of the list.

function Add(AObject: TObject): Integer;

Description

Call Add to insert an object at the end of the list. Add places the object after the last item, even if the array contains nil references, and returns the index of the inserted object. (The first object in the list has an index of 0.)

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity.


TObjectList.Create
 VCL Reference

TObjectList.Create

TObjectList	See also

Creates and initializes a TObjectList.

constructor Create; overload;

constructor Create(AOwnsObjects: Boolean); overload;

Description

Create creates a TObjectList instance. If no parameter is specified, or if the constructor is called with the True parameter, the new TObjectList is initialized with OwnsObjects set to True.


TObjectList.Extract
 VCL Reference

TObjectList.Extract

TObjectList	See also

Removes a specified object from the list without freeing it.

function Extract(Item: Pointer): Pointer;

Description

Call Extract to remove an object from the list without freeing the object itself. After an object is removed, all the objects that follow it are moved up in index position and Count is decremented.


TObjectList.FindInstanceOf
 VCL Reference

TObjectList.FindInstanceOf

TObjectList	See also

Finds the first instance of a specified class in the list.

function FindInstanceOf(AClass: TClass; AExact: Boolean = True; AStartAt: Integer = 0): Integer;

Description

FindInstanceOf returns the index of the first instance of AClass appearing after AStartAt in the Items array. If AExact is True, FindInstanceOf returns instances only of AClass itself, ignoring instances descendant classes. If no instance of the specified class is found, FindInstanceOf returns –1.


TObjectList.First
 VCL Reference

TObjectList.First

TObjectListClass	See also

Returns Items[0].

function First: TObject);

Description

Call First to retrieve the first object reference in the Items array.


TObjectList.IndexOf
 VCL Reference

TObjectList.IndexOf

TObjectList	See also

Returns the index of the first object in the list with a specified value.

function IndexOf(AObject: TObject): Integer;

Description

Call IndexOf to get the index for a specified object in the list, where the first object has index 0, the second object has index 1, and so on. If an object is not in the list, IndexOf returns -1. If an object appears more than once, IndexOf returns the index of the first appearance.


TObjectList.Insert
 VCL Reference

TObjectList.Insert

TObjectList	See also

Adds an object to the list at a specified position.

procedure Insert(Index: Integer; AObject: TObject);

Description

Call Insert to add an object at a specified position in the list, shifting the item that previously occupied that position (and all subsequent items) up. Insert increments Count and, if necessary, allocates memory by increasing the value of Capacity.

The Index parameter is zero-based, so the first position in the list has an index of 0.

To replace a nil reference with a new object without growing the array, set the Items property directly.


TObjectList.Last
 VCL Reference

TObjectList.Last

TObjectListClass	See also

Returns the object at the end of the Items array.

function Last: TObject);

Description

Call Last to retrieve the last object in the Items array.


TObjectList.Remove
 VCL Reference

TObjectList.Remove

TObjectList	See also

Removes a specified object from the list and (if OwnsObjects is True) frees the object.

function Remove(AObject: TObject): Integer;

Description

Call Remove to delete a specific object from the list when its index is unknown. The value returned is the index of the object in the Items array before it was removed. If the specified object is not found on the list, Remove returns –1. If OwnsObjects is True, Remove frees the object in addition to removing it from the list.

After an object is deleted, all the objects that follow it are moved up in index position and Count is decremented. If an object appears more than once on the list, Remove deletes only the first appearance. Hence, if OwnsObjects is True, removing an object that appears more than once results in empty object references later in the list.

To use an index position (rather than an object reference) to specify the object to be removed, call Delete.

To remove an object from the list without freeing it, call Extract.


Hierarchy

TObject

TList

TObjectList


TObjectQueue
 VCL Reference

TObjectQueue

Hierarchy	Methods	See also

TObjectQueue maintains a first-in first-out list of objects.

Unit

Contnrs

Description

Use a TObjectQueue to store and maintain a first-in first-out list of objects.


 VCL Reference

TObjectQueue methods

TObjectQueue	Alphabetically	Legend

In TObjectQueue

Peek

Pop

Push

Derived from TOrderedList

AtLeast

Count

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TObjectQueue methods

TObjectQueue	By object	Legend

AfterConstruction

AtLeast

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Peek

Pop

Push

SafeCallException


TObjectQueue.Peek
 VCL Reference

TObjectQueue.Peek

TObjectQueue	See also

Returns a reference to the front of the queue.

function Peek: TObject;

Description

Call Peek to access the queue without removing an object. Peek returns a reference to the next object in the queue (that is, the earliest object added).

To remove an object from the queue, call Pop.


TObjectQueue.Pop
 VCL Reference

TObjectQueue.Pop

TObjectQueue	See also

Removes and returns the object at the front of the queue.

function Pop: TObject;

Description

Call Pop to retrieve an object from the queue. Pop removes the next object from the queue (that is, the earliest object added), then returns a reference to the deleted object.

To access the queue without removing an object, call Peek.


TObjectQueue.Push
 VCL Reference

TObjectQueue.Push

TObjectQueue	See also

Adds an object to the end of the queue.

procedure Push(AObject: TObject): TObject;

Description

Call Push to add an object to the queue. Push returns a reference to the object that was just added (AObject).


Hierarchy

TObject

TOrderedList

TQueue

TObjectQueue


TObjectStack
 VCL Reference

TObjectStack

Hierarchy	Methods	See also

TObjectStack maintains a last-in first-out list of objects.

Unit

Contnrs

Description

Use TObjectStack to store and maintain a last-in first-out list of objects.


 VCL Reference

TObjectStack methods

TObjectStack	Alphabetically	Legend

In TObjectStack

Peek

Pop

Push

Derived from TOrderedList

AtLeast

Count

Create

Destroy

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TObjectStack methods

TObjectStack	By object	Legend

AfterConstruction

AtLeast

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Peek

Pop

Push

SafeCallException


TObjectStack.Peek
 VCL Reference

TObjectStack.Peek

TObjectStack	See also

Returns a reference to the top of the stack.

function Peek: TObject;

Description

Call Peek to access the stack without removing an object. Peek returns a reference to the next object in the stack (that is, the last object added).

To remove an object from the stack, call Pop.


TObjectStack.Pop
 VCL Reference

TObjectStack.Pop

TObjectStack	See also

Removes and returns the object at the top of the stack.

function Pop: TObject;

Description

Call Pop to retrieve an object from the stack. Pop removes the next object from the stack (that is, the last object added), then returns a reference to the deleted object.

To access the stack without removing an object, call Peek.


TObjectStack.Push
 VCL Reference

TObjectStack.Push

TObjectStack	See also

Adds an object to the top of the stack.

procedure Push(AObject: TObject): TObject;

Description

Call Push to add an object to the stack. Push returns a reference to the object that was just added (AObject).


Hierarchy

TObject

TOrderedList

TStack

TObjectStack


TObject
 VCL Reference

TObject

Methods	See also

TObject is the ultimate ancestor of all VCL objects and components.

Unit

System

Description

TObject encapsulates fundamental behavior common to VCL objects by introducing methods that

create, maintain and destroy instances of the object by allocating, initializing, and freeing required memory.

return class-type and instance information on an object and runtime type information (RTTI) about its published properties.

support message handling.

support interfaces that the object implements.

Use TObject as an immediate base class when declaring simple objects that do not need to persist (are not saved and reloaded) and that do not need to be assigned to other objects. If no ancestor type is specified when declaring a new object class, Delphi automatically uses TObject as the ancestor.

Much of the capability of VCL objects is established by methods that TObject introduces. Many of these methods are used internally by the development environment and are not intended for users to call directly. Others are overridden in descendant objects that have more complex behavior.

Note:	While TObject is not technically an abstract class, objects of this type are not normally instantiated.


 VCL Reference

TObject methods

TObject	Alphabetically	Legend

In TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TObject methods

TObject	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TObject.AfterConstruction
 VCL Reference

TObject.AfterConstruction

TObject	See also

Responds after the last constructor has executed.

procedure AfterConstruction; virtual;

Description

AfterConstruction is called automatically after the object’s last constructor has executed. Do not call it explicitly in your applications.

The AfterConstruction method implemented in TObject does nothing. Override this method when creating a class that takes some action after the object is created. For example, TCustomForm overrides AfterConstruction to generate an OnCreate event.

Note:	It is important to override AfterConstruction rather than the object’s constructor only if the derived class is used in C++Builder applications.


TObject.BeforeDestruction
 VCL Reference

TObject.BeforeDestruction

TObject	See also

Responds before the first destructor executes.

procedure BeforeDestruction; virtual;

Description

BeforeDestruction is called automatically before the object’s first destructor executes. Do not call it explicitly in your applications.

The BeforeDestruction method implemented in TObject does nothing. Override this method when creating a class that takes some action before the object is destroyed. For example, TCustomForm overrides BeforeDestruction to generate an OnDestroy event.

Note:	It is important to override BeforeDestruction rather than the object’s destructor only if the derived class is used in C++Builder applications.

Note:	BeforeDestruction is not called when the object is destroyed before it is fully constructed. That is, if the object’s constructor raises an exception, the destructor is called to dispose of the object, but BeforeDestruction is not called.


TObject.ClassInfo
 VCL Reference

TObject.ClassInfo

TObject	See also

Returns a pointer to the runtime type information (RTTI) table for the object type.

class function ClassInfo: Pointer;

Description

Use ClassInfo to access the RTTI table that contains information about the object type, its ancestor type, and all of its published properties.

RTTI is used internally by the development environment. ClassInfo is rarely called directly in an application. TObject includes other methods that provide easier access to RTTI.

Note: By default, RTTI is not compiled into TObject descendants that do not descend from TPersistent. In such objects, ClassInfo returns nil. To make RTTI available for a TObject descendant, use the {$M+} compiler directive. See the declaration of TPersistent in the classes unit for an example.


TObject.ClassName
 VCL Reference

TObject.ClassName

TObject	See also

Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).

class function ClassName: ShortString;

Description

Use ClassName to find the name (such as ’TButton’) of an object’s type. This is useful for differentiating object instances that are assigned to a variable that has the type of an ancestor class.ClassName returns a string indicating the actual type of the object, rather than a string containing the type of the declared variable.

When reporting exception-handling errors on a particular object, the on statement uses ClassName to do a string comparison of classes.


TObject.ClassNameIs
 VCL Reference

TObject.ClassNameIs

TObject	See also

Determines whether an object is of a specific type.

class function ClassNameIs(const Name: string): Boolean;

Description

Use ClassNameIs when writing conditional code based on an object’s type or to query objects across modules or DLLs.

ClassNameIs returns True if the string passed in the Name parameter matches the name of the class. Otherwise, it returns False.

ClassNameIs performs much the same function as the is operator, except that it requires an exact match, returning False for descendants of the named class.


TObject.ClassParent
 VCL Reference

TObject.ClassParent

TObject	See also 	Example

Returns the type of the immediate ancestor of a class.

class function ClassParent: TClass;

Description

ClassParent is used internally by the is and as operators and to implement the InheritsFrom method. Because it is a class method, it can be used to determine the type of any class reference.

ClassParent returns nil for type TObject because TObject is not derived from an ancestor class.

Note:	Applications should rarely, if ever, call ClassParent directly.  Instead, use the is or as operator.


TObject.ClassType
 VCL Reference

TObject.ClassType

TObject	See also 	Example

Returns the class reference for the object’s class.

function ClassType: TClass;

Description

ClassType dynamically determines the type of an object and returns its class reference, or metaclass. ClassType is used internally by the is and as operators.

Note:	Applications should rarely, if ever, call ClassType directly. Instead, use the is or as operator.


TObject.CleanupInstance
 VCL Reference

TObject.CleanupInstance

TObject	See also

Performs finalization on long strings, variants, and interface variables within a class.

procedure CleanupInstance;

Description

Do not call CleanupInstance directly. CleanupInstance is called automatically when the object instance is destroyed.

CleanupInstance releases all long strings and variants. It sets long strings to empty and variants to Unassigned.


TObject.Create
 VCL Reference

TObject.Create

TObject	See also

Constructs an object and initializes its data before the object is first used.

constructor Create;

Description

Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create method defined by TObject allocates memory but does not initialize data.

Descendant objects usually define a constructor that creates the particular kind of object and initializes its data.

Note:	If an exception escapes from a constructor, the object’s destructor is called to clean up the failed instance.


TObject.DefaultHandler
 VCL Reference

TObject.DefaultHandler

TObject	See also

Provides the interface for a method that processes message records.

procedure DefaultHandler(var Message); virtual;

Description

DefaultHandler is called by Dispatch when it cannot find a method for a particular message. DefaultHandler provides message handling for all messages for which an object does not have specific handlers. Descendant classes that process messages override DefaultHandler according to the types of messages they handle. For example, TWinControl overrides DefaultHandler to call DefWindowProc.

Calling inherited in a message-handling method results in a call to the ancestor's DefaultHandler method only if that ancestor does not specify a message method for the particular message being handled. Otherwise, calling inherited results in a call to the specific handler for that type of message.


TObject.Destroy
 VCL Reference

TObject.Destroy

TObject	See also

Disposes of an object instance.

destructor Destroy; virtual;

Description

Do not call Destroy directly. Call Free instead. Free verifies that the object reference is not nil before calling Destroy.

The Destroy method defined by TObject deallocates memory. Descendant objects usually define a destructor that is customized for that particular kind of object.

When declaring a Destroy method in a descendant, always add the override directive to the declaration and call the inherited Destroy as the last statement in the overriding method. Since Destroy is a virtual method, overriding it ensures that the proper inherited behavior occurs.

Note:	If an exception escapes from the constructor, the destructor is called to destroy the partially constructed object instance that failed to initialize completely. Therefore, destructors should check that allocated resources, such as handles, were actually allocated before trying to release them, since their value might be zero.

Destroy should be implemented so that it calls Free on all subobjects created within the object’s constructor (that is, allocated by the constructor). Unlike Destroy, Free provides a safeguard when destroying objects that are nil.


TObject.Dispatch
 VCL Reference

TObject.Dispatch

TObject	See also

Calls message-handling methods for the object, based on the contents of the Message parameter.

procedure Dispatch(var Message); virtual;

Description

Call Dispatch to automatically pass messages to the appropriate message handler.

Dispatch determines whether a message is in the list of message handlers declared for the object. If the object does not handle the message, Dispatch then examines the message-handler list of the ancestor class, and continues checking ancestors until it either finds a specific handler or runs out of ancestors, in which case it calls DefaultHandler.

The Message parameter is untyped. The only assumption Dispatch makes about the data in Message is that the first two bytes contain a message ID—that is, an integer that determines which message handler Dispatch calls. Although any kind of data can be passed to Dispatch, most TObject descendants expect a message record such as TMessage or a specific message-record type.


TObject.FieldAddress
 VCL Reference

TObject.FieldAddress

TObject

Returns the address of a published object field.

function FieldAddress(const Name: ShortString): Pointer;

Description

FieldAddress is used internally by the component streaming system to access a specified published field of an object. FieldAddress returns a pointer to the field if it exists. If the object has no published field by that name, FieldAddress returns nil.

Programs should access and manipulate fields by using properties instead of FieldAddress.


TObject.Free
 VCL Reference

TObject.Free

TObject	See also

Destroys an object and frees its associated memory, if necessary.

procedure Free;

Description

Use Free to destroy an object. Free automatically calls the destructor if the object reference is not nil. Any object instantiated at runtime that does not have an owner should be destroyed by a call to Free so that it can be properly disposed of and its memory released. Unlike Destroy, Free is successful even if the object is nil; so if the object was never initialized, Free won’t result in an error.

When you call Free for a component, it calls Free for all components that it owns—that is, all components in its component list. Since a form owns all the controls and nonvisual components that are created on it in design mode, those components are automatically freed when the form is freed. By default, all forms are owned by the Application object; when the application terminates, it frees the Application object, which frees all forms. For objects that are not components, or for components created with a nil owner, be sure to call Free after you are finished with them; otherwise the allocated memory will not be usable until after the application terminates.

Warning:	Never explicitly free a component within one of its own event handlers or the event handler of a component it owns or contains. For example, don’t free a button, or the form that owns the button, in its OnClick event handler.

To free a form, call its Release method, which destroys the form and releases the memory allocated for it after all its event handlers and those of the components it contains are through executing.


TObject.FreeInstance
 VCL Reference

TObject.FreeInstance

TObject	See also

Deallocates memory allocated by a previous call to the NewInstance method.

procedure FreeInstance; virtual;

Description

All destructors call FreeInstance automatically to deallocate memory that was allocated by overriding NewInstance.

Do not call FreeInstance directly. FreeInstance should be overridden if NewInstance was overridden to change the way the object’s instance data was allocated.

Like NewInstance, FreeInstance uses the value returned from InstanceSize to deallocate the object's memory.


TObject.GetInterface
 VCL Reference

TObject.GetInterface

TObject	See also

Retrieves the interface identified by a given identifier.

function GetInterface(const IID: TGUID; out Obj): Boolean;

Description

GetInterface is used internally by the as operator to retrieve interfaces implemented by an object. GetInterface is used by TInterfacedObject to implement the QueryInterface method. An interface type name, such as IUnknown, can be supplied as the IID parameter since the compiler will replace the interface with the associated GUID.

Some VCL objects that are not descended from TInterfacedObject still implement interfaces.The as operator can be used to cast these objects to obtain the interface, but this approach raises an exception if handed an object that does not implement the interface. Use GetInterface to obtain an interface from an object instance when the object may not support the interface, but an exception should not be raised upon failure.

GetInterface returns, as the out parameter Obj, a pointer to the interface identified by the IID parameter. If the interface is supported by the object, GetInterface returns True. If the interface is not supported by the object, GetInterface returns False and the Obj parameter is nil.


TObject.GetInterfaceEntry
 VCL Reference

TObject.GetInterfaceEntry

TObject

Returns the entry for a specific interface implemented in a class.

classfunction GetInterfaceEntry(const IID: TGUID): PInterfaceEntry;

Description

GetInterfaceEntry returns the class entry for the interface specified by the IID parameter. GetInterfaceEntry is used internally. It is rarely called directly.

One use for this method is to describe to COM how to automatically dispatch calls to a dual-IDispatch interface. An interface type name, such as IUnknown, can be supplied as the IID parameter since the compiler will replace the interface with the associated GUID.


TObject.GetInterfaceTable
 VCL Reference

TObject.GetInterfaceTable

TObject	See also

Returns a pointer to a structure containing all of the interfaces implemented by a given class.

type

  PInterfaceTable = ^TInterfaceTable;

  TInterfaceTable = packedrecord

    EntryCount: Integer;

    Entries: array[0..9999] ofTInterfaceEntry;

  end;

classfunction GetInterfaceTable: PInterfaceTable;

Description

GetInterfaceTable returns the TInterfaceEntries for the class. This list contains only interfaces implemented by this class, not its ancestors. To find the ancestor list, iteratively call ClassParent and then call GetInterfaceTable on the value it returns. To find the entry for a specific interface, use the GetInterfaceEntry method instead.


TObject.InheritsFrom
 VCL Reference

TObject.InheritsFrom

TObject	See also

Determines the relationship of two object types.

class function InheritsFrom(AClass: TClass): Boolean;

Description

Use InheritsFrom to determine if a particular class type is an ancestor of an object. InheritsFrom returns True if the object type specified in the AClass parameter is an ancestor of the object type or the type of the object itself. Otherwise, it returns False.

Note:	The is and as operators use InheritsFrom in their implementations. The is operator, however, can only determine the inheritance relationship of an instance. As a class method, InheritsFrom can determine the relationship of class references.


TObject.InitInstance
 VCL Reference

TObject.InitInstance

TObject	See also

Initializes a newly allocated object instance to all zeros and initializes the instance’s virtual method table pointer.

class function InitInstance(Instance: Pointer): TObject;

Description

There should be no reason to call InitInstance directly. InitInstance is called by NewInstance when an object is created. When overriding NewInstance, be sure to call InitInstance as the last statement.

InitInstance is not virtual, so you cannot override it: Instead, initialize any data for an object in the constructor.


TObject.InstanceSize
 VCL Reference

TObject.InstanceSize

TObject	See also

Returns the size in bytes of each instance of the object type.

class function InstanceSize: Longint;

Description

InstanceSize indicates how many bytes of memory are required for a class’s instance data. Delphi uses InstanceSize internally for methods that allocate and deallocate memory. InstanceSize is not a virtual method, so it cannot be overridden. InstanceSize should be called only when implementing a custom version of NewInstance.


TObject.MethodAddress
 VCL Reference

TObject.MethodAddress

TObject	See also

Returns the address of a published method.

class function MethodAddress(const Name: ShortString): Pointer;

Description

MethodAddress is used internally by the streaming system. When an event property is read from a stream, MethodAddress converts a method name, specified by Name, to a pointer containing the method address. There should be no need to call MethodAddress directly.

If Name does not specify a published method for the object, MethodAddress returns nil.


TObject.MethodName
 VCL Reference

TObject.MethodName

TObject	See also

Returns a string containing the name of the method located at Address.

class function MethodName(Address: Pointer): ShortString;

Description

MethodName is used internally by the streaming system. When an event property is written to a stream, MethodName converts a pointer containing the method address to a string containing the method name. There should be no need to call MethodName directly.

If Address does not point to a published method of the object, MethodName returns an empty string.


TObject.NewInstance
 VCL Reference

TObject.NewInstance

TObject	See also

Allocates memory for an instance of an object type and returns a pointer to that new instance.

class function NewInstance: TObject; virtual;

Description

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory to allocate from the heap to contain a particular instance. Do not call NewInstance directly.

Override NewInstance only for special memory allocation requirements. For example, when allocating a large number of identical objects that all need to be in memory at the same time, you could allocate a single block of memory for the entire group, then override NewInstance to use part of that larger block for each instance.

If you override NewInstance to allocate memory, you may need to override FreeInstance to deallocate the memory.

When overriding NewInstance, call InitInstance, and not inherited, as the last statement.

Note:	By default NewInstance calls InitInstance.


TObject.SafeCallException
 VCL Reference

TObject.SafeCallException

TObject

Handles exceptions caught using the safecall calling convention.

type HResult = Longint;

function SafeCallException(ExceptObject: TObject; ExceptAddr: Pointer): HResult; virtual;

Description

SafeCallException is used for COM exception handling. As implemented in TObject, SafeCallException returns E_UNEXPECTED. This is a default case that is appropriate for classes that do not support any COM interfaces. Classes that implement COM interfaces should override this method to handle other errors that might occur.

COM classes in Delphi override SafeCallException.


TOleContainer
 VCL Reference

 TOleContainer

Hierarchy	Properties	Methods	Events	Using TOleContainer	See also

TOleContainer embeds or links OLE objects.

Unit

OleCtnrs

Description

Use TOleContainer to handle many of the complexities of OLE 2.0. TOleContainer lets the user choose an OLE object to insert by simply calling the InsertObjectDialog method. TOleContainer can create either an embedded OLE object or a linked OLE object.

TOleContainer automatically handles menu merging -- the process of combining the container form's menu with that of an in-place activated OLE object's server application. The menu items' GroupIndex property settings control how menus are merged. Those main menu items with GroupIndex values of 0, 2, and 4 remain; TOleContainer merges the server application's menus and replaces the main menu items with GroupIndex values of 1, 3, and 5 (if they exist).

OLE objects that are activated in-place add their servers' toolbars directly into the container application's window. Normally, any panels used for toolbars are replaced by the OLE object's server's toolbars. Prevent this by setting a panel's Locked property to True.

When using TOleContainer in an SDI application (the main form's FormStyle property is fsNormal rather than fsMDIForm), place the TOleContainer component inside a panel whose Align property is set to alClient. TOleContainer replaces an SDI form's toolbars as described above, and using a panel automatically adjusts the amount of space available to the OLE container.


 VCL Reference

TOleContainer properties

TOleContainer	Alphabetically	Legend

In TOleContainer

AllowActiveDoc

AllowInPlace

AutoActivate

AutoVerbMenu

BorderStyle

CanPaste

CopyOnSave

Iconic

Linked

Modified

NewInserted

ObjectVerbs

OldStreamFormat

OleClassName

OleObject

OleObjectInterface

PrimaryVerb

SizeMode

SourceDoc

State

StorageInterface

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TOleContainer properties

TOleContainer	By object	Legend

Action

Align

AlignDisabled

AllowActiveDoc

AllowInPlace

Anchors

AutoActivate

AutoVerbMenu

BiDiMode

BorderStyle

BoundsRect

Brush

CanPaste

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

CopyOnSave

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragMode

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Iconic

Left

Linked

LRDockWidth

Modified

Name

NewInserted

ObjectVerbs

OldStreamFormat

OleClassName

OleObject

OleObjectInterface

Owner

Parent

ParentColor

ParentCtl3D

ParentShowHint

ParentWindow

PopupMenu

PrimaryVerb

ShowHint

Showing

SizeMode

SourceDoc

State

StorageInterface

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TOleContainer.AllowActiveDoc
 VCL Reference

TOleContainer.AllowActiveDoc

TOleContainer	See also

Specifies whether the OLE container supports the IOleDocumentSite interface.

property AllowActiveDoc: Boolean;

Description

Set AllowActiveDoc to True to specify that the OLE container can house an ActiveDoc (DocObject). Set AllowActiveDoc to False to limit the OLE container to hosting OLE controls that use the more usual interfaces such as IOleClientSite. ActiveDoc-enabled controls have a slightly different border. Set AllowActiveDoc to False to maintain a consistent appearance in forms that do not need to support the IOleDocumentSite interface.


TOleContainer.AllowInPlace
 VCL Reference

TOleContainer.AllowInPlace

TOleContainer	See also

Determines whether the OLE container allows in-place activation.

property AllowInPlace: Boolean;

Description

Set AllowInPlace to specify what happens when the user activates the OLE object. If AllowInPlace is True and Iconic is False, the OLE object is activated in place. If AllowInPlace is False, the OLE object is activated in a separate window. The default value is True.


TOleContainer.AutoActivate
 VCL Reference

TOleContainer.AutoActivate

TOleContainer	See also

Determines how the object in an OLE container is activated.

type TAutoActivate = (aaManual, aaGetFocus, aaDoubleClick);

property AutoActivate: TAutoActivate;

Description

Set AutoActivate to specify what actions activate the OLE object. AutoActivate takes one of the values in the following table:

Values	Meaning

aaManual	The OLE object must be activated programmatically by calling DoVerb (ovShow).

aaGetFocus	The OLE object is activated when the OLE container gets focus (by clicking on it with the mouse or pressing Tab to move the focus to it).

aaDoubleClick	(Default) The OLE object is activated by double-clicking it or pressing Enter while the container has the focus.


TOleContainer.AutoVerbMenu
 VCL Reference

TOleContainer.AutoVerbMenu

TOleContainer	See also

Determines whether the OLE container automatically creates a pop-up menu containing the OLE object's verbs.

property AutoVerbMenu: Boolean;

Description

Use AutoVerbMenu to specify whether the OLE object can replace the OLE container’s popup menu. If AutoVerbMenu is True (the default), the OLE object replaces any existing PopupMenu property. If AutoVerbMenu is False, no popup menu is automatically created.


TOleContainer.BorderStyle
 VCL Reference

TOleContainer.BorderStyle

TOleContainer	See also

Determines whether a single line is drawn around the OLE container.

property BorderStyle: TBorderStyle;

Description

Set BorderStyle to specify whether the OLE container should be framed by a single line. These are the possible values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border


TOleContainer.CanPaste
 VCL Reference

TOleContainer.CanPaste

TOleContainer	See also

Indicates whether the Windows clipboard contains an OLE object that can be pasted into the OLE container.

property CanPaste: Boolean;

Description

Read CanPaste before trying to paste or paste link an OLE object from the clipboard.


TOleContainer.CopyOnSave
 VCL Reference

TOleContainer.CopyOnSave

TOleContainer	See also

Determines whether the SaveToFile and SaveToStream methods first create a copy of the OLE object.

property CopyOnSave: Boolean;

Description

When CopyOnSave is True, the SaveToFile and SaveToStream methods create a temporary OLE object, compressing redundant data to save space. This compressed copy is then saved to the file or stream. When CopyOnSave is False, the OLE object is saved directly to the file or stream without using a temporary copy to compress redundant information.

Set CopyOnSave to False when the container holds very large embedded objects and there might not be enough memory to make the temporary copy. The default value is True.


TOleContainer.Iconic
 VCL Reference

TOleContainer.Iconic

TOleContainer	See also

Determines whether the OLE object is displayed as an icon.

property Iconic: Boolean;

Description

Set Iconic to specify whether the OLE container displays the icon for the server application instead of the image of the object. If Iconic is True, the OLE object is displayed as an icon; if False, it's displayed as it would be in the server application.


TOleContainer.Linked
 VCL Reference

TOleContainer.Linked

TOleContainer	See also

Indicates whether the OLE object is linked or embedded.

property Linked: Boolean;

Description

Read Linked to determine whether the OLE object is linked to the OLE server. If Linked is True, the OLE object is linked; if False, it's embedded. An OLE object must already be loaded in the container before accessing the Linked property.


TOleContainer.Modified
 VCL Reference

TOleContainer.Modified

TOleContainer	See also

Indicates whether the OLE object has been modified.

property Modified: Boolean;

Description

Use Modified to determine when the OLE object has been modified (including being deleted or replaced by another OLE object). To keep track of incremental changes, set Modified to False and later check it to see if the OLE object has been modified after since Modified was set to False. If there is no OLE object loaded into the container, Modified returns False.


TOleContainer.NewInserted
 VCL Reference

TOleContainer.NewInserted

TOleContainer	See also

Indicates whether the OLE object was created rather than pasted in or created as a link to a file.

property NewInserted: Boolean;

Description

Read NewInserted to determine whether the OLE object was newly created via a call to InsertObjectDialog. If there is no OLE object loaded into the container, NewInserted returns False. If NewInserted is True after a call to InsertObjectDialog, call DoVerb(ovShow) to let the user edit the object.


TOleContainer.ObjectVerbs
 VCL Reference

TOleContainer.ObjectVerbs

TOleContainer	See also

Lists the verbs that the OLE object supports.

property ObjectVerbs: TStrings;

Description

Read ObjectVerbs to determine the verbs that can be used with the OLE object. The verb names can have embedded ampersand (&) characters to indicate shortcut keys. An OLE object must already be loaded in the container before accessing the ObjectVerbs property.


TOleContainer.OldStreamFormat
 VCL Reference

TOleContainer.OldStreamFormat

TOleContainer	See also

Indicates whether the OLE object is loaded and saved using the Delphi format.

property OldStreamFormat: Boolean;

Description

Set OldStreamFormat to True to read OLE objects that were saved to file using Delphi or to save OLE objects that will be used by Delphi. If OldStreamFormat is False (the default), the LoadFromFile, LoadFromStream, SaveToFile, and SaveToStream methods use the newer format that contains extra header information. The extra header information is used to validate a file or stream. This property is provided for backward compatibility only.


TOleContainer.OleClassName
 VCL Reference

TOleContainer.OleClassName

TOleContainer	See also

Specifies the class name of the OLE object.

property OleClassName: string;

Description

Read OleClassName to obtain the class name (programmatic identifier) for the OLE object. The class name is a string describing the class of OLE object that is registered in the Windows registry. An OLE object must already be loaded in the container before accessing the OleClassName property.


TOleContainer.OleObject
 VCL Reference

TOleContainer.OleObject

TOleContainer	See also

Represents the OLE object hosted by the OLE container.

property OleObject: Variant;

Description

Read OleObject to access the OLE object hosted by the OLE container as a variant. To interact with the OLE object using the IOleObject interface, use the OleObjectInterface property instead. If the OLE object is not loaded in the container before reading OleObject, an EOleError exception is raised.


TOleContainer.OleObjectInterface
 VCL Reference

TOleContainer.OleObjectInterface

TOleContainer	See also

Provides access to the IOleObject interface for the OLE object.

property OleObjectInterface: IOleObject;

Description

Use OleObjectInterface for low-level access to the OLE API. If there is no OLE object loaded into the container, OleObjectInterface returns nil.


TOleContainer.PrimaryVerb
 VCL Reference

TOleContainer.PrimaryVerb

TOleContainer	See also

Specifies the index of the primary (default) verb for the OLE object.

property PrimaryVerb: Integer;

Description

Use PrimaryVerb to determine which verb in the ObjectVerbs list specifies the default action for the OLE object. In a call to the DoVerb method, DoVerb(ovPrimary) is the same as DoVerb(PrimaryVerb). An OLE object must already be loaded in the container before accessing the PrimaryVerb property.


TOleContainer.SizeMode
 VCL Reference

TOleContainer.SizeMode

TOleContainer	See also

Determines how the OLE object is sized in the OLE container.

type TSizeMode = (smClip, smCenter, smScale, smStretch, smAutoSize);

property SizeMode: TSizeMode;

Description

Set SizeMode to specify how the OLE object is fit into the client area of the OLE container. The following table gives the possible values :

Value	Meaning

smClip	(Default)- Displays the OLE object at its normal size, clipping any parts that don't fit within the container.

smCenter	Displays the OLE object at its normal size, centering it within the container.

smScale	Scales or shrinks the view of the OLE object to fit within the container, by scaling width and height proportionally.

smStretch	Scales or shrinks the view of the OLE object to fill the OLE container, without regard to preserving the proportions of the OLE object.

smAutoSize	Displays the OLE object at its normal size and automatically resizes the container to fit the size of the OLE object.


TOleContainer.SourceDoc
 VCL Reference

TOleContainer.SourceDoc

TOleContainer	See also

Specifies the name of the source document for a linked OLE object.

property SourceDoc: string;

Description

Read SourceDoc to obtain the name of the OLE object when it is linked. An OLE object must already be loaded in the container before accessing the SourceDoc property. If the OLE object isn't linked, SourceDoc returns an empty string.


TOleContainer.State
 VCL Reference

TOleContainer.State

TOleContainer	See also

Describes the state of the OLE object.

Type TObjectState = (osEmpty, osLoaded, osRunning, osOpen, osInPlaceActive, osUIActive);

property State: TObjectState;

Description

Read State to determine the state of the OLE object and its server application. State has one of the following values:

Values	Meaning

osEmpty	There is no OLE object in the container.

osLoaded	There is an OLE object in the container, but its server application isn't currently running.

osRunning	The OLE object's server is running.

osOpen	The OLE object is open in a separate window.

osInPlaceActive	The OLE object is activated in place, but  hasn't yet merged its menus or toolbars. This is an intermediate state; the State property will shift to osUIActive as soon as the menus and toolbars have been merged.

osUIActive	The OLE object is activated in place and menus and toolbars have been merged


TOleContainer.StorageInterface
 VCL Reference

TOleContainer.StorageInterface

TOleContainer	See also

Provides access to the IStorage interface for the OLE object.

property StorageInterface: IStorage;

Description

Use StorageInterface for low-level access to the OLE API. If there is no OLE object loaded into the container, StorageInterface returns nil.


 VCL Reference

TOleContainer events

TOleContainer	Alphabetically	Legend

In TOleContainer

OnActivate

OnDeactivate

OnObjectMove

OnResize

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDrag


 VCL Reference

TOleContainer events

TOleContainer	By object	Legend

OnActivate

OnDeactivate

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnObjectMove

OnResize

OnStartDrag


TOleContainer.OnActivate
 VCL Reference

TOleContainer.OnActivate

TOleContainer	See also

Occurs immediately after the OLE object is activated.

property OnActivate: TNotifyEvent;

Description

Write an OnActivate event handler to take specific action when the OLE object becomes active.


TOleContainer.OnDeactivate
 VCL Reference

TOleContainer.OnDeactivate

TOleContainer	See also

Occurs immediately after the OLE object is deactivated.

property OnDeactivate: TNotifyEvent;

Description

Write an OnDeactivate event handler to respond when the OLE object is deactivated.


TOleContainer.OnObjectMove
 VCL Reference

TOleContainer.OnObjectMove

TOleContainer	See also

Occurs when the OLE container is notified that the OLE object has moved or resized.

Type TObjectMoveEvent = procedure(OleContainer: TOleContainer; const Bounds: TRect) of object;

property OnObjectMove: TObjectMoveEvent;

Description

Write an OnObjectMove event handler to respond when the OLE object changes size or position. The Bounds parameter specifies the boundaries of the in-place object in the client coordinates of OLE container. OnObjectMove occurs before the OLE object’s image is updated to reflect the change.


TOleContainer.OnResize
 VCL Reference

TOleContainer.OnResize

TOleContainer	See also

Occurs immediately after the OLE container window is resized.

property OnResize: TNotifyEvent;

Description

Write an OnResize event handler to respond to changes in the size of the OLE container window. If SizeMode is smAutoSize, the container window changes size whenever the OLE object resizes.


 VCL Reference

TOleContainer methods

TOleContainer	Alphabetically	Legend

In TOleContainer

ChangeIconDialog

Close

Copy

Create

CreateLinkToFile

CreateObject

CreateObjectFromFile

CreateObjectFromInfo

Destroy

DestroyObject

DoVerb

GetIconMetaPict

InsertObjectDialog

LoadFromFile

LoadFromStream

ObjectPropertiesDialog

Paste

PasteSpecialDialog

Run

SaveAsDocument

SaveToFile

SaveToStream

UpdateObject

UpdateVerbs

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOleContainer methods

TOleContainer	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeIconDialog

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Close

ContainsControl

ControlAtPos

Copy

Create

CreateLinkToFile

CreateObject

CreateObjectFromFile

CreateObjectFromInfo

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DestroyObject

DisableAlign

Dispatch

Dock

DockDrop

DoVerb

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetIconMetaPict

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InsertObjectDialog

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

LoadFromFile

LoadFromStream

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ObjectPropertiesDialog

PaintTo

ParentToClient

Paste

PasteSpecialDialog

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Run

SafeCallException

SaveAsDocument

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UpdateObject

UpdateVerbs

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TOleContainer.ChangeIconDialog
 VCL Reference

TOleContainer.ChangeIconDialog

TOleContainer	See also

Displays the Change Icon OLE dialog box.

function ChangeIconDialog: Boolean;

Description

Call ChangeIconDialog to let the user choose a different icon (from .ICO, .DLL, and .EXE files) to use when displaying the OLE object as an icon. An OLE object must already be loaded before calling ChangeIconDialog. ChangeIconDialog returns True if the dialog box was successfully displayed and the user chose the OK button. ChangeIconDialog returns False otherwise.


TOleContainer.Close
 VCL Reference

TOleContainer.Close

TOleContainer	See also

Deactivates the OLE object.

procedure Close;

Description

Call Close to deactivate the OLE object and terminate its server application, without removing it from the container. Any changes the user made to the OLE object are automatically saved. After calling Close, the container's State property is osLoaded.

Note:	If Close is called when no OLE object is loaded, TOleContainer raises an exception.


TOleContainer.Copy
 VCL Reference

TOleContainer.Copy

TOleContainer	See also

Copies the OLE object to the Windows clipboard.

procedure Copy;

Description

Call Copy to write the OLE object to the clipboard. If there is no OLE object in the container, Copy raises an exception.


TOleContainer.Create
 VCL Reference

TOleContainer.Create

TOleContainer	See also

Creates and initializes an instance of TOleContainer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TOleContainer object at runtime. OLE containers placed on forms at design time are created automatically.

Pass a component to the constructor to supply the OLE container with an Owner that is responsible for freeing it.

After calling the inherited constructor, Create

Sets ControlStyle to [csClickEvents, csSetCaption, csOpaque, csDoubleClicks].

Sets TabStop to True.

Sets ParentColor to False and BorderStyle to bsSingle.

Sets AllowActiveDoc and AllowInPlace to True.

Sets AutoActivate to aaDoubleClick and AutoVerbMenu to True.

Sets CopyOnSave to True.


TOleContainer.CreateLinkToFile
 VCL Reference

TOleContainer.CreateLinkToFile

TOleContainer	See also

Creates a linked OLE object from the contents of a file.

procedure CreateLinkToFile(FileName: string; Iconic: Boolean);

Description

Call CreateLinkToFile to create a linked OLE object from the file specified by the FileName parameter. Iconic specifies whether the object is shown as an icon (True) or displayed as it would be in the server application (False). If there is already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.CreateObject
 VCL Reference

TOleContainer.CreateObject

TOleContainer	See also

Creates an embedded OLE object given its class name (also known as programmatic identifier).

Procedure CreateObject(const OleClassName: string; Iconic: Boolean);

Description

Call CreateObject to create an OLE object using the class name (also known as programmatic identifier) specified by the OleClassName parameter. The Iconic parameter indicates whether the object is shown as an icon (True) or displayed as it would be in the server application (False). If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.CreateObjectFromFile
 VCL Reference

TOleContainer.CreateObjectFromFile

TOleContainer	See also

Creates an embedded OLE object from the contents of a file.

Procedure CreateObjectFromFile(const FileName: string; Iconic: Boolean);

Description

Call CreateObjectFromFile to create an OLE object from the file specified by the FileName parameter. The Iconic parameter indicates whether the object is shown as an icon (True) or displayed as it would be in the server application (False). If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.CreateObjectFromInfo
 VCL Reference

TOleContainer.CreateObjectFromInfo

TOleContainer	See also

Creates an OLE object matching the specified TCreateInfo record.

procedure CreateObjectFromInfo(const CreateInfo: TCreateInfo);

Description

Call CreateObjectFromInfo to create a linked or embedded OLE object based on the specifications in the CreateInfo parameter. CreateInfo specifies whether the object should be created from a file, from a data transfer object, or from a class identifier, and provides the necessary supporting information. CreateInfo also indicates whether the OLE object should be displayed as an Icon, and allows the icon to be specified. If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.

Note:	The CreateLinkToFile, CreateObject, and CreateObjectFromFile methods are one-line calls for the most common types of OLE objects. They can be used instead of filling out the TCreateInfo record.


TOleContainer.Destroy
 VCL Reference

TOleContainer.Destroy

TOleContainer	See also

Destroys an instance of TOleContainer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TOleContainer reference is not nil, and only then calls Destroy.Destroy frees the OLE object before calling the inherited destructor.


TOleContainer.DestroyObject
 VCL Reference

TOleContainer.DestroyObject

TOleContainer	See also

Destroys the container’s OLE object.

procedure DestroyObject;

Description

Call DestroyObject to destroy the OLE object, discarding any unsaved changes the user made to it.


TOleContainer.DoVerb
 VCL Reference

TOleContainer.DoVerb

TOleContainer	See also

Requests that the OLE object perform some action.

procedure DoVerb(Verb: Integer);

Description

Call DoVerb to request that the OLE object perform one of the actions listed by the ObjectVerbs property. OLE defines several verbs, such as ovShow (to display the OLE object) and ovPrimary (the default action, usually to activate the OLE object). OLE objects can also define their own custom verbs. Use the ObjectVerbs property to get a list of those custom verbs.


TOleContainer.GetIconMetaPict
 VCL Reference

TOleContainer.GetIconMetaPict

TOleContainer	See also

Returns the global memory handle of a metafile containing the OLE object's icon.

function GetIconMetaPict: HGlobal;

Description

Call GetIconMetaPict to obtain a metafile handle for drawing the OLE object’s icon on another canvas. Use the global DestroyMetaPict procedure to destroy the handle. If the OLE container is empty, GetIconMetaPict raises an exception.


TOleContainer.InsertObjectDialog
 VCL Reference

TOleContainer.InsertObjectDialog

TOleContainer	See also

Displays the Insert Object OLE dialog box.

function InsertObjectDialog: Boolean;

Description

Call InsertObjectDialog to let the user create an OLE object. The OLE object can be embedded or linked. InsertObjectDialog returns True if the dialog box was successfully displayed and the user chose the OK button. InsertObjectDialog returns False otherwise. If the user chose OK and there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.LoadFromFile
 VCL Reference

TOleContainer.LoadFromFile

TOleContainer	See also

Loads an OLE object from the specified file.

procedure LoadFromFile(const FileName: string);

Description

Call LoadFromFile to load an OLE object that was saved using the SaveToFile method. If OldStreamFormat is True, LoadFromFile loads files saved by Delphi's TOleContainer object as well as files saved using the current format; if OldStreamFormat is False, LoadFromFile will not load files saved by Delphi. If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.LoadFromStream
 VCL Reference

TOleContainer.LoadFromStream

TOleContainer	See also

Loads an OLE object from the specified stream.

procedure LoadFromStream(Stream: TStream);

Description

Call LoadFromStream to load an OLE object from a stream. If OldStreamFormat is True, LoadFromStream loads OLE objects saved by Delphi's TOleContainer object as well as OLE objects saved using the current format; if OldStreamFormat is False, LoadFromStream will not load OLE objects saved by Delphi. If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.ObjectPropertiesDialog
 VCL Reference

TOleContainer.ObjectPropertiesDialog

TOleContainer	See also

Displays the OLE Object Properties property sheet.

function ObjectPropertiesDialog: Boolean;

Description

Call ObjectPropertiesDialog to let the user see and edit the properties of the OLE object. Any changes the user makes in the property sheet are automatically made to the OLE object. ObjectPropertiesDialog returns True if the property sheet was successfully displayed and the user chose the OK button. It returns False otherwise.

If the OLE container is empty, ObjectPropertiesDialog raises an exception.


TOleContainer.Paste
 VCL Reference

TOleContainer.Paste

TOleContainer	See also

Pastes the contents of the Windows clipboard as an embedded object.

procedure Paste;

Description

Call Paste to embed the object on the clipboard in the OLE container. If there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.PasteSpecialDialog
 VCL Reference

TOleContainer.PasteSpecialDialog

TOleContainer	See also

Displays the Paste Special OLE dialog box.

function PasteSpecialDialog: Boolean;

Description

Call PasteSpecialDialog to let the user control how the contents of the Windows clipboard are pasted into the container. The Paste Special dialog box lets the user select the format of the data, whether it should be embedded or linked, and whether the OLE object should be displayed as an icon (and if so, to choose a different icon). PasteSpecialDialog returns True if the dialog box was successfully displayed and the user chose the OK button. It returns False otherwise. If the user chose the OK button when there's already an OLE object in the container, it is destroyed and any changes the user made to it are discarded.


TOleContainer.Run
 VCL Reference

TOleContainer.Run

TOleContainer	See also

Runs the OLE object's server application, but doesn't open or activate the OLE object itself.

procedure Run;

Description

Call Run to ensure that the server application is running. Once the server application is running, opening and activating the OLE object happens much more quickly. An OLE object must already be loaded in the container before calling Run, Otherwise, Run raises an exception.


TOleContainer.SaveAsDocument
 VCL Reference

TOleContainer.SaveAsDocument

TOleContainer	See also

Saves the OLE object to the specified file in native OLE Document format.

procedure SaveAsDocument(const FileName: string);

Description

Call SaveAsDocument to save the OLE object in its native OLE Document format. An OLE object must already be loaded in the container before calling SaveAsDocument. Otherwise, SaveAsDocument raises an exception.

Note:	Saving an OLE object to a file or a stream limits the ability of another application, such as Word, to open the file, even if it is saved with the correct extension. Saving to a file or a stream loses information necessary to open such a file. Use SaveAsDocument when needing to save files in a native OLE Document format.


TOleContainer.SaveToFile
 VCL Reference

TOleContainer.SaveToFile

TOleContainer	See also

Saves the OLE object to the specified file.

procedure SaveToFile(const FileName: string);

Description

Call SaveToFile to save the OLE object. If CopyOnSave is True, SaveToFile first creates a temporary OLE object that compresses redundant data, saving space in the file that is saved. If OldStreamFormat is True, SaveToFile writes a file that can be read by Delphi's TOleContainer component.

An OLE object must already be loaded in the container before calling SaveToFile. Otherwise, SaveToFile raises an exception.


TOleContainer.SaveToStream
 VCL Reference

TOleContainer.SaveToStream

TOleContainer	See also

Saves the OLE object to the specified stream.

procedure SaveToStream(Stream: TStream);

Description

Call SaveToStream to save the OLE object. If CopyOnSave is True, SaveToStream first creates a temporary OLE object that compresses redundant data, reducing the information that must be saved. If OldStreamFormat is True, SaveToStream writes the object in a format that can be read by Delphi's TOleContainer component.

An OLE object must already be loaded in the container before calling SaveToStream. Otherwise, SaveToStream raises an exception.


TOleContainer.UpdateObject
 VCL Reference

TOleContainer.UpdateObject

TOleContainer	See also

Refreshes the OLE object.

procedure UpdateObject;

Description

Linked OLE objects and embedded objects that contain linked OLE objects get out of date when the source of the link is updated. UpdateObject rereads the source to ensure that the OLE object has current data. If there is no OLE object loaded in the container, UpdateObject has no effect.


TOleContainer.UpdateVerbs
 VCL Reference

TOleContainer.UpdateVerbs

TOleContainer	See also

Refreshes the list of verbs the OLE object can respond to.

procedure UpdateVerbs;

Description

TOleContainer automatically calls UpdateVerbs when the ObjectVerbs property is first read, but some OLE objects change their verbs when they perform some actions. The Media Clip OLE object, for example, changes its Play verb to Stop while running. Call UpdateVerbs to ensure that the list of verbs is appropriate to the state of the OLE object.

An OLE object must already be loaded in the container before calling UpdateVerbs. Otherwise, UpdateVerbs raises an exception.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TOleContainer


TOleControl
 VCL Reference

TOleControl

Hierarchy	Properties	Methods	See also

TOleControl is the base class from which ActiveX controls are derived.

Unit

OleCtrls

Description

TOleControl is derived from TWinControl and handles the interactions with COM necessary for using ActiveX controls in the Delphi environment. Most application do not need to explicitly derive a component from this class.


 VCL Reference

TOleControl properties

TOleControl	Alphabetically	Legend

In TOleControl

DefaultDispatch

Name

OleObject

Parent

PerPropBrowsing

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TOleControl properties

TOleControl	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DefaultDispatch

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

OleObject

Owner

Parent

ParentWindow

PerPropBrowsing

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TOleControl.DefaultDispatch
 VCL Reference

TOleControl.DefaultDispatch

TOleControl

The default dispatch interface.

propertyDefaultDispatch: Idispatch);

Description

DefaultDispatch default dispatch interface that the TOleControl object encapsulates. For those ActiveX controls that have multiple dispatch interfaces, one is typically identified as the default.


TOleControl.Name
 VCL Reference

TOleControl.Name

TOleControl

The name of the associated ActiveX control.

property Name: TComponentName;

Description

Name is used to get the name of the ActiveX control associated with the OLE control object.


TOleControl.OleObject
 VCL Reference

TOleControl.OleObject

TOleControl

The ActiveX control associated with the TOleControl object.

property OleObject: Variant;

Description

OleObject is used to get the ActiveX control that is associated with the TOleControl


TOleControl.Parent
 VCL Reference

TOleControl.Parent

TOleControl

Specifies the control that contains the OleControl visually inside it.

property Parent: TWinControl;

Description

Use the Parent property to determine the parent of the OLE control or to assign a control to be the parent of this OLE control. When creating a new OLE control, always assign a parent. Usually, this is a form, panel, group box, or some control that is designed to contain others. Changing the Parent property moves the OLE control onscreen so that it is displayed within the new parent.


TOleControl.PerPropBrowsing
 VCL Reference

TOleControl.PerPropBrowsing

TOleControl 	See also

Provides access to information about the property page properties of the OleControl.

property PerPropBrowsing: IPerPropertyBrowsing;

Description

PerPropBrowsing is an interface to information about the properties of the OleControl as they appear on the associated property page.


 VCL Reference

TOleControl methods

TOleControl	Alphabetically	Legend

In TOleControl

BrowseProperties

Create

DefaultHandler

Destroy

DoObjectVerb

GetEnumPropDesc

GetHelpContext

GetObjectVerbs

GetPropDisplayString

GetPropDisplayStrings

IsCustomProperty

IsPropPageProperty

SetBounds

SetPropDisplayString

ShowAboutBox

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOleControl methods

TOleControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

BrowseProperties

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoObjectVerb

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetEnumPropDesc

GetHelpContext

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetObjectVerbs

GetParentComponent

GetPropDisplayString

GetPropDisplayStrings

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsCustomProperty

IsImplementorOf

IsPropPageProperty

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetPropDisplayString

SetSubComponent

SetTextBuf

Show

ShowAboutBox

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TOleControl.BrowseProperties
 VCL Reference

TOleControl.BrowseProperties

TOleControl

Notifies the ActiveX control to display its Properties dialog box.

procedure BrowseProperties;

Description

Use BrowseProperties to notify the ActiveX control to display its Properties dialog box. The Properties dialog box contains property pages for the ActiveX control.


TOleControl.DoObjectVerb
 VCL Reference

TOleControl.DoObjectVerb

TOleControl

Notifies the ActiveX control to perform one of its actions.

procedure DoObjectVerb(Verb: Integer);

Description

Use DoObjectVerb to notify the ActiveX control to perform one of its actions. Verb is an integer that corresponds to the action.  Most application-defined verbs are small positive integers.  In addition,

VerbName	Verb

OLEIVERB_PRIMARY	0

OLEIVERB_SHOW	–1

OLEIVERB_OPEN	–2

OLEIVERB_HIDE	–3

OLEIVERB_UIACTIVATE	–4

OLEIVERB_INPLACEACTIVATE	–5

OLEIVERB_DISCARDUNDOSTATE	–6

OLEIVERB_PROPERTIES	–7

For more information about verbs, search the OLE.HLP file or the latest Microsoft Developer Network CD.


TOleControl.Create
 VCL Reference

TOleControl.Create

TOleControl	See also

Creates a new instance of TOleControl.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create a new instance of the TOleControl object. Create calls the inherited Create method and creates and initializes internal objects.


TOleControl.DefaultHandler
 VCL Reference

TOleControl.DefaultHandler

TOleControl	See also

Handles all otherwise-unhandled messages.

procedure DefaultHandler(var Message); override;

Description

DefaultHandler handles all messages not already handled in a control’s WndProc or message handling methods. The inherited method should always be called for unhandled messages.


TOleControl.GetHelpContext
 VCL Reference

TOleControl.GetHelpContext

TOleControl

Retrieves the Help context of a member of the ActiveX control.

function GetHelpContext(Member: string; var HelpCtx: Integer; var HelpFile: string): Boolean;

Description

Use GetHelpContext to retrieve the Help context of a member of the ActiveX control.

Member is the name of a property, method, or event of the ActiveX control. To retrieve the help context of the ActiveX control itself, set Member to nil.

HelpCtx is a variable in which the Help context identifier of Member is to be stored.

HelpFile is a variable in which the name of the Help file containing HelpCtx is to be stored.

The information about the ActiveX control is retrieved from its ITypeInfo interfaces. For more information, search the OLE.HLP file for ITypeInfo.

GetHelpContext returns False if Member is not found; otherwise, GetHelpContext returns True.


TOleControl.Destroy
 VCL Reference

TOleControl.Destroy

TOleControl	See also

Frees the memory associated with this instance of TOleControl.

destructor Destroy; override;

Description

Do not call Destroy. Instead, call Free, which calls Destroy if this instance of TOleControl is not nil.


TOleControl.GetObjectVerbs
 VCL Reference

TOleControl.GetObjectVerbs

TOleControl

Retrieves the names of the verbs implemented by the ActiveX control.

procedure GetObjectVerbs(List: TStrings);

Description

Use GetObjectVerbs to retrieve the names of the verbs implemented by the ActiveX control.

List is where the names of the verbs are to be stored.


TOleControl.GetPropDisplayString
 VCL Reference

TOleControl.GetPropDisplayString

TOleControl	See also

Returns the display string for an interface for the ActiveX control.

function GetPropDisplayString(DispID: Integer): string;

Description

GetPropDisplayString returns the display string for an interface for the ActiveX control.

DispID is the identifier for the interface. For more information, search the OLE.HLP file for DISPID.

For more information about GetPropDisplayString, search the latest Microsoft Developer Network CD for GetDisplayStrings.


TOleControl.GetEnumPropDesc
 VCL Reference

TOleControl.GetEnumPropDesc

TOleControl

Returns descriptions of the ActiveX control’s properties.

function GetEnumPropDesc(DispID: Integer): TEnumPropDesc;

Description

Use GetEnumPropDesc to return descriptions of the ActiveX control’s properties. GetEnumPropDesc returns the descriptions in a TEnumPropDesc object.


TOleControl.GetPropDisplayStrings
 VCL Reference

TOleControl.GetPropDisplayStrings

TOleControl	See also

Returns the display strings for an interface for the ActiveX control.

procedure GetPropDisplayStrings(DispID: Integer; List: TStrings);

Description

List is where the strings are to be stored.

For more information about GetPropDisplayStrings, search the latest Microsoft Developer Network CD for GetDisplayStrings.


TOleControl.IsCustomProperty
 VCL Reference

TOleControl.IsCustomProperty

TOleControl

Indicates whether an interface for the ActiveX control is a custom property.

function IsCustomProperty(DispID: Integer): Boolean;

Description

Use IsCustomProperty to determine whether an interface for the ActiveX control is a custom property.

DispID is the identifier for the interface. For more information, search the OLE.HLP file for DISPID.

IsCustomProperty returns True if an interface is a custom property; otherwise, IsCustomProperty returns False.


TOleControl.SetBounds
 VCL Reference

TOleControl.SetBounds

TOleControl

Sets the boundaries of the ActiveX control.

procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;

Description

Use SetBounds to set the boundaries of the ActiveX control.

ALeft, ATop, AWidth, and AHeight are the x-coordinate of the upper-left corner, the y-coordinate of the upper-left corner, the width and the height of the ActiveX control.


TOleControl.SetPropDisplayString
 VCL Reference

TOleControl.SetPropDisplayString

TOleControl	See also

Sets the display string for an interface for the ActiveX control.

procedure SetPropDisplayString(DispID: Integer; const Value: string);

Description

Use SetPropDisplayString to set the display string for an interface for the ActiveX control.

DispID is the identifier for the interface. For more information, search the OLE.HLP file for DISPID.

Value is the new display string for the interface.


TOleControl.ShowAboutBox
 VCL Reference

TOleControl.ShowAboutBox

TOleControl

Notifies the ActiveX control to display its About box.

procedure ShowAboutBox;

Description

Use ShowAboutBox to notify the ActiveX control to display its About box.


TOleControl.IsPropPageProperty
 VCL Reference

TOleControl.IsPropPageProperty

TOleControl

Indicates whether an interface for the OCX control is a property page property.

function IsPropPageProperty(DispID: Integer): Boolean;

Description

Use IsPropPageProperty to determine whether an interface for the OCX control is a property page property.

DispID is the identifier for the interface. For more information, search the OLE.HLP file for DISPID.

IsPropPageProperty returns True if an interface is a property page property; otherwise, IsPropPageProperty returns False.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TOleControl


TOleForm
 VCL Reference

TOleForm

Hierarchy	Properties	Methods

TOleForm is an object that provides OLE support for a TForm object.

Unit

OleCtnrs

Description

TOleFrom implements the IOleForm, IOleWindow, IOleInPlaceUIWindow, and IOleInPlaceFrame interfaces, as well as a Delphi-defined interface for internal use. The implementation of the TOleForm object is used internally by the Visual Component Library.


 VCL Reference

TOleForm properties

TOleForm	Alphabetically	Legend

Derived from TInterfacedObject

RefCount


 VCL Reference

TOleForm properties

TOleForm	By object	Legend

RefCount


 VCL Reference

TOleForm methods

TOleForm	Alphabetically	Legend

In TOleForm

Create

Destroy

In TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TOleForm methods

TOleForm	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TOleForm.Create
 VCL Reference

TOleForm.Create

TOleForm	See also

Create creates a new instance of the TOleForm object.

constructor Create(Form: TCustomForm);

Description

Create is used to create a new instance of the TOleForm object. Form is the form upon which to base the new TOleForm object.


TOleForm.Destroy
 VCL Reference

TOleForm.Destroy

TOleForm	See also

Destroy frees the memory associated with this instance of the TOleForm object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free, which calls Destroy if this instance of the TOleForm object is not nil.

Destroy frees private objects allocated and used by this instance of the TOleForm object.


Hierarchy

TObject

TInterfacedObject

TOleForm


TOleServer
 VCL Reference

TOleServer

Hierarchy	Properties	Methods	See also

TOleServer is the base class for components that represent an imported COM server.

Unit

OleServer

Description

TOleServer is the base class for COM servers that are imported by choosing Project|Import Type Library from the IDE. TOleServer introduces several properties and methods that manage the connection to a COM server and for invoking its default events.

Descendants of TOleServer expose the properties, methods, and events of the server CoClass. When an application calls one of the TOleServer descendant’s methods or sets one of its properties, the component automatically establishes a connection to the COM server. You can also connect explicitly by calling the Connect method.

Do not create instances of TOleServer. TOleServer relies on abstract methods to establish and break a connection to the COM server. Instead, use a descendant of TOleServer that wraps the desired server. Numerous TOleServer descendants are provided on the Servers tab of the Component Palette. In addition, you can create your own descendants by importing a server’s type library.


 VCL Reference

TOleServer properties

TOleServer	Alphabetically	Legend

In TOleServer

AutoConnect

ConnectKind

EventDispatch

RemoteMachineName

ServerData

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TOleServer properties

TOleServer	By object	Legend

AutoConnect

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

ConnectKind

DesignInfo

EventDispatch

Name

Owner

RemoteMachineName

ServerData

Tag

VCLComObject


TOleServer.AutoConnect
 VCL Reference

TOleServer.AutoConnect

TOleServer	See also

Specifies whether the component automatically connects to the server.

property AutoConnect: Boolean;

Description

Set AutoConnect to True to specify whether the server should be loaded automatically when the application first starts up. If AutoConnect is False, the application establishes a connection when it calls one of the TOleServer descendant’s methods, sets a property, or calls the Connect method.

Note:	AutoConnect only establishes a connection when the application is first run. Changing the AutoConnect property at runtime has no effect.


TOleServer.ConnectKind
 VCL Reference

TOleServer.ConnectKind

TOleServer	See also

Indicates the type of process to which the TOleServer component establishes a connection.

type TConnectKind = (ckRunningOrNew, ckNewInstance, ckRunningInstance, ckRemote, ckAttachToInterface);

property ConnectKind: TConnectKind;

Description

Set ConnectKind to indicate how the TOleServer component establishes a connection. TOleServer establishes the connection when the application is run (if AutoConnect is True) or when the application calls the Connect (or ConnectTo) method.

The following table lists the possible values:

Value	Meaning

ckRunningOrNew	Attach to a running server or create a new instance of the server.

ckNewInstance	Always create a new instance of the server.

ckRunningInstance	Only attach to a running instance of the server.

ckRemote	Bind to a remote instance of the server. When using this option, you must supply a value for RemoteMachineName.

ckAttachToInterface	Don’t bind to the server. Instead, the application supplies an interface using the ConnectTo method, which is introduced in descendant classes. This option can’t be used with the AutoConnect property.


TOleServer.EventDispatch
 VCL Reference

TOleServer.EventDispatch

TOleServer	See also

Specifies a helper object that enables the TOleServer object to handle server events:

type TServerEventDispatch = class(TObject, IUnknown, IDispatch);

property EventDispatch: TServerEventDispatch;

Description

EventDispatch is used internally by descendant objects that surface the events of a COM server. EventDispatch supports an IDispatch interface, which it uses to allow TOleServer descendants to dispatch events to the appropriate event handler.

TOleServer introduces no events of its own. EventDispatch is used only by descendants that surface events from a COM server.


TOleServer.RemoteMachineName
 VCL Reference

TOleServer.RemoteMachineName

TOleServer	See also

Specifies the machine running the COM server when ConnectKind is ckRemote.

property RemoteMachineName: string;

Description

Use RemoteMachineName when the COM server instance is running remotely on another machine. Specify the name of the machine on which the COM server is running as the value of RemoteMachineName.

Note: RemoteMachineName is only used if ConnectKind is ckRemote. Setting RemoteMachineName to a non-empty string sets ConnectKind to ckRemote.


TOleServer.ServerData
 VCL Reference

TOleServer.ServerData

TOleServer	See also

Encodes information about the COM server to which TOleServer connects.

type

  PServerData = ^TServerData;

  TServerData = record

    ClassID: TGUID;          // CLSID of CoClass

    IntfIID: TGUID;          // IID of default interface

    EventIID: TGUID;         // IID of default source interface

    LicenseKey: Pointer;     // Pointer to license string

    Version: Integer;        // Version of this structure

    InstanceCount: Integer;  // Instances of the Server running

  end;

property ServerData: PServerData;

Description

TOleServer uses ServerData internally to store type library information describing its COM server. Each TOleServer descendant initializes this property in the constructor, specifying the information it needs to establish a connection.


 VCL Reference

TOleServer methods

TOleServer	Alphabetically	Legend

In TOleServer

_AddRef

_Release

Connect

ConnectEvents

Create

Destroy

Disconnect

DisconnectEvents

GetAutoConnect

GetConnectKind

GetServer

InitServerData

InvokeEvent

Loaded

QueryInterface

SetAutoConnect

SetConnectKind

Derived from TComponent

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOleServer methods

TOleServer	By object	Legend

_AddRef

_Release

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Connect

ConnectEvents

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Disconnect

DisconnectEvents

Dispatch

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetAutoConnect

GetConnectKind

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetServer

HasParent

InheritsFrom

InitInstance

InitServerData

InsertComponent

InstanceSize

InvokeEvent

IsImplementorOf

Loaded

MethodAddress

MethodName

NewInstance

QueryInterface

ReferenceInterface

RemoveComponent

SafeCallException

SetAutoConnect

SetConnectKind

SetSubComponent

UpdateAction


TOleServer.Connect
 VCL Reference

TOleServer.Connect

TOleServer	See also

Establishes a connection to the COM server.

procedure Connect; virtual; abstract;

Description

Call Connect to connect the TOleServer component to the COM server it represents. If the AutoConnect property is True, the TOleServer component automatically calls Connect when the application is first run.

Do not use Connect if the value of ConnectKind is ckAttachToInterface. When attaching to an interface, use the ConnectTo method, which is introduced by descendant classes, instead.

If the value of ConnectKind is ckRemote, the RemoteMachineName property must be set before calling Connect.

TOleServer introduces Connect as an abstract method. Descendant classes must override this method to let the TOleServer component connect to a specific type of COM server.


TOleServer.ConnectEvents
 VCL Reference

TOleServer.ConnectEvents

TOleServer	See also

Establishes a connection using the EventDispatch property as an event sink.

procedure ConnectEvents(const Obj: IUnknown);

Description

TOleServer descendants use ConnectEvents internally to implement their event handlers for events on the COM server. If the TOleServer descendant does not expose any server events, ConnectEvents is not used.

The Obj parameter is an interface for the COM server that generates events.


TOleServer.Create
 VCL Reference

TOleServer.Create

TOleServer	See also

Creates and initializes an instance of TOleServer.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate TOleServer at runtime. TOleServer descendants added at design time are instantiated automatically.

Create calls the InitServerData method so that each TOleServer descendant can initialize the ServerData property to reflect the particular COM interface it represents.


TOleServer.Destroy
 VCL Reference

TOleServer.Destroy

TOleServer	See also

Frees an instance of TOleServer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Free method, which checks that the TOleServer reference is not nil, and only then calls Destroy.

Destroy calls the Disconnect method to ensure that the connection is terminated before the TOleServer object gets freed.


TOleServer.Disconnect
 VCL Reference

TOleServer.Disconnect

TOleServer	See also

Terminates the connection to the COM server.

procedure Disconnect; virtual; abstract;

Description

Call Disconnect to terminate a connection formed using the Connect method.

TOleServer introduces Disconnect as an abstract method. Descendant classes must override this method to let the TOleServer component disconnect from a specific type of COM server.


TOleServer.DisconnectEvents
 VCL Reference

TOleServer.DisconnectEvents

TOleServer	See also

Terminates a connection that was established using the ConnectEvents method.

procedure DisconnectEvents(const Obj: Iunknown);

Description

TOleServer descendants use DisconnectEvents internally to terminate the connection established by ConnectEvents. If the TOleServer descendant does not expose any server events, DisconnectEvents is not used.

The Obj parameter is an interface for the COM server that generates events.


TOleServer.GetAutoConnect
 VCL Reference

TOleServer.GetAutoConnect

TOleServer	See also

Returns the value of the AutoConnect property.

function GetAutoConnect: Boolean;

Description

GetAutoConnect is the protected read implementation for the AutoConnect property.


TOleServer.GetConnectKind
 VCL Reference

TOleServer.GetConnectKind

TOleServer	See also

Returns the value of the ConnectKind property.

function GetConnectKind: TConnectKind;

Description

GetConnectKind is the protected read implementation for the ConnectKind property.


TOleServer.GetServer
 VCL Reference

TOleServer.GetServer

TOleServer	See also

Returns an interface for the COM server.

function  GetServer: IUnknown; virtual;

Description

TOleServer descendants call GetServer from the implementation of their Connect methods. GetServer obtains an interface for the COM server described by ServerData. The ConnectKind property indicates how GetServer can obtain the interface.


TOleServer.InitServerData
 VCL Reference

TOleServer.InitServerData

TOleServer	See also

Initializes the ServerData property to reflect the type library information of the COM server.

procedure InitServerData; virtual; abstract;

Description

The TOleServer constructor calls InitServerData to initialize ServerData with information from the COM server’s type library.

InitServerData is an abstract method in TOleServer. Each TOleServer descendant implements this method so that the ServerData property reflects its particular COM server.


TOleServer.InvokeEvent
 VCL Reference

TOleServer.InvokeEvent

TOleServer	See also

Dispatches an event from the COM server to the appropriate event handler.

type

  TDispID = Longint;

  TVariantArray = Array of OleVariant;

procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); virtual;

Description

TOleServer descendants use InvokeEvent internally to link their event handlers to events on the COM server.

DispID is the dispatch ID for the appropriate event handler.

Params passes the parameters of the event handler as an array of OleVariants.

As implemented in TOleServer, InvokeEvent does nothing, because TOleServer has no events. Descendants that surface events from a COM server override this method so that the event sink specified by EventDispatch can pass events on to the appropriate event handlers.


TOleServer.Loaded
 VCL Reference

TOleServer.Loaded

TOleServer	See also

Connects to the COM server when the TOleServer object is first loaded into memory if AutoConnect is True.

procedure Loaded: override;

Description

The VCL streaming system automatically calls Loaded after the TOleServer component is loaded into memory.

Loaded checks the AutoConnect property, and if it is True, calls the Connect method to establish a connection.


TOleServer.QueryInterface
 VCL Reference

TOleServer.QueryInterface

TOleServer	See also

Returns a reference to a specified interface if the OLE server supports that interface.

type HResult = Longint;

function QueryInterface(const IID: TGUID; out Obj): HResult; override;

Description

QueryInterface implements the IUnknown interface method QueryInterface. QueryInterface returns a reference to the interface specified by the IID parameter as the Obj parameter. If the OLE server does not support the interface, the Obj parameter returns nil and QueryInterface returns a nonzero error code.


TOleServer.SetAutoConnect
 VCL Reference

TOleServer.SetAutoConnect

TOleServer	See also

Sets the value of the AutoConnect property.

procedure SetAutoConnect(flag: Boolean);

Description

SetAutoConnect is the protected write implementation for the AutoConnect property.


TOleServer.SetConnectKind
 VCL Reference

TOleServer.SetConnectKind

TOleServer	See also

Sets the value of the ConnectKind property.

procedure SetConnectKind(ck: TConnectKind);

Description

SetConnectKind is the protected write implementation for the ConnectKind property.


TOleServer._AddRef
 VCL Reference

TOleServer._AddRef

TOleServer	See also

Increments the reference count for the number of interface references dependent on the OLE server.

function _AddRef: Integer; stdcall;

Description

_AddRef implements the IUnknown interface method, AddRef, which increments the reference count of objects using the OLE server’s interface. _AddRef returns the resulting value of the reference count.


TOleServer._Release
 VCL Reference

TOleServer._Release

TOleServer	See also

Decrements the reference count for the calling interface on a object.

function _Release: Integer; stdcall;

Description

_Release implements the IUnknown interface method, Release, which decrements the reference count of objects using the OLE server’s interface. If the reference count on the interface falls to 0, the server object is freed from memory.

_Release returns the resulting value of the reference count.


Hierarchy

TObject

TPersistent

TComponent

TOleServer


TOpenDialog
 VCL Reference

 TOpenDialog

Hierarchy	Properties	Methods	Events	Using TOpenDialog	See also

TOpenDialog displays a file-selection dialog.

Unit

Dialogs

Description

TOpenDialog displays a modal Windows dialog box for selecting and opening files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Open, the dialog closes and the selected file or files are stored in the Files property.


 VCL Reference

TOpenDialog properties

TOpenDialog	Alphabetically	Legend

In TOpenDialog

DefaultExt

FileEditStyle

FileName

Files

Filter

FilterIndex

HistoryList

InitialDir

Options

OptionsEx

Title

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TOpenDialog properties

TOpenDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DefaultExt

DesignInfo

FileEditStyle

FileName

Files

Filter

FilterIndex

Handle

HelpContext

HistoryList

InitialDir

Name

Options

OptionsEx

Owner

Tag

Title

VCLComObject


TOpenDialog.DefaultExt
 VCL Reference

TOpenDialog.DefaultExt

TOpenDialog 	Example

Specifies a default file extension.

property DefaultExt: String;

Description

DefaultExt specifies a file extension that is appended automatically to the selected file name, unless the selected file name already includes a registered extension. If the user selects a file name with an extension that is unregistered, DefaultExt is appended to the unregistered extension.

Extensions longer than three characters are not supported. Do not include the period (.) that divides the file name and its extension.


TOpenDialog:FileEditStyle
 VCL Reference

TOpenDialog.FileEditStyle

TOpenDialog

Determines the style of the file-selection dialog. (Obsolete.)

type TFileEditStyle = (fsEdit, fsComboBox);

property FileEditStyle: TFileEditStyle;

Description

FileEditStyle is maintained for compatibility with older versions of the VCL.


TOpenDialog.FileName
 VCL Reference

TOpenDialog.FileName

TOpenDialog	See also 	Example

Indicates the name and directory path of the last file selected.

property FileName: TFileName;

Description

The FileName property returns the name and complete directory path of the most recently selected file. The value of FileName is the same as the first item in the Files property.

To make a file name appear by default in the dialog’s edit box, assign a value to FileName in the Object Inspector or in program code. Programmatic changes to FileName have no effect while the dialog is active.

if OpenDialog1.Execute then

  Memo1.Lines.LoadFromFile(OpenDialog1.FileName)

else

  Memo1.Lines.Clear;


TOpenDialog.Files
 VCL Reference

TOpenDialog.Files

TOpenDialog	See also	Example

Returns a list of the selected file names.

property Files: TStrings;

Description

FileName is a string list that contains each selected file name with its full directory path. (To let users select multiple file names, set the ofAllowMultiSelect flag in Options.) Use properties and methods for string lists to traverse this list of files and read individual items.

The example below assigns the list of files in Files to the Items property of a TListBox component.

ListBox1.Items.Assign(OpenDialog1.Files);


TOpenDialog.Filter
 VCL Reference

TOpenDialog.Filter

TOpenDialog	See also 	Example

Determines the file masks (filters) available in the dialog.

property Filter: String;

Description

The file-selection dialog includes a drop-down list of file types under the edit box. When the user picks a file type from the list, only files of the selected type are displayed in the dialog.

To configure file masks at design time, click on the ellipsis marks (...) to the right of the Filter property in the Object Inspector. This opens the Filter editor. In the left column of the Filter editor, under Filter Name, type a brief description of each file type that will be available at runtime. In the right column, under Filter, type the file mask corresponding to each description. For example, the description “Text files” might appear to the left of the mask “*.txt”, and the description “Pascal source files” might appear to the left of the mask “*.pas”. Since the description appears in the drop-down list at runtime, it is often helpful to show the mask explicitly in the description (for example, “Text files (*.txt)”).

To create file masks in program code, assign a value to the Filter property that consists of a description and a mask separated by a vertical bar (pipe) character. Do not include spaces around the vertical bar. For example,

OpenDialog1.Filter := 'Text files (*.txt)|*.TXT';

Multiple filters should be separated by vertical bars. For example,

OpenDialog1.Filter := 'Text files (*.txt)|*.TXT|Pascal files (*.pas)|*.PAS';

To include multiple masks in a single filter, separate the masks with semicolons. This works both in the Object Inspector and in program code. For example,

OpenDialog1.Filter := 'Pascal files|*.PAS;*.DPK;*.DPR';

If no value is assigned to Filter, the dialog displays all file types.


TOpenDialog.FilterIndex
 VCL Reference

TOpenDialog.FilterIndex

TOpenDialog	See also	Example

Determines which filter is selected by default when the dialog opens.

property FilterIndex: Integer;

Description

FilterIndex determines which of the file types in Filter is selected by default when the dialog opens. Set FilterIndex to 1 to choose the first file type in the list as the default, or set FilterIndex to 2 to choose the second file type as the default, and so forth. If the value of FilterIndex is out or range, the first file type listed in Filter is the default.


TOpenDialog.HistoryList
 VCL Reference

TOpenDialog.HistoryList

TOpenDialog	See also

property HistoryList: TStrings;

Description

HistoryList is maintained for compatibility with older versions of Delphi.


TOpenDialog.InitialDir
 VCL Reference

TOpenDialog.InitialDir

TOpenDialog	See also

Determines the current directory when the dialog opens.

property InitialDir: String;

Description

InitialDir determines the default directory displayed in the file-selection dialog when it opens. For example, to point the dialog at the WINDOWS\SYSTEM directory, set the value of InitialDir to C:\WINDOWS\SYSTEM.If no value is assigned to InitialDir, or if the specified directory does not exist, the initial directory is controlled by the global ForceCurrentDirectory variable. If ForceCurrentDirectory is true, the dialog opens with the current working directory displayed. Otherwise, the dialog opens with either the current working directory or the My Documents directory, depending on the version of Windows.


TOpenDialog.Options
 VCL Reference

TOpenDialog.Options

TOpenDialog	See also	Example

Determines the appearance and behavior of the file-selection dialog.

type

TOpenOption = (ofReadOnly, ofOverwritePrompt, ofHideReadOnly, ofNoChangeDir, ofShowHelp, ofNoValidate, ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofCreatePrompt, ofShareAware, ofNoReadOnlyReturn, ofNoTestFileCreate, ofNoNetworkButton, ofNoLongNames, ofOldStyleDialog, ofNoDereferenceLinks, ofEnableIncludeNotify, ofEnableSizing, ofDontAddToRecent, ofForceShowHidden);

TOpenOptions = set of TOpenOption;

property Options: TOpenOptions;

Description

Use the Options property to customize the appearance and functionality of the dialog. The possible values of Options are

Value	Meaning

ofReadOnly	Selects the Open As Read Only check box by default when the dialog opens.

ofOverwritePrompt	Generates a warning message if the user tries to select a file name that is already in use, asking whether to overwrite the existing file. (Use with TSaveDialog and TSavePictureDialog.)

ofHideReadOnly	Removes the Open As Read Only check box from the dialog.

ofNoChangeDir	After the user clicks OK, resets the current directory to whatever it was before the file-selection dialog opened.

ofShowHelp	Displays a Help button in the dialog.

ofNoValidate	Disables checking for invalid characters in file names. Allows selection of file names with invalid characters.

ofAllowMultiSelect	Allows users to select more than one file in the dialog.

ofExtensionDifferent	This flag is turned on at runtime whenever the selected filename has an extension that differs from DefaultExt. If you use this flag in an application, remember to reset it.

ofPathMustExist	Generates an error message if the user tries to select a file name with a nonexistent directory path.

ofFileMustExist	Generates an error message if the user tries to select a nonexistent file. (only applies to Open dialogs).

ofCreatePrompt	Generates a warning message if the user tries to select a nonexistent file, asking whether to create a new file with the specified name.

ofShareAware	Ignores sharing errors and allows files to be selected even when sharing violations occur.

ofNoReadOnlyReturn	Generates an error message if the user tries to select a read-only file.

ofNoTestFileCreate	Disables checking for network file protection and inaccessibility of disk drives. Applies only when the user tries to save a file in a create-no-modify shared network directory.

ofNoNetworkButton	Removes the Network button (which opens a Map Network Drive dialog) from the file-selection dialog. Applies only if the ofOldStyleDialog flag is on.

ofNoLongNames	Displays 8.3-character file names only. This option is only valid if Options also includes ofOldStyleDialog.

ofOldStyleDialog	Creates the older style of file-selection dialog.

ofNoDereferenceLinks	Disables dereferencing of Windows shortcuts. If the user selects a shortcut, assigns to FileName the path and file name of the shortcut itself (the .LNK file), rather than the file linked to the shortcut.

ofEnableIncludeNotify	(Windows 2000 and later.) Sends CDN_INCLUDEITEM notification messages to the dialog when the user opens a folder. A notification is sent for each item in the newly opened folder. You can use these messages to control which items appear in the folder’s item list.

ofEnableSizing	(Windows 98 and later) Lets the Explorer-style dialog be resized with the mouse or keyboard. By default, the dialog allows this resizing regardless of the value of this option. It is only required if you provide a hook procedure or custom template. (Old style dialogs never permit resizing.)

ofDontAddToRecent	Prevents the file from being added to the list of recently opened files.

ofShowHidden	Ensures that hidden files are visible in the dialog.


TOpenDialog.OptionsEx
 VCL Reference

TOpenDialog.OptionsEx

TOpenDialog	See also

More descriptions which determine the appearance and behavior of the file-selection dialog.

type

TOpenOptionEx = (ofExNoPlacesBar);

TOpenOptionsEx = set of TOpenOptionEx;

property OptionsEx: TOpenOptionsEx

Description

Use the OptionsEx property to further customize the file open dialog beyond the options covered by the Options property. The new options are:

Value	Meaning

ofExNoPlacesBar	Prohibits a places bar (a bar which contains shortcuts to places like the History folder and the Desktop) from appearing in the dialog.


TOpenDialog.Title
 VCL Reference

TOpenDialog.Title

TOpenDialog 	Example

Specifies the text in the dialog’s title bar.

property Title: String;

Description

Use Title to specify the text that appears in the file-selection dialog’s title bar. If no value is assigned to Title, the dialog has the title "Open".


 VCL Reference

TOpenDialog events

TOpenDialog	Alphabetically	Legend

In TOpenDialog

OnCanClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnTypeChange

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TOpenDialog events

TOpenDialog	By object	Legend

OnCanClose

OnClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnShow

OnTypeChange


TOpenDialog.OnCanClose
 VCL Reference

TOpenDialog.OnCanClose

TOpenDialog 	See also

Occurs when the user tries to close the dialog without canceling.

type TCloseQueryEvent = procedure(Sender: TObject; var CanClose: Boolean) of object;

property OnCanClose: TCloseQueryEvent;

Description

Write an OnCanClose event handler to provide custom validation of the value of FileName. File selection dialogs provide a number of built-in validations, such as checking for invalid characters, prompting for confirmation before overwriting, checking whether a file or path exists, and so on. These validations can be specified using the Options property. However, applications can provide additional validation of file names in an OnCanClose event handler.

Set the CanClose parameter to false to prevent the dialog from closing. The OnCanClose event handler is responsible for telling the user why the dialog doesn’t close.

Note:	OnCanClose does not occur under Windows NT 3.51 unless the new shell is installed.


TOpenDialog.OnFolderChange
 VCL Reference

TOpenDialog.OnFolderChange

TOpenDialog

Occurs when a directory is opened or closed from the dialog.

property OnFolderChange: TNotifyEvent;

Description

The OnFolderChange event occurs when the user changes the directory whose contents are displayed in the dialog. This can happen when the user double-clicks on a directory, clicks the Up arrow, or uses the list box at the top of the dialog to navigate through the directory structure.


TOpenDialog:OnIncludeItem
 VCL Reference

TOpenDialog.OnIncludeItem

TOpenDialog	See also

Occurs before the dialog adds a file to the file list box.

type

  _OFNOTIFYEXA = packed record

    hdr: TNMHdr;

    lpOFN: POpenFilename;

    psf: IShellFolder;

    pidl: Pointer;

  end;

  TIncludeItemEvent = procedure(const OFN:TOFNotifyEx; var Include: Boolean) of object;

property OnIncludeItem: TIncludeItemEvent;

Description

Write an OnIncludeItem event handler to programmatically filter the items that appear in the shell folder’s item list.  The OFN parameter is a Windows structure that includes information about the shell folder. The pidl field points to the item identifier list of the item being added. Set the Include parameter to False to prevent this item from being added to the list.

This event does not occur unless the Options property includes ofEnableIncludeNotify.


TOpenDialog:OnSelectionChange
 VCL Reference

TOpenDialog.OnSelectionChange

TOpenDialog	See also

Occurs when file names displayed in the dialog are changed.

property OnSelectionChange: TNotifyEvent;

Description

The OnSelectionChange event occurs when the user does something to change the list displayed in the dialog. This can include opening the file-selection dialog, highlighting a file or directory, selecting a new filter, selecting a new directory, or creating a new folder.


TOpenDialog:OnTypeChange
 VCL Reference

TOpenDialog.OnTypeChange

TOpenDialog	See also

Occurs when the file types displayed in the dialog are changed.

property OnSelectionChange: TNotifyEvent;

Description

The OnTypeChange event occurs when the user selects a new filter from the Files of Type list box at the bottom of the dialog.


 VCL Reference

TOpenDialog methods

TOpenDialog	Alphabetically	Legend

In TOpenDialog

Create

Destroy

Execute

GetStaticRect

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOpenDialog methods

TOpenDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetStaticRect

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TOpenDialog.Create
 VCL Reference

TOpenDialog.Create

TOpenDialog	See also

Creates and initializes a TOpenDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TOpenDialog instance, but the new dialog does not appear on the form at runtime until the Execute method is called.

After calling the inherited constructor, Create performs the following actions:

Initializes a TStringList object for its Files property.

Initializes a TStringList object for its Filters property.

Sets the FilterIndex property to -1.


TOpenDialog.Destroy
 VCL Reference

TOpenDialog.Destroy

TOpenDialog	See also

Destroys the TOpenDialog and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the TOpenDialog reference is not nil before calling Destroy.

As the dialog is destroyed, it:

Frees the TStringList object in its Files property.

Frees the TStringList object in its Filters property.


TOpenDialog:Execute
 VCL Reference

TOpenDialog.Execute

TOpenDialog	See also	Example

Displays the file-selection dialog.

function Execute: Boolean; override;

Description

Execute opens the file-selection dialog, returning true when the user selects a file and clicks Open. If the user clicks Cancel, Execute returns false.

if OpenDialog1.Execute then

  Memo1.Lines.LoadFromFile(OpenDialog1.FileName)

else

  Memo1.Lines.Clear;


TOpenDialog:GetStaticRect
 VCL Reference

TOpenDialog.GetStaticRect

TOpenDialog	See also 	Example

Returns the coordinates of the reserved area of the dialog box.

function GetStaticRect: TRect; virtual;

Description

GetStaticRect is provided for components that descend from TOpenDialog and require the placement of new controls alongside the standard ones inherited from the parent class. For Explorer-style dialogs (running under Windows 95 or NT 4.0), GetStaticRect returns the size and location of the standard controls within the dialog. For older versions of Windows, or if ofOldStyleDialog is enabled in Options, GetStaticRect returns the client dimensions of the entire dialog box.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TOpenDialog


TOpenPictureDialog
 VCL Reference

 TOpenPictureDialog

Hierarchy	Properties	Methods	Events	See also

TOpenPictureDialog displays a graphics-file selection dialog.

Unit

ExtDlgs

Description

TOpenPictureDialog displays a modal Windows dialog box for selecting and opening graphics files. This component is just like TOpenDialog, except that it includes a rectangular preview region. If the selected image can be read by TPicture, it is displayed in the preview region; supported file types include bitmap (.BMP), icon (.ICO), Windows metafile (.WMF), and enhanced Windows metafile (.EMF). If the selected image cannot be displayed, “(None)” appears in the preview region.

If the user selects a file of an unrecognized type, TPicture raises an EInvalidGraphic exception.


 VCL Reference

TOpenPictureDialog properties

TOpenPictureDialog	Alphabetically	Legend

Derived from TOpenDialog

DefaultExt

FileEditStyle

FileName

Files

Filter

FilterIndex

HistoryList

InitialDir

Options

OptionsEx

Title

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TOpenPictureDialog properties

TOpenPictureDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DefaultExt

DesignInfo

FileEditStyle

FileName

Files

Filter

FilterIndex

Handle

HelpContext

HistoryList

InitialDir

Name

Options

OptionsEx

Owner

Tag

Title

VCLComObject


 VCL Reference

TOpenPictureDialog events

TOpenPictureDialog	Alphabetically	Legend

Derived from TOpenDialog

OnCanClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnTypeChange

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TOpenPictureDialog events

TOpenPictureDialog	By object	Legend

OnCanClose

OnClose

OnFolderChange

OnIncludeItem

OnSelectionChange

OnShow

OnTypeChange


 VCL Reference

TOpenPictureDialog methods

TOpenPictureDialog	Alphabetically	Legend

In TOpenPictureDialog

Create

Execute

Derived from TOpenDialog

Destroy

GetStaticRect

Derived from TCommonDialog

DefaultHandler

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOpenPictureDialog methods

TOpenPictureDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetStaticRect

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

MethodAddress

MethodName

NewInstance

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TOpenPictureDialog.Create
 VCL Reference

TOpenPictureDialog.Create

TOpenPictureDialog	See also 	Example

Creates and initializes a TOpenPictureDialog instance.

constructor Create(AOwner: TComponent); override;

Description

The Create method generates a TOpenPictureDialog instance, but the dialog does not appear at runtime until the Execute method is called. Create initializes the Filter property by defining a filter for each file type that TPicture supports.


TOpenPictureDialog.Destroy
 VCL Reference

TOpenPictureDialog.Destroy

TOpenPictureDialog	See also

Destroys the TOpenPictureDialog and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Call Free instead. Free verifies that the object reference is not nil before calling Destroy.


TOpenPictureDialog.Execute
 VCL Reference

TOpenPictureDialog.Execute

TOpenPictureDialog

Displays the file-selection dialog.

function Execute: Boolean; override;

Description

Execute opens the file-selection dialog, returning True when the user selects a file and clicks Open. If the user clicks Cancel, Execute returns False.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TOpenDialog

TOpenPictureDialog


TOrderedList
 VCL Reference

TOrderedList

Hierarchy	Properties	Methods	See also

TOrderedList maintains an array of pointers that must be accessed in serial order.

Unit

Contnrs

Description

TOrderedList is an abstract class that represents a list. Descendant classes like TStack and TQueue override the protected PushItem method to determine the order in which to access items.


 VCL Reference

TOrderedList properties

TOrderedList	Alphabetically	Legend

In TOrderedList

List


 VCL Reference

TOrderedList properties

TOrderedList	By object	Legend

List


TOrderedList.List
 VCL Reference

TOrderedList.List

TOrderedList

Identifies the internal list used to store and manage the items in the ordered list.

property List: TList;

Description

Applications can’t use the protected List property. It is an internal TList object owned by TOrderedList, which stores and manages the items in the ordered list.


 VCL Reference

TOrderedList methods

TOrderedList	Alphabetically	Legend

In TOrderedList

AtLeast

Count

Create

Destroy

Peek

PeekItem

Pop

PopItem

Push

PushItem

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TOrderedList methods

TOrderedList	By object	Legend

AfterConstruction

AtLeast

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Peek

PeekItem

Pop

PopItem

Push

PushItem

SafeCallException


TOrderedList.AtLeast
 VCL Reference

TOrderedList.AtLeast

TOrderedList	See also

Checks the size of the list.

function AtLeast(ACount: Integer): Boolean;

Description

Call AtLeast to verify the size of the list. AtLeast returns True if the number of items in the list is greater than or equal to ACount.


TOrderedList.Count
 VCL Reference

TOrderedList.Count

TOrderedList	See also

Returns the size of the list.

function Count: Integer;

Description

Count returns the number of items in the list.


TOrderedList.Create
 VCL Reference

TOrderedList.Create

TOrderedList

Creates a TOrderedList instance.

constructor Create;

Description

Create generates a new list.


TOrderedList.Destroy
 VCL Reference

TOrderedList.Destroy

TOrderedList	See also

Destroys the TOrderedList instance.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, call Free. Free verifies that the TOrderedList reference is not nil, and only then calls Destroy.

Destroy frees the memory used to store the TOrderedList instance. It does not free the memory pointed to by the items in the list.


TOrderedList.Peek
 VCL Reference

TOrderedList.Peek

TOrderedList	See also

Returns a pointer to the next item in the list.

function Peek: Pointer;

Description

Call Peek to access the list without removing an item. Peek returns a pointer to the next item in the list.

Each TOrderedList descendant implements Peek to return a specific item from the list. For example, TQueue returns the item that was added first, while TStack returns the item that was added last.

To remove an item from the list, call Pop.


TOrderedList.PeekItem
 VCL Reference

TOrderedList.PeekItem

TOrderedList	See also

Returns a pointer to the next item in the list.

function PeekItem: Pointer; virtual;

Description

The protected PeekItem method provides the underlying implementation for the Peek method. It returns the last item in the list specified by the List property.

Override this method to return a different item in descendant classes that do not maintain the list in reverse output order.


TOrderedList.Pop
 VCL Reference

TOrderedList.Pop

TOrderedList	See also

Removes and returns the next item in the list.

function Pop: Pointer;

Description

Call Pop to retrieve an item from the list. Pop removes the next item from the list, then returns a pointer to the deleted item.

Each TOrderedList descendant implements Pop to remove and return a specific item from the list. For example, TQueue returns the item that was added first, while TStack returns the item that was added last.

To access the list without removing an item, call Peek.


TOrderedList.PopItem
 VCL Reference

TOrderedList.PopItem

TOrderedList	See also

Removes and returns a pointer to the next item in the list.

function PopItem: Pointer; virtual;

Description

The protected PopItem method provides the underlying implementation for the Pop method. It removes the last item from the list specified by the List property and returns a pointer to the deleted item.

Override this method to remove and return a different item in descendant classes that do not maintain the list in reverse output order.


TOrderedList.Push
 VCL Reference

TOrderedList.Push

TOrderedList	See also

Adds an item to the list.

procedure Push(AItem: Pointer): Pointer;

Description

Call Push to add an item to the list. Push returns a reference to the item that was just added (AItem).


TOrderedList.PushItem
 VCL Reference

TOrderedList.PushItem

TOrderedList	See also

Adds an item to the list.

procedure PushItem(AItem: Pointer); virtual; abstract;

Description

The protected PushItem method provides the underlying implementation for the Push method. In TOrderedList, PushItem has no implementation (it is abstract).

Descendant classes override this method to add items to the list specified by the List property. Each descendant class adds items so as to maintain the list in reverse output order. In TStack, items are added to the end of the list (so that the list is last-in first-out). In TQueue, items are added to the beginning (so that the list is first-in first-out).


Hierarchy

TObject

TOrderedList


TOutline
 VCL Reference

 TOutline

Hierarchy	Properties	Methods	Events	See also

TOutline is a multilevel outline that displays the values of TOutlineNode objects.

Unit

Outline

Description

Use an outline to visually organize information in a hierarchical tree. Each item in an outline is contained in a TOutlineNode object. Outline controls allow an application to manage a hierarchy of outline nodes, including the ability to control the appearance and layout of those nodes and the ability to expand or collapse branches of the outline tree.

TOutline is provided primarily for backward compatibility. New applications should use TTreeView instead.


 VCL Reference

TOutline properties

TOutline	Alphabetically	Legend

Derived from TCustomOutline

ItemCount

ItemHeight

Items

ItemSeparator

Lines

Options

OutlineStyle

PictureClosed

PictureLeaf

PictureMinus

PictureOpen

PicturePlus

SelectedItem

Style

Derived from TCustomGrid

BorderStyle

Row

ScrollBars

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TOutline properties

TOutline	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderStyle

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemCount

ItemHeight

Items

ItemSeparator

Left

Lines

LRDockWidth

Name

Options

OutlineStyle

Owner

Parent

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PictureClosed

PictureLeaf

PictureMinus

PictureOpen

PicturePlus

PopupMenu

Row

ScrollBars

SelectedItem

ShowHint

Showing

Style

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TOutline events

TOutline	Alphabetically	Legend

Derived from TCustomOutline

OnCollapse

OnDrawItem

OnExpand

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TOutline events

TOutline	By object	Legend

OnClick

OnCollapse

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnDrawItem

OnEndDock

OnEndDrag

OnEnter

OnExit

OnExpand

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TOutline methods

TOutline	Alphabetically	Legend

Derived from TCustomOutline

Add

AddChild

AddChildObject

AddObject

BeginUpdate

Clear

Create

Delete

Destroy

EndUpdate

FullCollapse

FullExpand

GetDataItem

GetItem

GetNodeDisplayWidth

GetTextItem

GetVisibleNode

Insert

InsertObject

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

SetUpdateState

Derived from TCustomGrid

MouseCoord

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TOutline methods

TOutline	By object	Legend

Add

AddChild

AddChildObject

AddObject

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BeginUpdate

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Delete

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

EndUpdate

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

FullCollapse

FullExpand

GetControlsAlignment

GetDataItem

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

GetNodeDisplayWidth

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextItem

GetTextLen

GetVisibleNode

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

Insert

InsertComponent

InsertControl

InsertObject

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

LoadFromFile

LoadFromStream

ManualDock

ManualFloat

MethodAddress

MethodName

MouseCoord

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

SetUpdateState

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGrid

TCustomOutline

TOutline


OutlineError
 VCL Reference

OutlineError

Hierarchy	Methods	See also

OutlineError is a special exception class for invalid outline-node indexes.

Unit

Outline

Description

OutlineError is raised when an application cannot access a specified outline node. In most cases, this occurs because the index used is invalid.

OutlineError is raised internally to abort look-ups of outline components. Because it does not descend from Exception, it never appears at runtime—even if the debugger is set to break on exceptions. Thus it is a useful tool for aborting deep recursions.

Note:	OutlineError is raised by the TOutline component, which is maintained for compatibility with older versions of Delphi only.


 VCL Reference

OutlineError methods

OutlineError	Alphabetically	Legend

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

OutlineError methods

OutlineError	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


Hierarchy

TObject

OutlineError


TOutlineNode
 VCL Reference

TOutlineNode

Hierarchy	Properties	Methods	See also

TOutlineNode represents a node in a TCustomOutline object.

Unit

Outline

Description

Use TOutlineNode to describe a node in a Win 3.1 outline. Each outline node appears as a line, or row, of the outline. An outline node can have from 0 to 16368 subnodes, which are subordinate to the parent node in the outline structure.


 VCL Reference

TOutlineNode properties

TOutlineNode	Alphabetically	Legend

In TOutlineNode

Data

Expanded

FullPath

HasItems

Index

IsVisible

Level

Parent

Text

TopItem


 VCL Reference

TOutlineNode properties

TOutlineNode	By object	Legend

Data

Expanded

FullPath

HasItems

Index

IsVisible

Level

Parent

Text

TopItem


TOutlineNode.Data
 VCL Reference

TOutlineNode.Data

TOutlineNode	See also

Points to application-specific data associated with the node.

property Data: Pointer;

Description

Use Data to associate an arbitrary value with a node in an outline. For example, if the outline represents the table of contents to an electronic document, Data could point to an object that provides jump information for accessing the section of the document named by the node.

The Data property is usually described by the Text property, which is displayed in the rendered image of the node.


TOutlineNode.Expanded
 VCL Reference

TOutlineNode.Expanded

TOutlineNode	See also

Determines whether descendants of the outline node are displayed.

property Expanded: Boolean;

Description

Set Expanded to True to display all subnodes of a node. When an outline node is expanded, its descendants are displayed and, depending on the OutlineStyle property of the outline in which the node is contained, the minus picture or open picture is displayed.

Set Expanded to False to collapse the node. When an outline node is collapsed, its descendants are hidden and, depending on the OutlineStyle property of the outline in which the node is contained, the plus picture or closed picture is displayed.

Expanded is not meaningful for nodes that have no descendants.


TOutlineNode.FullPath
 VCL Reference

TOutlineNode.FullPath

TOutlineNode	See also

Describes an outline node, using its text and the text of all ancestor nodes in the outline.

property FullPath: string;

Description

Read FullPath to obtain a description of the entire branch of the outline leading to the outline node. FullPath consists of the values of the Text properties of all outline items, starting with the text of the node at the first level and traversing the outline down to the outline node. The string specified as the ItemSeparator property of the outline separates the text for each node in the path.


TOutlineNode.HasItems
 VCL Reference

TOutlineNode.HasItems

TOutlineNode	See also

Indicates whether the outline node has any subnodes.

property HasItems: Boolean;

Description

Read HasItem to determine whether the outline node is a leaf node. Depending on the OutlineStyle property of the outline that contains the node, leaf nodes may appear with the leaf bitmap. If the node is not a leaf, subnodes appear below and indented from the node when it is expanded.

HasItem returns True if the node has any descendants, even if the node is collapsed and the descendants are not visible. HasItem returns False if the node is a leaf node.


TOutlineNode.Index
 VCL Reference

TOutlineNode.Index

TOutlineNode	See also

Identifies the node in the Items array maintained by the outline.

property Index: LongInt;

Description

Read Index to determine the row of the outline where the node appears. The first node has an Index value of 1, and subsequent nodes are indexed sequentially. If a node has subnodes, the Index value of the parent node is one less than the Index value of its first descendant.

When nodes in the outline are added, moved, or deleted, the values of the Index properties of all subsequent nodes must be recalculated to be valid. Sometimes, the recalculation of indexes is deferred until all changes to the nodes are complete. To ensure that the value of Index is valid, call the SetUpdateState method of the outline that contains the node.


TOutlineNode.IsVisible
 VCL Reference

TOutlineNode.IsVisible

TOutlineNode	See also

Indicates whether the outline node is visible in the outline.

property IsVisible: Boolean;

Description

Read IsVisible to determine whether the node is part of the current image of the outline. A node is visible if it is on level 1 or if all its parents are expanded.

Note:	Do not confuse IsVisible with the Visible property of TControl objects. Outline nodes are not controls, but merely helper objects that describe nodes for an outline control. IsVisible indicates whether a node is visible because its parents are expanded or collapsed. It does not provide information about whether the node has been scrolled out of view, or even if the outline is not visible.


TOutlineNode.Level
 VCL Reference

TOutlineNode.Level

TOutlineNode	See also

Indicates the level of indentation of a node within the outline.

property Level: Cardinal;

Description

The value of Level is 1 for nodes that directly descend from the root of the outline (the top level). The value of Level is 2 for their children, and so on.


TOutlineNode.Parent
 VCL Reference

TOutlineNode.Parent

TOutlineNode	See also

Identifies the immediate ancestor of the node.

property Parent: TOutlineNode;

Description

Read Parent to find the parent of an outline node. A parent node is one level higher and contains the child node as a subnode.


TOutlineNode.Text
 VCL Reference

TOutlineNode.Text

TOutlineNode	See also

Specifies the string that identifies the outline node.

property Text: string;

Description

Use Text to determine the string that is displayed in the outline to represent the node.


TOutlineNode.TopItem
 VCL Reference

TOutlineNode.TopItem

TOutlineNode	See also

Indicates which outline node is the topmost ancestor of a node.

property TopItem: LongInt;

Description

Read TopItem to determine the first node in the branch of the outline tree that contains the outline node. The TopItem property specifies the Index value of the level 1 ancestor of the outline node. For a node on level 1, TopItem has the same value as the Index property.


 VCL Reference

TOutlineNode methods

TOutlineNode	Alphabetically	Legend

In TOutlineNode

ChangeLevelBy

Collapse

Create

Destroy

Expand

FullExpand

GetDisplayWidth

GetFirstChild

GetLastChild

GetNextChild

GetPrevChild

MoveTo

Derived from TPersistent

Assign

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TOutlineNode methods

TOutlineNode	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ChangeLevelBy

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Collapse

Create

DefaultHandler

Destroy

Dispatch

Expand

FieldAddress

Free

FreeInstance

FullExpand

GetDisplayWidth

GetFirstChild

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLastChild

GetNamePath

GetNextChild

GetPrevChild

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

MoveTo

NewInstance

SafeCallException


TOutlineNode.Destroy
 VCL Reference

TOutlineNode.Destroy

TOutlineNode	See also

Frees the memory associated with the TOutlineNode object.

destructor Destroy; override;

Description

Do not call Destroy directly. The preferred method of deleting nodes is to use the Delete method of the containing outline component.


TOutlineNode.ChangeLevelBy
 VCL Reference

TOutlineNode.ChangeLevelBy

TOutlineNode	See also

Changes the level of an outline node.

procedure ChangeLevelBy(Value: TChangeRange);

Description

Call ChangeLevelBy to move a node up or down a branch in the outline. Specify a Value parameter value of -1 to move up (toward the root) one level. Specify a Value parameter value of 1 to move down (away from the root) one level.

When moving up one level, an item becomes the next sibling of its former parent. When moving down one level, an item becomes the last child of its former prior sibling.

Nodes at the first level can not be moved up, as they have no parent. The first node in the outline can not be moved down either, as it has no prior sibling.

Note:	Before calling ChangeLevelBy, be sure that the node has the appropriate number of parents or that the appropriate prior siblings exist.


TOutlineNode.Collapse
 VCL Reference

TOutlineNode.Collapse

TOutlineNode	See also

Collapses an outline item.

procedure Collapse;

Description

Collapse sets the Expanded property to False. When an outline node is collapsed, its descendants are hidden and, depending on the OutlineStyle property of the outline in which the node is contained, the plus picture or closed picture is displayed.

Collapse does nothing to nodes that have no descendants.


TOutlineNode.Expand
 VCL Reference

TOutlineNode.Expand

TOutlineNode	See also

Expands an outline item.

procedure Expand;

Description

Expand sets the Expanded property to True. When an outline node is expanded, its descendants are displayed and, depending on the OutlineStyle property of the outline in which the node is contained, the minus picture or open picture is displayed.

Expand does nothing to nodes that have no descendants.

Note:	Expand only ensures that the immediate children of a node are visible. To expand all descendants of a node, use the FullExpand method.


TOutlineNode.FullExpand
 VCL Reference

TOutlineNode.FullExpand

TOutlineNode	See also

Expands an outline node and all its descendants.

procedure FullExpand;

Description

Use FullExpand to expand all the nodes in the subtree of the outline rooted at the outline node. FullExpand sets the Expanded property of the node and all its descendants to True.


TOutlineNode.GetDisplayWidth
 VCL Reference

TOutlineNode.GetDisplayWidth

TOutlineNode	See also

Returns the distance, in pixels, from the left edge of the outline to the right edge of the outline node.

function GetDisplayWidth: Integer;

Description

Call GetDisplayWidth to determine the length of the line in the outline that contains the outline node. GetDisplayWidth adjusts for the lines and bitmaps specified by the OutlineStyle property of the outline.


TOutlineNode.GetFirstChild
 VCL Reference

TOutlineNode.GetFirstChild

TOutlineNode	See also

Returns the Index value of the first subnode.

function GetFirstChild: LongInt;

Description

Call GetFirstChild to locate the first subnode of a node when traversing the outline tree. If the node has no descendants, GetFirstChild returns -1.


TOutlineNode.GetLastChild
 VCL Reference

TOutlineNode.GetLastChild

TOutlineNode	See also

Returns the Index value of the last subnode.

function GetLastChild: LongInt;

Description

Call GetLastChild to locate the last subnode of a node. If the node has no descendants, GetLastChild returns -1.


TOutlineNode.GetNextChild
 VCL Reference

TOutlineNode.GetNextChild

TOutlineNode	See also

Returns the Index value of the next child of an outline node.

function GetNextChild(Value: LongInt): LongInt;

Description

Call GetNextChild to obtain the index of the next immediate descendant of a node, following the child node with the index given by the Value parameter. If the child node indicated by Value has no next sibling, or if the child node indicated by Value is not an immediate descendant of the outline node, GetNextChild returns -1.

Index values reflect a depth-first traversal of the outline. Thus, the node returned by GetNextChild is not simply the node with an index of Value+1, unless the node with index Value has no descendants. GetNextChild allows a breadth-first traversal of the outline.


TOutlineNode.GetPrevChild
 VCL Reference

TOutlineNode.GetPrevChild

TOutlineNode	See also

Returns the Index value of the previous child of an outline node.

function GetPrevChild(Value: LongInt): LongInt;

Description

Call GetPrevChild to obtain the index of the previous immediate descendant of a node, preceding the child node with the index given by the Value parameter. If the child node indicated by Value has no prior sibling, or if the child node indicated by Value is not an immediate descendant of the outline node, GetPrevChild returns -1.

Index values reflect a depth-first traversal of the outline. Thus, the previous sibling of the child node indicated by Value is not simply one less than Value, unless that previous sibling has no descendants.


TOutlineNode.MoveTo
 VCL Reference

TOutlineNode.MoveTo

TOutlineNode	See also

Moves an outline node from one location within the outline to another.

procedure MoveTo(Destination: LongInt, AttachMode: TAttachMode);

Description

Call MoveTo to reposition the node to the position indicated by the Destination parameter. Destination is the Index value of another outline node. The AttachMode parameter specifies how to attach the moved node to the destination position.

Note:	To change only the level of a node, use the ChangeLevelBy method.


TOutlineNode.Create
 VCL Reference

TOutlineNode.Create

TOutlineNode	See also

Creates a new TOutlineNode object.

constructor Create(AOwner: TCustomOutline);

Description

Do not call the constructor for TOutlineNode directly. Instead, use one of the methods of the outline component in which the node should appear. These methods are as follows:

Method	Action

Add	Creates the node as the last sibling of a specified node.

AddObject	Same as Add, but also initializing the node’s Data property.

AddChild	Creates the node as the last child of a specified node.

AddChildObject	Same as AddChild, but also initializing the node’s Data property.

Insert	Creates the node in the current position of an existing node.

InsertObject	Same as Insert, but also initializing the node’s Data property.


Hierarchy

TObject

TPersistent

TOutlineNode


TOwnedCollection
 VCL Reference

TOwnedCollection

Hierarchy	Properties	Methods	See also

TOwnedCollection is a collection that maintains information about its owner.

Unit

Classes

Description

By maintaining information about its owner, TOwnedCollection lets the Object Inspector display the collection's name at design time.

Note:	This information is not part of TOwnedCollection’s public interface.

New collection classes should descend from TOwnedCollection. By descending from TOwnedCollection, the derived class does not need to add anything in order to appear in the Object Inspector. Classes that descend directly from TCollection must implement a GetOwner method if they are to appear in the Object Inspector.


 VCL Reference

TOwnedCollection properties

TOwnedCollection	Alphabetically	Legend

Derived from TCollection

Count

ItemClass

Items


 VCL Reference

TOwnedCollection properties

TOwnedCollection	By object	Legend

Count

ItemClass

Items


 VCL Reference

TOwnedCollection methods

TOwnedCollection	Alphabetically	Legend

In TOwnedCollection

Create

Derived from TCollection

Add

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TOwnedCollection methods

TOwnedCollection	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TOwnedCollection.Create
 VCL Reference

TOwnedCollection.Create

TOwnedCollection	See also

Creates and initializes a TOwnedCollection instance.

type TCollectionItemClass = class ofTCollectionItem;

constructor Create(AOwner: TPersistent; ItemClass: TCollectionItemClass);

Description

The Create method takes two parameters: the name of an instance object descended from TPersistent and the name of a TCollectionItem descendant class. The first parameter is the owner of the TOwnedCollection instance. The second parameter determines the class of the items created by the Add method.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection


TPageControl
 VCL Reference

 TPageControl

Hierarchy	Properties	Methods	Events	Using TPageControl	See also

TPageControl is a set of pages used to make a multiple page dialog box.

Unit

ComCtrls

Description

Use TPageControl to create a multiple page dialog or tabbed notebook. TPageControl displays multiple overlapping pages that are TTabSheet objects. The user selects a page by clicking the page’s tab that appears at the top of the control. To add a new page to a TPageControl object at design time, right-click the TPageControl object and choose New Page.

To create a tabbed control that uses only a single body portion (page), use TTabControl instead.


 VCL Reference

TPageControl Properties

TPageControl	Alphabetically	Legend

In TPageControl

ActivePage

ActivePageIndex

PageCount

Pages

Derived from TCustomTabControl

Canvas

HotTrack

Images

MultiLine

OwnerDraw

RaggedRight

ScrollOpposite

Style

TabHeight

TabIndex

TabPosition

TabWidth

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPageControl Properties

TPageControl	By Object	Legend

Action

ActivePage

ActivePageIndex

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotTrack

Images

Left

LRDockWidth

MultiLine

Name

Owner

OwnerDraw

PageCount

Pages

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

RaggedRight

ScrollOpposite

ShowHint

Showing

Style

TabHeight

TabIndex

TabOrder

TabPosition

TabStop

TabWidth

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TPageControl.ActivePage
 VCL Reference

TPageControl.ActivePage

TPageControl	See also	Example

Specifies the page currently displayed by the page control.

property ActivePage: TTabSheet;

Description

Read ActivePage to determine which page is selected by the user. The user selects a page by clicking the mouse on its tab. Set ActivePage to bring a page to the foreground. Only one page can be active at a time.

To change the ActivePage to the page that precedes or follows the active page, use the SelectNextPage method. To iterate through all the pages to locate a specific page, use the FindNextPage method.


TPageControl.ActivePageIndex
 VCL Reference

TPageControl.ActivePageIndex

TPageControl	See also

Specifies the page currently displayed by the page control.

property ActivePageIndex: Integer;

Description

Use ActivePageIndex to get or set the active page by index rather than by object. The value of ActivePageIndex identifies a page in the Pages property array.  Changing the value of ActivePageIndex changes the ActivePage property, and vice versa.

If there is no active page, reading ActivePageIndex gives a value of –1.

Setting ActivePageIndex to a value that is out of bounds (less than 0 or greater than PageCount - 1) results in the page control having no active page.


TPageControl.PageCount
 VCL Reference

TPageControl.PageCount

TPageControl	See also	Example

Indicates the number of pages in the TPageControl object.

property PageCount: Integer;

Description

Use PageCount to determine the number of pages listed by the Pages property. If the MultiLine property is False, not all pages may have tabs visible to the user.


TPageControl.Pages
 VCL Reference

TPageControl.Pages

TPageControl	See also	Example

Lists all the pages in the TPageControl.

property Pages[Index: Integer]: TTabSheet;

Description

Use Pages to gain direct access to a particular page in the page control. For example, use Pages to disable individual pages in the page control. Specify which page to access using Index, where an Index of 0 specifies the first page, an Index of 1 specifies the second page, and so on. Each page is a TTabSheet object.

To locate a page in the page control by its position relative to another page, use the FindNextPage method.

Note:	Pages is a read-only property. To add a tab sheet to a page control at design time, right click and select New Page. To add a tab sheet to a page control at runtime, create the tab sheet and set its PageControl property to the page control.


 VCL Reference

TPageControl Events

TPageControl	Alphabetically	Legend

Derived from TCustomTabControl

OnChange

OnChanging

OnDrawTab

OnGetImageIndex

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TPageControl Events

TPageControl	By Object	Legend

OnChange

OnChanging

OnContextPopup

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnDrawTab

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TPageControl Methods

TPageControl	Alphabetically	Legend

In TPageControl

CanShowTab

Change

Create

Destroy

DoAddDockClient

DockOver

DoRemoveDockClient

FindNextPage

GetChildren

GetImageIndex

GetPageFromDockClient

GetSiteInfo

Loaded

SelectNextPage

SetChildOrder

ShowControl

UpdateActivePage

Derived from TCustomTabControl

GetHitTestInfoAt

IndexOfTabAt

RowCount

ScrollTabs

TabRect

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPageControl Methods

TPageControl	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

CanShowTab

Change

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

DoAddDockClient

Dock

DockDrop

DockOver

DoRemoveDockClient

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindNextPage

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetChildren

GetControlsAlignment

GetHitTestInfoAt

GetImageIndex

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetPageFromDockClient

GetParentComponent

GetSiteInfo

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

Loaded

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowCount

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SelectNextPage

SendToBack

SetBounds

SetChildOrder

SetFocus

SetSubComponent

SetTextBuf

Show

ShowControl

TabRect

Update

UpdateAction

UpdateActivePage

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TPageControl.CanShowTab
 VCL Reference

TPageControl.CanShowTab

TPageControl	See also

Indicates whether a tab sheet in the page control can be selected.

function CanShowTab(TabIndex: Integer): Boolean; override;

Description

Call CanShowTab to determine whether a tab can be selected or accessed.

TabIndex is the index of the tab in the list of tab sheets maintained by the Pages property.

CanShowTab returns True if the specified Tab sheet is enabled (its Enabled property is True ).


TPageControl.Create
 VCL Reference

TPageControl.Create

TPageControl	See also	Example

Creates an instance of PageControl.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a page control at runtime. Page controls added to forms at design time are created automatically.

AOwner is the form in which the page control should appear. It becomes the value of the Owner property.

When creating a page control at runtime, the pages must be added programmatically. To add a page to a page control at runtime, create the TTabSheet object for the page and set its PageControl property.


TPageControl.Change
 VCL Reference

TPageControl.Change

TPageControl 	See also

Responds to changes in the page control.

procedure Change; override;

Description

Change is called automatically when Windows notifies the page control of a change. TPageControl responds to this notification by updating its display to show the new current page.


TPageControl.Destroy
 VCL Reference

TPageControl.Destroy

TPageControl	See also

Destroys an instance of TPageControl.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TPageControl reference is not nil, and only then calls Destroy. Destroy frees the TList object that holds the pages of the control, and then calls the inherited destructor.


TPageControl.DoAddDockClient
 VCL Reference

TPageControl.DoAddDockClient

TPageControl 	See also

Provides necessary adjustments when a new client is docked in the page control.

procedure DoAddDockClient(Client: TControl; const ARect: TRect); override;

Description

DoAddDockClient is called when a new client is docked to the page control. It sets the page control’s tab sheet as the new client’s parent.

Client is the client being docked.


TPageControl.DockOver
 VCL Reference

TPageControl.DockOver

TPageControl 	See also

Indicates whether an object that is dragged over the page control can be docked.

procedure DockOver(Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override;

Description

DockOver is called automatically when the user drags a dockable window over the page control.

The Source parameter describes the object that is being dragged.

The X and Y parameters give the current position of the dragged control.

The State parameter indicates how the mouse is moving.

DockOver initializes the Source parameter to reflect the dockable region of the page control and generates an OnDockOver event. An OnDockOver event handler can change the Accept parameter to False if the Source control should not be docked.

Note:	DockOver is only called if the DockSite property is True.


TPageControl.DoRemoveDockClient
 VCL Reference

TPageControl.DoRemoveDockClient

TPageControl 	See also

Provides necessary adjustments when a control is undocked from the page control.

procedure DoRemoveDockClient(Client: TControl); override;

Description

DoRemoveDockClient is called when a client is undocked from the page control. It selects the next page in the tab sheet.

Client is the client being undocked.


TPageControl.FindNextPage
 VCL Reference

TPageControl.FindNextPage

TPageControl	See also	Example

Returns the next page in the page control before or after a specified page.

function FindNextPage(CurPage: TTabSheet; GoForward, CheckTabVisible: Boolean): TTabSheet;

Description

Call FindNextPage to locate a page in the page control by its position relative to the page specified by the CurPage parameter. If the GoForward parameter is True, FindNextPage returns the next page in the page control after CurPage. If GoForward is False, FindNextPage returns the previous page. If CurPage is not a page in the page control, FindNextPage returns the first page when GoForward is True or the last page when GoForward is False. If GoForward is True and CurPage is the last page in the page control, FindNextPage returns the first page. If GoForward is False and CurPage is the first page in the page control, FindNextPage returns the last page.

When CheckTabVisible is True, FindNextPage returns the next page with a TabVisible property set to True; if CheckTabVisible is False, FindNextPage returns the next page, including pages with TabVisible set to False.


TPageControl.GetChildren
 VCL Reference

TPageControl.GetChildren

TPageControl	See also

Calls a specified procedure for every page in the page control.

procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;

Description

Call GetChildren to execute a callback for every page in the page control. The Proc parameter is the callback. The Root parameter is ignored by TPageControl.

GetChildren is intended primarily for the streaming system that loads and saves components.


TPageControl.GetImageIndex
 VCL Reference

TPageControl.GetImageIndex

TPageControl	Methods

Specifies the image to display for a particular page.

function GetImageIndex(TabIndex: Integer): Integer; override;

Description

Override GetImageIndex in a derived class to specify the index of the image to display for a particular page.

TabIndex is the page’s index that is about to be displayed.

Integer is the image’s index (in the Images property) that will be displayed in the tab.

By default, if there is no OnGetImageIndex event handler, GetImageIndex returns the ImageIndex property for the page with the specified index; otherwise, GetImageIndex calls the inherited GetImageIndex method, returning the result.


TPageControl.GetPageFromDockClient
 VCL Reference

TPageControl.GetPageFromDockClient

TPageControl	Methods

Returns the tab sheet on which a client is docked.

function GetPageFromDockClient(Client: TControl): TTabSheet;

Description

Call GetPageFromDockClient to get the tab sheet on which Client is docked.

Returns nil if Client is not docked.


TPageControl.GetSiteInfo
 VCL Reference

TPageControl.GetSiteInfo

TPageControl	See also

Returns the page control’s docking information.

procedure GetSiteInfo(Client: TControl; var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean);

Description

Call GetSiteInfo to determine the docking region of the page control and whether a dragged window can be docked.

Client is a potential docking client.

InfluenceRect returns the area in which the client can be docked.

MousePos is the current mouse position.

CanDock indicates whether the client can be docked in the page control.

GetSiteInfo Initializes CanDock to True if Client is not already docked in the page control. It then inflates the influence rectangle by 10 pixels and generates an OnGetSiteInfo event.


TPageControl.Loaded
 VCL Reference

TPageControl.Loaded

TPageControl	See also

Initializes the page control after all its parts have been loaded from a stream.

procedure Loaded; override;

Description

Loaded is called automatically when the form containing the page control is first loaded into memory. TPageControl overrides the Loaded method to ensure that all tab sheets with a Highlighted property of True appear highlighted.


TPageControl.SelectNextPage
 VCL Reference

TPageControl.SelectNextPage

TPageControl	See also	Example

Changes the ActivePage to the first visible page that is before or after the currently active page.

procedure SelectNextPage(GoForward: Boolean);

Description

Use SelectNextPage to select the page next to the currently active page. If the GoForward parameter is True, SelectNextPage selects the first page after ActivePage; if GoForward is False, SelectNextPage selects the first page previous to ActivePage. SelectNextPage will only considers pages with their TabVisible property set to True.

Note:	To select a page at design-time, right-click the TPageControl and choose Previous Page or Next Page.


TPageControl.SetChildOrder
 VCL Reference

TPageControl.SetChildOrder

TPageControl	See also

Assigns indexes to the pages that reflect the order in which pages are loaded from a stream.

procedure SetChildOrder(Child: TComponent; Order: Integer); override;

Description

SetChildOrder is called automatically when the children of the page control are loaded from a stream. It assigns each page an index that reflects the order in which pages are loaded and saved.

The Child parameter is a page of the page control. The Order parameter indicates when the page is loaded or saved. The first page loaded or saved is called with Order set to 0, the second with Order set to 1, and so on.

SetChildOrder assigns the PageIndex property of the individual pages to the value of Order.


TPageControl.ShowControl
 VCL Reference

TPageControl.ShowControl

TPageControl	See also

Displays a specified page.

procedure ShowControl(AControl: TControl); override;

Description

ShowControl is called automatically when a particular page of the page control should be visible. The AControl parameter specifies the page that should be displayed on screen.

ShowControl makes the specified page active it is not already active, and sets its own Visible property to True. It then calls the ShowControl method of its parent object to ensure that the page control is showing (and therefore able to display the active page).


TPageControl.UpdateActivePage
 VCL Reference

TPageControl.UpdateActivePage

TPageControl	See also

Updates the ActivePage property when changes are made to the Pages property.

procedure UpdateActivePage; virtual;

Description

This protected method is used internally when the pages listed in the Pages property change. It ensures that the page control is internally consistent and that the active page is displayed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTabControl

TPageControl


TPageScroller
 VCL Reference

 TPageScroller

Hierarchy	Properties	Methods	Events

TPageScroller defines a display area for a narrow window, such as a toolbar.

Unit

ComCtrls

Description

Use TPageScroller to define a display area for a narrow window, such as a toolbar.

If the window is larger than the display area, TPageScroller attaches arrows to the edges of the window, allowing it to be scrolled within the display area.

The page scroller control is similar to the scroll box control. However, the page scroller provides arrows that extend over the edges of the display area, whereas the scroll box provides scroll bars. Also, the page scroller supports scrolling for only one orientation (horizontal or vertical), so the constrained window must fit either the width or height of the display area.


 VCL Reference

TPageScroller properties

TPageScroller	Alphabetically	Legend

In TPageScroller

AutoScroll

ButtonSize

Control

DragScroll

Margin

Orientation

Position

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPageScroller properties

TPageScroller	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoScroll

BiDiMode

BorderWidth

BoundsRect

Brush

ButtonSize

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

Control

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

DragScroll

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Margin

Name

Orientation

Owner

Parent

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

Position

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TPageScroller.AutoScroll
 VCL Reference

TPageScroller.AutoScroll

TPageScroller

Specifies whether the page scroller scrolls when the mouse hovers over one of its arrows.

property AutoScroll: Boolean;

Description

Use AutoScroll to specify whether the page scroller scrolls when the mouse hovers over one of its arrows.


TPageScroller.ButtonSize
 VCL Reference

TPageScroller.ButtonSize

TPageScroller

Specifies the size of the page scroller’s arrows.

property ButtonSize: Integer;

Description

Use ButtonSize to specify the size of the page scroller’s arrows.


TPageScroller.Control
 VCL Reference

TPageScroller.Control

TPageScroller

Specifies the control contained in the page scroller.

property Control: TWinControl;

Description

Use Control to specify the control contained in the page scroller.


TPageScroller.DragScroll
 VCL Reference

TPageScroller.DragScroll

TPageScroller

Specifies whether the contained window can be a drag-and-drop target.

property DragScroll: Boolean;

Description

Use DragScroll to specify whether the contained window can be a drag-and-drop target. If DragScroll is true, the page scroller will scroll when an item is dragged over the page scroller’s arrows.


TPageScroller.Margin
 VCL Reference

TPageScroller.Margin

TPageScroller

Specifies the margin between the contained window and the inside edges of the page scroller.

property Margin: Integer;

Description

Use Margin to specify the margin between the contained window and the inside edges of the page scroller.


TPageScroller.Orientation
 VCL Reference

TPageScroller.Orientation

TPageScroller

Specifies whether the page scroller is horizontal or vertical.

property Orientation: TPageScrollerOrientation;

Description

Use Orientation to specify whether the page scroller is horizontal or vertical.


TPageScroller.Position
 VCL Reference

TPageScroller.Position

TPageScroller

Specifies the scroll position of the page scroller.

property Position: Integer;

Description

Use Position to specify the scroll position of the page scroller.


 VCL Reference

TPageScroller events

TPageScroller	Alphabetically	Legend

In TPageScroller

OnScroll

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseWheel

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TPageScroller events

TPageScroller	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseWheel

OnResize

OnScroll

OnStartDock

OnStartDrag


TPageScroller.OnScroll
 VCL Reference

TPageScroller.OnScroll

TPageScroller

Occurs immediately before the page scroller scrolls.

property OnScroll: TPageScrollEvent;

Description

Write code in the OnScroll event handler to perform actions when the page scroller scrolls.


 VCL Reference

TPageScroller methods

TPageScroller	Alphabetically	Legend

In TPageScroller

AlignControls

Create

CreateParams

CreateWnd

GetButtonState

Scroll

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPageScroller methods

TPageScroller	By object	Legend

AfterConstruction

AlignControls

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetButtonState

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

Scroll

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TPageScroller.AlignControls
 VCL Reference

TPageScroller.AlignControls

TPageScroller

Aligns controls in the contained window.

procedure AlignControls(AControl: TControl; var Rect: TRect); override;

Description

Call AlignControls to align the controls in the page scroller’s contained window according to values of their Align properties.

Overrides the inherited AlignControls property in order to take the orientation of the page scroller into account.


TPageScroller.Create
 VCL Reference

TPageScroller.Create

TPageScroller

Creates and initializes an instance of TPageScroller.

constructor Create(AOwner: TComponent); override;

Description

Create performs the following tasks:

Calls the inherited Create method.

Sets Width to 150 and Height to 45

Sets TabStop to True.

Sets ControlStyle to [csAcceptsControls, csDoubleClicks];

Sets ButtonSize to 12;

Sets DragScroll to True.;


TPageScroller.CreateParams
 VCL Reference

TPageScroller.CreateParams

TPageScroller

Sets the page scroller’s window parameters.

procedure CreateParams(var Params: TCreateParams); override;

Description

CreateParams is called automatically when the page scroller window is created.

CreateParams overrides the inherited CreateParams method in order to set window styles specific to the page scroller control.


TPageScroller.CreateWnd
 VCL Reference

TPageScroller.CreateWnd

TPageScroller

Creates the page scroller’s window.

procedure CreateWnd; override;

Description

Call CreateWnd to create the page scroller’s window.

CreateWnd overrides the inherited CreateWnd method in order to initialize the page scroller’s color, handle, button size, margin, and position.


TPageScroller.GetButtonState
 VCL Reference

TPageScroller.GetButtonState

TPageScroller

Returns the state of one of the page scroller’s buttons.

function GetButtonState(Button: TPageScrollerButton): TPageScrollerButtonState;

Description

Call GetButtonState to get the state of one of the page scroller’s buttons.

Button is the button for which to get the state information.

GetButtonState returns the button’s state.


TPageScroller.Scroll
 VCL Reference

TPageScroller.Scroll

TPageScroller

Called immediately before the page scroller scrolls.

procedure Scroll(Shift: TShiftState; X, Y: Integer; Orientation: TPageScrollerOrientation; var Delta: Integer); dynamic;

Description

Override the Scroll method in a derived class to handle the scrolling event.

By default, Scroll calls the OnScroll event handler.

Shift is the state of the Shift, Alt, Ctrl keys and mouse buttons.

X is the horizontal position of the page scroller.

Y is the vertical position of the page scroller.

Orientation is the direction for the scroll.

Delta is the amount of the scroll.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TPageScroller


TPaintControl
 VCL Reference

TPaintControl

Hierarchy	Properties	Methods	See also

TPaintControl draws data aware controls that are replicated in a data control grid.

Unit

DBCtrls

Description

Several data-aware controls use TPaintControl — including TDBCheckBox, TDBComboBox, and TDBMemo—to replicate themselves within a data control grid (TDBCtrlGrid).


 VCL Reference

TPaintControl properties

TPaintControl	Alphabetically	Legend

In TPaintControl

Ctl3DButton

Handle


 VCL Reference

TPaintControl properties

TPaintControl	By object	Legend

Ctl3DButton

Handle


TPaintControl.Ctl3DButton
 VCL Reference

TPaintControl.Ctl3DButton

TPaintControl

Determines whether the control has a three-dimensional look.

property Ctl3DButton: Boolean;

Description

Ctl3DButton is provided for backward compatibility. It has no effect on 32-bit Windows and NT 4.0 and later.

Ctl3DButton controlled whether the data-aware control had beveled borders, and required Ctl3d32.dll to be installed in the System 32 directory.


TPaintControl.Handle
 VCL Reference

TPaintControl.Handle

TPaintControl 	See also

Provides access to paint control’s window handle.

property Handle: HWnd;

Description

Handle is the window handle of the TPaintControl instance. It represents a window with the classname supplied to the constructor of the TPaintControl object.  The characteristics of the window are determined by the Owner supplied to the constructor of the paint control object.


 VCL Reference

TPaintControl methods

TPaintControl	Alphabetically	Legend

In TPaintControl

Create

Destroy

DestroyHandle

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPaintControl methods

TPaintControl	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyHandle

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TPaintControl.Create
 VCL Reference

TPaintControl.Create

TPaintControl 	See also

Creates and initializes a TPaintControl object.

constructor Create(AOwner: TWinControl; const ClassName: String);

Description

The Create method creates an instance of TPaintControl.  The Owner parameter specifies the data-aware control that uses this TPaintControl object to paint its image. The ClassName parameter specifies the Window class that should be created by the paint control.


TPaintControl.Destroy
 VCL Reference

TPaintControl.Destroy

TPaintControl	See also

Destroys the TPaintControl and frees its memory.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TPaintControl reference is not nil, and only then calls Destroy.

Destroy frees the window used by the paint control.


TPaintControl.DestroyHandle
 VCL Reference

TPaintControl.DestroyHandle

TPaintControl	See also

Destroys the window used by the paint control.

procedure DestroyHandle;

Description

The destructor of TPaintControl calls DestroyHandle to release the Windows resources allocated on behalf of the paint control.


Hierarchy

TObject

TPaintControl


TPanel
 VCL Reference

 TPanel

Hierarchy	Properties	Methods	Events	Using TPanel	See also

TPanel implements a generic panel control.

Unit

ExtCtrls

Description

Use TPanel to put an empty panel on a form. Panels have properties for providing a beveled border around the control, as well as methods to help manage the placement of child controls embedded in the panel.

You can also use panels to group controls together, similar to the way you can use a group box, but with a beveled border (or no border) rather than the group box outline. Panels are typically used for groups of controls within a single form. If you intend to use the same grouping in other forms, you may want to use a frame instead.

Panels with no borders are useful as docking sites when writing applications that use drag-and-dock.

Although you can use a panel to implement a status bar or tool bar, it is recommended that you use the TToolBar and TStatusBar classes instead.


 VCL Reference

TPanel properties

TPanel	Alphabetically	Legend

Derived from TCustomPanel

Alignment

BevelInner

BevelOuter

BevelWidth

BorderStyle

BorderWidth

FullRepaint

Locked

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockManager

DockSite

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

UseDockManager

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPanel properties

TPanel	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

AutoSize

BevelInner

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockManager

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

FullRepaint

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

Locked

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UseDockManager

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TPanel events

TPanel	Alphabetically	Legend

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TPanel events

TPanel	By object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TPanel methods

TPanel	Alphabetically	Legend

Derived from TCustomPanel

Create

Derived from TCustomControl

Destroy

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPanel methods

TPanel	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomPanel

TPanel


TParaAttributes
 VCL Reference

TParaAttributes

Hierarchy	Properties	Methods	See also

TParaAttributes represents paragraph formatting properties for a rich edit control.

Unit

ComCtrls

Description

TParaAttributes includes a number of properties that describe the formatting characteristics of a paragraph in a rich text document. TParaAttributes is tailored to allow a descendant of TCustomRichEdit to read and write formatting characteristics of selected paragraphs. The properties of a TParaAttributes object are invalid unless it is owned by a descendant of TCustomRichEdit.


 VCL Reference

TParaAttributes properties

TParaAttributes	Alphabetically	Legend

In TParaAttributes

Alignment

FirstIndent

LeftIndent

Numbering

RightIndent

Tab

TabCount


 VCL Reference

TParaAttributes properties

TParaAttributes	By object	Legend

Alignment

FirstIndent

LeftIndent

Numbering

RightIndent

Tab

TabCount


TParaAttributes.Alignment
 VCL Reference

TParaAttributes.Alignment

TParaAttributes	See also 	Example

Specifies how text is aligned within a paragraph.

property Alignment: TAlignment;

Description

Use Alignment to specify the alignment of text within individual paragraphs. Unlike the Alignment property of a TCustomMemo, which applies to the entire body of text, the Alignment property of TParaAttributes applies only to the selected paragraphs.These are the possible values:

Value	Meaning

taLeftJustify	Align text to the left side of the paragraph.

taCenter	Center text horizontally in the paragraph.

taRightJustify	Align text to the right side of the paragraph.


TParaAttributes.FirstIndent
 VCL Reference

TParaAttributes.FirstIndent

TParaAttributes	See also 	Example

Specifies the indent, in pixels, of the first line of the paragraph relative to the left margin.

property FirstIndent: Longint;

Description

Use FirstIndent to specify the number of pixels to indent the first line of the paragraph. This value is relative to the value of LeftIndent.


TParaAttributes.LeftIndent
 VCL Reference

TParaAttributes.LeftIndent

TParaAttributes	See also

Specifies the indent, in pixels, of the paragraph relative to the left margin.

property LeftIndent: Longint;

Description

Use LeftIndent to indent a paragraph from the left margin of the entire body of text. LeftIndent is useful for making individual paragraphs stand out from the rest of the text.

Note:	Adding bullets to a set of paragraphs by using the Numbering property also affects the left indentation.


TParaAttributes.Numbering
 VCL Reference

TParaAttributes.Numbering

TParaAttributes	See also 	Example

Specifies whether the paragraph is one of a set of bulleted paragraphs.

type TNumberingStyle = (nsNone, nsBullet);

property Numbering: TNumberingStyle;

Description

To insert a bullet to the left of the paragraph, and indent the paragraph sufficiently to accommodate the bullet, set Numbering to nsBullet. If the LeftIndent property is set, bullets will appear at the indentation indicated by LeftIndent, and the body of the paragraph will be further indented to accommodate the bullets.

These are the possible values:

Value	Meaning

nsNone	No numbering on the left.

nsBullet	Bullets on the left with sufficient indentation for the bullets.


TParaAttributes.RightIndent
 VCL Reference

TParaAttributes.RightIndent

TParaAttributes	See also

Specifies the indent, in pixels, of the paragraph relative to the right margin.

property RightIndent: Longint;

Description

Use RightIndent to indent a paragraph from the right margin of the entire body of text. RightIndent is useful for making individual paragraphs stand out from the rest of the text, especially when Alignment is set to taRightJustify.


TParaAttributes.Tab
 VCL Reference

TParaAttributes.Tab

TParaAttributes	See also

Specifies the position, in points, of a particular tab stop.

property Tab[Index: Byte]: Longint;

Description

Tab is an indexed property into an array of absolute tab stop positions. The position of the first tab stop is Tab[0], the next tab stop is Tab[1], and so on to Tab[TabCount - 1].

When setting Tab, values of Index below TabCount change the positions of existing tab stops. Values of Index greater than or equal to TabCount increase the number of tab stops in the paragraph and change the value of TabCount.

Note:	Setting Tab does not insert a tab into the text of the paragraph. It sets the positions within the paragraph where tabs will occur if they are inserted. The actual tab characters are inserted into the paragraph by using the Tab key.


TParaAttributes.TabCount
 VCL Reference

TParaAttributes.TabCount

TParaAttributes	See also

Indicates the number of tab stops that are defined for the paragraph.

property TabCount: Integer;

Description

Read TabCount to determine the number of tab stops in the Tab array. Use TabCount with the Tab property to iterate over all the tab stops defined for the paragraph.


 VCL Reference

TParaAttributes methods

TParaAttributes	Alphabetically	Legend

In TParaAttributes

Assign

Create

Derived from TPersistent

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TParaAttributes methods

TParaAttributes	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TParaAttributes.Assign
 VCL Reference

TParaAttributes.Assign

TParaAttributes	See also

Copies the properties specified in another TParaAttributes object.

procedure Assign(Source: TPersistent); override;

Description

Use Assign to set the paragraph attributes of the selected paragraph from one rich edit control to match the attributes of the selected paragraph of another rich edit control. Since the properties of a TParaAttributes object are only valid when the TParaAttributes exists within a rich edit control, Assign is only useful for copying attributes between rich edit controls.

Note:	Assign only succeeds at runtime when the Source is a TParaAttributes object or an object that has an AssignTo method that is enabled for a TParaAttributes object. Other source objects will raise an EConvertError exception.


TParaAttributes.Create
 VCL Reference

TParaAttributes.Create

TParaAttributes	See also

Creates an instance of TParaAttributes.

constructor Create(AOwner: TCustomRichEdit);

Description

Do not call the constructor for a TParaAttributes object, as the properties of a TParaAttributes object are not valid outside of a TCustomRichEdit object. Create is called from the constructor of a rich edit control that uses TParaAttributes.


Hierarchy

TObject

TPersistent

TParaAttributes


TPen
 VCL Reference

TPen

Hierarchy	Properties	Methods	Events	Using TPen	See also

TPen is used to draw lines or outline shapes on a canvas.

Unit

Graphics

Description

Use TPen to describe the attributes of a Windows pen when drawing an image to a canvas (TCanvas). TPen encapsulates the pen properties that are selected into the device context of the canvas.


 VCL Reference

TPen properties

TPen	Alphabetically	Legend

In TPen

Color

Handle

Mode

Style

Width

Derived from TGraphicsObject

OwnerCriticalSection


 VCL Reference

TPen properties

TPen	By object	Legend

Color

Handle

Mode

OwnerCriticalSection

Style

Width


TPen.Color
 VCL Reference

TPen.Color

TPen	See also 	Example

Determines the color used to draw lines on the canvas.

property Color: TColor;

Description

Set Color to change the color used to draw lines or outline shapes. The way the color is used by the pen depends on the Mode and Style properties.


TPen.Handle
 VCL Reference

TPen.Handle

TPen	See also

Specifies the Windows pen object handle.

property Handle: HPen;

Description

The Handle property provides access to the Windows GDI object handle. TPen encapsulates the Windows pen object (HPEN). Use Handle when making a Windows API function call that requires the handle of a pen object. Handle is the Windows handle currently selected into the device context of the canvas.


TPen.Mode
 VCL Reference

TPen.Mode

TPen	See also

Determines how the pen draws lines on the canvas.

type TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor)

property Mode: TPenMode;

Description

Set Mode to determine how the color of the pen interacts with the color on the canvas. The effects of Mode are described in the following table:

Mode	Pixel color

pmBlack	Always black

pmWhite	Always white

pmNop	Unchanged

pmNot	Inverse of canvas background color

pmCopy	Pen color specified in Color property

pmNotCopy	Inverse of pen color

pmMergePenNot	Combination of pen color and inverse of canvas background

pmMaskPenNot	Combination of colors common to both pen and inverse of canvas background.

pmMergeNotPen	Combination of canvas background color and inverse of pen color

pmMaskNotPen	Combination of colors common to both canvas background and inverse of pen

pmMerge	Combination of pen color and canvas background color

pmNotMerge	Inverse of pmMerge: combination of pen color and canvas background color

pmMask	Combination of colors common to both pen and canvas background

pmNotMask	Inverse of pmMask: combination of colors common to both pen and canvas background

pmXor	Combination of colors in either pen or canvas background, but not both

pmNotXor	Inverse of pmXor: combination of colors in either pen or canvas background, but not both


TPen.Style
 VCL Reference

TPen.Style

TPen	See also 	Example

Determines the style in which the pen draws lines.

type TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame);

property Style: TPenStyle;

Description

Use Style to draw a dotted or dashed line, or to omit the line that appears as a frame around shapes. These are the possible values of Style:

Style	Meaning

psSolid	A solid line.

psDash	A line made up of a series of dashes.

psDot	A line made up of a series of dots.

psDashDot	A line made up of alternating dashes and dots.

psDashDotDot	A line made up of a series of dash-dot-dot combinations.

psClear	No line is drawn (used to omit the line around shapes that draw an outline using the current pen).

psInsideFrame	A solid line, but one that may use a dithered color if Width is greater than 1.

Note:	Only the psInsideFrame style will produce a dithered color to match a Color property that is not in the color table. All others choose the closest color from the Windows color table.

Note:	Dotted or dashed pen styles are not available when the Width property is not 1.


TPen.Width
 VCL Reference

TPen.Width

TPen	See also 	Example

Specifies the maximum width of the pen in pixels.

property Width: Integer;

Description

Use Width to give the line greater weight. If Width is set to a value less than 1, the pen is given a Width of 1.

Note:	The value of Width influences which values of Style are valid.


 VCL Reference

TPen events

TPen	Alphabetically	Legend

Derived from TGraphicsObject

OnChange


 VCL Reference

TPen events

TPen	By object	Legend

OnChange


 VCL Reference

TPen methods

TPen	Alphabetically	Legend

In TPen

Assign

Create

Destroy

Derived from TGraphicsObject

HandleAllocated

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPen methods

TPen	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

HandleAllocated

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TPen.Assign
 VCL Reference

TPen.Assign

TPen	See also

Assigns the properties of the pen from another TPen object.

procedure Assign(Source: TPersistent); override;

Description

If the Source parameter identifies another TPen object, Assign copies the Color, Width, Style, and Mode properties of the source pen. Otherwise, the inherited method copies the properties from any object that can write to a TPen object in its AssignTo method.


TPen.Create
 VCL Reference

TPen.Create

TPen	See also

Creates an instance of TPen.

constructor Create;

Description

Call Create to create a TPen object for assigning the pen property of a canvas. The pen for the canvas is created automatically in the constructor for the TCanvas object.

Create allocates memory for the TPen object and initializes the Mode property to pmCopy.


TPen.Destroy
 VCL Reference

TPen.Destroy

TPen	See also

Destroys an instance of TPen.

destructor Destroy; override;

Description

Do not call Destroy directly from an application. Instead, call Free. Free verifies that the TPen reference is not nil, and only then calls Destroy.Destroyfrees the resource identified by the Handle property.


Hierarchy

TObject

TPersistent

TGraphicsObject

TPen


TPenRecall
 VCL Reference

TPenRecall

Hierarchy	Properties	Methods	See also

TPenRecall saves and restores the properties of a TPen object.

Unit

Graphics

Description

Use TPenRecall to store the current state of a TPen object. You are then free to change the current state of the pen object. To restore the pen object to its original state, all that is necessary is to free the TPenRecall object and the pen object is automatically restored to the saved property values.

You can update the TPenRecall instance to reflect the current properties of the TPen object by calling the Store method. You can prevent the TPenRecall destructor from updating the TPen object by calling the Forget method.


 VCL Reference

TPenRecall properties

TPenRecall	Alphabetically	Legend

Derived from TRecall

Reference


 VCL Reference

TPenRecall properties

TPenRecall	By object	Legend

Reference


 VCL Reference

TPenRecall methods

TPenRecall	Alphabetically	Legend

In TPenRecall

Create

Derived from TRecall

Destroy

Forget

Store

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPenRecall methods

TPenRecall	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Forget

FreeInstance

Free

GetInterfaceEntry

GetInterfaceTable

GetInterface

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Store


TPenRecall.Create
 VCL Reference

TPenRecall.Create

TPenRecall	See also

Instantiates a TPenRecall object.

constructor Create(APen: TPen); override;

Description

Call Create to instantiate a pen recall object at runtime. Create saves the current properties of the TPen object specified by APen, which becomes the value of the Reference property.

Subsequent calls to the Store method take snapshots of the properties of APen and save them, replacing the values saved by this constructor. When you destroy the TPenRecall instance, the most recently-saved properties are assigned to APen, restoring it to a previous state.


Hierarchy

TObject

TRecall

TPenRecall


TPicture
 VCL Reference

TPicture

Hierarchy	Properties	Methods	Events	See also

TPicture contains a bitmap, icon, metafile graphic, or user-defined graphic.

Unit

Graphics

Description

TPicture is a TGraphic container, used to hold a graphic, the type of which is specified in the Graphic property. It is used in place of a TGraphic if the graphic can be of any TGraphic class. LoadFromFile and SaveToFile are polymorphic. For example, if the TPicture is holding an Icon, it is valid to LoadFromFile a bitmap file, where the class TIcon can only read .ICO files.

If the TPicture contains a bitmap graphic, the Bitmap property specifies the graphic. If the TPicture contains an icon graphic, the Icon property specifies the graphic. If the TPicture contains a metafile graphic, the Metafile property specifies the graphic.

The properties of TPicture indicate the type of graphic that the picture object contains, and its size. The methods of TPicture are used to load, save, and manipulate graphics.

To load or save a picture to the Clipboard, use the Assign method of a TClipboard object.

To draw a picture on a canvas, call the Draw or StretchDraw methods of a TCanvas object, passing the Graphic property of a TPicture as a parameter.


 VCL Reference

TPicture properties

TPicture	Alphabetically	Legend

In TPicture

Bitmap

Graphic

Height

Icon

Metafile

PictureAdapter

Width


 VCL Reference

TPicture properties

TPicture	By object	Legend

Bitmap

Graphic

Height

Icon

Metafile

PictureAdapter

Width


TPicture.Bitmap
 VCL Reference

TPicture.Bitmap

TPicture	See also	Example

Specifies the contents of the picture object as a bitmap graphic (.BMP file format).

property Bitmap: TBitmap;

Description

Use Bitmap to reference the picture object when it contains a bitmap. If Bitmap is referenced when the picture contains a Metafile or Icon graphic, the graphic won't be converted. Instead, the original contents of the picture are discarded and Bitmap returns a new, blank bitmap.

Note:	When assigning the Bitmap property, TPicture assigns the properties of a another TBitmap object. It does not take ownership of the specified value.


TPicture.Graphic
 VCL Reference

TPicture.Graphic

TPicture	See also 	Example

Specifies the graphic that the picture contains.

property Graphic: TGraphic;

Description

Use Graphic to specify what graphic the TPicture object contains. The graphic can be a bitmap, icon, metafile, or user-defined graphic class.

Note:	When assigning the Graphic property, TPicture assigns the properties of a another TGraphic object. It does not take ownership of the specified object.


TPicture.Height
 VCL Reference

TPicture.Height

TPicture 	See also

Specifies the vertical size (in pixels) of the graphic.

property Height: Integer;

Description

Use Height to find the height of the graphic image contained in the picture object. Height is the native, unstretched, height of the picture.


TPicture.Icon
 VCL Reference

TPicture.Icon

TPicture	See also

Specifies the contents of the TPicture object as an icon graphic (.ICO file format).

property Icon: TIcon;

Description

If Icon is referenced when the TPicture contains a Bitmap or Metafile graphic, the graphic won't be converted. Instead, the original contents of the TPicture are discarded and Icon returns a new, blank icon.

Note:	When assigning the Icon property, TPicture assigns the properties of a another Icon object. It does not take ownership of the specified value.


TPicture.Metafile
 VCL Reference

TPicture.Metafile

TPicture	See also

Specifies the contents of the picture object as an Enhanced Windows metafile graphic (.EMF file format).

property Metafile: TMetafile;

Description

If Metafile is referenced when the TPicture contains a Bitmap or Icon graphic, the graphic won't be converted. Instead, the original contents of the TPicture are discarded and Metafile returns a new, blank metafile.

Note:	When assigning the Metafile property, TPicture assigns the properties of a another TMetafile object. It does not take ownership of the specified value.


TPicture.PictureAdapter
 VCL Reference

TPicture.::PictureAdapter

TPicture	See also

Represents an OLE interface for the picture.

property PictureAdapter: IChangeNotifier;

Description

PictureAdapter is for internal use only.


TPicture.Width
 VCL Reference

TPicture.Width

TPicture	See also

Specifies the horizontal size (in pixels) of the picture.

property Width: Integer;

Description

Use Width to find the width of a graphic image. Width contains the native, unstretched, width of the picture.


 VCL Reference

TPicture events

TPicture	Alphabetically	Legend

In TPicture

OnChange

OnProgress


 VCL Reference

TPicture events

TPicture	By object	Legend

OnChange

OnProgress


TPicture.OnChange
 VCL Reference

TPicture.OnChange

TPicture

Occurs when the specific graphics item encapsulated by the picture object changes.

property OnChange: TNotifyEvent;

Description

Use OnChange to write an event handler to process an action when the graphic is modified.


TPicture.OnProgress
 VCL Reference

TPicture.OnProgress

TPicture	See also

Occurs periodically during slow operations that affect the graphic.

type

  TProgressStage = (psStarting, psRunning, psEnding);

  TProgressEvent = procedure (Sender: TObject; Stage: TProgressStage; PercentDone: Byte; RedrawNow: Boolean; const R: TRect; const Msg: string) of object;

property OnProgress: TProgressEvent;

Description

OnProgress is generated by the particular graphic that the picture object contains. Whether OnProgress occurs depends upon the type of graphic in the Graphic property. Some graphics generate this event, others do not. Jpeg images, for example, generate an OnProgress event.

Write an OnProgress event handler to provide the user with feedback during slow operations such as loading large compressed images. TImage, for example, hooks the OnProgress event of TPicture.

The Stage parameter indicates whether the operation is beginning, continuing, or ending. If the OnProgress event handler displays an indicator such as a progress bar, the indicator can be created when Stage is psStarting, updated while Stage is psRunning, and removed when Stage is psEnding. The PercentDone parameter is an approximation of how much of the operation has completed. Use PercentDone to update the position of a progress bar or other indicator.

The RedrawNow parameter indicates whether the image can safely be drawn on screen at this point. The R parameter specifies the portion of the image that has changed and needs to be redrawn.

The Msg parameter contains one or two words that describe what operation is occurring. For example, the value of Msg could be a string such as Loading, Storing, or Reducing colors. The Msg string can also be empty.

Note:	The PercentDone parameter is only an approximation. With some image formats, the value of PercentDone may actually decrease from the value in previous events, as the graphic object discovers there is more work to do.


 VCL Reference

TPicture methods

TPicture	Alphabetically	Legend

In TPicture

Assign

Create

Destroy

LoadFromClipboardFormat

LoadFromFile

RegisterClipboardFormat

RegisterFileFormat

RegisterFileFormatRes

SaveToClipboardFormat

SaveToFile

SupportsClipboardFormat

UnregisterGraphicClass

Derived from TInterfacedPersistent

AfterConstruction

QueryInterface

Derived from TPersistent

GetNamePath

Derived from TObject

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPicture methods

TPicture	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

LoadFromClipboardFormat

LoadFromFile

MethodAddress

MethodName

NewInstance

QueryInterface

RegisterClipboardFormat

RegisterFileFormat

RegisterFileFormatRes

SafeCallException

SaveToClipboardFormat

SaveToFile

SupportsClipboardFormat

UnregisterGraphicClass


TPicture.Assign
 VCL Reference

TPicture.Assign

TPicture	See also	Example

Copies one object to another by copying the contents of that object to the other.

procedure Assign(Source: TPersistent);

Description

When Source is a object type that is valid for the Graphic property, Assign makes that graphic the value of the Graphic property.

The actions performed by Assign depend on the actual types of the TPicture Graphic property and Source. For example, if the Graphic property and Source are bitmaps (TBitmap), the bitmap contained in Source is copied into the Graphic property. Similar conversions are valid, for example, for TIcon or TMetafile.

If the Source parameter is not a valid object for the Graphic property, Assign calls the inherited method so that the picture can be copied from any object with which it is compatible.


TPicture.Create
 VCL Reference

TPicture.Create

TPicture	See also

Creates a TPicture object.

constructor Create;

Description

Call Create to create an instance of TPicture at runtime. Create allocates the memory for the picture object and initializes its internal formats. After creating the TPicture object, use the LoadFromClipboardFormat or LoadFromFile method to assign a graphical image to the picture, so that it is available to the application.


TPicture.Destroy
 VCL Reference

TPicture.Destroy

TPicture	See also

Destroys an instance of a picture object.

destructor Destroy; override;

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TPicture reference is not nil before it calls Destroy.

Destroy frees the graphic image it contains before calling the inherited Destroy.


TPicture.LoadFromClipboardFormat
 VCL Reference

TPicture.LoadFromClipboardFormat

TPicture	See also

Reads the picture from the handle provided in the given Clipboard format.

procedure LoadFromClipboardFormat(AFormat: Word; AData: THandle; APalette: HPALETTE);

Description

Use LoadFromClipboardFormat to read in a graphic from the Clipboard. If the format is not supported, an EInvalidGraphic exception is raised.


TPicture.LoadFromFile
 VCL Reference

TPicture.LoadFromFile

TPicture	See also

Reads the file specified in FileName and loads the data into the TPicture object.

procedure LoadFromFile(const FileName: string);

Description

Use LoadFromFile to read a picture from disk. The TGraphic class created is determined by the file extension of the file. If the file extension is not recognized an EInvalidGraphic exception is raised.


TPicture.RegisterClipboardFormat
 VCL Reference

TPicture.RegisterClipboardFormat

TPicture	See also

Registers a new TGraphic class for use in the LoadFromClipboardFormat method.

type TGraphicClass = class ofTGraphic;

classprocedure RegisterClipboardFormat(AFormat: Word; AGraphicClass: TGraphicClass);

Description

Use RegisterClipboardFormat register a new graphic format with TPicture so that it can be used with the LoadFromClipboardFormat method.


TPicture.RegisterFileFormat
 VCL Reference

TPicture.RegisterFileFormat

TPicture	See also

Registers a new TGraphic class for use in LoadFromFile.

type TGraphicClass = class ofTGraphic;

classprocedure RegisterFileFormat(const AExtension, ADescription: string; AGraphicClass: TGraphicClass);

Description

Use RegisterFileFormat to register a graphic file format with TPicture so that it can be used with a Open or Save dialog box.

The AExtension parameter specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with TBitmap). The ADescription parameter specifies the description of the graphic to appear in the drop down list of the dialog box (for example, "Bitmaps" is the description of TBitmap). The AGraphicClass parameter registers the new graphic class to associate with the file format.


TPicture.RegisterFileFormatRes
 VCL Reference

TPicture.RegisterFileFormatRes

TPicture	See also

Registers a new TGraphic class for use in the LoadFromFile method.

type TGraphicClass = class ofTGraphic;

class procedure RegisterFileFormatRes(const AExtension: String; ADescriptionResID: Integer; AGraphicClass: TGraphicClass);

Description

Use RegisterFileFormatRes by specifying a string resource.

The AExtension parameter specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with TBitmap).

The ADescriptionResID parameter specifies the resource ID for a description of the graphic, which then appears in the drop down list of the dialog box (for example, "Bitmaps" is the description of TBitmap).

The AGraphicClass parameter registers the new graphic class to associate with the file format.


TPicture.SaveToClipboardFormat
 VCL Reference

TPicture.SaveToClipboardFormat

TPicture	See also

Allocates a global handle and writes the picture in its native Clipboard format (CF_BITMAP for bitmaps, CF_METAFILE for metafiles, and so on).

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE);

Description

Use SaveToClipboardFormat to copy the picture to a Clipboard format. The resulting values can then be copied to the Windows clipboard using the clipboard’s SetAsHandle method.

The picture’s palette is returned in the APalette parameter, the format in the AFormat parameter, and a handle to the data in the AData parameter. Before the picture can be saved, an application must have registered the format using the RegisterClipboardFormat method.


TPicture.SaveToFile
 VCL Reference

TPicture.SaveToFile

TPicture	See also	Example

Writes the picture to disk.

procedure SaveToFile(const FileName: string);

Description

Use SaveToFile to save a TPicture object to the file specified in FileName.

The saved picture can be loaded to another TPicture or to an appropriate TGraphic descendant by calling its LoadFromFile method.


TPicture.SupportsClipboardFormat
 VCL Reference

TPicture.SupportsClipboardFormat

TPicture	See also

Indicates if the given Clipboard format is supported by the LoadFromClipboardFormat method.

class function SupportsClipboardFormat(AFormat: Word): Boolean;

Description

If the LoadFromClipboardFormat method supports the Clipboard format specified as the value of AFormat, SupportsClipboardFormat returns True. If the format is not supported, the method returns False.


TPicture.UnregisterGraphicClass
 VCL Reference

TPicture.UnregisterGraphicClass

TPicture	See also

Removes all references to the specified TGraphic class and all its descendants from the internal lists of file formats and clipboard formats.

class procedure UnregisterGraphicClass(AClass: TGraphicClass);

Description

Call UnregisterGraphicClass to make a graphic class unavailable to all picture objects. UnregisterGraphicClass reverses the registration accomplished by the RegisterFileFormat,RegisterFileFormatRes, or RegisterClipboardFormat method.

When a graphic class is registered, the global GraphicFilter, GraphicExtension, and GraphicFileMask functions can return dialog filter strings, default file extensions or file filters for the graphic class. Call UnregisterGraphicClass when these values should not be available. For example, component writers who implement custom graphic classes unregister those classes in the finalization block of the unit that implements the custom class. (File formats and clipboard formats for the custom class are registered in the initialization block).


Hierarchy

TObject

TPersistent

TInterfacedPersistent

TPicture


TPopupList
 VCL Reference

TPopupList

Hierarchy	Properties	Methods	See also

TPopupList manages the window that handles popup menu messages.

Unit

Menus

Description

TPopupList is the type of the global PopupList variable, which provides centralized message handling for all popup menus in an application.


 VCL Reference

TPopupList properties

TPopupList	Alphabetically	Legend

In TPopupList

Window

Derived from TList

Capacity

Count

Items

List


 VCL Reference

TPopupList properties

TPopupList	By object	Legend

Capacity

Count

Items

List

Window


TPopupList.Window
 VCL Reference

TPopupList.Window

TPopupMenu

Provides access to the Window handle of the hidden window that processes popup menu messages.

property Window: HWND;

Description

Use Window for Windows API calls that require a window handle. The hidden window that processes messages for the popup menus in an application is not created until the first popup menu is added to the list. If the list contains no popup menus (that is, if no popup menus are created by the application), Window is 0.


 VCL Reference

TPopupList methods

TPopupList	Alphabetically	Legend

In TPopupList

Add

MainWndProc

Remove

WndProc

Derived from TList

Assign

Clear

Delete

Destroy

Error

Exchange

Expand

Extract

First

IndexOf

Insert

Last

Move

Pack

Sort

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TList methods

TPopupList	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

Error

Exchange

Expand

Extract

FieldAddress

First

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

IndexOf

InheritsFrom

InitInstance

Insert

InstanceSize

Last

MainWndProc

MethodAddress

MethodName

Move

NewInstance

Pack

Remove

SafeCallException

Sort

WndProc


TPopupList.Add
 VCL Reference

TPopupList.Add

TPopupListClass	See also

Inserts a new popup menu at the end of the list.

procedure Add(Popup: TPopupMenu): Integer;

Description

Do not call the Add method. Popup menus automatically add themselves to the list when they are created.

Add increments Count and, if necessary, allocates memory by increasing the value of Capacity. When the first popup menu is added to the list, Add creates the hidden window whose handle is available as the Window property.


TPopupList.MainWndProc
 VCL Reference

TPopupList.MainWndProc

TPopupList	See also

Wraps the WndProc method with an exception-handling layer.

procedure MainWndProc(var Message: TMessage);

Description

Do not use the protected MainWndProc method. It is used internally when creating the hidden window that responds to popup menu messages. To subclass the window procedure that handles messages sent to popup menus, override the WndProc method instead.


TPopupList.Remove
 VCL Reference

TPopupList.Remove

TPopupList	See also

Removes a popup menu from the list.

procedure Remove(Popup: TPopupMenu);

Description

Do not call the Remove method. It is called automatically by popup menus from their destructors, to remove themselves from the list.


TPopupList.WndProc
 VCL Reference

TPopupList.WndProc

TPopupList

Provides centralized message handling for all popup menus in the application.

procedure WndProc(var Message: TMessage); virtual;

Description

Override WndProc to subclass the window procedure that handles messages directed at the popup menus in an application. WndProc handles messages by dispatching commands, displaying help, painting menu item, and so on.


Hierarchy

TObject

TList

TPopupList


TProgressBar
 VCL Reference

 TProgressBar

Hierarchy	Properties	Methods	Events	Using TProgressBar	Example

TProgressBar displays a simple progress bar.

Unit

ComCtrls

Description

Use TProgressBar to add a progress bar to a form. Progress bars provide users with visual feedback about the progress of a procedure within an application.As the procedure progresses, the rectangular progress bar gradually fills from left to right with the system highlight color.


 VCL Reference

TProgressBar Properties

TProgressBar	Alphabetically	Legend

In TProgressBar

Max

Min

Orientation

Position

Smooth

Step

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TProgressBar Properties

TProgressBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderWidth

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Max

Min

Name

Orientation

Owner

Parent

ParentShowHint

ParentWindow

PopupMenu

Position

ShowHint

Showing

Smooth

Step

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TProgressBar.Max
 VCL Reference

TProgressBar.Max

TProgressBar	See also	Example

Specifies the upper limit of the range of possible positions.

property Max: Integer;

Description

Use Max along with the Min property to establish the range of possible positions a progress bar. When the process tracked by the progress bar is complete, the value of Position should equal Max.


TProgressBar.Min
 VCL Reference

TProgressBar.Min

TProgressBar	See also	Example

Specifies the lower limit of the range of possible positions.

property Min: Integer;

Description

Use Max along with the Min property to establish the range of possible positions a progress bar. When the process tracked by the progress bar begins, the value of Position should equal Min.


TProgressBar.Orientation
 VCL Reference

TProgressBar.Orientation

TProgressBar

Specifies whether the progress bar is oriented vertically or horizontally.

property Orientation: TProgressBarOrientation;

Description

Use Orientation to get or set whether the progress bar is oriented vertically or horizontally.


TProgressBar.Position
 VCL Reference

TProgressBar.Position

TProgressBar	See also	Example

Specifies the current position of the progress bar.

property Position: Integer;

Description

You can read Position to determine how far the process tracked by the progress bar has advanced from Min toward Max. Set Position to cause the progress bar to display a position between Min and Max. For example, when the process tracked by the progress bar completes, set Position to Max so that it appears completely filled.

When a progress bar is created, Min and Max represent percentages, where Min is 0 (0% complete) and Max is 100 (100% complete). If these values are not changed, Position is the percentage of the process that has already been completed.


TProgressBar.Smooth
 VCL Reference

TProgressBar.Smooth

TProgressBar

Specifies whether the progress bar is smooth or segmented.

property Smooth: Boolean;

Description

Use Smooth to specify whether the progress bar is smooth or segmented.


TProgressBar.Step
 VCL Reference

TProgressBar.Step

TProgressBar	See also	Example

Specifies the amount that Position increases when the StepIt method is called.

property Step: Integer;

Description

Set Step to specify the granularity of the progress bar. Step should reflect the size of each step in the process tracked by the progress bar, in the logical units used by the Max and Min properties.

When a progress bar is created, Min and Max represent percentages, where Min is 0 (0% complete) and Max is 100 (100% complete). If these values are not changed, Step is the percentage of the process completed before the user is provided with additional visual feedback.

When the StepIt method is called, the value of Position increases by Step.


 VCL Reference

TProgressBar Events

TProgressBar	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TProgressBar Events

TProgressBar	By Object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TProgressBar Methods

TProgressBar	Alphabetically	Legend

In TProgressBar

Create

StepBy

StepIt

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TProgressBar Methods

TProgressBar	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

StepBy

StepIt

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TProgressBar.Create
 VCL Reference

TProgressBar.Create

TProgressBar	See also	Example

Creates an instance of TProgressBar.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a progress bar at runtime. Progress bars placed on forms at design time are created automatically.

AOwner is another component, typically the form, that is responsible for freeing the progress bar. It becomes the value of the Owner property.


TProgressBar.StepBy
 VCL Reference

TProgressBar.StepBy

TProgressBar	See also	Example

Advances the Position of the progress bar by a specified amount.

procedure StepBy(Delta: Integer);

Description

Call StepBy to increase the value of Position by the value of the Delta parameter. To advance Position by a default amount that represents a single step in the process, use the StepIt method.


TProgressBar.StepIt
 VCL Reference

TProgressBar.StepIt

TProgressBar	See also	Example

Advances Position by the amount specified in the Step property.

procedure StepIt;

Description

Call the StepIt method to increase the value of Position by the value of the Step property. If Step represents the size of one logical step in the process tracked by the progress bar, call Step after each logical step is completed.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TProgressBar


TPrintDlg
 VCL Reference

TPrintDlg

Hierarchy	Properties	Methods	Events	Using TPrintDlg	See also

TPrintDlg is the standard action for displaying a print dialog.

Unit

StdActns

Description

Add TPrintDlg to an action list to add a print dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the print dialog (TPrintDialog) when invoked. Write an OnAccept event handler to perform the actual printing when the user clicks OK. You can read details about the user’s selections in the dialog from the Dialog property.


 VCL Reference

TPrintDlg properties

TPrintDlg	Alphabetically	Legend

In TPrintDlg

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TPrintDlg properties

TPrintDlg	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TPrintDlg.Dialog
 VCL Reference

TPrintDlg.Dialog

TPrintDlg 	See also

Provides access the print dialog that the action executes.

property Dialog: TPrinterSetupDialog;

Description

When using a print dialog action, you do not place a TPrintDialog component on the form or data module at design time. Instead, you add the TPrintDlg action to your action list. If you want to configure the dialog, for example to set the Options that are available to users, you can access the dialog component using the Dialog property. From an OnAccept event handler, use Dialog to read the choices that the user made in the print dialog and then perform the printing based on those choices.

The print dialog component is created by the TPrintDlg constructor.


 VCL Reference

TPrintDlg events

TPrintDlg	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TPrintDlg events

TPrintDlg	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TPrintDlg methods

TPrintDlg	Alphabetically	Legend

Derived from TCommonDialogAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPrintDlg methods

TPrintDlg	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TPrintDlg


TPrinter
 VCL Reference

TPrinter

Hierarchy	Properties	Methods	Using TPrinter	See also

TPrinter encapsulates the Windows printer interface.

Unit

Printers

Description

Use TPrinter to manage any printing performed by an application. Obtain an instance of TPrinter by calling the Printer function in the Printers unit.

To determine how the printed image of the form appears, use the PrintScale property of a TForm component.

A print job is started by a call to BeginDoc. The application sends commands by rendering through a Text variable or the printer’s canvas. You can move to a new page by calling the NewPage method. The job stays open until the application calls EndDoc. If a problem occurs and you need to terminate a print job that was not sent to the printer successfully, call the Abort method.

Use the TPrinter properties to configure the print job. For example, the title displayed in the Print Manager (and on network header pages) is determined by the Title property. Copies determines the number of copies to print, and Orientation lets you specify whether to print in portrait or landscape mode.

TPrinter includes several read-only properties as well, that let you determine which page is currently being printed, the fonts available on the printer, the paper size, and so on.


 VCL Reference

TPrinter properties

TPrinter	Alphabetically	Legend

In TPrinter

Aborted

Canvas

Capabilities

Copies

Fonts

Handle

Orientation

PageHeight

PageNumber

PageWidth

PrinterIndex

Printers

Printing

Title


 VCL Reference

TPrinter properties

TPrinter	By object	Legend

Aborted

Canvas

Capabilities

Copies

Fonts

Handle

Orientation

PageHeight

PageNumber

PageWidth

PrinterIndex

Printers

Printing

Title


TPrinter.Aborted
 VCL Reference

TPrinter.Aborted

TPrinter	See also 	Example

Determines if the user aborted the print job.

property Aborted: Boolean;

Description

If Aborted is True, the print job was aborted. If it is False, the user did not abort the print job.

The Abort method sets the Aborted property to True.


TPrinter.Canvas
 VCL Reference

TPrinter.Canvas

TPrinter	See also 	Example

Represents the surface of the currently printing page.

property Canvas: TCanvas;

Description

Canvas represents the printing surface of a page. Use the Brush, Font, and Pen properties of the Canvas object to determine how drawing or text appears on the page.

Note:	Delphi canvases use device-dependent bitmaps to implement the Draw, StretchDraw, or CopyRect methods. Because of this, you can’t use these methods with most printers. Instead, to create graphic images on the printer’s canvas, create a device-independent bitmap and draw it directly to the canvas’s Handle property.


TPrinter.Capabilities
 VCL Reference

TPrinter.Capabilities

TPrinter

Indicates the current settings of a printer device driver.

type

  TPrinterCapability = (pcCopies, pcOrientation, pcCollation);

  TPrinterCapabilities = set of TPrinterCapability;

property Capabilities: TPrinterCapabilities;

Description

Capabilities contains the capabilities for the printer, indicating the orientation, number of copies, and whether or not collated is selected.


TPrinter.Copies
 VCL Reference

TPrinter.Copies

TPrinter

Specifies the number of copies to print.

property Copies: Integer;

Description

Set Copies to indicate the number of copies to print.

Copies uses the device mode to determine the number of copies to print.


TPrinter.Fonts
 VCL Reference

TPrinter.Fonts

TPrinter	See also

Lists the fonts supported by the current printer.

property Fonts: TStrings;

Description

Read Fonts to get a list of the fonts supported by the printer. Each string in Fonts is the name of a typeface.

Fonts contains TrueType fonts even if the printer doesn't support them natively because the Windows Graphics Device Interface (GDI) can draw TrueType fonts accurately when a print job uses them.


TPrinter.Handle
 VCL Reference

TPrinter.Handle

TPrinter 	Example

Provides access to the handle of the printer object.

property Handle: HDC;

Description

Use Handle to gain access to the handle of the printer object.


TPrinter.Orientation
 VCL Reference

TPrinter.Orientation

TPrinter 	Example

Determines if the print job prints vertically or horizontally on a page.

type TPrinterOrientation = (poPortrait, poLandscape);

property Orientation: TPrinterOrientation;

Description

Use Orientation to determine if a print job prints in landscape or portrait.

TPrinterOrientation is the type of the Orientation property. These are the possible values for TPrinterOrientation:

Value	Meaning

poPortrait	The job prints vertically on the page.

poLandscape	The job prints horizontally on the page.


TPrinter.PageHeight
 VCL Reference

TPrinter.PageHeight

TPrinter	See also 	Example

Indicates the height (in pixels) of the currently printing page.

property PageHeight: Integer;

Description

Use PageHeight to find the height in pixels of the currently printing page.


TPrinter.PageNumber
 VCL Reference

TPrinter.PageNumber

TPrinter	See also 	Example

Indicates the number of the page currently printing.

property PageNumber: Integer;

Description

Use PageNumber to find the page number of the currently printing page.

PageNumber is incremented whenever the NewPage method is called. It is also incremented when a Text variable is written and a CR is encountered on the last line of the page.


TPrinter.PageWidth
 VCL Reference

TPrinter.PageWidth

TPrinter	See also 	Example

Indicates the value of width (in pixels) of the currently printing page.

property PageWidth: Integer;

Description

Use PageWidth to find the width in pixels of the currently printing page.


TPrinter.PrinterIndex
 VCL Reference

TPrinter.PrinterIndex

TPrinter	See also

Specifies which printer listed in the Printers property is the currently selected printer.

property PrinterIndex: Integer;

Description

The value of PrinterIndex is the currently selected printer. If this value is changed, EndDoc is called automatically. To select the default printer, set the value of PrinterIndex to -1.

The list of installed printers is found in the Printers property. The list of fonts supported by the current printer is found in the Fonts property.


TPrinter.Printers
 VCL Reference

TPrinter.Printers

TPrinter	See also

Lists all printers installed in Windows.

property Printers: TStrings;

Description

The list of installed printers is found in the Printers property. The value of the PrinterIndex property is the currently selected printer. The list of fonts supported by the current printer is found in the Fonts property.


TPrinter.Printing
 VCL Reference

TPrinter.Printing

TPrinter	See also 	Example

Indicates whether a print job is printing.

property Printing: Boolean;

Description

Use Printing to determine if a job is printing.

Printing is True when the application has called the BeginDoc method but the EndDoc method (or the Abort method) hasn't yet been called.


TPrinter.Title
 VCL Reference

TPrinter.Title

TPrinter

Determines the text that is listed in the Print Manager and on network header pages.

property Title: string;

Description

Title is used by Windows in the Print Manager and for network title pages.


 VCL Reference

TPrinter methods

TPrinter	Alphabetically	Legend

In TPrinter

Abort

BeginDoc

Create

Destroy

EndDoc

GetPrinter

NewPage

Refresh

SetPrinter

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPrinter methods

TPrinter	By object	Legend

Abort

AfterConstruction

BeforeDestruction

BeginDoc

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

EndDoc

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetPrinter

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

NewPage

Refresh

SafeCallException

SetPrinter


TPrinter.Abort
 VCL Reference

TPrinter.Abort

TPrinter	See also 	Example

Terminates the printing of a print job, dropping all unprinted data.

procedure Abort;

Description

Use Abort to terminate the print job before it completes; otherwise, use the EndDoc method.

When Abort is called, the device is then set for the next print job.


TPrinter.BeginDoc
 VCL Reference

TPrinter.BeginDoc

TPrinter	See also 	Example

Sends a print job to the printer.

procedure BeginDoc;

Description

Call BeginDoc to initiate a print job. If the print job is sent successfully, the application calls EndDoc to end the print job. The print job won't actually start printing until EndDoc is called.


TPrinter.Create
 VCL Reference

TPrinter.Create

TPrinter	See also

Creates a printer.

constructor Create;

Description

Never call Create directly. Create is called automatically by the Printer function. Create allocates memory for a printer and calls the inherited Create. Then it sets the correct driver, device, and port.


TPrinter.Destroy
 VCL Reference

TPrinter.Destroy

TPrinter	See also

Destroys an instance of a printer.

destructor Destroy; override;

Description

Do not call Destroy directly. The printer object is automatically created and destroyed.

When Destroy is called, it verifies that any currently printing job has ended, then frees resources such as the handle, fonts, and canvas, closes the printer, and calls the inherited Destroy method.


TPrinter.EndDoc
 VCL Reference

TPrinter.EndDoc

TPrinter	See also 	Example

Ends the current print job and closes the text file variable.

procedure EndDoc;

Description

EndDoc terminates the print job (and closes the currently open Text). The print job will begin printing on the printer after a call to EndDoc.

After the application calls EndDoc, the printer begins printing. Use EndDoc after successfully sending a print job to the printer. If the print job isn't successful, use the Abort method.


TPrinter.GetPrinter
 VCL Reference

TPrinter.GetPrinter

TPrinter	See also

Retrieves information about the current printer.

procedure GetPrinter (ADevice, ADriver, APort: PChar; var ADeviceMode: THandle);

Description

Call GetPrinter to obtain information about the current printer.

ADevice is a buffer that receives the device name of the current printer. This is the name that appears in the Print Manager (for example, "Epson FX-80"). It is not the printer model name.

ADriver is a buffer that receives the driver name for the current printer. Some versions of Windows do not use printer driver names, in which case this buffer is unused. On versions of Windows that support printer driver names, this is the name of a printer driver (usually ‘WINSPOOL’).

APort is a buffer that receives the port used by the current printer. It is not used on 32-bit versions of Windows, but is included for backward compatibility.

DeviceMode returns the handle to a memory buffer containing a DeviceMode record, which contains device-specific initialization data for the device driver. Use the GlobalLock function to convert this handle into a pointer to the record.


TPrinter.NewPage
 VCL Reference

TPrinter.NewPage

TPrinter	See also 	Example

Starts a new page and increments the PageNumber property.

procedure NewPage;

Description

NewPage forces the current print job to begin printing on a new page in the printer.

NewPage increments the value of the PageNumber property. It also resets the value of the Pen property of the Canvas back to (0, 0).


TPrinter.Refresh
 VCL Reference

TPrinter.Refresh

TPrinter	See also

Updates the Fonts and Printers properties.

procedure Refresh;

Description

Call Refresh when the installed fonts or printers on the current system may have changed. Refresh clears the internal cache of installed fonts and printers, so that the Fonts and Printers properties are updated when they are next read.


TPrinter.SetPrinter
 VCL Reference

TPrinter.SetPrinter

TPrinter	See also

Specifies the current printer.

procedure SetPrinter(ADevice, ADriver, APort: PChar; ADeviceMode: THandle);

Description

Call SetPrinter to change the current printer.

ADevice specifies the device name of the new printer. This is the name that appears in the Print Manager (for example, "Epson FX-80"). It is not the printer model name.

ADriver specifies the driver name for the new printer (usually ‘WINSPOOL’).

APort is included for backward compatibility. It should be set to an empty string.

DeviceMode is the handle to a memory buffer containing a DeviceMode record, which contains device-specific initialization data for the device driver. This handle can be obtained by calling the GlobalAlloc function to allocate the record.


Hierarchy

TObject

TPrinter


TPrintDialog
 VCL Reference

 TPrintDialog

Hierarchy	Properties	Methods	Events	See also

TPrintDialog displays a Print dialog.

Unit

Dialogs

Description

The TPrintDialog component displays a standard Windows dialog box for sending jobs to a printer. The dialog is modal and does not appear at runtime until it is activated by a call to the Execute method.


 VCL Reference

TPrintDialog properties

TPrintDialog	Alphabetically	Legend

In TPrintDialog

Collate

Copies

FromPage

MaxPage

MinPage

Options

PrintRange

PrintToFile

ToPage

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPrintDialog properties

TPrintDialog	By object	Legend

Collate

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Copies

Ctl3D

DesignInfo

FromPage

Handle

HelpContext

MaxPage

MinPage

Name

Options

Owner

PrintRange

PrintToFile

Tag

ToPage

VCLComObject


TPrintDialog.Collate
 VCL Reference

TPrintDialog.Collate

TPrintDialog	See also

Indicates whether the Collate check box is selected.

property Collate: Boolean;

Description

Collate is True whenever the Collate check box is selected in the Print dialog. To make the dialog open with the check box selected, set Collate to True in the Object Inspector or in program code.


TPrintDialog.Copies
 VCL Reference

TPrintDialog.Copies

TPrintDialog	See also

Indicates the number copies selected in the Print dialog.

property Copies: Integer;

Description

If Copies is 0 or 1, the dialog will have 1 in the Number of Copies field. To make the dialog open with 2 or more copies selected, set the value of Copies in the Object Inspector or in program code.


TPrintDialog.FromPage
 VCL Reference

TPrintDialog.FromPage

TPrintDialog	See also 	Example

Indicates the page on which the print job is to begin.

property FromPage: Integer;

Description

The FromPage property corresponds to the From field in the Print dialog.


TPrintDialog.MaxPage
 VCL Reference

TPrintDialog.MaxPage

TPrintDialog	See also 	Example

Determines the greatest page number the user can enter when specifying pages to print.

property MaxPage: Integer;

Description

If the user tries to enter a number greater than MaxPage, an error message appears.

Note

The user can specify page numbers only if the poPageNums flag is set in Options. If poPageNums is on, MaxPage must be set to a value greater than MinPage or the Print dialog will not open.


TPrintDialog.MinPage
 VCL Reference

TPrintDialog.MinPage

TPrintDialog	See also 	Example

Determines the smallest page number the user can enter when specifying pages to print.

property MinPage: Integer;

Description

If the user tries to enter a number smaller than MinPage, a error message appears.

Note

The user can specify page numbers only if the poPageNums flag is set in Options. If poPageNums is on, MaxPage must be set to a value greater than MinPage or the Print dialog will not open.


TPrintDialog.Options
 VCL Reference

TPrintDialog.Options

TPrintDialog	See also 	Example

Determines the appearance and behavior of the Print dialog.

type

  TPrintDialogOption = (poPrintToFile, poPageNums, poSelection, poWarning, poHelp, poDisablePrintToFile);

TPrintDialogOptions = set of TPrintDialogOption;

property Options: TPrintDialogOptions;

Description

The possible values of Options are:

Value	Meaning

poDisablePrintToFile	Disables (grays) the Print To File Check box. (Applicable only if the poPrintToFile flag is set.)

poHelp	Displays a Help button in the dialog. May not work in some versions of Windows 95.

poPageNums	Enables the Pages radio button, allowing the user to specify a page range.

poPrintToFile	Displays a Print To File check box in the dialog.

poSelection	Enables the Selection radio button, allowing the user to print selected (highlighted) text.

poWarning	Generates a warning message if the user tries to send a job to an uninstalled printer.

By default, all options flags are off.


TPrintDialog.PrintRange
 VCL Reference

TPrintDialog.PrintRange

TPrintDialog	See also 	Example

Indicates the type of print range selected in the dialog.

type TPrintRange = (prAllPages, prSelection, prPageNums);

property PrintRange: TPrintRange;

Description

The value of PrintRange corresponds the All, Selection, and Pages (From/To) radio buttons in the Print dialog:

Value	Meaning

prAllPages	The All radio button is selected.

prSelection	The Selection radio button is selected.

prPageNums	The Pages radio button is selected.

To determine which radio button is selected by default when the dialog opens, set the value of PrintRange in the Object Inspector or in program code.

To enable the Pages radio button, set the poPageNums flag in Options. To enable the Selection radio button, set the poSelection flag in Options and set MaxPage to a greater value than MinPage.


TPrintDialog.PrintToFile
 VCL Reference

TPrintDialog.PrintToFile

TPrintDialog	See also 	Example

Indicates whether the Print To File check box is selected.

property PrintToFile: Boolean;

Description

PrintToFile is True whenever the Print To File check box is selected in the dialog. To make the dialog open with the check box selected, set PrintToFile to True in the Object Inspector or in program code.

To make the Print To File check box appear in the dialog, set the poPrintToFile flag in Options. To disable (gray) the Print To File check box, set the poDisablePrintToFile flag.


TPrintDialog.ToPage
 VCL Reference

TPrintDialog.ToPage

TPrintDialog	See also 	Example

Indicates the page on which the print job is to end.

property ToPage: Integer;

Description

The ToPage property corresponds to the To field in the Print dialog.


 VCL Reference

TPrintDialog events

TPrintDialog	Alphabetically	Legend

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TPrintDialog events

TPrintDialog	By object	Legend

OnClose

OnShow


 VCL Reference

TPrintDialog methods

TPrintDialog	Alphabetically	Legend

In TPrintDialog

Execute

Derived from TCommonDialog

Create

DefaultHandler

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPrintDialog methods

TPrintDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPrintDialog.Execute
 VCL Reference

TPrintDialog.Execute

TPrintDialog 	Example

Displays the Print dialog box.

function Execute: Boolean; override;

Description

Execute opens the Print dialog, returning True when the user clicks Print and False when the user clicks Cancel.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TPrintDialog


TPropertyEditor
 VCL Reference

TPropertyEditor

Hierarchy	Properties	Methods	See also

TPropertyEditor is a base class for property editors that implements the IProperty interface.

Unit

DesignEditors

Description

Use TPropertyEditor or one of its descendants as a base class when defining a property editor for a specialized property in a new component class. TPropertyEditor has several descendants that can be used to set the values of properties with simple types. Create specialized property editors to allow users to set more complicated property values from the Object Inspector.

Unlike its ancestor, TBasePropertyEditor, TPropertyEditor contains no abstract methods and provides a default implementation for the IProperty interface that the Object Inspector uses to communicate with property editors.

Individual descendants of TPropertyEditor are displayed based on the type of the property being edited. Individual property editors can be associated with all properties of a specified type, or with a particular property of a particular component class. To create the association between a property editor and a property type, call RegisterPropertyEditor. Once the property editor is registered, it appears when the user attempts to edit an appropriate property using the Object Inspector.


 VCL Reference

TPropertyEditor properties

TPropertyEditor	Alphabetically 	Legend

In TPropertyEditor

Designer

PrivateDirectory

PropCount

Value

Derived from TInterfacedObject

RefCount


 VCL Reference

TPropertyEditor properties

TPropertyEditor	By object 	Legend

Designer

PrivateDirectory

PropCount

RefCount

Value


TPropertyEditor.Designer
 VCL Reference

TPropertyEditor.Designer

TPropertyEditor

Provides access to the form designer object in the IDE.

property Designer: IDesigner;

Description

Use Designer to read from or make changes to the current form or module in the IDE. The IDesigner interface has methods that can access the components in the current unit and other units linked in by the uses clause, create or alter the methods in the current unit, and so on.


TPropertyEditor.PrivateDirectory
 VCL Reference

TPropertyEditor.PrivateDirectory

TPropertyEditor

Specifies the location where the property editor can store auxiliary files.

property PrivateDirectory: string;

Description

Use PrivateDirectory to store executables used by the property editor or auxiliary files that store state information, examples, templates, and so on. PrivateDirectory is the location specified in the registry under the key

HKEY_CURRENT_USER\Software\Borland\Delphi\x.0\Globals\PrivateDir

The property editor can use the directory to read files, write files, or store DLLs and executables.


TPropertyEditor.PropCount
 VCL Reference

TPropertyEditor.PropCount

TPropertyEditor	See also

Indicates the number of components whose properties are being edited.

property PropCount: Integer;

Description

Use PropCount to determine the valid range of indexes to use when calling the GetComponent method. This value corresponds to the number of components selected when the property editor is created. Typically, it is not necessary to access individual components because the Getxxx and Setxxx methods propagate values appropriately.


TPropertyEditor.Value
 VCL Reference

TPropertyEditor.Value

TPropertyEditor	See also

Represents the current value of the property (as returned by GetValue) as a string.

property Value: string;

Description

Read Value to determine the current property setting as it is displayed in the Object Inspector. Set Value to apply a value to all selected components for which the property is appropriate.

The Value property is implemented using the GetValue and SetValue methods. Descendants of TPropertyEditor must override these methods to implement the Value property.


 VCL Reference

TPropertyEditor methods

TPropertyEditor	Alphabetically 	Legend

In TPropertyEditor

Activate

AllEqual

AutoFill

Create

Destroy

Edit

GetAttributes

GetComponent

GetEditLimit

GetEditValue

GetFloatValue

GetFloatValueAt

GetInt64Value

GetInt64ValueAt

GetIntfValue

GetIntfValueAt

GetMethodValue

GetMethodValueAt

GetName

GetOrdValue

GetOrdValueAt

GetProperties

GetPropInfo

GetPropType

GetStrValue

GetStrValueAt

GetValue

GetValues

GetVarValue

GetVarValueAt

GetVisualValue

HasInstance

Initialize

Modified

Revert

SetFloatValue

SetInt64Value

SetIntfValue

SetMethodValue

SetOrdValue

SetPropEntry

SetStrValue

SetValue

SetVarValue

ValueAvailable

Derived from TInterfacedObject

AfterConstruction

BeforeDestruction

NewInstance

Derived from TObject

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

SafeCallException


 VCL Reference

TPropertyEditor methods

TPropertyEditor	By object 	Legend

Activate

AfterConstruction

AllEqual

AutoFill

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

Edit

FieldAddress

Free

FreeInstance

GetAttributes

GetComponent

GetEditLimit

GetEditValue

GetFloatValue

GetFloatValueAt

GetInt64Value

GetInt64ValueAt

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetIntfValue

GetIntfValueAt

GetMethodValue

GetMethodValueAt

GetName

GetOrdValue

GetOrdValueAt

GetProperties

GetPropInfo

GetPropType

GetStrValue

GetStrValueAt

GetValue

GetValues

GetVarValue

GetVarValueAt

GetVisualValue

HasInstance

InheritsFrom

Initialize

InitInstance

InstanceSize

MethodAddress

MethodName

Modified

NewInstance

Revert

SafeCallException

SetFloatValue

SetInt64Value

SetIntfValue

SetMethodValue

SetOrdValue

SetPropEntry

SetStrValue

SetValue

SetVarValue

ValueAvailable


TPropertyEditor.Activate
 VCL Reference

TPropertyEditor.Activate

TPropertyEditor	See also

Responds when the property is selected in the Object Inspector.

procedure Activate; virtual;

Description

Do not call the Activate method. It is called automatically when the property is selected. As implemented in TPropertyEditor, Activate does nothing. Override this method to determine attributes of the property dynamically when the property editor is displayed in the Object Inspector.

Before Activate is called, the GetAttributes method does not need to provide accurate information about any attributes other than paSubProperties, paVCL, and paMultiSelect. Any other attributes can be computed in an override of the Activate method and stored so that subsequent calls to GetAttributes can provide accurate information.


TPropertyEditor.AllEqual
 VCL Reference

TPropertyEditor.AllEqual

TPropertyEditor	See also

Indicates whether all selected components have the same value for the property.

function AllEqual: Boolean; virtual;

Description

The Object Inspector calls AllEqual when there is more than one component selected to determine whether a value should appear for this property. If this method returns True, the Object Inspector displays a value for the property. If this method returns False, the line for the property in the Object Inspector remains blank.

In TPropertyEditor, AllEqual always returns False if more than one selected component has the associated property. Override this method to check the properties of individual components and determine whether a property value can be displayed in the Object Inspector.

Note:	AllEqual is called only when the value returned by GetAttributes includes paMultiSelect.


TPropertyEditor.AutoFill
 VCL Reference

TPropertyEditor.AutoFill

TPropertyEditor	See also

Returns True to indicate that values can be typed incrementally—and automatically completed—in the Object Inspector.

function AutoFill: Boolean; virtual;

If GetAttributes returns paValueList, AutoFill is called to verify that automatic typing completion is permitted. If AutoFill returns True, the Object Inspector uses the values provided by GetValues to fill in partially typed entries. For example, if the legal values for a property are prSmall and prLarge, the user can type “prS” and the Object Inspector automatically fills in “prSmall.”

AutoFill always returns True. But descendant property editors can override AutoFill to disable automatic completion of property values.


TPropertyEditor.Create
 VCL Reference

TPropertyEditor.Create

TPropertyEditor	See also

Creates a new TPropertyEditor object.

constructor Create(const ADesigner: IDesigner; APropCount: Integer); virtual;

Description

Do not create instances of a property editor. Registered property editors are created automatically for selected objects in the form designer.

ADesigner is an interface that the property editor can use to interact with the forms designer. It becomes the value of the Designer property.

APropCount indicates the number of components whose properties are to be edited using the property editor. It becomes the value of the PropCount property.


TPropertyEditor.Destroy
 VCL Reference

TPropertyEditor.Destroy

TPropertyEditor	See also

Destroys an instance of TPropertyEditor.

destructor Destroy; override;

Description

Do not call Destroy. The Object Inspector destroys the property editor automatically when it is finished.

Destroy frees the internal objects used to store information about the selected components and their property settings. Override Destroy to free any other internal structures created by the property editor.


TPropertyEditor.Edit
 VCL Reference

TPropertyEditor.Edit

TPropertyEditor	See also

Responds when the user double-clicks the property in the Object Inspector.

procedure Edit; virtual;

Description

The Object Inspector calls Edit when the ellipsis button (...) is pressed or the property is double-clicked. The Edit method of TPropertyEditor cycles through the possible enumerated values of the property when the GetValues method returns one or more property strings to the callback method.

Override the Edit method to implement a response to the ellipsis button or double-clicking the property. For example, use the Edit method to bring up a dialog for editing the property in some more meaningful fashion than typing a text value in the Object Inspector.


TPropertyEditor.GetAttributes
 VCL Reference

TPropertyEditor.GetAttributes

TPropertyEditor	See also

Describes the property so the Object Inspector provides the appropriate controls.

type

  TPropertyAttribute = (paValueList, paSubProperties, paDialog, paMultiSelect, paAutoUpdate, paSortList, paReadOnly, paRevertable, paFullWidthName, paVolatileSubProperties, paVCL, paNotNestable);

  TPropertyAttributes = set of TPropertyAttribute;

function GetAttributes: TPropertyAttributes; virtual;

Description

The Object Inspector calls GetAttributes to determine what controls to display for the property and what property editor methods to call. The GetAttributes method of TPropertyEditor returns [paMultiSelect, paRevertable]. Override GetAttributes to return the set of values that corresponds to the attributes of the associated property.

GetAttributes returns a set drawn from the following values.

Value	Meaning
paValueList	The property editor can return an enumerated list of values for the property. When paValueList is set, the GetValues method should be overridden to provide the enumerated values. When paValueList is set, the Object Inspector displays a drop-down button to the right of the property.
paSortList	The Object Inspector should sort the list returned by GetValues.
paSubProperties	The property has subproperties that are displayed indented and below the current property in standard outline format. If paSubProperties is set, the GetProperties method should be overridden to provide subproperties.
paDialog	The Edit method brings up a dialog. When paDialog is set, the Object Inspector displays an ellipsis button to the right of the property.
paMultiSelect	The property can be displayed when more than one component is selected.
paAutoUpdate	The SetValue method is called on each change made to the editor rather than after the change has been approved.
paReadOnly	Value is not allowed to change.
paRevertable	The property editor can restore the property value to the original value. Properties that shouldn't be reverted are nested properties such as fonts and elements of composite properties such as set element values.
paFullWidthName	The property value does not appear in the Object Inspector. Instead, the Object Inspector uses its full width (name and value columns) to display the property name.
paVolatileSubProperties	Any change of property value causes any shown subproperties to be recomputed (collapsed and re-expanded).
paVCL	The property editor is a VCL component (as opposed to a CLX component).
paNotNestable	The Object Inspector does not show the property when displaying the properties of an expanded reference.
Before the Object Inspector calls the Activate method, GetAttributes does not need to provide accurate information about any attributes other than paSubProperties, paVCL, and paMultiSelect.


TPropertyEditor.GetComponent
 VCL Reference

TPropertyEditor.GetComponent

TPropertyEditor	See also

Returns the specified object from the set of all objects currently being edited by the property editor.

function GetComponent(Index: Integer): TPersistent;

Description

Call GetComponent to access any of the objects with a property currently being edited by the property editor. The Index parameter is used to specify individual objects in the internal list maintained by the property editor. Index should be a value between 0 and PropCount - 1, inclusive.

Use GetComponent to iterate over all objects currently being edited.


TPropertyEditor.GetEditLimit
 VCL Reference

TPropertyEditor.GetEditLimit

TPropertyEditor	See also

Returns the maximum length, in characters, of the Value property.

function GetEditLimit: Integer; virtual;

Description

The Object Inspector calls GetEditLimit to determine how many characters the user can type when entering a value for the property. GetEditLimit returns 255. Override this method when the maximum length of the property string is some other value.


TPropertyEditor.GetEditValue
 VCL Reference

TPropertyEditor.GetEditValue

TPropertyEditor	See also

Retrieves a string to represent the property’s value, or, if the value is not available, an error message.

function GetEditValue(out Value: string): Boolean;

Description

The Object Inspector calls GetEditValue (through the IProperty interface) to obtain the string it displays as the property value.

GetValue formats the string displayed in the Object Inspector to represent the property value and returns it as the Value parameter. Unlike the GetValue method, which is the read access method for the Value property, GetEditValue does not raise an exception when the property value is unavailable. Instead, it assigns an error message to Value and returns False.

GetValue returns True if Value returns a string representation of the property value.

Note:	GetEditValue is not a virtual method. To provide a method that supplies the string that appears in the Object Inspector, override the GetValue method instead. GetEditValue calls GetValue to fetch this string.


TPropertyEditor.GetFloatValue
 VCL Reference

TPropertyEditor.GetFloatValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetFloatValue: Extended;

Description

Call GetFloatValue to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetFloatValue only if the property is a float type.

If more than one object is currently being edited, GetFloatValue returns the value for the object returned by GetComponent(0). To obtain the current property value for every object currently being edited, use the GetFloatValueAt method.


TPropertyEditor.GetFloatValueAt
 VCL Reference

TPropertyEditor.GetFloatValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetFloatValueAt(Index: Integer): Extended;

Description

Call GetFloatValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetFloatValueAt only if the property is a float type. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetFloatValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetInt64Value
 VCL Reference

TPropertyEditor.GetInt64Value

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetInt64Value: Int64;

Description

Call GetInt64Value to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetInt64Value only if the property is 64-bit integer type.

If more than one object is currently being edited, GetInt64Value returns the value for the object returned by GetComponent(0). To obtain the current property value for every object currently being edited, use the GetInt64ValueAt method.


TPropertyEditor.GetInt64ValueAt
 VCL Reference

TPropertyEditor.GetInt64ValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetInt64ValueAt(Index: Integer): Int64;

Description

Call GetInt64ValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetInt64ValueAt only if the property is a 64-bit integer type. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetInt64ValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetIntfValue
 VCL Reference

TPropertyEditor.GetIntfValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetIntfValue: IInterface;

Description

Call GetIntfValue to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetIntfValue only if the property is a component interface type.

If more than one object is currently being edited, GetIntfValue returns the value for the object returned by GetComponent(0). To obtain the current property value for every object currently being edited, use the GetIntfValueAt method.


TPropertyEditor.GetIntfValueAt
 VCL Reference

TPropertyEditor.GetIntfValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetIntfValueAt(Index: Integer): IInterface;

Description

Call GetIntfValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetIntfValueAt only if the property is a component interface type. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetIntfValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetMethodValue
 VCL Reference

TPropertyEditor.GetMethodValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetMethodValue: TMethod;

Description

Call GetMethodValue to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetMethodValue only if the property is a method, such as the DefWndProc property of TWinControl or an event handler.

If more than one object is currently being edited, GetMethodValue returns the value for the object returned by GetComponent(0). To obtain the current property value for every object currently being edited, use the GetMethodValueAt method.


TPropertyEditor.GetMethodValueAt
 VCL Reference

TPropertyEditor.GetMethodValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetMethodValueAt(Index: Integer): TMethod;

Description

Call GetMethodValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetMethodValueAt only if the property is a method, such as the DefWndProc property of TWinControl or an event handler. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetMethodValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetName
 VCL Reference

TPropertyEditor.GetName

TPropertyEditor

Returns the name of the property.

function GetName: string; virtual;

Description

The Object Inspector calls GetName to obtain the property name that it displays. GetName returns the name of the property from the property type information with all underbars replaced by spaces. Override this method if the Object Inspector should display a string other than the property name.


TPropertyEditor.GetOrdValue
 VCL Reference

TPropertyEditor.GetOrdValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetOrdValue: Longint;

Description

Call GetOrdValue to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetOrdValue only if the property is an ordinal type.

If more than one object is currently being edited, GetOrdValue returns the value for the object returned by GetComponent(0). To obtain the current property value for every object currently being edited, use the GetOrdValueAt method.


TPropertyEditor.GetOrdValueAt
 VCL Reference

TPropertyEditor.GetOrdValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetOrdValueAt(Index: Integer): Longint;

Description

Call GetOrdValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetOrdValueAt only if the property is an ordinal type. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetOrdValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetProperties
 VCL Reference

TPropertyEditor.GetProperties

TPropertyEditor	See also

Provides the subproperties of the property to a callback procedure.

type

  TGetPropProc = procedure(const Prop: IProperty) of object;

procedure GetProperties(Proc: TGetPropProc); virtual;

Description

The Object Inspector calls GetProperties when the property is expanded to show subproperties. The GetProperties method of TPropertyEditor does nothing. Property editors that return paSubProperties from the GetAttributes method should override GetProperties to create an appropriate property editor and pass its IProperty interface to the Proc parameter for every subproperty (or nested property) of the property.


TPropertyEditor.GetPropInfo
 VCL Reference

TPropertyEditor.GetPropInfo

TPropertyEditor	See also

Returns the property information record for the object being edited.

function GetPropInfo: PPropInfo; virtual;

Description

Call GetPropInfo to access the property information record that describes the property being edited, including its access functions. If more than one object is being edited, GetPropInfo returns the property information record for the object returned by GetComponent(0).

If only the type information record is desired, use the GetPropType method instead.


TPropertyEditor.GetPropType
 VCL Reference

TPropertyEditor.GetPropType

TPropertyEditor	See also

Returns the type information record for the object being edited.

function GetPropType: PTypeInfo;

Description

Call GetPropType to obtain access to the type information record that describes the type of the property being edited.  If more than one object is being edited, GetPropType returns the type information record for the object returned by GetComponent(0).

If information about the property access functions and storage details is desired as well, use the GetPropInfo method instead.


TPropertyEditor.GetStrValue
 VCL Reference

TPropertyEditor.GetStrValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetStrValue: string;

Description

Call GetStrValue to obtain the current value of the property for the first object in the internal list of objects being edited. Only call GetStrValue if the property is a string type.

If more than one object is currently being edited, GetStrValue returns the value for the object returned by GetComponent(0); To obtain the current property value for every object currently being edited, use the GetStrValueAt method.


TPropertyEditor.GetStrValueAt
 VCL Reference

TPropertyEditor.GetStrValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetStrValueAt(Index: Integer): string;

Description

Call GetStrValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetStrValueAt only if the property is an ordinal type. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetStrValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetValue
 VCL Reference

TPropertyEditor.GetValue

TPropertyEditor	See also

Returns the property value formatted as a string.

function GetValue: string; virtual;

Description

GetValue formats the value of the property, formatted as a string. If the value is not available, GetValue raised an exception.

As implemented in TPropertyEditor, GetValue returns the string '(unknown)'. Descendant classes override this method to provide an appropriate value string or raise an exception.

GetValue is the read access method of the Value property.

Note:	To obtain an error string when the property value is unavailable rather than raising an exception, you can call the GetEditValue method. GetEditValue is protected, but can be called through the IProperty interface in code that is not a method of a descendant class.


TPropertyEditor.GetValues
 VCL Reference

TPropertyEditor.GetValues

TPropertyEditor	See also

Provides the enumerated values of the property to a callback procedure.

procedure GetValues(Proc: TGetStrProc); virtual;

Description

The Object Inspector calls GetValues when the drop-down button is clicked to show enumerated values. The GetValues method of TPropertyEditor does nothing. Property editors that return paValueList from the GetAttributes method should override GetValues to call the Proc parameter for every string that can represent a valid enumerated value. Even if the GetAttributes method does not return paValueList, property editors for enumerated types should still override GetValues to enumerate all possible values.


TPropertyEditor.GetVarValue
 VCL Reference

TPropertyEditor.GetVarValue

TPropertyEditor	See also

Returns the property value of the first object currently being edited.

function GetVarValue: Variant;

Description

Call GetVarValue to obtain the current value of the property for the first object in the internal list of objects being edited. Call GetVarValue only if the property value can be represented by a variant.

If more than one object is currently being edited, GetVarValue returns the value for the object returned by GetComponent(0); To obtain the current property value for every object currently being edited, use the GetVarValueAt method.


TPropertyEditor.GetVarValueAt
 VCL Reference

TPropertyEditor.GetVarValueAt

TPropertyEditor	See also

Returns the property value of the specified object.

function GetVarValueAt(Index: Integer): Variant;

Description

Call GetVarValueAt to obtain the current value of the property for an object in the internal list of objects being edited. Call GetVarValueAt only if the property value can be represented as a variant. The Index parameter identifies which object’s value should be returned. It corresponds to the Index parameter of the GetComponent method.

Use GetVarValueAt to iterate over all current values, for example when implementing the AllEqual method.


TPropertyEditor.GetVisualValue
 VCL Reference

TPropertyEditor.GetVisualValue

TPropertyEditor	See also

Returns the property value as it appears in the Object Inspector.

function GetVisualValue: string;

Description

GetVisualValue returns the string that the Object Inspector displays to represent the property value. If only one item is selected or all multi-selected items have the same value, GetVisualValue returns the string formatted by GetValue. Otherwise, GetVisualValue returns an empty string.


TPropertyEditor.HasInstance
 VCL Reference

TPropertyEditor.HasInstance

TPropertyEditor	See also

Indicates whether a specified object is currently being edited by the property editor.

function HasInstance(Instance: TPersistent): Boolean;

Description

HasInstance returns True if the Instance parameter references one of the objects that the GetComponent method returns, False otherwise.


TPropertyEditor.Initialize
 VCL Reference

TPropertyEditor.Initialize

TPropertyEditor	See also

Initializes the property editor after it is created but before it is used.

procedure Initialize; override;

Description

Do not call the Initialize method. It is called automatically by the Object Inspector to allow property editors to perform any necessary initialization before they are used. The Initialize method of TPropertyEditor does nothing. Override the Initialize method to perform any special initialization, such as the creation of helper objects.

Property editors are often created and discarded without being used because they do not represent a common property across all selected components. Since Initialize is called only after it is determined that the property editor will be used, it is more efficient to initialize property values and create helper objects in the Initialize method rather than the constructor.


TPropertyEditor.Modified
 VCL Reference

TPropertyEditor.Modified

TPropertyEditor	See also

Informs the designer that the property value has changed.

procedure Modified;

Description

Call Modified after changing the property value so that the designer is aware that something has changed.

It is not necessary to call Modified if changes are made using the SetFloatValue, SetMethodValue, SetOrdValue, SetStrValue, or SetVarValue methods. These methods automatically call Modified.


TPropertyEditor.Revert
 VCL Reference

TPropertyEditor.Revert

TPropertyEditor	See also

Restores all object properties to their original values.

procedure Revert;

Description

Call Revert to restore the original property values that each of the edited objects had before the user began making modification with the Object Inspector. Revert will not work if GetAttributes returns paAutoUpdate.


TPropertyEditor.SetFloatValue
 VCL Reference

TPropertyEditor.SetFloatValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetFloatValue(Value: Extended);

Description

Call SetFloatValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetFloatValue unless the property editor represents a float value. After changing a property value using SetFloatValue, it is not necessary to call Modified.


TPropertyEditor.SetInt64Value
 VCL Reference

TPropertyEditor.SetInt64Value

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetInt64Value(Value: Int64);

Description

Call SetInt64Value to change the property setting for every object that can be returned by the GetComponent method. Do not call SetInt64Value unless the property editor represents a 64-bit integer value. After changing a property value using SetInt64Value, it is not necessary to call Modified.


TPropertyEditor.SetIntfValue
 VCL Reference

TPropertyEditor.SetIntfValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetIntfValue(const Value: IInterface);

Description

Call SetIntfValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetIntfValue unless the property editor represents a component interface value. After changing a property value using SetIntfValue, it is not necessary to call Modified.


TPropertyEditor.SetMethodValue
 VCL Reference

TPropertyEditor.SetMethodValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetMethodValue(const Value: TMethod);

Description

Call SetMethodValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetMethodValue unless the property represents a method. After changing a property value using SetMethodValue, it is not necessary to call Modified.


TPropertyEditor.SetOrdValue
 VCL Reference

TPropertyEditor.SetOrdValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetOrdValue(Value: Longint);

Description

Call SetOrdValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetOrdValue unless the property represents an ordinal value. After changing a property value using SetOrdValue, it is not necessary to call Modified.


TPropertyEditor.SetPropEntry
 VCL Reference

TPropertyEditor.SetPropEntry

TPropertyEditor	See also

Informs the property editor of a particular object whose property is to be edited.

procedure SetPropEntry(Index: Integer; AInstance: TPersistent; APropInfo: PPropInfo); override;

Description

The Object Inspector calls SetPropEntry for each object that has a property that the property editor is editing. This allows the property editor to store information about the objects being edited so that it can get and set property values.

Index is the index of the object being edited. This value can range from 0 to one less than the value of the PropCount property.

AInstance is a reference to the object being edited. This is later used to supply the value that the GetComponent method returns.

APropInfo is a pointer to the property information record for the property on AInstance. This is later used to supply the value that the GetPropInfo method returns.


TPropertyEditor.SetStrValue
 VCL Reference

TPropertyEditor.SetStrValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetStrValue(const Value: string);

Description

Call SetStrValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetStrValue unless the property represents a string value. After changing a property value using SetStrValue, it is not necessary to call Modified.


TPropertyEditor.SetValue
 VCL Reference

TPropertyEditor.SetValue

TPropertyEditor	See also

Responds when the user changes the value of the property.

procedure SetValue(const Value: string); virtual;

Description

Do not call SetValue. It is called automatically by the Object Inspector when the user has finished changing the property value. The SetValue method for TPropertyEditor does nothing. Descendant classes override SetValue to apply the value entered by the user (represented by the Value parameter) to all components that can be returned by the GetComponent method.

For many property editors, SetValue need only translate the Value string into an appropriate value and call SetFloatValue, SetMethodValue, SetOrdValue, SetStrValue, or SetVarValue. For properties that do not correspond to a float, method, ordinal, string, or variant, however, SetValue must directly propagate the new value to every component and then call the Modified method. If the value can’t be set, SetValue should raise an exception that describes the problem.

Note:	If the property is changed only through a dialog brought up by the Edit method, SetValue need not be overridden.


TPropertyEditor.SetVarValue
 VCL Reference

TPropertyEditor.SetVarValue

TPropertyEditor	See also

Changes the property value for every object being edited.

procedure SetVarValue(const Value: Variant);

Description

Call SetVarValue to change the property setting for every object that can be returned by the GetComponent method. Do not call SetVarValue unless the property can be represented by a variant value. After changing a property value using SetVarValue, it is not necessary to call Modified.


TPropertyEditor.ValueAvailable
 VCL Reference

TPropertyEditor.ValueAvailable

TPropertyEditor	See also

Indicates whether all components being edited have a value for the property if their ComponentStyle includes csCheckPropAvail.

function ValueAvailable: Boolean;

Description

The Object Inspector calls ValueAvailable to determine which components can be edited for a particular property or which properties can be displayed for a particular component.


Hierarchy

TObject

TInterfacedObject

TBasePropertyEditor

TPropertyEditor


TPrinterSetupDialog
 VCL Reference

 TPrinterSetupDialog

Hierarchy	Properties	Methods	Events	See also

TPrinterSetupDialog displays a print-setup dialog for configuring printers.

Unit

Dialogs

Description

TPrinterSetupDialog displays a modal Windows dialog box for configuring printers. The contents of the dialog vary depending on the printer driver selected.

The dialog does not appear at runtime until it is activated by a call to the Execute method.


 VCL Reference

TPrinterSetupDialog properties

TPrinterSetupDialog	Alphabetically	Legend

Derived from TCommonDialog

Ctl3D

Handle

HelpContext

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TPrinterSetupDialog properties

TPrinterSetupDialog	By object	Legend

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Ctl3D

DesignInfo

Handle

HelpContext

Name

Owner

Tag

VCLComObject


 VCL Reference

TPrinterSetupDialog events

TPrinterSetupDialog	Alphabetically	Legend

Derived from TCommonDialog

OnClose

OnShow


 VCL Reference

TPrinterSetupDialog events

TPrinterSetupDialog	By object	Legend

OnClose

OnShow


 VCL Reference

TPrinterSetupDialog methods

TPrinterSetupDialog	Alphabetically	Legend

In TPrinterSetupDialog

Execute

Derived from TCommonDialog

Create

DefaultHandler

Destroy

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TPrinterSetupDialog methods

TPrinterSetupDialog	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Execute

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction


TPrinterSetupDialog.Execute
 VCL Reference

TPrinterSetupDialog.Execute

TPrinterSetupDialog

Displays the printer configuration dialog box.

function Execute: Boolean; override;

Description

Execute opens the print-setup dialog. If the user clicks OK, Execute configures the printers as specified in the dialog and returns True. If the user clicks Cancel, Execute returns False.


Hierarchy

TObject

TPersistent

TComponent

TCommonDialog

TPrinterSetupDialog


TPublishableVariantType
 VCL Reference

TPublishableVariantType

Hierarchy	Properties	Methods	Using TPublishableVariantType	See also

TPublishableVariantType is the base class for custom Variant types that surface the published properties of an object that represents the Variant’s data.

Unit

TypInfo

Description

Use TPublishableVariantType to define new data types for Object Pascal Variants that have properties and methods. TPublishableVariantType descendants do not represent the Variants themselves. Rather, they act as utility classes that the custom Variants call on to perform their operations. TPublishableVariantType adds to its ancestor’s ability to implement properties and methods on Variants of the custom type by automatically implementing all published properties of the object it uses to store its data.

To create a Variant type that descends from TPublishableVariantType,

1. Map the storage of the Variant’s data on to the TVarDatarecord.

2. Write a method that creates instances of your custom Variant. This fills in the Variant’s data as defined in step 1.

3. Declare a class that descends from TPublishableVariantType.

4. Override the GetInstance method to return the object that stores the custom Variant’s data.

4. Implement all other required behavior (including type conversion rules) in the new class. This involves overriding the appropriate virtual methods (typically DoFunction, DoProcedure, BinaryOp, UnaryOp, CompareOp or Compare, Cast, CastTo, Clear, Copy, IsClear, LeftPromotion, and RightPromotion).

5. In the initialization section of the unit that defines your TPublishableVariantType descendant, create an instance of your class. When you instantiate your object, it automatically registers itself with the Variant-handling system so that the new Variant type is enabled.

6. In the finalization section of the unit that defines your TPublishableVariantType descendant, free the instance of your class. This automatically unregisters the Variant type.

For an example, see the VarComplx unit, which implements a custom variant type for complex numbers.


 VCL Reference

TPublishableVariantType properties

TPublishableVariantType	Alphabetically	Legend

Derived from TCustomVariantType

VarType


 VCL Reference

TPublishableVariantType properties

TPublishableVariantType	By object	Legend

VarType


 VCL Reference

TPublishableVariantType methods

TPublishableVariantType	Alphabetically	Legend

In TPublishableVariantType

GetInstance

GetProperty

SetProperty

Derived from TInvokeableVariantType

DoFunction

DoProcedure

Derived from TCustomVariantType

BinaryOp

Cast

CastTo

CastToOle

Clear

Compare

CompareOp

Copy

Create

Destroy

IsClear

UnaryOp

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TPublishableVariantType methods

TPublishableVariantType	By object	Legend

AfterConstruction

BeforeDestruction

BinaryOp

Cast

CastTo

CastToOle

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Compare

CompareOp

Copy

Create

DefaultHandler

Destroy

Dispatch

DoFunction

DoProcedure

FieldAddress

Free

FreeInstance

GetInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetProperty

InheritsFrom

InitInstance

InstanceSize

IsClear

MethodAddress

MethodName

NewInstance

SafeCallException

SetProperty

UnaryOp


TPublishableVariantType.GetInstance
 VCL Reference

TPublishableVariantType.GetInstance

TPublishableVariantType	See also

Returns the object instance that represents the data from a Variant of the custom type.

function GetInstance(const V: TVarData): TObject; virtual; abstract;

Description

Override GetInstance to return the object that represents the data from a Variant of the custom Type. TPublishableVariantType implements all the published properties of that object so that they are published properties of the Variant.

V is the data from a Variant of the custom type. This data must include a reference to an object that represents the Variant’s data, and which GetInstance returns.

GetInstance is abstract in TPublishableVariantType, which means it has no implementation. Descendant classes override this method to enable Variants to publish the properties from the object that implments their data.


TPublishableVariantType.GetProperty
 VCL Reference

TPublishableVariantType.GetProperty

TPublishableVariantType	See also

Returns the value of a published property on the object that GetInstance returns, so that it is available in custom Variants.

function GetProperty(var Dest: TVarData; const V: TVarData; const Name: string): Boolean; override;

Description

GetProperty enables an application to read the properties of instances of the publishable Variant type. It implements all the properties that are published by the object that GetInstance returns.

When the application contains a line such as

PropValue := MyVariant.SpecialProperty;

a call is automatically generated to GetProperty. If SpecialProperty is a published property on the object that implements the Variant’s data, GetProperty fills in the Dest parameter with the property value.

Dest is a TVarData record that receives the property value.

V is the TVarData record from the Variant instance whose property is being read.

Name is the name of the property.

GetProperty returns True if it returns a property value, and raises an exception if it does not implement the specified property.


TPublishableVariantType.SetProperty
 VCL Reference

TPublishableVariantType.SetProperty

TPublishableVariantType	See also

Sets the value of a published property on the object that GetInstance returns, so that it is available in custom Variants.

function SetProperty(const V: TVarData; const Name: string; const Value: TVarData): Boolean; override;

Description

SetProperty enables an application to set the properties of instances of the publishable Variant type. It implements all the settable properties that are published by the object that GetInstance returns.

When the application contains a line such as

MyVariant.SpecialProperty := NewValue;

a call is automatically generated to SetProperty. If SpecialProperty is a published settable property on the object that implements the Variant’s data, SetProperty sets the property on the object included in V so that the Variant’s value is changed accordingly.

V is the TVarData record from the Variant instance whose property is being set. It includes the object that the GetInstance method returns.

Name is the name of the property.

Value is a TVarData record that contains the new property value.

GetProperty returns True if it sets a property value, and raises an exception of Name does not specify a published settable property on the object that GetInstance returns.


Hierarchy

TObject

TCustomVariantType

TInvokeableVariantType

TPublishableVariantType


TQueue
 VCL Reference

TQueue

Hierarchy	Methods	See also

TQueue maintains a first-in first-out array of pointers.

Unit

Contnrs

Description

Use a TQueue object to store and maintain a first-in first-out list.


 VCL Reference

TQueue methods

TQueue	Alphabetically	Legend

Derived from TOrderedList

AtLeast

Count

Create

Destroy

Peek

Pop

Push

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TQueue methods

TQueue	By object	Legend

AfterConstruction

AtLeast

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Peek

Pop

Push

SafeCallException


Hierarchy

TObject

TOrderedList

TQueue


TRadioButton
 VCL Reference

 TRadioButton

Hierarchy	Properties	Methods	Events	Using TRadioButton	See also

TRadioButton is a wrapper for a system radio button.

Unit

StdCtrls

Description

Use TRadioButton to add a radio button to a form. Radio buttons present a set of mutually exclusive options to the user—that is, only one radio button in a set can be selected at a time. When the user selects a radio button, the previously selected radio button becomes unselected. Radio buttons are frequently grouped in a radio group box (TRadioGroup). Add the group box to the form first, then get the radio buttons from the Component palette and put them into the group box.

By default, all radio buttons that are directly contained in the same windowed control container, such as a TRadioGroup or TPanel, are grouped. For example, two radio buttons on a form can be checked at the same time only if they are contained in separate containers, such as two different group boxes.


 VCL Reference

TRadioButton properties

TRadioButton	Alphabetically	Legend

In TRadioButton

Alignment

Checked

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRadioButton Properties

TRadioButton	By Object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BiDiMode

BoundsRect

Brush

Caption

Checked

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TRadioButton.Alignment
 VCL Reference

TRadioButton.Alignment

TRadioButton	See also

Determines the position of the caption relative to the radio button.

type TLeftRight = taLeftJustify..taRightJustify;

property Alignment: TLeftRight;

Description

Set Alignment to determine where the caption of the radio button should appear. These are the possible values:

Value	Meaning

taLeftJustify	The caption appears to the left of the radio button.

taRightJustify	The caption appears to the right of the radio button.

Note:	Do not confuse the Alignment property with the alignment of the caption in the text area of the radio button. The caption always appears left aligned. Alignment only controls on which side of the button the text area appears.


TRadioButton.Checked
 VCL Reference

TRadioButton.Checked

TRadioButton	See also

Determines whether the option represented by the radio button is selected.

property Checked: Boolean;

Description

Read Checked to determine whether the radio button is selected. Set Checked to True to select the radio button and deselect all other radio buttons in the same container. Set Checked to False to deselect the radio button, leaving no radio button in the group selected.


 VCL Reference

TRadioButton events

TRadioButton	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TRadioButton Events

TRadioButton	By Object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TRadioButton methods

TRadioButton	Alphabetically 	Legend

In TRadioButton

Create

GetControlsAlignment

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRadioButton Methods

TRadioButton	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TRadioButton.Create
 VCL Reference

TRadioButton.Create

TRadioButton	See also

Creates an instance of TRadioButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a radio button at runtime. Radio buttons added to forms at design time are created automatically.

AOwner is the component, typically a form, that becomes the value of the Owner property. The Owner is responsible for freeing the radio button object.

Create calls the inherited constructor, then sets the initial values for the radio button, such as the Width and Height property values to 113 pixels and 17 pixels, respectively, the ControlStyle set to csSetCaption and csDoubleClicks, and the Alignment property value to taLeftJustify.


TRadioButton.GetControlsAlignment
 VCL Reference

TRadioButton.GetControlsAlignment

TRadioButton

Returns the alignment of any text in the control.

function GetControlsAlignment: TAlignment; override;

Description

Use GetControlsAlignment to determine the orientation of text in controls that do not have an Alignment property.

GetControlsAlignment overrides the inherited method, returning taRightJustify if UseRightToLeftAlignment returns False. If UseRightToLeftAlignment returns True, GetControlsAlignment returns the opposite of the Alignment property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TButtonControl

TRadioButton


TRadioGroup
 VCL Reference

 TRadioGroup

Hierarchy	Properties	Methods	Events	Using TRadioGroup	See also

TRadioGroup represents a group of radio buttons that function together.

Unit

ExtCtrls

Description

A TRadioGroup object is a special group box that contains only radio buttons. Radio buttons that are placed directly in the same control component are said to be “grouped.” When the user checks a radio button, all other radio buttons in its group become unchecked. Hence, two radio buttons on a form can be checked at the same time only if they are placed in separate containers, such as group boxes.

To add radio buttons to a TRadioGroup, edit the Items property in the Object Inspector. Each string in Items makes a radio button appear in the group box with the string as its caption. The value of the ItemIndex property determines which radio button is currently selected.

Display the radio buttons in a single column or in multiple columns by setting the Columns property.

Note:	Setting the radio group’s BiDiMode to bdRightToLeft automatically flips its radio buttons. The FlipChildren method has no effect.


 VCL Reference

TRadioGroup properties

TRadioGroup	Alphabetically	Legend

Derived from TCustomRadioGroup

Columns

ItemIndex

Items

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRadioGroup properties

TRadioGroup	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Columns

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

ItemIndex

Items

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TRadioGroup events

TRadioGroup	Alphabetically	Legend

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TRadioGroup events

TRadioGroup	By object	Legend

OnClick

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnStartDock

OnStartDrag


 VCL Reference

TRadioGroup methods

TRadioGroup	Alphabetically	Legend

Derived from TCustomRadioGroup

Create

Destroy

FlipChildren

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRadioGroup methods

TRadioGroup	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomGroupBox

TCustomRadioGroup

TRadioGroup


TReader
 VCL Reference

TReader

Hierarchy	Properties	Methods	Events	See also

TReader is a specialized filer object that reads component data from an associated stream.

Unit

Classes

Description

TReader is used internally by the VCL streaming system to restore the state of a component that has been written to a stream. It handles the mechanics of reading the data associated with a component from the stream. The reader object, rather than the stream object, is responsible for handling the complexities of streaming components. These include methods for:

Creating component instances from class names read from the stream.

Assigning stream data to published component properties.

Enabling an object to store hidden or complex data as if they were published properties of the object.

Resolving references between components, such as when a property refers to another component.

Other methods and properties of TReader trigger the reader object's events and interaction with the stream.

Applications do not directly create reader objects. Readers are automatically created in a stream object’s methods or in global routines that initiate the streaming process. These include:

the global routine ObjectBinaryToText procedure, which directly creates a reader object.

the global ReadComponentResFile function, which creates a file stream that creates a reader object.

the TStream.ReadComponent method, which creates a reader object.

Once the streaming process is underway applications do not need to directly manipulate reader objects. The interaction between the reader, component, and stream objects happens automatically in methods of these objects that make calls to each other.


 VCL Reference

TReader properties

TReader	Alphabetically	Legend

In TReader

Owner

Parent

Position

Derived from TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 VCL Reference

TReader properties

TReader	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Owner

Parent

Position

Root


TReader.Owner
 VCL Reference

TReader.Owner

TReader	See also

Stores the component that is assigned as the Owner property of components read from the reader object's stream.

property Owner: TComponent;

Description

Owner is used internally by the VCL streaming system to determine which components to stream. The streaming process handles all components owned by the Root component.

Owner is the Owner property of the component read from the stream. The component’s Owner property is assigned its value from the reader’s Owner property. If the value of the reader’s Owner property is nil, then the Root property is assigned as the component’s Owner property.

For most components, Owner is nil. For components that can contain subcomponents that are not owned by the Root form, such as the nodes of a tree view component, the Owner is not the same as the Root. The GetChildOwner method of the component determines the Owner.


TReader.Parent
 VCL Reference

TReader.Parent

TReader	See also

Stores the component that is assigned as the Parent property of controls read from the reader’s stream.

property Parent: TComponent;

Description

Parent is used internally by the VCL streaming system. The value of the Parent property is determined by the order that components are read from the stream. The Parent relationship determines the visual containment of components.


TReader.Position
 VCL Reference

TReader.Position

TReader	See also

Represents the current reading position in the associated stream.

property Position: Longint;

Description

Position is used to track the reader’s position within the stream. The value of Position will always be inside the most recent buffer block read. Thus, for reading, Position will always be less than the stream's Position.


 VCL Reference

TReader events

TReader	Alphabetically	Legend

In TReader

OnAncestorNotFound

OnCreateComponent

OnError

OnFindComponentClass

OnFindMethod

OnReferenceName

OnSetName


 VCL Reference

TReader events

TReader	By object	Legend

OnAncestorNotFound

OnCreateComponent

OnError

OnFindComponentClass

OnFindMethod

OnReferenceName

OnSetName


TReader.OnAncestorNotFound
 VCL Reference

TReader.OnAncestorNotFound

TReader	See also

Occurs when the object from which a streamed object is derived cannot be found.

type TAncestorNotFoundEvent = procedure(Reader: TReader; const ComponentName: string; ComponentClass: TPersistentClass; var Component: TComponent) of object;

property OnAncestorNotFound: TAncestorNotFoundEvent;

Description

OnAncestorNotFound is for internal use.


TReader.OnCreateComponent
 VCL Reference

TReader.OnCreateComponent

TReader	See also

Occurs when the reader has read a component’s class but has not yet instantiated the component.

type TCreateComponentEvent = procedure(Reader: TReader; ComponentClass: TComponentClass; var Component: TComponent) of object;

property OnCreateComponent: TCreateComponentEvent;

Description

OnCreateComponent is used internally to provide an alternate mechanism for instantiating components. If OnCreateComponent returns a component as the value of the Component parameter, the Reader uses that instance instead of calling the component’s constructor.

Reader is the reader that needs an instance for a component that it is reading.

ComponentClass is the class of the component to be instantiated.

Component returns new instance of ComponentClass.


TReader.OnError
 VCL Reference

TReader.OnError

TReader	See also

Occurs when a reader object encounters an error reading its data, such as reading the name of an undeclared property or an illegal value.

type TReaderError = procedure(Reader: TReader; const Message: string; var Handled: Boolean) of object;

property OnError: TReaderError;

Description

OnError is used internally by the Delphi environment to report errors. It can also be used to write an event handler to selectively choose to process or ignore errors.

The last parameter passed to the OnError event handler is a var parameter called Handled. By default, the Error method passes False in Handled, but a handler that corrects the error or chooses to ignore the error can set Handled to True, which prevents further processing of the error. If the event handler returns with Handler still set to False, the reader object raises an EReadError exception.


TReader.OnFindComponentClass
 VCL Reference

TReader.OnFindComponentClass

TReader	See also

Occurs when a reader first reads the name of a component class.

type TFindComponentClassEvent = procedure(Reader: TReader; const ClassName: string; var ComponentClass: TComponentClass) of object;

property OnFindComponentClass: TFindComponentClassEvent;

Description

The ReadComponent method generates an OnFindComponentClass event when it reads the class name for the component it is loading. An OnFindComponentClass event handler can replace the class reference with a different class to change the type of component that gets loaded.

Reader is the reader that has just read the class name.

ClassName is the name that was read from a stream.

ComponentClass is the class reference that corresponds to ClassName. The event handler can change it.


TReader.OnFindMethod
 VCL Reference

TReader.OnFindMethod

TReader	See also

Occurs each time the reader object reads an event, which is a method-pointer property, for an object.

type TFindMethodEvent = procedure(Reader: TReader; const MethodName: string; var Address: Pointer; var Error: Boolean) of object;

property OnFindMethod: TFindMethodEvent;

Description

OnFindMethod is used internally by the Delphi environment for reading events. It can also be used to write a handler to ask the user how to handle missing methods.

If the reader cannot locate the named method assigned to the method pointer, it sets the Error parameter of the OnFindMethod handler to True. The handler can set Error to False, which prevents FindMethod from raising an exception when the handler returns.


TReader.OnReferenceName
 VCL Reference

TReader.OnReferenceName

TReader	See also

Occurs when resolving references to other objects such as when one object is the property value of another.

type TReferenceNameEvent = procedure(Reader: TReader; var Name: string) of object;

property OnReferenceName: TReferenceNameEvent;

Description

OnReferenceName is for internal use only.


TReader.OnSetName
 VCL Reference

TReader.OnSetName

TReader	See also

Occurs just before the reader object sets the Name property of a component it reads from its stream.

type TSetNameEvent = procedure(Reader: TReader; Component: TComponent; var Name: string) of object;

property OnSetName: TSetNameEvent;

Description

OnSetName is used by internally by the Delphi environment to handle duplicate names of components and forms. It can also be used to write an event handler to perform special processing just before the Name property is set for the component which has just been created and is about to have its properties read from the stream.

The Name parameter to the OnSetName event handler is a var parameter, so the handler can change the name before the reader assigns it to the component. For example, OnSetName is useful for filtering all the component names in a form, to add or change part of the string.


 VCL Reference

TReader methods

TReader	Alphabetically	Legend

In TReader

BeginReferences

CheckValue

CopyValue

DefineBinaryProperty

DefineProperty

Destroy

EndOfList

EndReferences

FixupReferences

FlushBuffer

NextValue

Read

ReadBoolean

ReadChar

ReadCollection

ReadComponent

ReadComponents

ReadCurrency

ReadDate

ReadFloat

ReadIdent

ReadInt64

ReadInteger

ReadListBegin

ReadListEnd

ReadPrefix

ReadRootComponent

ReadSignature

ReadSingle

ReadStr

ReadString

ReadValue

ReadVariant

ReadWideString

SkipValue

Derived from TFiler

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TReader methods

TReader	By object	Legend

AfterConstruction

BeforeDestruction

BeginReferences

CheckValue

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyValue

Create

DefaultHandler

DefineBinaryProperty

DefineProperty

Destroy

Dispatch

EndOfList

EndReferences

FieldAddress

FixupReferences

FlushBuffer

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

NextValue

Read

ReadBoolean

ReadChar

ReadCollection

ReadComponent

ReadComponents

ReadCurrency

ReadDate

ReadFloat

ReadIdent

ReadInt64

ReadInteger

ReadListBegin

ReadListEnd

ReadPrefix

ReadRootComponent

ReadSignature

ReadSingle

ReadStr

ReadString

ReadValue

ReadVariant

ReadWideString

SafeCallException

SkipValue


TReader.BeginReferences
 VCL Reference

TReader.BeginReferences

TReader	See also

Starts a block of commands that read components that might contain references to other components.

procedure BeginReferences;

Description

Do not call BeginReferences directly. BeginReferences is used internally in Delphi for streaming properties that reference other components.

Following the call to BeginReferences, the reader object creates a list of all the objects read and their names. After all of the interdependent objects are read, FixupReferences is called to resolve the named references from the stream into instance references. Finally, call EndReferences to dispose of the fixup list.

BeginReferences is always used together with FixupReferences and EndReferences in a try...finally block.


TReader.CheckValue
 VCL Reference

TReader.CheckValue

TReader	See also

Checks that the next value to be read from the stream is of a specified type.

procedure CheckValue(Value: TValueType);

Description

CheckValue ascertains that the next value to be read from the stream is of the type specified by Value. If it is not, CheckValue skips over that value, positioning the stream on the following value, and raises an EReadError exception.


TReader.CopyValue
 VCL Reference

TReader.CopyValue

TReader

Copies data while reading components.

procedure CopyValue(Writer: TWriter);

Description

Do not call CopyValue, it is used internally by the Delphi environment.


TReader.DefineBinaryProperty
 VCL Reference

TReader.DefineBinaryProperty

TReader	See also

Defines binary data the reader object reads as if the data were a published property.

type TStreamProc = procedure(Stream: TStream) of object;

procedure DefineBinaryProperty(const Name: string; ReadData, WriteData: TStreamProc; HasData: Boolean); override;

Description

DefineBinaryProperty is called internally by the DefineProperties method of an object that has data it needs to store. Applications can call DefineBinaryProperty directly when overriding the DefineProperties method of a component with large custom data (like a bitmap). This is the only context in which DefineBinaryProperty (or DefineProperty) should be used.

DefineProperties takes a generic filer object as its parameter. For reading binary data, DefineProperties takes a TReader object and calls its DefineBinaryProperty method. DefineBinaryProperty then reads the property’s name data and passes the data to the indicated ReadData method.

The Name parameter specifies the name of the “fake” property to be read from the stream. A “fake” property is a property that is not published, and that exists only in the code for the DefineBinaryProperty method. The Top and Left properties of a non-visual component are examples of “fake” properties. These are also called “defined properties” or “custom defined properties.”

The TStreamProc type is the type of the ReadData and WriteData parameters. It is the method-pointer type that points to a procedure (defined in the component object) that reads or writes a binary representation of the object's data directly to or from the stream passed to them in the Stream parameter. For TReader the WriteData parameter is ignored.

The HasData parameter determines at run time whether the "fake" property has data to store (write). For TReader the HasData parameter is ignored.

Defined binary properties are rare. VCL objects that store graphics as binary data are the most common use of filer objects to store and retrieve binary data. More commonly, objects use the DefineProperty method. The difference between DefineBinaryProperty and DefineProperty is that when using DefineBinaryProperty, the component reads the binary property directly from a memory stream, rather than going through the filer object. Binary data is also harder to edit as text.

Note:	Streamable objects that are descended from TPersistent inherit a DefineProperties method, however DefineProperties does nothing until TComponent. Therefore, it is a component’s DefineProperties method that calls the reader’s DefineBinaryProperty when reading binary data.


TReader.DefineProperty
 VCL Reference

TReader.DefineProperty

TReader	See also	Example

Defines data the reader object reads as if it were a published property.

type

  TReaderProc = procedure(Reader: TReader) of object;

  TWriterProc = procedure(Writer: TWriter) of object;

procedure DefineProperty(const Name: string; ReadData: TReaderProc; WriteData: TWriterProc; HasData: Boolean); override;

Description

DefineProperty is called internally by the DefineProperties method of an object that has data it needs to store. DefineProperties takes a generic filer object as its parameter. For reading data DefineProperties takes a TReader object and then calls the DefineProperties method of the reader object. DefineProperty then reads the property’s name and its data.

The Name parameter specifies the name of the “fake” property to be read from the stream.

The TReaderProc type is the type of the ReadData parameter. It is the method-pointer type that points to a procedure (defined in the storing object) which reads the object's data that represents a property value to the reader object. For TReader the WriteData parameter is ignored.

The HasData parameter determines at run time whether the "fake" property has data to store (write). For TReader the HasData parameter is ignored.

The difference between DefineBinaryProperty and DefineProperty is that the binary property is read directly from a stream, rather than going through a filer object, and binary data is harder to edit as text.


TReader.Destroy
 VCL Reference

TReader.Destroy

TReader	See also

Moves the current position of the stream back to the beginning before calling the inherited destructor.

destructor Destroy; override;

Description

Do not call Destroy directly. Reader objects are created indirectly through the methods or routines that use them. These methods and routines handle freeing the TReader object.


TReader.EndOfList
 VCL Reference

TReader.EndOfList

TReader	See also

Indicates the end of a group of items that are sequentially read from the stream.

function EndOfList: Boolean;

Description

EndOfList is used by other methods that iterate through a list of items when reading in data. It checks for a value type that signals the end of that type of data. EndOfList returns True if the reader object has read to the end of a list of items.

When reading a list of items, the reader object calls ReadListBegin method, then the items are repeatedly read until EndOfList returns True. Finally, the reader calls ReadListEnd.

Note:	Component writers can use this in their defined property ReadData methods, as, for example, with TStrings.


TReader.EndReferences
 VCL Reference

TReader.EndReferences

TReader	See also

Terminates a block of code that reads components from the reader object's stream that might contain references to each other.

procedure EndReferences;

Description

EndReferences is used for streaming properties that reference another component. Programmers should not need to call EndReferences directly.

The reader object calls EndReferences and creates a list of all the objects read and their names. After all the interdependent objects are read, FixupReferences is called to resolve the named references from the stream into instance references. Finally, call EndReferences to dispose of the fixup list.

EndReferences is always used in the finally part of a try..finally block that also includes calls to BeginReferences and FixupReferences.


TReader.FixupReferences
 VCL Reference

TReader.FixupReferences

TReader	See also

Resolves references when streaming properties that are represented by another component.

procedure FixupReferences;

Description

FixupReferences is used internally by the streaming system to resolve the named references from the stream into instance references. Users would never need to call this method.

The reader object calls BeginReferences and creates a list of all the objects read and their names. After all the interdependent objects are read, FixupReferences is called to resolve the references among various mutually dependent components read from the reader object's stream after all of the objects have been read. Finally, call EndReferences to dispose of the fixup list.

FixupReferences is always used inside a try..finally block between calls to BeginReferences and EndReferences.


TReader.FlushBuffer
 VCL Reference

TReader.FlushBuffer

TReader	See also

Synchronizes the reader’s buffer with its stream’s buffer.

procedure FlushBuffer; override;

Description

FlushBuffer synchronizes the reader's buffer with the associated stream by setting the stream’s Position to match the reader’s Position.


TReader.NextValue
 VCL Reference

TReader.NextValue

TReader	See also

Returns the type of the next item in the reader object's stream without moving the position of the stream.

function NextValue: TValueType;

Description

NextValue is used internally by reader methods to query the type of the next item in the stream. After identifying the type of the next item, NextValue returns with the stream position still before the value-type indicator.

The TValueType type defines the kinds of values written to and read from filer objects. Delphi's filers use a tagged value system, where each value on the stream is preceded by a prefix indicating its type. Those prefixes are of type TValueType.


TReader.Read
 VCL Reference

TReader.Read

TReader	See also

Reads data from the associated stream.

procedure Read(var Buf; Count: Longint);

Description

Do not call read directly. Read is used internally to read data from the stream. Many other writer methods call Read, usually after setting pertinent values or verifying data types.


TReader.ReadBoolean
 VCL Reference

TReader.ReadBoolean

TReader	See also	Example

Reads a boolean from the reader object's stream and returns that boolean value.

function ReadBoolean: Boolean;

Description

ReadBoolean is a helper method used by other reader methods to read a tagged boolean value at the current reader Position. ReadBoolean uses ReadValue to check the type for a vaTrue value and returns that result.  Note that ReadBoolean will not verify that the value being read is a boolean, only whether or not the value is True.


TReader.ReadChar
 VCL Reference

TReader.ReadChar

TReader	See also

Reads a character from the reader object's stream and returns that character value.

function ReadChar: Char;

Description

ReadChar is a helper method used by other reader methods to read a tagged character value at the current reader Position. ReadChar first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaString ReadString checks the length. If the length indicates that the value is a char, it calls Read and returns the character. Otherwise a EReadError exception is raised.

Note:	If the tagged data is a string with length = 1, it is char compatible. If length > 1, it is an error, however, the rest of the string data must be read to keep the reader in a consistent state. Each action that processes tagged data must leave the reader Position at the start of the next unread tag.


TReader.ReadCollection
 VCL Reference

TReader.ReadCollection

TReader

Reads a collection from the reader object's stream and returns that character value.

procedure ReadCollection(Collection: TCollection);

Description

ReadCollection is a helper method used by other reader methods to read a tagged collection value at the current reader Position.  ReadCollection iterates through items in a collection so that each item in a collection property has an opportunity to stream out its properties.  This method does not write out the number of items and the collection indices, because a user can add or delete items.


TReader.ReadComponent
 VCL Reference

TReader.ReadComponent

TReader	See also	Example

Reads the component specified by Instance from the stream and returns the component.

function ReadComponent(Component: TComponent): TComponent;

Description

ReadComponent is called by ReadRootComponent to read each of the components owned by Root. Users would not need to call ReadComponent directly.

ReadComponent handles the loading and initialization process for each component. After loading all the components in the list, ReadComponents calls the Loaded method of each loaded component in the order it read them. ReadComponent manages the complexities of reading the component from the stream through calls to other reader methods and to the component’s methods.


TReader.ReadComponents
 VCL Reference

TReader.ReadComponents

TReader

Reads a list of owned components from the reader object's associated stream.

type TReadComponentsProc = procedure(Component: TComponent) of object;

procedure ReadComponents(AOwner, AParent: TComponent; Proc: TReadComponentsProc);

Description

ReadComponents is used internally by the Delphi environment for design-time streaming. Do not call ReadComponents directly.

ReadComponents first sets the reader object's Root and Owner properties to the component passed in the AOwner parameter and sets its Parent property to AParent. Next ReadComponents reads components by calling the ReadComponent method, passing each returned component to the method passed in Proc.

Note:	ReadComponents is used at design-time for clipboard cut and paste of multiple components.


TReader.ReadCurrency
 VCL Reference

TReader.ReadCurrency

TReader	See also

Reads a Currency value from the reader object's stream and returns its value.

function ReadCurrency: Currency;

Description

ReadCurrency is a helper method used by other reader methods to read a tagged Currency data value at the current reader Position. ReadCurrency first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaCurrency ReadCurrency calls Read and returns the value. Otherwise it calls ReadInteger.


TReader.ReadDate
 VCL Reference

TReader.ReadDate

TReader	See also

Reads a TDateTime value from the reader object's stream and returns its value.

function ReadDate: TDateTime;

Description

ReadDate is a helper method used by other reader methods to read a tagged TDateTime data value at the current reader Position. ReadDate first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaDate ReadDate calls Read and returns the value. Otherwise it calls ReadInteger.


TReader.ReadFloat
 VCL Reference

TReader.ReadFloat

TReader	See also

Reads a floating-point number from the reader object's stream and returns its value.

function ReadFloat: Extended;

Description

ReadFloat is a helper method used by other reader methods to read a tagged floating-point data value at the current reader Position. ReadFloat first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaExtended ReadFloat calls Read and returns the float value. Otherwise it calls ReadInteger.


TReader.ReadIdent
 VCL Reference

TReader.ReadIdent

TReader	See also

Reads an identifier from the reader object's stream and returns the identifier.

function ReadIdent: string;

Description

ReadIndent is a helper method used by other reader methods to read an identifying type at the current reader Position. ReadIndent first checks the value type (TValueType) by calling the ReadValue method. If the item is:

A vaIdent type, ReadIndent calls Read and returns the identifier string value.

A vaFalse type, ReadIdent returns the string ‘False.’

A vaTrue type, ReadIdent returns the string ‘True.’

A vaNil type, ReadIdent returns the string ‘Nil.’

Otherwise it raises an EReadError exception.


TReader.ReadInt64
 VCL Reference

TReader.ReadInt64

TReader	See also

Reads an 64-bit integer from the reader object's stream and returns its value.

function ReadInt64: Int64;

Description

ReadInt64 is a helper method used by other reader methods to read a tagged 64-bit integer value at the current reader Position. ReadInt64 first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaInt64, ReadInt64 calls Read and returns the integer value. Otherwise it calls ReadInteger, in case the value was saved in another integer format.


TReader.ReadInteger
 VCL Reference

TReader.ReadInteger

TReader	See also

Reads an integer-type number from the reader object's stream and returns its value.

function ReadInteger: Longint;

Description

ReadInteger is a helper method used by other reader methods to read a tagged integer value at the current reader Position. ReadInteger first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaString or a vaInt8, vaInt16 or vaInt32 type, ReadInteger calls Read and returns the integer value. Otherwise it raises an EReadError exception.


TReader.ReadListBegin
 VCL Reference

TReader.ReadListBegin

TReader	See also

Reads a start-of-list marker from the reader object's associated stream.

procedure ReadListBegin;

Description

ReadListBegin is used by other methods that iterate through a list of items to ensure that the type about to be read is a list. ReadListBegin is also used by component writers in defined property ReadData methods.

If the next item in the stream is not a start-of list marker as written by the WriteListBegin method, ReadListBegin raises an EReadError exception.

A call to ReadListBegin is generally followed by a reading loop that terminates when the EndOfList method returns True, indicating that an end-of-list marker is next on the stream, at which point a call to ReadListEnd is required.


TReader.ReadListEnd
 VCL Reference

TReader.ReadListEnd

TReader	See also

Reads an end-of-list marker from the reader object's associated stream.

procedure ReadListEnd;

Description

ReadListEnd is used by other methods that iterate through a list of items to signal the end of a group of items being read. ReadListEnd is also used by component writers in defined property ReadData methods.

A call to ReadListEnd is generally preceded by a reading loop that terminates when the EndOfList method returns True, indicating that an end-of-list marker is next on the stream.

If the item read is not an end-of-list marker, ReadListEnd raises an EReadError exception. A call to ReadListEnd must correspond to a preceding call to ReadListBegin.


TReader.ReadPrefix
 VCL Reference

TReader.ReadPrefix

TReader	See also

Reads preliminary information concerning form inheritance for a component.

type

  TFilerFlag = (ffInherited, ffChildPos, ffInline);

  TFilerFlags = set of TFilerFlag;

procedure ReadPrefix(var Flags: TFilerFlags; var AChildPos: Integer); virtual;

Description

ReadPrefix is used internally by the Delphi streaming system. It is called automatically by ReadComponent to read flags that determine whether a component in an inherited form (ffInherited), whether its creation order in the form is important (ffChildPos), and whether it is a top-level component such as a form or data module (ffInline). It also reads the component’s position in the ancestor form's creation order if the ffChildPos flag is set. When a writer object writes a component to its stream, it prefixes the component with these flags.


TReader.ReadRootComponent
 VCL Reference

TReader.ReadRootComponent

TReader	See also

Reads a component and all its owned components from the reader object's stream.

function ReadRootComponent(Root: TComponent): TComponent;

Description

Do not call ReadRootComponent directly. It is used internally by the streaming system. When the reader object is created by its stream in TStream.ReadComponent, it immediately calls the ReadRootComponent method, which initiates the streaming sequence of restoring an object.

ReadRootComponent first calls the ReadSignature method to ensure that it is reading a proper component. ReadRootComponent also handles initializations and fixup references. For example, the component passed in Root becomes the value of the Root property for the reader object.

ReadRootComponent calls the component’s ReadState method, which calls back to TReader.ReadData. TComponent.ReadState is virtual, thus providing an opportunity for the component to prepare itself for being loaded with the new data from the stream.


TReader.ReadSignature
 VCL Reference

TReader.ReadSignature

TReader	See also

Reads the filer signature from the reader object's associated stream.

procedure ReadSignature;

Description

ReadSignature is used by several routines to ensure that the file about to be read is a valid Delphi component stream. For example, ReadRootComponent, calls ReadSignature before reading its component from the stream. By checking for the signature before loading objects, the reader object can guard against inadvertently reading invalid or corrupted data.

The signature is a four-character sequence.


TReader.ReadSingle
 VCL Reference

TReader.ReadSingle

TReader	See also

Reads a float value from the reader object's stream and returns its value.

function ReadSingle: Single;

Description

ReadSingle is a helper method used by other reader methods to read a tagged Pascal Single data value at the current reader Position.  ReadSingle first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaSingle, ReadSingle calls Read and returns the value. Otherwise it calls ReadInteger.


TReader.ReadStr
 VCL Reference

TReader.ReadStr

TReader	See also

Reads a string value.

function ReadStr: string;

Description

Do not call ReadStr directly. ReadStr is for internal use by certain VCL components.

Warning:	Use ReadString instead for reading component strings to streams. ReadStr can corrupt data if not used correctly.


TReader.ReadString
 VCL Reference

TReader.ReadString

TReader	See also

Reads a tagged string value written by WriteString from the reader object's stream and returns its contents.

function ReadString: string;

Description

ReadString is a helper method used by other reader methods to read a string at the current reader Position. ReadString first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaString or a vaLString type ReadString calls Read and returns the string. Otherwise it raises an EReadError exception.

Warning:	Always use ReadString for reading component strings to streams. The similarly-named ReadStr method is for internal use only by certain VCL components.


TReader.ReadValue
 VCL Reference

TReader.ReadValue

TReader	See also

Reads the type of the next item on the reader object's stream and returns with the stream positioned after the value-type indicator.

function ReadValue: TValueType;

Description

ReadValue is used by other reader methods when the subsequent processing depends upon a type check of the data about to be read.

The TValueType type defines the kinds of values written to and read from filer objects. Delphi's filers use a tagged value system, where each value on the stream is preceded by a prefix indicating its type. Those prefixes are of type TValueType.


TReader.ReadVariant
 VCL Reference

TReader.ReadVariant

TReader	See also

Reads a Variant value from the reader object's stream and returns its value.

function ReadVariant: Variant;

Description

ReadVariant is a helper method used by other reader methods to read a tagged Variant data value at the current reader Position. ReadVariant first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaVariant ReadVariant calls Read and returns the value. Otherwise it calls ReadInteger.


TReader.ReadWideString
 VCL Reference

TReader.ReadWideString

TReader	See also

Reads a tagged wide string value from the reader object's stream and returns its contents.

function ReadWideString: WideString;

Description

ReadWideString is a helper method used by other reader methods to read a wide string at the current reader Position. ReadWideString first checks the value type (TValueType) by calling the ReadValue method. If the item is a vaWString type, ReadWideString calls Read and returns the string. Otherwise it raises an EReadError exception.


TReader.SkipValue
 VCL Reference

TReader.SkipValue

TReader	See also

Skips the next value read from the stream.

procedure SkipValue;

Description

Use SkipValue to skip over a value, positioning the stream on the following value.


Hierarchy

TObject

TFiler

TReader


TRecall
 VCL Reference

TRecall

Hierarchy 	Properties	Methods	See also

TRecall stores the properties of a persistent object so that they can be restored at a later time.

Unit

Classes

Description

TRecall acts as a temporary repository for the properties of a persistent object. To use TRecall

1. Create an instance of TRecall, assigning an object to use for storing property values (the storage object), and an object whose property values it represents (the reference object). When you create an instance of TRecall, it automatically stores the current properties of the reference object.

2. Call the Store method at any time to take a snapshot of the reference object’s properties. TRecall updates the storage object so that it reflects only the property settings from the last time you called the Store method (or, if Store was never called, from the point when the TRecall object was created).

3. Delete the TRecall object to restore the reference object to the set of properties it had when you last called the Store method.

If you do not want the TRecall object to restore the properties it is saving, call the Forget method. After you call Forget, the TRecall object can’t be used. It does not update the reference object when destroyed and can’t save any more properties.

You can use TRecall to save the properties of any persistent object, using any explicitly specified storage object. In addition, TRecall has several descendants with their own built-in storage objects that work only with a specific class of reference object. These include TFontRecall, TPenRecall, and TBrushRecall.


 VCL Reference

TRecall properties

TRecall	Alphabetically	Legend

In TRecall

Reference


 VCL Reference

TRecall properties

TRecall	By object	Legend

Reference


TRecall.Reference
 VCL Reference

TRecall.::Reference

TRecall	See also

Indicates the reference object that is updated when you destroy the TRecall instance.

property Reference: TPersistent;

Description

Read Reference to determine the object that TRecall updates when it is destroyed. The value of this read-only property is assigned in the constructor.


 VCL Reference

TRecall methods

TRecall	Alphabetically	Legend

In TRecall

Create

Destroy

Forget

Store

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRecall methods

TRecall	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Forget

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Store


TRecall.Create
 VCL Reference

TRecall.Create

TRecall	See also

Creates an instance of a TRecall object.

constructor Create(AStorage, AReference: TPersistent);;

Description

Call Create to instantiate a TRecall object to save the properties of a specific reference object.

AStorage is an object that saves the properties of the reference object. Once you create the TRecall instance, it is responsible for the memory of AStorage, and frees AStorage when it is destroyed. Do not free AStorage yourself after creating the TRecall object.

AReference is the object whose properties are saved when you create the TRecall object and, subsequently, any time you call the Store method.

AStorage and AReference do not need to be the same type of object. However, TRecall can only save and restore those properties that can be assigned from the reference object to the storage object and back again. That is, TRecall only handles those properties that are copied by the Assign method of AStorage and AReference.


TRecall.Destroy
 VCL Reference

TRecall.Destroy

TRecall	See also

Destroys the TRecall instance, assigning the stored properties to the reference object.

procedure Destroy; override;

Description

Destroy a TRecall instance to restore the properties of the reference object to the last values saved to the TRecall object. The properties of the reference object are saved to the TRecall instance when you first create it, and subsequently any time you call the Store method. The TRecall destructor assigns the currently saved property values to the reference object by calling the reference object’s Assign method.

If you do not want to restore the currently saved property values, call the Forget method before freeing the TRecall object. Once you call Forget, TRecall ceases to store any property information, and destroying the TRecall leaves the properties of the reference object unchanged.

Note:	Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.


TRecall.Forget
 VCL Reference

TRecall.Forget

TRecall	See also

Discards the saved property values and prevents the TRecall object from updating the reference object.

procedure Forget;

Description

By default, the TRecall destructor updates the reference object, assigning the most recently saved property values. To prevent this from happening, call Forget before destroying the TRecall object.

Once you have called Forget, the TRecall instance can not do anything. It ignores any further attempts to store property settings because it can’t use them to update the reference object when it is destroyed.


TRecall.Store
 VCL Reference

TRecall.Store

TRecall	See also

Saves the current property settings of the reference object.

procedure Store;

Description

Call Store to update the TRecall object’s saved property values so that they reflect the current property values of the reference object. Each call to Store completely supersedes the previously stored property values.

When you destroy the TRecall object, it assigns the most recently stored property values to the reference object.


Hierarchy

TObject

TRecall


TRegIniFile
 VCL Reference

TRegIniFile

Hierarchy	Properties	Methods	See also	Example

TRegIniFile is a low-level wrapper for the Windows 95/NT system registry.

Unit

Registry

Description

TRegIniFile presents a simple interface to the system registry, hiding the need to know about the underlying structure of the registry. TRegIniFile acts as a helper object to TRegistryIniFile, which descends from TCustomIniFile (and is therefore more widely compatible with other INI file classes).

TRegIniFile enables handling the Windows 95/NT system registry as if it were a Windows 3.x INI file. Instead of processing an INI file, however, TRegIniFile reads from and writes to the system registry.

Although TRegIniFile descends from TRegistry, it adds the properties and methods used by a TIniFile object. The FileName passed to a TRegIniFile object becomes a subkey under the system registry’s root key (HKEY_CURRENT_USER by default). What corresponds to a section in an INI file is treated as a key in the system registry, and what corresponds to data entries under a section in an INI file are treated as data values under a key in the system registry.

Note:	TRegIniFile is intended to be used primarily as a helper object to TRegistryIniFile, which unifies the interface to INI files and the system registry. However, applications can use TRegIniFile directly.


 VCL Reference

TRegIniFile properties

TRegIniFile	Alphabetically	Legend

In TRegIniFile

FileName

Derived from TRegistry

Access

CurrentKey

CurrentPath

LazyWrite

RootKey


 VCL Reference

TRegIniFile properties

TRegIniFile	By object	Legend

Access

CurrentKey

CurrentPath

FileName

LazyWrite

RootKey


TRegIniFile.FileName
 VCL Reference

TRegIniFile.FileName

TRegIniFile	See also

Specifies the name of the key opened or created in the system registry.

property FileName: String;

Description

Query FileName to determine the name of the key in the system registry that is the root key for all TRegIniFile operations.


 VCL Reference

TRegIniFile methods

TRegIniFile	Alphabetically	Legend

In TRegIniFile

Create

DeleteKey

EraseSection

ReadBool

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

WriteBool

WriteExpandString

WriteInteger

WriteString

Derived from TRegistry

CloseKey

CreateKey

DeleteValue

Destroy

GetDataInfo

GetDataSize

GetDataType

GetKeyInfo

GetKeyNames

GetValueNames

HasSubKeys

KeyExists

LoadKey

MoveKey

OpenKey

ReadBinaryData

ReadCurrency

ReadDate

ReadDateTime

ReadFloat

ReadTime

RegistryConnect

RenameValue

ReplaceKey

RestoreKey

SaveKey

UnLoadKey

ValueExists

WriteBinaryData

WriteCurrency

WriteDate

WriteDateTime

WriteFloat

WriteTime

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRegIniFile methods

TRegIniFile	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseKey

Create

CreateKey

DefaultHandler

DeleteKey

DeleteValue

Destroy

Dispatch

EraseSection

FieldAddress

Free

FreeInstance

GetDataInfo

GetDataSize

GetDataType

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyInfo

GetKeyNames

GetValueNames

HasSubKeys

InheritsFrom

InitInstance

InstanceSize

KeyExists

LoadKey

MethodAddress

MethodName

MoveKey

NewInstance

OpenKey

ReadBinaryData

ReadBool

ReadCurrency

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadSection

ReadSections

ReadSectionValues

ReadString

ReadTime

RegistryConnect

RenameValue

ReplaceKey

RestoreKey

SafeCallException

SaveKey

UnLoadKey

ValueExists

WriteBinaryData

WriteBool

WriteCurrency

WriteDate

WriteDateTime

WriteExpandString

WriteFloat

WriteInteger

WriteString

WriteTime


TRegIniFile.Create
 VCL Reference

TRegIniFile.Create

TRegIniFile	See also	Example

Creates a TRegIniFile object for an application.

constructor Create(const FileName: string); overload;

constructor Create(const FileName: string; AAccess:LongWord); overload;

Description

Use Create to construct a TRegIniFile object for an application.

FileName initializes the FileName property.

AAccess initializes the Access property, which determines the access rights used when opening keys. If no AAccess parameter is supplied, Access is initialized to KEY_ALL_ACCESS.


TRegIniFile.DeleteKey
 VCL Reference

TRegIniFile.DeleteKey

TRegIniFile	See also

Erases a data value that is associated with a key.

procedure DeleteKey(const Section, Ident: string);

Description

Call DeleteKey to erase a data value associated with a key. Section is string containing the name of the system registry key containing the value to delete. Ident is a string containing the name of the data value to delete.

Note:	DeleteKey for TRegIniFile obscures the DeleteKey method of TRegistry, from which TRegIniFile descends. You can access TRegistry's DeleteKey method by casting the call to DeleteKey as type TRegistry, or by using the scope resolution operator.


TRegIniFile.EraseSection
 VCL Reference

TRegIniFile.EraseSection

TRegIniFile	See also

Deletes a key and its data values in the system registry.

procedure EraseSection(const Section: String);

Description

Call EraseSection to remove a key and its data values from the system registry. Section identifies the key to delete.


TRegIniFile.ReadBool
 VCL Reference

TRegIniFile.ReadBool

TRegIniFile	See also

Retrieves a Boolean value from a specified data value associated with a key.

function ReadBool(const Section, Ident: String; Default: Boolean): Boolean;

Description

Call ReadBool to retrieve a Boolean value from a specified data value associated with a key.

Section is a string that identifies the key from which to retrieve a data value. Ident is a string that identifies the name of the data value to return. Default is a Boolean value to use if there is no key corresponding to Section or no data value corresponding to Ident.

Note:	This function overrides the ReadBool function of TRegistry, from which TRegIniFile is derived. To call the ReadBool function of TRegistry instead of this function, cast the call to ReadBool as TRegistry.


TRegIniFile.ReadInteger
 VCL Reference

TRegIniFile.ReadInteger

TRegIniFile	See also

Retrieves an integer value from a specified data value (Ident) associated with a key (Section).

function ReadInteger(const Section, Ident: String; Default: Longint): Longint;

Description

Call ReadInteger to retrieve an integer value from a specified data value associated with a key.

Section is a string that identifies the key from which to retrieve a data value. Ident is a string that identifies the name of the data value to return. Default is an integer value to use if there is no key corresponding to Section or no data value corresponding to Ident.

Note:	This function overrides the ReadInteger function of TRegistry, from which TRegIniFile is derived. To call the ReadInteger function of TRegistry instead of this function, cast the call to ReadInteger as TRegistry.


TRegIniFile.ReadSection
 VCL Reference

TRegIniFile.ReadSection

TRegIniFile	See also

Retrieves the names of all data values associated with a key, and stores the names in a TStrings object.

procedure ReadSection(const Section: String; Strings: TStrings);

Description

Call ReadSection to retrieve the names of all data values associated with a key into a TStrings object. Section is a string identifying the key for which to retrieve data-value names.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings object such as a string list, or to a component property, such as Items for a TListBox component, that is a TStrings object itself.


TRegIniFile.ReadSections
 VCL Reference

TRegIniFile.ReadSections

TRegIniFile	See also

Retrieves the names of all subkeys associated with the current key.

procedure ReadSections(Strings: TStrings);

Description

Call ReadSections to retrieve the names of all subkeys associated with the current key.

Strings specifies the string object to hold the retrieved names. Strings can point to a TStrings object, or to a component property, such as Items for a TListBox component, that is a TStrings object itself.


TRegIniFile.ReadSectionValues
 VCL Reference

TRegIniFile.ReadSectionValues

TRegIniFile	See also

Retrieves the data-values associated with a specified key, and stores the retrieved values in a string object.

procedure ReadSectionValues(const Section: String; Strings: TStrings);

Description

Call ReadSectionValues to read all data values associated with a specified key into a string object. Section is the name of the key from which to retrieve data-values. Strings specifies the string object to hold the retrieved values.

Strings can point to a TStrings object, or to a component property, such as Items for a TListBox component, that is a TStrings object itself. Use the Values property of the string object to access a specific string in the object.


TRegIniFile.ReadString
 VCL Reference

TRegIniFile.ReadString

TRegIniFile	See also

Retrieves a string value from a specified data value (Ident) associated with a key (Section).

function ReadString(const Section, Ident, Default: String): String;

Description

Call ReadString to retrieve a string value from a specified data value associated with a key.

Section is a string that identifies the key from which to retrieve a data value. Ident is a string that identifies the name of the data value to return. Default is a string value to use if there is no key corresponding to Section or no data value corresponding to Ident.

Note:	This function overrides the ReadString function of TRegistry, from which TRegIniFile is derived. To call the ReadString function of TRegistry instead of this function, cast the call to ReadString as TRegistry.


TRegIniFile.WriteBool
 VCL Reference

TRegIniFile.WriteBool

TRegIniFile	See also

Writes a Boolean value to a specified data value associated with a specified key.

procedure WriteBool(const Section, Ident: String; Value: Boolean);

Description

Call WriteBool to store a Boolean value in a data value associated with a specified key.

Section is a string identifying the key into which to store a data value. Ident is a string identifying the name of the data value into which to write. Value is the Boolean value to write into the data value.

Note:	This function overrides the WriteBool procedure of TRegistry, from which TRegIniFile is derived. To call the WriteBool procedure of TRegistry instead of this procedure, cast the call to WriteBool as TRegistry.


TRegIniFile.WriteInteger
 VCL Reference

TRegIniFile.WriteInteger

TRegIniFile	See also

Writes a long integer value to a specified data value associated with a specified key.

procedure WriteInteger(const Section, Ident: String; Value: Longint);

Description

Call WriteInteger to store an integer value in a data value associated with a specified key.

Section is a string identifying the key into which to store a data value. Ident is a string identifying the name of the data value into which to write. Value is the integer value to write into the data value.

Note:	This function overrides the WriteInteger procedure of TRegistry, from which TRegIniFile is derived. To call the WriteInteger procedure of TRegistry instead of this procedure, cast the call to WriteInteger as TRegistry.


TRegIniFile.WriteString
 VCL Reference

TRegIniFile.WriteString

TRegIniFile	See also	Example

Writes a string value to a specified data value associated with a specified key.

procedure WriteString(const  Section, Ident, Value: String);

Description

Call WriteString to store a string value in a data value associated with a specified key.

Section is a string identifying the key into which to store a data value. Ident is a string identifying the name of the data value into which to write. Value is the string value to write into the data value.

Note:	This function overrides the WriteString procedure of TRegistry, from which TRegIniFile is derived. To call the WriteString procedure of TRegistry instead of this procedure, cast the call to WriteString as TRegistry.


Hierarchy

TObject

TRegistry

TRegIniFile


TRegistry
 VCL Reference

TRegistry

Hierarchy	Properties	Methods	Using TRegistry	Example

TRegistry is a low-level wrapper for the system registry and functions that operate on the registry.

Unit

Registry

Description

Use TRegistry to encapsulate access to the Windows system registry in an application. The registry is a database that an application can use to store and retrieve configuration information. Configuration information is stored in a hierarchical tree. Each node in the tree is called a key. Every key can contain subkeys and data values that represent part of the configuration information for an application.

All keys that an application creates, opens, reads, or writes are subkeys of predefined root keys. By default, a TRegistry object is created with a root key of HKEY_CURRENT_USER.

Only one key is accessible at a time in a TRegistry object. To determine the key that is currently accessible, read the value of the CurrentKey property. TRegistry methods enable an application to open, close, save, move, copy, and delete keys.

One or more data values containing actual configuration information can be stored in a key. TRegistry methods enable an application to query a key to see if it contains data, to read data in a key, and to write data to a key.


 VCL Reference

TRegistry properties

TRegistry	Alphabetically	Legend

In TRegistry

Access

CurrentKey

CurrentPath

LazyWrite

RootKey


 VCL Reference

TRegistry properties

TRegistry	By object	Legend

Access

CurrentKey

CurrentPath

LazyWrite

RootKey


TRegistry.Access
 VCL Reference

TRegistry.Access

TRegistry	See also

Specifies the level of access to use when opening keys.

property Access: LongWord;

Description

Use Access to specify the level of security access to use when opening keys. The OpenKey method uses the value of Access when opening a registry key. Access is initialized by the TRegistry constructor, but can be altered before calling OpenKey.

The value of Access is a set of flags or’d together, where each flag indicates a type of permission. Choose a value that grants sufficient permission to allow the desired actions while not exceeding the access level of the system running the application. The following table lists the flags that can be included:

Flag	Meaning

KEY_ALL_ACCESS	combination of KEY_READ, KEY_WRITE, and KEY_CREATE_LINK.

KEY_READ	combination of KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY.

KEY_WRITE	combination of KEY_SET_VALUE and KEY_CREATE_SUB_KEY.

KEY_QUERY_VALUE	grants permission to query subkey data.

KEY_ENUMERATE_SUB_KEYS	grants permission to enumerate subkeys.

KEY_NOTIFY	grants ability to receive change notifications.

KEY_SET_VALUE	grants permission to set subkey data.

KEY_CREATE_SUB_KEY	grants permission to create subkeys.

KEY_CREATE_LINK	grants permission to create symbolic links.

KEY_EXECUTE	restricts permission to read-only access.

Note:	Access is ignored by the CreateKey method, which always uses KEY_ALL_ACCESS.


TRegistry.CurrentKey
 VCL Reference

TRegistry.CurrentKey

TRegistry	See also

Specifies the registry key that is currently open.

property CurrentKey: HKEY;

Description

Use CurrentKey to determine the registry key that is currently open. All operations performed by TRegistry affect only the current key. To access another key, call the OpenKey or OpenKeyReadOnly method.


TRegistry.CurrentPath
 VCL Reference

TRegistry.CurrentPath

TRegistry	See also

Indicates the registry path associated with the current key.

property CurrentPath: String;

Description

Use CurrentPath to determine the registry path of the current key. The system registry is hierarchical, and CurrentPath returns a string that spells out the hierarchy of keys from the root key to the current key, inclusive.

CurrentPath is automatically reset each time a different key becomes the current key.


TRegistry.LazyWrite
 VCL Reference

TRegistry.LazyWrite

TRegistry	See also

Specifies how keys are written to the registry when calling the CloseKey procedure.

property LazyWrite: Boolean;

Description

Use LazyWrite to specify how keys are written to the registry. LazyWrite is initialized to True when a registry object is first created. When LazyWrite is True, keys are written to the registry when they are closed, but the CloseKey procedure may return before the write operation takes place.

When LazyWrite is False, keys are written to the registry before CloseKey returns. Set LazyWrite to False only when absolutely necessary. Setting LazyWrite to False guarantees that the changes an application makes to keys are written to the registry before further application processing takes place, but it uses more system resources when keys are closed. If LazyWrite is False, and an application is displaying or changing many registry entries, there will be a degradation in application performance.


TRegistry.RootKey
 VCL Reference

TRegistry.RootKey

TRegistry	See also	Example

Specifies the root key for the TRegistry object in an application.

property RootKey: HKEY;

Description

Use RootKey to determine the hierarchy of subkeys an application can access, or to specify the root key for the application.

By default, RootKey is set to HKEY_CURRENT_USER when the registry object is created. To change the root key, specify a valid integer value for the RootKey property.

Note:	For some operations, such as LoadKey or RegistryConnect, an application may need to change the default value of RootKey.


 VCL Reference

TRegistry methods

TRegistry	Alphabetically	Legend

In TRegistry

CloseKey

Create

CreateKey

DeleteKey

DeleteValue

Destroy

GetDataInfo

GetDataSize

GetDataType

GetKeyInfo

GetKeyNames

GetValueNames

HasSubKeys

KeyExists

LoadKey

MoveKey

OpenKey

OpenKeyReadOnly

ReadBinaryData

ReadBool

ReadCurrency

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadString

ReadTime

RegistryConnect

RenameValue

ReplaceKey

RestoreKey

SaveKey

UnLoadKey

ValueExists

WriteBinaryData

WriteBool

WriteCurrency

WriteDate

WriteDateTime

WriteExpandString

WriteFloat

WriteInteger

WriteString

WriteTime

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TRegistry methods

TRegistry	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CloseKey

Create

CreateKey

DefaultHandler

DeleteKey

DeleteValue

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDataInfo

GetDataSize

GetDataType

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetKeyInfo

GetKeyNames

GetValueNames

HasSubKeys

InheritsFrom

InitInstance

InstanceSize

KeyExists

LoadKey

MethodAddress

MethodName

MoveKey

NewInstance

OpenKey

OpenKeyReadOnly

ReadBinaryData

ReadBool

ReadCurrency

ReadDate

ReadDateTime

ReadFloat

ReadInteger

ReadString

ReadTime

RegistryConnect

RenameValue

ReplaceKey

RestoreKey

SafeCallException

SaveKey

UnLoadKey

ValueExists

WriteBinaryData

WriteBool

WriteCurrency

WriteDate

WriteDateTime

WriteExpandString

WriteFloat

WriteInteger

WriteString

WriteTime


TRegistry.CloseKey
 VCL Reference

TRegistry.CloseKey

TRegistry	See also	Example

Writes the current key to the registry and closes the key.

procedure CloseKey;

Description

Call CloseKey to write the current key to the registry and close the key. An application should not keep keys open any longer than necessary. Many TRegistry methods routinely call CloseKey after reading from or writing to the registry. Calling CloseKey when there is no current key has no effect.

Note:	When an application closes a key, the key is written to the registry. The LazyWrite property determines how the write takes place.


TRegistry.Create
 VCL Reference

TRegistry.Create

TRegistry	See also	Example

Creates a TRegistry object for an application.

constructor Create; overload;

constructor Create(AAccess:LongWord); overload;

Description

Create instantiates a TRegistry object and sets the RootKey property to HKEY_CURRENT_USER and the LazyWrite property to True. If an AAccess parameter is supplied, this value is used to initialize the Access property. Otherwise, Access is initialized to KEY_ALL_ACCESS.


TRegistry.CreateKey
 VCL Reference

TRegistry.CreateKey

TRegistry	See also	Example

Creates a new key in the registry.

function CreateKey(const Key: String): Boolean;

Description

Use CreateKey to add a new key to the registry. Key is the name of the key to create. Key can be an absolute or relative name. An absolute key begins with a backslash (\) and is a subkey of the root key. A relative key is a subkey of the current key.

CreateKey returns True if key creation is successful. On error, an exception is raised. Attempting to create a key that already exists has no effect.

CreateKey creates only non-volatile keys. If you need to create volatile keys on Windows NT, you must call the Windows API directly.

CreateKey creates keys with a security access of KEY_ALL_ACCESS. If you need to create keys with more restricted access, you must call the Windows API directly.

A key created by CreateKey has no values. To set key values, use the WriteCurrency, WriteBinaryData, WriteBool, WriteDate, WriteDateTime, WriteFloat, WriteInteger, WriteString, or WriteTime procedures.


TRegistry.DeleteKey
 VCL Reference

TRegistry.DeleteKey

TRegistry	See also	Example

Removes a specified key and its associated data from the registry.

function DeleteKey(const Key: String): Boolean;

Description

Call DeleteKey to remove a specified key and its associated data, if any, from the registry.

DeleteKey returns True if key deletion is successful. On error, DeleteKey returns False.


TRegistry.DeleteValue
 VCL Reference

TRegistry.DeleteValue

TRegistry	See also

Erases a data value that is associated with the current key.

function DeleteValue(const Name: String): Boolean;

Description

Call DeleteValue to remove a specific data value associated with the current key. Name is string containing the name of the value to delete. Keys can contain multiple data values, and every value associated with a key has a unique name.

DeleteValue returns True if the deletion is successful, False if the deletion fails.


TRegistry.Destroy
 VCL Reference

TRegistry.Destroy

TRegistry	See also

Closes the current key and destroys the TRegistry object.

destructor Destroy; override;

Description

Destroy closes the current key and frees the resources allocated for a registry object when it is no longer needed.


TRegistry.GetDataInfo
 VCL Reference

TRegistry.GetDataInfo

TRegistry	See also

Returns information about a specified data value associated with the current key.

type

  TRegDataType = (rdUnknown, rdString, rdExpandString, rdInteger, rdBinary);

  TRegDataInfo = record

    RegData: TRegDataType;

    DataSize: Integer;

  end;

function GetDataInfo(const ValueName: String; var Value: TRegDataInfo): Boolean;

Description

Call GetDataInfo to get information about a data value associated with the current key. ValueName is a string containing the name of the data value to query. Value is a record of type TRegDataInfo in which information about the data value is returned. If the data value is of type rdString or rdExpandString, the size of the data value includes an extra byte for the terminating null character.

GetDataInfo returns True if data value information is returned. If GetDataInfo fails, it returns False, and the Value record is filled with zeros.

Value is a record of type TRegDataInfo that is declared in an application. Records of type TRegDataInfo contain two fields: a field called RegData, of type TRegDataType, that specifies the data type of the data value; and a field called DataSize that specifies the size, in bytes, of the data value. RegData can have the following values:

Value	Meaning

rdUnknown	Data value type is of no defined value type.

rdString	Data value type is a null-terminated string. It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.

rdExpandString	Data value type is a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.

rdInteger	Data value type is a32-bit number.

rdBinary	Data value type is binary data, in any form.


TRegistry.GetDataSize
 VCL Reference

TRegistry.GetDataSize

TRegistry	See also

Returns the size, in bytes, of a specified data value associated with the current key.

function GetDataSize(const ValueName: String): Integer;

Description

Call GetDataSize to determine the size, in bytes, of a data value associated with the current key. ValueName is a string containing the name of the data value to query.

On success, GetDataSize returns the size of the data value. On failure, GetDataSize returns -1.

Note:	If the data value is a string, GetDataSize returns the size of the data value and one extra byte for the terminating null character.


TRegistry.GetDataType
 VCL Reference

TRegistry.GetDataType

TRegistry	See also

Returns the enumerated data type of a specified data value associated with the current key.

type TRegDataType= (rdUnknown, rdString, rdExpandString, rdInteger, rdBinary);

function GetDataType(const ValueName: String): TRegDataType;

Description

Call GetDataType to determine the data type of a data value associated with the current key. ValueName is a string containing the name of the data value to query.

GetDataType returns an enumerated value of type TRegDataType. TRegDataType can be one of the following values

Value	Meaning

rdUnknown	Data value type is of no defined value type.

rdString	Data value type is a null-terminated string. It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.

rdExpandString	Data value type is a null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It is a Unicode or ANSI string depending on whether the application calls the Unicode or ANSI string functions.

rdInteger	Data value type is a32-bit number.

rdBinary	Data value type is binary data, in any form.


TRegistry.GetKeyInfo
 VCL Reference

TRegistry.GetKeyInfo

TRegistry	See also

Returns information about the current key.

type

  TRegKeyInfo = record

    NumSubKeys: Integer;

    MaxSubKeyLen: Integer;

    NumValues: Integer;

    MaxValueLen: Integer;

    MaxDataLen: Integer;

    FileTime: TFileTime;

  end;

function GetKeyInfo(var Value: TRegKeyInfo): Boolean;

Description

Call GetKeyInfo to return all information about the current key to an application. Value is a variable declared in an application to store the key information returned by this function. Value must be of type TRegKeyInfo. Information returned by GetKeyInfo about the current key includes:

Number of subkeys

Longest subkey name length, in characters

Number of data values

Longest data-value name length

Longest data-value length

Time of last write to the key

On success GetKeyInfo returns True. On failure it returns False, and the Value record is set to zeroes.


TRegistry.GetKeyNames
 VCL Reference

TRegistry.GetKeyNames

TRegistry	See also

Returns a string list containing the names of all subkeys belonging to the current key.

procedure GetKeyNames(Strings: TStrings);

Description

Call GetKeyNames to determine the names of all subkeys belonging to the current key. Determining the names of subkeys is useful in an application that iterates through a set of keys.

Strings is a variable of type TStrings into which to return the list of subkey names.


TRegistry.GetValueNames
 VCL Reference

TRegistry.GetValueNames

TRegistry	See also	Example

Returns a string list containing the names of all data values associated with the current key.

procedure GetValueNames(Strings: TStrings);

Description

Call GetValueNames to determine the names of all data values associated with the current key. Determining the names of data values is useful in an application that iterates through a set of data values for a key.

Strings is a variable of type TStrings into which to return the list of data value names.


TRegistry.HasSubKeys
 VCL Reference

TRegistry.HasSubKeys

TRegistry	See also

Determines if the current key has subkeys.

function HasSubKeys: Boolean;

Description

Call HasSubKeys to determine if the current key has any subkeys. HasSubKeys returns True if the current key has at least one subkey. Otherwise it returns False.


TRegistry.KeyExists
 VCL Reference

TRegistry.KeyExists

TRegistry	See also

Determines if a specified key exists.

function KeyExists(const Key: String): Boolean;

Description

Call KeyExists to determine if a key of a specified name exists. Key is the name of the key for which to search.


TRegistry.LoadKey
 VCL Reference

TRegistry.LoadKey

TRegistry	See also

Creates a subkey under the root key and loads registry information from a file into the newly created subkey.

function LoadKey(const Key, FileName: String): Boolean;

Description

Call LoadKey to:

1	Create a new subkey under the root key, and

2	Load registry information from a file into the subkey. Registry information can include data values, subkeys, and data values for those subkeys.

LoadKey is intended to simplify creation of a key, its values and subkeys, and the values for those subkeys in a single operation. A key, its subkeys, and all data values of the key and its subkeys is called a hive. Rather than creating each key and value separately, an application can read a hive from a file. This is especially useful for applications that users can reconfigure at run time.

Note:	Before an application calls LoadKey, the RootKey property must be set to HKEY_USERS, HKEY_LOCAL_MACHINE, or to a key returned by a previous call to RegistryConnect.

The Key parameter is the name of the subkey to create. The FileName parameter is the location of the file containing registry information to store in the subkey. The file specified by FileName must be one previously created using the SaveKey function or the RegSaveKey Windows API function. On systems that use a file allocation table (FAT), FileName cannot include an extension.


TRegistry.MoveKey
 VCL Reference

TRegistry.MoveKey

TRegistry	See also

Moves an existing key, its subkeys, and data values to a new location using a new key name.

procedure MoveKey(const OldName, NewName: String; Delete: Boolean);

Description

Call MoveKey to copy or move an existing key, its subkeys, and data values to a different location. Under Windows 95, copying is recursive. If a key contains subkeys and data values, they too, are copied. When the operation is complete, the new key is closed.  Under Windows NT, subkeys must be moved explicitly with separate calls to MoveKey.

OldName specifies the key to copy or move. NewName specifies a name for the duplicate key to create. If the key specified by NewName does not exist, MoveKey creates it. Delete specifies whether to delete the old key after the copy operation. If Delete is True, the key specified by OldName is deleted after it is copied. Otherwise the old key is closed.


TRegistry.OpenKey
 VCL Reference

TRegistry.OpenKey

TRegistry	See also	Example

Opens a specified key.

function OpenKey(const Key: String; CanCreate: Boolean): Boolean;

Description

Call OpenKey to make a specified key the current key. Key is the name of the key to open. If Key is nil, the CurrentKey property is set to the key specified by the RootKey property.

CanCreate specifies whether to create the specified key if it does not exist. If CanCreate is True, the key is created if necessary.

Key is opened or created with the security access value specified by the Access property. OpenKey only creates non-volatile keys, A non-volatile key is stored in the registry and is preserved when the system is restarted.

OpenKey returns True if the key is successfully opened or created


TRegistry.OpenKeyReadOnly
 VCL Reference

TRegistry.OpenKeyReadOnly

TRegistry	See also

Opens a specified key in a read-only manner.

function OpenKeyReadOnly(const Key: String): Boolean;

Description

Call OpenKeyReadOnly to make a specified key the current key. Key is the name of the key to open. If Key is nil, the CurrentKey property is set to the key specified by the RootKey property.

Key is opened with the security access value KEY_READ.

OpenKey returns True if the key is successfully opened and CurrentKey is set to the key.

Note:	after a successful call to OpenKeyReadOnly the Access property of the registry component is automatically changed to KEY_READ, regardless of what that property was set to prior to the method call.


TRegistry.ReadBinaryData
 VCL Reference

TRegistry.ReadBinaryData

TRegistry	See also

Retrieves a binary value from a specified data value associated with the current key.

function ReadBinaryData(const Name: String; var Buffer; BufSize: Integer): Integer;

Description

Call ReadBinaryData to read a binary value from a specified data value associated with the current key. Name is the name of the data value to read. Buffer is the application variable into which to read the registry data. Buffer must be large enough to hold all of the data returned. BufSize specifies the size of Buffer.

If successful, ReadBinaryData writes the requested data into Buffer and returns the number of bytes written. If the Registry entry contains a known type (such as a string), ReadBinaryData raises an exception.

Note:	Binary data is typically a record. It might also be an icon or a bitmap although Microsoft recommends against storing graphics objects in the registry for performance reasons.


TRegistry.ReadBool
 VCL Reference

TRegistry.ReadBool

TRegistry	See also

Retrieves a Boolean value from a specified data value associated with the current key.

function ReadBool(const Name: String): Boolean;

Description

Call ReadBool to read a Boolean value from a specified data value associated with the current key. Name is the name of the data value to read.

If successful, ReadBool returns the requested Boolean value. If the Registry entry does not contain a boolean or integer value, an exception is raised.


TRegistry.ReadCurrency
 VCL Reference

TRegistry.ReadCurrency

TRegistry	See also

Retrieves a currency value from a specified data value associated with the current key.

function ReadCurrency(const Name: String): Currency;

Description

Call ReadCurrency to read a Currency value from a specified data value associated with the current key. Name is the name of the data value to read.

If successful, ReadCurrency returns a Currency value. If the Registry entry does not contain a Currency value, an exception is raised.


TRegistry.ReadDate
 VCL Reference

TRegistry.ReadDate

TRegistry	See also

Retrieves a date value from a specified data value associated with the current key.

function ReadDate(const Name: String): TDateTime;

Description

Call ReadDate to read a date value from a specified data value associated with the current key. Name is the name of the data value to read.

If successful, ReadDate returns a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.

If the Registry entry does not contain a date or time value, an exception is raised.

Note:	Only use ReadDate to read data values previously stored with the WriteDate procedure.


TRegistry.ReadDateTime
 VCL Reference

TRegistry.ReadDateTime

TRegistry	See also

Retrieves a date and time value from a specified data value associated with the current key.

function ReadDateTime(const Name: String): TDateTime;

Description

Call ReadDateTime to read a datetime value from a specified data value associated with the current key. Name is the name of the data value to read.

If successful, ReadDateTime returns a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.

If the Registry entry does not contain a date or time value, an exception is raised.


TRegistry.ReadFloat
 VCL Reference

TRegistry.ReadFloat

TRegistry	See also

Retrieves a float value from a specified data value associated with the current key.

function ReadFloat(const Name: String): Double;

Description

Call ReadFloat to read a float value from a specified data value associated with the current key. Name is the name of the data value to read.

If the Registry entry does not contain a floating-point value, an exception is raised.


TRegistry.ReadInteger
 VCL Reference

TRegistry.ReadInteger

TRegistry	See also

Retrieves an integer value from a specified data value associated with the current key.

function ReadInteger(const Name: String): Integer;

Description

Call ReadInteger to read an integer value from a specified data value associated with the current key. Name is the name of the data value to read.

If the Registry entry does not contain an integer, an exception is raised.


TRegistry.ReadString
 VCL Reference

TRegistry.ReadString

TRegistry	See also	Example

Retrieves a string value from a specified data value associated with the current key.

function ReadString(const Name: String): String;

Description

Call ReadString to read a string value from a specified data value associated with the current key. Name is the name of the data value to read.

If there is no Registry entry with the specified name, ReadString returns an empty string. If the Registry entry contains something other than a string, an exception is raised.

Note:	ReadString retrieves data stored by either the WriteString or WriteExpandString method.


TRegistry.ReadTime
 VCL Reference

TRegistry.ReadTime

TRegistry	See also

Retrieves a time value from a specified data value associated with the current key.

function ReadTime(const Name: String): TDateTime;

Description

Call ReadTime to read a time value from a specified data value associated with the current key. Name is the name of the data value to read.

If successful, ReadTime returns a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.

If the specified Registry entry does not contain a date or time value, an exception is raised.

Note:	Only use ReadTime to read data values previously stored with the WriteTime method.


TRegistry.RegistryConnect
 VCL Reference

TRegistry.RegistryConnect

TRegistry	See also

Establishes a connection to a registry on another computer.

function RegistryConnect(const UNCName: String): Boolean;

Description

Call RegistryConnect to establish a connection to a registry on another computer running Windows 95 or Windows NT. UNCName is the name of the remote computer, and must take the following form:

\\computername

where computername is the name of the remote computer. If UNCName is nil, the local machine name is used.

Note:	Before calling RegistryConnect, an application must set the RootKey property for its registry object to HKEY_USERS or HKEY_LOCAL_MACHINE.

If connection is successful, RegistryConnect sets the RootKey property to the root key of the remote computer and returns True. If unsuccessful, RegistryConnect returns False, and RootKey remains unchanged.


TRegistry.RenameValue
 VCL Reference

TRegistry.RenameValue

TRegistry	See also

Changes the name of a data value associated with the current key.

procedure RenameValue(const OldName, NewName: String);

Description

Call RenameValue to change the name of a data value associated with the current key. OldName is a string containing the current name of the data value. NewName is a string containing the replacement name for the data value.

If OldName is the name of an existing data value for the current key, and NewName is not the name of an existing data value for the current key, RenameValue changes the data value name as specified. Otherwise the current name remains unchanged.


TRegistry.ReplaceKey
 VCL Reference

TRegistry.ReplaceKey

TRegistry	See also

Replaces the hive file backing a key and all its subkeys with a hive stored in a different file, so that when the system is next started, the key and subkeys will have the values stored in the new file.

function ReplaceKey(const Key, FileName, BackUpFileName: String): Boolean;

Description

Call ReplaceKey to replace the hive file backing a key and all its subkeys with a different hive file. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy.

FileName indicates the name of the file containing the new key and subkey information. BackUpFileName is the name of a backup file used to store the current key and subkey information before it is overwritten.

ReplaceKey returns True if it is successful.

Note:	The file specified by FileName parameter must be created with the SaveKey function, or by directly calling the Windows 95/NT RegSaveKey API function. Under the FAT file system FileName cannot have an extension.


TRegistry.RestoreKey
 VCL Reference

TRegistry.RestoreKey

TRegistry	See also

Reopens the specified key, and overwrites any information contained in this key and its subkeys keys with registry data stored in a hive file.

function RestoreKey(const Key, FileName: String): Boolean;

Description

Call RestoreKey to open the specified key with a security access value of KEY_ALL_ACCESS and overwrite any information in the key and its subkeys with registry data stored in a hive file. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy.

Key is the name of the key to open. FileName is the name of the file containing the hive information.

If RestoreKey successfully reads and copies the registry information in FileName to the specified key, the return value of RestoreKey is True and the key is closed.

Note:	The file specified by FileName parameter must be created with the SaveKey function, or by directly calling the Windows 95/NT RegSaveKey API function. Under the FAT file system FileName cannot have an extension.


TRegistry.SaveKey
 VCL Reference

TRegistry.SaveKey

TRegistry	See also

Opens the specified key with the security access value KEY_ALL_ACCESS and saves the specified key and all of its subkeys and values to a hive file.

function SaveKey(const Key, FileName: String): Boolean;

Description

Call SaveKey to open a key with a security access value of KEY_ALL_ACCESS, and save the key and its subkeys and data values to a hive file. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy.

Key is the key to save. FileName is the file into which to save the key information. It must be the name of a new file that does not already exist. On FAT file systems FileName cannot include an extension.

Files created by SaveKey are passed as parameters to the RestoreKey, ReplaceKey and LoadKey functions.

If SaveKey is successful it returns True and closes the key.


TRegistry.UnLoadKey
 VCL Reference

TRegistry.UnLoadKey

TRegistry	See also

Removes a hive from the registry.

function UnLoadKey(const Key: String): Boolean;

Description

Call UnLoadKey to remove a hive from the registry without modifying its associated hive file, if any. A hive is a discrete collection of keys, subkeys, and values that is rooted at the top of the registry hierarchy.

Key is the name of the key at the root of the hive to remove.

If successful, UnLoadKey returns True.

Note:	Before calling this function, set RootKey to HKEY_USERS, HKEY_LOCAL_MACHINE, or call RegistryConnect.


TRegistry.ValueExists
 VCL Reference

TRegistry.ValueExists

TRegistry	See also

Determines if a specified data value exists for the current key.

function ValueExists(const Name: String): Boolean;

Description

Call ValueExists to determine if a particular key exists in the registry. Calling Value Exists is especially useful before calling other TRegistry methods that operate only on existing keys.

Name is the name of the data value for which to check.

ValueExists returns True if a match if found, False otherwise.


TRegistry.WriteBinaryData
 VCL Reference

TRegistry.WriteBinaryData

TRegistry	See also

Stores a specifically named data value associated with the current key.

procedure WriteBinaryData(const Name: String; var Buffer; BufSize: Integer);

Description

Call WriteBinaryData to store a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteBinary. If Name does not exist, it is created.

Buffer is a data buffer containing the data to store in the registry. BufSize indicates the size of Buffer.

Note:	Data-value lengths are limited by available memory. Long values (more than 2048 bytes) should be stored as separate files, and those file names should be stored in the registry. Application elements such as icons, bitmaps, and executable files should be stored as separate files rather than as values in the registry.

If WriteBinaryData fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteBool
 VCL Reference

TRegistry.WriteBool

TRegistry	See also

Stores a Boolean value in a specifically named data value associated with the current key.

procedure WriteBool(const Name: String; Value: Boolean);

Description

Call WriteBool to store a Boolean value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteBool. If Name does not exist, it is created.

If WriteBool fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteCurrency
 VCL Reference

TRegistry.WriteCurrency

TRegistry	See also

Stores a currency value in a specifically named data value associated with the current key.

procedure WriteCurrency(const Name: String; Value: Currency);

Description

Call WriteCurrency to store a Currency value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteCurrency. If Name does not exist, it is created.

Value is a Currency value to store in the registry.

If WriteCurrency fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteDate
 VCL Reference

TRegistry.WriteDate

TRegistry	See also

Stores a date value in a specifically named data value associated with the current key.

procedure WriteDate(const Name: String; Value: TDateTime);

Description

Call WriteDate to store a datetime value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteDate. If Name does not exist, it is created.

Value is a datetime value to store in the registry.

If WriteDate fails, an exception is raised, and the value is not written to the registry.

If successful, WriteDate stores a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.


TRegistry.WriteDateTime
 VCL Reference

TRegistry.WriteDateTime

TRegistry	See also

Stores a datetime value in a specifically named data value associated with the current key.

procedure WriteDateTime(const Name: String; Value: TDateTime);

Description

Call WriteDateTime to store a datetime value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteDateTime. If Name does not exist, it is created.

Value is a datetime value to store in the registry.

If WriteDateTime fails, an exception is raised, and the value is not written to the registry.

If successful, WriteDateTime stores a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.


TRegistry.WriteExpandString
 VCL Reference

TRegistry.WriteExpandString

TRegistry	See also

Stores a string containing unexpanded references to environment variables in a specifically named data value associated with the current key.

procedure WriteExpandString(const Name, Value: String);

Description

Call WriteExpandString to store a string that contains unexpanded references to environment variables such as “%PATH%”. The string is stored in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteExpandString. If Name does not exist, it is created.

Value is a string value to store in the registry.

If WriteExpandString fails, an exception is raised.

Note:	To write strings that do not contain unexpanded environment variables, use WriteString instead.


TRegistry.WriteFloat
 VCL Reference

TRegistry.WriteFloat

TRegistry	See also

Stores a Double value in a specifically named data value associated with the current key.

procedure WriteFloat(const Name: String; Value: Double);

Description

Call WriteFloat to store a float value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteFloat. If Name does not exist, it is created.

Value is a float value to store in the registry.

If WriteFloat fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteInteger
 VCL Reference

TRegistry.WriteInteger

TRegistry	See also

Stores an integer value in a specifically named data value associated with the current key.

procedure WriteInteger(const Name: String; Value: Integer);

Description

Call WriteInteger to store an integer value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteInteger. If Name does not exist, it is created.

Value is a integer value to store in the registry.

If WriteInteger fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteString
 VCL Reference

TRegistry.WriteString

TRegistry	See also	Example

Stores a string value in a specifically named data value associated with the current key.

procedure WriteString(const Name, Value: String);

Description

Call WriteString to store a string value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteString. If Name does not exist, it is created.

Value is a string value to store in the registry.

If WriteString fails, an exception is raised, and the value is not written to the registry.


TRegistry.WriteTime
 VCL Reference

TRegistry.WriteTime

TRegistry	See also

Stores a time value in a specifically named data value associated with the current key.

procedure WriteTime(const Name: String; Value: TDateTime);

Description

Call WriteTime to store a datetime value in a data value associated with the current key.

Name is a string containing the name of the data value in which to store data. If Name already exists, its current value is overwritten by WriteTime. If Name does not exist, it is created.

Value is a datetime value to store in the registry.

If WriteTime fails, an exception is raised, and the value is not written to the registry.

If successful, WriteTime stores a TDateTime value. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.


Hierarchy

TObject

TRegistry


TRichEdit
 VCL Reference

 TRichEdit

Hierarchy	Properties	Methods	Events	Using TRichEdit	See also

TRichEdit is a wrapper for a Windows rich text edit control.

Unit

ComCtrls

Description

Use a TRichEdit object to put a standard Windows rich text edit control on a form. Rich text edit controls let the user enter text that includes variation in font attributes and paragraph formatting information.

TRichEdit provides the properties and methods to enter and work with rich text. TRichEdit does not provide any user interface components to make these formatting options available to the user. Applications must implement the user interface components to surface the rich text capabilities of a TRichEdit object. To make this easier, a number of pre-defined standard actions operate on a rich edit control to perform common formatting tasks.

TRichEdit publishes many of the properties inherited from TCustomRichEdit, but does not introduce any new behavior.


 VCL Reference

TRichEdit properties

TRichEdit	Alphabetically	Legend

Derived from TCustomRichEdit

DefAttributes

DefaultConverter

HideScrollBars

HideSelection

Lines

PageRect

Paragraph

PlainText

SelAttributes

SelLength

SelStart

SelText

Derived from TCustomMemo

Alignment

CaretPos

ScrollBars

WantReturns

WantTabs

WordWrap

Derived from TCustomEdit

BorderStyle

CanUndo

MaxLength

Modified

ReadOnly

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ImeMode

ImeName

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

Text

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TRichEdit properties

TRichEdit	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

CanUndo

CaretPos

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DefAttributes

DefaultConverter

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideScrollBars

HideSelection

Hint

HostDockSite

ImeMode

ImeName

Left

Lines

LRDockWidth

MaxLength

Modified

Name

Owner

PageRect

Paragraph

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PlainText

PopupMenu

ReadOnly

ScrollBars

SelAttributes

SelLength

SelStart

SelText

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Text

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

WantReturns

WantTabs

Width

WindowProc

WordWrap


 VCL Reference

TRichEdit events

TRichEdit	Alphabetically	Legend

Derived from TCustomRichEdit

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange

Derived from TCustomEdit

OnChange

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnStartDock

OnStartDrag


 VCL Reference

TRichEdit events

TRichEdit	By object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnProtectChange

OnResizeRequest

OnSaveClipboard

OnSelectionChange

OnStartDock

OnStartDrag


 VCL Reference

TRichEdit methods

TRichEdit	Alphabetically	Legend

Derived from TCustomRichEdit

Clear

Create

Destroy

FindText

GetSelTextBuf

Print

RegisterConversionFormat

Derived from TCustomMemo

GetControlsAlignment

Derived from TCustomEdit

ClearSelection

ClearUndo

CopyToClipboard

CutToClipboard

PasteFromClipboard

SelectAll

SetSelTextBuf

Undo

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

ReplaceDockedControl

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

IsImplementorOf

InsertComponent

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TRichEdit methods

TRichEdit	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

ClearSelection

ClearUndo

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CopyToClipboard

Create

CreateParented

CreateParentedControl

CutToClipboard

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindText

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetSelTextBuf

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

PasteFromClipboard

Perform

Print

Realign

ReferenceInterface

Refresh

RegisterConversionFormat

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectAll

SendToBack

SetBounds

SetFocus

SetSelTextBuf

SetSubComponent

SetTextBuf

Show

Undo

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomEdit

TCustomMemo

TCustomRichEdit

TRichEdit


Abs Example
 VCL Reference

Abs Example

var

  r: Single;

  i: Integer;

begin

  r := Abs(-2.3);	{ 2.3 }

  i := Abs(-157);	{ 157 }

end;


Addr Example
 VCL Reference

Addr Example

This example uses the Addr function to get the address of a numeric value that is stored as custom data in a tree node. Once the assignment has been made, changes to the entries in the NodeNumbers array can be read by dereferencing the pointers that are stored in the Data property of the Tree nodes.

var

  I : Integer;

  NodeNumbers: array [0 .. 100] of Integer;

 begin

  with TreeView1 do

  begin

    for I := 0 to Items.Count - 1 do

    begin

      NodeNumbers[I] := CalculateValue(Items[I]);

      Items[I].Data := Addr(NodeNumber[I]);

    end;

  end;

end;


ArcTan Example
 VCL Reference

ArcTan Example

var
  R: Extended;

begin

  R := ArcTan(Pi);

end;


Assert Example
 VCL Reference

Assert Example

{$APPTYPE CONSOLE}

{ Defining OLDSTYLE for the compilation allows old-style runtime error handling to occur rather than the new exception-based method. If the old style is used, then the user-supplied string is not displayed. }

program Plop;

{$IFNDEF OLDSTYLE}

uses SysUtils;

{$ENDIF}

type

  TList = ^TListDesc;

  TListDesc = record

    name : string;

    next : TList;

  end;

var

  Head, Tail : TList;

procedure Add(name : string);

  var

    Item : TList;

begin

  NEW(Item);

  Item.name := name;

  Item.next := Head;

  Head := Item;

end;

procedure PrintList(nofItems : Integer; list : TList);

begin

  while (nofItems > 0) and (list <> nil) do

    begin

      WriteLn(list.name);

      list := list.next;

      Dec(nofItems);

    end;

  Assert(list = nil, 'Supplied length does not match actual length');

end;

begin

  Head := nil;

  Add('Dawg');

  Tail := Head;

  Add('Fifi');

  Add('Phideaux');

  Tail.next := Head;

  PrintList(3, Head);

end.


Assigned Example
 VCL Reference

Assigned Example

var P: Pointer;

begin

  P := nil;

  if Assigned (P) then Writeln ('You won''t see this');

  GetMem(P, 1024);	{P valid}

  FreeMem(P, 1024);	{P no longer valid and still not nil}

  if Assigned (P) then Writeln ('You''ll see this');

end;


AssignFile, CloseFile, OpenDialog Example
 VCL Reference

AssignFile, OpenDialog, Readln, CloseFile Example

var

  F: TextFile;

  S: string;

begin

  if OpenDialog1.Execute then            { Display Open dialog box }

  begin

    AssignFile(F, OpenDialog1.FileName); { File selected in dialog }

    Reset(F);

    Readln(F, S);                        { Read first line of file }

    Edit1.Text := S;                     { Put string in a TEdit control }

    CloseFile(F);

  end;

end;


AssignPrn Example
 VCL Reference

AssignPrn Example

This code prints a line of text on the printer when the user clicks the button on the form:

procedure TForm1.Button1Click(Sender: TObject);

var

  MyFile: TextFile;

begin

  AssignPrn(MyFile);

  Rewrite(MyFile);

  Writeln(MyFile, 'Print this text');

  System.CloseFile(MyFile);

end;


BlockRead, BlockWrite, SaveDialog Example
 VCL Reference

BlockRead, BlockWrite, SaveDialog Example

var

  FromF, ToF: file;

  NumRead, NumWritten: Integer;

  Buf: array[1..2048] of Char;

begin

  if OpenDialog1.Execute then     { Display Open dialog box }

  begin

    AssignFile(FromF, OpenDialog1.FileName);

    Reset(FromF, 1);	{ Record size = 1 }

    if SaveDialog1.Execute then      { Display Save dialog box}

    begin

      AssignFile(ToF, SaveDialog1.FileName);	{ Open output file }

      Rewrite(ToF, 1);	{ Record size = 1 }

      Canvas.TextOut(10, 10, 'Copying ' + IntToStr(FileSize(FromF))

        + ' bytes...');

      repeat

        BlockRead(FromF, Buf, SizeOf(Buf), NumRead);

        BlockWrite(ToF, Buf, NumRead, NumWritten);

      until (NumRead = 0) or (NumWritten <> NumRead);

      CloseFile(FromF);

      CloseFile(ToF);

    end;

  end;

end;


Break Example
 VCL Reference

Break Example

var

  S: string;

begin

  while True do

  begin

    ReadLn(S);

    try

      if S = '' then Break;

      WriteLn(S);

    finally

    { do something for all cases }

    end;

  end;

end;


ChDir Example
 VCL Reference

ChDir Example

begin

  {$I-}

  { Change to directory specified in Edit1 }

  ChDir(Edit1.Text);

  if IOResult <> 0 then

    MessageDlg('Cannot find directory', mtWarning, [mbOk], 0);

end;


ColorToRGB Example
 VCL Reference

ColorToRGB Example

The following code converts the color of the current form, Form1, to a Windows RGB value:

var

  L : Longint;

begin

  L := ColorToRGB(Form1.Color);

end;


CompareStr Example
 VCL Reference

CompareStr Example

The following code compares String1, 'STEVE', to String2, 'STEVe'. Note that CompareStr returns a number less than 0 because the value of 'e' is greater than the value of 'E'.

var

  String1, String2 : string;

  I : Integer;

begin

  String1 := 'STEVE';

  String2 := 'Steve';

  I := CompareStr(String1, String2);  { the value of I is < 0 }

  if I <> 0 then

    MessageDlg('The strings are not equal', mtWarning, [mbOK], 0)

end;


Concat Example
 VCL Reference

Concat Example

var

  S: string;

begin

  S := Concat('ABC', 'DEF');     { 'ABCDEF' }

end;


Continue, Items, Selected Example
 VCL Reference

Continue, Items, Selected Example

This example uses a file listbox and a regular listbox on a form. The following routine scans through the files listed in the file listbox and lists the sizes of any selected files to the regular list box:

var

  F: File;

  i: Integer;

begin

  for i := 0 to (FileListBox1.Items.Count - 1) do begin

  try

    if FileListBox1.Selected[i] then

    begin

      if not FileExists(FileListBox1.Items.Strings[i]) then begin

        MessageDlg('File: ' + FileListBox1.Items.Strings[i] +

                   ' not found', mtError, [mbOk], 0);

        Continue;

      end;

      AssignFile(F, FileListBox1.Items.Strings[i]);

      Reset(F, 1);

      ListBox1.Items.Add(IntToStr(FileSize(F)));

      CloseFile(F);

    end;

   finally

   { do something here }

   end;

  end;

end;


Cos Example
 VCL Reference

Cos Example

 var R: Extended;

begin

  R := Cos(Pi);

end;


Date Example
 VCL Reference

Date, DateToStr Example

This example uses a label and a button on a form. When the user clicks the button, the current date is displayed in the caption of the label:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Label1.Caption := 'Today is  ' + DateToStr(Date);

end;


DateTimeToStr Example
 VCL Reference

Now, DateTimeToStr Example

This example uses a label and a button on a form. When the user clicks the button, the current date and time is converted to a string and displayed as the caption of the label:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Label1.Caption := DateTimeToStr(Now);

end;


Dec Example
 VCL Reference

Dec Example

var

  IntVar: Integer;

  LongintVar: Longint;

begin

  Intvar := 10;

  LongintVar := 10;

  Dec(IntVar);	{ IntVar := IntVar - 1 }

  Dec(LongintVar, 5);	{ LongintVar := LongintVar - 5 }

end;


DecodeDate Example
 VCL Reference

DecodeDate, DecodeTime Example

This example uses a button and two labels on a form. When the user clicks the button, the current date and time are reported in the captions of the two labels.

procedure TForm1.Button1Click(Sender: TObject);

var

  Present: TDateTime;

  Year, Month, Day, Hour, Min, Sec, MSec: Word;

 begin

  Present:= Now;

  DecodeDate(Present, Year, Month, Day);

  Label1.Caption := 'Today is Day ' + IntToStr(Day) + ' of Month '

    + IntToStr(Month) + ' of Year ' + IntToStr(Year);

  DecodeTime(Present, Hour, Min, Sec, MSec);

  Label2.Caption := 'The time is Minute ' + IntToStr(Min) + ' of Hour '

    + IntToStr(Hour);

end;


Delete Example
 VCL Reference

Delete Example

var

   s: string;

 begin

   s := 'Honest Abe Lincoln';

   Delete(s,8,4);

   Canvas.TextOut(10, 10, s);	{ 'Honest Lincoln' }

 end;


DiskFree Example
 VCL Reference

DiskFree, DiskSize Example

This example uses a form with a label on it. When the following code executes, it displays a message in the label indicating the number of KB free, and what percentage of the entire disk space that represents.

var

  S: string;

  AmtFree: Int64;

  Total:   Int64;

begin

  AmtFree := DiskFree(0);

  Total := DiskSize(0);

  S := IntToStr(AmtFree div Total) + 'percent of the space on drive 0 is free: ' (AmtFree div 1024) + ' Kbytes free. ';

  Label1.Caption := S;

end;


Dispose Example
 VCL Reference

Dispose Example

type

  Str18 = string[18];

 var

  P: ^Str18;

begin

  New(P);

  P^ := 'Now you see it...';

  Dispose(P);	{ Now you don't... }

end;


EncodeDate Example
 VCL Reference

EncodeDate Example

This example uses three edit controls, a label, and a button on a form. When the button is clicked, the day, month, and year specified in the edit controls is stored in a TDateTime object. Then the TDateTime object is converted to an AnsiString that is displayed in the label.

procedure TForm1.Button1Click(Sender: TObject);

var

  MyDate: TDateTime;

begin

  MyDate := EncodeDate(StrToInt(Edit1.Text), StrToInt(Edit2.Text), StrToInt(Edit3.Text));

  Label1.Caption := DateToStr(MyDate);

end;


EncodeTime Example
 VCL Reference

EncodeTime Example

procedure TForm1.Button1Click(Sender: TObject);

var

  MyTime: TDateTime;

begin

  MyTime := EncodeTime(0, 45, 45, 7);

  Label1.Caption := TimeToStr(MyTime);

end;


Eof, Read, Write Example
 VCL Reference

Eof, Read, Write Example

var

  F1, F2: TextFile;

  Ch: Char;

begin

  if OpenDialog1.Execute then begin

    AssignFile(F1, OpenDialog1.Filename);

    Reset(F1);

    if SaveDialog1.Execute then begin

      AssignFile(F2, SaveDialog1.Filename);

      Rewrite(F2);

      while not Eof(F1) do

      begin

        Read(F1, Ch);

        Write(F2, Ch);

      end;

      CloseFile(F2);

    end;

    CloseFile(F1);

  end;

end;


Eoln Example
 VCL Reference

Eoln Example

begin

 { Tells program to wait for keyboard input }

   WriteLn(Eoln);

 end;


Erase Example
 VCL Reference

Erase, OpenDialog.Title, OpenDialog.FileName Example

procedure TForm1.Button1Click(Sender: TObject);

var

  F: Textfile;

begin

  OpenDialog1.Title := 'Delete File';

  if OpenDialog1.Execute then begin

    AssignFile(F, OpenDialog1.FileName);

    try

      Reset(F);

      if MessageDlg('Erase ' + OpenDialog1.FileName + '?',

        mtConfirmation, [mbYes, mbNo], 0) = mrYes then

      begin

        CloseFile(F);

        Erase(F);

      end;

    except

      on EInOutError do

        MessageDlg('File I/O error.', mtError, [mbOk], 0);

    end;

  end;

end;


ExpandFileName Example
 VCL Reference

ExpandFileName Example

The following example uses a listbox, an edit control, and a button on a form. When the button is clicked, the filename specified in the edit control is expanded to a fully qualified filename and added to the list box.

procedure TForm1.Button1Click(Sender: TObject)

begin

  ListBox1.Items.Add(ExpandFileName(Edit1.Text));

end;


FileExists Example
 VCL Reference

FileExists, DeleteFile Example

The following code prompts for confirmation before deleting a file:

if FileExists(FileName) then

  if MessageDlg('Do you really want to delete ' + ExtractFileName(FileName) + '?'), mtConfirmation, [mbYes, mbNo]) = IDYes then

    DeleteFile(FileName);


FileExists, RenameFile, FileCreate, FileWrite, FileClose, ExtractFileName Example
 VCL Reference

FileExists, RenameFile, FileCreate, FileWrite, FileClose, ExtractFileName Example

The following example uses a button, a string grid, and a Save dialog box on a form. When the button is clicked, the user is prompted for a filename. When the user clicks OK, the contents of the string grid are written to the specified file. Additional information is also written to the file so that it can be read easily with the FileRead function.

procedure TForm1.Button1Click(Sender: TObject);

var

  BackupName: string;

  FileHandle: Integer;

  StringLen: Integer;

  X: Integer;

  Y: Integer;

begin

  if SaveDialog1.Execute then

  begin

    if FileExists(SaveDialog1.FileName) then

    begin

      BackupName := ExtractFileName(SaveDialog1.FileName);

      BackupName := ChangeFileExt(BackupName, '.BAK');

      if not RenameFile(SaveDialog1.FileName, BackupName) then

        raise Exception.Create('Unable to create backup file.');

    end;

    FileHandle := FileCreate(SaveDialog1.FileName);

    { Write out the number of rows and columns in the grid. }

    FileWrite(FileHandle,

      StringGrid1.ColCount, SizeOf(StringGrid1.ColCount));

    FileWrite(FileHandle,

      StringGrid1.RowCount, SizeOf(StringGrid1.RowCount));

    for X := 0 to StringGrid1.ColCount – 1 do

    begin

      for Y := 0 to StringGrid1.RowCount – 1 do

      begin

        { Write out the length of each string, followed by the string itself. }

        StringLen := Length(StringGrid1.Cells[X,Y]);

        FileWrite(FileHandle, StringLen, SizeOf(StringLen));

        FileWrite(FileHandle,

          StringGrid1.Cells[X,Y], Length(StringGrid1.Cells[X,Y]);

      end;

    end;

    FileClose(FileHandle);

  end;

end;


FileOpen Example
 VCL Reference

FileOpen Example

procedure OpenForShare(const FileName: String);

var

  FileHandle : Integer;

begin

  FileHandle := FileOpen(FileName, fmOpenWrite or fmShareDenyNone);

  if FileHandle > 0 then

    {valid file handle}

  else

    {Open error: FileHandle = negative DOS error code}

end;


FileSize, Seek, FilePos Example
 VCL Reference

FileSize, Seek, FilePos Example

This example displays a open dialog when the user clicks a button. When the user selects the file, it reports the size of the file, seeks to halfway through the file, and reports the file position at that point.

Note:	This example assumes the compiler flag $IOCHECKS ON ($I+). That is, it expects errors to generate exceptions rather than checking IOResult to be sure that I/O routines succeed.

procedure TForm1.Button1Click(Sender: TObject);

var

   f: file of Byte;

   size: Longint;

   S: string;

   y: Integer;

begin

  if OpenDialog1.Execute then

  begin

    AssignFile(f, OpenDialog1.FileName);

    Reset(f);

    try

      size := FileSize(f);

      S := 'File size in bytes: ' + IntToStr(size);

      y := 10;

      Canvas.TextOut(5, y, S);

      y := y + Canvas.TextHeight(S) + 5;

      S := 'Seeking halfway into file...';

      Canvas.TextOut(5, y, S);

      y := y + Canvas.TextHeight(S) + 5;

      Seek(f, size div 2);

      S := 'Position is now ' + IntToStr(FilePos(f));

      Canvas.TextOut(5, y, S);

    finally

      CloseFile(f);

    end;

  end;

end;


FileDateToDateTime, FileAge, FileGetAttr, FileSetAttr example
 VCL Reference

FileDateToDateTime, FileAge, FileGetAttr, FileSetAttr example

The following code reads a file's attributes into a set variable, sets the check boxes in a file-attribute dialog box to represent the current attributes, then executes the dialog box. If the user changes and accepts any dialog box settings, the code sets the file attributes to match the changed settings:

procedure TFMForm.Properties1Click(Sender: TObject);
var
  Attributes, NewAttributes: Word;
begin
  with FileAttrForm do
  begin
    FileDirName.Caption := FileList.Items[FileList.ItemIndex];
    { set box caption }
    PathName.Caption := FileList.Directory;
    { show directory name }
    ChangeDate.Caption :=
      DateTimeToStr(FileDateToDateTime(FileAge(FileList.FileName)));
    Attributes := FileGetAttr(FileDirName.Caption);
    { read file attributes }
    ReadOnly.Checked := (Attributes and faReadOnly) = faReadOnly;
    Archive.Checked := (Attributes and faArchive) = faArchive;
    System.Checked := (Attributes and faSysFile) = faSysFile;
    Hidden.Checked := (Attributes and faHidden) = faHidden;
    if ShowModal <> id_Cancel then	{ execute dialog box }
    begin
      NewAttributes := Attributes;
      { start with original attributes }
      if ReadOnly.Checked then
        NewAttributes := NewAttributes or faReadOnly
      else
        NewAttributes := NewAttributes andnot faReadOnly;
      if Archive.Checked then
        NewAttributes := NewAttributes or faArchive
      else
        NewAttributes := NewAttributes andnot faArchive;
      if System.Checked then
        NewAttributes := NewAttributes or faSysFile
      else
        NewAttributes := NewAttributes andnot faSysFile;
      if Hidden.Checked then
        NewAttributes := NewAttributes or faHidden
      else
        NewAttributes := NewAttributes andnot faHidden;
      if NewAttributes <> Attributes then { if anything changed... }
        FileSetAttr(FileDirName.Caption, NewAttributes);
         { ...write the new values }
    end;
  end;
end;


FileOpen, FileSeek, FileRead Example
 VCL Reference

FileOpen, FileSeek, FileRead Example

The following example uses a button, a string grid, and an Open dialog box on a form. When the button is clicked, the user is prompted for a filename. When the user clicks OK, the specified file is opened, read into a buffer, and closed. Then the buffer is displayed in two columns of the string grid. The first column contains the character values in the buffer. The second column contains the numeric values of the characters in the buffer.

procedure TForm1.Button1Click(Sender: TObject);

var

  iFileHandle: Integer;

  iFileLength: Integer;

  iBytesRead: Integer;

  Buffer: PChar;

  i: Integer

begin

  if OpenDialog1.Execute then

  begin

    try

      iFileHandle := FileOpen(OpenDialog1.FileName, fmOpenRead);

      iFileLength := FileSeek(iFileHandle,0,2);

      FileSeek(iFileHandle,0,0);

      Buffer := PChar(AllocMem(iFileLength + 1));

      iBytesRead := FileRead(iFileHandle, Buffer, iFileLength);

      FileClose(iFileHandle);

      for i := 0 to iBytesRead-1 do

      begin

        StringGrid1.RowCount := StringGrid1.RowCount + 1;

        StringGrid1.Cells[1,i+1] := Buffer[i];

        StringGrid1.Cells[2,i+1] := IntToStr(Integer(Buffer[i]));

      end;

    finally

      FreeMem(Buffer);

    end;

  end;

end;


FileSearch, ShowMessage Example
 VCL Reference

FileSearch, ShowMessage Example

The following example uses an edit control and a button on a form. When the button is clicked, the current directory and the Windows directory are searched for the filename specified in the edit control. A message box indicates whether the file is found.

procedure TForm1.Button1Click(Sender: TObject);

var

  buffer: array [0..255] of char;

  FileToFind: string;

begin

  GetWindowsDirectory(buffer, SizeOf(buffer));

  FileToFind := FileSearch(Edit1.Text, GetCurrentDir + ';' + buffer);

  if FileToFind = '' then

    ShowMessage('Couldn''t find ' + Edit1.Text + '.')

  else

    ShowMessage('Found ' + FileToFind + '.');

end;


FillChar Example
 VCL Reference

FillChar Example

var

  S: array[0..79] of char;

begin

  { Set to all spaces }

  FillChar(S, SizeOf(S), Ord(' '));

end;


FindFirst, FindNext, FindClose Example
 VCL Reference

FindFirst, FindNext, FindClose Example

The following example uses an edit control, a button, a string grid, and seven check boxes. The check boxes correspond to the seven possible file attributes. When the button is clicked, the path specified in the edit control is searched for files matching the checked file attributes. The names and sizes of the matching files are inserted into the string grid.

procedure TForm1.Button1Click(Sender: TObject);

var

  sr: TSearchRec;

  FileAttrs: Integer;

begin

  StringGrid1.RowCount := 1;

  if CheckBox1.Checked then

    FileAttrs := faReadOnly

  else

    FileAttrs := 0;

  if CheckBox2.Checked then

    FileAttrs := FileAttrs + faHidden;

  if CheckBox3.Checked then

    FileAttrs := FileAttrs + faSysFile;

  if CheckBox4.Checked then

    FileAttrs := FileAttrs + faVolumeID;

  if CheckBox5.Checked then

    FileAttrs := FileAttrs + faDirectory;

  if CheckBox6.Checked then

    FileAttrs := FileAttrs + faArchive;

  if CheckBox7.Checked then

    FileAttrs := FileAttrs + faAnyFile;

  with StringGrid1 do

  begin

    RowCount := 0;

    if FindFirst(Edit1.Text, FileAttrs, sr) = 0 then

    begin

      repeat

        if (sr.Attr and FileAttrs) = sr.Attr then

        begin

        RowCount := RowCount + 1;

        Cells[1,RowCount-1] := sr.Name;

        Cells[2,RowCount-1] := IntToStr(sr.Size);

        end;

      until FindNext(sr) <> 0;

      FindClose(sr);

    end;

  end;

end;


Flush Example
 VCL Reference

Append, Flush Example

var

  f: TextFile;

begin

  if OpenDialog1.Execute then

  begin                    { open a text file }

    AssignFile(f, OpenDialog1.FileName);

    Append(f);

    Writeln(f, 'I am appending some stuff to the end of the file.');

    { insert code here that would require a Flush before closing the file }

    Flush(f);  { ensures that the text was actually written to file }

    CloseFile(f);

  end;

end;


ForceDirectories Example
 VCL Reference

ForceDirectories Example

This example uses a label and a button on a form. When the user clicks the button, all the directories along the specified path that don't exist are created. The results are reported in the caption of the label:

procedure TForm1.Button1Click(Sender: TObject);

var

  Dir: string;

begin

  Dir := 'C:\APPS\SALES\LOCAL';

  if ForceDirectories(Dir) then

    Label1.Caption := Dir + ' was created'

end;


FormatDateTime Example
 VCL Reference

FormatDateTime Example

The following example uses FormatDateTime to set the string variable S to a sentence indicating a meeting time in 3 hours. The sentence has the form 'The meeting is on Wednesday, February 15, 1995 at 2:30 PM'.

S := FormatDateTime('"The meeting is on " dddd, mmmm d, yyyy, " at " hh:mm AM/PM', Now + 0.125);


FormatFloat Example
 VCL Reference

FormatFloat Example

The following table shows some sample formats and the results produced when the formats are applied to different values:

Format string-	1234	-1234	0.5	0
	1234	-1234	0.5	0
0	1234	-1234	1	0
0.00	1234.00	-1234.00	0.50	0.00
#.##	1234	-1234	.5
#,##0.00	1,234.00	-1,234.00	0.50	0.00
#,##0.00;(#,##0.00)	1,234.00	(1,234.00)	0.50	0.00
#,##0.00;;Zero	1,234.00	-1,234.00	0.50	Zero
0.000E+00	1.234E+03	-1.234E+03	5.000E-01	0.000E+00
#.###E-0	1.234E3	-1.234E3	5E-1	0E0


Frac Example
 VCL Reference

Frac Example

var

 R: Real;

begin

  R := Frac(123.456);    { 0.456 }

  R := Frac(-123.456);   { -0.456 }

end;


FreeMem Example
 VCL Reference

FreeMem Example

The following example opens a file named 'test.txt' and reads the entire file into a dynamically allocated buffer. The buffer and the size of the file are then passed to a routine that processes the text, and finally the dynamically allocated buffer is freed and the file is closed.

var

  F: file;

  Size: Integer;

  Buffer: PChar;

begin

  AssignFile(F, 'test.txt');

  Reset(F, 1);

  try

    Size := FileSize(F);

    GetMem(Buffer, Size);

    try

      BlockRead(F, Buffer^, Size);

      ProcessFile(Buffer, Size);

    finally

      FreeMem(Buffer);

    end;

  finally

    CloseFile(F);

  end;

end;


GetCharsetValues Example
 VCL Reference

GetCharsetValues Example

The following uses the GetCharsetValues procedure to fill a string list with the names of all the character set constants provided by Delphi.  This string list can then be used to allow the user to select a character set.

Here is the callback that adds the character sets to the string list:

procedure TForm1.AddCharacterSet(const S: string);

begin

  CharSetList.Add(S);

end;

Here is the code that creates the string list, fills it, and sorts the character set names.

CharSetList := TStringList.Create;

GetCharsetValues(AddCharacterSet);

CharSetList.Sort;

CharSetList = new TStringList();

GetCharsetValues(AddCharacterSet);

CharSetList->Sort();


GetClass Example
 VCL Reference

GetClass Example

The following example allows users to type the name of a graphics class into an edit control and when a button is pressed, the name of the default extension for that class is displayed in another edit control.

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

   { make sure the classes are registered so that GetClass will work -- }

   { Usually, this goes in the initialization section where it is only executed once }

  RegisterClasses([TIcon, TBitmap, TJPEGImage, TMetafile]);

  Edit1.Text := GraphicExtension(TGraphicClass(GetClass(Edit2.Text)));

 end;


GetDir Example
 VCL Reference

GetDir Example

var

   s : string;

 begin

   GetDir(0,s); { 0 = Current drive }

   MessageDlg('Current drive and directory: ' + s, mtInformation, [mbOk] , 0);

 end;


GetMem Example
 VCL Reference

GetMem Example

The following example opens a file named 'test.txt' and reads the entire file into a dynamically allocated buffer. The buffer and the size of the file are then passed to a routine that processes the text, and finally the dynamically allocated buffer is freed and the file is closed.

var

  F: file;

  Size: Integer;

  Buffer: PChar;

begin

  AssignFile(F, 'test.txt');

  Reset(F, 1);

  try

    Size := FileSize(F);

    GetMem(Buffer, Size);

    try

      BlockRead(F, Buffer^, Size);

      ProcessFile(Buffer, Size);

    finally

      FreeMem(Buffer);

    end;

  finally

    CloseFile(F);

  end;

end;


GetShortHint Example
 VCL Reference

GetShortHint Example

This code assigns a two-part string as to the Hint property of an edit box and then displays the "short" or first part of the string as the text of the edit box:

procedure TForm1.BitBtn1Click(Sender: TObject);

begin

  Edit1.Hint := 'Name|Enter full name';

  Edit1.Text := GetShortHint(Edit1.Hint);

end;


GraphicExtension Example
 VCL Reference

GraphicExtension, GraphicFilter, DefaultExt, Filter Example

This code displays a Save Picture dialog box with the TBitmap default extension that is added automatically to files that are given no extension:

SavePictureDialog1.DefaultExt := GraphicExtension(TBitmap);

SavePictureDialog1.Filter := GraphicFilter(TBitmap);

if SavePictureDialog1.Execute then

  {save the graphic }


Halt Example
 VCL Reference

Halt Example

begin

   if 1 = 1 then

     begin

       if 2 = 2 then

         begin

           if 3 = 3 then

             begin

               Halt(1); { Halt right here! }

             end;

         end;

     end;

   Canvas.TextOut(10, 10, 'This will not be executed');

 end;


Hi Example
 VCL Reference

Hi Example

var B: Byte;

begin

  B := Hi($1234);   { $12 }

end;


Inc Example
 VCL Reference

Inc Example

var

  IntVar: Integer;

  LongintVar: Longint;

begin

  Inc(IntVar);	{ IntVar := IntVar + 1 }

  Inc(LongintVar, 5);	{ LongintVar := LongintVar + 5 }

end;


InputBox Example
 VCL Reference

InputBox Example

This example displays an input dialog box when the user clicks a button on the form. The input dialog box includes a prompt string and a default string. The string the user enters in the dialog box is stored in the InputString variable.

uses Dialogs;

procedure TForm1.Button1Click(Sender: TObject);

var

  InputString: string;

begin

  InputString:= InputBox('Input Box', 'Prompt', 'Default string');

end;


InputQuery Example
 VCL Reference

InputQuery Example

This example uses a button and a label on the form. When the user clicks the button, the input box displays. If the user chooses OK, the string that appears in the edit box of the dialog box displays as the caption of the label on the form. If the user chooses Cancel, the dialog box closes and the caption of the label remains unchanged.

procedure TForm1.Button1Click(Sender: TObject);

var

  NewString: string;

  ClickedOK: Boolean;

begin

  NewString := 'Default String';

  Label1.Caption := NewString;

  ClickedOK := InputQuery('Input Box', 'Prompt', NewString);

  if ClickedOK then            { NewString contains new input string }

    Label1.Caption := 'The new string is ''' + NewString + '''';

end;


Insert Example
 VCL Reference

Insert Example

var

  S: string;

begin

  S := 'Honest Lincoln';

  Insert('Abe ', S, 8);                    { 'Honest Abe Lincoln' }

end;


Int Example
 VCL Reference

Int Example

var

  R: Real;

begin

  R := Int(123.456);    { 123.0 }

  R := Int(-123.456);   { -123.0 }

end;


Length, IntToHex Example
 VCL Reference

Length, IntToHex Example

The following example uses an edit control, a button, and a label on a form. When the button is clicked, the hexadecimal value of each character in the edit control is displayed in the label.

procedure TForm1.Button1Click(Sender: TObject);

var

  i: Integer;

begin

  Label1.Caption := '';

  for i := 1 to Length(Edit1.Text) do

  begin

    try

      Label1.Caption := Label1.Caption + IntToHex(Edit1.Text[i],2) + ' ';

    except

      Beep;

    end;

  end;

end;


IntToStr Example
 VCL Reference

IntToStr Example

The following example uses two edit controls, a button, and a label on a form. When the button is clicked, the integers in the edit controls are multiplied together and the result is displayed in the label.

procedure TForm1.Button1Click(Sender: TObject);

begin

  try

    Label1.Caption := IntToStr(StrToInt(Edit1.Text) * StrToInt(Edit2.Text));

  except

    ShowMessage('You must specify integer values. Please try again.');

  end;

end;


IOResult Example
 VCL Reference

IOResult Example

This example illustrates how to use IOResult to check the success of the Reset method. If the call to Reset is successful, a message dialog displays the size of the file that the user selects in an Open dialog. If the call to Reset fails, a message warns the user that there was a file access error.

var

  F: file of Byte;

begin

  if OpenDialog1.Execute then

  begin

    AssignFile(F, OpenDialog1.FileName);

    {$I-}

    Reset(F);

    {$I+}

    if IOResult = 0 then

    begin

      MessageDlg('File size in bytes: ' + IntToStr(FileSize(F)),

        mtInformation, [mbOk], 0);

      CloseFile(F);

    end

    else

      MessageDlg('File access error', mtWarning, [mbOk], 0);

  end;

end;


IsLeapYear, YearOf Example
 VCL Reference

IsLeapYear, YearOf example

The following function indicates whether the current year is a leap year.

function IsThisLeapYear: Boolean;

begin

  Result := IsLeapYear(YearOf(Date));

end;


Exp, Ln Example
 VCL Reference

Exp, Ln Example

var

   e : real;

   S : string;

begin

   e := Exp(1.0);

   Str(ln(e):3:2, S);

   S := 'e = ' + FloatToStr(e) + '; ln(e) = ' + S;

   Canvas.TextOut(10, 10, S);

end;


Lo Example
 VCL Reference

Lo Example

var B: Byte;

begin

  B := Lo($1234);   { $34 }

end;


Low, High Example
 VCL Reference

Low, High Example

function Sum( var X: arrayof Double): Double;

var

  I: Word;

  S: Real;

begin

  S := 0; { Note that open array index range is always zero-based. }

  for I := 0 to High(X) do S := S + X[I];

  Sum := S;

end;

procedure TForm1.Button1Click(Sender: TObject);

var

  List1: array[0..3] of Double;

  List2: array[5..17] of Double;

  X: Word;

  S, TempStr: string;

begin

  for X := Low(List1) to High(List1) do

      List1[X] := X * 3.4;

  for X := Low(List2) to High(List2) do

      List2[X] := X * 0.0123;

  Str(Sum(List1):4:2, S);

  S := 'Sum of List1: ' + S + #13#10;

  S := S + 'Sum of List2: ';

  Str(Sum(List2):4:2, TempStr);

  S := S + TempStr;

  MessageDlg(S, mtInformation, [mbOk], 0);

end;


LowerCase Example
 VCL Reference

LowerCase Example

This example uses an edit control, a label, and a button on a form. When the user clicks the button, the label shows the text of the edit control in lower case.

procedure TForm1.Button1Click(Sender: TObject);

begin

  Label1.Caption := LowerCase(Edit1.Text);

end;


MessageDlg Example
 VCL Reference

MessageDlg Example

This example uses a button on a form. When the user clicks the button, a message box appears, asking if the user wants to exit the application. If the user chooses Yes, another dialog box appears informing the user the application is about to end. When user chooses OK, the application ends.

procedure TForm1.Button1Click(Sender: TObject);

begin

  if MessageDlg('Welcome to my Object Pascal application.  Exit now?',

    mtConfirmation, [mbYes, mbNo], 0) = mrYes then

  begin

    MessageDlg('Exiting the Object Pascal application.', mtInformation,

      [mbOk], 0);

    Close;

  end;

end;


MessageDlgPos Example
 VCL Reference

MessageDlgPos Example

This example uses a button on a form. When the user clicks the button, a message box appears with a Yes, No, and Cancel button on it:

procedure TForm1.Button1Click(Sender: TObject);

begin

  MessageDlgPos('Are you there?',mtConfirmation, mbYesNoCancel, 0, 200, 200);

end;


MkDir Example
 VCL Reference

MkDir Example

uses Dialogs;

begin

  {$I-}

  { Get directory name from TEdit control }

  MkDir(Edit1.Text);

  if IOResult <> 0 then

    MessageDlg('Cannot create directory', mtWarning, [mbOk], 0)

  else

    MessageDlg('New directory created', mtInformation, [mbOk], 0);

end;


Move Example
 VCL Reference

Move Example

var

  A: array[1..4] of Char;

  B: Integer;

begin

  Move(A, B, SizeOf(B));  { SizeOf = safety! }

end;


New Example
 VCL Reference

New Example

type

  PListEntry = ^TListEntry;

  TListEntry = record

    Next: PListEntry;

    Text: string;

    Count: Integer;

  end;

var

  List, P: PListEntry;

begin

  ...

  New(P);

  P^.Next := List;

  P^.Text := 'Hello world';

  P^.Count := 1;

  List := P;

  ...

end;


Odd Example
 VCL Reference

Odd Example

begin

   if Odd(5) then

     Canvas.TextOut(10, 10, '5 is odd.')

   else

     Canvas.TextOut(10, 10, 'Something is odd!');

 end;


Ord Example
 VCL Reference

Ord Example

uses Dialogs;

type

   Colors = (RED,BLUE,GREEN);

var

  S: string;

 begin

   S := 'BLUE has an ordinal value of ' + IntToStr(Ord(BLUE)) + #13#10;

   S := S + 'The ASCII code for "c" is ' + IntToStr(Ord('c')) +  ' decimal';

   MessageDlg(S, mtInformation, [mbOk], 0);

 end;


ParamStr Example
 VCL Reference

ParamCount, ParamStr Example

The following example beeps once for each “beep” passed in on the command line. The example terminates the application if  “exit” is passed in on the command line.

procedure TForm1.FormCreate(Sender: TObject);

var

  i: Integer;

  for i := 1 to ParamCount do

  begin

    if LowerCase(ParamStr(i)) = 'beep' then

      Beep

    elseif LowerCase(ParamStr(i)) = 'exit' then

      Application.Terminate;

  end;

end;


Polygon, Point Example
 VCL Reference

Polygon, Point Example

This example draws a polygon in the specified shape, and fills it with the color teal.

procedure TForm1.FormActivate(Sender: TObject);

begin

  Canvas.Brush.Color := clTeal;

  Canvas.Polygon([Point(10, 10), Point(30, 10),

    Point(130, 30), Point(240, 120)]);

end;


Pos Example
 VCL Reference

Pos Example

var S: string;

begin

  S := '   123.5';

  { Convert spaces to zeros }

  while Pos(' ', S) > 0 do

    S[Pos(' ', S)] := '0';

end;


Pred, Succ Example
 VCL Reference

Pred, Succ Example

uses Dialogs;

type

   Colors = (RED,BLUE,GREEN);

 var

   S: string;

 begin

   S := 'The predecessor of 5 is ' + IntToStr(Pred(5)) + #13#10;

   S := S + 'The successor of 10 is ' + IntToStr(Succ(10)) + #13#10;

   if Succ(RED) = BLUE then1

     S := S + 'In the type Colors, RED is the predecessor of BLUE.';

   MessageDlg(S, mtInformation, [mbOk], 0);

 end;


Randomize, Random Example
 VCL Reference

Randomize, Random Example

var

   I: Integer;

 begin

   Randomize;

   for I := 1 to 50 do begin

     { Write to window at random locations }

     Canvas.TextOut(Random(Width), Random(Height), 'Boo!');

   end;

 end;


Readln, Writeln Example
 VCL Reference

Readln, Writeln Example

{ This example assumes you are compiling as a console application }

var

   s : string;

 begin

   Write('Enter a line of text: ');

   Readln(s);

   Writeln('You typed: ',s);

   Writeln('Hit <Enter> to exit');

   Readln;

 end;


RegisterComponents Example
 VCL Reference

RegisterComponents Example

The following code registers several components, some on the System palette page that already exists, and some on a new palette page that Delphi creates when the components are installed.

procedure Register;

begin

   RegisterComponents('System', [TSystem1, TSystem2]); {add to system page}

   RegisterComponents('MyCustomPage',[TCustom1, TCustom2]); { new page}

end;


ReadComponentResFile, WriteComponentesFile example
 VCL Reference

ReadComponentResFile, WriteComponentResFile example

The following code defines a component class (TStreamable class) and a persistent class (TContainedClass) that is the type of a property on the component class. When a button is clicked, an instance of the component class is created, saved to a file, deleted, and then loaded from the file. By setting a breakpoint on the property setter of the TContainedClass SomeData property, you can watch how the streaming system sets property values when it reads them from a file.

The following unit defines the classes to stream:

unit StrmExmpl;

{$R-,T-,H+,X+}

interface

uses Classes

type

TContainedClass = class(TPersistent)

private:

  FSomeData: Integer;

  procedure SetSomeData(Value: Integer);

  public:

    constructor Create; override;

  // Only published properties

  // are automatically streamed.

  published:

    property SomeData: Integer read FSomeData write SetSomeData;

end;

TStreamableClass = class(TComponent)

private:

  FContainedClass: TContainedClass;

  public:

    constructor Create(AOwner: TComponent); override;

    destructor Destroy; override;

  // Only published properties

  // are automatically streamed.

  published:

    property ContainedClass: TContainedClass read FContainedClass write FContainedClass;

end;

implementation

procedure TContainedClass.SetSomeData(Value: Integer);

begin

{ Place a breakpoint here and notice how the data is streamed back. }

  FSomeData := Value;

end;

constructor TContainedClass.Create;

begin

  FSomeData := 42;

end;

constructor TStreamableClass.Create(AOwner: TComponent);

begin

  inherited Create(AOwner);

  FContainedClass = TContainedClass.Create;

end;

destructor TStreamableClass.Destroy;

begin

  FContainedClass.Free;

end;

initialization

  RegisterClasses([TContainedClass, TStreamableClass]);

finalization

end.

The following OnClick event handler should be added to a button on the application’s main form. It causes the above classes to be streamed out and in. Note that you must add StrmExmpl to the uses clause of unit1.

procedure TForm1.Button1Click(Sender: TObject);

var

  AClassInstance: TStreamableClass;

begin

  AClassInstance := TStreamableClass.Create(nil);

  WriteComponentResFile('C:\Test', AClassInstance);

  FreeAndNil(AClassInstance);

  AClassInstance := ReadComponentResFile('C:\Test', nil) as TStreamableClass;

  FreeAndNil(AClassInstance);

end;


Rename Example
 VCL Reference

Rename Example

uses Dialogs;

var

  f : file;

begin

  OpenDialog1.Title := 'Choose a file... ';

  if OpenDialog1.Execute then

  begin

    SaveDialog1.Title := 'Rename to...';

    if SaveDialog1.Execute then

    begin

      AssignFile(f, OpenDialog1.FileName);

      Canvas.TextOut(5, 10, 'Renaming ' + OpenDialog1.FileName +

                     ' to ' + SaveDialog1.FileName);

      Rename(f, SaveDialog1.FileName);

    end;

  end;

end;


Reset Example
 VCL Reference

Reset Example

function FileIsThere(FileName: string): Boolean;

{ Boolean function that returns True if the file exists; otherwise,

  it returns False. Closes the file if it exists. }

 var

  F: file;

begin

  {$I-}

  AssignFile(F, FileName);

  FileMode := 0;  {Set file access to read only }

  Reset(F);

  CloseFile(F);

  {$I+}

  FileIsThere := (IOResult = 0) and (FileName <> '');

end;  { FileIsThere }

begin

 if FileIsThere(ParamStr(1)) then {Get file name from command line}

    Canvas.TextOut(10, 10, 'File exists')

  else

    Canvas.TextOut(10, 10, 'File not found');

end;


Rewrite Example
 VCL Reference

Rewrite Example

var F: TextFile;

begin

  AssignFile(F, 'NEWFILE.$$$');

  Rewrite(F);

  Writeln(F, 'Just created file with this text in it...');

  CloseFile(F);

end;


RmDir Example
 VCL Reference

RmDir Example

uses Dialogs;

begin

   {$I-}

   { Get directory name from TEdit control }

   RmDir(Edit1.Text);

   if IOResult <> 0 then

     MessageDlg('Cannot remove directory', mtWarning, [mbOk], 0)

   else

     MessageDlg('Directory removed', mtInformation, [mbOk], 0);

 end;


Round Example
 VCL Reference

Round Example

var

   S, T: string;

begin

   Str(1.4:2:1, T);

   S := T + ' rounds to ' + IntToStr(Round(1.4)) + #13#10;

   Str(1.5:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(1.5)) + #13#10;

   Str(-1.4:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(-1.4)) + #13#10;

   Str(-1.5:2:1, T);

   S := S + T + ' rounds to ' + IntToStr(Round(-1.5));

   MessageDlg(S, mtInformation, [mbOk], 0);

end;


RunError Example
 VCL Reference

RunError Example

begin

{$IFDEF Debug}

  if P = nil then

    RunError(204);

{$ENDIF}

end;


SeekEof Example
 VCL Reference

SeekEof Example

var

   f : System.TextFile;

   i, j, Y : Integer;

 begin

   AssignFile(f,'TEST.TXT');

   Rewrite(f);

   { Create a file with 8 numbers and some

     whitespace at the ends of the lines }

   Writeln(f,'1 2 3 4 ');

   Writeln(f,'5 6 7 8 ');

   Reset(f);

   { Read the numbers back. SeekEof returns TRUE if there is no

     more text (other than whitespace) in the file. }

   Y := 5;

   while not SeekEof(f) do

   begin

     Read(f,j);

     Canvas.TextOut(5, Y, IntToStr(j));

     Y := Y + Canvas.TextHeight(IntToStr(j)) + 5;

   end;

 end;


SeekEoln Example
 VCL Reference

SeekEoln Example

var

   f: System.TextFile;

   j: Integer;

   s: string;

begin

   AssignFile(f,'TEST.TXT');

   Rewrite(f);

   // Create data with white space at beginning and

   // end of line to demonstrate that SeekEoln is

   // immune to this.

   Writeln(f, '    1 2 3 4      ');

   Writeln(f, 'Some text');

   Reset(f);

   while not SeekEoln(f) do // Will skip white space

   begin

     Read(f, j);

     Writeln(j);

   end;

   Readln(f); // Read line-end marker

   Readln(f, s); // Read string with line-end marker

   Writeln(s);

   Readln;

end.


SelectDirectory Example
 VCL Reference

SelectDirectory Example

This example uses a button and a label on a form. When the user clicks the button, a Select Directory dialog box appears. The current directory displayed in the dialog box is C:\MYDIR. The user can select a directory from the directory list, or enter a new directory in the edit box. If the user enters a new directory, a message box asks the user if the directory should be created. If the user chooses Yes, the directory is created. If the user chooses No, the message box goes away without creating the directory. The name of the directory the user selects appears as the caption of the label:

uses FileCtrl;

const

  SELDIRHELP = 1000;

procedure TForm1.Button1Click(Sender: TObject);

var

  Dir: string;

begin

  Dir := 'C:\MYDIR';

  if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then

    Label1.Caption := Dir;

end;


Set8087CW Example
 VCL Reference

Set8087CW Example

procedure NumericExample;

var

  Saved8087CW: Word;

begin

  Saved8087CW := Default8087CW;

  Set8087CW($133f); { Disable all fpu exceptions }

  ThirdPartyRoutine;

  Set8087CW(Saved8087CW);

end;


SetMemoryManager Example
 VCL Reference

GetMemoryManager, SetMemoryManager Example

The following example implements a memory manager that counts the number of times the GetMem, FreeMem, and ReallocMem entry points are called. You must call the SetNewMemMgr routine to install the new memory manager. The new memory manager routines simply pass on the requests to the previous memory manager after incrementing the appropriate counter.

var

  GetMemCount: Integer;

  FreeMemCount: Integer;

  ReallocMemCount: Integer;

  OldMemMgr: TMemoryManager;

function NewGetMem(Size: Integer): Pointer;

begin

  Inc(GetMemCount);

  Result := OldMemMgr.GetMem(Size);

end;

function NewFreeMem(P: Pointer): Integer;

begin

  Inc(FreeMemCount);

  Result := OldMemMgr.FreeMem(P);

end;

function NewReallocMem(P: Pointer; Size: Integer): Pointer;

begin

  Inc(ReallocMemCount);

  Result := OldMemMgr.ReallocMem(P, Size);

end;

const

  NewMemMgr: TMemoryManager = (

  GetMem: NewGetMem;

  FreeMem: NewFreeMem;

  ReallocMem: NewReallocMem);

procedure SetNewMemMgr;

begin

  GetMemoryManager(OldMemMgr);

  SetMemoryManager(NewMemMgr);

end;


SetTextBuf Example
 VCL Reference

SetTextBuf Example

uses Dialogs;

var

  F, FTwo: System.TextFile;

  Ch: Char;

  Buf: array[1..4096] of Char;  { 4K buffer }

begin

  if OpenDialog1.Execute then begin

    AssignFile(F, OpenDialog1.FileName);

    { Larger buffer for faster reads }

    System.SetTextBuf(F, Buf);

    Reset(F);

    { Dump text file into another file }

    AssignFile(FTwo, 'WOOF.DOG');

    Rewrite(FTwo);

    while not Eof(f) do

    begin

      Read(F, Ch);

      Write(FTwo, Ch);

    end;

    System.CloseFile(F);

    System.CloseFile(FTwo);

  end;

end;


ShortCut Example
 VCL Reference

ShortCut Example

This line creates a shortcut, Ctrl+O, at run time and assigns it to the Open command on a File menu.

OpenCommand.ShortCut := ShortCut(Word('O'), [ssCtrl]);


ShortCutToKey Example
 VCL Reference

ShortCutToKey Example

The following code redefines the ShortCut of CloseCommand if the original short cut used the [ssCtrl] shift state.

var

  TheKey: Word;

  TheShiftState: TShiftState;

begin

  ShortCutToKey(CloseCommand.ShortCut, TheKey, TheShiftState);

  if TheShiftState = [ssCtrl] then

   CloseCommand.ShortCut := ShortCut(Word('C'), [ssShift]);

end;


ShortCutToText Example
 VCL Reference

ShortCutToText Example

This line converts the menu shortcut assigned to the OpenCommand to a string and displays it in an edit box:

Edit1.Text := ShortCutToText(OpenCommand.ShortCut);


Sin Example
 VCL Reference

Sin Example

var

  R: Extended;

  S: string;

begin

  R := Sin(Pi);

  Str(R:5:3, S);

  Canvas.TextOut(10, 10, 'The Sin of Pi is ' + S);

end;


SizeOf Example
 VCL Reference

SizeOf Example

type

  CustRec = record

    Name: string[30];

    Phone: string[14];

  end;

 var

  P: ^CustRec;

begin

  GetMem(P, SizeOf(CustRec));

  Canvas.TextOut(10, 10, 'The size of the record is ' + IntToStr(SizeOf(CustRec)));

  FreeMem (P, SizeOf(CustRec));

end;


Sqr Example
 VCL Reference

Sqr, Sqrt Example

var

  S, Temp: string;

begin

   Str(Sqr(5.0):3:1, Temp);

   S := '5 squared is ' + Temp + #13#10;

   Str(Sqrt(2.0):5:4, Temp);

   S := S + 'The square root of 2 is ' + Temp;

   MessageDlg(S, mtInformation, [mbOk], 0);

end;


Str Example
 VCL Reference

Str Example

function MakeItAString(I: Longint): string;

{ Convert any integer type to a string }

var

  S: string[11];

begin

  Str(I, S);

  Result:= S;

end;

begin

  Canvas.TextOut(10, 10, MakeItAString(-5322));

end;


StrComp Example
 VCL Reference

StrComp Example

The following example uses two edit controls and a button on a form. When the button is clicked, the text in the edit controls is compared.

uses SysUtils;

procedure TForm1.Button1Click(Sender: TObject);

var

  Msg: string;

  CompResult: Integer;

begin

  Msg := Edit1.Text;

  CompResult := StrComp(PChar(Edit1.Text), PChar(Edit2.Text));

  if CompResult < 0 then

    Msg := Msg + ' is less than '

  else if CompResult > 0 then

    Msg := Msg + ' is greater than '

  else

    Msg := Msg + ' is equal to '

  Msg := Msg + Edit2.Text;

  ShowMessage(Msg);

end;


StrCopy, StrCat Example
 VCL Reference

StrCopy, StrCat Example

The following example uses an edit control, a label, and a button on a form. When the button is clicked, the label’s caption and the edit control’s text are combined in a buffer. Then the buffer is displayed in the label’s caption.

procedure TForm1.Button1Click(Sender: TObject);

var

  Buffer: PChar;

begin

  GetMem(Buffer,Length(Label1.Caption) + Length(Edit1.Text) + 1);

  StrCopy(Buffer, PChar(Label1.Caption));

  StrCat(Buffer, PChar(Edit1.Text));

  Label1.Caption := Buffer;

  Edit1.Clear;

  FreeMem(Buffer);

end;


StrECopy Example
 VCL Reference

StrECopy Example

uses SysUtils;

const

  Turbo: PChar = 'Object';

  Pascal: PChar = 'Pascal';

 var

  S: array[0..15] of Char;

begin

  StrECopy(StrECopy(StrECopy(S, Turbo), ' '), Pascal);

  Canvas.TextOut(10, 10, string(S));

end;


StrEnd Example
 VCL Reference

StrEnd Example

The following example uses an edit control, a label, and a button on a form. When the button is clicked, the edit control’s text is copied into a buffer. Then the buffer is displayed backwards in the label.

procedure TForm1.Button1Click(Sender: TObject);

var

  TextBuffer: PChar;

  Ptr: PChar;

begin

  GetMem(TextBuffer, Length(Edit1.Text)+1);

  StrCopy(TextBuffer, PChar(Edit1.Text));

  Ptr := StrEnd(TextBuffer);

  Label1.Caption := '';

  while Ptr >= TextBuffer do

  begin

    Ptr := Ptr – 1;

    Label1.Caption := Label1.Caption + Ptr^;

  end;

  FreeMem(TextBuffer);

end;


StrIComp Example
 VCL Reference

StrIComp Example

The following example uses two edit controls and a button on a form. When the button is clicked, the text in the edit controls is compared case-insensitively.

uses SysUtils;

procedure TForm1.Button1Click(Sender: TObject);

var

  Msg: string;

  CompResult: Integer;

begin

  Msg := Edit1.Text;

  CompResult := StrIComp(PChar(Edit1.Text), PChar(Edit2.Text));

  if CompResult < 0 then

    Msg := Msg + ' is less than '

  else if CompResult > 0 then

    Msg := Msg + ' is greater than '

  else

    Msg := Msg + ' is equal to '

  Msg := Msg + Edit2.Text;

  ShowMessage(Msg);

end;


StrLen, StrLCat Example
 VCL Reference

StrLen, StrLCat Example

The following example uses an edit control and a button on a form. When the button is clicked, the edit control’s text is split in halves that are copied into separate buffers. Then the contents of the buffers are displayed in a message box.

procedure TForm1.Button1Click(Sender: TObject);

var

  FirstHalf: PChar;

  SecondHalf: PChar;

  HalfLen: Integer;

begin

  HalfLen := StrLen(PChar(Edit1.Text)) div 2;

  GetMem(FirstHalf,HalfLen+2);

  GetMem(SecondHalf,HalfLen+2);

  FirstHalf^ := Chr(0);

  SecondHalf^ := Chr(0);

  StrLCat(FirstHalf, PChar(Edit1.Text), HalfLen);

  StrCat(SecondHalf, PChar(Edit1.Text) + HalfLen);

  Application.MessageBox(FirstHalf, 'First Half', MB_OK);

  Application.MessageBox(SecondHalf, 'Second Half', MB_OK);

  FreeMem(FirstHalf);

  FreeMem(SecondHalf);

end;


StrLComp Example
 VCL Reference

StrLComp Example

uses SysUtils;

const

  S1: PChar = 'Enterprise'

  S2: PChar = 'Enter'

var

  ComStr: string;

begin

  if StrLComp(S1, S2, 5) = 0 then

    ComStr := 'equal'

  else

    ComStr := 'different';

  Canvas.TextOut(10, 10, 'The first five characters are ' + ComStr);

end;


StrLCopy Example
 VCL Reference

StrLCopy Example

The following example uses an edit control and a button on a form. When the button is clicked, the first X bytes of the edit control are copied into a buffer, where X is a predefined number.

uses SysUtils;

const MAX_BUFFER = 10;

procedure TForm1.Button1Click(Sender TObject);

var

  Buffer: array [0..MAX_BUFFER] of char;

begin

  StrLCopy(Buffer, PChar(Edit1.Text), MAX_BUFFER);

  Application.MessageBox(Buffer, 'StrLCopy Example', MB_OK);

end;


StrLIComp Example
 VCL Reference

StrLIComp Example

uses SysUtils;

const

  S1: PChar = 'Enterprise'

  S2: PChar = 'Enter'

var

  ComStr: string;

begin

  if StrLIComp(S1, S2, 5) = 0 then

    ComStr := 'equal'

  else

    ComStr := 'different';

  Canvas.TextOut(10, 10, 'The first five characters are ' + ComStr);

end;


StrLower Example
 VCL Reference

StrLower Example

uses SysUtils;

const

  S: PChar = 'A fUnNy StRiNg'

begin

  Canvas.TextOut(5, 10, string(StrLower(S)) + ' ' + string(StrUpper(S)));

end;


StrMove Example
 VCL Reference

StrMove Example

This example shows two functions that do the same thing as StrNew and StrDispose.

uses SysUtils;

function AHeapaString(S: PChar): PChar;

{ Allocate string on heap }

 var

  L: Cardinal;

  P: PChar;

begin

 StrNew := nil;

 if (S <> nil) and (S[0] <> #0) then

  begin

    L := StrLen(S) + 1;

    GetMem(P, L);

    StrNew := StrMove(P, S, L);

  end;

end;

procedure DisposeDaString(S: PChar);

{ Dispose string on heap }

begin

  if S <> nil then FreeMem(S, StrLen(S) + 1);

end;

var

  S: PChar;

begin

  AHeapaString(S);

  DisposeDaString(S);

end;


StrNew Example
 VCL Reference

StrNew, StrDispose Example

This example uses an edit control and a button on a form. When the button is clicked, memory is allocated for a copy of the text in the edit control, the text is displayed in a message box, and then the memory is deallocated.

uses Sysutils;

procedure TForm1.Button1Click(Sender: TObject);

var

  Temp: PChar;

begin

  // Allocate memory.

  Temp := StrNew(PChar(Edit1.Text));

  ShowMessage(Temp, 'StrNew, StrDispose Example', MB_OK);

  // Deallocate memory.

  StrDispose(Temp);

end;


StrPCopy Example
 VCL Reference

StrPCopy Example

uses SysUtils;

var

  A: array[0..79] of Char;

  S: String;

begin

  S := 'Honk if you know Blaise.';

  StrPCopy(A, S);

  Canvas.TextOut(10, 10, string(A));

end;


StrPos Example
 VCL Reference

StrPos Example

The following example uses two edit controls and a button on a form. When the button is clicked, the text in the first edit control is searched for the text in the second edit control.

uses SysUtils;

procedure TForm1.Button1Click(Sender TObject);

var

  Location: PChar;

begin

  if StrPos(PChar(Edit1.Text), PChar(Edit2.Text)) <> nilthen

    ShowMessage('Substring found')

  else

    ShowMessage('Substring not found');

end;


StrRScan Example
 VCL Reference

StrRScan Example

{ This function behaves much like ExtractFileName }

{ except that it uses null-terminated strings and }

{ it will not work with multi-byte character sets (MBCS). }

uses SysUtils;

function NamePart(FileName: PChar): PChar;

var

  P: PChar;

begin

  P := StrRScan(FileName, '\/');

  if P = nil then

  begin

    P := StrRScan(FileName, ':');

    if P = nil then P := FileName;

  end;

  NamePart := P;

end;

var

  S : string;

begin

  S := string(NamePart('C:\Test.fil'));

  Canvas.TextOut(10, 10, S);

end;


StrScan Example
 VCL Reference

StrScan Example

uses SysUtils;

function HasWildcards(FileName: PChar): Boolean;

{ Return true if file name has wildcards in it }

begin

  HasWildcards := (StrScan(FileName, '*') <> nil) or

    (StrScan(FileName, '?') <> nil);

end;

const

  P: PChar = 'C:\Test.* ';

begin

  if HasWildcards(P) then

    ShowMessage('The string has wildcards')

  else

    ShowMessage('The string doesn't have wildcards');

end;


StrToDate, DayOfWeek Example
 VCL Reference

StrToDate, DayOfWeek Example

This example uses an edit box and a button on a form. When the user enters a date in the edit box in the format associated with the current locale (for example MM/DD/YY format in the US), the string entered is converted to a TDateTime value. This value is used to indicate the day of the week the date represents.

procedure TForm1.Button1Click(Sender: TObject);

var

  ADate: TDateTime;

  days: array[1..7] of string;

begin

  days[1] := 'Sunday';

  days[2] := 'Monday';

  days[3] := 'Tuesday';

  days[4] := 'Wednesday';

  days[5] := 'Thursday';

  days[6] := 'Friday';

  days[7] := 'Saturday';

  ADate := StrToDate(Edit1.Text);

  ShowMessage(Edit1.Text + ' is a ' + days[DayOfWeek(ADate)];

end;


StrToDateTime Example
 VCL Reference

StrToDateTime Example

This example sets the value of a date-time field based on the value typed by the user into an edit control.

procedure TForm1.Button1Click(Sender: TObject);

var

  ADateAndTime: TDateTime;

begin

  ADateAndTime := StrToDateTime(Edit1.Text);

  Table1.FieldByName('TimeStamp').AsDateTime := ADateAndTime;

end;


StrToInt Example
 VCL Reference

StrToInt Example

This example uses two edit boxes and a button on a form. When the user clicks the button, the code converts the values in the edit boxes to numbers, adds them, and displays a message indicating the sum:

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

  J: Integer;

begin

  I := StrToInt(Edit1.Text);

  J := StrToInt(Edit2.Text);

  ShowMessage(IntToStr(I + J));

end;


StrToIntDef Example
 VCL Reference

StrToIntDef Example

This example uses two edit boxes and a button on a form. The user enters a number in the first edit box and clicks the button. If the number entered was a valid integer, the same value appears in the second edit box. If the number was not a valid integer, the default value of 1000 appears in the second edit box:

procedure TForm1.Button1Click(Sender: TObject);

var

  Number: Integer;

begin

  Number := StrToIntDef(Edit1.Text, 1000);

  Edit2.Text := IntToStr(Number);

end;


StrToTime Example
 VCL Reference

StrToTime Example

This example uses an edit box and a button on a form. When the user enters a time in the edit box in the HH:MM:SS format, the string entered is converted to a TDateTime value. A message then appears that says “Good Morning” or “Good Afternoon”, depending on whether the time entered was in the morning or afternoon.

procedure TForm1.Button1Click(Sender: TObject);

var

  ATime: TDateTime;

begin

  ATime := StrToTime(Edit1.Text);

  if ATime < 0.50 then

    ShowMessage('Good Morning')

  else

    ShowMessage('Good Afternoon');

end;


StrUpper Example
 VCL Reference

StrUpper Example

uses SysUtils;

const

  S: PChar = 'A fUnNy StRiNg'

begin

  Canvas.TextOut(5, 10, string(StrLower(S)) + ' ' +   string(StrUpper(S)));

end;


SystemTimeToDateTime Example
 VCL Reference

SystemTimeToDateTime Example

The following code retrieves the current date and time using the Windows GetLocalTime API call, and converts this value to a TDateTime value.

function GetCurrentDateTime: TDateTime;

var

  SystemTime: TSystemTime;

begin

  GetLocalTime(SystemTime);

  Result := SystemTimeToDateTime(SystemTime);

end;


Time Example
 VCL Reference

Time, TimeToStr Example

This procedure displays the current time in the form's caption every time the Timer's OnClick event fires, based upon the Interval Property (default: 1000 = 1 sec)

procedure TForm1.Timer1Timer(Sender: TObject);

var

  DateTime : TDateTime;

  str : string;

begin

  DateTime := Time;  // store the current date and time

  str := TimeToStr(DateTime); // convert the time into a string

  Caption := str;  // display the time on the form's caption

  { Note This could have been done with the following line of code:

    Caption := TimeToStr(Time); }

end;


Trunc Example
 VCL Reference

Trunc Example

var

   S, T: string;

begin

   Str(1.4:2:1, T);

   S := T + ' Truncs to ' + IntToStr(Trunc(1.4)) + #13#10;

   Str(1.5:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(1.5)) + #13#10;

   Str(-1.4:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(-1.4)) + #13#10;

   Str(-1.5:2:1, T);

   S := S + T + ' Truncs to ' + IntToStr(Trunc(-1.5));

   MessageDlg(S, mtInformation, [mbOk], 0);

end;


Truncate Example
 VCL Reference

Truncate Example

var

   f: fileof Integer;

   i,j: Integer;

 begin

   AssignFile(f,'TEST.INT');

   Rewrite(f);

   for i := 1 to 6 do

     Write(f,i);

   Writeln('File before truncation:');

   Reset(f);

   while not Eof(f) do

   begin

     Read(f,i);

     Writeln(i);

   end;

   Reset(f);

   for i := 1 to 3 do

     Read(f,j); { Read ahead 3 records }

   Truncate(f); { Cut file off here }

   Writeln;

   Writeln('File after truncation:');

   Reset(f);

   while not Eof(f) do

   begin

     Read(f,i);

     Writeln(i);

   end;

   CloseFile(f);

   Erase(f);

 end;


UpCase Example
 VCL Reference

UpCase Example

The following code uppercases every other character in the text of an edit control when the user clicks the button.

var

  s : string;

  i : Integer;

begin

  { Get string from TEdit control }

  s := Edit1.Text;

  for i := 1 to Length(s) do

    if i mod 2 = 0 then s[i] := UpCase(s[i]);

  Edit1.Text := s;

end;


UpperCase Example
 VCL Reference

UpperCase Example

This example uses a list box and a button on a form. Use the Items property editor in the Object Inspector to enter a list of strings in the list box. When the application runs and the button is clicked, the strings in the list box become uppercase.

procedure TForm1.Button1Click(Sender: TObject);

var

  I: Integer;

begin

  for I := 0 to ListBox1.Items.Count -1 do

    ListBox1.Items[I] := UpperCase(ListBox1.Items[I]);

end;


Val Example
 VCL Reference

Val Example

uses Dialogs;

var

  I, Code: Integer;

begin

  { Get text from TEdit control }

  Val(Edit1.Text, I, Code);

  { Error during conversion to integer? }

  if Code <> 0 then

    MessageDlg('Error at position: ' + IntToStr(Code), mtWarning, [mbOk], 0);

  else

    Canvas.TextOut(10, 10, 'Value = ' + IntToStr(I));

end;


VarArrayCreate, VarArrayOf Example
 VCL Reference

VarArrayCreate, VarArrayOf Example

The following example creates a one-dimensional variant array with five elements. Each of the elements are of type Variant, and can therefore contain values of varying types, as is illustrated by the example. Notice in particular how the value of the last element of the array is itself a variant array.

var

  A: Variant;

begin

  A := VarArrayCreate([0, 4], varVariant);

  A[0] := 1;

  A[1] := 1234.5678;

  A[2] := 'Hello world';

  A[3] := True;

  A[4] := VarArrayOf([1, 10, 100, 1000]);

  WriteLn(A[2]);	{ Hello world }

  WriteLn(A[4][2]);	{ 100 }

end;


VarArrayLock, VarArrayUnlock Example
 VCL Reference

VarArrayLock, VarArrayUnlock Example

type

  PArrayData = ^TArrayData;

  TArrayData = array[0..9, 1..3] of Integer;

var

  A: Variant;

  P: PArrayData;

  I, J: Integer;

begin

  A := VarArrayCreate([1, 3, 0, 9], varInteger);

  P := VarArrayLock(A);

  try

  for I := 0 to 9 do

    for J := 1 to 3 do

      P^[I, J] := J * 10 + I;

  finally

    VarArrayUnlock(A);

  end;

  WriteLn(A[1, 9]);	{ 19 }

  WriteLn(A[3, 4]);	{ 34 }

end;


Application Example
 VCL Reference

Application Example

This code displays the name of your project in an edit box:

procedure TForm1.Button1Click(Sender: TObject);

begin

  Edit1.Text := Application.Title;

end;


Currency and date/time formatting Example
 VCL Reference

Currency and date/time formatting Example

This example uses a label and a button on a form. When the user clicks the button, the current date displays in the caption of the label. Because some of the date variables are assigned new values, the format of the date in the label changes. For example, if the date is 9/15/94, the date displays as 9-15-1994.

procedure TForm1.Button1Click(Sender: TObject);

begin

  DateSeparator := '-';

  ShortDateFormat := 'm/d/yyyy';

  Label1.Caption := DateToStr(Date);

end;


ErrorProc Example
 VCL Reference

ErrorProc Example

procedure MyErrorHandler(ErrorCode: Byte; ErrorAddr: Pointer);

ErrorProc := @MyErrorHandler


AssertErrorProc Example
 VCL Reference

AssertErrorProc Example

The following code is a self-contained unit that you can add to a project that logs failed assertions to the event log rather than raising an exception. If /Debug is passed to the application as a command-line parameter, all failed Assert calls cause a call to OutputDebugString, which sends a messages to the Event Log window if run from Delphi, or does nothing if run outside the IDE (OutputDebugString is a no-op if not run from within a debugger). A nice side benefit is that all the line numbers and unit names can be stripped from the EXE by turning off assertions and rebuilding the project.

Note:	This example was provided by Brian Long.

unit AssertionHandlerU;

interface

implementation

uses SysUtils, Windows;

procedure AssertErrorHandler(const Message, Filename: string;  LineNumber: Integer; ErrorAddr: Pointer);

var

  S: String;

begin

  S := Format('%s (%s, line %d, address $%x)',

    [Message, Filename, LineNumber, Pred(Integer(ErrorAddr))]);

  OutputDebugString(PChar(S));

end;

procedure AssertErrorNoHandler(const Message, Filename: string; LineNumber: Integer; ErrorAddr: Pointer);

begin

end;

initialization

  if FindCmdLineSwitch('Debug', ['/', '-'], True) then

    AssertErrorProc := @AssertErrorHandler

  else

    AssertErrorProc := @AssertErrorNoHandler

end.


VarDispProc Example
 VCL Reference

VarDispProc Example

The following code is a self-contained unit that checks for the /Debug command-line switch. If found, any attempt to execute a Variant is taken as a trace instruction. Any routine name can be given, as long as it has a string parameter. So, for example:

var V: Variant;

...

V.Say('Hello')

produces an Event Log message 'Hello'

Note:	This example was provided by Brian Long.

unit VarDispHandlerU;

interface

implementation

uses Windows, SysUtils;

type

  { Dispatch call descriptor }

  PCallDesc = ^TCallDesc;

  TCallDesc = packed record

    CallType: Byte;

    ArgCount: Byte;

    NamedArgCount: Byte;

    ArgTypes: array[0..255] of Byte;

  end;

procedure VarDispDebugHandler(Result: PVariant; const Instance: Variant; CallDesc: PCallDesc; Params: Pointer); cdecl;

begin

  OutputDebugString(PChar(Params))

end;

procedure VarDispNoDebugHandler(Result: PVariant; const Instance: Variant; CallDesc: PCallDesc; Params: Pointer); cdecl;

begin

end;

initialization

  if FindCmdLineSwitch('Debug', ['/', '-'], True) then

    VarDispProc := @VarDispDebugHandler

  else

    VarDispProc := @VarDispNoDebugHandler;

end.


Screen Example
 VCL Reference

Screen Example

The following code sets the width of a form called Form1 to half the width of the screen:

Form1.Width := Screen.Width div 2;


TDragState Example
 VCL Reference

TDragState Example

This code is an OnDragOver event handler that won't allow a label control to be dropped on a panel control and stops the dragging of the label as soon as the user drags the label onto the panel:

procedure TForm1.Panel1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);

begin

  Accept := False;

  if (Source is TLabel) and (State = dsDragEnter) then

    (Source as TLabel).EndDrag(False);

end;


TVarData Example
 VCL Reference

TVarData Example

This example shows how to use the TVarData type in typecasts of Variant variables to access the internals of a variable.

var

  V: Variant;

begin

  ...

  if TVarData(V).VType = varEmpty then ...;

  ...

  VarClear(V);

  TVarData(V).VType := varInteger;

  TVarData(V).VInteger := 1234567;

  ...

end;


Unassigned Example
 VCL Reference

Unassigned Example

In the code fragment shown below, the statement that assigns Unassigned to the MSWord variable causes the OLE Automation Object that was created to interface with Word to be released.

var

  MSWord: Variant;

begin

  ...

  MSWord := CreateOleObject('Word.Basic');

  ...

  MSWord := Unassigned;

  ...

end;


AllocateHWnd, DeallocateHWnd Example
 VCL Reference

AllocateHWnd, DeallocateHWnd Example

The following code is from the implementation of TTimer. It shows how the timer component’s constructor creates a hidden window to respond to Timer messages and how the destructor frees that window.

{TTimer implements a WndProc method that becomes the window procedure for the hidden window. }

procedure TTimer.WndProc(var Msg: TMessage);

begin

  with Msg do

    if Msg = WM_TIMER then { check for timer messages }

      try

        Timer; { this calls the OnTimer event handler }

      except

        Application.HandleException(Self);

      end

    else

 { Any other messages are passed to DefWindowProc, which tells Windows to handle the message. Note that the first parameter, FWindowHandle, is the handle of the window receiving this message. It is obtained from the call to AllocateHWnd in the constructor. }

      Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam);

end;

{ The TTimer constructor uses AllocateHWnd to create the window and save its handle. }

constructor TTimer.Create(AOwner: TComponent);

begin

  inherited Create(AOwner);

  FEnabled := True;

  FInterval := 1000;

  FWindowHandle := AllocateHWnd(WndProc);

end;

{ The TTimer destructor calls DeallocateHWnd to free the hidden window. }

destructor TTimer.Destroy;

begin

  FEnabled := False;

  UpdateTimer;

  DeallocateHWnd(FWindowHandle);

  inherited Destroy;

end;


Conversion utilities example
 VCL Reference

Conversion utilities example

This example uses a form with a combo box, two list boxes, an edit control, and a button. The user selects a conversion family from the combo box, which causes the list boxes to fill with the conversion types registered with that family. When the user clicks the button, a message box appears showing the value in the edit control converted from the units selected in the first list box to the units selected in the second list box.

The following OnCreate event handler for the form initializes the combo box and list boxes:

procedure TForm1.FormCreate(Sender: TObject);

var

  FamilyList: TConvFamilyArray;

  i: Integer;

begin

  GetConvFamilies(FamilyList);

  for i := 0 to Length(FamilyList) – 1 do

    ComboBox1.Items.Add(ConvFamilyToDescription(FamilyList[i]));

  ComboBox1.ItemIndex := 0; { select the first item }

  ComboBox1Select(ComboBox1); {trigger the event to initialize lists}

end;

The following OnSelect event handler for the combo box initializes the list boxes with the registered conversion types for the selected family:

procedure TForm1.ComboBox1Select(Sender: TObject);

var

  TypeList: TConvTypeArray;

  i: Integer;

  CurFamily:TConvFamily;

  Description: string;

begin

  Description := ComboBox1.Items[ComboBox1.ItemIndex];

  if DescriptionToConvFamily(Description, CurFamily) then

  begin

    GetConvTypes(CurFamily, TypeList);

    for i := 0 to Length(TypeList) -1 do

      ListBox1.Items.Add(ConvTypeToDescription(TypeList[i]));

    ListBox2.Items := ListBox1.Items;

    ListBox1.ItemIndex := 0;

    ListBox2.ItemIndex := 0;

  end;

end;

The following OnClick event handler for the button reads the value entered in the edit box and converts it between the measurement units selected in the list boxes:

procedure TForm1.Button1Click(Sender: TObject);

var

  newVal: Double;

  CurFamily: TConvFamily;

  FromType, ToType: TConvType;

begin

  DescriptionToConvFamily(ComboBox1.Items[ComboBox1.ItemIndex], CurFamily);

  DescriptionToConvType(CurFamily, ListBox1.Items[ListBox1.ItemIndex], FromType);

  DescriptionToConvType(CurFamily, ListBox2.Items[ListBox2.ItemIndex], ToType);

  newVal := Convert(FromType, ToType, StrToFloat(Edit1.Text));

  ShowMessage(Format('%g %s', [newVal, ConvTypeToDescription(ToType)]);

end;


TResourceStream
 VCL Reference

TResourceStream

Hierarchy	Properties	Methods	See also

TResourceStream is a memory stream that provides access to the compiled resources in aWindows application.

Unit

Classes

Description

Use TResourceStream to read the resources of aWindows application. An instance of TResourceStream holds the value of a single resource in a memory buffer where it is accessible to the application.

The global ReadComponentRes function uses TResourceStream to access the compiled resources used by the application.


 VCL Reference

TResourceStream properties

TResourceStream	Alphabetically	Legend

Derived from TCustomMemoryStream

Memory

Derived from TStream

Position

Size


 VCL Reference

TResourceStream properties

TResourceStream	By object	Legend

Memory

Position

Size


 VCL Reference

TResourceStream methods

TResourceStream	Alphabetically	Legend

In TResourceStream

Create

CreateFromID

Destroy

Write

Derived from TCustomMemoryStream

Read

SaveToFile

SaveToStream

Seek

Derived from TStream

CopyFrom

FixupResourceHeader

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TResourceStream methods

TResourceStream	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

CopyFrom

Create

CreateFromID

DefaultHandler

Destroy

Dispatch

FieldAddress

FixupResourceHeader

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Read

ReadBuffer

ReadComponent

ReadComponentRes

ReadResHeader

SafeCallException

SaveToFile

SaveToStream

Seek

Write

WriteBuffer

WriteComponent

WriteComponentRes

WriteDescendent

WriteDescendentRes

WriteResourceHeader


TResourceStream.Create
 VCL Reference

TResourceStream.Create

TResourceStream	See also

Creates an instance of TResourceStream associated with a particular resource name and type.

constructor Create(Instance: THandle; const ResName: string; ResType: PChar);

Description

Call Create to instantiate a TResourceStream, passing in parameters that identify the resource in a specified instance. TResourceStream finds the resource data and loads it into the Memory buffer for the TResourceStream.

The Instance parameter is the Windows instance handle associated with the executable or DLL that contains the resource.

In the first constructor syntax, the ResName is the string associated with the resource in the .RC file that was compiled with the application. If the resource is associated with an integer ID rather than a string, use the string representation of the integer after a pound sign. Thus, for example, a resource with an integer identifier of 128 be identified by a ResName of #128.

Note:	Specifying resources by ID requires less memory than specifying resources by name.

The ResType is a string identifying the type of the resource. Applications can define their own resource types and identify them by name in the .rc file. In addition, Windows provides a number of predefined resource types. To identify a resource that is one of the predefined Windows resource types, set ResType to the appropriate value from the following table.

ResType	Type of resource

RT_ACCELERATOR	Accelerator table

RT_BITMAP	Bitmap resource

RT_DIALOG	Dialog box

RT_FONT	Font resource

RT_FONTDIR	Font directory resource

RT_MENU	Menu resource

RT_RCDATA	Application-defined resource (raw data)

RT_STRING	String-table entry

RT_MESSAGETABLE	Message-table entry

RT_CURSOR	Hardware-dependent cursor resource

RT_GROUP_CURSOR	Hardware-independent cursor resource

RT_ICON	Hardware-dependent icon resource

RT_GROUP_ICON	Hardware-independent icon resource

RT_VERSION	Version resource


TResourceStream.CreateFromID
 VCL Reference

TResourceStream.CreateFromID

TResourceStream	See also

Creates an instance of TResourceStream associated with a particular resource ID and type.

constructor CreateFromID(Instance: THandle; ResID: Integer; ResType: PChar);

Description

Call CreateFromID to instantiate a TResourceStream for a resource in the indicated instance that can be identified by an integer ID. Create finds the resource data and loads it into the Memory buffer for the TResourceStream.

The Instance parameter is the Windows instance handle associated with the executable or DLL that contains the resource.

The ResID is the integer ID associated with the resource in the .rc file that was compiled with the application. If the Resource was identified by a string rather than an ID number, use the Create method instead.

The ResType is a string identifying the type of the resource. Applications can define their own resource types and identify them by name in the .rc file. In addition, Windows provides a number of predefined resource types. To identify a resource that is one of the predefined Windows resource types, set ResType to the appropriate value from the following table.

ResType	Type of resource

RT_ACCELERATOR	Accelerator table

RT_BITMAP	Bitmap resource

RT_DIALOG	Dialog box

RT_FONT	Font resource

RT_FONTDIR	Font directory resource

RT_MENU	Menu resource

RT_RCDATA	Application-defined resource (raw data)

RT_STRING	String-table entry

RT_MESSAGETABLE	Message-table entry

RT_CURSOR	Hardware-dependent cursor resource

RT_GROUP_CURSOR	Hardware-independent cursor resource

RT_ICON	Hardware-dependent icon resource

RT_GROUP_ICON	Hardware-independent icon resource

RT_VERSION	Version resource

Note:	Specifying resources by ID requires less memory than specifying resources by name.


TResourceStream.Destroy
 VCL Reference

TResourceStream.Destroy

TResourceStream	See also

Destroys an instance of TResourceStream.

destructor Destroy; override;

Description

Do not call Destroy directly in an application to destroy an instance of TResourceStream. Instead, call Free. Free verifies that the TResourceStream reference is not nil, and only then calls Destroy.

Destroy frees the memory buffer that stores the resource before calling the inherited destructor.


TResourceStream.Write
 VCL Reference

TResourceStream.Write

TResourceStream	See also

Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application.

function Write(const Buffer; Count: Longint): Longint; override;

Description

Applications should not use a TResourceStream to write the resources of the running application. Write overrides the inherited method to raise an EStreamError exception when an application tries to write to the application’s resources.

As all other data-writing methods of TResourceStream (WriteBuffer, WriteComponent) call Write to do the actual writing, calling any of the data-writing methods of TResourceStream will raise an exception.


Hierarchy

TObject

TStream

TCustomMemoryStream

TResourceStream


CreateAction function
 VCL Reference

CreateAction function

See also

Creates an action of a specified type.

Unit

ActnList

Category

action support

function CreateAction(AOwner: TComponent; ActionClass: TBasicActionClass): TBasicAction;

Description

CreateAction creates an action of type ActionClass. AOwner is typically the form or data module. CreateAction is called automatically when you add an action to an action list or action manager at design time. Calling this function does the same thing as

ActionClass.Create(AOwner);

except that CreateAction uses the Resource parameter of the RegisterActions procedure to initialize the values of the new action object.


EnumRegisteredActions procedure
 VCL Reference

EnumRegisteredActions procedure

See also

Iterates through the list of registered actions, passing them to a user-defined callback.

Unit

ActnList

Category

action support

TEnumActionProc = procedure (const Category: string; ActionClass: TBasicActionClass; Info: Pointer) of object;

procedure EnumRegisteredActions(Proc: TEnumActionProc; Info: Pointer);

Description

EnumRegisteredActions iterates the list of registered actions, passing them to the user-defined callback, Proc.

Category is the category of the action. For TContainedAction descendants, this is the Category property; for ancestor classes you can pass in an empty string. The ActionClass parameter describes the class type of the action object. The Info parameter of the callback is the same as the Info parameter passed to EnumRegisteredActions. It allows the user to pass custom information to the callback.


RegisterActions procedure
 VCL Reference

RegisterActions procedure

See also

Registers action classes so that they appear in the list of predefined actions in the action list editor or customize dialog.

Unit

ActnList

Category

action support

procedure RegisterActions(const CategoryName: string; const AClasses: array of TBasicActionClass; Resource: TComponentClass);

Description

RegisterActions allows a class to appear in the action list editor or customize dialog as a selection when you choose New Action or Add Standard Action. The predefined actions that ship with Delphi are registered automatically. To install your own action classes so that they can be added to an action list or action manager, call RegisterActions to register them.

The CategoryName parameter specifies the value of the actions’ Category property.

The AClasses parameter is an array of custom action class names.

The Resource parameter lets you assign default values to the properties of the actions being registered. Resource is the class of a TDataModule descendant that contains instances of the action classes listed by AClasses, where the properties of those instances are set to the default values. This parameter can be set to nil if there is no need to assign default values.


UnRegisterActions procedure
 VCL Reference

UnRegisterActions procedure

See also

Unregisters a set of actions.

Unit

ActnList

Category

action support

procedure UnRegisterActions(const AClasses: array of TBasicActionClass);

Description

UnregisterActions unregisters a set of actions that were registered with the RegisterActions procedure. The AClasses parameter is a list of registered action classes (descendants of TBasicAction) that are to be unregistered.


Clipboard function
 VCL Reference

Clipboard function

See also

Returns an instance of TClipboard.

Unit

Clipbrd

Category

clipboard routines

function Clipboard: TClipboard;

Description

Applications use a single instance of TClipboard for interacting with the system clipboard. If the application has never used the Windows clipboard, calling Clipboard creates a new instance of TClipboard. If the clipboard has already been used, Clipboard returns the previously created TClipboard object.

To use Clipboard and the TClipboard object, add Clipbrd to the uses clause.


SetClipboard function
 VCL Reference

SetClipboard function

See also

Replaces the single global clipboard instance with another clipboard object.

Unit

Clipbrd

Category

clipboard routines

function SetClipboard(NewClipboard: TClipboard): TClipboard;

Description

Use SetClipboard to replace the global clipboard instance with a customized descendant of TClipboard.  SetClipboard returns the currently instantiated clipboard, if any.  After replacing the global clipboard instance using SetClipboard, an application must free the old clipboard that is returned.


CancelDrag procedure
 VCL Reference

CancelDrag procedure

Cancels a drag-and-drop or drag-and-dock operation that is in progress.

Unit

Controls

Category

drag operation support

procedure CancelDrag;

Description

Call CancelDrag to terminate the current drag-and-drop or drag-and-dock operation without dropping or docking the dragged object.


CursorToIdent function
 VCL Reference

CursorToIdent function

See also

Returns the name of the predefined constant that corresponds to a cursor.

Unit

Controls

Category

cursor management routines

function CursorToIdent(Cursor: Longint; var Ident: string): Boolean;

Description

Use CursorToIdent to convert the cursor used by a control or one of the cursors made available by the global screen variable into the name of the corresponding constant.  Pass the cursor value as the Cursor parameter.  CursorToIdent returns the constant name as the Ident parameter.  If the cursor does not have an associated constant (for example, a custom cursor), CursorToIdent returns False.

To obtain a string representation of the cursor, even if there is no built-in cursor constant for it, use the CursorToString function.

CursorToIdent can be used to identify the current cursor in a list of possible cursor constants that is built using GetCursorValues.


CursorToString function
 VCL Reference

CursorToString function

See also

Returns the AnsiString representation of a cursor.

Unit

Controls

Category

cursor management routines

function CursorToString(Cursor: TCursor): string;

Description

Use CursorToString to convert the cursor used by a control or one of the cursors made available by the global screen variable into a string that can be displayed to the user.  Pass the cursor value as the Cursor parameter.  If there is a predefined constant for the cursor, CursorToString returns the constant name.  If the cursor does not have an associated constant (for example, a custom cursor), CursorToString returns a string representation of the cursor’s numeric value.

To obtain a string representation of the cursor only if there is a built-in cursor constant, use CursorToIdent.


DefaultDockTreeClass variable
 VCL Reference

DefaultDockTreeClass variable

See also

Returns the default implementation class for the DockManager property of windowed controls.

Unit

Controls

Category

drag operation support

var

  DefaultDockTreeClass: TDockTreeClass = TDockTree;

Description

When you set the UseDockManager property of a windowed control to True, it uses the value of its DockManager property to manage docking operations. If the application does not explicitly assign a value to DockManager, the windowed control generates a dock manager by instantiating the class specified by DefaultDockTreeClass.

The Controls unit sets DefaultDockTreeClass to TDockTree. Change this value to provide a different default implementation of the dock manager that windowed controls use when the DockManager property is not explicitly assigned. The class specified by DefaultDockTreeClass must be a descendant of TDockTree. (That is, TDockTreeClass is simply class of TDockTree.)


FindControl function
 VCL Reference

FindControl function

See also

Returns the windowed control whose window is identified by the specified window handle.

Unit

Controls

Category

Windows controls utilitiesWindows controls utilities

function FindControl(Handle: HWnd): TWinControl;

Description

Call FindControl to access the windowed control whose window is identified by the Handle parameter. If Handle is not the handle of the window of a windowed control, FindControl returns nil.


FindDragTarget function
 VCL Reference

FindDragTarget function

See also

Returns the control at a specified screen coordinate.

Unit

Controls

Category

drag operation support

function FindDragTarget(const Pos: TPoint; AllowDisabled: Boolean): TControl;

Description

Call FindDragTarget to determine the potential drag-and-drop or drag-and-dock target currently under the mouse. FindDragTarget returns the control at the position specified by the Pos parameter. If there is not control at the specified position, FindDragTarget returns nil. The AllowDisabled parameter determines whether the search includes disabled controls.

If FindDragTarget returns a control, this does not mean that the control will necessarily accept the dragged object. The control will only accept the dragged object if it has an OnDragOver or OnDockOver event handler that accepts the object or if its DockSite property is True.


FindVCLWindow function
 VCL Reference

FindVCLWindow function

See also

Returns the windowed control, if any, at the specified location.

Unit

Controls

Category

mouse handling utilities

function FindVCLWindow(const Pos: TPoint): TWinControl;

Description

Call FindVCLWindow to locate the windowed control under a certain point.  For example, use FindVCLWindow to identify the windowed control that is under the mouse from another control that has captured the mouse.  The Pos parameter specifies the location that must be over the returned windowed control.  If there is no windowed control under the Pos parameter, FindVCLWindow returns nil.


GetCaptureControl function
 VCL Reference

GetCaptureControl function

See also

Returns the control, if any, that currently receives all mouse messages.

Unit

Controls

Category

mouse handling utilities

function GetCaptureControl: TControl;

Description

Call GetCaptureControl to determine which control is currently processing mouse messages.  When a control has captured the mouse, it receives all mouse messages, even if the mouse is not over the control.


GetCursorValues procedure
 VCL Reference

GetCursorValues procedure

See also

Passes the name of every predefined cursor constant to a callback.

Unit

Controls

Category

cursor management routines

procedure GetCursorValues(Proc: TGetStrProc);

Description

Call GetCursorValues to execute a callback for every built-in cursor constant in the VCL.  The Proc parameter is the callback function that is called for every cursor constant name.

Note:	To convert the strings that are passed to the callback into actual cursors, use IdentToCursor.  To convert a cursor into a constant name that can be compared with the string passed to the callback, use CursorToIdent.


GetLongHint function
 VCL Reference

GetLongHint function

See also	Example

Returns the second part of a two-part hint string.

Unit

Controls

Category

Help Hint routines

function GetLongHint(const Hint: string): string;

Description

Call GetLongHint to obtain the long version of the hint specified as the value of a Hint property. The second part of the hint is the text following the | character. If the Hint string value is not separated into two parts, GetLongHint returns the entire string.


GetShortHint function
 VCL Reference

 AGetShortHint function

See also	Example

Returns the first part of a two-part hint string.

Unit

Controls

Category

Help Hint routines

function GetShortHint(const Hint: string): string;

Description

Call GetShortHint to obtain the short version of the hint specified as the value of a Hint property. The first part of the hint is the text preceding the | character. If the Hint string value is not separated into two parts, GetShortHint returns the entire string.


IdentToCursor function
 VCL Reference

IdentToCursor function

See also

Translates a predefined cursor constant into a cursor.

Unit

Controls

Category

cursor management routines

function IdentToCursor(const Ident: string; var Cursor: Longint): Boolean;

Description

Call IdentToCursor to reverse the translation performed by the CursorToIdent function. This method is useful for converting the strings generated by GetCursorValues into useable cursors.  IdentToCursor returns True if the Ident parameter is successfully converted into a cursor.  IdentToCursor returns False if the Ident parameter is not the name of one of the built-in cursor constants.

Note:	If the string identifier for a cursor may represent either a numeric value or a cursor constant, use the StringToCursor function instead.


IsAbortResult function
 VCL Reference

IsAbortResult function

See also

Checks the return value from a modal form dialog and indicates whether the user selected Abort or Cancel.

Unit

Controls

Category

dialog and message routines

function IsAbortResult(const AModalResult: TModalResult): Boolean;

Description

Call IsAbortResult to check whether the user clicked “Abort” or “Cancel” to close a modal form. Pass the return value from the form’s ShowModal method as the AModalResult argument. IsAbortResultreturns True if AModalResult is mrAbort or mrCancel, False otherwise.


IsAnAllResult function
 VCL Reference

IsAnAllResult function

See also

Checks the return value from a modal form dialog and indicates whether the user selected All, Yes to All, or No to All.

Unit

Controls

Category

dialog and message routines

function IsAnAllResult(const AModalResult: TModalResult): Boolean;

Description

Call IsAnAllResult to check whether the user closed a modal form by indicating a response that applies to “all”. Pass the return value from the form’s ShowModal method as the AModalResult argument. IsAnAllResultreturns True if AModalResult is mrAll, mrNoToAll, or mrYesToAll, False otherwise.

Note:	If IsAnAllResult returnsTrue, you can convert the result to a simple Ok, No, or Yes result by calling StripAllFromResult.


IsNegativeResult function
 VCL Reference

IsNegativeResult function

See also

Checks the return value from a modal form dialog and indicates whether the user selected No or No to All.

Unit

Controls

Category

dialog and message routines

function IsNegativeResult(const AModalResult: TModalResult): Boolean;

Description

Call IsNegativeResult to check whether the user closed a modal form by indicating a “No” response. Pass the return value from the form’s ShowModal method as the AModalResult argument. IsNegativeResultreturns True if AModalResult is mrNo or mrNoToAll, False otherwise.


IsPositiveResult function
 VCL Reference

IsPositiveResult function

See also

Checks the return value from a modal form dialog and indicates whether the user selected Ok, Yes, Yes to All, or All.

Unit

Controls

Category

dialog and message routines

function IsPositiveResult(const AModalResult: TModalResult): Boolean;

Description

Call IsPositiveResult to check whether the user closed a modal form by indicating a “Yes” or “Ok” response. Pass the return value from the form’s ShowModal method as the AModalResult argument. IsPositiveResultreturns True if AModalResult is mrYes, mrOk, mrYesToAll or mrAll, False otherwise.


IsDragObject function
 VCL Reference

IsDragObject function

See also

Indicates whether a specified object is a TDragObject descendant.

Unit

Controls

Category

drag operation support

function IsDragObject(Sender: TObject): Boolean;

Description

Use IsDragObject to determine whether the object being dragged in a drag-and-drop or drag-and-dock operation is a specialized TDragObject that represents the dragged control’s data rather then the control itself.  Use IsDragObject on the Source parameter in an OnDragOver or OnDockOver event handler to determine the type of object being dragged and whether it should be accepted.  Use IsDragObject on the Source parameter of an OnDragDrop or OnDockDrop event handler to determine how to interpret the dragged object’s data.


Mouse variable
 VCL Reference

Mouse variable

Contains information about the system’s mouse.

Unit

Controls

Category

mouse handling utilities

var Mouse: TMouse;

Description

Use Mouse to get information about the system’s mouse, including which window (if any) has captured the mouse, the position of the mouse, and mouse settings from the Control panel. Mouse can also be used to specify global aspects of how your application responds to mouse messages, such as how much the user must move the mouse to start a drag operation.


MoveWindowOrg procedure
 VCL Reference

MoveWindowOrg procedure

See also

Changes the location of the point (0,0) within a device context.

Unit

Controls

Category

graphics utilities

procedure MoveWindowOrg(DC: HDC; DX, DY: Integer);

Description

Call MoveWindowOrg to change the location of where items are drawn on the canvas of an object.  When drawing to a canvas, objects specify the location of the image they draw as a set of coordinates, which are offsets from the upper left corner.  MoveWindowOrg allows the same drawing code to draw its image in a different location.  The DC parameter is a handle to the device context of the canvas, printer, or window where the image is to be drawn.  The DX and DY parameters specify the number of pixels to move the location of the (0,0) point on that drawing surface.

MoveWindowOrg is especially useful when playing metafiles, which draw to a particular position on a canvas, because it provides the ability to play the metafile to a different location on the canvas.


NewStyleControls variable
 VCL Reference

NewStyleControls variable

Determines whether controls are drawn using the Windows 3.x “look”.

Unit

Controls

Category

Windows controls utilities

var NewStyleControls: Boolean;

Description

NewStyleControls determines whether controls in the application are drawn using the effects that were introduced with Windows 95. When NewStyleControls is False, controls have a flatter look.

By default, NewStyleControls is True unless the application is running on a Windows 3.x system with Win32S. To change this value to False, set the value of NewStyleControls in the project file, before the call to Application.Run.


SendAppMessage function
 VCL Reference

SendAppMessage function

See also

Sends a Windows message to the application.

Unit

Controls

Category

Windows controls utilities

function SendAppMessage(Msg: Cardinal; WParam, LParam: Longint): Longint;

Description

Call SendAppMessage to send a Windows message to the global application object.

Msg represents the Windows Message code.

WParam represents the WParam of the message. Its interpretation depends on the value of Msg.

LParam represents the LParam of the message. Its interpretation depends on the value of Msg.

SendAppMessage returns the result provided by the application’s window procedure. If the application did not handle the message, SendAppMessage returns 0.


SetCaptureControl procedure
 VCL Reference

SetCaptureControl procedure

See also

Causes the specified control to receive all mouse messages.

Unit

Controls

Category

mouse handling utilities

procedure SetCaptureControl(Control: TControl);

Description

Call SetCaptureControl to allow a control to capture the mouse.  When the control has the mouse captured, it receives all mouse messages until another control captures the mouse.

Note:	Many controls capture the mouse in response to mouse events.  Application code should avoid explicitly capturing the mouse.


StringToCursor function
 VCL Reference

StringToCursor function

See also

Returns a TCursor value given its string representation.

Unit

Controls

Category

cursor management routines

function StringToCursor(const S: string): TCursor;

Description

Call StringToCursor to reverse the translation performed by CursorToString. This method is useful for converting the strings entered by the user into useable TCursor values.

The S parameter can be either the name of a built-in cursor constant such as 'crHelp', or the string representation of a valid TCursor value such as '10'. StringToCursor returns the TCursor value that corresponds to the S parameter.

Note:	The value returned by StringToCursor is not guaranteed to be a valid cursor.  If the Cursors property of the global Screen variable does not include a corresponding entry, the value returned by StringToCursor can not be used to set the Cursor property of a control.


StripAllFromResult function
 VCL Reference

StripAllFromResult function

See also

Converts a TModalResult value from a constant that refers to “all” to the corresponding simple constant.

Unit

Controls

Category

dialog and message routines

function StripAllFromResult(const AModalResult: TModalResult): TModalResult;

Description

Call StripAllFromResult to remove the “all” interpretation from a TModalResult value. For example, after checking the result from a form’s ShowModal method with the IsAnAllResult function, you can call StripAllFromResult to allow common code to process results that apply to a single selected item or all items.

StripAllFromResult makes the following conversions:

AModalResult	Return value

mrAll	mrOk

mrNoToAll	mrNo

mrYesToAll	mrYes


 VCL Reference


CompatibleConversionType function
 VCL Reference

CompatibleConversionType function

See also

Indicates whether a specified conversion type is registered with a specified conversion family.

Unit

ConvUtils

Category

measurement conversion routines

function CompatibleConversionType(const AType: TConvType; const AFamily: TConvFamily): Boolean;

Description

CompatibleConversionType returns True if AType represents a member of the family specified by AFamily, False otherwise.

When a conversion type is a member of a conversion family, the Convert function can convert between that type and any other type in the family.


CompatibleConversionTypes function
 VCL Reference

CompatibleConversionTypes function

See also

Indicates whether the Convert function can convert between two specified conversion types.

Unit

ConvUtils

Category

measurement conversion routines

function CompatibleConversionTypes(const AFrom, ATo: TConvType): Boolean;

Description

CompatibleConversionTypes returns True if AFrom and ATo are in the same conversion family, False otherwise.

When two conversion types are in the same family, the Convert function can convert between measurements that use them.


Convert function
 VCL Reference

Convert function

See also	Example

Converts a measurement from one set of units to another.

Unit

ConvUtils

Category

measurement conversion routines

function Convert(const AValue: Double; const AFrom, ATo: TConvType): Double; overload;

function Convert(const AValue: Double; const AFrom1, AFrom2, ATo1, ATo2: TConvType): Double; overload;

Description

Call Convert to convert the value AValue from one set of measurement units to another.

Using the first syntax, the AFrom parameter specifies the current units of the measurement AValue. Convert returns the corresponding measurement in the units specified by ATo. For example, the following line converts a temperature measurement from degrees Fahrenheit to degrees Kelvin:

TempInKelvin := Convert(StrToFloat(Edit1.Text), tuFahrenheit, tuKelvin);

Using the second syntax, the AFrom1 parameter and AFrom2 parameter specify the current units of AValue, where the units for AValue are AFrom1 per AFrom2.  Convert returns the corresponding measurement in the units ATo1 per ATo2. For example, the following call converts miles per gallon to kilometers per liter:

nKPL := Convert(StrToFloat(Edit1.Text), duMiles, vuGallons, duKilometers, vuLiter);

The units specified by AFrom and ATo, AFrom1 and ATo1, and AFrom2 and ATo2 must be in the same conversion family (they must measure the same thing). You can check whether two TConvType values are in the same conversion family by calling CompatibleConversionTypes. If the units are not compatible, Convert raises an EConversionError exception.

Note:	The StdConvs unit defines several families of TConvType values. See conversion family variables for a list of the predefined families of measurement units and the measurement units in each family. In addition, you can register your own conversion families and units using the RegisterConversionType and RegisterConversionFamily functions.

Note:	Convert performs its conversion by converting AValue from the AFrom units to the base units of its conversion family, and then from the base units to the ATo units. If the AFrom units and the ATo units differ greatly from the base units of the conversion family, this can lead to a loss of precision. You can ameliorate this loss of precision by registering your own conversion families that are narrower subsets of a broad conversion family.


ConvertFrom function
 VCL Reference

ConvertFrom function

See also

Converts a measurement from the specified units to the base units of its conversion family.

Unit

ConvUtils

Category

measurement conversion routines

function ConvertFrom(const AFrom: TConvType; const AValue: Double): Double;

Description

Call ConvertFrom to convert the value AValue from the units specified by AFrom to the base units of the conversion family for AFrom.

If AFrom is not a registered conversion type, ConvertFrom raises an EConversionError exception.


ConvertTo function
 VCL Reference

ConvertTo function

See also

Converts a measurement from the base units of a conversion family into a specified conversion type.

Unit

ConvUtils

Category

measurement conversion routines

function ConvertTo(const AValue: Double; const ATo: TConvType): Double;

Description

Call ConvertTo to convert the value AValue from the base units of the conversion family for ATo into the conversion units specified by ATo.

If ATo is not a registered conversion type, ConvertTo raises an EConversionError exception.


ConvFamilyToDescription function
 VCL Reference

ConvFamilyToDescription function

See also	Example

Returns the string description of what a conversion family measures.

Unit

ConvUtils

Category

measurement conversion routines

function ConvFamilyToDescription(const AFamily: TConvFamily: string;

Description

ConvFamilyToDescription returns the string supplied when the conversion family was registered. Typically, this string is the name of whatever it is that the conversion family measures. For example, ConvFamilyToDescription returns 'Volume' when passed an argument of cbVolume.

AFamily is the TConvFamily value that represents the conversion family. This is the value that is returned by RegisterConversionFamily when the family is registered.


ConvTypeToDescription function
 VCL Reference

ConvTypeToDescription function

See also	Example

Returns the string description of a conversion type (measurement unit).

Unit

ConvUtils

Category

measurement conversion routines

function ConvTypeToDescription(const AType: TConvType: string;

Description

ConvTypeToDescription returns the string supplied when the conversion type specified by AType was registered. Typically, this string is the (plural) name of a unit of measurement. For example, ConvTypeToDescription returns 'Millennia' when passed an argument of tuMillennia.


ConvTypeToFamily function
 VCL Reference

ConvTypeToFamily function

See also

Returns the identifier for the conversion family with which a conversion type or pair of types is registered.

Unit

ConvUtils

Category

measurement conversion routines

function ConvTypeToFamily(const AType: TConvType): TConvFamily; overload;

function ConvTypeToFamily(const AFrom, ATo: TConvType): TConvFamily; overload;

Description

ConvTypeToFamily returns the conversion family identifier for the family of the specified conversion type or types. Conversion types are associated with a conversion family by the RegisterConversionType function when the conversion type is registered.

AType is the identifier for a registered conversion type (unit of measurement).

AFrom and ATo are two registered conversion types that are assumed to be in the same family.

If AType is not registered, or if AFrom and ATo are not registered with the same conversion family, ConvTypeToFamily returns CIllegalConvFamily (0).


ConvUnitAdd function
 VCL Reference

ConvUnitAdd function

See also

Adds two measurements and returns the result using a specified unit of measurement.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitAdd(const AValue1: Double; const AType1: TConvType; const AValue2: Double; const AType2, AResultType: TConvType): Double;

Description

Call ConvUnitAdd two add two measurements and obtain the result in a specified conversion type.

AValue1 and AValue2 are the two measurements to be added.

AType1 is the unit of measurement for AValue1.

AType2 is the unit of measurement for AValue2.

AResultType is the unit of measurement for the resulting value.


ConvUnitCompareValue function
 VCL Reference

ConvUnitCompareValue function

See also

Indicates the relationship between two measurements.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitCompareValue(const AValue1: Double; const AType1: TConvType; const AValue2: Double; const AType2: TConvType): TValueRelationship;

Description

Call ConvUnitCompareValue to compare the two measurements. The two measurements must measure the same thing (use the same conversion family), but do not need to use the same units of measurement.

AValue 1 and AValue2 are the two measurements to compare.

AType1 is the unit of measurement for AValue1.

AType2 is the unit of measurement for AValue2.

ConvUnitCompareValue returns

LessThanValue if AValue1 represents a smaller value than AValue2.

EqualsValue if AValue1 is equivalent to AValue2.

GreaterThanValue if AValue1 represents a larger value than AValue2.


ConvUnitDec function
 VCL Reference

ConvUnitDec function

See also

Decrements a specified measurement by a specified amount.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitDec(const AValue: Double; const AType: TConvType; const AAmount: Double; const AAmountType: TConvType): Double; overload;

function ConvUnitDec(const AValue: Double; const AType, AAmountType: TConvType): Double; overload;

Description

Call ConvUnitDec two decrement a measurement by a specified amount. The result is returned in the same measurement units as the original amount, although the amount by which the measurement is decremented can be expressed using a different unit of measurement in the same family.

AValue is the original measurement.

AType is the unit of measurement of the starting amount and the return value.

AAmount is the amount by which to decrease AValue. If this value is omitted, it is assumed to be one.

AAmountType is the unit of measurement for AAmount.


ConvUnitDiff function
 VCL Reference

ConvUnitDiff function

See also

Subtracts one measurement from another and returns the result using a specified unit of measurement.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitDiff(const AValue1: Double; const AType1: TConvType; const AValue2: Double; const AType2, AResultType: TConvType): Double;

Description

Call ConvUnitDiff to find the difference between two measurements, with the result expressed in a specified conversion type.

AValue1 is the starting value.

AType1 is the unit of measurement for AValue1.

AValue2 is the value to be subtracted from AValue1.

AType2 is the unit of measurement for AValue2.

AResultType is the unit of measurement for the resulting value.


ConvUnitInc function
 VCL Reference

ConvUnitInc function

See also

Increments a specified measurement by a specified amount.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitInc(const AValue: Double; const AType: TConvType; const AAmount: Double, const AAmountType: TConvType): Double; overload;

function ConvUnitInc(const AValue: Double; const AType, AAmountType: TConvType): Double; overload;

Description

Call ConvUnitInc to increment a measurement by a specified amount. The result is returned in the same measurement units as the original amount, although the amount by which the measurement is incremented can be expressed using a different unit of measurement in the same family.

AValue is the original measurement.

AType is the unit of measurement of the starting amount and the return value.

AAmount is the amount by which to increase AValue. If this parameter is omitted, it is assumed to be one.

AAmountType is the unit of measurement for AAmount.


ConvUnitSameValue function
 VCL Reference

ConvUnitSameValue function

See also

Indicates whether two measurements are equivalent.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitSameValue(const AValue1: Double; const AType1: TConvType; const AValue2: Double; const AType2: TConvType): Boolean;

Description

Call ConvUnitSameValue to compare determine whether two measurements are equivalent. The two values can use different units of measurement, but the two units of measurement must be in the same conversion family.

AValue 1 and AValue2 are the two measurements to compare.

AType1 is the unit of measurement for AValue1.

AType2 is the unit of measurement for AValue2.

ConvUnitSameValue returns True if the two measurements are equivalent, False otherwise.


ConvUnitToStr function
 VCL Reference

ConvUnitToStr function

See also

Formats a measurement and its conversion unit into a human-readable string.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitToStr(const AValue: Double; const AType: TConvType ): string;

Description

Call ConvUnitToStr to obtain a string representation of a measurement.

AValue is the number of units.

AType is the conversion type (unit of measument).

ConvUnitToString formats the result as the string representation of AValue followed by the description that was provided when AType was registered. Thus, for example,

ConvUnitToStr(3.5, duMiles)

returns the string

‘3.5 Miles‘

Warning:	The resulting string may seem awkward, depending on the description provided when registering the conversion type. For example, ConvUnitToStr(53, duFahrenheit) produces the string ’53 Fahrenheit’, not ’53 degrees Fahrenheit’.


ConvUnitWithinNext function
 VCL Reference

ConvUnitWithinNext function

See also

Indicates whether a specified measurement exceeds another measurement by at most a specified amount.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitWithinNext(const AValue, ATest: Double; const AType: TConvType; const AAmount: Double; const AAmountType: TConvType): Boolean;

Description

Call ConvUnitWithinNext to determine whether the value specified by ATest exceeds the value specified by AValue by at most AAmount.

AValue is the base value against which to check ATest.

ATest is a measurement to test against AValue.

AType is the unit of measurement for both AValue and ATest.

AAmount is the amount by which ATest can exceed AValue.

AAmountType is the unit of measurement for AAmount.

ConvUnitWithinNext returns True if ATest equals AValue or exceeds it by at most AAmount.


ConvUnitWithinPrevious function
 VCL Reference

ConvUnitWithinPrevious function

See also

Indicates whether a specified measurement is at most a specified amount less than another measurement.

Unit

ConvUtils

Category

measurement conversion routines

function ConvUnitWithinPrevious(const AValue, ATest: Double; const AType: TConvType; const AAmount: Double; const AAmountType: TConvType): Boolean;

Description

Call ConvUnitWithinPrevious to determine whether the value specified by ATest is less than the value specified by AValue by at most AAmount.

AValue is the base value against which to check ATest.

ATest is a measurement to test against AValue.

AType is the unit of measurement for both AValue and ATest.

AAmount is the amount by which ATest can be less than AValue.

AAmountType is the unit of measurement for AAmount.

ConvUnitWithinPrevious returns True if ATest equals AValue or is at most AAmount less than AValue.


DescriptionToConvFamily function
 VCL Reference

DescriptionToConvFamily function

See also	Example

Retrieves the identifier for a conversion family given its name.

Unit

ConvUtils

Category

measurement conversion routines

function DescriptionToConvFamily(const ADescription: string; out AFamily: TConvFamily): Boolean;

Description

DescriptionToConvFamily retrieves the conversion family identifier for the family with the name specified by ADescription.

ADescription is the name supplied to the RegisterConversionFamily method when the family was registered. Typically, it identifies the type of thing measured by conversion types in the family. For example, the description for the cbTemperature family is ‘Temperature’.

AFamily returns the identifier for the specified conversion family when DescriptionToConvFamilyt returns True.

DescriptionToConvFamily returns True if ADescription identifies a registered conversion family, False otherwise.


DescriptionToConvType function
 VCL Reference

DescriptionToConvType function

See also	Example

Retrieves the identifier for a conversion type given its name and family.

Unit

ConvUtils

Category

measurement conversion routines

function DescriptionToConvType(const AFamily, TConvFamily; const ADescription: string; out AType: TConvType): Boolean; overload;

function DescriptionToConvType(const ADescription: string; out AType: TConvType): Boolean; overload;

Description

DescriptionToConvType returns the conversion type identifier for the conversion type (measurement unit) that was registered under the name specified by ADescription.

AFamily is the identifier for the conversion family supplied to the RegisterConversionType function when the conversion type was registered.

ADescription is the name supplied to the RegisterConversionType function when the conversion type was registered. Typically, it is the plural form of the measurement unit name. For example, the description for the auAcres conversion type is ‘Acres’.

AType returns the identifier for the conversion type.

DescriptionToConvType returns True if it can successfully locate and return the specified conversion type, False otherwise.


GetConvFamilies procedure
 VCL Reference

GetConvFamilies procedure

See also	Example

Returns a list of all registered conversion families.

Unit

ConvUtils

Category

measurement conversion routines

procedure GetConvFamilies(out AFamilies: TConvFamilyArray);

Description

GetConvFamilies returns a dynamic array of identifiers for all currently registered conversion families. Every entry in the array represents a conversion family registered by the RegisterConversionFamily function.


GetConvTypes procedure
 VCL Reference

GetConvTypes procedure

See also	Example

Returns a list of all registered conversion types in a specified conversion family.

Unit

ConvUtils

Category

measurement conversion routines

procedure GetConvTypes(const AFamily: TConvFamily; out ATypes: TConvTypeArray);

Description

GetConvTypes fills a dynamic array with all the conversion types (TConvType values) that have been registered for a specified conversion family. Any measurement based on one of these conversion types can be converted into a measurement based on any other in the family.

AFamily is the identifier for the conversion family.

ATypes is the array to fill with conversion type identifiers.


RaiseConversionError procedure
 VCL Reference

RaiseConversionError procedure

See also

Raises an EConversionError exception.

Unit

ConvUtils

Category

measurement conversion routines

procedure RaiseConversionError(const AText: string; const AArgs: array of const); overload;

procedure RaiseConversionError(const AText: string); overload;

Description

Call RaiseConversionError to raise an EConversionError exception. Most applications do not need to call this method because most conversion errors are raised by the Convert function.

However, you might want to raise an EConversionError exception from a method you supply to the RegisterConversionType function for converting between a new conversion type and the base units of a conversion family. For example, if a unit of measurement does not permit negative values, you could check for negative values and call RaiseConversionError if an attempt is made to use one in a conversion.

AText is the error message for the exception that is raised. It can contain standard string formatting specifiers.

AArgs is a list of arguments that are supplied for the format specifiers in AText.


RegisterConversionFamily function
 VCL Reference

RegisterConversionFamily function

See also

Registers a new conversion family and returns its identifier.

Unit

ConvUtils

Category

measurement conversion routines

function RegisterConversionFamily(const ADescription: string): TConvFamily;

Description

Call RegisterConversionFamily to create a new conversion family. A conversion family represents a type of thing that can be measured using different measurement units. For example, the StdConvs unit defines conversion families for distance, volume, area, temperature, and so on.

Once you have registered a new conversion family, you can register units of measurement that belong to the family using the RegisterConversionType function. RegisterConversionType takes the conversion family identifier returned by RegisterConversionFamily as an argument. The global Convert function can then convert between any two conversion types (units of measurement) that have been registered with the same conversion family.

ADescription is a string that names the conversion family. Typically, this names the thing measured, such as ‘Distance’, ‘Volume’, ‘Area’, ‘Temperature’, and so on.

RegisterConversionFamily returns an identifier for the new conversion family.


RegisterConversionType function
 VCL Reference

RegisterConversionType function

See also

Registers a new conversion type and returns its identifier.

Unit

ConvUtils

Category

measurement conversion routines

function RegisterConversionType(const AFamily: TConvFamily; const ADescription: string, const AFactor: Double): TConvType; overload;

function RegisterConversionType(const AFamily: TConvFamily; const ADescription: string, const AToCommonProc, AFromCommonProc: TConversionProc): TConvType; overload;

function RegisterConversionType(AConvTypeInfo: TConvTypeInfo; out AType: TConvType): Boolean; overload;

Description

Call RegisterConversionType to add a new conversion type (unit of measurement) to a registered conversion family. The global Convert function can convert between any two conversion types that have been registered with the same conversion family.

AFamily is the identifier for the conversion family to which the new conversion type belongs. This can be one of the pre-defined conversion families in the StdConvs unit, or the value returned from a call to RegisterConversionFamily.

ADescription is a string that names the conversion type. Typically, this is the plural form of the measurement unit name. For example, the description for the duMeters conversion type is ‘Meters’.

AFactor is the factor by which a measurement using the new conversion type must be multiplied to convert to the base units of the conversion family. Thus, for example, the factor for duKilometers is 1000 because the base unit for the distance family is meters.

AToCommonProc and AFromCommonProc are functions that convert between the new conversion type and the base units for the conversion family. They are used when conversions between the new conversion type and the base units can’t be accomplished by a simple multiplication. For example, temperature measurements use different values for the 0 point, and so require conversion functions rather than a factor. AToCommonProc converts measurements in the new conversion type to the base units for the family, while AFromCommonProc converts measurements in the base units for the family to the new conversion type.

AConvTypeInfo is an instance of a TConvTypeInfo descendant that represents the new conversion type. On entry, its ConvFamily and Description properties must be set to the conversion family that contains the new conversion type and the string that names the new type (analogous to the AFamily and ADescription parameters). In addition, its ToCommon and FromCommon methods convert between the new conversion type and the base units of the conversion family (analogous to the AToCommonProc and AFromCommonProc parameters). RegisterConversionType sets its ConvType property, which it also returns as the AType parameter. When using this syntax, RegisterConversionType returns True if the new type is successfully registered, False if the new type could not be registered (either because the family was not registered or because the description was already registered).


StrToConvUnit function
 VCL Reference

StrToConvUnit function

See also

Parses a string into a value and conversion type.

Unit

ConvUtils

Category

measurement conversion routines

function StrToConvUnit(AText: string; out AType: TConvType): Double;

Description

Call StrToConvUnit to reverse the conversion performed by the ConvUnitToStr function.

AText is the string to parse. It should represent a numeric value followed by the name of a conversion type. For example, ‘2.5 hours’.

AType returns the identifier for the conversion type (unit of measurement).

StrToConvUnit returns the number of units (the numeric portion of the string).

If AText can’t be parsed into a value and conversion type, StrToConvUnit raises an EConversionError exception.


TryConvTypeToFamily function
 VCL Reference

TryConvTypeToFamily function

See also

Retrieves the identifier for the conversion family with which a conversion type or pair of types is registered.

Unit

ConvUtils

Category

measurement conversion routines

function TryConvTypeToFamily(const AType: TConvType); out AFamily: TConvFamily) : Boolean; overload;

function TryConvTypeToFamily(const AFrom, ATo: TConvType; out AFamily: TConvFamily) : Boolean; overload;

Description

TryConvTypeToFamily looks up the conversion family identifier for the family of the specified conversion type or types. Conversion types are associated with a conversion family by the RegisterConversionType function when the conversion type is registered.

AType is the identifier for a registered conversion type (unit of measurement).

AFrom and ATo are two registered conversion types that are assumed to be in the same family.

AFamily returns the identifier of the conversion family.

TryConvTypeToFamily returns True if the family can be obtained (if AType is a registered conversion type or if AFrom and ATo are both registered in the same family), False otherwise.


TryStrToConvUnit function
 VCL Reference

TryStrToConvUnit function

See also

Parses a string into a value and conversion type.

Unit

ConvUtils

Category

measurement conversion routines

function TryStrToConvUnit(AText: string; out AValue: Double; out AType: TConvType): Boolean;

Description

Call TryStrToConvUnit to reverse the conversion performed by the ConvUnitToStr function.

AText is the string to parse. It should represent a numeric value followed by the name of a conversion type. For example, ‘2.5 hours’.

AValue returns the number of units (the numeric value in the string).

AType returns the identifier for the conversion type (unit of measurement).

TryStrToConvUnit returns True if AText can be converted, False otherwise.


UnregisterConversionFamily procedure
 VCL Reference

UnregisterConversionFamily procedure

See also

Unregisters a conversion family previously registered using RegisterConversionFamily.

Unit

ConvUtils

Category

measurement conversion routines

procedure UnregisterConversionFamily(const AFamily: TConvFamily);

Description

Call UnregisterConversionFamily when a conversion family becomes unavailable. Typically, this function is called from the finalization section of a unit that implements the conversion family. UnregisterConversionFamily unregisters all of the conversion types registered with the family and then unregisters the family itself.

AFamily is the conversion family identifier for the family to unregister.

After a conversion family is unregistered, it is no longer listed by the GetConvFamilies procedure. Calling the Convert function with conversion types from an unregistered family results in an EConversionError exception.


UnregisterConversionType procedure
 VCL Reference

UnregisterConversionType procedure

See also

Unregisters a conversion type previously registered using RegisterConversionType.

Unit

ConvUtils

Category

measurement conversion routines

procedure UnregisterConversionType(const AType: TConvType);

Description

Call UnregisterConversionType when a conversion type becomes unavailable. Typically, this function is called from the finalization section of a unit that implements the conversion type.

AType is the conversion type identifier for the type to unregister.

After a conversion type is unregistered, it is no longer listed by the GetConvTypes procedure. Calling the Convert function with an unregistered conversion type results in an EConversionError exception.


Application variable (for control panel applets)
 VCL Reference

Application variable (for control panel applets)

See also

Represents the application for a control panel applet project.

Unit

CtlPanel

Category

Control panel applications

var Application: TAppletApplication;

Description

When a new control panel project is created, Delphi constructs an application object and assigns it to Application. If the project represents a control panel applet, Application is initialized to a TAppletApplication object.


CompareDate function
 VCL Reference

CompareDate function

See also

Indicates the relationship between the date portions of two TDateTime values.

Unit

DateUtils

Category

date/time routines

function CompareDate(const A, B: TDateTime): TValueRelationship;

Description

Call CompareDate to compare the two TDateTime values specified by A and B. CompareDate returns

LessThanValue if A occurs on a day prior to the day specified by B.

EqualsValue if A occurs on the same day as B, ignoring of the time of day.

GreaterThanValue if A occurs on a day that follows the day specified by B.


CompareDateTime function
 VCL Reference

CompareDateTime function

See also

Indicates the relationship between two TDateTime values.

Unit

DateUtils

Category

date/time routines

function CompareDateTime(const A, B: TDateTime): TValueRelationship;

Description

Call CompareDateTime to compare the two TDateTime values specified by A and B. CompareDateTime returns

LessThanValue if A is earlier than B.

EqualsValue if A is the same as B.

GreaterThanValue if A is later than B.

Note:	CompareDateTime differs from a direct comparison of the corresponding Double values in that two TDateTime values are considered the same if they have the same value down to the millisecond. It is possible to create two TDateTime values that differ numerically when viewed as Doubles, but which represent the same year, month, day, hour, minute, second, and millisecond.


CompareTime function
 VCL Reference

CompareTime function

See also

Indicates the relationship between the time portions of two TDateTime values.

Unit

DateUtils

Category

date/time routines

function CompareTime(const A, B: TDateTime): TValueRelationship;

Description

Call CompareTime to compare the two TDateTime values specified by A and B. CompareTime returns

LessThanValue if A occurs earlier in the day than B (even if A occurs on a later day than B).

EqualsValue if A occurs at the same time of day as B, ignoring of the date portion of the two values.

GreaterThanValue if A occurs later in the day than B (even if A occurs on an earlier day than B).


DateOf function
 VCL Reference

DateOf function

See also

Strips the time portion from a TDateTime value.

Unit

DateUtils

Category

date/time routines

function DateOf(const AValue: TDateTime): TDateTime;

Description

Call DateOf to convert a TDateTime value to a TDateTime value that includes only the date information (sets the time portion to 0, which means midnight).


DateTimeToJulianDate function
 VCL Reference

DateTimeToJulianDate function

See also

Converts a TDateTime value into a Julian date.

Unit

DateUtils

Category

measurement conversion routines

function DateTimeToJulianDate(const AValue: TDateTime ): Double;

Description

Call DateTimeToJulianDate to convert a TDateTime value the corresponding Julian date.

The Julian date is the number of days, including fractional days, since 4713 BC January 1, Greenwich noon. Julian dates are used by astronomers, geophysicist, and others who need an unambiguous dating system based on continuing day counts.


DateTimeToModifiedJulianDate function
 VCL Reference

DateTimeToModifiedJulianDate function

See also

Converts a TDateTime value into a modified Julian date.

Unit

DateUtils

Category

measurement conversion routines

function DateTimeToModifiedJulianDate(const AValue: TDateTime ): Double;

Description

Call DateTimeToModifiedJulianDate to convert a TDateTime value the corresponding modified Julian date.

The modified Julian date is the number of days, including fractional days, since Greenwich midnight on November 17, 1858. Modified Julian dates are based on Julian dates, but adjusted to use midnight rather than noon as a starting point and to use a more recent date as a starting point.


DateTimeToUnix function
 VCL Reference

DateTimeToUnix function

See also

Converts a TDateTime value into a Unix-based date-and-time value.

Unit

DateUtils

Category

measurement conversion routines

function DateTimeToUnix(const AValue: TDateTime ): Int64;

Description

Call DateTimeToUnix to convert a TDateTime value the corresponding Unix encoding of the same date and time.

Unix date-and-time values are encoded as the number of seconds that have elapsed since midnight at the start of January 1, 1970.


DayOf function
 VCL Reference

DayOf function

See also

Returns the day of the month represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function DayOf(const AValue: TDateTime): Word;

Description

Call DayOf to obtain the day of the month represented by a specified TDateTime value. DayOf returns a value between 1 and 31.

Note:	DayOf returns the same value as the DayOfTheMonth function.


DayOfTheMonth function
 VCL Reference

DayOfTheMonth function

See also

Returns the day of the month represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function DayOfTheMonth(const AValue: TDateTime): Word;

Description

Call DayOfTheMonth to obtain the day of the month represented by a specified TDateTime value. DayOfTheMonth returns a value between 1 and 31.

Note:	DayOfTheMonth returns the same value as the DayOf function.


DayOfTheWeek function
 VCL Reference

DayOfTheWeek function

See also

Returns the day of the week represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function DayOfTheWeek(const AValue: TDateTime): Word;

Description

Call DayOfTheWeek to obtain the day of the week represented by a specified TDateTime value. DayOfTheWeek returns a value between 1 and 7, where 1 indicates Monday and 7 indicates Sunday.

Note:	DayOfTheWeek is ISO 8601 compliant (where Monday is considered the first day of the week). To obtain the day of the week where Sunday is considered the first day of the week, use the DayOfWeek function instead.

Tip:	To make the return value more readable, use the Day of week constants.


Day of week constants
 VCL Reference

Day of week constants

See also

Provide symbolic constants for ISO 8601-compliant day of the week values.

Unit

DateUtils

Category

date/time routines

const

  DayMonday = 1;

  DayTuesday = 2;

  DayWednesday = 3;

  DayThursday = 4;

  DayFriday = 5;

  DaySaturday = 6;

  DaySunday = 7;

Description

Use these constants to represent days of the week when working with ISO 8601 compliant functions (the functions in the DateUtils unit).

Warning:	Do not use these constants with the DayOfWeek function, which treats Sunday as the first day of the week.


DayOfTheYear function
 VCL Reference

DayOfTheYear function

See also

Returns the number of days between a specified TDateTime value and December 31 of the previous year.

Unit

DateUtils

Category

date/time routines

function DayOfTheYear(const AValue: TDateTime): Word;

Description

Call DayOfTheYear to obtain the ordinal position of a TDateTime value’s day within its year. Thus, a TDateTime value that refers to January 1 generates a result of 1, dates on January 2 return 2, dates on February 1 return 32, and so on.


DaysBetween function
 VCL Reference

DaysBetween function

See also

Returns the number of whole days between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function DaysBetween(const ANow, AThen: TDateTime): Integer;

Description

Call DaysBetween to obtain the difference, in days, between two TDateTime values.

DaysBetween counts only whole days that have elapsed. Thus, DaysBetween reports the difference between Dec 31, 1999 11:59 PM and Jan 1, 2000 11:58 PM as 0 because the difference is one minute short of an entire day.


DaysInAMonth function
 VCL Reference

DaysInAMonth function

See also

Returns the number of days in a specified month of a specified year.

Unit

DateUtils

Category

date/time routines

function DaysInAMonth(const AYear, AMonth: Word): Word;

Description

Call DaysInAMonth to obtain the number of days in the specified month of the specified year.

AYear is a year between 1 and 9999 (inclusive).

AMonth is a month between 1 and 12 (inclusive).


DaysInAYear function
 VCL Reference

DaysInAYear function

See also

Returns the number of days in a specified year.

Unit

DateUtils

Category

date/time routines

function DaysInAYear(const AYear: Word): Word;

Description

Call DaysInAYear to obtain the number of days in the year specified by AYear. AYear is a year between 1 and 9999 (inclusive).


DaysInMonth function
 VCL Reference

DaysInMonth function

See also

Returns the number of days in the month of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function DaysInMonth(const AValue: TDateTime): Word;

Description

Call DaysInMonth to obtain the number of days in the month of the TDateTime value specified by AValue.


DaysInYear function
 VCL Reference

DaysInYear function

See also

Returns the number of days in the year of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function DaysInYear(const AValue: TDateTime): Word;

Description

Call DaysInYear to obtain the number of days in the year of the TDateTime value specified by AValue.


DaySpan function
 VCL Reference

DaySpan function

See also

Returns the number of days (including fractional days) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function DaySpan(const ANow, AThen: TDateTime): Double;

Description

Call DaySpan to obtain the difference, in days, between two TDateTime values. Unlike the DaysBetween function, which only counts whole days, DaySpan reports incomplete days as a fraction of an entire day.


DecodeDateDay procedure
 VCL Reference

DecodeDateDay procedure

See also

Returns the year and day of the year for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

procedure DecodeDateDay(const AValue: TDateTime; out AYear, ADayOfYear: Word);

Description

DecodeDateDay returns the day of the year for a specified date/time value, along with the year in which that day occurs.

AValue is the date/time value about which you want information.

AYear returns the year that AValue represents.

ADayOfYear returns the day within AYear that AValue represents, where 1 is January 1.


DecodeDateMonthWeek procedure
 VCL Reference

DecodeDateMonthWeek procedure

See also

Returns the year, month, week of the month, and day of the week for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

procedure DecodeDateMonthWeek(const AValue: TDateTime; out AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word);

Description

DecodeDateMonthWeek returns the day of the week and week of the month for a specified date/time value, along with the month and year in which that day and week occur.

AValue is the date/time value about which you want information.

AYear returns the year that AValue represents.

AMonth returns the month that AValue represents, where 1 is January and 12 is December.

AWeekOfMonth returns the week within AMonth that AValue represents, where 1 is the first week with four or more days.

ADayOfWeek returns the day within AWeekOfMonth that AValue represents, where 1 Monday and 7 is Sunday.

Note:	The definitions for AWeekOfMonth and ADayOfWeek reflect the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


DecodeDateTime procedure
 VCL Reference

DecodeDateTime procedure

See also

Returns Year, Month, Day, Hour, Minute, Second, and MilliSecond values for a TDateTime value.

Unit

DateUtils

Category

date/time routines

procedure DecodeDateTime(const AValue: TDateTime; out AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word);

Description

The DecodeDateTime procedure breaks the value specified as the AValue parameter into Year, Month, Day of the month, Hour, Minute, Second, and MilliSecond values and returns these as the AYear, AMonth, ADay, AHour, AMinute, ASecond, and AMilliSecond parameters.


DecodeDateWeek procedure
 VCL Reference

DecodeDateWeek procedure

See also

Returns the year, week of the year, and day of the week for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

procedure DecodeDateWeek(const AValue: TDateTime; out AYear, AWeekOfYear, ADayOfWeek: Word);

Description

DecodeDateWeek returns the day of the week and week of the year for a specified date/time value, along with the year in which that day and week occur.

AValue is the date/time value about which you want information.

AYear returns the year that AValue represents.

AWeekOfYear returns the week within AYear that AValue represents, where 1 is the first week with four or more days.

ADayOfWeek returns the day within AWeekOfYear that AValue represents, where 1 Monday and 7 is Sunday.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


DecodeDayOfWeekInMonth procedure
 VCL Reference

DecodeDayOfWeekInMonth procedure

See also

For a given TDateTime value, returns the year, month, day of the week, and the count of that day of the week in the month.

Unit

DateUtils

Category

date/time routines

procedure DecodeDayOfWeekInMonth(const AValue: TDateTime; out AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word);

Description

For a given TDateTime value, DecodeDayOfWeekInMonth returns the day of the week and, for that day of the week, which occurrence it is within the month.

AValue is the date/time value about which you want information.

AYear returns the year that AValue represents.

AMonth returns the month in which AValue occurs. This value can be from 1 to 12, inclusive.

ANthDayOfWeek indicates the count for the day of the week represented by AValue. For example, if AValue represents the 2nd Tuesday of the month, ANthDayOfWeek returns 2. Note that this value may differ from the value that the WeekOfTheMonth function returns, because DecodeDayOfWeekInMonth counts every occurrence of the given weekday, while WeekOfTheMonth only counts a week if it includes 4 or more days in the month. Thus, for example, if AValue represents a Saturday that is the first day of a month, DecodeDayOfWeekInMonth returns 1 as the value of ANthDayOfWeek, while WeekOfTheMonth returns 5 (or maybe 4), indicating the last week of the previous month.

ADayOfWeek returns the day of the week that AValue represents, where 1 Monday and 7 is Sunday.

Note:	The definition for ADayOfWeek follows the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


EncodeDateDay function
 VCL Reference

EncodeDateDay function

See also

Returns a TDateTime value that represents a specified day of the year for a specified year.

Unit

DateUtils

Category

date/time routines

function EncodeDateDay(const AYear, ADayOfYear: Word): TDateTime;

Description

EncodeDateDay returns a TDateTime value for the date specified by the AYear and ADayOfYear parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).

AYear is the year. It can be any value between 1 and 9999 (inclusive).

ADayOfYear is the day of the year, where 1 is January , 2 is January 2, 32 is February 1, and so on.

If AYear is not within range, or if ADayOfYear is less than 1 or greater than the number of days in AYear, EncodeDateDay raises an EConvertError exception.


EncodeDateMonthWeek function
 VCL Reference

EncodeDateMonthWeek function

See also

Returns a TDateTime objectvalue that represents a specified day of a specified week in a specified month and year.

Unit

DateUtils

Category

date/time routines

function EncodeDateMonthWeek(const AYear, AMonth, AWeekOfMonth: Word; const ADayOfWeek: Word = 1): TDateTime;

Description

EncodeDateMonthWeek returns a TDateTime value for the date specified by the AYear, AMonth, AWeekOfMonth, and ADayOfWeek parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AMonth is the year. It can be any value between 1 and 12 (inclusive).

AWeekOfMonth is the week within that month, where 1 is the first week that includes four or more days. Note that if the first calendar day of the month is a Friday, Saturday, or Sunday, then those three days must be expressed using AMonth set to the previous month and AWeekOfMonth set to the number of weeks in the previous month. Similarly, if the last calendar day of the month is a Monday, Tuesday, or Wednesday, then those three days are expressed with AMonth set to the following month and AWeekOfMonth set to 1.

ADayOfWeek is the day of the week, where 1 Monday, 2 is Tuesday, and so on.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.

If any of the parameters are not in range, EncodeDateMonthWeek raises an EConvertError exception.

Note:	The definitions for AWeekOfMonth and ADayOfWeek reflect the ISO 8601 standard.


EncodeDateTime function
 VCL Reference

EncodeDateTime function

See also

Returns a TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

Unit

DateUtils

Category

date/time routines

function EncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word):TDateTime;

Description

EncodeDate returns a TDateTime value from the values specified as the AYear, AMonth, ADay, AHour, AMinute, ASecond, and AMilliSecond parameters.

The year must be between 1 and 9999.

Valid month values are 1 through 12.

Valid day values are 1 through 28, 29, 30, or 31, depending on the month value. For example, the possible day values for month 2 (February) are 1 through 28 or 1 through 29, depending on whether or not the year value specifies a leap year.

Valid hour values are 0 through 24. (If the specified hour is 24, the minute, second, and millisecond values should all be 0, and the resulting TDateTime value represents midnight at the end of the specified day and the beginning of the next day).

Valid minute values are 0 through 59.

Valid second values are 0 through 59.

Valid millisecond values are 0 through 999.

If the specified values are not within range, EncodeDateTime raises an EConvertError exception.


EncodeDateWeek function
 VCL Reference

EncodeDateWeek function

See also

Returns a TDateTime value that represents a specified day of a specified week in a specified year.

Unit

DateUtils

Category

date/time routines

function EncodeDateWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word = 1): TDateTime;

Description

EncodeDateWeek returns a TDateTime value for the date specified by the AYear, AWeekOfYear, and ADayOfWeek parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AWeekOfYear is the week within that year, where 1 is the first week that includes four or more days. Note that if the first calendar day of the year is a Friday, Saturday, or Sunday, then those three days must be expressed using AYear set to the previous year and AWeekOfYear set to the number of weeks in the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then those three days are expressed with AYear set to the following year and AWeekOfYear set to 1.

ADayOfWeek is the day of the week, where 1 Monday, 2 is Tuesday, and so on.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.

If AYear is not within range, AWeekOfYear is less than 1 or greater than the number of weeks in AYear, or ADayOfWeek is less than 1 or greater than 7, EncodeDateWeek raises an EConvertError exception.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.


EncodeDayOfWeekInMonth function
 VCL Reference

EncodeDayOfWeekInMonth function

See also

Returns a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

Unit

DateUtils

Category

date/time routines

function EncodeDayOfWeekInMonth(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word): TDateTime;

Description

EncodeDayOfWeekInMonth returns a TDateTime value for the date specified by the AYear, AMonth, ANthDayOfWeek, and ADayOfWeek parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AMonth is the month. It can be any value between 1 and 12 (inclusive).

ANthDayOfWeek indicates the occurrence for the day of the week represented by ADayOfWeek. It can be any value between 1 and 5 (inclusive), as long as this value specifies a valid date. For example, if a month does not include 5 Mondays, setting ANthDayOfWeek to 5 and ADayOfWeek to 1 causes EncodeDayOfWeekInMonth to throw an exception.

ADayOfWeek is the day of the week, where 1 Monday and 7 is Sunday.

Note:	The definition for ADayOfWeek follows the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


EndOfADay function
 VCL Reference

EndOfADay function

See also

Returns a TDateTime value that represents the last millisecond of a specified day.

Unit

DateUtils

Category

date/time routines

function EndOfADay(const AYear, ADayOfYear: Word): TDateTime; overload;

function EndOfADay(const AYear, AMonth, ADay: Word): TDateTime; overload;

Description

EndOfADay returns the last expressible moment (11:59:999 PM) of a specified day.

The AYear parameter specifies the year of the desired day.

The ADayOfYear parameter specifies the desired day as a day of the year, where 1 is January 1, 2 is January 2, 32 is February 1, and so on.

The AMonth and ADay parameters specify the desired day as a month of the year and day of the month. AMonth can range from 1 to 12. ADay can range from 1 to 28, 29, 30, or 31, depending on the values of AYear and AMonth.

If the parameters do not specify a valid date, EndOfADay raises an EConvertError exception.


EndOfAMonth function
 VCL Reference

EndOfAMonth function

See also

Returns a TDateTime value that represents the last millisecond of the last day of a specified month.

Unit

DateUtils

Category

date/time routines

function EndOfAMonth(const AYear, AMonth: Word): TDateTime;

Description

EndOfAMonth returns the last expressible moment (11:59:999 PM) of the last day of a specified month.

The AYear parameter specifies the year of the desired month.

The AMonth parameter specifies the month. It can range from 1 to 12.

If the parameters do not specify a valid month, EndOfAMonth raises an EConvertError exception.


EndOfAWeek function
 VCL Reference

EndOfAWeek function

See also

Returns a TDateTime value that represents the last millisecond of a specified day of a specified week.

Unit

DateUtils

Category

date/time routines

function EndOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word = 7): TDateTime;

Description

EndOfAWeek returns the last expressible moment (11:59:999 PM) of the specified day of the specified week.

The AYear parameter specifies the year of the desired day.

The AWeekOfYear parameter specifies the week of the year, where 1 is the first week in AYear that includes four or more days.

The ADayOfWeek parameter indicates the desired day in the specified week, where 1 is Monday, 2 is Tuesday, and so on.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.

If the parameters do not specify a valid date, EndOfAWeek raises an EConvertError exception.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.


EndOfAYear function
 VCL Reference

EndOfAYear function

See also

Returns a TDateTime value that represents the last millisecond of a specified year.

Unit

DateUtils

Category

date/time routines

function EndOfAYear(const AYear): TDateTime;

Description

EndOfAYear returns the last expressible moment (December 31 at 11:59:999 PM) of the year specified by the AYear parameter.


EndOfTheDay function
 VCL Reference

EndOfTheDay function

See also

Returns a TDateTime value that represents the last millisecond of the day identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function EndOfTheDay(const AValue: TDateTime): TDateTime;

Description

EndOfTheDay returns the last expressible moment of the same day as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:999 PM and returns the result.


EndOfTheMonth function
 VCL Reference

EndOfTheMonth function

See also

Returns a TDateTime value that represents the last millisecond of the last day of the month identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function EndOfTheMonth(const AValue: TDateTime): TDateTime;

Description

EndOfTheMonth returns the last expressible moment of the same month as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:999 PM, changes the day to the last day of the month, and returns the result.


EndOfTheWeek function
 VCL Reference

EndOfTheWeek function

See also

Returns a TDateTime value that represents the last millisecond of the last day of the week identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function EndOfTheWeek(const AValue: TDateTime): TDateTime;

Description

EndOfTheWeek returns the last expressible moment of the same week as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:999 PM, changes the day to the last day of the week, and returns the result.

Note:	EndOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


EndOfTheYear function
 VCL Reference

EndOfTheYear function

See also

Returns a TDateTime value that represents the last millisecond of the last day of the year identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function EndOfTheYear(const AValue: TDateTime): TDateTime;

Description

EndOfTheYear returns the last expressible moment of the same year as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 11:59:999 PM, changes the day to December 31, and returns the result.


HourOf function
 VCL Reference

HourOf function

See also

Returns the hour of the day represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function HourOf(const AValue: TDateTime): Word;

Description

Call HourOf to obtain the hour of the day represented by a specified TDateTime value. HourOf returns a value between 0 and 23.

Note:	HourOf returns the same value as the HourOfTheDay function.


HourOfTheDay function
 VCL Reference

HourOfTheDay function

See also

Returns the hour of the day represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function HourOfTheDay(const AValue: TDateTime): Word;

Description

Call HourOfTheDay to obtain the hour of the day represented by a specified TDateTime value. HourOf returns a value between 0 and 23.

Note:	HourOfTheDay returns the same value as the HourOf function.


HourOfTheMonth function
 VCL Reference

HourOfTheMonth function

See also

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the month.

Unit

DateUtils

Category

date/time routines

function HourOfTheMonth(const AValue: TDateTime): Word;

Description

Call HourOfTheMonth to obtain the number of complete hours that have elapsed between AValue and 12:00 AM on the first day of the month that includes AValue.


HourOfTheWeek function
 VCL Reference

HourOfTheWeek function

See also

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the week.

Unit

DateUtils

Category

date/time routines

function HourOfTheWeek(const AValue: TDateTime): Word;

Description

Call HourOfTheWeek to obtain the number of complete hours that have elapsed between AValue and 12:00 AM on Monday of the week that includes AValue.

Note:	HourOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


HourOfTheYear function
 VCL Reference

HourOfTheYear function

See also

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the year.

Unit

DateUtils

Category

date/time routines

function HourOfTheYear(const AValue: TDateTime): Word;

Description

Call HourOfTheYear to obtain the number of complete hours that have elapsed between AValue and 12:00 AM on Jan 1 of the year that includes AValue.


HoursBetween function
 VCL Reference

HoursBetween function

See also

Returns the number of whole hours between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function HoursBetween(const ANow, AThen: TDateTime): Int64;

Description

Call HoursBetween to obtain the difference, in hours, between two TDateTime values. HoursBetween counts only entire hours that have elapsed. Thus, HoursBetween reports the difference between 9:00 AM and 9:59:59 AM as 0 because the difference is one second short of an entire hour.


HourSpan function
 VCL Reference

HourSpan function

See also

Returns the number of Hours (including fractional Hours) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function HourSpan(const ANow, AThen: TDateTime): Double;

Description

Call HourSpan to obtain the difference, in hours, between two TDateTime values. Unlike the HoursBetween function, which only counts entire hours, HourSpan reports incomplete hours as a fraction of an entire hour.


IncDay function
 VCL Reference

IncDay function

See also

Returns a date shifted by a specified number of days.

Unit

DateUtils

Category

date/time routines

function IncDay(const AValue: TDateTime; const ANumberOfDays: Integer = 1): TDateTime;

Description

IncDay returns the value of the AValue parameter, incremented by ANumberOfDays days. ANumberOfDays can be negative, to return a date N days previous.

The time of day specified by the AValue parameter is copied to the result.


IncHour function
 VCL Reference

IncHour function

See also

Returns a date/time value shifted by a specified number of hours.

Unit

DateUtils

Category

date/time routines

function IncHour(const AValue: TDateTime; const ANumberOfHours: Int64 = 1): TDateTime;

Description

IncHour returns the value of the AValue parameter, incremented by ANumberOfHours hours. ANumberOfHours can be negative, to return a date and time N hours prior to AValue.


IncMilliSecond function
 VCL Reference

IncMilliSecond function

See also

Returns a date/time value shifted by a specified number of milliseconds.

Unit

DateUtils

Category

date/time routines

function IncMilliSecond(const AValue: TDateTime; const ANumberOfMilliSeconds: Int64 = 1): TDateTime;

Description

IncMilliSecond returns the value of the AValue parameter, incremented by ANumberOfMilliSeconds milliseconds. ANumberOfMilliSeconds can be negative, to return a date and time N milliseconds prior to AValue.


IncMinute function
 VCL Reference

IncMinute function

See also

Returns a date/time value shifted by a specified number of minutes.

Unit

DateUtils

Category

date/time routines

function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64 = 1): TDateTime;

Description

IncMinute returns the value of the AValue parameter, incremented by ANumberOfMinutes minutes. ANumberOfMinutes can be negative, to return a date and time N minutes prior to AValue.


IncSecond function
 VCL Reference

IncSecond function

See also

Returns a date/time value shifted by a specified number of seconds.

Unit

DateUtils

Category

date/time routines

function IncSecond(const AValue: TDateTime; const ANumberOfSeconds: Int64 = 1): TDateTime;

Description

IncSecond returns the value of the AValue parameter, incremented by ANumberOfSeconds seconds. ANumberOfSeconds can be negative, to return a date and time N seconds prior to AValue.


IncWeek function
 VCL Reference

IncWeek function

See also

Returns a date shifted by a specified number of weeks.

Unit

DateUtils

Category

date/time routines

function IncWeek(const AValue: TDateTime; const ANumberOfWeeks: Integer = 1): TDateTime;

Description

IncWeek returns the value of the AValue parameter, incremented by ANumberOfWeeks weeks. ANumberOfWeeks can be negative, to return a date N weeks previous.

The time of day specified by the AValue parameter is copied to the result.


IncYear function
 VCL Reference

IncYear function

See also

Returns a date shifted by a specified number of years.

Unit

DateUtils

Category

date/time routines

function IncYear(const AValue: TDateTime; const ANumberOfYears: Integer = 1): TDateTime;

Description

IncYear returns the value of the AValue parameter, incremented by ANumberOfYears years. ANumberOfYears can be negative, to return a date N years previous.

The time of day specified by the AValue parameter is copied to the result.


IsInLeapYear function
 VCL Reference

IsInLeapYear function

See also

Indicates whether a specified TDateTime value occurs in a leap year.

Unit

DateUtils

Category

date/time routines

function IsInLeapYear(const AValue: TDateTime): Boolean;

Description

Call IsInLeapYear to determine whether the year of the date specified by AValue occurs in a leap year.


IsPM function
 VCL Reference

IsPM function

See also

Indicates whether the time portion of a specified TDateTime value occurs after noon.

Unit

DateUtils

Category

date/time routines

function IsPM(const AValue: TDateTime): Boolean;

Description

IsPM returns True if the time portion of AValue occurs after 12:00 noon.


IsSameDay function
 VCL Reference

IsSameDay function

See also

Indicates whether a specified TDateTime value occurs on a the same day as a criterion date.

Unit

DateUtils

Category

date/time routines

function IsSameDay(const AValue, ABasis: TDateTime): Boolean;

Description

IsSameDay returns True if AValue occurs on the same day as ABasis. The time portions of AValue and ABasis can differ.

IsSameDay returns False if the date portions of AValue and ABasis differ.


IsToday function
 VCL Reference

IsToday function

See also

Indicates whether a specified TDateTime value occurs on the current date.

Unit

DateUtils

Category

date/time routines

function IsToday(const AValue: TDateTime): Boolean;

Description

IsToday returns True if AValue occurs on the current day.

IsToday returns False if AValue represents a time on any other day.


IsValidDate function
 VCL Reference

IsValidDate function

See also

Indicates whether a specified year, month, and day represent a valid date.

Unit

DateUtils

Category

date/time routines

function IsValidDate(const AYear, AMonth, ADay: Word): Boolean;

Description

IsValidDate returns True if

AYear falls in the range from 1 to 9999 inclusive.

AMonth falls in the range from 1 to 12 inclusive.

ADay falls in the range from1 to the number of days in the specified month.

Otherwise, IsValidDate returns False.


IsValidDateDay function
 VCL Reference

IsValidDateDay function

See also

Indicates whether a specified year and day of the year represent a valid date.

Unit

DateUtils

Category

date/time routines

function IsValidDateDay(const AYear, ADayOfYear: Word): Boolean;

Description

IsValidDateDay returns True if

AYear falls in the range from 1 to 9999 inclusive.

ADay falls in the range from1 to the number of days in the specified year.

Otherwise, IsValidDateDay returns False.


IsValidDateMonthWeek function
 VCL Reference

IsValidDateMonthWeek function

See also

Indicates whether a specified year, month, week of the month, and day of the week represent a valid date.

Unit

DateUtils

Category

date/time routines

function IsValidDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word): Boolean;

Description

IsValidDateMonthWeek returns True if

AYear falls in the range from 1 to 9999 inclusive.

AMonth falls in the range from 1 to 12 inclusive.

AWeekOfMonth falls in the range from1 to the number of weeks in the specified month.

ADayOfWeek falls in the range from 1 to 7.

Otherwise, IsValidDateMonthWeek returns False.


IsValidDateTime function
 VCL Reference

IsValidDateTime function

See also

Indicates whether a specified year, month, day, hour, minute, second, and millisecond represent a valid date and time.

Unit

DateUtils

Category

date/time routines

function IsValidDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;

Description

IsValidDateTime returns True if

AYear falls in the range from 1 to 9999 inclusive.

AMonth falls in the range from 1 to 12 inclusive.

ADay falls in the range from1 to the number of days in the specified month.

AHour falls in the range from 0 to 24, and if AHour is 24, then AMinute, ASecond, and AMilliSecond must all be 0.

AMinute falls in the range from 0 to 59 inclusive.

ASecond falls in the range from 0 to 59 inclusive.

AMilliSecond falls in the range from 0 to 999 inclusive.

Otherwise, IsValidDateTime returns False.


IsValidDateWeek function
 VCL Reference

IsValidDateWeek function

See also

Indicates whether a specified year, week of the year, and day of the week represent a valid date.

Unit

DateUtils

Category

date/time routines

function IsValidDateWeek(const AYear, AWeekOfYear, ADayOfWeek: Word): Boolean;

Description

IsValidDateWeek returns True if

AYear falls in the range from 1 to 9999 inclusive.

AWeekOfYear falls in the range from1 to the number of weeks in the specified year.

ADayOfWeek falls in the range from 1 to 7.

Otherwise, IsValidDateWeek returns False.


IsValidTime function
 VCL Reference

IsValidTime function

See also

Indicates whether a specified hour, minute, second, and millisecond represent a valid date and time.

Unit

DateUtils

Category

date/time routines

function IsValidTime(const AHour, AMinute, ASecond, AMilliSecond: Word): Boolean;

Description

IsValidTime returns True if

AHour falls in the range from 0 to 24, and if AHour is 24, then AMinute, ASecond, and AMilliSecond must all be 0.

AMinute falls in the range from 0 to 59 inclusive.

ASecond falls in the range from 0 to 59 inclusive.

AMilliSecond falls in the range from 0 to 999 inclusive.

Otherwise, IsValidTime returns False.


JulianDateToDateTime function
 VCL Reference

JulianDateToDateTime function

See also

Converts a Julian date to a TDateTime value.

Unit

DateUtils

Category

measurement conversion routines

function JulianDateToDateTime(const AValue: Double): TDateTime;

Description

Call JulianDateToDateTime to convert a Julian date to the corresponding TDateTime value.

The Julian date is the number of days, including fractional days, since 4713 BC January 1, Greenwich noon. Julian dates are used by astronomers, geophysicist, and others who need an unambiguous dating system based on continuing day counts.

Note:	If JulianDateToDateTime can’t convert the date specified by AValue, it raises an EConvertError exception.


MilliSecondOf function
 VCL Reference

MilliSecondOf function

See also

Returns the millisecond of the second represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function MilliSecondOf(const AValue: TDateTime): Word;

Description

Call MilliSecondOf to obtain the millisecond of the second represented by a specified TDateTime value. MilliSecondOf returns a value between 0 and 999.

Note:	MilliSecondOf returns the same value as the MilliSecondOfTheSecond function.


MilliSecondOfTheDay function
 VCL Reference

MilliSecondOfTheDay function

See also

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the same day.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheDay(const AValue: TDateTime): LongWord;

Description

Call MilliSecondOfTheDay to obtain the number of milliseconds that have elapsed between AValue and 12:00:00:00 AM on the same day.


MilliSecondOfTheHour function
 VCL Reference

MilliSecondOfTheHour function

See also

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same hour.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheHour(const AValue: TDateTime): LongWord;

Description

Call MilliSecondOfTheHour to obtain the number of milliseconds that have elapsed between AValue and the start of the same hour on the same day.


MilliSecondOfTheMinute function
 VCL Reference

MilliSecondOfTheMinute function

See also

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same minute.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheMinute(const AValue: TDateTime): LongWord;

Description

Call MilliSecondOfTheMinute to obtain the number of milliseconds that have elapsed between AValue and the start of the same minute on the same day.


MilliSecondOfTheMonth function
 VCL Reference

MilliSecondOfTheMonth function

See also

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the month.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheMonth(const AValue: TDateTime): LongWord;

Description

Call MilliSecondOfTheMonth to obtain the number of milliseconds that have elapsed between AValue and 12:00:00:00 AM on the first day of the month that includes AValue.


MilliSecondOfTheSecond function
 VCL Reference

MilliSecondOfTheSecond function

See also

Returns the millisecond of the second represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheSecond(const AValue: TDateTime): Word;

Description

Call MilliSecondOfTheSecond to obtain the millisecond of the second represented by a specified TDateTime value. MilliSecondOfTheSecond returns a value between 0 and 999.

Note:	MilliSecondOfTheSecond returns the same value as the MilliSecondOf function.


MilliSecondOfTheWeek function
 VCL Reference

MilliSecondOfTheWeek function

See also

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the week.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheWeek(const AValue: TDateTime): LongWord;

Description

Call MilliSecondOfTheWeek to obtain the number of milliseconds that have elapsed between AValue and 12:00:00:00 AM on Monday of the week that includes AValue.

Note:	MilliSecondOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


MilliSecondOfTheYear function
 VCL Reference

MilliSecondOfTheYear function

See also

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the year.

Unit

DateUtils

Category

date/time routines

function MilliSecondOfTheYear(const AValue: TDateTime): Int64;

Description

Call MilliSecondOfTheYear to obtain the number of milliseconds that have elapsed between AValue and 12:00:00:00 AM on Jan 1 of the year that includes AValue.


MilliSecondsBetween function
 VCL Reference

MilliSecondsBetween function

See also

Returns the number of milliseconds between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MilliSecondsBetween(const ANow, AThen: TDateTime): Int64;

Description

Call MilliSecondsBetween to obtain the difference, in milliseconds, between two TDateTime values.


MilliSecondSpan function
 VCL Reference

MilliSecondSpan function

See also

Returns the number of milliseconds between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MilliSecondSpan(const ANow, AThen: TDateTime): Double;

Description

Call MilliSecondSpan to obtain the difference, in milliseconds, between two TDateTime values. MilliSecondSpan returns the same value as MilliSecondsBetween, but as a Double instead of an Int64.


MinuteOf function
 VCL Reference

MinuteOf function

See also

Returns the minute of the hour represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function MinuteOf(const AValue: TDateTime): Word;

Description

Call MinuteOf to obtain the minute of the hour represented by a specified TDateTime value. MinuteOf returns a value between 0 and 59.

Note:	MinuteOf returns the same value as the MinuteOfTheHour function.


MinuteOfTheDay function
 VCL Reference

MinuteOfTheDay function

See also

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the same day.

Unit

DateUtils

Category

date/time routines

function MinuteOfTheDay(const AValue: TDateTime): Word;

Description

Call MinuteOfTheDay to obtain the number of minutes that have elapsed between AValue and 12:00 AM on the same day.


MinuteOfTheHour function
 VCL Reference

MinuteOfTheHour function

See also

Returns the number of minutes between a specified TDateTime value and the beginning of the same hour.

Unit

DateUtils

Category

date/time routines

function MinuteOfTheHour(const AValue: TDateTime): Word;

Description

Call MinuteOfTheHour to obtain the number of minutes that have elapsed between AValue and the start of the same hour on the same day.

Note:	MinuteOfTheHour returns the same value as the MinuteOf function.


MinuteOfTheMonth function
 VCL Reference

MinuteOfTheMonth function

See also

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the month.

Unit

DateUtils

Category

date/time routines

function MinuteOfTheMonth(const AValue: TDateTime): Word;

Description

Call MinuteOfTheMonth to obtain the number of minutes that have elapsed between AValue and 12:00 AM on the first day of the month that includes AValue.


MinuteOfTheWeek function
 VCL Reference

MinuteOfTheWeek function

See also

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the week.

Unit

DateUtils

Category

date/time routines

function MinuteOfTheWeek(const AValue: TDateTime): Word;

Description

Call MinuteOfTheWeek to obtain the number of minutes that have elapsed between AValue and 12:00 AM on Monday of the week that includes AValue.

Note:	MinuteOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


MinuteOfTheYear function
 VCL Reference

MinuteOfTheYear function

See also

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the year.

Unit

DateUtils

Category

date/time routines

function MinuteOfTheYear(const AValue: TDateTime): LongWord;

Description

Call MinuteOfTheYear to obtain the number of minutes that have elapsed between AValue and 12:00 AM on Jan 1 of the year that includes AValue.


MinutesBetween function
 VCL Reference

MinutesBetween function

See also

Returns the number of minutes between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MinutesBetween(const ANow, AThen: TDateTime): Int64;

Description

Call MinutesBetween to obtain the difference, in minutes, between two TDateTime values. MinutesBetween counts only entire minutes that have elapsed. Thus, MinutesBetween reports the difference between 9:00:00 AM and 9:00:59:999 AM as 0 because the difference is one millisecond short of an entire minute.


MinuteSpan function
 VCL Reference

MinuteSpan function

See also

Returns the number of minutes, including fractions thereof, between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MinuteSpan(const ANow, AThen: TDateTime): Double;

Description

Call MinuteSpan to obtain the difference, in minutes, between two TDateTime values. Unlike the MinutesBetween function, which only counts entire minutes, MinuteSpan reports incomplete minutes as a fraction of an entire minute.


ModifiedJulianDateToDateTime function
 VCL Reference

ModifiedJulianDateToDateTime function

See also

Converts a modified Julian date to a TDateTime value.

Unit

DateUtils

Category

measurement conversion routines

function ModifiedJulianDateToDateTime(const AValue: Double): TDateTime;

Description

Call ModifiedJulianDateToDateTime to convert a modified Julian date to the corresponding TDateTime value.

The modified Julian date is the number of days, including fractional days, since Greenwich midnight on November 17, 1858. Modified Julian dates are based on Julian dates, but adjusted to use midnight rather than noon as a starting point and to use a more recent date as a starting point.

Note:	If ModifiedJulianDateToDateTime can’t convert the date specified by AValue, it raises an EConvertError exception.


MonthOf function
 VCL Reference

MonthOf function

See also

Returns the month of the year represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function MonthOf(const AValue: TDateTime): Word;

Description

Call MonthOf to obtain the month of the year represented by a specified TDateTime value. MonthOf returns a value between 1 and 12.

Note:	MonthOf returns the same value as the MonthOfTheYear function.


MonthOfTheYear function
 VCL Reference

MonthOfTheYear function

See also

Returns the month of the year represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function MonthOfTheYear(const AValue: TDateTime): Word;

Description

Call MonthOfTheYear to obtain the month of the year represented by a specified TDateTime value. MonthOfTheYear returns a value between 1 and 12.

Note:	MonthOfTheYear returns the same value as the MonthOf function.


MonthsBetween function
 VCL Reference

MonthsBetween function

See also

Returns the approximate number of months between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MonthsBetween(const ANow, AThen: TDateTime): Integer;

Description

Call MonthsBetween to obtain the difference, in months, between two TDateTime values. Because months are not all the same length, MonthsBetween returns an approximation based on an assumption of 30.4375 days per month. Fractional months are not counted. Thus, for example, MonthsBetween reports the difference between Feb 1 and Feb 28 as 0. (For that matter, it reports the difference between Feb 1 and Mar 1 as 0.)


MonthSpan function
 VCL Reference

MonthSpan function

See also

Returns the approximate number of months (including fractions thereof) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function MonthSpan(const ANow, AThen: TDateTime): Double;

Description

Call MonthSpan to obtain the difference, in months, between two TDateTime values. Because months are not all the same length, MonthsBetween returns an approximation based on an assumption of 30.4375 days per month. Unlike the MonthsBetween function, which does not report fractional “months”, MonthSpan reports incomplete months as a fraction of an entire month.


NthDayOfWeek function
 VCL Reference

NthDayOfWeek function

See also

Returns which occurence of its weekday a specified TDateTime value represents.

Unit

DateUtils

Category

date/time routines

function NthDayOfWeek(const AValue: TDateTime): Word;

Description

NthDayOfWeek indicates which occurrence of a weekday within a month the date and time specified by AValue represents. For example, if AValue represents the 2nd Tuesday of the month, NthDayOfWeek returns 2.

Note that this value may differ from the value that the WeekOfTheMonth function returns, because NthDayOfWeek counts every occurrence of the given weekday, while WeekOfTheMonth only counts a week if it includes 4 or more days in the month. Thus, for example, if AValue represents a Saturday that is the first day of a month, NthDayOfWeekInMonth returns 1, while WeekOfTheMonth returns 5 (or maybe 4), indicating the last week of the previous month.

Note:	To obtain the year, month, and day of the week, as well as which occurrence of that day of the week the specified TDateTime represents, use the DecodeDayOfWeekInMonth function.


RecodeDate function
 VCL Reference

RecodeDate function

See also

Replaces the date portion of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeDate(const AValue: TDateTime; const AYear, AMonth, ADay: Word): TDateTime;

Description

Call RecodeDate to convert the date/time value specified by AValue with the value obtained by changing the year to AYear, the month to AMonth, and the day of the month to ADay.

AYear must fall between 1 and 9999 (inclusive).

AMonth can range from 1 to 12.

Legal values for ADay depend on the month represented by AMonth. (For example, if AMonth is 1, ADay can range from 1 to 31; if AMonth is 2, ADay can range from 1 to 28 or 1 to 29, depending on the year; and so on.)

If the values provided for AYear, AMonth, and ADay do not represent a valid date, RecodeDate raises an EConvertError exception.


RecodeDateTime function
 VCL Reference

RecodeDateTime function

See also

Selectively replaces parts of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;

Description

Call RecodeDateTime to convert the date/time value specified by AValue with the value obtained by changing the year to AYear, the month to AMonth, the day of the month to ADay, the hour to AHour, the minute to AMinute, the second to ASecond, and the millisecond to AMilliSecond. Any one of these parameters can be set to RecodeLeaveFieldAsIs, which tells RecodeDateTime not change the existing portion of the TDateTime value.

AYear can range from 1 to 9999 (or be RecodeLeaveFieldAsIs).

AMonth can range from 1 to 12 (or be RecodeLeaveFieldAsIs).

Legal values for ADay depend on the month represented by AMonth. (For example, if AMonth is 1, ADay can range from 1 to 31; if AMonth is 2, ADay can range from 1 to 28 or 1 to 29, depending on the year; and so on.) ADay can also be RecodeLeaveFieldAsIs.

AHour can range from 0 to 24 (or be RecodeLeaveFieldAsIs). If AHour is 24, AMinute, ASecond, and AMilliSecond must all be 0.

AMinute can range from 0 to 59  (or be RecodeLeaveFieldAsIs).

ASecond can range from 0 to 59 (or be RecodeLeaveFieldAsIs).

AMilliSecond can range from 0 to 999 (or be RecodeLeaveFieldAsIs).

If the values do not result in a valid date and time, RecodeDateTime raises an EConvertError exception.


RecodeDay function
 VCL Reference

RecodeDay function

See also

Replaces the day of the month for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeDay(const AValue: TDateTime; const ADay: Word): TDateTime;

Description

Call RecodeDateDay to convert the date/time value specified by AValue with the value obtained by changing the day of the month to ADay. Legal values for ADay depend on the month represented by AValue. (For example, if AValue is in January, ADay can range from 1 to 31; if AValue is in February, ADay can range from 1 to 28 or 1 to 29, depending on the year; and so on.)

If the value provided for ADay does not represent a valid day in the month identified by AValue, RecodeDateDay raises an EConvertError exception.


RecodeHour function
 VCL Reference

RecodeHour function

See also

Replaces the hour of the day for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;

Description

Call RecodeDateHour to convert the date/time value specified by AValue with the value obtained by changing the hour of the day to AHour. Legal values for AHour range from 0 to 24. If AHour is 24, the minutes, seconds, and milliseconds of AValue must all be 0.

If the value provided for AHour is not in the legal range, RecodeDateHour raises an EConvertError exception.


RecodeLeaveFieldAsIs constant
 VCL Reference

RecodeLeaveFieldAsIs constant

See also

Identifies a parameter to RecodeDateTime that should not be used.

Unit

DateUtils

Category

date/time routines

const RecodeLeaveFieldAsIs = High(Word);

Description

Use RecodeLeaveFieldAsIs as a parameter to the RecodeDateTime function to indicate that the corresponding portion of the source TDataTime value should be left unchanged.


RecodeMilliSecond function
 VCL Reference

RecodeMilliSecond function

See also

Replaces the millisecond of the second for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeMilliSecond(const AValue: TDateTime; const AMilliSecond: Word): TDateTime;

Description

Call RecodeDateMilliSecond to convert the date/time value specified by AValue with the value obtained by changing the milliseconds of the second to AMilliSecond. Legal values for AMilliSecond range from 0 to 999.

If the value provided for AMilliSecond is not in the legal range, RecodeDateMilliSecond raises an EConvertError exception.


RecodeMinute function
 VCL Reference

RecodeMinute function

See also

Replaces the minute of the hour for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeMinute(const AValue: TDateTime; const AMinute: Word): TDateTime;

Description

Call RecodeDateMinute to convert the date/time value specified by AValue with the value obtained by changing the minute of the hour to AMinute. Legal values for AMinute range from 0 to 59.

If the value provided for AMinute is not in the legal range, RecodeDateMinute raises an EConvertError exception.


RecodeMonth function
 VCL Reference

RecodeMonth function

See also

Replaces the month of the year for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;

Description

Call RecodeDateMonth to convert the date/time value specified by AValue with the value obtained by changing the month of the year to AMonth. Legal values for AMonth range from 1 to 12.

If the value provided for AMonth does not represent a valid month, or if the change results in an invalid day of the month (for example trying to change Jan 31 to Feb 31), RecodeDateMonth raises an EConvertError exception.


RecodeSecond function
 VCL Reference

RecodeSecond function

See also

Replaces the second of the minute for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeSecond(const AValue: TDateTime; const ASecond: Word): TDateTime;

Description

Call RecodeDateSecond to convert the date/time value specified by AValue with the value obtained by changing the second of the minute to ASecond. Legal values for ASecond range from 0 to 59.

If the value provided for ASecond is not in the legal range, RecodeDateSecond raises an EConvertError exception.


RecodeTime function
 VCL Reference

RecodeTime function

See also

Replaces the time portion of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;

Description

Call RecodeTime to convert the date/time value specified by AValue with the value obtained by changing the hour to AHour, the minute to AMinute, the second to ASecond, and the milliseconds to AMilliSecond.

AHour can range from 0 to 24. If AHour is 24, AMinute, ASecond, and AMilliSecond must all be 0.

AMinute can range from 0 to 59.

ASecond can range from 0 to 59.

AMilliSecond can range from 0 to 999.

If the values provided for AHour, AMinute, ASecond, and AMilliSecond do not fall in the valid range, RecodeTime raises an EConvertError exception.


RecodeYear function
 VCL Reference

RecodeYear function

See also

Replaces the year for a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;

Description

Call RecodeDateYear to convert the date/time value specified by AValue with the value obtained by changing the year to AYear. Legal values for AYear range from 1 to 9999.

If the value provided for AYear is not in the legal range, or if the change results in an invalid day of the month (changing Feb 29 on a leap year to a non-leap year), RecodeDateYear raises an EConvertError exception.


SameDate function
 VCL Reference

SameDate function

See also

Indicates whether two TDateTime values represent the same year, month, and day.

Unit

DateUtils

Category

date/time routines

function SameDate(const A, B: TDateTime): Boolean;

Description

Call SameDate to determine whether the two TDateTime values specified by A and B represent the same date, ignoring the time portion. SameDate returns True if the two specified values occur on the same day, False otherwise.


SameDateTime function
 VCL Reference

SameDateTime function

See also

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

Unit

DateUtils

Category

date/time routines

function SameDateTime(const A, B: TDateTime): Boolean;

Description

Call SameDateTime to determine whether the two TDateTime values specified by A and B represent the same time, down to the millisecond. SameDateTime returns True if the two specified values represent the same time, False otherwise.

Note:	It is possible to create two TDateTime values that differ numerically when viewed as Doubles, but which represent the same year, month, day, hour, minute, second, and millisecond. SameDateTime allows applications to determine when two TDateTime values are the same even when their numeric values differ.


SameTime function
 VCL Reference

SameTime function

See also

Indicates whether two TDateTime values represent the same time of day, ignoring the date portion.

Unit

DateUtils

Category

date/time routines

function SameTime(const A, B: TDateTime): Boolean;

Description

Call SameTime to determine whether the two TDateTime values specified by A and B represent the same time of day, ignoring the date portion. SameTime returns True if the two specified values occur on the same hour, minute, second, and millisecond, False otherwise.

Note:	It is possible to create two TDateTime values whose time portions differ numerically when viewed as Doubles, but which represent the same hour, minute, second, and millisecond. SameTime allows applications to determine when two TDateTime values represent the same time, even when the fractional parts of the values differ.


SecondOf function
 VCL Reference

SecondOf function

See also

Returns the second of the minute represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function SecondOf(const AValue: TDateTime): Word;

Description

Call SecondOf to obtain the second of the minute represented by a specified TDateTime value. SecondOf returns a value between 0 and 59.

Note:	SecondOf returns the same value as the SecondOfTheMinute function.


SecondOfTheDay function
 VCL Reference

SecondOfTheDay function

See also

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the same day.

Unit

DateUtils

Category

date/time routines

function SecondOfTheDay(const AValue: TDateTime): LongWord;

Description

Call SecondOfTheDay to obtain the number of seconds that have elapsed between AValue and 12:00:00 AM on the same day.


SecondOfTheHour function
 VCL Reference

SecondOfTheHour function

See also

Returns the number of seconds between a specified TDateTime value and the beginning of the same hour.

Unit

DateUtils

Category

date/time routines

function SecondOfTheHour(const AValue: TDateTime): Word;

Description

Call SecondOfTheHour to obtain the number of seconds that have elapsed between AValue and the start of the same hour on the same day.


SecondOfTheMinute function
 VCL Reference

SecondOfTheMinute function

See also

Returns the number of seconds between a specified TDateTime value and the beginning of the same minute.

Unit

DateUtils

Category

date/time routines

function SecondOfTheMinute(const AValue: TDateTime): Word;

Description

Call SecondOfTheMinute to obtain the number of seconds that have elapsed between AValue and the start of the same minute on the same day.

Note:	SecondOfTheMinute returns the same value as the SecondOf function.


SecondOfTheMonth function
 VCL Reference

SecondOfTheMonth function

See also

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the month.

Unit

DateUtils

Category

date/time routines

function SecondOfTheMonth(const AValue: TDateTime): LongWord;

Description

Call SecondOfTheMonth to obtain the number of seconds that have elapsed between AValue and 12:00:00 AM on the first day of the month that includes AValue.


SecondOfTheWeek function
 VCL Reference

SecondOfTheWeek function

See also

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the first day of the week.

Unit

DateUtils

Category

date/time routines

function SecondOfTheWeek(const AValue: TDateTime): LongWord;

Description

Call SecondOfTheWeek to obtain the number of seconds that have elapsed between AValue and 12:00:00 AM on Monday of the week that includes AValue.

Note:	SecondOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


SecondOfTheYear function
 VCL Reference

SecondOfTheYear function

See also

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the year.

Unit

DateUtils

Category

date/time routines

function SecondOfTheYear(const AValue: TDateTime): LongWord;

Description

Call SecondOfTheYear to obtain the number of seconds that have elapsed between AValue and 12:00:00 AM on Jan 1 of the year that includes AValue.


SecondsBetween function
 VCL Reference

SecondsBetween function

See also

Returns the number of seconds between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function SecondsBetween(const ANow, AThen: TDateTime): Int64;

Description

Call SecondsBetween to obtain the difference, in seconds, between two TDateTime values. SecondsBetween counts only entire seconds that have elapsed. Thus, SecondsBetween reports the difference between 9:00:00 AM and 9:00:00:999 AM as 0 because the difference is one millisecond short of an entire second.


SecondSpan function
 VCL Reference

SecondSpan function

See also

Returns the number of seconds (including fractions thereof) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function SecondSpan(const ANow, AThen: TDateTime): Double;

Description

Call SecondSpan to obtain the difference, in seconds, between two TDateTime values. Unlike the SecondsBetween function, which only counts entire seconds, SecondSpan reports incomplete seconds as a fraction of an entire second.


StartOfADay function
 VCL Reference

StartOfADay function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day.

Unit

DateUtils

Category

date/time routines

function StartOfADay(const AYear, ADayOfYear: Word): TDateTime; overload;

function StartOfADay(const AYear, AMonth, ADay: Word): TDateTime; overload;

Description

StartOfADay returns the first expressible moment (12:00:000 AM) of a specified day.

The AYear parameter specifies the year of the desired day.

The ADayOfYear parameter specifies the desired day as a day of the year, where 1 is January 1, 2 is January 2, 32 is February 1, and so on.

The AMonth and ADay parameters specify the desired day as a month of the year and day of the month. AMonth can range from 1 to 12. ADay can range from 1 to 28, 29, 30, or 31, depstarting on the values of AYear and AMonth.

If the parameters do not specify a valid date, StartOfADay raises an EConvertError exception.


StartOfAMonth function
 VCL Reference

StartOfAMonth function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified month.

Unit

DateUtils

Category

date/time routines

function StartOfAMonth(const AYear, AMonth: Word): TDateTime;

Description

StartOfAMonth returns the first expressible moment (12:00:000 AM) of the first day of a specified month.

The AYear parameter specifies the year of the desired month.

The AMonth parameter specifies the month. It can range from 1 to 12.

If the parameters do not specify a valid month, StartOfAMonth raises an EConvertError exception.


StartOfAWeek function
 VCL Reference

StartOfAWeek function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day of a specified week.

Unit

DateUtils

Category

date/time routines

function StartOfAWeek(const AYear, AWeekOfYear: Word; const ADayOfWeek: Word = 1): TDateTime;

Description

StartOfAWeek returns the first expressible moment (12:00:000 AM) of the specified day of the specified week.

The AYear parameter specifies the year of the desired day.

The AWeekOfYear parameter specifies the week of the year, where 1 is the first week in AYear that includes four or more days.

The ADayOfWeek parameter indicates the desired day in the specified week, where 1 is Monday, 2 is Tuesday, and so on.

If the parameters do not specify a valid date, StartOfAWeek raises an EConvertError exception.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.


StartOfAYear function
 VCL Reference

StartOfAYear function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified year.

Unit

DateUtils

Category

date/time routines

function StartOfAYear(const AYear): TDateTime;

Description

StartOfAYear returns the first expressible moment (January 1 at 12:00:000 AM) of the year specified by the AYear parameter.


StartOfTheDay function
 VCL Reference

StartOfTheDay function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the day identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function StartOfTheDay(const AValue: TDateTime): TDateTime;

Description

StartOfTheDay returns the first expressible moment of the same day as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 0 and returns the result.


StartOfTheMonth function
 VCL Reference

StartOfTheMonth function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the month identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function StartOfTheMonth(const AValue: TDateTime): TDateTime;

Description

StartOfTheMonth returns the first expressible moment of the same month as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 0, changes the day to 1, and returns the result.


StartOfTheWeek function
 VCL Reference

StartOfTheWeek function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the week identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function StartOfTheWeek(const AValue: TDateTime): TDateTime;

Description

StartOfTheWeek returns the first expressible moment of the same week as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 0, changes the day to Monday, and returns the result.

Note:	StartOfTheWeek defines the week of AValue according to the ISO 8601 standard. That is, the week starts on Monday and ends on Sunday.


StartOfTheYear function
 VCL Reference

StartOfTheYear function

See also

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the year identified by a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function StartOfTheYear(const AValue: TDateTime): TDateTime;

Description

StartOfTheYear returns the first expressible moment of the same year as the TDateTime specified by AValue. That is, it replaces the time portion of AValue with 0, changes the day to January 1, and returns the result.


TimeOf function
 VCL Reference

TimeOf function

See also

Strips the date portion from a TDateTime value.

Unit

DateUtils

Category

date/time routines

function TimeOf(const AValue: TDateTime): TDateTime;

Description

Call TimeOf to convert a TDateTime value to a TDateTime value that includes only the time information (sets the date portion to 0, which means 12/30/1899).


Today function
 VCL Reference

Today function

See also

Returns a TDateTime value that represents the current date.

Unit

DateUtils

Category

date/time routines

function Today: TDateTime;

Description

Today returns a TDateTime value with the date portion set to the current date and the time portion set to 0.


Tomorrow function
 VCL Reference

Tomorrow function

See also

Returns a TDateTime value that represents the following day.

Unit

DateUtils

Category

date/time routines

function Tomorrow: TDateTime;

Description

Tomorrow returns a TDateTime value with the date portion set to the day following the current date and the time portion set to 0.


TryEncodeDateDay function
 VCL Reference

TryEncodeDateDay function

See also

Calculates the TDateTime value that represents a specified day of the year for a specified year.

Unit

DateUtils

Category

date/time routines

function TryEncodeDateDay(const AYear, ADayOfYear: Word; out AValue: TDateTime): Boolean;

Description

TryEncodeDateDay calculates the TDateTime value for the date specified by the AYear and ADayOfYear parameters.

AYear is the year. It can be any value between 1 and 9999 (inclusive).

ADayOfYear is the day of the year, where 1 is January , 2 is January 2, 32 is February 1, and so on.

AValue returns the specified date as a TDateTime value. The time portion of AValue is 0 (Midnight at the start of the specified day).

TryEncodeDateDay returns True if AYear and ADayOfYear represent a valid date, and False if  ADayOfYear is less than 1 or greater than the number of days in AYear.


TryEncodeDateMonthWeek function
 VCL Reference

TryEncodeDateMonthWeek function

See also

Calculates the TDateTime value that represents a specified day of a specified week in a specified month and year.

Unit

DateUtils

Category

date/time routines

function TryEncodeDateMonthWeek(const AYear, AMonth, AWeekOfMonth, ADayOfWeek: Word; out AValue: TDateTime): Boolean;

Description

TryEncodeDateMonthWeek calculates the TDateTime value for the date specified by the AYear, AMonth, AWeekOfMonth, and ADayOfWeek parameters.

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AMonth is the year. It can be any value between 1 and 12 (inclusive).

AWeekOfMonth is the week within that month, where 1 is the first week that includes four or more days. Note that if the first calendar day of the month is a Friday, Saturday, or Sunday, then those three days must be expressed using AMonth set to the previous month and AWeekOfMonth set to the number of weeks in the previous month. Similarly, if the last calendar day of the month is a Monday, Tuesday, or Wednesday, then those three days are expressed with AMonth set to the following month and AWeekOfMonth set to 1.

ADayOfWeek is the day of the week, where 1 Monday, 2 is Tuesday, and so on.

AValue returns the specified date as a TDateTime value. The time portion of AValue is 0 (Midnight at the start of the specified day).

TryEncodeDateMonthWeek returns True if AYear, AMonth, AWeekOfMonth, and ADayOfWeek represent a valid date, and False if any of these parameters are not in the valid range.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


TryEncodeDateTime function
 VCL Reference

TryEncodeDateTime function

See also

Calculates the TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

Unit

DateUtils

Category

date/time routines

function TryEncodeDateTime(const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AValue: TDateTime): Boolean;

Description

TryEncodeDateTime calculates the TDateTime value for the values specified as the AYear, AMonth, ADay, AHour, AMinute, ASecond, and AMilliSecond parameters.

The year must be between 1 and 9999.

Valid month values are 1 through 12.

Valid day values are 1 through 28, 29, 30, or 31, depending on the month value. For example, the possible day values for month 2 (February) are 1 through 28 or 1 through 29, depending on whether or not the year value specifies a leap year.

Valid hour values are 0 through 24. (If the specified hour is 24, the minute, second, and millisecond values should all be 0, and the resulting TDateTime value represents midnight at the end of the specified day and the beginning of the next day).

Valid minute values are 0 through 59.

Valid second values are 0 through 59.

Valid millisecond values are 0 through 999.

AValue returns the specified date and time as a TDateTime value.

TryEncodeDateDay returns True if the parameters are all within range, and False otherwise.


TryEncodeDateWeek function
 VCL Reference

TryEncodeDateWeek function

See also

Calculates the TDateTime value that represents a specified day of a specified week in a specified year.

Unit

DateUtils

Category

date/time routines

function TryEncodeDateWeek(const AYear, AWeekOfYear: Word; out AValue: TDateTime; const ADayOfWeek: Word = 1): Boolean;

Description

TryEncodeDateWeek calculates the TDateTime value for the date specified by the AYear, AWeekOfYear, and ADayOfWeek parameters.

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AWeekOfYear is the week within that year, where 1 is the first week that includes four or more days. Note that if the first calendar day of the year is a Friday, Saturday, or Sunday, then those three days must be expressed using AYear set to the previous year and AWeekOfYear set to the number of weeks in the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then those three days are expressed with AYear set to the following year and AWeekOfYear set to 1.

ADayOfWeek is the day of the week, where 1 Monday, 2 is Tuesday, and so on.

AValue returns the specified date as a TDateTime value. The time portion of AValue is 0 (Midnight at the start of the specified day).

TryEncodeDateWeek returns True if AYear, AWeekOfYear, and ADayOfWeek represent a valid date, and False if any of these parameters are not in the valid range.

Note:	The definitions for AWeekOfYear and ADayOfWeek follow the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


TryEncodeDayOfWeekInMonth function
 VCL Reference

TryEncodeDayOfWeekInMonth function

See also

Calculates a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

Unit

DateUtils

Category

date/time routines

function TryEncodeDayOfWeekInMonth(const AYear, AMonth, ANthDayOfWeek, ADayOfWeek: Word, out AValue: TDateTime): Boolean;

Description

TryEncodeDayOfWeekInMonth returns a TDateTime value for the date specified by the AYear, AMonth, ANthDayOfWeek, and ADayOfWeek parameters. The time portion of the return value is 0 (Midnight at the start of the specified day).

AYear is the year. It can be any value between 1 and 9999 (inclusive).

AMonth is the month. It can be any value between 1 and 12 (inclusive).

ANthDayOfWeek indicates the occurrence for the day of the week represented by ADayOfWeek. It can be any value between 1 and 5 (inclusive), as long as this value specifies a valid date. For example, if a month does not include 5 Mondays, setting ANthDayOfWeek to 5 and ADayOfWeek to 1 causes TryEncodeDayOfWeekInMonth to return False.

ADayOfWeek is the day of the week, where 1 Monday and 7 is Sunday.

TryEncodeDayOfWeekInMonth returns True if AYear, AMonth, ANthDayOfWeek, and ADayOfWeek represent a valid date, and False if this combination does not correspond to a valid date.

Note:	The definition for ADayOfWeek follows the ISO 8601 standard.

Tip:	To make the ADayOfWeek value more readable, use the Day of week constants.


TryJulianDateToDateTime function
 VCL Reference

TryJulianDateToDateTime function

See also

Converts a Julian date to a TDateTime value.

Unit

DateUtils

Category

measurement conversion routines

function TryJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;

Description

Call TryJulianDateToDateTime to convert a Julian date to the corresponding TDateTime value.

AValue is the Julian date to convert. The Julian date is the number of days, including fractional days, since 4713 BC January 1, Greenwich noon. Julian dates are used by astronomers, geophysicist, and others who need an unambiguous dating system based on continuing day counts.

ADateTime returns the corresponding TDateTime value.

TryJulianDateToDateTime returns True if it can successfully convert AValue to a TDateTime value. It returns False if it can’t convert AValue into a TDateTime value.


TryModifiedJulianDateToDateTime function
 VCL Reference

TryModifiedJulianDateToDateTime function

See also

Converts a modified Julian date to a TDateTime value.

Unit

DateUtils

Category

measurement conversion routines

function TryModifiedJulianDateToDateTime(const AValue: Double; out ADateTime: TDateTime): Boolean;

Description

Call TryModifiedJulianDateToDateTime to convert a modified Julian date to the corresponding TDateTime value.

AValue is the modified Julian date to convert. The modified Julian date is the number of days, including fractional days, since Greenwich midnight on November 17, 1858. Modified Julian dates are based on Julian dates, but adjusted to use midnight rather than noon as a starting point and to use a more recent date as a starting point.

ADateTime returns the corresponding TDateTime value.

TryModifiedJulianDateToDateTime returns True if it can successfully convert AValue to a TDateTime value. It returns False if it can’t convert AValue into a TDateTime value.


TryRecodeDateTime function
 VCL Reference

TryRecodeDateTime function

See also

Selectively replaces parts of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function TryRecodeDateTime(const AValue: TDateTime; const AYear, AMonth, ADay, AHour, AMinute, ASecond, AMilliSecond: Word; out AResult: TDateTime): Boolean;

Description

Call TryRecodeDateTime to convert the date/time value specified by AValue with the value obtained by changing the year to AYear, the month to AMonth, the day of the month to ADay, the hour to AHour, the minute to AMinute, the second to ASecond, and the millisecond to AMilliSecond. Any one of these parameters can be set to RecodeLeaveFieldAsIs, which tells TryRecodeDateTime not change the existing portion of the TDateTime value.

AYear can range from 1 to 9999 (or be RecodeLeaveFieldAsIs).

AMonth can range from 1 to 12 (or be RecodeLeaveFieldAsIs).

Legal values for ADay depend on the month represented by AMonth. (For example, if AMonth is 1, ADay can range from 1 to 31; if AMonth is 2, ADay can range from 1 to 28 or 1 to 29, depending on the year; and so on.) ADay can also be RecodeLeaveFieldAsIs.

AHour can range from 0 to 24 (or be RecodeLeaveFieldAsIs). If AHour is 24, AMinute, ASecond, and AMilliSecond must all be 0.

AMinute can range from 0 to 59  (or be RecodeLeaveFieldAsIs).

ASecond can range from 0 to 59 (or be RecodeLeaveFieldAsIs).

AMilliSecond can range from 0 to 999 (or be RecodeLeaveFieldAsIs).

AResult returns the results of making the specified changes to AValue.

TryRecodeDateWeek returns True if the parameters are all in the valid range, False otherwise.


UnixToDateTime function
 VCL Reference

UnixToDateTime function

See also

Converts a Unix-based date-and-time value to a TDateTime value.

Unit

DateUtils

Category

measurement conversion routines

function UnixToDateTime(const AValue: Int64): TDateTime;

Description

Call UnixToDateTime to convert the Unix encoding of a date and time value into the corresponding TDateTime value.

Unix date-and-time values are encoded as the number of seconds that have elapsed since midnight at the start of January 1, 1970.


WeekOf function
 VCL Reference

WeekOf function

See also

Returns the week of the year represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function WeekOf(const AValue: TDateTime): Word;

Description

Call WeekOf to obtain the week of the year represented by a specified TDateTime value. WeekOf returns a value between 1 and 53.

WeekOf uses the ISO 8601 standard to define the the week of the year. That is, a week is defined as running from Monday through Sunday, and the first week of the year is defined as the one the first calendar week of the year is the one that includes the first Thursday of the year (the first week that includes four or more days in the year). This means that if the first calendar day of the year is a Friday, Saturday, or Sunday, then for the first three, two, or one days of the calendar year, WeekOf returns the last week of the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then for the last one, two, or three days of the calendar year, WeekOf returns 1 (the first week of the next calendar year).

Note:	WeekOf returns the same value as the WeekOfTheYear function.


WeekOfTheMonth function
 VCL Reference

WeekOfTheMonth function

See also

Returns the week of the month represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function WeekOfTheMonth(const AValue: TDateTime): Word; overload;

function WeekOfTheMonth(const AValue: TDateTime; var AYear, AMonth: Word): Word; overload;

Description

Call WeekOfTheMonth to obtain the week of the month represented by a specified TDateTime value. WeekOfTheMonth returns a value between 1 and 6.

AYear and AMonth return the year and month in which WeekOfTheMonth occurs. Note that these values may not be the same as the year and month of AValue. This is because the first week of a month is defined as the first week with four or more days in that month. Thus, if the first day of the month is a Friday, Saturday, or Sunday, the first one, two, or three days of the month are defined as belonging to the last week of the previous month. Similarly, if the last day of the month is a Monday, Tuesday, or Wednesday, then the last one, two, or three days of the month are defined as belonging to the first week of the next month.

Tip:	To count weeks based on the weekday of the date/time value, use the NthDayOfWeek function instead. For example, if AValue represents a Saturday that is the first day of a month, WeekOfTheMonth returns 5 (or maybe 4), indicating the last week of the previous month, while NthDayOfWeek returns 1 AValue is the first Saturday in the month.

Note:	WeekOfTheMonth uses the ISO 8601 standard definition of a week. That is, a week is considered to start on a Monday and end on a Sunday.


WeekOfTheYear function
 VCL Reference

WeekOfTheYear function

See also

Returns the week of the year represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function WeekOfTheYear(const AValue: TDateTime): Word; overload;

function WeekOfTheYear(const AValue: TDateTime; var AYear): Word; overload;

Description

Call WeekOfTheYear to obtain the week of the year represented by a specified TDateTime value. WeekOfTheYear returns a value between 1 and 53.

AYear returns the year in which the specified week occurs. Note that this may not be the same as the year of AValue. This is because the first week of a year is defined as the first week with four or more days in that year. This means that if the first calendar day of the year is a Friday, Saturday, or Sunday, then for the first three, two, or one days of the calendar year, WeekOfTheYear returns the last week of the previous year. Similarly, if the last calendar day of the year is a Monday, Tuesday, or Wednesday, then for the last one, two, or three days of the calendar year, WeekOfTheYear returns 1 (the first week of the next calendar year).

Note:	WeekOfTheYear uses the ISO 8601 standard definition of a week. That is, a week is considered to start on a Monday and end on a Sunday.

Note:	WeekOfTheYear returns the same value as the WeekOf function.


WeeksBetween function
 VCL Reference

WeeksBetween function

See also

Returns the number of whole weeks between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function WeeksBetween(const ANow, AThen: TDateTime): Integer;

Description

Call WeeksBetween to obtain the difference, in weeks, between two TDateTime values. WeeksBetween counts only whole Weeks that have elapsed. Thus, WeeksBetween reports the difference between January 1 at 12:00 AM and Jan 6 at 11:58 PM as 0 because the difference is one minute short of an entire week.


WeeksInAYear function
 VCL Reference

WeeksInAYear function

See also

Returns the number of weeks in a specified year.

Unit

DateUtils

Category

date/time routines

function WeeksInAYear(const AYear: Word): Word;

Description

Call WeeksInAYear to obtain the number of weeks in the year specified by AYear. AYear is a year between 1 and 9999 (inclusive).

Note:	WeeksInAYear defines the first week of the year according to the ISO 8601 standard. That is, the first week of the year is the one that includes the first Thursday of the year (the first week that has 4 or more days in the year). This means that WeeksInAYear always returns either 52 or 53.


WeeksInYear function
 VCL Reference

WeeksInYear function

See also

Returns the number of weeks in the year of a specified TDateTime value.

Unit

DateUtils

Category

date/time routines

function WeeksInYear(const AValue: TDateTime): Word;

Description

Call WeeksInYear to obtain the number of weeks in the year of the TDateTime value specified by AValue.

Note:	WeeksInYear defines the first week of the year according to the ISO 8601 standard. That is, the first week of the year is the one that includes the first Thursday of the year (the first week that has 4 or more days in the year). This means that WeeksInYear always returns either 52 or 53.


WeekSpan function
 VCL Reference

WeekSpan function

See also

Returns the number of weeks (including fractional weeks) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function WeekSpan(const ANow, AThen: TDateTime): Double;

Description

Call WeekSpan to obtain the difference, in weeks, between two TDateTime values. Unlike the WeeksBetween function, which only counts whole weeks, WeekSpan reports incomplete weeks as a fraction of an entire week.


WithinPastDays function
 VCL Reference

WithinPastDays function

See also

Indicates whether two dates are within a specified number of days of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastDays(const ANow, AThen: TDateTime; const ADays: Integer): Boolean;

Description

Call WithinPastDays to determine whether the date specified by ANow is within ADays days of the date specified by AThen.

Note:	WithinPastDays uses the DaysBetween function, which means that fractional days do not count. If ANow and AThen are 2 and a half days apart, calling WithinPastDays with ADays set to 2 returns True.


WithinPastHours function
 VCL Reference

WithinPastHours function

See also

Indicates whether two date/time values are within a specified number of hours of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastHours(const ANow, AThen: TDateTime; const AHours: Int64): Boolean;

Description

Call WithinPastHours to determine whether the date and time specified by ANow is within AHours hours of the date and time specified by AThen.

Note:	WithinPastHours uses the HoursBetween function, which means that fractional hours do not count. If ANow and AThen are 2 and a half hours apart, calling WithinPastHours with AHours set to 2 returns True.


WithinPastMilliSeconds function
 VCL Reference

WithinPastMilliSeconds function

See also

Indicates whether two date/time values are within a specified number of milliseconds of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastMilliSeconds(const ANow, AThen: TDateTime; const AMilliSeconds: Int64): Boolean;

Description

Call WithinPastMilliSeconds to determine whether the date and time specified by ANow is within AMilliSeconds milliseconds of the date and time specified by AThen.


WithinPastMinutes function
 VCL Reference

WithinPastMinutes function

See also

Indicates whether two date/time values are within a specified number of minutes of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastMinutes(const ANow, AThen: TDateTime; const AMinutes: Int64): Boolean;

Description

Call WithinPastMinutes to determine whether the date and time specified by ANow is within AMinutes minutes of the date and time specified by AThen.

Note:	WithinPastMinutes uses the MinutesBetween function, which means that fractional minutes do not count. If ANow and AThen are 2 and a half minutes apart, calling WithinPastMinutes with AMinutes set to 2 returns True.


WithinPastMonths function
 VCL Reference

WithinPastMonths function

See also

Indicates whether two date/time values are within a specified number of months of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastMonths(const ANow, AThen: TDateTime; const AMonths: Integer): Boolean;

Description

Call WithinPastMonths to determine whether the date specified by ANow is within AMonths months of the date specified by AThen.

Note:	WithinPastMonths uses the MonthsBetween function, which means that fractional months do not count. If ANow and AThen are 2 and a half months apart, calling WithinPastMonths with AMonths set to 2 returns True.


WithinPastSeconds function
 VCL Reference

WithinPastSeconds function

See also

Indicates whether two date/time values are within a specified number of seconds of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastSeconds(const ANow, AThen: TDateTime; const ASeconds: Int64): Boolean;

Description

Call WithinPastSeconds to determine whether the date and time specified by ANow is within ASeconds seconds of the date and time specified by AThen.

Note:	WithinPastSeconds uses the SecondsBetween function, which means that fractional seconds do not count. If ANow and AThen are 2 and a half seconds apart, calling WithinPastSeconds with ASeconds set to 2 returns True.


WithinPastWeeks function
 VCL Reference

WithinPastWeeks function

See also

Indicates whether two date/time values are within a specified number of weeks of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastWeeks(const ANow, AThen: TDateTime; const AWeeks: Integer): Boolean;

Description

Call WithinPastWeeks to determine whether the date specified by ANow is within AWeeks weeks of the date specified by AThen.

Note:	WithinPastWeeks uses the WeeksBetween function, which means that fractional weeks do not count. If ANow and AThen are 2 and a half weeks apart, calling WithinPastWeeks with AWeeks set to 2 returns True.


WithinPastYears function
 VCL Reference

WithinPastYears function

See also

Indicates whether two date/time values are within a specified number of years of each other.

Unit

DateUtils

Category

date/time routines

function WithinPastYears(const ANow, AThen: TDateTime; const AYears: Integer): Boolean;

Description

Call WithinPastYears to determine whether the date specified by ANow is within AYears years of the date specified by AThen.

Note:	WithinPastYears uses the YearsBetween function, which means that fractional years do not count. If ANow and AThen are 2 and a half years apart, calling WithinPastYears with AYears set to 2 returns True.


YearOf function
 VCL Reference

YearOf function

See also	Example

Returns the year represented by a TDateTime value.

Unit

DateUtils

Category

date/time routines

function YearOf(const AValue: TDateTime): Word;

Description

Call YearOf to obtain the year represented by a specified TDateTime value. YearOf returns a value between 1 and 9999.


YearsBetween function
 VCL Reference

YearsBetween function

See also

Returns the approximate number of years between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function YearsBetween(const ANow, AThen: TDateTime): Integer;

Description

Call YearsBetween to obtain the difference, in years, between two TDateTime values. Because years are not all the same length (e.g. leap years), YearsBetween returns an approximation based on an assumption of 365.25 days per year. Fractional years are not counted. Thus, for example, YearsBetween reports the difference between Jan 1 and Dec 31 as 0 on non-leap years and 1 on leap years.


YearSpan function
 VCL Reference

YearSpan function

See also

Returns the approximate number of years (including fractions thereof) between two specified TDateTime values.

Unit

DateUtils

Category

date/time routines

function YearSpan(const ANow, AThen: TDateTime): Double;

Description

Call YearSpan to obtain the difference, in years, between two TDateTime values. Because years are not all the same length (e.g. leap years), YearsBetween returns an approximation based on an assumption of 365.25 days per year. Unlike the YearsBetween function, which does not report fractional years, YearSpan reports incomplete years as a fraction of a 365.25-day year.


Yesterday function
 VCL Reference

Yesterday function

See also

Returns a TDateTime value that represents the preceding day.

Unit

DateUtils

Category

date/time routines

function Yesterday: TDateTime;

Description

Yesterday returns a TDateTime value with the date portion set to the day before the current date and the time portion set to 0.


CreateMessageDialog function
 VCL Reference

CreateMessageDialog function

See also

Creates a specified message dialog.

Unit

Dialogs

Category

dialog and message routines

function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm;

Description

Call CreateMessageDialog to create a message dialog that will be used several times in an application. CreateMessageDialog returns a dialog of the type specified by the DlgType parameter and with the buttons indicated by the Buttons parameter. Users can copy messages created using CreateMessageDialog to the clipboard by pressing Ctrl+C.

Note:	CreateMessageDialog does not display the dialog form. The application must display this form when it is needed by calling its ShowModal method.


ForceCurrentDirectory variable
 VCL Reference

ForceCurrentDirectory variable

See also

Indicates whether open and save dialogs should display the current directory if no initial directory is assigned.

Unit

Dialogs

Category

dialog and message routines

var ForceCurrentDirectory: Boolean = False;

Description

ForceCurrentDirectory indicates how open and save dialogs should initialize the directory if the InitialDir property is not set to a valid directory. When ForceCurrentDirectory is True, the dialog opens with the current directory assigned. When ForceCurrentDirectory is False, the initial directory is either the current directory or the My Documents directory, depending on the version of Windows.


InputBox function
 VCL Reference

InputBox function

See also 	Example

Displays an input dialog box that lets the user enter a string.

Unit

Dialogs

Category

dialog and message routines

function InputBox(const ACaption, APrompt, ADefault: string): string;

Description

Call InputBox to bring up an input dialog box ready for the user to enter a string in its edit box.

ACaption is the caption of the dialog box.

APrompt is the text that prompts the user to enter input in the edit box.

ADefault is the string that appears in the edit box when the dialog box first appears.

If the user chooses the Cancel button, InputBox returns the default string. If the user chooses the OK button, InputBox returns the string in the edit box.

Use the InputBox function when there is a default value that should be used when the user chooses the Cancel button (or presses Esc) to exit the dialog. If the application needs to know whether the user chooses OK or Cancel, use the InputQuery function instead.


InputQuery function
 VCL Reference

InputQuery function

See also 	Example

Displays an input dialog box that lets the user enter a string.

Unit

Dialogs

Category

dialog and message routines

function InputQuery(const ACaption, APrompt: string; var Value: string): Boolean;

Description

Call InputQuery to bring up an input dialog box ready for the user to enter a string in its edit box.

ACaption is the caption of the dialog box.

APrompt is the text that prompts the user to enter input in the edit box.

Value is the string that appears in the edit box when the dialog box first appears and which returns the value that the user enters.

InputQuery returns True if the user chooses OK, and False if the user chooses Cancel or presses the Esc key.

If a default value should be used when the user cancels out of the dialog, use InputBox instead.


MessageDlg function
 VCL Reference

MessageDlg function

See also 	Example

Displays a message dialog box in the center of the screen.

Unit

Dialogs

Category

dialog and message routines

function MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Word;

Description

Call MessageDlg to bring up a message box and obtain the user's response.

Msg is the content of the message that appears.

DlgType indicates the purpose of the dialog.

Buttons indicates what buttons should appear in the message box.

HelpCtx specifies the context ID for the help topic that should appear when the user clicks the help button or presses F1 while the dialog is displayed.

MessageDlg returns the value of the button the user selected. The following table lists the TMsgDlgBtn values for each type of button that can appear in the message box, and the corresponding value that is returned if the user selects that button:

TMsgDlgBtn Value	Corresponding return value

mbOK	mrOk

mbCancel	mrCancel

mbYes	mrYes

mbNo	mrNo

mbAbort	mrAbort

mbRetry	mrRetry

mbIgnore	mrIgnore

mbAll	mrAll

mbNoToAll	mrNoToAll

mbYesToAll	mrYesToAll

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


MessageDlgPos function
 VCL Reference

MessageDlgPos function

See also 	Example

Displays a message dialog box at the specified screen coordinates.

Unit

Dialogs

Category

dialog and message routines

function MessageDlgPos(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer): Word;

Description

Call MessageDlgPos to bring up a message box at a particular location.

Msg is the content of the message that appears.

DlgType indicates the purpose of the dialog.

Buttons indicates what buttons should appear in the message box.

HelpCtx specifies the context ID for the help topic that should appear when the user clicks the help button or presses F1 while the dialog is displayed.

X and Y specify the screen coordinates where the dialog should appear.

MessageDlgPos returns the value of the button the user selected. The following table lists the TMsgDlgBtn values for each type of button that can appear in the message box, and the corresponding value that is returned if the user selects that button:

TMsgDlgBtn Value	Corresponding return value

mbOK	mrOk

mbCancel	mrCancel

mbYes	mrYes

mbNo	mrNo

mbAbort	mrAbort

mbRetry	mrRetry

mbIgnore	mrIgnore

mbAll	mrAll

mbNoToAll	mrNoToAll

mbYesToAll	mrYesToAll

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


MessageDlgPosHelp function
 VCL Reference

MessageDlgPosHelp function

See also

Displays a message dialog box whose help is supplied in a named help file.

Unit

Dialogs

Category

dialog and message routines

function MessageDlgPosHelp(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; const HelpFileName: string): Word;

Description

Call MessageDlgPosHelp to bring up a message box when the associated help comes from a help file other than the default help file.

Msg is the content of the message that appears.

DlgType indicates the purpose of the dialog.

Buttons indicates what buttons should appear in the message box.

HelpCtx specifies the context ID for the help topic in the file specified by HelpFileName. This topic appears when the user clicks the help button or presses F1 while the dialog is displayed.

X and Y specify the screen coordinates where the dialog should appear.

HelpFileName specifies the help file that contains the help topic for this message box.

MessageDlgPosHelp returns the value of the button the user selected. The following table lists the TMsgDlgBtn values for each type of button that can appear in the message box, and the corresponding value that is returned if the user selects that button:

TMsgDlgBtn Value	Corresponding return value

mbOK	mrOk

mbCancel	mrCancel

mbYes	mrYes

mbNo	mrNo

mbAbort	mrAbort

mbRetry	mrRetry

mbIgnore	mrIgnore

mbAll	mrAll

mbNoToAll	mrNoToAll

mbYesToAll	mrYesToAll

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


PromptForFileName function
 VCL Reference

PromptForFileName function

See also

Displays an open or save dialog, where the user can specify a file name.

Unit

Dialogs

Category

dialog and message routines

function PromptForFileName(var AFileName: string; const AFilter: string = ''; const ADefaultExt: string = ''; const ATitle: string = ''; const AInitialDir: string = ''; SaveDialog: Boolean = False): Boolean;

Description

Call PromptForFileName to display an open or save dialog.

AFilename is the name of the file. The value supplied by the caller is used to initialize the file name in the dialog. On exit, AFileName contains the name specified in the dialog.

AFilter determines the file masks (filters) available in the dialog. If AFilter is set to an empty string, the dialog uses the string 'All files (*.*)|*.*', which causes the dialog to display all files in the current directory. For information on filter strings, see TOpenDialog.Filter.

ADefaultExt specifies a file extension that is appended automatically to the specified file name, unless the selected file name already includes a registered extension. If the user specifies a file name with an extension that is unregistered, ADefaultExt is appended to the unregistered extension.

ATitle specifies the title for the dialog. If ATitle is set to an empty string, the dialog uses ‘Open’ or ‘Save As’, depending on the value of the SaveDialog parameter.

AInitialDir specifies the directory displayed in the dialog when it opens. If AInitialDir is an empty string, or if the specified directory does not exist, the initial directory is controlled by the global ForceCurrentDirectory variable. If ForceCurrentDirectory is True, the dialog opens with the current working directory displayed. Otherwise, the dialog opens with either the current working directory (NT) or the My Documents directory (Windows 98 and Windows 2000).

SaveDialog specifies whether the file selection should be a Save As dialog (True) or an Open dialog (False).

PromptForFileName returns True if the user selected a file name, False if the user exited by clicking the cancel button.


ShowMessage procedure
 VCL Reference

ShowMessage procedure

See also 	Example

Displays a message box with an OK button.

Unit

Dialogs

Category

dialog and message routines

procedure ShowMessage(const Msg: string);

Description

Call ShowMessage to display a simple message box with an OK button. The name of the application's executable file appears as the caption of the message box.

Msg parameter is the message string that appears in the message box.

Note:	To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


ShowMessageFmt procedure
 VCL Reference

ShowMessageFmt procedure

See also

Displays a message box with a formatted message.

Unit

Dialogs

Category

dialog and message routines

procedure ShowMessageFmt(const Msg: string; Params: array of const);

Description

Call ShowMessageFmt to display a simple message box with an OK button. The name of the application's executable file appears as the caption of the message box.

The Msg parameter is a format string for the message that appears in the message box. The Params parameter provides the parameters that are assembled into the message.

For more information about how messages are formatted, see Format Strings.

To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


ShowMessagePos procedure
 VCL Reference

ShowMessagePos procedure

See also

Displays a message box at a specified location.

Unit

Dialogs

Category

dialog and message routines

procedure ShowMessagePos(const Msg: string; X, Y: Integer);

Description

Call ShowMessagePos to display a simple message box with an OK button at a specified location. The name of the application's executable file appears as the caption of the message box.

The Msg parameter is the message that appears in the message box.

X and Y specify the screen coordinates where the message box should appear.

To display a message in a message box with other buttons, or with an icon, use the MessageDlg function.

Note:	If the user types Ctrl+C in the message box, the text of the message is copied to the clipboard.


GReferenceExpandable variable
 VCL Reference

GReferenceExpandable variable

Indicates whether the Object Inspector treats component properties as expandable subproperties.

Unit

DesignEditors

Category

design tool registration routines

var GReferenceExpandable: Boolean = True;

Description

GReferenceExpandable controls whether the Object Inspector lets you expand properties whose values are components to access the properties of the subcomponent. By default, GReferenceExpandable is True, meaning component properties can be expanded. If you change GReferenceExpandable to False, you must select the component that is the value of a property in order to access its properties.


GShowReadOnlyProps variable
 VCL Reference

GShowReadOnlyProps variable

Indicates whether the Object Inspector displays published read-only properties.

Unit

DesignEditors

Category

design tool registration routines

var GShowReadOnlyProps: Boolean = True;

Description

GShowReadOnlyProps controls whether the Object Inspector shows published read-only properties. By default, GShowReadOnlyProps is True, meaning read-only properties appear in the Object Inspector as grayed out entries. If you change GShowReadOnlyProps to False, read-only properties do not appear in the Object Inspector at all, even if they are published.


RegisterComponentEditor procedure
 VCL Reference

RegisterComponentEditor procedure

See also

Registers an editor so that it is available at design time.

Unit

DesignIntf

Category

design tool registration routines

procedure RegisterComponentEditor(ComponentClass: TComponentClass; ComponentEditor: TComponentEditorClass);

Description

Call RegisterComponentEditor to allow objects instantiated from the specified ComponentClass or one of its descendants use the editor at design time. A registered component editor (identified by ComponentEditor) is created for each component of ComponentClass that is selected in the form designer.  When the component is double-clicked the Edit method of the component editor is called.  When the user right-clicks the component, the GetVerbCount and GetVerb methods of the editor are called to build context menu.

ComponentClass must identify a descendant of TComponent. ComponentEditor must identify a descendant of TBaseComponentEditor that implements the IComponentEditor interface.

If no component editor is registered, the component uses the default component editor. The default component editor (TDefaultEditor) implements Edit to search the events of the component and bring up the code editor for the first event it finds.


RegisterPropertyEditor procedure
 VCL Reference

RegisterPropertyEditor procedure

See also

Allows a component to bring up a custom property editor from the Object Inspector.

Unit

DesignIntf

Category

design tool registration routines

procedure RegisterPropertyEditor(PropertyType: PTypeInfo; ComponentClass: TClass; const PropertyName: string; EditorClass: TPropertyEditorClass);

Description

Call RegisterPropertyEditor to associate the property editor class specified by the EditorClass parameter with the property type specified by the PropertyType parameter.

When a component is selected, the Object Inspector creates a property editor for each of the component's properties, based on the type of the property.  For example, if the property type is an Integer, the property editor for Integer will be created (by default that would be TIntegerProperty). Most properties do not need specialized property editors.  For example, if the property is an ordinal type the default property editor will restrict the range to the subtype range.

When a property type can not be properly edited using the default property editor or one of the existing property editors, use RegisterPropertyEditor to associate a custom property editor with the property type. This is typically because the property is an object.

When registering a property editor, set PropertyType to the type information pointer returned by the TypeInfo function. For example, TypeInfo(TPropertyObject).Set the ComponentClass parameter to restrict the property editor to a component class and its descendants. Setting ComponentClass to nil associates the property editor with the property type for any component.

Set the PropertyName parameter to restrict the property editor to properties with a specific name as well as the specified property type. Setting PropertyName to an empty string associates the property editor with any property of the specified type.

Set the EditorClass parameter to the class of the property editor that should be displayed when the property is selected in the Object Inspector. This class must be a descendant of TBasePropertyEditor that implements the IProperty interface.


RegisterPropertyInCategory function
 VCL Reference

RegisterPropertyInCategory function

See also

Registers a single property in a specific property category.

Unit

DesignIntf

Category

Property category routines

procedure RegisterPropertyInCategory(const CategoryName, PropertyName: string); overload;

procedure RegisterPropertyInCategory(const CategoryName: string; PropertyType: PTypeInfo); overload;

procedure RegisterPropertyInCategory(const CategoryName: string; PropertyType: PTypeInfo; const PropertyName: string); overload;

procedure RegisterPropertyInCategory(const CategoryName: string; ComponentClass: TClass; const PropertyName: string); overload;

Description

Call RegisterPropertyInCategory to associate a property with a specific category. Then, when the Object Inspector displays properties by category, the property appears under the associated category.

Properties can be identified by name (for example, all “Font” properties), by type (for example, all properties that are of type TComponentName), or by a combination of one of these and a component type (for example, all Integer properties belonging to a TField descendant).

CategoryName is the name of the property category with which you are registering a property.

PropertyName is the name of the property to register.

PropertyType is the type information record that describes the type of the property being registered. You can use the TypeInfo method to obtain this record for a type.

ComponentClass is the type of component whose properties fall in the specified category.


RegisterPropertiesInCategory function
 VCL Reference

RegisterPropertiesInCategory function

See also

Registers multiple properties in a specific property category.

Unit

DesignIntf

Category

Property category routines

procedure RegisterPropertiesInCategory(const CategoryName: string; const Filters: array of const); overload;

procedure RegisterPropertiesInCategory(const CategoryName: string; ComponentClass: TClass; const Filters: array of String); overload;

procedure RegisterPropertiesInCategory(const CategoryName: string; PropertyType: PTypeInfo; const Filters: array of String); overload;

Description

Call RegisterPropertiesInCategory to associate several properties at once with a specific category. Then, when the Object Inspector displays properties by category, those properties appear under the associated category.

RegisterPropertiesInCategory comes in three overloaded variations, each providing a different set of criteria for identifying the property to be associated with property categories.

CategoryName is the name of the category. This is the string that appears in the Object Inspector’s “View” menu item.

Filters is a set of property names or types that identify properties to be associated with the category. If Filters is an array of strings, it lists only property names. If it is an array of const, it can include types as well.

ComponentClass is the class of a component whose properties are to be associated with the category.

PropertyType is a type information record that describes the type of the properties being registered. You can use the TypeInfo method to obtain this record for a type.


IsPropertyInCategory function
 VCL Reference

IsPropertyInCategory function

See also

Indicates whether a property is in a specific property category.

Unit

Category

Property category routines

function IsPropertyInCategory(const Category: string; ComponentClass: TClass; const PropertyName: string): Boolean; overload;

function IsPropertyInCategory(const Category: string; const ClassName, PropertyName: string): Boolean; overload;

Description

Call IsPropertyInCategory to determine whether a specified property falls into an identified property category.

Category is the name of the property category to test.

ComponentClass is the type of the component about whose property you want to know the category.

PropertyName is the name of the property for which you want to know if it falls in the category.

ClassName is the class name for the component whose property you want to know the category.

IsPropertyInCategory returns True if the property is in the specified category, False if it is not.


MinimizeName function
 VCL Reference

MinimizeName function

See also

Shortens a fully qualified path name so that it can be drawn with a specified length limit.

Unit

FileCtrl

Category

file name utilities

function MinimizeName(const Filename: TFileName; Canvas: TCanvas; MaxLen: Integer): TFileName;

Description

Use MinimizeName to obtain a version of a file name and path that can be drawn on a limited size drawing surface. MinimizeName replaces directories in the path portion of the file name with dots until the resulting name fits the specified number of pixels in length.

MinimizeName returns the shortened name.

Filename is the fully qualified path name that (possibly) needs to be shortened.

Canvas is the drawing surface on which the resulting name is to be rendered. It is used to determine font metrics.

MaxLen is the length, in pixels, available for drawing the file name on the canvas.


ProcessPath procedure
 VCL Reference

ProcessPath procedure

See also

Parses a file name into its constituent parts.

Unit

FileCtrl

Category

file name utilities

procedure ProcessPath (const EditText: string; var Drive: Char; var DirPart: string; var FilePart: string);

Description

Call ProcessPath to parse a file name into its drive, path, and file name.  Pass the full file name that should be parsed as the EditText parameter.  ProcessPath returns the indicated drive, directory, and file name as the Drive, DirPart, and FilePart parameters.


SelectDirectory function
 VCL Reference

SelectDirectory function

See also 	Example

Brings up a dialog to allow the user to enter a directory name.

Unit

FileCtrl

Category

dialog and message routines

function SelectDirectory(const Caption: string; const Root: WideString; out Directory: string): Boolean; overload;

function SelectDirectory(var Directory: string; Options: TSelectDirOpts; HelpCtx: Longint): Boolean; overload;

Description

Call SelectDirectory to let the user enter a directory name.

Use the first syntax to display the Windows directory browser. The Caption parameter specifies a caption for the dialog. The Root parameter specifies the root directory from which to browse. The selected directory is returned as the Directory parameter. When using this syntax, SelectDirectory does not change the value of the current directory.

Warning:	You can’t use the same variable for the Root parameter and the Directory parameter.

Use the second syntax to call the Select Directory dialog box. The directory passed to the function with the Directory parameter appears as the currently selected directory when the dialog box appears. The name of the directory the user selects becomes the value of Directory when the function returns.

The HelpCtx parameter is the help context ID number.

The Options parameter is a set of values. If Options is the empty set, the user can only select a directory that already exists. No edit box is provided for the user to enter a new directory name. If Options is not empty, the included values determine how the dialog responds when the user types a nonexistent directory name.

With either syntax, SelectDirectory returns True if the user selected a directory and chose OK, and False if the user chose Cancel or closed the dialog box without selecting a directory.


FormatMaskText function
 VCL Reference

FormatMaskText function

See also

Returns a string formatted using an edit mask.

Unit

Category

miscellaneous routines

function FormatMaskText(const EditMask: string; const Value: string): string;

Description

Call FormatMaskText to apply the mask specified by the EditMask parameter to the text string specified by the Value parameter. The edit mask string consists of three fields with semicolons separating them. The first part of the mask is the mask itself. The second part is the character that determines whether the literal characters of the mask are matched to characters in the Value parameter or are inserted into the Value string. The third part of the mask is the character used to represent missing characters in the mask.

These are the special characters used in the first field of the mask:

Character	Meaning in mask

!	If a ! character appears in the mask, optional characters are represented in the returned string as leading blanks. If a ! character is not present, optional characters are represented in the returned string as trailing blanks.

>	If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered.

<	If a < character appears in the mask, all characters that follow are in lowercase until the end of the mask or until a > character is encountered.

<>	If these two characters appear together in a mask, no case checking is done and the data is formatted with the case present in the Value parameter.

\	The character that follows a \ character is a literal character. Use this character to use any of the mask special characters as a literal.

L	The L character requires an alphabetic character only in this position. For the US, this is A-Z, a-z.

l	The l character permits only an alphabetic character in this position, but doesn't require it.

A	The A character requires an alphanumeric character only in this position. For the US, this is A-Z, a-z, 0-9.

a	The a character permits an alphanumeric character in this position, but doesn't require it.

C	The C character requires an arbitrary character in this position.

c	The c character permits an arbitrary character in this position, but doesn't require it.

0	The 0 character requires a numeric character only in this position.

9	The 9 character permits a numeric character in this position, but doesn't require it.

#	The # character permits a numeric character or a plus or minus sign in this position, but doesn't require it.

:	The : character is used to separate hours, minutes, and seconds in times. If the character that separates hours, minutes, and seconds is different in the regional settings of the Control Panel, that character is substituted in the returned string.

/	The / character is used to separate months, days, and years in dates. If the character that separates months, days, and years is different in the regional settings of the Control Panel, that character is substituted in the returned string.

;	The ; character is used to separate the three fields of the mask.

_	The _ character automatically inserts spaces into the returned string.

Any character that does not appear in the preceding table can appear in the first part of the mask as a literal character. Literal characters are inserted automatically if the second field of the mask is 0, or matched to characters in the Value parameter if the second field is any other value. The special mask characters can also appear as literal characters if preceded by a backslash character (\).

The second field of the mask is a single character that indicates whether literal characters from the mask are included in the Value parameter. For example, the mask for a telephone number with area code could be the following string:

(000)_000-0000;0;*

The 0 in the second field indicates that the Value parameter should consist of the 10 digits of the phone number, rather than the 14 characters that make up the final formatted string.

A 0 in the second field indicates that literals are inserted into the Value string, any other character indicates that they should be included. The character to indicate whether literals should be included can be changed by changing the MaskNoSave typed constant that is declared in the MaskUtils unit.

The third field of the mask is the character that appears in the returned string for blanks (characters that do not appear in Value). By default, this is the same as the character that stands for literal spaces. The two characters appear the same in the returned string.

Note:	When working with multibyte character sets, such as Japanese Shift-JIS, each special mask character represents a single byte. To specify double-byte characters using the L,l,A,a,C, or c specifiers, the mask characters must be doubled as well. For example, LL would represent two single-byte alphabetic characters or a one double-byte character. Only single-byte literal characters are supported.


AssignPrn procedure
 VCL Reference

AssignPrn procedure

See also 	Example

Assigns a text-file variable to the printer.

Unit

Printers

Category

text file routines

procedure AssignPrn(var F: Text);

Description

Call AssignPrn to cause all information written to the text file variable F to be directed to the printer. After the variable is assigned, the application must call the Rewrite procedure.


Printer function
 VCL Reference

Printer function

See also	Example

Returns a global instance of TPrinter to manage interaction with the printer.

Unit

Printers

Category

printer support

function Printer: TPrinter;

Description

Printer creates an instance of a global TPrinter object the first time it is called. Use the Printer function to print using the TPrinter object.

Printer is declared in the Printers unit. To use the Printer function and the TPrinter object, add Printers to the uses clause of your unit.


SetPrinter function
 VCL Reference

SetPrinter function

See also

Replaces the global instance of TPrinter that manages interaction with the printer.

Unit

Printers

Category

printer support

function SetPrinter(NewPrinter: TPrinter): TPrinter;

Description

SetPrinter replaces the global TPrinter object with another TPrinter object. This allows applications to change the way they handle printing by substituting a TPrinter descendant for the default TPrinter object.

NewPrinter is the new TPrinter object that replaces the current global TPrinter object.

SetPrinter returns the previous global TPrinter object.

Note:	The global TPrinter object is freed automatically when the application shuts down. After a call to SetPrinter, the printer that is returned is not automatically freed. It is the caller’s responsibility to either free the return value, or replace it using another call to SetPrinter and to free the substitute printer that the second SetPrinter call returns.

SetPrinter is declared in the Printers unit. To use the SetPrinter function, add Printers to the uses clause of your unit.


CelsiusToFahrenheit function
 VCL Reference

CelsiusToFahrenheit function

See also

Converts a temperature expressed in degrees Celsius to the corresponding temperature in degrees Fahrenheit.

Unit

StdConvs

Category

measurement conversion routines

function CelsiusToFahrenheit(const AValue: Double): Double;

Description

Call CelsiusToFahrenheit to convert the temperature specified by AValue, which is in degrees Celsius, to the corresponding temperature in degrees Fahrenheit.


FahrenheitToCelsius function
 VCL Reference

FahrenheitToCelsius function

See also

Converts a temperature expressed in degrees Fahrenheit to the corresponding temperature in degrees Celsius.

Unit

StdConvs

Category

measurement conversion routines

function FahrenheitToCelsius(const AValue: Double): Double;

Description

Call FahrenheitToCelsius to convert the temperature specified by AValue, which is in degrees Fahrenheit, to the corresponding temperature in degrees Celsius.


conversion family variables
 VCL Reference

conversion family variables

See also

Represent a family of measurement units.

Unit

StdConvs

Category

measurement conversion routines

var

  cbArea: TConvFamily;

  cbDistance: TConvFamily;

  cbMass: TConvFamily;

  cbTemperature: TConvFamily;

  cbTime: TConvFamily;

  cbVolume: TConvFamily;

Description

The conversion family variables represent the pre-defined categories of measurement units. A number of standard units of measurement are registered for each of these pre-defined families. You can use the Convert function to convert between two measurements, as long as the units for each come from the same conversion family.

You can extend the Convert function’s ability to convert within any of these families by calling the RegisterConversionType function, which registers additional units of measurement within a specified family.

The following table describes the conversion families registered by the StdConvs unit:

Family	Registered units of measurement	Meaning
cbArea	area unit variables	Measurements of area such as square meters, acres, square feet, and so on. The base unit is square meters.
cbDistance	distance unit variables	Measurements of distance such as meters, feet, miles, and so on. The base unit is meters.
cbMass	mass unit variables	Measurements of weight such as grams, pounds, tons, and so on. The base unit is grams.
cbTemperature	temperature unit variables	Measurements of temperature such as degrees Celsius, degrees Fahrenheit, degrees Kelvin, and so on. The base unit is degrees Celsius.
cbTime	time unit variables	Measurements of time such as seconds, months, years, and so on. The base unit is days.
cbVolume	volume unit variables	Measurements of volume such as cubic centimeters, liters, quarts, and so on. The base unit is cubic meters.


area unit variables
 VCL Reference

area unit variables

See also

Represent units that measure area.

Unit

StdConvs

Category

measurement conversion routines

var

  auSquareMillimeters: TConvType;

  auSquareCentimeters: TConvType;

  auSquareDecimeters: TConvType;

  auSquareMeters: TConvType;

  auSquareDecameters: TConvType;

  auSquareHectometers: TConvType;

  auSquareKilometers: TConvType;

  auSquareInches: TConvType;

  auSquareFeet: TConvType;

  auSquareYards: TConvType;

  auSquareMiles: TConvType;

  auAcres: TConvType;

  auCentares: TConvType;

  auAres: TConvType;

  auHectares: TConvType;

  auSquareRods: TConvType;

Description

Use the area unit variables as parameters to the Convert function to convert an area measurement to a different set of units. The StdConvs unit registers these area measurement units in the cbArea family and assigns the resulting TConvType values to these global variables.


distance unit variables
 VCL Reference

distance unit variables

See also

Represent units that measure distance.

Unit

StdConvs

Category

measurement conversion routines

var

  duMicromicrons: TConvType;

  duAngstroms: TConvType;

  duMillimicrons: TConvType

  duMicrons: TConvType;

  duMillimeters: TConvType;

  duCentimeters: TConvType;

  duDecimeters: TConvType;

  duMeters: TConvType;

  duDecameters: TConvType;

  duHectometers: TConvType;

  duKilometers: TConvType;

  duMegameters: TConvType;

  duGigameters: TConvType;

  duInches: TConvType;

  duFeet: TConvType;

  duYards: TConvType;

  duMiles: TConvType;

  duNauticalMiles: TConvType

  duAstronomicalUnits: TConvType

  duLightYears: TConvType;

  duParsecs: TConvType;

  duCubits: TConvType;

  duFathoms: TConvType;

  duFurlongs: TConvType;

  duHands: TConvType;

  duPaces: TConvType;

  duRods: TConvType;

  duChains: TConvType;

  duLinks: TConvType;

  duPicas: TConvType;

  duPoints: TConvType;

Description

Use the distance unit variables as parameters to the Convert function to convert a distance measurement to a different set of units. The StdConvs unit registers these distance measurement units in the cbDistance family and assigns the resulting TConvType values to these global variables.

Note:	The distance units vary greatly in scale. If you are converting between distances that are all at one extreme (for example between parsecs and light years or between angstroms and microns), you may want to register your own conversion family (for example astronomical distances or microscopic distances) so that the conversions can be made with greater precision.


mass unit variables
 VCL Reference

mass unit variables

See also

Represent units that measure weight.

Unit

StdConvs

Category

measurement conversion routines

var

  muNanograms: TConvType;

  muMicrograms: TConvType;

  muMilligrams: TConvType

  muCentigrams: TConvType;

  muDecigrams: TConvType;

  muGrams: TConvType;

  muDecagrams: TConvType

  muHectograms: TConvType;

  muKilograms: TConvType;

  muMetricTons: TConvType;

  muDrams: TConvType

  muGrains: TConvType;

  muLongTons: TConvType

  muTons: TConvType;

  muOunces: TConvType

  muPounds: TConvType;

  muStones: TConvType

Description

Use the mass unit variables as parameters to the Convert function to convert a weight measurement to a different set of units. The StdConvs unit registers these mass measurement units in the cbMass family and assigns the resulting TConvType values to these global variables.


temperature unit variables
 VCL Reference

temperature unit variables

See also

Represent units that measure temperature.

Unit

StdConvs

Category

measurement conversion routines

var

  tuCelsius: TConvType;

  tuKelvin: TConvType;

  tuFahrenheit: TConvType;

  tuRankine: TConvType;

  tuReamur: TConvType;

Description

Use the temperature unit variables as parameters to the Convert function to convert a temperature measurement to a different set of units. The StdConvs unit registers these temperature measurement units in the cbTemperature family and assigns the resulting TConvType values to these global variables.

Tip:	When converting between degrees Fahrenheit and degrees Celsius, you can use the FahrenheitToCelsius or CelsiusToFahrenheit functions instead.


time unit variables
 VCL Reference

time unit variables

See also

Represent units that measure time.

Unit

StdConvs

Category

measurement conversion routines

var

  tuMilliSeconds: TConvType;

  tuSeconds: TConvType;

  tuMinutes: TConvType;

  tuHours: TConvType;

  tuDays: TConvType;

  tuWeeks: TConvType;

  tuFortnights: TConvType;

  tuMonths: TConvType;

  tuYears: TConvType;

  tuDecades: TConvType;

  tuCenturies: TConvType;

  tuMillennia: TConvType;

  tuDateTime: TConvType;

  tuJulianDate: TConvType;

  tuModifiedJulianData: TConvType;

Description

Use the time unit variables as parameters to the Convert function to convert a time measurement to a different set of units. The StdConvs unit registers these time measurement units in the cbTime family and assigns the resulting TConvType values to these global variables.

Note:	Conversions involving tuMonths, tuYears, tuDecades, tuCenturies, and tuMillennia are approximations, due to the fact that not all months nor all years are the same length. If you are only using units that are multiples of years, you may want to register your own conversion family that uses years as a base unit so that conversions are more accurate.


volume unit variables
 VCL Reference

volume unit variables

See also

Represent units that measure distance.

Unit

StdConvs

Category

measurement conversion routines

var

  vuCubicMillimeters: TConvType;

  vuCubicCentimeters: TConvType;

  vuCubicDecimeters: TConvType;

  vuCubicMeters: TConvType;

  vuCubicDecameters: TConvType;

  vuCubicHectometers: TConvType;

  vuCubicKilometers: TConvType;

  vuCubicInches: TConvType;

  vuCubicFeet: TConvType;

  vuCubicYards: TConvType;

  vuCubicMiles: TConvType;

  vuMilliLiters: TConvType;

  vuCentiLiters: TConvType;

  vuDeciLiters: TConvType;

  vuLiters: TConvType;

  vuDecaLiters: TConvType;

  vuHectoLiters: TConvType;

  vuKiloLiters: TConvType;

  vuAcreFeet: TConvType;

  vuAcreInches: TConvType;

  vuCords: TConvType;

  vuCordFeet: TConvType;

  vuDecisteres: TConvType;

  vuSteres: TConvType;

  vuDecasteres: TConvType;

  vuFluidGallons: TConvType;

  vuFluidQuarts: TConvType;

  vuFluidPints: TConvType;

  vuFluidCups: TConvType;

  vuFluidGills: TConvType;

  vuFluidOunces: TConvType;

  vuFluidTablespoons: TConvType;

  vuFluidTeaspoons: TConvType;

  vuDryGallons: TConvType;

  vuDryQuarts: TConvType;

  vuDryPints: TConvType;

  vuDryPecks: TConvType;

  vuDryBuckets: TConvType;

  vuDryBushels: TConvType;

  vuUKGallons: TConvType;

  vuUKPottles: TConvType;

  vuUKQuarts: TConvType;

  vuUKPints: TConvType;

  vuUKGills: TConvType;

  vuUKOunces: TConvType;

  vuUKPecks: TConvType;

  vuUKBuckets: TConvType;

  vuUKBushels: TConvType;

Description

Use the volume unit variables as parameters to the Convert function to convert a volume measurement to a different set of units. The StdConvs unit registers these volume measurement units in the cbVolume family and assigns the resulting TConvType values to these global variables.

The interpretation of volume measurements (ounces, gills, pints, quarts, gallons, pecks, bushels, and buckets) varies, depending on whether you are using American or British Imperial measurements. The vuFluidOunces, vuFluidGills, vuFluidPints, vuFluidQuarts, vuFluidGallons, vuDryPecks, vuDryBushels, and vuDryBuckets variables refer to the American units, while the vuUKOunces, vuUKGills, vuUKPints, vuUKQuarts, vuUKGallons, vuUKPecks, vuUKBushels, and vuUKBuckets variables refer to the British Imperial units. Similarly, certain American dry measurements have the same names as American fluid volume measurements (dry pints, dry quarts, and dry gallons), and are distinguished by using the variables vuDryPints, vuDryQuarts, and vuDryGallons.


AnsiContainsStr function
 VCL Reference

AnsiContainsStr function

See also

Indicates whether one string is a (case-sensitive) substring of another.

Unit

StrUtils

Category

string handling routines

function AnsiContainsStr(const AText, ASubText: string): Boolean;

Description

AnsiContainsStr returns True if the string specified by ASubText appears as a substring of the string specified by AText. Comparison is performed case-sensitively.


AnsiContainsText function
 VCL Reference

AnsiContainsText function

See also

Indicates whether one string is a (case-insensitive) substring of another.

Unit

StrUtils

Category

string handling routines

function AnsiContainsText(const AText, ASubText: string): Boolean;

Description

AnsiContainsText returns True if the string specified by ASubText appears as a substring of the string specified by AText. Comparison is performed case-insensitively and based on the current Windows locale.


AnsiEndsStr function
 VCL Reference

AnsiEndsStr function

See also

Indicates whether one string is a (case-sensitive) suffix of another.

Unit

StrUtils

Category

string handling routines

function AnsiEndsStr(const ASubText, AText: string): Boolean;

Description

AnsiEndsStr returns True if the string specified by ASubText appears as the trailing part of the string specified by AText. Comparison is performed case-sensitively.


AnsiEndsText function
 VCL Reference

AnsiEndsText function

See also

Indicates whether one string is a (case-insensitive) suffix of another.

Unit

StrUtils

Category

string handling routines

function AnsiEndsText(const ASubText, AText: string): Boolean;

Description

AnsiEndsText returns True if the string specified by ASubText appears as the trailing part of the string specified by AText. Comparison is performed case-insensitively and based on the current Windows locale.


AnsiIndexStr function
 VCL Reference

AnsiIndexStr function

See also

Provides the index of a specified string in an array of strings.

Unit

StrUtils

Category

string handling routines

function AnsiIndexStr(const AText: string; const AValues: array of string): Integer;

Description

AnsiIndexStr returns the 0-offset index of the first string it finds in AValues that matches AText case-sensitively.  If the string specified by AText does not have an exact match in AValues, AnsiIndexStr returns –1.


AnsiIndexText function
 VCL Reference

AnsiIndexText function

See also

Provides the index of a specified string in an array of strings.

Unit

StrUtils

Category

string handling routines

function AnsiIndexText(const AText: string; const AValues: array of string): Integer;

Description

AnsiIndexText returns the 0-offset index of the first string it finds in AValues that matches AText case-insensitively.  If the string specified by AText does not have a (possibly case-insensitive) match in AValues, AnsiIndexText returns –1. Comparisons are based on the current Windows locale.


AnsiMatchStr function
 VCL Reference

AnsiMatchStr function

See also

Indicates whether an array of strings contains an exact match to a specified string.

Unit

StrUtils

Category

string handling routines

function AnsiMatchStr(const AText: string; const AValues: array of string): Integer;

Description

Call AnsiMatchStr to determine whether the string specified by AText matches one of the strings in AValues. Comparisons are case-sensitive.


AnsiMatchText function
 VCL Reference

AnsiMatchText function

See also

Indicates whether an array of strings contains a case-insensitive match to a specified string.

Unit

StrUtils

Category

string handling routines

function AnsiMatchText(const AText: string; const AValues: array of string): Boolean;

Description

Call AnsiMatchText to determine whether the string specified by AText matches one of the strings in AValues. Comparisons are case-insensitive and use the current Windows locale.

AText is the string to locate.

AValues is the array of strings to search.

AnsiMatchText returns True if AText (or a string that matches except for case) appears in AValues, False if it does not appear in the array.


AnsiReplaceStr function
 VCL Reference

AnsiReplaceStr function

See also

Replaces all occurrences of a substring with another string.

Unit

StrUtils

Category

string handling routines

function AnsiReplaceStr(const AText, AFromText, AToText: string): string;

Description

Call AnsiReplaceStr to scan the string specified by AText and replace all occurrences of the string specified by AFromText with the string specified by AToText. Occurrences of AFromText are identify by a case-sensitive comparison. The identification of substrings is not recursive: if the substitution of AToText results in a new match for AFromText, that match is not replaced.


AnsiReplaceText function
 VCL Reference

AnsiReplaceText function

See also

Replaces all case-insensitive matches of a substring with another string.

Unit

StrUtils

Category

string handling routines

function AnsiReplaceText(const AText, AFromText, AToText: string): string;

Description

Call AnsiReplaceText to scan the string specified by AText and replace all occurrences of the string specified by AFromText with the string specified by AToText. Occurrences of AFromText are identify by a case-insensitive comparison that uses the current Windows locale. The identification of substrings is not recursive: if the substitution of AToText results in a new match for AFromText, that match is not replaced.


AnsiResemblesProc variable
 VCL Reference

AnsiResemblesProc variable

See also

Controls the algorithm used by AnsiResemblesText to determine when two strings are similar.

Unit

StrUtils

Category

string handling routines

var AnsiResemblesProc: TCompareTextProc = SoundExProc;

Description

The AnsiResemblesText function uses the function assigned to AnsiResemblesProc to determine when two strings should be considered similar. By default, AnsiResemblesProc is set to SoundExProc.

To make AnsiResemblesText use a different algorithm, you can change AnsiResemblesProc to another function. For example, you can change the number of phonemes compared by using a function that assigns a different length to SoundExSimilar than then default value of 4. Alternately, you can create a function that uses a different algorithm entirely.


AnsiResemblesText function
 VCL Reference

AnsiResemblesText function

See also

Indicates whether two strings are similar.

Unit

StrUtils

Category

string handling routines

function AnsiResemblesText(const AText, AOther: string): Boolean;

Description

AnsiResemblesText returns True if the string specified by AText is “similar” to the string specified by AOther, or False if the two strings are not sufficiently similar.

The algorithm that controls whether AnsiResemblesText considers two strings similar is specified by the AnsiResemblesProc variable. By default, AnsiResemblesProc is set to SoundExProc, which converts both strings to a phonetic representation using a SoundEx algorithm and compares up to 4 characters of the resulting phonetic representation. By changing the function assigned to AnsiResemblesProc, you can change the comparison made by AnsiResemblesText.


AnsiStartsStr function
 VCL Reference

AnsiStartsStr function

See also

Indicates whether one string is a (case-sensitive) prefix of another.

Unit

StrUtils

Category

string handling routines

function AnsiStartsStr(const ASubText, AText: string): Boolean;

Description

AnsiStartsStr returns True if the string specified by ASubText appears as the leading part of the string specified by AText. Comparison is performed case-sensitively.


AnsiStartsText function
 VCL Reference

AnsiStartsText function

See also

Indicates whether one string is a (case-insensitive) prefix of another.

Unit

StrUtils

Category

string handling routines

function AnsiStartsText(const ASubText, AText: string): Boolean;

Description

AnsiStartsText returns True if the string specified by ASubText appears as the leading part of the string specified by AText. Comparison is performed case-insensitively and uses the current Windows locale.


DecodeSoundExInt function
 VCL Reference

DecodeSoundExInt function

See also

Converts an integer representation of a SoundEx encoding into the corresponding phonetic string.

Unit

StrUtils

Category

string handling routines

function DecodeSoundExInt(AValue: Integer): string;

Description

Call DecodeSoundExInt to convert the integer representation of a string returned by the SoundExInt function into the corresponding SoundEx string representation.

A SoundEx representation of a string is a phonetic encoding where each character of the SoundEx representation represents a family of similar phonemes.


DecodeSoundExWord function
 VCL Reference

DecodeSoundExWord function

See also

Converts a Word representation of a SoundEx encoding into the corresponding phonetic string.

Unit

StrUtils

Category

string handling routines

function DecodeSoundExWord(AValue: Word): string;

Description

Call DecodeSoundExWord to convert the unsigned 16-bit representation of a string returned by the SoundExWord function into the corresponding SoundEx string representation.

A SoundEx representation of a string is a phonetic encoding where each character of the SoundEx representation represents a family of similar phonemes.


DupeString function
 VCL Reference

DupeString function

See also

Returns the concatenation of a string with itself a specified number of repeats.

Unit

StrUtils

Category

string handling routines

function DupeString(const AText: string; ACount: Integer): string;

Description

DupeString returns a string containing ACount repeats of the string specified by AText. For example,

S := DupeString('Ha', 5);

sets S to the string 'HaHaHaHaHa'.


LeftStr function
 VCL Reference

LeftStr function

See also

Returns the substring of a specified length that appears at the start of a string.

Unit

StrUtils

Category

string handling routines

function LeftStr(const AText: string; ACount: Integer): string;

Description

LeftStr returns the leading characters of AText up to a length of ACount characters. Thus, for example,

LeftStr('Programmer', 7)

returns the string

'Program'


MidStr function
 VCL Reference

MidStr function

See also

Returns the substring of a specified length that appears at a specified position in a string.

Unit

StrUtils

Category

string handling routines

function MidStr(const AText: string; const AStart, ACount: Integer): string;

Description

MidStr returns a substring Count characters at AText[AStart]. It is identical to the Copy function when it is called with a string as the first parameter, and is provided primarily for familiarity to programmers who are familiar with Visual Basic.

If AStart is larger than the length of AText, MidStr returns an empty string.

If Count specifies more characters than are available, only the characters from AText[AStart] to the end of AText are returned.


ReverseString function
 VCL Reference

ReverseString function

See also

Returns the reverse of a specified string.

Unit

StrUtils

Category

string handling routines

function ReverseString(const AText: string): string;

Description

ReverseString returns the string specified by AText with the characters in reverse order.

Note:	This method does not work with multibyte character sets.


RightStr function
 VCL Reference

RightStr function

See also

Returns the substring of a specified length that appears at the end of a string.

Unit

StrUtils

Category

string handling routines

function RightStr(const AText: string; ACount: Integer): string;

Description

RightStr returns the trailing characters of AText up to a length of ACount characters. Thus, for example,

RightStr('Programmer', 7)

returns the string

'grammer'


SearchBuf function
 VCL Reference

SearchBuf function

See also

Locates a substring within a text buffer.

Unit

StrUtils

Category

string handling routines (null-terminated)

function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: String; Options: TStringSearchOptions = [soDown]): PChar;

Description

Call SearchBuf to search for a specified search string within a text buffer.

Buf is the text buffer to search.

BufLen is the length, in bytes, of Buf.

SelStart is the first character of the search when Options indicates a backward search (does not include soDown). The first character in Buf has position 0.

SelLength is the number of characters after SelStart that the search begins when Options indicates a forward search (includes soDown).

SearchString is the string to find in Buf.

Options determines whether the search runs forward (soDown) or backward from SelStart or SelStart+SelLength, whether the search is case sensitive (soMatchCase), and whether the matching string must be a whole word (soWholeWord).

If SearchBuf finds a match, it returns a pointer to the first character of the matching string in Buf. If it does not find a match, SearchBuf returns nil.


SoundEx function
 VCL Reference

SoundEx function

See also

Converts a string into its SoundEx representation.

Unit

StrUtils

Category

string handling routines

function SoundEx(const AText: string; ALength: TSoundExLength  = 4): string;

Description

SoundEx converts the string specified by AText into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It returns up to the first ALength SoundEx codes in the resulting string representation.


SoundExCompare function
 VCL Reference

SoundExCompare function

See also

Compares the SoundEx representations of two strings.

Unit

StrUtils

Category

string handling routines

function SoundExCompare(const AText, AOther: string; ALength: TSoundExLength = 4): Integer;

Description

SoundExCompare uses a SoundEx algorithm to convert the strings specified by AText and AOther into phonetic representations where each character of the resulting string represents one of six families of similar phonemes. It then compares the first ALength characters of the resulting representations by calling AnsiCompareStr.

SoundExCompare returns 0 if the first ALength characters of the phonetic representations are identical, a value less then 0 if the representation of AText is less than the representation of AOther, and a value greater than 0 if the representation of AText is greater than the representation of AOther.


SoundExInt function
 VCL Reference

SoundExInt function

See also

Converts a string into an integer that represents its phonetic value.

Unit

StrUtils

Category

string handling routines

function SoundExInt(const AText: string; ALength: TSoundExIntLength = 4): Integer;

Description

SoundExInt uses a SoundEx algorithm to convert the string specified by AText into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then returns an integer that uniquely represents the first ALength SoundEx codes in that string representation.

Note:	The TSoundExIntLength type represents an integer between 1 and 8. This is because the size of the integer return value limits the number of SoundEx codes that can be used in the final representation.


SoundExProc function
 VCL Reference

SoundExProc function

See also

Indicates whether two strings are similar.

Unit

StrUtils

Category

string handling routines

function SoundExProc(const AText, AOther: string): Boolean;

Description

SoundExProc returns True if the string specified by AText is “similar” to the string specified by AOther, or False if the two strings are not sufficiently similar. SoundExProc is the default value of the AnsiResemblesProc variable, which provides the underlying implementation of AnsiResemblesText.

SoundExProc uses a SoundEx algorithm to convert both strings into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then compares up to 4 digits in the resulting representation, returning True if they are all the same and False if they are not.

Note:	SoundExProc is the same as the SoundExSimilar function using an ALength value of 4.


SoundExSimilar function
 VCL Reference

SoundExSimilar function

See also

Indicates whether two strings are similar.

Unit

StrUtils

Category

string handling routines

function SoundExSimilar(const AText, AOther: string; ALength: TSoundExLength = 4): Boolean;

Description

SoundExSimilar returns True if the string specified by AText is “similar” to the string specified by AOther, or False if the two strings are not sufficiently similar.

SoundExSimilar uses a SoundEx algorithm to convert both strings into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then compares up to ALength digits in the resulting representation, returning True if they are all the same and False if they are not.


SoundExWord function
 VCL Reference

SoundExWord function

See also

Converts a string into a Word that represents its phonetic value.

Unit

StrUtils

Category

string handling routines

function SoundExWord(const AText: string): Word;

Description

SoundExWord uses a SoundEx algorithm to convert the string specified by AText into a phonetic representation where each character of the resulting string represents one of six families of similar phonemes. It then returns an unsigned 16-bit value that uniquely represents the first 4 SoundEx codes in that string representation.


StuffString function
 VCL Reference

StuffString function

See also

Inserts a substring into a specified position of a string, replacing the current characters.

Unit

StrUtils

Category

string handling routines

function StuffString(const AText: string; AStart, ALength: Cardinal; const ASubText: string): string;

Description

StuffString returns a new string that is constructed by replacing the characters of AText specified by AStart and ALength with the string specified by ASubText.

AText is the string to which ASubText is added. It is not modified by StuffString.

AStart is the index of the first character in AText to be replaced, where 1 identifies the first character, 2 identifies the second character, and so on.

ALength is the number of characters in AText that are replaced by ASubText. If ALength is 0, ASubText is inserted into AText without removing any characters. If AText is negative, the characters preceding the insertion point are duplicated after the occurrence of ASubText in the result string.

ASubText is the substring to insert into AText, replacing the characters specified by AStart and ALength.


Global Routines
 VCL Reference

Routines

Please see the VCL Help table of contents for a complete categorical listing of VCL routines and functions. For a listing of all functions in a particular category or unit, click on the link from any routine help entry.


Abs function
 VCL Reference

Abs function

Example

Returns an absolute value.

Unit

System

Category

arithmetic routines

function Abs(X);

Description

Abs returns the absolute value of the argument, X.

X is an integer-type or real-type expression.


AcquireExceptionObject function
 VCL Reference

AcquireExceptionObject function

See also

Allows an exception object to persist after the except clause exits.

Unit

System

Category

exception handling routines

function AcquireExceptionObject(X);

Description

When an exception is thrown, the exception object that is thrown is destroyed automatically when the except clause that handles the exception exits. Use AcquireExceptionObject to keep the exception object after the except clause exits. AcquireExceptionObject increases the reference count on the exception object so that it is not automatically freed.

If an application calls AcquireExceptionObject, it is responsible for freeing the exception object by calling the ReleaseExceptionObject procedure.


Addr function
 VCL Reference

Addr function

See also	Example

Returns a pointer to a specified object.

Unit

System

Category

pointer and address routines

function Addr(X): Pointer;

Description

The Addr function returns the address of a specified object. X is any variable, procedure or function identifier. The result is a pointer to X.

The result of Addr is of the predefined type Pointer, which means that it is assignment-compatible with all pointer types but can't be dereferenced directly without a typecast.

Note:	Addr is equivalent to the @ operator.


AllocMemCount variable
 VCL Reference

AllocMemCount variable

See also

Represents the total number of allocated memory blocks in an application.

Unit

System

Category

memory management routines

var AllocMemCount: Integer;

Description

AllocMemCount contains the number of currently allocated blocks of memory that were requested by the user. AllocMemCount is incremented each time a block of memory is allocated and is decremented each time a block of memory is freed. Use AllocMemCount to find out how many unfreed blocks of memory remain.

Caution:	Because AllocMemCount is a global variable declared in the System unit, it is not always safe to access it directly. In situations where modules are statically linked to the RTL, each module will have a different instance of AllocMemCount. The following table is a summary. Note that applications that use runtime packages are dynamically linked to the RTL, whereas applications that do not are statically linked.

Application type	Accessibility of AllocMemCount

EXE	Applications that do not use packages or Delphi DLLs can safely access this global variable directly because there is only one instance of it.
EXE with packages and no Delphi DLLs	Applications that use runtime packages and do not use any statically linked libraries can safely access AllocMemCount directly. In this situation all modules are dynamically linked to the RTL and there is only one instance of the variable. Unlike standard DLLs, packages allow access to global variables.
EXE with statically linked DLLs	If an application is statically linked to the RTL and also uses libraries that are statically linked to the RTL, then the AllocMemCount variable should never be accessed directly, since the EXE and each library will have its own instance of it. Instead, use the GetAllocMemCount function, implemented in BorlandMM, which returns the instance of the AllocMemCount global variable in the BorlandMM DLL. This DLL manages the memory allocation for all modules that include the ShareMem unit as the first unit in the application or library’s uses clause. It is, therefore, this instance of the variable that contains the correct value. A function is used to access AllocMemCount in this situation because global variables in a DLL are private to the DLL.
EXE with packages and statically linked DLLs	It is not advisable to create applications that mix runtime packages with statically linked libraries. In this circumstance, use caution when allocating, freeing, and accessing memory. Be aware that each version of the RTL contains an instance of AllocMemCount that references memory that is allocated and freed only by that particular module.


AllocMemSize variable
 VCL Reference

AllocMemSize variable

See also

Represents the total size of allocated memory blocks.

Unit

System

Category

memory management routines

var AllocMemSize: Integer;

Description

AllocMemSize contains the total size, in bytes, of all currently allocated blocks of memory in use by an application. Use AllocMemSize to find out how many bytes of memory an application is currently using.

Caution:	Because AllocMemSize is a global variable declared in the System unit, it is not always safe to access it directly. In situations where modules are statically linked to the RTL, each module will have a different instance of AllocMemSize. The following table is a summary. Note that applications that use runtime packages are dynamically linked to the RTL, whereas applications that do not are statically linked.

Application type	Accessibility of AllocMemSize

EXE	Applications that do not use packages or Delphi DLLs can safely access this global variable directly because there is only one instance of it.
EXE with packages and no Delphi DLLs	Applications that use runtime packages and do not use any statically linked DLLs can safely access AllocMemSize directly. In this situation all modules are dynamically linked to the RTL and there is only one instance of the variable. Unlike standard DLLs, packages allow access to global variables.
EXE with statically linked DLLs	If an application is statically linked to the RTL and if that application is also using DLLs that are statically linked to the RTL then the AllocMemSize variable should never be accessed directly, since the EXE and each DLL will have its own instance of it. Instead use the GetAllocMemSize function, implemented in BorlandMM, which returns the instance of the AllocMemSize global variable in the BorlandMM DLL. This DLL manages the memory allocation for all modules that include the ShareMem unit as the first unit in the application or library’s uses clause. It is, therefore, this instance of the variable that contains the correct value. A function is used to access AllocMemSize in this situation because global variables in a DLL are private to the DLL.
EXE with packages and statically linked DLLS	It is not advisable to create applications that mix runtime packages with statically linked DLLs. In this circumstance use caution when allocating, freeing, and accessing memory. Be aware that each version of the RTL contains an instance of AllocMemSize that references memory that is allocated and freed only by that particular module.


AnsiToUtf8 function
 VCL Reference

AnsiToUtf8 function

See also

Converts a string encoded in Ansi to UTF-8.

Unit

System

Category

character set conversions

function AnsiToUtf8(const S: string): UTF8String;

Description

AnsiToUtf8 converts the string specified by S, which uses the ANSI encoding system, to UTF-8.


Append procedure
 VCL Reference

Append procedure

See also	Example

Prepares an existing file for adding text to the end.

Unit

System

Category

I/O routines

procedure Append(var F: Text);

Description

Call Append to ensure that a file is opened with write-only access with the file pointer positioned at the end of the file. F is a text file variable and must be associated with an external file using AssignFile. If no external file of the given name exists, an error occurs. If F is already open, it is closed, then reopened. The current file position is set to the end of the file.

If a Ctrl+Z (ASCII 26) is present in the last 128-byte block of the file, the current file position is set so that the next character added to the file overwrites the first Ctrl+Z in the block. In this way, text can be appended to a file that terminates with a Ctrl+Z.

If F was not assigned a name, then, after the call to Append, F refers to the standard output file.


ArcTan function
 VCL Reference

ArcTan function

See also 	Example

Calculates the arctangent of a given number.

Unit

System

Category

trigonometry routines

function ArcTan(X: Extended): Extended;

Description

ArcTan returns the arctangent of X.


Assert procedure
 VCL Reference

Assert procedure

See also 	Example

Tests whether a Boolean expression is true.

Unit

System

Category

miscellaneous routines

procedure Assert(expr : Boolean [; const msg: string]);

Description

Use Assert as a debugging tool to test that conditions assumed to be true are never violated. Assert provides an opportunity to intercept an unexpected condition and halt a program rather than allow execution to continue under unanticipated conditions.

Assert takes a Boolean expression and an optional message string as parameters. If the Boolean test fails, Assert raises an EAssertionFailed exception. If a message string was passed to Assert, the exception object is created with that string. Otherwise it is created with a default string indicating that the assertion failed. The message is displayed along with the complete path, filename, and the line number on which Assert failed.

The SysUtils unit causes runtime errors to be turned into exceptions. If SysUtils is not used anywhere in your application, you will get a runtime error 227 rather than an EAssertionFailed exception. This runtime error will halt the program.

Because assertions are not usually used in shipping versions of a product, compiler directives are provided to disable the generation of assertion code:

$ASSERTIONS ON/OFF	(long form)

$C +/-	(short form)

These are global switches that affect the entire source file where they occur, regardless of their position in the file. It is not possible to enable and disable assertions for something smaller than a source file. Assertions are on by default.


AssertErrorProc variable
 VCL Reference

AssertErrorProc variable

See also	Example

Points to the assertion error-handler.

Unit

System

Category

miscellaneous routines

var AssertErrorProc: Pointer;

Description

AssertErrorProc points to a routine that produces runtime error 227. The SysUtils unit replaces it to cause an EAssertionFailed exception. If you do not use assertions, you can replace this with a method that that does something else, such as call OutputDebugString to add messages to the event log (see the example).

The value of AssertErrorProc must be a procedure with the following signature

procedure AssertErrorHandler(const Message, Filename: string; LineNumber: Integer; ErrorAddr: Pointer);


Assigned function
 VCL Reference

Assigned function

See also	Example

Tests for a nil (unassigned) pointer or procedural variable.

Unit

System

Category

miscellaneous routines

function Assigned(const P): Boolean;

Description

Use Assigned to determine whether the pointer or procedure referenced by P is nil. P must be a variable reference of a pointer or procedural type. Assigned(P) corresponds to the test P<> nil for a pointer variable, and @P <> nil for a procedural variable.

Assigned returns False if P is nil, True otherwise.

Note:	Assigned can't detect a dangling pointer--that is, one that isn't nil but no longer points to valid data. For example, in the code example for Assigned, Assigned won't detect the fact that P isn't valid.


AssignFile procedure
 VCL Reference

AssignFile procedure

See also 	Example

Associates the name of an external file with a file variable.

Unit

System

Category

file management routines

procedure AssignFile(var F; FileName: string);

Description

Call AssignFile to initialize a file variable. F is a file variable of any file type. FileName is a string-type expression or an expression of type PChar if extended syntax is enabled.

After calling AssignFile, F is associated with the external file until F is closed.  All further operations on the file variable F operate on the external file named by FileName.

When the FileName parameter is empty, AssignFile associates F with the standard input or standard output file. If assigned an empty name, after a call to Reset (F), F refers to the standard input file, and after a call to Rewrite (F), F refers to the standard output file.

Do not use AssignFile on a file variable that is already open.

Note:	To avoid scope conflicts, AssignFile replaces the Assign procedure that was available in previous versions of Delphi. However, for backward compatibility Assign is still available.


BeginThread function
 VCL Reference

BeginThread function

See also

Spawns a separate thread of execution.

Unit

System

Category

thread management routines

function BeginThread(SecurityAttributes: Pointer; StackSize: LongWord; ThreadFunc: TThreadFunc; Parameter: Pointer; CreationFlags: LongWord; var ThreadId: LongWord): Integer;

Description

Use this routine or a TThread object to spawn separate threads of execution instead of calling the CreateThread Win32API directly. BeginThread encapsulates the Win32 CreateThread API call, but unlike CreateThread, it sets the global IsMultiThread variable, thereby making the heap thread-safe.

BeginThread takes a normal Pascal function as the thread function. Thread functions should handle all of their own exceptions. BeginThread sets up an exception frame that allows the system's default exception handler to catch any of the thread's exceptions that have not been handled.

BeginThread returns the Windows thread handle.


BlockRead procedure
 VCL Reference

BlockRead procedure

See also 	Example

Reads one or more records from an open file into a variable.

Unit

System

Category

I/O routines

procedure BlockRead(var F: File; var Buf; Count: Integer [; var AmtTransferred: Integer]);

Description

F is an untyped file variable, Buf is any variable, Count is an expression of type Integer, and AmtTransferred is an optional variable of type Integer.

BlockRead reads Count or fewer records from the file F into memory, starting at the first byte occupied by Buf. The actual number of complete records read (less than or equal to Count) is returned in AmtTransferred.

The entire transferred block occupies at most Count * RecSize bytes. RecSize is the record size specified when the file was opened (or 128 if the record size was not specified).

If the entire block was transferred, AmtTransferred is equal to Count.

If AmtTransferred is less than Count, ReadBlock reached the end of the file before the transfer was complete. If the file's record size is greater than 1, AmtTransferred returns the number of complete records read.

If AmtTransferred isn't specified, an I/O error occurs if the number of records read isn't equal to Count. If the $I+ compiler directive is in effect, errors raise an EInOutError exception.


BlockWrite procedure
 VCL Reference

BlockWrite procedure

See also 	Example

Writes one or more records from a variable to an open file.

Unit

System

Category

I/O routines

procedure BlockWrite(var f: File; var Buf; Count: Integer [; var AmtTransferred: Integer]);

Description

F is an untyped file variable, Buf is any variable, Count is an expression of type Integer, and AmtTransferred is an optional variable of type Integer.

BlockWrite writes Count or fewer records to the file F from memory, starting at the first byte occupied by Buf. The actual number of complete records written (less than or equal to Count) is returned in AmtTransferred.

The entire block transferred occupies at most Count * RecSize bytes. RecSize is the record size specified when the file was opened (or 128 if the record size was unspecified).

If the entire block is transferred, AmtTransferred is equal to Count on return.

If AmtTransferred is less than Count, the disk became full before the transfer was complete. In this case, if the file's record size is greater than 1, AmtTransferred returns the number of complete records written.

BlockWrite advances the current file position by AmtTransferred records.

If AmtTransferred isn't specified, an I/O error occurs if the number written isn't equal to Count. If the $I+ compiler directive is in effect, errors raise an EInOutError exception.


Break procedure
 VCL Reference

Break procedure

See also 	Example

Causes the flow of control to exit a for, while, or repeat statement.

Unit

System

Category

flow control routines

procedure Break;

Description

The Break procedure causes the flow of control to exit a for, while, or repeat statement and continue at the next statement following the loop statement.

A call to Break must be contained in a for, while, or repeat statement, or the compiler reports an error.

Note:	Break does not violate the flow of control dictated by a try..finally construct. If a break occurs inside the try clause, the finally clause is entered.


ChDir procedure
 VCL Reference

ChDir procedure

See also 	Example

Changes the current directory.

Unit

System

Category

file management routines

procedure ChDir(const S: string);overload;

procedure ChDir(P: PChar); overload;

Description

ChDir changes the current directory to the path specified by S or P. If S (or P) includes a drive letter, the current drive is also changed.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Chr function
 VCL Reference

Chr function

See also	Example

Returns the character for a specified ASCII value.

Unit

System

Category

character manipulation routines

function Chr(X: Byte): Char;

Description

Chr returns the character with the ordinal value (ASCII value) of the byte-type expression, X.


Close procedure
 VCL Reference

Close procedure

See also

Terminates the association between a file variable and an external file.

Unit

System

Category

backward compatibility routines

procedure Close(var F);

Description

Close provides compatibility with existing Borland Pascal code. When writing applications for Delphi, use CloseFile instead.

F is a file variable of any file type opened using Reset, Rewrite, or Append. The external file associated with F is completely updated and then closed, freeing the file handle for reuse.


CloseFile procedure
 VCL Reference

CloseFile procedure

See also	Example

Terminates the association between file variable and an external disk file.

Unit

System

Category

file management routines

procedure CloseFile(var F);

Description

Due to naming conflicts, the CloseFile procedure replaces the Borland Pascal Close procedure. Use the CloseFile procedure instead of Close to terminate the association between a file variable and an external disk file.

F is a file variable of any file type opened using Reset, Rewrite, or Append. The external file associated with F is completely updated and then closed, freeing the file handle for reuse.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


CmdLine variable
 VCL Reference

 CmdLine variable

See also

CmdLine is a pointer to the command-line arguments specified when the application is invoked.

Unit

System

Category

command line utilities

var CmdLine: PChar platform;

Description

The CmdLine variable points to a null-terminated string that contains the command-line arguments specified when the application was started. Use ParamStr to access individual arguments.

In a library (DLL), CmdLine is nil.


CmdShow variable
 VCL Reference

CmdShow variable

CmdShow is passed to the Windows ShowWindow WinAPI routine.

Unit

System

Category

application-level information

var CmdShow: Integer;

Description

In a program, the CmdShow variable contains the parameter value that Windows expects to be passed to ShowWindow when the application creates its main window.

In a library (DLL), CmdShow is always zero.


CompToCurrency function
 VCL Reference

CompToCurrency function

See also

Converts a Comp value to a Currency value.

Unit

System

Category

type conversion routines

function CompToCurrency(Value: Comp): Currency; cdecl;

Description

CompToCurrency converts a Comp value into a Currency value containing the decimal representation of that number.


CompToDouble function
 VCL Reference

CompToDouble function

See also

Converts a Comp value to a Double value.

Unit

System

Category

type conversion routines

function CompToDouble(Value: Comp): Double; cdecl;

Description

CompToDouble converts a Comp value into a Double value containing the decimal representation of that number.


Concat function
 VCL Reference

Concat function

See also	Example

Concatenates two or more strings into one.

Unit

System

Category

string handling routines

function Concat(s1 [, s2,..., sn]: string): string;

Description

Use Concat to concatenate an arbitrary number of strings. Each parameter is a string-type expression. The result is the concatenation of all the string parameters.

Using the plus (+) operator has the same effect on two strings as using the Concat function:

S := 'ABC' + 'DEF';

Tip:	The plus operator is faster than Concat.


Continue procedure
 VCL Reference

Continue procedure

See also	Example

Allows the flow of control to proceed to the next iteration of for, while, or repeat statements.

Unit

System

Category

flow control routines

procedure Continue;

Description

The Continue procedure causes the flow of control to proceed to the next iteration of the enclosing for, while, or repeat statement.

The compiler reports an error if a call to Continue isn't enclosed by a for, while, or repeat statement.

Note:	Continue does not violate the flow of control dictated by a try..finally construct. If a call to Continue causes control to leave the try clause, the finally clause is entered.


Copy function
 VCL Reference

Copy function

See also	Example

Returns a substring of a string or a segment of a dynamic array.

Unit

System

Category

string handling routines

function Copy(S; Index, Count: Integer): string;

function Copy(S; Index, Count: Integer): array;

Description

S is an expression of a string or dynamic-array type. Index and Count are integer-type expressions. Copy returns a substring or sub array containing Count characters or elements starting at S[Index].

If Index is larger than the length of S, Copy returns an empty string or array.

If Count specifies more characters or array elements than are available, only the characters or elements from S[Index] to the end of S are returned.

Note:	When S is a dynamic array, Copy can only be used as a parameter in a call to a procedure or function that expects an array parameter. That is, it acts like the Slice function when working with dynamic arrays.


Cos function
 VCL Reference

Cos function

See also	Example

Calculates the cosine of an angle.

Unit

System

Category

trigonometry routines

function Cos(X: Extended): Extended;

Description

Cos returns the cosine of the angle X, in radians.


CurrencyToComp procedure
 VCL Reference

CurrencyToComp procedure

See also

Converts a Currency value to a Comp value.

Unit

System

Category

type conversion routines

procedure CurrencyToComp(Value: Currency; var Result: Comp); cdecl;

Description

CurrencyToComp converts a Currency value into a Comp.


Dec procedure
 VCL Reference

Dec procedure

See also	Example

Decrements a variable by 1 or N.

Unit

System

Category

ordinal routines

procedure Dec(var X[ ; N: Longint]);

Description

The Dec procedure subtracts one or N from a variable.

X is a variable of an ordinal type (including Int64), or a pointer type if the extended syntax is enabled.

N is an integer-type expression.

X decrements by 1, or by N if N is specified; that is, Dec(X) corresponds to the statement X := X - 1, and Dec(X, N) corresponds to the statement X := X - N. However, Dec generates optimized code and is especially useful in tight loops.

Note:	If X is a pointer type, it decrements X by N times the size of the type pointed to. Thus, given

type

  PMytype = ^TMyType;

and

var

  P: PMyType;

the statement

Dec(P);

decrements P by SizeOf(TMyType).

Warning:	Do not use Dec on ordinal-type properties if the property uses a write procedure.


Default8087CW variable
 VCL Reference

Default8087CW variable

See also

Specifies the Default 8087 control word.

Unit

System

Category

FPU control

var Default8087CW: Word;

Description

Default8087CW is the value to which the Floating Point Unit (FPU) control register is set. The FPU control word includes bits that control the FPU's precision, rounding mode, and whether exceptions generate signals if they occur. See Intel's processor documentation for details.

The Set8087CW procedure allows the programmer to have direct access to the Default8087CW. Setting the floating-point precision and rounding mechanism can be useful if you are reusing old code that is sensitive to the floating-point precision standard used. However, be aware that using this procedure to change the value of the 8087CW will change the behavior of the program’s FP calculations. It is the programmer’s responsibility to reset it.


DefaultTextLineBreakStyle variable
 VCL Reference

DefaultTextLineBreakStyle variable

See also

Specifies the characters that are used by default to separate lines in text.

Unit

System

Category

miscellaneous routines

var DefaultTextLineBreakStyle: TTextLineBreakStyle;

Description

DefaultTextLineBreakStyle controls how the code editor represents the separation between lines of text in new files. For existing files, it maintains the line break style that the file currently uses.


Delete procedure
 VCL Reference

Delete procedure

See also	Example

Removes a substring from a string.

Unit

System

Category

string handling routines

procedure Delete(var S: string; Index, Count:Integer);

Description

Delete removes a substring of Count characters from string S starting with S[Index]. S is a string-type variable. Index and Count are integer-type expressions.

If index is larger than the length of the S or less than 1, no characters are deleted.

If count specifies more characters than remain starting at the index, Delete removes the rest of the string. If count is less than 0, no characters are deleted.


Dispose procedure
 VCL Reference

Dispose procedure

See also	Example

Releases memory allocated for a dynamic variable.

Unit

System

Category

dynamic allocation routines

procedure Dispose(var P: Pointer);

Description

After a call to Dispose, the value of P is undefined and it is an error to reference P.

Note:	If compiling with {$I+}, use exceptions to handle this error. When an invalid pointer is passed to Dispose it raises an EInvalidPointer exception.


DLLProc variable
 VCL Reference

DLLProc variable

Points to a procedure invoked by a DLL entry point.

Unit

System

Category

miscellaneous routines

var DLLProc: Pointer;

Description

DLLProc is used to specify a procedure that is invoked every time a DLL's entry point is called. A procedure assigned to DLLProc must take one parameter of type Integerint. For example,

procedure LibraryProc(Reason: Integer);

When the procedure is invoked, this single parameter contains a value between 0 and 3 as defined by the following group of constants in the Windows unit:

const

  DLL_PROCESS_DETACH = 0;

  DLL_PROCESS_ATTACH = 1;

  DLL_THREAD_ATTACH  = 2;

  DLL_THREAD_DETACH  = 3;

For further details on the meaning of these constants, refer to the description of the DllEntryPoint function in the Win32 API online help.

Note:	DLL_PROCESS_ATTACH is passed to the procedure only if the DLL’s initialization code calls the procedure and specifies DLL_PROCESS_ATTACH as a parameter.


DoubleToComp function
 VCL Reference

DoubleToComp function

See also

Converts a Double value to a Comp.

Unit

System

Category

numeric formatting routines

function DoubleToComp(Value: Double; var Result: Comp); cdecl;

Description

DoubleToComp converts a Double value into a Comp.


EndThread function
 VCL Reference

EndThread function

See also

Terminates the execution of a thread.

Unit

System

Category

thread management routines

procedure EndThread(ExitCode: Integer);

Description

EndThread calls the ExitThread WinAPI with the specified ExitCode.


EnumModules procedure
 VCL Reference

EnumModules procedure

See also

Executes a callback for all the modules in an application.

Unit

System

Category

package support routines

procedure EnumModules(Func: TEnumModuleFunc; Data: Pointer); overload;

procedure EnumModules(Func: TEnumModuleFuncLW; Data: Pointer); overload;

Description

EnumModules enumerates the executable and all packages in an application by passing the handle of the executable and then of each package, in turn, to a user-defined callback function. EnumModules continues until the last module in the application is enumerated, or until the callback function returns False. The parameters to EnumModules areas follows:

Parameter	Meaning

Func	The procedure-instance address of the callback function.

Data	A 32-bit user-defined value that is passed to the callback function.


EnumResourceModules procedure
 VCL Reference

EnumResourceModules procedure

See also

Executes a callback for all resource modules in an application.

Unit

System

Category

package support routines

procedure EnumResourceModules(Func: TEnumModuleFunc; Data: Pointer);

procedure EnumResourceModules(Func: TEnumModuleFuncLW; Data: Pointer);

Description

EnumResourceModules executes the callback specified by the Func parameter for all of the instance handles associated with resources of the current program. The instance handle (HInstance) of each resource is passed to Func. EnumResourceModules continues until the last resource module in the application is enumerated, or until the callback returns false. The parameters to EnumResourceModules are as follows:

Parameter	Meaning

Func	The procedure-instance address of the callback function.

Data	A 32-bit user-defined value that is passed to the callback function.


Eof function
 VCL Reference

Eof function

See also	Example

Tests whether the file position is at the end of a file.

Unit

System

Category

I/O routines

Typed or untyped files:

function Eof(var F): Boolean;

Text files:

function Eof [ (var F: Text) ]: Boolean;

Description

Eof tests whether the current file position is the end-of-file. F is a file variable that has been opened for reading. If F is omitted, the standard file variable Input is assumed.

Eof(F) returns True if the current file position is beyond the last character of the file or if the file is empty; otherwise, Eof(F) returns False.

Note:	Eof fails if the file F has been opened in write-only mode. For example, you can’t use Eof with files opened using the Append or Rewrite, which open a file in write-only mode.


Eoln function
 VCL Reference

Eoln function

See also	Example

Tests whether the file pointer is at the end of a line.

Unit

System

Category

text file routines

function Eoln [(var F: Text) ]: Boolean;

Description

Eoln tests whether the current file position is the end-of-line of a text file. F, if specified, is a text file variable. If F is omitted, the standard file variable Input is assumed.

Eoln(F) returns True if the current file position is at an end-of-line or if Eof(F) is True; otherwise, Eoln(F) returns False.


Erase procedure
 VCL Reference

Erase procedure

See also	Example

Deletes an external file.

Unit

System

Category

text file routines

procedure Erase(var F);

Description

Erase deletes the external file associated with F. F is a file variable of any file type.

Always close a file before erasing it.


ErrorAddr variable
 VCL Reference

ErrorAddr variable

See also

Contains the address of a statement causing a runtime error.

Unit

System

Category

exception handling routines

var ErrorAddr: Pointer = nil;

Description

If a program terminates normally or stops due to a call to Halt, ErrorAddr is nil. If a program ends because of a run-time error, ErrorAddr contains the address of the statement in error.


ErrorProc variable
 VCL Reference

ErrorProc variable

See also 	Example

Points to the RTL run-time error handler.

Unit

System

Category

exception handling routines

var  ErrorProc: procedure (ErrorCode: Byte; ErrorAddr: Pointer);

Description

ErrorProc is a procedure variable pointing to the RTL run-time error handler. The standard RTL ErrorProc reports the run-time error and terminates the program.

The ErrorProc variable is retained primarily for compatibility with older Pascal code. Newer applications should not specify an alternate runtime error procedure using ErrorProc as SysUtils uses this variable to convert run time errors into exceptions. Unlike run time errors, exceptions may be processed by VCL-basedapplications.

If you use SysUtils in your program, it will force ErrorProc to its own routine and convert the run-time error into an exception. When a run-time library error occurs, the ErrorProc is called. The ErrorCode parameter contains the run-time error number and the ErrorAddr parameter contains the machine code address that caused the run time error.


ErrOutput variable
 VCL Reference

ErrOutput variable

See also

Specifies a write-only file associated with stderr, usually the display.

Unit

System

Category

I/O routines

var ErrOutput: Text;

Description

The ErrOutput variable is a write-only file associated with the operating system's standard error file, which is usually the display.

When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), Delphi automatically associates the ErrOutput file with the application's console window. For non-console applications, any attempt to write to ErrOutput will generate an I/O error.


ExceptAddr function
 VCL Reference

ExceptAddr function

See also

Returns the address at which the current exception was raised.

Unit

System

Category

exception handling routines

function ExceptAddr: Pointer;

Description

Use ExceptAddr to obtain the address at which an exception was raised. If there is no current exception, ExceptAddr returns nil.


ExceptObject function
 VCL Reference

ExceptObject function

See also

Returns a reference to the object associated with the current exception.

Unit

System

Category

exception handling routines

function ExceptObject: TObject;

Description

ExceptObject returns a reference to the current exception object – typically a descendant of Exception – that is associated with the current exception. If there is no current exception, ExceptObject returns nil.

In most cases, do not call ExceptObject explicitly; instead, use the language construct

on E: ExceptionType do

This maps the identifier E to the object instance of the current exception statement that follows if the current exception is of ExceptionType. However, when a default exception handler is created using an else in the exception block, the only way to access the current exception object is by calling ExceptObject.


ExceptProc variable
 VCL Reference

ExceptProc variable

See also

Points to the lowest-level RTL exception handler.

Unit

System

Category

exception handling routines

var ExceptProc: Pointer;

Description

ExceptProc handles unhandled exceptions (exceptions that have not been caught in the except portion of a try..except statement.) If your application has a TApplication object, it automatically catches exceptions and generates an OnException event (to which you can respond using either the application’s or a TApplicationEvents object’s OnException event handler). Thus, because the TApplication object catches the exceptions, they never reach the ExceptProc handler. However, even if you have a TApplication object, it does not catch exceptions generated during initialization and finalization. These are handled by ExceptProc.

You can hook into ExceptProc to change how unhandled exceptions are reported. To do so, save the contexts of ExceptProc before changing it to the address of your own exception handler. The first statement of your new exception handler must then reinstall the saved value of ExceptProc. In this way, the ExceptProc procedure becomes part of a chain of exception procedures, each of which is executed in reverse order of installation.

The procedure assigned to ExceptProc must have a signature such as the following:

procedure ExceptHandler(ExceptObject: TObject; ExceptAddr: Pointer);


Exclude procedure
 VCL Reference

Exclude procedure

See also

Removes an element from a set.

Unit

System

Category

set handling routines

procedure Exclude(var S: set of T;I:T);

Description

The Exclude procedure removes element I from set S.

S is a set type variable, and I is an expression of a type compatible with the base type of S.

The construct Exclude (S, I) corresponds to S := S - (I) but the Exclude procedure generates more efficient code.


Exit procedure
 VCL Reference

Exit procedure

See also	Example

Exits from the current procedure.

Unit

System

Category

flow control routines

procedure Exit;

Description

The Exit procedure immediately passes control away from the current procedure. If the current procedure is the main program, Exit causes the program to terminate.

Exit will cause the calling procedure to continue with the statement after the point at which the procedure was called.

Note:	Exit passes control away from the current procedure, not merely the current block. But Exit does not violate the flow of control dictated by a try..finally construct; if Exit is called inside the try clause, the finally clause is still executed.


ExitCode variable
 VCL Reference

ExitCode variable

See also

Contains the application's exit code.

Unit

System

Category

backward compatibility routines

var ExitCode: Integer = 0;

Description

The ExitCode variable contains the application's exit code.  An exit procedure can learn the cause of termination by examining ExitCode. If the program terminates normally, ExitCode is zero. If the program terminates due to a call to Halt, ExitCode contains the value passed to Halt. If the program terminates due to a run-time error, ExitCode contains the error code.

Setting the ExitCode variable to a value other than 0 in the initialization section of a unit will make loading of a DLL fail (DllMain will return False). You can also set ExitCode in code called from DllProc or DllProcEx to signal failure of loading.


ExitProc variable
 VCL Reference

ExitProc variable

See also

Points to a program's exit procedure (provided for backward compatibility).

Unit

System

Category

termination procedure support

var ExitProc: Pointer;

Description

ExitProc points to an exit procedure in an application. The exit procedure always gets called as part of a program's termination. ExitProc is only used when generating executable files. Do not use ExitProc within a dynamically loaded package.

An exit procedure takes no parameters and must be compiled with a far procedure directive to force it to use the far call model.

Note:	Because ExitProc is not compatible with packages, it is not recommended that you assign a value to ExitProc. Instead, add code to the finalization section of a unit.


ExitProcessProc variable
 VCL Reference

ExitProcessProc variable

See also

ExitProcessProc specifies the last procedure to execute before the application shuts down.

Unit

System

Category

application-level information

var ExitProcessProc: procedure;

Description

Assign a value to ExitProcessProc to specify a procedure that you want to execute when the application shuts down. The value of ExitProcessProc is a procedure with no parameters.


Exp function
 VCL Reference

Exp function

See also	Example

Returns the exponential of X.

Unit

System

Category

arithmetic routines

function Exp(X: Real): Real;

Description

Exp returns the value of e raised to the power of X, where e is the base of the natural logarithms.


File mode constants
 VCL Reference

File mode constants

See also

File mode constants are used to open and close disk files.

Unit

System

Category

file management routines

const fmClosed = $D7B0;  // closed file

const fmInput  = $D7B1;  // reset file (TTextRec)

const fmOutput = $D7B2;  // rewritten file (TTextRec)

const fmInOut  = $D7B3;  // reset or rewritten file (TFileRec)

const fmCRLF   = $8      // DOS-style EoL and EoF markers (TTextRec)

const fmMask   = $D7B3;  // mask out fmCRLF flag (TTextRec)

Description

Use the file mode constants when opening and closing disk files. The Mode field of TFileRec and TTextRec will contain one of these values.


FileMode variable
 VCL Reference

FileMode variable

See also

Indicates the access mode on typed and untyped files opened by the Reset procedure.

Unit

System

Category

I/O routines

var FileMode: Byte = 2;

Description

The FileMode variable determines the access mode to use when typed and untyped files (not text files) are opened using the Reset procedure.

The default FileMode is 2 (Read/Write access). Assigning another value to FileMode causes all subsequent Resets to use that mode. The SysUtils unit declares a number of file open mode constants that can be assigned to the FileMode variable.

Note:	Be sure to reset FileMode before calling Reset with a read-only file. Even if you are only reading from the file, the default FileMode value (Read/Write access) will cause an attempt to open a read-only file to fail.

Warning:	FileMode is declared as a variable, not as a threadvar. Therefore this variable is not thread-safe.


FilePos function
 VCL Reference

FilePos function

See also	Example

Returns the current file position.

Unit

System

Category

I/O routines

function FilePos(var F): Longint;

Description

Use FilePos on the file variable of an open file to determine the current position in the file. If the current position in the file is at the very beginning, FilePos returns 0. Otherwise, FilePos returns the byte offset from the beginning of the current position.

FilePos will not work on a file that is not open or on a text file.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


FileSize function
 VCL Reference

FileSize function

See also	Example

Returns the number of records in a file.

Unit

System

Category

I/O routines

function FileSize(var F): Integer;

Description

Call FileSize to determine the size of the file specified by the file variable F. The size is expressed as the number of records in a record file. Thus:

If the file is declared as a file of byte, then the record size defaults to one byte, and FileSize returns the number of bytes in the file.

The Reset procedure can set the record size (in bytes) when it opens the file. In this case, FileSize returns the number of records in the file.

Note:	If the file is declared as an untyped file and you don’t specify a record size when you call Reset, then FileSize assumes a record size of 128. That is, FileSize gives the number of bytes divided by 128.

To use FileSize, the file must be open. If the file is empty, FileSize(F) returns 0.

Note:	FileSize can't be used on a text file.


FillChar procedure
 VCL Reference

FillChar procedure

See also	Example

Fills contiguous bytes with a specified value.

Unit

System

Category

character manipulation routines

procedure FillChar(var X; Count: Integer; Value: Byte);

Description

FillChar fills Count contiguous bytes (referenced by X) with the value specified by Value (Value can be type Byte or Char).

Warning:	This function does not perform any range checking.


Finalize procedure
 VCL Reference

Finalize procedure

See also

Uninitializes a dynamically allocated variable.

Unit

System

Category

dynamic allocation routines

procedure Finalize( var V [; Count: Integer] );

Description

Finalize should be used only in situations where a dynamically allocated variable is deallocated by other means than the Dispose procedure. Dynamic arrays can never be deallocated using the Dispose procedure, but can be freed by passing them to Finalize.

For global variables, local variables, objects, and dynamic variables deallocated using Dispose, the compiler generates code that finalizes all long strings, variants, and interfaces contained by the variable when the instance is destroyed.

If a dynamic variable meets the following two conditions, a call to Finalize is required to finalize the variable before it can be deallocated.

The variable is deallocated by other means than the Dispose standard procedure (for example using FreeMem).

The variable contains long strings, variants, or interfaces, not all of which are empty or Unassigned.

Finalize simply sets all long strings to empty and all variants and interfaces to Unassigned, thus properly releasing any memory that was referenced by the long strings and variants.

In cases where several variables are deallocated in a contiguous memory block such as a dynamically allocated array of strings, the additional Count parameter can be specified to finalize all variables in one operation.

If the variable specified in a call to Finalize contains no long strings, variants, or interfaces, the compiler eliminates the call and generates no code for it.


FindClassHInstance function
 VCL Reference

FindClassHInstance function

See also

Returns the instance handle for the module in which a class type is defined.

Unit

System

Category:

streaming utilities

function FindClassHInstance(ClassType: TClass): LongWord;

Description

FindClassHInstance finds the HInstance of the executable or library that “owns”, or contains, the runtime type information (RTTI) and the Virtual Method Table (VMT) for the specified class passed in as the Class Type parameter. When reading a component (which is a type), this information is needed in order to be able to load the form file (resources) associated with that component. The component streaming system uses FindClassHInstance for this purpose.

FindClassHInstance returns 0 if the instance is not found. Otherwise it returns the class owner’s HInstance.


FindHInstance function
 VCL Reference

FindHInstance function

See also

Returns the instance handle of the module that contains a specified address.

Unit

System

Category:

streaming utilities

function FindHInstance(Address: Pointer): LongWord;

Description

Use FindHInstance to obtain the HInstance of the module that “owns”, or contains, the address specified by the Address parameter. If no HInstance is found for that address, FindHInstance returns 0.


FindResourceHInstance function
 VCL Reference

FindResourceHInstance function

See also

Returns the instance handle of the resource module associated with a specified HInstance.

Unit

System

Category:

streaming utilities

function FindResourceHInstance(Instance: LongWord): LongWord;

Description

When an application that uses the VCL starts up, it checks the locale of the local system. If it finds any resource modules with the same name as the executable, runtime library, or package files it is using, it checks the extension on those modules. If the extension of the resource module matches the language and country of the system locale, the application uses the resources in that resource module instead of the resources in the executable, library, or package.

FindResourceHInstance finds and returns the HInstance of the resource module associated with the executable, library, or package identified by the Instance parameter.

FindResourceHInstance returns 0 upon failure.

Note:	The Instance parameter must be a valid HInstanceinstance handle.


Flush procedure
 VCL Reference

Flush procedure

See also	Example

Empties the buffer of a text file opened for output.

Unit

System

Category

Text file routines

procedure Flush(var t: Text);

Description

F is a text file variable.

When a text file is opened for output using Rewrite or Append, Flush empties the file's buffer. This guarantees that all characters written to the file at that time have actually been written to the external file. Flush has no effect on files opened for input.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Frac function
 VCL Reference

Frac function

See also	Example

Returns the fractional part of a real number.

Unit

System

Category

arithmetic routines

function Frac(X: Extended): Extended;

Description

The Frac function returns the fractional part of the argument X.

X is a real-type expression. The result is the fractional part of X; that is, Frac(X) = X - Int(X).


FreeAndNilProperties function
 VCL Reference

FreeAndNilProperties procedure

See also

Frees any property values that are objects and sets their value to nil.

Unit

TypInfo

Category:

miscellaneous routines

procedure FreeAndNilProperties(AObject: TObject);

Description

Call FreeAndNilProperties from a destructor to free all internally created objects and set the corresponding property values to nil. FreeAndNilProperties searches the properties of AObject, identifying any that are objects. It frees those objects, and sets the corresponding property to nil.

AObject must be compiled with runtime type information (RTTI). By default, all persistent objects (TPersistent and descendants) are compiled with RTTI. Other objects can be compiled with RTTI by using the $M+ compiler switch.

Warning:	Calling FreeAndNilProperties frees all object properties, which may lead to unintended results. FreeAndNilProperties can’t distinguish between objects that were created by AObject (and typically stored in a class member) from objects that are created independently and which should not be freed with AObject. To avoid unintentionally freeing independently-created objects, set properties that refer to external objects to nil before calling FreeAndNilProperties.


FreeMem procedure
 VCL Reference

FreeMem procedure

See also	Example

Disposes of a dynamic variable of a given size.

Unit

System

Category

dynamic allocation routines

procedure FreeMem(var P: Pointer[; Size: Integer]);

Description

FreeMem destroys the variable referenced by P and returns its memory to the heap. If P does not point to memory in the heap, a run-time error occurs. If P points to a structure that includes long strings, variants, dynamic arrays, or interfaces, call Finalize before calling Freemem.

P is a variable of any pointer type previously assigned by the GetMem procedure.

Size specifies the size in bytes of the dynamic variable to dispose of; if specified, it must be exactly the number of bytes previously allocated to that variable by GetMem.

After calling FreeMem, the value of P is undefined.


Get8087CW function
 VCL Reference

Get8087CW function

See also

Returns the value of the 8087 code word.

Unit

System

Category

FPU control

function Get8087CW: Word;

Description

Use Get8087CW to determine the current value of the floating-point unit control word. This control word controls the precision of floating point calculations, the rounding mode, and whether certain floating-point operations trigger exceptions. See Intel's processor documentation for details.


GetDir procedure
 VCL Reference

GetDir procedure

See also	Example

Returns the current directory for a specified drive.

Unit

System

Category

file management routines

procedure GetDir(D: Byte; var S: string);

Description

Use GetDir to determine the current directory on the drive specified by the D parameters. D can be set to any of the following values:

Value	Drive

0	Default

1	A

2	B

3	C

Note:	GetDir performs no error checking. For example, if the invalid value 5 (J) were specified, S would return J:\ as if it were the root directory of the invalid drive.


GetHeapStatus function
 VCL Reference

GetHeapStatus function

Returns the current status of the memory manager.

Unit

System

or Category

memory management routines

type

  THeapStatus = record

    TotalAddrSpace: Cardinal;

    TotalUncommitted: Cardinal;

    TotalCommitted: Cardinal;

    TotalAllocated: Cardinal;

    TotalFree: Cardinal;

    FreeSmall: Cardinal;

    FreeBig: Cardinal;

    Unused: Cardinal;

    Overhead: Cardinal;

    HeapErrorCode: Cardinal;

  end;

function GetHeapStatus: THeapStatus;

Description

GetHeapStatus returns the current status of the memory manager in a THeapStatus record. If the ShareMem unit not included, GetHeapStatus returns information about the global heap. If the ShareMem unit is included, GetHeapStatus returns information about memory that can be shared between different processes. GetHeapStatus can only return useful information if the built-in memory manager is used. For example, when using CodeGuard, the memory manager is replaced and GetHeapStatus always returns nil.

Warning:	When using the ShareMem unit, it must be the first unit included in the project file so that there is no possible mixing of memory management.

These are the meanings of the values in the THeapStatus record:

Field	Meaning

TotalAddrSpace	The (current) total address space available to your program, in bytes. This will grow as your program's dynamic memory usage grows.

TotalUncommitted	The total number of bytes (of TotalAddrSpace) for which space has not been allocated in the swap file.

TotalCommitted	The total number of bytes (of TotalAddrSpace) for which space has been allocated in the swap file. Note: TotalUncommitted + TotalCommitted = TotalAddrSpace

TotalAllocated	The total number of bytes dynamically allocated by your program.

TotalFree	The total number of free bytes available in the (current) address space for allocation by your program. If this number is exceeded, and enough virtual memory is available, more address space will be allocated from the OS; TotalAddrSpace will be incremented accordingly.

FreeSmall	Total bytes of small memory blocks which are not currently allocated by your program.

FreeBig	Total bytes of big memory blocks which are not currently allocated by your program. Large free blocks can be created by coalescing smaller, contiguous, free blocks or by freeing a large dynamic allocation.  (The exact size of the blocks is immaterial)

Unused	Total bytes which have never been allocated by your program. Note: Unused + FreeBig + FreeSmall = TotalFree These three fields (Unused, FreeBig, and FreeSmall) refer to dynamic allocation by the user program.

Overhead	The total number of bytes required by the heap manager to manage all the blocks dynamically allocated by your program.

HeapErrorCode	Indicates the current status of the heap, as internally determined.

Note:	TotalAddrSpace, TotalUncommitted and TotalCommitted refer to OS memory used by the program, where as TotalAllocated and TotalFree refer to the heap memory used within the program by dynamic allocations. Therefore, to monitor dynamic memory used in your program use TotalAllocated and TotalFree.


GetLastError function
 VCL Reference

GetLastError function

See also

Returns the last error reported by an operating system API call.

Unit

System

Category

exception handling routines

function GetLastError: Integer; stdcall;

Description

GetLastError returns the last error reported by an API call into the operating system. Calling this function usually resets the operating system error state.


GetMem procedure
 VCL Reference

GetMem procedure

See also	Example

Creates a dynamic variable and a pointer to the address of the block.

Unit

System

Category

dynamic allocation routines

procedure GetMem(var P: Pointer; Size: Integer);

Description

P is a variable of any pointer type. Size is an expression specifying the size in bytes of the dynamic variable to allocate. Access the newly allocated memory by dereferencing the pointer; that is, use P^.

If there isn't enough memory available to allocate the dynamic variable, an EOutOfMemory exception is raised. For more information on handling run-time library exceptions, see Handling RTL Exceptions.


GetMemoryManager procedure
 VCL Reference

GetMemoryManager procedure

See also 	Example

Returns the entry points of the currently installed memory manager.

Unit

System

Category

memory management routines

procedure GetMemoryManager(var MemMgr: TMemoryManager);

Description

GetMemoryManager returns the entry points of the currently installed memory manager in a TMemoryManager record.


GetVariantManager procedure
 VCL Reference

GetVariantManager procedure

See also

Returns the entry points of the routines that define variant behavior.

Unit

System

Category

variant support routines

procedure GetVariantManager(var VarMgr: TVariantManager);

Description

GetVariantManager returns the entry points of the routines that perform variant type conversion and define other variant behavior.


Halt procedure
 VCL Reference

Halt procedure

See also	Example

Initiates abnormal termination of a program.

Unit

System

Category

flow control routines

procedure Halt [ ( Exitcode: Integer) ];

Description

Halt performs an abnormal termination of a program and returns to the operating system. To perform a normal termination of a Delphi VCL non-console application, call Application.Terminate. Exitcode is an optional expression that specifies an exit code for the program.


HeapAllocFlags variable
 VCL Reference

HeapAllocFlags variable

See also

Flags that indicate how the memory manager obtains memory from the operating system.

Unit

System

Category

memory management routines

var HeapAllocFlags: Word = 2;

Description

Use HeapAllocFlags to customize the flags that the system memory manager uses when requesting blocks of memory from the operating system. By default, the value is GMEM_MOVEABLE.

HeapAllocFlags can be a combination of the following values:

Value	Meaning
GMEM_FIXED	Allocates fixed memory. The operating system can’t move blocks, so there is no need to lock memory when obtaining a pointer. (can’t be combined with GMEM_MOVEABLE).
GMEM_MOVEABLE	Allocates movable memory. In Win32, memory blocks are never moved in physical memory, but they can be moved within the default heap.
GMEM_ZEROINIT	Initializes memory contents to zero.
GMEM_MODIFY	Used to modify the attributes of an already-allocated block of memory.
GMEM_DDESHARE GMEM_SHARE	This flag is primarily for compatibility with 16-bit Window, but. can be used to enhance the performance of DDE operations. It should only be specified if the memory is to be used for DDE.
GPTR	Combines the GMEM_FIXED and GMEM_ZEROINIT flags.
GHND	Combines the GMEM_MOVEABLE and GMEM_ZEROINIT flags.


Hi function
 VCL Reference

Hi function

See also 	Example

Returns the high-order byte of X as an unsigned value.

Unit

System

Category

miscellaneous routines

function Hi(X): Byte;

Description

Use Hi to obtain the high-order byte of an expression of type Word or Integer.

Note:	Hi treats Integer as a 16-bit value, even if it is 32-bit.


High function
 VCL Reference

High function

See also 	Example

Returns the highest value in the range of an argument.

Unit

System

Category

miscellaneous routines

function High(X);

Description

Call High to obtain the upper limit of an Ordinal, Array, or string value. The result type is X, or the index type of X.

X is either a type identifier or a variable reference. The type denoted by X, or the type of the variable denoted by X, must be one of the following:

For this type	High returns

Ordinal type (includes Int64)	The highest value in the range of the type

Array type	The highest value within the range of the index type of the array. For empty arrays, High returns –1.

String type	The declared size of the string

Open array 	The value, of type Integer, giving the number of elements in the actual parameter minus one

String parameter	The value, of type Integer, giving the number of elements in the actual parameter minus one


HInstance variable
 VCL Reference

HInstance variable

See also

The handle provided by Windows for a module.

Unit

Category

application-level information

var HInstance: LongWord;

Description

HInstance contains the instance handle of the application or library as provided by Windows.


Inc procedure
 VCL Reference

Inc procedure

See also 	Example

Increments an ordinal value by one or N.

Unit

System

Category

ordinal routines

procedure Inc(var X [ ; N: Longint ] );

Description

Inc adds one or N to the variable X.

X is a variable of an ordinal type (including Int64), or a pointer type if the extended syntax is enabled.

N is an integer-type expression.

X increments by 1, or by N if N is specified; that is, Inc(X) corresponds to the statement X := X + 1, and Inc(X, N) corresponds to the statement X := X + N. However, Inc generates optimized code and is especially useful in tight loops.

Note:	If X is a pointer type, it increments X by N times the size of the type pointed to. Thus, given

type

  PMytype = ^TMyType;

and

var

  P: PMyType;

the statement

Inc(P);

increments P by SizeOf(TMyType).

Note:	You can’t use Inc on properties.

Note:	Inc(S, I) where S is a ShortInt and I is a number greater than 127 will cause an EIntOverFlow exception to be raised if range and overflow checking are on. Under Delphi 1.0 this did not raise an exception.


Include procedure
 VCL Reference

Include procedure

See also

Adds an element to a set.

Unit

System

Category

set handling routines

procedure Include(var S: set of T; I:T);

Description

Include adds the element I to the set S. The expression Include(S,I) corresponds to S := S + [I] but the Include procedure generates more efficient code.

S is a set type variable, and I is an expression of a type compatible with the base type of S.


Initialize procedure
 VCL Reference

Initialize procedure

See also

Initializes a dynamically allocated variable.

Unit

System

Category

dynamic allocation routines

procedure Initialize(var V [ ; Count: Integer ] );

Description

Initialize should be used only in situations where a variable is dynamically allocated by other means than the New standard procedure.

For global variables, local variables, objects, and dynamic variables allocated using New, the compiler generates code that initializes all long strings and variants contained by a variable upon creation of the variable. A call to Initialize is required to initialize a variable before it can be used if

The  dynamic variable is created by other means than the New standard function (for example using GetMem or ReallocMem).

The variable contains long strings, variants, or interfaces.

The memory allocated for the variable is not initialized to zeros.

Initialize simply zeros out the memory occupied by long strings, variants, and interfaces, causing long strings to be empty and variants and interfaces to be Unassigned.

In cases where several variables are allocated in a contiguous memory block, the additional Count parameter can be specified to initialize all variables in one operation.

If the variable specified in a call to Initialize contains no long strings, variants, or interfaces, the compiler eliminates the call and generates no code for it.


InitProc variable
 VCL Reference

InitProc variable

See also

InitProc is the last installed initialization procedure.

Unit

System

Category

application-level information

var InitProc: Pointer;

Description

Assign a value to InitProc to specify a procedure that you want to execute when the application starts up. The value of InitProc is a procedure with no parameters. For example:

procedure MyInitProcedure;

...

initialization

  InitProc = @MyInitProcedure;

begin

end;

Only one initialization procedure can be assigned to the InitProc variable. If your application defines more than one initialization procedure, only the last assignment to InitProc executes. To allow other initialization procedures to execute, you must “chain” the procedures together, calling the previously assigned value of InitProc from the new value. For example, the following code from the ComObj unit saves the previous value of InitProc before assigning a new value, and calls the saved value from the newly assigned initialization procedure:

SaveInitProc := InitProc;

InitProc := @InitComObj;


Input variable
 VCL Reference

Input variable

See also

Specifies a read-only file associated with an operating system's standard input device.

Unit

System

Category

I/O routines

var Input: Text;

Description

The Input variable is a read-only file associated with the operating system's standard input device, which is usually the keyboard.

In many of the standard file-handling routines, the file variable parameter can be omitted. Instead the routine operates on the Input or Output file variable. The following standard file-handling routines operate on the Input file when no file parameter is specified:

Eof

Eoln

Read

Readln

SeekEof

SeekEoln

When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), it automatically associates the Input and Output files with the application's console window. For non-console applications, any attempt to read from Input or write to Output will generate an I/O error.


Insert procedure
 VCL Reference

Insert procedure

See also 	Example

Inserts a substring into a string beginning at a specified point.

Unit

System

Category

String handling routines

procedure Insert(Source: string; var S: string; Index: Integer);

Description

Insert merges Source into S at the position S[index].

Source is a string-type expression. S is a string-type variable of any length. Index is an integer-type expression. It is a character index and not a byte index.

If Index is less than 1, it is mapped to a 1. If it is past the end of the string, it is set to the length of the string, turning the operation into an append.

If the Source parameter is an empty string, Insert does nothing.

Insert throws an EOutOfMemory exception if it is unable to allocate enough memory to accomodate the new returned string.


Int function
 VCL Reference

Int function

See also 	Example

Returns the integer part of a real number.

Unit

System

Category

arithmetic routines

function Int(X: Extended): Extended;

Description

Int returns the integer part of X; that is, X rounded toward zero. X is a real-type expression.


IOResult function
 VCL Reference

IOResult function

See also 	Example

Returns the status of the last I/O operation performed.

Unit

System

Category

I/O routines

function IOResult: Integer;

Description

IOResult returns the result of the last I/O routine when I/O-checking is off (that is, when using the {$I-}  compiler option). If IOResult returns 0, the last I/O operation succeeded. Otherwise, IOResult returns an error code.

If an I/O error occurs and I/O-checking is off, all subsequent I/O operations are ignored until the internal error flag is cleared. Calling IOResult clears the internal error flag.

An alternative way to handle I/O errors is to use exception handling with the {$I+} compiler option.


IsConsole variable
 VCL Reference

IsConsole variable

See also

Indicates whether the module was compiled as a console application.

Unit

System

Category

application-level information

var IsConsole: Boolean;

Description

The IsConsole variable is True if the module was compiled as a console application. This will be True in both an executable and a DLL.


IsLibrary variable
 VCL Reference

IsLibrary variable

See also

Indicates whether the module is a DLL.

Unit

System

Category

application-level information

var IsLibrary: Boolean;

Description

The IsLibrary variable is True if the module is a DLL.


IsMemoryManagerSet function
 VCL Reference

IsMemoryManagerSet function

See also

Indicates whether the memory manager has been overridden using the SetMemoryManager procedure.

Unit

System

Category

memory management routines

function IsMemoryManagerSet:Boolean);

Description

Call IsMemoryManagerSet to determine whether the default system memory management has been changed by a call to SetMemoryManager. IsMemoryManagerSet returns False if the default system memory management is in place, True otherwise.


IsMultiThread variable
 VCL Reference

IsMultiThread variable

See also

Indicates whether the application spawned additional threads using BeginThread or TThread objects.

Unit

System

Category

thread management routines

var IsMultiThread: Boolean;

Description

IsMultiThread is set to True by BeginThread and by COM class factories that support multi-threaded models in order to allow the memory manager to execute safely if a VCL application has more than one thread. If a second thread attempts to allocate memory, it is blocked until the first thread exits the memory manager.


IsVariantManagerSet function
 VCL Reference

IsVariantManagerSet function

See also

Indicates whether variant support is implemented in an application.

Unit

System

Category

variant support routines

function IsVariantManagerSet: Boolean;

Description

IsVariantManagerSet returns True if the compiler knows the locations of functions that define variant behavior. In any program or unit that uses the Variants unit (directly or indirectly), IsVariantManagerSet should return True.


JITEnable variable
 VCL Reference

JITEnable variable

Controls when the just-in-time debugger is called.

Unit

System

Category

application-level information

var JITEnable: Byte = 0;

Description

Use JITEnable to indicate what types of exceptions trigger the just-in-time debugger.

When JITEnable is 0 (the default), all exceptions are handled using the application’s exception handling mechanism. The just-in-time debugger is only called if the application provides no mechanism to catch exceptions. Note that any application that includes the Forms unit provides exception handling (via the Application object) for all but the initialization and finalization sections and does not trigger the just-in-time debugger.

When JITEnable is 1, any non-native exceptions (Exceptions not raised by Delphi-compiled code) trigger the just-in-time debugger. Native exceptions are handled by the application’s exception handling mechanism.

When JITEnable is greater than 1, all exceptions trigger the just-in-time debugger.

Note:	When you install Delphi, the IDE is registered as the just-in-time debugger. If you install other tools with debuggers, they may register themselves, overriding the registration of the Delphi IDE.


Length function
 VCL Reference

Length function

See also 	Example

Returns the number of characters in a string or elements in an array.

Unit

System

Category

string handling routines

function Length(S): Integer;

Description

Length returns the number of characters actually used in the string or the number of elements in the array.

For single-byte (AnsiString) and multibyte strings, Length returns the number of bytes used by the string. For Unicode (WideString) strings, Length returns the number of bytes divided by two.

S is a string- or array-valued expression.


LibModuleList variable
 VCL Reference

LibModuleList variable

See also

Lists module records for enumeration procedures.

Unit

System

Category

package support routines

type

  PLibModule = ^TLibModule;

  TLibModule = record

    Next: PLibModule;

    Instance: LongWord;

    CodeInstance: LongWord;

    DataInstance: LongWord;

    ResInstance: LongWord;

    Reserved: Integer;

  end;

var LibModuleList: PLibModule = nil;

Description

LibModuleList implements a linked list of records for executables and packages in an application. The Instance fields represent the instance handle of the executable or package and the instance handles of the text, data, and resource associated with that executable instance. LibModuleList is used by the EnumModules and the EnumResourceModules procedures.


Ln function
 VCL Reference

Ln function

See also 	Example

Returns the natural log of a real expression.

Unit

System

Category

arithmetic routines

function Ln(X: Real): Real;

Description

Ln returns the natural logarithm (Ln(e) = 1) of the real-type expression X.


Lo function
 VCL Reference

Lo function

See also 	Example

Returns the low order Byte of argument X.

Unit

System

Category

miscellaneous routines

function Lo(X): Byte;

Description

Lo returns the low-order Byte of the argument X as an unsigned value. X is an expression of type Integer.


Low function
 VCL Reference

Low function

See also 	Example

Returns the lowest value in a range.

Unit

System

Category

miscellaneous routines

function Low(X);

Call Low to obtain the lowest value or first element of an Ordinal, Array or string. Result type is X, or the index type of X where X is either a type identifier or a variable reference.

Type	Low returns

Ordinal type (includes Int64)	The lowest value in the range of the type

Array type	The lowest value within the range of the index type of the array

String type	Returns 0 only on shortstrings

Open array	Returns 0

String parameter	Returns 0


MainInstance variable
 VCL Reference

MainInstance variable

See also

The instance handle for the main executable.

Unit

System

Category

application-level information

var MainInstance: LongWord;

Description

Use MainInstance to obtain the Windows instance handle for the main executable of an application. This is useful in applications that use runtime libraries or packages, when you need the handle for the executable rather than for the library.

Note:	Do not use MainInstance when running a Delphi DLL from a non-Delphi executable.


MainThreadID variable
 VCL Reference

MainThreadID variable

See also

The instance handle for the current module's main thread of execution.

Unit

System

Category

application-level information

var MainThreadID: LongWord;

Description

Use MainThreadID to obtain the thread ID for the main execution thread (the current thread when the module was initialized). This ID can be used to identify the thread in Windows API calls.

During debugging, this ID appears in the thread status box for the main thread.


MaxInt constant
 VCL Reference

MaxInt constant

See also

The maximum value of the Integer data type.

Unit

System

Category

maximum and minimum values

const MaxInt = High(Integer);

Description

MaxInt represents the highest value in the range of the Integer data type (2147483647).


MaxLongint constant
 VCL Reference

MaxLongint constant

See also

The maximum value of the Longint data type.

Unit

System

Category

maximum and minimum values

const MaxLongint = High(Longint);

Description

MaxLongint represents the highest value in the range of the Longint data type (2147483647).


MkDir procedure
 VCL Reference

MkDir procedure

See also	Example

Creates a new subdirectory.

Unit

System

Category

I/O routines

procedure MkDir(const S: string); overload;

procedure MkDir(P: PChar); overload;

Description

MkDir creates a new subdirectory with the path specified by string S or P. The last item in the path cannot be an existing file name.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for an I/O error.


Move procedure
 VCL Reference

Move procedure

Example

Copies bytes from a source to a destination.

Unit

System

Category

miscellaneous routines

procedure Move(const Source; var Dest; Count: Integer);

Description

Move copies Count bytes from Source to Dest. No range checking is performed. Move compensates for overlaps between the source and destination blocks.

Whenever possible, use SizeOf to determine the count.


New procedure
 VCL Reference

New procedure

See also 	Example

Creates a new dynamic variable and sets P to point to it.

Unit

System

Category

dynamic allocation routines

procedure New(var P: Pointer);

Description

The New procedure creates a new dynamic variable and sets a pointer variable to point to it. P is a variable of any pointer type. The size of the allocated memory block corresponds to the size of the type that P points to. The newly created variable can be referenced as P^. If there isn't enough memory available to allocate the dynamic variable, an EOutOfMemory exception is raised.

When an application is finished using a dynamic variable created with New, it should dispose of the memory allocated for the variable using the Dispose standard procedure.


NoErrMsg variable
 VCL Reference

NoErrMsg variable

Controls whether the application displays an error message when a runtime error occurs.

Unit

System

Category

application-level information

var NoErrMsg: Boolean=False;

Description

Set NoErrMsg to control whether a message appears to indicate that a runtime error has occurred. When NoErrMsg is False (the default), runtime errors cause the application to display a message box indicating the type of error that occurred. When NoErrMsg is True, these messages are suppressed.

Note:	The SysUtils unit turns most run time errors into exceptions. If your application includes SysUtils, the runtime error message box is unlikely to appear, even if NoErrMsg is False.


Odd function
 VCL Reference

Odd function

Example

Returns True if argument is an odd number.

Unit

System

Category

ordinal routines

function Odd(X: Longint): Boolean;

Description

Odd tests if the argument is an odd number. It returns True if X is an odd number, False if X is even.


OleStrToString function
 VCL Reference

OleStrToString function

See also

Copies data received from a COM interface to a string.

Unit

System

Category

COM utilities

function OleStrToString(Source: PWideChar): string;

Description

OleStrToString copies data from the format used by COM into a Pascal string.


OleStrToStrVar procedure
 VCL Reference

OleStrToStrVar procedure

See also

Copies a string from its COM representation to an existing Pascal string.

Unit

System

Category

COM utilities

procedure OleStrToStrVar(Source: PWideChar; var Dest: string);

Description

OleStrToStrVar converts a wide string (the format used by COM interfaces) into an existing string variable.


Ord function
 VCL Reference

Ord function

See also 	Example

Returns the ordinal value of an ordinal-type expression.

Unit

System

Category

ordinal routines

function Ord(X);

Description

X is an ordinal-type expression. The result is the ordinal position of X; its type is the smallest standard integer type that can hold all values of X's type.

Ord cannot operate on Int64 values.


Output variable
 VCL Reference

Output variable

See also

Specifies a write-only file associated with standard output, usually the display.

Unit

System

Category

I/O routines

var Output: Text;

Description

The Output variable is a write-only file associated with the operating system's standard output file, which is usually the display.

In many of the standard file-handling routines, the file variable parameter can be omitted. Instead the routine operates on the Input or Output file variable. The following standard file-handling routines operate on the Output file when no file parameter is specified:

Write

Writeln

When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), Delphi automatically associates the Input and Output files with the application's console window. For non-console applications, any attempt to read from Input or write to Output will generate an I/O error.


ParamCount function
 VCL Reference

ParamCount function

See also 	Example

Returns the number of parameters passed on the command line.

Unit

System

Category

command line utilities

function ParamCount: Integer;

Description

ParamCount returns the number of parameters passed to the program on the command line. Separate parameters with spaces or tabs. Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).


ParamStr function
 VCL Reference

ParamStr function

See also 	Example

Returns a specified parameter from the command-line.

Unit

System

Category

command line utilities

function ParamStr(Index: Integer): string;

Description

ParamStr returns the parameter from the command line that corresponds to Index, or an empty string if Index is greater than ParamCount. For example, an Index value of 2 returns the second command-line parameter.

ParamStr(0) returns the path and file name of the executing program (for example, C:\TEST\MYPROG.EXE).

Note:	Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).


Pi function
 VCL Reference

Pi function

Returns 3.1415926535897932385.

Unit

System

Category

arithmetic routines

function Pi: Extended;

Description

Use Pi in mathematical calculations that require pi, the ratio of a circle's circumference to its diameter. Pi is approximated as 3.1415926535897932385.


Pos function
 VCL Reference

Pos function

See also 	Example

Returns the index value of the first character in a specified substring that occurs in a given string.

Unit

System

Category

string handling routines

function Pos(Substr: string; S: string): Integer;

Description

Pos searches for a substring, Substr, in a string, S. Substr and S are string-type expressions.

Pos searches for Substr within S and returns an integer value that is the index of the first character of Substr within S. Pos is case-sensitive. If Substr is not found, Pos returns zero.


Pred function
 VCL Reference

Pred function

See also 	Example

Returns the predecessor of the argument.

Unit

System

Category

ordinal routines

function Pred(X);

Description

X is an expression of an ordinal type (including Int64). The result, of the same type as X, is the predecessor of X. Do not use Pred on ordinal-type properties if the property uses a write procedure.


Ptr function
 VCL Reference

Ptr function

See also

Converts a specified address to a pointer.

Unit

System

Category

pointer and address routines

function Ptr(Address: Integer): Pointer;

Ptr converts the given address to a pointer. A call to this function generates no code, but simply treats the 32-bit value given by Address as a pointer. Like nil, the result of Ptr is assignment compatible with all pointer types.


PUCS4Chars function
 VCL Reference

PUCS4Chars function

See also

Converts a UCS4 string to an null-terminated array of UCS4 characters.

Unit

System

Category

character set conversions

function PUCS4Chars(const S: UCS4String): PUCS4Char;

Description

PUCS4Chars converts the UCS-4 string specified by S to a null-terminated sequence of UCS4Char values.


Random function
 VCL Reference

Random function

See also 	Example

Generates random numbers within a specified range.

Unit

System

Category

random number routines

function Random [ ( Range: Integer) ];

Description

Random returns a random number within the range 0 <= X < Range. If Range is not specified, the result is a real-type random number within the range

0 <= X < 1.

To initialize the random number generator, add a single call Randomize or assign a value to the RandSeed variable before making any calls to Random.

Note:	Because the implementation of the Random function may change between compiler versions, we do not recommend using Random for encryption or other purposes that require reproducible sequences of pseudo-random numbers.


Randomize procedure
 VCL Reference

Randomize procedure

See also	Example

Initializes the random number generator with a random value.

Unit

System

Category

random number routines

procedure Randomize;

Description

Randomize initializes the built-in random number generator with a random value (obtained from the system clock). The random number generator should be initialized by making a call to Randomize, or by assigning a value to RandSeed.

Do not combine the call to Randomize in a loop with calls to the Random function. Typically, Randomize is called only once, before all calls to Random.


RandSeed variable
 VCL Reference

RandSeed variable

See also

RandSeed stores the built-in random number generator's seed.

Unit

System

Category

random number routines

var RandSeed: LongInt = 0;

Description

By assigning a specific value to RandSeed, you can use the Random function to repetitively generate a specific sequence of random numbers. This is useful for applications that deal with data statistics and simulations. For applications that deal with encryption see the note under the Random function.


Read procedure
 VCL Reference

Read procedure

See also 	Example

Read reads data from a file.

Unit

System

Category

text file routines

Typed files:

procedure Read(F , V1 [, V2,...,Vn ] );

Text files:

procedure Read( [ var F: Text; ] V1 [, V2,...,Vn ] );

Description

The Read procedure can be used in the following ways.

For typed files, it reads a file component into a variable.

For text files, it reads one or more values into one or more variables.

With a type string variable:

Read reads all characters up to, but not including, the next end-of-line marker or until Eof(F) becomes True; it does not skip to the next line after reading. If the resulting string is longer than the maximum length of the string variable, it is truncated.

After the first Read, each subsequent Read sees the end-of-line marker and returns a zero-length string.

Use multiple Readln calls to read successive string values.

When the extended syntax is enabled, Read can read null-terminated strings into zero-based character arrays.

With a type character variable:

Read reads one character from the file and assigns it to the variable. IfCRLF mode is enabled and Eof(F) was True before Read was executed, the value Chr(26) (a Ctrl-Z character) is assigned to the variable. (To enable CRLF mode, use SetLineBreakStyle.)

With type integer or type real variables:

Read skips any blanks, tabs, or end-of-line markers preceding the numeric string.

If the numeric string does not conform to the expected format, an I/O error occurs; otherwise, the value is assigned to the variable.

The next Read starts with the blank, tab, or end-of-line marker that terminated the numeric string.


Readln procedure
 VCL Reference

Readln procedure

See also 	Example

Reads a line of text from a file.

Unit

System

Category

text file routines

procedure Readln([ var F: Text; ] V1 [, V2, ...,Vn ]);

Description

The Readln procedure reads a line of text and then skips to the next line of the file.

Readln(F) with no parameters causes the current file position to advance to the beginning of the next line if there is one; otherwise, it goes to the end of the file.

When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), Delphi automatically associates the Input and Output files with the application's console window. For non-console applications, any attempt to read from Input or write to Output will generate an I/O error.

Note:	{$I+} handles run-time errors using exceptions.  When using {$I-}, use IOResult to check for I/O errors.


ReallocMem procedure
 VCL Reference

ReallocMem procedure

See also

Reallocates a dynamic variable.

Unit

System

Category

memory management routines

procedure ReallocMem(var P: Pointer; Size: Integer);

Description

On entry, P must be nil or point to a dynamic variable that was previously allocated with GetMem, AllocMem, or ReallocMem.

If P is nil and Size is zero, ReallocMem does nothing.

If P is nil and Size is not zero, ReallocMem allocates a new block of the given size and sets P to point to the block. This corresponds to a call to GetMem.

If P is not nil and Size is zero, ReallocMem disposes the block referenced by P and sets P to nil. This corresponds to a call to FreeMem, except that FreeMem doesn't clear the pointer.

If P is not nil and Size is not zero, ReallocMem reallocates the block referenced by P to the size given by Size. Existing data in the block is not affected by the reallocation, but if the block is made larger, the contents of the newly allocated portion of the block are undefined. If the block cannot be reallocated in place, it is moved to a new location in the heap, and P is updated accordingly.


ReleaseExceptionObject procedure
 VCL Reference

ReleaseExceptionObject procedure

See also

Decrements the reference count on an exception object that was incremented by a call to AcquireExceptionObject.

Unit

System

Category

exception handling routines

function ReleaseExceptionObject(X);

Description

When an exception is thrown, the exception object that is thrown is destroyed automatically when the except clause that handles the exception exits, unless the application calls AcquireExceptionObject to increase the reference count on the exception object. When an application calls AcquireExceptionObject to increase the reference count on an exception object, it is responsible for freeing the exception object by calling the ReleaseExceptionObject procedure.

Every call to AcquireExceptionObject must be matched by a corresponding call to ReleaseExceptionObject. These calls can be nested. When the reference count on the exception object drops to zero, it is automatically freed.


Rename procedure
 VCL Reference

Rename procedure

See also 	Example

Changes the name of an external file.

Unit

System

Category

I/O routines

procedure Rename(var F; Newname: string);

procedure Rename(var F; Newname: PChar);

Description

The external file associated with F is renamed Newname. Further operations on F operate on the external file with the new name.

F is a variable of any file type. Newname is a string-type expression or an expression of type PChar if the extended syntax is enabled.

Note:	{$I+} handles run-time errors using exceptions.  When using {$I-}, use IOResult to check for I/O errors.


Reset procedure
 VCL Reference

Reset procedure

See also 	Example

Opens an existing file.

Unit

System

Category

I/O routines

procedure Reset(var F [: File; RecSize: Word ] );

Description

Reset opens the existing external file with the name assigned to F using the mode specified by the global FileMode variable. An error results if no existing external file of the given name exists or if the file can’t be opened with the current file mode. If F is already open, it is first closed and then reopened. The current file position is set to the beginning of the file.

Warning:	The default value of FileMode is 2 (Read/Write access). If this is not changed to a read-only file mode before calling Reset, attempts to open read-only files will fail.

F is a variable of any file type associated with an external file using AssignFile. RecSize is an optional expression, which can be specified only if F is an untyped file. If F is an untyped file, RecSize specifies the record size to be used in data transfers. If RecSize is omitted, a default record size of 128 bytes is assumed.

If F is assigned an empty name, such as AssignFile(F, ''), then after the call to Reset, F refers to the standard input file.

If F is a text file, F becomes read-only.

After a call to Reset, Eof(F) is True if the file is empty; otherwise, Eof(F) is False.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Rewrite procedure
 VCL Reference

Rewrite procedure

See also	Example

Creates a new file and opens it.

Unit

System

Category

I/O routines

procedure Rewrite(var F: File [; Recsize: Word ] );

Description

Rewrite creates a new external file with the name assigned to F.

F is a variable of any file type associated with an external file using AssignFile. RecSize is an optional expression, which can be specified only if F is an untyped file. If F is an untyped file, RecSize specifies the record size to be used in data transfers. If RecSize is omitted, a default record size of 128 bytes is assumed.

If an external file with the same name already exists, it is deleted and a new empty file is created in its place.

If F is already open, it is first closed and then re-created. The current file position is set to the beginning of the empty file.

If F was assigned an empty name, such as AssignFile(F,''), then after the call to Rewrite, F refers to the standard output file.

If F is a text file, F becomes write-only.

After calling Rewrite, Eof(F) is always True.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


RmDir procedure
 VCL Reference

RmDir procedure

See also	Example

Deletes an empty subdirectory.

Unit

System

Category

I/O routines

procedure RmDir(const S: string);overload;

procedure RmDir(P: PChar); overload;

Description

RmDir removes the subdirectory with the path specified by S or P. If the path does not exist, is non-empty, or is the currently logged directory, an I/O error occurs.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Round function
 VCL Reference

Round function

See also 	Example

Returns the value of X rounded to the nearest whole number.

Unit

System

Category

arithmetic routines

function Round(X: Extended): Int64;

Description

The Round function rounds a real-type value to an integer-type value.

X is a real-type expression. Round returns an Int64 value that is the value of X rounded to the nearest whole number. If X is exactly halfway between two whole numbers, the result is always the even number. This method of rounding is often called “Banker’s Rounding”.

If the rounded value of X is not within the Int64 range, a run-time error is generated, which can be handled using the EInvalidOp exception.

Note:	The behavior of Round can be affected by the Set8087CW procedure or SetRoundMode function.


RunError procedure
 VCL Reference

RunError procedure

See also 	Example

Stops execution and generates a run-time error.

Unit

System

Category

flow control routines

procedure RunError [ ( Errorcode: Byte ) ];

Description

The RunError procedure stops program execution by generating a run-time error with the given number at the current statement. Errorcode is the run-time error number (0 if omitted).


Seek procedure
 VCL Reference

Seek procedure

See also 	Example

Moves the current position of a file to a specified component.

Unit

System

Category

I/O routines

procedure Seek(var F; N: Longint);

Description

Use Seek to move to a specified position in open typed or untyped files. The current file position of F moves to component number N, where the number of the first component of a file is 0.

In the above syntax, F is a typed or untyped file variable. The file specified by F must be open. N is an expression of type Longint

To expand a file, seek one component beyond the last component; that is, the statement Seek(F, FileSize(F)) moves the current file position to the end of the file.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


SeekEof function
 VCL Reference

SeekEof function

See also 	Example

Returns the end-of-file status of a file, ignoring whitespace.

Unit

System

Category

text file routines

function SeekEof [ (var F: Text) ]: Boolean;

Description

Call SeekEof to determine whether there is only whitespace between the file pointer and the end of a file. SeekEof moves the file pointer past any whitespace, leaving it positioned at the end of a file or on the next non-whitespace character, whichever comes first. If it leaves the file pointer at the end of the file, SeekEof returns True. Otherwise, it returns False.

SeekEof can only be used on open text files.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


SeekEoln function
 VCL Reference

SeekEoln function

See also 	Example

Returns the end-of-line status of a file, ignoring whitespace.

Unit

System

Category

text file routines

function SeekEoln [ (var F: Text) ]: Boolean;

Description

Call SeekEoln to determine whether there is only whitespace between the file pointer and the end of the current line. SeekEoln moves the file pointer past any whitespace, leaving it positioned at the end of the current line, the end of the file, or on the next non-whitespace character (whichever comes first). If SeekEoln leaves the file pointer at the end of the current line or at the end of the file, it returns True. Otherwise, it returns False.

SeekEoln can be used only on open text files.

Note:	{$I+} handles run-time errors using exceptions. When using {$I-}, use IOResult to check for I/O errors.


Set8087CW procedure
 VCL Reference

Set8087CW procedure

See also	Example

Sets both the control word in the floating point unit and the variable NoErrMsg declared in the system unit.

Unit

System

Category

FPU control

procedure Set8087CW(NewCW: Word);

Description

The floating-point unit control word controls the precision of floating point calculations, the rounding mode, and whether certain floating-point operations trigger exceptions. See Intel's processor documentation for details.

This routine allows the programmer to have direct access to the CW. Be aware that using this routine to change the value of the 8087CW will change the behavior of the program’s FP calculations. It is the programmer’s responsibility to reset it.

It is recommended that you disable all floating-point exceptions when using OpenGL to render 3D graphics. To do this, call Set8087CW(0x133f) in your main form’s OnCreate event before calling any OpenGL functions.


SetLength procedure
 VCL Reference

SetLength procedure

See also

Sets the length of a string or dynamic-array variable.

Unit

System

Category

string handling routines

procedure SetLength(var S; NewLength: Integer);

Description

S is a string or dynamic-array variable.

NewLength is the new number of characters or elements in S.

For a short-string variable, SetLength simply sets the length-indicator character (the character at S[0]) to the given value. In this case, NewLength must be a value between 0 and 255.

For a long-string or dynamic-array variable, SetLength reallocates the string or array referenced by S to the given length. Existing characters in the string or elements in the array are preserved, but the content of newly allocated space is undefined. The one exception is when increasing the length of a dynamic array in which the elements are types that must be initialized (strings, Variants, Variant arrays, or records that contain such types). When S is a dynamic array of types that must be initialized, newly allocated space is set to 0 or nil.

Following a call to SetLength, S is guaranteed to reference a unique string or array—that is, a string or array with a reference count of one. If there is not enough memory available to reallocate the variable, SetLength raises an EOutOfMemory exception.


SetLineBreakStyle procedure
 VCL Reference

SetLineBreakStyle procedure

See also

Determines the end-of-line and end-of-file conventions for text file I/O.

Unit

System

Category

text file routines

type TTextLineBreakStyle = (tlbsLF, tlbsCRLF);

procedure SetLineBreakStyle(var T: Text; Style: TTextLineBreakStyle);

Description

Call SetLineBreakStyle to determine how text file routines find or mark the end of a line and the end of a file. Affected routines include Read, Write, Readln, Writeln, Eof, Eoln, SeekEof, and SeekEoln.

T is the text file whose line break style is altered. It must be closed, or SetLineBreakStyle generates a runtime error.

Style indicates the style to use. When Style is tlbsLF, end-of-line is marked using only a linefeed character. When Style is tlbsCRLF, end-of-line is marked using a carriage return and linefeed.


SetMemoryManager procedure
 VCL Reference

SetMemoryManager procedure

See also 	Example

Sets entry points of the memory manager.

Unit

System

Category

memory management routines

procedure SetMemoryManager(const MemMgr: TMemoryManager);

Description

SetMemoryManager sets the entry points of the memory manager to the three functions encapsulated by the MemMgr parameter. Use SetMemoryManager to change the memory allocation routines that are used for:

The GetMem, ReallocMem, and FreeMem standard procedures.

The New and Dispose standard procedures.

Allocation and deallocation of objects through constructors and destructors.

Allocation and deallocation of dynamic strings and dynamic arrays.


SetString procedure
 VCL Reference

SetString procedure

See also

Sets the contents and length of the given string.

Unit

System

Category

string handling routines

procedure SetString(var s: string; buffer: PChar; len: Integer);

Description

The SetString standard procedure sets the contents and length of the given string variable to the block of characters given by the Buffer and Len parameters.

For a short string variable, SetString sets the length indicator character (the character at S[0]) to the value given by Len and then, if the Buffer parameter is not nil, copies Len characters from Buffer into the string starting at S[1]. For a short string variable, the Len parameter must be a value between 0 and 255.

For a long string variable, SetString sets S to reference a newly allocated string of the given length. If the Buffer parameter is not nil, SetString then copies Len characters from Buffer into the string; otherwise, the contents of the new string is left uninitialized. If there is not enough memory available to create the string, an EOutOfMemory exception is raised. Following a call to SetString, S is guaranteed to reference a unique string, that is a string with a reference count of one.


SetTextBuf procedure
 VCL Reference

SetTextBuf procedure

See also 	Example

Assigns an I/O buffer to a text file.

Unit

System

Category

text file routines

procedure SetTextBuf(var F: Text; var Buf [ ; Size: Integer] );

Description

SetTextBuf changes the text file F to use the buffer specified by Buf instead of F's internal buffer. F is a text file variable, Buf is any variable, and Size is an optional expression.

Each Text file variable has an internal 128-byte buffer that buffers Read and Write operations. This buffer is adequate for most operations. However, heavily I/O-bound programs benefit from a larger buffer to reduce disk head movement and file system overhead.

Size specifies the size of the buffer in bytes. If Size is omitted, SizeOf(Buf) is assumed. The new buffer remains in effect until F is next passed to AssignFile.

SetTextBuf can be called immediately after Reset, Rewrite, and Append, but never apply it to an open file.

When SetTextBuf is called on an open file once I/O operations have taken place, data could be lost because of the change of buffer.

The runtime library does not ensure that the buffer exists for the entire duration of I/O operations on the file. A common error is to install a local variable as a buffer, then use the file outside the procedure that declared the buffer.


SetVariantManager procedure
 VCL Reference

SetVariantManager procedure

See also

Sets the entry points of routines that define variant behavior.

Unit

System

Category

variant support routines

procedure SetVariantManager(const VarMgr: TVariantManager);

Description

SetVariantManager sets the entry points of the routines that perform variant type conversion and define other variant behavior.


Sin function
 VCL Reference

Sin function

See also 	Example

Returns the sine of the angle in radians.

Unit

System

Category

trigonometry routines

function Sin(X: Extended): Extended;

Description

The Sin function returns the sine of the argument.

X is a real-type expression. Sin returns the sine of the angle X in radians.


SizeOf function
 VCL Reference

SizeOf function

See also 	Example

Returns the number of bytes occupied by a variable or type.

Unit

System

Category

miscellaneous routines

function SizeOf(X): Integer;

Description

Pass a variable reference to SizeOf to determine the number of bytes used to represent the variable. Pass a type identifier to SizeOf to determine the number of bytes used to represent instances of that type. SizeOf is useful for determining the amount of memory to specify for the FillChar, Move, or GetMem procedures.


Slice function
 VCL Reference

Slice function

See also

Returns a sub-section of an array.

Unit

System

Category

miscellaneous routines

function Slice(var A: array; Count: Integer): array;

Description

Use Slice to select a sub-section (slice) of an array to be passed as an open array parameter. Slice is only allowed as a parameter in a call to a procedure or function that expects an open array parameter. Slice selects the first Count elements of the array given by A to be passed as an open array parameter. A can be an open array parameter itself, allowing dynamically allocated arrays to be passed to open array parameters.


Sqr function
 VCL Reference

Sqr function

See also 	Example

Returns the square of a number.

Unit

System

Category

arithmetic routines

function Sqr(X: Extended): Extended;

function Sqr(X: Integer): Integer;

Description

The Sqr function returns the square of the argument.

X is a floating-point expression. The result, of the same type as X, is the square of X, or X*X.


Sqrt function
 VCL Reference

Sqrt function

See also 	Example

Returns the square root of X.

Unit

System

Category

arithmetic routines

function Sqrt(X: Extended): Extended;

Description

X is a floating-point expression. The result is the square root of X.


Str procedure
 VCL Reference

Str procedure

See also 	Example

Formats a string and returns it to a variable.

Unit

System

Category

string handling routines

procedure Str(X [: Width [: Decimals ]]; var S);

Description

Str converts X to a string representation according to the Width and Decimals formatting parameters. The effect is like a call to Write except the resulting string is stored in S instead of being written to a text file.

X is an integer-type or real-type expression. Width and Decimals are integer-type expressions. S is a string-type variable or a zero-based character array variable if extended syntax is enabled.


StringOfChar function
 VCL Reference

StringOfChar function

See also

Returns a string with a specified number of repeating characters.

Unit

System

Category

string handling routines

function StringOfChar(Ch: Char; Count: Integer): string;

Description

StringOfChar returns a string containing Count characters with the character value given by Ch. For example,

S := StringOfChar('A', 10);

sets S to the string 'AAAAAAAAAA'.


StringToOleStr function
 VCL Reference

StringToOleStr function

See also

Allocates memory and copies a string to the OLE format.

Unit

System

Category

COM utilities

function StringToOleStr(const Source: string): PWideChar;

Description

StringToOleStr allocates memory and copies string data from a native AnsiStringPascal string into a format that can be passed to OLE functions.


StringToWideChar function
 VCL Reference

StringToWideChar function

See also

Returns a UNICODE string from a Pascal string.

Unit

System

Category

character set conversions

function StringToWideChar(const Source: string; Dest: PWideChar; DestSize: Integer): PWideChar;

Description

StringToWideChar converts the string given by Source from ANSI to UNICODE and stores the result in the buffer given by Dest and DestSize. Following the call, the Dest buffer contains at most DestSize - 1 characters from the source string, terminated by a NULL wide character. The function returns a pointer to Dest.


Succ function
 VCL Reference

Succ function

See also 	Example

Returns the successor of an argument.

Unit

System

Category

ordinal routines

function Succ(X);

Description

Succ returns the successor of the argument, X.

X is an expression of an ordinal type (including Int64). The result, of the same type as X, is the successor of X. Do not use Succ on properties if the property uses a write procedure.


Swap function
 VCL Reference

Swap function

See also

Exchanges high order byte with the low order byte of an integer or word.

Unit

System

Category

backward compatibility routines

function Swap(X);

Description

Swap exchanges the high-order bytes with the low-order bytes of the argument. X is an expression of type SmallInt, as a 16-bit value, or Word. This is provided for backward compatibility only.


SysFreeMem function
 VCL Reference

SysFreeMem function

See also

Frees the memory pointed to by a specified pointer.

Unit

System

or Category

memory management routines

function SysFreeMem(P: Pointer): Integer;

Description

When implementing a custom memory manager, use SysFreeMem to free the memory pointed to by the P parameter. Do not include the ShareMem unit if the memory was allocated from the global heap. Including the ShareMem unit “overrides” the heap version for when memory is shared with other processes.

Warning:	When using the ShareMem unit, it must be the first unit included in the project file so that there is no possible mixing of memory management.


SysGetMem function
 VCL Reference

SysGetMem function

See also

Allocates a specified number of bytes and returns a pointer to them.

Unit

System

or Category

memory management routines

function SysGetMem(Size: Integer): Pointer;

Description

When implementing a custom memory manager, use SysGetMem to dynamically allocate Size bytes of memory. Unless the ShareMem unit is included, the memory is allocated from the Global heap. If the ShareMem unit is included, the memory is reference-counted and can be shared with other processes.

Warning:	When using the ShareMem unit, it must be the first unit included in the project file so that there is no possible mixing of memory management.


SysReallocMem function
 VCL Reference

SysReallocMem function

See also

Returns a pointer to a specified number of bytes, preserving the values pointed to by the Pointer parameter.

Unit

System

or Category

memory management routines

function SysReallocMem(P: Pointer; Size: Integer): Pointer;

Description

When implementing a custom memory manager, use SysReallocMem to change the size of a dynamically allocated chunk of memory. If SysReallocMem can’t expand the memory block point to by P, it frees the referenced memory and copies the values to the newly allocated memory that is returned. If Size is less than the number of bytes pointed to by P, only the first Size bytes are preserved. Otherwise, the entire value of the memory pointed to by P is preserved in the newly allocated memory.

Unless the ShareMem unit is included, both the return value and P must point to memory from the global heap. If the ShareMem unit is included, P and the return value point to memory that can be shared with other processes.

Warning:	When using the ShareMem unit, it must be the first unit included in the project file so that there is no possible mixing of memory management.


Trunc function
 VCL Reference

Trunc function

See also 	Example

Truncates a real number to an integer.

Unit

System

Category

arithmetic routines

function Trunc(X: Extended): Int64;

Description

The Trunc function truncates a real-type value to an integer-type value. X is a real-type expression. Trunc returns an Int64 value that is the value of X rounded toward zero.

If the truncated value of X is not within the Int64 range, an EInvalidOp exception is raised.


Truncate procedure
 VCL Reference

Truncate procedure

See also 	Example

Deletes all the records after the current file position.

Unit

System

Category

I/O routines

procedure Truncate(var F);

Description

Call Truncate to cause the current file position to become end-of-file (Eof(F) is True).

F is a file variable of any type except a text file. Truncate does not work on text files. F must be open.


TypeInfo function
 VCL Reference

TypeInfo function

Returns a pointer to compiler-generated runtime type information for a type identifier.

Unit

System

Category

streaming utilities

function TypeInfo(TypeIdent): Pointer;

Description

Certain low-level VCL procedures and functions require runtime type information pointers as parameters. The actual format of the runtime type information is internal to the compiler and may change between releases.


UCS4StringToWideString function
 VCL Reference

UCS4StringToWideString function

See also

Converts a string of 4-byte Unicode characters into a WideString value.

Unit

System

Category

character set conversions

function UCS4StringToWideString(const S: UCS4String): WideString;

Description

Call UCS4StringToWideString to convert a string of UCS4 (4-byte Unicode) characters into a WideString value.


UnicodeToUtf8 function
 VCL Reference

UnicodeToUtf8 function

See also

Converts a string of Unicode characters into a UTF-8 string.

Unit

System

Category

character set conversions

function UnicodeToUtf8(Dest: PChar; MaxDestBytes: Cardinal; Source: PWideChar; SourceChars: Cardinal): Cardinal; overload;

function UnicodeToUtf8(Dest: PChar; Source: PWideChar; MaxBytes: Integer): Integer;overload; deprecated;

Description

Call UnicodeToUtf8 to convert a Unicode string to a null-terminated sequence of UTF-8 characters.

Dest receives the resulting null-terminated array of UTF-8 characters.

MaxDestBytes or MaxBytes indicates the number of bytes available in the buffer specified by Dest, not counting the byte for the null terminator.

Source is an array of Unicode characters.

SourceChars is the number of characters in Source. If SourceChars is not specified, Source must be null-terminated.

UnicodeToUtf8 returns the number of bytes written to Dest.


UniqueString procedure
 VCL Reference

UniqueString procedure

See also

Ensures that a given string has a reference count of one.

Unit

System

Category

miscellaneous routines

procedure UniqueString(var str: string); overload;

procedure UniqueString(var str: WideString); overload;

Description

Following a call to SetString, str is guaranteed to reference a unique string—that is, a string with a reference count of one. For normal string handling, there is no need to call UniqueString. UniqueString is used only in cases where an application casts a string to a PChar or PWideChar and then modifies the contents of the string.


UpCase function
 VCL Reference

UpCase function

See also 	Example

Converts a character to uppercase.

Unit

System

Category

character manipulation routinescharacter manipulation routines

function UpCase(Ch: Char): Char;

Description

UpCase converts a character to uppercase. Ch is an expression of type Char. Character values not in the range a..z are unaffected.


Utf8Decode function
 VCL Reference

Utf8Decode function

See also

Converts a UTF8 string to a Unicode string (WideString).

Unit

System

Category

character set conversions

function UTF8Decode(const S: UTF8String): WideString;

Description

Call Utf8Decode to convert a UTF-8 string to Unicode. S is a string encoded in UTF-8. UTF8Decode returns the corresponding WideString value that represents the string in Unicode.


Utf8Encode function
 VCL Reference

Utf8Encode function

See also

Converts a WideString value to a UTF8 string.

Unit

System

Category

character set conversions

function Utf8Encode(const WS: WideString): UTF8String;

Description

Call Utf8Encode to convert a Unicode string to UTF-8. WS is the Unicode string to convert. Utf8Encode returns the corresponding UTF-8 string.


Utf8ToAnsi function
 VCL Reference

Utf8ToAnsi function

See also

Converts a UTF8 string to a string of Ansi characters.

Unit

System

Category

character set conversions

function Utf8ToAnsi(const S: UTF8String): string;

Description

Call Utf8ToAnsi to convert a UTF-8 string to Ansi. S is a string encoded in UTF-8. Utf8ToAnsi returns the corresponding string that uses the Ansi character set.


Utf8ToUnicode function
 VCL Reference

Utf8ToUnicode function

See also

Converts a string of UTF-8 characters to a Unicode string.

Unit

System

Category

character set conversions

function Utf8ToUnicode(Dest: PWideChar; MaxDestChars: Cardinal; Source: PChar; SourceBytes: Cardinal): Cardinal; overload;

function Utf8ToUnicode(Dest: PWideChar; Source: PChar; MaxChars: Integer): Integer;overload; deprecated;

Description

Call Utf8ToUnicode to convert a UTF-8 string to Unicode.

Dest receives the resulting null-terminated array of Unicode characters.

MaxDestChars or MaxChars indicates the maximum number of Unicode characters that the buffer specified by Dest can hold, not counting the null terminator.

Source is an array of UTF-8 characters.

SourceBytes is the number of bytes in Source. If SourceBytes is not specified, Source must be null-terminated.

Utf8ToUnicode returns the number of characters written to Dest.


Val procedure
 VCL Reference

Val procedure

See also 	Example

Converts a string to a numeric representation.

Unit

System

Category

string handling routines

procedure Val(S; var V; var Code: Integer);

Description

Val converts the string value S to its numeric representation, as if it were read from a text file with Read.

S is a string-type expression; it must be a sequence of characters that form a signed real number.

V is an integer-type or real-type variable. If V is an integer-type variable, S must form a whole number.

Code is a variable of type Integer.

If the string is invalid, the index of the offending character is stored in Code; otherwise, Code is set to zero. For a null-terminated string, the error position returned in Code is one larger than the actual zero-based index of the character in error.

Val performs range checking differently depending upon the setting of the $R compiler directive and the type of the parameter V.

Setting	Result

{$R+}	An out-of-range value always generates a run-time error.

{$R-}	The values for out-of-range vary depending upon the data type of V.


VarArrayRedim procedure
 VCL Reference

VarArrayRedim procedure

See also

Resizes a Variant array.

Unit

System

Category

Variant support routines

procedure VarArrayRedim(A: Variant; HighBound: Integer);

Description

VarArrayRedim resizes the given Variant array by changing the high bound of the rightmost dimension to the given value. The A parameter can be a Variant or an OleVariant, and it must be possible to assign a value to A (A must be an lvalue).

Existing elements of the array are preserved, and new elements are set to zero or empty. An EVariantError exception is thrown if the Variant given by A is not an array, or if there is not enough memory to resize the array.

Note:	A Variant array can’t be resized while it is locked.


VarClear procedure
 VCL Reference

VarClear procedure

See also

Empties a Variant, so that it is unassigned.

Unit

System

Category

Variant support routines

procedure VarClear(V: Variant);

Description

Calling VarClear is equivalent to assigning the Unassigned constant to the Variant. V can be either a Variant or an OleVariant, but it must be possible to assign a value to it (it must be an lvalue).

After calling VarClear, the VarIsEmpty function returns True, and the VarType function returns varEmpty. Using an unassigned variant in an expression causes an EVariantError exception to be thrown. Likewise, if you attempt to convert an unassigned Variant to another type (using VarAsType ), an EVariantError exception is thrown.

Note:	Do not confuse clearing a Variant, which leaves it unassigned, with assigning a Null value. A Null Variant is still assigned, but has the value Null. Unlike unassigned Variants, Null Variants can be used in expressions and can be converted to other types of Variants.


WideCharLenToString function
 VCL Reference

WideCharLenToString function

See also

Converts Unicode characters to single or multi byte character data.

Unit

System

Category

character set conversions

function WideCharLenToString(Source: PWideChar; SourceLen: Integer): string;

Description

WideCharLenToString converts SourceLen Unicode characters from the buffer given by Source to a string made up of single or multi byte characters. The function uses the WideCharToMultiByte Win32 API to perform the actual conversion.


WideCharLenToStrVar procedure
 VCL Reference

WideCharLenToStrVar procedure

See also

WideCharLenToStrVar converts Unicode characters to single or multi byte character data.

Unit

System

Category

character set conversions

procedure WideCharLenToStrVar(Source: PWideChar; SourceLen: Integer; var Dest: string);

Description

The WideCharToStrVar procedure converts SourceLen WideChar (Unicode) characters from Source into single or multi byte character data, and copies the result into Dest.


WideCharToString function
 VCL Reference

WideCharToString function

See also

Converts null-terminated Unicode string to single or multi byte character data.

Unit

System

Category

character set conversions

function WideCharToString(Source: PWideChar): string;

Description

WideCharToString converts the given null-terminated Unicode string to a string made up of single- or multi-byte characters. The function uses the WideCharToMultiByte Win32 API to perform the actual conversion.


WideCharToStrVar procedure
 VCL Reference

WideCharToStrVar procedure

See also

Converts Unicode string to a single or multi byte character data.

Unit

System

Category

character set conversions

procedure WideCharToStrVar(Source: PWideChar; var Dest: string);

Description

WideCharToStrVar converts UNICODE string Source into single or multi byte character data, and copies the result into Dest. The source must be null-terminated.


WideStringToUCS4String function
 VCL Reference

WideStringToUCS4String function

See also

Converts a WideString value to a string of 4-byte Unicode characters.

Unit

System

Category

character set conversions

function WideStringToUCS4String(const S: WideString): UCS4String;

Description

Call WideStringToUCS4String to convert a WideString value to a string of UCS4 (4-byte Unicode) characters. UCS4 strings are used by some Linux operating system calls.


Write procedure
 VCL Reference

Write procedure

There are two versions of the standard procedure Write, one for text files, the other for typed files.

Write procedure for text files

Write procedure for typed files


Write procedure (for text files)
 VCL Reference

Write procedure (for text files)

See also 	Example

Writes to a text file.

Unit

System

Category

text file routines

procedure Write( [var F: Text; ] P1 [ , P2,..., Pn] );

Description

Write writes one or more values to a text file. F, if specified, is a text file variable. If F is omitted, the standard file variable Output is assumed. Each P is a write parameter. Each write parameter includes an output expression whose value is to be written to the file. A write parameter can also contain the specifications of a field width and a number of decimal places. Each output expression must be of a type Char, one of the Integer types (Byte, Shortint, Word, Longint, Cardinal), one of the floating-point types (Single, Real, Double, Extended, Currency), one of the string types (PChar, AnsiString, ShortString), a packed string, or one of the Boolean types (Boolean, Bool).

A write parameter has the form

OutExpr [: MinWidth [: DecPlaces ] ]

where OutExpr is an output expression. MinWidth and DecPlaces are type integer expressions.

MinWidth specifies the minimum field width, which must be greater than 0. Exactly MinWidth characters are written (using leading blanks if necessary) except when OutExpr has a value that must be represented in more than MinWidth characters. In that case, enough characters are written to represent the value of OutExpr. Likewise, if MinWidth is omitted, then the necessary number of characters is written to represent the value of OutExpr.

DecPlaces specifies the number of decimal places in a fixed-point representation of one of the Real types. It can be specified only if OutExpr is one of the Real types, and if MinWidth is also specified. When MinWidth is specified, it must be greater than or equal to 0.

Write with a character-type value:

If MinWidth is omitted, the character value of OutExpr is written to the file. Otherwise, MinWidth - 1 blanks followed by the character value of OutExpr is written.

Write with one of the integer type values:

If MinWidth is omitted, the decimal representation of OutExpr is written to the file with no preceding blanks. If MinWidth is specified and its value is larger than the length of the decimal string, enough blanks are written before the decimal string to make the field width MinWidth.

Write with one of the real type values:

If OutExpr has one of the real type values, its decimal representation is written to the file. The format of the representation depends on the presence or absence of DecPlaces.

If DecPlaces is omitted (or if it's present but has a negative value), a floating-point decimal string is written. If MinWidth is also omitted, a default MinWidth of 17 is assumed; otherwise, if MinWidth is less than 8, it's assumed to be 8. The format of the floating-point string is

[   | - ] <digit> . <decimals> E [ + | - ] <exponent>

The following table lists the components of the output string.

Component	Meaning

 [  | - ]	" " or "-", according to the sign of OutExpr

<digit> 	Single digit, "0" only if OutExpr is 0

<decimals> 	Digit string of MinWidth-7 (but at most 10) digits

E 	Uppercase [E] character

[ + | - ] 	According to sign of exponent

<exponent> 	Two-digit decimal exponent

If DecPlaces is present, a fixed-point decimal string is written. If DecPlaces is larger than 11, it's assumed to be 11. The format of the fixed-point string follows:

[ <blanks> ] [ - ] <digits> [ . <decimals> ]

The following table lists the components of the fixed-point string.

Component	Meaning

[ <blanks> ] 	Blanks to satisfy MinWidth

[ - ]	If OutExpr is negative

 <digits> 	At least one digit, but no leading zeros

[ . <decimals> ]	Decimals if DecPlaces > 0

Write with one of the string-type values:

If MinWidth is omitted, the string value of OutExpr is written to the file with no leading blanks. If MinWidth is specified, and its value is larger than the length of OutExpr, enough blanks are written before the decimal string to make the field width MinWidth.

Write with a packed string-type value:

If OutExpr is of packed string type, the effect is the same as writing a string whose length is the number of elements in the packed string type.

Write with one of the Boolean type values:

If OutExpr is of type Boolean, the effect is the same as writing the strings True or False, depending on the value of OutExpr.

Note:	When using Write the file must be open for output.


Write procedure (for typed files)
 VCL Reference

Write procedure (for typed files)

See also

Writes to a typed file.

Unit

System

Category

I/O routines

procedure Write(F, V1,...,Vn);

Description

Write writes a file to a file component. F is a file variable, and each V is a variable of the same type as the component type of F. For each variable written, the current file position is advanced to the next component. If the current file position is at the end of the file (that is, if Eof(F) is True), the file is expanded.


Writeln procedure
 VCL Reference

Writeln procedure

See also	Example

Writes to a text file and adds an end-of-line marker

Unit

System

Category

text file routines

procedure Writeln([ var F: Text; ] P1 [, P2, ...,Pn ] );

Description

Writeln is an extension to the Write procedure, as it is defined for text files.

After executing Write, Writeln writes an end-of-line marker (carriage return/line feed) to the file. Writeln(F) with no parameters writes an end-of-line marker to the file. (Writeln with no parameter list corresponds to Writeln(Output).)

The file must be open for output.

Note:	When an application is compiled as a console application (using the Generate console application checkbox on the Linker page of the Project|Options dialog, or a -cc command line switch with the command-line compiler), Delphi automatically associates the Input and Output files with the application's console window. For non-console applications, any attempt to read from Input or write to Output will generate an I/O error.


Bounds function
 VCL Reference

Bounds function

See also

Returns the TRect for a rectangle of given dimensions.

Unit

Types

Category

type conversion routines

function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;

Description

Call Bounds to obtain a TRect for a rectangle with upper left corner at the point (ALeft, ATop) with width AWidth and height AHeight.


CenterPoint function
 VCL Reference

CenterPoint function

See also

Returns the point in the center of a rectangle.

Unit

Types

Category:

geometric routines

function CenterPoint(const Rect: TRect): TPoint;

Description

Call CenterPoint to obtain the point in the center of a rectangle.

Rect is the rectangle whose center you want to locate.


EqualRect function
 VCL Reference

EqualRect function

See also

Indicates whether two TRect values are the same.

Unit

Classes

Category:

comparison routines

function EqualRect(const R1, R2: TRect): Boolean;

Description

Call EqualRect to compare two TRect values. EqualRect returns True if R1 and R2 are identical (same position and size), False if they are different.


IntersectRect function
 VCL Reference

IntersectRect function

See also

Returns the intersection of two rectangles

Unit

Types

Category:

geometric routines

function IntersectRect(out Rect: TRect; const R1, R2: TRect): Boolean;

Description

Call IntersectRect to obtain the rectangle that is the intersection of R1 and R2. The intersection is returned as the Rect parameter.

IntersectRect returns True if the two rectangles have a nonempty intersection. If R1 and R2 do not overlap, IntersectRect returns False, and the Rect parameter is set to a rectangle at position (0,0) with 0 Width and 0 Height.


IsRectEmpty function
 VCL Reference

IsRectEmpty function

See also

Indicates wither a specified rectangle has a positive width and height.

Unit

Types

Category:

geometric routines

function IsRectEmpty(const Rect: TRect ): Boolean;

Description

Call IsRectEmpty to determine whether the rectangle specified by Rect encloses a positive amount of space.

IsRectEmpty returns True if both the width and height of Rect are greater than 0. If either the width or height is less than or equal to 0, IsRectEmpty returns False. Note that this means non-normalized rectangles (rectangles with negative height or width) are considered empty.


OffsetRect function
 VCL Reference

OffsetRect function

See also

Changes the origin of a rectangle by a specified amount.

Unit

Types

Category:

type conversion routines

function OffsetRect(var Rect: TRect; DX: Integer; DY: Integer): Boolean;

Description

Call OffsetRect to move the upper left corner of the rectangle specified by Rect while maintaining the same width and height. The left of the rectangle moves by DX while the right moves by DY.

OffsetRect returns True if the Rect parameter is non-nil, False if it can’t return a new rectangle because Rect is nil.


Point function
 VCL Reference

Point function

See also	Example

Creates a TPoint structure from a pair of coordinates.

Unit

Types

Category

type conversion routines

function Point(AX, AY: Integer): TPoint;

Description

Call Point to create a TPoint that represents the specified coordinates. Use Point to construct parameters for functions that require a point, rather than setting up local variables for each parameter.


PtInRect function
 VCL Reference

PtInRect function

See also

Indicates whether a specified point lies inside a specified rectangle.

Unit

Types

Category:

geometric routines

function PtInRect(const Rect: TRect; const P: TPoint): Boolean;

Description

PtInRect returns True if the point, P, lies inside the rectangle, Rect, and False if P is not in Rect.

PtInRect does not consider a point inside a rectangle if the rectangle has a negative width or height. A point is considered inside a rectangle if it lies on the left or top edge, but not if it lies on the right or bottom edge.


Rect function
 VCL Reference

Rect function

See also	Example

Creates a TRect structure from a set of coordinates.

Unit

Types

Category

type conversion routines

function Rect(Left, Top, Right, Bottom: Integer): TRect;

Description

Call Rect to create a TRect that represents the rectangle with the specified coordinates. Use Rect to construct parameters for functions that require TRect, rather than setting up local variables for each parameter.


UnionRect function
 VCL Reference

UnionRect function

See also

Returns the union of two rectangles

Unit

Types

Category:

geometric routines

function UnionRect(out Rect: TRect; const R1, R2: TRect): Boolean;

Description

Call UnionRect to obtain the smallest rectangle that includes both R1 and R2. The union is returned as the Rect parameter.

UnionRect returns True if the resulting rectangle is nonempty. If the resulting rectangle as a width or height that is less than or equal to 0, UnionRect returns False.


TScrollBar
 VCL Reference

 TScrollBar

Hierarchy	Properties	Methods	Events	Using TScrollBar	See also	Example

TScrollBar is a Windows scroll bar, which is used to scroll the contents of a window, form, or control.

Unit

StdCtrls

Description

Use TScrollBar to add a free-standing scrollbar to a form. Many controls have properties that add scroll bars which are an integral part of the control (TControlScrollBar objects). TScrollBar allows controls that do not have integrated scroll bars or groupings of controls to be scrolled when the user manipulates the TScrollBar object.

When the bi-directional mode of a scroll bar is changed, its coordinate system is reversed. Position zero in left-to-right mode is the left side, and position zero in right-to-left mode is the right side.


 VCL Reference

TScrollBar properties

TScrollBar	Alphabetically	Legend

In TScrollBar

Kind

LargeChange

Max

Min

PageSize

Position

SmallChange

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TScrollBar Properties

TScrollBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Kind

LargeChange

Left

LRDockWidth

Max

Min

Name

Owner

PageSize

Parent

ParentBiDiMode

ParentCtl3D

ParentShowHint

ParentWindow

PopupMenu

Position

ShowHint

Showing

SmallChange

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TScrollBar.Kind
 VCL Reference

TScrollBar.Kind

TScrollBar 	Example

Specifies whether the scroll bar is horizontal or vertical.

property Kind: TScrollBarKind;

Description

Set Kind to indicate the orientation of the scrollbar. These are the possible values:

Value	Meaning

sbHorizontal	Scroll bar is horizontal

sbVertical	Scroll bar is vertical


TScrollBar.LargeChange
 VCL Reference

TScrollBar.LargeChange

TScrollBar	See also 	Example

Determines how much Position changes when the user clicks the scroll bar on either side of the thumb tab or presses PgUp or PgDn.

type TScrollBarInc = 1..32767;

property LargeChange: TScrollBarInc;

Description

Set LargeChange to specify how much to change the value of Position when the user clicks on the side of the thumb tab (that is, on the thumb tab track, but not on the thumb tab itself). The Max and Min properties define the total range over which Position can vary.

For example, if Max is 30000 and Min is 0, the scroll box can assume 30,000 positions. If the LargeChange property setting is 10000 and the Position property is 0, the user can click the scroll bar track three times after the thumb tab before it moves all the way to the end of the scroll bar (30000 / 10000 = 3).

LargeChange should correspond to the portion of this range that the user sees in one page or screen, expressed in the logical units used by the Max, Min, and Position properties.


TScrollBar.Max
 VCL Reference

TScrollBar.Max

TScrollBar	See also 	Example

Specifies the maximum position represented by the scrollbar.

property Max: Integer;

Description

Set Max to the maximum value the Position property can take. The Max and Min properties define the total range over which Position can vary.


TScrollBar.Min
 VCL Reference

TScrollBar.Min

TScrollBar	See also 	Example

Specifies the minimum position represented by the scrollbar.

property Min: Integer;

Description

Set Min to the minimum value the Position property can take. The Min and Max properties define the total range over which Position can vary.


TScrollBar.PageSize
 VCL Reference

TScrollBar.PageSize

TScrollBar	See also	Example

Specifies the size of the thumb tab.

property PageSize: Integer;

Description

PageSize is the size of the thumb tab, measured in the same units as Position, Min, and Max (not pixels).


TScrollBar.Position
 VCL Reference

TScrollBar.Position

TScrollBar	See also 	Example

Indicates the current position of the scrollbar.

property Position: Integer;

Description

Read Position to determine the current position of the thumb tab. This value can be used to determine how to scroll any components controlled by the scroll bar. When the user scrolls the scroll bar, the value of Position changes. Set Position to programmatically move the thumb tab of the scroll bar.

The number of possible positions on the scroll bar is determined by the difference between the Max property and the Min property. If Position has the same value as Min, the thumb tab appears at the far left of a horizontal scroll bar or the top of a vertical scroll bar. If Position has the same value as Max, the thumb tab appears at the far right of a horizontal scroll bar or the bottom of a vertical scroll bar.


TScrollBar.SmallChange
 VCL Reference

TScrollBar.SmallChange

TScrollBar	See also 	Example

Determines how much Position changes when the user clicks the arrow buttons on the scroll bar or presses the arrow keys on the keyboard.

type TScrollBarInc = 1..32767;

property SmallChange: TScrollBarInc;

Description

Set SmallChange to specify how much to change the value of Position when the user clicks on the arrow buttons. The Max and Min properties define the total range over which Position can vary.

For example, if Max is 100 and Min is 0, the scroll box can assume 100 positions. If the SmallChange property setting is 5 and the Position property is 0, the user can click the down or right arrow button 20 times before the thumb tab is moved all the way to the end of the scroll bar.

SmallChange should correspond to the portion of this range that the user sees as one line or one item, expressed in the logical units used by the Max, Min, and Position properties.


 VCL Reference

TScrollBar events

TScrollBar	Alphabetically	Legend

In TScrollBar

OnChange

OnScroll

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnStartDock

OnStartDrag


 VCL Reference

TScrollBar Events

TScrollBar	By Object	Legend

OnChange

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

OnScroll

OnStartDock

OnStartDrag


TScrollBar.OnChange
 VCL Reference

TScrollBar.OnChange

TScrollBar	See also

Occurs immediately after the value of Position changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to control another object or group of objects using TScrollBar. Adjust the objects controlled by the scrollbar to reflect the new value of Position.

OnChange occurs whether the value of Position is changed by the user or programmatically. If the value of Position is changed by the user, OnChange occurs immediately after the OnScroll event.


TScrollBar.OnScroll
 VCL Reference

TScrollBar.OnScroll

TScrollBar	See also 	Example

Occurs when the user scrolls the scroll bar with the mouse or keyboard.

type

  TScrollEvent = procedure(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer) of object;

property OnScroll: TScrollEvent;

Description

Write an OnScroll to adjust the value of Position when the user scrolls the scroll bar. The ScrollPos parameter contains the new value that is about to be assigned to the Position property as a result of the scroll. Change ScrollPos to alter the result of the scroll.

The ScrollCode parameter indicates the type of user action that just scrolled the scrollbar.


 VCL Reference

TScrollBar methods

TScrollBar	Alphabetically	Legend

In TScrollBar

Create

SetParams

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TScrollBar Methods

TScrollBar	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetParams

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TScrollBar.Create
 VCL Reference

TScrollBar.Create

TScrollBar	See also

Creates and initializes an instance of TScrollBar.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create an instance of TScrollBar at runtime. Scroll bars placed on a form at design time are created automatically.

Pass a single Component as a parameter to provide the scroll bar with an Owner that is responsible for freeing it.

Create calls the inherited Create method, then sets the initial values for the scroll bar as follows:

ControlStyle is set to [csFramed, csDoubleClicks]

Height is set to the system horizontal scrollbar height, and Width to 121.

Kind is set to sbHorizontal.

Position is set to 0, Min to 0, and Max to 100.

SmallChange and LargeChange are both set to 1.

TabStop is set to True.


TScrollBar.SetParams
 VCL Reference

TScrollBar.SetParams

TScrollBar	See also

Sets the Position, Max, and Min property values all at once.

procedure SetParams(APosition, AMin, AMax: Integer);

Description

Use the SetParams method to set the Position, Min, and Max property values all at once, preventing repaints that would occur if each property value were set separately.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollBar


TScrollBox
 VCL Reference

 TScrollBox

Hierarchy	Properties	Methods	Events	See also

TScrollBox represents a scrolling area (a scroll box) in a window.

Unit

Forms

Description

Use TScrollBox to create a scroll box in a window.

One use of a scroll box is to prevent areas of a window, such as a toolbar or status bar built with TPanel components, from scrolling. To prevent a toolbar and status bar from scrolling, hide the window’s scroll bars, and then position a scroll box in the client area of the window between the toolbar and status bar. The scroll bars associated with the scroll box will appear to belong to the window, but will scroll only the area inside the scroll box.

Another use of scroll boxes is to create multiple scrolling areas (views) in a window. Views are common in commercial word-processor, spreadsheet, and project management applications.

A scroll box can contain objects, such as TButton and TCheckBox objects.


 VCL Reference

TScrollBox properties

TScrollBox	Alphabetically	Legend

In TScrollBox

BorderStyle

Derived from TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

AutoSize

BiDiMode

Constraints

BoundsRect

ClientHeight

ClientWidth

Color

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TScrollBox properties

TScrollBox	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoScroll

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc


TScrollBox.BorderStyle
 VCL Reference

TScrollBox.BorderStyle

TScrollBox

Specifies whether the scroll box has a border.

property BorderStyle: TBorderStyle;

Description

Use BorderStyle to get or set whether the scroll box has a border. BorderStyle can be one of the following TBorderStyle values:

Value	Meaning

bsNone	No visible border

bsSingle	Single-line border


 VCL Reference

TScrollBox events

TScrollBox	Alphabetically	Legend

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TScrollBox events

TScrollBox	By object	Legend

OnCanResize

OnClick

OnConstrainedResize

OnContextPopup

OnDblClick

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnMouseWheel

OnMouseWheelDown

OnMouseWheelUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TScrollBox methods

TScrollBox	Alphabetically	Legend

In TScrollBox

Create

Derived from TScrollingWinControl

Destroy

DisableAutoRange

EnableAutoRange

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TScrollBox methods

TScrollBox	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TScrollBox.Create
 VCL Reference

TScrollBox.Create

TScrollBox	See also

Creates and initializes a new TScrollBox object.

constructor Create(AOwner: TComponent);

Description

Use Create to create and initialize a new TScrollBox object.

AOwner is a component, typically the form, that is responsible for freeing the scroll box.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl

TScrollBox


TScroller
 VCL Reference

TScroller

Hierarchy	Properties	Methods	Events	See also

TScroller is a horizontal scrolling control that provides basic horizontal scrolling capabilities.

Unit

Tabs

Description

The TTabSet object uses TScroller to scroll its visible tabs. TScroller is provided for backward compatibility only. TScroller is similar to an up-down control (TUpDown) with a horizontal orientation, except that it does not work with a companion control.


 VCL Reference

TScroller properties

TScroller	Alphabetically	Legend

In TScroller

Change

Max

Min

Position

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TScroller properties

TScroller	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Change

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

ComponentState

Components

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Max

Min

Name

Owner

Parent

ParentWindow

Position

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TScroller.Change
 VCL Reference

TScroller.Change

TScroller	See also

Specifies the number of units to scroll when the user clicks the arrow buttons.

property Change: Integer;

Description

Set Change to indicate the number of units between Min and Max the Position moves whenever the user clicks on one of the arrow buttons. Change represents the mapping between the units used to specify Min, Max, and Position, and the logical units represented by the scroller.

For example, if the values of Min, Max, and Position are given in screen pixels, Change would be the number of pixels to scroll whenever the user clicks the scroll arrow.


TScroller.Max
 VCL Reference

TScroller.Max

TScroller	See also

Specifies the maximum value the Position property can take.

property Max: Longint;

Description

Use Max to set the upper limit of the scrolling range. The Max and Min properties define the range of values over which the scroller can scroll.


TScroller.Min
 VCL Reference

TScroller.Min

TScroller	See also

Specifies the minimum value the Position property can take.

property Min: Longint;

Description

Use Min to set the lower limit of the scrolling range. The Min and Max properties define the range of values over which the scroller can scroll.


TScroller.Position
 VCL Reference

TScroller.Position

TScroller	See also

Position is the current position in the scroll range.

property Position: Longint;

Description

Read Position to determine the current position the scroller represents. Position is a value between Min and Max. Use an OnClick event handler to notify the object being scrolled when the Position changes.


 VCL Reference

TScroller events

TScroller	Alphabetically	Legend

In TScroller

OnClick


 VCL Reference

TScroller events

TScroller	By object	Legend

OnClick


TScroller.OnClick
 VCL Reference

TScroller.OnClick

TScroller	See also

OnClick occurs after the Position property has been updated in response to the user clicking one of the arrow buttons.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to implement the scrolling action of the object that uses the TScroller to control scrolling. When the user clicks one of the arrow buttons, the Position gets updated by Change (unless the Max or Min value is hit), and then an OnClick event occurs.


 VCL Reference

TScroller methods

TScroller	Alphabetically	Legend

In TScroller

Create

Destroy

Paint

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TScroller methods

TScroller	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

Paint

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TScroller.Destroy
 VCL Reference

TScroller.Destroy

TScroller	See also

Frees the memory associated with the TScroller object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use the Free method, which checks whether the TScroller reference is nil before calling Destroy.


TScroller.Paint
 VCL Reference

TScroller.Paint

TScroller	See also

Paints the image of the TScroller object into its canvas.

procedure Paint; override;

Description

Paint is called automatically in response to WM_PAINT messages. Paint paints the arrow buttons, graying them out when Position cannot be moved in the associated direction.


TScroller.Create
 VCL Reference

TScroller.Create

TScroller	See also

Creates an instance of TScroller.

constructor Create(AOwner: TComponent); override;

Description

Call TScroller to create an instance of TScroller at runtime. TScroller allocates the memory for the TScroller object and initializes

Width to 24 and Height to 13

Min and Max to 0

Position to 0

Change to 1

The AOwner parameter specifies the component (usually the form) that is responsible for freeing the scroller.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TScroller


TScrollingWinControl
 VCL Reference

TScrollingWinControl

Hierarchy	Properties	Methods	See also

TScrollingWinControl is the base class for windowed controls that support scrolling.

Unit

Forms

Description

Use TScrollingWinControl as a base class when defining a custom windowed control that supports scrolling.

Typically, a scrolling windowed control has horizontal and vertical scroll bars and scrolls a child control into view when the child control receives focus.

Examples of scrolling windowed controls include TForm and TScrollBox objects.

The scrolling window’s BiDiMode determines whether the left or right side of the window’s contents are displayed by default. The BiDiMode does not affect the window’s coordinate system. The scroll bars must be adjusted programmatically according to the system locale.


 VCL Reference

TScrollingWinControl properties

TScrollingWinControl	Alphabetically	Legend

In TScrollingWinControl

AutoScroll

HorzScrollBar

VertScrollBar

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TScrollingWinControl properties

TScrollingWinControl	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoScroll

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HorzScrollBar

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

VertScrollBar

Visible

VisibleDockClientCount

Width

WindowProc


TScrollingWinControl.AutoScroll
 VCL Reference

TScrollingWinControl.AutoScroll

TScrollingWinControl	See also

Indicates whether scroll bars appear automatically on the scrolling windowed control if it is not large enough to display all of its controls.

property AutoScroll: Boolean;

Description

If AutoScroll is True the scroll bars appear automatically when necessary. For example, if the user resizes the control so that some of its controls are partially obscured, scroll bars appear.

If AutoScroll is False, scroll bars don’t appear automatically. In this case, use the HorzScrollBar and VertScrollBar properties to make scroll bars appear.


TScrollingWinControl.HorzScrollBar
 VCL Reference

TScrollingWinControl.HorzScrollBar

TScrollingWinControl	See also 	Example

Represents the horizontal scroll bar for the scrolling windowed control.

property HorzScrollBar: TControlScrollBar;

Description

Use HorzScrollBar to hide, show, or manipulate the horizontal scroll bar for the scrolling windowed control.


TScrollingWinControl.VertScrollBar
 VCL Reference

TScrollingWinControl.VertScrollBar

TScrollingWinControl	See also	Example

Represents the vertical scroll bar for the scrolling windowed control.

property VertScrollBar: TControlScrollBar;

Description

Use VertScrollBar to hide, show, or manipulate the vertical scroll bar for the scrolling windowed control.


 VCL Reference

TScrollingWinControl methods

TScrollingWinControl	Alphabetically	Legend

In TScrollingWinControl

AdjustClientRect

AlignControls

AutoScrollEnabled

AutoScrollInView

ChangeScale

Create

CreateParams

CreateWnd

Destroy

DisableAutoRange

DoFlipChildren

EnableAutoRange

Resizing

ScrollInView

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SetSubComponent

SafeCallException

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TScrollingWinControl methods

TScrollingWinControl	By object	Legend

AdjustClientRect

AfterConstruction

AlignControls

Assign

AutoScrollEnabled

AutoScrollInView

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ChangeScale

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

CreateWnd

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

DisableAutoRange

Dispatch

Dock

DockDrop

DoFlipChildren

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EnableAutoRange

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

Resizing

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollInView

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TScrollingWinControl.AdjustClientRect
 VCL Reference

TScrollingWinControl.AdjustClientRect

TScrollingWinControl	See also

Adjusts the ClientRect property to exclude the scroll bars.

procedure AdjustClientRect(var Rect: TRect); override;

Description

AdjustClientRect is called internally when the control needs accurate information on where to place child controls within the client area. It indents Rect to exclude the area taken by the scroll bars, then calls the inherited AdjustClientRect method.


TScrollingWinControl.AlignControls
 VCL Reference

TScrollingWinControl.AlignControls

TScrollingWinControl	See also

Aligns the controls in the scrolling windowed control.

procedure AlignControls(AControl: TControl; var ARect: TRect); override;

Description

Use AlignControls to align the controls in the scrolling windowed control according to the values of their Align properties.

AControl specifies the control that takes precedence in alignment when other controls have the same Align value. AControl can be nil.

ARect indicates the area in the scrolling windowed control that contains the controls to align. ARect is automatically set to the entire area of the scrolling windowed control.

If AutoScroll is True and the scrolling windowed control is not being resized, the ranges of the scroll bars on the scrolling windowed control are automatically recalculated.

After recalculating the ranges of the scroll bars and setting the value of ARect, AlignControls calls the inherited AlignControls method, passing the AControl and ARect objects.


TScrollingWinControl.AutoScrollEnabled
 VCL Reference

TScrollingWinControl.AutoScrollEnabled

TScrollingWinControl	See also

Indicates whether automatic scrolling is enabled.

function AutoScrollEnabled: Boolean; virtual;

Description

Call AutoScrollEnabled to determine whether automatic scrolling is enabled.

AutoScrollEnabled returns True if the control is not a dock site using the dock manager and the AutoSize property is False.


TScrollingWinControl.AutoScrollInView
 VCL Reference

TScrollingWinControl.AutoScrollInView

TScrollingWinControl	See also

Scrolls a control into the visible area of the scrolling windowed control.

procedure AutoScrollInView(AControl: TControl); virtual;

Description

Use AutoScrollInView to scroll the control specified by the AControl parameter into the visible area of the scrolling windowed control.

Unlike ScrollInView, AutoScrollInView does not perform scrolling when the scrolling windowed control or the specified control are being loaded from a stream.

AutoScrollInView calls ScrollInView to perform any needed scrolling.


TScrollingWinControl.ChangeScale
 VCL Reference

TScrollingWinControl.ChangeScale

TScrollingWinControl	See also

Resizes the scrolling windowed control by a specific ratio.

procedure ChangeScale(M, D: Integer); override;

Description

Use ChangeScale to resize the scrolling windowed control by a specific ratio.

M is the multiplier of the ratio; D is the divisor of the ratio. For example, to resize the scrolling windowed control to four-fifths of its current size, set M to four and D to five.

ChangeScale recalculates the ranges of the scroll bars on the scrolling windowed control according to the ratio, and then calls TControl.ChangeScale.


TScrollingWinControl.Create
 VCL Reference

TScrollingWinControl.Create

TScrollingWinControl	See also

Creates and initializes a new TScrollingWinControl object.

constructor Create(AOwner: TComponent); override;

Description

Use Create to create and initialize a new TScrollingWinControl object.TScrollingWinControl

AOwner is a TComponent object that owns the scrolling windowed control.


TScrollingWinControl.CreateParams
 VCL Reference

TScrollingWinControl.CreateParams

TScrollingWinControl	See also

Initializes the window creation parameters so that the entire window is not redrawn when the width or height of the client area changes.

procedure CreateParams(var Params: TCreateParams); override;

Description

The CreateWnd method calls CreateParams to initialize the parameters it passes to CreateWindowHandle. CreateParams calls the inherited class's method and uses that Window class style, removing the CS_HREDRAW and CS_VREDRAW styles from it.

By removing these styles the scrolling windowed control will only redraw the invalidated regions, not the entire window.


TScrollingWinControl.CreateWnd
 VCL Reference

TScrollingWinControl.CreateWnd

TScrollingWinControl	See also

Creates a Windows control corresponding to the TScrollingWinControl object.

procedure CreateWnd; override;

Description

CreateWnd is called automatically when the control is first created or when the window must be destroyed and recreated to reflect property changes.

CreateWnd initializes the scroll bars on the scrolling windowed control and then calls TWinControl.CreateWnd.


TScrollingWinControl.Destroy
 VCL Reference

TScrollingWinControl.Destroy

TScrollingWinControl	See also

Removes the TScrollingWinControl object from memory.

destructor Destroy; override;

TScrollingWinControlDescription

Do not call Destroy.TScrollingWinControl Instead, call Free, which calls DestroyTScrollingWinControl if the TScrollingWinControl object is not nil.


TScrollingWinControl.DisableAutoRange
 VCL Reference

TScrollingWinControl.DisableAutoRange

TScrollingWinControl	See also

Disables automatic scrolling.

procedure DisableAutoRange;

Description

Use DisableAutoRange to temporarily disable scrolling when rearranging controls in a scrolling windowed control.  Use the EnableAutoRange method to turn scrolling on again when finished rearranging the controls.


TScrollingWinControl.DoFlipChildren
 VCL Reference

TScrollingWinControl.DoFlipChildren

TScrollingWinControl	See also

Flips the control’s children.

DYNAMIC void __fastcall DoFlipChildren(void);

Description

The FlipChildren method calls DoFlipChildren to reverse the positions of child controls. DoFlipChildren moves the control’s children to opposite positions on the control; that is, children on the left side of the control are moved to the right side of the control and vice versa. In addition, DoFlipChildren moves the vertical scrollbars to the other side of the control.

Note:	DoFlipChildren is a protected helper method for the public FlipChildren method. Unlike FlipChildren, DoFlipChildren does not adjust the alignment of controls that are aligned to one of the edges of the windowed control.


TScrollingWinControl.EnableAutoRange
 VCL Reference

TScrollingWinControl.EnableAutoRange

TScrollingWinControl	See also

Reenables automatic scrolling.

procedure EnableAutoRange;

Description

Use EnableAutoRange to reenable scrolling after turning it off. This method can be used with the DisableAutoRange method to turn scrolling on and off.


TScrollingWinControl.Resizing
 VCL Reference

TScrollingWinControl.Resizing

TScrollingWinControl

Makes any required adjustments when the window changes size.

procedure Resizing(State: TWindowState); virtual;

Description

This protected method is called automatically when the control’s window is resized. As implemented in TScrollingWinControl, Resizing does nothing. Descendants override this method to adjust to the change in window size.

The State parameter indicates the state of the scrolling windowed control after the resize operation.


TScrollingWinControl.ScrollInView
 VCL Reference

TScrollingWinControl.ScrollInView

TScrollingWinControl	See also

Scrolls a control into the visible area of the scrolling windowed control.

procedure ScrollInView(AControl: TControl)

Description

Use ScrollInView to ensure that a specified control is in the visible area of the scrolling windowed control. AControl specifies the TControl object to scroll into view.

Note:	If the ComponentState property for AControl or the scrolling windowed control might be csLoading, use AutoScrollInView instead.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollingWinControl


TShape
 VCL Reference

 TShape

Hierarchy	Properties	Methods	Events	Using TShape	See also

TShape represents a geometric shape that can be drawn on a form.

Unit

ExtCtrls

Description

Add a TShape object to a form to draw a simple geometric shape on the form. TShape introduces properties to describe the pen used to outline the shape and the brush used to fill it.

If the shape is only part of the image of a custom control, use the methods of the control’s canvas instead.


 VCL Reference

TShape properties

TShape	Alphabetically	Legend

In TShape

Brush

Pen

Shape

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TShape properties

TShape	By object	Legend

Action

Align

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentShowHint

Pen

Shape

ShowHint

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TShape.Brush
 VCL Reference

TShape.Brush

TShape	See also

Specifies the color and pattern used for filling the shape control.

property Brush: TBrush;

Description

Brush is a TBrush object that represents the color and pattern that fill the interior of the shape. Use the properties and methods of TBrush to change the color or pattern of the shape object:

Shape1.Brush.Color := clWhite;

Note:	Setting the Brush property assigns the properties of another TBrush object to the shape’s brush. The shape object does not take ownership of the assigned object.


TShape.Pen
 VCL Reference

TShape.Pen

TShape	See also

Specifies the pen used to outline the shape control.

property Pen: TPen;

Description

Read Pen to obtain the TPen object that represents the color and style of the line used to outline the shape. Use the properties of Pen to change the color or style.

Pen is a TPen object that represents the color and style of the line used to outline the shape. Use the properties and methods of TPen to change the color or pattern of the shape object:

Shape1.Pen.Width := 1;

Shape1.Pen.Color := Red;

Note:	Setting the Pen property assigns the properties of another TPen object to the shape’s pen. The shape object does not take ownership of the assigned object.


TShape.Shape
 VCL Reference

TShape.Shape

TShape

Specifies the shape of the control.

Type TShapeType = (stRectangle, stSquare, stRoundRect, stRoundSquare, stEllipse, stCircle);

property Shape: TShapeType;

Description

Set Shape to the geometric shape that should be drawn on the form. The Shape property has these possible values:

Value	Meaning

stCircle	The shape is a circle.

stEllipse	The shape is an ellipse.

stRectangle	The shape is a rectangle. (Default)

stRoundRect	The shape is a rectangle with rounded corners.

stRoundSquare	The shape is a square with rounded corners.

stSquare	The shape is a square.


 VCL Reference

TShape events

TShape	Alphabetically	Legend

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TShape events

TShape	By object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TShape methods

TShape	Alphabetically	Legend

In TShape

Create

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TShape methods

TShape	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TShape.Create
 VCL Reference

TShape.Create

TShape	See also

Creates an instance of TShape.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a TShape object at runtime. Shapes added to a form at design time are created automatically.

AOwner is the component, typically a form, that is responsible for freeing the shape object.


TShape.Destroy
 VCL Reference

TShape.Destroy

TShape	See also

Destroys of an instance of TShape.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the object is not nil before it calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TShape


TShortCutList
 VCL Reference

TShortCutList

Hierarchy	Properties	Methods	Events	See also

TShortCutList manages an array of keyboard shortcuts.

Unit

ActnList

Description

TShortCutList is a specialized list for storing TShortCut values. TShortCutList is the type of the SecondaryShortCuts property.

TShortCutList is a descendant of TStringList, which manages a collection of strings. As such, TShortCutList adds, deletes, and searches for shortcuts using their text representation. (You can convert between a shortcut and its text representation using the TextToShortCut and SHortCutToText functions). TShortCutList stores the shortcut that corresponds to a text representation as the value of the Objects property for that string. Do not change the value of the Objects property, or the short cut list will not operate correctly.


 VCL Reference

TShortCutList properties

TShortCutList	Alphabetically	Legend

In TShortCutList

ShortCuts

Derived from TStringList

Capacity

CaseSensitive

Count

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

DelimitedText

Delimiter

Names

QuoteChar

StringsAdapter

Text

Values


 VCL Reference

TShortCutList properties

TShortCutList	By object	Legend

Capacity

CaseSensitive

CommaText

Count

DelimitedText

Delimiter

Duplicates

Names

Objects

QuoteChar

ShortCuts

Sorted

Strings

StringsAdapter

Text

Values


TShortCutList.ShortCuts
 VCL Reference

TShortCutList.ShortCuts

TShortCutList	See also

Lists the shortcuts in the list.

property ShortCuts[Index: Integer]: TShortCut;

Description

Use ShortCuts to access the shortcuts in the list by position. The Index parameter indicates the index of the shortcut, where 0 is the index of the first shortcut, 1 is the index of the second shortcut, and so on.

ShortCuts is the same as the Objects property, except that the value is given as a TShortCut value instead of as a reference to an object instance.

Warning:	Do not set the Objects property, or the short cut list will fail to work correctly.

ShortCuts is a read-only property. To add or delete shortcuts in the list, use the Add and Delete methods. To locate a specific shortcut in the list, use the IndexOfShortCut method.


 VCL Reference

TShortCutList events

TShortCutList	Alphabetically	Legend

Derived from TStringList

OnChange

OnChanging


 VCL Reference

TShortCutList events

TShortCutList	By object	Legend

OnChange

OnChanging


 VCL Reference

TShortCutList methods

TShortCutList	Alphabetically	Legend

In TShortCutList

Add

IndexOfShortCut

Derived from TStringList

AddObject

Clear

CustomSort

Delete

Destroy

Exchange

Find

IndexOf

Insert

InsertObject

Sort

Derived from TStrings

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfName

IndexOfObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TShortCutList methods

TShortCutList	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

IndexOfShortCut

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort


TShortCutList.Add
 VCL Reference

TShortCutList.Add

TShortCutList	See also

Adds a new shortcut to the list.

function Add(const S: string): Integer; override;

Description

Call Add to add a shortcut to the list. If the list is sorted, the shortcut is added to the appropriate position in the sort order. If the list is not sorted, the shortcut is added to the end of the list. Add returns the position of the shortcut in the list, where the first item in the list has a value of 0.

S is the string representation of the shortcut to add. You can obtain this from a shortcut using the global ShortCutToText function. TShortCutList saves the string S as a new string in the list and the corresponding shortcut as an Object associated with that string.

Note:	For sorted lists, Add raises an EListError exception if the string S already appears in the list and Duplicates is set to dupError. If Duplicates is set to dupIgnore, trying to add a duplicate string to a sorted list does nothing.


TShortCutList.IndexOfShortCut
 VCL Reference

TShortCutList.IndexOfShortCut

TShortCutList	See also

Returns the position of a shortcut in the list.

function IndexOfShortCut(const Shortcut: TShortCut): Integer;

Description

Call IndexOfShortCut to locate a shortcut in the list. IndexOfShortCut returns the position of the first occurrence of Shortcut in the list, where 0 is the position of the first shortcut, 1 is the position of the second shortcut, and so on. If the shortcut does not appear in the list, IndexOfShortCut returns –1.

Note:	To locate a shortcut based on its string representation rather than the shortcut value, use the Find or IndexOf method instead.


Hierarchy

TObject

TPersistent

TStrings

TStringList

TShortCutList

TShortCutList


TSpeedButton
 VCL Reference

 TSpeedButton

Hierarchy	Properties	Methods	Events	Using TSpeedButton	See also

TSpeedButton is a button that is used to execute commands or set modes.

Unit

Buttons

Description

Use TSpeedButton to add a button to a group of buttons in a form. TSpeedButton introduces properties that can be used to set graphical images that represent the different button states (selected, unselected, disabled and so on). Use other properties to specify multiple images or to rearrange the images and text on the button. TSpeedButton also introduces properties that allow speed buttons to work together as a group. Speed buttons are commonly grouped in panels to create specialized tool bars and tool palettes.

The recommended way to implement the response of the button when the user clicks on it is to assign an action from an action list as the value of the Action property. By setting the Action property, you make the button a client of the action, and the action handles updating the button’s properties and responding when the user clicks the button.

If you are not using an action to respond when the user clicks the button, then you can specify the button’s response by writing an OnClick event handler.

Tip:	To create a speed button with a client-aligned glyph that covers the button's edges, add a 1-pixel margin around the button's top and left edges and a 3-pixel margin around its bottom and right edges. Do this by manually editing the bitmap specified by the Glyph property.


 VCL Reference

TSpeedButton properties

TSpeedButton	Alphabetically	Legend

In TSpeedButton

AllowAllUp

Down

Flat

Glyph

GroupIndex

Layout

Margin

NumGlyphs

Spacing

Transparent

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSpeedButton properties

TSpeedButton	By object	Legend

Action

Align

AllowAllUp

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Down

Enabled

Flat

Floating

FloatingDockSiteClass

Font

Glyph

GroupIndex

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Layout

Left

LRDockWidth

Margin

Name

NumGlyphs

Owner

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

Spacing

Tag

TBDockHeight

Top

Transparent

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TSpeedButton.AllowAllUp
 VCL Reference

TSpeedButton.AllowAllUp

TSpeedButton	See also

Specifies whether all speed buttons in the group that contains this speed button can be unselected at the same time.

property AllowAllUp: Boolean;

Description

Use AllowAllUp with a group of buttons that belong to the same group. Speed buttons belong to the same group if they have the same value on their GroupIndex property. Buttons in the same group behave in a mutually exclusive fashion: when one button in the group is selected (down), all other buttons in the group become unselected (up).

If AllowAllUp is True, all of the speed buttons in a group can be unselected at the same time. Clicking the single selected button in the group will deselect that button without selecting another. If AllowAllUp is False, exactly one of the buttons in the group must be selected at any time. Clicking a down button won't return the button to its up state.

Changing the value of the AllowAllUp property for one speed button in a group changes the AllowAllUp value for all buttons in the group.

Note:	If GroupIndex is zero, AllowAllUp has no effect.


TSpeedButton.Down
 VCL Reference

TSpeedButton.Down

TSpeedButton	See also

Specifies whether the button is selected (down) or unselected (up).

property Down: Boolean;

Description

Read Down to determine whether a speed button is selected. The Down property only applies if the GroupIndex property of the button is nonzero.

When GroupIndex is greater than 0, set Down to True to select a button. When the user clicks on a button in the unselected (up) state, the button is selected and Down is set to True. When the user clicks on a button in the selected (down) state, if Caption is True, the button becomes unselected and Down is set to False.

At design time, specify which button in a group is the initially selected button by setting the Down property of the selected button to True.

Note:	When GroupIndex is 0, buttons do not remain in the selected state when clicked.


TSpeedButton.Flat
 VCL Reference

TSpeedButton.Flat

TSpeedButton	See also

Determines whether the button has a 3D border that provides a raised or lowered look.

property Flat: Boolean;

Description

Set Flat to True to remove the raised border when the button is unselected and the lowered border when the button is clicked or selected. When Flat is True, use separate bitmaps for the different button states to provide visual feedback to the user about the button state.


TSpeedButton.Glyph
 VCL Reference

TSpeedButton.Glyph

TSpeedButton	See also 	Example

Specifies the bitmap that appears on the speed button.

property Glyph: TBitmap;

Description

Set Glyph to a bitmap object that contains the image that should appear on the face of the button. Bring up the Open dialog box from the Object Inspector to choose a bitmap file (with a .BMP extension), or specify a bitmap file at runtime.

Glyph can provide up to four images within a single bitmap. All images must be the same size and next to each other in a horizontal row. TSpeedButton displays one of these images depending on the state of the button.

Image position	Button state	Description

First	Up	This image appears when the button is unselected. If no other images exist in the bitmap, this image is used for all states.

Second	Disabled	This image usually appears dimmed to indicate that the button can't be selected.

Third	Clicked	This image appears when the button is clicked. If GroupIndex is 0, the Up image reappears when the user releases the mouse button.

Fourth	Down	This image appears when the button stays down indicating that it remains selected.

If only one image is present, TSpeedButton attempts to represent the other states by altering the image slightly for each state, although the Down state is always the same as the Up state.

If the bitmap contains multiple images, specify the number of images in the bitmap with the NumGlyphs property.

Note:	The lower left pixel of the bitmap is reserved for the “transparent” color. Any pixel in the bitmap that matches the lower left pixel will be transparent.


TSpeedButton.GroupIndex
 VCL Reference

TSpeedButton.GroupIndex

TSpeedButton	See also

Allows speed buttons to work together as a group.

property GroupIndex: Integer;

Description

Set GroupIndex to determine how the button behaves when clicked.

When GroupIndex is 0, the button behaves independently of all other buttons on the form. When the user clicks such a speed button, the button appears pressed (in its clicked state) and then returns to its normal up state when the user releases the mouse button.

When GroupIndex is greater than 0, the button remains selected (in its down state) when clicked by the user. When the user clicks a selected button, it returns to the up state, unless Caption is False. Setting the GroupIndex property of a single speed button to a value greater than 0 causes the button to behave as a two-state button when Caption is True.

Speed buttons with the same GroupIndex property value (other than 0), work together as a group. When the user clicks one of these buttons, it remains selected until the user clicks another speed button belonging to the same group. Speed buttons used in this way can present mutually exclusive choices to the user.


TSpeedButton.Layout
 VCL Reference

TSpeedButton.Layout

TSpeedButton	See also

Determines where the image or text appears on the speed button.

property Layout: TButtonLayout;

Description

Set Layout to determine the position of the bitmap specified by the Glyph property or the text specified by the Caption property. These are the possible values:

Value	Meaning

blGlyphLeft	The image or caption appears near the left side of the button.

blGlyphRight	The image or caption appears near the right side of the button.

blGlyphTop	The image or caption appears near the top of the button.

blGlyphBottom	The image or caption appears near the bottom of the button.


TSpeedButton.Margin
 VCL Reference

TSpeedButton.Margin

TSpeedButton	See also

Specifies the number of pixels between the edge of the button and the image or caption drawn on its surface.

property Margin: Integer;

Description

Use Margin to specify the indentation of the image specified by the Glyph property or the text specified by the Caption property. The edges that Margin separates depends on the Layout property. If Layout is blGlyphLeft, the margin appears between the left edge of the image or caption and the left edge of the button. If Layout is blGlyphRight, the margin separates the right edges. If Layout is blGlyphTop, the margin separates the top edges, and if Layout is blGlyphBottom, the margin separates the bottom edges.

If Margin is –1, the image or text is centered on the button.


TSpeedButton.NumGlyphs
 VCL Reference

TSpeedButton.NumGlyphs

TSpeedButton	See also 	Example

Specifies the number of images included in the Glyph property.

type TNumGlyphs = 1..4;

property NumGlyphs:

Description

Set NumGlyphs to the number of images provided by the bitmap assigned to the Glyph property. All images must be the same size and next to each other in a row. The Glyph property can provide up to four images.


TSpeedButton.Spacing
 VCL Reference

TSpeedButton.Spacing

TSpeedButton	See also

Determines where the image and text appear on a speed button.

property Spacing: Integer;

Description

Set Spacing to the number of pixels that should appear between the image specified in the Glyph property and the text specified in the Caption property.

If Spacing is a positive number, its value is the number of pixels between the image and text. If Spacing is 0, the image and text appear flush with each other. If Spacing is -1, the text appears centered between the image and the button edge.


TSpeedButton.Transparent
 VCL Reference

TSpeedButton.Transparent

TSpeedButton	See also

Specifies whether the background of the button is transparent.

property Transparent: Boolean;

Description

Use Transparent to specify whether the background of the button is transparent.


 VCL Reference

TSpeedButton events

TSpeedButton	Alphabetically	Legend

Derived from TControl

OnClick

OnDblClick

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TSpeedButton events

TSpeedButton	By object	Legend

OnClick

OnDblClick

OnMouseDown

OnMouseMove

OnMouseUp


 VCL Reference

TSpeedButton methods

TSpeedButton	Alphabetically	Legend

In TSpeedButton

Click

Create

Destroy

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSpeedButton methods

TSpeedButton	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Click

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TSpeedButton.Click
 VCL Reference

TSpeedButton.Click

TSpeedButton	See also

Generates an OnClick event or triggers the associated action.

procedure Click; override;

Description

Call Click to generate an OnClick event. If the speed button has an OnClick event handler, or if it is linked to an action, Click allows an application to simulate a click on the button.


TSpeedButton.Create
 VCL Reference

TSpeedButton.Create

TSpeedButton	See also

Creates and initializes an instance of TSpeedButton.

constructor Create(AOwner: TComponent); override;

Description

Call Create to create a speed button at runtime. Speed buttons placed on forms at design time are created automatically.

AOwner is the component, typically a form, that is responsible for freeing the speed button.


TSpeedButton.Destroy
 VCL Reference

TSpeedButton.Destroy

TSpeedButton	See also

Destroys an instance of TSpeedButton.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the speed button is not nil, and only then calls Destroy.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TSpeedButton


TSplitter
 VCL Reference

 TSplitter

Hierarchy	Properties	Methods	Events	Using TSplitter	See also	Example

TSplitter divides the client area of a form into resizable panes.

Unit

ExtCtrls

Description

Add a splitter to a form between two aligned controls to allow users to resize the controls at runtime. The splitter sits between a control aligned to one edge of the form and the controls that fill up the rest of the client area. Give the splitter the same alignment as the control that is anchored to the edge of the form. When the user moves the splitter, it resizes the anchored control. This, in turn, changes the client area of the form, and the controls that fill up the rest of the client area resize accordingly.

Use each control on the form as a separate pane. After each pane is placed, place a splitter with the same alignment to allow that pane to be resized. The last pane to be placed on the form should be client-aligned, so that it resizes automatically to fill up the remaining space after all other panes are resized.


 VCL Reference

TSplitter properties

TSplitter	Alphabetically	Legend

In TSplitter

AutoSnap

Beveled

MinSize

ResizeStyle

Derived from TGraphicControl

Canvas

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentColor

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSplitter properties

TSplitter	By object	Legend

Action

Align

Anchors

AutoSnap

Beveled

BiDiMode

BoundsRect

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlState

ControlStyle

Cursor

DesignInfo

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

MinSize

Name

Owner

Parent

ParentColor

ResizeStyle

ShowHint

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

Width

WindowProc


TSplitter.AutoSnap
 VCL Reference

TSplitter.AutoSnap

TSplitter	See also

Determines whether neighboring objects are resized to zero when the splitter is used to make them smaller than MinSize.

property AutoSnap: Boolean;

Description

Set AutoSnap to False to prevent the splitter from resizing neighboring objects to zero when the user tries to make them smaller than MinSize. When AutoSnap is False, such resize attempts are simply blocked, leaving the neighboring object with a size of MinSize. The default value of AutoSnap is True.


TSplitter.Beveled
 VCL Reference

TSplitter.Beveled

TSplitter	See also

Determines whether the splitter looks beveled along the edge that moves.

property Beveled: Boolean;

Description

Set Beveled to False to remove the beveled edges from the splitter. Set Beveled to True to give the edge a 3D beveled look.

The bevel on a splitter runs in a single direction only: along the edges the user moves to resize neighboring objects. Thus, if the Align property is alLeft or alRight, the vertical edges of the splitter are beveled. If the Align property is alTop or alBottom, the horizontal edges of the splitter are beveled. The default value of Beveled is False.


TSplitter.MinSize
 VCL Reference

TSplitter.MinSize

TSplitter	See also	Example

Specifies the minimum size, in pixels, of the panes on either side of the splitter.

type NaturalNumber = 1..High(Integer);

property MinSize: NaturalNumber;

Description

Set MinSize to provide a minimum size the splitter must leave when resizing its neighboring control.  For example, if the Align property is alLeft or alRight, the splitter cannot resize the regions to its left or right any smaller than MinSize pixels. If the Align property is alTop or alBottom, the splitter cannot resize the regions above or below it any smaller than MinSize pixels. The default value of MinSize is 30.

Note:	Always set MinSize to a value less than half the client width of its parent.  When MinSize is half the client width of the splitter’s parent, the splitter cannot move because to do so would be to resize one of the panes less than MinSize pixels.


TSplitter.ResizeStyle
 VCL Reference

TSplitter.ResizeStyle

TSplitter	See also 	Example

Specifies the effect of moving the splitter.

type TResizeStyle = (rsNone, rsLine, rsUpdate, rsPattern);

property ResizeStyle: TResizeStyle;

Description

Use ResizeStyle to determine what happens when the user moves the splitter with the mouse. ResizeStyle can have one of the values in the following table:

Value	Meaning

rsNone	Moving the splitter with the mouse has no effect.

rsLine	A line is drawn indicating the new position of the splitter that would result if the user released the mouse at the current position. The splitter does not actually move and no controls are resized.

rsUpdate	The control against which the splitter is aligned is resized based on the current mouse position, and the splitter is moved to that position.

rsPattern	A pattern is drawn indicating the new position of the splitter that would result if the user released the mouse at the current position. The splitter does not actually move and no controls are resized. This is the default value for ResizeStyle.


 VCL Reference

TSplitter events

TSplitter	Alphabetically	Legend

In TSplitter

OnCanResize

OnMoved

OnPaint


 VCL Reference

TSplitter events

TSplitter	By object	Legend

OnCanResize

OnMoved

OnPaint


TSplitter.OnCanResize
 VCL Reference

TSplitter.OnCanResize

TSplitter	See also

Occurs when the user tries to move the splitter with the mouse.

type TCanResizeEvent = procedure(Sender: TObject; var NewSize: Integer; var Accept: Boolean) of object;

property OnCanResize: TCanResizeEvent;

Description

Write an OnCanResize event handler to conditionally prevent the user from resizing neighboring components using the splitter.

The NewSize parameter indicates the size the associated control will have if the splitter is allowed to perform the resize. This value can be changed if the attempted resize can be partially allowed. The Accept parameter indicates whether the resize should be permitted at all. Set Accept to False to disallow any movement of the splitter.


TSplitter.OnMoved
 VCL Reference

TSplitter.OnMoved

TSplitter	See also	Example

Occurs after the user has retiled the form using the splitter.

property OnMoved: TNotifyEvent;

Description

Write an OnMoved event handler to take specific action when the user finishes dragging the edge of the neighboring control using the splitter. For example, after resizing a control on the edge of the form, use an OnMoved event handler to update the layout of the new client area of the form. Use the ClientRect property of the form to determine the new size remaining.


TSplitter.OnPaint
 VCL Reference

TSplitter.OnPaint

TSplitter	See also

Occurs when the splitter needs to draw itself.

property OnPaint: TNotifyEvent;

Description

Write an OnPaint event handler to customize the appearance of the splitter. For example, use an OnPaint event handler to give a splitter the appearance of the splitters that appear in cool bar objects. Use the Canvas property as a drawing surface for painting the splitter. Use the ClientRect property to determine the coordinates of the canvas on which to paint the splitter.

When a splitter object receives a WM_PAINT message, it paints its background before generating the OnPaint event. If the Beveled property is True, the beveled appearance will also be added before the OnPaint event. Most applications set Beveled to False when using the OnPaint event to customize the appearance of the splitter.


 VCL Reference

TSplitter methods

TSplitter	Alphabetically	Legend

In TSplitter

CanResize

Create

Destroy

DoCanResize

MouseDown

MouseMove

MouseUp

Paint

RequestAlign

StopSizing

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

DefaultHandler

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

Invalidate

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

Repaint

ReplaceDockedControl

ScreenToClient

SendToBack

SetBounds

SetTextBuf

Show

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSplitter methods

TSplitter	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

CanResize

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoCanResize

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

ExecuteAction

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseDown

MouseMove

MouseUp

MouseWheelHandler

NewInstance

Paint

ParentToClient

Perform

ReferenceInterface

Refresh

RemoveComponent

RemoveFreeNotification

Repaint

ReplaceDockedControl

RequestAlign

SafeCallException

ScreenToClient

SendToBack

SetBounds

SetSubComponent

SetTextBuf

Show

StopSizing

Update

UpdateAction

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TSplitter.CanResize
 VCL Reference

TSplitter.CanResize

TSplitter	See also

Determines how the splitter responds to mouse moves.

function CanResize(var NewSize: Integer): Boolean; reintroduce; virtual;

Description

CanResize is called by the DoCanResize method to generate an OnCanResize event. The NewSize parameter indicates the size the associated control will have if the splitter is allowed to perform the resize. CanResize returns a boolean value that indicates whether the value specified by NewSize should be applied by redrawing the line (when ResizeStyle is rsLine) or resizing the associated control (when ResizeStyle is rsUpdate);

Unless an OnCanResize event handler sets the value of NewSize and the return value, CanResize returns true without changing the NewSize parameter.

Note:	CanResize is not called if the value of ResizeStyle is rsNone when the user presses the mouse button.


TSplitter.Create
 VCL Reference

TSplitter.Create

TSplitter	See also	Example

Creates an instance of TSplitter.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a splitter at runtime. TSplitter objects placed on forms at design time are created automatically.

AOwner specifies the form whose surface the splitter divides.


TSplitter.Destroy
 VCL Reference

TSplitter.Destroy

TSplitter	See also

Frees the memory associated with the splitter.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead,call Free, which checks that the splitter is not nil before calling Destroy.


TSplitter.DoCanResize
 VCL Reference

TSplitter.DoCanResize

TSplitter

Generates an OnCanResize event and enforces the MinSize property.

function DoCanResize(var NewSize: Integer): Boolean; virtual;

Description

DoCanResize is called automatically when the user moves the mouse after pressing the mouse button on the splitter. The NewSize parameter indicates the size the associated control will have if the splitter is allowed to perform the resize. DoCanResize returns a boolean value that indicates whether the value specified by NewSize should be applied by redrawing the line (when ResizeStyle is rsLine) or resizing the associated control (when ResizeStyle is rsUpdate).

DoCanResize calls CanResize to generate an OnCanResize event. If, after calling the event handler, NewSize is less than the value of MinSize, NewSize is changed to zero.

Note:	DoCanResize is not called if the value of ResizeStyle is rsNone when the user presses the mouse button.


TSplitter.MouseDown
 VCL Reference

TSplitter.MouseDown

TSplitter	See also

Dynamically locates the control that can be resized by the splitter.

procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

After calling the parent class's method, MouseDown locates the control that it is about to resize. Because this control is located dynamically, an application can delete or add aligned controls beside a splitter at runtime and the splitter will resize whichever control is currently beside it.


TSplitter.MouseMove
 VCL Reference

TSplitter.MouseMove

TSplitter	See also

Provides visual feedback of how the neighboring control would be resized.

procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;

Description

After calling the inherited method, MouseMove computes the new boundaries of the neighboring control and draws a line where the new edge would be. The control is not actually resized until the mouse is released.


TSplitter.MouseUp
 VCL Reference

TSplitter.MouseUp

TSplitter	See also

Resizes the neighboring control when the user releases the mouse.

procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;

Description

After calling the inherited method, MouseUp resizes the neighboring control that was located when the mouse went down. After the control is resized, MouseUp generates an OnMoved event.


TSplitter.Paint
 VCL Reference

TSplitter.Paint

TSplitter 	See also

Draws the image of the splitter.

procedure Paint; override;

Description

The Paint method is called automatically when the splitterreceives WM_PAINT messages from its Parent. Paint draws the background color of the splitter, and if Beveled is True, draws a bevel along the movable edges. After drawing the background and bevel, Paint generates an OnPaint event.


TSplitter.RequestAlign
 VCL Reference

TSplitter.RequestAlign

TSplitter 	See also

Changes the cursor when the alignment of the splitter changes.

procedure RequestAlign; override;

Description

RequestAlign changes the cursor from crHSplit to crVSplit when the Align property changes to alBottom or alTop.  It changes the cursor from crVSplit to crHSplit when the Align property changes to any other value.

If the Cursor property is not crHSplit or crVSplit, RequestAlign has no effect.

Override RequestAlign to suppress the automatic cursor change or to implement a different association between alignment and the splitter’s cursor.


TSplitter.StopSizing
 VCL Reference

TSplitter.StopSizing

TSplitter	See also

Cleans up after the splitter has resized its neighboring control.

procedure StopSizing; dynamic;

Description

This protected procedure is called when the user releases the mouse or hits the Escape key while using the splitter to resize a control. StopSizing makes sure that the resize line is no longer visible and generates an OnMoved event.


Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TSplitter


TSearchFindFirst
 VCL Reference

TSearchFindFirst

Hierarchy	Properties	Methods	Events	Using TSearchFindFirst	See also

TSearchFindFirst is the standard action for displaying a find dialog that looks for the first occurrence of a string.

Unit

StdActns

Description

Add TSearchFindFirst to an action list to add a modeless find dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the find dialog or bring it to the fore.

TSearchFindFirst is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control.

Search actions represent a modeless dialog. As a result, the OnAccept event occurs not when the user exits the dialog, but when the dialog first appears or comes into focus. When the user directs the dialog to search for a string, TSearchFindFirst automatically performs that search, selecting the specified text in the target edit control. Unlike the TSearchFind action, which locates the first occurrence of the search string following the cursor position in the edit control, TSearchFindFirst locates the first occurrence of the search string, regardless of the cursor position.


 VCL Reference

TSearchFindFirst properties

TSearchFindFirst	Alphabetically	Legend

Derived from TSearchFind

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSearchFindFirst properties

TSearchFindFirst	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TSearchFindFirst events

TSearchFindFirst	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSearchFindFirst events

TSearchFindFirst	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TSearchFindFirst methods

TSearchFindFirst	Alphabetically	Legend

In TSearchFindFirst

Create

Derived from TSearchAction

ExecuteTarget

HandlesTarget

Search

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSearchFindFirst methods

TSearchFindFirst	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

Search

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TSearchFindFirst.Create
 VCL Reference

TSearchFindFirst.Create

TSearchFindFirst	See also

Creates and initializes an instance of TSearchFindFirst.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TSearchFindFirst constructor because actions are added at design time to an action manager or action list.

The TSearchFindFirst constructor creates an instance of its associated dialog and assigns that component as the value of the Dialog property. It then assigns the Search method as an event handler for the dialog’s OnFind event, so that the action responds automatically when user’s direct the dialog to search for a specified text string.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TSearchFindFirst instance.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TSearchAction

TSearchFindFirst


TSearchFindNext
 VCL Reference

TSearchFindNext

Hierarchy	Properties	Methods	Events	Using TSearchFindNext	See also

TSearchFindNext is the standard action for locating the next instance of a string in an edit control.

Unit

StdActns

Description

Add TSearchFindNext to an action list to add the ability to repeat a search initiated by a TSearchFind or TSearchFindFirst action. Controls such as menu items and tool buttons linked to this action cause the application to repeat the search initiated by the TSearchFind action’s dialog.

TSearchFindNext objects must be associated with a TSearchFind action by setting the SearchFind property.


 VCL Reference

TSearchFindNext properties

TSearchFindNext	Alphabetically	Legend

In TSearchFindNext

SearchFind

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSearchFindNext properties

TSearchFindNext	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SearchFind

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TSearchFindNext.SearchFind
 VCL Reference

TSearchFindNext.SearchFind

TSearchFindNext 	See also

Associates the TSearchFindNext action with a TSearchFind action that initiates the search.

property SearchFind: TSearchFind;

Description

SearchFind is the TSearchFind action that displays the modeless search dialog whose current search should be repeated. If SearchFind is not set, then the TSearchFindNext action remains disabled.

TSearchFindNext uses the SearchFind property to obtain a search string from its associated dialog and to search its associated control.


 VCL Reference

TSearchFindNext events

TSearchFindNext	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSearchFindNext events

TSearchFindNext	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TSearchFindNext methods

TSearchFindNext	Alphabetically	Legend

In TSearchFindNext

Create

ExecuteTarget

HandlesTarget

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSearchFindNext methods

TSearchFindNext	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TSearchFindNext.Create
 VCL Reference

TSearchFindNext.Create

TSearchFindNext	See also

Creates an instance of TSearchFindNext.

inline __fastcall virtual TSearchFindNext(Classes::TComponent* AOwner): TCustomAction(AOwner) { }

Description

Most applications do not need to call the TSearchFindNext constructor because actions are added at design time to an action manager or action list.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TSearchFindNext instance.


TSearchFindNext.ExecuteTarget
 VCL Reference

TSearchFindNext.ExecuteTarget

TSearchFindNext 	See also

Searches the target edit control for the next instance of the search string.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget calls the Search method of the TSearchFind action specified by the SearchFind property. This method ignores the Target parameter, and instead searches the edit control that was the target when SearchFind first launched the search dialog. If another instance of the search dialog’s current target string appears in the edit control, the next instance of the string is selected. Otherwise, a message dialog appears to inform the user that the string could not be found.


TSearchFindNext.HandlesTarget
 VCL Reference

TSearchFindNext.HandlesTarget

TSearchFindNext 	See also

Indicates whether the action can execute.

function HandlesTarget(Target: TObject): Boolean; override;

Description

Do not call the HandlesTarget method. This method is called automatically when the user invokes an object (such as a tool button or menu item) that is linked to this action. The HandlesTarget method provides the action object with an opportunity to indicate whether it is appropriate to execute at this time with the object specified by the Target parameter as a “target”.

Target is the currently active object.

HandlesTarget always ignores the Target parameter, and checks whether the associated TSearchFind action is enabled, and if so, whether its associated dialog has a search string. If the action specified by SearchFind is enabled, and the FindText property of its associated dialog has been set, then HandlesTarget returns True, because it can search for the FindText string in the TSearchFind action’s edit control.


TSearchFindNext.UpdateTarget
 VCL Reference

TSearchFindNext.UpdateTarget

TSearchFindNext 	See also

Enables or disables the action, depending on the currently active control in the form.

procedure UpdateTarget(Target: TObject); override;

Description

Do not call the UpdateTarget method. This method is called automatically when the potential target changes so that actions can update themselves accordingly.

In TSearchFindNext, UpdateTarget ignores the current target object (specified by the Target parameter). Instead, it checks the associated TSearchFind action (the SearchFind property), and sets Enabled to True if the search dialog has already specified a search string. If SearchFind is not set, or if there is no search string in its associated dialog, UpdateTarget sets Enabled to False.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TSearchFindNext


TSearchReplace
 VCL Reference

TSearchReplace

Hierarchy	Properties	Methods	Events	Using TSearchReplace	See also

TSearchReplace is the standard action for displaying a find-and-replace dialog.

Unit

StdActns

Description

Add TSearchReplace to an action list to add a modeless find-and-replace dialog to your application. Controls such as menu items and tool buttons linked to this action cause the application to display the find-and-replace dialog or bring it to the fore.

TSearchReplace is designed to work with an edit control (TCustomEdit descendant) as a target. It automatically disables itself if the active control in a form is not an edit control.

Search/replace actions represent a modeless dialog. As a result, the OnAccept event occurs not when the user exits the dialog, but when the dialog first appears or comes into focus. When the user directs the dialog to replace one or all instances of a string, TSearchReplace automatically performs the search and replaces the specified text in the target edit control.


 VCL Reference

TSearchReplace properties

TSearchReplace	Alphabetically	Legend

In TSearchReplace

Dialog

Derived from TCommonDialogAction

ExecuteResult

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TSearchReplace properties

TSearchReplace	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Dialog

DisableIfNoHandler

Enabled

ExecuteResult

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


TSearchReplace.Dialog
 VCL Reference

TSearchReplace.Dialog

TSearchReplace 	See also

Provides access the find-and-replace dialog that the action executes.

property Dialog: TReplaceDialog;

Description

Use Dialog to configure the find-and-replace dialog before the action fires or to close the modeless dialog programmatically. For example, you can set the dialog’s options at design time using the Object Inspector or call the dialog’s CloseDialog method to shut down the modeless find-and-replace dialog.

When using a search/replace action, you do not place a TReplaceDialog component on the form or data module at design time. Instead, you add the TSearchReplace action to your action list and then use the Dialog property. The TReplaceDialog component is created by the TSearchReplace constructor.


 VCL Reference

TSearchReplace events

TSearchReplace	Alphabetically	Legend

Derived from TCommonDialogAction

BeforeExecute

OnAccept

OnCancel

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TSearchReplace events

TSearchReplace	By object	Legend

BeforeExecute

OnAccept

OnCancel

OnExecute

OnHint

OnUpdate


 VCL Reference

TSearchReplace methods

TSearchReplace	Alphabetically	Legend

In TSearchReplace

ExecuteTarget

Derived from TSearchAction

Create

HandlesTarget

Search

UpdateTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TSearchReplace methods

TSearchReplace	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

Search

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TSearchReplace.ExecuteTarget
 VCL Reference

TSearchReplace.ExecuteTarget

TSearchReplace 	See also

Launches the associated dialog and assigns an event handler to replace found text.

procedure ExecuteTarget(Target: TObject); override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active object when the action fires.

ExecuteTarget first launches the search-and-replace dialog specified by Dialog. This is a modeless dialog, so the result of the dialog’s Execute method simply indicates whether the dialog successfully appeared or was brought into focus. This result is set as the value of the ExecuteResult property, and an OnAccept event occurs if the dialog was brought into focus, or an OnCancel event occurs if the dialog failed to appear.

Finally, ExecuteTarget sets the OnReplace event handler of the search-and-replace dialog to a private method that performs the replacement specified by the dialog.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCommonDialogAction

TSearchAction

TSearchReplace


TStack
 VCL Reference

TStack

Hierarchy	Methods	See also

TStack maintains a last-in first-out array of pointers.

Unit

Contnrs

Description

Use a TStack object to store and maintain a last-in first-out list.


 VCL Reference

TStack methods

TStack	Alphabetically	Legend

Derived from TOrderedList

AtLeast

Count

Create

Destroy

Peek

Pop

Push

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStack methods

TStack	By object	Legend

AfterConstruction

AtLeast

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Count

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Peek

Pop

Push

SafeCallException


Hierarchy

TObject

TOrderedList

TStack


TStaticText
 VCL Reference

 TStaticText

Hierarchy	Properties	Methods	Events	Using TStaticText	See also

TStaticText is a windowed control that displays text on a form.

Unit

StdCtrls

Description

The TStaticText component functions like TLabel, except that it descends from TWinControl and therefore has a window handle. Use TStaticText instead of TLabel when the component’s accelerator key must belong to a windowed control—for example, on an ActiveX property page.


 VCL Reference

TStaticText properties

TStaticText	Alphabetically	Legend

Derived from TCustomStaticText

Alignment

AutoSize

BorderStyle

FocusControl

ShowAccelChar

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

Hint

HelpContext

HelpKeyword

HelpType

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStaticText properties

TStaticText	By object	Legend

Action

Align

AlignDisabled

Alignment

Anchors

AutoSize

BevelEdges

BevelInner

BevelKind

BevelOuter

BiDiMode

BorderStyle

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

FocusControl

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowAccelChar

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TStaticText events

TStaticText	Alphabetically	Legend

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TStaticText events

TStaticText	By object	Legend

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TStaticText methods

TStaticText	Alphabetically	Legend

Derived from TCustomStaticText

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStaticText methods

TStaticText	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomStaticText

TStaticText


TStringList
 VCL Reference

TStringList

Hierarchy	Properties	Methods	Events	Using TStringList	See also

TStringList maintains a list of strings.

Unit

Classes

Description

Use a string list object to store and manipulate a list of strings. TStringList implements the abstract properties and methods introduced by TStrings, and introduces new properties, events, and methods to

Sort the strings in the list.

Prohibit duplicate strings in sorted lists.

Respond to changes in the contents of the list.

Control whether strings are located, sorted, and identified as duplicates in a case-sensitive or case-insensitive manner.


 VCL Reference

TStringList properties

TStringList	Alphabetically	Legend

In TStringList

Capacity

CaseSensitive

Count

Duplicates

Objects

Sorted

Strings

Derived from TStrings

CommaText

DelimitedText

Delimiter

Names

QuoteChar

StringsAdapter

Text

Values


 VCL Reference

TStringList properties

TStringList	By object	Legend

Capacity

CaseSensitive

CommaText

Count

DelimitedText

Delimiter

Duplicates

Names

Objects

QuoteChar

Sorted

Strings

StringsAdapter

Text

Values


TStringList.Capacity
 VCL Reference

TStringList.Capacity

TStringList	See also

Indicates the number of strings the string list has allocated memory to hold.

property Capacity: Integer;

Description

Use Capacity to find out how much memory is available for holding strings, or to reallocate the memory to allow more or fewer strings.

Capacity is the number of entries in the string list that have been allocated, as opposed to Count, which is the number of strings in the list. Thus, Capacity is always greater than or equal to Count.

Adding new strings will cause the Capacity property to increase if necessary, but setting the Capacity property will not change the Count property. Do not set Capacity to a value less than Count, or the list will be truncated and Count will indicate that the list contains more strings than is the case. Also, if Capacity is set to a value less than Count, the memory used to store the strings that are dropped from the list (as opposed to the entries in the list that point to those strings) is not freed.


TStringList.CaseSensitive
 VCL Reference

TStringList.CaseSensitive

TStringList 	See also

Controls whether strings are located, sorted, and identified as duplicates in a case-sensitive or case-insensitive manner.

property CaseSensitive: Boolean;

Description

Use CaseSensitive to indicate whether strings in the list should be compared in a case-sensitive or case-insensitive manner. Set CaseSensitive to True to make the string list locate, check for duplicates, and sort its strings in a case-sensitive manner. Set CaseSensitive to False to make the string list perform these operations case-insensitively.


TStringList.Count
 VCL Reference

TStringList.Count

TStringList	See also 	Example

Indicates the number of strings in the list.

property Count: Integer;

Description

Use Count when iterating over all the strings in the list, or when trying to locate the position of a string relative to the last string in the list.


TStringList.Duplicates
 VCL Reference

TStringList.Duplicates

TStringList	See also

Specifies whether duplicate strings can be added to sorted lists.

property Duplicates: TDuplicates;

Description

Set Duplicates to specify what should happen when an attempt is made to add a duplicate string to a sorted list. The CaseSensitive property controls whether two strings are considered duplicates if they are identical except for differences in case.

The value of Duplicates should be one of the following.

Value	Meaning

dupIgnore	Ignore attempts to add duplicate strings to the list.

dupError	Raise an EStringListError exception when an attempt is made to add duplicate strings to the sorted list.

dupAccept	Permit duplicate strings in the sorted list.

Set Duplicates before adding any strings to the list. Setting Duplicates to dupIgnore or dupError does nothing about duplicate strings that are already in the list.

Note:	Duplicates does nothing if the list is not sorted.


TStringList.Objects
 VCL Reference

TStringList.Objects

TStringList	See also

Lists a set of objects associated one with each of the strings in the Strings property.

property Objects[Index: Integer]: TObject;

Description

Associate an object with an existing string by setting the Objects property using the same index as that of the string in the Strings property. Look up the object associated with a string by reading the Objects property with the index of the string. Index gives the position of the string associated with the object, where 0 is the first string, 1 is the second string, and so on. Use the IndexOf method to find the index of the string.

For example, use Objects to associate bitmap objects with the strings in the string list. The Objects property then enables the application to quickly locate the bitmaps for display beside the strings in a listbox, or for drawing when the associated string is selected in a control.

Note:	The TStringList object does not own the objects in the Objects array. Objects added to the Objects array still exist even if the string list is destroyed. They must be explicitly destroyed by the application.


TStringList.Sorted
 VCL Reference

TStringList.Sorted

TStringList	See also 	Example

Specifies whether the strings in the list should be automatically sorted.

property Sorted: Boolean;

Description

Set Sorted to True to cause the strings in the list to be automatically sorted in ascending order. Set Sorted to False to allow strings to remain where they are inserted. When Sorted is False, the strings in the list can be put in ascending order at any time by calling the Sort method.

When Sorted is True, do not use Insert to add strings to the list. Instead, use Add, which will insert the new strings in the appropriate position. When Sorted is False, use Insert to add strings to an arbitrary position in the list, or Add to add strings to the end of the list.

Note:	The CaseSensitive property controls whether the strings in the list are sorted based on a case-sensitive or case-insensitive comparison. The sort order takes into account the locale of the system on which the application is running.


TStringList.Strings
 VCL Reference

TStringList.Strings

TStringList	See also

Lists the strings, referenced by a 0-based index.

property Strings[Index: Integer]: string; default;

Description

Use Strings to read or modify the string at a particular position. Index gives the position of the string, where 0 is the position of the first string, 1 is the position of the second string, and so on. To locate a particular string in the list, call the IndexOf method.

Strings is the default property of string list objects. The Strings identifier can be omitted when accessing the Strings property of a string list object. For example, the following two lines of code are both acceptable and do the same thing:

MyStringList.Strings[0] := 'This is the first string';

MyStringList[0] := 'This is the first string';


 VCL Reference

TStringList events

TStringList	Alphabetically	Legend

In TStringList

OnChange

OnChanging


 VCL Reference

TStringList events

TStringList	By object	Legend

OnChange

OnChanging


TStringList.OnChange
 VCL Reference

TStringList.OnChange

TStringList	See also

Occurs immediately after the list of strings changes.

property OnChange: TNotifyEvent;

Description

Write an OnChange event handler to respond to changes in the list of strings. For example, if the string list is associated with a control, the OnChange event handler could tell the control to repaint itself whenever the content of the list changes.

Whenever strings in the list are added, deleted, moved, or modified, the following events take place:

1	An OnChanging event occurs before the change.

2	The strings are added, deleted, moved, or modified.

3	An OnChange event occurs.

Note:	OnChange occurs for every change made to the list, regardless of whether the application calls BeginUpdate and EndUpdate around a series of changes.


TStringList.OnChanging
 VCL Reference

TStringList.OnChanging

TStringList	See also

Occurs immediately before the list of strings changes.

property OnChanging: TNotifyEvent;

Description

Write an OnChanging event handler to prepare for changes in the list of strings. For example, if the string list is associated with a control, the OnChanging event handler could tell the control to disable repaints until the OnChange event when the list has finished changing.

Whenever strings in the list are added, deleted, moved, or modified, the following events take place:

1	An OnChanging event occurs.

2	The strings are added, deleted, moved, or modified.

3	An OnChange event occurs after the changes are complete.

Note:	OnChanging occurs for every change made to the list, regardless of whether the application calls BeginUpdate and EndUpdate around a series of changes.


 VCL Reference

TStringList methods

TStringList	Alphabetically	Legend

In TStringList

Add

AddObject

Clear

CustomSort

Delete

Destroy

Exchange

Find

IndexOf

Insert

InsertObject

Sort

Derived from TStrings

AddStrings

Append

Assign

BeginUpdate

EndUpdate

Equals

GetText

IndexOfName

IndexOfObject

LoadFromFile

LoadFromStream

Move

SaveToFile

SaveToStream

SetText

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStringList methods

TStringList	By object	Legend

Add

AddObject

AddStrings

AfterConstruction

Append

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

Equals

Exchange

FieldAddress

Find

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetText

IndexOf

IndexOfName

IndexOfObject

InheritsFrom

InitInstance

Insert

InsertObject

InstanceSize

LoadFromFile

LoadFromStream

MethodAddress

MethodName

Move

NewInstance

SafeCallException

SaveToFile

SaveToStream

SetText

Sort


TStringList.Add
 VCL Reference

TStringList.Add

TStringList	See also	Example

Adds a new string to the list.

function Add(const S: string): Integer; override;

Description

Call Add to add the string S to the list. If the list is sorted, S is added to the appropriate position in the sort order. If the list is not sorted, S is added to the end of the list. Add returns the position of the item in the list, where the first item in the list has a value of 0.

Note:	For sorted lists, Add will raise an EListError exception if the string S already appears in the list and Duplicates is set to dupError. If Duplicates is set to dupIgnore, trying to add a duplicate string to a sorted list does nothing.


TStringList.AddObject
 VCL Reference

TStringList.AddObject

TStringList	See also

Adds a string to the list, and associates an object with the string.

function AddObject(const S: string; AObject: TObject): Integer; override;

Description

Call AddObject to add a string and its associated object to the list. AddObject returns the index of the new string and object.

Note:	The TStringList object does not own the objects you add this way. Objects added to the TStringList object still exist even if the TStringList instance is destroyed. They must be explicitly destroyed by the application.


TStringList.Clear
 VCL Reference

TStringList.Clear

TStringList	See also

Deletes all the strings from the list.

procedure Clear; override;

Description

Call clear to empty the list of strings. All references to associated objects are also removed. However, the objects themselves are not freed.


TStringList.CustomSort
 VCL Reference

TStringList.CustomSort

TStringList	See also

Sorts the strings in the list in a customized order.

type TStringListSortCompare = function(List: TStringList; Index1, Index2: Integer): Integer;

procedure CustomSort(Compare: TStringListSortCompare); virtual;

Description

Use CustomSort to sort the strings in the list, where the sort order is defined by the Compare parameter.

Supply a value for the Compare function that compares two strings in the string list. The List parameter provides access to the string list, while the Index1 and Index2 parameters identify the strings to be compared. Use Index1 and Index2 as indexes into the Strings property array. The Compare function should return

a value less than 0 if the string identified by Index1 comes before the string identified by Index2

0 if the two strings are equivalent

a value greater than 0 if the string with Index1 comes after the string identified by Index2.

Do not pass nil as the value of the Compare parameter.

Note:	You must explicitly call the CustomSort method. Setting the Sorted property only sorts strings using ANSI order, as implemented in the Sort method.


TStringList.Delete
 VCL Reference

TStringList.Delete

TStringList	See also

Removes the string specified by the Index parameter.

procedure Delete(Index: Integer); override;

Description

Call Delete to remove a single string from the list. If an object is associated with the string, the reference to the object is removed as well. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on.


TStringList.Destroy
 VCL Reference

TStringList.Destroy

TStringList	See also

Destroys an instance of TStringList.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TStringList reference is not nil and only then calls Destroy.

Destroy frees the memory allocated to hold the list of strings and object references before calling the inherited destructor.


TStringList.Exchange
 VCL Reference

TStringList.Exchange

TStringList	See also

Swaps the position of two strings in the list.

procedure Exchange(Index1, Index2: Integer); override;

Description

Call Exchange to rearrange the strings in the list. The strings are specified by their index values in the Index1 and Index2 parameters. Indexes are zero-based, so the first string in the list has an index value of 0, the second has an index value of 1, and so on.

If either string has an associated object, Exchange changes the index of the object as well.

Warning:	Do not call Exchange on a sorted list except to swap two identical strings with different associated objects. Exchange does not check whether the list is sorted, and can destroy the sort order of a sorted list.


TStringList.Find
 VCL Reference

TStringList.Find

TStringList	See also 	Example

Locates the index for a string in a sorted list and indicates whether a string with that value already exists in the list.

function Find(const S: string; var Index: Integer): Boolean; virtual;

Description

Use Find to obtain the index in a sorted list where the string S should be added. If the string S, or a string that differs from S only in case when CaseSensitive is False, already exists in the list, Find returns True. If the list does not contain a string that matches S, Find returns False. The index where S should go is returned in the Index parameter. The value of Index is zero-based, where the first string has the index 0, the second string has the index 1, and so on.

Note:	Only use Find with sorted lists. For unsorted lists, use the IndexOf method instead.


TStringList.IndexOf
 VCL Reference

TStringList.IndexOf

TStringList	See also

Returns the position of a string in the list.

function IndexOf(const S: string): Integer; override;

Description

Call IndexOf to obtain the position of the first occurrence of a string that matches S. A string matches S if it is identical to S or, if CaseSensitive is False, if it differs only in case.

IndexOf returns the 0-based index of the string. Thus, if S matches the first string in the list, IndexOf returns 0, if S is the second string, IndexOf returns 1, and so on. If the string does not have a match in the string list, IndexOf returns -1.


TStringList.Insert
 VCL Reference

TStringList.Insert

TStringList	See also

Inserts a string to the list at the position specified by Index.

procedure Insert(Index: Integer; const S: string); override;

Description

Call Insert to add the string S to the list at the position specified by Index. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on.

If the string has an associated object, use the InsertObject method instead.

Note:	If the list is sorted, calling Insert or InsertObject will raise an EListError exception. Use Add or AddObject with sorted lists.


TStringList.InsertObject
 VCL Reference

TStringList.InsertObject

TStringList	See also 	Example

Inserts a string into the list at the specified position, and associates it with an object.

procedure InsertObject(Index: Integer; const S: string; AObject: TObject); override;

Description

Call InsertObject to insert the string S into the list at the position identified by Index, and associate it with the object AObject. If Index is 0, the string is inserted at the beginning of the list. If Index is 1, the string is put in the second position of the list, and so on.


TStringList.Sort
 VCL Reference

TStringList.Sort

TStringList	See also

Sorts the strings in the list in ascending order.

procedure Sort; virtual;

Description

Call Sort to sort the strings in a list that has the Sorted property set to False. String lists with the Sorted property set to True are automatically sorted.

Note:	Sort uses AnsiCompareStr to sort the strings when CaseSensitive is True and AnsiCompareText when CaseSensitive is False. To provide your own comparison operator instead, use the CustomSort method.


Hierarchy

TObject

TPersistent

TStrings

TStringList


TStaticListAction
 VCL Reference

TStaticListAction

Hierarchy	Properties	Methods	Events	Using TStaticListAction	See also

TStaticListAction provides items to client controls.

Unit

ListActns

Description

TStaticListAction supplies items to client controls such as list views, list boxes, or combo boxes. TStaticListAction maintains a list of items in its Items property. This lets you specify, at design time, the items it supplies to clients.

When an application sets the Active property of a list action to True, the action fills all client controls with items. Each item may include text, an image, and a pointer to data. Each client control determines which of these features of the item it accepts.

When the user selects an item in one of the client controls, the client “executes” the list action, which causes it to generate an OnItemSelected event.

When a TStaticListAction is added to an action manager, it uses the action to generate a drop-down list on a tool bar.


 VCL Reference

TStaticListAction properties

TStaticListAction	Alphabetically	Legend

In TStaticListAction

Count

Items

Strings

Derived from TCustomListAction

Active

Images

ItemIndex

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStaticListAction properties

TStaticListAction	By object	Legend

ActionComponent

ActionList

Active

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Images

Index

ItemIndex

Items

Name

Owner

SecondaryShortCuts

ShortCut

Strings

Tag

VCLComObject

Visible


TStaticListAction.Count
 VCL Reference

TStaticListAction.Count

TStaticListAction 	See also

Indicates the number of items this list action represents.

property Count: Integer;

Description

Read Count to determine the number of items the list action supplies to client controls. This is the number of items listed by the Items property.


TStaticListAction.Items
 VCL Reference

TStaticListAction.Items

TStaticListAction 	See also

Lists the items that this list action supplies to clients.

property Items: TStaticListItems;

Description

Set Items to indicate the items that this action supplies to clients. At design time, you can use the collection editor to add items to the list and set their properties.


TStaticListAction.Strings
 VCL Reference

TStaticListAction.Strings

TStaticListAction 	See also

Lists the strings that are the values of the items this action supplies.

property Strings[Index: Integer]: String; default;

Description

Read Strings to get or set the text value for any of the items this action supplies to clients. For each item, Strings is the value of that item’s Caption property.

Index is the index of the item. It is a value from 0 to Count – 1.


 VCL Reference

TStaticListAction events

TStaticListAction	Alphabetically	Legend

In TStaticListAction

OnGetItem

Derived from TCustomListAction

OnItemSelected

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TStaticListAction events

TStaticListAction	By object	Legend

OnExecute

OnGetItem

OnHint

OnItemSelected

OnUpdate


TStaticListAction.OnGetItem
 VCL Reference

TStaticListAction.OnGetItem

TStaticListAction 	See also

Occurs when the static list action supplies an item to its client controls.

type TGetItemEvent = procedure(Sender: TCustomListAction; const Index: Integer; var Item: TListControlItem) of object;

property OnGetItem: TGetItemEvent;

Description

Write an OnGetItem event handler to customize the properties of an item before it is supplied to client controls. The GetItem method generates an OnGetItem event for every item it supplies to clients, passing in the current item from the Items property. You can change that item’s properties in the event handler before it is added to client controls.

Sender is the list action that is supplying data to client controls.

Index indicates which item is requested, where 0 is the first item, 1 is the second item, and so on up to the index that is one less than the value of the Count property.

Item is the item that the action is about to supply to the user. You can change any of its properties before it is passed on to the action’s client.


 VCL Reference

TStaticListAction methods

TStaticListAction	Alphabetically	Legend

In TStaticListAction

Create

Destroy

GetCount

GetItem

GetItemClass

Derived from TCustomListAction

ExecuteTarget

HandlesTarget

Derived from TCustomAction

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStaticListAction methods

TStaticListAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TStaticListAction.Create
 VCL Reference

TStaticListAction.Create

TStaticListAction	See also

Creates an instance of TStaticListAction.

constructor Create(AOwner: TComponent); override;

Description

Most applications do not need to call the TStaticListAction constructor because actions are added at design time to an action list or action manager.

AOwner specifies the Owner for the action. This is the component that is responsible for freeing the TStaticListAction instance.


TStaticListAction.Destroy
 VCL Reference

TStaticListAction.Destroy

TStaticListAction

Frees the memory associated with the TStaticListAction object.

destructor Destroy; override;

Description

Do not explicitly destroy actions. Action objects are created and destroyed by the action list or action manager that uses them.


TStaticListAction.GetCount
 VCL Reference

TStaticListAction.GetCount

TStaticListAction 	See also

Returns the value of the Count property.

function GetCount: Integer; override;

Description

GetCount is the protected read implementation of the Count property. It returns the number of items listed in the Items property.


TStaticListAction.GetItem
 VCL Reference

TStaticListAction.GetItem

TStaticListAction 	See also

Fills in a specified item to match the corresponding item in the Items list.

function GetItem(const Index: Integer; AnItem: TListControlItem): Boolean;

Description

When you set the Active property to True, the static list action supplies items to client controls through a series of calls to GetItem, one for each item.

Index indicates which item is desired, where 0 indicates the first item, 1 indicates the second item, and so on up to the number of items specified by the Count property.

AnItem is the item supplied to clients. GetItem assigns the properties of the corresponding item in the Items property to AnItem.


TStaticListAction.GetItemClass
 VCL Reference

TStaticListAction.GetItemClass

TStaticListAction 	See also

Returns the class type for the items in the Items property array.

type TListControlItemClass = class ofTListControlItem;

function GetItemClass: TListControlItemClass;

Description

GetItemClass returns the class type used for the items TStaticListAction supplies to clients. This class type determines the item properties that can be assigned to the various client items.

As implemented in TStaticListAction, GetItemClass returns TListControlItem.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCustomListAction

TStaticListAction


TStaticListItems
 VCL Reference

TStaticListItems

Hierarchy	Properties	Methods	Events	See also

TStaticListItems represents the items that TStaticListAction supplies to client controls.

Unit

ListActns

Description

TStaticListItems manages a collection of items for a TStaticListAction component. Each item in the collection can include a text value, associated image, and a data pointer. If the associated TStaticListAction is active, then when items are added to or deleted from TStaticListItems, the list action’s clients are updated so that they reflect the current set of items.


 VCL Reference

TStaticListItems properties

TStaticListItems	Alphabetically	Legend

Derived from TListControlItems

CaseSensitive

Items

SortType

Derived from TCollection

Count

ItemClass


 VCL Reference

TStaticListItems properties

TStaticListItems	By object	Legend

CaseSensitive

Count

ItemClass

Items

SortType


 VCL Reference

TStaticListItems events

TStaticListItems	Alphabetically	Legend

Derived from TListControlItems

OnCompare


 VCL Reference

TStaticListItems Events

TStaticListItems	By object	Legend

OnCompare


 VCL Reference

TStaticListItems methods

TStaticListItems	Alphabetically	Legend

Derived from TListControlItems

Add

CustomSort

Sort

Derived from TOwnedCollection

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Insert

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStaticListItems methods

TStaticListItems	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Sort


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TListControlItems

TStaticListItems


TStatusPanel
 VCL Reference

TStatusPanel

Hierarchy	Properties	Methods	See also

TStatusPanel represents a single panel of a status bar.

Unit

ComCtrls

Description

Each TStatusBar uses a TStatusPanels to maintain a collection of TStatusPanel objects.


 VCL Reference

TStatusPanel Properties

TStatusPanel	Alphabetically	Legend

In TStatusPanel

Alignment

Bevel

BiDiMode

DisplayName

ParentBiDiMode

Style

Text

Width

Derived from TCollectionItem

Collection

ID

Index


 VCL Reference

TStatusPanel Properties

TStatusPanel	By Object	Legend

Alignment

Bevel

BiDiMode

Collection

DisplayName

ID

Index

ParentBiDiMode

Style

Text

Width


TStatusPanel.Alignment
 VCL Reference

TStatusPanel.Alignment

TStatusPanel	See also

Specifies how text is aligned within the status panel.

property Alignment: TAlignment;

Description

Use Alignment to indicate panel text alignment. These are the possible values:

Value	Meaning

taLeftJustify	Align text on the left side of the panel.

taCenter	Center the text in the panel.

taRightJustify	Align text on the right side of the panel.

Note:	If the status bar has a sizing grip, setting the Alignment of the last status panel to taRightJustify truncates the panel’s text.


TStatusPanel.Bevel
 VCL Reference

TStatusPanel.Bevel

TStatusPanel

Determines the style of the panel’s border.

type TStatusPanelBevel = (pbNone, pbLowered, pbRaised);

property Bevel: TStatusPanelBevel;

Description

These are the possible values of Bevel:

Value	Meaning

pbNone	The panel has no bevel and appears flat.

pbLowered	The panel appears recessed.

pbRaised	The panel appears raised.


TStatusPanel.BiDiMode
 VCL Reference

TStatusPanel.BiDiMode

TStatusPanel

Specifies the bi-directional mode for the status panel.

property BiDiMode: TBiDiMode;

Description

Use BiDiMode to specify the bi-directional mode for the status panel.


TStatusPanel.DisplayName
 VCL Reference

TStatusPanel.DisplayName

TStatusPanel	See also

DisplayName is a string that names an individual panel within a collection of panels.

property DisplayName: string

Description

Use DisplayName to specify the name of the panel as it should appear in the Panels editor at design time. If the Text property is set, the value of DisplayName is the same as Text. Otherwise, DisplayName is the name of the list column class.


TStatusPanel.ParentBiDiMode
 VCL Reference

TStatusPanel.ParentBiDiMode

TStatusPanel

Specifies whether the status panel uses its parent’s bi-directional mode.

property ParentBiDiMode: Boolean;

Description

Use BiDiMode to specify whether the status panel uses its parent’s bi-directional mode.


TStatusPanel.Style
 VCL Reference

TStatusPanel.Style

TStatusPanel	See also

Determines how the status panel’s text is displayed.

type TStatusPanelStyle = (psText, psOwnerDraw);

property Style: TStatusPanelStyle;

Description

If Style is set to psText (the default), the string contained in the Text property is displayed in the status panel, using the alignment specified by Alignment. The font is determined by the status bar’s Font property.

If Style is set to psOwnerDraw, the content displayed in the status panel is drawn at runtime on the status bar’s canvas by code in an OnDrawPanel event handler.


TStatusPanel.Text
 VCL Reference

TStatusPanel.Text

TStatusPanel 	Example

Specifies the text appearing in the status panel.

property Text: string;

Description

The Text property contains a string that appears in the status panel if Style is set to psText.


TStatusPanel.Width
 VCL Reference

TStatusPanel.Width

TStatusPanel

Specifies the width of the status panel.

property Width: Integer;

Description

The Width property determines the horizontal size of the status panel, in pixels.


 VCL Reference

TStatusPanel Methods

TStatusPanel	Alphabetically	Legend

In TStatusPanel

Assign

Create

GetDisplayName

ParentBiDiModeChanged

UseRightToLeftAlignment

UseRightToLeftReading

Derived from TCollectionItem

Destroy

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStatusPanel Methods

TStatusPanel	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

Dispatch

FieldAddress

Free

FreeInstance

GetDisplayName

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

ParentBiDiModeChanged

SafeCallException

UseRightToLeftAlignment

UseRightToLeftReading


TStatusPanel.Assign
 VCL Reference

TStatusPanel.Assign

TStatusPanel	See also

Copies the contents of the source status panel to a new status panel.

procedure Assign(Source: TPersistent); override;

Description

Assign copies the values of Alignment, Bevel, Style, Text, and Width from the source status panel.


TStatusPanel.Create
 VCL Reference

TStatusPanel.Create

TStatusPanel	See also

Creates and initializes a status panel.

constructor Create(Collection: TCollection); override;

Description

Create takes a TStatusPanels instance as its argument.


TStatusPanel.GetDisplayName
 VCL Reference

TStatusPanel.GetDisplayName

TStatusPanel

Returns the display name of the panel.

function GetDisplayName: stringoverride;

Description

Use GetDisplayName to return the display name of the panel.

If Text is set, GetDisplayName overrides the inherited method to return Text; Otherwise, GetDisplayName returns the result of a call to the inherited GetDisplayName method.


TStatusPanel.ParentBiDiModeChanged
 VCL Reference

TStatusPanel.ParentBiDiModeChanged

TStatusPanel

Synchronizes the status panel’s BiDiMode with its parent’s BiDiMode..

procedure ParentBiDiModeChanged;

Description

Use ParentBiDiModeChanged to synchronize the status panel’s BiDiMode with its parent’s BiDiMode.


TStatusPanel.UseRightToLeftAlignment
 VCL Reference

TStatusPanel.UseRightToLeftAlignment

TStatusPanel

Specifies whether the control’s alignment is in a right-to-left mode.

function UseRightToLeftAlignment: Boolean;

Description

Call UseRightToLeftAlignment to determine whether the control’s alignment is in a right-to-left mode. This information can be used when painting the control, or when responding to mouse events.

UseRightToLeft alignment returns True if SysLocale.MiddleEast is True and BiDiMode = bdRightToLeft.


TStatusPanel.UseRightToLeftReading
 VCL Reference

TStatusPanel.UseRightToLeftReading

TStatusPanel

Specifies whether the control is using a right-to-left reading order.

function UseRightToLeftReading: Boolean;

Description

Call UseRightToLeftReading to determine which style flags to set for the control when it is created and which flags to set for drawing text (for example, when calling ExTextOut or DrawText).

UseRightToLeftReading returns True if SysLocale.MiddleEast =True and BiDiMode <> bdLeftToRight.


Hierarchy

TObject

TPersistent

TCollectionItem

TStatusPanel


TStatusPanels
 VCL Reference

TStatusPanels

Hierarchy	Properties	Methods	See also

TStatusPanels is a container for TStatusPanel objects.

Unit

ComCtrls

Description

Each TStatusPanels holds a collection of TStatusPanel objects in a TStatusBar. TStatusPanels maintains an index of the status panels in its Items array. The Count property contains the number of status panels in the collection. At design time, use the status bar’s Panels editor to add, remove, or modify status panels.


 VCL Reference

TStatusPanels properties

TStatusPanels	Alphabetically	Legend

In TStatusPanels

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TStatusPanels properties

TStatusPanels	By object	Legend

Count

ItemClass

Items


TStatusPanels.Items
 VCL Reference

TStatusPanels.Items

TStatusPanels	See also	Example

Lists the status panels in the collection.

property Items[Index: Integer]: TStatusPanel; default;

Description

The value of the Index parameter corresponds to the Index property of TStatusPanel. It represents the position of the status panel in the status bar.


 VCL Reference

TStatusPanels methods

TStatusPanels	Alphabetically	Legend

In TStatusPanels

Add

AddItem

Create

GetOwner

Insert

Update

Derived from TCollection

Assign

BeginUpdate

Clear

Delete

Destroy

EndUpdate

FindItemID

GetNamePath

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TStatusPanels methods

TStatusPanels	By object	Legend

Add

AddItem

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetOwner

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException

Update


TStatusPanels.Add
 VCL Reference

TStatusPanels.Add

TStatusPanels	See also 	Example

Creates a new TStatusPanel instance and adds it to the Items array.

function Add: TStatusPanel;

Description

Add returns the new status panel. At design time, use the Panels editor to add panels to the status bar.


TStatusPanels.AddItem
 VCL Reference

TStatusPanels.AddItem

TStatusPanels	See also

Add node object to collection.

function AddItem(Item: TStatusPanel; Index: Integer): TStatusPanel;

Description

The AddItem method is similar to the Add method, but is more flexible.

The Item parameter specifies the panel object to add. If Item is nil, then a new panel object is created automatically. To determine the object type at runtime, define the status bar's OnCreatePanelClass event handler. If this event handler is not defined, the new panel object is an instance of TStatusPanel.

The Index parameter determines the Index property of the panel object. If Index is negative, the panel object is added at the end of the collection.

AddItem returns the panel object added.


TStatusPanels.Create
 VCL Reference

TStatusPanels.Create

TStatusPanels	See also

Creates and initializes a TStatusPanels object.

constructor Create(StatusBar: TStatusBar);

Description

Do not call Create directly. Instances of TStatusBar create the TStatusPanels object from their own constructors.

The Create method takes, as a parameter, the TStatusBar instance that uses TStatusPanels to manage its panels.


TStatusPanels.Delete
 VCL Reference

TStatusPanels.Delete

TStatusPanels	See also

Deletes a single Status Panel.

procedure Delete(Index: Integer)

Description

Delete removes the indicated Status Panel. Index refers to a TStatusPanel object in the Items array.


TStatusPanels.GetOwner
 VCL Reference

TStatusPanels.GetOwner

TStatusPanels	See also

Returns the owner.

function GetOwner: TPersistent; override;

Description

In TStatusPanels, GetOwner returns the TStatusBar object that contains the panels.


TStatusPanels.Insert
 VCL Reference

TStatusPanels.Insert

TStatusPanels	See also

Add new panel object to collection.

function Insert(Index: Integer): TStatusPanel;

Description

The Insert method creates a new panel object and adds it the the collection. To determine the object type at runtime, define the status bar's OnCreatePanelClass event handler. If this event handler is not defined, the new panel object is an instance of TStatusPanel.

The Index parameter determines the Index property of the panel object. If Index is negative, the panel object is added at the end of the collection.

Insert returns the new panel object.


TStatusPanels.Update
 VCL Reference

TStatusPanels.Update

TStatusPanels	See also

Updates the collection to reflect changes to its items.

procedure Update(Item: TCollectionItem); override;

Description

In TStatusPanels, a call to Update for any panel causes the entire status bar layout to be recalculated.


Hierarchy

TObject

TPersistent

TCollection

TStatusPanels


TStatusBar
 VCL Reference

 TStatusBar

Hierarchy	Properties	Methods	Events	Using TStatusBar	See also

TStatusBar represents a status bar.

Unit

ComCtrls

Description

The TStatusBar component is a row of panels, usually aligned at the bottom of a form, that display information about an application as it runs. Each panel is represented by a TStatusPanel object listed in the Panels property. The SimplePanel property can be used to toggle the status bar at runtime between a single- and multiple-panel display.


 VCL Reference

TStatusBar Properties

TStatusBar	Alphabetically	Legend

Derived from TCustomStatusBar

AutoHint

Canvas

Panels

Parent

SimplePanel

SimpleText

SizeGrip

UseSystemFont

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TStatusBar Properties

TStatusBar	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoHint

BiDiMode

BorderWidth

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Panels

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

SimplePanel

SimpleText

SizeGrip

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UseSystemFont

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TStatusBar Events

TStatusBar	Alphabetically	Legend

In TStatusBar

OnDrawPanel

Derived from TCustomStatusBar

OnCreatePanelClass

OnHint

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TStatusBar Events

TStatusBar	By Object	Legend

OnClick

OnContextPopup

OnCreatePanelClass

OnDblClick

OnDragDrop

OnDragOver

OnDrawPanel

OnEndDock

OnEndDrag

OnHint

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


TStatusBar.OnDrawPanel
 VCL Reference

TStatusBar.OnDrawPanel

TStatusBar	See also

Occurs when a status panel needs to be redrawn.

type TDrawPanelEvent = procedure(StatusBar: TStatusBar; Panel: TStatusPanel; const Rect: TRect) of object;

property OnDrawPanel: TDrawPanelEvent;

Description

The OnDrawPanel event occurs when a status panel needs to be redisplayed—for example, when the user resizes the status bar. The Rect parameter gives the (new) dimensions of the status panel. OnDrawPanel occurs only if the status panel’s Style property is set to psOwnerDraw.

TDrawPanelEvent is the type of the OnDrawPanel property.


TStatusBar.::OnPanelClick
 VCL Reference

TStatusBar.::OnPanelClick

TStatusBar	Events

Respond to click on panel.

TPanelClick = procedure(Sender: TObject; Panel: TStatusPanel) ofobject;

property OnPanelClick: TPanelClick;

Description

OnPanelClick occurs when the use clicks the mouse on the control, except for clicks on the control border or the panel separators. Panel refers to the panel clicked.

OnPanelClick occurs even if SimpleText is True.


 VCL Reference

TStatusBar methods

TStatusBar	Alphabetically	Legend

Derived from TCustomStatusBar

Create

Destroy

ExecuteAction

FlipChildren

SetBounds

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TStatusBar methods

TStatusBar	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassNameIs

ClassName

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Create

DestroyComponents

Destroying

Destroy

DisableAlign

Dispatch

DockDrop

Dock

DragDrop

Dragging

DrawTextBiDiModeFlagsReadingOnly

DrawTextBiDiModeFlags

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

FreeInstance

FreeNotification

FreeOnRelease

Free

GetControlsAlignment

GetInterfaceEntry

GetInterfaceTable

GetInterface

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstanceTObject_NewInstance>main

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

UpdateAction

UpdateControlState

Update

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TStatusBar.DrawPanel
 VCL Reference

TStatusBar.DrawPanel

TStatusBar 	See also

Draw owner-drawn panel.

procedure DrawPanel(Panel: TStatusPanel; const Rect: TRect); dynamic;

Description

DrawPanel is called automatically for each owner-drawn panel with the status bar is painted. Panel refers to the panel being drawn. Rect is the area allocated to the panel.

As implemented in TStatusBar, DrawPanel calls the OnDrawPanel event handler, if defined. If OnDrawPanel is not defined, DrawPanel fills the panel background with the status bar's background Color.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomStatusBar

TStatusBar


TTabControl
 VCL Reference

 TTabControl

Hierarchy	Properties	Methods	Events	Using TTabControl	See also	Example

TTabControl is a tab set that has the appearance of notebook dividers.

Unit

ComCtrls

Description

Use TTabControl to add a control with multiple tab settings to a form. Unlike a page control, TTabControl is not made up of several pages that contain different controls. Instead, TTabControl is a single object. When the current tab changes, the tab control must directly update its contents to reflect the change in an OnChange event handler.

Disabling a TTabControl object disables all tabs because it is one control. To disable individual tabs, use TPageControl and disable the individual TTabSheet controls that represent the pages.


 VCL Reference

TTabControl properties

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

Canvas

DisplayRect

HotTrack

Images

MultiLine

MultiSelect

OwnerDraw

RaggedRight

ScrollOpposite

Style

TabHeight

TabIndex

TabPosition

Tabs

TabWidth

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DockSite

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTabControl properties

TTabControl	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DisplayRect

DockClientCount

DockClients

DockOrientation

DockSite

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

HotTrack

Images

Left

LRDockWidth

MultiLine

MultiSelect

Name

Owner

OwnerDraw

Parent

ParentBiDiMode

ParentFont

ParentShowHint

ParentWindow

PopupMenu

RaggedRight

ScrollOpposite

ShowHint

Showing

Style

TabHeight

TabIndex

TabOrder

TabPosition

Tabs

TabStop

TabWidth

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TTabControl events

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

OnChange

OnChanging

OnDrawTab

OnGetImageIndex

Derived from TWinControl

OnDockDrop

OnDockOver

OnEnter

OnExit

OnGetSiteInfo

OnUnDock

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag


 VCL Reference

TTabControl events

TTabControl	By object	Legend

OnChange

OnChanging

OnContextPopup

OnDockDrop

OnDockOver

OnDragDrop

OnDragOver

OnDrawTab

OnEndDock

OnEndDrag

OnEnter

OnExit

OnGetImageIndex

OnGetSiteInfo

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDock

OnStartDrag

OnUnDock


 VCL Reference

TTabControl methods

TTabControl	Alphabetically	Legend

Derived from TCustomTabControl

Create

Destroy

GetHitTestInfoAt

IndexOfTabAt

RowCount

ScrollTabs

TabRect

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTabControl methods

TTabControl	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetHitTestInfoAt

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowCount

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TabRect

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTabControl

TTabControl


TTabbedNotebook
 VCL Reference

TTabbedNotebook

Hierarchy	Properties	Methods	Events

TTabbedNotebook contains multiple pages, each with its own set of controls.

Unit

Tabnotbk

Description

TTabbedNotebook is provided for backwards compatibility. New applications should use TPageControl instead.


 VCL Reference

TTabbedNotebook properties

TTabbedNotebook	Alphabetically	Legend

In TTabbedNotebook

ActivePage

PageIndex

Pages

TabFont

TabsPerRow

TopFont

Derived from TCustomTabControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Name

Owner

Tag

VCLComObject


 VCL Reference

TTabbedNotebook properties

TTabbedNotebook	By object	Legend

Action

ActivePage

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

PageIndex

Pages

Parent

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabFont

TabOrder

TabsPerRow

TabStop

Tag

TBDockHeight

Top

TopFont

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TTabbedNotebook.ActivePage
 VCL Reference

TTabbedNotebook.ActivePage

TTabbedNotebook	See also

Determines which page displays in the tabbed notebook control.

property ActivePage: string;

Description

The value of ActivePage must be one of the strings contained in the Pages property.

Note:	To indicate the page that appears in the tabbed notebook by index rather than text, use the PageIndex property instead.


TTabbedNotebook.PageIndex
 VCL Reference

TTabbedNotebook.PageIndex

TTabbedNotebook	See also

Determines which page displays in the tabbed notebook component.

property PageIndex: Integer;

Description

Changing the PageIndex value changes the page in the control.

Each string in the Pages property is automatically assigned a PageIndex value when the page is created. The first page receives a value of 0, the second has a value of 1, and so on. If you delete a string from the Pages property, the PageIndex values are reassigned so that the values always begin with 0 and continue to increase without any gaps between values.


TTabbedNotebook.Pages
 VCL Reference

TTabbedNotebook.Pages

TTabbedNotebook	See also

Contains the strings that identify the individual pages of the tabbed notebook control.

property Pages: TStrings;

Description

Tabbed notebook controls create a separate page for each string in the Pages property. For example, if Pages contains three strings, First, Second, and Third, the control has three separate pages.  Each string in Pages corresponds to a TTabPage object whose Caption property is the same as the string.

You can change the active page in a tabbed notebook control with either the ActivePage or PageIndex property.


TTabbedNotebook.TabFont
 VCL Reference

TTabbedNotebook.TabFont

TTabbedNotebook	See also

Determines the font used on the tabs of the tabbed notebook control.

property TabFont: TFont;

Description

Use TabFont to specify the font characteristics used to display the label on the tabs of the notebook.

Note:	The text on the selected tab is boldfaced if the selected font for the TabFont property is not also boldfaced.


TTabbedNotebook.TabsPerRow
 VCL Reference

TTabbedNotebook.TabsPerRow

TTabbedNotebook	See also

TabsPerRow is obsolete and retained only for backwards compatibility.

property TabsPerRow: Integer;

Description

The TabsPerRow property determines the number of tabs that can appear in a row at the top of the tabbed notebook control. If there are more tabbed pages in the control than can fit in one row, multiple rows are displayed. The number of tabs you specify affects the size of the tabs--the more tabs per row--the smaller the tabs.

TabsPerRow can’t be set to a value smaller than 3.


TTabbedNotebook.TopFont
 VCL Reference

TTabbedNotebook.TopFont

TTabbedNotebook	See also

Returns the current value of font used on the tabs of the tabbed notebook.

property TopFont: TFont;

Description

TopFont is a read-only property that reports the TabFont value.


 VCL Reference

TTabbedNotebook events

TTabbedNotebook	Alphabetically	Legend

In TTabbedNotebook

OnChange

OnClick

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup


 VCL Reference

TTabbedNotebook events

TTabbedNotebook	By object	Legend

OnChange

OnClick

OnContextPopup

OnEnter

OnExit


TTabbedNotebook.OnChange
 VCL Reference

TTabbedNotebook.OnChange

TTabbedNotebook	See also

Occurs when the page of a tabbed notebook changes.

type TPageChangeEvent = procedure(Sender: TObject; NewTab: Integer; var AllowChange: Boolean) of object;

property OnChange: TPageChangeEvent;

Description

Write an OnPage event handler to respond to a page change in a tabbed notebook. The NewTab parameter is the tab that is about to become the selected or current tab. The AllowChange parameter specifies whether the change to a new page is allowed. If AllowChange is set to False, a new page change doesn’t occur.


TTabbedNotebook.OnClick
 VCL Reference

TTabbedNotebook.OnClick

TTabbedNotebook	See also

Occurs when a tab of a tabbed notebook is selected.

property OnClick: TNotifyEvent;

Description

Write an OnClick event handler to respond when the user selects a tab in the tabbed notebook. Immediately after the OnClick event occurs, the OnChange event occurs.


 VCL Reference

TTabbedNotebook methods

TTabbedNotebook	Alphabetically	Legend

In TTabbedNotebook

Create

Destroy

GetIndexForPage

TabFontChanged

Derived from TCustomTabControl

GetHitTestInfoAt

IndexOfTabAt

RowCount

ScrollTabs

TabRect

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTabbedNotebook methods

TTabbedNotebook	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetHitTestInfoAt

GetIndexForPage

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

IndexOfTabAt

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

RowCount

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

ScrollTabs

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

TabFontChanged

TabRect

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TTabbedNotebook.Destroy
 VCL Reference

TTabbedNotebook.Destroy

TTabbedNotebook	See also

Destroys a tabbed notebook component.

destructor Destroy: override;

Description

Do not call Destroy directly in an application, Instead, use Free method, which checks that the notebook is not nil before calling Destroy.


TTabbedNotebook.GetIndexForPage
 VCL Reference

TTabbedNotebook.GetIndexForPage

TTabbedNotebook	See also

Returns the PageIndex value of the specified page.

function GetIndexForPage(const PageName: string): Integer;

Description

The PageIndex property value is determined by the page's position in the Pages property array. Specify the name of the page as the value of the PageName parameter. The name you specify must be one of the strings in the Pages property.


TTabbedNotebook.TabFontChanged
 VCL Reference

TTabbedNotebook.TabFontChanged

TTabbedNotebook	See also

Invalidates the tabs when the TabFont property changes.

procedure TabFontChanged(Sender: TObject);

Description

TabFontChanged is called automatically when the TabFont property changes. It invalidates the notebook so that the tabs are repainted in the new font.


TTabbedNotebook.Create
 VCL Reference

TTabbedNotebook.Create

TTabbedNotebook	See also

Constructs a tabbed notebook component.

constructor Create(AOwner: TComponent); override;

Description

Call CreateTTabbedNotebook indirectly, using the new keyword, to instantiate a tabbed notebook at runtime. Tabbed notebooks added to forms at design time are created automatically.

The AOwner parameter assigns a value to the notebook’s Owner property.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTabControl

TTabbedNotebook


TTabSet
 VCL Reference

 TTabSet

Hierarchy	Properties	Methods	Events

The TTabSet component presents horizontal tabs users can click to initiate actions.

Unit

Tabs

Description

Tab set controls are commonly used to display tabbed pages within a dialog box. TTabSet is provided for backward compatibility. Use TTabControl component in 32-bit Windows applications.

You create a set of tabs for the tab set control when you specify a list of strings as the value of the Tabs property. One tab is created for each string.

To determine which tab is currently selected or to use code to select a tab, use the TabIndex property. To find out which tab is the first visible tab in the tab set control or to make a tab the first visible tab, use the FirstIndex property.


 VCL Reference

TTabSet properties

TTabSet	Alphabetically	Legend

In TTabSet

AutoScroll

BackgroundColor

DitherBackground

EndMargin

FirstIndex

SelectedColor

SoftTop

StartMargin

Style

TabHeight

TabIndex

Tabs

UnselectedColor

VisibleTabs

Derived from TCustomControl

Canvas

Derived from TWinControl

AlignDisabled

Brush

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTabSet properties

TTabSet	By object	Legend

Action

Align

AlignDisabled

Anchors

AutoScroll

BackgroundColor

BiDiMode

BoundsRect

Brush

Canvas

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DitherBackground

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DragMode

Enabled

EndMargin

FirstIndex

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentShowHint

ParentWindow

PopupMenu

SelectedColor

ShowHint

Showing

SoftTop

StartMargin

Style

TabHeight

TabIndex

TabOrder

Tabs

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

UnselectedColor

VCLComObject

Visible

VisibleDockClientCount

VisibleTabs

Width

WindowProc


TTabSet.AutoScroll
 VCL Reference

TTabSet.AutoScroll

TTabSet	See also

Determines if scroll buttons automatically appear in a tab set control if there isn’t room in the control to display all the tabs.

property AutoScroll: Boolean;

Description

If AutoScroll is False, the application can still access tabs that aren’t visible by using the FirstIndex or TabIndex properties at design time or runtime, but the user can’t click on the tabs with the mouse at runtime.


TTabSet.BackgroundColor
 VCL Reference

TTabSet.BackgroundColor

TTabSet	See also

Determines the background color of the tab set control.

property BackgroundColor: TColor;

Description

Use BackgroundColor to indicate the color that the tab set control uses to paint the area between the tabs and the border of the control.


TTabSet.DitherBackground
 VCL Reference

TTabSet.DitherBackground

TTabSet	See also

Determines whether the background color set with the BackgroundColor property is dithered.

property DitherBackground: Boolean;

Description

Dithering means the background is lightened by 50%, which is intended to make the tabs easier to see. If DitherBackground is True, the tab set control background is dithered. If it is False, there is no dithering.


TTabSet.EndMargin
 VCL Reference

TTabSet.EndMargin

TTabSet	See also

Determines how far, in pixels, the rightmost tab appears from the right edge of the tab set control.

property EndMargin: Integer;

Description

EndMargin determines how far in pixels the rightmost tab appears from the right edge of the tab set control. Together with the StartMargin property, EndMargin can play a role in determining how many tabs can fit within the tab set control.

If AutoScroll is True and scroll buttons appear in the tab set control, EndMargin determines how far in pixels the rightmost tab appears from the left edge of the scroll buttons, rather than the edge of the tab set control.


TTabSet.FirstIndex
 VCL Reference

TTabSet.FirstIndex

TTabSet	See also

Specifies the tab that appears in the leftmost visible position in the tab set control.

property FirstIndex: Integer;

Description

Any tabs with a lower value in the FirstIndex property scroll to the left in the tab set control and don’t appear until the user scrolls the tabs.

The default value of FirstIndex is 0 indicating that the tab with an index of 0 is in the leftmost position. For example, if you have three tabs labeled First, Second, and Third with TabIndex values of 0, 1, and 2, respectively, First appears first, by default, because it has an index value of 0. If you want to shift the tabs so the Second or Third tab appears leftmost in the tab set control, change the FirstIndex value to 1 or 2.


TTabSet.SelectedColor
 VCL Reference

TTabSet.SelectedColor

TTabSet	See also

Determines the color of the selected tab in the tab set control.

property SelectedColor: TColor;

Description

SelectedColor determines the color of the selected tab in the tab set control.


TTabSet.SoftTop
 VCL Reference

TTabSet.SoftTop

TTabSet

Specifies whether a line appears at the edge of the tab set, setting off the non-current tabs.

property SoftTop: Boolean;

Description

When SoftTop is False (the default), a line appears at the edge of the non-current tabs. When SoftTop is True, this line is not drawn, softening the border of the tab set.


TTabSet.StartMargin
 VCL Reference

TTabSet.StartMargin

TTabSet	See also

Determines how far, in pixels, the first tab appears from the left edge of the tab set control.

property StartMargin: Integer;

Description

Together with the EndMargin property, StartMargin determines how many tabs fit in the tab set control.


TTabSet.Style
 VCL Reference

TTabSet.Style

TTabSet	See also

Determines whether the tab set is owner-drawn.

type TTabStyle = (tsStandard, tsOwnerDraw);

property Style: TTabStyle;

Description

Use Style to indicate whether the control has owner-drawn tabs. These are the possible values:

Value	Meaning

tsStandard	Each tab has the standard size and look.

tsOwnerDraw	Each tab has the height specified with the TabHeight property and width needed to hold the text or glyph.

Owner-draw tabs can display objects other than strings, such as graphical images. Owner-draw tabs require more programming, however, because the application needs information on how to render the image for each tab in the tab set control.

Each time an item is displayed in an owner-drawn tab, two events occur. The first is the OnMeasureTab event. In the OnMeasureTab event handler, you write the code that calculates the width of the tab needed to hold the text or graphical image. After the OnMeasureTab event, the OnDrawTab event occurs. The code you write for the OnDrawTab event draws the tab and its contents using the width found with the OnMeasureTab event and the height specified as the value of the TabHeight property.

Note:	The TTabStyle type defined in the tabs unit for the Style property differs from the TTabStyle type defined in the comctrls unit. Do not to use the comctrls unit in source files where you are working with the tab control. Doing so can lead to compiler errors because of type mismatches.


TTabSet.TabHeight
 VCL Reference

TTabSet.TabHeight

TTabSet	See also

Determines the height of the tabs in an owner-drawn tab set control.

property TabHeight: Integer;

Description

If the Style property value is tsStandard, the TabHeight property value is ignored. If the Style property value is tsOwnerDraw, TabHeight is the height of the tabs.


TTabSet.TabIndex
 VCL Reference

TTabSet.TabIndex

TTabSet	See also

Determines which tab of a tab set control is currently selected.

property TabIndex: Integer;

Description

The value of TabIndex can be from –1 to one less than the number of strings in the Tabs property array (Count – 1). TabIndex is an index to the Tabs array property: A value of 0 indicates the first tab in the tab set control, 1 is the second tab, and so on. If no tabs are selected, TabIndex has a value of –1.

When a value is assigned to TabIndex, the OnClick event for the tab set occurs, followed by the OnChange event, just as if the user had clicked on a new tab.


TTabSet.Tabs
 VCL Reference

TTabSet.Tabs

TTabSet	See also

Contains the list of text strings that appear on the tabs.

property Tabs: TStrings;

Description

For each string in the Tabs property, a new tab is created to display the text string. At design time, you enter the text strings you want to appear on the tabs using the String List editor. Double-click the value column of the Tabs property to display the String List editor. You can also change strings in the Tabs property at runtime.


TTabSet.UnselectedColor
 VCL Reference

TTabSet.UnselectedColor

TTabSet	See also

Determines the color of the tabs that aren’t currently selected in the tab set control.

property UnselectedColor: TColor;

Description

UnselectedColor determines the color of the tabs that aren’t currently selected in the tab set control.


TTabSet.VisibleTabs
 VCL Reference

TTabSet.VisibleTabs

TTabSet	See also

Contains the number of tabs currently visible in the tab set control.

property VisibleTabs: Integer;

Description

Use VisibleTabs to determine how many tabs are visible in the tab set.


 VCL Reference

TTabSet events

TTabSet	Alphabetically	Legend

In TTabSet

OnChange

OnDrawTab

OnMeasureTab

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TTabSet events

TTabSet	By object	Legend

OnChange

OnClick

OnDragDrop

OnDragOver

OnDrawTab

OnEndDock

OnEndDrag

OnEnter

OnExit

OnMeasureTab

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


TTabSet.OnChange
 VCL Reference

TTabSet.OnChange

TTabSet

Occurs just before a new tab is selected.

type TTabChangeEvent = procedure(Sender: TObject; NewTab: Integer; var AllowChange: Boolean) of object;

property OnChange: TTabChangeEvent;

Description

OnChange occurs just as the TabIndex value is about to change. To prevent the TabIndex value from changing, set AllowChange to False in the OnChange event handler.

The TTabChangeEvent type points to a method that is called when the selected tab is about to change in a tab set control. The NewTab parameter is the tab that is about to become the selected tab. The AllowChange variable determines whether the change is permitted. If AllowChange is False, the user won’t be able to select the new tab, in effect disabling it.


TTabSet.OnDrawTab
 VCL Reference

TTabSet.OnDrawTab

TTabSet	See also

Occurs when a tab in an owner-drawn tab set control needs to redisplay.

type TDrawTabEvent = procedure(Sender: TObject; TabCanvas: TCanvas; R: TRect; Index: Integer; Selected: Boolean) of object;

property OnDrawTab: TDrawTabEvent;

Description

OnDrawTab occurs when a tab redisplays if the Style property value is tsOwnerDraw. For example, it happens when the user selects a tab or scrolls the tabs.

You must write the code in the OnDrawTab event handler to draw the tab.

OnDrawTab occurs just after the OnMeasureTab event, which contains the code to calculate the width of the tab needed. The height of the tab is determined by the value of the TabHeight property of the tab set control. The code you write in the OnDrawTab event handler, therefore, must use the width determined with the OnMeasureTab event to draw the tab.

The TDrawTabEvent type points to a method that handles the drawing of an item in an owner-draw tab. The TabCanvas parameter is the canvas on which the item is drawn, the Index parameter is the position of the tab in the tab set control, R is the area in the tab where the item is to be drawn, and Selected indicates whether the tab is currently selected.

Note:	The TDrawTabEvent type defined in the tabs unit for the OnDrawTab event handler differs from the TDrawTabEvent type defined in the comctrls unit. Do not to use the comctrls unit in source files where you are working with the tab control.


TTabSet.OnMeasureTab
 VCL Reference

TTabSet.OnMeasureTab

TTabSet	See also

Occurs when an application needs to redisplay a tab in an owner-draw tab set.

type TMeasureTabEvent = procedure(Sender: TObject; Index: Integer; var TabWidth: Integer) of object;

property OnMeasureTab: TMeasureTabEvent;

Description

OnMeasureTab occurs only if the Style property is tsOwnerDraw. In the OwnerMeasureTab event handler, write the code to calculate the width needed to draw the tab. After the OnMeasureTab event occurs, the OnDrawTab event occurs, when the OnDrawTab event handler draws the tab using the width calculated in OnMeasureTab.

The TMeasureTabEvent type points to a method that handles the measuring of a tab in an owner-draw tab set control. Your code is responsible for calculating and returning the tab width, depending on what you have drawn in the tab (if the tab is of Style tsOwnerDraw). The Index parameter identifies the position of the tab in the tab set control and TabWidth is the width of the tab.


 VCL Reference

TTabSet methods

TTabSet	Alphabetically	Legend

In TTabSet

Create

Destroy

ItemAtPos

ItemRect

SelectNext

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTabSet methods

TTabSet	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ItemAtPos

ItemRect

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SelectNext

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TTabSet.Destroy
 VCL Reference

TTabSet.Destroy

TTabSet	See also

Frees the memory associated with the TTabSet object.

destructor Destroy; override;

Description

Do not call Destroy directly. Instead, use the Free method, which checks that the tab set is not nil before calling Destroy.Destroy frees the TTabList object that holds the list of tabs.


TTabSet.ItemAtPos
 VCL Reference

TTabSet.ItemAtPos

TTabSet	See also

Returns the index of the tab indicated by the coordinates of a point on the control.

function ItemAtPos(Pos: TPoint): Integer;

Description

Call ItemAtPos to identify the tab under the point specified by the Pos parameter. Pos is the point in the control in client coordinates. If the returned index is 0, the tab is the first tab in the tab set, if the index is 1, the tab is the second tab, and so on. ItemAtPos returns –1 if there is no tab at the specified point.


TTabSet.ItemRect
 VCL Reference

TTabSet.ItemRect

TTabSet	See also

Returns the rectangle that surrounds the item specified in the Item parameter.

function ItemRect(Item: Integer): TRect;

Description

Use ItemRect to obtain the rectangle that surrounds the tab when you are drawing on an owner-draw tab set.


TTabSet.SelectNext
 VCL Reference

TTabSet.SelectNext

TTabSet	See also

Selects the next tab in a tab set control, scrolling if necessary to bring the selected tab into view.

procedure SelectNext(Direction: Boolean);

Description

The value of the Direction parameters determines if the tab to the left or right is selected. If Direction is True, the tab to the right is selected. If Direction is False, the tab to the left is selected. When the last tab in either direction is selected, calling SelectNext using the same direction wraps around to the beginning of the tab order. For example, if your application has three tabs, First, Second, and Third, and Third is the current tab, calling SelectNext(True) selects First. Likewise, if First is the current tab, SelectNext(False) selects Third.

When SelectNext is called, the OnClick event of the tab set occurs, followed by the OnChange event, just as if the user had clicked on a new tab.


TTabSet.Create
 VCL Reference

TTabSet.Create

TTabSet	See also

Constructs a tab set control.

constructor Create(AOwner: TComponent); override;

Description

Create sets the initial values of the control, including creating a TTabList object that holds the list of tabs for the control. The AOwner parameter specifies the component (usually a form) that is responsible for freeing the tab set.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TTabSet


TTabSheet
 VCL Reference

TTabSheet

Hierarchy	Properties	Methods	Events	See also

TTabSheet is an individual page in a TPageControl object.

Unit

ComCtrls

Description

Use TTabSheet to represent a single page in a tabbed page control. Tab sheets are typically referred to as pages. TPageControl maintains an indexed array of its tab sheets in its Pages property. Users can click on a tab to activate the tab sheet.


 VCL Reference

TTabSheet Properties

TTabSheet	Alphabetically	Legend

In TTabSheet

Highlighted

ImageIndex

PageControl

PageIndex

TabIndex

TabVisible

Derived from TWinControl

AlignDisabled

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

Caption

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTabSheet Properties

TTabSheet	By Object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BorderWidth

BoundsRect

Brush

Caption

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragMode

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

Highlighted

Hint

HostDockSite

ImageIndex

Left

LRDockWidth

Name

Owner

PageControl

PageIndex

Parent

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ShowHint

Showing

TabIndex

TabOrder

TabStop

TabVisible

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TTabSheet.Highlighted
 VCL Reference

TTabSheet.Highlighted

TTabSheet	See also

Indicates whether the tab sheet appears highlighted.

property Highlighted: Boolean;

Description

Use Highlighted to make a tab sheet stand out visually. When Highlighted is True, the tab sheet is drawn using a highlight color so that it stands out visually from other tab sheets.

Note:	Highlighted is not linked to the active page of the host page control. A page control can have only one active page, but can have multiple highlighted pages.


TTabSheet.ImageIndex
 VCL Reference

TTabSheet.ImageIndex

TTabSheet	See also

Specifies an image for the tab.

property ImageIndex: TImageIndex;

Description

Use ImageIndex to get or set the index of an image to be drawn in the tab. This index identifies an image from the Images property of the page control that contains the tab sheet. Specify -1 to prevent an image from being drawn.


TTabSheet.PageControl
 VCL Reference

TTabSheet.PageControl

TTabSheet	Example

Indicates the page control object that contains the tab sheet.

property PageControl: TPageControl;

Description

Read PageControl to gain access to the page control object that uses the tab sheet. The properties and methods of the PageControl object can be used to locate the selected page, iterate through the other pages in the page control, or change the display properties of the tabs.

Set PageControl to remove the tab sheet from its current page control (if any) and insert it into a new page control.


TTabSheet.PageIndex
 VCL Reference

TTabSheet.PageIndex

TTabSheet	See also	Example

Indicates the index of the tab sheet in the list of tab sheets maintained by the page control.

property PageIndex: Integer;

Description

Use PageIndex to determine where the tab sheet sits in its page control. Each tab sheet in a page control is automatically assigned a PageIndex when it is inserted in the page control. The first tab sheet receives a value of 0, the second has a value of 1, and so on. PageIndex values are reassigned if tab sheets are deleted or moved.

To access a particular tab sheet given its index value, use the indexed Pages property of the TPageControl object.


TTabSheet.TabIndex
 VCL Reference

TTabSheet.TabIndex

TTabSheet	See also

Indicates the position of the tab sheet in the set of visible tabs in a TPageControl object.

property TabIndex: Integer;

Description

Read TabIndex to determine where the user sees the tab sheet. A value of 0 indicates the first visible tab sheet, a value of 1 indicates the second visible tab sheet, and so on. TabIndex is always less than or equal to PageIndex. For example, a tab sheet that has a PageIndex of 3 will have a TabIndex of 2 if one of the previous tab sheets in the page control is not visible.

If a tab sheet's TabVisible property is False, the TabIndex property is -1.


TTabSheet.TabVisible
 VCL Reference

TTabSheet.TabVisible

TTabSheet	See also	Example

Specifies whether the tab of the TTabSheet object appears in its TPageControl.

property TabVisible Boolean;

Description

Use TabVisible to temporarily remove a tab sheet from a page control. When TabVisible is False, the tab does not appear in the page control and its TabIndex property is -1. Setting TabVisible to True allows the user to see the tab of the tab sheet again.


 VCL Reference

TTabSheet Events

TTabSheet	Alphabetically	Legend

In TTabSheet

OnHide

OnShow

Derived from TWinControl

OnEnter

OnExit

Derived from TControl

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnStartDrag


 VCL Reference

TTabSheet Events

TTabSheet	By Object	Legend

OnContextPopup

OnDragDrop

OnDragOver

OnEndDrag

OnEnter

OnExit

OnHide

OnMouseDown

OnMouseMove

OnMouseUp

OnResize

OnShow

OnStartDrag


TTabSheet.OnHide
 VCL Reference

TTabSheet.OnHide

TTabSheet	See also

Occurs when the TabVisible property changes to False.

property OnHide: TNotifyEvent;

Description

Write an OnHide event handler to take specific action when the tab sheet is temporarily removed from its page control.


TTabSheet.OnShow
 VCL Reference

TTabSheet.OnShow

TTabSheet	See also

Occurs when the TabVisible property changes to True.

property OnShow: TNotifyEvent;

Description

Write an OnShow event handler to take specific action when the tab sheet appears in its page control after being temporarily hidden.


 VCL Reference

TTabSheet Methods

TTabSheet	Alphabetically	Legend

In TTabSheet

Create

CreateParams

Destroy

DoHide

DoShow

ReadState

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTabSheet Methods

TTabSheet	By Object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParams

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DoHide

DoShow

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

ReadState

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TTabSheet.Create
 VCL Reference

TTabSheet.Create

TTabSheet	See also	Example

Creates and initializes an instance of TTabSheet.

constructor Create(AOwner: TComponent); override;

Description

Call Create to instantiate a tab sheet at runtime. Tab sheets added to a page control at design time are created automatically.

Create calls the inherited Create method, then sets the initial values for the tab sheet component.

When creating tab sheets at runtime, use the PageControl property to insert them into a page control object.


TTabSheet.Destroy
 VCL Reference

TTabSheet.Destroy

TTabSheet	See also

Destroys an instance of TTabSheet.

destructor Destroy; override;

Description

Do not call Destroy directly at runtime. Instead, call Free. Free verifies that the tab sheet is not nil and only then calls Destroy. Destroy removes the tab sheet from the page control and then calls the inherited Destroy method.


TTabSheet.::CreateParams
 VCL Reference

TTabSheet.CreateParams

TTabSheet	See also

Initializes window-creation parameters for the tab sheet.

procedure CreateParams(var Params: TCreateParams); override;

Description

The tab sheet calls CreateParams internally when the tab sheet must be generated. CreateParams overrides the inherited method to specify the type of window for the tab sheet.


TTabSheet.DoHide
 VCL Reference

TTabSheet.DoHide

TTabSheet	See also

Generates an OnHide event.

procedure DoHide; dynamic;

Description

DoHide is called automatically when the TabVisible property changes to True. Override DoHide in a derived class to perform class-specific actions when the tab sheet is temporarily removed from its page control, or to block the OnHide event.


TTabSheet.DoShow
 VCL Reference

TTabSheet.DoShow

TTabSheet	See also

Generates an OnShow event.

procedure DoShow; dynamic;

Description

DoShow is called automatically when the TabVisible property changes to False. Override DoShow in a derived class to perform class-specific actions when the tab sheet appears in its page control after being temporarily hidden, or to block the OnHide event.


TTabSheet.ReadState
 VCL Reference

TTabSheet.ReadState

TTabSheet	See Also

Prepare control to be initialized from a stream.

procedure ReadState(Reader: TReader); override;

Description

TTabSheet reimplements in order to assign Reader's parent as the Tab Sheet's parent.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TTabSheet


TToolWindow
 VCL Reference

TToolWindow

Hierarchy	Properties	Methods	See also

TToolWindow is the ancestor for windowed controls that require a custom client area and edge borders.

Unit

ToolWin

Description

TToolWindow is the ancestor of the TCoolBar and TToolBar components, which facilitate the arrangement of buttons and other visual controls.


 VCL Reference

TToolWindow properties

TToolWindow	Alphabetically	Legend

In TToolWindow

EdgeBorders

EdgeInner

EdgeOuter

Derived from TWinControl

AlignDisabled

Brush

ClientOrigin

ClientRect

ControlCount

Controls

DockClientCount

DockClients

DoubleBuffered

Handle

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

Enabled

Floating

FloatingDockSiteClass

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TToolWindow properties

TToolWindow	By object	Legend

Action

Align

AlignDisabled

Anchors

BiDiMode

BoundsRect

Brush

ClientHeight

ClientOrigin

ClientRect

ClientWidth

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

EdgeBorders

EdgeInner

EdgeOuter

Enabled

Floating

FloatingDockSiteClass

Handle

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Owner

Parent

ParentWindow

ShowHint

Showing

TabOrder

TabStop

Tag

TBDockHeight

Top

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


TToolWindow.EdgeBorders
 VCL Reference

TToolWindow.EdgeBorders

TToolWindow	See also

Determines which sides of the control have visible borders.

property EdgeBorders: TEdgeBorders;

Description

Use the EdgeBorders property to add or remove borders. The appearance of the borders can be set with the EdgeInner and EdgeOuter properties.


TToolWindow.EdgeInner
 VCL Reference

TToolWindow.EdgeInner

TToolWindow	See also

Determines the border style for the control’s inner edge.

property EdgeInner: TEdgeStyle;

Description

Use EdgeInner to provide the tool window with a three-dimensional beveled look. A tool window has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. EdgeInner specifies the appearance of the inner border. It can be raised (esRaised), lowered (esLowered), or left off altogether (esNone).

Note:	The EdgeInner property has an effect only on the sides specified by the EdgeBorders property.

Use EdgeInner with EdgeOuter to give the component a three-dimensional look.


TToolWindow.EdgeOuter
 VCL Reference

TToolWindow.EdgeOuter

TToolWindow	See also

Determines the border style for the control’s outer edge.

property EdgeOuter: TEdgeStyle;

Description

Use EdgeOuter to provide the tool window with a three-dimensional beveled look. A tool window has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. EdgeOuter specifies the appearance of the outer border. It can be raised (esRaised), lowered (esLowered), or left off altogether (esNone).

Note:	The EdgeInner property has an effect only on the sides specified by the EdgeBorders property.

Use EdgeOuter with EdgeInner to give the component a three-dimensional look.


 VCL Reference

TToolWindow methods

TToolWindow	Alphabetically	Legend

In TToolWindow

Create

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

Destroy

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetTextBuf

GetTextLen

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

GetParentComponent

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TToolWindow methods

TToolWindow	By object	Legend

AfterConstruction

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

DefaultHandler

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

GetControlsAlignment

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsImplementorOf

IsRightToLeft

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

ScaleBy

ScreenToClient

ScrollBy

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


TToolWindow.Create
 VCL Reference

TToolWindow.Create

TToolWindow

Creates and initializes a TToolWindow instance.

constructor Create(AOwner: TComponent); override;

Description

Create generates a TToolWindow and initializes its properties.


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TToolWindow


TTreeNode
 VCL Reference

TTreeNode

Hierarchy	Properties	Methods	See also

TTreeNode describes an individual node in a tree view control.

Unit

ComCtrls

Description

Each node in a tree view control consists of a label and an optional bitmapped image. Each item can be the parent of a list of subitems. By clicking an item, the user can expand or collapse the associated list of subitems.


 VCL Reference

TTreeNode Properties

TTreeNode	Alphabetically	Legend

In TTreeNode

AbsoluteIndex

Count

Cut

Data

Deleting

DropTarget

Expanded

Focused

Handle

HasChildren

ImageIndex

Index

IsVisible

Item

ItemId

Level

OverlayIndex

Owner

Parent

Selected

SelectedIndex

StateIndex

Text

TreeView


 VCL Reference

TTreeNode Properties

TTreeNode	By Object	Legend

AbsoluteIndex

Count

Cut

Data

Deleting

DropTarget

Expanded

Focused

Handle

HasChildren

ImageIndex

Index

IsVisible

Item

ItemId

Level

OverlayIndex

Owner

Parent

Selected

SelectedIndex

StateIndex

Text

TreeView


TTreeNode.AbsoluteIndex
 VCL Reference

TTreeNode.AbsoluteIndex

TTreeNode	See also

Indicates the index of the tree node relative to the first tree node in a tree node.

property AbsoluteIndex: Integer;

Description

Use AbsoluteIndex to determine absolute position of a node in a tree nodes object. The first tree node in a tree nodes object has an index of 0 and subsequent nodes are numbered sequentially. If a node has any children, its AbsoluteIndex is one less than the index of its first child.


TTreeNode.Count
 VCL Reference

TTreeNode.Count

TTreeNode	See also

Indicates the number of direct descendants of a tree node.

property Count: Integer;

Description

Use Count to determine how many child nodes belong to a tree node. Count includes only immediate children, and not their descendants. Count can be useful when iterating through the children of a tree node.


TTreeNode.Cut
 VCL Reference

TTreeNode.Cut

TTreeNode	See also

Indicates if the tree node object is drawn as if selected as part of a cut and paste operation.

property Cut: Boolean;

Description

Use Cut to alter the appearance of the tree node when it is selected as part of a cut and paste operation.


TTreeNode.Data
 VCL Reference

TTreeNode.Data

TTreeNode	Example

Points to application-defined data associated with the tree node.

property Data: Pointer;

Description

Use the Data property to associate data with a tree node. Data allows applications to quickly access information about the entity represented by the node.


TTreeNode.Deleting
 VCL Reference

TTreeNode.Deleting

TTreeNode	See also

Indicates whether a node's Destroy method has been called and the node is in the process of being deleted.

property Deleting: Boolean;

Description

Deleting returns True  if the node object is in the process of being deleted. Use Deleting to prevent infinite recursion in event handlers.


TTreeNode.DropTarget
 VCL Reference

TTreeNode.DropTarget

TTreeNode	See also

Indicates whether the tree node is drawn as a drag and drop target.

property DropTarget: Boolean;

Description

Use DropTarget to indicate that the node is a drag and drop target. When DropTarget is True, the node is drawn in a style used to indicate a drag and drop target.

Note:	Setting DropTarget to True does cause the node to automatically accept dragged objects when they are released. The application must still implement the drop behavior.


TTreeNode.Expanded
 VCL Reference

TTreeNode.Expanded

TTreeNode	See also

Specifies whether the tree node is expanded.

property Expanded: Boolean;

Description

When a tree node is expanded, the minus button is shown if the ShowButtons property of the tree view is True and child nodes are displayed. Set Expanded to True to display the children of a node. Set Expanded to False to collapse the node, hiding all of its descendants.


TTreeNode.Focused
 VCL Reference

TTreeNode.Focused

TTreeNode	See also

Indicates whether the node appears to have focus.

property Focused: Boolean;

Description

Tree view nodes are not windowed controls and so can’t receive input focus. However, they can be edited by the user when the tree view control has focus. When Focused is True, the node is surrounded by a standard focus rectangle and the user can edit the label. Use Focused to determine if a particular node in a tree view can currently be edited by the user.


TTreeNode.Handle
 VCL Reference

TTreeNode.Handle

TTreeNode	See also

Contains the window Handle of the tree view that contains the node.

property Handle: HWND;

Description

Use Handle to obtain the handle of the tree view that owns the node. This handle can be passed as a parameter to Windows API function calls that require a handle to the tree view.


TTreeNode.HasChildren
 VCL Reference

TTreeNode.HasChildren

TTreeNode	See also

Indicates whether a node has any children.

property HasChildren: Boolean;

Description

HasChildren is True if the node has subnodes, or False if the node has no subnodes. If ShowButtons of the tree view is True, and HasChildren is True, a plus (+) button will appear to the left of the node when it is collapsed, and a minus (-) button will appear when the node is expanded.

Note:	If a node has no children, setting HasChildren to True will show a (+) plus button, but will not add any child nodes and the node cannot be expanded.


TTreeNode.ImageIndex
 VCL Reference

TTreeNode.ImageIndex

TTreeNode	See also

Specifies which image is displayed when a node is in its normal state and is not currently selected.

property ImageIndex: TImageIndex;

Description

Use the ImageIndex property with the Images property of the tree view to specify the image for the node in its normal state.


TTreeNode.Index
 VCL Reference

TTreeNode.Index

TTreeNode	See also

Specifies the position of the node in the list of child nodes maintained by its parent node.

property Index: Longint;

Description

Use Index to determine the position of the node relative to its sibling nodes. The first child of the parent node has an Index value of 0, and subsequent children are indexed sequentially.


TTreeNode.IsFirstNode
 VCL Reference

TTreeNode.IsFirstNode

TTreeNode	See also

Indicates whether the tree node is very first.

property IsFirstNode: Boolean;

Description

IsFirstNode returns True for the first node, with no parent node or previous sibling.


TTreeNode.IsVisible
 VCL Reference

TTreeNode.IsVisible

TTreeNode	See also

Indicates whether the tree node is currently visible in the tree view image.

property IsVisible: Boolean;

Description

A node is visible if it is on level 0 or if all its parents are expanded. IsVisible indicates whether the node is part of the current tree view image. It does not indicate whether or not the node is scrolled into view when the tree view image is larger than the size of the tree view control.


TTreeNode.Item
 VCL Reference

TTreeNode.Item

TTreeNode	See also 	Example

Provides access to a child node by its position in the list of child nodes.

property Item[Index: Integer]: TTreeNode;

Description

Use Item to access a child node based on its Index property. The first child node has an index of 0, the second an index of 1, and so on.


TTreeNode.ItemId
 VCL Reference

TTreeNode.ItemId

TTreeNode	See also

Contains a handle that uniquely identifies each node in a tree view.

property ItemId: HTreeItem;

Description

Use this property to reference the nodes when making Windows API calls or calling the GetNode method of the TTreeNodes that owns the item.


TTreeNode.Level
 VCL Reference

TTreeNode.Level

TTreeNode	See also	Example

Indicates the level of indentation of a node within the tree view control.

property Level: Integer;

Description

The value of Level is 0 for nodes on the top level. The value of Level is 1 for their children, and so on.


TTreeNode.OverlayIndex
 VCL Reference

TTreeNode.OverlayIndex

TTreeNode	See also

Determines which image from the image list is used as an overlay mask.

property OverlayIndex: Integer;

Description

An overlay mask is an image drawn transparently over another image in the tree view. For example, to indicate that a node is no longer available, use an overlay image that puts an X over the current node's image.


TTreeNode.Owner
 VCL Reference

TTreeNode.Owner

TTreeNode	See also

Indicates which tree nodes object contains the tree node.

property Owner: TTreeNodes;

Description

Use the Owner property to determine the owner of the tree node. Do not confuse Owner with the TreeView property. Owner is the list of nodes used by the tree view to manage its nodes. The TreeView property is the tree view that uses that list.


TTreeNode.Parent
 VCL Reference

TTreeNode.Parent

TTreeNode	See also 	Example

Identifies the parent node of the tree node.

property Parent: TTreeNode;

Description

A Parent node is one level higher than the node and contains the node as a subnode.


TTreeNode.Selected
 VCL Reference

TTreeNode.Selected

TTreeNode	See also

Determines whether the node is selected.

property Selected: Boolean;

Description

Set Selected to True to select the node. The appearance of a selected node depends on whether it has the focus and on whether the system colors are used for selection. When a node becomes selected, the tree view's OnChanging and OnChanged events are triggered.


TTreeNode.SelectedIndex
 VCL Reference

TTreeNode.SelectedIndex

TTreeNode	See also

Specifies the index in the tree view’s image list of the image displayed for the node when it is selected.

property SelectedIndex: Integer;

Description

Use the SelectedIndex property to specify an image to display when the tree node is selected.


TTreeNode.StateIndex
 VCL Reference

TTreeNode.StateIndex

TTreeNode	See also

Indicates which image from the StateImages list to display for the node.

property StateIndex: Integer;

Description

Use StateIndex to display an additional image for the node that reflects state information. If StateIndex is -1 then no state image is drawn.


TTreeNode.Text
 VCL Reference

TTreeNode.Text

TTreeNode	See also

Specifies the label that identifies a tree node.

property Text: string;

Description

Use Text to specify the string that is displayed in the tree view. The value of Text can be assigned directly at run-time or can be set within the TreeView Items Editor while modifying the Items property of the TTreeView component. If the tree view allows users to edit its nodes, read Text to determine the value given the node by the user.


TTreeNode.TreeView
 VCL Reference

TTreeNode.TreeView

TTreeNode	See also

Specifies the tree view that displays the node.

property TreeView: TCustomTreeView;

Description

Use TreeView to determine the tree view associated with the tree node.


 VCL Reference

TTreeNode Methods

TTreeNode	Alphabetically	Legend

In TTreeNode

AlphaSort

Assign

Collapse

Create

CustomSort

Delete

DeleteChildren

Destroy

DisplayRect

EditText

EndEdit

Expand

getFirstChild

GetHandle

GetLastChild

GetNext

GetNextChild

getNextSibling

GetNextVisible

GetPrev

GetPrevChild

getPrevSibling

GetPrevVisible

HasAsParent

IndexOf

IsFirstNode

MakeVisible

MoveTo

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TTreeNode Methods

TTreeNode	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Collapse

Create

CustomSort

DefaultHandler

Delete

DeleteChildren

Destroy

Dispatch

DisplayRect

EditText

EndEdit

Expand

FieldAddress

Free

FreeInstance

getFirstChild

GetHandle

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetLastChild

GetNamePath

GetNext

GetNextChild

getNextSibling

GetNextVisible

GetPrev

GetPrevChild

getPrevSibling

GetPrevVisible

HasAsParent

IndexOf

InheritsFrom

InitInstance

InstanceSize

IsFirstNode

MakeVisible

MethodAddress

MethodName

MoveTo

NewInstance

SafeCallException


TTreeNode.AlphaSort
 VCL Reference

TTreeNode.AlphaSort

TTreeNode	See also

Sorts tree nodes.

function AlphaSort(ARecurse: Boolean = False): Boolean;

Description

AlphaSort triggers node sorting or resorting of the node’s child nodes. If an OnCompare event handler is defined for the associated TCustomTreeView, that routine determines sort order. If no OnCompare handler is defined, nodes are sorted by a simple case-sensitive compare of their captions.

The optional ARecurse parameter (default False)specifies that sorting should recursively descend the node tree and sort each subtree in turn. By default, only the node’s immediate children are sorted.

Calling AlphaSort is equivalent to calling CustomSort with a Nil procedure parameter and a data parameter of 0.

To sort the top-level nodes, use TTreeNodes.AlphaSort.


TTreeNode.Assign
 VCL Reference

TTreeNode.Assign

TTreeNode	See also

Copies the properties of another tree view node.

procedure Assign(Source: TPersistent); override;

Description

If the Source parameter is a TTreeNode object, Assign copies the Text, Data, ImageIndex, SelectedIndex, OverlayIndex, Focused, DropTarget, Cut, and HasChildren properties from the source node. If Source is any other type of object, Assign calls its inherited method, which copies information from any object that can copy to a tree node in its AssignTo method.

Note:	While Assign copies the HasChildren property, it does not copy the child nodes. Be sure to copy any descendants after assigning the properties of another node that has children.


TTreeNode.Collapse
 VCL Reference

TTreeNode.Collapse

TTreeNode	See also

Collapses a node.

procedure Collapse(Recurse: Boolean);

Description

When a node is collapsed, all of its subnodes are hidden. The plus button may be displayed, depending on whether the tree view's ShowButtons property is set. If Recurse is True, then all subnodes will be collapsed as well. When the node is next expanded the children will still be collapsed. If Recurse is False, the child nodes won't be collapsed and the next time the node is expanded, the children will be in the same state as when Collapse was called.


TTreeNode.Create
 VCL Reference

TTreeNode.Create

TTreeNode	See also

Creates an instance of TTreeNode.

constructor Create(AOwner: TTreeNodes);

Description

Call Create to instantiate a tree node at runtime. Nodes added to a tree view control at design time are created automatically. Use the methods of the TTreeNodes object instead to create nodes as part of an existing tree view.

After calling the inherited constructor, Create sets the OverlayIndex and StateIndex properties to -1 and then sets the Owner property of the tree node to the AOwner TTreeNodes object.


TTreeNode.CustomSort
 VCL Reference

TTreeNode.CustomSort

TTreeNode	See also 	Example

Triggers node sorting.

function CustomSort(SortProc: TTVCompare; Data: Longint; ARecurse: Boolean = False): Boolean;

Description

CustomSort triggers node sorting or resorting of the node’s child nodes, using a comparison routine indicated by the SortProc parameter. The Data parameter is passed to the comparison routine. The optional ARecurse parameter (default False) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

If SortProc is Nil, a default comparison routine is used. The default routine uses the OnCompare event handler for the associated TCustomTreeview object, if defined. If the OnCompare event handler is not defined, the default routine uses a simple case-sensitive compare of node captions.

In the comparison routine, the lParam1 and lParam2 parameters refer to two nodes when cast to TTreeNode. The lParamSort parameter is the value previously passed to the Data parameter of CustomSort. The return value of the comparison routine indicates the relative sort order of IParam1 and IParam2:

Return Value	Meaning
< 0	IParam1 comes before IParam2
0	IParam1 and IParam2 are equivalent
> 0	IParam2 comes before IParam1
To sort the top-level nodes, use TTreeNodes.CustomSort


TTreeNode.Delete
 VCL Reference

TTreeNode.Delete

TTreeNode	See also

Destroys the node and all its children.

procedure Delete;

Description

Use the Delete method to delete a tree node and free all associated memory.


TTreeNode.DeleteChildren
 VCL Reference

TTreeNode.DeleteChildren

TTreeNode	See also

Deletes all children of the node.

procedure DeleteChildren;

Description

Use the DeleteChildren method to delete all children of a tree node, freeing all associated memory.


TTreeNode.Destroy
 VCL Reference

TTreeNode.Destroy

TTreeNode	See also

Destroys the tree node object.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Instead, use the Delete method. Delete removes the image of the node and all its children from the tree view window, and guards against recursive deletes.


TTreeNode.DisplayRect
 VCL Reference

TTreeNode.DisplayRect

TTreeNode	See also	Example

Returns the bounding rectangle for a tree node.

function DisplayRect(TextOnly: Boolean): TRect;

Description

If the TextOnly parameter is True, the bounding rectangle includes only the text of the node. Otherwise, it includes the entire line that the node occupies in the tree-view control.


TTreeNode.EditText
 VCL Reference

TTreeNode.EditText

TTreeNode	See also

Begins in-place editing of the specified node's text, replacing the text of the node with a single-line edit control containing the text.

function EditText: Boolean;

Description

Call EditText to allow the user to edit the node’s label. This method implicitly sets the Selected and Focused properties to True. When EditText is called, the tree view's OnEditing event is triggered.


TTreeNode.EndEdit
 VCL Reference

TTreeNode.EndEdit

TTreeNode	See also

Ends the editing of a node's label.

procedure EndEdit(Cancel Boolean);

Description

Call EndEdit to take the node out of edit mode. If the Cancel parameter is True, all changes made by the user are discarded. If Cancel is False, EndEdit updates the node’s Text property and the tree view’s OnEdited event occurs.


TTreeNode.Expand
 VCL Reference

TTreeNode.Expand

TTreeNode	See also

Expands the node to display all child nodes.

procedure Expand(Recurse: Boolean);

Description

When a node is expanded, its immediate subnodes are displayed. The minus '-' button may be displayed, depending on whether the tree view's ShowButtons property is set. If Recurse is True, all descendants of the immediate subnodes are expanded as well.


TTreeNode.GetFirstChild
 VCL Reference

TTreeNode.GetFirstChild

TTreeNode	See also

Returns the first child node of a tree node.

function GetFirstChild: TTreeNode;

Description

Call GetFirstChild to access the first child node of the tree view node. If the node has no children, GetFirstChild returns nil.

Note:	GetFirstChild returns the same value as Item[0].


TTreeNode.GetHandle
 VCL Reference

TTreeNode.GetHandle

TTreeNode	See also

Returns the Handle property.

function GetHandle: HWND;

Description

Calling GetHandle is the same as reading the Handle property.


TTreeNode.GetLastChild
 VCL Reference

TTreeNode.GetLastChild

TTreeNode	See also

Returns the last immediate child node of the calling node.

function GetLastChild: TTreeNode;

Description

Call GetLastChild to find the last immediate child of a node. If the calling node has no children, GetLastChild returns nil. GetLastChild returns the same value as Item[Count-1].


TTreeNode.GetNext
 VCL Reference

TTreeNode.GetNext

TTreeNode	See also 	Example

Returns the next node after the calling node in the tree view.

function GetNext: TTreeNode;

Description

If the calling node is the last node, GetNext returns nil. It will return the next node including nodes that aren't visible and child nodes. To get the next node at the same level as the calling node, use GetNextSibling. To get the next visible node, use GetNextVisible.


TTreeNode.GetNextChild
 VCL Reference

TTreeNode.GetNextChild

TTreeNode	See also 	Example

Returns the next child node after Value.

function GetNextChild(Value: TTreeNode): TTreeNode;

Description

Call GetNextChild to locate the next node in the list of immediate children of the tree view node. If the calling node has no children or there is no node after Value, GetNextChild returns nil.


TTreeNode.GetNextSibling
 VCL Reference

TTreeNode.GetNextSibling

TTreeNode	See also

Returns the next node in the tree view at the same level as the calling node.

function GetNextSibling: TTreeNode;

Description

GetNextSibling will return the next node, regardless of whether it's visible. To find the next node in the tree view including child nodes, use GetNext.


TTreeNode.GetNextVisible
 VCL Reference

TTreeNode.GetNextVisible

TTreeNode	See also

Returns the next visible node in the tree view after the calling node.

function GetNextVisible: TTreeNode;

Description

Use GetNextVisible when iterating through all the visible nodes in the tree view. A node is visible if all its parent nodes are expanded.


TTreeNode.GetPrev
 VCL Reference

TTreeNode.GetPrev

TTreeNode	See also

Returns the previous node in the tree view before the calling node.

function GetPrev: TTreeNode;

Description

GetPrev will return the previous node whether or not it is visible. To get the previous visible node, use GetPrevVisible.


TTreeNode.GetPrevChild
 VCL Reference

TTreeNode.GetPrevChild

TTreeNode	See also 	Example

Returns the previous child node before Value.

function GetPrevChild(Value: TTreeNode): TTreeNode;

Description

Call GetPrevChild to locate the previous node in the list of immediate children of the tree view node. If the calling node has no children or there is no node before Value, GetPrevChild returns nil.


TTreeNode.GetPrevSibling
 VCL Reference

TTreeNode.GetPrevSibling

TTreeNode	See also

Returns the previous node before the calling node and at the same level.

function GetPrevSibling: TTreeNode;

Description

GetPrevSibling returns the previous sibling node, regardless of whether it's visible. To find the previous node in the tree view including all levels, use GetPrev.


TTreeNode.GetPrevVisible
 VCL Reference

TTreeNode.GetPrevVisible

TTreeNode	See also

Returns the previous visible node before the calling node.

function GetPrevVisible: TTreeNode;

Description

To get the previous node, including non-visible, use GetPrev.


TTreeNode.HasAsParent
 VCL Reference

TTreeNode.HasAsParent

TTreeNode	See also

Returns True if Value is a parent node of the calling node.

function HasAsParent(Value: TTreeNode): Boolean;

Description

Use the HasAsParent method to determine if a node is a parent to a particular node.


TTreeNode.IndexOf
 VCL Reference

TTreeNode.IndexOf

TTreeNode	See also

Returns the position of an immediate child node of the calling node.

function IndexOf(Value: TTreeNode): Integer;

Description

Call IndexOf to obtain the position of a child node among the children of the calling node. If Value isn't an immediate child of the calling node, IndexOf returns -1. The first child node has an index on 0, the second an index of 1, and so on.


TTreeNode.MakeVisible
 VCL Reference

TTreeNode.MakeVisible

TTreeNode	See also

Expands the parent nodes of a node.

procedure MakeVisible;

Description

If a node's parent node(s) are collapsed and the node isn't visible, MakeVisible will expand the nodes parents to make the node visible.


TTreeNode.MoveTo
 VCL Reference

TTreeNode.MoveTo

TTreeNode	See also	Example

Moves the node to another location in the tree view.

procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode);

Description

The Destination parameter specifies a node that will be this node's parent or sibling after the move. The Mode parameter specifies the new relationship between this node and the destination node.


Hierarchy

TObject

TPersistent

TTreeNode


TTreeNodes
 VCL Reference

TTreeNodes

Hierarchy	Properties	Methods	See also

TTreeNodes maintains a list of tree nodes in a tree view control.

Unit

ComCtrls

Description

The Items property of the tree view control is a TTreeNodes object and maintains the collection of nodes in the tree view. Nodes can be added, deleted, inserted and moved within the tree view. Access the nodes in the tree view through the Items property of the tree view.


 VCL Reference

TTreeNodes Properties

TTreeNodes	Alphabetically	Legend

In TTreeNodes

Count

Handle

Item

Owner


 VCL Reference

TTreeNodes Properties

TTreeNodes	By Object	Legend

Count

Handle

Item

Owner


TTreeNodes.Count
 VCL Reference

TTreeNodes.Count

TTreeNodes	See also 	Example

Indicates the number of nodes maintained by the TTreeNodes object.

property Count: Integer;

Description

Use Count to determine the number of tree nodes in the tree view that owns the tree nodes object. Count provides an upper bound when iterating through the entries in the Item property array.


TTreeNodes.Handle
 VCL Reference

TTreeNodes.Handle

TTreeNodes	See also

Contains the window handle of the tree view control that owns the tree nodes object.

property Handle: HWND;

Description

Use Handle to obtain the handle of the tree view that owns the tree nodes object.


TTreeNodes.Item
 VCL Reference

TTreeNodes.Item

TTreeNodes	See also

Lists all tree nodes managed by the TTreeNodes object.

property Item[Index: Integer]: TTreeNode; default;

Description

Use Item to access to a node by its position in the tree view. The first node has an index of 0, the second an index of 1, and so on. Item is the default property for TTreeNodes. This means that the name of the Item property can be omitted when indexing into the set of tree nodes. Thus, the line

FirstNode := TreeView1.Items.Item[0];

can be written

FirstNode := TreeView1.Items[0];


TTreeNodes.Owner
 VCL Reference

TTreeNodes.Owner

TTreeNodes	See also

Specifies the tree view control that uses the tree nodes object to implement its Items property.

property Owner: TCustomTreeView;

Description

Use the Owner property to access the tree view control that displays the nodes maintained by the TTreeNodes object.


 VCL Reference

TTreeNodes Methods

TTreeNodes	Alphabetically	Legend

In TTreeNodes

Add

AddChild

AddChildFirst

AddChildObject

AddChildObjectFirst

AddFirst

AddNode

AddObject

AddObjectFirst

AlphaSort

Assign

BeginUpdate

Clear

Create

CustomSort

Delete

Destroy

EndUpdate

GetFirstNode

GetNode

Insert

InsertNode

InsertObject

Derived from TPersistent

GetNamePath

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TTreeNodes Methods

TTreeNodes	By Object	Legend

Add

AddChild

AddChildFirst

AddChildObject

AddChildObjectFirst

AddFirst

AddNode

AddObject

AddObjectFirst

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

CustomSort

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

Free

FreeInstance

GetFirstNode

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNode

InheritsFrom

InitInstance

Insert

InsertNode

InsertObject

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


TTreeNodes.Add
 VCL Reference

TTreeNodes.Add

TTreeNodes	See also 	Example

Adds a new tree node to a tree view control.

function Add(Node: TTreeNode; const S: string): TTreeNode;

Description

The node is added as the last sibling of the Node parameter. The S parameter specifies the Text property of the new node. Add returns the node that has been added. If the tree view is sorted, Add inserts the node in the correct sort order position rather than as the last child of the Node parameter’s parent.


TTreeNodes.AddChild
 VCL Reference

TTreeNodes.AddChild

TTreeNodes	See also 	Example

Adds a new tree node to a tree view.

function AddChild(Node: TTreeNode; const S: string): TTreeNode;

Description

The node is added as a child of the node specified by the Node parameter. It is added to the end of Node's list of child nodes. The S parameter specifies the Text property of the new node. AddChild returns the node that has been added. If the tree view is sorted, AddChild inserts the node in the correct sort order position, rather than as the last child of the Node parameter.


TTreeNodes.AddChildFirst
 VCL Reference

TTreeNodes.AddChildFirst

TTreeNodes	See also

Adds a new tree node to a tree view.

function AddChildFirst(Node: TTreeNode; const S: string): TTreeNode;

Description

Use AddChildFirst to insert a node as the first child of the node specified by the Node parameter. The S parameter specifies the Text property of the new node. Nodes that appear after the added node are moved down one row and reindexed with valid Index values. AddChildFirst returns the node that has been added.


TTreeNodes.AddChildObject
 VCL Reference

TTreeNodes.AddChildObject

TTreeNodes	See also 	Example

Adds a new tree node containing data to a tree view.

function AddChildObject(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;

Description

The node is added as the last child of the node specified by the Node parameter. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddChildObject returns the node that has been added.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


TTreeNodes.AddChildObjectFirst
 VCL Reference

TTreeNodes.AddChildObjectFirst

TTreeNodes	See also 	Example

Adds a new tree node containing data to a tree view.

function AddChildObjectFirst(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;

Description

The node is added as the first child of the node specified by the Node parameter. Nodes that appear after the added node are moved down one row and reindexed with valid Index values. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddChildObjectFirst returns the node that has been added.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


TTreeNodes.AddFirst
 VCL Reference

TTreeNodes.AddFirst

TTreeNodes	See also

Adds a new tree node to a tree view.

function AddFirst(Node: TTreeNode; const S: string): TTreeNode;

Description

The node is added as the first sibling of the node specified by the Node parameter. Nodes that appear after the added node are moved down one row and re-indexed with valid Index values. The S parameter specifies the Text property of the new node. AddFirst returns the node that has been added.


TTreeNodes.AddNode
 VCL Reference

TTreeNodes.AddNode

TTreeNodes	See also

Add a node to a tree view.

function AddNode(Node, Relative: TTreeNode; const S: string; Ptr: Pointer; Method: TNodeAttachMode): TTreeNode;

Description

AddNode adds a node object to the collection. AddNode returns the newly-added node, and takes the following parameters.

Node is the node object to be added. If Node is nil, then the tree view's CreateNode method is called to provide one.

The Relative and Method parameters together define the location of the new node. Relative is an existing node that will be either parent or sibling to the new node. Method specifies the precise relationship between the new node and relative, as given by a TNodeAttachMode constant.

The S parameter specifies the Text property of the new node.

The Ptr parameter specifies the Data property value of the new node.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


TTreeNodes.AddObject
 VCL Reference

TTreeNodes.AddObject

TTreeNodes	See also 	Example

Adds a new node containing data to a tree view.

function AddObject(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;

Description

The node is added as the last sibling of the node specified by the Node parameter. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddObject returns the node that has been added.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


 VCL Reference

 $TTreeNodes.AddObjectFirst

TTreeNodes	See also

Adds a new node containing data to a tree view.

function AddObjectFirst(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;

Description

The node is added first to the list to which the node specified by the Node parameter belongs. nodes that appear after the added node are moved down one row and reindexed with valid Index values. The S parameter specifies the Text property of the new node. The Ptr parameter specifies the Data property value of the new node. AddObjectFirst returns the node that has been added.


TTreeNodes.AlphaSort
 VCL Reference

TTreeNodes.AlphaSort

TtreeNodes	See also

Sort tree nodes.

function AlphaSort([ARecurse: Boolean]): Boolean;

Description

AlphaSort triggers node sorting or resorting. If an OnCompare event handler is defined for the associated TCustomTreeView, that routine determines sort order. If no OnCompare handler is defined, nodes are sorted by a simple case-sensitive compare of their captions.

The optional ARecurse parameter (default False) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

Calling AlphaSort is equivalent to calling CustomSort with a Nil procedure parameter and a data parameter of 0.

TCustomTreeNodes.AlphaSort is equivalent to TCustomTreeView.AlphaSort, except that TCustomTreeView.AlphaSort is recursive by default.

To sort a subtree, use TTreeNode.AlphaSort.


TTreeNodes.Assign
 VCL Reference

TTreeNodes.Assign

TTreeNodes	See also

Discards any current property information and replaces it with the information from the Source.

procedure Assign(Source: TPersistent);

Description

Use Assign to copy information from one tree nodes object to another. If Source is any other type of object, Assign calls its inherited method, which copies properties from any object that can copy to a TTreeNodes object in its AssignTo method.


TTreeNodes.BeginUpdate
 VCL Reference

TTreeNodes.BeginUpdate

TTreeNodes	See also

Prevents the updating of the tree view until the EndUpdate method is called.

procedure BeginUpdate;

Description

BeginUpdate prevents the screen from being repainted when new nodes are added, deleted, or inserted. Tree nodes affected by the changes will have invalid Index values until EndUpdate is called.

Use BeginUpdate to prevent screen repaints and to speed processing time while adding nodes to the tree view.

Note:	Calls to BeginUpdate are cumulative; for every call to BeginUpdate there must be a corresponding call to EndUpdate.


TTreeNodes.Clear
 VCL Reference

TTreeNodes.Clear

TTreeNodes	See also

Deletes all tree nodes contained from the list managed by TTreeNodes.

procedure Clear;

Description

Use the Clear method to remove all the nodes of a tree view.


TTreeNodes.CustomSort
 VCL Reference

TTreeNodes.CustomSort

TTreeNodes	See also

Sort tree nodes.

type TTVCompare = function(lParam1, lParam2, lParamSort: Longint): Integerstdcall;

function CustomSort(SortProc: TTVCompare; Data: Longint): Boolean;

Description

CustomSort triggers node sorting or resorting, using a comparison routine indicated by the SortProc parameter. The Data parameter is passed to the comparison routine. The optional ARecurse parameter (default False) specifies that sorting should recursively descend the node tree and sort each subtree in turn.

If SortProc is Nil, a default comparison routine is used. The default routine uses the OnCompare event handler for the associated TCustomTreeview object, if defined. If the OnCompare event handler is not defined, the default routine uses a simple case-sensitive compare of node captions.

In the comparison routine, the lParam1 and lParam2 parameters refer to two nodes when cast to TTreeNode. The lParamSort parameter is the value previously passed to the Data parameter of CustomSort. The return value of the comparison routine indicates the relative sort order of IParam1 and IParam2:

Return Value	Meaning
< 0	IParam1 comes before IParam2
0	IParam1 and IParam2 are equivalent
> 0	IParam2 comes before IParam1
TTreeNodes.CustomSort is equivalent to TCustomTreeView.CustomSort, except that TCustomTreeView.CustomSort is recursive by default.

To sort a subtree, use TTreeNode.CustomSort


TTreeNodes.Create
 VCL Reference

TTreeNodes.Create

TTreeNodes	See also

Creates an instance of a TTreeNodes object

constructor Create(AOwner: TCustomTreeView);

Description

Call Create to instantiate a TTreeNodes object at runtime. The TTreeNodes object used by TTreeView is created automatically from the constructor of the tree view object.

After calling the inherited constructor, Create sets the Owner property of the tree nodes object to the value of the AOwner parameter.


TTreeNodes.Delete
 VCL Reference

TTreeNodes.Delete

TTreeNodes	See also 	Example

Removes a node from the tree view.

procedure Delete(Node: TTreeNode);

Description

Delete removes the tree node specified by the Node parameter and all its children from the tree view.


TTreeNodes.Destroy
 VCL Reference

TTreeNodes.Destroy

TTreeNodes	See also

Destroys an instance of TTreeNodes.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. The tree view that owns the TTreeNodes object destroys the tree nodes object by callingits Free method.


TTreeNodes.EndUpdate
 VCL Reference

TTreeNodes.EndUpdate

TTreeNodes	See also

Re-enables screen repainting and node reindexing that was turned off with the BeginUpdate method.

procedure EndUpdate;

Description

Use the EndUpdate method to enable screen updating after BeginUpdate has been called. Calls to BeginUpdate are cumulative, so calling EndUpdate will only update the tree view if every other call to BeginUpdate has already been matched by a call to EndUpdate.


TTreeNodes.GetFirstNode
 VCL Reference

TTreeNodes.GetFirstNode

TTreeNodes	See also 	Example

Returns the first tree node in the tree view.

function GetFirstNode: TTreeNode;

Description

Use the GetFirstNode method to retrieve the first node in the tree view. GetFirstNode returns the value of Item[0].


TTreeNodes.GetNode
 VCL Reference

TTreeNodes.GetNode

TTreeNodes	See also

Returns the tree node given the ItemId of the tree node.

function GetNode(ItemId: HTreeItem): TTreeNode;

Description

ItemId is a handle to the node in the tree view.


TTreeNodes.Insert
 VCL Reference

TTreeNodes.Insert

TTreeNodes	See also

Inserts a tree node into the tree view before the node specified by the Node parameter.

function Insert(Node: TTreeNode; const S: string): TTreeNode;

Description

Call Insert to add a new sibling to the Node parameter, immediately preceding Node. The S parameter specifies the Text property of the new node. Insert returns the new node.


TTreeNodes.InsertNode
 VCL Reference

TTreeNodes.InsertNode

TTreeNodes	See also

InsertNodes a tree node with data.

function InsertNode(Node, Sibling: TTreeNode; const S: string;

    Ptr: Pointer): TTreeNode;

Description

Call InsertNode to add a new sibling to the Node parameter, immediately preceding Node. The S parameter specifies the Text property of the new node. The Ptr parameter specifies data associated with the node. InsertNode returns the new node.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


TTreeNodes.InsertObject
 VCL Reference

TTreeNodes.InsertObject

TTreeNodes	See also

Inserts a tree node containing data into the tree view before the node specified by the Node parameter.

function InsertObject(Node: TTreeNode; const S: string; Ptr: Pointer): TTreeNode;

Description

Call InsertObject to add a new sibling to the Node parameter, immediately preceding Node. The S parameter specifies the Text property of the new node and the Ptr parameter specifies the Data property of the new node. InsertObject returns the new node.

Note:	The memory referenced by Ptr is not freed when the tree nodes object is freed.


Hierarchy

TObject

TPersistent

TTreeNodes


TTreeView
 VCL Reference

 TTreeView

Hierarchy	Properties	Methods	Events	Using TTreeView	See also

TTreeView represents a window that displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disk.

Unit

ComCtrls

Description

Use TTreeView to add an expanding and contracting outline to a form. Each node in a tree view control consists of a label and a number of optional bitmapped images. Each node can have a list of subnodes associated with it. By clicking on a node, the user can expand or collapse the associated list of subnodes.


 VCL Reference

TTreeView Properties

TTreeView	Alphabetically	Legend

Derived from TCustomTreeView

AutoExpand

BorderStyle

Canvas

ChangeDelay

DropTarget

HideSelection

HotTrack

Images

Indent

Items

MultiSelect

MultiSelectStyle

ReadOnly

RightClickSelect

RowSelect

Selected

SelectionCount

Selections

ShowButtons

ShowLines

ShowRoot

SortType

StateImages

ToolTips

TopItem

Derived from TWinControl

AlignDisabled

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BorderWidth

Brush

ClientOrigin

ClientRect

ControlCount

Controls

Ctl3D

DockClientCount

DockClients

DoubleBuffered

Handle

ParentCtl3D

ParentWindow

Showing

TabOrder

TabStop

VisibleDockClientCount

Derived from TControl

Action

Align

Anchors

BiDiMode

BoundsRect

ClientHeight

ClientWidth

Color

Constraints

ControlState

ControlStyle

Cursor

DockOrientation

DragCursor

DragKind

Enabled

Floating

FloatingDockSiteClass

Font

Height

HelpContext

HelpKeyword

HelpType

Hint

HostDockSite

Left

LRDockWidth

Name

Parent

ParentBiDiMode

ParentColor

ParentFont

ParentShowHint

PopupMenu

ShowHint

TBDockHeight

Top

UndockHeight

UndockWidth

Visible

Width

WindowProc

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TTreeView Properties

TTreeView	By Object	Legend

Action

Align

AlignDisabled

Anchors

AutoExpand

BevelEdges

BevelInner

BevelKind

BevelOuter

BevelWidth

BiDiMode

BorderStyle

BorderWidth

BoundsRect

Brush

Canvas

ChangeDelay

ClientHeight

ClientOrigin

ClientRect

ClientWidth

Color

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Constraints

ControlCount

Controls

ControlState

ControlStyle

Ctl3D

Cursor

DesignInfo

DockClientCount

DockClients

DockOrientation

DoubleBuffered

DragCursor

DragKind

DropTarget

Enabled

Floating

FloatingDockSiteClass

Font

Handle

Height

HelpContext

HelpKeyword

HelpType

HideSelection

Hint

HostDockSite

HotTrack

Images

Indent

Items

Left

LRDockWidth

MultiSelect

MultiSelectStyle

Name

Owner

Parent

ParentBiDiMode

ParentColor

ParentCtl3D

ParentFont

ParentShowHint

ParentWindow

PopupMenu

ReadOnly

RightClickSelect

RowSelect

Selected

SelectionCount

Selections

ShowButtons

ShowHint

Showing

ShowLines

ShowRoot

SortType

StateImages

TabOrder

TabStop

Tag

TBDockHeight

ToolTips

Top

TopItem

UndockHeight

UndockWidth

VCLComObject

Visible

VisibleDockClientCount

Width

WindowProc


 VCL Reference

TTreeView Events

TTreeView	Alphabetically	Legend

Derived from TCustomTreeView

OnAddition

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnChange

OnChanging

OnCollapsed

OnCollapsing

OnCompare

OnCreateNodeClass

OnCustomDraw

OnCustomDrawItem

OnDeletion

OnEdited

OnEditing

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

Derived from TWinControl

OnEnter

OnExit

OnKeyDown

OnKeyPress

OnKeyUp

Derived from TControl

OnClick

OnContextPopup

OnDblClick

OnDragDrop

OnDragOver

OnEndDock

OnEndDrag

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TTreeView Events

TTreeView	By Object	Legend

OnAddition

OnAdvancedCustomDraw

OnAdvancedCustomDrawItem

OnChange

OnChanging

OnClick

OnCollapsed

OnCollapsing

OnCompare

OnContextPopup

OnCreateNodeClass

OnCustomDraw

OnCustomDrawItem

OnDblClick

OnDeletion

OnDragDrop

OnDragOver

OnEdited

OnEditing

OnEndDock

OnEndDrag

OnEnter

OnExit

OnExpanded

OnExpanding

OnGetImageIndex

OnGetSelectedIndex

OnKeyDown

OnKeyPress

OnKeyUp

OnMouseDown

OnMouseMove

OnMouseUp

OnStartDock

OnStartDrag


 VCL Reference

TTreeView Methods

TTreeView	Alphabetically	Legend

Derived from TCustomTreeView

AlphaSort

ClearSelection

Create

CustomSort

Deselect

Destroy

FindNextToSelect

FullCollapse

FullExpand

GetHitTestInfoAt

GetNodeAt

GetSelections

IsEditing

LoadFromFile

LoadFromStream

SaveToFile

SaveToStream

Select

Subselect

Derived from TWinControl

Broadcast

CanFocus

ContainsControl

ControlAtPos

CreateParented

CreateParentedControl

DefaultHandler

DisableAlign

DockDrop

EnableAlign

FindChildControl

FlipChildren

Focused

GetTabOrderList

HandleAllocated

HandleNeeded

InsertControl

Invalidate

PaintTo

Realign

RemoveControl

Repaint

ScaleBy

ScrollBy

SetBounds

SetFocus

Update

UpdateControlState

Derived from TControl

BeginDrag

BringToFront

ClientToParent

ClientToScreen

Dock

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EndDrag

GetControlsAlignment

GetParentComponent

GetTextBuf

GetTextLen

HasParent

Hide

InitiateAction

IsRightToLeft

ManualDock

ManualFloat

MouseWheelHandler

ParentToClient

Perform

Refresh

ReplaceDockedControl

ScreenToClient

SendToBack

SetTextBuf

Show

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TTreeView Methods

TTreeView	By Object	Legend

AfterConstruction

AlphaSort

Assign

BeforeDestruction

BeginDrag

BringToFront

Broadcast

CanFocus

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

ClearSelection

ClientToParent

ClientToScreen

ContainsControl

ControlAtPos

Create

CreateParented

CreateParentedControl

CustomSort

DefaultHandler

Deselect

Destroy

DestroyComponents

Destroying

DisableAlign

Dispatch

Dock

DockDrop

DragDrop

Dragging

DrawTextBiDiModeFlags

DrawTextBiDiModeFlagsReadingOnly

EnableAlign

EndDrag

ExecuteAction

FieldAddress

FindChildControl

FindComponent

FindNextToSelect

FlipChildren

Focused

Free

FreeInstance

FreeNotification

FreeOnRelease

FullCollapse

FullExpand

GetControlsAlignment

GetHitTestInfoAt

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetNodeAt

GetParentComponent

GetSelections

GetTabOrderList

GetTextBuf

GetTextLen

HandleAllocated

HandleNeeded

HasParent

Hide

InheritsFrom

InitiateAction

InitInstance

InsertComponent

InsertControl

InstanceSize

Invalidate

IsEditing

IsImplementorOf

IsRightToLeft

LoadFromFile

LoadFromStream

ManualDock

ManualFloat

MethodAddress

MethodName

MouseWheelHandler

NewInstance

PaintTo

ParentToClient

Perform

Realign

ReferenceInterface

Refresh

RemoveComponent

RemoveControl

RemoveFreeNotification

Repaint

ReplaceDockedControl

SafeCallException

SaveToFile

SaveToStream

ScaleBy

ScreenToClient

ScrollBy

Select

SendToBack

SetBounds

SetFocus

SetSubComponent

SetTextBuf

Show

Subselect

Update

UpdateAction

UpdateControlState

UseRightToLeftAlignment

UseRightToLeftReading

UseRightToLeftScrollBar


Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomTreeView

TTreeView


Automation variable
 VCL Reference

Automation variable

Automation is for backward compatibility with Delphi 2.0.

Unit

OleAuto

var Automation: TAutomation;

Description

Declarations in the Oleauto unit are provided for backward compatibility.

Automation is a global instance of the automation manager class. It serves as the Automation manager for an OLE automation server written with Delphi.

When creating an OLE automation object (an object derived from the TAutoObject class in the Oleauto unit) the file that defines that object must call Automation.RegisterClass, passing a record of type TAutoClassInfo. The Automation manager then handles all interactions between the automation object and the OLE automation API.

Note:	New implementations of OLE and ActiveX in the current version of Delphi have replaced declarations in the Oleauto unit.


Date-Time Format Strings
 VCL Reference

Date-Time Format Strings

See also

Controls formatting of dates and times.

Description

Date-Time Format Strings specify the formatting of date-time values (such as TDateTime) when they are converted to strings. Date Time Format Strings are passed to formatting methods and procedures (such as FormatDateTime), and are also used to set certain global variables (such as ShortDateFormat).

Date Time Format Strings are composed from specifiers that represent values to be inserted into the formatted string. Some specifiers (such as "d"), simply format numbers or strings. Other specifiers (such as "/") refer to locale-specific strings from global variables.

In the following table, specifiers are given in lower case. Case is ignored in formats, except for the "am/pm" and "a/p" specifiers.

Specifier	Displays
c	Displays the date using the format given by the ShortDateFormat global variable, followed by the time using the format given by the LongTimeFormat global variable. The time is not displayed if the date-time value indicates midnight precisely.
d	Displays the day as a number without a leading zero (1-31).
dd	Displays the day as a number with a leading zero (01-31).
ddd	Displays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames global variable.
dddd	Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.
ddddd	Displays the date using the format given by the ShortDateFormat global variable.
dddddd	Displays the date using the format given by the LongDateFormat global variable.
e	Displays the year in the current period/era as a number without a leading zero (Japanese, Korean and Taiwanese locales only).
ee	Displays the year in the current period/era as a number with a leading zero (Japanese, Korean and Taiwanese locales only).
g	Displays the period/era as an abbreviation (Japanese and Taiwanese locales only).
gg	Displays the period/era as a full name. (Japanese and Taiwanese locales only).
m	Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mm	Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mmm	Displays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames global variable.
mmmm	Displays the month as a full name (January-December) using the strings given by the LongMonthNames global variable.
yy	Displays the year as a two-digit number (00-99).
yyyy	Displays the year as a four-digit number (0000-9999).
h	Displays the hour without a leading zero (0-23).
hh	Displays the hour with a leading zero (00-23).
n	Displays the minute without a leading zero (0-59).
nn	Displays the minute with a leading zero (00-59).
s	Displays the second without a leading zero (0-59).
ss	Displays the second with a leading zero (00-59).
z	Displays the millisecond without a leading zero (0-999).
zzz	Displays the millisecond with a leading zero (000-999).
t	Displays the time using the format given by the ShortTimeFormat global variable.
tt	Displays the time using the format given by the LongTimeFormat global variable.
am/pm	Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
a/p	Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
ampm	Uses the 12-hour clock for the preceding h or hh specifier, and displays the contents of the TimeAMString global variable for any hour before noon, and the contents of the TimePMString global variable for any hour after noon.
/	Displays the date separator character given by the DateSeparator global variable.
:	Displays the time separator character given by the TimeSeparator global variable.
'xx'/"xx"	Characters enclosed in single or double quotes are displayed as-is, and do not affect formatting.


DWORD type
 VCL Reference

DWORD type

See also

DWORD represents a four-byte integer.

Unit

Types

type DWORD = Longword;

Description

DWORD (double word) is used in Windows programming to represent a four-byte integer.


Dynamic array types
 VCL Reference

Dynamic array types

See also

Dynamic arrays for built-in scalar types.

Unit

Types

type

  TIntegerDynArray      = array of Integer;

  TCardinalDynArray     = array of Cardinal;

  TWordDynArray         = array of Word;

  TSmallIntDynArray     = array of SmallInt;

  TByteDynArray         = array of Byte;

  TShortIntDynArray     = array of ShortInt;

  TInt64DynArray        = array of Int64;

  TLongWordDynArray     = array of LongWord;

  TSingleDynArray       = array of Single;

  TDoubleDynArray       = array of Double;

  TBooleanDynArray      = array of Boolean;

  TStringDynArray       = array of string;

  TWideStringDynArray   = array of WideString;

Description

The Types unit declares dynamic array types that correspond to each of the built-in scalar types in Object Pascal.

Dynamic arrays do not have a fixed size or length. Instead, memory for a dynamic array is reallocated when you assign a value to the array or pass it to the SetLength procedure.


HMetafile type
 VCL Reference

HMetafile type

See also

HMetafile is the Windows handle to a TMetafile object.

Unit

Graphics

type HMETAFILE = THandle;

Description

HMetafile is the type used by Windows API function calls that require a handle to a metafile for one of the arguments. It is also the type of the handle of a TMetafile object.


Int64Rec type
 VCL Reference

Int64Rec type

See also

Int64Rec separates parts of an 8-byte value.

Unit

SysUtils

type

  Int64Rec = packedrecord

    case Integer of

      0: (Lo, Hi: Cardinal);

      1: (Cardinals: array [0..1] of Cardinal);

      2: (Words: array [0..3] of Word);

      3: (Bytes: array [0..7] of Byte);

  end;

Description

Int64Rec declares a record that stores the various parts of the specified value as type Cardinal, Word or Byte.


LongRec type
 VCL Reference

LongRec type

See also

LongRec separates parts of a 4-byte value.

Unit

SysUtils

type

  LongRec = packedrecord

    case Integer of

      0: (Lo, Hi: Word);

      1: (Words: array [0..1] of Word);

      2: (Bytes: array [0..3] of Byte);

  end;

Description

LongRec declares a record that stores the various parts of the specified value as type Word or Byte.


PNodeCache type
 VCL Reference

PNodeCache type

See also

A pointer to a TNodeCache object.

Unit

ComCtrls

PNodeCache = ^TNodeCache;

Description

PNodeCache is a pointer to a cached node of a TTreeView object.


TActionEvent type
 VCL Reference

TActionEvent type

See also

The type of events that occur when processing actions.

Unit

Actnlist

type TActionEvent = procedure (Action: TBasicAction; var Handled: Boolean) of object;

Description

TActionEvent is the type of event handlers that respond at various points in the processing of actions. The Action parameter is the action that was triggered by a user action or that is currently being updated while the application is idle. The Handled parameter indicates whether the event handler executed or updated the action. Set Handled to True in the event handler to stop further processing of the action.


TActiveFormBorderStyle type
 VCL Reference

TActiveFormBorderStyle type

See also

Specifies the style of an active form's border.

Unit

Forms

type

  TActiveFormBorderStyle = (afbNone, afbSingle, afbSunken, afbRaised);

Description

The following are possible values of TActiveFormBorderStyle:

value	meaning

afbNone	The form has no border.

afbSingle	The form has a regular single-line border.

afbSunken	The form has a 3D look—that is, a border with a sunken edge.

afbRaised	The form has a border with a raised edge.


TActiveXRegType type
 VCL Reference

TActiveXRegType type

See also

Used when excluding a component class from the ActiveX Wizard.

Unit

Classes

type TActiveXRegType = (axrComponentOnly, axrIncludeDescendants);

Description

The TActiveXRegType type indicates whether a component’s descendants should be excluded from the ActiveX Wizard when the component is excluded. The following table lists the possible values:

Value	Meaning

axrComponentOnly	Only the component class is blocked from appearing in the ActiveX Wizard.

axrIncludeDescendants	The component class and any of its descendants are blocked from the Wizard.


TAlign, TAlignSet type
 VCL Reference

TAlign, TAlignSet type

See also

Specifies an alignment.

Unit

Controls

type TAlignSet = set of TAlign;

type TAlign = (alNone, alTop, alBottom, alLeft, alRight, alClient, alCustom);

Description

TAlignSet is a set of TAlign values. TAlign specifies how a control is placed relative to its parent. It can have one of the following values:

Value	Meaning

alNone	The control remains where it was placed. This is the default value.

alTop	The control moves to the top of its parent and resizes to fill the width of its parent. The height of the control is not affected.

alBottom	The control moves to the bottom of its parent and resizes to fill the width of its parent. The height of the control is not affected.

alLeft	The control moves to the left side of its parent and resizes to fill the height of its parent. The width of the control is not affected.

alRight	The control moves to the right side of its parent and resizes to fill the height of its parent. The width of the control is not affected.

alClient	The control resizes to fill the client area of its parent. If another control already occupies part of the client area, the control resizes to fit within the remaining client area.

alCustom	The control’s positioning is determined by calls to CustomAlignInsertBefore and CustomAlignPosition.


TAlignment type
 VCL Reference

 TAlignment type

See also

Specifies how text is aligned within a control.

Unit

Classes

type TAlignment = (taLeftJustify, taRightJustify, taCenter);

Description

The following are possible values of TAlignment:

Value	Meaning

taLeftJustify	Text is left-justified: Lines all begin at the left edge of the control.

taCenter	Text is centered in the control.

taRightJustify	Text is right-justified: Lines all end at the right edge of the control.


TAnchorKind, TAnchors type
 VCL Reference

TAnchorKind, TAnchors type

Specifies how a control is anchored to its parent.

Unit

Controls

type TAnchors = set of TAnchorKind;

type TAnchorKind = (akTop, akLeft, akRight, akBottom);

Description

TAnchors is a set of TAnchorKind values. TAnchorKind can have one or more of the following values:

Value	Meaning

akTop	The control’s position is fixed with respect to the top edge of its parent.

akLeft	The control’s position is fixed with respect to the left edge of its parent.

akRight	The control’s position is fixed with respect to the right edge of its parent.

akBottom	The control’s position is fixed with respect to the bottom edge of its parent.


.TAttachMode type
 VCL Reference

 TAttachMode type

See also

Indicates how an outline node should be inserted into an outline.

Unit

Outline

type TAttachMode = (oaAdd, oaAddChild, oaInsert);

Description

TAttachMode is used by methods that move outline nodes within an outline. It includes the following values:

Value	Description

oaAdd	The item is attached as if added with the Add method. The moved item becomes the last sibling of the item specified by the Destination parameter, sharing the same parent as the Destination item.

oaAddChild	The item is attached as if added with the AddChild method. The moved item becomes the last child of the item specified by the Destination parameter. The Destination item becomes the parent of the moved item.

oaInsert	The item is attached as if inserted with the Insert method. The moved item replaces the Destination item in the outline, while the Destination item and all other following items are moved down one row.


TBandInfoEvent type
 VCL Reference

TBandInfoEvent type

See also

The type of the OnBandInfo event handler.

Unit

ExtCtrls

TBandInfoEvent = procedure (Sender: TObject; Control: TControl; var Insets: TRect; var PreferredSize, RowCount: Integer) of object;

Description

Sender is the control bar containing the band.

Control is the control on the band that is moved (usually a TToolBar object).

Insets is the margin between the edges of the control and the edges of its band. This value can be adjusted by the event handler.

PreferredSize is the band’s preferred width. (The band’s width will be reduced if it can’t fit inside the control bar.) This value can be adjusted by the event handler.

RowCount is the number of control rows that the band spans in the control bar. This value can be adjusted by the event handler.


TBandMoveEvent type
 VCL Reference

TBandMoveEvent type

The type of the OnBandMove event handler.

Unit

ExtCtrls

TBandMoveEvent = procedure (Sender: TObject; Control: TControl; var ARect: TRect) of object;

Description

Sender is the control bar in which a band is about to be moved.

Control is the control on the band that is about to be moved (usually a TToolBar object).

ARect is the area to which the control is about to be moved. This value can be adjusted from within the event handler.


TBandPaintEvent type
 VCL Reference

TBandPaintEvent type

The type of the OnBandPaint event handler.

Unit

ExtCtrls

TBandPaintEvent = procedure (Sender: TObject; Control: TControl; Canvas: TCanvas; var ARect: TRect; var Options: TBandPaintOptions) of object;

Description

Sender is the control bar in which a band is about to be painted.

Control is the control on the band that is about to be painted.

Canvas is the control’s canvas.

ARect is the control’s area. This value can be adjusted by the event handler.

Options specifies which parts of the band are drawn. This value can be adjusted by the event handler.


TBandPaintOption, TBandPaintOptions type
 VCL Reference

TBandPaintOption, TBandPaintOptions type

Used in the OnBandPaint event handler to specify which parts of a band are painted.

Unit

ExtCtrls

type

  TBandPaintOption = (bpoGrabber, bpoFrame);

  TBandPaintOptions = set of TBandPaintOption;

Description

TBandPaintOptions has one or both of the following values:

Value	Meaning

bpoGrabber	The grabber is painted.

bpoFrame	The frame is painted.


TBevelCut type
 VCL Reference

TBevelCut type

See also

Specifies a bevel’s cut.

Unit

Controls

type TBevelCut = (bvNone, bvLowered, bvRaised, bvSpace);

Description

TBevelCut can have one of the following values:

Value	Meaning

bvNone	The bevel does not exist.

bvLowered	The bevel appears lowered.

bvRaised	The bevel appears raised.

bvSpace	The bevel appears as a space if its kind is not bkTile. Otherwise, the bevel appears raised.


TBevelEdge,TBevelEdges type
 VCL Reference

TBevelEdge, TBevelEdges type

Specifies which edges of a window are beveled.

Unit

Controls

type

  TBevelEdge = (beLeft, beTop, beRight, beBottom);

  TBevelEdges = set of TBevelEdge;

Description

TBevelEdge can have one or more of the following values:

Value	Meaning

beLeft	The left edge is beveled.

beTop	The top edge is beveled.

beRight	The right edge is beveled.

beBottom	The bottom edge is beveled.


TBevelKind type
 VCL Reference

TBevelKind type

Specifies a bevel kind.

Unit

Controls

type TBevelKind = (bkNone, bkTile, bkSoft, bkFlat);

Description

TBevelKind can have one of the following values:

Value	Meaning

bkNone	No bevel is added.

bkTile	The bevel appears sharply defined.

bkSoft	The bevel uses softer contrasts than bkTile.

bkFlat	The bevel has a broad, flat appearance.


TBevelWidth type
 VCL Reference

TBevelWidth type

Contains a bevel width.

Unit

Controls

type TBevelWidth = 1..MaxInt;

Description

Use TBevelWidth to specify the width of a bevel in pixels.


TBiDiMode type
 VCL Reference

TBiDiMode type

Used to specify a bi-directional mode.

Unit

Classes

type TBiDiMode = (bdLeftToRight, bdRightToLeft, bdRightToLeftNoAlign, bdRightToLeftReadingOnly);

Description

TBiDiMode determines the reading order of the text, placement of the vertical scrollbar, and any alignment modifications. It is used to tailor the user interface for locales where text is bi-directional.

The following table describes the possible values:

Value	Meaning

bdLeftToRight	Reading order is left to right. Alignment is not changed. The vertical scroll bar appears on the right edge of the control.

bdRightToLeft	Reading order is right to left. Alignment is changed. The vertical scroll bar appears on the left edge of the control.

bdRightToLeftNoAlign	Reading order is right to left. Alignment is not changed. The vertical scroll bar appears on the left edge of the control.

bdRightToLeftReadingOnly	Reading order is right to left. Alignment and scroll bar are not changed.


TBorderWidth type
 VCL Reference

TBorderWidth type

Represents the width of a control’s border.

Unit

Controls

type TBorderWidth = 0..MaxInt;

Description

Use TBorderWidth to specify the width of a border in pixels.


TBucket, TBucketArray types
 VCL Reference

TBucket, TBucketArray types

See also

Represents a list of buckets that each store an array of items.

Unit

Contnrs

type

  TBucket = record

    Count: Integer;

    Items: TBucketItemArray;

  end;

  TBucketArray = array of TBucket;

Description

TBucketArray is a dynamic array of TBucket records. Each TBucket represents a dynamic array of items.

Count is the number of items in a bucket.

Items is the array of items that the bucket stores.

TBucketList uses TBucketArray to represent its collection of buckets, or categories, under which it stores items.


TBucketItem, TBucketItemArray types
 VCL Reference

TBucketItem, TBucketItemArray types

See also

Represents the items in a TBucket record.

Unit

Contnrs

type

  TBucketItem = record

    Item, Data: Pointer;

  end;

  TBucketItemArray = array of TBucketItem;

Description

TBucketItemArray is a dynamic array of TBucketItem records. Each TBucketItem stores an item and its associated data pointer.

Item points to the item in a bucket.

Data points to the data that is associated with Item.


TButtonLayout type
 VCL Reference

TButtonLayout type

See also

TButtonLayout defines values for the Layout property of buttons.

Unit

Buttons

type TButtonLayout = (blGlyphLeft, blGlyphRight, blGlyphTop, blGlyphBottom);

Description

TButtonLayout defines the location of an image on a button. The following table lists the values for TButtonLayout:

Value	Meaning

blGlyphLeft	The image appears near the left side of the button.

blGlyphRight	The image appears near the right side of the button.

blGlyphTop	The image appears near the top of the button.

blGlyphBottom	The image appears near the bottom of the button.


TMPBtnType type, TButtonSet type
 VCL Reference

TMPBtnType type, TButtonSet type

See also

TMPBtnType defines the possible buttons in a TMediaPlayer component. TButtonSet represents a set of those buttons.

Unit

Mplayer

type

  TMPBtnType = (btPlay, btPause, btStop, btNext, btPrev, btStep, btBack, btRecord, btEject);

  TButtonSet = set of TMPBtnType;

Description

TMPBtnType represents the type of a media player button. TButtonSet is a set of button types for the media player.

Each button type has an associated action on the media player. The following table lists the button types and their associated actions:

Value	Action

btPlay	Plays the media player.

btRecord	Starts recording.

btStop	Stops playing or recording.

btNext	Skips to the next track, or to the end if the medium doesn't use tracks.

btPrev	Skips to the previous track, or to the beginning if the medium doesn't use tracks.

btStep	Moves forward a number of frames.

btBack	Moves backward a number of frames.

btPause	Pauses playing or recording. If already paused when clicked, resumes playing or recording.

btEject	Ejects the medium.


TByteArray type
 VCL Reference

TByteArray type

TByteArray is a general array of type Byte.

Unit

SysUtils

type

  PByteArray = ^TByteArray;

  TByteArray = array[0..32767] of Byte;

Description

TByteArray declares a general array of type Byte that can be used in typecasting.


TCalDayOfWeek type
 VCL Reference

TCalDayOfWeek type

See also

Represents a day of the week.

Unit

ComCtrls

type TCalDayOfWeek = (dowMonday, dowTuesday, dowWednesday, dowThursday, dowFriday, dowSaturday, dowSunday, dowLocaleDefault);

Description

TCalDayOfWeek is used to represent a day of the week for a column in a calendar. It can be any of the following values:

Value	Meaning

dowMonday	Monday

dowTuesday	Tuesday

dowWednesday	Wednesday

dowThursday	Thursday

dowFriday	Friday

dowSaturday	Saturday

dowSunday	Sunday

dowLocaleDefault	The day of the week for the column is determined by the locale in which the application runs.


TCallDesc type, PCallDesc type
 VCL Reference

TCallDesc type, PCallDesc type

The dispatch call descriptor for variants.

Unit

System

PCallDesc = ^TCallDesc;

TCallDesc = packedrecord

  CallType: Byte;

  ArgCount: Byte;

  NamedArgCount: Byte;

  ArgTypes: array[0..255] of Byte;

end;

Description

TCallDesc identifies a method call that was made using a Variant. PCallDesc is a pointer to a TCallDesc record.

CallType identifies the method that was called.

ArgCount indicates the total number of arguments passed to the method.

NamedArgCount indicates the number of arguments passed using a syntax that supplies the argument name.

ArgTypes is an array giving the type codes for each argument.


TCanResizeEvent type
 VCL Reference

TCanResizeEvent type

The type of the OnCanResize event handler.

Unit

ExtCtrls

type TCanResizeEvent = procedure(Sender: TObject; var NewWidth, NewHeight: Integer; var Resize: Boolean) of object;

Description

Sender is the object that is being resized.

NewWidth returns the new width of the object.

NewHeight returns the new height of the object.

Resize returns True if the resize attempt can proceed and False if the attempt to resize should be aborted.


TCaption type
 VCL Reference

TCaption type

The type of the Caption property.

Unit

Controls

type TCaption = type string;

Description

TCaption is the string that represents the caption of a control.


TChangeRange type
 VCL Reference

TChangeRange type

See also

Indicates the direction in which a node is moved.

Unit

Outline

type TChangeRange = -1..1;

Description

TChangeRange is the type of the Value parameter of an outline node’s ChangeLevelBy method. It can take one of the following values:

Value	Meaning

-1	Move the node toward the root by one level.

1	Move the node toward the leaf by one level.


TClassInstancing type
 VCL Reference

TClassInstancing type

Used by COM factories to determine how COM objects are instantiated.

Unit

Comobj

type TClassInstancing = (ciInternal, ciSingleInstance, ciMultiInstance);

Description

TClassInstancing indicates the process space in which a COM factory can instantiate COM objects and whether a single process can create more than one instance. The following table lists the possible values of the TClassInstancing type:

Value	Meaning

ciInternal	The COM object is created by the same process as the COM server. That is, an external application cannot create an instance of this object directly.  Instead, external processes must call a method of the application that creates the document object.

ciSingleInstance	Allows only a single instance of the COM object for each executable (application).  If this single instance is not shared across multiple clients, then each client must launch its own instance of the executable.

ciMultiInstance	The COM object is created as one of multiple instances within the same executable. Any time a client requests service, a separate instance of the object gets invoked.


TColor type
 VCL Reference

TColor type

TColor is used to specify the color of an object.

Unit

Graphics

type TColor = -$7FFFFFFF-1..$7FFFFFFF;

Description

TColor is used to specify the color of an object. It is used by the Color property of many components and by a number of other properties that specify color values.

The Graphics unit contains definitions of useful constants for TColor. These constants map either directly to the closest matching color in the system palette (for example, clBlue maps to blue) or to the corresponding system screen element color defined in the Color section of the Windows Control panel (for example, clBtnFace maps to the system color for button faces).

If you specify TColor as a specific 4-byte hexadecimal number instead of using the constants defined in the Graphics unit, the low three bytes represent RGB color intensities for blue, green, and red, respectively. The value $00FF0000 represents full-intensity, pure blue, $0000FF00 is pure green, and $000000FF is pure red. $00000000 is black and $00FFFFFF is white.

If the highest-order byte is zero ($00), the color obtained is the closest matching color in the system palette. If the highest-order byte is one ($01), the color obtained is the closest matching color in the currently realized palette. If the highest-order byte is two ($02), the value is matched with the nearest color in the logical palette of the current device context.

The following tables lists the color constants from the Graphics unit. The first two columns list the colors that map to the closest matching color in the system palette, while the last two columns list the colors that are defined in the Windows Control panel.

Value	Meaning		Value	Meaning
clNone	White on Windows 9x, Black on NT.		clScrollBar	Current color for the of scroll bar track.
clAqua	Aqua		clBackground	Current background color of the Windows desktop
clBlack	Black		clActiveCaption	Current color of the title bar of the active window
clBlue	Blue		clInactiveCaption	Current color of the title bar of inactive windows
clCream	Cream		clMenu	Current background color of menus
clDkGray	Dark Gray		clWindow	Current background color of windows
clFuchsia	Fuchsia		clWindowFrame	Current color of window frames
clGray	Gray		clMenuText	Current color of text on menus
clGreen	Green		clWindowText	Current color of text in windows
clLime	Lime green		clCaptionText	Current color of the text on the title bar of the active window
clLtGray	Light Gray		clActiveBorder	Current border color of the active window
clMaroon	Maroon		clInactiveBorder	Current border color of inactive windows
clMedGray	Medium Gray		clAppWorkSpace	Current color of the application workspace
clMoneyGreen	Mint green		clHighlight	Current background color of selected text
clNavy	Navy blue		clHightlightText	Current color of selected text
clOlive	Olive green		clBtnFace	Current color of a button face
clPurple	Purple		clBtnShadow	Current color of a shadow cast by a button
clRed	Red		clGrayText	Current color of text that is dimmed
clSilver	Silver		clBtnText	Current color of text on a button
clSkyBlue	Sky blue		clInactiveCaptionText	Current color of the text on the title bar of an inactive window
clTeal	Teal		clBtnHighlight	Current color of the highlighting on a button
clWhite	White		cl3DDkShadow	Windows 95 or NT 4.0 only: Dark shadow for three-dimensional display elements
clYellow	Yellow		cl3DLight	Windows 95 or NT 4.0 only: Light color for three-dimensional display elements (for edges facing the light source)
			clInfoText	Windows 95 or NT 4.0 only: Text color for tool tip controls
			clInfoBk	Windows 95 or NT 4.0 only: Background color for tool tip controls
			clGradientActiveCaption	Windows 98 or Windows 2000: Right side color in the color gradient of an active window's title bar. clActiveCaption specifies the left side color.
			clGradientInactiveCaption	Windows 98 or Windows 2000: Right side color in the color gradient of an inactive window's title bar. clInactiveCaption specifies the left side color.
			clDefault	The default color for the control to which the color is assigned.


TComboBoxStyle type
 VCL Reference

TComboBoxStyle type

TComboBoxStyle is the type for the Style property of combobox components.

Unit

StdCtrls

type TComboBoxStyle = (csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable);

Description

These are the values in the TComboBoxStyle type:

Value	Meaning

csDropDown	Creates a drop-down list with an edit box for manually entered text. All items are strings of the same height.

csSimple	Creates an edit box with a fixed list (list box) underneath. The length of the list is determined by the Height of the combo box.

csDropDownList	Creates a drop-down list with no edit box; the user cannot enter text manually. All items are strings of the same height.

csOwnerDrawFixed	Creates an owner-draw drop-down list with no edit box. Each item in the list is the height specified by the ItemHeight property.

csOwnerDrawVariable	Creates an owner-draw drop-down list with no edit box. List items can have varying heights.


TCompareTextProc type
 VCL Reference

TCompareTextProc type

See also

TCompareTextProc is the type for the AnsiResemblesProc variable.

Unit

StrUtils

type TCompareTextProc = function(const AText, AOther: string): Boolean;

Description

TCompareTextProc is the type for a utility to compare to strings and indicate whether they are the same or similar.

AText and AOther are the strings to compare.

The function returns True if the strings are the same (or similar), False if they are not.


TComponentName type
 VCL Reference

TComponentName type

TComponentName is the type for the Name property for all components.

Unit

Classes

type TComponentName = type string;

Description

TComponentName is a string that represents the name of a component.


TConstrainedResizeEvent type
 VCL Reference

TConstrainedResizeEvent type

The type of the OnConstrainedResize event handler.

Unit

Controls

type TConstrainedResizeEvent = procedure(Sender: TObject; var MinWidth, MinHeight, MaxWidth, MaxHeight: Integer) of object;

Description

Sender is the object that is being resized.

MinWidth returns the minimum width to which the object can be resized.

MinHeight returns the minimum height to which the object can be resized.

MaxWidth returns the maximum width to which the object can be resized.

MaxHeight returns the maximum height to which the object can be resized.


TConversionProc type
 VCL Reference

TConversionProc type

See also

Converts a unit of measurement to or from the base units of a conversion family.

Unit

ConvUtils

type TConversionProc = function(const AValue: Double): Double;

Description

The Convert function converts between measurements by converting source units to the base units of a conversion family and then converting those base units to the target units. When registering a new unit of measurement for a conversion family, therefore, you must specify how to convert from the new unit to the base unit for the family and how to convert from the base unit to the new unit of measurement. Given methods to perform these two conversions, all other conversions within the family are automatically enabled.

TConversionProc is the type of a function that performs these two conversions (to and from the base units). When registering a new unit of measurement, you supply two methods of type TConversionProc:

One where the AValue parameter represents a measurement in the new unit of measurement and which returns the measurement in the base unit

One where the AValue parameter represents a measurement in the base units and which returns the corresponding measurement in the new unit of measurement.


TConvFamily type
 VCL Reference

TConvFamily type

See also

Represents a set of conversion types that can be converted to one another.

Unit

ConvUtils

type

  TConvFamily = type Word;

Description

TConvFamily identifies a conversion family. A conversion family is the type of thing that measurement units (TConvType values) represent. When two TConvType values are registered with the same conversion family, the Convert function can convert between measurements made using the units represented by those TConvType values.

TConvFamily values are obtained by registering a conversion family using the RegisterConversionFamily function. Once you have a TConvFamily value (by registering a new conversion family or using one of the global variables in the StdConvs unit), you can register units of measurement that measure that type of thing by calling the RegisterConversionType function.


TConvFamilyArray type
 VCL Reference

TConvFamilyArray type

See also

Represents a dynamic array of conversion families.

Unit

ConvUtils

type TConvFamilyArray = array ofTConvFamily;

Description

TConvFamilyArray is a dynamic array of TConvFamily values. Each value in the array is the identifier for a family of TConvType values. That is, each entry represents a set of registered conversion types that can be converted into each other.


TConvType type
 VCL Reference

TConvType type

See also

Represents a unit of measurement

Unit

ConvUtils

type

  TConvType = type Word;

Description

The Convert function in the ConvUtils unit converts between units that measure the same type of thing (distance, area, time, temperature, and so on). Because Convert is a completely generic conversion utility, it requires the caller to specify the units from which to convert and to which to convert. TConvType is the type used to identify those units of measurement.

TConvType values are obtained by registering a unit of measurement using the RegisterConversionType function.


TConvTypeArray type
 VCL Reference

TConvTypeArray type

See also

Represents a dynamic array of conversion types (measurement units)

Unit

ConvUtils

type TConvTypeArray = array ofTConvType;

Description

TConvTypeArray is a dynamic array of TConvType values. Each value in the array is the identifier for a single conversion type (measurement unit).


TCoolBandMaximize type
 VCL Reference

TCoolBandMaximize type

Specifies the conditions under which a TCoolBand is maximized.

Unit

ComCtrls

type TCoolBandMaximize = (bmNone, bmClick, bmDblClick);

Description

TCoolBandMaximize specifies the conditions under which a TCoolBand becomes maximized:

Value	Meaning

bmNone	The cool band is never maximized.

bmClick	The cool band is maximized when the user clicks with the left mouse button.

bmDblClick	The cool band is maximized when the user double-clicks with the left mouse button.


TCreateInfo type
 VCL Reference

TCreateInfo type

See also

TCreateInfo is a record used by TOleContainer's CreateObjectFromInfo method.

Unit

OleCtnrs

type

  TCreateInfo = record

    CreateType: TCreateType;

    ShowAsIcon: Boolean;

    IconMetaPict: HGlobal;

    ClassID: TCLSID;

    FileName: string;

    DataObject: IDataObject;

  end;

Description

TCreateInfo is a record used by TOleContainer's  CreateObjectFromInfo method. TCreateInfo's fields are  described in the following table:

Fields	Meaning

CreateType	Describes the source of the object. See TCreateType for details.

ShowAsIcon	Indicates whether the object is shown as an icon (True) or displayed as it would be in the server application (False).

IconMetaPict	Specifies a global memory handle to a metafile picture (TMetaFilePict) to display in place of the OLE object's default icon. IconMetaPict is optional; When set to 0, the object's default icon is used (when ShowAsIcon is True).

ClassID	The class identifier of the OLE object to create. ClassID is only used when CreateType is ctNewObject. You can use the ProgIDToClassID function to get the class identifier for an OLE object's class name (or programmatic identifier).

FileName	The name of a file to link or embed as an OLE object. FileName is only used when CreateType is ctFromFile or ctLinkToFile.

DataObject	An OLE data transfer object. DataObject is only used when CreateType is ctFromData or ctLinkFromData.


TCreateParams type
 VCL Reference

TCreateParams type

See also

TCreateParams is the window-creation parameter record used to specify the type of window to create for a windowed control.

Unit

Controls

type

  TCreateParams = record

    Caption: PChar;

    Style: DWORD;

    ExStyle: DWORD;

    X, Y: Integer;

    Width, Height: Integer;

    WndParent: HWND;

    Param: Pointer

    WindowClass: TWndClass;

    WinClassName: array[0..63] ofChar;

  end;

Description

The TCreateParams type is a data structure holding information needed when telling Windows to create a window handle. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function.  TCreateParams contains the following fields:

Field	Meaning

Caption	The window caption.  This is usually the value of the Caption or Text property of the control.

Style	The Windows style for the window. This is a bit array of flags such as WS_CHILD or WS_DISABLED. See the Microsoft Windows documentation for possible flags.

ExStyle	The extended Windows style for the window. This is one of the Windows predefined extended style constants such as WS_EX_TOOLWINDOW or WS_EX_CONTROLPARENT. See the Microsoft Windows documentation for possible values.

X	The x coordinate of the left side of the window.  This is usually the same as the Left property.

Y	The y coordinate of the top of the window.  This is usually the same as the Top property.

Width	The width, in pixels, of the window. This is usually the same as the Width property.

Height	The height, in pixels, of the window. This is usually the same as the Height property.

WndParent	The window handle of the parent window. This is the same as the Handle property of the parent control or, if the Parent property is nil, the value of ParentWindow.

Param	A pointer to the windows creation parameter that is passed as the LParam of the WM_CREATE message.

WindowClass	The WindowClass record that describes the class of window being created. The WindowClass record includes information about the window procedure, style, default cursor, background brush, associated menus, and so on.

WinClassName	The window class name. This must be the name of a window class that has already been registered. Windows provides several built-in window classes with predefined names. Applications may also register their own custom window classes.


TCreateType type
 VCL Reference

TCreateType type

See also

TCreateType is an enumerated type that defines values for TCreateInfo's CreateType field.

Unit

OleCtnrs

type TCreateType = (ctNewObject, ctFromFile, ctLinkToFile, ctFromData, ctLinkFromData);

Description

TCreateType defines the possible values for TCreateInfo's CreateType field which is passed to TOleContainer's  CreateObjectFromInfo method. Defined as follows:

Values	Meaning

ctNewObject	Creates an embedded OLE object given its class identifier (TCreateInfo.ClassID)

ctFromFile	Creates an embedded OLE object from the contents of the given file (TCreateInfo.FileName).

ctLinkToFile	Creates a linked OLE object from the contents of the given file (TCreateInfo.FileName)

ctFromData	Creates an embedded OLE object from the given data transfer object (TCreateInfo.DataObject)

ctLinkFromData	Creates a linked OLE object from the given data transfer object (TCreateInfo.DataObject)


TCursor type
 VCL Reference

TCursor type

See also

TCursor represents a mouse cursor image.

Unit

Controls

type TCursor = -32768..32767;

Description

TCursor is an index into the global list of available cursors maintained by the Screen variable. TCursor values can include indexes to custom cursors added by an application, in addition to the predefined constants defined in the controls unit. The following table lists the predefined cursor constants and their position in the Cursors property array:

Constant	Value	Image

crDefault	0	Whatever cursor is the default for the window class (usually crArrow).

crNone	-1

crArrow	 -2

crCross	-3

crIBeam	-4

crSizeNESW	-6

crSizeNS	-7

crSizeNWSE	-8

crSizeWE	-9

crUpArrow	-10

crHourGlass	-11

crDrag	-12

crNoDrop	-13

crHSplit	-14

crVSplit	-15

crMultiDrag	-16

crSQLWait	-17

crNo	-18

crAppStart	-19

crHelp	-20

crHandPoint	-21

crSize	-22	(obsolete)

crSizeAll	-22


TCustomDrawStage type
 VCL Reference

TCustomDrawStage type

Used to specify a stage in the custom drawing process.

Unit

ComCtrls

type TCustomDrawStage = (cdPrePaint, cdPostPaint, cdPreErase, cdPostErase);

Description

Use TCustomDrawStage to determine when an advanced custom drawing event occurs:

Value	Meaning

cdPrePaint	Before painting.

cdPostPaint	After painting.

cdPreErase	Before erasing.

cdPostErase	After erasing.


TCustomDrawState type
 VCL Reference

TCustomDrawState type

Used to specify a custom drawing state.

Unit

ComCtrls

type TCustomDrawState = set of (cdsSelected, cdsGrayed, cdsDisabled, cdsChecked, cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate);

Description

TCustomDrawState indicates state information that can affect how a control is drawn. It includes a set drawn from the following values:

Value	Meaning

cdsSelected	The control or item is selected.

cdsGrayed	The control or item should appear grayed.

cdsDisabled	The control or item is disabled.

cdsChecked	The item should appear checked.

cdsFocused	The control or item has input focus.

cdsDefault	The item is the default item.

cdsHot	The item is under the mouse and the HotTrack property is True.

cdsMarked	The item is marked (marked items appear shaded by default).

cdsIndeterminate	The item is neither selected nor unselected.


TCustomDrawTarget type
 VCL Reference

TCustomDrawTarget type

Used to specify the target of a custom drawing event.

Unit

ComCtrls

type TCustomDrawTarget = (dtControl, dtItem, dtSubItem);

Description

TCustomDrawTarget is used to indicate a specific type of custom drawing event. The following table lists the possible values:

Value	Meaning

dtControl	The event occurs when the entire control needs to be painted.

dtItem	The event occurs when an individual item within the control needs to be painted.

dtSubItem	The event occurs when a subitem needs to be painted.


TDate type
 VCL Reference

TDate type

See also

TDate is a used to represent a date.

Unit

Controls

type TDate = typeTDateTime;

Description

TDate represents a special type of TDateTime value that has no decimal part. A TDate value represents the number of days that have elapsed since 12/30/1899.


TDateTime type
 VCL Reference

TDateTime type

See also

TDateTime is a used by the date and time routines to hold date and time values.

Unit

System

type TDateTime = type Double;

Description

Most VCL objects represent date and time values using the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is fraction of a 24 hour day that has elapsed.

Following are some examples of TDateTime values and their corresponding dates and times:

0	12/30/1899 12:00 am
2.75	1/1/1900 6:00 pm
-1.25	12/29/1899 6:00 am
35065	1/1/1996 12:00 am
To find the fractional number of days between two dates, simply subtract the two values, unless one of the TDateTime values is negative. Similarly, to increment a date and time value by a certain fractional number of days, add the fractional number to the date and time value if the TDateTime value is positive.

When working with negative TDateTime values, computations must handle time portion separately. The fractional part reflects the fraction of a 24-hour day without regard to the sign of the TDateTime value. For example, 6:00 am on 12/29/1899 is –1.25, not –1 + 0.25, which would be –0.75. There are no TDateTime values between –1 and 0.

Note:	Delphi 1.0 calculated the date from year 1 instead of from 1899. To convert a Delphi 1.0 date to a TDateTime value in later versions of Delphi or in Kylix, subtract 693594.0 from the Delphi 1.0 date. The date format changed to be more compatible with OLE 2.0 Automation.


TDateTimeColors type
 VCL Reference

TDateTimeColors type

See also

Specifies colors used in a calendar control.

Unit

ComCtrls

type TDateTimeColors = TMonthCalColors;

Description

TDateTimeColors is provided for backward compatibility on the TDateTimePicker object.


TDimGroup type
 VCL Reference

TDimGroup type

See also

Indicates a group of dimensions in a decision source component.

Unit

Mxdb

type TDimGroup = (dgRow, dgCol, dgSum, dgPage, dgNone);

Description

Decision Source components use TDimGroup to identify a group of dimensions from a pivot state of the associated decision cube’s dimension map. Usually a TDimGroup value is used in combination with an index that specifies a particular dimension from the identified group.

The following table lists the possible values:

Value	Meaning

dgRow	Identifies the row dimensions of the current pivot state.

dgCol	Identifies the column dimensions of the current pivot state.

dgSum	Identifies the set of active summaries.

dgPage	Identifies a paged dimension in the current pivot state. Decision grids do not display paged dimensions. Rather, paged dimensions limit the entire display to summaries that represent a single value along the paged dimension.

dgNone	Not used.


TDockDropEvent type
 VCL Reference

TDockDropEvent type

Used in the OnDockDrop event.

Unit

Controls

type TDockDropEvent = procedure(Sender: TObject; Source: TDragDockObject;  X, Y: Integer) of object;

Description

Sender is the object on which another object is being dropped.

Source is information about the object that is being dropped.

X and Y are the coordinates of the mouse pointer.


TDockNotifyRec, PDockNotifyRec type
 VCL Reference

TDockNotifyRec, PDockNotifyRec type

Contains a Windows Docking notification message.

Unit

Controls

type

  PDockNotifyRec = ^TDockNotifyRec;

  TDockNotifyRec = record

    ClientMsg: Cardinal;

    MsgWParam: Integer;

    MsgLParam: Integer;

  end;

Description

ClientMsg is the Windows message ID.

MsgWParam is the message’s WParam.

MsgLParam is the message’s LParam.


TDockOrientation type
 VCL Reference

TDockOrientation type

Used to specify the orientation of controls in a docking zone.

Unit

Controls

type TDockOrientation = (doNoOrient, doHorizontal, doVertical);

Description

TDockOrientation can have one of the following values:

Value	Meaning

doNoOrient	The zone contains a control instead of child zones.

doHorizontal	The zone’s children are arranged top to bottom.

doVertical	The zone’s children are arranged left to right.


TDockOverEvent type
 VCL Reference

TDockOverEvent type

Used in the OnDockOver event.

Unit

Controls

type TDockOverEvent = procedure(Sender: TObject; Source: TDragDockObject; X, Y: Integer; State: TDragState; var Accept: Boolean) of object;

Description

Sender is the object over which another object is being dragged.

Source is information about the object that is being dragged.

X and Y are the coordinates of the mouse pointer.

DragState is the current drag state.

Accept returns whether or not the control accepts the dragged object for docking.


TDragKind type
 VCL Reference

TDragKind type

Indicates the type of operation that occurs when the user drags a control.

Unit

Controls

type TDragKind = (dkDrag, dkDock);

Description

TDragKind can have one of the following values:

Value	Meaning

dkDrag	The object is being dragged for a drag-and-drop operation.

dkDock	The object is being dragged for a drag-and-dock operation.


TDragMode type
 VCL Reference

TDragMode type

Indicates how a control initiates drag-and-drop or drag-and-dock operations.

Unit

Controls

type TDragMode = (dmManual, dmAutomatic);

Description

TDragMode can have one of the following values:

Value	Meaning

dmAutomatic	The control begins a drag operation automatically when the user clicks and drags it.

dmManual	The control can't be dragged until the application calls the BeginDrag method.


TDragState type
 VCL Reference

TDragState type

Used to specify how the mouse is moving in relation to a control.

Unit

ComCtrls

type TDragState = (dsDragEnter, dsDragLeave, dsDragMove);

Description

TDragState describes how the mouse is moving in relation to a control that it is passing over. It has one of the following values:

Value	Meaning

dsDragEnter	The mouse just moved over the control.

dsDragLeave	The mouse is moving off of the control.

dsDragMove	The mouse is moving while over the control.


TDrawingStyle type
 VCL Reference

TDrawingStyle type

Indicates the style to use when rendering an image from an image list.

Unit

Imglist

type TDrawingStyle = (dsFocus, dsSelected, dsNormal, dsTransparent);

Description

TDrawingStyle describes how to render an image from an image list component. The following table describes the possible values:

Value	Meaning

dsFocus	Draws the image blending 25% with the color specified by the BlendColor property. This only affects image lists that contain masks.

dsSelected	Draws the image blending 50% with the color specified by the BlendColor property. This only affects image lists that contain masks.

dsNormal	Draws the image using the color specified in the BkColor property. If the BkColor is clNone, the image is drawn transparently using the mask.

dsTransparent	Draws using the mask regardless of the BkColor setting.


TDrawItemEvent type
 VCL Reference

TDrawItemEvent type

The type of an OnDrawItem event handler.

Unit

StdCtrls

type TDrawItemEvent = procedure(Control: TWinControl; Index: Integer Rect: TRect; State: TOwnerDrawState) of object;

Description

TDrawItemEvent includes the following parameters:

Control	A reference to the control containing the item.

Index	The index of the item in the Items property.

Rect	The coordinates of the item on the control’s canvas.

State	The state of the item, which indicates whether the item is selected, checked, focused, and so on.


TDrawTabEvent type
 VCL Reference

TDrawTabEvent type

The type of the TCustomTabControl.OnDrawTab event handler.

Unit

ComCtrls

type TDrawTabEvent = procedure(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean) of object;

Description

Control is the tab control in which a tab is about to be drawn.

TabIndex is the index of the tab that is about to be drawn.

Rect is the area in which the tab is about to be drawn.

Active specifies whether the tab is active.


TDuplicates type
 VCL Reference

TDuplicates type

See also

Indicates how a TStrings descendant responds when an application attempts to add a duplicate string to the list.

Unit

Classes

type TDuplicates = (dupIgnore, dupAccept, dupError);

Description

TDuplicates can have one of the following values:

Value	Meaning

dupIgnore	Ignore attempts to add duplicate strings (do not add the duplicate string).

dupAccept	Allow the list to contain duplicate strings (add the duplicate string).

dupError	Raise an exception when the application tries to add a duplicate string.


TEdgeBorder, TEdgeBorders type
 VCL Reference

TEdgeBorder, TEdgeBorders type

TEdgeBorders is the type of the EdgeBorders property.

Unit

ToolWin

type

  TEdgeBorder = (ebLeft, ebTop, ebRight, ebBottom);

  TEdgeBorders = set of TEdgeBorder;

Description

TEdgeBorders is a set of TEdgeBorder values. Each TEdgeBorder value indicates whether a beveled edge appears on a particular side of a control. The following table lists the TEdgeBorder values:

Value	Meaning

ebLeft	The control has a beveled left edge.

ebTop	The control has a beveled top edge.

ebRight	The control has a beveled right edge.

ebBottom	The control has a beveled bottom edge.


TEdgeStyle type
 VCL Reference

TEdgeStyle type

TEdgeStyle describes the appearance of an edge border.

Unit

ToolWin

type TEdgeStyle = (esNone, esRaised, esLowered);

Description

TEdgeStyle indicates the appearance of a particular border. The following table lists the possible values:

Value	Meaning

esNone	The border is not drawn.

esRaised	The border appears raised.

esLowered	The border appears lowered.


TEditMask type
 VCL Reference

TEditMask type

Represents the mask that validates and formats user input.

Unit

MaskUtils

type

  TEditMask = type string;

Description

TEditMask is a string that consists of three fields with semicolons separating them. The first part of the mask is the mask itself. The second part is the character that determines whether the literal characters of a mask are saved as part of the data. The third part of the mask is the character used to represent unentered characters in the mask.

These are the special characters used in the first field of the mask:

Character	Meaning in mask

 !	If a ! character appears in the mask, optional characters are represented in the text as leading blanks. If a ! character is not present, optional characters are represented in the text as trailing blanks.

 >	If a > character appears in the mask, all characters that follow are in uppercase until the end of the mask or until a < character is encountered.

 <	If a < character appears in the mask, all characters that follow are in lowercase until the end of the mask or until a > character is encountered.

 <>	If these two characters appear together in a mask, no case checking is done and the data is formatted with the case the user uses to enter the data.

\	The character that follows a \ character is a literal character. Use this character to use any of the mask special characters as a literal in the data.

 L	The L character requires an alphabetic character only in this position. For the US, this is A-Z, a-z.

 l	The l character permits only an alphabetic character in this position, but doesn't require it.

A	The A character requires an alphanumeric character only in this position. For the US, this is A-Z, a-z, 0-9.

 a	The a character permits an alphanumeric character in this position, but doesn't require it.

C	The C character requires an arbitrary character in this position.

 c	The c character permits an arbitrary character in this position, but doesn't require it.

 0	The 0 character requires a numeric character only in this position.

 9	The 9 character permits a numeric character in this position, but doesn't require it.

#	The # character permits a numeric character or a plus or minus sign in this position, but doesn't require it.

:	The : character is used to separate hours, minutes, and seconds in times. If the character that separates hours, minutes, and seconds is different in the regional settings of the Control Panel utility on your computer system, that character is used instead.

 /	The / character is used to separate months, days, and years in dates. If the character that separates months, days, and years is different in the regional settings of the Control Panel utility on your computer system, that character is used instead.

 ;	The ; character is used to separate the three fields of the mask.

 _	The _ character automatically inserts spaces into the text. When the user enters characters in the field, the cursor skips the _ character.

Any character that does not appear in the preceding table can appear in the first part of the mask as a literal character. Literal characters must be matched exactly in the edit control. They are inserted automatically, and the cursor skips over them during editing. The special mask characters can also appear as literal characters if preceded by a backslash character (\).

The second field of the mask is a single character that indicates whether literal characters from the mask should be included as part of the text for the edit control. For example, the mask for a telephone number with area code could be the following string:

(000)_000-0000;0;*

The 0 in the second field indicates that the Text property for the edit control would consist of the 10 digits that were entered, rather than the 14 characters that make up the telephone number as it appears in the edit control.

A 0 in the second field indicates that literals should not be included, any other character indicates that they should be included. The character that indicates whether literals should be included can be changed in the Edit Mask property editor, or programmatically by changing the MaskNoSave typed constant.

The third field of the mask is the character that appears in the edit control for blanks (characters that have not been entered). By default, this is the same as the character that stands for literal spaces. The two characters appear the same in an edit window. However, when a user edits the text in a masked edit control, the cursor selects each blank character in turn, and skips over the space character.

Note:	When working with multibyte character sets, such as Japanese Shift-JIS, each special mask character represents a single byte. To specify multi-byte characters using the L, l, A, a, C, or c specifiers, the mask characters must be duplicated as well. For example, LL would represent two single-byte alphabetic characters or a one double-byte character. Only single-byte literal characters are supported.


TEditStyle type
 VCL Reference

TEditStyle type

Indicates whether a cell in a grid contains a drop-down arrow or ellipsis button.

Unit

Grids

type TEditStyle = (esSimple, esEllipsis, esPickList);

Description

TEditStyle describes the buttons, if any, that can appear in the cell of a grid. It can be any of the following values:

Value	Meaning

esSimple	The cell acts as a simple edit control where users can type a new value.

esEllipsis	The cell contains an ellipsis button that users can click to launch a dialog.

esPickList	The cell contains a drop-down arrow button that users can click to display a pick list of possible values.


TEndDragEvent type
 VCL Reference

TEndDragEvent type

Used for OnEndDrag and OnEndDock event handlers.

Unit

Controls

type TEndDragEvent = procedure(Sender, Target: TObject; X, Y: Integer) of object;

Description

The Sender is the object being dragged, Target is the object Sender is dragged to, and X and Y are screen coordinates in pixels.

The OnEndDrag event is received by Sender. If the dragged object was dropped or docked and accepted by a control, the Target parameter of the OnEndDrag event is set to the object that accepted the sender. If the object was not dropped successfully, the value of Target is nil.


TEnumModuleFunc type
 VCL Reference

TEnumModuleFunc type

See also

TEnumModuleFunc is the type of the callback function used in module enumeration.

Unit

System

type TEnumModuleFunc = function (HInstance: Integer; Data: Pointer): Boolean;

Description

TEnumModuleFunc is the type of a user-defined callback function passed as a parameter to the EnumModules and the EnumResourceModules procedures. TEnumModuleFunc receives an instance handle (HInstance) and a user-defined data value for every module enumerated. The parameters to TEnumModuleFunc are as follows:

Parameter	Meaning

HInstance	The instance handle of the module being enumerated.

Data	A 32-bit user-defined value passed to the enumeration procedure.

To continue enumerating modules, TEnumModuleFunc must return True; to stop enumerating modules, it must return False.


TEnumModuleFuncLW type
 VCL Reference

TEnumModuleFuncLW type

See also

TEnumModuleFuncLW is the type of the callback function used in module enumeration.

Unit

System

type TEnumModuleFuncLW = function (HInstance: LongWord; Data: Pointer): Boolean;

Description

TEnumModuleFuncLW is the type of a user-defined callback function passed as a parameter to the EnumModules and the EnumResourceModules procedures. TEnumModuleFuncLW receives an instance handle (HInstance) and a user-defined data value for every module enumerated. The parameters to TEnumModuleFuncLW are as follows:

Parameter	Meaning

HInstance	The instance handle of the module being enumerated (as a long word).

Data	A 32-bit user-defined value passed to the enumeration procedure.

To continue enumerating modules, TEnumModuleFuncLW must return True; to stop enumerating modules, it must return False.


ExceptClass type
 VCL Reference

ExceptClass type

Specifies an exception class.

Unit

SysUtils

ExceptClass = class ofException;

Description

Use ExceptClass to refer to the type of a descendant of Exception.


TFileName type
 VCL Reference

TFileName type

TFileName is a string that represents a file name.

Unit

SysUtils

type

  TFileName = typestring;

Description

Use TFileName to represent strings that are only used for file names.


TFileRec type
 VCL Reference

TFileRec type

See also

TFileRec is the internal format for typed and untyped files.

Unit

System

type TFileRec = packed record

    Handle: Integer;

    Mode: Word;

    Flags: Word;

    case Byte of

      0: (RecSize: Cardinal);   //  files of record

      1: (BufSize: Cardinal;    //  text files

          BufPos: Cardinal;

          BufEnd: Cardinal;

          BufPtr: PChar;

          OpenFunc: Pointer;

          InOutFunc: Pointer;

          FlushFunc: Pointer;

          CloseFunc: Pointer;

          UserData: array[1..32] of Byte;

          Name: array[0..259] of Char; );

  end;

Description

TFileRec is the internal format for typed and untyped files. TFileRec enables you to typecast a file variable to access its internal fields.

You would normally never declare a variable of this type.


TFindOption, TFindOptions types
 VCL Reference

TFindOption, TFindOptions types

Determines the controls that appear in a find dialog.

Unit

Dialogs

type

  TFindOption = (frDown, frFindNext, frHideMatchCase, frHideWholeWord, frHideUpDown, frMatchCase, frDisableMatchCase, frDisableUpDown, frDisableWholeWord, frReplace, frReplaceAll, frWholeWord, frShowHelp);

  TFindOptions = set of TFindOption;

Description

TFindOption values determine which controls are enabled in a TFindDialog instance, and how the controls are initialized.

TFindOptions is a set of TFindOption values.

The following table lists the possible values:

Value	Meaning

frDisableMatchCase	Disables (grays) the Match Case check box in a find dialog.

frDisableUpDown	Disables (grays) the Up and Down buttons, which determine the direction of the search.

frDisableWholeWord	Disables (grays) the Match Whole Word check box of find dialog.

frDown	Selects the Down button by default when the dialog opens. If the frDown flags is off, Up is selected when the dialog opens. (By default, frDown is on.)

frFindNext	This flag is turned on when the user clicks the Find Next button and turned off when the dialog closes.

frHideMatchCase	Removes the Match Case check box from the dialog.

frHideWholeWord	Removes the Match Whole Word check box from the dialog.

frHideUpDown	Removes the Up and Down buttons from the dialog.

frMatchCase	This flag is turned on (off) when the user selects (deselects) the Match Case check box. To select the check box by default when the dialog opens, set frMatchCase at design time.

frReplace	Applies to TReplaceDialog only. This flag is set by the system to indicate that the application should replace the current occurrence (and only the current occurrence) of the FindText string with the ReplaceText string. Not used in search routines.

frReplaceAll	Applies to TReplaceDialog only. This flag is set by the system to indicate that the application should replace all occurrences of the FindText string with the ReplaceText string.

frShowHelp	Displays a Help button in the dialog.

frWholeWord	This flag is turned on (off) when the user selects (deselects) the Match Whole Word check box. To select the check box by default when the dialog opens, set frWholeWord at design time.


TFloatFormat type
 VCL Reference

TFloatFormat type

See also

TFloatFormat is an enumerated list of formatting codes for float functions.

Unit

SysUtils

type TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency);

Description

TFloatFormat defines an enumerated list of formatting codes for the float functions.

Format	Defines
ffGeneral	General number format. The value is converted to the shortest possible decimal string using fixed or scientific format. Trailing zeros are removed from the resulting string, and a decimal point appears only if necessary. The resulting string uses fixed point format if the number of digits to the left of the decimal point in the value is less than or equal to the specified precision, and if the value is greater than or equal to 0.00001. Otherwise the resulting string uses scientific format, and the Digits parameter specifies the minimum number of digits in the exponent (between 0 and 4).
ffExponent	Scientific format. The value is converted to a string of the form "-d.ddd...E+dddd". The resulting string starts with a minus sign if the number is negative, and one digit always precedes the decimal point. The total number of digits before the exponent in the resulting string (including the one before the decimal point) is given by the Precision parameter. The "E" exponent character in the resulting string is always followed by a plus or minus sign and up to four digits. The Digits parameter specifies the minimum number of digits in the exponent (between 0 and 4).
ffFixed	Fixed point format. The value is converted to a string of the form "-ddd.ddd...". The resulting string starts with a minus sign if the number is negative, and at least one digit always precedes the decimal point. The number of digits after the decimal point is given by the Digits parameter--it must be between 0 and 18. If the number of digits to the left of the decimal point is greater than the specified precision, the resulting value will use scientific format.
ffNumber	Number format. The value is converted to a string of the form "-d,ddd,ddd.ddd...". The ffNumber format corresponds to the ffFixed format, except that the resulting string contains thousand separators.
ffCurrency	Currency format. The value is converted to a string that represents a currency amount. The conversion is controlled by the CurrencyString, CurrencyFormat, NegCurrFormat, ThousandSeparator, and DecimalSeparator global variables, all of which are initialized from the Currency Format in the International section of the Windows Control Panel. The number of digits after the decimal point is given by the Digits parameter--it must be between 0 and 18.


TFloatRec type
 VCL Reference

TFloatRec type

TFloatRec is the result record for FloatToDecimal.

Unit

SysUtils

type TFloatRec = record
  Exponent: Smallint;
  Negative: Boolean;
  Digits: array[0..20] of Char;
end;

Description

TFloatRec is the FloatToDecimal result record. Values are stored in a TFloatRec record as follows:

Field	Value

Exponent	Contains the magnitude of the number, i.e. the number of significant digits to the right of the decimal point. The Exponent field is negative if the absolute value of the number is less than one. If the number is a NAN (not-a-number), Exponent is set to -32768. If the number is INF or -INF (positive or negative infinity), Exponent is set to 32767.

Negative	True if the number is negative, False if the number is zero or positive.

Digits	Contains up to 18 (for type Extended) or 19 (for type Currency) significant digits followed by a null terminator. The implied decimal point (if any) is not stored in Digits. Trailing zeros are removed, and if the resulting number is zero, NAN, or INF, Digits contains nothing but the null terminator.


TFloatValue type
 VCL Reference

TFloatValue type

TFloatValue is the type of the ValueType parameter for floating point conversion routines.

Unit

SysUtils

type TFloatValue = (fvExtended, fvCurrency);

Description

TFloatValue is the type of the ValueType parameter of the FloatToText, FloatToTextFmt and TextToFloat functions and the FloatToDecimal procedure. The ValueType parameter indicates whether the value being passed to the function or procedure is a Currency value or a normal floating-point value.

Value	Meaning

fvExtended	The value is a normal floating-point type.

fvCurrency	The value is a Currency type.


TFontCharset type
 VCL Reference

TFontCharset type

TFontCharset represents the character set of a font.

Unit

Graphics

type TFontCharSet = 0..255;

Description

Each Windows typeface supports one or more character sets, which indicate what characters can be written using the font. For example, most fonts that can represent japanese characters use a particular multi-byte character set.

Each font supports its own, unique set of character sets. Check with the font vendor to determine which character sets are supported.

The following table lists the predefined constants provided for standard character sets:

Constant	Value	Description

ANSI_CHARSET	0	ANSI characters.

DEFAULT_CHARSET	1	Font is chosen based solely on Name and Size. If the described font is not available on the system, Windows will substitute another font.

SYMBOL_CHARSET	2	Standard symbol set.

MAC_CHARSET	77	Macintosh characters. Not available on NT 3.51.

SHIFTJIS_CHARSET	128	Japanese shift-JIS characters.

HANGEUL_CHARSET	129	Korean characters (Wansung).

JOHAB_CHARSET	130	Korean characters (Johab). Not available on NT 3.51

GB2312_CHARSET	134	Simplified Chinese characters (mainland china).

CHINESEBIG5_CHARSET	136	Traditional Chinese characters (Taiwanese).

GREEK_CHARSET	161	Greek characters. Not available on NT 3.51.

TURKISH_CHARSET	162	Turkish characters. Not available on NT 3.51

VIETNAMESE_CHARSET	163	Vietnamese characters. Not available on NT 3.51.

HEBREW_CHARSET	177	Hebrew characters. Not available on NT 3.51

ARABIC_CHARSET	178	Arabic characters. Not available on NT 3.51

BALTIC_CHARSET	186	Baltic characters. Not available on NT 3.51.

RUSSIAN_CHARSET	204	Cyrillic characters. Not available on NT 3.51.

THAI_CHARSET	222	Thai characters. Not available on NT 3.51

EASTEUROPE_CHARSET	238	Includes diacritical marks for eastern european countries. Not available on NT 3.51.

OEM_CHARSET	255	Depends on the codepage of the operating system.


TFormBorderStyle, TBorderStyle types
 VCL Reference

TFormBorderStyle, TBorderStyle types

TFormBorderStyle is the type of the BorderStyle property for Forms and windows.  TBorderStyle is the type of the BorderStyle property for other controls.

Unit

Forms

type

  TFormBorderStyle = (bsNone, bsSingle, bsSizeable, bsDialog, bsToolWindow, bsSizeToolWin);

  TBorderStyle = bsNone..bsSingle;

Description

These are the possible values of the TFormBorderStyle type:

Value	Meaning

bsNone	No visible border. (not resizable)

bsSingle	Single-line border. (not resizable)

bsDialog	Standard dialog box border. (not resizable)

bsSizeable	Standard resizable border.

bsToolWindow	Like bsSingle but with a smaller caption.

bsSizeToolWin	Like bsSizeable but with a smaller caption.

Only the bsNone and bsSingle values are possible values of TBorderStyle.


TGetChildProc type
 VCL Reference

TGetChildProc type

See also

The type of the Proc parameter of the GetChildren method.

Unit

Controls

type TGetChildProc = procedure (Child: TComponent) of object;

Description

The component streaming system uses TGetChildProc to execute callbacks for all the children of a given component. By using callbacks, the streaming system allows components to adjust which children are loaded and saved with the component.

The Child parameter is the child component for which the callback is executed. The GetChildren method calls the callback for each child that should be loaded or saved by the streaming system.


TGetSiteInfoEvent type
 VCL Reference

TGetSiteInfoEvent type

The type of the OnGetSiteInfo event handler.

Unit

Controls

type TGetSiteInfoEvent = procedure(Sender: TObject; DockClient: TControl; var InfluenceRect: TRect; MousePos: TPoint; var CanDock: Boolean) of object;

Description

Sender is the dock site.

DockClient is the control being dragged.

InfluenceRect is the rectangle in which the mouse must be positioned for the dock site to accept a dragged control. By default, InfluenceRect is the area of the target control, expanded by 10 pixels on each side. This can be adjusted by the event handler.

MousePos is the position of the mouse pointer.

CanDock returns whether the dragged control can be docked to the dock site.


TGetStrProc type
 VCL Reference

TGetStrProc type

TGetStrProc is the type for callback functions that are called once for every string in a set of strings.

Unit

Classes

type TGetStrProc = procedure(const S: string) of object;

Description

Use TGetStrProc as the type of a callback function that responds to a set of string values. The function is called once for every string in the set, with the S parameter set to the current string.


TGridAxisDrawInfo, TGridDrawInfo type
 VCL Reference

TGridAxisDrawInfo, TGridDrawInfo type

Represents information that is useful when rendering a grid.

Unit

Grids

type

  TGetExtentsFunc = function(Index: Longint): Integer of object;

  TGridAxisDrawInfo = record

    EffectiveLineWidth: Integer;

    FixedBoundary: Integer;

    GridBoundary: Integer;

    GridExtent: Integer;

    LastFullVisibleCell: Longint;

    FullVisBoundary: Integer;

    FixedCellCount: Integer;

    FirstGridCell: Integer;

    GridCellCount: Integer;

    GetExtent: TGetExtentsFunc;

  end;

  TGridDrawInfo = record

    Horz, Vert: TGridAxisDrawInfo;

  end;

Description

TGridDrawInfo encapsulates information that reflects the layout of the grid axes. Each axis is described by a TGridAxisDrawInfo record, which encodes information about the size of the axis and the type and number of cells along that axis.


TGridDrawState type
 VCL Reference

TGridDrawState type

TGridDrawState represents information that is useful when rendering the cell of a grid.

Unit

Grids

type

  TGridDrawState = set of (gdSelected, gdFocused, gdFixed);

Description

TGridDrawState represents state information about the cell of a grid that is being rendered. It is a set that includes 0 or more of the following:

Value	Meaning

gdSelected	The cell is currently selected.

gdFocused	The cell has input focus.

gdFixed	The cell is in the fixed region of the grid.


TGridState type
 VCL Reference

TGridState type

TGridState indicates any user actions that are currently changing the layout of the grid.

Unit

Grids

type TGridState = (gsNormal, gsSelecting, gsRowSizing, gsColSizing, gsRowMoving, gsColMoving );

Description

TGridState represents state information about how the grid layout is changing. The following table lists the possible values:

Value	Meaning

gsNormal	The grid layout is not changing.

gsSelecting	The user is selecting a cell or row.

gsRowSizing	The user is changing the height of a row.

gsColSizing	The user is changing the width of a column.

gsRowMoving	The user is dragging a row to a new position.

gsColMoving	The user is dragging a column to a new position.


THeaderStyle type
 VCL Reference

THeaderStyle type

Used to specify a header style.

Unit

ComCtrls

type THeaderStyle = (hsButtons, hsFlat);

Description

THeaderStyle can have one of the following values:

Value	Meaning

hsButtons	The column sections are buttons.

hsFlat	The column sections are flat buttons.


THelpContext type
 VCL Reference

THelpContext type

Represents a WinHelp context ID.

Unit

Classes

type THelpContext = -MaxLongInt..MaxLongInt;

Description

The WindowsHelp system associates each help topic with a unique number, or context ID. An application identifies the topic to WinHelp by passing this context ID.

THelpContext values are used both when associating controls, menu items, and dialogs with help topics and when invoking the Windows help system.


THelpType type
 VCL Reference

THelpType type

THelpType indicates whether components invoke the help system using a context ID or a keyword.

Unit

Classes

type THelpType = (htKeyword, htContext);

Description

These are the possible values of the THelpType type:

Value	Meaning

htKeyword	Help topics are identified by a string. The HelpKeyword property is used to identify help topics. This mechanism is available for all help systems.

htContext	Help topics are identified by a context ID. The HelpContext property is used to identify help topics. This mechanism is not available for all help systems, but is typically faster for those systems that support it.


THintInfo type
 VCL Reference

THintInfo type

See also

THintInfo is used to define the appearance and behavior of the Help window.

Unit

Forms

type

  THintWindowClass = class of THintWindow;

  THintInfo = record

    HintControl: TControl;

    HintWindowClass: THintWindowClass;

    HintPos: TPoint;

    HintMaxWidth: Integer;

    HintColor: TColor;

    CursorRect: TRect;

    CursorPos: TPoint;

    ReshowTimeout: Integer;

    HideTimeout: Integer;

    HintStr: string;

    HintData: Pointer;

  end;

Description

The THintInfo type is used to define the appearance and behavior of the Help window in a TShowHintEvent type OnShowHint event handler. The following table describes the meaning of its fields:

Field	Meaning

HintControl	The name of the control for which hint processing is occurring.

HintWindowClass	The class of the hint-window control. The default is THintWindow, but you can specify any class derived from THintWindow. Use this field if you want to substitute a custom hint window for THintWindow.

HintPos 	The default position in screen coordinates of the top-left corner of the hint window. Change where the window appears by changing this value.

HintMaxWidth	The maximum width of the hint window before word wrapping begins. By default, the value is the width of the screen (Screen.Width).

HintColor	The background color of the Hint window.

CursorRect	The rectangle the user's mouse pointer must be in for the hint window to appear. The default value for CursorRect is the client rectangle of the control. Change this value so that a single control can be divided into several hint regions. When the user moves the mouse pointer outside the rectangle, the hint window disappears.

CursorPos 	The location of the mouse pointer within the control.

ReshowTimeout 	How long the hint system should wait before asking about the hint status again. By default, this field is zero, indicating that the hint status will not change. Setting it to a non-zero value will cause the hint to act, after the requested milliseconds have elapsed, as if the user moved the mouse outside the hint rectangle and back in. This can be used to either put off hint processing for a period of time, or to allow the hint to be updated periodically.

HideTimeout 	The number of milliseconds to show the hint. It is set to Application.HintHidePause by default.

HintStr 	The string to be displayed in the hint window. This allows an OnHint event handler to modify the contents of a hint before it is displayed. By default it contains the value of the following expression: GetShortHint(Application.Hint).

HintData	Additional data to be passed to the hint-window control. Use this field in conjunction with HintWindowClass.


THitTest, THitTests type
 VCL Reference

THitTest, THitTests type

Used in the GetHitTestInfoAt method.

Unit

ComCtrls

type

  THitTest = (htAbove, htBelow, htNowhere, htOnItem, htOnButton, htOnIcon, htOnIndent, htOnLabel, htOnRight, htOnStateIcon, htToLeft, htToRight);

  THitTests = set of THitTest;

Description

THitTests is a set of THitTest values. THitTest can have any of the following values:

Value	Means the point is

htAbove	Above the client area.

htBelow	Below the client area.

htNowhere	Inside the control, but not on an item.

htOnItem	On an item, its text, or its bitmap.

htOnButton	On a button.

htOnIcon	On an icon.

htOnIndent	On the indented area of an item.

htOnLabel	On a label.

htOnRight	On the right side of an item.

htOnStateIcon	On a state icon or bitmap associated with an item.

htToLeft	To the left of the client area.

htToRight	To the right of the client area.


TTBButtonEvent type
 VCL Reference

TTBButtonEvent type

See also

The type of event handlers that respond when the user adds or deletes a tool button in the toolbar customize dialog.

Unit

ComCtrls

type TTBButtonEvent = procedure(Sender: TToolBar; Button: TToolButton) of object;

Description

TTBButtonEvent is the type for the OnCustomizeAdded and OnCustomizeDelete events. It allows a toolbar to respond to notifications of changes that the user makes to the items in the toolbar.

Sender is the toolbar whose button was just added or deleted.

Button is the button that was just added or deleted.


TTBCustomizeQueryEvent type
 VCL Reference

TTBCustomizeQueryEvent type

See also

The type of event handlers that allow a toolbar to decide whether to allow a user customization.

Unit

ComCtrls

type TTBCustomizeQueryEvent = procedure(Sender: TToolBar; Index: Integer; var Allow: Boolean) of object;

Description

TTBCustomizeQueryEvent is the type for the OnCustomizeCanInsert and OnCustomizeCanDelete events. It allows a toolbar to approve or block the insertion or deletion of a button by the user.

Sender is the customizable toolbar that the user is trying to modify.

Index is the index of the button to be deleted or the index where a new button is to be inserted.

Allow returns an indication of whether the user can proceed with the operation. On entry, Allow is True, indicating that the user can add or delete the button. The event handler can change Allow to False to block the change to the toolbar.


TIdentToInt type
 VCL Reference

TIdentToInt type

See also

TIdentToInt is a function that converts a text identifier to an integer value.

Unit

Classes

type TIdentToInt = function(const Ident: string; var Int: Longint): Boolean;

Description

TIdentToInt is the type of a function that is used in the streaming system to convert text identifiers in the stream to their integer values. Component writers can create a function of this type to define their own named integer values and then register it using the RegisterIntegerConsts procedure.

The Ident parameter specifies a string identifier that stands for a numeric type value.

The Int parameter is used to return the corresponding integer value.

The return value indicates whether the identifier was successfully converted into an integer.

Note:	For an example of this type of function, see the implementation of IdentToColor and IdentToCharset in the Graphics unit.


TImageType type
 VCL Reference

TImageType type

Indicates whether to use a mask when rendering an image from an image list.

Unit

Imglist

type TImageType = (itImage, itMask);

Description

TImageType indicates whether to use a mask when rendering an image in an image list. It includes the following values:

Value	Meaning

itImage	Image does not include a mask.

itMask	Image uses a mask.


TImeMode type
 VCL Reference

TImeMode type

TImeMode represents the current mode of an Input Method Editor (IME).

Unit

Controls

type TImeMode = (imDisable, imClose, imOpen, imDontCare, imSAlpha, imAlpha, imHira, imSKata, imKata, imChinese, imSHanguel, imHanguel);

Description

TImeMode represents the way an Input Method Editor operates to convert keyboard input typed on an Asian version of Windows. TImeMode has the following values:

Value	Meaning

imDisable	Shut down the IME. imDisable has no effect on Chinese, Taiwanese, or Korean IMEs.

imClose	Close the IME conversion window, but leave the IME running in the background. The IME can be reactivated by a hot key combination.

imOpen	Open the IME conversion window. The conversion mode is the last conversion mode used by the IME.

imDontCare	Launch the IME if it is disabled. The conversion mode is the last conversion mode used by the IME.

imSAlpha	Open the IME conversion window and set the conversion mode to accept single-width Roman alphabet input.

imAlpha	Open the IME conversion window and set the conversion mode to accept double-width Roman alphabet input.

imHira	Open the IME conversion window and set the conversion mode to double-width Hiragana. imHira is only available for Japanese IMEs.

imSKata	Open the IME conversion window and set the conversion mode to single-width Katakana (Hankaku Katakana). imSKata is only available for Japanese IMEs.

imKata	Open the IME conversion window and set the conversion mode to double-width Katakana (Zenkaku Katakana). imKata is only available for Japanese IMEs.

imChinese	Open the IME conversion window and set the conversion mode to double-width Chinese. imChinese is only available for Chinese IMEs.

imSHanguel	Open the IME conversion window and set the conversion mode to single-width Hanguel. imSHanguel is only available for Korean IMEs.

imHanguel	Open the IME conversion window and set the conversion mode to double-width Hanguel. imHanguel is only available for Korean IMEs.


TImageIndex type
 VCL Reference

TImageIndex type

See also

TImageIndex represents the index of an image in a TImageList component.

Unit

ImgList

type TImageIndex = type Integer;

Description

TImageIndex is the type for properties that represent an image in an image list. Each value is the index of an image in TImageList’s internal list, where 0 specifies the first image, 1 specifies the second image, and so on. To indicate that the property does not represent any of the images, use a TImageList value of –1.


TInAddr type
 VCL Reference

TInAddr type

See also

TInAddr represents the Internet socket address structure used in Windows socket API calls to represent a socket host.

Unit

Winsock

type

  SunB = packed record

    s_b1, s_b2, s_b3, s_b4: u_char;

  end;

  SunW = packed record

    s_w1, s_w2: u_short;

  end;

  TInAddr = packed record

    case integer of

      0: (S_un_b: SunB);

      1: (S_un_w: SunW);

      2: (S_addr: u_long);

  end;

Description

TSockAddrIn represents the portion of a Windows socket address that describes the host.


 VCL Reference

 $TInterfaceEntry, PInterfaceEntry types

Encapsulates the information needed to dispatch interface calls.

Unit

System

type

  PInterfaceEntry = ^TInterfaceEntry;

  TInterfaceEntry = packed record

    IID: TGUID;

    VTable: Pointer;

    IOffset: Integer;

    ImplGetter: Integer;

  end;

Description

PInterfaceEntry is a pointer to a TInterfaceEntry record.

TInterfaceEntry contains the following fields:

IID:	The GUID that uniquely identifies the interface.

VTable:	The VTable to use for dispatching interface calls.

IOffset	The offset of the interface in the implementing object.

ImplGetter	A method pointer for accessing the interface if IOffset is not available.


TIntToIdent type
 VCL Reference

TIntToIdent type

See also

TIntToIdent is the type of a function that converts an integer to a text identifier.

Unit

Classes

type TIntToIdent = function(Int: Longint; var Ident: string): Boolean;

Description

TIntToIdent is the type of a function that is used in the streaming system to convert integer values to text identifiers when saving property values. Component writers create a function of this type to define their own named integer values and then register it using the RegisterIntegerConsts procedure.

The Int parameter specifies a integer type value.

The Ident parameter is used to return the corresponding string identifier.

The return value indicates whether the integer was successfully converted into a string.

Note:	For an example of this type of function, see the implementation of ColorToIdent and CharsetToIdent in the Graphics unit.


TItemChange type
 VCL Reference

TItemChange type

See also

Describes what type of change a list item undergoes.

Unit

ComCtrls

type TItemChange = (ctText, ctImage, ctState);

Description

TItemChange can have one of the following values:

Value	Meaning

ctText	A change to the Caption property of the list item.

ctImage	A change to the list item’s ImageIndex property or the list view’s image list.

ctState	A change to the list item’s Cut, Focused, or Selected property.


TItemFind type
 VCL Reference

TItemFind type

Used in the TCustomListView.OnDataFind event handler to specify a type of search.

Unit

ComCtrls

type TItemFind = (ifData, ifPartialString, ifExactString, ifNearest);

Description

TItemFind can have one of the following values:

Value	Meaning

ifData	Search for matching Data.

ifPartialString	Search for a partial string match.

ifExactString	Search for an exact string match.

ifNearest	Search for the nearest match.


TItemState, TItemStates type
 VCL Reference

TItemState, TItemStates type

Used to specify the state of an item in a list view control.

Unit

ComCtrls

type

  TItemState = (isNone, isCut, isDropHilited, isFocused, isSelected, isActivating);

  TItemStates = set of TItemState;

Description

TItemState indicates the state of an item in a list view. It can have any of the following values:

Value	Meaning

isNone	Item is in its default state

isCut	Item is cut (for cut and paste operation)

isDropHilited	Item is highlighted as a drag-and-drop target

isFocused	Item is focused

isSelected	Item is selected

isActivating	Item is active


TListAssignOp type
 VCL Reference

TListAssignOp type

Indicates how two lists should be merged.

Unit

Classes

type TListAssignOp = (laCopy, laAnd, laOr, laXor, laSrcUnique, laDestUnique);

Description

TListAssignOps describes how the Assign method combines a source and destination list:

Value	Meaning

laAnd	Removes all elements from the destination list that do not appear in the source list. The destination list ends up containing the intersection of the two lists.

laCopy	Overwrites the destination list with the source list.

laDestUnique	Removes all elements from the destination list that appear in the source list. The destination list ends up containing the elements unique to the original destination list. (same as laOr followed by laXor)

laOr	Adds any elements from the source list that do not already appear in the destination list. The destination list ends up containing the union of the two lists.

laSrcUnique	Replaces the destination list with those elements of the source list that do not appear in the destination list. (same as laAnd followed by laXor)

laXor	Removes all elements from the destination list that appear in the source list and adds any elements from the source list that do not appear in the original destination list. The destination list ends up with the elements unique to both the source and destination lists.


TListHotTrackStyle, TListHotTrackStyles type
 VCL Reference

TListHotTrackStyle, TListHotTrackStyles type

Used to specify hot tracking styles for a list view control.

Unit

ComCtrls

type

  TListHotTrackStyle = (htHandPoint, htUnderlineCold, htUnderlineHot);

  TListHotTrackStyles = set of TListHotTrackStyle;

Description

TListHotTrackStyles describes how hot tracking occurs in a list view control. It can have any of the following values:

Value	Meaning

htHandPoint	The mouse cursor turns into a hand.

htUnderlineCold	An underline is displayed under all untracked items.

htUnderlineHot	An underline is displayed under the tracked item.


TListViewItemType type
 VCL Reference

TListViewItemType type

Designates a group of standard menu items that are added to a components local menu in the form designer.

Unit

QComCtrls

type
  TListViewItemType = (itDefault, itCheckBox, itRadioButton, itController);

Description

TListViewItemType designates types of list view items and tree view nodes.

Value	Description

itDefault	Item or node has no special features..

itCheckBox	Item or node that is part of a check list. Only valid for list items, top level tree nodes, and tree nodes that are children of controller nodes.

itRadioButton	Node that is part of radio button group. Only valid for tree nodes that are children of controller nodes.

itController	Controller node that can have check box or radio button children.


TLocalMenuFilters type
 VCL Reference

TLocalMenuFilters type

Designates a group of standard menu items that are added to a components local menu in the form designer.

Unit

Dsgnintf

type
  TLocalMenuFilter = (lmModule, lmSelection, lmComponent, lmDesigner);
  TLocalMenuFilters = setof TLocalMenuFilter;

Description

TLocalMenuFilter categorizes the standard menu items added to a component’s context menu. TLocalMenuFilters is a set of these categories that indicates which menu items are to be considered. The following table describes the possible values:

Value	Description

lmModule	Menu items that affect the module associated with the form being designed. For example “Text DFM”.

lmSelection	Menu items that affect the selected components in the Form designer. For example “Copy”.

lmComponent	Menu items that operate on the control whose context menu is displayed. For example “Align to Grid”.

lmDesigner	Menu items that operate on multiple components in the designer. For example “Size”.


TLVDrawItemEvent type
 VCL Reference

TLVDrawItemEvent type

Used for the list view OnCustomDrawItem and OnDrawItem events.

Unit

ComCtrls

type TLVDrawItemEvent = procedure(Sender: TCustomListView; Item: TListItem; Rect: TRect; State: TOwnerDrawState) of object;

Description

Sender is the list view control in which an item is about to be drawn.

Item is the item that is about to be drawn.

Rect defines the coordinates of the item on the list view’s canvas.

State indicates various conditions that can influence how the item is drawn, such as whether it is selected, grayed, or focused.


TLVNotifyEvent type
 VCL Reference

TLVNotifyEvent type

The type of an OnGetImageIndex event handler.

Unit

ComCtrls

type TLVNotifyEvent = procedure(Sender: TObject; Item: TListItem) of object;

Description

Sender is the list view control in which an item is about to be displayed.

Item is the item that is about to be displayed. Any changes you make to the item’s ImageIndex property will be reflected in the list view control.


TLVOwnerDataEvent type
 VCL Reference

TLVOwnerDataEvent type

Used in the TCustomListView.OnData event.

Unit

ComCtrls

type LVOwnerDataEvent = procedure(Sender: TObject; Item: TListItem) of object;

Description

Sender is the list view control in which an item is about to be displayed.

Item is the item that is about to be displayed. Any changes that you make to the item will be reflected in the list view control.


TLVOwnerDataFindEvent type
 VCL Reference

TLVOwnerDataFindEvent type

Used on the TCustomListView.OnDataFind event.

Unit

ComCtrls

type TLVOwnerDataFindEvent = procedure(Sender: TObject; Find: TItemFind; const FindString: string; const FindPosition: TPoint; FindData: Pointer; StartIndex: Integer; Direction: TSearchDirection; Wrap: Boolean; var Index: Integer) of object;

Description

Sender is the list view control in which a search has been requested.

Find specifies the type of search to perform (any of ifData, ifPartialString, ifExactString, ifNearest).

FindString specifies the item text to search for. FindString is ignored unless Find contains ifPartialString or ifExactString.

FindPosition specifies the point from which to start the search. FindPosition is ignored unless Find contains ifNearest.

FindData specifies the item data to search for. FindData is ignored unless Find contains ifData.

StartIndex specifies the index of the item from which the search should start.

Direction specifies the direction for the search (sdLeft, sdRight, sdAbove, sdBelow, or sdAll).

Wrap specifies whether the search should continue from the start of the list view control if no match is found.

Index is where to store the index of the found item. Set Index to –1 if no item is found.


TLVOwnerDataHintEvent type
 VCL Reference

TLVOwnerDataHintEvent type

See also

Used in the TCustomListView.OnDataHint event.

Unit

ComCtrls

type TLVOwnerDataHintEvent = procedure(Sender: TObject; StartIndex, EndIndex: Integer) of object;

Description

StartIndex is the first item in the range for which the OnData event may occur.

EndIndex is the last item in the range for which the OnData event may occur.

Use the index information to update the items in the range before the OnData event occurs.


TLVOwnerDataStateChangeEvent type
 VCL Reference

TLVOwnerDataStateChangeEvent type

See also

Used in the TCustomListView.OnDataStateChange event.

Unit

ComCtrls

type TLVOwnerDataStateChangeEvent = procedure(Sender: TObject; StartIndex, EndIndex: Integer; OldState, NewState: TItemStates) of object;

Description

Sender is the list view control containing the items that have changed.

StartIndex is the index of the first item that has changed.

EndIndex is the index of the last item that has changed.

OldState is the old state of the items.

NewState is the new state of the items.


TLVSelectItemEvent type
 VCL Reference

TLVSelectItemEvent type

See also

Used in the TCustomListView.OnSelectItem event.

Unit

ComCtrls

type TLVSelectItemEvent = procedure(Sender: TObject; Item: TListItem; Selected: Boolean) of object;

Description

Sender is the list view object in which an item has been selected or unselected.

Item is the item that has been selected or unselected.

Selected is True if the item has been selected; selected is False if the item has been unselected.


TMbcsByteType type
 VCL Reference

TMbcsByteType type

See also

TMbcsByteType represents the use of a single-byte Char in a string that uses a multi byte character set (MBCS).

Unit

SysUtils

type TMbcsByteType = (mbSingleByte, mbLeadByte, mbTrailByte);

Description

TMbcsByteType represents the possible return values of the ByteType and StrByteType functions.  Possible values are as follows:

Values	Meaning

mbSingleByte	The Char is used to represent an entire character in the string. The value of Char can not be included in the LeadBytes set.

mbLeadByte	The Char is used to represent the first byte of a double-byte character.  The value of Char must be included in the LeadBytes set.

mbTrailByte	The Char is used to represent the second byte in a double-byte character. There are no a priori restrictions on the value of Char.


TMemoryManager type
 VCL Reference

TMemoryManager type

See also

TMemoryManager defines the memory block entry points.

Unit

System

type
PMemoryManager = ^TMemoryManager;

  TMemoryManager = record
  GetMem: function(Size: Integer): Pointer;
  FreeMem: function(P: Pointer): Integer;
  ReallocMem: function(P: Pointer; Size: Integer): Pointer;
end;

Description

The TMemoryManager type is used by the GetMemoryManager and SetMemoryManager procedures. It defines the routines that allocate and free memory.

The GetMem field must specify a function that allocates the given number of bytes and returns a pointer to the newly allocated block. The Size parameter passed to the GetMem function will never be zero. If the GetMem function cannot allocate a block of the given size, it should return nil.

The FreeMem field must specify a function that deallocates the given block. The pointer parameter passed to the FreeMem function will never be nil. If the FreeMem function successfully deallocates the given block, it should return zero. Otherwise, it should return a non-zero value.

The ReallocMem field must specify a function that reallocates the given block to the given new size. The pointer parameter passed to the ReallocMem function will never be nil, and the Size parameter will never be zero. The ReallocMem function must reallocate the given block to the given new size, possibly moving the block if it cannot be resized in place. Any existing contents of the block must be preserved, but newly allocated space can be uninitialized. The ReallocMem function must return a pointer to the reallocated block, or nil if the block cannot be reallocated.


TMenuAnimations, TMenuAnimation type
 VCL Reference

TMenuAnimations, TMenuAnimation type

See also

Indicates how a popup menu appears on screen.

Unit

Menus

type

  TMenuAnimations = (maLeftToRight, maRightToLeft, maTopToBottom, maBottomToTop, maNone);

  TMenuAnimation = set of TMenuAnimations;

Description

TMenuAnimations indicates the direction in which a menu can “slide” into view. TMenuAnimation is a set of TMenuAnimations values, which can be used to specify more than one direction (for a popup menu that slides in at a diagonal). Note that some TMenuAnimations values are mutually exclusive (for example maLeftToRight and maRightToLeft).

Value	Meaning

maLeftToRight	The popup menu appears like a window shade that pulls from left to right.

maRightToLeft	The popup menu appears like a window shade that pulls from right to left.

maTopToBottom	The popup menu appears like a window shade that pulls from top to bottom.

maBottomToTop	The popup menu appears like a window shade that pulls from bottom to top.

maNone	The popup menu appears as a whole with no animation effects.


TMenuItemAutoFlag, TMenuAutoFlag type
 VCL Reference

TMenuItemAutoFlag, TMenuAutoFlag type

See also

Indicates when menu items are automatically maintained.

Unit

Menus

type

  TMenuItemAutoFlag = (maAutomatic, maManual, maParent);

  TMenuAutoFlag = maAutomatic..maManual;

Description

TMenuItemAutoFlag indicates when a submenu is checked for problems and updated. TMenuAutoFlag provides the same information for top-level menu items. The following table lists the possible values:

Values	Meaning

maAutomatic	The immediate submenu of the menu item or the top-level menu items of the menu are checked for problems and automatically corrected when the menu is displayed at runtime.

maManual	The immediate submenu of the menu item or the top-level menu items of the menu are checked for problems and automatically corrected only when the application specifically calls a method of the menu item to do so.

maParent	Automatic checking and correction of the immediate submenu follows the same rule as the menu item’s parent. This value is not applicable to menus, which have no parent menu item.


TMessage type
 VCL Reference

TMessage type

See also

TMessage represents a Windows message.

Unit

Messages

type

  TMessage =packedrecord

    Msg: Cardinal;

    caseIntegerof

      0: (

        WParam: Longint;

        LParam: Longint;

        Result: Longint);

      1: (

        WParamLo: Word;

        WParamHi: Word;

        LParamLo: Word;

        LParamHi: Word;

        ResultLo: Word;

        ResultHi: Word);

  end;

Description

The TMessage type represents a Windows message in WndProc and other methods.

The Msg field represents the Windows Message code.

The WParam field represents the WParam of the message. To access the low and high words of this field, use the WParamLo and WParamHi fields instead.

The LParam field represents the LParam of the message. To access the low and high words of this field, use the LParamLo and LParamHi fields instead.

The Result field holds the return value. To access the low and high words of this field, use the ResultLo and ResultHi fields instead.


TMethod type
 VCL Reference

TMethod type

TMethod is a record used to store Code and Data fields as type Pointer.

Unit

System

type

  TMethod = record

    Code, Data: Pointer;

  end;

Description

The TMethod type declares a record that stores the Code and Data fields.

This type can be used in a type cast of a method pointer to access the code and data parts of the method pointer.


TModalResult type
 VCL Reference

TModalResult type

See also

TModalResult represents the return value from a modal dialog.

Unit

Controls

type TModalResult = Low(Integer)..High(Integer);

Description

TModalResult represents the value returned by a modal dialog. An application can use any integer value as a modal result value. Although TModalResult can take any integer value, the following constants are defined for commonly used TModalResult values:

Constant	Value	Meaning

mrNone	0	None. Used as a default value before the user exits.

mrOk	idOK	The user exited with OK button.

mrCancel	idCancel	The user exited with the CANCEL button.

mrAbort	idAbort	The user exited with the ABORT button.

mrRetry	idRetry	The user exited with the RETRY button.

mrIgnore	idIgnore	The user exited with the IGNORE button.

mrYes	idYes	The user exited with the YES button.

mrNo	idNo	The user exited with the NO button.

mrAll	mrNo + 1	The user exited with the ALL button.

mrNoToAll	mrAll + 1	The user exited with the NO TO ALL button.

mrYesToAll	mrNoToAll + 1	The user exited with the YES TO ALL button.


TMonitorDefaultTo type
 VCL Reference

TMonitorDefaultTo type

Specifies which monitor to select when there is no match to the specified criteria.

Unit

Forms

type TMonitorDefaultTo = (mdNearest, mdNull, mdPrimary);

Description

TMonitorDefaultTo indicates which monitor should be used when the selection criteria do not match any of the monitors in the system. It can have any of the following values:

Value	Meaning

mdNearest	Choose the monitor that comes closest to matching the criteria (the monitor closest to a point, on which most of a rectangle lies, etc).

mdNull	Do not select any monitor if the criteria can’t be met. Use nil to indicate that no monitor could be found.

mdPrimary	Choose the primary monitor if no monitor matches the criteria.


TMouseButton type
 VCL Reference

TMouseButton type

See also

TMouseButton identifies a mouse button in a mouse-event handler.

Unit

Controls

type TMouseButton = (mbLeft, mbRight, mbMiddle);

Description

The TMouseButton type defines the mouse-button constants used by mouse-event handlers to distinguish which button generated the mouse event.


TMouseWheelEvent type
 VCL Reference

TMouseWheelEvent type

The type of the OnMouseWheel event handler.

Unit

Controls

type TMouseWheelEvent = procedure(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean) of object;

Description

Sender is the object capturing the mouse wheel events.

Shift is the state of the Alt, Ctrl, and Shift keys and the mouse buttons.

WheelDelta is how many times the wheel was rotated.

MousePos is the position of the mouse pointer.

Handled is whether or the control handled the event. (Set handled to False to have the object’s parent handle the event.)


TMouseWheelUpDownEvent type
 VCL Reference

TMouseWheelUpDownEvent type

See also

Used in the OnMouseWheelUp and OnMouseWheelDown events.

Unit

Controls

type TMouseWheelUpDownEvent = procedure(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean) of object;

Description

Sender is the object capturing the mouse events.

Shift is the state of the Alt, Ctrl, and Shift keys and the mouse buttons.

MousePos is the position of the mouse pointer.

Handled is whether or the control handled the event. (Set handled to False to have the object’s parent handle the event.)


TMsgDlgButton, TMsgDlgButtons type
 VCL Reference

TMsgDlgBtn, TMsgDlgButtons type

TMsgDlgButtons defines a set of values used by MessageDlg and MessageDlgPos.

Unit

Dialogs

type

  TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp);

  TMsgDlgButtons = set of TMsgDlgBtn;

const

  mbYesNoCancel = [mbYes, mbNo, mbCancel];

  mbYesAllNoAllCancel = [mbYes, mbYesToAll, mbNo, mbNoToAll, mbCancel];

  mbOKCancel = [mbOK, mbCancel];

  mbAbortRetryIgnore = [mbAbort, mbRetry, mbIgnore];

  mbAbortIgnore = [mbAbort, mbIgnore];

Description

The TMsgDlgButtons type defines the set of values a button in a message box can have. The TMsgDlgButtons type is used by the MessageDlg and MessageDlgPos functions. The following tables lists the possible values:

Value	Meaning

mbYes	A button with 'Yes' on its face.

mbNo	A button the text 'No' on its face.

mbOK	A button the text 'OK' on its face.

mbCancel	A button with the text 'Cancel' on its face.

mbAbort	A button with the text 'Abort' on its face

mbRetry	A button with the text 'Retry' on its face

mbIgnore	A button the text 'Ignore' on its face

mbAll	A button with the text 'All' on its face

mbNoToAll	A button with the text 'No to All' on its face

mbYesToAll	A button with the text 'Yes to All' on its face

mbHelp	A button with the text 'Help' on its face

In addition, the Dialogs unit defines the following constants for commonly used TMsgDlgButtons values:

Constant	Meaning

mbYesNoCancel	mbYes, mbNo, and mbCancel

mbYesNoAllCancel	mbYes, mbYesToAll, mbNo, mbNoToAll, and mbCancel

mbOKCancel	mbOK and mbCancel

mbAbortRetryIgnore	mbAbort, mbRetry, and mbIgnore

mbAbortIgnore	mbAbort, mbIgnore


TMsgDlgType type
 VCL Reference

TMsgDlgType type

TMsgDlgType defines values describing the type of message box.

Unit

Dialogs

type TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);

Description

The TMsgDlgType type defines the values describing the type of a message box. The TMsgDlgType is used by the MessageDlg and MessageDlgPos functions. The following table lists the possible values:

Value	Meaning

mtWarning	A message box containing a yellow exclamation point symbol.

mtError	A message box containing a red stop sign.

mtInformation	A message box containing a blue "i".

mtConfirmation	A message box containing a green question mark.

mtCustom	A message box containing no bitmap. The caption of the message box is the name of the application's executable file.


TNodeAttachMode type
 VCL Reference

TNodeAttachMode type

TNodeAttachMode identifies a new or changed tree node relationship.

Unit

ComCtrls

type TNodeAttachMode = (naAdd, naAddFirst, naAddChild, naAddChildFirst, naInsert);

Description

The TNodeAttachMode type specifies the way a new or relocated tree node will be related to some other node.

Value	Meaning

naAdd	The new or relocated node becomes the last sibling of the other node.

naAddFirst	The new or relocated node becomes the first sibling of the other node.

naInsert	The new or relocated node becomes the sibling immediately before the other node.

naAddChild	The new or relocated node becomes the last child of the other node.

naAddChildFirst	The new or relocated node becomes the first child of the other node.


TNodeCache type
 VCL Reference

TNodeCache type

Used to cache a tree-view node.

Unit

ComCtrls

type

  TNodeCache = record

    CacheNode: TTreeNode;

    CacheIndex: Integer;

  end;

Description

Use TNodeCache to cache a tree-view node.


TNotifyEvent type
 VCL Reference

TNotifyEvent type

TNotifyEvent is used for events that do not require parameters.

Unit

Classes

type TNotifyEvent = procedure (Sender: TObject) ofobject;

Description

The TNotifyEvent type is the type for events that have no event-specific parameters. These events simply notify the component that a specific event occurred. For example, OnClick, which is of type TNotifyEvent, notifies the control that a click event occurred on the control.

The Sender parameter is the object whose event handler is called.  For example,.with the OnClick event of a button, the Sender parameter is the button component that is clicked.


TOleEnum type
 VCL Reference

TOleEnum type

Represents enumerated types that must be sent over a COM interface.

Unit

Activex or Oledb

type TOleEnum = type LongWord;

Description

Dispatch interfaces do not marshal enumerated types. TOleEnum is used for interface parameters that are logically an enumerated type but must be passed as an integer value instead. Typically, each interface member that uses TOleEnum defines a set of integer constants to represent the enumerated values.


TOnGetMonthInfoEvent type
 VCL Reference

TOnGetMonthInfoEvent type

See also

Type used for the TCommonCalendar.OnGetMonthInfo event.

Unit

ComCtrls

type TOnGetMonthInfoEvent = procedure(Sender: TObject; Month: LongWord; var MonthBoldInfo: LongWord) of object;

Description

Use TOnGetMonthInfoEvent along with the TCommonCalendar.BoldDays method to set which days are bold in the month that is about to be displayed in the calendar.

Sender is the TObject for the calendar.

Month is a value that corresponds to the month that is about to be displayed in the calendar. If Month is 1, January is about to be displayed, if Month is 2, February is about to be displayed, and so on.

MonthBoldInfo specifies which days of the month should be bold. You should pass MonthBoldInfo to the BoldDays method. You shouldn't work with BoldDays directly.

The first 31 bits of the MonthBoldInfo variable are used to determine whether a particular day of the month should be bold.


TOperation type
 VCL Reference

TOperation type

See also

TOperation represents the types of operations whose occurrence is broadcast by the Notification method.

Unit

Classes

type TOperation = (opInsert, opRemove);

Description

The TOperation type is used in the Notification method to indicate whether the notification indicates the creation or deletion of an object. The following table gives the possible values:

Value	Meaning

opInsert	The specified object has just been created.

opRemove	The specified object has been destroyed, and its memory is about to be freed.


TOutlineOption, TOutlineOptions type
 VCL Reference

TOutlineOption, TOutlineOptions type

See also

TOutlineOptions represents the style in which an outline is drawn.

Unit

Outline

type

  TOutlineOption = (ooDrawTreeRoot, ooDrawFocusRect, ooStretchBitmaps);

  TOutlineOptions = set of TOutlineOption;

Description

TOutlineOptions is a set of TOutlineOption values. Together they influence the way an outline is drawn. Each TOutlineOption value is described below:

Value	Meaning

ooDrawTreeRoot	The first item (Index value of 1) is connected to the root item by the outline tree. This means that the tree will extend from the top of the outline to all the first level items. Without ooDrawTreeRoot, all first level items appear leftmost in the outline, not connected by the tree.

ooDrawFocusRect	The outline draws a focus rectangle around the selected item.

ooStretchBitmaps	The outline stretches the standard bitmaps (PictureLeaf, PictureOpen, PictureClosed, PicturePlus, PictureMinus) to fit in the size of the item, determined by the size of the Font of the Text. Without ooStretchBitmaps, the bitmaps will be cropped if larger than the height of the item text, or won't fill up the entire item space if smaller than the text.


TOutlineStyle type
 VCL Reference

TOutlineStyle type

See also

TOutlineStyle determines how the nodes of an outline are drawn.

Unit

Outline

type TOutlineStyle = (osText, osPlusMinusText, osPictureText, osPlusMinusPictureText, osTreeText, osTreePictureText);

Description

TOutlineStyle is the type of TCustomOutline.::OutlineStyle. It includes the following values:

Value	Meaning

osText	Only the text of nodes is drawn.

osPlusMinusText	In addition to the text, each node displays plus picture (when it can be expanded) or minus picture (when it can be collapsed).

osPictureText	In addition to the text, each node displays the open picture (when it is expanded), closed picture (when it is collapsed), or leaf picture (when it has no subnodes).

osPlusMinusPictureText	In addition to the text, each node displays the plus picture or minus picture (as in osPlusMinusText), and the open, closed or leaf picture (as in osPictureText).

osTreeText	Visible lines connect the outline nodes.

osTreePictureText	In addition to the text, each node displays the open picture (when it is expanded), closed picture (when it is collapsed), or leaf picture (when it has no subnodes). Visible lines connect the outline nodes.


TOutlineType type
 VCL Reference

TOutlineType type

See also

Indicates whether an outline is owner-drawn.

Unit

Outline

type  TOutlineType = (otStandard, otOwnerDraw);

Description

TOutlineType determines whether an outline is drawn automatically or by user code in an OnDrawItem event.

Value	Meaning

otStandardItems	Items are drawn automatically.

otOwnerDraw	Items are drawn on the Canvas by application code.


TOwnerDrawState type
 VCL Reference

TOwnerDrawState type

Indicates state information that can influence how an item is drawn.

Unit

Windows

type TOwnerDrawState = set of (odSelected, odGrayed, odDisabled, odChecked, odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect, odReserved1, odReserved2, odComboBoxEdit);

Description

TOwnerDrawState is used by event handlers in owner-draw controls to indicate the state of an item about to be drawn. It is a set that includes zero or more of the following:

Value	Meaning

odSelected	The item is selected.

odGrayed	The item should appear grayed.

odDisabled	The item is disabled.

odChecked	The item should appear checked. (This does not apply to all objects)

odFocused	Keyboard input is directed to the item.

odDefault	The item is the default item (This does not apply to all objects)

odHotLight	The item is hot-lighted because under the mouse (only if the operating system supports hot-lighting)

odInactive	The item and its associated menu are inactive (only under Windows 98 or later)

odNoAccel	Any underline of an accelerator character should be skipped when drawing the control (only under Windows 2000 or later)

odNoFocusRect	Do not display visual cues that indicate focus (only under Windows 2000 or later)

odReserved1	Not currently used.

odReserved2	Not currently used.

odComboBoxEdit	The drawing takes place in the edit box of a combo box control.


TPackageInfoProc type
 VCL Reference

TPackageInfoProc type

See also

TPackageInfoProc is a pointer to a callback procedure used as a parameter type to the GetPackageInfo procedure.

Unit

SysUtils

type

  TNameType = (ntContainsUnit, ntRequiresPackage, ntDcpBpiName);

  TPackageInfoProc = procedure (const Name: string; NameType: TNameType; Flags: Byte; Param: Pointer);

Description

TPackageInfoProc is the type of the callback passed to GetPackageInfo, which calls it once for each information element returned.

Name is the name of a package or package file. The precise meaning of the Name parameter depends on the value of the NameType parameter.

NameType is one of the following values:

Value	Meaning

ntContainsUnit	The Name parameter is the name of a unit contained in the package.

ntRequiresPackage	The Name parameter is the name of another package required by the package.

ntDcpBpiName	The Name parameter is the name of the package's library file.

Flags contains the flags in the information table for the package.

Param is a user-defined value passed to GetPackageInfo.


TParamFlag, TParamFlags type
 VCL Reference

TParamFlag, TParamFlags types

Indicates the attributes of a method parameter.

Unit

TypInfo

type

  TParamFlag = (pfVar, pfConst, pfArray, pfAddress, pfReference, pfOut);

  TParamFlags = set of TParamFlag;

Description

TParamFlags indicates the attributes of a parameter on a function or procedure. It is a set of TParamFlag values:

Value	Meaning

pfVar	The parameter is input/output. Caller must supply a variable to receive output.

pfConst	The parameter can’t be changed by the function or procedure.

pfArray	The parameter represents an open array of values.

pfAddress	The parameter is a memory address (pointer).

pfReference	The parameter is passed by reference.

pfOut	The parameter is output. Caller supplies a variable to receive the output.


TPageScrollerButton type
 VCL Reference

TPageScrollerButton type

Used to specify a page scroller button.

Unit

ComCtrls

type TPageScrollerButton = (sbFirst, sbLast);

Description

TPageScrollerButton has one of the following values:

Value	Meaning

sbFirst	The top button (vertical orientation) or the left button (horizontal orientation).

sbLast	The bottom button (vertical orientation) or the right button (horizontal orientation).


TPageScrollerButtonState type
 VCL Reference

TPageScrollerButtonState type

Used to indicate the state of a page scroller button.

Unit

ComCtrls

type TPageScrollerButtonState = (bsNormal, bsInvisible, bsGrayed, bsDepressed, bsHot);

Description

TPageScrollerButtonState has one of the following values:

Value	Meaning

bsNormal	The button is in normal state.

bsInvisible	The button is not visible.

bsGrayed	The button is grayed.

bsDepressed	The button is pressed.

bsHot	The button is hot (the mouse is hovering over the button).


TPageScrollerOrientation type
 VCL Reference

TPageScrollerOrientation type

Used to specify the orientation of a page scroller control.

Unit

ComCtrls

type TPageScrollerOrientation = (soHorizontal, soVertical);

Description

TPageScrollerOrientation has one of the following values:

Value	Meaning

soHorizontal	The page scroller is oriented horizontally.

soVertical	The page scroller is oriented vertically.


TPageScrollEvent type
 VCL Reference

TPageScrollEvent type

See also

The type of the TPageScroller.OnScroll event handler.

Unit

ComCctrls

TPageScrollEvent = procedure (Sender: TObject; Shift: TShiftState; X, Y: Integer; Orientation: TPageScrollerOrientation; var Delta: Integer);

Description

Sender is the page scroller that is being scrolled.

Shift is the state of the Shift, Alt, Ctrl keys and mouse buttons.

X is the horizontal position of the page scroller.

Y is the vertical position of the page scroller.

Orientation is the direction for the scroll.

Delta is the amount of the scroll.


TPaymentTime type
 VCL Reference

 KTPaymentTime type

TPaymentTime is an enumerated type used as a parameter in financial functions.

Unit

Math

type TPaymentTime = (ptEndOfPeriod, ptStartOfPeriod);

Description

TPaymentTime indicates when interest is calculated. The following table lists the possible values:

Value	Meaning

ptStartOfPeriod	Interest is calculated on the principle balance at the beginning of the payment period

ptEndOfPeriod	Interest is calculated at the end of the payment period


TPoint type
 VCL Reference

TPoint type

See also

TPoint type defines a pixel location onscreen.

Unit

Types

type TPoint = packedrecord
  X: Longint;
  Y: Longint;
end;

Description

The TPoint type defines a pixel location onscreen, with the origin in the top left corner. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.


TPopupAlignment type
 VCL Reference

TPopupAlignment type

TPopupAlignment represents the position of a popup menu relative to the mouse.

Unit

Menus

type TPopupAlignment = (paLeft, paRight, paCenter);

Description

These are the possible values:

Value	Meaning

paLeft	The pop-up menu appears with its top left corner under the mouse.

paCenter	The pop-up menu appears with the top center of the menu under the mouse.

paRight	The pop-up menu appears with its top right corner under the mouse.


TProcedure type
 VCL Reference

TProcedure type

TProcedure is used as the type for generic procedures that do not have arguments.

Unit

SysUtils

type TProcedure = procedure;

Description

The TProcedure is used as the type for parameters to many routines when the procedure being passed in does not take any arguments.


TProgressBarOrientation type
 VCL Reference

TProgressBarOrientation type

See also

Used to specify the orientation of a progress bar.

Unit

ComCtrls

type TProgressBarOrientation = (pbHorizontal, pbVertical);

Description

TProgressBarOrientation has one of the following values:

Value	Meaning

pbHorizontal	The progress bar is oriented horizontally.

pbVertical	The progress bar is oriented vertically.


TPropInfo, PPropInfo types
 VCL Reference

TPropInfo, PPropInfo types

TPropInfo describes a property that is edited using a property editor.

Unit

TypeInfo

type

  PPropInfo = ^TPropInfo;

  TPropInfo = packed record

    PropType: PPTypeInfo;

    GetProc: Pointer;

    SetProc: Pointer;

    StoredProc: Pointer;

    Index: Integer;

    Default: Longint;

    NameIndex: SmallInt;

    Name: ShortString;

  end;

Description

TPropInfo is the property information record that describes a property that is being edited and its access functions.

PropType points to a record that gives information about the property type.

GetProc and SetProc are method pointers for the methods that get and set the property value. These are methods of the component whose property is being edited.

StoredProc is a method pointer for a boolean function that indicates whether the property value should be saved with the form file.

Index is the index of the property. This is used as a parameter to the GetProc and SetProc methods on indexed properties.

Default is the default value of the property.

NameIndex is the offset into the Name field where the property’s name starts.

Name is the qualified property name.


TRect type
 VCL Reference

TRect type

TRect defines a rectangle.

Unit

Types

type

  TRect = packedrecord
  case Integer of
    0: (Left, Top, Right, Bottom: Integer);
    1: (TopLeft, BottomRight: TPoint);
end;

Description

TRect represents the dimensions of a rectange. The coordinates are specified as either four separate integers representing the left, top, right, and bottom sides, or as two points representing the locations of the top left and bottom right corners.

Typically, TRect values represent pixel locations, where the origin of the pixel coordinate system is in the top left corner of the screen (screen coordinates) or the top left corner of a control’s client area (client coordinates). When a TRect value represents a rectangle on the screen, by convention the top and left edges are considered inside the rectangle and the bottom and right edges are considered outside the rectangle. This convention allows the width of the rectangle to be Right - Left and the height to be Bottom - Top.


TResType type
 VCL Reference

TResType type

TResType specifies a type of graphical resource to an image list.

Unit

ImgList

type TResType = (rtBitmap, rtCursor, rtIcon);

Description

TResTypes is used by the image list methods ResourceLoad, GetResource and FileLoad to specify the type of graphical resource that is to be loaded or retrieved from an image list.

Value	Meaning

rtBitmap	Loads or retrieves a bitmap

rtCursor	Loads or retrieves a cursor

rtIcon	Loads or retrieves an icon


TScrollBarKind type
 VCL Reference

TScrollBarKind type

Indicates the orientation of a scrollbar.

Unit

Forms

type TScrollBarKind = (sbHorizontal, sbVertical);

Description

TScrollBarKind indicates whether a scrollbar is horizontal or vertical. It includes the following values:

Value	Meaning

sbHorizontal	Horizontal scrollbar.

sbVertical	Vertical scrollbar.


TScrollBarStyle type
 VCL Reference

TScrollBarStyle type

Specifies a scroll bar style.

Unit

Controls

TScrollBarStyle = (ssRegular, ssFlat, ssHotTrack);

Description

TScrollBarStyle can have one of the following values:

Value	Meaning

ssRegular	The scroll bar is normal.

ssFlat	The scroll bar is flat.

ssHotTrack	The scroll bar uses hot tracking.


TScrollCode type
 VCL Reference

TScrollCode type

Indicates what action the user performed on a scroll bar.

Unit

Forms

type TScrollCode = (scLineUp, scLineDown, scPageUp, scPageDown, scPosition, scTrack, scTop, scBottom, scEndScroll);

Description

TScrollCode describes the type of scrolling action requested. It can be any of the following values:

Value	Meaning

scLineUp	User clicked the top or left scroll arrow or pressed the Up or Left arrow key.

scLineDown	User clicked the bottom or right scroll arrow or pressed the Down or Right arrow key.

scPageUp	User clicked the area to the left of the thumb tab or pressed the PgUp key.

scPageDown	User clicked the area to the right of the thumb tab or pressed the PgDn key.

scPosition	User positioned the thumb tab and released it.

scTrack	User is moving the thumb tab.

scTop	User moved the thumb tab to the top or far left on the scroll bar.

scBottom	User moved the thumb tab to the bottom or far right on the scroll bar.

scEndScroll	User finished moving the thumb tab on the scroll bar.


TScrollStyle type
 VCL Reference

TScrollStyle type

Identifies a set of scrollbars by their orientation.

Unit

StdCtrls

type TScrollStyle = (ssNone, ssHorizontal, ssVertical, ssBoth);

Description

TScrollStyle can have one of the following values:

Value	Meaning

ssNone	No scrollbars are indicated.

ssHorizontal	Only a horizontal scrollbar.

ssVertical	Only a vertical scrollbar.

ssBoth	Both a horizontal and a vertical scrollbar.


TSearchDirection type
 VCL Reference

TSearchDirection type

Indicates the direction in which to search for the nearest item to a specified item or point.

Unit

ComCtrls

type TSearchDirection = (sdLeft, sdRight, sdAbove, sdBelow, or sdAll);

Description

TSearchDirection defines the following search directions:

Value	Meaning

sdLeft	Look to the left of a specified item.

sdRight	Look to the right of a specified item.

sdAbove	Look above a specified item.

sdBelow	Look below a specified item.

sdAll	Look in the order that items appear in the Items property.


TSearchRec type
 VCL Reference

TSearchRec type

TSearchRec defines file information searched for by FindFirst or FindNext.

Unit

SysUtils

type

TSearchRec = record
Time: Integer;
Size: Integer;
Attr: Integer;
Name: TFileName;
ExcludeAttr: Integer;
FindHandle: THandle;
FindData: TWin32FindData;
end;

Description

The TSearchRec type defines file information searched for by a FindFirst or FindNext function call. If a file is found, the fields of the TSearchRec type parameter are modified to specify the found file.

Attr represents the file attributes of the file. Test Attr against the following attribute constants or values to determine if a file attribe matches the file's properties.

Constant	Value	Description

faReadOnly	$00000001	Read-only files

faHidden	$00000002	Hidden files

faSysFile	$00000004	System files

faVolumeID	$00000008	Volume ID files

faDirectory	$00000010	Directory files

faArchive	$00000020	Archive files

faAnyFile	$0000003F	Any file

Note:	The faReadOnly constant has the same name as the enumerated value that is defined by the TFieldAttribute type. If both the SysUtils and the Db units are used in your source files, you must disambiguate by specifying the unit to qualify the use of faReadOnly. That is, write SysUtils.faReadOnly.

To test for an attribute, combine the value of the Attr field with the attribute constant with the and operator. If the file has that attribute, the result will be greater than 0. For example, if the found file is a hidden file, the following expression will evaluate to True: (SearchRec.Attr and faHidden) <> 0.

Time contains the time stamp of the file. It can be converted to a TDateTime value using FileDateToDateTime.

Size contains the size of the file in bytes.

Name contains the base file name, including extension.

FindHandle is an internal handle used to track find state.

FindData contains additional information such as the file creation time, last access time, and both the long and short file names.


TSectionDragEvent type
 VCL Reference

TSectionDragEvent type

See also

The type for event handlers that respond when the user drags a section in a header control.

Unit

ComCtrls

type TSectionDragEvent = procedure(Sender: TObject; FromSection, ToSection: THeaderSection; var AllowDrag: Boolean) of object;

Description

Sender is the header control that includes the dragged section.

FromSection is the header section that the user is dragging.

ToSection is the header section currently in the position where the user dragged FromSection.

AllowDrag returns a value that indicates whether the header control repositions the headers to accommodate the user’s drag. If AllowDrag is Ffalse on exit from the event handler, the headers remain in their original positions, as if the user had not tried a drag operation.


TSeekOrigin type
 VCL Reference

TSeekOrigin type

TSeekOrigin indicates where to start a seek operation.

Unit

Classes

type TSeekOrigin = (soBeginning, soCurrent, soEnd);

Description

The TSeekOrigin type indicates where to start a seek origin and the direction in which to seek. The following table lists the possible values:

Value	Meaning

soFromBeginning	Seek from the beginning of the resource. The seek operation moves to a specified position (offset), which must be greater than or equal to zero.

soFromCurrent	Seek from the current position in the resource. The seek operation moves to an offset from the current position (position + offset). The offset is positive to move forward, negative to move backward.

soFromEnd	Seek from the end of the resource. The seek operation moves to an offset from the end of the resource, where the offset is expressed as a negative value because it is moving toward the beginning of the resource.


TSelectDirOpt, TSelectDirOpts type
 VCL Reference

TSelectDirOpt, TSelectDirOpts type

See also

Determines how a directory selection dialog responds when the user enters a nonexistent directory.

Unit

FileCtrl

type

  TSelectDirOpt = (sdAllowCreate, sdPerformCreate, sdPrompt);

  TSelectDirOpts = set of TSelectDirOpt;

Description

These are the possible values that can be added to the set of options:

Value	Meaning

sdAllowCreate	An edit box allows the user to type in the name of a directory that does not exist. This option does not create a directory: the application must read the name of the selected directory and create it if desired.

sdPerformCreate	Used only in combination with sdAllowCreate. If the user enters a directory name that does not exist, the directory selection dialog creates it.

sdPrompt	Used only in combination with sdAllowCreate. Displays a message box that informs the user when the entered directory does not exist and asks if the directory should be created. If the user chooses OK, the directory is created if the option set includes sdPerformCreate. If the option set does not include sdPerformCreate, the directory is not created: the application must read the directory name and create it.


TServiceEvent type
 VCL Reference

TServiceEvent type

TServiceEvent is the procedure type used for service events that do not require parameters.

Unit

Svcmgr

type TServiceEvent = procedure (Sender: TService) of object;

Description

TServiceEvent specifies a method used for service events that have no event-specific parameters. TServiceEvent is used to execute a process that occurs typically during installation, uninstallation, or shutdown.  It is also the event type for the main service execution. The Sender parameter is the service component receiving the event notification.


TShiftState type
 VCL Reference

TShiftState type

See also

TShiftState indicates the state of the Alt, Ctrl, and Shift keys and the mouse buttons.

Unit

Classes

type TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble);

Description

The TShiftState type is used by key-event and mouse-event handlers to determine the state of the Alt, Ctrl, and Shift keys and the state of the mouse buttons when the event occurs.  It is a set of flags that indicate the following:

Value	Meaning

ssShift	The Shift key is held down.

ssAlt	The Alt key is held down.

ssCtrl	The Ctrl key is held down.

ssLeft	The left mouse button is held down.

ssRight	The right mouse button is held down.

ssMiddle	The middle mouse button is held down.

ssDouble	The mouse was double-clicked.


TShortCut type
 VCL Reference

TShortCut type

TShortCut represents a menu shortcut.

Unit

Classes

type TShortCut = Low(Word) .. High(Word);

Description

TShortCut types are the menu shortcuts that appear on menus and give the user an alternate way to select menu commands using the keyboard. The ShortCut property is of type TShortCut, and the ShortCutToText and ShortCutToKey routines use parameters of type TShortCut. TShortCut is also the return type of the TextToShortCut routine.


TShortCutEvent type
 VCL Reference

TShortCutEvent type

The type of an OnShortCut event handler.

Unit

Forms

TShortCutEvent = procedure (var Msg: TWMKey; var Handled: Boolean) of object;

Description

The TShortCutEvent type represents event handlers that respond to keystrokes before they enter the standard keystroke processing. These event handlers allow an application to bypass the standard keystroke processing for special shortcut keys.

The Msg parameter represents the Windows keystroke message. The virtual key code is given by the CharCode field, and the KeyData field contains a set of flags that indicate the repeat count, scan code, extended-key flag, context code, previous key-state flag and transition-state flag. See the Windows documentation for details on these fields.

The Handled parameter indicates whether the event handler processed the key. If Handled is set to True, then the application stops processing the keystroke. Otherwise (if Handled remains False) the application proceeds with normal keystroke processing.


TSizingOrientation type
 VCL Reference

TSizingOrientation type

Specifies the dimension along which a control’s size is adjusted when docked.

Unit

Controls

type TSizingOrientation = (soNone, soHorizontal, soVertical);

Description

TSizingOrientation can have one of the following values:

Value	Meaning

soNone	The control’s size is not readjusted when it is docked.

soHorizontal	The control’s width is adjusted when it is docked.

soVertical	The control’s height is adjusted when it is docked.


TSmallPoint type
 VCL Reference

TSmallPoint type

TSmallPoint type defines a point with two 16-bit coordinates.

Unit

Types

type

  TSmallPoint = packed record

    x: SmallInt;

    y: SmallInt;

  end;

Description

The TSmallPoint type defines a point where each coordinate is a 16-bit integer. x specifies the horizontal coordinate of the point, y specifies the vertical coordinate.


TSockAddrIn type
 VCL Reference

TSockAddrIn type

See also

TSockAddrIn represents the Internet socket address structure used in Windows socket API calls to represent the full specification of a socket port.

Unit

Winsock

type

  TSockAddrIn = packed record

    case Integer of

      0: (sin_family: u_short;

          sin_port: u_short;

          sin_addr: TInAddr;

          sin_zero: array[0..7] of Char);

      1: (sa_family: u_short;

          sa_data: array[0..13] of Char)

  end;

Description

TSockAddrIn represents a Windows socket address, including information about the host, port, and protocol.


TSocket type
 VCL Reference

TSocket type

See also

TSocket represents the handle to a Windows socket.

Unit

Winsock

type

  u_int = Integer;

  TSocket = u_int;

Description

TSocket represents a Windows socket handle. TSocket values are used by TCustomWinSocket and its descendants for working directly with the Windows socket APIs. Use this type when using the Windows socket APIs directly in an application.


TSocketErrorEvent type
 VCL Reference

TSocketErrorEvent type

The type for event handlers that respond when a Windows socket reports an error.

Unit

ScktComp

type

  TErrorEvent = (eeGeneral, eeSend, eeReceive, eeConnect, eeDisconnect, eeAccept);

  TSocketErrorEvent = procedure (Sender: TObject; Socket: TCustomWinSocket; ErrorEvent: TErrorEvent; var ErrorCode: Integer) of object;

Description

The Sender parameter is the socket component that encountered the error.

The Socket parameter is the TCustomWinSocket object that receives the error notification.

The ErrorCode parameter is the error code returned by the Windows socket API call. Changing this to 0 within an error handler prevents an exception from being raised.

The ErrorEvent parameter indicates what Socket was attempting to do when the error occurred. It is of type TErrorEvent, which can have any of the following values:

Value	Meaning

eeGeneral	The socket received an error message that does not fit into any of the following categories.

eeSend	An error occurred when trying to write to the socket connection.

eeReceive	An error occurred when trying to read from the socket connection.

eeConnect	A connection request that was already accepted could not be completed.

eeDisconnect	An error occurred when trying to close a connection.

eeAccept	A problem occurred when trying to accept a client connection request.


TSocketEvent type
 VCL Reference

TSocketEvent type

Identifies the operation of a socket.

Unit

ScktComp

type TSocketEvent = (seLookup, seConnecting, seConnect, seDisconnect, seListen, seAccept, seWrite, seRead);

Description

TSocketEvent is used to identify what a socket is doing when various methods or event handlers are called. It has one of the following values:

Value	Meaning

seLookup	(client sockets only) The Windows socket object is about to locate the server socket. Changing the properties of the client socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will affect the attempted connection.

seConnecting	(client sockets only) The server socket has been located but the connection isn’t completed. This is the first opportunity to obtain the actual server port and IP address used for the connection, which may differ from those of the listening socket contacted initially.

seConnect	The socket connection has just been established. This is the point when a socket starts reading or writing over the connection.

seListen	(server sockets only) The Windows socket object has been initialized and is about to open a listening connection. Changing the properties of the server socket has no effect at this point, but changes to the Windows socket object specified by the Socket parameter will the listening connection.

seAccept	(server sockets only) A client connection request has just been accepted. This is the first opportunity to obtain the port and IP address of the individual client connection.

seWrite	The socket is ready for information to be written.

seRead	The socket is receiving information from a socket on the other end of the connection.


TSocketNotifyEvent type
 VCL Reference

TSocketNotifyEvent type

See also

The type for event handlers which respond to events during the expected course of forming or using a socket connection.

Unit

ScktComp

type TSocketNotifyEvent = procedure (Sender: TObject; Socket: TCustomWinSocket) of object;

Description

The Sender parameter is the socket component or Windows socket object that owns the event handler.

The Socket parameter is the TCustomWinSocket object that represents the endpoint of the connection.

When the event handler belongs to a client Windows socket object, these two parameters are the same. For server Windows socket objects, the Sender parameter represents the listening connection while the Socket parameter represents a client connection.


TSortDirection type
 VCL Reference

TSortDirection type

TSortDirection indicates ascending or descending sort.

Unit

ComCtrls

type TSortDirection = (sdAscending, sdDescending);

Description

Value	Meaning

sdAscending	Ascending sort order.

sdDescending	Descending sort order.


TSortType type
 VCL Reference

TSortType type

TSortType indicates the criteria to use when sorting items.

Unit

ComCtrls

type TSortType = (stNone, stData, stText, stBoth);

Description

Value	Meaning

stNone	No sorting is done.

stData	Items are sorted based on their Data property. An event handler must be provided to compare Data values.

stText	Items are sorted based on their Caption property.

stBoth	Items are sorted based on both the Data and Caption. The Data values are ignored unless an event handler is provided to compare them.


TSoundExIntLength type
 VCL Reference

TSoundExIntLength type

See also

Indicates the maximum number of SoundEx codes used to generate an integer for the phonetic representation of a string.

Unit

StrUtils

type TSoundExIntLength = 1..8;

Description

The TSoundExIntLength type represents an integer between 1 and 8 (inclusive). These are the possible number of SoundEx codes that can be converted into a single integer. More than 8 SoundEx codes would result in a numeric value that requires more than 16 bits.


TSoundExLength type
 VCL Reference

TSoundExLength type

See also

Indicates the maximum number of SoundEx codes used to generate the phonetic representation of a string.

Unit

StrUtils

type TSoundExIntLength = 1..MaxInt;

Description

The TSoundExLength type represents an integer greater than or equal to 1. This represents the maximum number of SoundEx codes to use when generating the phonetic representation of a string. Values less than or equal to 0 make no sense, because then there are no SoundEx codes to represent.


TStartDockEvent type
 VCL Reference

TStartDockEvent type

See also

Used in the OnStartDock event.

Unit

Controls

type TStartDockEvent = procedure(Sender: TObject; var DragObject: TDragDockObject) of object;

Description

Sender is the object on which a control is being docked.

DragObject is information about the control that is being docked.


TStreamOriginalFormat type
 VCL Reference

TStreamOriginalFormat type

Indicates the format in which a form file is saved.

Unit

Classes

type TStreamOriginalFormat = (sofUnknown, sofBinary, sofText);

Description

Form files can be saved in binary format or as a text file, depending on the options set in the Environment Options dialog. TStreamOriginalFormat specifies the format used for saving a form file. It is one of the following values:

Value	Meaning

sofUnknown	The format of the file from which a form is being read or to which it is being written is unknown. If the format can’t be deduced from the stream, an exception is raised.

sofBinary	The form is being read from or written to a form file that uses binary format.

sofText	The form is being read from or written to a text file.


TStringSearchOption, TStringSearchOptions types
 VCL Reference

TStringSearchOption, TStringSearchOptions types

Determines how a search for a substring is conducted within a body of text.

Unit

StrUtils

type

  TStringSearchOption = (soDown, soMatchCase, soWholeWord);

  TStringSearchOptions = set of TStringSearchOption;

Description

TStringSearchOption values indicate how to search for a string within a larger body of text. TStringSearchOptions is a set of TStringSearchOption values.

The following table lists the possible values:

Value	Meaning

soDown	Searches go in a forward direction.

soMatchCase	Searches are case-sensitive.

soWholeWord	Searches discount any matches where the located occurrence is not a whole word.


TSysCharSet type
 VCL Reference

TSysCharSet type

See also

Represents a set of characters that are used as separators when parsing a string.

Unit

SysUtils

type TSysCharSet = set of Char;

Description

TSysCharSet is a set containing special characters that can be used to parse a string. The elements of the set vary, depending on the type of parsing performed.


TSysLocale type
 VCL Reference

TSysLocale type

See also

TSysLocale represents a Windows locale.

Unit

SysUtils

type TSysLocale = packed record

  DefaultLCID: LCID;

  PriLangID: LANGID;

  SubLangID: LANGID;

  FarEast: Boolean;

  MiddleEast: Boolean;

end;

Description

The TSysLocale type represents a Windows locale. The locale determines how dates and times are formatted, how items are alphabetically sorted, and how strings are compared.

The DefaultLCID field represents the system Windows locale identifier. This is a 32-bit value that specifies a default sort order and a default language identifier.

The PirLangID field specifies the primary type of the language identifier. This is one of the Windows constants that identify a language group such as LANG_ENGLISH or LANG_FRENCH.

The SubLangID field specifies the subtype of the language identifier. This is one of the Windows constants that identify a language subgroup such as SUBLANG_ENGLISH_US or SUBLANG_FRENCH_CANADIAN.

FarEast indicates whether the locale represents an Asian locale.

MiddleEast indicates whether the local represents a Middle Eastern locale.


TSystemTime, PSystemTime type
 VCL Reference

TSystemTime, PSystemTime type

See also

Represents date-time values in Windows 32 API function calls.

Unit

Windows

type

  PSystemTime = ^TSystemTime;

  TSystemTime = record

    wYear: Word;

    wMonth: Word;

    wDayOfWeek: Word;

    wDay: Word;

    wHour: Word;

    wMinute: Word;

    wSecond: Word;

    wMilliseconds: Word;

  end;

Description

Use TSystemTime to represent SYSTEMTIME values when making Windows 32 API function calls. Use the DateTimeToSystemTime and SystemTimeToDateTime functions to convert between TSystemTime values and TDateTime values.

PSystemTime is a pointer to a TSystemTime value.


TTabGetImageEvent type
 VCL Reference

TTabGetImageEvent type

See also

Used in the TCustomTabControl.OnGetImageIndex event.

Unit

ComCtrls

type TTabGetImageEvent = procedure(Sender: TObject; TabIndex: Integer; var ImageIndex: Integer) of object;

Description

Sender is the tab control in which an image is about to be displayed.

TabIndex is the index of the tab for which an image is about to be displayed.

ImageIndex is the index of the image to display in the tab.


TTabStyle type
 VCL Reference

TTabStyle type

See also

Represents the appearance of the tabs in TPageControl or TTabControl object.

Unit

ComCtrls

type TTabStyle = (tsTabs, tsButtons, tsFlatButtons);

Description

TTabStyle can have one of the following values:

Value	Meaning

tsTabs	Standard tabs

tsButtons	Button tabs

tsFlatButtons	Flat button tabs


TTBCustomDrawFlags type
 VCL Reference

TTBCustomDrawFlags type

See also

Used in the OnAdvancedCustomDrawButton event handler.

Unit

ComCtrls

type TTBCustomDrawFlags = set of (tbNoEdges, tbHiliteHotTrack, tbNoOffset, tbNoMark, tbNoEtchedEffect);

Description

TTBCustomDrawFlags influences the subsequent painting of a tool button following an OnAdvancedCustomDrawButton event in the cdPrePaint stage:

Value	Meaning

tbNoEdges	The button is drawn without edges to distinguish it from the tool bar.

tbHiliteHotTrack	Enables the change in background color when the button is hot tracked. If this is not included in the set, the background color does not change for hot tracking.

tbNoOffset	The button is not offset when in the “down” position.

tbNoMark	Disables the default change in background color on buttons with the Marked property set to Truetrue.

tbNoEtchedEffect	Disables the etched effect that appears by default on disabled tool buttons.


TTextLineBreakStyle type
 VCL Reference

TTextLineBreakStyle type

Indicates the default set of characters used to divide lines in text.

Unit

System

type TTextLineBreakStyle = (tlbsLF, tlbsCRLF);

Description

TTextLineBreakStyle can have one of the following values:

Value	Meaning

tlbsLF	Linefeed only (#10)

tlbsCRLF	Carriage return followed by Linefeed only (#13#1010)


TTextRec type
 VCL Reference

TTextRec type

TTextRec is the internal format for text files.

Unit

System

type

  PTextBuf = ^TTextBuf;

  TTextBuf = array[0..127] of Char;

  TTextRec = packed record

    Handle: Integer;

    Mode: Word;

    Flags: Word;

    BufSize: Cardinal;

    BufPos: Cardinal;

    BufEnd: Cardinal;

    BufPtr: PChar;

    OpenFunc: Pointer;

    InOutFunc: Pointer;

    FlushFunc: Pointer;

    CloseFunc: Pointer;

    UserData: array[1..32] of Byte;

    Name: array[0..259] of Char;

    Buffer: TTextBuf;

  end;

Description

TTextRec is the internal format of a variable of type text. You would never declare a variable of this type. However, you can use TTextRec to typecast a text file variable to access the internal data fields, such as the file name.

TextBuf is the type of the Buffer entry in the TTextRec record, and indicates the size of the buffer used.

Note:	Do not use this unless you are familiar with writing Object Pascal text file device drivers.


TThreadFunc type
 VCL Reference

TThreadFunc type

See also

TThreadFunc is a pointer to the starting address of a routine for a new thread of execution.

Unit

System

type TThreadFunc = function(Parameter: Pointer): Integer;

Description

The TThreadFunc type defines a type of routine that is the starting address for a new thread of execution. A TThreadFunc routine is passed to the Delphi routine BeginThread or the Windows API CreateThread function. When BeginThread executes, TThreadFunc acts as the entry point for the new thread.

The Parameter pointer passed to the BeginThread routine is passed directly to the thread function. Parameter can be a single 32-bit value or a 32-bit pointer to other data. The value in Parameter can be used within the TThreadFunc routine.

TThreadFunc returns the value of the thread entry point procedure. This result is usually passed to the EndThread routine. An application can retrieve the TThreadFunc return value by calling the Windows API GetExitCodeThread function.


TThreadingModel type
 VCL Reference

TThreadingModel type

TThreadingModel indicates how COM serializes calls to a COM object.

Unit

Comobj

type TThreadingModel = (tmSingle, tmApartment, tmFree, tmBoth, tmNeutral);

Description

ThreadingModel determines how COM serializes calls to a COM object. The application must ensure that the COM object implementation can safely handle the specified threading model.

The following table lists the possible values for TThreadingModel.

Value	Meaning

tmSingle	COM serializes all client requests. The object does not need to provide thread support.

tmApartment	COM ensures that any instance of the COM object services one request at a time. Different objects from the same server can be called on different threads, but each object is called only from that one thread. Instance data is safe, global data must be protected using critical sections or some other form of serialization. The thread’s local variables are reliable across multiple calls.

tmFree	Also called multi-threaded apartment. The COM object can receive calls from any thread at any time. Objects must protect all instance and global data using critical sections or some other form of serialization. Thread local variables are not reliable across multiple calls.

tmBoth	Objects can support clients that use either apartment or free threading models. It supports both threading models when clients may be using either single-threaded or free threading models.

tmNeutral	Multiple clients can call the object on different threads at the same time, but COM ensures that no two calls conflict. You must guard against thread conflicts involving global data and any instance data that is accessed by more than one method. This model should not be used with objects that have a user interface. This model is only available under COM+. Under COM, it is mapped to the Apartment model.


TTimeStamp type
 VCL Reference

TTimeStamp type

See also

TTimeStamp represents time and date values.

Unit

SysUtils

type

  TTimeStamp = record

    Time: Integer;      { Number of milliseconds since midnight }

    Date: Integer;      { One plus number of days since 1/1/0001 }

  end;

Description

Use TTimeStamp to represent date and time values when a great deal of accuracy is required for the time portion.  When the time values do not need to be precise to the millisecond, use the more compact TDateTime representation. If additional precision is needed, use TSQLTimeStamp (but do NOT assign it to a Variant).

TTimeStamp is a record with a Time field that represents the number of seconds elapsed since midnight, and a Date field that represents the number of calendar days since the start of the calendar.


TTrackButton type
 VCL Reference

TTrackButton type

Used to specify which mouse button activates a tool button menu.

Unit

Menus

type TTrackButton = (tbRightButton, tbLeftButton);

Description

TTrackButton can have one of the following values:

Value	Meaning

tbRightButton	The right mouse button activates the tool button menu.

tbLeftButton	The left mouse button activates the tool button menu.


TTVAdvancedCustomDrawEvent type
 VCL Reference

TTVAdvancedCustomDrawEvent type

See also

Used in the TCustomTreeView.OnAdvancedCustomDraw event.

Unit

ComCtrls

type TTVAdvancedCustomDrawItemEvent = procedure(Sender: TCustomTreeView; const ARect: TRect; Stage: TCustomDrawStage; var DefaultDraw: Boolean) of object;

Description

Sender is the tree-view control that is being painted.

ARect is the rectangle that defines the boundaries of the tree-view control on its canvas.

Stage indicates the current stage of the painting process.

DefaultDraw specifies whether the control should paint itself after the event handler exits. This parameter is only used when Stage is cdPrePaint.


TTVAdvancedCustomDrawItemEvent type
 VCL Reference

TTVAdvancedCustomDrawItemEvent type

See also

Used in the TCustomTreeView.OnAdvancedCustomDrawItem event.

Unit

ComCtrls

type TTVAdvancedCustomDrawItemEvent = procedure(Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage; var PaintImages, DefaultDraw: Boolean) of object;

Description

Sender is the tree-view control in which an item is about to be painted.

Node is the item that is about to be painted.

State is the item's current state: one or more of cdsSelected, cdsGrayed, cdsDisabled, cdsChecked, cdsFocused, csDefault, cdsHot, cdsMarked, cdsIndeterminate.

Stage indicates the current stage of the painting process.

PaintImages specifies whether the control should paint the images associated with the control. This parameter is only used when Stage is cdPrePaint.

DefaultDraw specifies whether the control should paint the text of the item after the event handler exits. This parameter is only used when Stage is cdPrePaint.


TTVCustomDrawEvent type
 VCL Reference

TTVCustomDrawEvent type

Used in the TCustomTreeView.OnCustomDraw event.

Unit

ComCtrls

type TTVCustomDrawItemEvent = procedure(Sender: TCustomTreeView; ARect: TRect; var DefaultDraw: Boolean) of object;

Description

Sender is the tree-view control that is about to be painted.

ARect is the rectangle that defines the boundaries of the tree-view control.

DefaultDraw specifies whether the control should paint itself after the event handler exits.


TTVCustomDrawItemEvent type
 VCL Reference

TTVCustomDrawItemEvent type

See also

Used in the TCustomTreeView.OnCustomDrawItem event.

Unit

ComCtrls

type TTVCustomDrawItemEvent = procedure(Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; var DefaultDraw: Boolean) of object;

Description

Sender is the tree-view control in which an item is about to be painted.

Node is the item that is about to be painted.

State is the item's current state: one or more of cdsSelected, cdsGrayed, cdsDisabled, cdsChecked, cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate.

DefaultDraw specifies whether the control should paint the item after the event handler exits.


TTVExpandedEvent type
 VCL Reference

TTVExpandedEvent type

See also

Represents the event handler for events that notify a tree view of changes to one of its nodes.

Unit

ComCtrls

type TTVExpandedEvent = procedure(Sender: TObject; Node: TTreeNode) of object;

Description

TTVExpandedEvent is used to respond to notifications of events that occur to the nodes of a tree view control. It is a generic event handler for various events that notify the tree view of something that happened to a node.

Sender is the tree-view control that contains the node that is the focus of the notification.

Node is the item that has been expanded, collapsed, deleted, or which is about to be drawn.


TTypeData type
 VCL Reference

TTypeData type

TTypeData is used internally to represent type information.

Unit

TypeInfo

type

  ShortStringBase = string[255];

  TIntfFlag = (ifHasGuid, ifDispInterface, ifDispatch);

  TIntfFlags = set of TIntfFlag;

  TIntfFlagsBase = set of TIntfFlag;

  PTypeData = ^TTypeData;

  TTypeData = packed record

    caseTTypeKindof

      tkUnknown, tkLString, tkWString, tkVariant: ();

      tkInteger, tkChar, tkEnumeration, tkSet, tkWChar: (

        OrdType: TOrdType;

        caseTTypeKindof

          tkInteger, tkChar, tkEnumeration, tkWChar: (

            MinValue: Longint;

            MaxValue: Longint;

            caseTTypeKindof

              tkInteger, tkChar, tkWChar: ();

              tkEnumeration: (

                BaseType: PPTypeInfo;

                NameList: ShortStringBase));

          tkSet: (CompType: PPTypeInfo));

      tkFloat: (FloatType: TFloatType);

      tkString: (MaxLength: Byte);

      tkClass: (

        ClassType: TClass;

        ParentInfo: PPTypeInfo;

        PropCount: SmallInt;

        UnitName: ShortStringBase );

      tkMethod: (

        MethodKind: TMethodKind;

        ParamCount: Byte;

        ParamList: array[0..1023] of Char );

      tkInterface: (

        IntfParent : PPTypeInfo; { ancestor }

        IntfFlags : TIntfFlagsBase;

        Guid : TGUID;

        IntfUnit : ShortStringBase; );

      tkInt64: (

        MinInt64Value, MaxInt64Value : Int64;

end;

Description

A TTypeData structure represents a category of properties, events, or methods in parameters passed to several routines in the TypInfo unit.


TTypeKind, TTypeInfo, PTypeInfo, PPTypeInfo types
 VCL Reference

TTypeKind, TTypeInfo, PTypeInfo, PPTypeInfo types

These types describe a type that is manipulated in the forms designer.

Unit

TypeInfo

type

  TTypeKind = (tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod, tkWChar, tkLString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkDynArray);

  PPTypeInfo = ^PTypeInfo;

  PTypeInfo = ^TTypeInfo;

  TTypeInfo = record

    Kind: TTypeKind;

    Name: ShortString;

  end;

Description

TTypeKind is an enumerated type that classifies a type.

TTypeInfo describes a type by giving its classification and its name.

PTypeInfo is a pointer to a TTypeInfo record.

PPTypeInfo is a pointer to a PTypeInfo pointer.


TUnDockEvent type
 VCL Reference

TUnDockEvent type

See also

Used in the OnUnDock event.

Unit

Controls

type TUnDockEvent = procedure(Sender: TObject; Client: TControl; NewTarget: TWinControl; var Allow: Boolean) of object;

Description

Sender is the object from which a control is being undocked.

Client is the control that is being undocked.

NewTarget is the control to which Client is being docked.

Allow is whether to allow the undocking.


TUpDownDirection type
 VCL Reference

TUpDownDirection type

Indicates the direction in which the position of an updown control changes.

Unit

ComCtrls

type TUpDownDirection = (updNone, updUp, updDown);

Description

The following table lists the possible values:

Value	Description

updNone	The position is changing to an illegal value (less than the minimum value or greater than the maximum value).

updUp	The position is increasing.

updDown	The position is decreasing.


TVarRec type
 VCL Reference

TVarRec type

TVarRec is used inside a function with a parameter type of array of const.

Unit

System

const
vtInteger    = 0;
vtBoolean    = 1;
vtChar       = 2;
vtExtended   = 3;
vtString     = 4;
vtPointer    = 5;
vtPChar      = 6;
vtObject     = 7;
vtClass      = 8;
vtWideChar   = 9;
vtPWideChar  = 10;
vtAnsiString = 11;
vtCurrency   = 12;
vtVariant    = 13;
vtInterface  = 14;
vtWideString = 15;
vtInt64      = 16;

type
  PVarRec = ^TVarRec;
  TVarRec = record
    case Byte of
      vtInteger:    (VInteger: Integer; VType: Byte);
      vtBoolean:    (VBoolean: Boolean);
      vtChar:       (VChar: Char);
      vtExtended:   (VExtended: PExtended);
      vtString:     (VString: PShortString);
      vtPointer:    (VPointer: Pointer);
      vtPChar:      (VPChar: PChar);
      vtObject:     (VObject: TObject);
      vtClass:      (VClass: TClass);
      vtWideChar:   (VWideChar: WideChar);
      vtPWideChar:  (VPWideChar: PWideChar);
      vtAnsiString: (VAnsiString: Pointer);
      vtCurrency:   (VCurrency: PCurrency);
      vtVariant:    (VVariant: PVariant);
      vtInterface:  (VInterface: Pointer);
      vtWideString: (VWideString: Pointer);
      vtInt64:      (VInt64: PInt64);
end;

Description

TVarRec type is used inside a function with a parameter type of array of const. The compiler automatically translates each element in the array to a TVarRec value. Use TVarRec to work with individual elements of the array when implementing the function that has an array of const parameter.

The VType field indicates the simple type of each TVarRec value. The variable type constants represent the values passed in the tag of the TVarRec structure.


TValueRelationship type
 VCL Reference

TValueRelationship type

TValueRelationship is the return type for global routines that compare values.

Unit

Types

type TValueRelationship = -1..1;

Description

TValueRelationship represents the relationship between two values. Each TValueRelationship value has a corresponding symbolic constant, as indicated in the following table:

Value	Constant	Meaning

-1	LessThanValue	The first value is less than the second value.

0	EqualsValue	The two values are equal.

1	GreaterThanValue	The first value is greater than the second value.


TValueType type
 VCL Reference

TValueType type

See also

TValueType defines the kinds of values written to and read from filer objects.

Unit

Classes

type TValueType = (vaNull, vaList, vaInt8, vaInt16, vaInt32, vaExtended, vaString, vaIdent, vaFalse, vaTrue, vaBinary, vaSet, vaLString, vaNil, vaCollection, vaSingle, vaCurrency, vaDate, vaWString, vaInt64, vaUTF8String);

Description

TValueType is the type used by the TReader and TWriter filer objects to type check property values that are read from and written to streams when streaming components and their properties.

The VCL filers use a tagged value system, where each value on the stream is preceded by a prefix indicating its type. Those prefixes are of type TValueType. The following table lists the values for TValueType:

Value	Meaning

vaNull	identifies the type as the const Variant Null.

vaList	identifies the type as a list of tagged items ending with null.

vaInt8	identifies the type as a Shortint.

vaInt16	identifies the type as a Smallint.

vaInt32	identifies the type as a Longint.

vaExtended	identifies the type as a float.

vaString	identifies the type as a short string

vaIdent	identifies the type as a Pascal identifier string.

vaFalse	identifies the type as the Boolean False.

vaTrue	identifies the type as the Boolean True.

vaBinary	identifies the type as a block of binary preceded by a length count.

vaSet	identifies the type as a set.

vaLString	identifies the type as a long string.

vaNil	identifies the type as nil.

vaCollection	identifies the type as a TCollection.

vaSingle	identifies the type as a Single.

vaCurrency	identifies the type as a Currency.

vaDate	identifies the type as a Date.

vaWString	identifies the type as a WideString.

vaInt64	identifies the type as an Int64.

vaUTF8String	identifies the type as a UTF8String.


TVarData type
 VCL Reference

TVarData type

See also	Example

TVarData represents the internal structure of a Variant variable.

Unit

System

type

  TVarArrayBound = packedrecord
  ElementCount: Integer;
  LowBound: Integer;
end;
TVarArrayBoundArray = array [0..0] of TVarArrayBound;

  PVarArray = ^TVarArray;
TVarArray = packedrecord
  DimCount: Word;
  Flags: Word;
  ElementSize: Integer;
  LockCount: Integer;
  Data: Pointer;
  Bounds: TVarArrayBoundArray;
end;

  TVarData = packed record

  VType: TVarType;

  case Integer of

    0: (Reserved1: Word;

        case Integer of

          0: (Reserved2, Reserved3: Word;

              case Integer of

                varSmallInt: (VSmallInt: SmallInt);

                varInteger:  (VInteger: Integer);

                varSingle:   (VSingle: Single);

                varDouble:   (VDouble: Double);

                varCurrency: (VCurrency: Currency);

                varDate:     (VDate: Double);

                varOleStr:   (VOleStr: PWideChar);

                varDispatch: (VDispatch: Pointer);

                varError:    (VError: LongWord);

                varBoolean:  (VBoolean: WordBool);

                varUnknown:  (VUnknown: Pointer);

                varShortInt: (VShortInt: ShortInt);

                varByte:     (VByte: Byte);

                varWord:     (VWord: Word);

                varLongWord: (VLongWord: LongWord);

                varInt64:    (VInt64: Int64);

                varString:   (VString: Pointer);

                varAny:      (VAny: Pointer);

                varArray:    (VArray: PVarArray);

                varByRef:    (VPointer: Pointer);

             );

          1: (VLongs: array[0..2] of LongInt);

       );

    2: (VWords: array [0..6] of Word);

    3: (VBytes: array [0..13] of Byte);

  end;

Description

The TVarData type represents the internal structure of a Variant variable. The internal structure of a Variant is compatible with the Variant type used by COM and the Win32 APIs.

The VType field of a TVarData record contains the type code of the variant in the lower twelve bits (the bits defined by the varTypeMask constant). In addition, the varArray bit may be set to indicate that the Variant is an array, and the varByRef bit may be set to indicate that the Variant contains a reference as opposed to a value.

The Reserved1, Reserved2, and Reserved3 fields of a TVarData record are unused.

The contents of the remaining eight bytes of a TVarData record depend on the VType field. If neither the varArray nor the varByRef bits are set, the Variant contains a value of the given type. This can be a predefined type or a custom Variant type.

If the varArray bit is set, the Variant contains a pointer to a TVarArray structure that defines the specifics of the array. The type of each array element is given by the varTypeMask bits in the VType field.

If the varByRef bit is set, the Variant contains a reference to a value of the type given by the varTypeMask and varArray bits in the VType field.

Note that the varString and varAny type codes are private to Delphi. Variants containing a varString value should never be passed to a non-Delphi function. Delphi's Automation support will automatically convert varString variants to varOleStr variants before passing them as parameters to external functions. Variants containing a varAny value should only be passed to CORBA functions.


TVariantManager type
 VCL Reference

TVariantManager type

See also

TVariantManager defines entry points for variant conversion routines and other procedures that define variant behavior.

Unit

System

type

  PVariantManager = ^TVariantManager;

  TVariantManager = record

    VarClear: procedure(var V : Variant);

    VarCopy: procedure(var Dest: Variant; const Source: Variant);

    VarCopyNoInd: procedure;

    VarCast: procedure(var Dest: Variant; const Source: Variant; VarType: Integer);

    VarCastOle: procedure(var Dest: Variant; const Source: Variant; VarType: Integer);

    VarToInt: function(const V: Variant): Integer;

    VarToInt64: function(const V: Variant): Int64;

    VarToBool: function(const V: Variant): Boolean;

    VarToReal: function(const V: Variant): Extended;

    VarToCurr: function(const V: Variant): Currency;

    VarToPStr: procedure(var S; const V: Variant);

    VarToLStr: procedure(var S: string; const V: Variant);

    VarToWStr: procedure(var S: WideString; const V: Variant);

    VarToIntf: procedure(var Unknown: IInterface; const V: Variant);

    VarToDisp: procedure(var Dispatch: IDispatch; const V: Variant);

    VarToDynArray: procedure(var DynArray: Pointer; const V: Variant; TypeInfo: Pointer);

    VarFromInt: procedure(var V: Variant; const Value, Range: Integer);

    VarFromInt64: procedure(var V: Variant; const Value: Int64);

    VarFromBool: procedure(var V: Variant; const Value: Boolean);

    VarFromReal: procedure;

    VarFromTDateTime: procedure;

    VarFromCurr: procedure;

    VarFromPStr: procedure(var V: Variant; const Value: ShortString);

    VarFromLStr: procedure(var V: Variant; const Value: string);

    VarFromWStr: procedure(var V: Variant; const Value: WideString);

    VarFromIntf: procedure(var V: Variant; const Value: IInterface);

    VarFromDisp: procedure(var V: Variant; const Value: IDispatch);

    VarFromDynArray: procedure(var V: Variant; const DynArray: Pointer; TypeInfo: Pointer);

    OleVarFromPStr: procedure(var V: OleVariant; const Value: ShortString);

    OleVarFromLStr: procedure(var V: OleVariant; const Value: string);

    OleVarFromVar: procedure(var V: OleVariant; const Value: Variant);

    OleVarFromInt: procedure(var V: OleVariant; const Value, Range: Integer);

    VarOp: procedure(var Left: Variant; const Right: Variant; OpCode: TVarOp);

    VarCmp: procedure(const Left, Right: TVarData; const OpCode: TVarOp);

    VarNeg: procedure(var V: Variant);

    VarNot: procedure(var V: Variant);

    DispInvoke: procedure(Dest: PVarData; const Source: TVarData; CallDesc: PCallDesc; Params: Pointer); cdecl;

    VarAddRef: procedure(var V: Variant);

    VarArrayRedim: procedure(var A : Variant; HighBound: Integer);

    VarArrayGet: function(var A: Variant; IndexCount: Integer; Indices: Integer): Variant; cdecl;

    VarArrayPut: procedure(var A: Variant; const Value: Variant;

      IndexCount: Integer; Indices: Integer); cdecl;

    WriteVariant: function(var T: Text; const V: Variant; Width: Integer): Pointer;

    Write0Variant: function(var T: Text; const V: Variant): Pointer;  end;

Description

The TVariantManager type is used by the GetVariantManager and SetVariantManager procedures. It defines routines that perform variant type conversions and other tasks that implement variant behavior.


TVarOp type
 VCL Reference

TVarOp type

See also

TVarOp identifies an operator that can be used with a Variant.

Unit

System

type TVarOp = Integer;

Description

TVarOp to an operator that is used with a Variant. The following table lists the constants defined in the System unit that can be assigned to a TVarOp value.

Value	Operation

opAdd	addition (+)

opSubtract	subtraction(-)

opMultiply	multiplication (*)

opDivide	floating-point division (/)

opIntDivide	integer division (div)

opModulus	remainder(mod)

opShiftLeft	left shift (shl)

opShiftRight	right shift(shr)

opAnd	bitwise and (and)

opOr	bitwise or (or)

opXor	bitwise exclusive or (xor)

opCompare	any comparison operator (=, <>, <, <=, >, >=)

opNegate	unary minus (-)

opNot	logical negation (not)

opCmpEQ	equality comparison (=)

opCmpNE	inequality comparison (<>)

opCmpLT	less than (<)

opCmpLE	less than or equal (<=)

opCmpGT	greater than (>)

opCmpGE	greater than or equal (>=)


TVarType type
 VCL Reference

TVarType type

See also

TVarType represents a variant type code.

Unit

System

type TVarType = Word;

Description

TVarType is used by TVarData and TCustomVariantType to represent variant type codes.

Custom Variant types use variant type codes in the range from $010F to $0FFF. Built-in Variant types use the following predefined type codes, which are defined in the system unit:

const
  varEmpty    = $0000;
  varNull     = $0001;
  varSmallint = $0002;
  varInteger  = $0003;
  varSingle   = $0004;
  varDouble   = $0005;
  varCurrency = $0006;
  varDate     = $0007;
  varOleStr   = $0008;
  varDispatch = $0009;
  varError    = $000A;
  varBoolean  = $000B;
  varVariant  = $000C;
  varUnknown  = $000D;
  varShortInt = $0010;
  varByte     = $0011;
  varWord     = $0012;
  varLongWord = $0013;
  varInt64    = $0014;
  varStrArg   = $0048;
  varString   = $0100;
  varAny      = $0101;
  varTypeMask = $0FFF;
  varArray    = $2000;
  varByRef    = $4000;

The last three constants (varTypeMask, varArray, and VarByRef) do not represent variant type codes per se. varTypeMask can be used to mask off the simple type code from the entire variant type code. The entire type code may include one of the two bits identified by varArray or varByRef. varArray identifies the Variant as an array of Variants (whose elements are of the simple type code). varByRef indicates that the Variant is an indirect reference to the simple type.


TWindowHook type
 VCL Reference

TWindowHook type

See also

TWindowHook is the type for a dialog procedure.

Unit

Forms

type TWindowHook = function(var Message: TMessage): Booleanof object;

Description

TWindowHook is the type for the window procedure of a non-VCL dialog box. Like most window procedures, TWindowHook takes a message record as an argument.

Except in response to the WM_INITDIALOG message, the window hook should return True if it processes the message, and False if it does not. When the Msg field of the Message parameter is WM_INITDIALOG, the window hook should return False if it explicitly sets the focus to one of the controls in the dialog box. Otherwise, it should return True, in which case the system sets the focus to the first control in the dialog box that can be given the focus.


TWindowState type
 VCL Reference

TWindowState type

See also

TWindowState indicates whether a form is maximized, minimized, or normally sized.

Unit

Forms

type TWindowState = (wsNormal, wsMinimized, wsMaximized);

Description

TWindowState describes the state of a form window. The following table lists the possible values:

Value	Meaning

wsNormal	The form is in its normal state (that is, neither minimized nor maximized).

wsMinimized	The form is minimized.

wsMaximized	The form is maximized.


TWMKey type
 VCL Reference

TWMKey type

See also

TWMKey represents a Windows Keystroke message.

Unit

Messages

type

  TWMKey = packedrecord

    Msg: Cardinal;

    CharCode: Word;

    Unused: Word;

    KeyData: Longint;

    Result: Longint;

  end;

Description

TWMKey is the message record for all Windows keyboard messages.

The Msg field is the Windows message code.

The CharCode field specifies the virtual key code for the key that the user pressed. This is either an ANSI character or a virtual key constant such as VK_CANCEL.

The KeyData field indicates the repeat count, scan code, extended-key flag, context code, and so on. See the Windows help system for a keystroke message such as WM_KEYDOWN for details on the possible values.

The Result field holds the value returned by the application processing the message.


TWMLButtonDown type
 VCL Reference

TWMLButtonDown type

See also

TWMLButtonDown represents the Windows message that occurs when the user clicks the left mouse button.

Unit

Messages

type TWMLButtonDown = TWMMouse;

Description

TWMLButtonDown is the message record for Windows messages informing an application that the user just clicked the left mouse button. It is the same as all mouse messages.


TWMMenuChar type
 VCL Reference

TWMMenuChar type

See also

TWMMenuChar represents a Windows Keystroke message directed at a menu.

Unit

Messages

type TWMMenuChar = record

    Msg: Cardinal;

    User: Char;

    Unused: Byte;

    MenuFlag: Word; { MF_POPUP, MF_SYSMENU }

    Menu: HMENU;

    Result: Longint;

  end;

Description

TWMMenuChar is the message record for all Windows keyboard messages that are sent to menu items.

The Msg field is the Windows message code.

The User field specifies the virtual key code for the key that the user pressed. This is either an ANSI character or a virtual key constant such as VK_CANCEL.

The Unused field is ignored.

The MenuFlag field indicates the type of menu to which the message is directed. It should always be MF_POPUP, indicating a drop-down menu, submenu, or shortcut menu. (Earlier versions of Windows also supported MF_SYSMENU for the system menu, but the use of this flag is obsolete).

The Menu field is the handle of the menu to which the message is directed.

The Result field holds the value returned by the application processing the message. It should be one of the following values:

Value	Meaning

MNC_IGNORE 	Tells Windows to discard the character the user pressed and create a short beep on the system speaker.

MNC_CLOSE 	Tells Windows to close the active menu.

MNC_EXECUTE 	Combined with an index in the low-order word, tells Windows to choose the item specified by that index. The owner window receives a WM_COMMAND message.

MNC_SELECT 	Combined with an index in the low-order word, tells Windows to select the item specified by that index.


TWMMouse type
 VCL Reference

TWMMouse type

See also

TWMMouse represents a Windows mouse message.

Unit

Messages

type

  TWMMouse = packedrecord

    Msg: Cardinal;

    Keys: Longint;

    case Integer of

      0: (

        XPos: Smallint;

        YPos: Smallint);

      1: (

        Pos: TSmallPoint;

        Result: Longint);

  end;

Description

TWMMouse is the message record for all Windows mouse messages.

The Msg field is the Windows message code.

The Keys field indicates whether various keys are down. It is a combination of the following values:

Value	Meaning

MK_CONTROL	The Control key is down.

MK_LBUTTON	The left mouse button is down.

MK_MBUTTON	The middle mouse button is down.

MK_RBUTTON	The right mouse button is down.

MK_SHIFT	The shift key is down.

The Pos field (or the XPos and YPos fields) indicates the global coordinates of the mouse pointer.

The Result field holds the value returned by the application processing the message.


TWMNotify type
 VCL Reference

TWMNotify type

See also

TWMNotify represents a Windows notification message.

Unit

Messages

type

  TWMNotify = packedrecord

    Msg: Cardinal;

    IDCtrl: Longint;

    NMHdr: PNMHdr;

    Result: Longint;

  end;

Description

TWMNotify is the message record for all Windows notification messages.

The Msg field is the Windows message code.

The IDCtrl field is the resource ID of the control that sent the notification.

The NMHdr field is a pointer to a notification header record. This record has three members:

hwndFrom, which is the window handle of the control that sent the notification.

idFrom, which is the same as the IDCtrl field of TWMNotify.

code, which is the notification code. The notification code’s meaning depends on the type of control that sent the message.

The Result field holds the value returned by the application processing the message.


TWMPaint type
 VCL Reference

TWMPaint type

See also

TWMKey represents a Windows Paint message.

Unit

Messages

type

  TWMPaint = packedrecord

    Msg: Cardinal;

    DC: HDC;

    Unused: Longint;

    Result: Longint;

  end;

Description

TWMPaint is the message record for all Windows Paint messages.

The Msg field is the Windows message code.

The DC field specifies handle to the device context that should be used for painting. This value should be assigned as the Handle property of the canvas of the object that needs painting. If DC is null, a valid device context must be obtained by calling the Windows API BeginPaint.

The Unused field is not used.

The Result field holds the value returned by the application processing the message.


TWndMethod type
 VCL Reference

TWndMethod type

See also

TWndMethod is the type for Windows message procedures.

Unit

Classes

type TWndMethod = procedure(var Message: TMessage) of object;

Description

Each Window has a message procedure that responds to calls from Windows. These calls can originate from Windows (such as paint messages), from user actions (such as mouse messages), or from your messages that you send in your own code.

TWndMethod is the type for VCL-based message procedures. Message procedures of this type can be assigned to controls using the WindowProc method. In addition, a window that implements this procedure but which is not associated with a control can be created using the AllocateHWnd function.

The Message parameter encapsulates the message to which the procedure responds. It contains fields for the incoming message parameters and a result field that holds the return value.


TWordArray type
 VCL Reference

TWordArray type

TWordArray declares a general array of type Word.

Unit

SysUtils

type

  PWordArray = ^TWordArray;

  TWordArray = array[0..16383] of Word;

Description

TWordArray declares a general array of type Word that can be used in typecasting.


UCS4Char, UCS4String types
 VCL Reference

UCS4Char, UCS4String types

UCS4Char and UCS4String are for working with 4-byte Unicode characters.

Unit

System

type

  UCS4Char = type LongWord;

  UCS4String = array of UCS4Char;

Description

UCS4Char represents a 4-byte Unicode character. UCS4String is a dynamic array of UCS4Char, which represents a string encoded using UCS4 (4-byte Unicode).


UTF8String type
 VCL Reference

UTF8String type

UTF8String represents a string in the UTF-8 character set.

Unit

System

type UTF8String = type string;

Description

UTF8String is the type for strings encoded using UTF-8. UTF-8 is an efficient encoding of Unicode character-strings that recognizes the fact that the majority of text-based communications are in ASCII, and optimizes the encoding of these characters.


Virtual key codes
 VCL Reference

Virtual key codes

See also

Virtual Key codes provide a symbolic representation of user key presses.

Unit

Windows

Description

Virtual key codes allow you to represent keyboard values for non-alphanumeric keys.Windows defines special constants for each key the user can press. These constants can then be used to refer to the keystroke in Windows API calls or in an OnKeyUp or OnKeyDown event handler.

Most of the virtual key codes are defined in the Windows unit. Additional key codes may be defined in special-purpose Windows wrappers such as the imm unit. For alphabetic keys, you should use ord with an uppercase character, for example, ord( 'M' ). To create a virtual key code for an alphanumeric value, use the Ord method. For example the virtual key code for ‘7’ is Ord(‘7’).

The following table lists the virtual key codes defined in the Windows unit:

Virtual Key Code	Corresponding key

VK_LBUTTON	Left mouse button

VK_RBUTTON	Right mouse button

VK_CANCEL	Control+Break

VK_MBUTTON	Middle mouse button

VK_BACK	Backspace key

VK_TAB	Tab key

VK_CLEAR	Clear key

VK_RETURN	Enter key

VK_SHIFT	Shift key

VK_CONTROL	Ctrl key

VK_MENU	Alt key

VK_PAUSE	Pause key

VK_CAPITAL	Caps Lock key

VK_KANA	Used with IME

VK_HANGUL	Used with IME

VK_JUNJA	Used with IME

VK_FINAL	Used with IME

VK_HANJA	Used with IME

VK_KANJI	Used with IME

VK_CONVERT	Used with IME

VK_NONCONVERT	Used with IME

VK_ACCEPT	Used with IME

VK_MODECHANGE	Used with IME

VK_ESCAPE	Esc key

VK_SPACE	Space bar

VK_PRIOR	Page Up key

VK_NEXT	Page Down key

VK_END	End key

VK_HOME	Home key

VK_LEFT	Left Arrow key

VK_UP	Up Arrow key

VK_RIGHT	Right Arrow key

VK_DOWN	Down Arrow key

VK_SELECT	Select key

VK_PRINT	Print key (keyboard-specific)

VK_EXECUTE	Execute key

VK_SNAPSHOT	Print Screen key

VK_INSERT	Insert key

VK_DELETE	Delete key

VK_HELP	Help key

VK_LWIN	Left Windows key (Microsoft keyboard)

VK_RWIN	Right Windows key (Microsoft keyboard)

VK_APPS	Applications key (Microsoft keyboard)

VK_NUMPAD0	0 key (numeric keypad)

VK_NUMPAD1	1 key (numeric keypad)

VK_NUMPAD2	2 key (numeric keypad)

VK_NUMPAD3	3 key (numeric keypad)

VK_NUMPAD4	4 key (numeric keypad)

VK_NUMPAD5	5 key (numeric keypad)

VK_NUMPAD6	6 key (numeric keypad)

VK_NUMPAD7	7 key (numeric keypad)

VK_NUMPAD8	8 key (numeric keypad)

VK_NUMPAD9	9 key (numeric keypad)

VK_MULTIPLY	Multiply key (numeric keypad)

VK_ADD	Add key (numeric keypad)

VK_SEPARATOR	Separator key (numeric keypad)

VK_SUBTRACT	Subtract key (numeric keypad)

VK_DECIMAL	Decimal key (numeric keypad)

VK_DIVIDE	Divide key (numeric keypad)

VK_F1	F1 key

VK_F2	F2 key

VK_F3	F3 key

VK_F4	F4 key

VK_F5	F5 key

VK_F6	F6 key

VK_F7	F7 key

VK_F8	F8 key

VK_F9	F9 key

VK_F10	F10 key

VK_F11	F11 key

VK_F12	F12 key

VK_F13	F13 key

VK_F14	F14 key

VK_F15	F15 key

VK_F16	F16 key

VK_F17	F17 key

VK_F18	F18 key

VK_F19	F19 key

VK_F20	F20 key

VK_F21	F21 key

VK_F22	F22 key

VK_F23	F23 key

VK_F24	F24 key

VK_NUMLOCK	Num Lock key

VK_SCROLL	Scroll Lock key

VK_LSHIFT	Left Shift key (only used with GetAsyncKeyState and GetKeyState)

VK_RSHIFT	Right Shift key (only used with GetAsyncKeyState and GetKeyState)

VK_LCONTROL	Left Ctrl key (only used with GetAsyncKeyState and GetKeyState)

VK_RCONTROL	Right Ctrl key (only used with GetAsyncKeyState and GetKeyState)

VK_LMENU	Left Alt key (only used with GetAsyncKeyState and GetKeyState)

VK_RMENU	Right Alt key (only used with GetAsyncKeyState and GetKeyState)

VK_PROCESSKEY	Process key

VK_ATTN	Attn key

VK_CRSEL	CrSel key

VK_EXSEL	ExSel key

VK_EREOF	Erase EOF key

VK_PLAY	Play key

VK_ZOOM	Zoom key

VK_NONAME	Reserved for future use

VK_PA1	PA1 key

VK_OEM_CLEAR	Clear key


WordRec type
 VCL Reference

WordRec type

See also

WordRec declares a utility record to store high and low order bytes of a variable.

Unit

SysUtils

type

  WordRec = packedrecord

    case Integer of

      0: (Lo, Hi: Byte);

      1: (Bytes: array [0..1] of Byte);

  end;

Description

The WordRec type declares a utility record that stores the high and low order bytes of the specified variable as type Byte. WordRec is used primarily for typecasting.


 VCL Reference


About Object and Component Help

The Object and Component Help is the complete source of Help on Delphi objects, components, global routines, types, and variables. The individual entries for objects, components, routines, types, and variables include the unit in which each is declared. These units are located in the sub-directories of the Delphi Source directory.

Objects

A Delphi object consists of methods, and in many cases, properties, and events. Properties represent the data contained in the object. Methods are the actions the object can perform. Events are conditions the object can react to. All objects descend from the ancestor object TObject.

Components

Components are visual objects that you can manipulate at design time. All components descend from TComponent.

Routines

Global routines are the procedures and functions from the runtime library and from the Visual Component Library (VCL). These routines are not part of a class, but can be called either directly or from within class methods.

Types

The types described in the Help are used as return types and parameter types for object methods, properties and events, and for global routines. In many cases, types are documented in the entry for the method, property, event or global routine in which they are used.

Constants and Variables

The constants and variables defined in the Help are declared in the runtime library and in the VCL. Some of these are instantiations of objects. Examples are the Application and Screen variables. Others represent routines that provide the underlying implementation of other methods or global routines. Examples include the AnsiResemblesProc and RegisterComponentsProc variables. Still other variables and constants represent information that can vary with the system or platform, such as the DateSeparator variable and PathDelim constant.

The Help on all of these topics can be accessed either by using the F1 key from the IDE or by using the Contents, Index, or Find from Help.


How to find Help using F1

See also

To display Help on a property or event, press the F1 key while the cursor is on that property or event as it appears in a cell in the Object Inspector.

To bring up Help on objects, components, methods, global routines, variables, types, or general topics, as well as on properties and events, type the word in your source code and press F1 while the cursor in on that word.


How to find Help by selecting Contents

See also

The Contents tab in Help provides information in 5 groups:

A list of objects and components by unit

An alphabetical list of objects and components

A list of global routines by category

A list of global routines by unit

An alphabetical list of global routines


How to find Help by selecting Index or Find

See also

To find Help on an object, component, method, property, event, global routine, type, variable, or topic, type the word in the edit window and press Enter or click on the topic found.

To access Help from Find, type the word in the edit window, select matching words to narrow your search, and click on the topic you want to display.


How to use examples in Help

See also

The Object and Component Help includes complete object examples (compilable), as well as code fragments for methods, properties, and events.

For object examples, you can view the source code or the .dfm files from help. The pathname is given for the entire example, including the project, .dfm, and source code files, so that you can choose to load and run the example yourself.

Object examples are located in subdirectories of the Delphi\Help\Examples directory.

Code fragments for the methods, properties, and events are accessible by clicking the example link.


How to program with a component

See also

1.	Select a component from the Component palette and add it to a form.

2.	Set property values of the component using the Object Inspector.

3.	Respond to events that might occur to the component at runtime. To respond to an event, you write code within an event handler. Your code modifies property values and calls methods.


TVirtualListAction
 VCL Reference

TVirtualListAction

Hierarchy	Properties	Methods	Events	Using TVirtualListAction	See also

TVirtualListAction provides items to a client controls.

Unit

ListActns

Description

TVirtualListAction supplies items dynamically at runtime to client controls such as list views, list boxes, or combo boxes. These items are supplied by the code you supply to an OnGetItem event handler.

When an application sets the Active property of a list action to True, the action fills all client controls with items. Each item may include text, an image, and a pointer to data. Each client control determines which of these features of the item it accepts.

When the user selects an item in one of the client controls, the client “executes” the list action, which causes it to generate an OnItemSelected event.

When a TVirtualListAction is added to an action manager, it uses the action to generate a drop-down list on a tool bar.


 VCL Reference

TVirtualListAction properties

TVirtualListAction	Alphabetically	Legend

Derived from TCustomListAction

Active

Count

Images

ItemIndex

Strings

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TVirtualListAction properties

TVirtualListAction	By object	Legend

ActionComponent

ActionList

Active

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

Count

DesignInfo

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Images

Index

ItemIndex

Name

Owner

SecondaryShortCuts

ShortCut

Strings

Tag

VCLComObject

Visible


 VCL Reference

TVirtualListAction events

TVirtualListAction	Alphabetically	Legend

In TVirtualListAction

OnGetItem

Derived from TCustomListAction

OnGetItemCount

OnItemSelected

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TVirtualListAction events

TVirtualListAction	By object	Legend

OnExecute

OnGetItem

OnGetItemCount

OnHint

OnItemSelected

OnUpdate


TVirtualListAction.OnGetItem
 VCL Reference

TVirtualListAction.OnGetItem

TVirtualListAction 	See also

Occurs when the list action needs to supply an item to its client controls.

type TGetVirtualItemEvent = procedure(Sender: TCustomListAction; const Index: Integer; var Value: String; var ImageIndex: Integer; var Data: Pointer) of object;

property OnGetItem: TGetVirtualItemEvent;

Description

Write an OnGetItem event handler to provide the items that the virtual list action supplies to clients. When you set the Active property to True, the virtual list action generates an OnGetItem event for every index from 0 to Count – 1. In the event handler, supply the string value, image, and data that corresponds to the index specified by Index.

Sender is the list action that is supplying data to client controls.

Index indicates which item is requested, where 0 is the first item, 1 is the second item, and so on up to the index that is one less than the value of the Count property.

Value returns the string value of the item. This is the text that appears in the client combo box or list box.

ImageIndex is the index of an image associated with the item. If the item is not associated with an image, ImageIndex should return –1. Otherwise, it should return the index of the desired image in the Images property.

Data returns a pointer to application-defined data that is associated with the item. For client controls that store items in a TStrings object, Data is the value of the Objects property for the item.


 VCL Reference

TVirtualListAction methods

TVirtualListAction	Alphabetically	Legend

In TVirtualListAction

GetItem

Derived from TCustomListAction

Create

ExecuteTarget

HandlesTarget

Derived from TCustomAction

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

UpdateTarget

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TVirtualListAction methods

TVirtualListAction	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetItem

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TVirtualListAction.GetItem
 VCL Reference

TVirtualListAction.GetItem

TVirtualListAction 	See also

Provides information about a specified item.

function GetItem(const Index: Integer; var Value: String; var ImageIndex: Integer; var Data: Pointer): Boolean;

Description

When you set the Active property to True, the virtual list action supplies items to client controls through a series of calls to GetItem, one for each item. GetItem fetches the information about each item by generating an OnGetItem event. It returns True if there is an OnGetItem event handler to provide information about the item, which is returned using the GetItem parameters. GetItem returns False if it can’t supply information about the item because there is no OnGetItem event handler.

Index indicates which item is desired, where 0 indicates the first item, 1 indicates the second item, and so on up to the number of items specified by the Count property.

Value returns the string value of the item. This is the text that appears in the client combo box or list box.

ImageIndex returns the index of an image associated with the item. If the item is not associated with an image, ImageIndex returns –1. Otherwise, it returns the index of an image in the Images property.

Data returns a pointer to application-defined data that is associated with the item. For client controls that store items in a TStrings object, Data supplies the value of the Objects property for the item.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TCustomListAction

TVirtualListAction


TWindowCascade
 VCL Reference

TWindowCascade

Hierarchy	Properties	Methods	Events	Using TWindowCascade	See also

TWindowCascade cascades the MDI child forms.

Unit

StdActns

Description

Add TWindowCascade to an action list to allow users to arrange the MDI child forms in an overlapping cascade. Controls such as menu items and tool buttons linked to this action cause the application to call the Cascade method of the MDI parent form.

TWindowCascade is designed to work with an MDI parent form as a target. It automatically disables itself if the active form is not an MDI parent or if it has no MDI children.


 VCL Reference

TWindowCascade properties

TWindowCascade	Alphabetically	Legend

Derived from TWindowAction

Form

Derived from TCustomAction

AutoCheck

Caption

Checked

DisableIfNoHandler

Enabled

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Name

SecondaryShortCuts

ShortCut

Visible

Derived from TContainedAction

ActionList

Category

Index

Derived from TBasicAction

ActionComponent

Derived from TComponent

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

Owner

Tag

VCLComObject


 VCL Reference

TWindowCascade properties

TWindowCascade	By object	Legend

ActionComponent

ActionList

AutoCheck

Caption

Category

Checked

ComObject

ComponentCount

ComponentIndex

Components

ComponentState

ComponentStyle

DesignInfo

DisableIfNoHandler

Enabled

Form

GroupIndex

HelpContext

HelpKeyword

HelpType

Hint

ImageIndex

Index

Name

Owner

SecondaryShortCuts

ShortCut

Tag

VCLComObject

Visible


 VCL Reference

TWindowCascade events

TWindowCascade	Alphabetically	Legend

Derived from TCustomAction

OnHint

Derived from TBasicAction

OnExecute

OnUpdate


 VCL Reference

TWindowCascade events

TWindowCascade	By object	Legend

OnExecute

OnHint

OnUpdate


 VCL Reference

TWindowCascade methods

TWindowCascade	Alphabetically	Legend

In TWindowCascade

ExecuteTarget

Derived from TWindowAction

HandlesTarget

UpdateTarget

Derived from TCustomAction

Create

Destroy

DoHint

Execute

Derived from TContainedAction

GetParentComponent

Update

Derived from TBasicAction

RegisterChanges

UnRegisterChanges

Derived from TComponent

BeforeDestruction

DestroyComponents

Destroying

ExecuteAction

FindComponent

FreeNotification

FreeOnRelease

GetNamePath

HasParent

InsertComponent

IsImplementorOf

ReferenceInterface

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UpdateAction

Derived from TPersistent

Assign

Derived from TObject

AfterConstruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance


 VCL Reference

TWindowCascade methods

TWindowCascade	By object	Legend

AfterConstruction

Assign

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

Destroy

DestroyComponents

Destroying

Dispatch

DoHint

Execute

ExecuteAction

ExecuteTarget

FieldAddress

FindComponent

Free

FreeInstance

FreeNotification

FreeOnRelease

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

GetParentComponent

HandlesTarget

HasParent

InheritsFrom

InitInstance

InsertComponent

InstanceSize

IsImplementorOf

MethodAddress

MethodName

NewInstance

ReferenceInterface

RegisterChanges

RemoveComponent

RemoveFreeNotification

SafeCallException

SetSubComponent

UnRegisterChanges

Update

UpdateAction

UpdateTarget


TWindowCascade.ExecuteTarget
 VCL Reference

TWindowCascade.ExecuteTarget

TWindowCascade	See also

Arranges the MDI child forms in an overlapping cascade.

procedure ExecuteTarget(Target: TObject): Boolean; override;

Description

Do not call the ExecuteTarget method. This method is called automatically when the action fires in response to a user action (for example, when the user selects a menu item or presses a tool button that is linked to this action).

Target is the currently active form when the action fires.

ExecuteTarget sets the Form property to Target, which must be an MDI parent form. It then calls that form’s Cascade method to arrange MDI child windows.


Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TWindowAction

TWindowCascade


TWriter
 VCL Reference

TWriter

Hierarchy	Properties	Methods	Events	See also

TWriter is a specialized filer object that writes data to its associated stream.

Unit

Classes

Description

TWriter is used internally by the VCL streaming system to write information associated with a component, such as published properties of components or custom property data, to a stream. TWriter handles the mechanics of writing the data associated with a component to a stream. It is the writer object, rather than the stream, that is responsible for handling the complexities of streaming components. These include methods for:

Writing different kinds of items to the associated stream.

Writing property deltas used for streaming inherited forms and properties with default values.

Writing nested groups of items or collections to the stream.

Other methods and properties of TWriter are used for interacting with stream and component objects.

Do not directly create writer objects. Writers are automatically created in stream object methods or in global routines that initiate the streaming process. These include:

the global routine ObjectTextToBinary procedure, which directly creates a writer.

the global WriteComponentResFile function, which creates a file stream that creates a writer.

the TStream.WriteDescendent method, which creates a writer object.

Once the streaming process is underway, programs do not need to directly manipulate writer objects. The interaction between the writer, component, and stream objects happens automatically in methods of these objects that make calls to each other.


 VCL Reference

TWriter properties

TWriter	Alphabetically	Legend

In TWriter

Position

RootAncestor

UseQualifiedNames

Derived from TFiler

Ancestor

IgnoreChildren

LookupRoot

Root


 VCL Reference

TWriter properties

TWriter	By object	Legend

Ancestor

IgnoreChildren

LookupRoot

Position

Root

RootAncestor

UseQualifiedNames


TWriter.Position
 VCL Reference

TWriter.Position

TWriter	See also

Represents the current writing position in the associated stream.

property Position: Longint;

Description

Position is used internally by writer objects to indicate the current writing position in the stream.

The value of Position will be inside the most recent buffer block read or the next block to be written. Thus, for writing, Position will generally be less than the stream's Position. When Position is set to a location outside the current buffer, the writer’s buffer is flushed to the stream.


TWriter.RootAncestor
 VCL Reference

TWriter.RootAncestor

TWriter	See also

Represents the ancestor of the component in the Root property.

property RootAncestor: TComponent;

Description

RootAncestor is used internally by writer objects for dealing with form inheritance. It is used to iterate through ancestor components when writing properties in inherited forms.

RootAncestor is always the ancestor form. For each component in Root, which is the inherited form, the Ancestor property tracks a corresponding component in RootAncestor.

The writer object iterates through each of the Root form's owned components, comparing each to the corresponding component in the RootAncestor form. It then writes only those properties in the current component that differ in some way from those in the Ancestor component.


TWriter.UseQualifiedNames
 VCL Reference

TWriter.UseQualifiedNames

TWriter	See also

Indicates whether all class names should be qualified by the name of the unit in which they are defined.

property UseQualifiedNames: Boolean;

Description

Set UseQualifiedNames to indicate whether class names need to be qualified by the name of the unit in which they are defined. For example, when writing a component such as TButton, which occurs in both VCL and CLX, setting UseQualifiedNames to True allows a reader to distinguish the VCL TButton control in StdCtrls from the CLX TButton control in QStdCtrls.


 VCL Reference

TWriter events

TWriter	Alphabetically	Legend

In TWriter

OnFindAncestor


 VCL Reference

TWriter events

TWriter	By object	Legend

OnFindAncestor


TWriter.OnFindAncestor
 VCL Reference

TWriter.OnFindAncestor

TWriter	See also

Occurs when a component is about to be written to a stream.

type TFindAncestorEvent = procedure(Writer: TWriter; Component: TComponent; const Name: string; var Ancestor, RootAncestor: TComponent) of object;

property OnFindAncestor: TFindAncestorEvent;

Description

OnFindAncestor allows the writer to explicitly specify the ancestor of a component when it is written to a stream. The WriteComponent method generates this event to override the value of the Ancestor property before writing a component to a stream.

The Writer parameter is the writer that is streaming the component.

The Component parameter is the component that is being streamed out.

The Name parameter is the name of the ancestor component.

On entry to the event handler, Ancestor is the ancestor component from which Component inherits its properties (if this is known). If the writer does not know the ancestor component, Ancestor is nil. The event handler sets Ancestor to the ancestor component for Component.

On entry to the event handler, RootAncestor is the value of the RootAncestor property. Changing this value in the event handler changes the value of the property.


 VCL Reference

TWriter methods

TWriter	Alphabetically	Legend

In TWriter

DefineBinaryProperty

DefineProperty

Destroy

FlushBuffer

Write

WriteBoolean

WriteChar

WriteCollection

WriteComponent

WriteCurrency

WriteDate

WriteDescendent

WriteFloat

WriteIdent

WriteInteger

WriteListBegin

WriteListEnd

WriteRootComponent

WriteSignature

WriteSingle

WriteStr

WriteString

WriteVariant

WriteWideString

Derived from TFiler

Create

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWriter methods

TWriter	By object	Legend

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Create

DefaultHandler

DefineBinaryProperty

DefineProperty

Destroy

Dispatch

FieldAddress

FlushBuffer

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException

Write

WriteBoolean

WriteChar

WriteCollection

WriteComponent

WriteCurrency

WriteDate

WriteDescendent

WriteFloat

WriteIdent

WriteInteger

WriteListBegin

WriteListEnd

WriteRootComponent

WriteSignature

WriteSingle

WriteStr

WriteString

WriteVariant

WriteWideString


TWriter.DefineBinaryProperty
 VCL Reference

TWriter.DefineBinaryProperty

TWriter	See also

Treats unformatted data as if it were the value of a published property, and writes it directly to a memory stream.

type TStreamProc = procedure(Stream: TStream) of object;

procedure DefineBinaryProperty(const Name: string; ReadData, WriteData: TStreamProc; HasData: Boolean); override;

Description

DefineBinaryProperty is called internally by the DefineProperties method of an object that has data it needs to store. DefineProperties takes a generic filer object as its parameter.

For writing binary data DefineProperties takes a TWriter object and then calls its DefineBinaryProperty method. DefineBinaryProperty writes the property’s name and it’s data, but only if the HasData parameter is True. Otherwise it does nothing.

The Name parameter specifies the name of the “fake” property to be written to the stream. A “fake” property is a property that is not published, and that exists only in the code for the DefineBinaryProperty method. The Top and Left properties of a non-visual component are examples of “fake” properties. These are also called “defined properties” or “custom defined properties.”

The TStreamProc type is the type of the ReadData and WriteData parameters. It is the method-pointer type that points to a procedure (defined in the storing object) that reads or writes a binary representation of the object's data directly to or from the stream passed as its Stream parameter. For TWriter the ReadData parameter is ignored.

The HasData parameter determines at run time whether the "fake" property has data to store (write).

Defined binary properties are quite rare. VCL objects that store graphics as binary data are the most common use of filer objects to store and retrieve that data. More commonly objects use the DefineProperty method. The difference between DefineBinaryProperty and DefineProperty is that with DefineBinaryProperty the component reads or writes the binary property directly to or from a memory stream object, rather than going through a filer object.

Note:	Streamable objects that are descended from TPersistent inherit a DefineProperties method, however DefineProperties does not do anything until TComponent. It is TComponent’s DefineProperties method that calls the writer’s DefineBinaryProperty when writing out binary data.


TWriter.DefineProperty
 VCL Reference

TWriter.DefineProperty

TWriter	See also	Example

Defines data the writer object writes as if the data were a property.

type

  TReaderProc = procedure(Reader: TReader) of object;

  TWriterProc = procedure(Writer: TWriter) of object;

procedure DefineProperty(const Name: string; ReadData: TReaderProc; WriteData: TWriterProc; HasData: Boolean); override;

Description

DefineProperty is called internally by the DefineProperties method of an object that has data it needs to store. DefineProperties takes a generic filer object as its parameter. For writing data, DefineProperties takes a TWriter object and calls its DefineProperty method. DefineProperty then writes the property’s name and its data, but only if the HasData parameter is True. Otherwise it does nothing.

The Name parameter specifies the name of the “fake” property to be written to the stream.

The TWriterProc type is the type of the WriteData parameter. It is the method-pointer type that points to a procedure (defined in the component object) that writes the object's data, that represents a property value, to the writer object. For TWriter the ReadData parameter is ignored.

The HasData parameter determines at run time whether the "fake" property has data to store (write). Thus, writer objects only use HasData when writing data.

The difference between DefineBinaryProperty and DefineProperty is that with DefineBinaryProperty, the binary data is written directly to a stream object, rather than going through a filer object.

When writing a component that has special (large) data storage requirements, the component’s DefineProperties can be overridden. For each special or “fake” property item, call TFiler.DefineProperty or TFiler.DefineBinaryProperty. For the ReadData and WriteData parameters, pass in methods of the component that know how to handle that special data type. When reading, ReadData is called. When writing, WriteData is called.

Note:	When defining properties, a component should be aware of the Ancestor property, which, if non-nil, indicates that the component should only write the values of properties that differ from those inherited from Ancestor.


TWriter.Destroy
 VCL Reference

TWriter.Destroy

TWriter	See also

Destroys of an instance of a writer.

destructor Destroy; override;

Description

Do not call Destroy directly in an application. Writers are created indirectly by the global routines or stream methods that use them. When these routines are finished, they handle disposing of the writer.

Destroy writes the buffer before calling the inherited Destroy, which frees the buffer.


TWriter.FlushBuffer
 VCL Reference

TWriter.FlushBuffer

TWriter

Synchronizes the writer's buffer with the associated stream by writing the current buffer.

procedure FlushBuffer; override;

Description

FlushBuffer is not generally used except for internal implementation in Delphi.

FlushBuffer writes the current buffer to the stream, then resets an internal pointer to the correct position.


TWriter.Write
 VCL Reference

TWriter.Write

TWriter	See also

Writes Count bytes from Buf to the writer object's associated stream.

procedure Write(const Buf; Count: Longint);

Description

Do not call Write directly. It is used internally to write data to the stream. Many other writer methods call Write, usually after setting pertinent values or verifying data types.


TWriter.WriteBoolean
 VCL Reference

TWriter.WriteBoolean

TWriter	See also	Example

Writes the Boolean value passed in Value to the writer object's stream.

procedure WriteBoolean(Value: Boolean);

Description

WriteBoolean is used internally by the Delphi streaming system to write component properties to a stream. Use WriteBoolean for writing component boolean properties to streams.

WriteBoolean checks to ensure that Value is the correct type before calling Write to write the boolean value and its value type to the stream.


TWriter.WriteChar
 VCL Reference

TWriter.WriteChar

TWriter	See also

Writes the character passed in Value to the writer object's stream.

procedure WriteChar(Value: Char);

Description

WriteChar is used internally by the Delphi streaming system to write component properties to a stream. Use WriteChar for writing component character properties to streams.

WriteChar calls WriteString which checks to ensure that Value is the correct type before calling Write to write the character and its value type to the stream.

Note:	WriteChar calls StringChar to enable writing character properties that are upwardly compatible with string properties.


TWriter.WriteCollection
 VCL Reference

TWriter.WriteCollection

TWriter	See also

Writes the collection of objects passed in Value to the writer object's stream.

procedure WriteCollection(Value: TCollection);

Description

WriteCollection is used internally by the Delphi streaming system to write component properties to a stream. Use WriteCollection for writing component properties that are collections to streams.

WriteCollection first writes the type identifier indicating a collection.

If the Value parameter is not nil, WriteCollection next writes each element of the collection to the stream, bounding the elements with start-of-list and end-of-list markers. Otherwise, it skips the elements, assuming an empty collection.


TWriter.WriteComponent
 VCL Reference

TWriter.WriteComponent

TWriter	See also	Example

Writes the component specified by Component to a stream.

procedure WriteComponent(Component: TComponent);

Description

Never call WriteComponent directly. WriteComponent is recursively called for each owned component in Root.

WriteComponent sets the csWriting state in Component's ComponentState property before calling the WriteState method of Component and clears the csWriting flag when WriteState returns.

Note:	The sequence of events is as follows: the writer’s WriteComponent method calls the Component’s WriteState method, which calls the writer’s WriteData method. That method writes the properties for each child component, then calls WriteComponent.

Because the Component’s WriteState is virtual, it is the Component’s only opportunity to prepare itself to be streamed (i.e. to consolidate its data.)


TWriter.WriteCurrency
 VCL Reference

TWriter.WriteCurrency

TWriter

Writes a currency value to the writer’s stream.

procedure WriteCurrency(const Value: Currency);

Description

WriteCurrency is used internally by the Delphi streaming system to write component properties to a stream. Use WriteCurrency for writing component properties of type Currency to streams.

WriteCurrency first writes a type identifier before writing the currency value.


TWriter.WriteDate
 VCL Reference

TWriter.WriteDate

TWriter

Writes a datetime value to the writer’s stream.

procedure WriteDate(const Value: TDateTime);

Description

WriteDate is used internally by the Delphi streaming system to write component properties to a stream. Use WriteDate for writing component properties of type TDateTime to streams.

WriteDate first writes a type identifier before writing the TDateTime value.


TWriter.WriteDescendent
 VCL Reference

TWriter.WriteDescendent

TWriter	See also

Triggers the writing of descendant components in inherited forms.

procedure WriteDescendent(Root: TComponent; AAncestor: TComponent);

Description

Never call WriteDescendent directly. It is part of a sequence of calls used for streaming descendant components in inherited forms.

WriteDescendent sets the writer object's Ancestor and RootAncestor properties to the value passed in AAncestor, sets the Root property to the value passed in Root, then calls WriteSignature and WriteComponent to write Root and any components it owns to the writer object's stream.

WriteDescendent differs from WriteComponent in that, by setting Ancestor, it uses Ancestor's property values as the defaults, rather than those defined by Root's type.


TWriter::WriteFloat
 VCL Reference

TWriter.WriteFloat

TWriter	See also

Writes the floating-point value passed in Value to the writer object's stream.

procedure WriteFloat(const Value: Extended);

Description

WriteFloat is used internally by the Delphi streaming system to write component properties to a stream. Use WriteFloat for writing floating point data to streams.

WriteFloat checks to ensure that Value is the correct type before calling Write to write the float value and its value type to the stream.


TWriter.WriteIdent
 VCL Reference

TWriter.WriteIdent

TWriter	See also

Writes the identifier passed in Ident to the writer object's stream.

procedure WriteIdent(const Ident: string);

Description

WriteIdent is used internally by the Delphi streaming system to write component properties to a stream. Use WriteIdent for writing component identifier properties to streams. Component names and enumerated type elements are examples of strings that must be restricted to Pascal identifier syntax.

WriteIdent checks for certain common identifiers (such as True, False, or nil) and inserts a special token for these values. Otherwise, it writes the identifier as a string.


TWriter.WriteInteger
 VCL Reference

TWriter.WriteInteger

TWriter	See also

Writes the integer value passed in Value to the writer object's stream.

procedure WriteInteger(Value: Longint); overload;

procedure WriteInteger(Value: Int64); overload;

Description

WriteInteger is used internally by the Delphi streaming system to write component properties to a stream. Use WriteInteger for writing component integer properties to streams.

WriteInteger checks to ensure that Value is the correct type before calling Write to write the integer value and its value type to the stream. WriteInteger handles integers of different sizes.


TWriter.WriteListBegin
 VCL Reference

TWriter.WriteListBegin

TWriter	See also

Writes a start-of-list marker to the writer object's associated stream.

procedure WriteListBegin;

Description

WriteListBegin is used by other methods that iterate through a group of items about to be written to the stream. WriteListBegin writes a start-of-list marker to the writer object's associated stream. Every call to WriteListBegin must have a corresponding call to WriteListEnd.


TWriter.WriteListEnd
 VCL Reference

TWriter.WriteListEnd

TWriter	See also

Writes an end-of-list marker to the writer object's associated stream.

procedure WriteListEnd;

Description

WriteListEnd is used by other methods that iterate through a group of items that are sequentially written to the stream during a single process.

A call to WriteListEnd is generally preceded by a writing loop. A call to WriteListEnd must correspond to a preceding call to WriteListBegin.


TWriter.WriteRootComponent
 VCL Reference

TWriter.WriteRootComponent

TWriter	See also

Calls the WriteDescendent method.

procedure WriteRootComponent(Root: TComponent);

Description

WriteRootComponent is provided for backward compatibility only.


TWriter.WriteSignature
 VCL Reference

TWriter.WriteSignature

TWriter

Writes a filer signature to the writer object's associated stream.

procedure WriteSignature;

Description

WriteSignature is used internally by several methods that write the filer signature before processing some action. For example, the WriteRootComponent method calls WriteSignature before writing its component to the stream. By checking for the signature before loading objects, reader objects can guard against inadvertently reading invalid or corrupted data.


TWriter.WriteSingle
 VCL Reference

TWriter.WriteSingle

TWriter

Writes a value of type Single to the writer’s stream.

procedure WriteSingle(const Value: Single);

Description

WriteSingle is used internally by the Delphi streaming system to write component properties to a stream. Use WriteSingle for writing component properties of type Single to streams.

WriteSingle first writes a type identifier before writing the value.


TWriter.WriteStr
 VCL Reference

TWriter.WriteStr

TWriter	See also

Writes raw data to the writer object's stream.

procedure WriteStr(const Value: string);

Description

Do not call WriteStr directly. WriteStr is for internal use by certain VCL components. WriteStr writes the string passed in Value to the writer object's stream.

Warning:	Always use WriteString for writing component strings to streams. WriteStr can corrupt data if not used correctly.


TWriter::WriteString
 VCL Reference

TWriter.WriteString

TWriter	See also

Writes tagged data to the writer object's stream.

procedure WriteString(const Value: string);

Description

WriteString is used internally by the Delphi streaming system to write component properties to a stream. WriteString is otherwise only used by component writers in the DefineProperties and WriteData procedures.

WriteString writes the string passed in Value to the writer object's stream. WriteString checks to ensure that Value is the correct type before calling Write to write the string and its value type to the stream.

Warning:	Always use WriteString for writing component strings to streams. The similarly-named WriteStr method is for internal use by certain VCL components and can corrupt data if not used correctly.


TWriter.WriteVariant
 VCL Reference

TWriter.WriteVariant

TWriter	See also

Writes a Variant value to the writer’s stream.

procedure WriteVariant(const Value: Variant);

Description

WriteVariant is used internally by the Delphi streaming system to write component properties to a stream. Use WriteVariant for writing component properties of type Variant to streams.

WriteVariant first writes a type identifier before writing the Variant value.


TWriter.WriteWideString
 VCL Reference

TWriter.WriteWideString

TWriter	See also

WriteWideString writes a wide string to the writer’s stream.

procedure WriteWideString(const Value: WideString);

Description

WriteWideString is used internally by the VCL streaming system to write component properties to a stream. Use WriteWideString for writing WideString component to streams.

WriteWideString first writes a type identifier and the length of the string before writing the value.


Hierarchy

TObject

TFiler

TWriter


TWorkAreas
 VCL Reference

TWorkAreas

Hierarchy	Properties	Methods	See also

TWorkAreas is a collection of TWorkArea objects.

Unit

ComCtrls

Description

Use TWorkAreas to represent the work areas of a list view control. Each work area is represented by a single TWorkArea object.  Most importantly, these work areas define rectangles that cover portions of the list view’s client area. List items are associated with a work area when they are placed in the portion of the client area covered by a work area’s rectangle. These associations are used to add an extra level of organization to the list view, with list items arranged within each work area.


 VCL Reference

TWorkAreas properties

TWorkAreas	Alphabetically	Legend

In TWorkAreas

Items

Derived from TCollection

Count

ItemClass


 VCL Reference

TWorkAreas properties

TWorkAreas	By object	Legend

Count

ItemClass

Items


TWorkAreas.Items
 VCL Reference

TWorkAreas.Items

TWorkAreas	See also

Provides indexed access to the TWorkArea objects.

property Items[Index: Integer]:TWorkArea; default;

Description

Use Items to access the properties of the TWorkArea objects maintained by TWorkAreas. Items is the default property of TWorkAreas, so the name of the Items property can be left off when using this property. Thus the line

ListView1.WorkAreas.Items[0].Color := 'clLtGray';

can be written

ListView1.WorkAreas[0].Color := 'clLtGray';


 VCL Reference

TWorkAreas methods

TWorkAreas	Alphabetically	Legend

In TWorkAreas

Add

Delete

Insert

Derived from TOwnedCollection

Create

Derived from TCollection

Assign

BeginUpdate

Clear

Destroy

EndUpdate

FindItemID

GetNamePath

Owner

Derived from TObject

AfterConstruction

BeforeDestruction

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

DefaultHandler

Dispatch

FieldAddress

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

InheritsFrom

InitInstance

InstanceSize

MethodAddress

MethodName

NewInstance

SafeCallException


 VCL Reference

TWorkAreas methods

TWorkAreas	By object	Legend

Add

AfterConstruction

Assign

BeforeDestruction

BeginUpdate

ClassInfo

ClassName

ClassNameIs

ClassParent

ClassType

CleanupInstance

Clear

Create

DefaultHandler

Delete

Destroy

Dispatch

EndUpdate

FieldAddress

FindItemID

Free

FreeInstance

GetInterface

GetInterfaceEntry

GetInterfaceTable

GetNamePath

InheritsFrom

InitInstance

Insert

InstanceSize

MethodAddress

MethodName

NewInstance

Owner

SafeCallException


TWorkAreas.Add
 VCL Reference

TWorkAreas.Add

TWorkAreas	See also

Creates a new TWorkArea object and adds it to the end of the Items property array.

function Add: TWorkArea;

Description

Call Add to add a new work area to the list view that owns this TWorkAreas object. Add returns the newly created TWorkArea object. After adding a new work area, set the work area’s Rect property to indicate what portion of the list view’s client area it represents.


TWorkAreas.Delete
 VCL Reference

TWorkAreas.Delete

TWorkAreas	See also

Removes a TWorkArea object from the Items property array.

procedure Delete(Index: Integer);

Description

Call Delete to remove the work area specified by Items[Index]. Delete removes the work area from the Items property array and frees the TWorkArea object.


TWorkAreas.Insert
 VCL Reference

TWorkAreas.Insert

TWorkAreas	See also

Creates a new TWorkArea object and adds it to the Items property array in a specified position.

function Insert(Index: Integer): TWorkArea;

Description

Call Insert to add a new work area to the list view that owns this TWorkAreas object.  Insert adds a new work area at the position specified by the Index parameter. Existing work areas (starting from the specified position) are moved up in the Items array. Insert returns the newly created TWorkArea object. After inserting a new work area, set the work area’s Rect property to indicate what portion of the list view’s client area it represents.

Note:	Usually, there is no meaningful difference between using the Add method or the Insert method to add work areas. However, if two or more work areas specify overlapping regions, then the order of the work areas in the Items array determines which work area is associated with list items in the overlapping region. Specifically, list items in the overlapping region are associated with the work area that has the lower index.


Hierarchy

TObject

TPersistent

TCollection

TOwnedCollection

TWorkAreas


Scope

Published

Protected

Accessibility

Read-only


Scope

Published

Protected

Accessibility

Read-only


Scope

Published

Protected

Accessibility

Read-only


ActnCtrls unit

Other objects and components, by unit

TActionToolBar

TActionToolBar is a rendering engine that renders action client items as tool buttons.

TCustomActionDockBar

TCustomActionDockBar is the ancestor for action bands that require the ability to dock.

TCustomActionToolBar

TCustomActionToolBar is the ancestor class for the TToolActionBar component.

TCustomButtonControl

TCustomButtonControl is the base class for ActionBand button controls.


ActnList unit

ActnList routines

Other objects and components, by unit

TAction

TAction is the generic class for action objects that implement user commands across a range of different controls.

TActionLink

TActionLink is the base class for action links that connect actions to commonly used properties of VCL objects, components and controls.

TActionList

TActionList maintains a list of actions that can be used by components and controls, such as menu items and buttons.

TContainedAction

TContainedAction is the base class for actions that can be grouped by category and that can appear in action lists or action managers.

TCustomAction

TCustomAction is the base class for actions meant to be used with menu items and controls.

TCustomActionList

TCustomActionList is the base class for action list objects that manage a set of actions.

TShortCutList

TShortCutList manages an array of keyboard shortcuts.


ActnMan unit

Other objects and components, by unit

TActionBars

TActionBars is a collection of TActionBarItem objects used internally by the action manager to represent all of the action bars connected to the action manager in an application.

TActionClient

TActionClient is the ancestor for TActionBartItem and TActionClientItem classes.

TActionClientItem

TActionClientItem is a streamable wrapper that represents an action or category of actions in the action manager.

TActionClients

TActionClients is a container for TActionClient objects.

TActionClientsCollection

TActionClientsCollection is a collection that maintains information about the action manager that owns the collection.

TActionListCollection

TActionListCollection is a collection that maintains information about action lists and their captions.

TActionListItem

TActionListItem represents an item in a action list collection.

TActionManager

TActionManager provides a mechanism to manage and display all actions contained in an application.

TCustomActionBar

TCustomActionBar is the base class for all action bands.

TCustomActionControl

TCustomActionControl is the base class for ActionBand custom controls.

TCustomActionManager

TCustomActionManager is the base class for the TActionManager component.


ActnMenus unit

Other objects and components, by unit

TActionMainMenuBar

TActionMainMenuBar is a rendering engine that renders action client items as menu items.

TCustomActionMainMenuBar

TCustomActionMainMenuBar is the ancestor for the TActionMainMenuBar component.

TCustomActionMenuBar

TCustomActionMenuBar is the ancestor for action bands that render actions as menu item UI elements.

TCustomActionPopupMenu

TCustomActionPopupMenu is the ancestor for popup action bands that render actions as popup menu item UI elements.

TCustomAddRemoveItem

TCustomAddRemoveItem is the base class for the ActionBand menus for customizing action bands.

TCustomMenuButton

TCustomMenuButton is the base class for ActionBand button controls.

TCustomMenuItem

TCustomMenuItem is the base class for the ActionBand custom control TStandardMenuItem.

TStandardAddRemoveItem

TStandardAddRemoveItem is the ActionBand menu class for customizing action bands.


ADODB unit

Other objects and components, by unit

EADOError

EADOError is the exception class for database errors generated by ADO databases.

TADOBlobStream

TADOBlobStream is a stream object that reads from and writes to field objects that represent Binary large object (BLOB) fields.

TADOCommand

TADOCommand represents an ADO command object.

TADOConnection

TADOConnection connects to an ADO data store.

TADODataSet

TADODataSet represents a dataset retrieved from an ADO data store.

TADOQuery

TADOQuery provides the means for issuing SQL against an ADO data store.

TADOStoredProc

TADOStoredProc encapsulates a stored procedure in an ADO database.

TADOTable

TADOTable is a dataset component that encapsulates a table accessed through an ADO data store.

TCustomADODataSet

TCustomADODataSet is the virtualized base class for all ADO dataset components.

TParameter

TParameter represents a parameter.

TParameters

TParameters manages a collection of parameters.

TRDSConnection

TRDSConnection implements an RDS DataSpace object.


ApacheApp unit

Other objects and components, by unit

TApacheApplication

TApacheApplication encapsulates an Apache server application.


ApacheHTTP unit

Other objects and components, by unit

TApacheRequest

TApacheRequest represents client request information that is passed to an Apache server application.

TApacheResponse

TApacheResponse represents HTTP messages sent by an Apache application in response to an HTTP request message.


AppEvnts unit

Other objects and components, by unit

TApplicationEvents

TApplicationEvents intercepts application-level events.

TCustomApplicationEvents

TCustomApplicationEvents intercepts application-level events.


AspTlb unit

Other objects and components, by unit

TASPMTSObject

TASPMTSObject is the base class for Active Server pages when using IIS 4 or IIS 5.

TASPObject

TASPObject is the base class for Active Server pages when using IIS 3 or IIS 4.


AutoAdap unit

Other objects and components, by unit

TAdapterErrorEnumerator


AutoDisp unit

Other objects and components, by unit

TWebDispatch

TWebDispatch describes the HTTP messages to which an auto-dispatching component responds.


AxCtrls unit

AxCtrls routines

Other objects and components, by unit

TActiveForm

TActiveForm is the base class for a VCL Form exposed as an ActiveX control. TActiveForm represents a form that is created via a class factory and used as an ActiveX control in ActiveX host applications.

TActiveFormControl

A COM object which provides the interfaces necessary to support an ActiveX control.

TActiveFormFactory

The ActiveFormFactory object is the class factory for TActiveForm.

TActiveXControl

TActiveXControl is an abstract class that provides the functionality to embed a VCL control into an ActiveX Container window.

TActiveXControlFactory

TActiveXControlFactory is the factory class for ActiveX control objects.

TActiveXPropertyPage

TActiveXPropertyPage represents a COM object that provides the interfaces for supporting an ActiveX property page.

TActiveXPropertyPageFactory

TActiveXPropertyPageFactory implements a COM factory for an ActiveX property page.

TAdapterNotifier

TAdapterNotifier provides the binding between a Delphi type object and comparable OLE type object.

TConnectionPoint

TConnectionPoint implements the IConnectionPoint interface for a single outgoing interface.

TConnectionPoints

TConnectionPoints implements the IConnectionPointContainer interface for a COM object that generates events on clients.

TCustomAdapter

TCustomAdapter is a base class for objects that bind VCL objects to COM interfaces.

TFontAdapter

TFontAdapter is a helper class used to connect a TFont object to an OLE font object.

TOleGraphic

TOleGraphic is a wrapper for an OLE graphical interface.

TOLEStream

TOleStream reads and writes information over a streaming interface that is provided by an OLE object.

TPictureAdapter

TPictureAdapter connects a native TPicture object to an OLE picture object.

TPropertyPage

TPropertyPage is the base class for controls that represent an ActiveX control’s property page.

TPropertyPageImpl

TPropertyPageImpl implements the IPropertyPage interface to provide the interfaces needed to support an ActiveX property page.

TReflectorWindow

TReflectorWindow ensures that ActiveX controls respond properly to Windows messages.

TStringsAdapter

TStringsAdapter is a helper class used to allow a TStrings object to implement an IStrings interface for use with OLE.


BandActn unit

Other objects and components, by unit

TCustomizeActionBars

TCustomizeActionBars is an action which causes the ActionBands customization dialog to appear.


Buttons unit

Other objects and components, by unit

TBitBtn

TBitBtn is a push button control that can include a bitmap on its face.

TSpeedButton

TSpeedButton is a button that is used to execute commands or set modes.


CGIApp unit

Other objects and components, by unit

TCGIApplication

TCGIApplication encapsulates a CGI server application.


CGIHTTP unit

Other objects and components, by unit

TCGIRequest

TCGIRequest represents client request information that is passed to a CGI Web server application.

TCGIResponse

TCGIResponse represents HTTP messages sent by a CGI application in response to an HTTP request message.

TWinCGIRequest

TWinCGIRequest represents client request information that is passed to a Windows hosted CGI Web server application.

TWinCGIResponse

TWinCGIResponse represents HTTP messages sent by a Windows hosted CGI application in response to an HTTP request message.


CheckLst unit

Other objects and components, by unit

TCheckListBox

TCheckListBox displays a scrollable list with check boxes next to each item.


Classes unit

Classes routines

Other objects and components, by unit

EBitsError

EBitsError is the exception class for invalid attempts to access an array of boolean values.

EClassNotFound

EClassNotFound is the exception class for the failure to find a specified component when reading from a stream.

EComponentError

EComponentError is the exception class for registering and renaming components.

EFCreateError

EFCreateError is the exception class for streaming file-creation errors.

EFilerError

EFilerError is the exception class for file stream errors.

EFOpenError

EFOpenError is the exception class for file-opening errors during streaming.

EInvalidImage

EInvalidImage is the exception class for unsuccessful attempts to read resource files.

EInvalidOperation

EInvalidOperation is the exception class for invalid operations on a component.

EListError

EListError is the exception class for list and string errors.

EOutOfResources

EOutOfResources is the exception class for unsuccessful attempts to allocate Windows handles.

EParserError

EParserError is the exception class for text-to-binary streaming conversion errors.

EReadError

EReadError is the exception class for unsuccessful attempts to read data from a stream.

EResNotFound

EResNotFound is the exception class for unlocatable resources.

EStreamError

EStreamError is the exception class for streaming errors.

EStringListError

EStringListError is the exception class for invalid listbox references.

EThread

EThread is the exception class for thread synchronization errors.

EWriteError

EWriteError is the exception class for unsuccessful attempts to write data to a stream.

IDesignerNotify

IDesignerNotify is the interface for responding to notifications about changes to components in the designer.

IInterfaceList

IInterfaceList provides access to a list of interfaces.

IVarStreamable

IVarStreamable is the interface for loading and saving the values of Variants.

TBasicAction

TBasicAction is the ancestor class for all action objects.

TBasicActionLink

TBasicActionLink is the base class for action link classes, which handle the communication between actions and clients.

TBits

TBits stores an “array” of Boolean values.

TCollection

TCollection is a container for TCollectionItem objects.

TCollectionItem

TCollectionItem represents an item in a collection.

TComponent

TComponent is the common ancestor of all components that can appear in the form designer

TCustomMemoryStream

TCustomMemoryStream is an abstract base class used as the common ancestor for memory streams.

TDataModule

TDataModule centralizes the handling of nonvisual components in an application.

TFiler

TFiler is the abstract base class for reader and writer objects, which are used for loading and saving components and their properties.

TFileStream

TFileStream enables applications to read from and write to a file on disk.

THandleStream

THandleStream enables applications to read from and write to communications resources identified by a Windows handle.

TInterfacedPersistent

TInterfacedPersistent is the ancestor for persistent objects that implement interfaces.

TInterfaceList

TInterfaceList represents a list of interfaces.

TList

TList stores an array of pointers.

TMemoryStream

TMemoryStream is a stream that stores its data in dynamic memory.

TOwnedCollection

TOwnedCollection is a collection that maintains information about its owner.

TPersistent

TPersistent is the ancestor for all objects that have assignment and streaming capabilities(dfm format).

TReader

TReader is a specialized filer object that reads component data from an associated stream.

TRecall

TRecall stores the properties of a persistent object so that they can be restored at a later time.

TResourceStream

TResourceStream is a memory stream that provides access to the compiled resources in a Windows application.

TStream

TStream is the base class type for stream objects that can read from or write to various kinds of storage media, such as disk files, dynamic memory, and so on.

TStreamAdapter

TStreamAdapter implements the IStream interface on a TStream object.

TStringList

TStringList maintains a list of strings.

TStrings

TStrings is the base class for objects that represent a list of strings.

TStringStream

TStringStream provides file-like access to information stored as a long string.

TThread

TThread is an abstract class that enables creation of separate threads of execution in an application.

TThreadList

TThreadList represents a thread-safe list.

TWriter

TWriter is a specialized filer object that writes data to its associated stream.


Clipbrd unit

Clipbrd routines

Other objects and components, by unit

TClipboard

TClipboard represents the system clipboard.


CmAdmCtl unit

Other objects and components, by unit

TCOMAdminCatalog

TCOMAdminCatalog allows an application to act as an Automation controller for the COM+ administration tool.

TCOMAdminCatalogCollection

TCOMAdminCatalogCollection represents a collection from the COM+ catalog.

TCOMAdminCatalogObject

TCOMAdminCatalogObject represents an item in a collection from the COM+ catalog.


ComCtrls unit

ComCtrls routines

Other objects and components, by unit

ECommonCalendarError

ECommonCalendarError is the exception class for invalid entries in a TCommonCalendar component.

EDateTimeError

EDateTimeError is the exception class for invalid date and time entries.

EMonthCalError

EMonthCalError is the exception class for invalid entries in a TMonthCalendar component.

ETreeViewError

ETreeViewError is the exception class for tree view errors.

TAnimate

TAnimate is a wrapper for a Windows animation control.

TComboExItem

TComboExItem represents an item in an extended combo box.

TComboExItems

TComboExItems manages a collection of TComboExItem objects.

TCommonCalendar

TCommonCalendar is the base class for the controls TDateTimePicker and TMonthCalendar.

TConversion

TConversion converts rich text data from one encoding format to another.

TCoolBand

TCoolBand represents a band within a TCoolBar.

TCoolBands

TCoolBands is a container for TCoolBand objects.

TCoolBar

TCoolBar displays a collection of windowed controls within movable, resizable bands.

TCustomHeaderControl

TCustomHeaderControl represents a spreadsheet-style header.

TCustomHotKey

TCustomHotKey is the base class for objects that wrap the Windows hot key Common Control.

TCustomListView

TCustomListView is the base type for all list view components, including TListView.

TCustomRichEdit

TCustomRichEdit is the base type for rich edit controls such as TRichEdit.

TCustomStatusBar

TCustomStatusBar is the base class for objects that represent status bars.

TCustomTabControl

TCustomTabControl is the base type for tab-control components such as TTabControl and TPageControl.

TCustomTreeView

TCustomTreeView is the base type for tree-view components such as TTreeView.

TCustomUpDown

TCustomUpDown is the base type for up-down size controls such as TUpDown.

TDateTimePicker

TDateTimePicker displays a list box for entering dates or times.

THeaderControl

THeaderControl is a container for THeaderSection objects. It provides a set of resizable column headers.

THeaderSection

THeaderSection represents a section of a header control.

THeaderSections

THeaderSections is a container for THeaderSection objects.

THotKey

THotKey is a wrapper for a Windows Common Control hot key.

TIconOptions

TIconOptions describes how the icons in a list view should be arranged.

TListColumn

TListColumn represents a column in a report-style list view.

TListColumns

TListColumns is a collection of TListColumn objects.

TListItem

TListItem is an individual item of a TListView control.

TListItems

TListItems maintains the collection of items that appear in a list view control.

TListView

TListView displays a list of items in various ways.

TMonthCalColors

TMonthCalColors defines a color scheme for TDateTimePicker or TMonthCalenar’s drop-down calendar.

TMonthCalendar

TMonthCalendar is stand-alone calendar in which a user can select a date or range of dates.

TPageControl

TPageControl is a set of pages used to make a multiple page dialog box.

TPageScroller

TPageScroller defines a display area for a narrow window, such as a toolbar.

TParaAttributes

TParaAttributes represents paragraph formatting properties for a rich edit control.

TProgressBar

TProgressBar displays a simple progress bar.

TRichEdit

TRichEdit is a wrapper for a Windows rich text edit control.

TStatusBar

TStatusBar represents a status bar.

TStatusPanel

TStatusPanel represents a single panel of a status bar.

TStatusPanels

TStatusPanels is a container for TStatusPanel objects.

TTabControl

TTabControl is a tab set that has the appearance of notebook dividers.

TTabSheet

TTabSheet is an individual page in a TPageControl object.

TTextAttributes

TTextAttributes represents the font characteristics of a section of text in a rich edit control.

TToolBar

TToolBar manages tool buttons and other controls, arranging them in rows and automatically adjusting their sizes and positions.

TToolButton

TToolButton is a button control in a TToolBar object.

TToolButtonActionLink

TToolButtonActionLink is an action link designed for tool button control clients.

TTrackBar

TTrackBar is a wrapper for a Windows track bar control.

TTreeNode

TTreeNode describes an individual node in a tree view control.

TTreeNodes

TTreeNodes maintains a list of tree nodes in a tree view control.

TTreeView

TTreeView represents a window that displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disk.

TUpDown

TUpDown is a wrapper for a Windows up-down control.

TWorkArea

TWorkArea represents a rectangular subregion of a list view’s client area.

TWorkAreas

TWorkAreas is a collection of TWorkArea objects.


ComObj unit

ComObj routines

Other objects and components, by unit

EOleError

EOleError is the exception class for low-level OLE errors.

EOleException

EOleException is the exception class for OLE automation errors that occur in methods or properties of an object.

EOleRegistrationError

EOleRegistrationError is the exception class for errors that occur when registering an OLE object.

EOleSysError

EOleSysError is the exception class for errors specific to the OLE IDispatch interface.

TAutoIntfObject

TAutoIntfObject implements the IDispatch and ISupportErrorInfo interfaces.

TAutoObject

TAutoObject is a CoClass that supports the IDispatch interface, and that can be used as a base class for ActiveX Automation servers.

TAutoObjectFactory

TAutoObjectFactory is the class factory for TAutoObject.

TComClassManager

TComClassManager is the class type of the ComClassManager variable in the ComObj unit.

TComObject

TComObject is the base class for creating simple COM classes, such as those used for creating Shell extensions.

TComObjectFactory

TComObjectFactory is the type of the class factory object used to instantiate a TComObject class.

TComServerObject

TComServerObject is the abstract base class for TComServer.

TTypedComObject

TTypedComObject supports the IProvideClassInfo interface and is the class type for COM objects that can provide the type information without requring a type library to be loaded.

TTypedComObjectFactory

TTypedComObjectFactory is the type of the class factory object used to instantiate a TypedComObject class.


CompProd unit

Other objects and components, by unit

TComponentsPageProducer

TComponentsPageProducer produces a string of HTML commands based on an input template.


ComServ unit

ComServ routines

Other objects and components, by unit

TComServer

TComServer is the class type of the ComServ variable that is declared and instantiated in the ComServ unit.


Contnrs unit

Other objects and components, by unit

TBucketList

TBucketList is a simple hash table that stores pointers indexed by pointers.

TClassList

TClassList maintains a list of classes.

TComponentList

TComponentList maintains a list of components, updating itself when a component is freed.

TCustomBucketList

TCustomBucketList is the base class for lists that store items under a limited number of categories.

TObjectBucketList

TObjectBucketList is a simple hash table that stores objects that are identified by other objects.

TObjectList

TObjectList maintains a list of (owned) objects.

TObjectQueue

TObjectQueue maintains a first-in first-out list of objects.

TObjectStack

TObjectStack maintains a last-in first-out list of objects.

TOrderedList

TOrderedList maintains an array of pointers that must be accessed in serial order.

TQueue

TQueue maintains a first-in first-out array of pointers.

TStack

TStack maintains a last-in first-out array of pointers.


Controls unit

Controls routines

Other objects and components, by unit

IDockManager

IDockManager is the interface for docking managers.

TBaseDragControlObject

TBaseDragControlObject object provides support for drag-and-drop or drag-and-dock operations.

TControl

TControl is the base class for all components that are visible at runtime.

TControlActionLink

TControlActionLink links action objects to clients that descend from TControl.

TControlCanvas

TControlCanvas is a specialized canvas object associated with a control.

TCustomControl

Base class for controls that wrap Windows screen objects but perform their own rendering.

TCustomListControl

TCustomListControl is the base class for controls that display a list of items.

TCustomMultiSelectListControl

TCustomMultiSelectListControl is the base class for list controls that allow multiple items to be selected.

TDockTree

TDockTree is the default docking manager for TWinControl.

TDragControlObject

TDragControlObject object provides for normal drag and drop operations.

TDragControlObjectEx

TDragControlObjectEx object provides for normal drag and drop operations.

TDragDockObject

Contains drag-and-dock information for a control.

TDragDockObjectEx

Contains drag-and-dock information for a control.

TDragImageList

TDragImageList represents a set of images that appear during drag operations.

TDragObject

TDragObject is a base class used for managing drag operations.

TDragObjectEx

TDragObjectEx is a base class used for managing drag operations.

TGraphicControl

TGraphicControl is the base class for all lightweight controls.

THintWindow

THintWindow implements the small pop-up window that appears over a control at runtime when the control has its ShowHint property set to True.

TImageList

TImageList represents a collection of same-sized images, each of which can be referred to by its index.

TMouse

TMouse surfaces information about the mouse and specifies how the application responds to mouse messages.

TSizeConstraints

Contains size constraints for a control.

TWinControl

TWinControl is the base class for all controls that are wrappers for Microsoft Windows screen objectss.

TWinControlActionLink

TWinControlActionLink is an action link used by descendents of TWinControl.


ConvUtils unit

ConvUtils routines

Other objects and components, by unit

TConvTypeFactor

TConvTypeFactor describes a single registered conversion type (measurement unit) that differs from its family’s base units by a simple conversion factor.

TConvTypeInfo

TConvTypeInfo describes a single registered conversion type (measurement unit).

TConvTypeProcs

TConvTypeProcs describes a single registered conversion type (measurement unit) that is registered by supplying conversion methods.


CorbaCon unit

Other objects and components, by unit

TCorbaConnection

TCorbaConnection connects CORBA client applications to an application server.


CorbaRdm unit

Other objects and components, by unit

TCorbaDataModule

TCorbaDataModule encapsulates the objects and interfaces of a CORBA application server.


CtlPanel unit

CtlPanel routines

Other objects and components, by unit

EAppletException

EAppletException is the exception class for errors that occur in a Control Panel Application.

TAppletApplication

TAppletApplication represents a Windows control panel application.

TAppletModule

TAppletModule represents a single Control Panel Applet in a control panel applet application.


CustomizeDlg unit

Other objects and components, by unit

TCustomizeDlg

TCustomizeDlg is the ActionBands customization dialog


DataBkr unit

DataBkr routines

Other objects and components, by unit

TRemoteDataModule

TRemoteDataModule encapsulates the objects and interfaces of an application server in a multi-tiered database application.

TSoapDataModule

TSoapDataModule encapsulates the objects and interfaces of an application server in a SOAP-based multi-tiered database application.


DBActns unit

Other objects and components, by unit

TDataSetAction

TDataSetAction is the base class for action objects that act on dataset components.

TDataSetCancel

TDataSetCancel cancels the edits to the current record, restores record display to its condition prior to editing, and takes the dataset out of edit mode.

TDataSetDelete

TDataSetDelete deletes the current record, making the next record current.

TDataSetEdit

TDataSetEdit puts a target dataset into edit mode.

TDataSetFirst

TDataSetFirst moves a target dataset to its first record.

TDataSetInsert

TDataSetInsert inserts a new record into a target dataset.

TDataSetLast

TDataSetLast moves a target dataset to its last record.

TDataSetNext

TDataSetNext moves a target dataset to its next record.

TDataSetPost

TDataSetPost posts the edits in the current record of a target dataset.

TDataSetPrior

TDataSetPrior moves a target dataset to the previous record.

TDataSetRefresh

TDataSetRefresh refreshes the records in a target dataset.


DBAdaptImg unit

Other objects and components, by unit

TCustomDataSetAdapterImageField


DBAdapt unit

Other objects and components, by unit

TBaseDataSetAdapterImageField

BaseDataSetAdapteImageField is the base class for the TDataSetAdapterImageField.

TCustomDataSetAdapter

TCustomDataSetAdapterAction

TCustomDataSetAdapterField

TCustomDataSetAdapterMemoField

he TCustomDataSetAdapterMemoField is the ancestor of TDataSetAdapterMemoField.

TDataSetAdapter

DataSetAdapter is used to define a scriptable interface to a TDataSet component and allow the TDataSet to operate properly in a stateless environment.

TDataSetAdapterApplyRowAction

TDataSetAdapterCancelRowAction

TDataSetAdapterDataLink

TDataSetAdapterDeleteRowAction

TDataSetAdapterEditRowAction

TDataSetAdapterField

TDataSetAdapterMemoField

he TDataSetAdapterMemoField represents a memo field in a dataset.

TDataSetValuesList

he TDataSetValuesList is an adapter component that provides a list of name/value pairs by retrieving values from a TdataSet.


DBBdeWeb unit

Other objects and components, by unit

TQueryTableProducer

TQueryTableProducer assembles a sequence of HTML commands to display the result set of a query in a tabular format.


DBCGrids unit

Other objects and components, by unit

TDBCtrlGrid

TDBCtrlGrid displays records from a data source in a free-form layout.

TDBCtrlGridLink

TDBCtrlGridLink helps manage data events for a TDBCtrlGrid object.

TDBCtrlPanel

TDBCtrlPanel represents a panel in a TDBCtrlGrid object.


DBClient unit

DBClient routines

Other objects and components, by unit

EDBClient

EDBClient is the exception class for client dataset errors.

EReconcileError

EReconcileError is the exception class for client dataset update errors.

TAggregate

TAggregate represents a maintained aggregate in a client dataset.

TAggregates

TAggregates is a collection of TAggregate objects.

TClientBlobStream

TClientBlobStream lets applications read from or write to BLOB fields in a client dataset.

TClientDataSet

TClientDataSet implements a database-independent dataset.

TConnectionBroker

TConnectionBroker centralizes the connection to an application server for a set of client datasets that all use the same connection.

TCustomClientDataSet

TCustomClientDataSet is the base class for datasets that cache their data in memory.

TCustomRemoteServer

TCustomRemoteServer is the base class for all components that connect to an application server in a multi-tiered database application.


DBCtrls unit

DBCtrls routines

Other objects and components, by unit

TDataSourceLink

TDataSourceLink helps manage the link to the data source for a TDBLookupControl object.

TDBCheckBox

TDBCheckBox is a data-aware control that allows the user to select or deselect a single value.

TDBComboBox

TDBComboBox represents a data-aware combo box control.

TDBEdit

TDBEdit represents a single-line edit control that can display and edit a field in a dataset.

TDBImage

TDBImage represents a graphic image from a BLOB (binary large object) field of the current record of a dataset.

TDBListBox

TDBListBox represents a data-aware list box that allows users to change field values by selecting an item from a list.

TDBLookupComboBox

TDBLookupComboBox represents a combo box that identifies a set of field values in one dataset with a corresponding set of values from another dataset.

TDBLookupControl

TDBLookupControl is the base class for controls that provide the user with a list of lookup items for filling in fields that require data from another dataset.

TDBLookupListBox

TDBLookupListBox provides a list of lookup items for filling in fields that require data from another dataset.

TDBMemo

TDBMemo represents a multiline edit control that can display and edit a field in a dataset.

TDBNavigator

TDBNavigator (the database navigator) is used to move through the data in a dataset and perform operations on the data, such as inserting a blank record or posting a record.

TDBRadioGroup

TDBRadioGroup represents a group of radio buttons connected to a database.

TDBRichEdit

TDBRichEdit represents a multiline edit control that can display and edit a rich text memo field in a dataset.

TDBText

TDBText represents a data-aware control that displays the value of a field on a form.

TFieldDataLink

TFieldDataLink helps a data-aware windowed control manage its link to a TField object and respond to data events.

TListSourceLink

TListSourceLink helps manage the link to the ListSource of a TDBLookupControl object.

TNavDataLink

TNavDataLink helps manage the link to the dataset for a TDBNavigator object.

TPaintControl

TPaintControl draws data aware controls that are replicated in a data control grid.


Dbexcept unit

Other objects and components, by unit

TDBEngineErrorDlg

TDBEngineErrorDlg replaces the normal message box for EDBEngineError exceptions raised at design time.


DBGrids unit

Other objects and components, by unit

TBookmarkList

TBookmarkList is a collection of bookmarks that identify a set of records in a dataset.

TColumn

TColumn represents a column in a data grid (TDBGrid).

TColumnTitle

TColumnTitle represents the title of a data-grid column (TColumn).

TCustomDBGrid

TCustomDBGrid is the base class for grid controls that display the records from a dataset in a tabular format.

TDBGrid

TDBGrid displays and manipulates records from a dataset in a tabular grid.

TDBGridColumns

TDBGridColumns represents a container for TColumn objects.

TGridDataLink

TGridDataLink helps manage the link to a data source and maintain the field mapping for a TCustomDBGrid object.


DBLocalB unit

Other objects and components, by unit

TBDEClientDataSet

TBDEClientDataSet caches updates for data fetched using the BDE.


DBLocalS unit

Other objects and components, by unit

TSQLClientDataSet

TSQLClientDataSet uses dbExpress to fetch data that it caches internally in memory.


DBLocal unit

Other objects and components, by unit

TCustomCachedDataSet

TCustomCachedDataSet is the base class for client datasets that cache data from an internal source dataset.


DBLogDlg unit

DBLogDlg routines

Other objects and components, by unit

TLoginDialog

TLoginDialog is a login dialog box that can be used to provide login security in an application.


DbOleCtl unit

Other objects and components, by unit

TDataBindings

TDataBindings holds a group of TDataBindItem objects.

TDataBindItem

TDateBindItem represents a data binding in a data-aware ActiveX control.

TDBOleControl

Supports simple data binding for ActiveX controls.


DBPWDlg unit

DBPWDlg routines

Other objects and components, by unit

TPasswordDialog

TPasswordDialog is a dialog box that allows the user to specify passwords for the current BDE session.


DBTables unit

DBTables routines

Other objects and components, by unit

EDBEngineError

EDBEngineError is the exception class for Borland Database Engine errors.

ENoResultSet

ENoResultSet is the exception class for unsuccessful attempts to open a dataset query.

TBatchMove

TBatchMove performs database operations on groups of records or entire tables.

TBDECallback

TBDECallback is a wrapper for a Borland Database Engine (BDE) callback function.

TBDEDataSet

Encapsulates Borland Database Engine (BDE) functionality for descendant dataset objects.

TBlobStream

TBlobStream is a stream object that provides services which allow applications to read from or write to field objects that represent Binary large object (BLOB) fields.

TDatabase

TDatabase provides discrete control over a connection to a single database in a BDE-based database application.

TDataSetUpdateObject

TDataSetUpdateObject is the abstract base class for update objects used to update otherwise unupdateable queries or stored procedures in applications that cache updates.

TDBDataSet

TDBDataSet encapsulates database connectivity for descendant dataset objects.

TDBError

TDBError represents Borland Database Engine errors for the EDBEngineError exception class.

TNestedTable

TNestedTable encapsulates a dataset that is nested as a field within another table.

TParamList

TParamList manages a list of session parameters.

TQuery

TQuery encapsulates a dataset with a result set that is based on an SQL statement.

TSession

TSession provides global management of a group of database connections in an application.

TSessionList

TSessionList manages one or more Borland Database Engine (BDE) sessions in a database application.

TSQLUpdateObject

TSQLUpdateObject is the base class for classes that use an SQL command to apply cached updates on behalf of queries or stored procedures that can’t post updates directly.

TStoredProc

TStoredProc encapsulates a stored procedure in a BDE-based application.

TTable

TTable encapsulates a database table.

TUpdateSQL

TUpdateSQL applies cached updates on behalf of queries or stored procedures that can’t post updates directly.


DBWeb unit

DBWeb routines

Other objects and components, by unit

TDataSetTableProducer

TDataSetTableProducer assembles a sequence of HTML commands to display the records from a dataset in a tabular format.

TDSTableProducer

TDSTableProducer is the base class for objects that produce a set of HTML commands to display the records from a dataset in a tabular format.

TDSTableProducerEditor

TDSTableProducer is the base class for the helper object used by TDSTableProducer objects to communicate with a property editor at design time.

THTMLTableColumn

THTMLTableColumn represents the display attributes and field binding of a column in the HTML representation of a dataset.

THTMLTableColumns

THTMLTableColumns is a collection of THTMLTableColumn objects that describe the display attributes and field bindings of the columns in an HTML representation of tabular data.

THTTPDataLink

THTTPDataLink helps TDSTableProducer manage its link to the data source.


DBXpressWeb unit

Other objects and components, by unit

TSQLQueryTableProducer

TSQLQueryTableProducer assembles a sequence of HTML commands to display the result set of a query in a tabular format.


DB unit

DB routines

Other objects and components, by unit

EDatabaseError

EDatabaseError is the exception class for database errors.

EDOMParseError

EDOMParseError is the exception class for errors that occur when a DOM implementation parses an XML document.

EUpdateError

EUpdateError is the exception class for dataset provider update errors.

IDBSession

IDBSession is the interface for database sessions.

IProviderSupport

IProviderSupport is the interface that datasets use to enable a provider to represent them.

TADTField

A TADTField object represents an ADT (Abstract Data Type) field in a dataset.

TAggregateField

TAggregate field represents a maintained aggregate in a client dataset.

TArrayField

TArrayField represents an Array field in a dataset.

TAutoIncField

TAutoIncField is a persistent field object for an autoincrement field in a dataset.

TBCDField

TBCDField represents a binary-coded decimal (BCD) field in a dataset.

TBinaryField

TBinaryField represents an untyped binary field in a dataset.

TBlobField

TBlobField represents a field in a dataset that holds a reference to a binary large object (BLOB).

TBooleanField

TBooleanField represents a field containing Boolean values.

TBytesField

TBytesField represents a bytes field in a dataset.

TCheckConstraint

TCheckConstraint represents a record-level constraint on a dataset component.

TCheckConstraints

TCheckConstraints contains a collection of check constraints for a dataset component.

TCurrencyField

TCurrencyField represents a field that contains currency values in a dataset.

TCustomConnection

TCustomConnection is the base class for components that connect datasets to a remote source of data.

TDataLink

TDataLink is a helper class used by data-aware objects to coordinate the actions of TDataSource and TDataSet, and to respond to data events.

TDataSet

TDataSet is the base class for all dataset components that represent data in rows and columns.

TDataSetDesigner

TDataSetDesigner is the base class for all dataset designers.

TDataSetField

TDataSetField provides access to nested datasets.

TDataSource

TDataSource provides an interface between a dataset component and data-aware controls on a form.

TDateField

TDateField represents a date field in a dataset.

TDateTimeField

TDateTimeField represents a date-time field in a dataset.

TDefCollection

TDefCollection holds the definition objects (TNamedItem) that represent the specifications for database entities such as fields or indexes.

TDetailDataLink

TDetailDataLink is the ancestor to datalink classes that manage the relationships between datasets that are linked in master/detail relationships.

TField

TField is the common ancestor of all the field components.

TFieldDef

TFieldDef is a field definition that corresponds to a physical field of a record in a table underlying a dataset.

TFieldDefList

TFieldDefList lists the field definition (TFieldDef) objects of a dataset in a flattened form.

TFieldDefs

TFieldDefs holds the field definition (TFieldDef) objects that represent the physical fields underlying a dataset.

TFieldList

TFieldList lists the fields of a dataset, flattening out the structure of any object fields.

TFields

TFields holds the field (TField) objects that represent the physical fields underlying a dataset or an object field such as TADTField and TArrayField.

TFlatList

TFlatList is an abstract base class for objects that represent a flattened list of fields or field definitions.

TFloatField

TFloatField represents a field that contains floating-point values in a dataset.

TFMTBCDField

TFMTBCDField represents a binary-coded decimal (BCD) field in a dataset.

TGraphicField

TGraphicField represents a graphics field in a dataset.

TGuidField

TGuidField represents a guid field in a dataset.

TIDispatchField

TIDispatchField represents an IDispatch field in a dataset.

TIndexDef

TIndexDef describes an index in a database table.

TIndexDefs

TIndexDefs holds the list of available index definitions for a table.

TIntegerField

TIntegerField represents a signed 32-bit integer field in a dataset.

TInterfaceField

TInterfaceField represents an interface field in a dataset.

TLargeintField

A TLargeintField object represents a large integer field in a dataset.

TLookupList

TLookupList maintains a list of lookup values associated with a set of key field values.

TMasterDataLink

TMasterDataLink allows a dataset to establish a master/detail relationship.

TMemoField

TMemoField represents a memo field in a dataset.

TNamedItem

TNamedItem is the base class for definitions used by datasets.

TNumericField

TNumericField is the common ancestor of all the numeric fields in a dataset.

TObjectField

TObjectField is the common ancestor of TADTField, TArrayField, TDataSetField, and TReferenceField components in a dataset.

TParam

TParam represents a field parameter for a query or stored procedure.

TParams

TParams manages a list of field parameters.

TReferenceField

TReferenceField represents a REF field in a dataset.

TSmallintField

TSmallintField represents a signed 16-bit integer field in a dataset.

TSQLTimeStampField

TSQLTimeStampField represents a date-time field in a DBExpress dataset.

TStringField

TStringField represents a string field in a dataset.

TTimeField

TTimeField represents a time field in a dataset.

TVarBytesField

TVarBytesField represents a variable-length untyped binary field in a dataset.

TVariantField

TVariantField represents a variant field in a dataset.

TWideStringField

TWideStringField represents a large string field in a dataset.

TWordField

TWordField represents an unsigned 16-bit integer field in a dataset.


DdeMan unit

Other objects and components, by unit

TDdeClientConv

TDdeClientConv represents a DDE conversation with a DDE server application.

TDdeClientItem

TDdeClientItem defines an item in a DDE conversation.

TDdeServerConv

TDdeServerConv represents a DDE topic of conversation with a DDE client.

TDdeServerItem

TDdeServerItem defines the item of a DDE conversation.


DesignEditors unit

DesignEditors routines

Other objects and components, by unit

TComponentEditor

TComponentEditor provides the default implementation for the IComponentEditor interface.

TDefaultEditor

TDefaultEditor is the component editor for components that do not explicitly register a component editor.

TPropertyEditor

TPropertyEditor is a base class for property editors that implements the IProperty interface.


DesignIntf unit

DesignIntf routines

Other objects and components, by unit

IComponentEditor

IComponentEditor is the interface that the form designer uses to communicate with component editors.

IDesigner

IDesigner is an interface to the form designer in the IDE.

IDesignerSelections

IDesignerSelections represents a list of persistent objects.

IProperty

IProperty is the interface that the Object Inspector uses to communicate with property editors.

TBaseComponentEditor

TBaseComponentEditor is the base class for all component editors.

TBasePropertyEditor

TBasePropertyEditor is the base class for all property editors.

TDesignerSelections

TDesignerSelections maintains a list of persistent objects.


Dialogs unit

Dialogs routines

Other objects and components, by unit

TColorDialog

TColorDialog displays a modal color-selection dialog.

TCommonDialog

TCommonDialog is the ancestor of all components that represent Windows common dialog boxes.

TFindDialog

TFindDialog displays a Find dialog that allows users to search for text in a file.

TFontDialog

TFontDialog displays a font-selection dialog.

TOpenDialog

TOpenDialog displays a file-selection dialog.

TPrintDialog

TPrintDialog displays a Print dialog.

TPrinterSetupDialog

TPrinterSetupDialog displays a print-setup dialog for configuring printers.

TReplaceDialog

TReplaceDialog displays a search-and-replace dialog.

TSaveDialog

TSaveDialog displays a "Save As" dialog for saving files.


DSProd unit

Other objects and components, by unit

TCustomDataSetPageProducer

TCustomDataSetPageProducer is the ancestor of the data set page producer classes.

TDataSetPageProducer

TDataSetPageProducer produces a string of HTML commands based on an input template.


ExtActns unit

Other objects and components, by unit

TBrowseURL

TBrowseURL is the standard action for launching the default browser to display a specified URL.

TCustomFileRun

TCustomFileRun is the base class for actions that perform a specified operation on a file.

TDownLoadURL

TDownLoadURL is the standard action for saving the contents of a specified URL to a file.

TFileRun

TFileRun is the standard action for performing a specified operation on a file.

TListControlAction

TListControlAction is the base class for action objects that operate on the selection of a list control (list box or list view).

TNextTab

TNextTab moves a tabbed control to its next page.

TOpenPicture

TOpenPicture is the standard action for displaying the open picture dialog.

TPreviousTab

TPreviousTab moves a page control to its previous page.

TRichEditAction

TRichEditAction is the base class for action objects that apply rich text attributes to a rich edit control.

TRichEditAlignCenter

TRichEditAlignCenter centers the text horizontally in the current paragraph of a rich edit control.

TRichEditAlignLeft

TRichEditAlignLeft left-justifies the text in the current paragraph of a rich edit control.

TRichEditAlignRight

TRichEditAlignRight right-justifies the text in the current paragraph of a rich edit control.

TRichEditBold

TRichEditBold toggles the bold attribute of the currently selected text in a rich edit control.

TRichEditBullets

TRichEditBullets toggles whether the current paragraph of a rich edit control is bulleted.

TRichEditItalic

TRichEditItalic toggles the italic attribute of the currently selected text in a rich edit control.

TRichEditStrikeOut

TRichEditStrikeOut toggles the strikeout attribute of the currently selected text in a rich edit control.

TRichEditUnderline

TRichEditUnderline toggles the underline attribute of the currently selected text in a rich edit control.

TSavePicture

TSavePicture is the standard action for displaying the save picture dialog.

TSendMail

TSendMail is the standard action for sending an email message.

TTabAction

TTabAction is the base class for action objects designed to respond to the buttons in a tabbed dialog.

TURLAction

TURLAction is the base class for actions that perform some function based on an URL.


ExtCtrls unit

ExtCtrls routines

Other objects and components, by unit

TBevel

TBevel represents a beveled outline.

TBoundLabel

TBoundLabel is the type of a labeled edit control’s label.

TColorBox

TColorBox represents a combo box that lets users select a color.

TControlBar

TControlBar manages the layout of toolbar components.

TCustomColorBox

TCustomColorBox represents a combo box that lets users select a color.

TCustomControlBar

TCustomControlBar is the base class for control bar components.

TCustomLabeledEdit

TCustomLabeledEdit is the base class for edit controls that have an integrated label.

TCustomPanel

TCustomPanel is the base class for all panel components.

TCustomRadioGroup

TCustomRadioGroup is the base class for radio-group components.

THeader

THeader is a sectioned visual control that displays text and allows each section to be resized with the mouse.

TImage

TImage displays a graphical image.

TLabeledEdit

TLabeledEdit is an edit control that has an associated label.

TNotebook

TNotebook displays multiple pages, each with its own set of controls.

TPaintBox

TPaintBox provides a canvas that applications can use for rendering an image.

TPanel

TPanel implements a generic panel control.

TRadioGroup

TRadioGroup represents a group of radio buttons that function together.

TShape

TShape represents a geometric shape that can be drawn on a form.

TSplitter

TSplitter divides the client area of a form into resizable panes.

TTimer

TTimer encapsulates the Windows API timer functions.


ExtDlgs unit

Other objects and components, by unit

TOpenPictureDialog

TOpenPictureDialog displays a graphics-file selection dialog.

TSavePictureDialog

TSavePictureDialog displays a “Save As” dialog for saving graphics files.


FileCtrl unit

FileCtrl routines

Other objects and components, by unit

TDirectoryListBox

TDirectoryListBox represents a list box control that is aware of the directory structure of the current drive.

TDriveComboBox

TDriveComboBox implements a specialized combo box that displays all the drives available when the application runs.

TFileListBox

TFileListBox is a specialized list box that lists all the files in a specified directory.

TFilterComboBox

TFilterComboBox is a specialized combo box that presents the user with a choice of file filters.


FMTBcd unit

FMTBcd routines

Other objects and components, by unit

EBcdException

EBcdException is the exception class for errors that occur when working with BCD values.

EBcdOverflowException

EBcdOverflowException is the exception class for errors that occur when a Variant can’t create a BCD value due to the requested precision and number of decimals.


Forms unit

Forms routines

Other objects and components, by unit

IDesignerHook

IDesignerHook is an interface that allows component writers to interact with the form designer in the IDE.

TApplication

TApplication is the type used for a GUI windowed application.

TControlScrollBar

TControlScrollBar displays a horizontal or vertical scroll bar.

TCustomActiveForm

TCustomActiveForm is the base class for Active Forms.

TCustomDockForm

TCustomDockForm is the default floating dock site class for TControl objects.

TCustomForm

TCustomForm is the base class from which to derive a window such as a form or dialog.

TCustomFrame

TCustomFrame is the base class from which TFrame descends.

TForm

TForm represents a standard application window (form).

TFrame

TFrame is a container for components; it can be nested within forms or other frames.

TMonitor

TMonitor represents a monitor on which an application runs.

TScreen

TScreen represents the state of the screen in which an application runs.

TScrollBox

TScrollBox represents a scrolling area (a scroll box) in a window.

TScrollingWinControl

TScrollingWinControl is the base class for windowed controls that support scrolling.


Graphics unit

Graphics routines

Other objects and components, by unit

EInvalidGraphic

EInvalidGraphic is the exception class for unrecognized graphic files.

EInvalidGraphicOperation

EInvalidGraphicOperation is the exception class for illegal operations on graphics.

TBitmap

TBitmap is an encapsulation of a Windows bitmap (HBITMAP), including its palette (HPALETTE).

TBitmapImage

TBitmapImage is the internal representation of the bitmap image for a TBitmap object.

TBrush

TBrush represents the color and pattern used to fill solid shapes.

TBrushRecall

TBrushRecall saves and restores a TBrush object.

TCanvas

TCanvas provides an abstract drawing space for objects that must render their own images.

TFont

TFont encapsulates a system font.

TFontRecall

TFontRecall saves and restores the properties of a TFont object.

TGraphic

TGraphic is the abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images.

TGraphicsObject

TGraphicsObject is the abstract base class for objects which encapsulate a system graphics object: TBrush, TFont, and TPen.

TIcon

TIcon is an encapsulation of a Windows icon.

TIconImage

TIconImage is the internal representation of the bitmap image for a TIcon object.

TMetafile

TMetafile is an encapsulation of the Win32 Enhanced metafile.

TMetafileCanvas

TMetafileCanvas allows applications to create metafile images from scratch.

TMetafileImage

TMetafileImage is the internal representation of the metafile image for a TMetafile object.

TPen

TPen is used to draw lines or outline shapes on a canvas.

TPenRecall

TPenRecall saves and restores the properties of a TPen object.

TPicture

TPicture contains a bitmap, icon, metafile graphic, or user-defined graphic.

TSharedImage

TSharedImage is the base class for classes that contain images used for graphics objects.


Grids unit

Other objects and components, by unit

EInvalidGridOperation

EInvalidGridOperation is the exception class for illegal grid operations.

TCustomDrawGrid

TCustomDrawGrid is the base class for grids that publish events for painting and manipulating the cells in the grid.

TCustomGrid

TCustomGrid is the base type for all components that present information in a two-dimensional grid.

TDrawGrid

TDrawGrid represents a grid control that displays information in column and row format.

TInplaceEdit

TInPlaceEdit provides text editing capabilities for grid controls.

TStringGrid

TStringGrid represents a grid control designed to simplify the handling of strings and associated objects.

TStringGridStrings

TStringGridStrings maintains a list of the strings that appear in the cells of a string grid.


HTTPApp unit

HTTPApp routines

Other objects and components, by unit

EWebBrokerException

EWebBrokerException is an exception raised by WebBroker objects.

TCookie

TCookie represents a Cookie header in an HTTP response message.

TCookieCollection

TCookieCollection is a collection of TCookie objects.

TCustomContentProducer

TCustomContentProducer is the base class for all objects that produce the string that is sent as the contents of an HTTP response message.

TCustomWebDispatcher

TCustomWebDispatcher is the abstract base class for Web dispatcher objects.

TWebActionItem

TWebActionItem allows a Web server application to create and send responses to HTTP request messages.

TWebActionItems

TWebActionItems is a collection of TWebActionItem objects.

TWebDispatcher

TWebDispatcher passes HTTP request message on to the appropriate action items that assemble a response.

TWebModule

TWebModule is the automatically generated Web module for a Web server application.

TWebRequest

TWebRequest is the base class for all objects that represent client request information that is passed to a Web server application.

TWebResponse

TWebResponse is the base class for all objects that represent HTTP messages sent in response to an HTTP request message.


HTTPProd unit

Other objects and components, by unit

TBasePageProducer

TBasePageProducer is a base class for objects that produce a string of HTML commands based on an input template.

TCustomPageProducer

TCustomPageProducer is the base class for objects that produce a string of HTML commands based on an input template.

THTMLTableAttributes

THTMLTableAttributes represents the display attributes of an HTML table tag.

THTMLTableCellAttributes

THTMLTableCellAttributes represents the display attributes of an HTML table cell tag.

THTMLTableElementAttributes

THTMLTableElementAttributes is the common base class for objects that describe the display attributes of parts of an HTML table.

THTMLTableHeaderAttributes

THTMLTableHeaderAttributes represents the display attributes of the header tag in an HTML table.

THTMLTableRowAttributes

THTMLTableRowAttributes represents the display attributes of the row tag in an HTML table.

THTMLTagAttributes

THTMLTagAttributes is the base class for all objects that represent the attributes of an HTML tag.

TPageProducer

TPageProducer produces a string of HTML commands based on an input template.


ImgList unit

Other objects and components, by unit

TChangeLink

The TImageList component uses TChangeLink internally to notify other objects when changes are made to the image list.

TCustomImageList

TCustomImageList is the base class for collections of same-sized images, each of which can be referred to by its index.


IniFiles unit

Other objects and components, by unit

EIniFileException

EIniFileException is the exception class for errors that occur when working with INI files using TIniFile.

TCustomIniFile

TCustomIniFile is the abstract base class for components that encapsulate access to INI files or provide similar access to the system registry.

THashedStringList

THashedStringList maintains a list of strings using an internal hash table.

TIniFile

TIniFile stores and retrieves application-specific information and settings from INI files.

TMemIniFile

TMemIniFile enables buffered storage and retrieval of application-specific information and settings in an INI file.


IntfInfo unit

Other objects and components, by unit

EInterfaceRTTIException

EInterfaceRTTIException is the exception raised when an interface does not have RTTI.


InvokeRegistry unit

InvokeRegistry routines

Other objects and components, by unit

ERemotableException

ERemotableException is the base class for exceptions that can be communicated from a Web Service application to a client application.

ETypeRegistryException

ETypeRegistryException is the exception raised when the invocation registry or the invokable type registry encounters an invalid type.

TDataContext

TDataContext stores temporary information about a set of objects, Variants, and other related values.

TInvContext

TInvContext stores information about a method call on an invokable interface.

TInvokableClass

TInvokableClass is the base class for the implementation classes of invokable interfaces.

TInvokableClassRegistry

TInvokableClassRegistry is the type of the invocation registry.

TPascalRemotableTypeRegistry

TPascalRemotableTypeRegistry is the type of the remotable type registry.

TRemotable

TRemotable is the base class for classes that can be passed as parameters or return values in a Web Service application.

TRemotableXS

TRemotableXS is the base class for classes that represent a non-native scalar type on an invokable interface in a Web Service application.


ISAPIApp unit

ISAPIApp routines

Other objects and components, by unit

TISAPIApplication

TISAPIApplication encapsulates an ISAPI or NSAPI server application.


ISAPIHTTP unit

Other objects and components, by unit

TISAPIRequest

TISAPIRequest represents client request information that is passed to a server application DLL.

TISAPIResponse

TISAPIResponse represents HTTP messages sent by an ISAPI application in response to an HTTP request message.


Jpeg unit

Other objects and components, by unit

TJPEGData

TJPEGData encapsulates the compressed file that contains the data source for the original compressed jpeg image used by a TJPEGImage object.

TJPEGImage

TJPEGImage encapsulates a jpeg graphic.


ListActns unit

Other objects and components, by unit

TCustomListAction

TCustomListAction is the base class for action objects that provide items to client controls.

TListControlItem

TListControlItem represents an item with a text value, an image, and a data pointer.

TListControlItems

TListControlItems manages a collection of TListControlItem objects.

TStaticListAction

TStaticListAction provides items to client controls.

TStaticListItems

TStaticListItems represents the items that TStaticListAction supplies to client controls.

TVirtualListAction

TVirtualListAction provides items to a client controls.


Masks unit

Masks routines

Other objects and components, by unit

EMaskException

EMaskException is the exception class for errors that occur when comparing a file name to a mask.

TMask

TMask allows the comparison of strings containing wildcards to a file mask.


Mask unit

Other objects and components, by unit

EDBEditError

EDBEditError is the exception class for data that are incompatible with a specified mask.

TCustomMaskEdit

TCustomMaskEdit is the base type for edit controls that provide a mask for checking the validity of text typed into the control.

TMaskEdit

TMaskEdit implements a generic masked edit control.


Math unit

Math routines

Other objects and components, by unit

EInvalidArgument

EInvalidArgument is the exception class for out-of-range parameters in specialized math and accounting functions.


MConnect unit

Other objects and components, by unit

TCOMConnection

TCOMConnection is the base class for components that connect to application servers using DCOM or OLE.

TCustomObjectBroker

TCustomObjectBroker is the base class for components that locate available application servers for a DataSnap connection component.

TDCOMConnection

TDCOMConnection handles a client application’s DCOM connection to the remote server in a in a multi-tiered application.

TDispatchConnection

TDispatchConnection is the base class for objects that connect client applications to an IDispatch-based application server.

TLocalConnection

TLocalConnection represents the connection between a client dataset or XML broker and a provider that resides in the same application.

TOLEnterpriseConnection

TOLEnterpriseConnection is provided for backward compatibility with applications that connect to an application server using OLEnterprise.

TSharedConnection

TSharedConnection connects to a child remote data module that is accessible only through the properties of a main remote data module on the application server.


Menus unit

Menus routines

Other objects and components, by unit

EMenuError

EMenuError is the exception class for errors involving menu items.

TMainMenu

TMainMenu encapsulates a menu bar and its accompanying drop-down menus for a form.

TMenu

TMenu is the base type for menu components such as TMainMenu and TPopupMenu.

TMenuActionLink

TMenuActionLink links menu item clients to the corresponding menu action.

TMenuItem

TMenuItem describes the properties of an item in a menu.

TPopupList

TPopupList manages the window that handles popup menu messages.

TPopupMenu

TPopupMenu encapsulates the properties, methods, and events of a pop-up menu.


MidasCon unit

Other objects and components, by unit

TMidasConnection

TMidasConnection handles a server connection for the client of a multi-tiered application.

TRemoteServer

TRemoteServer handles a DCOM connection to a remote server in a client application that is part of a multi-tiered application.


Midas unit

Other objects and components, by unit

IAppServer

IAppServer is the interface that client datasets use to communicate with a dataset provider.


MidItems unit

Other objects and components, by unit

IDataSetComponent

IDataSetComponent defines the methods that bind a Web item to an XML broker.

IHTMLField

IHTMLField is an interface that must be implemented by Web items that generate <INPUT> elements.

IHTMLForm

IHTMLForm is an interface that must be implemented by Web items that generate forms.

IInetXWebDataSet

IInetXWebDataSet lets a Web item interact with information about a dataset in an XML broker’s data packet.

TApplyUpdatesButton

TApplyUpdatesButton generates an HTML control that sends an Update message to the XML broker on an InternetExpress application.

TCaptionAttributes

TCaptionAttributes customizes the appearance of the label that identifies a display control in an InternetExpress application.

TCustomDataForm

TCustomDataForm is the base class for components that generate an HTML form in an InternetExpress application.

TCustomDataGrid

TCustomDataGrid is the base class for Web items that generate an HTML table to display a dataset in an XML data packet.

TCustomDataNavigator

TCustomDataNavigator assembles the HTML generated by a set of TDataSetButton and TXMLButton descendants.

TCustomFieldGroup

TCustomFieldGroup is the base class for Web items that arrange information on an HTML form as a set of labeled fields.

TCustomLayoutGroup

TCustomLayoutGroup is the base class for Web items that arrange content produced by arbitrary Web items.

TCustomQueryButtons

TCustomQueryButtons assembles the HTML generated by a set of TQueryButton descendants.

TCustomQueryForm

TCustomQueryForm is the base class for Web items that generate HTML forms for letting users enter application-defined values.

TDataForm

TDataForm generates an HTML form that displays database information and lets users apply updates.

TDataGrid

TDataGrid generates an HTML table to display a dataset in an XML data packet.

TDataNavigator

TDataNavigator assembles the HTML generated by a set of TDataSetButton and TXMLButton descendants.

TDataSetButton

TDataSetButton is the base class for Web items that create HTML buttons for navigating or editing data.

TDeleteButton

TDeleteButton generates an HTML control that deletes a record from an XML data packet.

TFieldGroup

TFieldGroup arranges database information on an HTML form as a set of labeled fields.

TFieldRadioGroup

TFieldRadioGroup creates an HTML radio group control to represent a field in an XML data packet.

TFieldSelectOptions

TFieldSelectOptions creates an HTML list control to represent a field in an XML data packet.

TFieldStatus

TFieldStatus generates an HTML control that indicates whether a record in an XML data packet has been modified by the end user.

TFieldText

TFieldText creates a single-line HTML input control to represent a field in an XML data packet.

TFieldTextArea

TFieldTextArea creates a multi-line HTML input control to represent a field in an XML data packet.

TFirstButton

TFirstButton generates an HTML control that moves to the first record in an XML data packet.

TGridAttributes

TGridAttributes describes the options the TDataGrid component adds to an HTML <TABLE> tag.

TGridRowAttributes

TGridRowAttributes describes the options the TDataGrid component adds to its HTML row tags (<TR>).

TInsertButton

TInsertButton generates an HTML control that inserts a new record in an XML data packet.

TLastButton

TLastButton generates an HTML control that moves to the last record in an XML data packet.

TLayoutGroup

TLayoutGroup generates the HTML to arrange content produced by other Web items.

TNextButton

TNextButton generates an HTML control that moves to the next record in an XML data packet.

TNextPageButton

TNextPageButton generates an HTML control that moves to the next set of records in an XML data packet.

TPostButton

TPostButton generates an HTML control that posts changes to an XML delta packet.

TPriorButton

TPriorButton generates an HTML control that moves to the previous record in an XML data packet.

TPriorPageButton

TPriorPageButton generates an HTML control that moves to the previous set of records in an XML data packet.

TQueryButton

TQueryButton is the base class for Web items that create HTML buttons that manage application-defined values.

TQueryButtons

TQueryButtons assembles the HTML generated by a set of TQueryButton descendants.

TQueryFieldGroup

TQueryFieldGroup arranges information on an HTML form as a set of labeled fields.

TQueryForm

TQueryForm generates HTML forms for letting users enter application-defined values.

TQueryRadioGroup

TQueryRadioGroup creates an HTML radio group control to represent named parameter.

TQuerySelectOptions

TQuerySelectOptions creates an HTML list control to represent a named parameter.

TQueryText

TQueryText creates a single-line HTML input control to represent a named parameter.

TQueryTextArea

TQueryTextArea creates a multi-line HTML input control to represent named parameter.

TResetQueryButton

TResetQueryButton generates an HTML control that backs out changes to the values on a query form.

TSelectOptionsColumn

TSelectOptionsColumn creates an HTML list control to represent a field value in a data grid.

TStatusColumn

TStatusColumn generates an HTML control that indicates whether a record in a data grid has been modified by the end user.

TSubmitQueryButton

TSubmitQueryButton generates an HTML control that backs out changes to the values on a query form.

TTextAreaColumn

TTextAreaColumn creates a multi-line HTML input control to represent a field value in a data grid.

TTextColumn

TTextColumn creates a single-line HTML input control to represent a field value in a data grid.

TUndoButton

TUndoButton generates an HTML control that backs out changes to the current record.

TWebButton

TWebButton is the base class for Web items that create HTML button controls.

TWebControlGroup

TWebControlGroup is the base class for Web items that arrange HTML controls.

TWebDataDisplay

TWebDataDisplay is the base class for Web items that create HTML display controls.

TWebDataInput

TWebDataInput is the base class for Web items that create HTML display controls for entering information.

TWebDisplayReferenceGroup

TWebDisplayReferenceGroup is the base class for Web items that arrange a set of button controls that influence a control that displays data.

TWebForm

TWebForm is the base class for Web items that create HTML forms in InternetExpress applications.

TWebListInput

TWebListInput is the base class for Web items that create HTML display controls which present a fixed set of possible values.

TWebRadioGroupInput

TWebRadioGroupInput is the base class for Web items that create HTML radio group controls.

TWebSelectOptionsInput

TWebSelectOptionsInput is the base class for Web items that create HTML list controls.

TWebStatus

TWebStatus is the base class for Web items that indicate the status of records in an XML data packet.

TWebTextAreaInput

TWebTextAreaInput is the base class for Web items that create HTML multi-line text controls.

TWebTextInput

TWebTextInput is the base class for Web items that create HTML single-line text controls.

TXMLButton

TXMLButton is the base class for Web items that create HTML buttons that perform some action with the XML data packet.

TXMLData

TXMLData manages the relationship between an XML broker and a Web item that represents a dataset in that XML broker’s data packet.

TXMLDataSet

TXMLDataSet manages the relationship between a Web item and the XML dataset to which it is bound.

TXMLDisplayGroup

TXMLDisplayGroup is the base class for Web items that arrange a set of special-purpose controls in an HTML form.

TXMLDisplayReferenceButton

TXMLDisplayReferenceButton is the base class for Web items that generate HTML buttons for influencing controls that display data.

TXMLDisplayReferenceGroup

TXMLDisplayReferenceGroup is the base class for Web items that arrange a set of button controls that influence a control that displays data.


MidProd unit

Other objects and components, by unit

TBaseInetXPageProducer

TBaseInetXPageProducer is an base class for InternetExpress page producer classes.

TCustomInetXPageProducer

TCustomInetXPageProducer is the base class for page producers that display live database information in an InternetExpress application.

TInetXPageProducer

TInetXPageProducer assembles an HTML document that represents live database information from an application server.

TMidasPageProducer

TMidasPageProducer assembles an HTML document that represents live database information from an application server.


MPlayer unit

Other objects and components, by unit

EMCIDeviceError

EMCIDeviceError is the exception class for devices that provide a Media Control Interface (MCI) driver.

TMediaPlayer

TMediaPlayer controls devices that provide a Media Control Interface (MCI) driver.


Mtsobj unit

Other objects and components, by unit

TMtsAutoObject

TMtsAutoObject encapsulates the objects and interfaces of the MTS application server.


MtsRdm unit

Other objects and components, by unit

TMtsDataModule

TMtsDataModule encapsulates the objects and interfaces of an MTS application server.


mxarrays unit

Other objects and components, by unit

EArrayError

EArrayError is the exception class for failures that occur when manipulating a descendant of TBaseArray.

ELowCapacityError

ELowCapacityError is the exception class for when an attempt is made to allocate more memory than is available for the decision cube.

EUnsupportedTypeError

EUnsupportedTypeError is the exception class for failures that occur when adding dimensions to the cache of a decision cube.

TBaseArray

TBaseArray is the base class for all arrays used by the decision cube components.

TSmallIntArray

TSmallIntArray is a dynamically resizable array of 16-bit integers.

TValueArray

TValueArray is a dynamically resizable array of 16-bit integers.


mxcommon unit

Other objects and components, by unit

TDimensionItem

TDimensionItem is the base class for objects that represent dimensions and summaries in a crosstabulated data store.

TDimensionItems

TDimensionItems is the base class for objects that represent dimension maps.


MXDB unit

Other objects and components, by unit

EDimensionMapError

EDimensionMapError is the exception class for when the dataset of a decision cube does not have the proper format.

EDimIndexError

EDimIndexError is the exception class for when an invalid index is used to specify a dimension in a decision source.

TDecisionCube

TDecisionCube maintains crosstabulated data that it provides to a TDecisionSource object.

TDecisionSource

TDecisionSource links a decision control to a configuration (pivot state) of the data from a decision cube.


MXGRAPH unit

Other objects and components, by unit

TCustomDecisionGraph

TCustomDecisionGraph is the base class for controls that graph crosstabulated data.

TDecisionGraph

TDecisionGraph displays a graph of crosstabulated data.


MXGRID unit

Other objects and components, by unit

TCustomDecisionGrid

TCustomDecisonGrid is the base class for controls that present crosstabulated data in a two-dimensional grid.

TDecisionGrid

TDecisionGrid presents crosstabulated data from a decision source in a grid format.

TDisplayDim

TDisplayDim represents a dimension in a decision grid.

TDisplayDims

TDisplayDims represents a collection of TDisplayDim objects.


MXPIVSRC unit

Other objects and components, by unit

TDecisionPivot

TDecisionPivot allows the user to control the pivot state of a decision source.


mxstore unit

Other objects and components, by unit

ECacheError

ECacheError is the exception class for failures that occur when building the cache of a decision cube.

TCubeDim

TCubeDim represents an entry in the dimension map of a decision cube.

TCubeDims

TCubeDims is a collection of TCubeDim objects.

TCustomDataStore

TCustomDataStore is the base class for components that analyze and maintain crosstabulated data.


MXTABLES unit

Other objects and components, by unit

TDecisionQuery

Hierarchy	Properties	Methods	Events 	Using TDecisionQuery	See also


ObjBrkr unit

Other objects and components, by unit

EBrokerException

EBrokerException is the exception raised by simple object brokers when they can’t locate an available server.

TServerCollection

TServerCollection is a collection of TServerItem objects.

TServerItem

TServerItem describes an application server for a simple object broker.

TSimpleObjectBroker

TSimpleObjectBroker maintains a list of available application servers for a connection component.


OleCtnrs unit

OleCtnrs routines

Other objects and components, by unit

TOleContainer

TOleContainer embeds or links OLE objects.

TOleForm

TOleForm is an object that provides OLE support for a TForm object.


OleCtrls unit

OleCtrls routines

Other objects and components, by unit

EOleCtrlError

EOleCtrlError is the exception class for ActiveX controls.

TEnumPropDesc

TEnumPropDesc provides the mapping between strings used to name the values of a property in an OLE control object and the values themselves.

TOleControl

TOleControl is the base class from which ActiveX controls are derived.


OleServer unit

Other objects and components, by unit

TOleServer

TOleServer is the base class for components that represent an imported COM server.


OPConvert unit

Other objects and components, by unit

IOPConvert

IOPConvert is the interface for marshaling and unmarshaling method calls on an invokable interface.


OpToSoapDOMConv unit

Other objects and components, by unit

ESOAPDomConvertError

ESOAPDomConvertError is the class for exceptions that occur when marshaling or unmarshaling a SOAP request.

TOPToSoapDomConvert

TOPToSoapDomConvert handles the marshaling and unmarshaling of SOAP method calls.

TSOAPDomConv

TSOAPDomConv is the base class for components that use a DOM to interpret and create SOAP method calls.


Outline unit

Other objects and components, by unit

EOutlineError

EOutlineError is the exception class for outline components.

OutlineError

OutlineError is a special exception class for invalid outline-node indexes.

TCustomOutline

TCustomOutline is the base class for controls that display outline nodes (TOutlineNode objects).

TOutline

TOutline is a multilevel outline that displays the values of TOutlineNode objects.

TOutlineNode

TOutlineNode represents a node in a TCustomOutline object.


PagItems unit

Other objects and components, by unit

TBasePageItemsProducer

TBasePageItemsProducer produces a string of HTML commands based on an input template.

TPageItemsProducer

TPageItemsProducer maintains a list of Web item components for producing a string of HTML commands based on an input template.


Printers unit

Printers routines

Other objects and components, by unit

EPrinter

EPrinter is the exception class for printing errors.

TPrinter

TPrinter encapsulates the Windows printer interface.


Provider unit

Provider routines

Other objects and components, by unit

EDSWriter

EDSWriter is the exception class for errors that occur when creating data packets to represent the data or metadata in a dataset.

TBaseProvider

TBaseProvider is a base class for all providers that represent the data in a dataset.

TCustomProvider

TCustomProvider is the base class for data providers.

TCustomResolver

TCustomResolver is the base class for components that apply updates on behalf of a provider.

TDataSetProvider

TDataSetProvider provides data from a dataset and resolves updates to that dataset or its database server.

TDataSetResolver

TDataSetResolver applies updates to a dataset on behalf of a provider.

TPacketDataSet

TPacketDataSet represents a data packet or delta packet that is used by a provider.

TProvider

TProvider provides data to and applies updates from a client dataset.

TSQLResolver

TSQLResolver applies updates to a database server on behalf of a provider.

TUpdateTree

TUpdateTree stores information about a delta packet on behalf of a resolver.


Registry unit

Other objects and components, by unit

ERegistryException

ERegistryException is the exception class for registry errors.

TRegIniFile

TRegIniFile is a low-level wrapper for the Windows 95/NT system registry.

TRegistry

TRegistry is a low-level wrapper for the system registry and functions that operate on the registry.

TRegistryIniFile

TRegistryIniFile is a wrapper for the Windows system registry.


ReqFiles unit

Other objects and components, by unit

TWebRequestFile

 TWebRequestFile object contains the description and content of a file extracted from an HTTP request.

TWebRequestFiles

he TWebRequestFiles module stores a number of TWebAbstractRequestFile objects as a collection.

TWebRequestFileStream

WebRequestFileStream holds a file uploaded with an HTTP request.


Rio unit

Other objects and components, by unit

TRIO

TRIO is the base class for components that generate calls to remote interfaced objects.


ScktComp unit

ScktComp routines

Other objects and components, by unit

TAbstractSocket

TAbstractSocket is the abstract base class for all socket components.

TClientSocket

TClientSocket manages socket connections for a TCP/IP client.

TClientWinSocket

TClientWinSocket describes the client endpoint of a Windows socket connection.

TCustomServerSocket

TCustomServerSocket is the base class for all server socket components.

TCustomSocket

TCustomSocket is the base class for socket components.

TCustomWinSocket

TCustomWinSocket is the base class for all Windows socket objects.

TServerClientThread

TServerClientThread is an execution thread used for a single connection to a client socket accepted by a Windows server socket.

TServerClientWinSocket

TServerClientWinSocket describes the server endpoint of a socket connection to a client socket.

TServerSocket

TServerSocket manages server socket connections for a TCP/IP server.

TServerWinSocket

TServerWinSocket describes the endpoint of a listening server socket connection.

TWinSocketStream

TWinSocketStream is a stream that provides services which allow applications to read from or write to socket connections.


SConnect unit

Other objects and components, by unit

EInterpreterError

EInterpreterError is the exception class for errors that arise when trying to interpret COM calls that have been marshaled to a data block.

ESocketConnectionError

ESocketConnectionError is the exception class for errors that arise when sending or receiving messages using TSocketConnection.

IDataBlock

IDataBlock is the interface used by data block interpreters to access memory buffers.

IDataIntercept

IDataIntercept is the interface used by TSocketConnection components to transform data that is communicated over the connection.

ISendDataBlock

ISendDataBlock is the interface used by data block interpreters to send messages to an application server after they are marshaled.

ITransport

ITransport is the interface used by TStreamedConnection to connect to, read from, and write to a remote application server.

TCustomDataBlockInterpreter

TCustomDataBlockInterpreter marshals COM interface calls for streamed connection components.

TDataBlockInterpreter

TDataBlockInterpreter marshals COM interface calls for non COM-based connection components.

TPacketInterceptFactory

TPacketInterceptFactory is the type of the class factory used to instantiate a data packet interceptor.

TSocketConnection

TSocketConnection uses Windows sockets to manage the connection to an application server.

TStreamedConnection

TStreamedConnection is the base class for components that handle their own marshaling of interface calls when connecting to application servers.

TWebConnection

TWebConnection uses HTTP to manage the connection to an application server.


ShDocVw unit

Other objects and components, by unit

TWebBrowser

TWebBrowser provides access to the Web browser functionality of Microsoft’s Shell Doc Object and Control Library (SHDOCVW.DLL).


SiteComp unit

Other objects and components, by unit

TAbstractDesigntimeWarnings


SiteProd unit

Other objects and components, by unit

TAdapterPageProducer

he TAdapterPageProducer automatically generates the proper HTML and JavaScript needed to display adapter fields and execute adapter actions.

TSitePageElements

SitePageElements is used to store part of the content generated by TBaseAdapterPageProducer.


SoapConn unit

Other objects and components, by unit

TSoapConnection

TSoapConnection connects to an application server that is implemented as a Web Service.


soapdomconv unit

Other objects and components, by unit

IDOMHeaderProcessor

IDOMHeaderProcessor is the interface for objects that interpret and create SOAP headers.

TSOAPDOMProcessor

TSOAPDOMProcessor is the base class for components that process the SOAP headers from SOAP requests.


SoapHTTPClient unit

Other objects and components, by unit

THTTPRIO

THTTPRIO uses HTTP messages to call remote interfaced objects using SOAP.


SoapHTTPDisp unit

Other objects and components, by unit

IHTTPSoapDispatch

IHTTPSoapDispatch is the interface for objects that interpret SOAP request messages and execute the corresponding invokable interface.

THTTPSoapDispatchNode

THTTPSoapDispatchNode forwards SOAP messages to an invoker for interpretation.


SoapHTTPPasInv unit

Other objects and components, by unit

THTTPSoapPascalInvoker

THTTPSoapPascalInvoker interprets a SOAP request message and executes the corresponding invokable interface.


SoapHTTPTrans unit

Other objects and components, by unit

THTTPReqResp

THTTPReqResp executes a method call on an invokable interface by sending a SOAP message to the server.


SOAPPasInv unit

Other objects and components, by unit

TSoapPascalInvoker

TSoapPascalInvoker is the base class for components that interpret SOAP requests and execute the corresponding invokable interface.


Sockets unit

Other objects and components, by unit

ESocketError

ESocketError is the exception class for failures that occur when trying to create, use, or shut down Windows socket objects.

TBaseSocket

TBaseSocket encapsulates local operations on file descriptors

TClientSocketThread

TClientSocketThread enables creation of separate threads of execution for the client socket in an application.

TCustomIpClient

TCustomIpClient encapsulates the client network functions

TCustomTcpServer

TCustomTcpServer is the ancestor object of all the server socket descendants

TIpSocket

TIpSocket encapsulates the network support functions

TRawSocket

TRawSocket encapsulates a raw socket

TServerSocketThread

TServerSocketThread enables creation of separate threads of execution for the server socket in an application.

TTcpClient

TTcpClient is the TCP client component

TTcpServer

TTcpServer is the TCP server component

TUdpSocket

TUdpSocket is the UDP component


SqlExpr unit

SqlExpr routines

Other objects and components, by unit

TCustomSQLDataSet

TCustomSQLDataSet is the base class for all dbExpress dataset components.

TSQLBlobStream

TSQLBlobStream lets applications read from or write to BLOB fields in a client dataset.

TSQLConnection

TSQLConnection encapsulates a dbExpress connection to a database server.

TSQLDataLink

TSQLDataLink allows a unidirectional dataset act as the detail in a master/detail relationship.

TSQLDataSet

TSQLDataSet represents data retrieved using dbExpress.

TSQLMonitor

TSQLMonitor intercepts messages that pass between an SQL connection component and a database server and saves them in a string list.

TSQLQuery

TSQLQuery represents a query that is executed using dbExpress.

TSQLStoredProc

TSQLStoredProc represents a stored procedure that is executed using dbExpress.

TSQLTable

TSQLTable represents a database table that is accessed using dbExpress.


StdActnMenus unit

Other objects and components, by unit

TStandardMenuButton

TStandardMenuButton is the standard ActionBand menu button class.

TStandardMenuItem

TStandardMenuItem is the ActionBand standard menu item.

TStandardMenuPopup

TStandardMenuPopup is the default menu popup style.


StdActns unit

Other objects and components, by unit

TColorSelect

TColorSelect is the standard action for displaying a color selection dialog.

TCommonDialogAction

TCommonDialogAction is the base class for action objects that display a dialog.

TEditAction

TEditAction is the base class for action objects that perform standard edits on an edit control.

TEditCopy

TEditCopy copys the selected text in a target edit control to the Windows clipboard.

TEditCut

TEditCut cuts the selected text in a target edit control to the Windows clipboard.

TEditDelete

TEditDelete deletes the selected text in a target edit control.

TEditPaste

TEditPaste pastes text from the clipboard into the active edit control.

TEditSelectAll

TEditSelectAll selects all text in an active text control.

TEditUndo

TEditUndo backs out the last change in an edit control.

TFileAction

TFileAction is the base class for action objects that display a file selection dialog.

TFileExit

TFileExit is the standard action for shutting down an application.

TFileOpen

TFileOpen is the standard action for displaying a file open dialog.

TFileOpenWith

TFileOpenWith is the standard action for displaying the dialog that lets users choose what application to user for opening a file.

TFilePrintSetup

TFilePrintSetup is the standard action for displaying a printer setup dialog.

TFileSaveAs

TFileSaveAs is the standard action for displaying a file save as dialog.

TFontEdit

TFontEdit is the standard action for displaying a font selection dialog.

THelpAction

THelpAction is the base class for action objects that interact with the help system.

THelpContents

THelpContents brings up the contents for the default help system.

THelpContextAction

THelpContextAction brings up the help topic for the active control.

THelpOnHelp

THelpOnHelp brings up a help topic on how to use Help.

THelpTopicSearch

THelpTopicSearch brings up the help index.

THintAction

THintAction is the action that executes when the user pauses the mouse over a control or menu item that has a hint.

TListControlClearSelection

TListControlClearSelection deselects all selected items in a list control (list view or list box).

TListControlCopySelection

TListControlCopySelection copies the selected items in a list control (list view or list box) to another (destination) list control.

TListControlDeleteSelection

TListControlDeleteSelection deletes the selected items in a list control (list view or listbox).

TListControlMoveSelection

TListControlMoveSelection moves the selected items in a list control (list view or list box) to another (destination) list control.

TListControlSelectAll

TListControlSelectAll selects all the items in a list control (list view or listbox).

TPrintDlg

TPrintDlg is the standard action for displaying a print dialog.

TSearchAction

TSearchAction is the base class for action objects that display a search or search and replace dialog.

TSearchFind

TSearchFind is the standard action for displaying a find dialog.

TSearchFindFirst

TSearchFindFirst is the standard action for displaying a find dialog that looks for the first occurrence of a string.

TSearchFindNext

TSearchFindNext is the standard action for locating the next instance of a string in an edit control.

TSearchReplace

TSearchReplace is the standard action for displaying a find-and-replace dialog.

TWindowAction

TWindowAction is the base class for action objects that work with MDI forms.

TWindowArrange

TWindowArrange arranges the icons of minimized MDI child forms.

TWindowCascade

TWindowCascade cascades the MDI child forms.

TWindowClose

TWindowClose closes the active MDI child form.

TWindowMinimizeAll

TWindowMinimizeAll minimizes all MDI child forms.

TWindowTileHorizontal

TWindowTileHorizontal arranges MDI child forms so that they are all the same size, tiled horizontally.

TWindowTileVertical

TWindowTileVertical arranges MDI child forms so that they are all the same size, tiled vertically.


StdCtrls unit

Other objects and components, by unit

TBiDiComboBoxEx

TBiDiComboBoxEx is the base class for extended combo box components that support right-to-left character sets.

TButton

TButton is a push button control.

TButtonActionLink

TButtonActionLink is an action link designed specifically for button control clients.

TButtonControl

TButtonControl is the base class for objects that represent Windows button controls.

TCheckBox

TCheckBox represents a check box that can be on (checked) or off (unchecked)

TComboBox

TComboBox combines an edit box with a scrollable list.

TComboBoxEx

TComboBoxEx represents a combo box that supports extended combo box features such as images on the list entries.

TCustomCheckBox

TCustomCheckBox is the ancestor of all check-box components.

TCustomCombo

TCustomCombo is the base class for all combo boxes.

TCustomComboBox

TCustomComboBox is the base class for combobox components.

TCustomComboBoxEx

TCustomComboBoxEx is the base class for combo box components that support extended combo box features such as images on the list entries.

TCustomComboBoxStrings

TCustomComboBoxStrings represents the strings in the drop-down list of a combo box.

TCustomEdit

TCustomEdit is the base class from which all edit-box and memo controls are derived.

TCustomGroupBox

TCustomGroupBox is the base class for all group-box components.

TCustomLabel

TCustomLabel is the base class for non-windowed controls that display text  on a form.

TCustomListBox

TCustomListBox is the base class for listbox objects that are wrappers for list box controls.

TCustomMemo

TCustomMemo is the base type for memo components, which are multiline edit boxes, including TMemo and TDBMemo.

TCustomStaticText

TCustomStaticText is the base class for TStaticText.

TEdit

TEdit is a wrapper for a Windows single-line edit control.

TGroupBox

TGroupBox represents a Windows group box.

TLabel

TLabel is a nonwindowed control that displays text  on a form.

TListBox

TListBox is a wrapper for a Windows list box control.

TMemo

TMemo is a wrapper for a Windows multiline edit control.

TRadioButton

TRadioButton is a wrapper for a system radio button.

TScrollBar

TScrollBar is a Windows scroll bar, which is used to scroll the contents of a window, form, or control.

TStaticText

TStaticText is a windowed control that displays text on a form.


SvcMgr unit

SvcMgr routines

Other objects and components, by unit

TDependencies

TDependencies is a container for TDependency objects.

TDependency

TDependency object represents a dependent service or load ordering group used by TService objects.

TService

TService encapsulates a Windows NT service.

TServiceApplication

TServiceApplication encapsulates a Windows NT service application.

TServiceThread

TServiceThread represents the thread associated with a specific service (TService object).


SyncObjs unit

Other objects and components, by unit

TCriticalSection

TCriticalSection allows a thread in a multi-threaded application to temporarily block other threads from accessing a block of code.

TEvent

TEvent represents an external event.

THandleObject

THandleObject is the base class for all thread synchronization objects that use a handle.

TSimpleEvent

TSimpleEvent represents an unnamed manual event object.

TSynchroObject

TSynchroObject is the base class for all thread synchronization objects.


System unit

System routines

Other objects and components, by unit

IInterface

IInterface is the base class for all Object Pascal interfaces.

IInvokable

IInvokable is the base class for invokable interfaces.

IUnknown

IUnknown is the base class COM interfaces.

TAggregatedObject

TAggregatedObject provides the functionality for an inner object of an aggregate by implementing the IInterface methods to delegate to the controlling IInterface.

TContainedObject

TContainedObject implements the IInterface interface as an inner object in an aggregate.

TInterfacedObject

TInterfacedObject implements the IInterface (IUnknown) interface and can be used as a base for simple COM-compatible classes that benefit from having the IInterface methods implemented.

TObject

TObject is the ultimate ancestor of all VCL objects and components.


SysUtils unit

SysUtils routines

Other objects and components, by unit

EAbort

EAbort is the exception class for errors that should not display an error message dialog box.

EAbstractError

EAbstractError is the exception class for attempts to call an abstract method.

EAccessViolation

EAccessViolation is the exception class for invalid memory access errors.

EAssertionFailed

EAssertionFailed is the exception class for Assert procedures performed on Boolean expressions that return False.

EControlC

EControlC is the exception class for Ctrl+C key presses in console applications.

EConversionError

EConversionError is the exception class for measurement conversion errors.

EConvertError

EConvertError is the exception class for string and object conversion errors.

EDivByZero

EDivByZero is the exception class for integer divide-by-zero errors.

EExternal

EExternal is the exception class that captures Windows exception records.

EExternalException

EExternalException is the exception class for invalid exception codes.

EHeapException

EHeapException is the exception class for errors related to heap-allocated memory.

EInOutError

EInOutError is the exception class for file input/output errors.

EIntError

EIntError is the base class for integer math error exceptions.

EIntfCastError

EIntfCastError is the exception class for interface casting errors.

EIntOverflow

EIntOverflow is the exception class for integer calculations whose results are too large to fit in the allocated register.

EInvalidCast

EInvalidCast is the exception class for typecasting errors.

EInvalidOp

EInvalidOp is the exception class for undefined floating-point operations.

EInvalidPointer

EInvalidPointer is the exception class for invalid pointer operations.

EMathError

EMathError is the base exception class for floating-point math errors.

EOSError

EOSError is the exception class for operating system errors.

EOutOfMemory

EOutOfMemory is the exception class for unsuccessful attempts to allocate memory.

EOverflow

EOverflow is the exception class for floating-point register overflows.

EPackageError

EPackageError is the exception class for package-related errors.

EPrivilege

EPrivilege is the exception class for processor privilege violations.

EPropReadOnly

EPropReadOnly is the exception class for invalid attempts to write to a property using OLE automation.

EPropWriteOnly

EPropWriteOnly is the exception class for invalid attempts to read a property using OLE automation.

ERangeError

ERangeError is the exception class for integer values that are too large for the declared type to which they are assigned.

ESafecallException

ESafecallException is the exception for problems with the safecall calling convention.

EStackOverflow

EStackOverflow is the exception class for stack overflows.

EUnderflow

EUnderflow is the exception class for values that are too small to be represented with a floating-point variable.

EVariantError

EVariantError is the exception class for errors involving Variant data types.

EWin32Error

EWin32Error is the exception class for Windows errors.

Exception

Exception is the base class for all runtime exceptions.

EZeroDivide

EZeroDivide is the exception class for floating-point divide-by-zero errors.

TLanguages

TLanguages lists all available Windows locales.

TMultiReadExclusiveWriteSynchronizer

TMultiReadExclusiveWriteSynchronizer protects memory in a multi-threaded application.


Tabnotbk unit

Other objects and components, by unit

TTabbedNotebook

TTabbedNotebook contains multiple pages, each with its own set of controls.


Tabs unit

Other objects and components, by unit

TScroller

TScroller is a horizontal scrolling control that provides basic horizontal scrolling capabilities.

TTabSet

The TTabSet component presents horizontal tabs users can click to initiate actions.


ToolWin unit

Other objects and components, by unit

TToolDockForm

TToolDockForm is a default floating dock site class for tool buttons.

TToolDockObject

Handles drag-and-dock operations for toolbar controls.

TToolWindow

TToolWindow is the ancestor for windowed controls that require a custom client area and edge borders.


TypeTrans unit

Other objects and components, by unit

ETypeTransException

ETypeTransException is the exception raised when a conversion between a SOAP type description and an Object Pascal type fails.


TypInfo unit

TypInfo routines

Other objects and components, by unit

EPropertyConvertError

EPropertyConvertError is the exception class for type errors when attempting to get or set the value of a property.

EPropertyError

EPropertyError is the exception class for unsuccessful attempts to set the value of a property.

TPublishableVariantType

TPublishableVariantType is the base class for custom Variant types that surface the published properties of an object that represents the Variant’s data.


Valedit unit

Other objects and components, by unit

TItemProp

TItemProp configures how users can edit the item values in a value list editor.

TValueListEditor

TValueListEditor provides a simple way to edit string lists that contain name/value pairs.


Variants unit

Variants routines

Other objects and components, by unit

TCustomVariantType

TCustomVariantType is the base class for custom variant types.

TInvokeableVariantType

TInvokeableVariantType is the base class for custom Variant types that implement custom Variants with properties and methods.


VCLCom unit

Other objects and components, by unit

TComponentFactory

TComponentFactory is the class factory for creating instances of Delphi components that support interfaces.


WebAdapt unit

Other objects and components, by unit

EAdapterException

EAdapterFieldException

TAdapter

Adapter is used to define a scriptable interface to events handlers in your application that return data items or execute commands.

TAdapterAction

AdapterAction is an adapter action that calls event handlers to execute and retrieve parameters.

TAdapterDefaultActions

TAdapterDefaultFields

TAdapterEndUserField

TAdapterEndUserLoggedInField

TAdapterError

TAdapterErrorsList

TAdapterField

TAdapterFields

TAdapterGotoPageAction

TAdapterLoginField

rovides a scriptable interface to the data associated with the login adapter.

TAdapterMemoField

TAdapterNamedField

AdapterNamedField is the base class for Adapter fields.

TAdapterNextPageAction

he TAdapterNextPageAction navigates to the next page of data.

TAdapterNextPageField

TAdapterPasswordField

AdapterPasswordField manages the password entered into a login form.

TAdapterPrevPageAction

AdapterPrevPageAction navigates to the previous page of data.

TApplicationAdapter

ApplicationAdapter is a container for field and action components that are available through the Application script variable.

TBaseAdapterAction

TBaseAdapterMultiValueField

BaseAdapterMultiValueField is a base class for Adapter fields that can contain multiple values.

TCustomAdapterAction

CustomAdapterAction is the base class for adapter actions that can be added to any adapter.

TCustomAdapterMultiValueField

TCustomAdapterPageAction

TCustomApplicationAdapter

TCustomApplicationAdapterAction

CustomApplicationAdapterAction is a base class for application adapter actions.

TCustomLoginFormAdapterAction

CustomLoginFormAction is the base class for TLoginFormAdapter actions.

TEndUserAdapter

he TEndUserAdapter provides information about the current end user such as the user name, user ID, and whether the user is logged in. The TEndUserAdapter also performs login and logout actions on behalf of the end user. TEndUserAdapter calls event handler to retrieve user information and execute user actions.

TEndUserSessionAdapter

he TEndUserSessionAdapter provides information about the current end user such as the user name, user ID, and whether the user is logged in. The TEndUserSessionAdapter also performs login and logout actions on behalf of the end user. TEndUserSessionAdapter uses the TSessionsService component to store information about the current end user. The WebSnap application must contain a TSessionsService component (or equivalent) in order for the TEndUserSessionsAdapter to work properly.

TLoginFormAdapter

he TLoginFormAdapter contains the adapter fields and adapter actions used to generate a login form.

TLoginFormAdapterLoginAction

LoginFormAdapterLoginAction logs the end user in.

TPagedAdapter

he TPagedAdapter component provides a way to show a large amount of data and split it up into several pages, each showing a portion of the records.

TStringsValuesList

he TStringsValuesList is an adapter component that provides a list of name/value pairs defined by items in a TStrings property.

TUpdateFileList

he TUpdateFileList contains a list of files that have been uploaded during the execution of an adapter action. It is used while updating and validating the adapter field receiving the files.

TValuesListNameField

ValuesListNameField is a default field of a list values adapter such as TStringsValuesList. It is used to access the name of an item in the adapter’s list.

TValuesListValueField

ValuesListValueField is a default field of a list values adapter such as TStringsValuesList. It is used to access the value of an item in the adapter’s list.


WebBrokerSoap unit

Other objects and components, by unit

THTTPSoapDispatcher

THTTPSoapDispatcher responds to SOAP messages by forwarding them to an invoker for interpretation.


WebBroker unit

WebBroker routines

Other objects and components, by unit

TWebApplication

TWebApplication encapsulates a Web server application.


WebCntxt unit

Other objects and components, by unit

TAbstractAdapterRequest

TAbstractAdapterResponse


WebComp unit

Other objects and components, by unit

ILayoutWebContent

ILayoutWebContent lets child Web items adhere to layout rules imposed by their parent.

IWebComponent

IWebComponent is the interface supported by components that TWebComponentList manages.

IWebComponentEditor

IWebComponentEditor enables a Web item to be assigned children in the Web Page editor.

IWebContent

IWebContent is an interface that allows components page producers and Web items to access the HTML generated by other components.

TLayoutAttributes

TLayoutAttributes describes how an HTML control should be laid out.

TWebComponentList

TWebComponentList maintains a list of Web item components.

TWebContainedComponent

TWebContainedComponent is the base class for Web items that generate HTML on behalf of another component.

TWebContainedComponentHelper

TWebContainedComponentHelper implements the common behavior of components that generate HTML on behalf of another component.

TWebContainedContainerComponent

TWebContainedContainerComponent is the base class for Web items that generate HTML on behalf of another component and also use Web items to generate HTML.

TWebContainerComponentHelper

TWebContainerComponentHelper implements the common behavior of components that maintain a list of Web items to generate HTML.

TWebContentOptions

TWebContentOptions controls what a Web item can include in its generated HTML.


WebContnrs unit

Other objects and components, by unit

ENamedVariantsError

TAbstractNamedVariants

TNamedVariantsList

NamedVariantsList does something.


WebDisp unit

Other objects and components, by unit

ESessionException

TAdapterDispatcher

he TAdapterDispatcher automatically handles HTML form submissions and requests for dynamic images by calling adapter action and field components.

TAdapterDispatchParams

TBaseRequestHandler

he TBaseRequestHandler component is a base class for WebSnap dispatcher components.

TCustomAdapterDispatcher

TLocateFileService

LocateFileService is used to control the access of templates and server-side script include files at runtime.

TWebAppComponents

WebAppComponents holds the application components that provide the WebSnap application’s functionality.


WebFact unit

Other objects and components, by unit

TBaseWebPageInfo

BaseWebPageInfo stores information about a page registered with a Web page module factory.

TWebAppDataModuleFactory

WebAppDataModule is the factory object for WebSnap application data modules.

TWebDataModuleFactory

WebDataModuleFactory is the factory class for WebSnap data modules.

TWebPageInfo

WebPageInfo describes a WebSnap page.

TWebPageModuleFactory

WebPageModuleFactory is the factory class for WebSnap page modules.


WebForm unit

Other objects and components, by unit

TAdapterActionButton

TAdapterCommandColumn

TAdapterControlGroup

AdapterControlGroup is a container for Adapter display field components such as TAdapterDisplayField or TAdapterDisplayColumn.

TAdapterDataDisplay

TAdapterDisplayColumn

AdapterDisplayColumn displays an Adapter field in a grid.

TAdapterDisplayField

AdapterDisplayFields displays an Adapter field in a as a form field.

TAdapterDisplayReferenceGroup

TAdapterFieldGroup

AdapterFieldGroup is a container for Adapter display field components such as TAdapterDisplayField.  TAdapterFieldGroup labels and fields in an HTML form.

TAdapterForm

AdapterForm generates an HTML form displaying Adapter fields.

TAdapterGrid

AdapterGrid is a container for Adapter display field components such as TAdapterDisplayColumn.  TAdapterGrid generates an HTML table.

TCustomAdapterActionButton

CustomAdapterActionButton is something.

TCustomAdapterCommandColumn

CustomAdapterCommandColumn is something.

TCustomAdapterCommandGroup

CustomAdapterCommandGroup is the base class for TAdapterCommandGroup.

TCustomAdapterDisplayColumn

CustomAdapterDisplayColumn does something.

TCustomAdapterDisplayField

CustomAdapterDisplayField does something.

TCustomAdapterErrorList

CustomAdapterErrorList is something.

TCustomAdapterFieldGroup

CustomAdapterFieldGroup is something.

TCustomAdapterForm

CustomAdapterForm is something.

TCustomAdapterGrid

CustomAdapterGrid is the base class for Web items that generate an HTML table to display a datasetin an XML data packet or web application.


WebModu unit

Other objects and components, by unit

TCustomWebAppDataModule

CustomWebAppDataModule is the base class from which to derive new WebSnap application data modules.

TWebAppDataModule

he TWebAppDataModule is used as the WebSnap application module when there is no need to generate a page.

TWebAppPageModule

he TWebAppPageModule is used as the WebSnap application module when the application module generates a page.

TWebDataModule

he TWebDataModule is a container for components in a WebSnap application.

TWebPageModule

he TWebPageModule is a WebSnap module that generates a page.


WebNode unit

Other objects and components, by unit

IWebNode

IWebNode is the interface for executing invokable interface calls from the client of a Web Service.


WebReq unit

Other objects and components, by unit

TWebModuleList

ontainer for WebSnap module instances.

TWebRequestHandler

TWebRequestHandler assigns request objects to web modules


WebScript unit

Other objects and components, by unit

EActiveScriptError


WebSess unit

Other objects and components, by unit

TSessionsService

he TSessionsService is used to store end user data that is needed for a short period of time. For example, the TSessionsService can be used to keep track of all users that are currently logged in and automatically log a user out after a period of inactivity.


WebUsers unit

Other objects and components, by unit

EUserIDNotFoundException

EValidateUserException

TCustomWebUserList

he TCustomWebUserList component uses a TWebUserItems object to store the account information about a collection of users.


WebUser unit

Other objects and components, by unit

TWebUserItem

he TWebUserItem stores the user identification, password, and access rights for a single user.

TWebUserItems

WebUserItems stores multiple sets of user information.

TWebUserList

WebUserList is used to validate login and to check access rights for a particular user.


WSDLBind unit

Other objects and components, by unit

TWSDLDocument

TWSDLDocument represents a WSDL document.


WSDLIntf unit

Other objects and components, by unit

TWideStrings

TWideStrings represents a list of WideString values.


WSDLItems unit

Other objects and components, by unit

TWSDLItems

TWSDLItems represents the definitions in a WSDL document.


WSDLNode unit

Other objects and components, by unit

TWSDLView

TWSDLView represents a specific binding and operation in a WSDL document.


WSDLPub unit

Other objects and components, by unit

TWSDLHTMLPublish

TWSDLHTMLPublish publishes a list of WSDL documents describing a Web Services application.


XMLBrokr unit

Other objects and components, by unit

TXMLBroker

TXMLBroker fetches XML data packets from an application server and applies XML updates to the application server.

TXMLParams

TXMLParams manages a list of parameters for an XML broker.


XMLDoc unit

XMLDoc routines

Other objects and components, by unit

TDOMVendorList

TDOMVendorList represents a collection of available DOM implementations.

TXMLDocument

TXMLDocument represents an XML document.

TXMLNode

TXMLNode represents a node in an XML document.

TXMLNodeCollection

TXMLNodeCollection represents a node in an XML document whose children are instances of the same repeating element.

TXMLNodeList

TXMLNodeList represents a set of nodes in an XML document.


XMLDOM unit

XMLDOM routines

Other objects and components, by unit

IDOMNode

IDOMNode is the DOM interface for a node in an XML document.

TDOMVendor

TDOMVendor is the abstract base class for components that provide access to a DOM implementation.


XMLIntf unit

Other objects and components, by unit

EXMLDocError

EXMLDocError is the exception class for errors editing or parsing an XML document.

IXMLDocument

IXMLDocument represents an XML document.

IXMLNode

IXMLNode is the interface for a node in an XML document.

IXMLNodeCollection

IXMLNodeCollection is the interface for a set of child nodes that are all the same type.

IXMLNodeList

IXMLNodeList represents a set of nodes in an XML document.


Xmlxform unit

Other objects and components, by unit

TranslateException

TranslateException is the exception class for errors that occur when converting an XML document to a data packet or a data packet to an XML document.

TXMLTransform

TXMLTransform converts an XML document into a data packet or an XML data packet into an XML document with another structure.

TXMLTransformClient

TXMLTransformClient acts as an adapter between an XML document and a provider component.

TXMLTransformProvider

TXMLTransformProvider provides data from and resolves updates to an XML document.


XSBuiltIns unit

XSBuiltIns routines

Other objects and components, by unit

EXSDateTimeException

EXSDateTimeException is the exception class for errors encountered by the remotable objects that represent XML schema date and time values.

TXSCustomDateTime

TXSCustomDateTime is the base class for classes that represent both date and time values for an invokable interface.

TXSDate

TXSDate implements the XML schema date type so that it can be used on invokable interfaces.

TXSDateTime

TXSDateTime implements the XML schema datetime type so that it can be used on invokable interfaces.

TXSDuration

TXSDuration implements the XML schema duration type so that it can be used on invokable interfaces.

TXSTime

TXSTime implements the XML schema time type so that it can be used on invokable interfaces.


XSLProd unit

Other objects and components, by unit

TXSLPageProducer

he TXSLPageProducer generates web page content by transforming data described with XML (Extensible Markup Language) using an XSL (Extensible Stylesheet Language) template.


Action support

Other routines, by category

Other routines, by unit

CreateAction function

Creates an action of a specified type.

EnumRegisteredActions procedure

Iterates through the list of registered actions, passing them to a user-defined callback.

RegisterActions procedure

Registers action classes so that they appear in the list of predefined actions in the action list editor or customize dialog.

UnRegisterActions procedure

Unregisters a set of actions.


Application-level information

Other routines, by category

Other routines, by unit

Application variable (for standard applications)

Represents application-level information.

CmdShow variable

CmdShow is passed to the Windows ShowWindow WinAPI routine.

ExitProcessProc variable

ExitProcessProc specifies the last procedure to execute before the application shuts down.

HInstance variable

HintWindowClass variable

Specifies the class for the window used to display help hints.

InitProc variable

InitProc is the last installed initialization procedure.

IsConsole variable

Indicates whether the module was compiled as a console application.

IsLibrary variable

Indicates whether the module is a DLL.

JITEnable variable

Controls when the just-in-time debugger is called.

Languages function

Lists the locales for which support is available.

MainInstance variable

The instance handle for the main executable.

MainThreadID variable

The instance handle for the current module's main thread of execution.

NoErrMsg variable

Controls whether the application displays an error message when a runtime error occurs.

PopupList variable

Provides centralized handling of Windows messages directed at popup menus.

Screen variable

Represents a screen device.

Win32Platform variable

Specifies the Win32 platform identifier.


Arithmetic routines

Other routines, by category

Other routines, by unit

Abs function

Returns an absolute value.

Ceil function

Rounds variables up toward positive infinity.

CompareValue function

Returns the relationship between two numeric values.

DivMod procedure

Returns the result of an integer division, including the remainder.

EnsureRange function

Returns the closest value to a specified value within a specified range.

Exp function

Returns the exponential of X.

Floor function

Rounds variables toward negative infinity.

Frac function

Returns the fractional part of a real number.

Frexp procedure

Separates the Mantissa and Exponent of X

Infinity constant

Represents positive infinity.

InRange function

Indicates whether a value falls within a specified range.

Int function

Returns the integer part of a real number.

IntPower function

Calculates the integral power of a base value.

IsInfinite function

Indicates when a variable or expression represents an infinite value.

IsNan function

Indicates when a variable or expression does not evaluate to a numeric value.

IsZero function

Indicates when a floating-point variable or expression evaluates to zero, or very close to zero.

Ldexp function

Calculates X * (2**P)

Ln function

Returns the natural log of a real expression.

LnXP1 function

Returns the natural log of (X+1)

Log10 function

Calculates log base 10.

Log2 function

Calculates log base 2.

LogN function

Calculates the log of X for a specified base.

Max function

Returns the greater of two numeric values.

Min function

Returns the lesser of two numeric values.

NaN constant

Represents a value that is not a number.

NegInfinity constant

Represents negative infinity.

Pi function

Returns 3.1415926535897932385.

Poly function

Evaluates a uniform polynomial of one variable at the value X.

Power function

Raises Base to any power.

Round function

Returns the value of X rounded to the nearest whole number.

RoundTo function

Rounds a floating-point value to a specified digit or power of ten using “Banker’s rounding”.

SameValue function

Indicates whether two floating-point values are (approximately) equal.

Sign function

Indicates whether a numeric value is positive, negative, or zero.

SimpleRoundTo function

Rounds a floating-point value to a specified digit or power of ten using asymmetric arithmetic rounding.

Sqr function

Returns the square of a number.

Sqrt function

Returns the square root of X.

Trunc function

Truncates a real number to an integer.


Backward compatibility routines

Other routines, by category

Other routines, by unit

AddExitProc procedure

Add procedure to exit list.

AppendStr procedure

Appends a dynamically allocated string to an existing string.

AssignStr procedure

Assigns a new dynamically allocated string to a specified pointer.

Close procedure

Terminates the association between a file variable and an external file.

DisposeStr procedure

Disposes of a string pointer that was allocated using NewStr.

ExitCode variable

Contains the application's exit code.

LoadStr function

Loads a string from the application's executable file.

NewStr function

Allocates a string on the heap.

StrAlloc function

Allocates a buffer for a null-terminated string and returns a pointer to its first character.

StrBufSize function

Returns the maximum number of characters that can be stored in a buffer allocated by StrAlloc.

StrDispose procedure

Disposes of a string.

StrNew function

Allocates space on and copies a string to the heap; returning a pointer to the string.

StrPas function

Converts null-terminated string to a Pascal string.

Swap function

Exchanges high order byte with the low order byte of an integer or word.


BCD support

Other routines, by category

Other routines, by unit

NullBcd constant

Adds two TBcd values.

StrToBcd function

Converts a string to the corresponding binary-coded decimal (BCD) value.

TryStrToBcd function

Converts a string to the corresponding binary-coded decimal (BCD) value.


BiDiMode support routines

Other routines, by category

Other routines, by unit

DBUseRightToLeftAlignment function

Indicates whether a data-aware control’s alignment is reversed to a right-to-left mode.


Business and finance routines

Other routines, by category

Other routines, by unit

DoubleDecliningBalance function

Calculates the depreciation of an asset using the double-declining balance method.

FutureValue function

Calculates the future value of an investment.

InterestPayment function

Calculates the interest portion of a loan payment.

InterestRate function

Returns the interest rate required to increase PresentValue to FutureValue.

InternalRateOfReturn function

Calculates the internal rate of return for an investment.

NetPresentValue function

Calculates the current value from an array of estimated cash flow values.

NumberOfPeriods function

Returns the number of payment periods for an investment.

Payment function

Calculates a fully amortized payment.

PeriodPayment function

Returns the principal amount from a full payment.

PresentValue function

Calculates the present value of an investment.

SLNDepreciation function

Returns the straight-line depreciation allowance of an asset.

SYDDepreciation function

Calculates depreciation for an asset.


Character manipulation routines

Other routines, by category

Other routines, by unit

Chr function

Returns the character for a specified ASCII value.

FillChar procedure

Fills contiguous bytes with a specified value.

UpCase function

Converts a character to uppercase.


Character set conversions

Other routines, by category

Other routines, by unit

AnsiToUtf8 function

Converts a string encoded in Ansi to UTF-8.

PUCS4Chars function

Converts a UCS4 string to an null-terminated array of UCS4 characters.

StringToWideChar function

Returns a UNICODE string from a Pascal string.

UCS4StringToWideString function

Converts a string of 4-byte Unicode characters into a WideString value.

UnicodeToUtf8 function

Converts a string of Unicode characters into a UTF-8 string.

Utf8Decode function

Converts a UTF8 string to a Unicode string (WideString).

Utf8Encode function

Converts a WideString value to a UTF8 string.

Utf8ToAnsi function

Converts a UTF8 string to a string of Ansi characters.

Utf8ToUnicode function

Converts a string of UTF-8 characters to a Unicode string.

WideCharLenToString function

Converts Unicode characters to single or multi byte character data.

WideCharLenToStrVar procedure

WideCharLenToStrVar converts Unicode characters to single or multi byte character data.

WideCharToString function

Converts null-terminated Unicode string to single or multi byte character data.

WideCharToStrVar procedure

Converts Unicode string to a single or multi byte character data.

WideStringToUCS4String function

Converts a WideString value to a string of 4-byte Unicode characters.


Clipboard routines

Other routines, by category

Other routines, by unit

Clipboard function

Returns an instance of TClipboard.

SetClipboard function

Replaces the single global clipboard instance with another clipboard object.


COM utilities

Other routines, by category

Other routines, by unit

ClassIDToProgID function

Returns the programmatic ID for a specified class given its class ID (CLSID).

CoInitFlags variable

Specifies the level of threading support requested for a COM server .EXE.

ComClassManager function

Returns a TComClassManager object.

ComServer variable

Provides class and registry information about server objects.

CreateClassID function

CreateClassID generates a new GUID and returns it as a string.

CreateComObject function

Instantiates a single instance of a COM object.

CreateOleObject function

Instantiates a single instance of an Automation object.

CreateRegKey procedure

Creates or opens a registry key that is a subkey of HKEY_CLASSES_ROOT.

CreateRemoteComObject function

Creates a Com object on another machine and returns an IUnknown interface for it.

CreateSharedPropertyGroup function

Returns the interface for a SharedPropertyGroup that allows MTS objects within a server process to share state.

CreateTransactionContextEx function

Returns an interface for a new shared property group manager that creates and coordinates shared properties of MTS objects.

CreateVCLComObjectProc variable

Specifies a procedure that creates a COM object associated with a component.

DeleteRegKey procedure

Deletes a single key that is a subkey of HKEY_CLASSES_ROOT from the system registry.

DLLCanUnloadNow function

Tells Windows whether it can unload the in-process server exporting this function.

DllGetClassObject function

Obtains a class factory for an ActiveX object when the ActiveX object resides in an in-process ActiveX server (DLL).

DllRegisterServer function

Registers an in-process ActiveX server in the current module within the system registry.

DllUnregisterServer function

Unregisters an OLE automation server in the current module with the system registry.

EmptyParam variable

Specifies that an optional parameter on a dual interface is not used.

EnumDispatchProperties procedure

Fills a TStringList will all the property names and DispIDs in a specified IDispatch interface.

FontToOleFont function

Returns a Variant containing an IFontDispatch interface that represents a TFont object.

GetActiveOleObject function

Retrieves a reference to an IDispatch interface to a currently running, registered COM object.

GetDispatchPropValue function

Returns the value of a property on an IDispatch interface.

GetOleFont procedure

Creates an OLE font object that is directly mapped to a native TFont.

GetOlePicture procedure

Creates an OLE picture object that is directly mapped to a native TPicture.

GetOleStrings procedure

Implements a TStrings object as an IStrings interface for use by OLE objects.

GetRegStringValue function

Retrieves a value stored under a subkey of HKEY_CLASSES_ROOT from the system registry.

InterfaceConnect procedure

Connects an IConnectionPoint interface.

InterfaceDisconnect procedure

Disconnects an IConnectionPoint interface connection that was previously made by the InterfaceConnect procedure.

OleCheck procedure

Throws an EOleSysError exception if the result code indicates an error.

OleError procedure

Raises an EOleSysError exception.

OleFontToFont procedure

Fills in a TFont structure to represent an IFontDispatch.

OleStrToString function

Copies data received from a COM interface to a string.

OleStrToStrVar procedure

Copies a string from its COM representation to an existing Pascal string.

ParkingWindow function

Provides a temporary parent window for activeX controls when the container is not ready to act as a parent.

ProgIDToClassID function

Returns the class ID (CLSID) TGUID that corresponds to the string specified as the ProgID parameter.

RegisterAsService procedure

Registers an in-process COM server with the operating system.

SafeRef function

Returns a reference to a transactional object that is safe to pass outside its context.

SetDispatchPropValue procedure

Sets the value of a property on an IDispatch interface.

SetOleFont procedure

Connects an OLE font object to a TFont object and copies the properties of the OLE font object to the TFont.

SetOlePicture procedure

Connects an OLE picture object to a TPicture object, and copies the properties of the OLE picture object to the TPicture.

SetOleStrings procedure

Uses an IStrings interface to assign the contents of a TStrings object.

StringToOleStr function

Allocates memory and copies a string to the OLE format.

Supports function

Indicates whether a given object or interface supports a specified interface.

VarDispProc variable

Provides the support for IDispatch-based Automation.


Command line utilities

Other routines, by category

Other routines, by unit

CmdLine variable

CmdLine is a pointer to the command-line arguments specified when the application is invoked.

FindCmdLineSwitch function

Determines whether a string was passed as a command line argument to the application.

ParamCount function

Returns the number of parameters passed on the command line.

ParamStr function

Returns a specified parameter from the command-line.


Comparison routines

Other routines, by category

Other routines, by unit

CollectionsEqual function

Compares the contents of two collections.

CompareMem function

Performs a binary comparison of two memory images.

EqualRect function

Indicates whether two TRect values are the same.


Complex numbers

Other routines, by category

Other routines, by unit

ComplexNumberSymbol variable

Indicates the symbol used to represent the imaginary part of a complex number.

ComplexNumberSymbolBeforeImaginary variable

Indicates the placement of the symbol that represents the imaginary part of a complex number.

VarComplexAbs function

Returns the absolute value of a complex number.

VarComplexAbsSqr function

Returns the square of the absolute value of a complex number.

VarComplexAngle function

Returns the angle made by a complex number.

VarComplexArcCos function

Returns the inverse cosine of a complex number.

VarComplexArcCosH function

Returns the hyperbolic inverse cosine of a complex number.

VarComplexArcCot function

Returns the inverse cotangent of a complex number.

VarComplexArcCsc function

Returns the hyperbolic inverse cotangent of a complex number.

VarComplexArcCscH function

Returns the hyperbolic inverse cosecant of a complex number.

VarComplexArcSec function

Returns the inverse secant of a complex number.

VarComplexArcSecH function

Returns the hyperbolic inverse secant of a complex number.

VarComplexArcSin function

Returns the inverse sine of a complex number.

VarComplexArcSinH function

Returns the hyperbolic inverse sine of a complex number.

VarComplexArcTan function

Returns the inverse tangent of a complex number.

VarComplexArcTanH function

Returns the hyperbolic inverse tangent of a complex number.

VarComplexConjugate function

Returns the conjugate of a complex number.

VarComplexCos function

Returns the cosine of a complex number.

VarComplexCosH function

Returns the hyperbolic cosine of a complex number.

VarComplexCot function

Returns the cotangent of a complex number.

VarComplexCreate function

Returns the hyperbolic cotangent of a complex number.

VarComplexCsc function

Returns the cosecant of a complex number.

VarComplexCscH function

Returns the hyperbolic cosecant of a complex number.

VarComplexExp function

Returns the exponential of a complex number.

VarComplexFromPolar function

Converts a set of polar coordinates to a complex number.

VarComplexInverse function

Returns the inverse of a complex number.

VarComplexLn function

Returns the natural log of a complex number.

VarComplexPower function

Returns the value of a complex number raised to a specified power.

VarComplexSec function

Returns the secant of a complex number.

VarComplexSecH function

Returns the hyperbolic secant of a complex number.

VarComplexSin function

Returns the sine of a complex number.

VarComplexSinH function

Returns the hyperbolic sine of a complex number.

VarComplexSqr function

Returns the square of a complex number.

VarComplexSqrt function

Returns the square root of a complex number.

VarComplexTan function

Returns the tangent of a complex number.

VarComplexTanH function

Returns the hyperbolic tangent of a complex number.

VarComplexTimesNegI function

Returns the value of a complex number multiplied by –i.

VarComplexTimesPosI function

Returns the value of a complex number multiplied by i.

VarComplexToPolar procedure

Computes the polar coordinates that correspond to a custom Variant that represents a complex number.


Component registration routines

Other routines, by category

Other routines, by unit

RegisterComponents procedure

Registers a set of components so that they all appear on the same page of the component palette.

RegisterFields procedure

Registers a set of field components so that they appear in the Dataset designer.

RegisterNoIcon procedure

Registers a set of components but does not add them to the component palette.

RegisterNonActiveX procedure

Prevents a set of components from being made available to the ActiveX wizard.


Control panel applications

Other routines, by category

Other routines, by unit

Application variable (for control panel applets)

Represents the application for a control panel applet project.


Cursor management routines

Other routines, by category

Other routines, by unit

CursorToIdent function

Returns the name of the predefined constant that corresponds to a cursor.

CursorToString function

Returns the AnsiString representation of a cursor.

GetCursorValues procedure

Passes the name of every predefined cursor constant to a callback.

IdentToCursor function

Translates a predefined cursor constant into a cursor.

StringToCursor function

Returns a TCursor value given its string representation.


Data Dictionary routines

Other routines, by category

Other routines, by unit

AssociateAttr procedure

Sets up an association between an attribute ID and a field ID.

CreateField function

Creates a new field from information stored in the Data Dictionary.

DictionaryActive function

Indicates whether there is an active Data Dictionary.

DictionaryDeactivate procedure

Deactivates the Data Dictionary.

FindAttrID function

Returns the ID of a specified attribute set.

FindDatabaseID function

Returns the ID of a specified database.

FindFieldID function

Returns the ID of a specified field.

FindTableID function

Returns the ID of a specified table.

GetAttrID function

Returns the ID of the attribute set associated with a field.

GetAttrName function

Returns the name of an attribute set given its ID.

GetAttrNames procedure

Executes a callback for every attribute set name.

GetControlClass function

Returns the class associated with an attribute set.

HasConstraints function

Indicates whether there are any data constraints for a dataset stored in the Data Dictionary.

IsNullID function

Indicates whether a Data Dictionary Identifier is null.

NewAttr function

Creates an attribute set based on the properties of a field component.

QualifyTableName function

Returns the fully qualified name of a table in the Data Dictionary.

QualifyTableNameByName function

Returns the fully qualified name of a table in the Data Dictionary.

UnassociateAttr procedure

Removes the association between an attribute ID and a field ID.

UpdateAttr procedure

Updates an attribute set to match the properties of a field component.

UpdateConstraints procedure

Replaces all imported constraints for a dataset with the current constraints in the Data Dictionary.

UpdateDataset procedure

Updates a dataset and all its field components to match the Data Dictionary.

UpdateField procedure

Updates a field component to match the associated attribute set in the Data Dictionary.


Database routines

Other routines, by category

Other routines, by unit

AnsiToNative function

Converts a string from the ANSI character set to the character set associated with a given locale.

Check procedure

Converts a string from the ANSI character set to the character set associated with a given locale.

DBbiError procedure

Creates and raises an EDBEngineError exception for an error code returned by the Borland Database Engine (BDE).

ExtractFieldName function

Returns the next name in a semicolon-delimited string of field names.

FreeProcParams procedure

Frees a list of procedure parameters that is allocated by GetProcedureParams.

GetDriverNames procedure

Populates a string list with the names of all available dbExpress drivers.

GetFieldProperty function

Returns a TField object for a dataset and data control.

LoadParamListItems procedure

Fills a TParams object with information from a list of parameter descriptors.

NativeCompareStr function

Compares strings based on a database locale case sensitively.

NativeCompareStrBuf function

Compares null-terminated strings based on a database locale case sensitively.

NativeCompareText function

Compares strings based on a database locale without case sensitivity.

NativeCompareTextBuf function

Compares null-terminated strings based on a database locale and is not case sensitive.

NativeToAnsi function

Converts a string from the character set of the given locale to the ANSI character set.

NativeToAnsiBuf procedure

Converts a string from the character set of a specified locale into the ANSI character set.

PasswordDialog function

Displays a dialog box that prompts the user for the password of a local password-protected table.

Session variable

Maintains database components used by an application.

Sessions variable

Provides access to TSessionList methods and properties.

VarTypeToDataType function

Returns the field type value that most closely corresponds to a Variant type.


Date/time routines

Other routines, by category

Other routines, by unit

CheckSqlTimeStamp procedure

Checks whether a TSQLTimeStamp value represents a valid date and time.

CompareDate function

Indicates the relationship between the date portions of two TDateTime values.

CompareDateTime function

Indicates the relationship between two TDateTime values.

CompareTime function

Indicates the relationship between the time portions of two TDateTime values.

CurrentYear function

Creates a new directory.

Date function

Returns the current date.

DateDelta constant

Specifies the difference between TDateTime and TTimeStamp values.

DateOf function

Strips the time portion from a TDateTime value.

DateTimeToFileDate function

Converts a TDateTime object to an OS timestamp.

DateTimeToSQLTimeStamp function

Converts a TDateTime value to a TSQLTimeStamp value.

DateTimeToStr function

Converts a TDateTime value to a string.

DateTimeToString procedure

Converts a TDateTime value to a string using a specified Format.

DateTimeToSystemTime procedure

Converts a TDateTime value into the Win32 API's TSystemTime type.

DateTimeToTimeStamp function

Converts a TDateTime value into the corresponding TTimeStamp value.

DateToStr function

Converts a TDateTime value to a string.

Day of week constants

Provide symbolic constants for ISO 8601-compliant day of the week values.

DayOf function

Returns the day of the month represented by a TDateTime value.

DayOfTheMonth function

Returns the day of the month represented by a TDateTime value.

DayOfTheWeek function

Returns the day of the week represented by a TDateTime value.

DayOfTheYear function

Returns the number of days between a specified TDateTime value and December 31 of the previous year.

DayOfWeek function

Returns the day of the week for a specified date.

DaysBetween function

Returns the number of whole days between two specified TDateTime values.

DaysInAMonth function

Returns the number of days in a specified month of a specified year.

DaysInAYear function

Returns the number of days in a specified year.

DaysInMonth function

Returns the number of days in the month of a specified TDateTime value.

DaysInYear function

Returns the number of days in the year of a specified TDateTime value.

DaySpan function

Returns the number of days (including fractional days) between two specified TDateTime values.

DecodeDate procedure

Returns Year, Month, and Day values for a TDateTime value.

DecodeDateDay procedure

Returns the year and day of the year for a specified TDateTime value.

DecodeDateFully function

Returns Year, Month, and Day, and Day-of-Week values for a TDateTime value.

DecodeDateMonthWeek procedure

Returns the year, month, week of the month, and day of the week for a specified TDateTime value.

DecodeDateTime procedure

Returns Year, Month, Day, Hour, Minute, Second, and MilliSecond values for a TDateTime value.

DecodeDateWeek procedure

Returns the year, week of the year, and day of the week for a specified TDateTime value.

DecodeDayOfWeekInMonth procedure

For a given TDateTime value, returns the year, month, day of the week, and the count of that day of the week in the month.

DecodeTime procedure

Breaks a TDateTime value into hours, minutes, seconds, and milliseconds.

EncodeDate function; TryEncodeDate function

Returns a TDateTime value that represents a specified Year, Month, and Day.

EncodeDateDay function

Returns a TDateTime value that represents a specified day of the year for a specified year.

EncodeDateMonthWeek function

Returns a TDateTime objectvalue that represents a specified day of a specified week in a specified month and year.

EncodeDateTime function

Returns a TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

EncodeDateWeek function

Returns a TDateTime value that represents a specified day of a specified week in a specified year.

EncodeDayOfWeekInMonth function

Returns a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

EncodeTime function;TryEncodeTime function

Returns a TDateTime value for a specified Hour, Min, Sec, and MSec.

EndOfADay function

Returns a TDateTime value that represents the last millisecond of a specified day.

EndOfAMonth function

Returns a TDateTime value that represents the last millisecond of the last day of a specified month.

EndOfAWeek function

Returns a TDateTime value that represents the last millisecond of a specified day of a specified week.

EndOfAYear function

Returns a TDateTime value that represents the last millisecond of a specified year.

EndOfTheDay function

Returns a TDateTime value that represents the last millisecond of the day identified by a specified TDateTime value.

EndOfTheMonth function

Returns a TDateTime value that represents the last millisecond of the last day of the month identified by a specified TDateTime value.

EndOfTheWeek function

Returns a TDateTime value that represents the last millisecond of the last day of the week identified by a specified TDateTime value.

EndOfTheYear function

Returns a TDateTime value that represents the last millisecond of the last day of the year identified by a specified TDateTime value.

FormatDateTime function

Formats a TDateTime value.

HourOf function

Returns the hour of the day represented by a TDateTime value.

HourOfTheDay function

Returns the hour of the day represented by a TDateTime value.

HourOfTheMonth function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the month.

HourOfTheWeek function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the week.

HourOfTheYear function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the year.

HoursBetween function

Returns the number of whole hours between two specified TDateTime values.

HourSpan function

Returns the number of Hours (including fractional Hours) between two specified TDateTime values.

HoursPerDay constant;MinsPerDay constant;SecsPerDay constant;MSecsPerDay constant

Values useful in time calculations.

IncAMonth procedure

Increments date data by one month.

IncDay function

Returns a date shifted by a specified number of days.

IncHour function

Returns a date/time value shifted by a specified number of hours.

IncMilliSecond function

Returns a date/time value shifted by a specified number of milliseconds.

IncMinute function

Returns a date/time value shifted by a specified number of minutes.

IncMonth function

Returns a date shifted by a specified number of months.

IncSecond function

Returns a date/time value shifted by a specified number of seconds.

IncWeek function

Returns a date shifted by a specified number of weeks.

IncYear function

Returns a date shifted by a specified number of years.

IsInLeapYear function

Indicates whether a specified TDateTime value occurs in a leap year.

IsLeapYear function

Indicates whether a specified year is a leap year.

IsPM function

Indicates whether the time portion of a specified TDateTime value occurs after noon.

IsSameDay function

Indicates whether a specified TDateTime value occurs on a the same day as a criterion date.

IsToday function

Indicates whether a specified TDateTime value occurs on the current date.

IsValidDate function

Indicates whether a specified year, month, and day represent a valid date.

IsValidDateDay function

Indicates whether a specified year and day of the year represent a valid date.

IsValidDateMonthWeek function

Indicates whether a specified year, month, week of the month, and day of the week represent a valid date.

IsValidDateTime function

Indicates whether a specified year, month, day, hour, minute, second, and millisecond represent a valid date and time.

IsValidDateWeek function

Indicates whether a specified year, week of the year, and day of the week represent a valid date.

IsValidTime function

Indicates whether a specified hour, minute, second, and millisecond represent a valid date and time.

MilliSecondOf function

Returns the millisecond of the second represented by a TDateTime value.

MilliSecondOfTheDay function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the same day.

MilliSecondOfTheHour function

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same hour.

MilliSecondOfTheMinute function

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same minute.

MilliSecondOfTheMonth function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the month.

MilliSecondOfTheSecond function

Returns the millisecond of the second represented by a TDateTime value.

MilliSecondOfTheWeek function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the week.

MilliSecondOfTheYear function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the year.

MilliSecondsBetween function

Returns the number of milliseconds between two specified TDateTime values.

MilliSecondSpan function

Returns the number of milliseconds between two specified TDateTime values.

MinuteOf function

Returns the minute of the hour represented by a TDateTime value.

MinuteOfTheDay function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the same day.

MinuteOfTheHour function

Returns the number of minutes between a specified TDateTime value and the beginning of the same hour.

MinuteOfTheMonth function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the month.

MinuteOfTheWeek function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the week.

MinuteOfTheYear function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the year.

MinutesBetween function

Returns the number of minutes between two specified TDateTime values.

MinuteSpan function

Returns the number of minutes, including fractions thereof, between two specified TDateTime values.

MonthOf function

Returns the month of the year represented by a TDateTime value.

MonthOfTheYear function

Returns the month of the year represented by a TDateTime value.

MonthsBetween function

Returns the approximate number of months between two specified TDateTime values.

MonthSpan function

Returns the approximate number of months (including fractions thereof) between two specified TDateTime values.

MSecsToTimeStamp function

Converts a specified number of milliseconds into a TTimeStamp value.

Now function

Returns the current date and time.

NthDayOfWeek function

Returns which occurence of its weekday a specified TDateTime value represents.

NullSQLTimeStamp constant

Represents a NULL TSQLTimeStamp value.

RecodeDate function

Replaces the date portion of a specified TDateTime value.

RecodeDateTime function

Selectively replaces parts of a specified TDateTime value.

RecodeDay function

Replaces the day of the month for a specified TDateTime value.

RecodeHour function

Replaces the hour of the day for a specified TDateTime value.

RecodeLeaveFieldAsIs constant

Identifies a parameter to RecodeDateTime that should not be used.

RecodeMilliSecond function

Replaces the millisecond of the second for a specified TDateTime value.

RecodeMinute function

Replaces the minute of the hour for a specified TDateTime value.

RecodeMonth function

Replaces the month of the year for a specified TDateTime value.

RecodeSecond function

Replaces the second of the minute for a specified TDateTime value.

RecodeTime function

Replaces the time portion of a specified TDateTime value.

RecodeYear function

Replaces the year for a specified TDateTime value.

ReplaceDate procedure

Replaces the date portion of a TDateTime value with a specified date.

ReplaceTime procedure

Replaces the time portion of a TDateTime value with a specified time.

SameDate function

Indicates whether two TDateTime values represent the same year, month, and day.

SameDateTime function

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

SameTime function

Indicates whether two TDateTime values represent the same time of day, ignoring the date portion.

SecondOf function

Returns the second of the minute represented by a TDateTime value.

SecondOfTheDay function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the same day.

SecondOfTheHour function

Returns the number of seconds between a specified TDateTime value and the beginning of the same hour.

SecondOfTheMinute function

Returns the number of seconds between a specified TDateTime value and the beginning of the same minute.

SecondOfTheMonth function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the month.

SecondOfTheWeek function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the first day of the week.

SecondOfTheYear function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the year.

SecondsBetween function

Returns the number of seconds between two specified TDateTime values.

SecondSpan function

Returns the number of seconds (including fractions thereof) between two specified TDateTime values.

SQLDayOfWeek function

Indicates the day of the week when a specified TSQLTimeStamp value occurs.

SQLTimeStampToDateTime function

Converts a TSQLTimeStamp value to a TDateTime value.

SQLTimeStampToStr function

Converts a TSQLTimeStamp value to a string.

StartOfADay function

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day.

StartOfAMonth function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified month.

StartOfAWeek function

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day of a specified week.

StartOfAYear function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified year.

StartOfTheDay function

Returns a TDateTime value that represents 12:00:00:00 AM on the day identified by a specified TDateTime value.

StartOfTheMonth function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the month identified by a specified TDateTime value.

StartOfTheWeek function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the week identified by a specified TDateTime value.

StartOfTheYear function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the year identified by a specified TDateTime value.

StrToDate function

Converts a string to a TDateTime value.

StrToDateTime function

Converts a string to a TDateTime value.

StrToSQLTimeStamp function

Converts a string to a TSQLTimeStamp value.

StrToTime function

Converts a string to a TDateTime value.

SystemTimeToDateTime function

Converts a _SYSTEMTIMETSystemTime value into a TDateTime objectvalue.

Time function

Returns the current time.

TimeOf function

Strips the date portion from a TDateTime value.

TimeStampToDateTime function

Converts a TTimeStamp value into the corresponding TDateTime value.

TimeStampToMSecs function

Converts a TTimeStamp value into an absolute number of milliseconds.

TimeToStr function

Returns a string that represents a TDateTime value.

Today function

Returns a TDateTime value that represents the current date.

Tomorrow function

Returns a TDateTime value that represents the following day.

TryEncodeDateDay function

Calculates the TDateTime value that represents a specified day of the year for a specified year.

TryEncodeDateMonthWeek function

Calculates the TDateTime value that represents a specified day of a specified week in a specified month and year.

TryEncodeDateTime function

Calculates the TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

TryEncodeDateWeek function

Calculates the TDateTime value that represents a specified day of a specified week in a specified year.

TryEncodeDayOfWeekInMonth function

Calculates a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

TryRecodeDateTime function

Selectively replaces parts of a specified TDateTime value.

TryStrToSQLTimeStamp function

Converts a string to a TSQLTimeStamp value.

UnixDateDelta constant

Specifies the difference between TDateTime and TIME_T values.

WeekOf function

Returns the week of the year represented by a TDateTime value.

WeekOfTheMonth function

Returns the week of the month represented by a TDateTime value.

WeekOfTheYear function

Returns the week of the year represented by a TDateTime value.

WeeksBetween function

Returns the number of whole weeks between two specified TDateTime values.

WeeksInAYear function

Returns the number of weeks in a specified year.

WeeksInYear function

Returns the number of weeks in the year of a specified TDateTime value.

WeekSpan function

Returns the number of weeks (including fractional weeks) between two specified TDateTime values.

WithinPastDays function

Indicates whether two dates are within a specified number of days of each other.

WithinPastHours function

Indicates whether two date/time values are within a specified number of hours of each other.

WithinPastMilliSeconds function

Indicates whether two date/time values are within a specified number of milliseconds of each other.

WithinPastMinutes function

Indicates whether two date/time values are within a specified number of minutes of each other.

WithinPastMonths function

Indicates whether two date/time values are within a specified number of months of each other.

WithinPastSeconds function

Indicates whether two date/time values are within a specified number of seconds of each other.

WithinPastWeeks function

Indicates whether two date/time values are within a specified number of weeks of each other.

WithinPastYears function

Indicates whether two date/time values are within a specified number of years of each other.

YearOf function

Returns the year represented by a TDateTime value.

YearsBetween function

Returns the approximate number of years between two specified TDateTime values.

YearSpan function

Returns the approximate number of years (including fractions thereof) between two specified TDateTime values.

Yesterday function

Returns a TDateTime value that represents the preceding day.


Design tool registration routines

Other routines, by category

Other routines, by unit

GReferenceExpandable variable

Indicates whether the Object Inspector treats component properties as expandable subproperties.

GShowReadOnlyProps variable

Indicates whether the Object Inspector displays published read-only properties.

RegisterComponentEditor procedure

Registers an editor so that it is available at design time.

RegisterLibraryExpert procedure

Registers an expert so that it is installed when a package is installed.

RegisterPropertyEditor procedure

Allows a component to bring up a custom property editor from the Object Inspector.


Dialog and message routines

Other routines, by category

Other routines, by unit

CreateMessageDialog function

Creates a specified message dialog.

ForceCurrentDirectory variable

Indicates whether open and save dialogs should display the current directory if no initial directory is assigned.

InputBox function

Displays an input dialog box that lets the user enter a string.

InputQuery function

Displays an input dialog box that lets the user enter a string.

IsAbortResult function

Checks the return value from a modal form dialog and indicates whether the user selected Abort or Cancel.

IsAnAllResult function

Checks the return value from a modal form dialog and indicates whether the user selected All, Yes to All, or No to All.

IsNegativeResult function

Checks the return value from a modal form dialog and indicates whether the user selected No or No to All.

IsPositiveResult function

Checks the return value from a modal form dialog and indicates whether the user selected Ok, Yes, Yes to All, or All.

LoginDialog function

Brings up the database Login dialog to allow the user to connect to a database server.

LoginDialogEx function

Brings up the database Login dialog to allow the user to connect to a database server.

MessageDlg function

Displays a message dialog box in the center of the screen.

MessageDlgPos function

Displays a message dialog box at the specified screen coordinates.

MessageDlgPosHelp function

Displays a message dialog box whose help is supplied in a named help file.

PromptForFileName function

Displays an open or save dialog, where the user can specify a file name.

RemoteLoginDialog function

Brings up the database Login dialog to allow the user to connect to a database server.

SelectDirectory function

Brings up a dialog to allow the user to enter a directory name.

ShowMessage procedure

Displays a message box with an OK button.

ShowMessageFmt procedure

Displays a message box with a formatted message.

ShowMessagePos procedure

Displays a message box at a specified location.

StripAllFromResult function

Converts a TModalResult value from a constant that refers to “all” to the corresponding simple constant.


Drag operation support

Other routines, by category

Other routines, by unit

CancelDrag procedure

Cancels a drag-and-drop or drag-and-dock operation that is in progress.

DefaultDockTreeClass variable

Returns the default implementation class for the DockManager property of windowed controls.

FindDragTarget function

Returns the control at a specified screen coordinate.

IsDragObject function

Indicates whether a specified object is a TDragObject descendant.


Dynamic allocation routines

Other routines, by category

Other routines, by unit

Dispose procedure

Releases memory allocated for a dynamic variable.

Finalize procedure

Uninitializes a dynamically allocated variable.

FreeMem procedure

Disposes of a dynamic variable of a given size.

GetMem procedure

Creates a dynamic variable and a pointer to the address of the block.

Initialize procedure

Initializes a dynamically allocated variable.

New procedure

Creates a new dynamic variable and sets P to point to it.


Exception handling routines

Other routines, by category

Other routines, by unit

AcquireExceptionObject function

Allows an exception object to persist after the except clause exits.

DatabaseError procedure

Creates and raises an EDatabaseError exception.

DatabaseErrorFmt procedure

Creates and raises an EDatabaseError exception with a formatted error message.

ErrorAddr variable

Contains the address of a statement causing a runtime error.

ErrorProc variable

Points to the RTL run-time error handler.

ExceptAddr function

Returns the address at which the current exception was raised.

ExceptionErrorMessage function

Formats a standard error message.

ExceptObject function

Returns a reference to the object associated with the current exception.

ExceptProc variable

Points to the lowest-level RTL exception handler.

GetLastError function

Returns the last error reported by an operating system API call.

OutOfMemoryError procedure

Raises an EOutOfMemory exception.

RaiseLastOSError procedure

Raises an exception for the last occurring OS or system library error.

RaiseLastWin32Error procedure

Raises an exception for the last occurring Win32 error.

ReleaseExceptionObject procedure

Decrements the reference count on an exception object that was incremented by a call to AcquireExceptionObject.

SetErrorProc function

Replaces the exception handler for error messages that are received from a Windows socket connection.

ShowException procedure

Displays an exception message with its physical address

SysErrorMessage function

Converts OS error codes into strings.

Win32Check function

Checks the return value of a Windows API call and raises an appropriate exception when it indicates failure.


File management routines

Other routines, by category

Other routines, by unit

AssignFile procedure

Associates the name of an external file with a file variable.

ChDir procedure

Changes the current directory.

CloseFile procedure

Terminates the association between file variable and an external disk file.

CreateDir function

Creates a new directory.

DeleteFile function

Deletes a file from disk.

DirectoryExists function

Determines whether a specified directory exists.

DiskFree function

Returns the number of free bytes on a specified drive.

DiskSize function

Returns the size, in bytes, of a specified drive.

File mode constants

File mode constants are used to open and close disk files.

File open mode constants

File open mode constants are used to control the access mode to a file or stream.

FileAge function

Returns the OS timestamp of a file.

FileClose procedure

Closes a specified file.

FileCreate function

Creates a new file.

FileDateToDateTime function

Converts an OS timestamp value to TDateTime value.

FileExists function

Tests if a specified file exists.

FileGetAttr function

Returns the file attributes of FileName.

FileGetDate function

Returns an OS timestamp for a specified file.

FileIsReadOnly function

Report if file is read-only.

FileOpen function

Opens a specified file using a specified access mode.

FileRead function

Reads a specified number of bytes from a file.

FileSearch function

Searches a specified directory path for a file.

FileSeek function

Repositions read/write point.

FileSetAttr function

Sets the file attributes of a specified file.

FileSetDate function

Sets the OS time stamp for a specified file.

FileWrite function

Writes the contents of a buffer to the current position in a file.

FindClose procedure

Releases memory allocated by FindFirst.

FindFirst function

Searches for the first instance of a file name with a given set of attributes in a specified directory.

FindNext function

Returns the next entry matching the name and attributes specified in a previous call to FindFirst.

ForceDirectories function

Creates a new directory, also creating parents as needed.

GetCurrentDir function

Returns the name of the current directory.

GetDir procedure

Returns the current directory for a specified drive.

RemoveDir function

Deletes an existing empty directory.

RenameFile function

Changes a file name.

SetCurrentDir function

Sets the current directory.


File name utilities

Other routines, by category

Other routines, by unit

ChangeFileExt function

Changes the extension of a file name.

ExcludeTrailingBackslash function

Returns a path name without a trailing delimiter.

ExcludeTrailingPathDelimiter function

Returns a path name without a trailing delimiter.

ExpandFileName function

Returns the full path name for a relative file name.

ExpandUNCFileName function

Returns the full path of a file name in UNC format, if appropriate.

ExtractFileDir function

Extracts the drive and directory parts from FileName.

ExtractFileDrive function

Returns the drive portion of a file name.

ExtractFileExt function

Returns the extension portions of a file name.

ExtractFileName function

Extracts the name and extension parts of a file name.

ExtractFilePath function

Returns the drive and directory portions of a file name.

ExtractRelativePath function

Returns a relative path name, relative to a specific base directory.

ExtractShortPathName function

Converts a file name to the short 8.3 form.

IncludeTrailingBackslash function

Ensures path name ends with delimiter

IncludeTrailingPathDelimiter function

Ensures path name ends with delimiter.

IsPathDelimiter function

Indicates whether the byte at position Index of a string is the path delimiter.

MatchesMask function

Indicates whether a file name conforms to the format specified by a filter string.

MinimizeName function

Shortens a fully qualified path name so that it can be drawn with a specified length limit.

ProcessPath procedure

Parses a file name into its constituent parts.


Floating point conversion routines

Other routines, by category

Other routines, by unit

FloatToCurr function

Converts a floating-point value to a Currency value.

FloatToDecimal procedure

Converts a floating-point value to a TDateTime value.

FloatToStr function

Converts a floating point value to a string.

FloatToStrF function

Converts a floating point value to a string, using a specified Format, Precision, and Digits.

FloatToText function

Converts a floating-point value to an unterminated character string, using a specified Format, Precision and Digits.

FloatToTextFmt function

Converts a floating-point value to to an unterminated character string, using a specified format.

FormatFloat function

Formats a floating point value.

StrToCurr function

Converts a string to a Currency value.

StrToFloat function

Converts a given string to a floating-point value.


Flow control routines

Other routines, by category

Other routines, by unit

Abort procedure

Raises a silent exception.

Break procedure

Causes the flow of control to exit a for, while, or repeat statement.

Continue procedure

Allows the flow of control to proceed to the next iteration of for, while, or repeat statements.

Exit procedure

Exits from the current procedure.

Halt procedure

Initiates abnormal termination of a program.

RunError procedure

Stops execution and generates a run-time error.


FPU control

Other routines, by category

Other routines, by unit

ClearExceptions procedure

Clears any pending exception bits in the status word.

Default8087CW variable

Specifies the Default 8087 control word.

Get8087CW function

Returns the value of the 8087 code word.

GetExceptionMask function

Returns the exception mask from the FPU control word.

GetPrecisionMode function

Returns the FPU precision control mode.

GetRoundMode function

Returns the FPU rounding mode.

Set8087CW procedure

Sets both the control word in the floating point unit and the variable NoErrMsg declared in the system unit.

SetExceptionMask function

Sets the exception mask on the FPU control word.

SetPrecisionMode function

Sets the FPU precision control mode.

SetRoundMode function

Sets the FPU rounding mode.


Geometric routines

Other routines, by category

Other routines, by unit

CenterPoint function

Returns the point in the center of a rectangle.

IntersectRect function

Returns the intersection of two rectangles

InvalidPoint function

Indicates whether a specified point is equal to (-1,-1).

IsRectEmpty function

Indicates wither a specified rectangle has a positive width and height.

PointsEqual function

Indicates whether two points have the same coordinates.

PtInRect function

Indicates whether a specified point lies inside a specified rectangle.

UnionRect function

Returns the union of two rectangles


Graphics utilities

Other routines, by category

Other routines, by unit

CharsetToIdent function

Obtains the name of a character set.

ColorToIdent function

Provides the symbolic name of a TColor value.

ColorToRGB function

Converts a TColor value into an RGB representation of the color.

ColorToString function

Returns a string that represents the name of a TColor value.

CopyPalette function

Creates a new palette object that matches an existing palette.

CreateGrayMappedBmp function

Remaps the standard gray colors in a bitmap with the system grays.

CreateGrayMappedRes function

Remaps the standard gray colors in a bitmap resource with the system grays.

CreateMappedBmp function

Changes the color table in a bitmap.

CreateMappedRes function

Changes the color table in a bitmap resource.

DDBsOnly variable

Determines whether bitmap handles are created as device-dependent bitmaps (DDB).

Frame3D procedure

Draws a three dimensional frame on a canvas.

GetCharsetValues procedure

Passes the name of every predefined character set string to a callback function.

GetColorValues procedure

Passes the name of every predefined color constant to a callback function.

GetDefFontCharSet function

Returns the character set of the default system font.

GetDIB function

Returns the info header and image for a device independent bitmap.

GetDIBSizes procedure

Returns the size of the info header and of the image for a device independent bitmap.

GraphicExtension function

Returns the default file-name extension of a graphics object.

GraphicFileMask function

Returns a file mask that specifies the valid extensions for a graphic class.

GraphicFilter function

Returns a file filter compatible with the Filter property of an Open or Save dialog.

IdentToCharset function

Translates the name of a character set constant to the corresponding character set.

IdentToColor function

Translates the name of a color constant to the corresponding TColor value.

MoveWindowOrg procedure

Changes the location of the point (0,0) within a device context.

StringToColor function

Translates a string representation of a color to the corresponding TColor value.

SystemPalette16 variable

Contains the 16 VGA system colors.


Help Hint routines

Other routines, by category

Other routines, by unit

GetLongHint function

Returns the second part of a two-part hint string.

GetShortHint function

Returns the first part of a two-part hint string.


HTTP utilities

Other routines, by category

Other routines, by unit

Application variable (for Web server applications)

Represents a web server application for an Internet project.

DosPathToUnixPath function

Converts a TDateTime value into a string representing the day of the week.

ExtractHeaderFields procedure

Parses a multi-valued string into its constituent fields.

ExtractHTTPFields procedure

Parses a multi-valued string into its constituent fields.

GetExtensionVersion function

Returns the name and version number of an ISAPI or NSAPI application.

HTTPDecode function

Decodes a string that includes HTTP escape characters.

HTTPEncode function

Converts a string into a form that contains no values that are illegal in an HTTP message header.

HTTPExtensionProc function

Receives an HTTP request message for an ISAPI or NSAPI application.

ParseDate function

Converts a TDateTime value into a string representing the month.

StatusString function

Returns the explanatory string associated with one of the predefined HTTP response status codes.

UnixPathToDosPath function

Converts a Unix-compatible path specification to a Dos-compatible path specification.


I/O routines

Other routines, by category

Other routines, by unit

Append procedure

Prepares an existing file for adding text to the end.

BlockRead procedure

Reads one or more records from an open file into a variable.

BlockWrite procedure

Writes one or more records from a variable to an open file.

Eof function

Tests whether the file position is at the end of a file.

ErrOutput variable

Specifies a write-only file associated with stderr, usually the display.

FileMode variable

Indicates the access mode on typed and untyped files opened by the Reset procedure.

FilePos function

Returns the current file position.

FileSize function

Returns the number of records in a file.

Input variable

Specifies a read-only file associated with an operating system's standard input device.

IOResult function

Returns the status of the last I/O operation performed.

MkDir procedure

Creates a new subdirectory.

Output variable

Specifies a write-only file associated with standard output, usually the display.

Rename procedure

Changes the name of an external file.

Reset procedure

Opens an existing file.

Rewrite procedure

Creates a new file and opens it.

RmDir procedure

Deletes an empty subdirectory.

Seek procedure

Moves the current position of a file to a specified component.

Truncate procedure

Deletes all the records after the current file position.

Write procedure (for typed files)

Writes to a typed file.


Interface utilities

Other routines, by category

Other routines, by unit

GUIDToString function

Converts a class identifier GUID to a string.


Maximum and minimum values

Other routines, by category

Other routines, by unit

MaxComp constant

The maximum value of the Comp data type.

MaxDouble constant

The maximum value of the Double data type.

MaxExtended constant

The maximum value of the Extended data type.

MaxInt constant

The maximum value of the Integer data type.

MaxLongint constant

The maximum value of the Longint data type.

MaxSingle constant

The maximum value of the Single data type.

MinComp constant

The minimum value of the Comp data type.

MinDouble constant

The minimum value of the Double data type.

MinExtended constant

The minimum value of the Extended data type.

MinSingle constant

The minimum value of the Single data type.


MBCS routines

Other routines, by category

Other routines, by unit

NextCharIndex function

Return byte index of next character.


MBCS utilities

Other routines, by category

Other routines, by unit

AnsiCompareFileName function

Compares file names based on the current locale.

AnsiLastChar function

Returns a pointer to the last character in a string.

AnsiLowerCaseFileName function

Converts a file name to lower case.

AnsiStrLastChar function

Returns a pointer to the last character in a null-terminated string.

AnsiUpperCaseFileName function

Converts a file name to upper case.

ByteToCharIndex function

Returns the position of the character that contains a specified byte in a string.

ByteToCharLen function

Returns the number of characters fully contained in the first MaxLen bytes of a string.

ByteType function

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

CharLength function

Returns number of bytes used by a character.

CharToByteIndex function

Returns the 1-based index of the first byte of a specified character in a string.

CharToByteLen function

Returns the length, in bytes, of the first MaxLen characters of a string.

LeadBytes variable

Lists all Char values that can be the first byte of a double byte character on the local system.

SameFileName function

Compares file names based on the current locale.

StrByteType function

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

StrCharLength function

Find character size.

StrNextChar function

Returns pointer to following character.


Measurement conversion routines

Other routines, by category

Other routines, by unit

area unit variables

Represent units that measure area.

CelsiusToFahrenheit function

Converts a temperature expressed in degrees Celsius to the corresponding temperature in degrees Fahrenheit.

CompatibleConversionType function

Indicates whether a specified conversion type is registered with a specified conversion family.

CompatibleConversionTypes function

Indicates whether the Convert function can convert between two specified conversion types.

conversion family variables

Represent a family of measurement units.

Convert function

Converts a measurement from one set of units to another.

ConvertFrom function

Converts a measurement from the specified units to the base units of its conversion family.

ConvertTo function

Converts a measurement from the base units of a conversion family into a specified conversion type.

ConvFamilyToDescription function

Returns the string description of what a conversion family measures.

ConvTypeToDescription function

Returns the string description of a conversion type (measurement unit).

ConvTypeToFamily function

Returns the identifier for the conversion family with which a conversion type or pair of types is registered.

ConvUnitAdd function

Adds two measurements and returns the result using a specified unit of measurement.

ConvUnitCompareValue function

Indicates the relationship between two measurements.

ConvUnitDec function

Decrements a specified measurement by a specified amount.

ConvUnitDiff function

Subtracts one measurement from another and returns the result using a specified unit of measurement.

ConvUnitInc function

Increments a specified measurement by a specified amount.

ConvUnitSameValue function

Indicates whether two measurements are equivalent.

ConvUnitToStr function

Formats a measurement and its conversion unit into a human-readable string.

ConvUnitWithinNext function

Indicates whether a specified measurement exceeds another measurement by at most a specified amount.

ConvUnitWithinPrevious function

Indicates whether a specified measurement is at most a specified amount less than another measurement.

CycleToDeg function

Converts an angle measurement from cycles to degrees.

CycleToGrad function

Converts an angle measurement from cycles to grads.

CycleToRad function

Converts an angle measurement from cycles to radians.

DateTimeToJulianDate function

Converts a TDateTime value into a Julian date.

DateTimeToModifiedJulianDate function

Converts a TDateTime value into a modified Julian date.

DateTimeToUnix function

Converts a TDateTime value into a Unix-based date-and-time value.

DegToCycle function

Returns the value of a degree measurement expressed in cycles.

DegToGrad function

Returns the value of a degree measurement expressed in grads.

DegToRad function

Returns the value of a degree measurement expressed in radians.

DescriptionToConvFamily function

Retrieves the identifier for a conversion family given its name.

DescriptionToConvType function

Retrieves the identifier for a conversion type given its name and family.

distance unit variables

Represent units that measure distance.

FahrenheitToCelsius function

Converts a temperature expressed in degrees Fahrenheit to the corresponding temperature in degrees Celsius.

GetConvFamilies procedure

Returns a list of all registered conversion families.

GetConvTypes procedure

Returns a list of all registered conversion types in a specified conversion family.

GradToCycle function

Converts grad measurements to cycles.

GradToDeg function

Converts grad measurements to degrees.

GradToRad function

Converts grad measurements to radians.

JulianDateToDateTime function

Converts a Julian date to a TDateTime value.

mass unit variables

Represent units that measure weight.

ModifiedJulianDateToDateTime function

Converts a modified Julian date to a TDateTime value.

RadToCycle function

Converts radians to cycles.

RadToDeg function

Converts radians to degrees.

RadToGrad function

Converts radians to grads.

RaiseConversionError procedure

Raises an EConversionError exception.

RegisterConversionFamily function

Registers a new conversion family and returns its identifier.

RegisterConversionType function

Registers a new conversion type and returns its identifier.

StrToConvUnit function

Parses a string into a value and conversion type.

temperature unit variables

Represent units that measure temperature.

time unit variables

Represent units that measure time.

TryConvTypeToFamily function

Retrieves the identifier for the conversion family with which a conversion type or pair of types is registered.

TryJulianDateToDateTime function

Converts a Julian date to a TDateTime value.

TryModifiedJulianDateToDateTime function

Converts a modified Julian date to a TDateTime value.

TryStrToConvUnit function

Parses a string into a value and conversion type.

UnixToDateTime function

Converts a Unix-based date-and-time value to a TDateTime value.

UnregisterConversionFamily procedure

Unregisters a conversion family previously registered using RegisterConversionFamily.

UnregisterConversionType procedure

Unregisters a conversion type previously registered using RegisterConversionType.

volume unit variables

Represent units that measure distance.


Memory management routines

Other routines, by category

Other routines, by unit

AllocMem function

Allocates a memory block and initializes each byte to zero.

AllocMemCount variable

Represents the total number of allocated memory blocks in an application.

AllocMemSize variable

Represents the total size of allocated memory blocks.

GetHeapStatus function

Returns the current status of the memory manager.

GetMemoryManager procedure

Returns the entry points of the currently installed memory manager.

HeapAllocFlags variable

Flags that indicate how the memory manager obtains memory from the operating system.

IsMemoryManagerSet function

Indicates whether the memory manager has been overridden using the SetMemoryManager procedure.

ReallocMem procedure

Reallocates a dynamic variable.

SetMemoryManager procedure

Sets entry points of the memory manager.

SysFreeMem function

Frees the memory pointed to by a specified pointer.

SysGetMem function

Allocates a specified number of bytes and returns a pointer to them.

SysReallocMem function

Returns a pointer to a specified number of bytes, preserving the values pointed to by the Pointer parameter.


Menu support routines

Other routines, by category

Other routines, by unit

AnsiSameCaption function

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.

GetHotkey function

Returns the last character in a string marked with an ampersand (&).

NewItem function

Creates and initializes a menu item.

NewLine function

Creates a menu item for a separator.

NewMenu function

Creates and initializes a main menu.

NewPopupMenu function

Creates and initializes a popup menu.

NewSubMenu function

Creates and initializes a menu item that represents a submenu.

ShortCut function

Creates a menu shortcut for a specified key combination.

ShortCutToKey procedure

Returns the virtual key code and shift state of a menu shortcut.

ShortCutToText function

Converts a menu shortcut into a string that describes the shortcut.

StripHotKey function

Removes the accelerator character marker from a string.

TextToShortCut function

Creates a menu shortcut from a text string.

ValidMenuHotkeys variable

Determines what accelerator keys can be automatically assigned to a menu item caption.


Miscellaneous routines

Other routines, by category

Other routines, by unit

Assert procedure

Tests whether a Boolean expression is true.

AssertErrorProc variable

Points to the assertion error-handler.

Assigned function

Tests for a nil (unassigned) pointer or procedural variable.

Beep procedure

Generates a message beep.

CountGenerations function

Returns the number of intermediate classes between a derived class and its ancestor.

DefaultTextLineBreakStyle variable

Specifies the characters that are used by default to separate lines in text.

DLLProc variable

Points to a procedure invoked by a DLL entry point.

FormatMaskText function

FreeAndNilProperties function

Frees any property values that are objects and sets their value to nil.

GetEnvironmentVariable function

Returns environment variable value..

Hi function

Returns the high-order byte of X as an unsigned value.

High function

Returns the highest value in the range of an argument.

HtmlTable function

Generates the HTML image of a dataset, using the properties and events of a table producer object.

IfThen function

Conditionally returns one of two specified values.

IsAccel function

Indicates whether a particular character is an accelerator character (or hot key) within a given menu caption or other text string.

IsValidIdent function

Tests for a valid Pascal identifier.

Lo function

Returns the low order Byte of argument X.

Low function

Returns the lowest value in a range.

Move procedure

Copies bytes from a source to a destination.

SizeOf function

Returns the number of bytes occupied by a variable or type.

Slice function

Returns a sub-section of an array.

UniqueString procedure

Ensures that a given string has a reference count of one.

ValidParentForm function

Returns the form or property page that contains a specified control.


Mouse handling utilities

Other routines, by category

Other routines, by unit

FindVCLWindow function

Returns the windowed control, if any, at the specified location.

GetCaptureControl function

Returns the control, if any, that currently receives all mouse messages.

Mouse variable

Contains information about the system’s mouse.

SetCaptureControl procedure

Causes the specified control to receive all mouse messages.


Multi-tier support

Other routines, by category

Other routines, by unit

DisableSocketTransport procedure

Unregisters a remote data module so clients can’t access it using a Socket connection.

DisableWebTransport procedure

Unregisters a remote data module so clients can’t access it using a Web connection.

EnableSocketTransport procedure

Registers a remote data module so clients can access it using a Socket connection.

EnableWebTransport procedure

Registers a remote data module so clients can access it using a Web connection.

HandleReconcileError function

Displays a dialog that lets users determine what action to take when an update could not be applied.

PackageParams function

Converts a TParams object into an OleVariant that can be used in multi-tiered applications.

RegisterPooled procedure

Registers a remote data module so that instances are pooled.

UnpackParams procedure

Converts an OleVariant that represents a set of parameters into a TParams object.

UnregisterPooled procedure

Removes the object pooling registry entries for a remote data module.


Numeric formatting routines

Other routines, by category

Other routines, by unit

CurrToStr function

Formats a Currency value as a string.

CurrToStrF function

Converts a Currency value to a string, using a specified format.

DoubleToComp function

Converts a Double value to a Comp.

FormatCurr function

Formats a Currency object.

IntToHex function

Returns the hex representation of an integer.

IntToStr function

Converts an integer to a string.


Ordinal routines

Other routines, by category

Other routines, by unit

Inc procedure

Increments an ordinal value by one or N.

Odd function

Returns True if argument is an odd number.

Ord function

Returns the ordinal value of an ordinal-type expression.

Pred function

Returns the predecessor of the argument.

Succ function

Returns the successor of an argument.


Package support routines

Other routines, by category

Other routines, by unit

CurrentGroup variable

Keeps track of which objects are associated with which packages.

EnumModules procedure

Executes a callback for all the modules in an application.

EnumResourceModules procedure

Executes a callback for all resource modules in an application.

FinalizePackage procedure

Finalizes the specified package .BPL.

GetPackageDescription function

Returns the description resource from a package.

GetPackageInfo procedure

Enumerates all the units and required packages for a package.

InitializePackage procedure

Validates and initializes a given package.

LibModuleList variable

Lists module records for enumeration procedures.

LoadPackage function

Loads a specified package.

SafeLoadLibrary function

Loads a DLL while suppressing error dialogs and preventing the DLL from changing the FPU control word.

UnloadPackage procedure

Unloads a package.


Pointer and address routines

Other routines, by category

Other routines, by unit

Addr function

Returns a pointer to a specified object.

FreeAndNil procedure

Frees an object reference and replaces the reference with nil..

Ptr function

Converts a specified address to a pointer.


Printer support

Other routines, by category

Other routines, by unit

Printer function

Returns a global instance of TPrinter to manage interaction with the printer.

SetPrinter function

Replaces the global instance of TPrinter that manages interaction with the printer.


Property category routines

Other routines, by category

Other routines, by unit

IsPropertyInCategory function

RegisterPropertiesInCategory function

Registers multiple properties in a specific property category.

RegisterPropertyInCategory function

Registers a single property in a specific property category.


Random number routines

Other routines, by category

Other routines, by unit

RandG function

Generates random numbers with Gaussian distribution.

Random function

Generates random numbers within a specified range.

RandomFrom function

Returns a randomly selected element from an array.

Randomize procedure

Initializes the random number generator with a random value.

RandomRange function

Returns a random integer from a specified range.

RandSeed variable

RandSeed stores the built-in random number generator's seed.


Service applications

Other routines, by category

Other routines, by unit

Application variable (for service applications)

Represents a service application for a service project.


Set handling routines

Other routines, by category

Other routines, by unit

Exclude procedure

Removes an element from a set.

Include procedure

Adds an element to a set.


Statistical routines

Other routines, by category

Other routines, by unit

MaxIntValue function

Returns the largest signed value in an integer array.

MaxValue function

Returns the largest signed value in an array.

Mean function

Returns the average of all values in an array.

MeanAndStdDev procedure

Calculates the mean and standard deviation of array elements.

MinIntValue function

Returns the smallest signed value in an integer array.

MinValue function

Returns smallest signed value in an array.

MomentSkewKurtosis procedure

Calculates the mean, variance, skew, and kurtosis.

Norm function

Returns the Euclidean 'L-2' norm.

PopnStdDev function

Calculates the population standard deviation.

PopnVariance function

Calculates the population variance.

StdDev function

Returns the sample standard deviation for elements in an array.

Sum function

Returns the sum of the elements in an array.

SumInt function

Returns the sum of the elements in an integer array.

SumOfSquares function

Returns the sum of the squared values from a data array.

SumsAndSquares procedure

Returns the sum of the values and the sum of the squared values in an array.

TotalVariance function

Returns the statistical variance from an array of values.

Variance function

Calculates statistical sample variance from an array of data.


Streaming utilities

Other routines, by category

Other routines, by unit

ActivateClassGroup procedure

Activates a group of classes that derive from TPersistent.

FindClass function

Finds and returns a class that is derived from TPersistent.

FindClassHInstance function

Returns the instance handle for the module in which a class type is defined.

FindGlobalComponent function

Returns a top-level container component.

FindHInstance function

Returns the instance handle of the module that contains a specified address.

FindResourceHInstance function

Returns the instance handle of the resource module associated with a specified HInstance.

GetClass function

Returns a registered persistent class given its name.

GroupDescendentsWith procedure

Adds a specified class to the group in which another class appears.

IdentToInt function

Uses a mapping array to convert string identifiers into their corresponding integer values.

InitInheritedComponent function

Initializes streaming of a form file for an inherited root class.

IntToIdent function

Uses a mapping array to convert integers into their corresponding string identifiers.

IsUniqueGlobalComponentName function

Indicates whether a proposed component name is unambiguous.

ObjectBinaryToText procedure

Converts the binary representation of an object into more readily understandable text.

ObjectResourceToText procedure

Converts the binary representation of an object resource into more readily understandable text.

ObjectTextToBinary procedure

Converts a symbolic text representation of an object into the binary version that is used to save the object to files or memory streams.

ObjectTextToResource procedure

Converts a symbolic text representation of an object into an internal binary representation.

ReadComponentRes function

Reads components and their properties from a specified Windows resource.

ReadComponentResEx function

Reads a component from a resource.

ReadComponentResFile function

Reads components and their properties from a specified Windows resource file.

RegisterClass procedure

Registers a class of persistent object so that it’s class type can be retrieved.

RegisterClassAlias procedure

Registers a class that is identical to another class except for the name.

RegisterClasses procedure

Registers a set of classes.

RegisterIntegerConsts procedure

Registers conversion functions for string identifiers that represent type values.

StartClassGroup procedure

Starts a class group derived from TPersistent.

TestStreamFormat function

Identifies the format of a form file when reading it from a stream.

TypeInfo function

Returns a pointer to compiler-generated runtime type information for a type identifier.

UnregisterClass procedure

Unregisters an object class.

UnregisterClasses procedure

Unregisters a set of classes.

UnregisterIntegerConsts procedure

Unregisters conversion functions for string identifiers that represent type values.

UnregisterModuleClasses procedure

Unregisters all classes defined in a specified module.

WriteComponentResFile procedure

Writes components and their properties to a file using a Windows resource file format.


String formatting routines

Other routines, by category

Other routines, by unit

FmtLoadStr function

Returns formatted output using a resourced format string.

FmtStr procedure

Assembles a formatted string using a format string and an array of arguments.

Format function

Returns a formatted string assembled from a format string and an array of arguments.

FormatBuf function

Formats the arguments from an array, placing the result in a buffer.

GetFormatSettings procedure

Resets the date and number format parameters to initial values.

StrFmt function

Formats entries in an array.

StrLFmt function

Formats a series of arguments from a specified open array into a buffer.

WideFormat function

Returns a formatted Unicode string assembled from a format string and an array of arguments.

WideFormatBuf function

Formats the arguments from an array, placing the result in a buffer.


String handling routines (null-terminated)

Other routines, by category

Other routines, by unit

AnsiStrComp function

Compares null-terminated character strings.

AnsiStrIComp function

Compares null terminated character strings case insensitively.

AnsiStrLComp function

Compares the first MaxLen bytes of two null-terminated strings, case-sensitively.

AnsiStrLIComp function

Compares two strings, case-insensitively, up to the first MaxLen bytes.

AnsiStrLower function

Converts all characters in a null-terminated string to lower case.

AnsiStrPos function

Returns a pointer to the first occurrence of SubStr in Str.

AnsiStrRScan function

Returns a pointer to the last occurrence of a specified character in a specified string.

AnsiStrScan function

Returns a pointer to first occurrence of a character in a string.

AnsiStrUpper function

Converts all characters in a null-terminated string to upper case.

ExtractStrings function

Fills a string list with substrings parsed from a delimited list.

LineStart function

Finds the end of the last whole line in a buffer.

SearchBuf function

Locates a substring within a text buffer.

StrCat function

Appends a copy of Source to the end of Dest and returns the concatenated string.

StrComp function

Compares two strings with case sensitivity.

StrCopy function

Copies Source to Dest and returns Dest.

StrECopy function

Copies null-terminated string.

StrEnd function

Returns a pointer to the end of a null terminated string.

StrIComp function

Compares two strings without case sensitivity.

StrLCat function

Appends up to a specified maximum number of characters to string.

StrLComp function

Compares up to a specified maximum number of characters in two strings.

StrLCopy function

Copies up to a specified maximum number of characters from Source to Dest.

StrLen function

Returns number of characters in a string excluding the null terminator.

StrLIComp function

Compares strings up to a specified maximum number of characters, without case sensitivity.

StrLower function

Converts a string to lowercase.

StrMove function

Copies specified number of characters to string.

StrPCopy function

Copies a Pascal string to a null-terminated string.

StrPLCopy function

Copies characters from a Pascal-style string into a null-terminated string.

StrPos function

Returns a pointer to the first occurrence of STR2 in STR1.

StrRScan function

Returns a pointer to the last occurrence of a specified character in a string.

StrScan function

Returns a pointer to first occurrence of a specified character in a string.

StrUpper function

Returns a string in upper case.


String handling routines

Other routines, by category

Other routines, by unit

AnsiCompareStr function

Compares strings based on the current locale with case sensitivity.

AnsiCompareText function

Compares strings based on the current locale without case sensitivity.

AnsiContainsStr function

Indicates whether one string is a (case-sensitive) substring of another.

AnsiContainsText function

Indicates whether one string is a (case-insensitive) substring of another.

AnsiDequotedStr function

Converts a quoted string into an unquoted

AnsiEndsStr function

Indicates whether one string is a (case-sensitive) suffix of another.

AnsiEndsText function

Indicates whether one string is a (case-insensitive) suffix of another.

AnsiExtractQuotedStr function

Converts a quoted string into an unquoted string.

AnsiIndexStr function

Provides the index of a specified string in an array of strings.

AnsiIndexText function

Provides the index of a specified string in an array of strings.

AnsiLowerCase function

Returns a string that is a copy of the given string converted to lower case.

AnsiMatchStr function

Indicates whether an array of strings contains an exact match to a specified string.

AnsiMatchText function

Indicates whether an array of strings contains a case-insensitive match to a specified string.

AnsiPos function

Locates the position of a substring within a string.

AnsiQuotedStr function

Returns the quoted version of a string.

AnsiReplaceStr function

Replaces all occurrences of a substring with another string.

AnsiReplaceText function

Replaces all case-insensitive matches of a substring with another string.

AnsiResemblesProc variable

Controls the algorithm used by AnsiResemblesText to determine when two strings are similar.

AnsiResemblesText function

Indicates whether two strings are similar.

AnsiSameStr function

Compares strings based on the current locale with case sensitivity.

AnsiSameText function

Compares strings based on the current locale without case sensitivity.

AnsiStartsStr function

Indicates whether one string is a (case-sensitive) prefix of another.

AnsiStartsText function

Indicates whether one string is a (case-insensitive) prefix of another.

AnsiUpperCase function

Converts a string to upper case.

CompareStr function

Compares two strings case sensitively.

CompareText function

Compares two strings by ordinal value without case sensitivity.

Concat function

Concatenates two or more strings into one.

Copy function

Returns a substring of a string or a segment of a dynamic array.

DecodeSoundExInt function

Converts an integer representation of a SoundEx encoding into the corresponding phonetic string.

DecodeSoundExWord function

Converts a Word representation of a SoundEx encoding into the corresponding phonetic string.

Delete procedure

Removes a substring from a string.

DupeString function

Returns the concatenation of a string with itself a specified number of repeats.

Insert procedure

Inserts a substring into a string beginning at a specified point.

IsDelimiter function

Indicates whether a specified character in a string matches one of a set of delimiters.

LastDelimiter function

Returns the byte index in S of the last character that matches any character in the Delimiters AnsiString.

LeftStr function

Returns the substring of a specified length that appears at the start of a string.

Length function

Returns the number of characters in a string or elements in an array.

LowerCase function

Converts an ASCII string to lowercase.

MidStr function

Returns the substring of a specified length that appears at a specified position in a string.

NullStr constant

Declares a pointer to EmptyStr.

Pos function

Returns the index value of the first character in a specified substring that occurs in a given string.

QuotedStr function

Returns the quoted version of a string.

ReverseString function

Returns the reverse of a specified string.

RightStr function

Returns the substring of a specified length that appears at the end of a string.

SameText function

Compares two strings by ordinal value without case sensitivity.

SetLength procedure

Sets the length of a string or dynamic-array variable.

SetString procedure

Sets the contents and length of the given string.

SoundEx function

Converts a string into its SoundEx representation.

SoundExCompare function

Compares the SoundEx representations of two strings.

SoundExInt function

Converts a string into an integer that represents its phonetic value.

SoundExProc function

Indicates whether two strings are similar.

SoundExSimilar function

Indicates whether two strings are similar.

SoundExWord function

Converts a string into a Word that represents its phonetic value.

Str procedure

Formats a string and returns it to a variable.

StringOfChar function

Returns a string with a specified number of repeating characters.

StringToGUID function

Returns a string with occurrences of one substring replaced by another substring.

StuffString function

Inserts a substring into a specified position of a string, replacing the current characters.

Trim function

Trims leading and trailing spaces and control characters from a string.

TrimLeft function

Trims leading spaces and control characters from a string.

TrimRight function

Trims trailing spaces and control characters from a string.

UpperCase function

Returns a copy of a string in uppercase.

Val procedure

Converts a string to a numeric representation.

WideLowerCase function

Returns Unicode string converted to lower case.

WideSameStr function

Compares Unicode strings based on the current locale with case sensitivity.

WideSameText function

Compares Unicode strings based on the current locale without case sensitivity.

WideUpperCase function

Returns Unicode string converted to upper case.

WrapText function

Splits a string into multiple lines as its length approaches a specified size.


Termination procedure support

Other routines, by category

Other routines, by unit

AddTerminateProc procedure

Adds a terminate procedure to the system list of termination procedures.

CallTerminateProcs function

Calls all of the functions in the termination procedure list.

ExitProc variable

Points to a program's exit procedure (provided for backward compatibility).


Text file routines

Other routines, by category

Other routines, by unit

AssignPrn procedure

Assigns a text-file variable to the printer.

Eoln function

Tests whether the file pointer is at the end of a line.

Erase procedure

Deletes an external file.

Flush procedure

Empties the buffer of a text file opened for output.

Read procedure

Read reads data from a file.

Readln procedure

Reads a line of text from a file.

SeekEof function

Returns the end-of-file status of a file, ignoring whitespace.

SeekEoln function

Returns the end-of-line status of a file, ignoring whitespace.

SetLineBreakStyle procedure

Determines the end-of-line and end-of-file conventions for text file I/O.

SetTextBuf procedure

Assigns an I/O buffer to a text file.

Write procedure (for text files)

Writes to a text file.

Writeln procedure

Writes to a text file and adds an end-of-line marker


Thread management routines

Other routines, by category

Other routines, by unit

BeginThread function

Spawns a separate thread of execution.

CheckSynchronize function

Allows background threads to synchronize their execution with the main thread.

EndThread function

Terminates the execution of a thread.

ForegroundTask function

Indicates whether the current thread is running in the foreground.

IsMultiThread variable

Indicates whether the application spawned additional threads using BeginThread or TThread objects.

WakeMainThread variable

Represents a method (event handler) that is forced into the main thread’s queue.


Trigonometry routines

Other routines, by category

Other routines, by unit

ArcCos function

Calculates the inverse cosine of a given number.

ArcCosh function

Calculates the inverse hyperbolic cosine of a given number.

ArcCot function

Calculates the inverse cotangent of a given number.

ArcCotH function

Calculates the inverse hyperbolic cotangent of a given number.

ArcCsc function

Calculates the inverse cosecant of a given number.

ArcCscH function

Calculates the inverse hyperbolic cosecant of a given number.

ArcSec function

Calculates the inverse secant of a given number.

ArcSecH function

Calculates the inverse hyperbolic secant of a given number.

ArcSin function

Calculates the inverse sine of a given number.

ArcSinh function

Calculates the inverse hyperbolic sine of a given number.

ArcTan function

Calculates the arctangent of a given number.

ArcTan2 function

Calculates the arctangent angle and quadrant of a given number.

ArcTanh function

Calculates the inverse hyperbolic tangent of a given number.

Cos function

Calculates the cosine of an angle.

Cosecant function

Returns the cosecant of an angle.

Cosh function

Calculates the hyperbolic cosine of an angle.

Cot function

Calculates the cotangent of an angle.

Cotan function

Calculates the cotangent of an angle.

CotH function

Calculates the hyperbolic cotangent of an angle.

Csc function

Returns the cosecant of an angle.

CscH function

Returns the hyperbolic cosecant of an angle.

Hypot function

Calculates the length of the hypotenuse.

Sec function

Calculates the secant of an angle.

Secant function

Calculates the secant of an angle.

SecH function

Calculates the hyperbolic secant of an angle.

Sin function

Returns the sine of the angle in radians.

SinCos procedure

Returns sine and cosine of an angle.

Sinh function

Returns the hyperbolic sine of an angle.

Tan function

Returns the tangent of X.

Tanh function

Returns the hyperbolic tangent of X.


Type conversion routines

Other routines, by category

Other routines, by unit

BinToHex procedure

Converts a binary value into its hexadecimal representation.

BoolToStr function

Converts a boolean value to a string.

Bounds function

Returns the TRect for a rectangle of given dimensions.

CompToCurrency function

Converts a Comp value to a Currency value.

CompToDouble function

Converts a Comp value to a Double value.

Dec procedure

Converts a Currency value to a Comp value.

FalseBoolStrs variable

Lists strings that can represent the boolean value False.

HexToBin function

Converts a string of hexadecimal digits to the corresponding binary value.

OffsetRect function

Changes the origin of a rectangle by a specified amount.

Point function

Creates a TPoint structure from a pair of coordinates.

Rect function

Creates a TRect structure from a set of coordinates.

Rect function

Creates a TRect structure from a set of coordinates.

SmallPoint function

Creates a TSmallPoint structure from a pair of coordinates.

StrToBool function

Converts a string to a boolean value.

StrToInt function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToInt64 function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToInt64Def function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToIntDef function

Converts a string that represents an integer (decimal or hex notation) to a number.

TrueBoolStrs variable

Lists strings that can represent the boolean value True.


Unicode routines

Other routines, by category

Other routines, by unit

WideCompareStr function

Compares Unicode strings based on the current locale with case sensitivity.

WideCompareText function

Compares Unicode strings based on the current locale without case sensitivity.

WideFmtStr procedure

Assembles a formatted Unicode string using a format string and an array of arguments.


Variant support routines

Other routines, by category

Other routines, by unit

DynArrayFromVariant procedure

Creates a dynamic array from a Variant.

DynArrayToVariant procedure

Creates a Variant array from a dynamic array.

EmptyParam function

Returns an OleVariant that represents an unused optional parameter on a dual interface.

FindCustomVariantType function

Retrieves the object that implements a custom Variant type.

GetVariantManager procedure

Returns the entry points of the routines that define variant behavior.

IsVariantManagerSet function

Indicates whether variant support is implemented in an application.

Null function

Null returns a null Variant.

SetVariantManager procedure

Sets the entry points of routines that define variant behavior.

Unassigned constant

Used for a variant not yet assigned a value.

VarArrayCreate function

Creates a variant array.

VarArrayDimCount function

Returns number of dimensions of a variant array.

VarArrayFromStrings function

Creates a Variant array that contains the strings in a TStrings object.

VarArrayGet function

Returns a Variant that represents a single value from a multi-dimensional Variant array.

VarArrayHighBound function

Returns high bound for a dimension in a variant array.

VarArrayLock function

Locks a variant array and returns a pointer to the data.

VarArrayLowBound function

Returns the low bound of a dimension in a variant array.

VarArrayOf function

Creates and fills a one-dimensional variant array.

VarArrayPut procedure

Sets the value of a single cell in a multi-dimensional Variant array.

VarArrayRedim procedure

Resizes a Variant array.

VarArrayRef function

Returns a reference to the specified variant array.

VarArrayUnlock procedure

Unlocks a variant array.

VarAsComplex function

Casts an arbitrary Variant so that it is a custom Variant representing a complex number.

VarAsConvert function

Casts an arbitrary Variant so that it is a custom Variant representing a measurement.

VarAsType function

Converts a variant to specified type.

VarCheckEmpty procedure

Raises an exception if a specified variant’s value is Unassigned.

VarClear procedure

Empties a Variant, so that it is unassigned.

VarCompareValue function

Returns the relationship between Variants.

VarComplex function

Returns the Variant type code for custom Variants that represent complex numbers.

VarComplexSimplify function

Reduces a Variant that represents a complex number to one that represents a real value, if possible.

VarConvert function

Returns the Variant type code for custom Variants that represent measurements.

VarConvertCreate function

Returns a custom Variant that represents a measurement.

VarCopyNoInd procedure

Copies a Variant.

VarEnsureRange function

Returns a Variant with a value in a specified range.

VarFMTBcd function

Returns the TVarType constant that identifies the internal type of a Variant as a TBcd value.

VarFMTBcdCreate function

Creates a new Variant that stores its value internally as a TBcd value.

VarFromDateTime function

Returns a variant containing a specified data and time.

VarInRange function

Indicates whether a Variant’s value is in a specified range.

VarIsArray function

Indicates whether the specified variant is an array.

VarIsByRef function

Indicates whether the specified variant’s value is by reference.

VarIsClear function

Indicates whether the specified variant has an undefined value.

VarIsComplex function

Indicates whether a Variant stores its data internally as a complex number.

VarIsConvert function

Indicates whether a Variant is a custom Variant that represents a measurement.

VarIsCustom function

Indicates whether the specified variant is a custom variant.

VarIsEmpty function

Indicates whether the specified variant is unassigned.

VarIsEmptyParam function

Indicates whether the specified variant represents an unassigned optional parameter.

VarIsFloat function

Indicates whether the specified variant represents a floating-point value.

VarIsFMTBcd function

Indicates whether a specified Variant represents a TBcd value.

VarIsNull function

Indicates whether the specified variant is Null.

VarIsNumeric function

Indicates whether the specified variant represents a numeric value.

VarIsOrdinal function

Indicates whether the specified variant represents an ordinal value.

VarIsSQLTimeStamp function

Indicates whether a specified Variant represents a TSQLTimeStamp value.

VarIsStr function

Indicates whether the specified variant represents a string value.

VarIsType function

Indicates whether the specified variant represents a specified type.

VarSameValue function

Indicates whether two Variants have equivalent values.

VarSQLTimeStamp function

Returns the TVarType constant that identifies the internal type of a Variant as a TSQLTimeStamp value.

VarSQLTimeStampCreate function

Creates a new Variant that stores its value internally as a TSQLTimeStamp value.

VarSupports function

Indicates whether the Variant’s value is an interface that supports a specified interface.

VarToBcd function

Converts a Variant into a TBcd type.

VarToDateTime function

Converts a specified variant to a TDateTime value.

VarToSQLTimeStamp function

Converts a Variant that represents a TSQLTimeStamp value to the corresponding TSQLTimeStamp.

VarToStr function

Converts a variant to a string.

VarToStrDef function

Converts a variant to a string.

VarToWideStr function

Converts a variant to a WideString.

VarToWideStrDef function

Converts a variant to a WideString.

VarType function

Returns the type code of a specified variant.

VarTypeIsValidArrayType function

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.

VarTypeIsValidElementType function

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.


Web Services

Other routines, by category

Other routines, by unit

AppNameSpacePrefix variable

Supplies a unique prefix to use for automatically generated namespaces given to invokable interfaces and remotable types.

DateTimeToXSDateTime function

Returns a TXSDateTime object that encodes a TDateTime value.

GetRemotableDataContext function

Returns the TDataContext object that provides temporary storage during a call to an invokable interface.

InvRegistry function

Provides access to the invocation registry.

RemClassRegistry function

Provides access to the remotable class registry.

RemTypeRegistry function

Provides access to the remotable type registry.

SetRemotableDataContext procedure

Sets the data context that provides temporary storage during a call to an invokable interface.


Windows controls utilities

Other routines, by category

Other routines, by unit

AllocateHwnd function

Creates a window that implements a specified window procedure.

CheckToolMenuDropdown procedure

Displays a tool button’s dropdown menu.

DeallocateHwnd procedure

Frees a window that was created using AllocateHWnd.

DestroyMetaPict procedure

Frees a metafile resource given its handle.

FindControl function

Returns the windowed control whose window is identified by the specified window handle.

GetComCtlVersion function

Indicates which version of ComCtl32.dll is installed.

GetParentForm function

Returns the form or property page that contains a specified control.

InitCommonControl function

Wraps the API routine, InitCommonControlsEx, which registers common control classes from ComCtl32.dll.

NewStyleControls variable

Determines whether controls are drawn using the Windows 3.x “look”.

SendAppMessage function

Sends a Windows message to the application.


XML support

Other routines, by category

Other routines, by unit

DefaultVendorName variable

Identifies the DOM implementation that is used by default.

DOMVendors variable

Lists all registered DOM Vendors.

ExtractLocalName function

Strips the namespace prefix, if present, from the tag name of an XML node.

ExtractPrefix function

Returns the namespace prefix of an XML node’s tag name.

FormatXMLData function

Formats a string of XML so that it is more readable.

GetDOM function

Returns the top-level DOM interface for a registered DOM implementation.

GetDOMVendor function

Returns the TDOMVendor object for a specified DOM vendor.

IsPrefixed function

Indicates whether an XML tag name includes a namespace prefix.

LoadXMLData function

Creates and returns the interface of an XML document object, given a string of XML.

LoadXMLDocument function

Returns the interface for an XML document given the name of an XML file.

MakeNodeName function

Assembles a full tag name from a local name and namespace prefix.

NewXMLDocument function

Returns the interface for a new, empty XML document.

NodeMatches function

Indicates whether a specified node matches a given namespace and tag name.

RegisterDOMVendor procedure

Registers an implementation of the DOM interfaces so that it is available to the TXMLDocument class.

SameNamespace function

Indicates whether a specified node is defined within a specified namespace.

UnRegisterDOMVendor procedure

Unregisters a DOM implementation that was registered using RegisterDOMVendor .

XMLDocError procedure

Raises an EXMLDocError exception.


ActnList routines

ActnList objects/components

Other routines, by unit

CreateAction function

Creates an action of a specified type.

EnumRegisteredActions procedure

Iterates through the list of registered actions, passing them to a user-defined callback.

RegisterActions procedure

Registers action classes so that they appear in the list of predefined actions in the action list editor or customize dialog.

UnRegisterActions procedure

Unregisters a set of actions.


AxCtrls routines

AxCtrls objects/components

Other routines, by unit

EnumDispatchProperties procedure

Fills a TStringList will all the property names and DispIDs in a specified IDispatch interface.

GetOleFont procedure

Creates an OLE font object that is directly mapped to a native TFont.

GetOlePicture procedure

Creates an OLE picture object that is directly mapped to a native TPicture.

GetOleStrings procedure

Implements a TStrings object as an IStrings interface for use by OLE objects.

ParkingWindow function

Provides a temporary parent window for activeX controls when the container is not ready to act as a parent.

SetOleFont procedure

Connects an OLE font object to a TFont object and copies the properties of the OLE font object to the TFont.

SetOlePicture procedure

Connects an OLE picture object to a TPicture object, and copies the properties of the OLE picture object to the TPicture.

SetOleStrings procedure

Uses an IStrings interface to assign the contents of a TStrings object.


Classes routines

Classes objects/components

Other routines, by unit

ActivateClassGroup procedure

Activates a group of classes that derive from TPersistent.

AllocateHwnd function

Creates a window that implements a specified window procedure.

BinToHex procedure

Converts a binary value into its hexadecimal representation.

CheckSynchronize function

Allows background threads to synchronize their execution with the main thread.

CollectionsEqual function

Compares the contents of two collections.

CountGenerations function

Returns the number of intermediate classes between a derived class and its ancestor.

CreateVCLComObjectProc variable

Specifies a procedure that creates a COM object associated with a component.

CurrentGroup variable

Keeps track of which objects are associated with which packages.

DeallocateHwnd procedure

Frees a window that was created using AllocateHWnd.

EqualRect function

Indicates whether two TRect values are the same.

ExtractStrings function

Fills a string list with substrings parsed from a delimited list.

FindClass function

Finds and returns a class that is derived from TPersistent.

FindGlobalComponent function

Returns a top-level container component.

GetClass function

Returns a registered persistent class given its name.

GroupDescendentsWith procedure

Adds a specified class to the group in which another class appears.

HexToBin function

Converts a string of hexadecimal digits to the corresponding binary value.

IdentToInt function

Uses a mapping array to convert string identifiers into their corresponding integer values.

InitInheritedComponent function

Initializes streaming of a form file for an inherited root class.

IntToIdent function

Uses a mapping array to convert integers into their corresponding string identifiers.

InvalidPoint function

Indicates whether a specified point is equal to (-1,-1).

IsUniqueGlobalComponentName function

Indicates whether a proposed component name is unambiguous.

LineStart function

Finds the end of the last whole line in a buffer.

ObjectBinaryToText procedure

Converts the binary representation of an object into more readily understandable text.

ObjectResourceToText procedure

Converts the binary representation of an object resource into more readily understandable text.

ObjectTextToBinary procedure

Converts a symbolic text representation of an object into the binary version that is used to save the object to files or memory streams.

ObjectTextToResource procedure

Converts a symbolic text representation of an object into an internal binary representation.

PointsEqual function

Indicates whether two points have the same coordinates.

ReadComponentRes function

Reads components and their properties from a specified Windows resource.

ReadComponentResEx function

Reads a component from a resource.

ReadComponentResFile function

Reads components and their properties from a specified Windows resource file.

Rect function

Creates a TRect structure from a set of coordinates.

RegisterClass procedure

Registers a class of persistent object so that it’s class type can be retrieved.

RegisterClassAlias procedure

Registers a class that is identical to another class except for the name.

RegisterClasses procedure

Registers a set of classes.

RegisterComponents procedure

Registers a set of components so that they all appear on the same page of the component palette.

RegisterIntegerConsts procedure

Registers conversion functions for string identifiers that represent type values.

RegisterNoIcon procedure

Registers a set of components but does not add them to the component palette.

RegisterNonActiveX procedure

Prevents a set of components from being made available to the ActiveX wizard.

SmallPoint function

Creates a TSmallPoint structure from a pair of coordinates.

StartClassGroup procedure

Starts a class group derived from TPersistent.

TestStreamFormat function

Identifies the format of a form file when reading it from a stream.

UnregisterClass procedure

Unregisters an object class.

UnregisterClasses procedure

Unregisters a set of classes.

UnregisterIntegerConsts procedure

Unregisters conversion functions for string identifiers that represent type values.

UnregisterModuleClasses procedure

Unregisters all classes defined in a specified module.

WakeMainThread variable

Represents a method (event handler) that is forced into the main thread’s queue.

WriteComponentResFile procedure

Writes components and their properties to a file using a Windows resource file format.


Clipbrd routines

Clipbrd objects/components

Other routines, by unit

Clipboard function

Returns an instance of TClipboard.

SetClipboard function

Replaces the single global clipboard instance with another clipboard object.


ComCtrls routines

ComCtrls objects/components

Other routines, by unit

CheckToolMenuDropdown procedure

Displays a tool button’s dropdown menu.

GetComCtlVersion function

Indicates which version of ComCtl32.dll is installed.

InitCommonControl function

Wraps the API routine, InitCommonControlsEx, which registers common control classes from ComCtl32.dll.


ComObj routines

ComObj objects/components

Other routines, by unit

ClassIDToProgID function

Returns the programmatic ID for a specified class given its class ID (CLSID).

CoInitFlags variable

Specifies the level of threading support requested for a COM server .EXE.

ComClassManager function

Returns a TComClassManager object.

CreateClassID function

CreateClassID generates a new GUID and returns it as a string.

CreateComObject function

Instantiates a single instance of a COM object.

CreateOleObject function

Instantiates a single instance of an Automation object.

CreateRegKey procedure

Creates or opens a registry key that is a subkey of HKEY_CLASSES_ROOT.

CreateRemoteComObject function

Creates a Com object on another machine and returns an IUnknown interface for it.

DeleteRegKey procedure

Deletes a single key that is a subkey of HKEY_CLASSES_ROOT from the system registry.

GetActiveOleObject function

Retrieves a reference to an IDispatch interface to a currently running, registered COM object.

GetDispatchPropValue function

Returns the value of a property on an IDispatch interface.

GetRegStringValue function

Retrieves a value stored under a subkey of HKEY_CLASSES_ROOT from the system registry.

InterfaceConnect procedure

Connects an IConnectionPoint interface.

InterfaceDisconnect procedure

Disconnects an IConnectionPoint interface connection that was previously made by the InterfaceConnect procedure.

OleCheck procedure

Throws an EOleSysError exception if the result code indicates an error.

OleError procedure

Raises an EOleSysError exception.

ProgIDToClassID function

Returns the class ID (CLSID) TGUID that corresponds to the string specified as the ProgID parameter.

RegisterAsService procedure

Registers an in-process COM server with the operating system.

SetDispatchPropValue procedure

Sets the value of a property on an IDispatch interface.


ComServ routines

ComServ objects/components

Other routines, by unit

ComServer variable

Provides class and registry information about server objects.

DLLCanUnloadNow function

Tells Windows whether it can unload the in-process server exporting this function.

DllGetClassObject function

Obtains a class factory for an ActiveX object when the ActiveX object resides in an in-process ActiveX server (DLL).

DllRegisterServer function

Registers an in-process ActiveX server in the current module within the system registry.

DllUnregisterServer function

Unregisters an OLE automation server in the current module with the system registry.


Controls routines

Controls objects/components

Other routines, by unit

CancelDrag procedure

Cancels a drag-and-drop or drag-and-dock operation that is in progress.

CursorToIdent function

Returns the name of the predefined constant that corresponds to a cursor.

CursorToString function

Returns the AnsiString representation of a cursor.

DefaultDockTreeClass variable

Returns the default implementation class for the DockManager property of windowed controls.

FindControl function

Returns the windowed control whose window is identified by the specified window handle.

FindDragTarget function

Returns the control at a specified screen coordinate.

FindVCLWindow function

Returns the windowed control, if any, at the specified location.

GetCaptureControl function

Returns the control, if any, that currently receives all mouse messages.

GetCursorValues procedure

Passes the name of every predefined cursor constant to a callback.

GetLongHint function

Returns the second part of a two-part hint string.

GetShortHint function

Returns the first part of a two-part hint string.

IdentToCursor function

Translates a predefined cursor constant into a cursor.

IsAbortResult function

Checks the return value from a modal form dialog and indicates whether the user selected Abort or Cancel.

IsAnAllResult function

Checks the return value from a modal form dialog and indicates whether the user selected All, Yes to All, or No to All.

IsDragObject function

Indicates whether a specified object is a TDragObject descendant.

IsNegativeResult function

Checks the return value from a modal form dialog and indicates whether the user selected No or No to All.

IsPositiveResult function

Checks the return value from a modal form dialog and indicates whether the user selected Ok, Yes, Yes to All, or All.

Mouse variable

Contains information about the system’s mouse.

MoveWindowOrg procedure

Changes the location of the point (0,0) within a device context.

NewStyleControls variable

Determines whether controls are drawn using the Windows 3.x “look”.

SendAppMessage function

Sends a Windows message to the application.

SetCaptureControl procedure

Causes the specified control to receive all mouse messages.

StringToCursor function

Returns a TCursor value given its string representation.

StripAllFromResult function

Converts a TModalResult value from a constant that refers to “all” to the corresponding simple constant.


ConvUtils routines

ConvUtils objects/components

Other routines, by unit

CompatibleConversionType function

Indicates whether a specified conversion type is registered with a specified conversion family.

CompatibleConversionTypes function

Indicates whether the Convert function can convert between two specified conversion types.

Convert function

Converts a measurement from one set of units to another.

ConvertFrom function

Converts a measurement from the specified units to the base units of its conversion family.

ConvertTo function

Converts a measurement from the base units of a conversion family into a specified conversion type.

ConvFamilyToDescription function

Returns the string description of what a conversion family measures.

ConvTypeToDescription function

Returns the string description of a conversion type (measurement unit).

ConvTypeToFamily function

Returns the identifier for the conversion family with which a conversion type or pair of types is registered.

ConvUnitAdd function

Adds two measurements and returns the result using a specified unit of measurement.

ConvUnitCompareValue function

Indicates the relationship between two measurements.

ConvUnitDec function

Decrements a specified measurement by a specified amount.

ConvUnitDiff function

Subtracts one measurement from another and returns the result using a specified unit of measurement.

ConvUnitInc function

Increments a specified measurement by a specified amount.

ConvUnitSameValue function

Indicates whether two measurements are equivalent.

ConvUnitToStr function

Formats a measurement and its conversion unit into a human-readable string.

ConvUnitWithinNext function

Indicates whether a specified measurement exceeds another measurement by at most a specified amount.

ConvUnitWithinPrevious function

Indicates whether a specified measurement is at most a specified amount less than another measurement.

DescriptionToConvFamily function

Retrieves the identifier for a conversion family given its name.

DescriptionToConvType function

Retrieves the identifier for a conversion type given its name and family.

GetConvFamilies procedure

Returns a list of all registered conversion families.

GetConvTypes procedure

Returns a list of all registered conversion types in a specified conversion family.

RaiseConversionError procedure

Raises an EConversionError exception.

RegisterConversionFamily function

Registers a new conversion family and returns its identifier.

RegisterConversionType function

Registers a new conversion type and returns its identifier.

StrToConvUnit function

Parses a string into a value and conversion type.

TryConvTypeToFamily function

Retrieves the identifier for the conversion family with which a conversion type or pair of types is registered.

TryStrToConvUnit function

Parses a string into a value and conversion type.

UnregisterConversionFamily procedure

Unregisters a conversion family previously registered using RegisterConversionFamily.

UnregisterConversionType procedure

Unregisters a conversion type previously registered using RegisterConversionType.


CtlPanel routines

CtlPanel objects/components

Other routines, by unit

Application variable (for control panel applets)

Represents the application for a control panel applet project.


DataBkr routines

DataBkr objects/components

Other routines, by unit

DisableSocketTransport procedure

Unregisters a remote data module so clients can’t access it using a Socket connection.

DisableWebTransport procedure

Unregisters a remote data module so clients can’t access it using a Web connection.

EnableSocketTransport procedure

Registers a remote data module so clients can access it using a Socket connection.

EnableWebTransport procedure

Registers a remote data module so clients can access it using a Web connection.

RegisterPooled procedure

Registers a remote data module so that instances are pooled.

UnregisterPooled procedure

Removes the object pooling registry entries for a remote data module.


DateUtils routines

Other routines, by unit

CompareDate function

Indicates the relationship between the date portions of two TDateTime values.

CompareDateTime function

Indicates the relationship between two TDateTime values.

CompareTime function

Indicates the relationship between the time portions of two TDateTime values.

DateOf function

Strips the time portion from a TDateTime value.

DateTimeToJulianDate function

Converts a TDateTime value into a Julian date.

DateTimeToModifiedJulianDate function

Converts a TDateTime value into a modified Julian date.

DateTimeToUnix function

Converts a TDateTime value into a Unix-based date-and-time value.

Day of week constants

Provide symbolic constants for ISO 8601-compliant day of the week values.

DayOf function

Returns the day of the month represented by a TDateTime value.

DayOfTheMonth function

Returns the day of the month represented by a TDateTime value.

DayOfTheWeek function

Returns the day of the week represented by a TDateTime value.

DayOfTheYear function

Returns the number of days between a specified TDateTime value and December 31 of the previous year.

DaysBetween function

Returns the number of whole days between two specified TDateTime values.

DaysInAMonth function

Returns the number of days in a specified month of a specified year.

DaysInAYear function

Returns the number of days in a specified year.

DaysInMonth function

Returns the number of days in the month of a specified TDateTime value.

DaysInYear function

Returns the number of days in the year of a specified TDateTime value.

DaySpan function

Returns the number of days (including fractional days) between two specified TDateTime values.

DecodeDateDay procedure

Returns the year and day of the year for a specified TDateTime value.

DecodeDateMonthWeek procedure

Returns the year, month, week of the month, and day of the week for a specified TDateTime value.

DecodeDateTime procedure

Returns Year, Month, Day, Hour, Minute, Second, and MilliSecond values for a TDateTime value.

DecodeDateWeek procedure

Returns the year, week of the year, and day of the week for a specified TDateTime value.

DecodeDayOfWeekInMonth procedure

For a given TDateTime value, returns the year, month, day of the week, and the count of that day of the week in the month.

EncodeDateDay function

Returns a TDateTime value that represents a specified day of the year for a specified year.

EncodeDateMonthWeek function

Returns a TDateTime objectvalue that represents a specified day of a specified week in a specified month and year.

EncodeDateTime function

Returns a TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

EncodeDateWeek function

Returns a TDateTime value that represents a specified day of a specified week in a specified year.

EncodeDayOfWeekInMonth function

Returns a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

EndOfADay function

Returns a TDateTime value that represents the last millisecond of a specified day.

EndOfAMonth function

Returns a TDateTime value that represents the last millisecond of the last day of a specified month.

EndOfAWeek function

Returns a TDateTime value that represents the last millisecond of a specified day of a specified week.

EndOfAYear function

Returns a TDateTime value that represents the last millisecond of a specified year.

EndOfTheDay function

Returns a TDateTime value that represents the last millisecond of the day identified by a specified TDateTime value.

EndOfTheMonth function

Returns a TDateTime value that represents the last millisecond of the last day of the month identified by a specified TDateTime value.

EndOfTheWeek function

Returns a TDateTime value that represents the last millisecond of the last day of the week identified by a specified TDateTime value.

EndOfTheYear function

Returns a TDateTime value that represents the last millisecond of the last day of the year identified by a specified TDateTime value.

HourOf function

Returns the hour of the day represented by a TDateTime value.

HourOfTheDay function

Returns the hour of the day represented by a TDateTime value.

HourOfTheMonth function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the month.

HourOfTheWeek function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the week.

HourOfTheYear function

Returns the number of hours between a specified TDateTime value and 12:00 AM of the first day of the year.

HoursBetween function

Returns the number of whole hours between two specified TDateTime values.

HourSpan function

Returns the number of Hours (including fractional Hours) between two specified TDateTime values.

IncDay function

Returns a date shifted by a specified number of days.

IncHour function

Returns a date/time value shifted by a specified number of hours.

IncMilliSecond function

Returns a date/time value shifted by a specified number of milliseconds.

IncMinute function

Returns a date/time value shifted by a specified number of minutes.

IncSecond function

Returns a date/time value shifted by a specified number of seconds.

IncWeek function

Returns a date shifted by a specified number of weeks.

IncYear function

Returns a date shifted by a specified number of years.

IsInLeapYear function

Indicates whether a specified TDateTime value occurs in a leap year.

IsPM function

Indicates whether the time portion of a specified TDateTime value occurs after noon.

IsSameDay function

Indicates whether a specified TDateTime value occurs on a the same day as a criterion date.

IsToday function

Indicates whether a specified TDateTime value occurs on the current date.

IsValidDate function

Indicates whether a specified year, month, and day represent a valid date.

IsValidDateDay function

Indicates whether a specified year and day of the year represent a valid date.

IsValidDateMonthWeek function

Indicates whether a specified year, month, week of the month, and day of the week represent a valid date.

IsValidDateTime function

Indicates whether a specified year, month, day, hour, minute, second, and millisecond represent a valid date and time.

IsValidDateWeek function

Indicates whether a specified year, week of the year, and day of the week represent a valid date.

IsValidTime function

Indicates whether a specified hour, minute, second, and millisecond represent a valid date and time.

JulianDateToDateTime function

Converts a Julian date to a TDateTime value.

MilliSecondOf function

Returns the millisecond of the second represented by a TDateTime value.

MilliSecondOfTheDay function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the same day.

MilliSecondOfTheHour function

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same hour.

MilliSecondOfTheMinute function

Returns the number of milliseconds between a specified TDateTime value and the beginning of the same minute.

MilliSecondOfTheMonth function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the month.

MilliSecondOfTheSecond function

Returns the millisecond of the second represented by a TDateTime value.

MilliSecondOfTheWeek function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the week.

MilliSecondOfTheYear function

Returns the number of milliseconds between a specified TDateTime value and 12:00:00:00 AM of the first day of the year.

MilliSecondsBetween function

Returns the number of milliseconds between two specified TDateTime values.

MilliSecondSpan function

Returns the number of milliseconds between two specified TDateTime values.

MinuteOf function

Returns the minute of the hour represented by a TDateTime value.

MinuteOfTheDay function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the same day.

MinuteOfTheHour function

Returns the number of minutes between a specified TDateTime value and the beginning of the same hour.

MinuteOfTheMonth function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the month.

MinuteOfTheWeek function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the week.

MinuteOfTheYear function

Returns the number of minutes between a specified TDateTime value and 12:00 AM of the first day of the year.

MinutesBetween function

Returns the number of minutes between two specified TDateTime values.

MinuteSpan function

Returns the number of minutes, including fractions thereof, between two specified TDateTime values.

ModifiedJulianDateToDateTime function

Converts a modified Julian date to a TDateTime value.

MonthOf function

Returns the month of the year represented by a TDateTime value.

MonthOfTheYear function

Returns the month of the year represented by a TDateTime value.

MonthsBetween function

Returns the approximate number of months between two specified TDateTime values.

MonthSpan function

Returns the approximate number of months (including fractions thereof) between two specified TDateTime values.

NthDayOfWeek function

Returns which occurence of its weekday a specified TDateTime value represents.

RecodeDate function

Replaces the date portion of a specified TDateTime value.

RecodeDateTime function

Selectively replaces parts of a specified TDateTime value.

RecodeDay function

Replaces the day of the month for a specified TDateTime value.

RecodeHour function

Replaces the hour of the day for a specified TDateTime value.

RecodeLeaveFieldAsIs constant

Identifies a parameter to RecodeDateTime that should not be used.

RecodeMilliSecond function

Replaces the millisecond of the second for a specified TDateTime value.

RecodeMinute function

Replaces the minute of the hour for a specified TDateTime value.

RecodeMonth function

Replaces the month of the year for a specified TDateTime value.

RecodeSecond function

Replaces the second of the minute for a specified TDateTime value.

RecodeTime function

Replaces the time portion of a specified TDateTime value.

RecodeYear function

Replaces the year for a specified TDateTime value.

SameDate function

Indicates whether two TDateTime values represent the same year, month, and day.

SameDateTime function

Indicates whether two TDateTime values represent the same year, month, day, hour, minute, second, and millisecond.

SameTime function

Indicates whether two TDateTime values represent the same time of day, ignoring the date portion.

SecondOf function

Returns the second of the minute represented by a TDateTime value.

SecondOfTheDay function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the same day.

SecondOfTheHour function

Returns the number of seconds between a specified TDateTime value and the beginning of the same hour.

SecondOfTheMinute function

Returns the number of seconds between a specified TDateTime value and the beginning of the same minute.

SecondOfTheMonth function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the month.

SecondOfTheWeek function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM of the first day of the week.

SecondOfTheYear function

Returns the number of seconds between a specified TDateTime value and 12:00:00 AM on the first day of the year.

SecondsBetween function

Returns the number of seconds between two specified TDateTime values.

SecondSpan function

Returns the number of seconds (including fractions thereof) between two specified TDateTime values.

StartOfADay function

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day.

StartOfAMonth function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified month.

StartOfAWeek function

Returns a TDateTime value that represents 12:00:00:00 AM on a specified day of a specified week.

StartOfAYear function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of a specified year.

StartOfTheDay function

Returns a TDateTime value that represents 12:00:00:00 AM on the day identified by a specified TDateTime value.

StartOfTheMonth function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the month identified by a specified TDateTime value.

StartOfTheWeek function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the week identified by a specified TDateTime value.

StartOfTheYear function

Returns a TDateTime value that represents 12:00:00:00 AM on the first day of the year identified by a specified TDateTime value.

TimeOf function

Strips the date portion from a TDateTime value.

Today function

Returns a TDateTime value that represents the current date.

Tomorrow function

Returns a TDateTime value that represents the following day.

TryEncodeDateDay function

Calculates the TDateTime value that represents a specified day of the year for a specified year.

TryEncodeDateMonthWeek function

Calculates the TDateTime value that represents a specified day of a specified week in a specified month and year.

TryEncodeDateTime function

Calculates the TDateTime value that represents a specified year, month, day, hour, minute, second, and millisecond.

TryEncodeDateWeek function

Calculates the TDateTime value that represents a specified day of a specified week in a specified year.

TryEncodeDayOfWeekInMonth function

Calculates a TDateTime value that represents a specified occurrence of a day of the week within a specified month and year.

TryJulianDateToDateTime function

Converts a Julian date to a TDateTime value.

TryModifiedJulianDateToDateTime function

Converts a modified Julian date to a TDateTime value.

TryRecodeDateTime function

Selectively replaces parts of a specified TDateTime value.

UnixToDateTime function

Converts a Unix-based date-and-time value to a TDateTime value.

WeekOf function

Returns the week of the year represented by a TDateTime value.

WeekOfTheMonth function

Returns the week of the month represented by a TDateTime value.

WeekOfTheYear function

Returns the week of the year represented by a TDateTime value.

WeeksBetween function

Returns the number of whole weeks between two specified TDateTime values.

WeeksInAYear function

Returns the number of weeks in a specified year.

WeeksInYear function

Returns the number of weeks in the year of a specified TDateTime value.

WeekSpan function

Returns the number of weeks (including fractional weeks) between two specified TDateTime values.

WithinPastDays function

Indicates whether two dates are within a specified number of days of each other.

WithinPastHours function

Indicates whether two date/time values are within a specified number of hours of each other.

WithinPastMilliSeconds function

Indicates whether two date/time values are within a specified number of milliseconds of each other.

WithinPastMinutes function

Indicates whether two date/time values are within a specified number of minutes of each other.

WithinPastMonths function

Indicates whether two date/time values are within a specified number of months of each other.

WithinPastSeconds function

Indicates whether two date/time values are within a specified number of seconds of each other.

WithinPastWeeks function

Indicates whether two date/time values are within a specified number of weeks of each other.

WithinPastYears function

Indicates whether two date/time values are within a specified number of years of each other.

YearOf function

Returns the year represented by a TDateTime value.

YearsBetween function

Returns the approximate number of years between two specified TDateTime values.

YearSpan function

Returns the approximate number of years (including fractions thereof) between two specified TDateTime values.

Yesterday function

Returns a TDateTime value that represents the preceding day.


DBClient routines

DBClient objects/components

Other routines, by unit

PackageParams function

Converts a TParams object into an OleVariant that can be used in multi-tiered applications.

UnpackParams procedure

Converts an OleVariant that represents a set of parameters into a TParams object.


DBCtrls routines

DBCtrls objects/components

Other routines, by unit

DBUseRightToLeftAlignment function

Indicates whether a data-aware control’s alignment is reversed to a right-to-left mode.


DBLogDlg routines

DBLogDlg objects/components

Other routines, by unit

LoginDialog function

Brings up the database Login dialog to allow the user to connect to a database server.

LoginDialogEx function

Brings up the database Login dialog to allow the user to connect to a database server.

RemoteLoginDialog function

Brings up the database Login dialog to allow the user to connect to a database server.


DBPWDlg routines

DBPWDlg objects/components

Other routines, by unit

PasswordDialog function

Displays a dialog box that prompts the user for the password of a local password-protected table.


DBTables routines

DBTables objects/components

Other routines, by unit

AnsiToNative function

Converts a string from the ANSI character set to the character set associated with a given locale.

Check procedure

Converts a string from the ANSI character set to the character set associated with a given locale.

DBbiError procedure

Creates and raises an EDBEngineError exception for an error code returned by the Borland Database Engine (BDE).

NativeCompareStr function

Compares strings based on a database locale case sensitively.

NativeCompareStrBuf function

Compares null-terminated strings based on a database locale case sensitively.

NativeCompareText function

Compares strings based on a database locale without case sensitivity.

NativeCompareTextBuf function

Compares null-terminated strings based on a database locale and is not case sensitive.

NativeToAnsi function

Converts a string from the character set of the given locale to the ANSI character set.

NativeToAnsiBuf procedure

Converts a string from the character set of a specified locale into the ANSI character set.

Session variable

Maintains database components used by an application.

Sessions variable

Provides access to TSessionList methods and properties.


DBWeb routines

DBWeb objects/components

Other routines, by unit

HtmlTable function

Generates the HTML image of a dataset, using the properties and events of a table producer object.


DB routines

DB objects/components

Other routines, by unit

DatabaseError procedure

Creates and raises an EDatabaseError exception.

DatabaseErrorFmt procedure

Creates and raises an EDatabaseError exception with a formatted error message.

ExtractFieldName function

Returns the next name in a semicolon-delimited string of field names.

GetFieldProperty function

Returns a TField object for a dataset and data control.

RegisterFields procedure

Registers a set of field components so that they appear in the Dataset designer.

VarTypeToDataType function

Returns the field type value that most closely corresponds to a Variant type.


DesignEditors routines

DesignEditors objects/components

Other routines, by unit

GReferenceExpandable variable

Indicates whether the Object Inspector treats component properties as expandable subproperties.

GShowReadOnlyProps variable

Indicates whether the Object Inspector displays published read-only properties.


DesignIntf routines

DesignIntf objects/components

Other routines, by unit

RegisterComponentEditor procedure

Registers an editor so that it is available at design time.

RegisterPropertiesInCategory function

Registers multiple properties in a specific property category.

RegisterPropertyEditor procedure

Allows a component to bring up a custom property editor from the Object Inspector.

RegisterPropertyInCategory function

Registers a single property in a specific property category.


Dialogs routines

Dialogs objects/components

Other routines, by unit

CreateMessageDialog function

Creates a specified message dialog.

ForceCurrentDirectory variable

Indicates whether open and save dialogs should display the current directory if no initial directory is assigned.

InputBox function

Displays an input dialog box that lets the user enter a string.

InputQuery function

Displays an input dialog box that lets the user enter a string.

MessageDlg function

Displays a message dialog box in the center of the screen.

MessageDlgPos function

Displays a message dialog box at the specified screen coordinates.

MessageDlgPosHelp function

Displays a message dialog box whose help is supplied in a named help file.

PromptForFileName function

Displays an open or save dialog, where the user can specify a file name.

ShowMessage procedure

Displays a message box with an OK button.

ShowMessageFmt procedure

Displays a message box with a formatted message.

ShowMessagePos procedure

Displays a message box at a specified location.


DRIntf routines

Other routines, by unit

AssociateAttr procedure

Sets up an association between an attribute ID and a field ID.

CreateField function

Creates a new field from information stored in the Data Dictionary.

DictionaryActive function

Indicates whether there is an active Data Dictionary.

DictionaryDeactivate procedure

Deactivates the Data Dictionary.

FindAttrID function

Returns the ID of a specified attribute set.

FindDatabaseID function

Returns the ID of a specified database.

FindFieldID function

Returns the ID of a specified field.

FindTableID function

Returns the ID of a specified table.

GetAttrID function

Returns the ID of the attribute set associated with a field.

GetAttrName function

Returns the name of an attribute set given its ID.

GetAttrNames procedure

Executes a callback for every attribute set name.

GetControlClass function

Returns the class associated with an attribute set.

HasConstraints function

Indicates whether there are any data constraints for a dataset stored in the Data Dictionary.

IsNullID function

Indicates whether a Data Dictionary Identifier is null.

NewAttr function

Creates an attribute set based on the properties of a field component.

QualifyTableName function

Returns the fully qualified name of a table in the Data Dictionary.

QualifyTableNameByName function

Returns the fully qualified name of a table in the Data Dictionary.

UnassociateAttr procedure

Removes the association between an attribute ID and a field ID.

UpdateAttr procedure

Updates an attribute set to match the properties of a field component.

UpdateConstraints procedure

Replaces all imported constraints for a dataset with the current constraints in the Data Dictionary.

UpdateDataset procedure

Updates a dataset and all its field components to match the Data Dictionary.

UpdateField procedure

Updates a field component to match the associated attribute set in the Data Dictionary.


ExptIntf routines

Other routines, by unit

RegisterLibraryExpert procedure

Registers an expert so that it is installed when a package is installed.


ExtCtrls routines

ExtCtrls objects/components

Other routines, by unit

Frame3D procedure

Draws a three dimensional frame on a canvas.


FileCtrl routines

FileCtrl objects/components

Other routines, by unit

DirectoryExists function

Determines whether a specified directory exists.

ForceDirectories function

Creates a new directory, also creating parents as needed.

MinimizeName function

Shortens a fully qualified path name so that it can be drawn with a specified length limit.

ProcessPath procedure

Parses a file name into its constituent parts.

SelectDirectory function

Brings up a dialog to allow the user to enter a directory name.


FMTBcd routines

FMTBcd objects/components

Other routines, by unit

NullBcd constant

Adds two TBcd values.

StrToBcd function

Converts a string to the corresponding binary-coded decimal (BCD) value.

TryStrToBcd function

Converts a string to the corresponding binary-coded decimal (BCD) value.

VarFMTBcd function

Returns the TVarType constant that identifies the internal type of a Variant as a TBcd value.

VarFMTBcdCreate function

Creates a new Variant that stores its value internally as a TBcd value.

VarIsFMTBcd function

Indicates whether a specified Variant represents a TBcd value.

VarToBcd function

Converts a Variant into a TBcd type.


Forms routines

Forms objects/components

Other routines, by unit

Application variable (for standard applications)

Represents application-level information.

ForegroundTask function

Indicates whether the current thread is running in the foreground.

GetParentForm function

Returns the form or property page that contains a specified control.

HintWindowClass variable

Specifies the class for the window used to display help hints.

IsAccel function

Indicates whether a particular character is an accelerator character (or hot key) within a given menu caption or other text string.

Screen variable

Represents a screen device.

ValidParentForm function

Returns the form or property page that contains a specified control.


Graphics routines

Graphics objects/components

Other routines, by unit

CharsetToIdent function

Obtains the name of a character set.

ColorToIdent function

Provides the symbolic name of a TColor value.

ColorToRGB function

Converts a TColor value into an RGB representation of the color.

ColorToString function

Returns a string that represents the name of a TColor value.

CopyPalette function

Creates a new palette object that matches an existing palette.

CreateGrayMappedBmp function

Remaps the standard gray colors in a bitmap with the system grays.

CreateGrayMappedRes function

Remaps the standard gray colors in a bitmap resource with the system grays.

CreateMappedBmp function

Changes the color table in a bitmap.

CreateMappedRes function

Changes the color table in a bitmap resource.

DDBsOnly variable

Determines whether bitmap handles are created as device-dependent bitmaps (DDB).

GetCharsetValues procedure

Passes the name of every predefined character set string to a callback function.

GetColorValues procedure

Passes the name of every predefined color constant to a callback function.

GetDefFontCharSet function

Returns the character set of the default system font.

GetDIB function

Returns the info header and image for a device independent bitmap.

GetDIBSizes procedure

Returns the size of the info header and of the image for a device independent bitmap.

GraphicExtension function

Returns the default file-name extension of a graphics object.

GraphicFileMask function

Returns a file mask that specifies the valid extensions for a graphic class.

GraphicFilter function

Returns a file filter compatible with the Filter property of an Open or Save dialog.

IdentToCharset function

Translates the name of a character set constant to the corresponding character set.

IdentToColor function

Translates the name of a color constant to the corresponding TColor value.

StringToColor function

Translates a string representation of a color to the corresponding TColor value.

SystemPalette16 variable

Contains the 16 VGA system colors.


HTTPApp routines

HTTPApp objects/components

Other routines, by unit

DosPathToUnixPath function

Converts a TDateTime value into a string representing the day of the week.

ExtractHeaderFields procedure

Parses a multi-valued string into its constituent fields.

ExtractHTTPFields procedure

Parses a multi-valued string into its constituent fields.

HTTPDecode function

Decodes a string that includes HTTP escape characters.

HTTPEncode function

Converts a string into a form that contains no values that are illegal in an HTTP message header.

ParseDate function

Converts a TDateTime value into a string representing the month.

StatusString function

Returns the explanatory string associated with one of the predefined HTTP response status codes.

UnixPathToDosPath function

Converts a Unix-compatible path specification to a Dos-compatible path specification.


InvokeRegistry routines

InvokeRegistry objects/components

Other routines, by unit

AppNameSpacePrefix variable

Supplies a unique prefix to use for automatically generated namespaces given to invokable interfaces and remotable types.

GetRemotableDataContext function

Returns the TDataContext object that provides temporary storage during a call to an invokable interface.

InvRegistry function

Provides access to the invocation registry.

RemClassRegistry function

Provides access to the remotable class registry.

RemTypeRegistry function

Provides access to the remotable type registry.

SetRemotableDataContext procedure

Sets the data context that provides temporary storage during a call to an invokable interface.


ISAPIApp routines

ISAPIApp objects/components

Other routines, by unit

GetExtensionVersion function

Returns the name and version number of an ISAPI or NSAPI application.

HTTPExtensionProc function

Receives an HTTP request message for an ISAPI or NSAPI application.

TerminateExtension function

Indicates whether an ISAPI or NSAPI application is ready to be shut down.


Masks routines

Masks objects/components

Other routines, by unit

MatchesMask function

Indicates whether a file name conforms to the format specified by a filter string.


Math routines

Math objects/components

Other routines, by unit

ArcCos function

Calculates the inverse cosine of a given number.

ArcCosh function

Calculates the inverse hyperbolic cosine of a given number.

ArcCot function

Calculates the inverse cotangent of a given number.

ArcCotH function

Calculates the inverse hyperbolic cotangent of a given number.

ArcCsc function

Calculates the inverse cosecant of a given number.

ArcCscH function

Calculates the inverse hyperbolic cosecant of a given number.

ArcSec function

Calculates the inverse secant of a given number.

ArcSecH function

Calculates the inverse hyperbolic secant of a given number.

ArcSin function

Calculates the inverse sine of a given number.

ArcSinh function

Calculates the inverse hyperbolic sine of a given number.

ArcTan2 function

Calculates the arctangent angle and quadrant of a given number.

ArcTanh function

Calculates the inverse hyperbolic tangent of a given number.

Ceil function

Rounds variables up toward positive infinity.

ClearExceptions procedure

Clears any pending exception bits in the status word.

CompareValue function

Returns the relationship between two numeric values.

Cosecant function

Returns the cosecant of an angle.

Cosh function

Calculates the hyperbolic cosine of an angle.

Cot function

Calculates the cotangent of an angle.

Cotan function

Calculates the cotangent of an angle.

CotH function

Calculates the hyperbolic cotangent of an angle.

Csc function

Returns the cosecant of an angle.

CscH function

Returns the hyperbolic cosecant of an angle.

CycleToDeg function

Converts an angle measurement from cycles to degrees.

CycleToGrad function

Converts an angle measurement from cycles to grads.

CycleToRad function

Converts an angle measurement from cycles to radians.

DegToCycle function

Returns the value of a degree measurement expressed in cycles.

DegToGrad function

Returns the value of a degree measurement expressed in grads.

DegToRad function

Returns the value of a degree measurement expressed in radians.

DivMod procedure

Returns the result of an integer division, including the remainder.

DoubleDecliningBalance function

Calculates the depreciation of an asset using the double-declining balance method.

EnsureRange function

Returns the closest value to a specified value within a specified range.

Floor function

Rounds variables toward negative infinity.

Frexp procedure

Separates the Mantissa and Exponent of X

FutureValue function

Calculates the future value of an investment.

GetExceptionMask function

Returns the exception mask from the FPU control word.

GetPrecisionMode function

Returns the FPU precision control mode.

GetRoundMode function

Returns the FPU rounding mode.

GradToCycle function

Converts grad measurements to cycles.

GradToDeg function

Converts grad measurements to degrees.

GradToRad function

Converts grad measurements to radians.

Hypot function

Calculates the length of the hypotenuse.

Infinity constant

Represents positive infinity.

InRange function

Indicates whether a value falls within a specified range.

InterestPayment function

Calculates the interest portion of a loan payment.

InterestRate function

Returns the interest rate required to increase PresentValue to FutureValue.

InternalRateOfReturn function

Calculates the internal rate of return for an investment.

IntPower function

Calculates the integral power of a base value.

IsInfinite function

Indicates when a variable or expression represents an infinite value.

IsNan function

Indicates when a variable or expression does not evaluate to a numeric value.

IsZero function

Indicates when a floating-point variable or expression evaluates to zero, or very close to zero.

Ldexp function

Calculates X * (2**P)

LnXP1 function

Returns the natural log of (X+1)

Log10 function

Calculates log base 10.

Log2 function

Calculates log base 2.

LogN function

Calculates the log of X for a specified base.

Max function

Returns the greater of two numeric values.

MaxComp constant

The maximum value of the Comp data type.

MaxDouble constant

The maximum value of the Double data type.

MaxExtended constant

The maximum value of the Extended data type.

MaxIntValue function

Returns the largest signed value in an integer array.

MaxSingle constant

The maximum value of the Single data type.

MaxValue function

Returns the largest signed value in an array.

Mean function

Returns the average of all values in an array.

MeanAndStdDev procedure

Calculates the mean and standard deviation of array elements.

Min function

Returns the lesser of two numeric values.

MinComp constant

The minimum value of the Comp data type.

MinDouble constant

The minimum value of the Double data type.

MinExtended constant

The minimum value of the Extended data type.

MinIntValue function

Returns the smallest signed value in an integer array.

MinSingle constant

The minimum value of the Single data type.

MinValue function

Returns smallest signed value in an array.

MomentSkewKurtosis procedure

Calculates the mean, variance, skew, and kurtosis.

NaN constant

Represents a value that is not a number.

NegInfinity constant

Represents negative infinity.

NetPresentValue function

Calculates the current value from an array of estimated cash flow values.

Norm function

Returns the Euclidean 'L-2' norm.

NumberOfPeriods function

Returns the number of payment periods for an investment.

Payment function

Calculates a fully amortized payment.

PeriodPayment function

Returns the principal amount from a full payment.

Poly function

Evaluates a uniform polynomial of one variable at the value X.

PopnStdDev function

Calculates the population standard deviation.

PopnVariance function

Calculates the population variance.

Power function

Raises Base to any power.

PresentValue function

Calculates the present value of an investment.

RadToCycle function

Converts radians to cycles.

RadToDeg function

Converts radians to degrees.

RadToGrad function

Converts radians to grads.

RandG function

Generates random numbers with Gaussian distribution.

RandomRange function

Returns a random integer from a specified range.

RoundTo function

Rounds a floating-point value to a specified digit or power of ten using “Banker’s rounding”.

SameValue function

Indicates whether two floating-point values are (approximately) equal.

Sec function

Calculates the secant of an angle.

Secant function

Calculates the secant of an angle.

SecH function

Calculates the hyperbolic secant of an angle.

SetExceptionMask function

Sets the exception mask on the FPU control word.

SetPrecisionMode function

Sets the FPU precision control mode.

SetRoundMode function

Sets the FPU rounding mode.

Sign function

Indicates whether a numeric value is positive, negative, or zero.

SimpleRoundTo function

Rounds a floating-point value to a specified digit or power of ten using asymmetric arithmetic rounding.

SinCos procedure

Returns sine and cosine of an angle.

Sinh function

Returns the hyperbolic sine of an angle.

SLNDepreciation function

Returns the straight-line depreciation allowance of an asset.

StdDev function

Returns the sample standard deviation for elements in an array.

Sum function

Returns the sum of the elements in an array.

SumInt function

Returns the sum of the elements in an integer array.

SumOfSquares function

Returns the sum of the squared values from a data array.

SumsAndSquares procedure

Returns the sum of the values and the sum of the squared values in an array.

SYDDepreciation function

Calculates depreciation for an asset.

Tan function

Returns the tangent of X.

Tanh function

Returns the hyperbolic tangent of X.

TotalVariance function

Returns the statistical variance from an array of values.

Variance function

Calculates statistical sample variance from an array of data.


Menus routines

Menus objects/components

Other routines, by unit

AnsiSameCaption function

Indicates whether two strings are the same based on the current Windows locale, ignoring case information and accelerator characters.

GetHotkey function

Returns the last character in a string marked with an ampersand (&).

NewItem function

Creates and initializes a menu item.

NewLine function

Creates a menu item for a separator.

NewMenu function

Creates and initializes a main menu.

NewPopupMenu function

Creates and initializes a popup menu.

NewSubMenu function

Creates and initializes a menu item that represents a submenu.

PopupList variable

Provides centralized handling of Windows messages directed at popup menus.

ShortCut function

Creates a menu shortcut for a specified key combination.

ShortCutToKey procedure

Returns the virtual key code and shift state of a menu shortcut.

ShortCutToText function

Converts a menu shortcut into a string that describes the shortcut.

StripHotKey function

Removes the accelerator character marker from a string.

TextToShortCut function

Creates a menu shortcut from a text string.

ValidMenuHotkeys variable

Determines what accelerator keys can be automatically assigned to a menu item caption.


Mtx routines

Other routines, by unit

CreateSharedPropertyGroup function

Returns the interface for a SharedPropertyGroup that allows MTS objects within a server process to share state.

CreateTransactionContextEx function

Returns an interface for a new shared property group manager that creates and coordinates shared properties of MTS objects.

SafeRef function

Returns a reference to a transactional object that is safe to pass outside its context.


OleCtnrs routines

OleCtnrs objects/components

Other routines, by unit

DestroyMetaPict procedure

Frees a metafile resource given its handle.


OleCtrls routines

OleCtrls objects/components

Other routines, by unit

EmptyParam variable

Specifies that an optional parameter on a dual interface is not used.

FontToOleFont function

Returns a Variant containing an IFontDispatch interface that represents a TFont object.

OleFontToFont procedure

Fills in a TFont structure to represent an IFontDispatch.


Printers routines

Printers objects/components

Other routines, by unit

AssignPrn procedure

Assigns a text-file variable to the printer.

Printer function

Returns a global instance of TPrinter to manage interaction with the printer.

SetPrinter function

Replaces the global instance of TPrinter that manages interaction with the printer.


Provider routines

Provider objects/components

Other routines, by unit

VarArrayFromStrings function

Creates a Variant array that contains the strings in a TStrings object.


RecError routines

Other routines, by unit

HandleReconcileError function

Displays a dialog that lets users determine what action to take when an update could not be applied.


ScktComp routines

ScktComp objects/components

Other routines, by unit

SetErrorProc function

Replaces the exception handler for error messages that are received from a Windows socket connection.


SqlExpr routines

SqlExpr objects/components

Other routines, by unit

FreeProcParams procedure

Frees a list of procedure parameters that is allocated by GetProcedureParams.

GetDriverNames procedure

Populates a string list with the names of all available dbExpress drivers.

LoadParamListItems procedure

Fills a TParams object with information from a list of parameter descriptors.


SqlTimSt routines

Other routines, by unit

CheckSqlTimeStamp procedure

Checks whether a TSQLTimeStamp value represents a valid date and time.

DateTimeToSQLTimeStamp function

Converts a TDateTime value to a TSQLTimeStamp value.

NullSQLTimeStamp constant

Represents a NULL TSQLTimeStamp value.

SQLDayOfWeek function

Indicates the day of the week when a specified TSQLTimeStamp value occurs.

SQLTimeStampToDateTime function

Converts a TSQLTimeStamp value to a TDateTime value.

SQLTimeStampToStr function

Converts a TSQLTimeStamp value to a string.

StrToSQLTimeStamp function

Converts a string to a TSQLTimeStamp value.

TryStrToSQLTimeStamp function

Converts a string to a TSQLTimeStamp value.

VarIsSQLTimeStamp function

Indicates whether a specified Variant represents a TSQLTimeStamp value.

VarSQLTimeStamp function

Returns the TVarType constant that identifies the internal type of a Variant as a TSQLTimeStamp value.

VarSQLTimeStampCreate function

Creates a new Variant that stores its value internally as a TSQLTimeStamp value.

VarToSQLTimeStamp function

Converts a Variant that represents a TSQLTimeStamp value to the corresponding TSQLTimeStamp.


StdConvs routines

Other routines, by unit

area unit variables

Represent units that measure area.

CelsiusToFahrenheit function

Converts a temperature expressed in degrees Celsius to the corresponding temperature in degrees Fahrenheit.

conversion family variables

Represent a family of measurement units.

distance unit variables

Represent units that measure distance.

FahrenheitToCelsius function

Converts a temperature expressed in degrees Fahrenheit to the corresponding temperature in degrees Celsius.

mass unit variables

Represent units that measure weight.

temperature unit variables

Represent units that measure temperature.

time unit variables

Represent units that measure time.

volume unit variables

Represent units that measure distance.


StrUtils routines

Other routines, by unit

AnsiContainsStr function

Indicates whether one string is a (case-sensitive) substring of another.

AnsiContainsText function

Indicates whether one string is a (case-insensitive) substring of another.

AnsiEndsStr function

Indicates whether one string is a (case-sensitive) suffix of another.

AnsiEndsText function

Indicates whether one string is a (case-insensitive) suffix of another.

AnsiIndexStr function

Provides the index of a specified string in an array of strings.

AnsiIndexText function

Provides the index of a specified string in an array of strings.

AnsiMatchStr function

Indicates whether an array of strings contains an exact match to a specified string.

AnsiMatchText function

Indicates whether an array of strings contains a case-insensitive match to a specified string.

AnsiReplaceStr function

Replaces all occurrences of a substring with another string.

AnsiReplaceText function

Replaces all case-insensitive matches of a substring with another string.

AnsiResemblesProc variable

Controls the algorithm used by AnsiResemblesText to determine when two strings are similar.

AnsiResemblesText function

Indicates whether two strings are similar.

AnsiStartsStr function

Indicates whether one string is a (case-sensitive) prefix of another.

AnsiStartsText function

Indicates whether one string is a (case-insensitive) prefix of another.

DecodeSoundExInt function

Converts an integer representation of a SoundEx encoding into the corresponding phonetic string.

DecodeSoundExWord function

Converts a Word representation of a SoundEx encoding into the corresponding phonetic string.

DupeString function

Returns the concatenation of a string with itself a specified number of repeats.

IfThen function

Conditionally returns one of two specified values.

LeftStr function

Returns the substring of a specified length that appears at the start of a string.

MidStr function

Returns the substring of a specified length that appears at a specified position in a string.

RandomFrom function

Returns a randomly selected element from an array.

ReverseString function

Returns the reverse of a specified string.

RightStr function

Returns the substring of a specified length that appears at the end of a string.

SearchBuf function

Locates a substring within a text buffer.

SoundEx function

Converts a string into its SoundEx representation.

SoundExCompare function

Compares the SoundEx representations of two strings.

SoundExInt function

Converts a string into an integer that represents its phonetic value.

SoundExProc function

Indicates whether two strings are similar.

SoundExSimilar function

Indicates whether two strings are similar.

SoundExWord function

Converts a string into a Word that represents its phonetic value.

StuffString function

Inserts a substring into a specified position of a string, replacing the current characters.


SvcMgr routines

SvcMgr objects/components

Other routines, by unit

Application variable (for service applications)

Represents a service application for a service project.


System routines

System objects/components

Other routines, by unit

Abs function

Returns an absolute value.

AcquireExceptionObject function

Allows an exception object to persist after the except clause exits.

Addr function

Returns a pointer to a specified object.

AllocMemCount variable

Represents the total number of allocated memory blocks in an application.

AllocMemSize variable

Represents the total size of allocated memory blocks.

AnsiToUtf8 function

Converts a string encoded in Ansi to UTF-8.

Append procedure

Prepares an existing file for adding text to the end.

ArcTan function

Calculates the arctangent of a given number.

Assert procedure

Tests whether a Boolean expression is true.

AssertErrorProc variable

Points to the assertion error-handler.

Assigned function

Tests for a nil (unassigned) pointer or procedural variable.

AssignFile procedure

Associates the name of an external file with a file variable.

BeginThread function

Spawns a separate thread of execution.

BlockRead procedure

Reads one or more records from an open file into a variable.

BlockWrite procedure

Writes one or more records from a variable to an open file.

Break procedure

Causes the flow of control to exit a for, while, or repeat statement.

ChDir procedure

Changes the current directory.

Chr function

Returns the character for a specified ASCII value.

Close procedure

Terminates the association between a file variable and an external file.

CloseFile procedure

Terminates the association between file variable and an external disk file.

CmdLine variable

CmdLine is a pointer to the command-line arguments specified when the application is invoked.

CmdShow variable

CmdShow is passed to the Windows ShowWindow WinAPI routine.

CompToCurrency function

Converts a Comp value to a Currency value.

CompToDouble function

Converts a Comp value to a Double value.

Concat function

Concatenates two or more strings into one.

Continue procedure

Allows the flow of control to proceed to the next iteration of for, while, or repeat statements.

Copy function

Returns a substring of a string or a segment of a dynamic array.

Cos function

Calculates the cosine of an angle.

Dec procedure

Converts a Currency value to a Comp value.

Default8087CW variable

Specifies the Default 8087 control word.

DefaultTextLineBreakStyle variable

Specifies the characters that are used by default to separate lines in text.

Delete procedure

Removes a substring from a string.

Dispose procedure

Releases memory allocated for a dynamic variable.

DLLProc variable

Points to a procedure invoked by a DLL entry point.

DoubleToComp function

Converts a Double value to a Comp.

EndThread function

Terminates the execution of a thread.

EnumModules procedure

Executes a callback for all the modules in an application.

EnumResourceModules procedure

Executes a callback for all resource modules in an application.

Eof function

Tests whether the file position is at the end of a file.

Eoln function

Tests whether the file pointer is at the end of a line.

Erase procedure

Deletes an external file.

ErrorAddr variable

Contains the address of a statement causing a runtime error.

ErrorProc variable

Points to the RTL run-time error handler.

ErrOutput variable

Specifies a write-only file associated with stderr, usually the display.

ExceptAddr function

Returns the address at which the current exception was raised.

ExceptObject function

Returns a reference to the object associated with the current exception.

ExceptProc variable

Points to the lowest-level RTL exception handler.

Exclude procedure

Removes an element from a set.

Exit procedure

Exits from the current procedure.

ExitCode variable

Contains the application's exit code.

ExitProc variable

Points to a program's exit procedure (provided for backward compatibility).

ExitProcessProc variable

ExitProcessProc specifies the last procedure to execute before the application shuts down.

Exp function

Returns the exponential of X.

File mode constants

File mode constants are used to open and close disk files.

FileMode variable

Indicates the access mode on typed and untyped files opened by the Reset procedure.

FilePos function

Returns the current file position.

FileSize function

Returns the number of records in a file.

FillChar procedure

Fills contiguous bytes with a specified value.

Finalize procedure

Uninitializes a dynamically allocated variable.

FindClassHInstance function

Returns the instance handle for the module in which a class type is defined.

FindHInstance function

Returns the instance handle of the module that contains a specified address.

FindResourceHInstance function

Returns the instance handle of the resource module associated with a specified HInstance.

Flush procedure

Empties the buffer of a text file opened for output.

Frac function

Returns the fractional part of a real number.

FreeMem procedure

Disposes of a dynamic variable of a given size.

Get8087CW function

Returns the value of the 8087 code word.

GetDir procedure

Returns the current directory for a specified drive.

GetHeapStatus function

Returns the current status of the memory manager.

GetLastError function

Returns the last error reported by an operating system API call.

GetMem procedure

Creates a dynamic variable and a pointer to the address of the block.

GetMemoryManager procedure

Returns the entry points of the currently installed memory manager.

GetVariantManager procedure

Returns the entry points of the routines that define variant behavior.

Halt procedure

Initiates abnormal termination of a program.

HeapAllocFlags variable

Flags that indicate how the memory manager obtains memory from the operating system.

Hi function

Returns the high-order byte of X as an unsigned value.

High function

Returns the highest value in the range of an argument.

Inc procedure

Increments an ordinal value by one or N.

Include procedure

Adds an element to a set.

Initialize procedure

Initializes a dynamically allocated variable.

InitProc variable

InitProc is the last installed initialization procedure.

Input variable

Specifies a read-only file associated with an operating system's standard input device.

Insert procedure

Inserts a substring into a string beginning at a specified point.

Int function

Returns the integer part of a real number.

IOResult function

Returns the status of the last I/O operation performed.

IsConsole variable

Indicates whether the module was compiled as a console application.

IsLibrary variable

Indicates whether the module is a DLL.

IsMemoryManagerSet function

Indicates whether the memory manager has been overridden using the SetMemoryManager procedure.

IsMultiThread variable

Indicates whether the application spawned additional threads using BeginThread or TThread objects.

IsVariantManagerSet function

Indicates whether variant support is implemented in an application.

JITEnable variable

Controls when the just-in-time debugger is called.

Length function

Returns the number of characters in a string or elements in an array.

LibModuleList variable

Lists module records for enumeration procedures.

Ln function

Returns the natural log of a real expression.

Lo function

Returns the low order Byte of argument X.

Low function

Returns the lowest value in a range.

MainInstance variable

The instance handle for the main executable.

MainThreadID variable

The instance handle for the current module's main thread of execution.

MaxInt constant

The maximum value of the Integer data type.

MaxLongint constant

The maximum value of the Longint data type.

MkDir procedure

Creates a new subdirectory.

Move procedure

Copies bytes from a source to a destination.

New procedure

Creates a new dynamic variable and sets P to point to it.

NoErrMsg variable

Controls whether the application displays an error message when a runtime error occurs.

Odd function

Returns True if argument is an odd number.

OleStrToString function

Copies data received from a COM interface to a string.

OleStrToStrVar procedure

Copies a string from its COM representation to an existing Pascal string.

Ord function

Returns the ordinal value of an ordinal-type expression.

Output variable

Specifies a write-only file associated with standard output, usually the display.

ParamCount function

Returns the number of parameters passed on the command line.

ParamStr function

Returns a specified parameter from the command-line.

Pi function

Returns 3.1415926535897932385.

Pos function

Returns the index value of the first character in a specified substring that occurs in a given string.

Pred function

Returns the predecessor of the argument.

Ptr function

Converts a specified address to a pointer.

PUCS4Chars function

Converts a UCS4 string to an null-terminated array of UCS4 characters.

Random function

Generates random numbers within a specified range.

Randomize procedure

Initializes the random number generator with a random value.

RandSeed variable

RandSeed stores the built-in random number generator's seed.

Read procedure

Read reads data from a file.

Readln procedure

Reads a line of text from a file.

ReallocMem procedure

Reallocates a dynamic variable.

ReleaseExceptionObject procedure

Decrements the reference count on an exception object that was incremented by a call to AcquireExceptionObject.

Rename procedure

Changes the name of an external file.

Reset procedure

Opens an existing file.

Rewrite procedure

Creates a new file and opens it.

RmDir procedure

Deletes an empty subdirectory.

Round function

Returns the value of X rounded to the nearest whole number.

RunError procedure

Stops execution and generates a run-time error.

Seek procedure

Moves the current position of a file to a specified component.

SeekEof function

Returns the end-of-file status of a file, ignoring whitespace.

SeekEoln function

Returns the end-of-line status of a file, ignoring whitespace.

Set8087CW procedure

Sets both the control word in the floating point unit and the variable NoErrMsg declared in the system unit.

SetLength procedure

Sets the length of a string or dynamic-array variable.

SetLineBreakStyle procedure

Determines the end-of-line and end-of-file conventions for text file I/O.

SetMemoryManager procedure

Sets entry points of the memory manager.

SetString procedure

Sets the contents and length of the given string.

SetTextBuf procedure

Assigns an I/O buffer to a text file.

SetVariantManager procedure

Sets the entry points of routines that define variant behavior.

Sin function

Returns the sine of the angle in radians.

SizeOf function

Returns the number of bytes occupied by a variable or type.

Slice function

Returns a sub-section of an array.

Sqr function

Returns the square of a number.

Sqrt function

Returns the square root of X.

Str procedure

Formats a string and returns it to a variable.

StringOfChar function

Returns a string with a specified number of repeating characters.

StringToOleStr function

Allocates memory and copies a string to the OLE format.

StringToWideChar function

Returns a UNICODE string from a Pascal string.

Succ function

Returns the successor of an argument.

Swap function

Exchanges high order byte with the low order byte of an integer or word.

SysFreeMem function

Frees the memory pointed to by a specified pointer.

SysGetMem function

Allocates a specified number of bytes and returns a pointer to them.

SysReallocMem function

Returns a pointer to a specified number of bytes, preserving the values pointed to by the Pointer parameter.

Trunc function

Truncates a real number to an integer.

Truncate procedure

Deletes all the records after the current file position.

TypeInfo function

Returns a pointer to compiler-generated runtime type information for a type identifier.

UCS4StringToWideString function

Converts a string of 4-byte Unicode characters into a WideString value.

UnicodeToUtf8 function

Converts a string of Unicode characters into a UTF-8 string.

UniqueString procedure

Ensures that a given string has a reference count of one.

UpCase function

Converts a character to uppercase.

Utf8Decode function

Converts a UTF8 string to a Unicode string (WideString).

Utf8Encode function

Converts a WideString value to a UTF8 string.

Utf8ToAnsi function

Converts a UTF8 string to a string of Ansi characters.

Utf8ToUnicode function

Converts a string of UTF-8 characters to a Unicode string.

Val procedure

Converts a string to a numeric representation.

VarArrayRedim procedure

Resizes a Variant array.

VarClear procedure

Empties a Variant, so that it is unassigned.

WideCharLenToString function

Converts Unicode characters to single or multi byte character data.

WideCharLenToStrVar procedure

WideCharLenToStrVar converts Unicode characters to single or multi byte character data.

WideCharToString function

Converts null-terminated Unicode string to single or multi byte character data.

WideCharToStrVar procedure

Converts Unicode string to a single or multi byte character data.

WideStringToUCS4String function

Converts a WideString value to a string of 4-byte Unicode characters.

Write procedure (for text files)

Writes to a text file.

Write procedure (for typed files)

Writes to a typed file.

Writeln procedure

Writes to a text file and adds an end-of-line marker


SysUtils routines

SysUtils objects/components

Other routines, by unit

Abort procedure

Raises a silent exception.

AddExitProc procedure

Add procedure to exit list.

AddTerminateProc procedure

Adds a terminate procedure to the system list of termination procedures.

AllocMem function

Allocates a memory block and initializes each byte to zero.

AnsiCompareFileName function

Compares file names based on the current locale.

AnsiCompareStr function

Compares strings based on the current locale with case sensitivity.

AnsiCompareText function

Compares strings based on the current locale without case sensitivity.

AnsiDequotedStr function

Converts a quoted string into an unquoted

AnsiExtractQuotedStr function

Converts a quoted string into an unquoted string.

AnsiLastChar function

Returns a pointer to the last character in a string.

AnsiLowerCase function

Returns a string that is a copy of the given string converted to lower case.

AnsiLowerCaseFileName function

Converts a file name to lower case.

AnsiPos function

Locates the position of a substring within a string.

AnsiQuotedStr function

Returns the quoted version of a string.

AnsiSameStr function

Compares strings based on the current locale with case sensitivity.

AnsiSameText function

Compares strings based on the current locale without case sensitivity.

AnsiStrComp function

Compares null-terminated character strings.

AnsiStrIComp function

Compares null terminated character strings case insensitively.

AnsiStrLastChar function

Returns a pointer to the last character in a null-terminated string.

AnsiStrLComp function

Compares the first MaxLen bytes of two null-terminated strings, case-sensitively.

AnsiStrLIComp function

Compares two strings, case-insensitively, up to the first MaxLen bytes.

AnsiStrLower function

Converts all characters in a null-terminated string to lower case.

AnsiStrPos function

Returns a pointer to the first occurrence of SubStr in Str.

AnsiStrRScan function

Returns a pointer to the last occurrence of a specified character in a specified string.

AnsiStrScan function

Returns a pointer to first occurrence of a character in a string.

AnsiStrUpper function

Converts all characters in a null-terminated string to upper case.

AnsiUpperCase function

Converts a string to upper case.

AnsiUpperCaseFileName function

Converts a file name to upper case.

AppendStr procedure

Appends a dynamically allocated string to an existing string.

AssignStr procedure

Assigns a new dynamically allocated string to a specified pointer.

Beep procedure

Generates a message beep.

BoolToStr function

Converts a boolean value to a string.

ByteToCharIndex function

Returns the position of the character that contains a specified byte in a string.

ByteToCharLen function

Returns the number of characters fully contained in the first MaxLen bytes of a string.

ByteType function

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

CallTerminateProcs function

Calls all of the functions in the termination procedure list.

ChangeFileExt function

Changes the extension of a file name.

CharLength function

Returns number of bytes used by a character.

CharToByteIndex function

Returns the 1-based index of the first byte of a specified character in a string.

CharToByteLen function

Returns the length, in bytes, of the first MaxLen characters of a string.

CompareMem function

Performs a binary comparison of two memory images.

CompareStr function

Compares two strings case sensitively.

CompareText function

Compares two strings by ordinal value without case sensitivity.

CreateDir function

Creates a new directory.

Currency and date/time formatting variables

Influence the way numeric or date/time values are formatted.

CurrentYear function

Creates a new directory.

CurrToStr function

Formats a Currency value as a string.

CurrToStrF function

Converts a Currency value to a string, using a specified format.

Date function

Returns the current date.

DateDelta constant

Specifies the difference between TDateTime and TTimeStamp values.

DateTimeToFileDate function

Converts a TDateTime object to an OS timestamp.

DateTimeToStr function

Converts a TDateTime value to a string.

DateTimeToString procedure

Converts a TDateTime value to a string using a specified Format.

DateTimeToSystemTime procedure

Converts a TDateTime value into the Win32 API's TSystemTime type.

DateTimeToTimeStamp function

Converts a TDateTime value into the corresponding TTimeStamp value.

DateToStr function

Converts a TDateTime value to a string.

DayOfWeek function

Returns the day of the week for a specified date.

DecodeDate procedure

Returns Year, Month, and Day values for a TDateTime value.

DecodeDateFully function

Returns Year, Month, and Day, and Day-of-Week values for a TDateTime value.

DecodeTime procedure

Breaks a TDateTime value into hours, minutes, seconds, and milliseconds.

DeleteFile function

Deletes a file from disk.

DiskFree function

Returns the number of free bytes on a specified drive.

DiskSize function

Returns the size, in bytes, of a specified drive.

DisposeStr procedure

Disposes of a string pointer that was allocated using NewStr.

EncodeDate function; TryEncodeDate function

Returns a TDateTime value that represents a specified Year, Month, and Day.

EncodeTime function;TryEncodeTime function

Returns a TDateTime value for a specified Hour, Min, Sec, and MSec.

ExceptionErrorMessage function

Formats a standard error message.

ExcludeTrailingBackslash function

Returns a path name without a trailing delimiter.

ExcludeTrailingPathDelimiter function

Returns a path name without a trailing delimiter.

ExpandFileName function

Returns the full path name for a relative file name.

ExpandUNCFileName function

Returns the full path of a file name in UNC format, if appropriate.

ExtractFileDir function

Extracts the drive and directory parts from FileName.

ExtractFileDrive function

Returns the drive portion of a file name.

ExtractFileExt function

Returns the extension portions of a file name.

ExtractFileName function

Extracts the name and extension parts of a file name.

ExtractFilePath function

Returns the drive and directory portions of a file name.

ExtractRelativePath function

Returns a relative path name, relative to a specific base directory.

ExtractShortPathName function

Converts a file name to the short 8.3 form.

FalseBoolStrs variable

Lists strings that can represent the boolean value False.

File open mode constants

File open mode constants are used to control the access mode to a file or stream.

FileAge function

Returns the OS timestamp of a file.

FileClose procedure

Closes a specified file.

FileCreate function

Creates a new file.

FileDateToDateTime function

Converts an OS timestamp value to TDateTime value.

FileExists function

Tests if a specified file exists.

FileGetAttr function

Returns the file attributes of FileName.

FileGetDate function

Returns an OS timestamp for a specified file.

FileIsReadOnly function

Report if file is read-only.

FileOpen function

Opens a specified file using a specified access mode.

FileRead function

Reads a specified number of bytes from a file.

FileSearch function

Searches a specified directory path for a file.

FileSeek function

Repositions read/write point.

FileSetAttr function

Sets the file attributes of a specified file.

FileSetDate function

Sets the OS time stamp for a specified file.

FileWrite function

Writes the contents of a buffer to the current position in a file.

FinalizePackage procedure

Finalizes the specified package .BPL.

FindClose procedure

Releases memory allocated by FindFirst.

FindCmdLineSwitch function

Determines whether a string was passed as a command line argument to the application.

FindFirst function

Searches for the first instance of a file name with a given set of attributes in a specified directory.

FindNext function

Returns the next entry matching the name and attributes specified in a previous call to FindFirst.

FloatToCurr function

Converts a floating-point value to a Currency value.

FloatToDecimal procedure

Converts a floating-point value to a TDateTime value.

FloatToStr function

Converts a floating point value to a string.

FloatToStrF function

Converts a floating point value to a string, using a specified Format, Precision, and Digits.

FloatToText function

Converts a floating-point value to an unterminated character string, using a specified Format, Precision and Digits.

FloatToTextFmt function

Converts a floating-point value to to an unterminated character string, using a specified format.

FmtLoadStr function

Returns formatted output using a resourced format string.

FmtStr procedure

Assembles a formatted string using a format string and an array of arguments.

Format function

Returns a formatted string assembled from a format string and an array of arguments.

FormatBuf function

Formats the arguments from an array, placing the result in a buffer.

FormatCurr function

Formats a Currency object.

FormatDateTime function

Formats a TDateTime value.

FormatFloat function

Formats a floating point value.

FreeAndNil procedure

Frees an object reference and replaces the reference with nil..

GetCurrentDir function

Returns the name of the current directory.

GetEnvironmentVariable function

Returns environment variable value..

GetFormatSettings procedure

Resets the date and number format parameters to initial values.

GetPackageDescription function

Returns the description resource from a package.

GetPackageInfo procedure

Enumerates all the units and required packages for a package.

GUIDToString function

Converts a class identifier GUID to a string.

HoursPerDay constant;MinsPerDay constant;SecsPerDay constant;MSecsPerDay constant

Values useful in time calculations.

IncAMonth procedure

Increments date data by one month.

IncludeTrailingBackslash function

Ensures path name ends with delimiter

IncludeTrailingPathDelimiter function

Ensures path name ends with delimiter.

IncMonth function

Returns a date shifted by a specified number of months.

InitializePackage procedure

Validates and initializes a given package.

IntToHex function

Returns the hex representation of an integer.

IntToStr function

Converts an integer to a string.

IsDelimiter function

Indicates whether a specified character in a string matches one of a set of delimiters.

IsLeapYear function

Indicates whether a specified year is a leap year.

IsPathDelimiter function

Indicates whether the byte at position Index of a string is the path delimiter.

IsValidIdent function

Tests for a valid Pascal identifier.

Languages function

Lists the locales for which support is available.

LastDelimiter function

Returns the byte index in S of the last character that matches any character in the Delimiters AnsiString.

LeadBytes variable

Lists all Char values that can be the first byte of a double byte character on the local system.

LoadPackage function

Loads a specified package.

LoadStr function

Loads a string from the application's executable file.

LowerCase function

Converts an ASCII string to lowercase.

MSecsToTimeStamp function

Converts a specified number of milliseconds into a TTimeStamp value.

NewStr function

Allocates a string on the heap.

NextCharIndex function

Return byte index of next character.

Now function

Returns the current date and time.

NullStr constant

Declares a pointer to EmptyStr.

OutOfMemoryError procedure

Raises an EOutOfMemory exception.

QuotedStr function

Returns the quoted version of a string.

RaiseLastOSError procedure

Raises an exception for the last occurring OS or system library error.

RaiseLastWin32Error procedure

Raises an exception for the last occurring Win32 error.

RemoveDir function

Deletes an existing empty directory.

RenameFile function

Changes a file name.

ReplaceDate procedure

Replaces the date portion of a TDateTime value with a specified date.

ReplaceTime procedure

Replaces the time portion of a TDateTime value with a specified time.

SafeLoadLibrary function

Loads a DLL while suppressing error dialogs and preventing the DLL from changing the FPU control word.

SameFileName function

Compares file names based on the current locale.

SameText function

Compares two strings by ordinal value without case sensitivity.

SetCurrentDir function

Sets the current directory.

ShowException procedure

Displays an exception message with its physical address

StrAlloc function

Allocates a buffer for a null-terminated string and returns a pointer to its first character.

StrBufSize function

Returns the maximum number of characters that can be stored in a buffer allocated by StrAlloc.

StrByteType function

Indicates whether a byte in a string is a single byte character, the first byte of a double byte character, or the second byte of a double byte character.

StrCat function

Appends a copy of Source to the end of Dest and returns the concatenated string.

StrCharLength function

Find character size.

StrComp function

Compares two strings with case sensitivity.

StrCopy function

Copies Source to Dest and returns Dest.

StrDispose procedure

Disposes of a string.

StrECopy function

Copies null-terminated string.

StrEnd function

Returns a pointer to the end of a null terminated string.

StrFmt function

Formats entries in an array.

StrIComp function

Compares two strings without case sensitivity.

StringToGUID function

Returns a string with occurrences of one substring replaced by another substring.

StrLCat function

Appends up to a specified maximum number of characters to string.

StrLComp function

Compares up to a specified maximum number of characters in two strings.

StrLCopy function

Copies up to a specified maximum number of characters from Source to Dest.

StrLen function

Returns number of characters in a string excluding the null terminator.

StrLFmt function

Formats a series of arguments from a specified open array into a buffer.

StrLIComp function

Compares strings up to a specified maximum number of characters, without case sensitivity.

StrLower function

Converts a string to lowercase.

StrMove function

Copies specified number of characters to string.

StrNew function

Allocates space on and copies a string to the heap; returning a pointer to the string.

StrNextChar function

Returns pointer to following character.

StrPas function

Converts null-terminated string to a Pascal string.

StrPCopy function

Copies a Pascal string to a null-terminated string.

StrPLCopy function

Copies characters from a Pascal-style string into a null-terminated string.

StrPos function

Returns a pointer to the first occurrence of STR2 in STR1.

StrRScan function

Returns a pointer to the last occurrence of a specified character in a string.

StrScan function

Returns a pointer to first occurrence of a specified character in a string.

StrToBool function

Converts a string to a boolean value.

StrToCurr function

Converts a string to a Currency value.

StrToDate function

Converts a string to a TDateTime value.

StrToDateTime function

Converts a string to a TDateTime value.

StrToFloat function

Converts a given string to a floating-point value.

StrToInt function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToInt64 function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToInt64Def function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToIntDef function

Converts a string that represents an integer (decimal or hex notation) to a number.

StrToTime function

Converts a string to a TDateTime value.

StrUpper function

Returns a string in upper case.

Supports function

Indicates whether a given object or interface supports a specified interface.

SysErrorMessage function

Converts OS error codes into strings.

SystemTimeToDateTime function

Converts a _SYSTEMTIMETSystemTime value into a TDateTime objectvalue.

Time function

Returns the current time.

TimeStampToDateTime function

Converts a TTimeStamp value into the corresponding TDateTime value.

TimeStampToMSecs function

Converts a TTimeStamp value into an absolute number of milliseconds.

TimeToStr function

Returns a string that represents a TDateTime value.

Trim function

Trims leading and trailing spaces and control characters from a string.

TrimLeft function

Trims leading spaces and control characters from a string.

TrimRight function

Trims trailing spaces and control characters from a string.

TrueBoolStrs variable

Lists strings that can represent the boolean value True.

UnixDateDelta constant

Specifies the difference between TDateTime and TIME_T values.

UnloadPackage procedure

Unloads a package.

UpperCase function

Returns a copy of a string in uppercase.

WideCompareStr function

Compares Unicode strings based on the current locale with case sensitivity.

WideCompareText function

Compares Unicode strings based on the current locale without case sensitivity.

WideFmtStr procedure

Assembles a formatted Unicode string using a format string and an array of arguments.

WideFormat function

Returns a formatted Unicode string assembled from a format string and an array of arguments.

WideFormatBuf function

Formats the arguments from an array, placing the result in a buffer.

WideLowerCase function

Returns Unicode string converted to lower case.

WideSameStr function

Compares Unicode strings based on the current locale with case sensitivity.

WideSameText function

Compares Unicode strings based on the current locale without case sensitivity.

WideUpperCase function

Returns Unicode string converted to upper case.

Win32Check function

Checks the return value of a Windows API call and raises an appropriate exception when it indicates failure.

Win32Platform variable

Specifies the Win32 platform identifier.

WrapText function

Splits a string into multiple lines as its length approaches a specified size.


Types routines

Other routines, by unit

Bounds function

Returns the TRect for a rectangle of given dimensions.

CenterPoint function

Returns the point in the center of a rectangle.

IntersectRect function

Returns the intersection of two rectangles

IsRectEmpty function

Indicates wither a specified rectangle has a positive width and height.

OffsetRect function

Changes the origin of a rectangle by a specified amount.

Point function

Creates a TPoint structure from a pair of coordinates.

PtInRect function

Indicates whether a specified point lies inside a specified rectangle.

Rect function

Creates a TRect structure from a set of coordinates.

UnionRect function

Returns the union of two rectangles


TypInfo routines

TypInfo objects/components

Other routines, by unit

FreeAndNilProperties function

Frees any property values that are objects and sets their value to nil.


VarCmplx routines

Other routines, by unit

ComplexNumberSymbol variable

Indicates the symbol used to represent the imaginary part of a complex number.

ComplexNumberSymbolBeforeImaginary variable

Indicates the placement of the symbol that represents the imaginary part of a complex number.

VarAsComplex function

Casts an arbitrary Variant so that it is a custom Variant representing a complex number.

VarComplex function

Returns the Variant type code for custom Variants that represent complex numbers.

VarComplexAbs function

Returns the absolute value of a complex number.

VarComplexAbsSqr function

Returns the square of the absolute value of a complex number.

VarComplexAngle function

Returns the angle made by a complex number.

VarComplexArcCos function

Returns the inverse cosine of a complex number.

VarComplexArcCosH function

Returns the hyperbolic inverse cosine of a complex number.

VarComplexArcCot function

Returns the inverse cotangent of a complex number.

VarComplexArcCsc function

Returns the hyperbolic inverse cotangent of a complex number.

VarComplexArcCscH function

Returns the hyperbolic inverse cosecant of a complex number.

VarComplexArcSec function

Returns the inverse secant of a complex number.

VarComplexArcSecH function

Returns the hyperbolic inverse secant of a complex number.

VarComplexArcSin function

Returns the inverse sine of a complex number.

VarComplexArcSinH function

Returns the hyperbolic inverse sine of a complex number.

VarComplexArcTan function

Returns the inverse tangent of a complex number.

VarComplexArcTanH function

Returns the hyperbolic inverse tangent of a complex number.

VarComplexConjugate function

Returns the conjugate of a complex number.

VarComplexCos function

Returns the cosine of a complex number.

VarComplexCosH function

Returns the hyperbolic cosine of a complex number.

VarComplexCot function

Returns the cotangent of a complex number.

VarComplexCreate function

Returns the hyperbolic cotangent of a complex number.

VarComplexCsc function

Returns the cosecant of a complex number.

VarComplexCscH function

Returns the hyperbolic cosecant of a complex number.

VarComplexExp function

Returns the exponential of a complex number.

VarComplexFromPolar function

Converts a set of polar coordinates to a complex number.

VarComplexInverse function

Returns the inverse of a complex number.

VarComplexLn function

Returns the natural log of a complex number.

VarComplexPower function

Returns the value of a complex number raised to a specified power.

VarComplexSec function

Returns the secant of a complex number.

VarComplexSecH function

Returns the hyperbolic secant of a complex number.

VarComplexSimplify function

Reduces a Variant that represents a complex number to one that represents a real value, if possible.

VarComplexSin function

Returns the sine of a complex number.

VarComplexSinH function

Returns the hyperbolic sine of a complex number.

VarComplexSqr function

Returns the square of a complex number.

VarComplexSqrt function

Returns the square root of a complex number.

VarComplexTan function

Returns the tangent of a complex number.

VarComplexTanH function

Returns the hyperbolic tangent of a complex number.

VarComplexTimesNegI function

Returns the value of a complex number multiplied by –i.

VarComplexTimesPosI function

Returns the value of a complex number multiplied by i.

VarComplexToPolar procedure

Computes the polar coordinates that correspond to a custom Variant that represents a complex number.

VarIsComplex function

Indicates whether a Variant stores its data internally as a complex number.


VarConv routines

Other routines, by unit

VarAsConvert function

Casts an arbitrary Variant so that it is a custom Variant representing a measurement.

VarConvert function

Returns the Variant type code for custom Variants that represent measurements.

VarConvertCreate function

Returns a custom Variant that represents a measurement.

VarIsConvert function

Indicates whether a Variant is a custom Variant that represents a measurement.


Variants routines

Variants objects/components

Other routines, by unit

DynArrayFromVariant procedure

Creates a dynamic array from a Variant.

DynArrayToVariant procedure

Creates a Variant array from a dynamic array.

EmptyParam function

Returns an OleVariant that represents an unused optional parameter on a dual interface.

FindCustomVariantType function

Retrieves the object that implements a custom Variant type.

Null function

Null returns a null Variant.

Unassigned constant

Used for a variant not yet assigned a value.

VarArrayCreate function

Creates a variant array.

VarArrayDimCount function

Returns number of dimensions of a variant array.

VarArrayGet function

Returns a Variant that represents a single value from a multi-dimensional Variant array.

VarArrayHighBound function

Returns high bound for a dimension in a variant array.

VarArrayLock function

Locks a variant array and returns a pointer to the data.

VarArrayLowBound function

Returns the low bound of a dimension in a variant array.

VarArrayOf function

Creates and fills a one-dimensional variant array.

VarArrayPut procedure

Sets the value of a single cell in a multi-dimensional Variant array.

VarArrayRef function

Returns a reference to the specified variant array.

VarArrayUnlock procedure

Unlocks a variant array.

VarAsType function

Converts a variant to specified type.

VarCheckEmpty procedure

Raises an exception if a specified variant’s value is Unassigned.

VarCompareValue function

Returns the relationship between Variants.

VarCopyNoInd procedure

Copies a Variant.

VarDispProc variable

Provides the support for IDispatch-based Automation.

VarEnsureRange function

Returns a Variant with a value in a specified range.

VarFromDateTime function

Returns a variant containing a specified data and time.

VarInRange function

Indicates whether a Variant’s value is in a specified range.

VarIsArray function

Indicates whether the specified variant is an array.

VarIsByRef function

Indicates whether the specified variant’s value is by reference.

VarIsClear function

Indicates whether the specified variant has an undefined value.

VarIsCustom function

Indicates whether the specified variant is a custom variant.

VarIsEmpty function

Indicates whether the specified variant is unassigned.

VarIsEmptyParam function

Indicates whether the specified variant represents an unassigned optional parameter.

VarIsFloat function

Indicates whether the specified variant represents a floating-point value.

VarIsNull function

Indicates whether the specified variant is Null.

VarIsNumeric function

Indicates whether the specified variant represents a numeric value.

VarIsOrdinal function

Indicates whether the specified variant represents an ordinal value.

VarIsStr function

Indicates whether the specified variant represents a string value.

VarIsType function

Indicates whether the specified variant represents a specified type.

VarSameValue function

Indicates whether two Variants have equivalent values.

VarSupports function

Indicates whether the Variant’s value is an interface that supports a specified interface.

VarToDateTime function

Converts a specified variant to a TDateTime value.

VarToStr function

Converts a variant to a string.

VarToStrDef function

Converts a variant to a string.

VarToWideStr function

Converts a variant to a WideString.

VarToWideStrDef function

Converts a variant to a WideString.

VarType function

Returns the type code of a specified variant.

VarTypeIsValidArrayType function

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.

VarTypeIsValidElementType function

Indicates whether a Variant type code represents a type that can be used for the elements in a Variant array.


WebBroker routines

WebBroker objects/components

Other routines, by unit

Application variable (for Web server applications)

Represents a web server application for an Internet project.


XMLDoc routines

XMLDoc objects/components

Other routines, by unit

FormatXMLData function

Formats a string of XML so that it is more readable.

LoadXMLData function

Creates and returns the interface of an XML document object, given a string of XML.

LoadXMLDocument function

Returns the interface for an XML document given the name of an XML file.

NewXMLDocument function

Returns the interface for a new, empty XML document.

XMLDocError procedure

Raises an EXMLDocError exception.


XMLDOM routines

XMLDOM objects/components

Other routines, by unit

DefaultVendorName variable

Identifies the DOM implementation that is used by default.

DOMVendors variable

Lists all registered DOM Vendors.

ExtractLocalName function

Strips the namespace prefix, if present, from the tag name of an XML node.

ExtractPrefix function

Returns the namespace prefix of an XML node’s tag name.

GetDOM function

Returns the top-level DOM interface for a registered DOM implementation.

GetDOMVendor function

Returns the TDOMVendor object for a specified DOM vendor.

IsPrefixed function

Indicates whether an XML tag name includes a namespace prefix.

MakeNodeName function

Assembles a full tag name from a local name and namespace prefix.

NodeMatches function

Indicates whether a specified node matches a given namespace and tag name.

RegisterDOMVendor procedure

Registers an implementation of the DOM interfaces so that it is available to the TXMLDocument class.

SameNamespace function

Indicates whether a specified node is defined within a specified namespace.

UnRegisterDOMVendor procedure

Unregisters a DOM implementation that was registered using RegisterDOMVendor .


XSBuiltIns routines

XSBuiltIns objects/components

Other routines, by unit

DateTimeToXSDateTime function

Returns a TXSDateTime object that encodes a TDateTime value.


All elements are displayed here

No additional elements exist for this unit/header or routine.


Link not found

The topic you requested is either not available or not linked to this Help system. This can occur if you launched this Help file from a system on which Delphi has not yet been installed, or if the subject matter you are requesting is not available in your edition of Delphi.


The topic you requested is now loading. If it does not appear within a few seconds, the topic is either not available or not linked to this Help system. This can occur if you launched this Help file from a system on which Delphi has not yet been installed, or if the subject matter you are requesting is not available in your edition of Delphi.